From 63dd0ea397ff01787753f182541ed8324f2d498b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 6 Sep 2017 08:35:16 -0400 Subject: [PATCH 001/342] Spawn source files for Field Map Obj --- include/field_map_obj.h | 10 ++++++++++ src/field_map_obj.c | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 include/field_map_obj.h create mode 100644 src/field_map_obj.c diff --git a/include/field_map_obj.h b/include/field_map_obj.h new file mode 100644 index 000000000..ebc445794 --- /dev/null +++ b/include/field_map_obj.h @@ -0,0 +1,10 @@ +#ifndef POKEEMERALD_FIELD_MAP_OBJ_H +#define POKEEMERALD_FIELD_MAP_OBJ_H + +// Exported struct declarations + +// Exported RAM declarations + +// Exported ROM declarations + +#endif //POKEEMERALD_FIELD_MAP_OBJ_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c new file mode 100644 index 000000000..ec9a7c002 --- /dev/null +++ b/src/field_map_obj.c @@ -0,0 +1,16 @@ +// Includes + +#include "global.h" +#include "field_map_obj.h" + +// Static struct declarations + +// Static RAM declarations + +// Static ROM declarations + +// ROM data + +// Code + + From 83dbdc031856410b8b1b9154900cfcb5c069ec46 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 6 Sep 2017 08:46:47 -0400 Subject: [PATCH 002/342] npc_clear_ids_and_state --- asm/field_map_obj.s | 19 ------------------- include/global.h | 5 +++++ ld_script.txt | 1 + src/field_map_obj.c | 9 ++++++++- 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index ff3c8c48d..5801bbc5f 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,25 +5,6 @@ .text - thumb_func_start npc_clear_ids_and_state -npc_clear_ids_and_state: @ 808D3F0 - push {r4,lr} - adds r4, r0, 0 - movs r1, 0 - movs r2, 0x24 - bl memset - movs r0, 0xFF - strb r0, [r4, 0x8] - movs r0, 0x1 - negs r0, r0 - strb r0, [r4, 0x9] - strb r0, [r4, 0xA] - strb r0, [r4, 0x1C] - pop {r4} - pop {r0} - bx r0 - thumb_func_end npc_clear_ids_and_state - thumb_func_start npcs_clear_ids_and_state npcs_clear_ids_and_state: @ 808D410 push {r4,r5,lr} diff --git a/include/global.h b/include/global.h index c43b57e03..f9c5f68be 100644 --- a/include/global.h +++ b/include/global.h @@ -9,6 +9,11 @@ // to help in decompiling #define asm_comment(x) asm volatile("@ -- " x " -- ") +#ifdef __APPLE__ +void memset(void *, int, size_t); +void memcpy(void *, const void *, size_t); +#endif // __APPLE__ + #define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0])) #define POKEMON_NAME_LENGTH 10 diff --git a/ld_script.txt b/ld_script.txt index d0ae744d1..6e9a7e63c 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -85,6 +85,7 @@ SECTIONS { asm/field_camera.o(.text); asm/field_door.o(.text); asm/field_player_avatar.o(.text); + src/field_map_obj.o(.text); asm/field_map_obj.o(.text); asm/field_ground_effect.o(.text); asm/map_obj_8097404.o(.text); diff --git a/src/field_map_obj.c b/src/field_map_obj.c index ec9a7c002..9451863b4 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -13,4 +13,11 @@ // Code - +void npc_clear_ids_and_state(struct MapObject *mapObject) +{ + memset(mapObject, 0, sizeof(struct MapObject)); + mapObject->localId = 0xFF; + mapObject->mapNum = -1; + mapObject->mapGroup = -1; + mapObject->mapobj_unk_1C = -1; +} From f677873d07dddd9eb43f1a9070bf9b2ac5f61749 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 6 Sep 2017 09:25:16 -0400 Subject: [PATCH 003/342] npcs_clear_ids_and_state --- asm/field_map_obj.s | 22 ---------------------- include/field_map_obj.h | 2 ++ src/field_map_obj.c | 9 +++++++++ 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 5801bbc5f..0ea219238 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,28 +5,6 @@ .text - thumb_func_start npcs_clear_ids_and_state -npcs_clear_ids_and_state: @ 808D410 - push {r4,r5,lr} - movs r4, 0 - ldr r5, =gUnknown_02037350 -_0808D416: - lsls r0, r4, 3 - adds r0, r4 - lsls r0, 2 - adds r0, r5 - bl npc_clear_ids_and_state - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0xF - bls _0808D416 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end npcs_clear_ids_and_state - thumb_func_start sub_808D438 sub_808D438: @ 808D438 push {lr} diff --git a/include/field_map_obj.h b/include/field_map_obj.h index ebc445794..e40f09062 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -5,6 +5,8 @@ // Exported RAM declarations +extern struct MapObject gUnknown_02037350[16]; + // Exported ROM declarations #endif //POKEEMERALD_FIELD_MAP_OBJ_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 9451863b4..193182775 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -21,3 +21,12 @@ void npc_clear_ids_and_state(struct MapObject *mapObject) mapObject->mapGroup = -1; mapObject->mapobj_unk_1C = -1; } + +void npcs_clear_ids_and_state(void) +{ + u8 i; + for (i = 0; i < ARRAY_COUNT(gUnknown_02037350); i ++) + { + npc_clear_ids_and_state(&gUnknown_02037350[i]); + } +} From a08f11cab32bf4e2557f33fd275ec8c7b4f165c9 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 6 Sep 2017 09:29:59 -0400 Subject: [PATCH 004/342] sub_808D438 --- asm/field_map_obj.s | 11 ----------- include/field_map_obj.h | 2 ++ include/field_player_avatar.h | 10 ++++++++++ include/rom4.h | 7 +++++++ src/field_map_obj.c | 17 +++++++++++++++-- 5 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 include/field_player_avatar.h create mode 100644 include/rom4.h diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 0ea219238..321f556f1 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,17 +5,6 @@ .text - thumb_func_start sub_808D438 -sub_808D438: @ 808D438 - push {lr} - bl strange_npc_table_clear - bl npcs_clear_ids_and_state - bl ClearPlayerAvatarInfo - bl sub_808D450 - pop {r0} - bx r0 - thumb_func_end sub_808D438 - thumb_func_start sub_808D450 sub_808D450: @ 808D450 push {r4-r6,lr} diff --git a/include/field_map_obj.h b/include/field_map_obj.h index e40f09062..30490d4c6 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -9,4 +9,6 @@ extern struct MapObject gUnknown_02037350[16]; // Exported ROM declarations +void sub_808D438(void); + #endif //POKEEMERALD_FIELD_MAP_OBJ_H diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h new file mode 100644 index 000000000..8438add26 --- /dev/null +++ b/include/field_player_avatar.h @@ -0,0 +1,10 @@ +// +// Created by Scott Norton on 9/6/17. +// + +#ifndef POKEEMERALD_FIELD_PLAYER_AVATAR_H +#define POKEEMERALD_FIELD_PLAYER_AVATAR_H + +void ClearPlayerAvatarInfo(void); + +#endif //POKEEMERALD_FIELD_PLAYER_AVATAR_H diff --git a/include/rom4.h b/include/rom4.h new file mode 100644 index 000000000..956160afb --- /dev/null +++ b/include/rom4.h @@ -0,0 +1,7 @@ + +#ifndef POKEEMERALD_ROM4_H +#define POKEEMERALD_ROM4_H + +void strange_npc_table_clear(void); + +#endif //POKEEMERALD_ROM4_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 193182775..fd4a19397 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1,6 +1,9 @@ // Includes #include "global.h" +#include "sprite.h" +#include "rom4.h" +#include "field_player_avatar.h" #include "field_map_obj.h" // Static struct declarations @@ -9,11 +12,13 @@ // Static ROM declarations +void sub_808D450(void); + // ROM data // Code -void npc_clear_ids_and_state(struct MapObject *mapObject) +/*static*/ void npc_clear_ids_and_state(struct MapObject *mapObject) { memset(mapObject, 0, sizeof(struct MapObject)); mapObject->localId = 0xFF; @@ -22,7 +27,7 @@ void npc_clear_ids_and_state(struct MapObject *mapObject) mapObject->mapobj_unk_1C = -1; } -void npcs_clear_ids_and_state(void) +static void npcs_clear_ids_and_state(void) { u8 i; for (i = 0; i < ARRAY_COUNT(gUnknown_02037350); i ++) @@ -30,3 +35,11 @@ void npcs_clear_ids_and_state(void) npc_clear_ids_and_state(&gUnknown_02037350[i]); } } + +void sub_808D438(void) +{ + strange_npc_table_clear(); + npcs_clear_ids_and_state(); + ClearPlayerAvatarInfo(); + sub_808D450(); +} From 368b0f9ee8500c5f15d511c827d8b59795fab82b Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 6 Sep 2017 09:38:38 -0400 Subject: [PATCH 005/342] sub_808D450 --- asm/field_map_obj.s | 77 ----------------------------------------- include/field_map_obj.h | 4 +++ src/field_map_obj.c | 19 +++++++++- 3 files changed, 22 insertions(+), 78 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 321f556f1..ccd56427c 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,83 +5,6 @@ .text - thumb_func_start sub_808D450 -sub_808D450: @ 808D450 - push {r4-r6,lr} - mov r6, r10 - mov r5, r9 - mov r4, r8 - push {r4-r6} - ldr r0, =gFieldEffectObjectTemplatePointers - ldr r0, [r0, 0x54] - mov r9, r0 - movs r1, 0 - movs r2, 0 - movs r3, 0x1F - bl CreateSpriteAtEnd - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gSprites - mov r10, r1 - lsls r4, r0, 4 - adds r4, r0 - lsls r4, 2 - add r4, r10 - ldrb r1, [r4, 0x1] - movs r5, 0x4 - negs r5, r5 - adds r0, r5, 0 - ands r0, r1 - movs r1, 0x1 - mov r8, r1 - mov r1, r8 - orrs r0, r1 - strb r0, [r4, 0x1] - adds r0, r4, 0 - bl InitSpriteAffineAnim - adds r0, r4, 0 - movs r1, 0 - bl StartSpriteAffineAnim - adds r4, 0x3E - ldrb r0, [r4] - movs r6, 0x4 - orrs r0, r6 - strb r0, [r4] - mov r0, r9 - movs r1, 0 - movs r2, 0 - movs r3, 0x1F - bl CreateSpriteAtEnd - lsls r0, 24 - lsrs r0, 24 - lsls r4, r0, 4 - adds r4, r0 - lsls r4, 2 - add r4, r10 - ldrb r0, [r4, 0x1] - ands r5, r0 - mov r0, r8 - orrs r5, r0 - strb r5, [r4, 0x1] - adds r0, r4, 0 - bl InitSpriteAffineAnim - adds r0, r4, 0 - movs r1, 0x1 - bl StartSpriteAffineAnim - adds r4, 0x3E - ldrb r0, [r4] - orrs r0, r6 - strb r0, [r4] - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_808D450 - thumb_func_start sub_808D4F4 sub_808D4F4: @ 808D4F4 push {lr} diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 30490d4c6..d92b28f8c 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -11,4 +11,8 @@ extern struct MapObject gUnknown_02037350[16]; void sub_808D438(void); +// Exported data declarations + +extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[]; + #endif //POKEEMERALD_FIELD_MAP_OBJ_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index fd4a19397..7b5731e68 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -12,7 +12,7 @@ // Static ROM declarations -void sub_808D450(void); +/*static*/ void sub_808D450(void); // ROM data @@ -43,3 +43,20 @@ void sub_808D438(void) ClearPlayerAvatarInfo(); sub_808D450(); } + +/*static*/ void sub_808D450(void) +{ + u8 spriteIdx; + + spriteIdx = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[21], 0, 0, 31); + gSprites[spriteIdx].oam.affineMode = 1; + InitSpriteAffineAnim(&gSprites[spriteIdx]); + StartSpriteAffineAnim(&gSprites[spriteIdx], 0); + gSprites[spriteIdx].invisible = TRUE; + + spriteIdx = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[21], 0, 0, 31); + gSprites[spriteIdx].oam.affineMode = 1; + InitSpriteAffineAnim(&gSprites[spriteIdx]); + StartSpriteAffineAnim(&gSprites[spriteIdx], 1); + gSprites[spriteIdx].invisible = TRUE; +} From f3f8c5ec2c476aa6db557f30dc830d6b4f9bc741 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 6 Sep 2017 09:42:10 -0400 Subject: [PATCH 006/342] sub_808D4F4 --- asm/field_map_obj.s | 29 ----------------------------- src/field_map_obj.c | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index ccd56427c..6fd4e2005 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,35 +5,6 @@ .text - thumb_func_start sub_808D4F4 -sub_808D4F4: @ 808D4F4 - push {lr} - movs r1, 0 - ldr r2, =gUnknown_02037350 - ldrb r0, [r2] - b _0808D518 - .pool -_0808D504: - adds r0, r1, 0x1 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0xF - bhi _0808D51E - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] -_0808D518: - lsls r0, 31 - cmp r0, 0 - bne _0808D504 -_0808D51E: - adds r0, r1, 0 - pop {r1} - bx r1 - thumb_func_end sub_808D4F4 - thumb_func_start GetFieldObjectIdByLocalIdAndMap @ u8 GetFieldObjectIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId) GetFieldObjectIdByLocalIdAndMap: @ 808D524 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 7b5731e68..46cc0585c 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -30,6 +30,7 @@ static void npcs_clear_ids_and_state(void) { u8 i; + for (i = 0; i < ARRAY_COUNT(gUnknown_02037350); i ++) { npc_clear_ids_and_state(&gUnknown_02037350[i]); @@ -60,3 +61,17 @@ void sub_808D438(void) StartSpriteAffineAnim(&gSprites[spriteIdx], 1); gSprites[spriteIdx].invisible = TRUE; } + +u8 sub_808D4F4(void) +{ + u8 i; + + for (i = 0; i < ARRAY_COUNT(gUnknown_02037350); i ++) + { + if (!gUnknown_02037350[i].active) + { + break; + } + } + return i; +} From ea9dabdfab6d2a28d9119c2c23db43903ad4ecae Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 6 Sep 2017 09:49:51 -0400 Subject: [PATCH 007/342] TryGetFieldObjectIdByLocalIdAndMap --- asm/field_map_obj.s | 50 ----------------------------------------- include/field_map_obj.h | 2 ++ src/field_map_obj.c | 21 +++++++++++++++++ 3 files changed, 23 insertions(+), 50 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 6fd4e2005..45de31c5d 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,56 +5,6 @@ .text - thumb_func_start GetFieldObjectIdByLocalIdAndMap -@ u8 GetFieldObjectIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId) -GetFieldObjectIdByLocalIdAndMap: @ 808D524 - push {lr} - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - cmp r0, 0xFE - bls _0808D53C - bl GetFieldObjectIdByLocalId - b _0808D540 -_0808D53C: - bl GetFieldObjectIdByLocalIdAndMapInternal -_0808D540: - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - thumb_func_end GetFieldObjectIdByLocalIdAndMap - - thumb_func_start TryGetFieldObjectIdByLocalIdAndMap -@ bool8 TryGetFieldObjectIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId, u8 *fieldObjectId) -TryGetFieldObjectIdByLocalIdAndMap: @ 808D548 - push {r4,lr} - adds r4, r3, 0 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - bl GetFieldObjectIdByLocalIdAndMap - strb r0, [r4] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x10 - beq _0808D56A - movs r0, 0 - b _0808D56C -_0808D56A: - movs r0, 0x1 -_0808D56C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end TryGetFieldObjectIdByLocalIdAndMap - thumb_func_start GetFieldObjectIdByXY @ u8 GetFieldObjectIdByXY(s16 x, s16 y) GetFieldObjectIdByXY: @ 808D574 diff --git a/include/field_map_obj.h b/include/field_map_obj.h index d92b28f8c..cb6eceb69 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -10,6 +10,8 @@ extern struct MapObject gUnknown_02037350[16]; // Exported ROM declarations void sub_808D438(void); +u8 GetFieldObjectIdByLocalIdAndMap(u8, u8, u8); +bool8 TryGetFieldObjectIdByLocalIdAndMap(u8, u8, u8, u8 *); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 46cc0585c..61b915878 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -13,6 +13,8 @@ // Static ROM declarations /*static*/ void sub_808D450(void); +/*static*/ u8 GetFieldObjectIdByLocalId(u8); +/*static*/ u8 GetFieldObjectIdByLocalIdAndMapInternal(u8, u8, u8); // ROM data @@ -75,3 +77,22 @@ u8 sub_808D4F4(void) } return i; } + +u8 GetFieldObjectIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId) +{ + if (localId < 0xff) + { + return GetFieldObjectIdByLocalIdAndMapInternal(localId, mapId, mapGroupId); + } + return GetFieldObjectIdByLocalId(localId); +} + +bool8 TryGetFieldObjectIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId, u8 *fieldObjectId) +{ + *fieldObjectId = GetFieldObjectIdByLocalIdAndMap(localId, mapId, mapGroupId); + if (*fieldObjectId == 16) + { + return TRUE; + } + return FALSE; +} From f15191bfc28effef4155b26186bd4236182b88aa Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 6 Sep 2017 09:52:31 -0400 Subject: [PATCH 008/342] GetFieldObjectIdByXY --- asm/field_map_obj.s | 41 ----------------------------------------- include/field_map_obj.h | 1 + src/field_map_obj.c | 15 ++++++++++++++- 3 files changed, 15 insertions(+), 42 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 45de31c5d..106fde060 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,47 +5,6 @@ .text - thumb_func_start GetFieldObjectIdByXY -@ u8 GetFieldObjectIdByXY(s16 x, s16 y) -GetFieldObjectIdByXY: @ 808D574 - push {r4-r6,lr} - movs r3, 0 - ldr r5, =gUnknown_02037350 - lsls r0, 16 - asrs r4, r0, 16 - lsls r1, 16 - asrs r1, 16 -_0808D582: - lsls r0, r3, 3 - adds r0, r3 - lsls r0, 2 - adds r2, r0, r5 - ldrb r0, [r2] - lsls r0, 31 - cmp r0, 0 - beq _0808D5A2 - movs r6, 0x10 - ldrsh r0, [r2, r6] - cmp r0, r4 - bne _0808D5A2 - movs r6, 0x12 - ldrsh r0, [r2, r6] - cmp r0, r1 - beq _0808D5AC -_0808D5A2: - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0xF - bls _0808D582 -_0808D5AC: - adds r0, r3, 0 - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end GetFieldObjectIdByXY - thumb_func_start GetFieldObjectIdByLocalIdAndMapInternal @ u8 GetFieldObjectIdByLocalIdAndMapInternal(u8 localId, u8 mapId, u8 mapGroupId) GetFieldObjectIdByLocalIdAndMapInternal: @ 808D5B8 diff --git a/include/field_map_obj.h b/include/field_map_obj.h index cb6eceb69..3100f72ff 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -12,6 +12,7 @@ extern struct MapObject gUnknown_02037350[16]; void sub_808D438(void); u8 GetFieldObjectIdByLocalIdAndMap(u8, u8, u8); bool8 TryGetFieldObjectIdByLocalIdAndMap(u8, u8, u8, u8 *); +u8 GetFieldObjectIdByXY(s16, s16); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 61b915878..88b9d7eab 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -90,9 +90,22 @@ u8 GetFieldObjectIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId) bool8 TryGetFieldObjectIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId, u8 *fieldObjectId) { *fieldObjectId = GetFieldObjectIdByLocalIdAndMap(localId, mapId, mapGroupId); - if (*fieldObjectId == 16) + if (*fieldObjectId == ARRAY_COUNT(gUnknown_02037350)) { return TRUE; } return FALSE; } + +u8 GetFieldObjectIdByXY(s16 x, s16 y) +{ + u8 i; + for (i = 0; i < ARRAY_COUNT(gUnknown_02037350); i ++) + { + if (gUnknown_02037350[i].active && gUnknown_02037350[i].coords2.x == x && gUnknown_02037350[i].coords2.y == y) + { + break; + } + } + return i; +} From 1087d1c8227fbcdb768bc96b96c969dd2c9cb598 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 6 Sep 2017 10:48:51 -0400 Subject: [PATCH 009/342] GetFieldObjectIdByLocalIdAndMapInternal; rename gUnknown_02037350 to gMapObjects --- asm/battle_setup.s | 10 +- asm/berry.s | 2 +- asm/bike.s | 38 ++--- asm/field_control_avatar.s | 6 +- asm/field_effect.s | 82 +++++----- asm/field_effect_helpers.s | 40 ++--- asm/field_map_obj.s | 238 ++++++++++++------------------ asm/field_player_avatar.s | 96 ++++++------ asm/fldeff_80F9BCC.s | 6 +- asm/fldeff_emotion.s | 6 +- asm/item_use.s | 8 +- asm/link.s | 4 +- asm/load_save.s | 4 +- asm/map_obj_8097404.s | 8 +- asm/map_obj_lock.s | 18 +-- asm/porthole.s | 2 +- asm/rom4.s | 28 ++-- asm/rom6.s | 12 +- asm/rom_80AEFFC.s | 10 +- asm/rom_80C6FA0.s | 4 +- asm/rom_818CFC8.s | 18 +-- asm/rom_81BE66C.s | 30 ++-- asm/scrcmd.s | 10 +- asm/script_pokemon_util_80F87D8.s | 2 +- asm/secret_base.s | 2 +- asm/shop.s | 4 +- asm/trainer_see.s | 14 +- include/field_map_obj.h | 2 - include/global.fieldmap.h | 4 +- src/field_map_obj.c | 29 +++- sym_ewram.txt | 2 +- 31 files changed, 354 insertions(+), 385 deletions(-) diff --git a/asm/battle_setup.s b/asm/battle_setup.s index 1093fa1cb..a07561464 100644 --- a/asm/battle_setup.s +++ b/asm/battle_setup.s @@ -1883,7 +1883,7 @@ SingleTrainerWantsBattle: @ 80B162C ldr r2, =gUnknown_03005DF0 strb r0, [r2] ldr r4, =gScriptLastTalked - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects lsls r2, r0, 3 adds r2, r0 lsls r2, 2 @@ -1911,7 +1911,7 @@ TwoTrainersWantBattle: @ 80B1670 ldr r2, =gUnknown_03005DF0 strb r0, [r2] ldr r4, =gScriptLastTalked - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects lsls r2, r0, 3 adds r2, r0 lsls r2, 2 @@ -1965,7 +1965,7 @@ sub_80B16D8: @ 80B16D8 lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 ldrb r0, [r4, 0x18] lsls r0, 28 @@ -2341,7 +2341,7 @@ sub_80B1A14: @ 80B1A14 b _080B1AD8 .pool _080B1A44: - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects ldr r2, =gUnknown_03006090 ldr r0, =gUnknown_02038BFC ldrb r1, [r0] @@ -2381,7 +2381,7 @@ _080B1A7C: b _080B1AD8 .pool _080B1AAC: - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects ldr r2, =gUnknown_03006090 ldr r0, =gUnknown_02038BFC ldrb r1, [r0] diff --git a/asm/berry.s b/asm/berry.s index 54c4333d5..ec8f225cd 100644 --- a/asm/berry.s +++ b/asm/berry.s @@ -1065,7 +1065,7 @@ ResetBerryTreeSparkleFlags: @ 80E1D6C lsls r2, 16 asrs r2, 16 mov r9, r2 - ldr r4, =gUnknown_02037350 + ldr r4, =gMapObjects lsls r3, 16 asrs r3, 16 mov r8, r3 diff --git a/asm/bike.s b/asm/bike.s index 8a064bcf2..00db73ca1 100644 --- a/asm/bike.s +++ b/asm/bike.s @@ -131,7 +131,7 @@ sub_8119238: @ 8119238 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 ldrb r1, [r4, 0x1E] adds r0, r5, 0 @@ -166,7 +166,7 @@ sub_8119280: @ 8119280 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 ldrb r1, [r4, 0x1E] adds r0, r5, 0 @@ -525,7 +525,7 @@ CheckMovementInputAcroBikeStandingWheelie: @ 8119540 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r1, r0, r1 movs r0, 0 strb r0, [r5, 0x2] @@ -613,7 +613,7 @@ CheckMovementInputAcroBikeBunnyHop: @ 81195E0 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r7, r0, r1 movs r0, 0x2 mov r1, r8 @@ -698,7 +698,7 @@ CheckMovementInputAcroBikeMovingWheelie: @ 8119688 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r7, r0, r1 movs r0, 0x2 mov r9, r0 @@ -802,7 +802,7 @@ CheckMovementInputAcroBikeUnknownMode5: @ 8119764 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldrb r2, [r0, 0x1] movs r1, 0x3 @@ -868,7 +868,7 @@ sub_81197F4: @ 81197F4 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 ldrb r1, [r5, 0x1E] adds r0, r4, 0 @@ -898,7 +898,7 @@ sub_8119830: @ 8119830 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 ldrb r1, [r4, 0x1E] adds r0, r5, 0 @@ -966,7 +966,7 @@ sub_81198C0: @ 81198C0 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 ldrb r1, [r5, 0x1E] adds r0, r4, 0 @@ -995,7 +995,7 @@ sub_81198FC: @ 81198FC lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 ldrb r1, [r5, 0x1E] adds r0, r4, 0 @@ -1024,7 +1024,7 @@ sub_8119938: @ 8119938 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 ldrb r1, [r5, 0x1E] adds r0, r4, 0 @@ -1053,7 +1053,7 @@ sub_8119974: @ 8119974 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 ldrb r1, [r5, 0x1E] adds r0, r4, 0 @@ -1082,7 +1082,7 @@ sub_81199B0: @ 81199B0 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 ldrb r1, [r5, 0x1E] adds r0, r4, 0 @@ -1161,7 +1161,7 @@ _08119A58: lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 movs r0, 0x22 bl PlaySE @@ -1203,7 +1203,7 @@ sub_8119AA4: @ 8119AA4 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 ldrb r1, [r5, 0x1E] adds r0, r4, 0 @@ -1272,7 +1272,7 @@ sub_8119B34: @ 8119B34 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 ldrb r1, [r5, 0x1E] adds r0, r4, 0 @@ -1341,7 +1341,7 @@ sub_8119BC4: @ 8119BC4 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 ldrb r1, [r5, 0x1E] adds r0, r4, 0 @@ -1686,7 +1686,7 @@ sub_8119E38: @ 8119E38 lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 ldrh r1, [r4, 0x10] add r0, sp, 0x4 @@ -1965,7 +1965,7 @@ player_should_look_direction_be_enforced_upon_movement: @ 811A044 lsls r0, 24 cmp r0, 0 beq _0811A078 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 diff --git a/asm/field_control_avatar.s b/asm/field_control_avatar.s index 8b52e3b76..3d989e9e4 100644 --- a/asm/field_control_avatar.s +++ b/asm/field_control_avatar.s @@ -552,7 +552,7 @@ _0809C30E: lsrs r3, r0, 24 cmp r3, 0x10 beq _0809C32E - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects lsls r2, r3, 3 adds r0, r2, r3 lsls r0, 2 @@ -615,7 +615,7 @@ TryGetMapObjectScript: @ 809C384 lsrs r4, r0, 24 cmp r4, 0x10 beq _0809C3B4 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects lsls r2, r4, 3 adds r0, r2, r4 lsls r0, 2 @@ -652,7 +652,7 @@ _0809C3B4: lsrs r4, r0, 24 cmp r4, 0x10 beq _0809C400 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects lsls r2, r4, 3 adds r0, r2, r4 lsls r0, 2 diff --git a/asm/field_effect.s b/asm/field_effect.s index 08efc480b..b073103f3 100644 --- a/asm/field_effect.s +++ b/asm/field_effect.s @@ -2032,7 +2032,7 @@ mapldr_08084390: @ 80B6AA4 ldr r0, =c3_080843F8 movs r1, 0 bl CreateTask - ldr r4, =gUnknown_02037350 + ldr r4, =gMapObjects ldr r3, =gUnknown_02037590 ldrb r1, [r3, 0x5] lsls r0, r1, 3 @@ -2168,7 +2168,7 @@ sub_80B6BCC: @ 80B6BCC lsls r5, r0, 3 adds r5, r0 lsls r5, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects mov r8, r0 add r5, r8 ldrb r0, [r6, 0x4] @@ -2282,7 +2282,7 @@ sub_80B6C90: @ 80B6C90 movs r0, 0x1 strh r0, [r5, 0xA] strh r1, [r5, 0xC] - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldrb r0, [r6, 0x5] lsls r1, r0, 3 adds r1, r0 @@ -2314,7 +2314,7 @@ sub_80B6D04: @ 80B6D04 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r6, r0, r1 ldrb r1, [r2, 0x4] lsls r0, r1, 4 @@ -2556,7 +2556,7 @@ sub_80B6EE0: @ 80B6EE0 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive @@ -2833,7 +2833,7 @@ sub_80B7114: @ 80B7114 lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 movs r0, 0x4 bl GetFaceDirectionAnimId @@ -3068,7 +3068,7 @@ sub_80B72F4: @ 80B72F4 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl FieldObjectClearAnimIfSpecialAnimFinished @@ -3143,7 +3143,7 @@ _080B7396: lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r1, r0 ldr r2, [r2] adds r0, r4, 0 @@ -3392,7 +3392,7 @@ dive_3_unknown: @ 80B7580 lsls r0, 24 cmp r0, 0 bne _080B75C4 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -3451,7 +3451,7 @@ _080B7604: lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r1, r0 ldrb r0, [r5, 0x4] lsls r2, r0, 4 @@ -3781,7 +3781,7 @@ _080B78A4: lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r1, r0 ldrb r0, [r5, 0x4] lsls r2, r0, 4 @@ -4030,7 +4030,7 @@ _080B7AA0: lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r1, r0 ldrb r0, [r5, 0x4] lsls r2, r0, 4 @@ -4364,7 +4364,7 @@ _080B7D60: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 adds r0, r5, 0 bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive @@ -4465,7 +4465,7 @@ mapldr_080859D4: @ 80B7E48 ldr r1, =gUnknown_03005DAC movs r0, 0 str r0, [r1] - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -4542,7 +4542,7 @@ sub_80B7EE8: @ 80B7EE8 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r6, r0, r1 ldrh r1, [r5, 0xA] movs r2, 0xA @@ -4700,7 +4700,7 @@ sub_80B8034: @ 80B8034 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 ldrh r1, [r4, 0xA] movs r2, 0xA @@ -4770,7 +4770,7 @@ sub_80B80C4: @ 80B80C4 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r3, r0, r1 ldrb r1, [r2, 0x4] lsls r0, r1, 4 @@ -4910,7 +4910,7 @@ mapldr_08085D88: @ 80B8200 ldr r1, =gUnknown_03005DAC movs r0, 0 str r0, [r1] - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -4983,7 +4983,7 @@ sub_80B8280: @ 80B8280 adds r0, r1 negs r0, r0 strh r0, [r2, 0x26] - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects ldrb r0, [r5, 0x5] lsls r1, r0, 3 adds r1, r0 @@ -5032,7 +5032,7 @@ sub_80B830C: @ 80B830C lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r6, r0, r1 ldrb r1, [r2, 0x4] lsls r0, r1, 4 @@ -5161,7 +5161,7 @@ sub_80B8410: @ 80B8410 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 ldrh r0, [r4, 0xA] subs r0, 0x1 @@ -6348,7 +6348,7 @@ sub_80B8DB4: @ 80B8DB4 adds r0, r6, 0 mov r1, r8 bl PlayerGetDestCoords - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldrb r1, [r5, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -6379,7 +6379,7 @@ sub_80B8E14: @ 80B8E14 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive @@ -6415,7 +6415,7 @@ sub_80B8E60: @ 80B8E60 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectCheckIfSpecialAnimFinishedOrInactive lsls r0, 24 @@ -6454,7 +6454,7 @@ sub_80B8EA8: @ 80B8EA8 lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 movs r0, 0x3 bl GetPlayerAvatarGraphicsIdByStateId @@ -6503,7 +6503,7 @@ sub_80B8F24: @ 80B8F24 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl FieldObjectClearAnimIfSpecialAnimFinished @@ -6834,7 +6834,7 @@ sub_80B9204: @ 80B9204 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive @@ -6875,7 +6875,7 @@ sub_80B925C: @ 80B925C lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectClearAnimIfSpecialAnimFinished lsls r0, 24 @@ -6911,7 +6911,7 @@ sub_80B92A0: @ 80B92A0 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 ldrh r1, [r4, 0x26] movs r0, 0x8 @@ -6960,7 +6960,7 @@ sub_80B92F8: @ 80B92F8 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 movs r1, 0x2 bl FieldObjectSetSpecialAnim @@ -6980,7 +6980,7 @@ sub_80B933C: @ 80B933C lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r2, r0, r1 ldrh r1, [r4, 0xC] movs r3, 0xC @@ -7028,7 +7028,7 @@ sub_80B9390: @ 80B9390 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 movs r0, 0x3 bl GetPlayerAvatarGraphicsIdByStateId @@ -7092,7 +7092,7 @@ sub_80B9418: @ 80B9418 lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 adds r0, r4, 0 bl FieldObjectClearAnimIfSpecialAnimActive @@ -7587,7 +7587,7 @@ sub_80B9804: @ 80B9804 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive @@ -7678,7 +7678,7 @@ _080B98D0: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldrb r0, [r0, 0x4] lsls r4, r0, 4 @@ -7765,7 +7765,7 @@ sub_80B9978: @ 80B9978 lsls r5, r0, 3 adds r5, r0 lsls r5, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r5, r0 ldrb r0, [r5, 0x4] lsls r4, r0, 4 @@ -7815,7 +7815,7 @@ sub_80B99F0: @ 80B99F0 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectClearAnimIfSpecialAnimFinished lsls r0, 24 @@ -7877,7 +7877,7 @@ sub_80B9A60: @ 80B9A60 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 movs r7, 0 ldrh r1, [r5, 0x26] @@ -8119,7 +8119,7 @@ sub_80B9C54: @ 80B9C54 asrs r0, 16 cmp r0, 0x78 ble _080B9CC2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects movs r1, 0x4 ldrsh r0, [r7, r1] lsls r1, r0, 3 @@ -8357,7 +8357,7 @@ sub_80B9E28: @ 80B9E28 lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 movs r0, 0x10 ldrsh r5, [r4, r0] @@ -8507,7 +8507,7 @@ _080B9F7C: lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 ldrh r0, [r5, 0x4] strh r0, [r6, 0x20] diff --git a/asm/field_effect_helpers.s b/asm/field_effect_helpers.s index fc2a8682a..69c67672c 100644 --- a/asm/field_effect_helpers.s +++ b/asm/field_effect_helpers.s @@ -248,7 +248,7 @@ objc_reflection_maybe: @ 81540A8 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r7, r0, r1 ldrb r1, [r7, 0x4] lsls r0, r1, 4 @@ -581,7 +581,7 @@ oei_shadow: @ 8154340 bl GetFieldObjectIdByLocalIdAndMap lsls r0, 24 lsrs r0, 24 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects lsls r1, r0, 3 adds r1, r0 lsls r1, 2 @@ -673,7 +673,7 @@ _08154412: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 ldrb r0, [r4, 0x4] lsls r1, r0, 4 @@ -909,7 +909,7 @@ _08154604: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r2, r0, r1 ldr r0, [r2, 0x10] ldr r1, [r5, 0x30] @@ -1248,7 +1248,7 @@ _081548B4: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r2, r0, r1 ldr r0, [r2, 0x10] ldr r1, [r5, 0x30] @@ -1346,7 +1346,7 @@ sub_815496C: @ 815496C lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r5, r1, r0 ldr r0, =gFieldEffectObjectTemplatePointers ldr r0, [r0, 0x78] @@ -1432,7 +1432,7 @@ sub_8154A10: @ 8154A10 lsls r0, 24 cmp r0, 0 bne _08154A4E - ldr r5, =gUnknown_02037350 + ldr r5, =gMapObjects mov r0, sp ldrb r1, [r0] lsls r0, r1, 3 @@ -1787,7 +1787,7 @@ sub_8154CEC: @ 8154CEC lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r5, r1, r0 ldr r0, =gFieldEffectObjectTemplatePointers ldr r0, [r0, 0x34] @@ -1881,7 +1881,7 @@ _08154DC0: b _08154E0A _08154DCA: ldr r3, =gSprites - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects mov r0, sp ldrb r1, [r0] lsls r0, r1, 3 @@ -2040,7 +2040,7 @@ sub_8154EFC: @ 8154EFC lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r6, r1, r0 ldr r0, =gFieldEffectObjectTemplatePointers ldr r0, [r0, 0x34] @@ -2127,7 +2127,7 @@ sub_8154FB4: @ 8154FB4 lsls r0, 24 cmp r0, 0 bne _08154FEE - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects mov r0, sp ldrb r1, [r0] lsls r0, r1, 3 @@ -2248,7 +2248,7 @@ sub_81550B4: @ 81550B4 lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r5, r1, r0 ldr r0, =gFieldEffectObjectTemplatePointers ldr r0, [r0, 0x7C] @@ -2332,7 +2332,7 @@ sub_8155158: @ 8155158 lsls r0, 24 cmp r0, 0 bne _08155192 - ldr r5, =gUnknown_02037350 + ldr r5, =gMapObjects mov r0, sp ldrb r1, [r0] lsls r0, r1, 3 @@ -2765,7 +2765,7 @@ sub_81554AC: @ 81554AC movs r2, 0x32 ldrsh r1, [r4, r2] bl CurrentMapDrawMetatileAt - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -2972,7 +2972,7 @@ sub_8155658: @ 8155658 lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 ldrb r0, [r4, 0x4] lsls r5, r0, 4 @@ -3325,7 +3325,7 @@ sub_8155900: @ 8155900 lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r6, r1, r0 ldr r0, =gFieldEffectObjectTemplatePointers ldr r0, [r0, 0x74] @@ -3419,7 +3419,7 @@ sub_81559BC: @ 81559BC lsls r0, 24 cmp r0, 0 bne _081559F6 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects mov r0, sp ldrb r1, [r0] lsls r0, r1, 3 @@ -3474,7 +3474,7 @@ _08155A46: strh r6, [r4, 0x20] strh r5, [r4, 0x22] ldr r3, =gSprites - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects mov r0, sp ldrb r1, [r0] lsls r0, r1, 3 @@ -3793,7 +3793,7 @@ sub_8155C88: @ 8155C88 adds r0, r5, 0 bl FieldEffectStop _08155CB8: - ldr r4, =gUnknown_02037350 + ldr r4, =gMapObjects mov r0, sp ldrb r1, [r0] lsls r0, r1, 3 @@ -4514,7 +4514,7 @@ _08156212: lsls r0, r7, 3 adds r0, r7 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 ldrb r0, [r4] lsls r0, 31 diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 106fde060..01e04f04b 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,52 +5,6 @@ .text - thumb_func_start GetFieldObjectIdByLocalIdAndMapInternal -@ u8 GetFieldObjectIdByLocalIdAndMapInternal(u8 localId, u8 mapId, u8 mapGroupId) -GetFieldObjectIdByLocalIdAndMapInternal: @ 808D5B8 - push {r4-r6,lr} - lsls r0, 24 - lsrs r5, r0, 24 - lsls r1, 24 - lsrs r4, r1, 24 - lsls r2, 24 - lsrs r2, 24 - movs r1, 0 - ldr r6, =gUnknown_02037350 -_0808D5CA: - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - adds r3, r0, r6 - ldrb r0, [r3] - lsls r0, 31 - cmp r0, 0 - beq _0808D5F4 - ldrb r0, [r3, 0x8] - cmp r0, r5 - bne _0808D5F4 - ldrb r0, [r3, 0x9] - cmp r0, r4 - bne _0808D5F4 - ldrb r0, [r3, 0xA] - cmp r0, r2 - bne _0808D5F4 - adds r0, r1, 0 - b _0808D600 - .pool -_0808D5F4: - adds r0, r1, 0x1 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0xF - bls _0808D5CA - movs r0, 0x10 -_0808D600: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end GetFieldObjectIdByLocalIdAndMapInternal - thumb_func_start GetFieldObjectIdByLocalId @ u8 GetFieldObjectIdByLocalId(u8 localId) GetFieldObjectIdByLocalId: @ 808D608 @@ -58,7 +12,7 @@ GetFieldObjectIdByLocalId: @ 808D608 lsls r0, 24 lsrs r3, r0, 24 movs r2, 0 - ldr r4, =gUnknown_02037350 + ldr r4, =gMapObjects _0808D612: lsls r0, r2, 3 adds r0, r2 @@ -116,7 +70,7 @@ _0808D66E: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl npc_clear_ids_and_state @@ -333,7 +287,7 @@ GetAvailableFieldObjectSlot: @ 808D810 lsls r2, 24 lsrs r4, r2, 24 movs r2, 0 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects ldrb r0, [r1] lsls r0, 31 adds r7, r1, 0 @@ -378,7 +332,7 @@ _0808D868: _0808D870: mov r0, r12 strb r2, [r0] - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects _0808D876: lsls r0, r2, 3 adds r0, r2 @@ -452,7 +406,7 @@ RemoveFieldObjectByLocalIdAndMap: @ 808D8C4 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl RemoveFieldObject _0808D902: @@ -511,7 +465,7 @@ _0808D95C: lsls r0, r4, 3 adds r0, r4 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl RemoveFieldObject _0808D972: @@ -563,7 +517,7 @@ _0808D9C8: lsls r4, r0, 3 adds r0, r4, r0 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r6, r0, r1 ldrb r0, [r6, 0x5] bl GetFieldObjectGraphicsInfo @@ -618,7 +572,7 @@ _0808DA24: mov r8, r0 cmp r0, 0x40 bne _0808DA64 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects mov r2, r9 adds r1, r4, r2 lsls r1, 2 @@ -802,7 +756,7 @@ SpawnFieldObject: @ 808DB40 .pool _0808DBBC: ldr r4, =gSprites - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects lsls r0, r2, 3 adds r0, r2 lsls r0, 2 @@ -1455,7 +1409,7 @@ _0808E0AA: lsls r0, r3, 3 adds r0, r3 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r2, r0, r1 ldr r0, [r2] ldr r1, =0x00010001 @@ -1555,7 +1509,7 @@ sub_808E16C: @ 808E16C lsrs r5, 16 bl ClearPlayerAvatarInfo movs r6, 0 - ldr r7, =gUnknown_02037350 + ldr r7, =gMapObjects lsls r4, 16 lsls r5, 16 _0808E186: @@ -1623,7 +1577,7 @@ _0808E1EC: lsls r0, r1, 3 add r0, r9 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r6, r0, r1 movs r0, 0 str r0, [sp, 0x20] @@ -1848,7 +1802,7 @@ SetPlayerAvatarFieldObjectIdAndObjectId: @ 808E3C4 ldr r5, =gUnknown_02037590 strb r0, [r5, 0x5] strb r1, [r5, 0x4] - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects lsls r4, r0, 3 adds r4, r0 lsls r4, 2 @@ -2021,7 +1975,7 @@ sub_808E504: @ 808E504 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 adds r1, r4, 0 bl FieldObjectSetGraphicsId @@ -2097,7 +2051,7 @@ FieldObjectTurnByLocalIdAndMap: @ 808E594 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 adds r1, r4, 0 bl FieldObjectTurn @@ -2118,7 +2072,7 @@ sub_808E5D4: @ 808E5D4 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 bl FieldObjectTurn pop {r0} @@ -2279,7 +2233,7 @@ npc_by_local_id_and_map_set_field_1_bit_x20: @ 808E6F8 lsls r0, 24 cmp r0, 0 bne _0808E73A - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects mov r0, sp ldrb r0, [r0] lsls r1, r0, 3 @@ -2334,7 +2288,7 @@ sub_808E75C: @ 808E75C lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldrb r1, [r0] movs r2, 0x4 @@ -2368,7 +2322,7 @@ sub_808E78C: @ 808E78C lsls r2, r0, 3 adds r2, r0 lsls r2, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r2, r0 ldrb r1, [r2, 0x4] lsls r0, r1, 4 @@ -2410,7 +2364,7 @@ sub_808E7E4: @ 808E7E4 lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r1, r0 ldrb r2, [r1, 0x3] movs r0, 0x5 @@ -2448,7 +2402,7 @@ sub_808E82C: @ 808E82C lsls r0, 24 cmp r0, 0 bne _0808E870 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects mov r0, sp ldrb r1, [r0] lsls r0, r1, 3 @@ -2927,7 +2881,7 @@ sub_808EBA8: @ 808EBA8 lsls r0, r3, 3 adds r0, r3 lsls r0, 2 - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects adds r0, r3 movs r3, 0xE0 lsls r3, 11 @@ -2968,7 +2922,7 @@ UpdateFieldObjectCoordsForCameraUpdate: @ 808EC10 cmp r0, 0 beq _0808EC68 movs r3, 0 - ldr r5, =gUnknown_02037350 + ldr r5, =gMapObjects movs r0, 0x4 ldrsh r4, [r2, r0] movs r0, 0x8 @@ -3026,7 +2980,7 @@ GetFieldObjectIdByXYZ: @ 808EC78 lsls r2, 24 lsrs r5, r2, 24 movs r4, 0 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects mov r8, r0 _0808EC90: lsls r0, r4, 3 @@ -3546,7 +3500,7 @@ GetFieldObjectScriptPointerByFieldObjectId: @ 808F01C push {lr} lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects lsls r2, r0, 3 adds r2, r0 lsls r2, 2 @@ -3582,7 +3536,7 @@ GetFieldObjectFlagIdByFieldObjectId: @ 808F058 push {lr} lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects lsls r2, r0, 3 adds r2, r0 lsls r2, 2 @@ -3613,7 +3567,7 @@ sub_808F080: @ 808F080 lsls r0, 24 cmp r0, 0 bne _0808F0B4 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects mov r0, sp ldrb r1, [r0] lsls r0, r1, 3 @@ -3635,7 +3589,7 @@ _0808F0B6: sub_808F0BC: @ 808F0BC lsls r0, 24 lsrs r0, 24 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects lsls r1, r0, 3 adds r1, r0 lsls r1, 2 @@ -3660,7 +3614,7 @@ sub_808F0D4: @ 808F0D4 lsls r0, 24 cmp r0, 0 bne _0808F108 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects mov r0, sp ldrb r1, [r0] lsls r0, r1, 3 @@ -3683,7 +3637,7 @@ _0808F10A: FieldObjectGetBerryTreeId: @ 808F110 lsls r0, 24 lsrs r0, 24 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects lsls r1, r0, 3 adds r1, r0 lsls r1, 2 @@ -3892,7 +3846,7 @@ sub_808F254: @ 808F254 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl sub_808F208 _0808F282: @@ -3930,7 +3884,7 @@ _0808F2B6: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldr r1, =gUnknown_082766A2 bl sub_808F228 @@ -3942,7 +3896,7 @@ _0808F2D4: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldr r1, =gUnknown_082766A6 bl sub_808F228 @@ -4070,7 +4024,7 @@ FieldObjectCB_NoMovement1: @ 808F3E0 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =FieldObjectCB2_NoMovement1 bl FieldObjectStep @@ -4094,7 +4048,7 @@ FieldObjectCB_GoRandomDirections: @ 808F408 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =FieldObjectCB2_GoRandomDirections bl FieldObjectStep @@ -4833,7 +4787,7 @@ FieldObjectCB_LookRandomDirections: @ 808F944 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =FieldObjectCB2_LookRandomDirections bl FieldObjectStep @@ -5007,7 +4961,7 @@ FieldObjectCB_RandomlyGoNorthOrSouth: @ 808FA84 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =FieldObjectCB2_RandomlyGoNorthOrSouth bl FieldObjectStep @@ -5220,7 +5174,7 @@ FieldObjectCB_RandomlyGoEastOrWest: @ 808FC08 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =FieldObjectCB2_RandomlyGoEastOrWest bl FieldObjectStep @@ -5430,7 +5384,7 @@ FieldObjectCB_FaceFixedDirection: @ 808FD8C lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =FieldObjectCB2_FaceFixedDirection bl FieldObjectStep @@ -5524,7 +5478,7 @@ FieldObjectCB_BerryTree: @ 808FE2C lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 ldrh r1, [r4, 0x3C] movs r0, 0x1 @@ -5822,7 +5776,7 @@ FieldObjectCB_RandomlyLookNorthOrSouth: @ 8090050 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =FieldObjectCB2_RandomlyLookNorthOrSouth bl FieldObjectStep @@ -5990,7 +5944,7 @@ FieldObjectCB_RandomlyLookEastOrWest: @ 8090190 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =FieldObjectCB2_RandomlyLookEastOrWest bl FieldObjectStep @@ -6158,7 +6112,7 @@ FieldObjectCB_RandomlyLookNorthOrWest: @ 80902D0 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =FieldObjectCB2_RandomlyLookNorthOrWest bl FieldObjectStep @@ -6326,7 +6280,7 @@ FieldObjectCB_RandomlyLookNorthOrEast: @ 8090410 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8090434 bl FieldObjectStep @@ -6494,7 +6448,7 @@ FieldObjectCB_RandomlyLookSouthOrWest: @ 8090550 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8090574 bl FieldObjectStep @@ -6662,7 +6616,7 @@ FieldObjectCB_RandomlyLookSouthOrEast: @ 8090690 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_80906B4 bl FieldObjectStep @@ -6830,7 +6784,7 @@ FieldObjectCB_RandomlyLookNorthOrSouthOrWest: @ 80907D0 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_80907F4 bl FieldObjectStep @@ -6998,7 +6952,7 @@ FieldObjectCB_RandomlyLookNorthOrSouthOrEast: @ 8090910 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8090934 bl FieldObjectStep @@ -7166,7 +7120,7 @@ FieldObjectCB_RandomlyLookNorthOrEastOrWest: @ 8090A50 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8090A74 bl FieldObjectStep @@ -7334,7 +7288,7 @@ FieldObjectCB_RandomlyLookSouthOrEastOrWest: @ 8090B90 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8090BB4 bl FieldObjectStep @@ -7502,7 +7456,7 @@ FieldObjectCB_LookAroundCounterclockwise: @ 8090CD0 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8090CF4 bl FieldObjectStep @@ -7642,7 +7596,7 @@ FieldObjectCB_LookAroundClockwise: @ 8090DD4 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8090DF8 bl FieldObjectStep @@ -7781,7 +7735,7 @@ FieldObjectCB_AlternatelyGoInOppositeDirections: @ 8090ED8 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8090EFC bl FieldObjectStep @@ -8099,7 +8053,7 @@ FieldObjectCB_GoInDirectionSequence1: @ 8091138 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_809115C bl FieldObjectStep @@ -8172,7 +8126,7 @@ FieldObjectCB_GoInDirectionSequence2: @ 80911C4 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_80911E8 bl FieldObjectStep @@ -8245,7 +8199,7 @@ FieldObjectCB_GoInDirectionSequence3: @ 8091250 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091274 bl FieldObjectStep @@ -8318,7 +8272,7 @@ FieldObjectCB_GoInDirectionSequence4: @ 80912DC lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091300 bl FieldObjectStep @@ -8391,7 +8345,7 @@ FieldObjectCB_GoInDirectionSequence5: @ 8091368 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_809138C bl FieldObjectStep @@ -8465,7 +8419,7 @@ FieldObjectCB_GoInDirectionSequence6: @ 80913F4 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091418 bl FieldObjectStep @@ -8538,7 +8492,7 @@ FieldObjectCB_GoInDirectionSequence7: @ 8091480 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_80914A4 bl FieldObjectStep @@ -8611,7 +8565,7 @@ FieldObjectCB_GoInDirectionSequence8: @ 809150C lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091530 bl FieldObjectStep @@ -8684,7 +8638,7 @@ FieldObjectCB_GoInDirectionSequence9: @ 8091598 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_80915BC bl FieldObjectStep @@ -8757,7 +8711,7 @@ FieldObjectCB_GoInDirectionSequence10: @ 8091624 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091648 bl FieldObjectStep @@ -8830,7 +8784,7 @@ FieldObjectCB_GoInDirectionSequence11: @ 80916B0 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_80916D4 bl FieldObjectStep @@ -8903,7 +8857,7 @@ FieldObjectCB_GoInDirectionSequence12: @ 809173C lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091760 bl FieldObjectStep @@ -8976,7 +8930,7 @@ FieldObjectCB_GoInDirectionSequence13: @ 80917C8 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_80917EC bl FieldObjectStep @@ -9049,7 +9003,7 @@ FieldObjectCB_GoInDirectionSequence14: @ 8091854 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091878 bl FieldObjectStep @@ -9122,7 +9076,7 @@ FieldObjectCB_GoInDirectionSequence15: @ 80918E0 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091904 bl FieldObjectStep @@ -9195,7 +9149,7 @@ FieldObjectCB_GoInDirectionSequence16: @ 809196C lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091990 bl FieldObjectStep @@ -9268,7 +9222,7 @@ FieldObjectCB_GoInDirectionSequence17: @ 80919F8 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091A1C bl FieldObjectStep @@ -9341,7 +9295,7 @@ FieldObjectCB_GoInDirectionSequence18: @ 8091A84 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091AA8 bl FieldObjectStep @@ -9414,7 +9368,7 @@ FieldObjectCB_GoInDirectionSequence19: @ 8091B10 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091B34 bl FieldObjectStep @@ -9487,7 +9441,7 @@ FieldObjectCB_GoInDirectionSequence20: @ 8091B9C lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091BC0 bl FieldObjectStep @@ -9560,7 +9514,7 @@ FieldObjectCB_GoInDirectionSequence21: @ 8091C28 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091C4C bl FieldObjectStep @@ -9633,7 +9587,7 @@ FieldObjectCB_GoInDirectionSequence22: @ 8091CB4 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091CD8 bl FieldObjectStep @@ -9706,7 +9660,7 @@ FieldObjectCB_GoInDirectionSequence23: @ 8091D40 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091D64 bl FieldObjectStep @@ -9779,7 +9733,7 @@ FieldObjectCB_GoInDirectionSequence24: @ 8091DCC lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091DF0 bl FieldObjectStep @@ -9852,7 +9806,7 @@ FieldObjectCB_CopyPlayer1: @ 8091E58 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8091E7C bl FieldObjectStep @@ -9906,7 +9860,7 @@ sub_8091EC0: @ 8091EC0 push {r4-r7,lr} adds r6, r0, 0 adds r7, r1, 0 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r3, =gUnknown_02037590 ldrb r1, [r3, 0x5] lsls r0, r1, 3 @@ -10629,7 +10583,7 @@ FieldObjectCB_CopyPlayer2: @ 8092494 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_80924B8 bl FieldObjectStep @@ -10661,7 +10615,7 @@ mss_08062EA4: @ 80924D8 push {r4-r7,lr} adds r6, r0, 0 adds r7, r1, 0 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r3, =gUnknown_02037590 ldrb r1, [r3, 0x5] lsls r0, r1, 3 @@ -10713,7 +10667,7 @@ FieldObjectCB_TreeDisguise: @ 809253C lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r1, r0 adds r6, r4, 0 adds r6, 0x21 @@ -10747,7 +10701,7 @@ _08092584: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldr r2, =sub_80925AC adds r1, r5, 0 @@ -10776,7 +10730,7 @@ FieldObjectCB_MountainDisguise: @ 80925B8 lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r1, r0 adds r6, r4, 0 adds r6, 0x21 @@ -10810,7 +10764,7 @@ _08092600: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldr r2, =sub_80925AC adds r1, r5, 0 @@ -10828,7 +10782,7 @@ FieldObjectCB_Hidden1: @ 8092628 adds r3, r0, 0 movs r1, 0x3C ldrsh r0, [r3, r1] - ldr r4, =gUnknown_02037350 + ldr r4, =gMapObjects cmp r0, 0 bne _08092668 movs r0, 0x2E @@ -10926,7 +10880,7 @@ FieldObjectCB_WalkInPlace1: @ 80926D4 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_80926F8 bl FieldObjectStep @@ -10985,7 +10939,7 @@ FieldObjectCB_WalkInPlace4: @ 8092744 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8092768 bl FieldObjectStep @@ -11044,7 +10998,7 @@ FieldObjectCB_WalkInPlace2: @ 80927B4 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_80927D8 bl FieldObjectStep @@ -11104,7 +11058,7 @@ FieldObjectCB_WalkInPlace3: @ 8092824 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_8092848 bl FieldObjectStep @@ -11163,7 +11117,7 @@ FieldObjectCB_Hidden2: @ 8092894 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =sub_80928B8 bl FieldObjectStep @@ -11985,7 +11939,7 @@ _08092E2E: lsls r0, r4, 3 adds r0, r4 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r2, r0, r1 ldrb r0, [r2] lsls r0, 31 @@ -12055,7 +12009,7 @@ sub_8092E9C: @ 8092E9C cmp r0, 0 bne _08092EE8 ldr r3, =gSprites - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects mov r0, sp ldrb r1, [r0] lsls r0, r1, 3 @@ -12099,7 +12053,7 @@ sub_8092EF0: @ 8092EF0 cmp r0, 0 bne _08092F2E ldr r3, =gSprites - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects mov r0, sp ldrb r1, [r0] lsls r0, r1, 3 @@ -16723,7 +16677,7 @@ sub_8094F38: @ 8094F38 ldrsh r0, [r5, r1] movs r2, 0x12 ldrsh r1, [r5, r2] - ldr r4, =gUnknown_02037350 + ldr r4, =gMapObjects mov r2, sp ldrb r2, [r2] lsls r3, r2, 3 @@ -16769,7 +16723,7 @@ sub_8094F94: @ 8094F94 ldrsh r0, [r5, r1] movs r2, 0x12 ldrsh r1, [r5, r2] - ldr r4, =gUnknown_02037350 + ldr r4, =gMapObjects mov r2, sp ldrb r2, [r2] lsls r3, r2, 3 diff --git a/asm/field_player_avatar.s b/asm/field_player_avatar.s index e88eaa650..9a5cc323c 100644 --- a/asm/field_player_avatar.s +++ b/asm/field_player_avatar.s @@ -15,7 +15,7 @@ FieldObjectCB_NoMovement2: @ 808A998 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldr r2, =FieldObjectCB2_NoMovement2 bl FieldObjectStep @@ -48,7 +48,7 @@ player_step: @ 808A9C0 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 adds r0, r5, 0 bl sub_808C280 @@ -240,7 +240,7 @@ GetForcedMovementByMetatileBehavior: @ 808AB38 ands r0, r1 cmp r0, 0 bne _0808AB8A - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldrb r1, [r3, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -290,7 +290,7 @@ ForcedMovement_None: @ 808AB94 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldrb r2, [r0, 0x1] movs r1, 0x3 @@ -386,7 +386,7 @@ DoForcedMovementInCurrentDirection: @ 808AC58 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 ldrb r2, [r0, 0x1] movs r3, 0x4 @@ -528,7 +528,7 @@ ForcedMovement_Slide: @ 808AD60 lsls r2, r3, 3 adds r2, r3 lsls r2, 2 - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects adds r2, r3 ldrb r3, [r2, 0x1] movs r4, 0x4 @@ -623,7 +623,7 @@ ForcedMovement_MuddySlope: @ 808AE10 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 ldrb r1, [r4, 0x18] movs r0, 0xF0 @@ -809,7 +809,7 @@ _0808AF68: lsls r0, 24 cmp r0, 0 beq _0808AFB0 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldrb r1, [r4, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -848,7 +848,7 @@ CheckForPlayerAvatarCollision: @ 808AFBC lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 ldrh r1, [r4, 0x10] add r0, sp, 0x4 @@ -899,7 +899,7 @@ sub_808B028: @ 808B028 lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 ldrh r1, [r4, 0x10] add r0, sp, 0x4 @@ -1187,7 +1187,7 @@ sub_808B238: @ 808B238 lsrs r6, r0, 24 cmp r6, 0x10 beq _0808B2D8 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects lsls r1, r6, 3 adds r1, r6 lsls r1, 2 @@ -1290,7 +1290,7 @@ IsPlayerCollidingWithFarawayIslandMew: @ 808B324 lsls r1, r2, 3 adds r1, r2 lsls r1, 2 - ldr r5, =gUnknown_02037350 + ldr r5, =gMapObjects adds r3, r1, r5 ldrh r2, [r3, 0x10] mov r1, sp @@ -1401,7 +1401,7 @@ _0808B3F4: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldr r1, [r2] bl _call_via_r1 @@ -1621,7 +1621,7 @@ _0808B5B6: thumb_func_start player_is_anim_in_certain_ranges player_is_anim_in_certain_ranges: @ 808B5BC push {lr} - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -1696,7 +1696,7 @@ PlayerIsAnimActive: @ 808B63C lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive lsls r0, 24 @@ -1715,7 +1715,7 @@ PlayerCheckIfAnimFinishedOrInactive: @ 808B660 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectCheckIfSpecialAnimFinishedOrInactive lsls r0, 24 @@ -1727,7 +1727,7 @@ PlayerCheckIfAnimFinishedOrInactive: @ 808B660 thumb_func_start player_set_x22 player_set_x22: @ 808B684 - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects ldr r1, =gUnknown_02037590 ldrb r2, [r1, 0x5] lsls r1, r2, 3 @@ -1742,7 +1742,7 @@ player_set_x22: @ 808B684 thumb_func_start player_get_x22 player_get_x22: @ 808B6A0 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -1766,7 +1766,7 @@ sub_808B6BC: @ 808B6BC lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r0, r2 bl FieldObjectForceSetSpecialAnim pop {r0} @@ -1793,7 +1793,7 @@ player_npc_set_state_and_x22_etc: @ 808B6E4 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 adds r1, r5, 0 bl FieldObjectSetSpecialAnim @@ -2013,7 +2013,7 @@ _0808B872: lsls r0, 24 cmp r0, 0 beq _0808B89A - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldrb r1, [r4, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -2219,7 +2219,7 @@ PlayCollisionSoundIfNotFacingWarp: @ 808B9EC sub sp, 0x4 lsls r0, 24 lsrs r4, r0, 24 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -2275,7 +2275,7 @@ GetXYCoordsOneStepInFrontOfPlayer: @ 808BA68 push {r4,r5,lr} adds r4, r0, 0 adds r5, r1, 0 - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects ldr r2, =gUnknown_02037590 ldrb r1, [r2, 0x5] lsls r0, r1, 3 @@ -2307,7 +2307,7 @@ GetXYCoordsOneStepInFrontOfPlayer: @ 808BA68 @ void PlayerGetDestCoords(u16 *x, u16 *y) PlayerGetDestCoords: @ 808BAAC push {r4,r5,lr} - ldr r5, =gUnknown_02037350 + ldr r5, =gMapObjects ldr r4, =gUnknown_02037590 ldrb r3, [r4, 0x5] lsls r2, r3, 3 @@ -2339,7 +2339,7 @@ plaer_get_pos_including_state_based_drift: @ 808BADC lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r3, r0, r1 ldrb r1, [r3] movs r0, 0xC0 @@ -2465,7 +2465,7 @@ _0808BC30: thumb_func_start player_get_direction_lower_nybble @ u8 player_get_direction_lower_nybble() player_get_direction_lower_nybble: @ 808BC38 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -2482,7 +2482,7 @@ player_get_direction_lower_nybble: @ 808BC38 thumb_func_start player_get_direction_upper_nybble @ u8 player_get_direction_upper_nybble() player_get_direction_upper_nybble: @ 808BC58 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -2498,7 +2498,7 @@ player_get_direction_upper_nybble: @ 808BC58 thumb_func_start PlayerGetZCoord @ u8 PlayerGetZCoord() PlayerGetZCoord: @ 808BC74 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -2521,7 +2521,7 @@ sub_808BC90: @ 808BC90 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 lsls r3, 16 asrs r3, 16 @@ -2578,7 +2578,7 @@ sub_808BCF4: @ 808BCF4 lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 adds r0, r4, 0 bl npc_clear_strange_bits @@ -2809,7 +2809,7 @@ IsPlayerFacingSurfableFishableWater: @ 808BE74 lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 ldrh r1, [r4, 0x10] mov r0, sp @@ -3060,7 +3060,7 @@ InitPlayerAvatar: @ 808BFE0 lsls r4, r5, 3 adds r4, r5 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 ldrb r0, [r4, 0x2] movs r1, 0x1 @@ -3097,7 +3097,7 @@ sub_808C0A8: @ 808C0A8 push {r4-r6,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r6, =gUnknown_02037350 + ldr r6, =gMapObjects ldr r5, =gUnknown_02037590 ldrb r0, [r5, 0x5] lsls r1, r0, 3 @@ -3152,7 +3152,7 @@ sub_808C114: @ 808C114 lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 movs r0, 0x5 bl GetPlayerAvatarGraphicsIdByStateId @@ -3186,7 +3186,7 @@ sub_808C15C: @ 808C15C lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 movs r0, 0x6 bl GetPlayerAvatarGraphicsIdByStateId @@ -3227,7 +3227,7 @@ sub_808C1B4: @ 808C1B4 lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 movs r0, 0x2 bl GetPlayerAvatarGraphicsIdByStateId @@ -3276,7 +3276,7 @@ sub_808C228: @ 808C228 lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 movs r0, 0x7 bl GetPlayerAvatarGraphicsIdByStateId @@ -3414,7 +3414,7 @@ taskFF_bump_boulder: @ 808C34C lsrs r0, 24 ldr r6, =gUnknown_08497530 ldr r2, =gTasks - ldr r5, =gUnknown_02037350 + ldr r5, =gMapObjects lsls r1, r0, 2 adds r1, r0 lsls r1, 3 @@ -3625,7 +3625,7 @@ _0808C50A: lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r1, r0 ldr r2, [r2] adds r0, r4, 0 @@ -3726,7 +3726,7 @@ _0808C5E2: lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r1, r0 ldr r2, [r2] adds r0, r4, 0 @@ -3936,7 +3936,7 @@ taskFF_0805D1D4: @ 808C7A8 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 adds r0, r5, 0 bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive @@ -3983,7 +3983,7 @@ sub_808C814: @ 808C814 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl FieldObjectClearAnimIfSpecialAnimFinished @@ -4127,7 +4127,7 @@ fish1: @ 808C918 ldrh r1, [r6] adds r1, r0 strh r1, [r5, 0x22] - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects ldr r2, =gUnknown_02037590 ldrb r1, [r2, 0x5] lsls r0, r1, 3 @@ -4579,7 +4579,7 @@ _0808CCBC: lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects mov r8, r0 add r4, r8 ldrh r1, [r5, 0x24] @@ -4792,7 +4792,7 @@ fishE: @ 808CE8C lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects mov r8, r0 add r4, r8 ldrh r1, [r6, 0x24] @@ -4984,7 +4984,7 @@ _0808D03A: ands r0, r1 cmp r0, 0 beq _0808D05E - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldrb r1, [r3, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -5037,7 +5037,7 @@ sub_808D094: @ 808D094 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 ldrb r1, [r4, 0x4] lsls r0, r1, 4 @@ -5217,7 +5217,7 @@ sub_808D1FC: @ 808D1FC lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 ldrb r1, [r4, 0x4] lsls r0, r1, 4 diff --git a/asm/fldeff_80F9BCC.s b/asm/fldeff_80F9BCC.s index ac1cd5a82..465f64db3 100644 --- a/asm/fldeff_80F9BCC.s +++ b/asm/fldeff_80F9BCC.s @@ -1722,7 +1722,7 @@ _080FA9CA: sub_80FA9D0: @ 80FA9D0 push {r4,lr} sub sp, 0x4 - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects ldr r2, =gUnknown_02037590 ldrb r1, [r2, 0x5] lsls r0, r1, 3 @@ -2312,7 +2312,7 @@ sub_80FAEF0: @ 80FAEF0 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive @@ -2362,7 +2362,7 @@ sub_80FAF64: @ 80FAF64 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 adds r0, r5, 0 bl FieldObjectClearAnimIfSpecialAnimFinished diff --git a/asm/fldeff_emotion.s b/asm/fldeff_emotion.s index 845f5618f..f8b66da0d 100644 --- a/asm/fldeff_emotion.s +++ b/asm/fldeff_emotion.s @@ -167,7 +167,7 @@ _080B4756: bl FieldEffectStop b _080B47B2 _080B4764: - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects mov r0, sp ldrb r1, [r0] lsls r0, r1, 3 @@ -274,7 +274,7 @@ sub_80B4808: @ 80B4808 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldrb r0, [r0, 0x18] lsls r0, 28 @@ -301,7 +301,7 @@ _080B4870: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldrb r0, [r0, 0x18] lsls r0, 28 diff --git a/asm/item_use.s b/asm/item_use.s index 4f9e9e65a..cd1c38215 100644 --- a/asm/item_use.s +++ b/asm/item_use.s @@ -1306,7 +1306,7 @@ sub_80FDA24: @ 80FDA24 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r4, =gUnknown_02037350 + ldr r4, =gMapObjects adds r0, r4 bl FieldObjectClearAnimIfSpecialAnimFinished movs r0, 0xFF @@ -1356,7 +1356,7 @@ sub_80FDA94: @ 80FDA94 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectCheckIfSpecialAnimFinishedOrInactive lsls r0, 24 @@ -1395,7 +1395,7 @@ sub_80FDADC: @ 80FDADC lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectCheckIfSpecialAnimFinishedOrInactive lsls r0, 24 @@ -1759,7 +1759,7 @@ sub_80FDE2C: @ 80FDE2C lsrs r2, r0, 24 cmp r2, 0x10 beq _080FDE68 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects lsls r1, r2, 3 adds r1, r2 lsls r1, 2 diff --git a/asm/link.s b/asm/link.s index 39cf6ba5e..022922164 100644 --- a/asm/link.s +++ b/asm/link.s @@ -31367,7 +31367,7 @@ sub_8019AD8: @ 8019AD8 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive @@ -31413,7 +31413,7 @@ sub_8019B3C: @ 8019B3C lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl FieldObjectClearAnimIfSpecialAnimFinished diff --git a/asm/load_save.s b/asm/load_save.s index 344e05147..589e001c1 100644 --- a/asm/load_save.s +++ b/asm/load_save.s @@ -332,7 +332,7 @@ save_serialize_npcs: @ 8076E1C movs r5, 0xA3 lsls r5, 4 mov r8, r5 - ldr r4, =gUnknown_02037350 + ldr r4, =gMapObjects movs r3, 0 movs r2, 0xF _08076E32: @@ -370,7 +370,7 @@ save_deserialize_npcs: @ 8076E64 movs r5, 0xA3 lsls r5, 4 mov r8, r5 - ldr r4, =gUnknown_02037350 + ldr r4, =gMapObjects movs r3, 0 movs r2, 0xF _08076E7A: diff --git a/asm/map_obj_8097404.s b/asm/map_obj_8097404.s index 404ae3675..50284a013 100644 --- a/asm/map_obj_8097404.s +++ b/asm/map_obj_8097404.s @@ -87,7 +87,7 @@ _0809748E: player_bitmagic: @ 8097494 push {r4,r5,lr} movs r4, 0 - ldr r5, =gUnknown_02037350 + ldr r5, =gMapObjects _0809749A: lsls r0, r4, 3 adds r0, r4 @@ -121,7 +121,7 @@ sub_80974D0: @ 80974D0 lsls r0, 24 lsrs r5, r0, 24 movs r4, 0 - ldr r6, =gUnknown_02037350 + ldr r6, =gMapObjects _080974DA: cmp r4, r5 beq _080974FC @@ -209,7 +209,7 @@ _0809756C: sub_809757C: @ 809757C push {r4,r5,lr} movs r4, 0 - ldr r5, =gUnknown_02037350 + ldr r5, =gMapObjects _08097582: lsls r0, r4, 3 adds r0, r4 @@ -1757,7 +1757,7 @@ sub_8098074: @ 8098074 lsls r1, 24 lsrs r5, r1, 24 movs r4, 0 - ldr r7, =gUnknown_02037350 + ldr r7, =gMapObjects _08098082: cmp r4, r6 beq _080980A8 diff --git a/asm/map_obj_lock.s b/asm/map_obj_lock.s index 7547f23c0..6cb8c508e 100644 --- a/asm/map_obj_lock.s +++ b/asm/map_obj_lock.s @@ -97,7 +97,7 @@ _0809842A: ldrsh r0, [r5, r1] cmp r0, 0 bne _08098452 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_03005DF0 ldrb r1, [r0] lsls r0, r1, 3 @@ -160,7 +160,7 @@ sub_80984A0: @ 80984A0 bl CreateTask lsls r0, 24 lsrs r5, r0, 24 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldrb r1, [r4] lsls r0, r1, 3 adds r0, r1 @@ -199,7 +199,7 @@ sub_80984F4: @ 80984F4 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectClearAnimIfSpecialAnimFinished bl sub_80D338C @@ -212,7 +212,7 @@ sub_80984F4: @ 80984F4 thumb_func_start sub_8098524 sub_8098524: @ 8098524 push {r4,lr} - ldr r4, =gUnknown_02037350 + ldr r4, =gMapObjects ldr r0, =gUnknown_03005DF0 ldrb r1, [r0] lsls r0, r1, 3 @@ -254,7 +254,7 @@ sub_8098574: @ 8098574 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldr r1, =gScriptFacing ldrb r1, [r1] @@ -272,7 +272,7 @@ sub_809859C: @ 809859C lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectClearAnimIfSpecialAnimActive pop {r0} @@ -307,7 +307,7 @@ _080985E8: ldrsh r0, [r5, r1] cmp r0, 0 bne _0809860C - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects lsls r1, r7, 3 adds r1, r7 lsls r1, 2 @@ -374,7 +374,7 @@ sub_8098630: @ 8098630 mov r1, r9 adds r6, r0, r1 strh r4, [r6, 0xC] - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects mov r8, r2 lsls r0, r4, 3 adds r0, r4 @@ -429,7 +429,7 @@ _080986E0: lsls r0, 3 adds r5, r0, r1 strh r4, [r5, 0xC] - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects lsls r0, r4, 3 adds r0, r4 lsls r0, 2 diff --git a/asm/porthole.s b/asm/porthole.s index 2ba6ec83a..a1bcff977 100644 --- a/asm/porthole.s +++ b/asm/porthole.s @@ -231,7 +231,7 @@ _080FB75E: sub_80FB768: @ 80FB768 push {lr} bl sub_80FB6EC - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 diff --git a/asm/rom4.s b/asm/rom4.s index 2f047b639..10d607683 100644 --- a/asm/rom4.s +++ b/asm/rom4.s @@ -4395,7 +4395,7 @@ sub_8086A68: @ 8086A68 thumb_func_start sub_8086A80 sub_8086A80: @ 8086A80 push {lr} - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r3, =gUnknown_02037590 ldrb r1, [r3, 0x5] lsls r0, r1, 3 @@ -6030,7 +6030,7 @@ sub_80876F0: @ 80876F0 lsls r5, r6, 3 adds r5, r6 lsls r5, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r5, r0 adds r0, r4, 0 bl sub_80876C4 @@ -6128,7 +6128,7 @@ sub_80877DC: @ 80877DC lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r1, r0 strb r2, [r1, 0x19] _080877FE: @@ -6148,7 +6148,7 @@ sub_808780C: @ 808780C lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 ldrb r0, [r4, 0x4] cmp r0, 0x40 @@ -6183,7 +6183,7 @@ sub_8087858: @ 8087858 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldrb r0, [r0, 0x4] bx lr @@ -6200,7 +6200,7 @@ sub_8087878: @ 8087878 lsls r0, r3, 3 adds r0, r3 lsls r0, 2 - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects adds r0, r3 ldrh r3, [r0, 0x10] strh r3, [r1] @@ -6220,7 +6220,7 @@ sub_80878A0: @ 80878A0 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldrb r0, [r0, 0x19] bx lr @@ -6237,7 +6237,7 @@ sub_80878C0: @ 80878C0 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 ldrb r0, [r0, 0xB] lsls r0, 28 @@ -6256,7 +6256,7 @@ sub_80878E4: @ 80878E4 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 adds r0, 0x21 movs r1, 0 @@ -6292,7 +6292,7 @@ _0808792E: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r1, r0, r1 movs r6, 0x10 ldrsh r0, [r1, r6] @@ -6332,7 +6332,7 @@ sub_808796C: @ 808796C lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r6, r0, r1 ldrb r0, [r5] cmp r0, 0 @@ -6584,7 +6584,7 @@ npc_080587EC: @ 8087B40 mov r12, r2 lsls r3, 16 movs r4, 0 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects mov r9, r0 lsrs r2, r3, 16 mov r10, r2 @@ -6660,7 +6660,7 @@ sub_8087BCC: @ 8087BCC lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 ldrb r0, [r2] cmp r0, 0 @@ -6748,7 +6748,7 @@ sub_8087C8C: @ 8087C8C lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r6, r0, r1 ldrh r0, [r6, 0xC] strh r0, [r5, 0x20] diff --git a/asm/rom6.s b/asm/rom6.s index 9ded5bf72..a0f23d720 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -23,7 +23,7 @@ npc_before_player_of_type: @ 8135424 bl GetFieldObjectIdByXYZ lsls r0, 24 lsrs r0, 24 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects lsls r1, r0, 3 adds r1, r0 lsls r1, 2 @@ -75,7 +75,7 @@ task08_080C9820: @ 813549C lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive @@ -132,7 +132,7 @@ sub_813552C: @ 813552C lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectCheckIfSpecialAnimFinishedOrInactive lsls r0, 24 @@ -196,7 +196,7 @@ _081355B8: lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 bl GetPlayerAvatarGraphicsIdByCurrentState adds r1, r0, 0 @@ -5673,7 +5673,7 @@ _08138454: lsrs r2, r0, 24 cmp r2, 0x10 beq _081384E6 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects lsls r0, r2, 3 adds r0, r2 lsls r0, 2 @@ -7257,7 +7257,7 @@ SpawnScriptFieldObject: @ 8139158 bl SpawnSpecialFieldObjectParametrized lsls r0, 24 lsrs r0, 24 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects lsls r1, r0, 3 adds r1, r0 lsls r1, 2 diff --git a/asm/rom_80AEFFC.s b/asm/rom_80AEFFC.s index 8d28c089d..2c7fe2898 100644 --- a/asm/rom_80AEFFC.s +++ b/asm/rom_80AEFFC.s @@ -599,7 +599,7 @@ _080AF4A4: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 movs r1, 0x8 bl FieldObjectSetSpecialAnim @@ -630,7 +630,7 @@ _080AF4DC: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectClearAnimIfSpecialAnimFinished movs r0, 0x3 @@ -719,7 +719,7 @@ _080AF5A2: lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 bl player_get_direction_lower_nybble lsls r0, 24 @@ -1370,7 +1370,7 @@ _080AFB26: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r4, =gUnknown_02037350 + ldr r4, =gMapObjects adds r0, r4 bl FieldObjectClearAnimIfSpecialAnimActive movs r0, 0xFF @@ -1414,7 +1414,7 @@ _080AFB6C: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectClearAnimIfSpecialAnimFinished movs r0, 0 diff --git a/asm/rom_80C6FA0.s b/asm/rom_80C6FA0.s index 440b576d2..17399a49d 100644 --- a/asm/rom_80C6FA0.s +++ b/asm/rom_80C6FA0.s @@ -23955,7 +23955,7 @@ _080D3630: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl npc_sync_anim_pause_bits _080D3646: @@ -24023,7 +24023,7 @@ sub_80D36A4: @ 80D36A4 lsls r0, r2, 3 adds r0, r2 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl FieldObjectIsSpecialAnimActive diff --git a/asm/rom_818CFC8.s b/asm/rom_818CFC8.s index fdf71043e..37e0802be 100644 --- a/asm/rom_818CFC8.s +++ b/asm/rom_818CFC8.s @@ -17486,7 +17486,7 @@ sub_81963F0: @ 81963F0 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectClearAnimIfSpecialAnimFinished bl sub_80D338C @@ -53023,7 +53023,7 @@ _081A896E: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectClearAnimIfSpecialAnimFinished bl sub_80D338C @@ -53321,7 +53321,7 @@ _081A8BB4: bne _081A8BDC b _081A8D32 _081A8BDC: - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects lsls r1, r2, 3 adds r1, r2 lsls r1, 2 @@ -54324,7 +54324,7 @@ sub_81A9424: @ 81A9424 lsls r1, 4 adds r1, r0 mov r8, r1 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_03005DF0 ldrb r1, [r0] lsls r0, r1, 3 @@ -54372,7 +54372,7 @@ _081A9488: mov r9, r0 _081A94AE: ldr r3, =gUnknown_08613ED8 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_03005DF0 ldrb r1, [r0] lsls r0, r1, 3 @@ -54984,7 +54984,7 @@ sub_81A9998: @ 81A9998 mov r8, r0 ldr r1, =0x0000028e mov r12, r1 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects mov r9, r0 _081A99CC: movs r2, 0 @@ -55125,7 +55125,7 @@ GetBattlePyramidTrainerFlag: @ 81A9AC4 ldr r1, =0x00000e2a adds r2, r1 ldr r4, =gBitTable - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects lsls r1, r0, 3 adds r1, r0 lsls r1, 2 @@ -55179,7 +55179,7 @@ sub_81A9B44: @ 81A9B44 lsls r0, 16 lsrs r5, r0, 16 movs r3, 0 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects mov r12, r0 ldr r6, =gUnknown_03005DF0 ldr r1, =gSaveBlock1Ptr @@ -86877,4 +86877,4 @@ GetGlyphWidthFont6: @ 81BA6CC thumb_func_end GetGlyphWidthFont6 - .align 2, 0 @ Don't pad with nop. \ No newline at end of file + .align 2, 0 @ Don't pad with nop. diff --git a/asm/rom_81BE66C.s b/asm/rom_81BE66C.s index 297252c7e..c1b5f9142 100644 --- a/asm/rom_81BE66C.s +++ b/asm/rom_81BE66C.s @@ -225,7 +225,7 @@ sub_81BE808: @ 81BE808 lsls r2, r0, 3 adds r2, r0 lsls r2, 2 - ldr r4, =gUnknown_02037350 + ldr r4, =gMapObjects adds r2, r4 ldr r3, =gSprites ldrb r1, [r2, 0x4] @@ -42692,7 +42692,7 @@ sub_81D427C: @ 81D427C lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects adds r5, r1, r2 ldr r4, =gUnknown_030012F8 ldr r3, =gUnknown_02037590 @@ -42730,7 +42730,7 @@ _081D42CA: mov r8, r0 cmp r0, 0x3 bls _081D42CA - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -42786,7 +42786,7 @@ _081D4356: _081D4360: movs r4, 0 mov r8, r4 - ldr r6, =gUnknown_02037350 + ldr r6, =gMapObjects mov r10, r6 _081D4368: ldr r3, =gUnknown_02037590 @@ -42804,7 +42804,7 @@ _081D4368: ldrsh r2, [r4, r6] movs r6, 0 ldrsh r0, [r0, r6] - ldr r6, =gUnknown_02037350 + ldr r6, =gMapObjects mov r9, r6 mov r12, r3 adds r7, r1, 0 @@ -42952,7 +42952,7 @@ _081D449E: ldrsh r1, [r4, r3] movs r3, 0 ldrsh r0, [r0, r3] - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects mov r9, r3 mov r12, r2 cmp r1, r0 @@ -43210,7 +43210,7 @@ _081D46D0: ldrsh r0, [r0, r3] cmp r0, 0 bne _081D476E - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -43235,7 +43235,7 @@ _081D46D0: beq _081D470C b _081D447C _081D470C: - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -43289,7 +43289,7 @@ _081D476E: ldrsh r0, [r0, r2] cmp r0, 0 bne _081D480C - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -43314,7 +43314,7 @@ _081D476E: beq _081D47AA b _081D45AA _081D47AA: - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_02037590 ldrb r1, [r0, 0x5] lsls r0, r1, 3 @@ -43385,7 +43385,7 @@ sub_81D4834: @ 81D4834 lsls r0, 16 lsls r1, 16 lsrs r4, r1, 16 - ldr r3, =gUnknown_02037350 + ldr r3, =gMapObjects ldr r1, =gUnknown_02037590 ldrb r2, [r1, 0x5] lsls r1, r2, 3 @@ -43436,7 +43436,7 @@ sub_81D4890: @ 81D4890 lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r1, r0 movs r1, 0 ldr r3, =gUnknown_030012FC @@ -43684,7 +43684,7 @@ sub_81D4A90: @ 81D4A90 lsls r1, r0, 3 adds r1, r0 lsls r1, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r5, r1, r0 ldrb r1, [r5, 0x1] movs r0, 0x21 @@ -46426,7 +46426,7 @@ GetTrainerHillTrainerFlag: @ 81D619C bl sub_81D5520 lsls r0, 24 lsrs r0, 23 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects lsls r1, r4, 3 adds r1, r4 lsls r1, 2 @@ -56756,4 +56756,4 @@ _081DB66C: .align 2, 0 @ Don't pad with nop. - \ No newline at end of file + diff --git a/asm/scrcmd.s b/asm/scrcmd.s index d22965e54..c2332e73c 100644 --- a/asm/scrcmd.s +++ b/asm/scrcmd.s @@ -2987,7 +2987,7 @@ sA9_unknown: @ 809A974 thumb_func_start s5A_face_player s5A_face_player: @ 809A9A4 push {r4,lr} - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_03005DF0 ldrb r1, [r0] lsls r0, r1, 3 @@ -3163,7 +3163,7 @@ sub_809AAEC: @ 809AAEC movs r0, 0 b _0809AB3A _0809AAFC: - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_03005DF0 ldrb r1, [r0] lsls r0, r1, 3 @@ -3208,7 +3208,7 @@ s6B_release: @ 809AB44 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl FieldObjectClearAnimIfSpecialAnimFinished bl sub_80D338C @@ -3223,7 +3223,7 @@ s6B_release: @ 809AB44 s6C_release_2: @ 809AB7C push {r4,lr} bl textbox_close - ldr r4, =gUnknown_02037350 + ldr r4, =gMapObjects ldr r0, =gUnknown_03005DF0 ldrb r1, [r0] lsls r0, r1, 3 @@ -5397,7 +5397,7 @@ sub_809BBFC: @ 809BBFC movs r0, 0 b _0809BC30 _0809BC0C: - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects ldr r0, =gUnknown_03005DF0 ldrb r1, [r0] lsls r0, r1, 3 diff --git a/asm/script_pokemon_util_80F87D8.s b/asm/script_pokemon_util_80F87D8.s index b98058fa4..d207e287b 100644 --- a/asm/script_pokemon_util_80F87D8.s +++ b/asm/script_pokemon_util_80F87D8.s @@ -508,7 +508,7 @@ _080F8BBA: bl GetFieldObjectIdByLocalIdAndMap lsls r0, 24 lsrs r0, 24 - ldr r2, =gUnknown_02037350 + ldr r2, =gMapObjects lsls r1, r0, 3 adds r1, r0 lsls r1, 2 diff --git a/asm/secret_base.s b/asm/secret_base.s index 3f6db1f6b..06ccaa9da 100644 --- a/asm/secret_base.s +++ b/asm/secret_base.s @@ -756,7 +756,7 @@ sub_80E90C8: @ 80E90C8 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 movs r1, 0x2 bl FieldObjectTurn diff --git a/asm/shop.s b/asm/shop.s index 0655f1851..1e86ea645 100644 --- a/asm/shop.s +++ b/asm/shop.s @@ -1633,7 +1633,7 @@ _080E07AA: lsrs r0, 24 mov r1, r12 strh r0, [r1] - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects lsls r0, r6, 3 adds r0, r6 lsls r0, 2 @@ -1730,7 +1730,7 @@ BuyMenuDrawFieldObjects: @ 80E08F0 movs r7, 0 ldr r0, =gUnknown_02039F70 mov r8, r0 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects mov r10, r1 ldr r2, =gSprites mov r9, r2 diff --git a/asm/trainer_see.s b/asm/trainer_see.s index 8a3d984cf..03c8d3320 100644 --- a/asm/trainer_see.s +++ b/asm/trainer_see.s @@ -15,7 +15,7 @@ CheckForTrainersWantingBattle: @ 80B3BE8 ldr r0, =gUnknown_02038BFC strb r1, [r0] movs r4, 0 - ldr r6, =gUnknown_02037350 + ldr r6, =gMapObjects _080B3BF8: lsls r0, r4, 3 adds r0, r4 @@ -180,7 +180,7 @@ _080B3D56: lsls r4, r5, 3 adds r0, r4, r5 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 bl CheckIfTrainerCanApproachPlayer lsls r0, 24 @@ -227,7 +227,7 @@ _080B3D8A: mov r1, r8 adds r0, r1, r5 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r0, r1 subs r1, r6, 0x1 lsls r1, 24 @@ -691,7 +691,7 @@ c3_8081EDC: @ 80B4118 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r5, r0, r1 ldrb r0, [r5] lsls r0, 31 @@ -887,7 +887,7 @@ _080B427A: lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive @@ -906,7 +906,7 @@ _080B42D2: lsls r4, r0, 3 adds r4, r0 lsls r4, 2 - ldr r0, =gUnknown_02037350 + ldr r0, =gMapObjects adds r4, r0 ldrb r0, [r5, 0x18] lsls r0, 28 @@ -941,7 +941,7 @@ sub_80B4318: @ 80B4318 lsls r0, r1, 3 adds r0, r1 lsls r0, 2 - ldr r1, =gUnknown_02037350 + ldr r1, =gMapObjects adds r4, r0, r1 adds r0, r4, 0 bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 3100f72ff..93a90d2c8 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -5,8 +5,6 @@ // Exported RAM declarations -extern struct MapObject gUnknown_02037350[16]; - // Exported ROM declarations void sub_808D438(void); diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 4029132e8..3e0c7729a 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -1,6 +1,8 @@ #ifndef GUARD_GLOBAL_FIELDMAP_H #define GUARD_GLOBAL_FIELDMAP_H +#define NUM_FIELD_OBJECTS 16 + enum { CONNECTION_SOUTH = 1, @@ -381,7 +383,7 @@ struct Camera s32 y; }; -extern struct MapObject gMapObjects[]; +extern struct MapObject gMapObjects[NUM_FIELD_OBJECTS]; extern u8 gSelectedMapObject; extern struct MapHeader gMapHeader; extern struct PlayerAvatar gPlayerAvatar; diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 88b9d7eab..1b4ba0b7f 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -33,9 +33,9 @@ static void npcs_clear_ids_and_state(void) { u8 i; - for (i = 0; i < ARRAY_COUNT(gUnknown_02037350); i ++) + for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) { - npc_clear_ids_and_state(&gUnknown_02037350[i]); + npc_clear_ids_and_state(&gMapObjects[i]); } } @@ -68,9 +68,9 @@ u8 sub_808D4F4(void) { u8 i; - for (i = 0; i < ARRAY_COUNT(gUnknown_02037350); i ++) + for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) { - if (!gUnknown_02037350[i].active) + if (!gMapObjects[i].active) { break; } @@ -90,7 +90,7 @@ u8 GetFieldObjectIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId) bool8 TryGetFieldObjectIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId, u8 *fieldObjectId) { *fieldObjectId = GetFieldObjectIdByLocalIdAndMap(localId, mapId, mapGroupId); - if (*fieldObjectId == ARRAY_COUNT(gUnknown_02037350)) + if (*fieldObjectId == ARRAY_COUNT(gMapObjects)) { return TRUE; } @@ -100,12 +100,27 @@ bool8 TryGetFieldObjectIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId, u8 u8 GetFieldObjectIdByXY(s16 x, s16 y) { u8 i; - for (i = 0; i < ARRAY_COUNT(gUnknown_02037350); i ++) + + for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) { - if (gUnknown_02037350[i].active && gUnknown_02037350[i].coords2.x == x && gUnknown_02037350[i].coords2.y == y) + if (gMapObjects[i].active && gMapObjects[i].coords2.x == x && gMapObjects[i].coords2.y == y) { break; } } return i; } + +u8 GetFieldObjectIdByLocalIdAndMapInternal(u8 localId, u8 mapId, u8 mapGroupId) +{ + u8 i; + + for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + { + if (gMapObjects[i].active && gMapObjects[i].localId == localId && gMapObjects[i].mapNum == mapId && gMapObjects[i].mapGroup == mapGroupId) + { + return i; + } + } + return ARRAY_COUNT(gMapObjects); +} diff --git a/sym_ewram.txt b/sym_ewram.txt index b2dcd8e41..71b6ffeae 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -761,7 +761,7 @@ gUnknown_02037348: @ 2037348 gUnknown_0203734C: @ 203734C .space 0x4 -gUnknown_02037350: @ 2037350 +gMapObjects: @ 2037350 .space 0x240 gUnknown_02037590: @ 2037590 From 9498dfa71c811b09f319bc9c9656c08f3182c9dc Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 6 Sep 2017 14:25:17 -0400 Subject: [PATCH 010/342] InitFieldObjectStateFromTemplate (nonmatching, same as ruby) --- asm/field_map_obj.s | 192 ------------------------------- include/field_map_obj.h | 1 + include/global.fieldmap.h | 3 +- include/global.h | 1 + src/field_map_obj.c | 230 +++++++++++++++++++++++++++++++++++++- 5 files changed, 233 insertions(+), 194 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 01e04f04b..8afd73a01 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,198 +5,6 @@ .text - thumb_func_start GetFieldObjectIdByLocalId -@ u8 GetFieldObjectIdByLocalId(u8 localId) -GetFieldObjectIdByLocalId: @ 808D608 - push {r4,lr} - lsls r0, 24 - lsrs r3, r0, 24 - movs r2, 0 - ldr r4, =gMapObjects -_0808D612: - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - adds r1, r0, r4 - ldrb r0, [r1] - lsls r0, 31 - cmp r0, 0 - beq _0808D630 - ldrb r0, [r1, 0x8] - cmp r0, r3 - bne _0808D630 - adds r0, r2, 0 - b _0808D63C - .pool -_0808D630: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0xF - bls _0808D612 - movs r0, 0x10 -_0808D63C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end GetFieldObjectIdByLocalId - - thumb_func_start InitFieldObjectStateFromTemplate -@ u8 InitFieldObjectStateFromTemplate(struct FieldObjectTemplate *fieldObjectTemplate, u8 mapId, u8 mapGroupId) -InitFieldObjectStateFromTemplate: @ 808D644 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x4 - adds r5, r0, 0 - lsls r1, 24 - lsrs r6, r1, 24 - lsls r2, 24 - lsrs r7, r2, 24 - ldrb r0, [r5] - adds r1, r6, 0 - adds r2, r7, 0 - mov r3, sp - bl GetAvailableFieldObjectSlot - lsls r0, 24 - cmp r0, 0 - beq _0808D66E - movs r0, 0x10 - b _0808D762 -_0808D66E: - mov r0, sp - ldrb r1, [r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - ldr r1, =gMapObjects - adds r4, r0, r1 - adds r0, r4, 0 - bl npc_clear_ids_and_state - ldrh r3, [r5, 0x4] - adds r3, 0x7 - lsls r3, 16 - lsrs r3, 16 - ldrh r2, [r5, 0x6] - adds r2, 0x7 - lsls r2, 16 - lsrs r2, 16 - ldrb r0, [r4] - movs r1, 0x1 - orrs r0, r1 - movs r1, 0x4 - orrs r0, r1 - strb r0, [r4] - ldrb r0, [r5, 0x1] - strb r0, [r4, 0x5] - ldrb r0, [r5, 0x9] - strb r0, [r4, 0x6] - ldrb r0, [r5] - strb r0, [r4, 0x8] - strb r6, [r4, 0x9] - strb r7, [r4, 0xA] - strh r3, [r4, 0xC] - strh r2, [r4, 0xE] - strh r3, [r4, 0x10] - strh r2, [r4, 0x12] - strh r3, [r4, 0x14] - strh r2, [r4, 0x16] - ldrb r0, [r5, 0x8] - movs r7, 0xF - adds r1, r7, 0 - ands r1, r0 - ldrb r2, [r4, 0xB] - movs r0, 0x10 - negs r0, r0 - mov r8, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r4, 0xB] - ldrb r1, [r5, 0x8] - lsls r1, 4 - ands r0, r7 - orrs r0, r1 - strb r0, [r4, 0xB] - ldrb r1, [r5, 0xA] - lsls r1, 28 - movs r0, 0xF - mov r9, r0 - lsrs r1, 28 - ldrb r2, [r4, 0x19] - mov r0, r8 - ands r0, r2 - orrs r0, r1 - strb r0, [r4, 0x19] - ldrb r1, [r5, 0xA] - lsrs r1, 4 - lsls r1, 4 - ands r0, r7 - orrs r0, r1 - strb r0, [r4, 0x19] - ldrh r0, [r5, 0xC] - strb r0, [r4, 0x7] - ldrh r0, [r5, 0xE] - strb r0, [r4, 0x1D] - ldr r1, =gUnknown_085055CD - ldrb r0, [r5, 0x9] - adds r0, r1 - ldrb r1, [r0] - adds r0, r4, 0 - adds r0, 0x20 - strb r1, [r0] - ldrb r1, [r0] - adds r0, r4, 0 - bl FieldObjectSetDirection - adds r0, r4, 0 - bl FieldObjectHandleDynamicGraphicsId - ldr r1, =gUnknown_0850557C - ldrb r0, [r4, 0x6] - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - beq _0808D75E - ldrb r2, [r4, 0x19] - adds r0, r7, 0 - ands r0, r2 - cmp r0, 0 - bne _0808D746 - lsls r0, r2, 28 - lsrs r0, 28 - adds r0, 0x1 - mov r1, r9 - ands r0, r1 - mov r1, r8 - ands r1, r2 - orrs r1, r0 - strb r1, [r4, 0x19] -_0808D746: - ldrb r2, [r4, 0x19] - movs r0, 0xF0 - ands r0, r2 - cmp r0, 0 - bne _0808D75E - lsrs r1, r2, 4 - adds r1, 0x1 - lsls r1, 4 - adds r0, r7, 0 - ands r0, r2 - orrs r0, r1 - strb r0, [r4, 0x19] -_0808D75E: - mov r0, sp - ldrb r0, [r0] -_0808D762: - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end InitFieldObjectStateFromTemplate - thumb_func_start sub_808D77C sub_808D77C: @ 808D77C push {r4-r7,lr} diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 93a90d2c8..3381d847b 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -11,6 +11,7 @@ void sub_808D438(void); u8 GetFieldObjectIdByLocalIdAndMap(u8, u8, u8); bool8 TryGetFieldObjectIdByLocalIdAndMap(u8, u8, u8, u8 *); u8 GetFieldObjectIdByXY(s16, s16); +void FieldObjectSetDirection(struct MapObject *, u8); // Exported data declarations diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 3e0c7729a..b0a36aa55 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -226,7 +226,8 @@ struct MapObject /*0x14*/ struct Coords16 coords3; /*0x18*/ u8 mapobj_unk_18:4; //current direction? /*0x18*/ u8 placeholder18:4; - /*0x19*/ u8 mapobj_unk_19; + /*0x19*/ u8 mapobj_unk_19:4; + /*0x19*/ u8 mapobj_unk_19b:4; /*0x1A*/ u8 mapobj_unk_1A; /*0x1B*/ u8 mapobj_unk_1B; /*0x1C*/ u8 mapobj_unk_1C; diff --git a/include/global.h b/include/global.h index f9c5f68be..0c0f86470 100644 --- a/include/global.h +++ b/include/global.h @@ -8,6 +8,7 @@ // to help in decompiling #define asm_comment(x) asm volatile("@ -- " x " -- ") +#define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided") #ifdef __APPLE__ void memset(void *, int, size_t); diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 1b4ba0b7f..b97d5c0dc 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -15,14 +15,19 @@ /*static*/ void sub_808D450(void); /*static*/ u8 GetFieldObjectIdByLocalId(u8); /*static*/ u8 GetFieldObjectIdByLocalIdAndMapInternal(u8, u8, u8); +/*static*/ bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *); +/*static*/ void FieldObjectHandleDynamicGraphicsId(struct MapObject *); // ROM data +const u8 gUnknown_085055CD[0x53]; +const u8 gUnknown_0850557C[0x51]; + // Code /*static*/ void npc_clear_ids_and_state(struct MapObject *mapObject) { - memset(mapObject, 0, sizeof(struct MapObject)); + *mapObject = (struct MapObject){}; mapObject->localId = 0xFF; mapObject->mapNum = -1; mapObject->mapGroup = -1; @@ -124,3 +129,226 @@ u8 GetFieldObjectIdByLocalIdAndMapInternal(u8 localId, u8 mapId, u8 mapGroupId) } return ARRAY_COUNT(gMapObjects); } + +u8 GetFieldObjectIdByLocalId(u8 localId) +{ + u8 i; + + for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + { + if (gMapObjects[i].active && gMapObjects[i].localId == localId) + { + return i; + } + } + return ARRAY_COUNT(gMapObjects); +} + +// This function has the same nonmatching quirk as in Ruby/Sapphire. +#ifdef NONMATCHING +u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u8 mapId, u8 mapGroupId) +{ + u8 slot; + struct MapObject *mapObject; + u16 x; + u16 y; + + if (GetAvailableFieldObjectSlot(template->localId, mapId, mapGroupId, &slot)) + { + return ARRAY_COUNT(gMapObjects); + } + mapObject = &gMapObjects[slot]; + npc_clear_ids_and_state(mapObject); + x = template->x + 7; + y = template->y + 7; + mapObject->active = TRUE; + mapObject->mapobj_bit_2 = TRUE; + mapObject->graphicsId = template->graphicsId; + mapObject->animPattern = template->movementType; + mapObject->localId = template->localId; + mapObject->mapNum = mapId; + mapObject->mapGroup = mapGroupId; + mapObject->coords1.x = x; + mapObject->coords1.y = y; + mapObject->coords2.x = x; + mapObject->coords2.y = y; + mapObject->coords3.x = x; + mapObject->coords3.y = y; + mapObject->mapobj_unk_0B_0 = template->elevation; + mapObject->elevation = template->elevation; + mapObject->mapobj_unk_19 = template->unkA_0; + mapObject->mapobj_unk_19b = template->unkA_4; + mapObject->trainerType = template->unkC; + mapObject->trainerRange_berryTreeId = template->unkE; + mapObject->mapobj_unk_20 = gUnknown_085055CD[template->movementType]; + FieldObjectSetDirection(mapObject, mapObject->mapobj_unk_20); + FieldObjectHandleDynamicGraphicsId(mapObject); + if (gUnknown_0850557C[mapObject->animPattern]) + { + if (mapObject->mapobj_unk_19 == 0) + { + mapObject->mapobj_unk_19 ++; + } + if (mapObject->mapobj_unk_19b == 0) + { + mapObject->mapobj_unk_19b ++; + } + } + return slot; +} +#else +__attribute__((naked)) u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u8 mapId, u8 mapGroupId) +{ + asm_unified("\tpush {r4-r7,lr}\n" + "\tmov r7, r9\n" + "\tmov r6, r8\n" + "\tpush {r6,r7}\n" + "\tsub sp, 0x4\n" + "\tadds r5, r0, 0\n" + "\tlsls r1, 24\n" + "\tlsrs r6, r1, 24\n" + "\tlsls r2, 24\n" + "\tlsrs r7, r2, 24\n" + "\tldrb r0, [r5]\n" + "\tadds r1, r6, 0\n" + "\tadds r2, r7, 0\n" + "\tmov r3, sp\n" + "\tbl GetAvailableFieldObjectSlot\n" + "\tlsls r0, 24\n" + "\tcmp r0, 0\n" + "\tbeq _0808D66E\n" + "\tmovs r0, 0x10\n" + "\tb _0808D762\n" + "_0808D66E:\n" + "\tmov r0, sp\n" + "\tldrb r1, [r0]\n" + "\tlsls r0, r1, 3\n" + "\tadds r0, r1\n" + "\tlsls r0, 2\n" + "\tldr r1, =gMapObjects\n" + "\tadds r4, r0, r1\n" + "\tadds r0, r4, 0\n" + "\tbl npc_clear_ids_and_state\n" + "\tldrh r3, [r5, 0x4]\n" + "\tadds r3, 0x7\n" + "\tlsls r3, 16\n" + "\tlsrs r3, 16\n" + "\tldrh r2, [r5, 0x6]\n" + "\tadds r2, 0x7\n" + "\tlsls r2, 16\n" + "\tlsrs r2, 16\n" + "\tldrb r0, [r4]\n" + "\tmovs r1, 0x1\n" + "\torrs r0, r1\n" + "\tmovs r1, 0x4\n" + "\torrs r0, r1\n" + "\tstrb r0, [r4]\n" + "\tldrb r0, [r5, 0x1]\n" + "\tstrb r0, [r4, 0x5]\n" + "\tldrb r0, [r5, 0x9]\n" + "\tstrb r0, [r4, 0x6]\n" + "\tldrb r0, [r5]\n" + "\tstrb r0, [r4, 0x8]\n" + "\tstrb r6, [r4, 0x9]\n" + "\tstrb r7, [r4, 0xA]\n" + "\tstrh r3, [r4, 0xC]\n" + "\tstrh r2, [r4, 0xE]\n" + "\tstrh r3, [r4, 0x10]\n" + "\tstrh r2, [r4, 0x12]\n" + "\tstrh r3, [r4, 0x14]\n" + "\tstrh r2, [r4, 0x16]\n" + "\tldrb r0, [r5, 0x8]\n" + "\tmovs r7, 0xF\n" + "\tadds r1, r7, 0\n" + "\tands r1, r0\n" + "\tldrb r2, [r4, 0xB]\n" + "\tmovs r0, 0x10\n" + "\tnegs r0, r0\n" + "\tmov r8, r0\n" + "\tands r0, r2\n" + "\torrs r0, r1\n" + "\tstrb r0, [r4, 0xB]\n" + "\tldrb r1, [r5, 0x8]\n" + "\tlsls r1, 4\n" + "\tands r0, r7\n" + "\torrs r0, r1\n" + "\tstrb r0, [r4, 0xB]\n" + "\tldrb r1, [r5, 0xA]\n" + "\tlsls r1, 28\n" + "\tmovs r0, 0xF\n" + "\tmov r9, r0\n" + "\tlsrs r1, 28\n" + "\tldrb r2, [r4, 0x19]\n" + "\tmov r0, r8\n" + "\tands r0, r2\n" + "\torrs r0, r1\n" + "\tstrb r0, [r4, 0x19]\n" + "\tldrb r1, [r5, 0xA]\n" + "\tlsrs r1, 4\n" + "\tlsls r1, 4\n" + "\tands r0, r7\n" + "\torrs r0, r1\n" + "\tstrb r0, [r4, 0x19]\n" + "\tldrh r0, [r5, 0xC]\n" + "\tstrb r0, [r4, 0x7]\n" + "\tldrh r0, [r5, 0xE]\n" + "\tstrb r0, [r4, 0x1D]\n" + "\tldr r1, =gUnknown_085055CD\n" + "\tldrb r0, [r5, 0x9]\n" + "\tadds r0, r1\n" + "\tldrb r1, [r0]\n" + "\tadds r0, r4, 0\n" + "\tadds r0, 0x20\n" + "\tstrb r1, [r0]\n" + "\tldrb r1, [r0]\n" + "\tadds r0, r4, 0\n" + "\tbl FieldObjectSetDirection\n" + "\tadds r0, r4, 0\n" + "\tbl FieldObjectHandleDynamicGraphicsId\n" + "\tldr r1, =gUnknown_0850557C\n" + "\tldrb r0, [r4, 0x6]\n" + "\tadds r0, r1\n" + "\tldrb r0, [r0]\n" + "\tcmp r0, 0\n" + "\tbeq _0808D75E\n" + "\tldrb r2, [r4, 0x19]\n" + "\tadds r0, r7, 0\n" + "\tands r0, r2\n" + "\tcmp r0, 0\n" + "\tbne _0808D746\n" + "\tlsls r0, r2, 28\n" + "\tlsrs r0, 28\n" + "\tadds r0, 0x1\n" + "\tmov r1, r9\n" + "\tands r0, r1\n" + "\tmov r1, r8\n" + "\tands r1, r2\n" + "\torrs r1, r0\n" + "\tstrb r1, [r4, 0x19]\n" + "_0808D746:\n" + "\tldrb r2, [r4, 0x19]\n" + "\tmovs r0, 0xF0\n" + "\tands r0, r2\n" + "\tcmp r0, 0\n" + "\tbne _0808D75E\n" + "\tlsrs r1, r2, 4\n" + "\tadds r1, 0x1\n" + "\tlsls r1, 4\n" + "\tadds r0, r7, 0\n" + "\tands r0, r2\n" + "\torrs r0, r1\n" + "\tstrb r0, [r4, 0x19]\n" + "_0808D75E:\n" + "\tmov r0, sp\n" + "\tldrb r0, [r0]\n" + "_0808D762:\n" + "\tadd sp, 0x4\n" + "\tpop {r3,r4}\n" + "\tmov r8, r3\n" + "\tmov r9, r4\n" + "\tpop {r4-r7}\n" + "\tpop {r1}\n" + "\tbx r1\n" + ".pool"); +} +#endif From 6448563ede13d51682cbf1988a2072291f3b3df0 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 6 Sep 2017 16:14:55 -0400 Subject: [PATCH 011/342] unref_sub_808D77C --- asm/battle_setup.s | 4 +- asm/bike.s | 4 +- asm/decoration.s | 18 ++++----- asm/field_camera.s | 6 +-- asm/field_control_avatar.s | 28 ++++++------- asm/field_map_obj.s | 82 +------------------------------------- asm/field_tasks.s | 2 +- asm/fieldmap.s | 30 +++++++------- asm/fldeff_80F9BCC.s | 2 +- asm/fldeff_teleport.s | 2 +- asm/item_use.s | 10 ++--- asm/pokemon_3.s | 2 +- asm/region_map.s | 8 ++-- asm/rom4.s | 56 +++++++++++++------------- asm/rom6.s | 14 +++---- asm/rom_80C6FA0.s | 8 ++-- asm/rom_818CFC8.s | 22 +++++----- asm/rom_81BE66C.s | 24 +++++------ asm/script.s | 2 +- asm/secret_base.s | 12 +++--- asm/shop.s | 2 +- asm/tileset.s | 4 +- asm/tv.s | 14 +++---- asm/weather.s | 2 +- asm/wild_encounter.s | 10 ++--- include/rom_818CFC8.h | 11 +++++ include/rom_81BE66C.h | 10 +++++ src/field_map_obj.c | 35 ++++++++++++++++ sym_ewram.txt | 2 +- 29 files changed, 202 insertions(+), 224 deletions(-) create mode 100644 include/rom_818CFC8.h create mode 100644 include/rom_81BE66C.h diff --git a/asm/battle_setup.s b/asm/battle_setup.s index a07561464..a4b143703 100644 --- a/asm/battle_setup.s +++ b/asm/battle_setup.s @@ -678,7 +678,7 @@ _080B0C16: lsls r0, 24 cmp r0, 0 bne _080B0D18 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] subs r0, 0x1 cmp r0, 0x8 @@ -830,7 +830,7 @@ _080B0D54: lsls r0, 24 cmp r0, 0 bne _080B0D7C - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] cmp r0, 0x4 beq _080B0D78 diff --git a/asm/bike.s b/asm/bike.s index 00db73ca1..22d52c0fa 100644 --- a/asm/bike.s +++ b/asm/bike.s @@ -1775,7 +1775,7 @@ sub_8119EF0: @ 8119EF0 lsls r0, 24 cmp r0, 0 bne _08119F08 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] cmp r0, 0x8 bne _08119F10 @@ -2173,7 +2173,7 @@ IsRunningDisallowed: @ 811A1DC push {lr} lsls r0, 24 lsrs r2, r0, 24 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r1, [r0, 0x1A] movs r0, 0x4 ands r0, r1 diff --git a/asm/decoration.s b/asm/decoration.s index 9d228be38..26449f85d 100644 --- a/asm/decoration.s +++ b/asm/decoration.s @@ -2472,7 +2472,7 @@ sub_8127E18: @ 8127E18 push {r5-r7} sub sp, 0x4 movs r6, 0 - ldr r7, =gUnknown_02037318 + ldr r7, =gMapHeader ldr r0, =gSpecialVar_0x8005 mov r8, r0 ldr r1, =gSpecialVar_0x8006 @@ -2500,7 +2500,7 @@ _08127E34: ldrh r0, [r0, 0x14] cmp r0, r5 beq _08127E82 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r3, [r0, 0x4] ldrb r6, [r3] adds r4, r5, 0 @@ -3938,7 +3938,7 @@ _08128A64: ldrh r1, [r0, 0x22] adds r1, 0x2 strh r1, [r0, 0x22] - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x14] cmp r0, 0x56 bne _08128A84 @@ -4282,7 +4282,7 @@ _08128D48: movs r0, 0x2 ldrsh r1, [r2, r0] subs r1, 0x7 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] ldr r0, [r0, 0x4] cmp r1, r0 @@ -4316,7 +4316,7 @@ _08128D82: ldrsh r0, [r2, r4] adds r1, r0 subs r1, 0x8 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] ldr r0, [r0] cmp r1, r0 @@ -5559,7 +5559,7 @@ _08129744: ldrb r0, [r4] bl sub_81296EC movs r1, 0 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0, 0x4] ldrb r2, [r0] cmp r1, r2 @@ -5591,7 +5591,7 @@ _08129796: sub_81297AC: @ 81297AC push {r4-r6,lr} movs r2, 0 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0, 0x4] ldrb r1, [r0] cmp r2, r1 @@ -5684,7 +5684,7 @@ _08129846: _0812985E: adds r0, r4, 0x7 add r0, r8 - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader ldr r3, [r1] ldr r1, [sp] subs r2, r1, r6 @@ -5817,7 +5817,7 @@ _08129968: adds r0, r5, 0 adds r1, r4, 0 bl DisplayItemMessageOnField - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x14] cmp r0, 0x56 bne _08129994 diff --git a/asm/field_camera.s b/asm/field_camera.s index 450e96174..cead2954c 100644 --- a/asm/field_camera.s +++ b/asm/field_camera.s @@ -135,7 +135,7 @@ DrawWholeMapView: @ 8089C34 ldrsh r0, [r1, r2] movs r2, 0x2 ldrsh r1, [r1, r2] - ldr r2, =gUnknown_02037318 + ldr r2, =gMapHeader ldr r2, [r2] bl DrawWholeMapViewInternal ldr r1, =gUnknown_03000E20 @@ -225,7 +225,7 @@ RedrawMapSlicesForCameraUpdate: @ 8089CE4 adds r5, r0, 0 adds r6, r1, 0 adds r7, r2, 0 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r4, [r0] cmp r6, 0 ble _08089CFC @@ -476,7 +476,7 @@ CurrentMapDrawMetatileAt: @ 8089EA0 adds r1, r0, 0 cmp r1, 0 blt _08089ECC - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] lsls r1, 16 lsrs r1, 16 diff --git a/asm/field_control_avatar.s b/asm/field_control_avatar.s index 3d989e9e4..85009cc5b 100644 --- a/asm/field_control_avatar.s +++ b/asm/field_control_avatar.s @@ -704,7 +704,7 @@ TryGetInvisibleMapObjectScript: @ 809C458 push {r4,r5,lr} lsls r2, 24 lsrs r5, r2, 24 - ldr r4, =gUnknown_02037318 + ldr r4, =gMapHeader ldrh r1, [r0] subs r1, 0x7 lsls r1, 16 @@ -1194,7 +1194,7 @@ sub_809C89C: @ 809C89C lsls r0, 24 cmp r0, 0 beq _0809C8D4 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] cmp r0, 0x5 bne _0809C8D4 @@ -1264,7 +1264,7 @@ _0809C930: thumb_func_start mapheader_trigger_activate_at__run_now mapheader_trigger_activate_at__run_now: @ 809C938 push {r4,lr} - ldr r4, =gUnknown_02037318 + ldr r4, =gMapHeader ldrh r1, [r0] subs r1, 0x7 lsls r1, 16 @@ -1545,7 +1545,7 @@ overworld_poison_timer_set: @ 809CB80 thumb_func_start overworld_poison_step overworld_poison_step: @ 809CB94 push {lr} - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] cmp r0, 0x9 beq _0809CBD4 @@ -1639,7 +1639,7 @@ mapheader_run_first_tag2_script_list_match_conditionally: @ 809CC38 lsrs r4, 16 lsls r5, 24 lsrs r5, 24 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader mov r8, r0 adds r1, r7, 0 bl map_warp_check_packed @@ -1683,7 +1683,7 @@ sub_809CC9C: @ 809CC9C adds r6, r0, 0 lsls r1, 16 lsrs r5, r1, 16 - ldr r7, =gUnknown_02037318 + ldr r7, =gMapHeader adds r0, r7, 0 adds r1, r6, 0 bl map_warp_check_packed @@ -1958,7 +1958,7 @@ sub_809CEB0: @ 809CEB0 adds r4, r0, 0 cmp r4, 0 bne _0809CEE8 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0, 0x4] ldr r5, [r0, 0x8] b _0809CF0E @@ -1976,7 +1976,7 @@ _0809CEF0: adds r5, r0, 0 b _0809CF0E _0809CF00: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0, 0x4] lsls r2, r4, 24 asrs r1, r2, 21 @@ -2053,7 +2053,7 @@ map_warp_consider_2_to_inside: @ 809CF78 lsrs r0, 24 cmp r0, 0x1 bne _0809CFB0 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r1, [r0, 0x4] adds r0, r5, 0 bl sub_80E9668 @@ -2067,7 +2067,7 @@ _0809CFB0: lsrs r0, 24 cmp r0, 0x1 bne _0809CFFC - ldr r6, =gUnknown_02037318 + ldr r6, =gMapHeader adds r0, r6, 0 adds r1, r5, 0 bl map_warp_check_packed @@ -2243,7 +2243,7 @@ _0809D0E4: thumb_func_start sub_809D0F4 sub_809D0F4: @ 809D0F4 push {r4,lr} - ldr r4, =gUnknown_02037318 + ldr r4, =gMapHeader ldrh r1, [r0] subs r1, 0x7 lsls r1, 16 @@ -2316,7 +2316,7 @@ dive_warp: @ 809D16C adds r4, r0, 0 lsls r1, 16 lsrs r5, r1, 16 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] cmp r0, 0x5 bne _0809D1A4 @@ -2389,7 +2389,7 @@ sub_809D1E8: @ 809D1E8 bl MapGridGetMetatileBehaviorAt lsls r0, 24 lsrs r5, r0, 24 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] cmp r0, 0x5 bne _0809D244 @@ -2491,7 +2491,7 @@ sub_809D2BC: @ 809D2BC movs r2, 0x2 ldrsh r1, [r4, r2] bl MapGridGetMetatileBehaviorAt - ldr r4, =gUnknown_02037318 + ldr r4, =gMapHeader adds r0, r4, 0 mov r1, sp bl map_warp_check_packed diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 8afd73a01..31b522467 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,84 +5,6 @@ .text - thumb_func_start sub_808D77C -sub_808D77C: @ 808D77C - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - ldr r4, =gUnknown_02037318 - ldr r0, [r4, 0x4] - cmp r0, 0 - beq _0808D7FE - bl InBattlePyramid - lsls r0, 24 - cmp r0, 0 - beq _0808D7A8 - bl sub_81AAA40 - lsls r0, 24 - lsrs r6, r0, 24 - b _0808D7CA - .pool -_0808D7A8: - bl InTrainerHill - cmp r0, 0 - beq _0808D7C6 - movs r6, 0x2 - b _0808D7CA -_0808D7B4: - ldr r0, [r7] - ldrb r1, [r0, 0x5] - ldrb r2, [r0, 0x4] - adds r0, r4, 0 - bl InitFieldObjectStateFromTemplate - lsls r0, 24 - lsrs r0, 24 - b _0808D800 -_0808D7C6: - ldr r0, [r4, 0x4] - ldrb r6, [r0] -_0808D7CA: - movs r5, 0 - cmp r5, r6 - bcs _0808D7FE - ldr r7, =gSaveBlock1Ptr -_0808D7D2: - lsls r0, r5, 1 - adds r0, r5 - lsls r0, 3 - movs r1, 0xC7 - lsls r1, 4 - adds r0, r1 - ldr r1, [r7] - adds r4, r1, r0 - ldrb r0, [r4] - cmp r0, r8 - bne _0808D7F4 - ldrh r0, [r4, 0x14] - bl FlagGet - lsls r0, 24 - cmp r0, 0 - beq _0808D7B4 -_0808D7F4: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, r6 - bcc _0808D7D2 -_0808D7FE: - movs r0, 0x10 -_0808D800: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_808D77C - thumb_func_start GetAvailableFieldObjectSlot @ bool8 GetAvailableFieldObjectSlot(u16 localId, u8 mapId, u8 mapGroupId, u8 *fieldObjectId) GetAvailableFieldObjectSlot: @ 808D810 @@ -1066,7 +988,7 @@ SpawnFieldObjectsInView: @ 808DF80 lsls r1, 16 lsrs r1, 16 str r1, [sp, 0x8] - ldr r5, =gUnknown_02037318 + ldr r5, =gMapHeader ldr r0, [r5, 0x4] cmp r0, 0 beq _0808E078 @@ -3478,7 +3400,7 @@ GetFieldObjectTemplateByLocalIdAndMap: @ 808F128 movs r0, 0xC7 lsls r0, 4 adds r1, r0 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0, 0x4] b _0808F16C .pool diff --git a/asm/field_tasks.s b/asm/field_tasks.s index 5f9a49f94..fb99bbc0e 100644 --- a/asm/field_tasks.s +++ b/asm/field_tasks.s @@ -1201,7 +1201,7 @@ sub_809E1C8: @ 809E1C8 mov r7, r9 mov r6, r8 push {r6,r7} - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] ldr r1, [r0] mov r9, r1 diff --git a/asm/fieldmap.s b/asm/fieldmap.s index 037133d1e..d2416248f 100644 --- a/asm/fieldmap.s +++ b/asm/fieldmap.s @@ -19,7 +19,7 @@ mapconnection_get_mapheader: @ 8087D44 thumb_func_start not_trainer_hill_battle_pyramid not_trainer_hill_battle_pyramid: @ 8087D54 push {r4,lr} - ldr r4, =gUnknown_02037318 + ldr r4, =gMapHeader adds r0, r4, 0 bl mapheader_copy_mapdata_with_padding ldr r0, [r4, 0x4] @@ -34,7 +34,7 @@ not_trainer_hill_battle_pyramid: @ 8087D54 thumb_func_start sub_8087D74 sub_8087D74: @ 8087D74 push {r4,lr} - ldr r4, =gUnknown_02037318 + ldr r4, =gMapHeader adds r0, r4, 0 bl mapheader_copy_mapdata_with_padding movs r0, 0 @@ -554,7 +554,7 @@ MapGridGetZCoordAt: @ 8088144 b _08088196 .pool _08088174: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r3, [r0] adds r1, r2, 0x1 movs r2, 0x1 @@ -613,7 +613,7 @@ MapGridIsImpassableAt: @ 80881B0 b _08088202 .pool _080881E0: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r3, [r0] adds r1, r2, 0x1 movs r2, 0x1 @@ -675,7 +675,7 @@ MapGridGetMetatileIdAt: @ 8088224 b _08088278 .pool _08088254: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r3, [r0] adds r1, r5, 0x1 movs r2, 0x1 @@ -702,7 +702,7 @@ _08088278: b _080882B0 .pool _0808828C: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r3, [r0] adds r1, r5, 0x1 movs r2, 0x1 @@ -839,7 +839,7 @@ GetBehaviorByMetatileId: @ 8088370 ldr r0, =0x000001ff cmp r2, r0 bhi _08088394 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] ldr r0, [r0, 0x10] ldr r1, [r0, 0x10] @@ -854,7 +854,7 @@ _08088394: b _080883B6 .pool _080883A4: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] ldr r0, [r0, 0x14] ldr r1, [r0, 0x10] @@ -1029,7 +1029,7 @@ _080884EC: mov r9, r1 cmp r6, r0 bne _08088508 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] ldr r0, [r0, 0x4] subs r0, 0x1 @@ -1104,7 +1104,7 @@ _08088574: asrs r1, r2, 16 bl sub_80D423C _08088584: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] ldr r0, [r0, 0x4] subs r0, 0x1 @@ -1282,7 +1282,7 @@ GetMapBorderIdAt: @ 808869C b _08088700 .pool _080886D8: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r3, [r0] adds r1, r4, 0x1 movs r2, 0x1 @@ -1607,7 +1607,7 @@ sub_8088950: @ 8088950 mov r8, r2 lsls r0, 24 lsrs r6, r0, 24 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0, 0xC] ldr r7, [r0] ldr r4, [r0, 0x4] @@ -1664,7 +1664,7 @@ sub_80889A8: @ 80889A8 blt _08088A00 cmp r4, 0x2 bgt _080889E0 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] ldr r1, [r0] ldr r0, [r2] @@ -1676,7 +1676,7 @@ sub_80889A8: @ 80889A8 _080889E0: cmp r6, 0x4 bgt _08088A00 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] ldr r1, [r0, 0x4] ldr r0, [r2] @@ -1792,7 +1792,7 @@ sub_8088A8C: @ 8088A8C mov r8, r0 lsls r1, 16 lsrs r1, 16 - ldr r2, =gUnknown_02037318 + ldr r2, =gMapHeader ldr r0, [r2, 0xC] cmp r0, 0 bne _08088AB4 diff --git a/asm/fldeff_80F9BCC.s b/asm/fldeff_80F9BCC.s index 465f64db3..d5e620c77 100644 --- a/asm/fldeff_80F9BCC.s +++ b/asm/fldeff_80F9BCC.s @@ -468,7 +468,7 @@ _080F9F54: sub_80F9F5C: @ 80F9F5C push {lr} ldr r0, =gUnknown_0203AB40 - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader ldr r1, [r1, 0x4] bl sub_80E9608 bl sub_80E8B6C diff --git a/asm/fldeff_teleport.s b/asm/fldeff_teleport.s index bbca5095f..0e14cd418 100644 --- a/asm/fldeff_teleport.s +++ b/asm/fldeff_teleport.s @@ -8,7 +8,7 @@ thumb_func_start SetUpFieldMove_Teleport SetUpFieldMove_Teleport: @ 817C8BC push {lr} - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] bl is_light_level_1_2_3_or_6 lsls r0, 24 diff --git a/asm/item_use.s b/asm/item_use.s index cd1c38215..8d3c0ce41 100644 --- a/asm/item_use.s +++ b/asm/item_use.s @@ -553,7 +553,7 @@ ItemUseOnFieldCB_Itemfinder: @ 80FD4B8 push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0, 0x4] adds r1, r4, 0 bl ItemfinderCheckForHiddenItems @@ -906,7 +906,7 @@ _080FD76C: subs r0, r5, r0 lsls r0, 16 lsrs r1, r0, 16 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] ldr r0, [r0, 0x4] b _080FD79E @@ -918,7 +918,7 @@ _080FD784: adds r0, r5 b _080FD798 _080FD78E: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] ldr r0, [r0] adds r0, 0x7 @@ -964,7 +964,7 @@ sub_80FD7C8: @ 80FD7C8 lsls r0, 24 lsrs r0, 24 str r0, [sp, 0x4] - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r1, [r0] ldr r0, [r1] adds r0, 0x7 @@ -2288,7 +2288,7 @@ re_escape_rope: @ 80FE2D8 thumb_func_start sub_80FE314 sub_80FE314: @ 80FE314 push {lr} - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r1, [r0, 0x1A] movs r0, 0x2 ands r0, r1 diff --git a/asm/pokemon_3.s b/asm/pokemon_3.s index ca77a64a4..22c72f443 100644 --- a/asm/pokemon_3.s +++ b/asm/pokemon_3.s @@ -5733,7 +5733,7 @@ _0806EA7C: mov r8, r2 movs r7, 0x50 _0806EAC6: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrh r1, [r0, 0x12] movs r0, 0xD2 lsls r0, 1 diff --git a/asm/region_map.s b/asm/region_map.s index 716981813..7a0a5dae3 100644 --- a/asm/region_map.s +++ b/asm/region_map.s @@ -1571,7 +1571,7 @@ _08123904: _08123928: ldr r4, =gUnknown_0203A144 ldr r0, [r4] - ldr r3, =gUnknown_02037318 + ldr r3, =gMapHeader ldrb r1, [r3, 0x14] movs r2, 0 strh r1, [r0] @@ -1599,7 +1599,7 @@ _08123956: b _08123ABE .pool _0812396C: - ldr r2, =gUnknown_02037318 + ldr r2, =gMapHeader ldrb r1, [r2, 0x1A] movs r0, 0x2 ands r0, r1 @@ -1685,7 +1685,7 @@ _081239E4: _08123A28: ldr r4, =gUnknown_0203A144 ldr r0, [r4] - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader ldrb r1, [r1, 0x14] strh r1, [r0] cmp r1, 0x57 @@ -2811,7 +2811,7 @@ sub_8124288: @ 8124288 str r0, [sp, 0x10] ldr r0, =SpriteCallbackDummy str r0, [sp, 0x14] - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x14] bl sub_8124668 cmp r0, 0 diff --git a/asm/rom4.s b/asm/rom4.s index 10d607683..b6a5c0fa0 100644 --- a/asm/rom4.s +++ b/asm/rom4.s @@ -278,7 +278,7 @@ CopyFieldObjectTemplatesToSav1: @ 8084894 ldr r2, =0x05000180 mov r0, sp bl CpuSet - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r2, [r0, 0x4] ldr r0, [r2, 0x4] ldr r1, [r5] @@ -302,7 +302,7 @@ CopyFieldObjectTemplatesToSav1: @ 8084894 @ void CopyFieldObjectTemplateCoordsToSav1() CopyFieldObjectTemplateCoordsToSav1: @ 80848E0 push {lr} - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r1, [r0, 0x4] ldr r0, =gSaveBlock1Ptr ldr r0, [r0] @@ -393,7 +393,7 @@ _08084978: mapdata_load_assets_to_gpu_and_full_redraw: @ 8084980 push {r4,lr} bl move_tilemap_camera_to_upper_left_corner - ldr r4, =gUnknown_02037318 + ldr r4, =gMapHeader ldr r0, [r4] bl copy_map_tileset1_tileset2_to_vram ldr r0, [r4] @@ -571,7 +571,7 @@ warp1_get_mapheader: @ 8084AA8 set_current_map_header_from_sav1_save_old_name: @ 8084ACC push {r4-r6,lr} ldr r1, =gUnknown_020322FC - ldr r4, =gUnknown_02037318 + ldr r4, =gMapHeader ldrb r0, [r4, 0x14] strh r0, [r1] ldr r5, =gSaveBlock1Ptr @@ -607,7 +607,7 @@ set_current_map_header_from_sav1_save_old_name: @ 8084ACC thumb_func_start set_current_map_header_from_sav1 set_current_map_header_from_sav1: @ 8084B1C push {r4,r5,lr} - ldr r4, =gUnknown_02037318 + ldr r4, =gMapHeader ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r0, 0x4 @@ -646,7 +646,7 @@ update_camera_pos_from_warpid: @ 8084B5C adds r4, r0, 0 cmp r1, 0 blt _08084B94 - ldr r3, =gUnknown_02037318 + ldr r3, =gMapHeader ldr r0, [r3, 0x4] ldrb r5, [r0, 0x1] cmp r1, r5 @@ -680,7 +680,7 @@ _08084B94: b _08084BCC _08084BB0: ldr r3, [r4] - ldr r2, =gUnknown_02037318 + ldr r2, =gMapHeader ldr r0, [r2] ldr r0, [r0] lsrs r1, r0, 31 @@ -1232,7 +1232,7 @@ sub_8084FC0: @ 8084FC0 push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0, 0xC] ldr r3, [r0] ldr r1, [r0, 0x4] @@ -1366,7 +1366,7 @@ mliX_load_map: @ 8085098 str r3, [sp] adds r2, r3, 0 bl warp1_set - ldr r4, =gUnknown_02037318 + ldr r4, =gMapHeader ldrb r0, [r4, 0x14] cmp r0, 0x3A beq _080850C8 @@ -1407,7 +1407,7 @@ _08085116: bl sub_80AEE20 bl wild_encounter_reset_coro_args bl mapheader_run_script_with_tag_x5 - ldr r2, =gUnknown_02037318 + ldr r2, =gMapHeader ldrb r0, [r2, 0x14] cmp r0, 0x3A bne _0808514C @@ -1436,7 +1436,7 @@ mli0_load_map: @ 8085160 ands r0, r1 cmp r0, 0 bne _080851A2 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrh r1, [r0, 0x12] ldr r0, =0x00000169 cmp r1, r0 @@ -1453,7 +1453,7 @@ _08085190: _0808519E: bl CopyFieldObjectTemplatesToSav1 _080851A2: - ldr r4, =gUnknown_02037318 + ldr r4, =gMapHeader ldrb r0, [r4, 0x17] bl is_light_level_1_2_3_5_or_6 lsls r0, 24 @@ -1802,7 +1802,7 @@ cur_mapdata_block_role_at_screen_center_acc_to_sav1: @ 8085450 thumb_func_start sav1_map_is_biking_allowed sav1_map_is_biking_allowed: @ 8085474 push {lr} - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r1, [r0, 0x1A] movs r0, 0x1 ands r0, r1 @@ -1821,7 +1821,7 @@ _0808548E: thumb_func_start update_sav1_flash_used_on_map update_sav1_flash_used_on_map: @ 8085494 push {lr} - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r1, [r0, 0x15] cmp r1, 0 bne _080854B0 @@ -1897,7 +1897,7 @@ sub_8085524: @ 8085524 ldr r1, [r1] strh r0, [r1, 0x32] bl get_mapdata_header - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader str r0, [r1] pop {r0} bx r0 @@ -3471,7 +3471,7 @@ sub_80861E8: @ 80861E8 thumb_func_start sub_8086204 sub_8086204: @ 8086204 push {lr} - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r1, [r0, 0x1A] movs r0, 0xF8 ands r0, r1 @@ -3507,7 +3507,7 @@ _0808624A: bl GetCurrentTrainerHillMapId lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrh r1, [r0, 0x12] ldr r0, =0x00000169 cmp r1, r0 @@ -3528,7 +3528,7 @@ _0808628A: bl sub_809757C bl sub_809E7B0 bl sub_8084788 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrh r1, [r0, 0x12] ldr r0, =0x00000169 cmp r1, r0 @@ -3739,13 +3739,13 @@ _08086492: bl move_tilemap_camera_to_upper_left_corner b _08086506 _08086498: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] bl copy_map_tileset1_to_vram b _08086506 .pool _080864A8: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] bl copy_map_tileset2_to_vram b _08086506 @@ -3756,7 +3756,7 @@ _080864B8: lsrs r0, 24 cmp r0, 0x1 beq _08086512 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] bl apply_map_tileset1_tileset2_palette b _08086506 @@ -3858,13 +3858,13 @@ _080865A6: bl move_tilemap_camera_to_upper_left_corner b _08086622 _080865AC: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] bl copy_map_tileset1_to_vram b _08086622 .pool _080865BC: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] bl copy_map_tileset2_to_vram b _08086622 @@ -3875,7 +3875,7 @@ _080865CC: lsrs r0, 24 cmp r0, 0x1 beq _0808662E - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] bl apply_map_tileset1_tileset2_palette b _08086622 @@ -3887,7 +3887,7 @@ _080865EE: bl cur_mapheader_run_tileset_funcs_after_some_cpuset b _08086622 _080865F4: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r1, [r0, 0x1A] movs r0, 0xF8 ands r0, r1 @@ -4027,13 +4027,13 @@ _0808671E: bl move_tilemap_camera_to_upper_left_corner b _08086792 _08086724: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] bl copy_map_tileset1_to_vram b _08086792 .pool _08086734: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] bl copy_map_tileset2_to_vram b _08086792 @@ -4044,7 +4044,7 @@ _08086744: lsrs r0, 24 cmp r0, 0x1 beq _080867A8 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] bl apply_map_tileset1_tileset2_palette b _08086792 diff --git a/asm/rom6.s b/asm/rom6.s index a0f23d720..ef2d27110 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -88,7 +88,7 @@ task08_080C9820: @ 813549C cmp r0, 0 beq _0813551E _081354D2: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] cmp r0, 0x5 bne _08135504 @@ -3346,7 +3346,7 @@ sub_81370FC: @ 81370FC b _08137152 .pool _08137134: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x15] cmp r0, 0x1 bne _08137170 @@ -5213,7 +5213,7 @@ is_tile_that_overrides_player_control: @ 81380D8 lsls r0, 24 cmp r0, 0 beq _0813810A - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] cmp r0, 0x1 blt _0813810A @@ -5250,7 +5250,7 @@ sub_8138120: @ 8138120 lsls r0, 24 cmp r0, 0 beq _08138152 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] cmp r0, 0x1 blt _08138152 @@ -5287,7 +5287,7 @@ sub_8138168: @ 8138168 lsls r0, 24 cmp r0, 0 beq _0813819A - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] cmp r0, 0x1 blt _0813819A @@ -5324,7 +5324,7 @@ sub_81381B0: @ 81381B0 lsls r0, 24 cmp r0, 0 beq _081381E2 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] cmp r0, 0x1 blt _081381E2 @@ -5361,7 +5361,7 @@ sub_81381F8: @ 81381F8 lsls r0, 24 cmp r0, 0 beq _0813822A - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] cmp r0, 0x1 blt _0813822A diff --git a/asm/rom_80C6FA0.s b/asm/rom_80C6FA0.s index 17399a49d..04d4c29f4 100644 --- a/asm/rom_80C6FA0.s +++ b/asm/rom_80C6FA0.s @@ -26359,7 +26359,7 @@ ShowMapNamePopUpWindow: @ 80D49B0 lsls r0, 24 cmp r0, 0 beq _080D4A08 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrh r1, [r0, 0x12] movs r0, 0xBD lsls r0, 1 @@ -26391,7 +26391,7 @@ _080D49F2: _080D4A08: mov r4, sp adds r4, 0xF - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r1, [r0, 0x14] adds r0, r4, 0 movs r2, 0 @@ -26610,7 +26610,7 @@ LoadMapNamePopUpWindowBg: @ 80D4BE0 bl GetMapNamePopUpWindowId lsls r0, 24 lsrs r5, r0, 24 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r1, [r0, 0x14] cmp r1, 0x57 bls _080D4C0A @@ -26647,7 +26647,7 @@ _080D4C0A: bl CallWindowFunction adds r0, r5, 0 bl PutWindowTilemap - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x16] cmp r0, 0xE bne _080D4C6C diff --git a/asm/rom_818CFC8.s b/asm/rom_818CFC8.s index 37e0802be..b78cbccdd 100644 --- a/asm/rom_818CFC8.s +++ b/asm/rom_818CFC8.s @@ -16833,7 +16833,7 @@ _08195ED2: thumb_func_start sub_8195ED8 sub_8195ED8: @ 8195ED8 push {r4,lr} - ldr r4, =gUnknown_02037318 + ldr r4, =gMapHeader ldrb r0, [r4, 0x17] bl is_light_level_1_2_3_or_6 lsls r0, 24 @@ -16857,7 +16857,7 @@ sub_8195ED8: @ 8195ED8 cmp r0, 0 beq _08195F30 _08195F0E: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x14] cmp r0, 0x38 bne _08195F38 @@ -16932,7 +16932,7 @@ sub_8195F68: @ 8195F68 bl sub_8196844 adds r4, r0, 0 bl sub_819672C - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader lsls r0, 16 lsrs r0, 16 ldrb r1, [r1, 0x14] @@ -17938,7 +17938,7 @@ sub_81967AC: @ 81967AC beq _081967EC adds r0, r5, 0 bl sub_819672C - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader lsls r0, 16 lsrs r0, 16 ldrb r1, [r1, 0x14] @@ -25773,7 +25773,7 @@ _0819A3D6: b _0819A43C .pool _0819A404: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r1, [r0, 0x14] adds r0, r5, 0 bl sub_81245DC @@ -49364,7 +49364,7 @@ _081A6BEE: sub_81A6BF4: @ 81A6BF4 push {lr} movs r2, 0 - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader ldr r3, =0xfffffea5 adds r0, r3, 0 ldrh r1, [r1, 0x12] @@ -51948,7 +51948,7 @@ sub_81A8090: @ 81A8090 InBattlePike: @ 81A80A8 push {lr} movs r2, 0 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrh r1, [r0, 0x12] ldr r3, =0xfffffea1 adds r0, r1, r3 @@ -55513,7 +55513,7 @@ sub_81A9E28: @ 81A9E28 thumb_func_start InBattlePyramid InBattlePyramid: @ 81A9E40 push {lr} - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrh r1, [r0, 0x12] ldr r0, =0x00000169 cmp r1, r0 @@ -55539,7 +55539,7 @@ _081A9E66: sub_81A9E6C: @ 81A9E6C push {lr} movs r2, 0 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrh r1, [r0, 0x12] ldr r0, =0x00000169 cmp r1, r0 @@ -77653,7 +77653,7 @@ _081B5880: thumb_func_start sub_81B5884 sub_81B5884: @ 81B5884 push {lr} - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] bl is_light_level_1_2_3_or_6 lsls r0, 24 @@ -85842,7 +85842,7 @@ sub_81B9E88: @ 81B9E88 sub_81B9E94: @ 81B9E94 push {lr} movs r2, 0 - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader ldrb r0, [r1, 0x14] cmp r0, 0x8 bne _081B9EB2 diff --git a/asm/rom_81BE66C.s b/asm/rom_81BE66C.s index c1b5f9142..ad83d6402 100644 --- a/asm/rom_81BE66C.s +++ b/asm/rom_81BE66C.s @@ -21069,7 +21069,7 @@ sub_81C98D4: @ 81C98D4 _081C98D8: adds r0, r4, 0 bl sub_81CB0C8 - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader lsls r0, 24 lsrs r0, 24 ldrb r1, [r1, 0x14] @@ -23981,7 +23981,7 @@ sub_81CAF78: @ 81CAF78 adds r4, r0, 0 movs r0, 0 strb r0, [r6] - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] bl is_light_level_1_2_3_or_6 lsls r0, 24 @@ -24309,7 +24309,7 @@ sub_81CB1D0: @ 81CB1D0 bne _081CB218 adds r0, r1, 0 bl sub_81CAEA4 - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader lsls r0, 16 lsrs r0, 16 ldrb r1, [r1, 0x14] @@ -24330,7 +24330,7 @@ _081CB218: bne _081CB258 adds r0, r1, 0 bl sub_81CAEA4 - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader lsls r0, 16 lsrs r0, 16 ldrb r1, [r1, 0x14] @@ -26717,7 +26717,7 @@ _081CC4F0: b _081CC51A .pool _081CC4F8: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x14] bl sub_8124668 str r0, [r4, 0xC] @@ -44923,7 +44923,7 @@ _081D54EE: thumb_func_start sub_81D5520 sub_81D5520: @ 81D5520 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x12] adds r0, 0x61 lsls r0, 24 @@ -45134,7 +45134,7 @@ sub_81D56B0: @ 81D56B0 ldr r0, =0x00000eec bl AllocZeroed str r0, [r4] - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader ldrb r1, [r1, 0x12] adds r1, 0x61 strb r1, [r0] @@ -46192,7 +46192,7 @@ _081D5FE6: lsls r0, 24 lsrs r0, 24 mov r9, r0 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] ldr r2, [r0, 0xC] ldr r1, =gUnknown_03005DC0 @@ -46261,7 +46261,7 @@ _081D605E: thumb_func_start InTrainerHill InTrainerHill: @ 81D6074 push {lr} - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader ldr r2, =0xfffffe61 adds r0, r2, 0 ldrh r1, [r1, 0x12] @@ -46283,7 +46283,7 @@ _081D608C: @ u8 GetCurrentTrainerHillMapId() GetCurrentTrainerHillMapId: @ 81D609C push {lr} - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrh r2, [r0, 0x12] ldr r0, =0x0000019f cmp r2, r0 @@ -46335,7 +46335,7 @@ _081D60F8: thumb_func_start sub_81D6100 sub_81D6100: @ 81D6100 push {lr} - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrh r1, [r0, 0x12] ldr r0, =0x000001a3 movs r2, 0 @@ -46369,7 +46369,7 @@ sub_81D6134: @ 81D6134 lsrs r0, 24 cmp r0, 0x1 bne _081D614C - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0, 0x4] ldr r0, [r0, 0x8] adds r0, 0x8 diff --git a/asm/script.s b/asm/script.s index e625b5625..b55b27eca 100644 --- a/asm/script.s +++ b/asm/script.s @@ -442,7 +442,7 @@ mapheader_get_tagged_pointer: @ 8098F88 push {lr} lsls r0, 24 lsrs r1, r0, 24 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r2, [r0, 0x8] cmp r2, 0 beq _08098F9C diff --git a/asm/secret_base.s b/asm/secret_base.s index 06ccaa9da..99e15fe0f 100644 --- a/asm/secret_base.s +++ b/asm/secret_base.s @@ -251,7 +251,7 @@ sub_80E8CB0: @ 80E8CB0 lsls r2, 16 lsrs r2, 16 mov r10, r2 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] mov r8, r0 movs r0, 0 @@ -502,7 +502,7 @@ _080E8E32: movs r1, 0x2 strb r1, [r0] ldr r0, =0x00004026 - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader ldrb r1, [r1, 0x14] bl VarSet pop {r3} @@ -727,7 +727,7 @@ sub_80E9068: @ 80E9068 thumb_func_start sub_80E909C sub_80E909C: @ 80E909C push {lr} - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x17] cmp r0, 0x9 bne _080E90C0 @@ -1104,7 +1104,7 @@ _080E93BE: b _080E9554 _080E93D4: movs r5, 0 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r3, [r0, 0x4] ldrb r4, [r3] mov r9, r0 @@ -1294,7 +1294,7 @@ _080E9562: sub_80E9578: @ 80E9578 push {r4-r6,lr} movs r5, 0 - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader ldr r0, [r1, 0x4] ldrb r0, [r0] cmp r5, r0 @@ -1936,7 +1936,7 @@ sub_80E9AC0: @ 80E9AC0 thumb_func_start sub_80E9AD0 sub_80E9AD0: @ 80E9AD0 push {r4-r7,lr} - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r4, [r0, 0x4] movs r6, 0 b _080E9B62 diff --git a/asm/shop.s b/asm/shop.s index 1e86ea645..d8074a41e 100644 --- a/asm/shop.s +++ b/asm/shop.s @@ -1293,7 +1293,7 @@ BuyMenuDrawMapBg: @ 80E0584 mov r5, r8 push {r5-r7} sub sp, 0x4 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] mov r9, r0 mov r4, sp diff --git a/asm/tileset.s b/asm/tileset.s index 97c1e78c2..0605c7621 100644 --- a/asm/tileset.s +++ b/asm/tileset.s @@ -182,7 +182,7 @@ cur_mapheader_run_tileset1_func: @ 80A0AA8 ldr r1, =gUnknown_03000F40 movs r0, 0 str r0, [r1] - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] ldr r0, [r0, 0x10] cmp r0, 0 @@ -208,7 +208,7 @@ cur_mapheader_run_tileset2_func: @ 80A0AE4 ldr r1, =gUnknown_03000F44 movs r0, 0 str r0, [r1] - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldr r0, [r0] ldr r0, [r0, 0x14] cmp r0, 0 diff --git a/asm/tv.s b/asm/tv.s index ccf232dd0..7c80b85a6 100644 --- a/asm/tv.s +++ b/asm/tv.s @@ -742,7 +742,7 @@ GabbyAndTyAfterInterview: @ 80EC448 orrs r0, r2 strb r0, [r1] ldr r0, [r5] - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader ldrb r1, [r1, 0x14] ldr r2, =0x00002bac adds r0, r2 @@ -1221,7 +1221,7 @@ _080EC8CA: strh r0, [r4, 0x4] ldrh r0, [r1, 0x6] strh r0, [r4, 0x8] - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x14] strb r0, [r4, 0xA] pop {r4} @@ -1309,7 +1309,7 @@ _080EC940: mov r1, r8 ldrb r0, [r1] strb r0, [r4, 0x11] - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x14] strb r0, [r4, 0x12] adds r0, r4, 0 @@ -2311,7 +2311,7 @@ SaveRecordedItemPurchasesForTVShow: @ 80ED238 movs r0, 0x16 strb r0, [r5] strb r4, [r5, 0x1] - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x14] strb r0, [r5, 0x12] movs r4, 0 @@ -3333,7 +3333,7 @@ _080EDBCC: bl sub_80C0844 _080EDBD2: strh r0, [r4, 0x2] - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader ldrb r0, [r1, 0x14] strb r0, [r4, 0x7] ldrh r0, [r1, 0x12] @@ -3491,7 +3491,7 @@ sub_80EDCE8: @ 80EDCE8 ldr r0, =gSpecialVar_0x8005 ldrh r0, [r0] strh r0, [r4, 0x2] - ldr r1, =gUnknown_02037318 + ldr r1, =gMapHeader ldrb r0, [r1, 0x14] strb r0, [r4, 0x4] ldrh r0, [r1, 0x12] @@ -4049,7 +4049,7 @@ _080EE1B6: strb r1, [r4, 0x1] movs r5, 0 ldr r6, =gUnknown_03005D10 - ldr r3, =gUnknown_02037318 + ldr r3, =gMapHeader ldr r7, =gSaveBlock2Ptr adds r2, r6, 0 adds r2, 0x36 diff --git a/asm/weather.s b/asm/weather.s index 7bb483e4a..769d77c6b 100644 --- a/asm/weather.s +++ b/asm/weather.s @@ -7544,7 +7544,7 @@ sub_80AEDBC: @ 80AEDBC ldr r0, [r4] adds r0, 0x2E ldrb r5, [r0] - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrb r0, [r0, 0x16] bl sub_80AEEE8 ldr r1, [r4] diff --git a/asm/wild_encounter.s b/asm/wild_encounter.s index c2e57a3f3..79222e3a9 100644 --- a/asm/wild_encounter.s +++ b/asm/wild_encounter.s @@ -46,7 +46,7 @@ sub_80B48C4: @ 80B48C4 ldrh r5, [r2] cmp r5, r9 bhi _080B496E - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader mov r10, r0 _080B4906: movs r4, 0 @@ -956,7 +956,7 @@ _080B4FBA: cmp r0, 0 beq _080B5000 _080B4FE0: - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrh r1, [r0, 0x12] movs r0, 0xB3 lsls r0, 1 @@ -1191,7 +1191,7 @@ _080B519A: lsrs r0, 24 cmp r0, 0x1 bne _080B51E8 - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrh r1, [r0, 0x12] ldr r0, =0x00000169 cmp r1, r0 @@ -1319,7 +1319,7 @@ _080B52A6: ldr r0, =0x0000ffff cmp r5, r0 bne _080B539C - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrh r1, [r0, 0x12] movs r0, 0xB3 lsls r0, 1 @@ -1658,7 +1658,7 @@ sub_80B5578: @ 80B5578 ldr r0, =0x0000ffff cmp r4, r0 bne _080B562C - ldr r0, =gUnknown_02037318 + ldr r0, =gMapHeader ldrh r1, [r0, 0x12] movs r0, 0xB3 lsls r0, 1 diff --git a/include/rom_818CFC8.h b/include/rom_818CFC8.h new file mode 100644 index 000000000..9b6f96893 --- /dev/null +++ b/include/rom_818CFC8.h @@ -0,0 +1,11 @@ +// +// Created by Scott Norton on 9/6/17. +// + +#ifndef POKEEMERALD_ROM_818CFC8_H +#define POKEEMERALD_ROM_818CFC8_H + +bool8 InBattlePyramid(void); +u8 sub_81AAA40(void); + +#endif //POKEEMERALD_ROM_818CFC8_H diff --git a/include/rom_81BE66C.h b/include/rom_81BE66C.h new file mode 100644 index 000000000..d92c500d6 --- /dev/null +++ b/include/rom_81BE66C.h @@ -0,0 +1,10 @@ +// +// Created by Scott Norton on 9/6/17. +// + +#ifndef POKEEMERALD_ROM_81BE66C_H +#define POKEEMERALD_ROM_81BE66C_H + +bool32 InTrainerHill(void); + +#endif //POKEEMERALD_ROM_81BE66C_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index b97d5c0dc..b33cf0669 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4,6 +4,9 @@ #include "sprite.h" #include "rom4.h" #include "field_player_avatar.h" +#include "event_data.h" +#include "rom_818CFC8.h" +#include "rom_81BE66C.h" #include "field_map_obj.h" // Static struct declarations @@ -352,3 +355,35 @@ __attribute__((naked)) u8 InitFieldObjectStateFromTemplate(struct MapObjectTempl ".pool"); } #endif + +u8 unref_sub_808D77C(u8 localId) +{ + u8 i; + u8 nObjects; + struct MapObjectTemplate *template; + + if (gMapHeader.events != NULL) + { + if (InBattlePyramid()) + { + nObjects = sub_81AAA40(); + } + else if (InTrainerHill()) + { + nObjects = 2; + } + else + { + nObjects = gMapHeader.events->mapObjectCount; + } + for (i = 0; i < nObjects; i ++) + { + template = &gSaveBlock1Ptr->mapObjectTemplates[i]; + if (template->localId == localId && !FlagGet(template->flagId)) + { + return InitFieldObjectStateFromTemplate(template, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup); + } + } + } + return ARRAY_COUNT(gMapObjects); +} diff --git a/sym_ewram.txt b/sym_ewram.txt index 71b6ffeae..df8f32f6a 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -746,7 +746,7 @@ gUnknown_02032308: @ 2032308 gUnknown_02032318: @ 2032318 .space 0x5000 -gUnknown_02037318: @ 2037318 +gMapHeader: @ 2037318 .space 0x1C gUnknown_02037334: @ 2037334 From e0601236483588158e08dd83da3d6cb8ee491420 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 6 Sep 2017 17:25:20 -0400 Subject: [PATCH 012/342] GetAvailableFieldObjectSlot --- asm/field_map_obj.s | 90 --------------------------------------------- src/field_map_obj.c | 23 ++++++++++++ 2 files changed, 23 insertions(+), 90 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 31b522467..f9366b2e9 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,96 +5,6 @@ .text - thumb_func_start GetAvailableFieldObjectSlot -@ bool8 GetAvailableFieldObjectSlot(u16 localId, u8 mapId, u8 mapGroupId, u8 *fieldObjectId) -GetAvailableFieldObjectSlot: @ 808D810 - push {r4-r7,lr} - mov r12, r3 - lsls r0, 16 - lsrs r6, r0, 16 - lsls r1, 24 - lsrs r5, r1, 24 - lsls r2, 24 - lsrs r4, r2, 24 - movs r2, 0 - ldr r1, =gMapObjects - ldrb r0, [r1] - lsls r0, 31 - adds r7, r1, 0 - cmp r0, 0 - beq _0808D864 - adds r3, r1, 0 -_0808D830: - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - adds r1, r0, r3 - ldrb r0, [r1, 0x8] - cmp r0, r6 - bne _0808D84A - ldrb r0, [r1, 0x9] - cmp r0, r5 - bne _0808D84A - ldrb r0, [r1, 0xA] - cmp r0, r4 - beq _0808D868 -_0808D84A: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0xF - bhi _0808D868 - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - adds r0, r7 - ldrb r0, [r0] - lsls r0, 31 - cmp r0, 0 - bne _0808D830 -_0808D864: - cmp r2, 0xF - bls _0808D870 -_0808D868: - movs r0, 0x1 - b _0808D8A4 - .pool -_0808D870: - mov r0, r12 - strb r2, [r0] - ldr r1, =gMapObjects -_0808D876: - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - adds r3, r0, r1 - ldrb r0, [r3] - lsls r0, 31 - cmp r0, 0 - beq _0808D898 - ldrb r0, [r3, 0x8] - cmp r0, r6 - bne _0808D898 - ldrb r0, [r3, 0x9] - cmp r0, r5 - bne _0808D898 - ldrb r0, [r3, 0xA] - cmp r0, r4 - beq _0808D868 -_0808D898: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0xF - bls _0808D876 - movs r0, 0 -_0808D8A4: - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end GetAvailableFieldObjectSlot - thumb_func_start RemoveFieldObject @ void RemoveFieldObject(npc_state *fieldObject) RemoveFieldObject: @ 808D8B0 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index b33cf0669..28f001b5d 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -387,3 +387,26 @@ u8 unref_sub_808D77C(u8 localId) } return ARRAY_COUNT(gMapObjects); } + +bool8 GetAvailableFieldObjectSlot(u16 localId, u8 mapNum, u8 mapGroup, u8 *result) +{ + u8 i = 0; + + for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + { + if (!gMapObjects[i].active) + break; + if (gMapObjects[i].localId == localId && gMapObjects[i].mapNum == mapNum && gMapObjects[i].mapGroup == mapGroup) + return TRUE; + } + if (i >= ARRAY_COUNT(gMapObjects)) + return TRUE; + *result = i; + do + { + if (gMapObjects[i].active && gMapObjects[i].localId == localId && gMapObjects[i].mapNum == mapNum && gMapObjects[i].mapGroup == mapGroup) + return TRUE; + i ++; + } while (i < ARRAY_COUNT(gMapObjects)); + return FALSE; +} From a6269f2f0f94d93b834aae8e15a3dea6789b30c0 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 6 Sep 2017 17:29:13 -0400 Subject: [PATCH 013/342] Static --- src/field_map_obj.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 28f001b5d..0a2f6dbea 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -16,9 +16,9 @@ // Static ROM declarations /*static*/ void sub_808D450(void); -/*static*/ u8 GetFieldObjectIdByLocalId(u8); -/*static*/ u8 GetFieldObjectIdByLocalIdAndMapInternal(u8, u8, u8); -/*static*/ bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *); +static u8 GetFieldObjectIdByLocalId(u8); +static u8 GetFieldObjectIdByLocalIdAndMapInternal(u8, u8, u8); +static bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *); /*static*/ void FieldObjectHandleDynamicGraphicsId(struct MapObject *); // ROM data @@ -28,7 +28,7 @@ const u8 gUnknown_0850557C[0x51]; // Code -/*static*/ void npc_clear_ids_and_state(struct MapObject *mapObject) +static void npc_clear_ids_and_state(struct MapObject *mapObject) { *mapObject = (struct MapObject){}; mapObject->localId = 0xFF; @@ -119,7 +119,7 @@ u8 GetFieldObjectIdByXY(s16 x, s16 y) return i; } -u8 GetFieldObjectIdByLocalIdAndMapInternal(u8 localId, u8 mapId, u8 mapGroupId) +static u8 GetFieldObjectIdByLocalIdAndMapInternal(u8 localId, u8 mapId, u8 mapGroupId) { u8 i; @@ -388,7 +388,12 @@ u8 unref_sub_808D77C(u8 localId) return ARRAY_COUNT(gMapObjects); } -bool8 GetAvailableFieldObjectSlot(u16 localId, u8 mapNum, u8 mapGroup, u8 *result) +static bool8 GetAvailableFieldObjectSlot(u16 localId, u8 mapNum, u8 mapGroup, u8 *result) +// Looks for an empty slot. +// Returns FALSE and the location of the available slot +// in *result. +// If no slots are available, or if the object is already +// loaded, returns TRUE. { u8 i = 0; From 942400ddbf15ca8ac9d56279e971dd6f4e1c800d Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 6 Sep 2017 17:55:36 -0400 Subject: [PATCH 014/342] RemoveFieldObject --- asm/field_map_obj.s | 14 -------------- src/field_map_obj.c | 7 +++++++ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index f9366b2e9..5be423e0a 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,20 +5,6 @@ .text - thumb_func_start RemoveFieldObject -@ void RemoveFieldObject(npc_state *fieldObject) -RemoveFieldObject: @ 808D8B0 - push {lr} - ldrb r2, [r0] - movs r1, 0x2 - negs r1, r1 - ands r1, r2 - strb r1, [r0] - bl RemoveFieldObjectInternal - pop {r0} - bx r0 - thumb_func_end RemoveFieldObject - thumb_func_start RemoveFieldObjectByLocalIdAndMap @ void RemoveFieldObjectByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapBank) RemoveFieldObjectByLocalIdAndMap: @ 808D8C4 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 0a2f6dbea..7420895ab 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -20,6 +20,7 @@ static u8 GetFieldObjectIdByLocalId(u8); static u8 GetFieldObjectIdByLocalIdAndMapInternal(u8, u8, u8); static bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *); /*static*/ void FieldObjectHandleDynamicGraphicsId(struct MapObject *); +/*static*/ void RemoveFieldObjectInternal (struct MapObject *); // ROM data @@ -415,3 +416,9 @@ static bool8 GetAvailableFieldObjectSlot(u16 localId, u8 mapNum, u8 mapGroup, u8 } while (i < ARRAY_COUNT(gMapObjects)); return FALSE; } + +void RemoveFieldObject(struct MapObject *mapObject) +{ + mapObject->active = FALSE; + RemoveFieldObjectInternal(mapObject); +} From 398186d7c42b009218ff1fea17f7b474e1c6389e Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 6 Sep 2017 18:12:44 -0400 Subject: [PATCH 015/342] RemoveFieldObjectInternal --- asm/field_map_obj.s | 74 --------------------------------------------- src/field_map_obj.c | 20 ++++++++++++ 2 files changed, 20 insertions(+), 74 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 5be423e0a..436350899 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,80 +5,6 @@ .text - thumb_func_start RemoveFieldObjectByLocalIdAndMap -@ void RemoveFieldObjectByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapBank) -RemoveFieldObjectByLocalIdAndMap: @ 808D8C4 - push {lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _0808D902 - mov r0, sp - ldrb r0, [r0] - bl GetFieldObjectFlagIdByFieldObjectId - lsls r0, 16 - lsrs r0, 16 - bl FlagSet - mov r0, sp - ldrb r1, [r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - ldr r1, =gMapObjects - adds r0, r1 - bl RemoveFieldObject -_0808D902: - add sp, 0x4 - pop {r0} - bx r0 - .pool - thumb_func_end RemoveFieldObjectByLocalIdAndMap - - thumb_func_start RemoveFieldObjectInternal -@ void RemoveFieldObjectInternal(npc_state *fieldObject) -RemoveFieldObjectInternal: @ 808D90C - push {r4,lr} - sub sp, 0x8 - adds r4, r0, 0 - ldrb r0, [r4, 0x5] - bl GetFieldObjectGraphicsInfo - ldrh r2, [r0, 0x6] - ldr r1, =0xffff0000 - ldr r0, [sp, 0x4] - ands r0, r1 - orrs r0, r2 - str r0, [sp, 0x4] - ldr r2, =gSprites - ldrb r1, [r4, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r1, r2, 0 - adds r1, 0xC - adds r0, r1 - mov r1, sp - str r1, [r0] - ldrb r1, [r4, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - bl DestroySprite - add sp, 0x8 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end RemoveFieldObjectInternal - thumb_func_start sub_808D958 sub_808D958: @ 808D958 push {r4,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 7420895ab..52f798f9b 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -21,6 +21,8 @@ static u8 GetFieldObjectIdByLocalIdAndMapInternal(u8, u8, u8); static bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *); /*static*/ void FieldObjectHandleDynamicGraphicsId(struct MapObject *); /*static*/ void RemoveFieldObjectInternal (struct MapObject *); +/*static*/ u16 GetFieldObjectFlagIdByFieldObjectId(u8); +/*static*/ struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8); // ROM data @@ -422,3 +424,21 @@ void RemoveFieldObject(struct MapObject *mapObject) mapObject->active = FALSE; RemoveFieldObjectInternal(mapObject); } + +void RemoveFieldObjectByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) +{ + u8 index; + if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &index)) + { + FlagSet(GetFieldObjectFlagIdByFieldObjectId(index)); + RemoveFieldObject(&gMapObjects[index]); + } +} + +void RemoveFieldObjectInternal(struct MapObject *mapObject) +{ + struct SpriteFrameImage image; + image.size = GetFieldObjectGraphicsInfo(mapObject->graphicsId)->size; + gSprites[mapObject->spriteId].images = ℑ + DestroySprite(&gSprites[mapObject->spriteId]); +} From e0216d60459fac28bf6759159a4c4cfa007bf6c2 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 6 Sep 2017 18:26:37 -0400 Subject: [PATCH 016/342] unref_sub_808D958 --- asm/bike.s | 92 ++++++++++----------- asm/field_camera.s | 2 +- asm/field_control_avatar.s | 4 +- asm/field_effect.s | 106 ++++++++++++------------ asm/field_effect_helpers.s | 2 +- asm/field_map_obj.s | 33 +------- asm/field_player_avatar.s | 164 ++++++++++++++++++------------------- asm/fldeff_80F9BCC.s | 22 ++--- asm/fldeff_emotion.s | 2 +- asm/link.s | 4 +- asm/map_obj_8097404.s | 6 +- asm/map_obj_lock.s | 2 +- asm/porthole.s | 2 +- asm/rom4.s | 2 +- asm/rom6.s | 8 +- asm/rom_80C6FA0.s | 2 +- asm/rom_81BE66C.s | 24 +++--- asm/secret_base.s | 2 +- asm/trainer_see.s | 6 +- include/field_map_obj.h | 6 ++ src/field_map_obj.c | 25 ++++-- sym_ewram.txt | 2 +- 22 files changed, 255 insertions(+), 263 deletions(-) diff --git a/asm/bike.s b/asm/bike.s index 22d52c0fa..7ea4a4598 100644 --- a/asm/bike.s +++ b/asm/bike.s @@ -15,7 +15,7 @@ MovePlayerOnBike: @ 8119164 lsrs r4, r1, 16 lsls r2, 16 lsrs r2, 16 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0] movs r0, 0x2 ands r0, r1 @@ -72,7 +72,7 @@ CheckMovementInputMachBike: @ 81191CC cmp r1, 0 bne _081191F4 strb r0, [r4] - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r0, [r2, 0xB] cmp r0, 0 bne _08119208 @@ -81,7 +81,7 @@ CheckMovementInputMachBike: @ 81191CC b _0811921C .pool _081191F4: - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar cmp r1, r3 beq _08119218 ldrb r0, [r2, 0x2] @@ -126,7 +126,7 @@ sub_8119238: @ 8119238 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -161,7 +161,7 @@ sub_8119280: @ 8119280 lsls r0, 24 lsrs r5, r0, 24 adds r7, r5, 0 - ldr r6, =gUnknown_02037590 + ldr r6, =gPlayerAvatar ldrb r1, [r6, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -255,7 +255,7 @@ sub_8119344: @ 8119344 lsls r0, 24 lsrs r5, r0, 24 adds r7, r5, 0 - ldr r6, =gUnknown_02037590 + ldr r6, =gPlayerAvatar ldrb r0, [r6, 0xB] cmp r0, 0 beq _0811935A @@ -352,7 +352,7 @@ CheckMovementInputAcroBike: @ 8119400 lsls r2, 16 lsrs r2, 16 ldr r4, =gUnknown_0859749C - ldr r3, =gUnknown_02037590 + ldr r3, =gPlayerAvatar ldrb r3, [r3, 0x8] lsls r3, 2 adds r3, r4 @@ -377,7 +377,7 @@ CheckMovementInputAcroBikeNormal: @ 811942C bl player_get_direction_upper_nybble lsls r0, 24 lsrs r3, r0, 24 - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar movs r0, 0 strb r0, [r2, 0xA] ldrb r1, [r4] @@ -417,11 +417,11 @@ _0811946C: b _081194C0 _0811948A: ldrb r0, [r4] - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar cmp r0, r3 beq _081194BC _08119492: - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x2] adds r2, r0, 0 cmp r1, 0x2 @@ -453,7 +453,7 @@ _081194C0: CheckMovementInputAcroBikeChangingDirection: @ 81194C8 push {r4-r6,lr} adds r5, r0, 0 - ldr r4, =gUnknown_02037590 + ldr r4, =gPlayerAvatar ldrb r0, [r4, 0x9] strb r0, [r5] ldrb r0, [r4, 0xA] @@ -520,7 +520,7 @@ CheckMovementInputAcroBikeStandingWheelie: @ 8119540 bl player_get_direction_upper_nybble lsls r0, 24 lsrs r6, r0, 24 - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar ldrb r1, [r5, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -553,7 +553,7 @@ _08119594: adds r0, 0x1 strb r0, [r5, 0xA] _0811959A: - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar ldrb r0, [r1, 0xA] cmp r0, 0x27 bls _081195B4 @@ -608,7 +608,7 @@ CheckMovementInputAcroBikeBunnyHop: @ 81195E0 lsls r0, 24 lsrs r5, r0, 24 adds r2, r5, 0 - ldr r4, =gUnknown_02037590 + ldr r4, =gPlayerAvatar ldrb r1, [r4, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -661,7 +661,7 @@ _08119668: movs r0, 0x6 b _08119676 _0811966E: - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0x2 strb r0, [r1, 0x2] movs r0, 0x7 @@ -693,7 +693,7 @@ CheckMovementInputAcroBikeMovingWheelie: @ 8119688 lsls r0, 24 lsrs r5, r0, 24 adds r2, r5, 0 - ldr r4, =gUnknown_02037590 + ldr r4, =gPlayerAvatar ldrb r1, [r4, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -732,7 +732,7 @@ _081196F6: movs r0, 0x4 b _08119750 _081196FC: - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0x2 strb r0, [r1, 0x2] movs r0, 0xC @@ -770,7 +770,7 @@ _08119736: movs r0, 0x5 b _08119750 _08119748: - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0x2 strb r0, [r1, 0x2] movs r0, 0xA @@ -797,7 +797,7 @@ CheckMovementInputAcroBikeUnknownMode5: @ 8119764 lsrs r4, 16 lsls r5, 16 lsrs r5, 16 - ldr r6, =gUnknown_02037590 + ldr r6, =gPlayerAvatar ldrb r1, [r6, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -836,7 +836,7 @@ CheckMovementInputAcroBikeUnknownMode6: @ 81197C0 lsrs r1, 16 lsls r2, 16 lsrs r2, 16 - ldr r4, =gUnknown_02037590 + ldr r4, =gPlayerAvatar movs r3, 0 strb r3, [r4, 0x8] bl CheckMovementInputAcroBike @@ -863,7 +863,7 @@ sub_81197F4: @ 81197F4 push {r4,r5,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -893,7 +893,7 @@ sub_8119830: @ 8119830 lsls r0, 24 lsrs r5, r0, 24 adds r6, r5, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -961,7 +961,7 @@ sub_81198C0: @ 81198C0 push {r4,r5,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -990,7 +990,7 @@ sub_81198FC: @ 81198FC push {r4,r5,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -1019,7 +1019,7 @@ sub_8119938: @ 8119938 push {r4,r5,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -1048,7 +1048,7 @@ sub_8119974: @ 8119974 push {r4,r5,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -1077,7 +1077,7 @@ sub_81199B0: @ 81199B0 push {r4,r5,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -1156,7 +1156,7 @@ _08119A50: bl sub_81197F4 b _08119A84 _08119A58: - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -1198,7 +1198,7 @@ sub_8119AA4: @ 8119AA4 lsls r0, 24 lsrs r4, r0, 24 adds r6, r4, 0 - ldr r7, =gUnknown_02037590 + ldr r7, =gPlayerAvatar ldrb r1, [r7, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -1267,7 +1267,7 @@ sub_8119B34: @ 8119B34 lsls r0, 24 lsrs r4, r0, 24 adds r6, r4, 0 - ldr r7, =gUnknown_02037590 + ldr r7, =gPlayerAvatar ldrb r1, [r7, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -1336,7 +1336,7 @@ sub_8119BC4: @ 8119BC4 lsls r0, 24 lsrs r4, r0, 24 adds r6, r4, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -1396,7 +1396,7 @@ sub_8119C3C: @ 8119C3C lsrs r3, r0, 16 lsls r1, 16 lsrs r2, r1, 16 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0] movs r0, 0x4 ands r0, r1 @@ -1421,7 +1421,7 @@ sub_8119C64: @ 8119C64 bl sub_8119DF8 lsls r0, 24 lsrs r2, r0, 24 - ldr r4, =gUnknown_02037590 + ldr r4, =gPlayerAvatar ldr r0, [r4, 0xC] movs r1, 0xF ands r0, r1 @@ -1443,7 +1443,7 @@ _08119C9A: movs r0, 0xF adds r2, r5, 0 ands r2, r0 - ldr r4, =gUnknown_02037590 + ldr r4, =gPlayerAvatar ldr r0, [r4, 0x10] movs r1, 0xF ands r0, r1 @@ -1532,7 +1532,7 @@ sub_8119D30: @ 8119D30 _08119D36: ldr r0, =gUnknown_085974C0 adds r4, r5, r0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldr r1, [r0, 0xC] ldr r2, [r0, 0x10] ldr r0, [r4, 0x8] @@ -1570,7 +1570,7 @@ _08119D7A: sub_8119D80: @ 8119D80 push {r4,lr} lsls r0, 24 - ldr r3, =gUnknown_02037590 + ldr r3, =gPlayerAvatar ldr r2, [r3, 0xC] lsls r2, 4 movs r1, 0xF0 @@ -1604,7 +1604,7 @@ _08119D9C: sub_8119DBC: @ 8119DBC push {r4,lr} lsls r0, 24 - ldr r3, =gUnknown_02037590 + ldr r3, =gPlayerAvatar ldr r2, [r3, 0x10] lsls r2, 4 movs r1, 0xF0 @@ -1681,7 +1681,7 @@ sub_8119E38: @ 8119E38 adds r6, r0, 0 lsls r6, 24 lsrs r6, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -1922,7 +1922,7 @@ _08119FF2: sub_8119FF8: @ 8119FF8 push {r4,lr} sub sp, 0x4 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0] movs r0, 0x18 ands r0, r1 @@ -1966,7 +1966,7 @@ player_should_look_direction_be_enforced_upon_movement: @ 811A044 cmp r0, 0 beq _0811A078 ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -1996,7 +1996,7 @@ GetOnOffBike: @ 811A080 ldr r1, =gUnknown_02037348 movs r0, 0 strb r0, [r1] - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0] movs r0, 0x6 ands r0, r1 @@ -2026,7 +2026,7 @@ _0811A0C4: thumb_func_start sub_811A0D0 sub_811A0D0: @ 811A0D0 push {lr} - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar movs r3, 0 strb r3, [r2, 0x8] strb r3, [r2, 0x9] @@ -2064,7 +2064,7 @@ _0811A0FA: sub_811A114: @ 811A114 lsls r0, 24 lsrs r0, 24 - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar strb r0, [r2, 0xA] lsrs r1, r0, 1 adds r0, r1 @@ -2075,7 +2075,7 @@ sub_811A114: @ 811A114 thumb_func_start sub_811A128 sub_811A128: @ 811A128 - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0 strb r0, [r1, 0xA] strb r0, [r1, 0xB] @@ -2091,7 +2091,7 @@ sub_811A138: @ 811A138 mov r0, sp movs r2, 0x6 bl memcpy - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r1, [r2] movs r0, 0x2 ands r0, r1 @@ -2130,7 +2130,7 @@ _0811A182: sub_811A188: @ 811A188 push {r4,r5,lr} sub sp, 0x4 - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar ldrb r1, [r5] movs r0, 0x4 ands r0, r1 diff --git a/asm/field_camera.s b/asm/field_camera.s index cead2954c..35359f444 100644 --- a/asm/field_camera.s +++ b/asm/field_camera.s @@ -1082,7 +1082,7 @@ CameraPanningCB_PanAhead: @ 808A360 b _0808A3FC .pool _0808A374: - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x3] cmp r0, 0x1 bne _0808A394 diff --git a/asm/field_control_avatar.s b/asm/field_control_avatar.s index 85009cc5b..3b1052473 100644 --- a/asm/field_control_avatar.s +++ b/asm/field_control_avatar.s @@ -44,7 +44,7 @@ process_overworld_input: @ 809BF08 lsls r2, 16 lsrs r2, 16 mov r8, r2 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r6, [r0, 0x3] ldrb r0, [r0, 0x2] mov r9, r0 @@ -1368,7 +1368,7 @@ _0809CA04: bl sub_80B215C bl happiness_algorithm_step bl sub_81D4998 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0] movs r0, 0x40 ands r0, r1 diff --git a/asm/field_effect.s b/asm/field_effect.s index b073103f3..03789eada 100644 --- a/asm/field_effect.s +++ b/asm/field_effect.s @@ -2033,7 +2033,7 @@ mapldr_08084390: @ 80B6AA4 movs r1, 0 bl CreateTask ldr r4, =gMapObjects - ldr r3, =gUnknown_02037590 + ldr r3, =gPlayerAvatar ldrb r1, [r3, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -2163,7 +2163,7 @@ sub_80B6BCC: @ 80B6BCC mov r5, r8 push {r5,r6} mov r9, r0 - ldr r6, =gUnknown_02037590 + ldr r6, =gPlayerAvatar ldrb r0, [r6, 0x5] lsls r5, r0, 3 adds r5, r0 @@ -2256,7 +2256,7 @@ _080B6C88: sub_80B6C90: @ 80B6C90 push {r4-r6,lr} adds r5, r0, 0 - ldr r6, =gUnknown_02037590 + ldr r6, =gPlayerAvatar ldrb r0, [r6, 0x4] lsls r2, r0, 4 adds r2, r0 @@ -2309,7 +2309,7 @@ sub_80B6C90: @ 80B6C90 sub_80B6D04: @ 80B6D04 push {r4-r6,lr} adds r4, r0, 0 - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r1, [r2, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -2454,7 +2454,7 @@ _080B6E0E: thumb_func_start sub_80B6E18 sub_80B6E18: @ 80B6E18 push {lr} - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0 strb r0, [r1, 0x6] bl script_env_2_disable @@ -2551,7 +2551,7 @@ sub_80B6EC0: @ 80B6EC0 sub_80B6EE0: @ 80B6EE0 push {r4,r5,lr} adds r5, r0, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -2664,7 +2664,7 @@ sub_80B6FA8: @ 80B6FA8 sub_80B6FB8: @ 80B6FB8 push {r4,r5,lr} adds r5, r0, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x4] lsls r4, r0, 4 adds r4, r0 @@ -2702,7 +2702,7 @@ _080B6FF6: sub_80B7004: @ 80B7004 push {r4,r5,lr} adds r5, r0, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x4] lsls r4, r0, 4 adds r4, r0 @@ -2828,7 +2828,7 @@ sub_80B7114: @ 80B7114 sub sp, 0x4 adds r5, r0, 0 bl CameraObjectReset2 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -2883,7 +2883,7 @@ _080B717E: sub_80B7190: @ 80B7190 push {r4,r5,lr} adds r5, r0, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x4] lsls r4, r0, 4 adds r4, r0 @@ -2914,7 +2914,7 @@ sub_80B7190: @ 80B7190 sub_80B71D0: @ 80B71D0 push {r4,r5,lr} adds r4, r0, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x4] lsls r0, r1, 4 adds r0, r1 @@ -2962,7 +2962,7 @@ _080B721E: sub_80B7230: @ 80B7230 push {r4,r5,lr} adds r5, r0, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x4] lsls r4, r0, 4 adds r4, r0 @@ -2993,7 +2993,7 @@ sub_80B7230: @ 80B7230 sub_80B7270: @ 80B7270 push {r4,r5,lr} adds r4, r0, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x4] lsls r0, r1, 4 adds r0, r1 @@ -3063,7 +3063,7 @@ _080B72EE: thumb_func_start sub_80B72F4 sub_80B72F4: @ 80B72F4 push {r4,lr} - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -3138,7 +3138,7 @@ _080B7396: ldrsh r2, [r4, r0] lsls r2, 2 adds r2, r5 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r1, r0, 3 adds r1, r0 @@ -3162,7 +3162,7 @@ sub_80B73D0: @ 80B73D0 push {r4,lr} adds r4, r0, 0 bl script_env_2_enable - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0x1 strb r0, [r1, 0x6] ldrh r0, [r4, 0x8] @@ -3268,7 +3268,7 @@ _080B748E: cmp r4, 0 bne _080B74C4 bl script_env_2_disable - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar strb r4, [r0, 0x6] ldr r0, =sub_80B7384 bl FindTaskIdByFunc @@ -3347,7 +3347,7 @@ _080B751E: thumb_func_start dive_1_lock dive_1_lock: @ 80B7544 - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar movs r1, 0x1 strb r1, [r2, 0x6] ldrh r1, [r0, 0x8] @@ -3393,7 +3393,7 @@ dive_3_unknown: @ 80B7580 cmp r0, 0 bne _080B75C4 ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -3437,7 +3437,7 @@ sub_80B75F0: @ 80B75F0 lsrs r0, 24 ldr r6, =gUnknown_0855C438 ldr r2, =gTasks - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar lsls r1, r0, 2 adds r1, r0 lsls r1, 3 @@ -3480,7 +3480,7 @@ sub_80B764C: @ 80B764C bl CameraObjectReset2 movs r0, 0 bl SetCameraPanningCallback - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar movs r2, 0x1 strb r2, [r0, 0x6] ldrb r0, [r5, 0x3] @@ -3767,7 +3767,7 @@ sub_80B7890: @ 80B7890 lsrs r0, 24 ldr r6, =gUnknown_0855C450 ldr r2, =gTasks - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar lsls r1, r0, 2 adds r1, r0 lsls r1, 3 @@ -3808,7 +3808,7 @@ sub_80B78EC: @ 80B78EC adds r4, r1, 0 bl CameraObjectReset2 bl player_bitmagic - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0x1 strb r0, [r1, 0x6] ldrb r0, [r4, 0x1] @@ -3915,7 +3915,7 @@ sub_80B79BC: @ 80B79BC lsls r0, 24 cmp r0, 0 beq _080B79E6 - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0 strb r0, [r1, 0x6] bl script_env_2_disable @@ -4016,7 +4016,7 @@ sub_80B7A8C: @ 80B7A8C lsrs r0, 24 ldr r6, =gUnknown_0855C460 ldr r2, =gTasks - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar lsls r1, r0, 2 adds r1, r0 lsls r1, 3 @@ -4057,7 +4057,7 @@ sub_80B7AE8: @ 80B7AE8 adds r4, r1, 0 bl player_bitmagic bl CameraObjectReset2 - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0x1 strb r0, [r1, 0x6] ldrb r0, [r4, 0x3] @@ -4359,7 +4359,7 @@ sub_80B7D34: @ 80B7D34 bl music_something bl sub_80AF0B4 _080B7D60: - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -4466,7 +4466,7 @@ mapldr_080859D4: @ 80B7E48 movs r0, 0 str r0, [r1] ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -4537,7 +4537,7 @@ sub_80B7EE8: @ 80B7EE8 mov r0, sp movs r2, 0x5 bl memcpy - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -4695,7 +4695,7 @@ sub_80B8034: @ 80B8034 mov r0, sp movs r2, 0x5 bl memcpy - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -4765,7 +4765,7 @@ sub_80B80C4: @ 80B80C4 mov r0, sp movs r2, 0x5 bl memcpy - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r1, [r2, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -4911,7 +4911,7 @@ mapldr_08085D88: @ 80B8200 movs r0, 0 str r0, [r1] ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -4961,7 +4961,7 @@ sub_80B8280: @ 80B8280 lsls r0, 24 cmp r0, 0 beq _080B82F6 - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar ldrb r0, [r5, 0x4] lsls r2, r0, 4 adds r2, r0 @@ -5027,7 +5027,7 @@ sub_80B830C: @ 80B830C mov r0, sp movs r2, 0x5 bl memcpy - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r1, [r2, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -5156,7 +5156,7 @@ sub_80B8410: @ 80B8410 mov r0, sp movs r2, 0x5 bl memcpy - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -6335,7 +6335,7 @@ sub_80B8DB4: @ 80B8DB4 adds r4, r0, 0 bl script_env_2_enable bl player_bitmagic - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar movs r0, 0x1 strb r0, [r5, 0x6] movs r0, 0x8 @@ -6374,7 +6374,7 @@ sub_80B8DB4: @ 80B8DB4 sub_80B8E14: @ 80B8E14 push {r4,r5,lr} adds r5, r0, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -6410,7 +6410,7 @@ _080B8E50: sub_80B8E60: @ 80B8E60 push {r4,lr} adds r4, r0, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -6449,7 +6449,7 @@ sub_80B8EA8: @ 80B8EA8 lsls r0, 24 cmp r0, 0 bne _080B8F12 - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar ldrb r0, [r5, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -6498,7 +6498,7 @@ _080B8F12: thumb_func_start sub_80B8F24 sub_80B8F24: @ 80B8F24 push {r4,r5,lr} - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar ldrb r1, [r5, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -6829,7 +6829,7 @@ sub_80B91D4: @ 80B91D4 sub_80B9204: @ 80B9204 push {r4-r6,lr} adds r5, r0, 0 - ldr r6, =gUnknown_02037590 + ldr r6, =gPlayerAvatar ldrb r1, [r6, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -6870,7 +6870,7 @@ _080B924C: sub_80B925C: @ 80B925C push {r4,lr} adds r4, r0, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -6906,7 +6906,7 @@ sub_80B92A0: @ 80B92A0 lsls r0, 24 cmp r0, 0 bne _080B92E8 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -6955,7 +6955,7 @@ sub_80B92F8: @ 80B92F8 strh r0, [r4, 0xC] movs r0, 0x1 bl SetPlayerAvatarTransitionFlags - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -6975,7 +6975,7 @@ _080B932C: sub_80B933C: @ 80B933C push {r4,lr} adds r4, r0, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -7023,7 +7023,7 @@ sub_80B9390: @ 80B9390 asrs r0, 16 cmp r0, 0x7 ble _080B9406 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -7087,7 +7087,7 @@ sub_80B9418: @ 80B9418 asrs r0, 16 cmp r0, 0x9 ble _080B9464 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -7582,7 +7582,7 @@ sub_80B97D4: @ 80B97D4 sub_80B9804: @ 80B9804 push {r4-r6,lr} adds r5, r0, 0 - ldr r6, =gUnknown_02037590 + ldr r6, =gPlayerAvatar ldrb r1, [r6, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -7673,7 +7673,7 @@ sub_80B98B8: @ 80B98B8 cmp r0, 0 bne _080B9910 _080B98D0: - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -7720,7 +7720,7 @@ sub_80B9924: @ 80B9924 mov r0, sp movs r2, 0x24 bl memcpy - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x4] lsls r1, r0, 4 adds r1, r0 @@ -7760,7 +7760,7 @@ sub_80B9978: @ 80B9978 lsls r0, 24 cmp r0, 0 beq _080B99DC - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r5, r0, 3 adds r5, r0 @@ -7810,7 +7810,7 @@ _080B99DC: sub_80B99F0: @ 80B99F0 push {r4,lr} adds r4, r0, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -7872,7 +7872,7 @@ sub_80B9A60: @ 80B9A60 lsls r0, 16 cmp r0, 0 bne _080B9ACA - ldr r6, =gUnknown_02037590 + ldr r6, =gPlayerAvatar ldrb r1, [r6, 0x5] lsls r0, r1, 3 adds r0, r1 diff --git a/asm/field_effect_helpers.s b/asm/field_effect_helpers.s index 69c67672c..cef6287ff 100644 --- a/asm/field_effect_helpers.s +++ b/asm/field_effect_helpers.s @@ -2766,7 +2766,7 @@ sub_81554AC: @ 81554AC ldrsh r1, [r4, r2] bl CurrentMapDrawMetatileAt ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 436350899..ff3aff842 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,33 +5,6 @@ .text - thumb_func_start sub_808D958 -sub_808D958: @ 808D958 - push {r4,lr} - movs r4, 0 -_0808D95C: - ldr r0, =gUnknown_02037590 - ldrb r0, [r0, 0x5] - cmp r4, r0 - beq _0808D972 - lsls r0, r4, 3 - adds r0, r4 - lsls r0, 2 - ldr r1, =gMapObjects - adds r0, r1 - bl RemoveFieldObject -_0808D972: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0xF - bls _0808D95C - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_808D958 - thumb_func_start SpawnFieldObjectInternal @ u8 SpawnFieldObjectInternal(struct FieldObjectTemplate *romFieldObject, struct objtemplate *template, int mapId, int mapGroupId, u16 movingCameraOffsetX, u16 movingCameraOffsetY) SpawnFieldObjectInternal: @ 808D98C @@ -1351,7 +1324,7 @@ SetPlayerAvatarFieldObjectIdAndObjectId: @ 808E3C4 push {r4,r5,lr} lsls r0, 24 lsrs r0, 24 - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar strb r0, [r5, 0x5] strb r1, [r5, 0x4] ldr r1, =gMapObjects @@ -9413,7 +9386,7 @@ sub_8091EC0: @ 8091EC0 adds r6, r0, 0 adds r7, r1, 0 ldr r2, =gMapObjects - ldr r3, =gUnknown_02037590 + ldr r3, =gPlayerAvatar ldrb r1, [r3, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -10168,7 +10141,7 @@ mss_08062EA4: @ 80924D8 adds r6, r0, 0 adds r7, r1, 0 ldr r2, =gMapObjects - ldr r3, =gUnknown_02037590 + ldr r3, =gPlayerAvatar ldrb r1, [r3, 0x5] lsls r0, r1, 3 adds r0, r1 diff --git a/asm/field_player_avatar.s b/asm/field_player_avatar.s index 9a5cc323c..e9fee369a 100644 --- a/asm/field_player_avatar.s +++ b/asm/field_player_avatar.s @@ -43,7 +43,7 @@ player_step: @ 808A9C0 lsrs r7, r1, 16 lsls r2, 16 lsrs r6, r2, 16 - ldr r4, =gUnknown_02037590 + ldr r4, =gPlayerAvatar ldrb r1, [r4, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -153,7 +153,7 @@ npc_clear_strange_bits: @ 808AA9C adds r2, 0x2 ands r1, r2 strb r1, [r0, 0x1] - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r1, [r2] movs r0, 0x7F ands r0, r1 @@ -172,7 +172,7 @@ MovePlayerAvatarUsingKeypadInput: @ 808AAC0 lsrs r4, r1, 16 lsls r2, 16 lsrs r2, 16 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0] movs r0, 0x6 ands r0, r1 @@ -197,7 +197,7 @@ _0808AAF0: @ void PlayerAllowForcedMovementIfMovingSameDirection() PlayerAllowForcedMovementIfMovingSameDirection: @ 808AAF8 push {lr} - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r0, [r2, 0x2] cmp r0, 0x2 bne _0808AB0A @@ -234,7 +234,7 @@ TryDoMetatileBehaviorForcedMovment: @ 808AB14 @ u8 GetForcedMovementByMetatileBehavior() GetForcedMovementByMetatileBehavior: @ 808AB38 push {r4-r6,lr} - ldr r3, =gUnknown_02037590 + ldr r3, =gPlayerAvatar ldrb r1, [r3] movs r0, 0x20 ands r0, r1 @@ -280,7 +280,7 @@ _0808AB8C: thumb_func_start ForcedMovement_None ForcedMovement_None: @ 808AB94 push {r4,lr} - ldr r4, =gUnknown_02037590 + ldr r4, =gPlayerAvatar ldrb r1, [r4] movs r0, 0x40 ands r0, r1 @@ -325,7 +325,7 @@ DoForcedMovement: @ 808ABE0 mov r9, r1 lsls r0, 24 lsrs r5, r0, 24 - ldr r6, =gUnknown_02037590 + ldr r6, =gPlayerAvatar adds r0, r5, 0 bl CheckForPlayerAvatarCollision lsls r0, 24 @@ -381,7 +381,7 @@ _0808AC48: DoForcedMovementInCurrentDirection: @ 808AC58 push {lr} adds r1, r0, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r2, [r0, 0x5] lsls r0, r2, 3 adds r0, r2 @@ -523,7 +523,7 @@ ForcedMovement_Slide: @ 808AD60 push {r4,lr} lsls r0, 24 lsrs r0, 24 - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r3, [r2, 0x5] lsls r2, r3, 3 adds r2, r3 @@ -618,7 +618,7 @@ ForcedMovement_0xBC: @ 808AE04 thumb_func_start ForcedMovement_MuddySlope ForcedMovement_MuddySlope: @ 808AE10 push {r4,lr} - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -691,7 +691,7 @@ CheckMovementInputNotOnBike: @ 808AE98 lsrs r4, r0, 24 cmp r4, 0 bne _0808AEB0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar strb r4, [r0, 0x2] movs r0, 0 b _0808AED2 @@ -702,7 +702,7 @@ _0808AEB0: lsrs r0, 24 cmp r4, r0 beq _0808AECC - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar ldrb r0, [r1, 0x2] cmp r0, 0x2 beq _0808AECC @@ -710,7 +710,7 @@ _0808AEB0: b _0808AED0 .pool _0808AECC: - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0x2 _0808AED0: strb r0, [r1, 0x2] @@ -784,7 +784,7 @@ _0808AF3C: bl PlayerNotOnBikeCollide b _0808AFB6 _0808AF4E: - ldr r4, =gUnknown_02037590 + ldr r4, =gPlayerAvatar ldrb r1, [r4] movs r0, 0x8 ands r0, r1 @@ -843,7 +843,7 @@ CheckForPlayerAvatarCollision: @ 808AFBC adds r6, r0, 0 lsls r6, 24 lsrs r6, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -894,7 +894,7 @@ sub_808B028: @ 808B028 adds r6, r0, 0 lsls r6, 24 lsrs r6, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -1102,7 +1102,7 @@ sub_808B1BC: @ 808B1BC lsrs r4, r1, 16 lsls r2, 24 lsrs r6, r2, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0] movs r0, 0x8 ands r0, r1 @@ -1285,7 +1285,7 @@ IsPlayerCollidingWithFarawayIslandMew: @ 808B324 sub sp, 0x4 lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar ldrb r2, [r1, 0x5] lsls r1, r2, 3 adds r1, r2 @@ -1369,7 +1369,7 @@ SetPlayerAvatarTransitionFlags: @ 808B3CC push {lr} lsls r0, 16 lsrs r0, 16 - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r1, [r2, 0x1] orrs r0, r1 strb r0, [r2, 0x1] @@ -1383,7 +1383,7 @@ SetPlayerAvatarTransitionFlags: @ 808B3CC @ void DoPlayerAvatarTransition() DoPlayerAvatarTransition: @ 808B3E8 push {r4,r5,lr} - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r4, [r0, 0x1] cmp r4, 0 beq _0808B428 @@ -1396,7 +1396,7 @@ _0808B3F4: ldr r0, =gUnknown_084974B8 lsls r2, r5, 2 adds r2, r0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -1412,7 +1412,7 @@ _0808B416: lsrs r4, 1 cmp r5, 0x7 bls _0808B3F4 - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0 strb r0, [r1, 0x1] _0808B428: @@ -1529,7 +1529,7 @@ PlayerAvatarTransition_Surfing: @ 808B4D8 movs r2, 0x12 ldrsh r0, [r4, r2] str r0, [r1, 0x4] - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] str r0, [r1, 0x8] movs r0, 0x8 @@ -1574,7 +1574,7 @@ PlayerAvatarTransition_Underwater: @ 808B534 thumb_func_start PlayerAvatarTransition_ReturnToField @ void PlayerAvatarTransition_ReturnToField(struct npc_state *fieldObject) PlayerAvatarTransition_ReturnToField: @ 808B568 - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r1, [r2] movs r0, 0x20 orrs r0, r1 @@ -1586,7 +1586,7 @@ PlayerAvatarTransition_ReturnToField: @ 808B568 thumb_func_start sub_808B578 sub_808B578: @ 808B578 push {r4,lr} - ldr r4, =gUnknown_02037590 + ldr r4, =gPlayerAvatar movs r0, 0 strb r0, [r4, 0x3] bl PlayerIsAnimActive @@ -1622,7 +1622,7 @@ _0808B5B6: player_is_anim_in_certain_ranges: @ 808B5BC push {lr} ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -1673,7 +1673,7 @@ sub_808B618: @ 808B618 lsls r0, 24 cmp r0, 0 beq _0808B634 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x2] cmp r0, 0x1 beq _0808B634 @@ -1691,7 +1691,7 @@ _0808B636: @ bool8 PlayerIsAnimActive() PlayerIsAnimActive: @ 808B63C push {lr} - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -1710,7 +1710,7 @@ PlayerIsAnimActive: @ 808B63C @ bool8 PlayerCheckIfAnimFinishedOrInactive() PlayerCheckIfAnimFinishedOrInactive: @ 808B660 push {lr} - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -1728,7 +1728,7 @@ PlayerCheckIfAnimFinishedOrInactive: @ 808B660 thumb_func_start player_set_x22 player_set_x22: @ 808B684 ldr r3, =gMapObjects - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar ldrb r2, [r1, 0x5] lsls r1, r2, 3 adds r1, r2 @@ -1743,7 +1743,7 @@ player_set_x22: @ 808B684 thumb_func_start player_get_x22 player_get_x22: @ 808B6A0 ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -1761,7 +1761,7 @@ sub_808B6BC: @ 808B6BC adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r2, [r0, 0x5] lsls r0, r2, 3 adds r0, r2 @@ -1788,7 +1788,7 @@ player_npc_set_state_and_x22_etc: @ 808B6E4 bne _0808B712 adds r0, r4, 0 bl player_set_x22 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -2002,7 +2002,7 @@ PlayerJumpLedge: @ 808B840 thumb_func_start sub_808B864 sub_808B864: @ 808B864 push {r4,lr} - ldr r4, =gUnknown_02037590 + ldr r4, =gPlayerAvatar ldrb r0, [r4, 0x3] cmp r0, 0x2 beq _0808B872 @@ -2220,7 +2220,7 @@ PlayCollisionSoundIfNotFacingWarp: @ 808B9EC lsls r0, 24 lsrs r4, r0, 24 ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -2276,7 +2276,7 @@ GetXYCoordsOneStepInFrontOfPlayer: @ 808BA68 adds r4, r0, 0 adds r5, r1, 0 ldr r3, =gMapObjects - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r1, [r2, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -2308,7 +2308,7 @@ GetXYCoordsOneStepInFrontOfPlayer: @ 808BA68 PlayerGetDestCoords: @ 808BAAC push {r4,r5,lr} ldr r5, =gMapObjects - ldr r4, =gUnknown_02037590 + ldr r4, =gPlayerAvatar ldrb r3, [r4, 0x5] lsls r2, r3, 3 adds r2, r3 @@ -2334,7 +2334,7 @@ plaer_get_pos_including_state_based_drift: @ 808BADC push {r4,r5,lr} adds r4, r0, 0 adds r5, r1, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -2466,7 +2466,7 @@ _0808BC30: @ u8 player_get_direction_lower_nybble() player_get_direction_lower_nybble: @ 808BC38 ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -2483,7 +2483,7 @@ player_get_direction_lower_nybble: @ 808BC38 @ u8 player_get_direction_upper_nybble() player_get_direction_upper_nybble: @ 808BC58 ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -2499,7 +2499,7 @@ player_get_direction_upper_nybble: @ 808BC58 @ u8 PlayerGetZCoord() PlayerGetZCoord: @ 808BC74 ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -2516,7 +2516,7 @@ sub_808BC90: @ 808BC90 push {lr} adds r3, r0, 0 adds r2, r1, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -2537,7 +2537,7 @@ sub_808BC90: @ 808BC90 thumb_func_start TestPlayerAvatarFlags @ u32 TestPlayerAvatarFlags(u32 mask) TestPlayerAvatarFlags: @ 808BCC0 - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar ldrb r1, [r1] ands r1, r0 adds r0, r1, 0 @@ -2547,7 +2547,7 @@ TestPlayerAvatarFlags: @ 808BCC0 thumb_func_start sub_808BCD0 sub_808BCD0: @ 808BCD0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0] bx lr .pool @@ -2556,7 +2556,7 @@ sub_808BCD0: @ 808BCD0 thumb_func_start GetPlayerAvatarObjectId @ u8 GetPlayerAvatarObjectId() GetPlayerAvatarObjectId: @ 808BCDC - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x4] bx lr .pool @@ -2573,7 +2573,7 @@ sub_808BCE8: @ 808BCE8 thumb_func_start sub_808BCF4 sub_808BCF4: @ 808BCF4 push {r4,lr} - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -2659,7 +2659,7 @@ GetPlayerAvatarGraphicsIdByStateId: @ 808BD8C push {lr} lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar ldrb r1, [r1, 0x7] bl GetPlayerAvatarGraphicsIdByStateIdAndGender lsls r0, 24 @@ -2804,7 +2804,7 @@ _0808BE70: IsPlayerFacingSurfableFishableWater: @ 808BE74 push {r4,r5,lr} sub sp, 0x4 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -2871,7 +2871,7 @@ _0808BEF6: @ void ClearPlayerAvatarInfo() ClearPlayerAvatarInfo: @ 808BF00 push {lr} - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar movs r1, 0 movs r2, 0x24 bl memset @@ -2885,7 +2885,7 @@ ClearPlayerAvatarInfo: @ 808BF00 SetPlayerAvatarStateMask: @ 808BF14 lsls r0, 24 lsrs r0, 24 - ldr r3, =gUnknown_02037590 + ldr r3, =gPlayerAvatar ldrb r2, [r3] movs r1, 0xE0 ands r1, r2 @@ -2937,7 +2937,7 @@ _0808BF64: @ u8 GetPlayerAvatarGraphicsIdByCurrentState() GetPlayerAvatarGraphicsIdByCurrentState: @ 808BF6C push {r4-r6,lr} - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r5, [r0] movs r2, 0 ldr r3, =gUnknown_0849750C @@ -2980,7 +2980,7 @@ SetPlayerAvatarExtraStateTransition: @ 808BFB0 lsrs r0, 24 lsls r4, 24 lsrs r4, 24 - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar ldrb r1, [r5, 0x7] bl GetPlayerAvatarStateTransitionByGraphicsId lsls r0, 24 @@ -3072,7 +3072,7 @@ InitPlayerAvatar: @ 808BFE0 mov r1, r9 bl FieldObjectTurn bl ClearPlayerAvatarInfo - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar strb r6, [r0, 0x2] strb r6, [r0, 0x3] strb r5, [r0, 0x5] @@ -3098,7 +3098,7 @@ sub_808C0A8: @ 808C0A8 lsls r0, 24 lsrs r4, r0, 24 ldr r6, =gMapObjects - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar ldrb r0, [r5, 0x5] lsls r1, r0, 3 adds r1, r0 @@ -3147,7 +3147,7 @@ _0808C100: thumb_func_start sub_808C114 sub_808C114: @ 808C114 push {r4,r5,lr} - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar ldrb r0, [r5, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -3181,7 +3181,7 @@ sub_808C15C: @ 808C15C adds r5, r0, 0 lsls r5, 24 lsrs r5, 24 - ldr r6, =gUnknown_02037590 + ldr r6, =gPlayerAvatar ldrb r0, [r6, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -3222,7 +3222,7 @@ sub_808C1B4: @ 808C1B4 adds r5, r0, 0 lsls r5, 24 lsrs r5, 24 - ldr r6, =gUnknown_02037590 + ldr r6, =gPlayerAvatar ldrb r0, [r6, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -3271,7 +3271,7 @@ sub_808C228: @ 808C228 adds r5, r0, 0 lsls r5, 24 lsrs r5, 24 - ldr r6, =gUnknown_02037590 + ldr r6, =gPlayerAvatar ldrb r0, [r6, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -3424,7 +3424,7 @@ _0808C360: ldrsh r3, [r4, r0] lsls r3, 2 adds r3, r6 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r1, r0, 3 adds r1, r0 @@ -3453,7 +3453,7 @@ sub_808C3A4: @ 808C3A4 push {r4,lr} adds r4, r0, 0 bl script_env_2_enable - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0x1 strb r0, [r1, 0x6] ldrh r0, [r4, 0x8] @@ -3571,7 +3571,7 @@ sub_808C484: @ 808C484 bl FieldObjectClearAnimIfSpecialAnimFinished adds r0, r5, 0 bl FieldObjectClearAnimIfSpecialAnimFinished - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0 strb r0, [r1, 0x6] bl script_env_2_disable @@ -3620,7 +3620,7 @@ _0808C50A: ldrsh r2, [r4, r0] lsls r2, 2 adds r2, r5 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r1, r0, 3 adds r1, r0 @@ -3644,7 +3644,7 @@ sub_808C544: @ 808C544 push {r4-r6,lr} adds r6, r0, 0 adds r4, r1, 0 - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar movs r0, 0x1 strb r0, [r5, 0x6] adds r0, r4, 0 @@ -3721,7 +3721,7 @@ _0808C5E2: ldrsh r2, [r4, r0] lsls r2, 2 adds r2, r5 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r1, r0, 3 adds r1, r0 @@ -3749,7 +3749,7 @@ sub_808C61C: @ 808C61C ldrb r1, [r1, 0x18] lsrs r1, 4 strh r1, [r0, 0xA] - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0x1 strb r0, [r1, 0x6] bl script_env_2_enable @@ -3873,7 +3873,7 @@ sub_808C6FC: @ 808C6FC adds r0, r5, 0 bl FieldObjectSetSpecialAnim bl script_env_2_disable - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0 strb r0, [r1, 0x6] ldr r0, =sub_808C5D0 @@ -3898,7 +3898,7 @@ sub_808C750: @ 808C750 bl script_env_2_enable bl sav1_reset_battle_music_maybe bl sub_8085898 - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r1, [r2] movs r0, 0xF7 ands r0, r1 @@ -3931,7 +3931,7 @@ taskFF_0805D1D4: @ 808C7A8 push {r4-r6,lr} lsls r0, 24 lsrs r6, r0, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -3978,7 +3978,7 @@ sub_808C814: @ 808C814 push {r4-r6,lr} lsls r0, 24 lsrs r5, r0, 24 - ldr r6, =gUnknown_02037590 + ldr r6, =gPlayerAvatar ldrb r1, [r6, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -4083,7 +4083,7 @@ fish0: @ 808C8F8 push {r4,lr} adds r4, r0, 0 bl script_env_2_enable - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0x1 strb r0, [r1, 0x6] ldrh r0, [r4, 0x8] @@ -4128,7 +4128,7 @@ fish1: @ 808C918 adds r1, r0 strh r1, [r5, 0x22] ldr r3, =gMapObjects - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r1, [r2, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -4366,7 +4366,7 @@ _0808CB30: _0808CB32: cmp r6, 0x1 bne _0808CB5C - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x4] lsls r4, r0, 4 adds r4, r0 @@ -4574,7 +4574,7 @@ _0808CCBC: lsrs r6, r0, 16 cmp r6, 0 bne _0808CD50 - ldr r7, =gUnknown_02037590 + ldr r7, =gPlayerAvatar ldrb r0, [r7, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -4633,7 +4633,7 @@ _0808CD50: cmp r0, 0 beq _0808CD80 _0808CD58: - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0 strb r0, [r1, 0x6] bl script_env_2_disable @@ -4664,7 +4664,7 @@ fishB: @ 808CD94 sub sp, 0x10 adds r5, r0, 0 bl sub_808CF78 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x4] lsls r4, r0, 4 adds r4, r0 @@ -4712,7 +4712,7 @@ fishC: @ 808CE04 sub sp, 0x10 adds r5, r0, 0 bl sub_808CF78 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x4] lsls r4, r0, 4 adds r4, r0 @@ -4777,7 +4777,7 @@ fishE: @ 808CE8C adds r6, r0, 0 bl sub_808CF78 ldr r7, =gSprites - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar ldrb r0, [r5, 0x4] lsls r1, r0, 4 adds r1, r0 @@ -4855,7 +4855,7 @@ fishF: @ 808CF2C lsrs r1, r0, 16 cmp r1, 0 bne _0808CF68 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar strb r1, [r0, 0x6] bl script_env_2_disable bl sub_809757C @@ -4879,7 +4879,7 @@ _0808CF68: thumb_func_start sub_808CF78 sub_808CF78: @ 808CF78 push {r4-r7,lr} - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x4] lsls r0, r1, 4 adds r0, r1 @@ -4978,7 +4978,7 @@ _0808D02A: movs r0, 0x8 strh r0, [r4, 0x26] _0808D03A: - ldr r3, =gUnknown_02037590 + ldr r3, =gPlayerAvatar ldrb r1, [r3] movs r0, 0x8 ands r0, r1 @@ -5032,7 +5032,7 @@ sub_808D094: @ 808D094 lsls r0, 24 lsrs r0, 24 adds r2, r0, 0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -5212,7 +5212,7 @@ sub_808D1FC: @ 808D1FC lsls r0, 24 lsrs r0, 24 mov r8, r0 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 diff --git a/asm/fldeff_80F9BCC.s b/asm/fldeff_80F9BCC.s index d5e620c77..960c8e244 100644 --- a/asm/fldeff_80F9BCC.s +++ b/asm/fldeff_80F9BCC.s @@ -480,7 +480,7 @@ sub_80F9F5C: @ 80F9F5C thumb_func_start sub_80F9F78 sub_80F9F78: @ 80F9F78 push {lr} - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0] movs r0, 0x6 ands r0, r1 @@ -692,7 +692,7 @@ sub_80FA13C: @ 80FA13C bl sub_80F9F78 ldr r0, =gUnknown_0858E600 ldr r3, =gSprites - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar ldrb r1, [r1, 0x4] lsls r2, r1, 4 adds r2, r1 @@ -849,7 +849,7 @@ _080FA274: bl sub_80F9F78 ldr r0, =gUnknown_0858E618 ldr r3, =gSprites - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar ldrb r1, [r1, 0x4] lsls r2, r1, 4 adds r2, r1 @@ -1000,7 +1000,7 @@ sub_80FA3AC: @ 80FA3AC bl sub_80F9F78 ldr r0, =gUnknown_0858E630 ldr r3, =gSprites - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar ldrb r1, [r1, 0x4] lsls r2, r1, 4 adds r2, r1 @@ -1723,7 +1723,7 @@ sub_80FA9D0: @ 80FA9D0 push {r4,lr} sub sp, 0x4 ldr r3, =gMapObjects - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r1, [r2, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -1835,7 +1835,7 @@ _080FAABC: _080FAAC6: ldr r0, =gUnknown_0858E68C ldr r3, =gSprites - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar ldrb r1, [r1, 0x4] lsls r2, r1, 4 adds r2, r1 @@ -1857,7 +1857,7 @@ _080FAAC6: _080FAAFC: ldr r0, =gUnknown_0858E68C ldr r3, =gSprites - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar ldrb r1, [r1, 0x4] lsls r2, r1, 4 adds r2, r1 @@ -1876,7 +1876,7 @@ _080FAAFC: _080FAB2C: ldr r0, =gUnknown_0858E68C ldr r3, =gSprites - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar ldrb r1, [r1, 0x4] lsls r2, r1, 4 adds r2, r1 @@ -1898,7 +1898,7 @@ _080FAB4C: _080FAB64: ldr r0, =gUnknown_0858E68C ldr r3, =gSprites - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar ldrb r1, [r1, 0x4] lsls r2, r1, 4 adds r2, r1 @@ -2307,7 +2307,7 @@ sub_80FAEF0: @ 80FAEF0 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -2357,7 +2357,7 @@ sub_80FAF64: @ 80FAF64 push {r4,r5,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 diff --git a/asm/fldeff_emotion.s b/asm/fldeff_emotion.s index f8b66da0d..dce540074 100644 --- a/asm/fldeff_emotion.s +++ b/asm/fldeff_emotion.s @@ -296,7 +296,7 @@ sub_80B4808: @ 80B4808 b _080B489E .pool _080B4870: - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 diff --git a/asm/link.s b/asm/link.s index 022922164..91d0e513b 100644 --- a/asm/link.s +++ b/asm/link.s @@ -27235,7 +27235,7 @@ sub_8017940: @ 8017940 ldrsh r0, [r4, r1] cmp r0, 0x8 bne _08017978 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x3] cmp r0, 0x2 beq _0801796E @@ -31141,7 +31141,7 @@ bgid_upload_textbox_1: @ 8019938 thumb_func_start is_walking_or_running is_walking_or_running: @ 8019958 push {lr} - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x3] cmp r0, 0x2 beq _08019966 diff --git a/asm/map_obj_8097404.s b/asm/map_obj_8097404.s index 50284a013..6bc74d0e5 100644 --- a/asm/map_obj_8097404.s +++ b/asm/map_obj_8097404.s @@ -97,7 +97,7 @@ _0809749A: lsls r0, 31 cmp r0, 0 beq _080974B8 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] cmp r4, r0 beq _080974B8 @@ -133,7 +133,7 @@ _080974DA: lsls r0, 31 cmp r0, 0 beq _080974FC - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] cmp r4, r0 beq _080974FC @@ -1771,7 +1771,7 @@ _08098082: lsls r0, 31 cmp r0, 0 beq _080980A8 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] cmp r4, r0 beq _080980A8 diff --git a/asm/map_obj_lock.s b/asm/map_obj_lock.s index 6cb8c508e..f02f8526b 100644 --- a/asm/map_obj_lock.s +++ b/asm/map_obj_lock.s @@ -8,7 +8,7 @@ thumb_func_start walkrun_is_standing_still walkrun_is_standing_still: @ 8098388 push {lr} - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x3] cmp r0, 0x1 beq _0809839C diff --git a/asm/porthole.s b/asm/porthole.s index a1bcff977..42ecc303a 100644 --- a/asm/porthole.s +++ b/asm/porthole.s @@ -232,7 +232,7 @@ sub_80FB768: @ 80FB768 push {lr} bl sub_80FB6EC ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 diff --git a/asm/rom4.s b/asm/rom4.s index b6a5c0fa0..bf16055e7 100644 --- a/asm/rom4.s +++ b/asm/rom4.s @@ -4396,7 +4396,7 @@ sub_8086A68: @ 8086A68 sub_8086A80: @ 8086A80 push {lr} ldr r2, =gMapObjects - ldr r3, =gUnknown_02037590 + ldr r3, =gPlayerAvatar ldrb r1, [r3, 0x5] lsls r0, r1, 3 adds r0, r1 diff --git a/asm/rom6.s b/asm/rom6.s index ef2d27110..4ccc2e05f 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -68,7 +68,7 @@ task08_080C9820: @ 813549C lsrs r5, r0, 24 adds r6, r5, 0 bl script_env_2_enable - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0x1 strb r0, [r1, 0x6] ldrb r1, [r1, 0x5] @@ -127,7 +127,7 @@ sub_813552C: @ 813552C push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -191,7 +191,7 @@ _081355B0: movs r0, 0x3 str r0, [r6, 0x8] _081355B8: - ldr r5, =gUnknown_02037590 + ldr r5, =gPlayerAvatar ldrb r0, [r5, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -244,7 +244,7 @@ sub_813561C: @ 813561C ldrh r0, [r0, 0x1A] orrs r1, r0 bl _call_via_r1 - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar movs r0, 0 strb r0, [r1, 0x6] adds r0, r4, 0 diff --git a/asm/rom_80C6FA0.s b/asm/rom_80C6FA0.s index 04d4c29f4..35215e80c 100644 --- a/asm/rom_80C6FA0.s +++ b/asm/rom_80C6FA0.s @@ -24601,7 +24601,7 @@ _080D3B64: movs r6, 0 ldr r5, =gSprites _080D3BA0: - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x4] lsls r0, r1, 4 adds r0, r1 diff --git a/asm/rom_81BE66C.s b/asm/rom_81BE66C.s index ad83d6402..7b3b695e3 100644 --- a/asm/rom_81BE66C.s +++ b/asm/rom_81BE66C.s @@ -236,7 +236,7 @@ sub_81BE808: @ 81BE808 ldrh r1, [r0, 0x26] adds r1, 0x4 strh r1, [r0, 0x26] - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r1, r0, 3 adds r1, r0 @@ -42695,7 +42695,7 @@ sub_81D427C: @ 81D427C ldr r2, =gMapObjects adds r5, r1, r2 ldr r4, =gUnknown_030012F8 - ldr r3, =gUnknown_02037590 + ldr r3, =gPlayerAvatar ldrb r1, [r3, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -42731,7 +42731,7 @@ _081D42CA: cmp r0, 0x3 bls _081D42CA ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -42789,7 +42789,7 @@ _081D4360: ldr r6, =gMapObjects mov r10, r6 _081D4368: - ldr r3, =gUnknown_02037590 + ldr r3, =gPlayerAvatar ldrb r1, [r3, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -42896,7 +42896,7 @@ _081D4410: beq _081D4446 b _081D45AA _081D4446: - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -42938,7 +42938,7 @@ _081D4488: cmp r0, 0 bne _081D4538 _081D449E: - ldr r2, =gUnknown_02037590 + ldr r2, =gPlayerAvatar ldrb r1, [r2, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -43042,7 +43042,7 @@ _081D4540: beq _081D4576 b _081D447C _081D4576: - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -43211,7 +43211,7 @@ _081D46D0: cmp r0, 0 bne _081D476E ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -43236,7 +43236,7 @@ _081D46D0: b _081D447C _081D470C: ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -43290,7 +43290,7 @@ _081D476E: cmp r0, 0 bne _081D480C ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -43315,7 +43315,7 @@ _081D476E: b _081D45AA _081D47AA: ldr r2, =gMapObjects - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -43386,7 +43386,7 @@ sub_81D4834: @ 81D4834 lsls r1, 16 lsrs r4, r1, 16 ldr r3, =gMapObjects - ldr r1, =gUnknown_02037590 + ldr r1, =gPlayerAvatar ldrb r2, [r1, 0x5] lsls r1, r2, 3 adds r1, r2 diff --git a/asm/secret_base.s b/asm/secret_base.s index 99e15fe0f..e67212350 100644 --- a/asm/secret_base.s +++ b/asm/secret_base.s @@ -751,7 +751,7 @@ sub_80E90C8: @ 80E90C8 push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 diff --git a/asm/trainer_see.s b/asm/trainer_see.s index 03c8d3320..1b3e33e98 100644 --- a/asm/trainer_see.s +++ b/asm/trainer_see.s @@ -882,7 +882,7 @@ _080B427A: bl sub_808F23C adds r0, r5, 0 bl sub_808F208 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 @@ -901,7 +901,7 @@ _080B427A: beq _080B4308 _080B42D2: bl sub_808BCE8 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r0, [r0, 0x5] lsls r4, r0, 3 adds r4, r0 @@ -936,7 +936,7 @@ sub_80B4318: @ 80B4318 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 - ldr r0, =gUnknown_02037590 + ldr r0, =gPlayerAvatar ldrb r1, [r0, 0x5] lsls r0, r1, 3 adds r0, r1 diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 3381d847b..6ca6b4103 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -5,6 +5,8 @@ // Exported RAM declarations + + // Exported ROM declarations void sub_808D438(void); @@ -12,6 +14,10 @@ u8 GetFieldObjectIdByLocalIdAndMap(u8, u8, u8); bool8 TryGetFieldObjectIdByLocalIdAndMap(u8, u8, u8, u8 *); u8 GetFieldObjectIdByXY(s16, s16); void FieldObjectSetDirection(struct MapObject *, u8); +u8 GetFieldObjectIdByXY(s16, s16); +u8 sub_808D4F4(void); +void RemoveFieldObject(struct MapObject *); +void RemoveFieldObjectByLocalIdAndMap(u8, u8, u8); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 52f798f9b..6e15d3e86 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -15,12 +15,12 @@ // Static ROM declarations -/*static*/ void sub_808D450(void); +void sub_808D450(void); static u8 GetFieldObjectIdByLocalId(u8); static u8 GetFieldObjectIdByLocalIdAndMapInternal(u8, u8, u8); static bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *); /*static*/ void FieldObjectHandleDynamicGraphicsId(struct MapObject *); -/*static*/ void RemoveFieldObjectInternal (struct MapObject *); +static void RemoveFieldObjectInternal (struct MapObject *); /*static*/ u16 GetFieldObjectFlagIdByFieldObjectId(u8); /*static*/ struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8); @@ -136,7 +136,7 @@ static u8 GetFieldObjectIdByLocalIdAndMapInternal(u8 localId, u8 mapId, u8 mapGr return ARRAY_COUNT(gMapObjects); } -u8 GetFieldObjectIdByLocalId(u8 localId) +static u8 GetFieldObjectIdByLocalId(u8 localId) { u8 i; @@ -152,7 +152,7 @@ u8 GetFieldObjectIdByLocalId(u8 localId) // This function has the same nonmatching quirk as in Ruby/Sapphire. #ifdef NONMATCHING -u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u8 mapId, u8 mapGroupId) +/*static*/ u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u8 mapId, u8 mapGroupId) { u8 slot; struct MapObject *mapObject; @@ -203,7 +203,7 @@ u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u8 mapId return slot; } #else -__attribute__((naked)) u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u8 mapId, u8 mapGroupId) +/*static*/ __attribute__((naked)) u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u8 mapId, u8 mapGroupId) { asm_unified("\tpush {r4-r7,lr}\n" "\tmov r7, r9\n" @@ -435,10 +435,23 @@ void RemoveFieldObjectByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) } } -void RemoveFieldObjectInternal(struct MapObject *mapObject) +static void RemoveFieldObjectInternal(struct MapObject *mapObject) { struct SpriteFrameImage image; image.size = GetFieldObjectGraphicsInfo(mapObject->graphicsId)->size; gSprites[mapObject->spriteId].images = ℑ DestroySprite(&gSprites[mapObject->spriteId]); } + +void unref_sub_808D958(void) +{ + u8 i; + + for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + { + if (i != gPlayerAvatar.mapObjectId) + { + RemoveFieldObject(&gMapObjects[i]); + } + } +} diff --git a/sym_ewram.txt b/sym_ewram.txt index df8f32f6a..bfe8faeb9 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -764,7 +764,7 @@ gUnknown_0203734C: @ 203734C gMapObjects: @ 2037350 .space 0x240 -gUnknown_02037590: @ 2037590 +gPlayerAvatar: @ 2037590 .space 0x14 gUnknown_020375A4: @ 20375A4 From b79e3af0a8aaed5528e57c965101aa4c0b59bad1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 6 Sep 2017 20:28:36 -0400 Subject: [PATCH 017/342] SpawnFieldObjectInternal --- asm/field_map_obj.s | 214 ---------------------------------- include/field_ground_effect.h | 15 +++ include/field_map_obj.h | 5 + src/field_map_obj.c | 63 ++++++++++ 4 files changed, 83 insertions(+), 214 deletions(-) create mode 100644 include/field_ground_effect.h diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index ff3aff842..f59a3a7c9 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,220 +5,6 @@ .text - thumb_func_start SpawnFieldObjectInternal -@ u8 SpawnFieldObjectInternal(struct FieldObjectTemplate *romFieldObject, struct objtemplate *template, int mapId, int mapGroupId, u16 movingCameraOffsetX, u16 movingCameraOffsetY) -SpawnFieldObjectInternal: @ 808D98C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - mov r8, r1 - adds r1, r2, 0 - adds r2, r3, 0 - ldr r3, [sp, 0x24] - ldr r4, [sp, 0x28] - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 16 - lsrs r3, 16 - mov r10, r3 - lsls r4, 16 - lsrs r4, 16 - str r4, [sp] - bl InitFieldObjectStateFromTemplate - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - cmp r0, 0x10 - bne _0808D9C8 - movs r0, 0x10 - b _0808DB2C -_0808D9C8: - mov r0, r9 - lsls r4, r0, 3 - adds r0, r4, r0 - lsls r0, 2 - ldr r1, =gMapObjects - adds r6, r0, r1 - ldrb r0, [r6, 0x5] - bl GetFieldObjectGraphicsInfo - adds r7, r0, 0 - ldrb r0, [r7, 0xC] - lsls r0, 28 - lsrs r5, r0, 28 - cmp r5, 0 - bne _0808D9F4 - ldrh r0, [r7, 0x2] - movs r1, 0 - bl npc_load_two_palettes__no_record - b _0808DA16 - .pool -_0808D9F4: - cmp r5, 0xA - bne _0808DA02 - ldrh r0, [r7, 0x2] - movs r1, 0xA - bl npc_load_two_palettes__and_record - b _0808DA16 -_0808DA02: - cmp r5, 0xF - bls _0808DA16 - adds r0, r5, 0 - subs r0, 0x10 - lsls r0, 24 - lsrs r5, r0, 24 - ldrh r0, [r7, 0x2] - adds r1, r5, 0 - bl sub_808EAB0 -_0808DA16: - ldrb r0, [r6, 0x6] - cmp r0, 0x4C - bne _0808DA24 - ldrb r0, [r6, 0x1] - movs r1, 0x20 - orrs r0, r1 - strb r0, [r6, 0x1] -_0808DA24: - ldr r1, =0x0000ffff - adds r0, r1, 0 - mov r2, r8 - strh r0, [r2, 0x2] - mov r0, r8 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - cmp r0, 0x40 - bne _0808DA64 - ldr r0, =gMapObjects - mov r2, r9 - adds r1, r4, r2 - lsls r1, 2 - adds r1, r0 - ldrb r2, [r1] - movs r0, 0x2 - negs r0, r0 - ands r0, r2 - strb r0, [r1] - movs r0, 0x10 - b _0808DB2C - .pool -_0808DA64: - mov r1, r8 - lsls r0, r1, 4 - add r0, r8 - lsls r0, 2 - ldr r1, =gSprites - adds r4, r0, r1 - mov r2, r10 - lsls r0, r2, 16 - asrs r0, 16 - ldrh r1, [r6, 0x10] - adds r0, r1 - lsls r0, 16 - asrs r0, 16 - ldr r2, [sp] - lsls r1, r2, 16 - asrs r1, 16 - ldrh r2, [r6, 0x12] - adds r1, r2 - lsls r1, 16 - asrs r1, 16 - adds r2, r4, 0 - adds r2, 0x20 - adds r3, r4, 0 - adds r3, 0x22 - bl sub_8092FF0 - ldrh r0, [r7, 0x8] - lsls r0, 16 - asrs r0, 17 - negs r0, r0 - adds r1, r4, 0 - adds r1, 0x28 - strb r0, [r1] - ldrh r0, [r7, 0xA] - lsls r0, 16 - asrs r0, 17 - negs r0, r0 - adds r2, r4, 0 - adds r2, 0x29 - strb r0, [r2] - ldrh r0, [r4, 0x20] - adds r0, 0x8 - strh r0, [r4, 0x20] - ldrh r1, [r4, 0x22] - adds r1, 0x10 - movs r0, 0 - ldrsb r0, [r2, r0] - adds r0, r1 - strh r0, [r4, 0x22] - lsls r2, r5, 4 - ldrb r1, [r4, 0x5] - movs r0, 0xF - ands r0, r1 - orrs r0, r2 - strb r0, [r4, 0x5] - adds r2, r4, 0 - adds r2, 0x3E - ldrb r0, [r2] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r2] - mov r0, r9 - strh r0, [r4, 0x2E] - mov r1, r8 - strb r1, [r6, 0x4] - ldrb r1, [r7, 0xC] - lsls r1, 25 - lsrs r1, 31 - lsls r1, 4 - ldrb r2, [r6, 0x1] - movs r0, 0x11 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r6, 0x1] - lsls r0, 27 - cmp r0, 0 - blt _0808DB16 - ldrb r0, [r6, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl FieldObjectDirectionToImageAnimId - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r4, 0 - bl StartSpriteAnim -_0808DB16: - ldrb r0, [r6, 0xB] - lsrs r0, 4 - adds r1, r4, 0 - movs r2, 0x1 - bl SetObjectSubpriorityByZCoord - adds r0, r6, 0 - adds r1, r4, 0 - bl sub_8096518 - mov r0, r9 -_0808DB2C: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end SpawnFieldObjectInternal - thumb_func_start SpawnFieldObject @ u8 SpawnFieldObject(struct FieldObjectTemplate *romNpc, u8 mapId, u8 mapGroupId, u16 movingCameraOffsetX, u16 movingCameraOffsetY) SpawnFieldObject: @ 808DB40 diff --git a/include/field_ground_effect.h b/include/field_ground_effect.h new file mode 100644 index 000000000..2b93273db --- /dev/null +++ b/include/field_ground_effect.h @@ -0,0 +1,15 @@ +// +// Created by scott on 9/6/2017. +// + +#ifndef POKEEMERALD_FIELD_GROUND_EFFECT_H +#define POKEEMERALD_FIELD_GROUND_EFFECT_H + +// Exported type declarations + +// Exported RAM declarations + +// Exported ROM declarations +void SetObjectSubpriorityByZCoord(u8, struct Sprite *, u8); + +#endif //POKEEMERALD_FIELD_GROUND_EFFECT_H diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 6ca6b4103..6ddff4901 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -18,6 +18,11 @@ u8 GetFieldObjectIdByXY(s16, s16); u8 sub_808D4F4(void); void RemoveFieldObject(struct MapObject *); void RemoveFieldObjectByLocalIdAndMap(u8, u8, u8); +void npc_load_two_palettes__no_record(u16, u8); +void npc_load_two_palettes__and_record(u16, u8); +void sub_808EAB0(u16, u8); +void sub_8092FF0(s16, s16, s16 *, s16 *); +u8 FieldObjectDirectionToImageAnimId(u8); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 6e15d3e86..a3fb1a5d3 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -7,6 +7,7 @@ #include "event_data.h" #include "rom_818CFC8.h" #include "rom_81BE66C.h" +#include "field_ground_effect.h" #include "field_map_obj.h" // Static struct declarations @@ -23,6 +24,7 @@ static bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *); static void RemoveFieldObjectInternal (struct MapObject *); /*static*/ u16 GetFieldObjectFlagIdByFieldObjectId(u8); /*static*/ struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8); +void sub_8096518(struct MapObject *, struct Sprite *); // ROM data @@ -455,3 +457,64 @@ void unref_sub_808D958(void) } } } + +u8 SpawnFieldObjectInternal(struct MapObjectTemplate *mapObjectTemplate, struct SpriteTemplate *spriteTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) +{ + struct MapObject *mapObject; + struct MapObjectGraphicsInfo *graphicsInfo; + struct Sprite *sprite; + u8 mapObjectId; + u8 paletteSlot; + u8 spriteId; + + mapObjectId = InitFieldObjectStateFromTemplate(mapObjectTemplate, mapNum, mapGroup); + if (mapObjectId == ARRAY_COUNT(gMapObjects)) + { + return ARRAY_COUNT(gMapObjects); + } + mapObject = &gMapObjects[mapObjectId]; + graphicsInfo = GetFieldObjectGraphicsInfo(mapObject->graphicsId); + paletteSlot = graphicsInfo->paletteSlot; + if (paletteSlot == 0) + { + npc_load_two_palettes__no_record(graphicsInfo->paletteTag1, 0); + } + else if (paletteSlot == 10) + { + npc_load_two_palettes__and_record(graphicsInfo->paletteTag1, 10); + } + else if (paletteSlot >= 16) + { + paletteSlot -= 16; + sub_808EAB0(graphicsInfo->paletteTag1, paletteSlot); + } + if (mapObject->animPattern == 0x4c) + { + mapObject->mapobj_bit_13 = TRUE; + } + *(u16 *)&spriteTemplate->paletteTag = 0xFFFF; + spriteId = CreateSprite(spriteTemplate, 0, 0, 0); + if (spriteId == MAX_SPRITES) + { + gMapObjects[mapObjectId].active = FALSE; + return ARRAY_COUNT(gMapObjects); + } + sprite = &gSprites[spriteId]; + sub_8092FF0(mapObject->coords2.x + cameraX, mapObject->coords2.y + cameraY, &sprite->pos1.x, &sprite->pos1.y); + sprite->centerToCornerVecX = -(graphicsInfo->width >> 1); + sprite->centerToCornerVecY = -(graphicsInfo->height >> 1); + sprite->pos1.x += 8; + sprite->pos1.y += 16 + sprite->centerToCornerVecY; + sprite->oam.paletteNum = paletteSlot; + sprite->coordOffsetEnabled = TRUE; + sprite->data0 = mapObjectId; + mapObject->spriteId = spriteId; + mapObject->mapobj_bit_12 = graphicsInfo->inanimate; + if (!mapObject->mapobj_bit_12) + { + StartSpriteAnim(sprite, FieldObjectDirectionToImageAnimId(mapObject->mapobj_unk_18)); + } + SetObjectSubpriorityByZCoord(mapObject->elevation, sprite, 1); + sub_8096518(mapObject, sprite); + return mapObjectId; +} From bd4b3c4c6da148415e8c5ebeb8c72455776a5f19 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 6 Sep 2017 21:46:53 -0400 Subject: [PATCH 018/342] SpawnFieldObject --- asm/field_map_obj.s | 99 --------------------------------------------- src/field_map_obj.c | 31 +++++++++++++- 2 files changed, 29 insertions(+), 101 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index f59a3a7c9..600997c7f 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,105 +5,6 @@ .text - thumb_func_start SpawnFieldObject -@ u8 SpawnFieldObject(struct FieldObjectTemplate *romNpc, u8 mapId, u8 mapGroupId, u16 movingCameraOffsetX, u16 movingCameraOffsetY) -SpawnFieldObject: @ 808DB40 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x2C - mov r9, r0 - adds r6, r1, 0 - mov r8, r2 - adds r4, r3, 0 - ldr r5, [sp, 0x48] - lsls r6, 24 - lsrs r6, 24 - mov r0, r8 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - lsls r4, 16 - lsrs r4, 16 - lsls r5, 16 - lsrs r5, 16 - movs r0, 0 - str r0, [sp, 0x20] - mov r1, r9 - ldrb r0, [r1, 0x1] - bl GetFieldObjectGraphicsInfo - adds r7, r0, 0 - add r2, sp, 0x20 - mov r0, r9 - add r1, sp, 0x8 - bl MakeObjectTemplateFromFieldObjectTemplate - ldrh r3, [r7, 0x6] - ldr r2, =0xffff0000 - add r1, sp, 0x24 - ldr r0, [r1, 0x4] - ands r0, r2 - orrs r0, r3 - str r0, [r1, 0x4] - str r1, [sp, 0x14] - lsls r4, 16 - asrs r4, 16 - str r4, [sp] - lsls r5, 16 - asrs r5, 16 - str r5, [sp, 0x4] - mov r0, r9 - add r1, sp, 0x8 - adds r2, r6, 0 - mov r3, r8 - bl SpawnFieldObjectInternal - lsls r0, 24 - lsrs r2, r0, 24 - adds r5, r2, 0 - cmp r2, 0x10 - bne _0808DBBC - movs r0, 0x10 - b _0808DBF2 - .pool -_0808DBBC: - ldr r4, =gSprites - ldr r1, =gMapObjects - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - adds r3, r0, r1 - ldrb r1, [r3, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r1, r4, 0 - adds r1, 0xC - adds r0, r1 - ldr r1, [r7, 0x1C] - str r1, [r0] - ldr r2, [sp, 0x20] - cmp r2, 0 - beq _0808DBF0 - ldrb r1, [r3, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - adds r1, r2, 0 - bl SetSubspriteTables -_0808DBF0: - adds r0, r5, 0 -_0808DBF2: - add sp, 0x2C - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end SpawnFieldObject - thumb_func_start SpawnSpecialFieldObject @ u8 SpawnSpecialFieldObject(struct FieldObjectTemplate *romFieldObject) SpawnSpecialFieldObject: @ 808DC08 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index a3fb1a5d3..8b78a54a1 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -23,8 +23,9 @@ static bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *); /*static*/ void FieldObjectHandleDynamicGraphicsId(struct MapObject *); static void RemoveFieldObjectInternal (struct MapObject *); /*static*/ u16 GetFieldObjectFlagIdByFieldObjectId(u8); -/*static*/ struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8); +/*static*/ const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8); void sub_8096518(struct MapObject *, struct Sprite *); +/*static*/ void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); // ROM data @@ -461,7 +462,7 @@ void unref_sub_808D958(void) u8 SpawnFieldObjectInternal(struct MapObjectTemplate *mapObjectTemplate, struct SpriteTemplate *spriteTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) { struct MapObject *mapObject; - struct MapObjectGraphicsInfo *graphicsInfo; + const struct MapObjectGraphicsInfo *graphicsInfo; struct Sprite *sprite; u8 mapObjectId; u8 paletteSlot; @@ -518,3 +519,29 @@ u8 SpawnFieldObjectInternal(struct MapObjectTemplate *mapObjectTemplate, struct sub_8096518(mapObject, sprite); return mapObjectId; } + +u8 SpawnFieldObject(struct MapObjectTemplate *mapObjectTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) +{ + const struct MapObjectGraphicsInfo *graphicsInfo; + struct SpriteTemplate spriteTemplate; + const struct SubspriteTable *subspriteTable; + struct SpriteFrameImage spriteFrameImage; + u8 mapObjectId; + + subspriteTable = NULL; + graphicsInfo = GetFieldObjectGraphicsInfo(mapObjectTemplate->graphicsId); + MakeObjectTemplateFromFieldObjectTemplate(mapObjectTemplate, &spriteTemplate, &subspriteTable); + spriteFrameImage.size = graphicsInfo->size; + spriteTemplate.images = &spriteFrameImage; + mapObjectId = SpawnFieldObjectInternal(mapObjectTemplate, &spriteTemplate, mapNum, mapGroup, cameraX, cameraY); + if (mapObjectId == ARRAY_COUNT(gMapObjects)) + { + return ARRAY_COUNT(gMapObjects); + } + gSprites[gMapObjects[mapObjectId].spriteId].images = graphicsInfo->images; + if (subspriteTable != NULL) + { + SetSubspriteTables(&gSprites[gMapObjects[mapObjectId].spriteId], subspriteTable); + } + return mapObjectId; +} From 22c836795669b9c7d2d244dc4f0becaabfe6a198 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 6 Sep 2017 22:00:51 -0400 Subject: [PATCH 019/342] SpawnSpecialFieldObject --- asm/field_map_obj.s | 32 -------------------------------- src/field_map_obj.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 600997c7f..213af130e 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,38 +5,6 @@ .text - thumb_func_start SpawnSpecialFieldObject -@ u8 SpawnSpecialFieldObject(struct FieldObjectTemplate *romFieldObject) -SpawnSpecialFieldObject: @ 808DC08 - push {r4-r6,lr} - sub sp, 0x8 - adds r5, r0, 0 - mov r4, sp - adds r4, 0x6 - add r0, sp, 0x4 - adds r1, r4, 0 - bl GetFieldObjectMovingCameraOffset - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldrb r1, [r0, 0x5] - ldrb r2, [r0, 0x4] - add r0, sp, 0x4 - movs r6, 0 - ldrsh r3, [r0, r6] - movs r6, 0 - ldrsh r0, [r4, r6] - str r0, [sp] - adds r0, r5, 0 - bl SpawnFieldObject - lsls r0, 24 - lsrs r0, 24 - add sp, 0x8 - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end SpawnSpecialFieldObject - thumb_func_start SpawnSpecialFieldObjectParametrized @ u8 SpawnSpecialFieldObjectParametrized(u8 graphicsId, u8 movementBehavior, u8 localId, u16 x, u16 y, u8 z) SpawnSpecialFieldObjectParametrized: @ 808DC44 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 8b78a54a1..9c25e148a 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -26,6 +26,7 @@ static void RemoveFieldObjectInternal (struct MapObject *); /*static*/ const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8); void sub_8096518(struct MapObject *, struct Sprite *); /*static*/ void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); +/*static*/ void GetFieldObjectMovingCameraOffset(s16 *, s16 *); // ROM data @@ -545,3 +546,12 @@ u8 SpawnFieldObject(struct MapObjectTemplate *mapObjectTemplate, u8 mapNum, u8 m } return mapObjectId; } + +u8 SpawnSpecialFieldObject(struct MapObjectTemplate *mapObjectTemplate) +{ + s16 cameraX; + s16 cameraY; + + GetFieldObjectMovingCameraOffset(&cameraX, &cameraY); + return SpawnFieldObject(mapObjectTemplate, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, cameraX, cameraY); +} From 1f83a2885e540dbf473e3f5200e35f5fc6df96b3 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 6 Sep 2017 22:33:11 -0400 Subject: [PATCH 020/342] Through MakeObjectTemplateFromFieldObjectGraphicsInfo --- asm/field_map_obj.s | 127 -------------------------------------------- src/field_map_obj.c | 60 +++++++++++++++++++-- 2 files changed, 55 insertions(+), 132 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 213af130e..e7740b66c 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,133 +5,6 @@ .text - thumb_func_start SpawnSpecialFieldObjectParametrized -@ u8 SpawnSpecialFieldObjectParametrized(u8 graphicsId, u8 movementBehavior, u8 localId, u16 x, u16 y, u8 z) -SpawnSpecialFieldObjectParametrized: @ 808DC44 - push {r4-r6,lr} - mov r6, r8 - push {r6} - sub sp, 0x18 - ldr r4, [sp, 0x2C] - ldr r5, [sp, 0x30] - mov r8, r5 - lsls r0, 24 - lsrs r0, 24 - lsls r3, 16 - ldr r5, =0xfff90000 - adds r3, r5 - lsrs r3, 16 - lsls r4, 16 - adds r4, r5 - lsrs r4, 16 - mov r5, sp - movs r6, 0 - strb r2, [r5] - mov r2, sp - strb r0, [r2, 0x1] - mov r0, sp - strb r6, [r0, 0x2] - movs r5, 0 - strh r3, [r0, 0x4] - strh r4, [r0, 0x6] - mov r2, r8 - strb r2, [r0, 0x8] - strb r1, [r0, 0x9] - mov r2, sp - ldrb r1, [r2, 0xA] - movs r0, 0x10 - negs r0, r0 - ands r0, r1 - strb r0, [r2, 0xA] - mov r0, sp - strb r5, [r0, 0xA] - strh r6, [r0, 0xC] - strh r6, [r0, 0xE] - bl SpawnSpecialFieldObject - lsls r0, 24 - lsrs r0, 24 - add sp, 0x18 - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end SpawnSpecialFieldObjectParametrized - - thumb_func_start show_sprite -show_sprite: @ 808DCAC - push {r4-r7,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r7, r1, 24 - lsls r2, 24 - lsrs r6, r2, 24 - adds r1, r7, 0 - adds r2, r6, 0 - bl GetFieldObjectTemplateByLocalIdAndMap - adds r5, r0, 0 - cmp r5, 0 - beq _0808DCF2 - mov r4, sp - adds r4, 0x6 - add r0, sp, 0x4 - adds r1, r4, 0 - bl GetFieldObjectMovingCameraOffset - add r0, sp, 0x4 - movs r1, 0 - ldrsh r3, [r0, r1] - movs r1, 0 - ldrsh r0, [r4, r1] - str r0, [sp] - adds r0, r5, 0 - adds r1, r7, 0 - adds r2, r6, 0 - bl SpawnFieldObject - lsls r0, 24 - lsrs r0, 24 - b _0808DCF4 -_0808DCF2: - movs r0, 0x10 -_0808DCF4: - add sp, 0x8 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end show_sprite - - thumb_func_start MakeObjectTemplateFromFieldObjectGraphicsInfo -@ void MakeObjectTemplateFromFieldObjectGraphicsInfo(u8 graphicsId, void ( *callback)(), struct objtemplate *objectTemplate, SpriteOamTable **spriteOamTables) -MakeObjectTemplateFromFieldObjectGraphicsInfo: @ 808DCFC - push {r4-r6,lr} - adds r5, r1, 0 - adds r4, r2, 0 - adds r6, r3, 0 - lsls r0, 24 - lsrs r0, 24 - bl GetFieldObjectGraphicsInfo - ldrh r1, [r0] - strh r1, [r4] - ldrh r1, [r0, 0x2] - strh r1, [r4, 0x2] - ldr r1, [r0, 0x10] - str r1, [r4, 0x4] - ldr r1, [r0, 0x18] - str r1, [r4, 0x8] - ldr r1, [r0, 0x1C] - str r1, [r4, 0xC] - ldr r1, [r0, 0x20] - str r1, [r4, 0x10] - str r5, [r4, 0x14] - ldr r0, [r0, 0x14] - str r0, [r6] - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end MakeObjectTemplateFromFieldObjectGraphicsInfo - thumb_func_start MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex @ void MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex(u16 graphicsId, u16 callbackIndex, struct objtemplate *objectTemplate, SpriteOamTable **spriteOamTables) MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex: @ 808DD30 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 9c25e148a..e6376d156 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -27,6 +27,7 @@ static void RemoveFieldObjectInternal (struct MapObject *); void sub_8096518(struct MapObject *, struct Sprite *); /*static*/ void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); /*static*/ void GetFieldObjectMovingCameraOffset(s16 *, s16 *); +/*static*/ struct MapObjectTemplate *GetFieldObjectTemplateByLocalIdAndMap(u8, u8, u8); // ROM data @@ -525,13 +526,13 @@ u8 SpawnFieldObject(struct MapObjectTemplate *mapObjectTemplate, u8 mapNum, u8 m { const struct MapObjectGraphicsInfo *graphicsInfo; struct SpriteTemplate spriteTemplate; - const struct SubspriteTable *subspriteTable; + const struct SubspriteTable *subspriteTables; struct SpriteFrameImage spriteFrameImage; u8 mapObjectId; - subspriteTable = NULL; + subspriteTables = NULL; graphicsInfo = GetFieldObjectGraphicsInfo(mapObjectTemplate->graphicsId); - MakeObjectTemplateFromFieldObjectTemplate(mapObjectTemplate, &spriteTemplate, &subspriteTable); + MakeObjectTemplateFromFieldObjectTemplate(mapObjectTemplate, &spriteTemplate, &subspriteTables); spriteFrameImage.size = graphicsInfo->size; spriteTemplate.images = &spriteFrameImage; mapObjectId = SpawnFieldObjectInternal(mapObjectTemplate, &spriteTemplate, mapNum, mapGroup, cameraX, cameraY); @@ -540,9 +541,9 @@ u8 SpawnFieldObject(struct MapObjectTemplate *mapObjectTemplate, u8 mapNum, u8 m return ARRAY_COUNT(gMapObjects); } gSprites[gMapObjects[mapObjectId].spriteId].images = graphicsInfo->images; - if (subspriteTable != NULL) + if (subspriteTables != NULL) { - SetSubspriteTables(&gSprites[gMapObjects[mapObjectId].spriteId], subspriteTable); + SetSubspriteTables(&gSprites[gMapObjects[mapObjectId].spriteId], subspriteTables); } return mapObjectId; } @@ -555,3 +556,52 @@ u8 SpawnSpecialFieldObject(struct MapObjectTemplate *mapObjectTemplate) GetFieldObjectMovingCameraOffset(&cameraX, &cameraY); return SpawnFieldObject(mapObjectTemplate, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, cameraX, cameraY); } + +u8 SpawnSpecialFieldObjectParametrized(u8 graphicsId, u8 movementBehavior, u8 localId, s16 x, s16 y, u8 z) +{ + struct MapObjectTemplate mapObjectTemplate; + + x -= 7; + y -= 7; + mapObjectTemplate.localId = localId; + mapObjectTemplate.graphicsId = graphicsId; + mapObjectTemplate.unk2 = 0; + mapObjectTemplate.x = x; + mapObjectTemplate.y = y; + mapObjectTemplate.elevation = z; + mapObjectTemplate.movementType = movementBehavior; + mapObjectTemplate.unkA_0 = 0; + mapObjectTemplate.unkA_4 = 0; + mapObjectTemplate.unkC = 0; + mapObjectTemplate.unkE = 0; + return SpawnSpecialFieldObject(&mapObjectTemplate); +} + +u8 show_sprite(u8 localId, u8 mapNum, u8 mapGroup) +{ + struct MapObjectTemplate *mapObjectTemplate; + s16 cameraX; + s16 cameraY; + + mapObjectTemplate = GetFieldObjectTemplateByLocalIdAndMap(localId, mapNum, mapGroup); + if (mapObjectTemplate == NULL) + { + return ARRAY_COUNT(gMapObjects); + } + GetFieldObjectMovingCameraOffset(&cameraX, &cameraY); + return SpawnFieldObject(mapObjectTemplate, mapNum, mapGroup, cameraX, cameraY); +} + +void MakeObjectTemplateFromFieldObjectGraphicsInfo(u16 graphicsId, void (*callback)(struct Sprite *), struct SpriteTemplate *sprTemplate, const struct SubspriteTable **subspriteTables) +{ + const struct MapObjectGraphicsInfo *gfxInfo = GetFieldObjectGraphicsInfo(graphicsId); + + sprTemplate->tileTag = gfxInfo->tileTag; + sprTemplate->paletteTag = gfxInfo->paletteTag1; + sprTemplate->oam = gfxInfo->oam; + sprTemplate->anims = gfxInfo->anims; + sprTemplate->images = gfxInfo->images; + sprTemplate->affineAnims = gfxInfo->affineAnims; + sprTemplate->callback = callback; + *subspriteTables = gfxInfo->subspriteTables; +} From 112177b57f6f5ca95cd97bbe7a9a86924b341e5c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 6 Sep 2017 22:46:44 -0400 Subject: [PATCH 021/342] Slight touching up of data3.s; denote boundaries of data/field_map_obj.s for future split --- asm/field_map_obj.s | 18 ------------------ data/data3.s | 7 ++++++- src/field_map_obj.c | 12 ++++++++++-- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index e7740b66c..34578ec5c 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,24 +5,6 @@ .text - thumb_func_start MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex -@ void MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex(u16 graphicsId, u16 callbackIndex, struct objtemplate *objectTemplate, SpriteOamTable **spriteOamTables) -MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex: @ 808DD30 - push {r4,lr} - lsls r0, 16 - lsrs r0, 16 - lsls r1, 16 - ldr r4, =gUnknown_08505438 - lsrs r1, 14 - adds r1, r4 - ldr r1, [r1] - bl MakeObjectTemplateFromFieldObjectGraphicsInfo - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex - thumb_func_start MakeObjectTemplateFromFieldObjectTemplate @ void MakeObjectTemplateFromFieldObjectTemplate(struct FieldObjectTemplate *fieldObjectTemplate, struct objtemplate *objectTemplate, SpriteOamTable **spriteOamTables) MakeObjectTemplateFromFieldObjectTemplate: @ 808DD50 diff --git a/data/data3.s b/data/data3.s index ee1ad294a..01f23aa12 100644 --- a/data/data3.s +++ b/data/data3.s @@ -642,6 +642,8 @@ gUnknown_084975B0:: @ 84975B0 gUnknown_084975BC:: @ 84975BC .incbin "baserom.gba", 0x4975bc, 0x8 +// data/field_map_obj.s + gUnknown_084975C4:: @ 84975C4 .incbin "baserom.gba", 0x4975c4, 0x10 @@ -661,8 +663,9 @@ gUnknown_0850557C:: @ 850557C .incbin "baserom.gba", 0x50557c, 0x51 gUnknown_085055CD:: @ 85055CD - .incbin "baserom.gba", 0x5055cd, 0x53 + .incbin "baserom.gba", 0x5055cd, 0x51 + .align 2, 0 @ 8505620 .include "data/graphics/field_objects/field_object_graphics_info_pointers.inc" @@ -1136,6 +1139,8 @@ gUnknown_0850DFBC:: @ 850DFBC gUnknown_0850DFC2:: @ 850DFC2 .incbin "baserom.gba", 0x50dfc2, 0x61a +// end data/field_map_obj.s + gUnknown_0850E5DC:: @ 850E5DC .incbin "baserom.gba", 0x50e5dc, 0x8 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index e6376d156..e3e0b7158 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -10,6 +10,8 @@ #include "field_ground_effect.h" #include "field_map_obj.h" +#define NUM_FIELD_MAP_OBJECT_TEMPLATES 0x51 + // Static struct declarations // Static RAM declarations @@ -31,8 +33,9 @@ void sub_8096518(struct MapObject *, struct Sprite *); // ROM data -const u8 gUnknown_085055CD[0x53]; -const u8 gUnknown_0850557C[0x51]; +void (*const gUnknown_08505438[NUM_FIELD_MAP_OBJECT_TEMPLATES])(struct Sprite *); +const u8 gUnknown_0850557C[NUM_FIELD_MAP_OBJECT_TEMPLATES]; +const u8 gUnknown_085055CD[NUM_FIELD_MAP_OBJECT_TEMPLATES]; // Code @@ -605,3 +608,8 @@ void MakeObjectTemplateFromFieldObjectGraphicsInfo(u16 graphicsId, void (*callba sprTemplate->callback = callback; *subspriteTables = gfxInfo->subspriteTables; } + +void MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex(u16 graphicsId, u16 callbackIndex, struct SpriteTemplate *sprTemplate, const struct SubspriteTable **subspriteTables) +{ + MakeObjectTemplateFromFieldObjectGraphicsInfo(graphicsId, gUnknown_08505438[callbackIndex], sprTemplate, subspriteTables); +} From 12562aa2d42e1692aff319b091258d5c24a9e040 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 7 Sep 2017 14:16:30 -0400 Subject: [PATCH 022/342] MakeObjectTemplateFromFieldObjectTemplate --- asm/field_map_obj.s | 16 ---------------- src/field_map_obj.c | 5 +++++ src/malloc.c | 5 +++-- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 34578ec5c..571223ec3 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,22 +5,6 @@ .text - thumb_func_start MakeObjectTemplateFromFieldObjectTemplate -@ void MakeObjectTemplateFromFieldObjectTemplate(struct FieldObjectTemplate *fieldObjectTemplate, struct objtemplate *objectTemplate, SpriteOamTable **spriteOamTables) -MakeObjectTemplateFromFieldObjectTemplate: @ 808DD50 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r3, r2, 0 - ldrb r0, [r4, 0x1] - ldrb r1, [r4, 0x9] - adds r2, r5, 0 - bl MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end MakeObjectTemplateFromFieldObjectTemplate - thumb_func_start AddPseudoFieldObject @ void AddPseudoFieldObject(u8 graphicsId, void ( *callback)(), u16 x, u16 y, u8 subpriority) AddPseudoFieldObject: @ 808DD68 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index e3e0b7158..819721773 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -613,3 +613,8 @@ void MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex(u16 graphics { MakeObjectTemplateFromFieldObjectGraphicsInfo(graphicsId, gUnknown_08505438[callbackIndex], sprTemplate, subspriteTables); } + +void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *mapObjectTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) +{ + MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex(mapObjectTemplate->graphicsId, mapObjectTemplate->movementType, spriteTemplate, subspriteTables); +} diff --git a/src/malloc.c b/src/malloc.c index 948303c6f..5317565dc 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -40,7 +40,7 @@ void PutMemBlockHeader(void *block, struct MemBlock *prev, struct MemBlock *next void PutFirstMemBlockHeader(void *block, u32 size) { - PutMemBlockHeader(block, (struct MemBlock *)block, (struct MemBlock *)block, size - 16); + PutMemBlockHeader(block, (struct MemBlock *)block, (struct MemBlock *)block, size - sizeof(struct MemBlock)); } void *AllocInternal(void *heapStart, u32 size) @@ -50,6 +50,7 @@ void *AllocInternal(void *heapStart, u32 size) struct MemBlock *splitBlock; u32 foundBlockSize; + // Alignment if (size & 3) size = 4 * ((size / 4) + 1); @@ -60,7 +61,7 @@ void *AllocInternal(void *heapStart, u32 size) foundBlockSize = pos->size; if (foundBlockSize >= size) { - if (foundBlockSize - size <= 31) { + if (foundBlockSize - size < 2 * sizeof(struct MemBlock)) { // The block isn't much bigger than the requested size, // so just use it. pos->flag = TRUE; From f7742a68ae57ffa9e7b965c6cc816f7977b9e467 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 7 Sep 2017 14:31:23 -0400 Subject: [PATCH 023/342] AddPseudoFieldObject --- asm/field_map_obj.s | 79 --------------------------------------------- include/malloc.h | 4 +++ src/field_map_obj.c | 27 ++++++++++++++++ 3 files changed, 31 insertions(+), 79 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 571223ec3..7be604b27 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,85 +5,6 @@ .text - thumb_func_start AddPseudoFieldObject -@ void AddPseudoFieldObject(u8 graphicsId, void ( *callback)(), u16 x, u16 y, u8 subpriority) -AddPseudoFieldObject: @ 808DD68 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r0, [sp, 0x20] - lsls r4, 16 - lsrs r4, 16 - lsls r2, 16 - lsrs r2, 16 - mov r8, r2 - lsls r3, 16 - lsrs r7, r3, 16 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - movs r0, 0x18 - bl Alloc - adds r6, r0, 0 - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - mov r3, sp - bl MakeObjectTemplateFromFieldObjectGraphicsInfo - ldrh r1, [r6, 0x2] - ldr r0, =0x0000ffff - cmp r1, r0 - beq _0808DDAE - adds r0, r1, 0 - bl sub_808E894 -_0808DDAE: - mov r0, r8 - lsls r1, r0, 16 - asrs r1, 16 - lsls r2, r7, 16 - asrs r2, 16 - adds r0, r6, 0 - mov r3, r9 - bl CreateSprite - lsls r0, 24 - lsrs r5, r0, 24 - adds r0, r6, 0 - bl Free - cmp r5, 0x40 - beq _0808DDF2 - ldr r1, [sp] - cmp r1, 0 - beq _0808DDF2 - lsls r4, r5, 4 - adds r4, r5 - lsls r4, 2 - ldr r0, =gSprites - adds r4, r0 - adds r0, r4, 0 - bl SetSubspriteTables - adds r4, 0x42 - ldrb r1, [r4] - movs r0, 0x3F - ands r0, r1 - movs r1, 0x80 - orrs r0, r1 - strb r0, [r4] -_0808DDF2: - adds r0, r5, 0 - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end AddPseudoFieldObject - thumb_func_start sprite_new sprite_new: @ 808DE0C push {r4-r7,lr} diff --git a/include/malloc.h b/include/malloc.h index bd870ede3..b3216b05c 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -1,6 +1,10 @@ #ifndef GUARD_MALLOC_H #define GUARD_MALLOC_H +#define malloc Alloc +#define calloc AllocZeroed +#define free Free + void *Alloc(u32 size); void *AllocZeroed(u32 size); void Free(void *pointer); diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 819721773..c434ee7db 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1,6 +1,7 @@ // Includes #include "global.h" +#include "malloc.h" #include "sprite.h" #include "rom4.h" #include "field_player_avatar.h" @@ -30,6 +31,7 @@ void sub_8096518(struct MapObject *, struct Sprite *); /*static*/ void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); /*static*/ void GetFieldObjectMovingCameraOffset(s16 *, s16 *); /*static*/ struct MapObjectTemplate *GetFieldObjectTemplateByLocalIdAndMap(u8, u8, u8); +/*static*/ void sub_808E894(u16); // ROM data @@ -618,3 +620,28 @@ void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *mapObje { MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex(mapObjectTemplate->graphicsId, mapObjectTemplate->movementType, spriteTemplate, subspriteTables); } + +u8 AddPseudoFieldObject(u16 graphicsId, void (*callback)(struct Sprite *), s16 x, s16 y, u8 subpriority) +{ + struct SpriteTemplate *spriteTemplate; + const struct SubspriteTable *subspriteTables; + struct Sprite *sprite; + u8 spriteIdx; + + spriteTemplate = malloc(sizeof(struct SpriteTemplate)); + MakeObjectTemplateFromFieldObjectGraphicsInfo(graphicsId, callback, spriteTemplate, &subspriteTables); + if (spriteTemplate->paletteTag != 0xffff) + { + sub_808E894(spriteTemplate->paletteTag); + } + spriteIdx = CreateSprite(spriteTemplate, x, y, subpriority); + free(spriteTemplate); + + if (spriteIdx != MAX_SPRITES && subspriteTables != NULL) + { + sprite = &gSprites[spriteIdx]; + SetSubspriteTables(sprite, subspriteTables); + sprite->subspriteMode = 2; + } + return spriteIdx; +} From 64ebd9b4fb54fae34a8f7cebb14588b89693d4a3 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 7 Sep 2017 15:50:49 -0400 Subject: [PATCH 024/342] sprite_new --- asm/field_map_obj.s | 178 ---------------------------------- include/field_ground_effect.h | 1 + include/field_map_obj.h | 1 + include/map_obj_8097404.h | 15 +++ src/field_map_obj.c | 50 ++++++++++ 5 files changed, 67 insertions(+), 178 deletions(-) create mode 100644 include/map_obj_8097404.h diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 7be604b27..187797022 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,184 +5,6 @@ .text - thumb_func_start sprite_new -sprite_new: @ 808DE0C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x20 - adds r5, r0, 0 - ldr r0, [sp, 0x40] - ldr r4, [sp, 0x44] - lsls r5, 24 - lsrs r5, 24 - lsls r1, 24 - lsrs r1, 24 - mov r9, r1 - add r1, sp, 0x18 - mov r8, r1 - strh r2, [r1] - mov r6, sp - adds r6, 0x1A - strh r3, [r6] - lsls r0, 24 - lsrs r7, r0, 24 - lsls r4, 24 - lsrs r4, 24 - mov r10, r4 - adds r0, r5, 0 - bl GetFieldObjectGraphicsInfo - adds r4, r0, 0 - ldr r1, =sub_8097AC8 - add r3, sp, 0x1C - adds r0, r5, 0 - mov r2, sp - bl MakeObjectTemplateFromFieldObjectGraphicsInfo - mov r1, sp - ldr r2, =0x0000ffff - adds r0, r2, 0 - strh r0, [r1, 0x2] - mov r1, r8 - movs r2, 0 - ldrsh r0, [r1, r2] - adds r0, 0x7 - strh r0, [r1] - movs r1, 0 - ldrsh r0, [r6, r1] - adds r0, 0x7 - strh r0, [r6] - mov r0, r8 - adds r1, r6, 0 - movs r2, 0x8 - movs r3, 0x10 - bl sub_80930E0 - mov r2, r8 - movs r0, 0 - ldrsh r1, [r2, r0] - movs r0, 0 - ldrsh r2, [r6, r0] - mov r0, sp - movs r3, 0 - bl CreateSpriteAtEnd - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, 0x40 - beq _0808DF6C - lsls r0, r6, 4 - adds r0, r6 - lsls r0, 2 - ldr r1, =gSprites - adds r5, r0, r1 - ldrh r0, [r4, 0x8] - lsls r0, 16 - asrs r0, 17 - negs r0, r0 - adds r1, r5, 0 - adds r1, 0x28 - strb r0, [r1] - ldrh r0, [r4, 0xA] - lsls r0, 16 - asrs r0, 17 - negs r0, r0 - adds r1, 0x1 - strb r0, [r1] - movs r0, 0 - ldrsb r0, [r1, r0] - ldrh r1, [r5, 0x22] - adds r0, r1 - strh r0, [r5, 0x22] - ldrb r0, [r4, 0xC] - lsls r0, 28 - lsrs r0, 24 - ldrb r1, [r5, 0x5] - movs r3, 0xF - adds r2, r3, 0 - ands r2, r1 - orrs r2, r0 - strb r2, [r5, 0x5] - lsls r1, r2, 24 - lsrs r0, r1, 28 - cmp r0, 0xF - bls _0808DEE4 - subs r0, 0x10 - lsls r0, 4 - ands r2, r3 - orrs r2, r0 - strb r2, [r5, 0x5] -_0808DEE4: - adds r2, r5, 0 - adds r2, 0x3E - ldrb r0, [r2] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r2] - mov r2, r9 - strh r2, [r5, 0x2E] - strh r7, [r5, 0x30] - ldrb r1, [r4, 0xC] - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0xA - bne _0808DF18 - ldrh r0, [r4, 0x2] - lsls r1, 28 - lsrs r1, 28 - bl npc_load_two_palettes__and_record - b _0808DF2C - .pool -_0808DF18: - lsls r1, 28 - lsrs r0, r1, 28 - cmp r0, 0xF - bls _0808DF2C - ldrh r0, [r4, 0x2] - lsrs r2, r1, 28 - movs r1, 0xF0 - orrs r1, r2 - bl sub_808EAB0 -_0808DF2C: - ldr r1, [sp, 0x1C] - cmp r1, 0 - beq _0808DF48 - adds r0, r5, 0 - bl SetSubspriteTables - adds r2, r5, 0 - adds r2, 0x42 - ldrb r0, [r2] - movs r1, 0x3F - ands r1, r0 - movs r0, 0x80 - orrs r1, r0 - strb r1, [r2] -_0808DF48: - adds r0, r5, 0 - adds r1, r7, 0 - bl InitObjectPriorityByZCoord - adds r0, r7, 0 - adds r1, r5, 0 - movs r2, 0x1 - bl SetObjectSubpriorityByZCoord - mov r0, r10 - bl FieldObjectDirectionToImageAnimId - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r5, 0 - bl StartSpriteAnim -_0808DF6C: - adds r0, r6, 0 - add sp, 0x20 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sprite_new - thumb_func_start SpawnFieldObjectsInView @ void SpawnFieldObjectsInView(u16 movingCameraOffsetX, u16 movingCameraOffsetY) SpawnFieldObjectsInView: @ 808DF80 diff --git a/include/field_ground_effect.h b/include/field_ground_effect.h index 2b93273db..0c90f50dc 100644 --- a/include/field_ground_effect.h +++ b/include/field_ground_effect.h @@ -11,5 +11,6 @@ // Exported ROM declarations void SetObjectSubpriorityByZCoord(u8, struct Sprite *, u8); +void InitObjectPriorityByZCoord(struct Sprite *, u8); #endif //POKEEMERALD_FIELD_GROUND_EFFECT_H diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 6ddff4901..40f94ccab 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -23,6 +23,7 @@ void npc_load_two_palettes__and_record(u16, u8); void sub_808EAB0(u16, u8); void sub_8092FF0(s16, s16, s16 *, s16 *); u8 FieldObjectDirectionToImageAnimId(u8); +void sub_80930E0(s16 *, s16 *, u8, u8); // Exported data declarations diff --git a/include/map_obj_8097404.h b/include/map_obj_8097404.h new file mode 100644 index 000000000..6296febe4 --- /dev/null +++ b/include/map_obj_8097404.h @@ -0,0 +1,15 @@ +// +// Created by scott on 9/7/2017. +// + +#ifndef POKEEMERALD_MAP_OBJ_8097404_H +#define POKEEMERALD_MAP_OBJ_8097404_H + +// Exported type declarations + +// Exported RAM declarations + +// Exported ROM declarations +void sub_8097AC8(struct Sprite *); + +#endif //POKEEMERALD_MAP_OBJ_8097404_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index c434ee7db..82e74747d 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -9,6 +9,7 @@ #include "rom_818CFC8.h" #include "rom_81BE66C.h" #include "field_ground_effect.h" +#include "map_obj_8097404.h" #include "field_map_obj.h" #define NUM_FIELD_MAP_OBJECT_TEMPLATES 0x51 @@ -645,3 +646,52 @@ u8 AddPseudoFieldObject(u16 graphicsId, void (*callback)(struct Sprite *), s16 x } return spriteIdx; } + +u8 sprite_new(u8 graphicsId, u8 a1, s16 x, s16 y, u8 z, u8 direction) +{ + const struct MapObjectGraphicsInfo *graphicsInfo; + struct SpriteTemplate spriteTemplate; + const struct SubspriteTable *subspriteTables; + u8 spriteId; + struct Sprite *sprite; + + graphicsInfo = GetFieldObjectGraphicsInfo(graphicsId); + MakeObjectTemplateFromFieldObjectGraphicsInfo(graphicsId, sub_8097AC8, &spriteTemplate, &subspriteTables); + *(u16 *)&spriteTemplate.paletteTag = 0xffff; + x += 7; + y += 7; + sub_80930E0(&x, &y, 8, 16); + spriteId = CreateSpriteAtEnd(&spriteTemplate, x, y, 0); + if (spriteId != MAX_SPRITES) + { + sprite = &gSprites[spriteId]; + sprite->centerToCornerVecX = -(graphicsInfo->width >> 1); + sprite->centerToCornerVecY = -(graphicsInfo->height >> 1); + sprite->pos1.y += sprite->centerToCornerVecY; + sprite->oam.paletteNum = graphicsInfo->paletteSlot; + if (sprite->oam.paletteNum >= 16) + { + sprite->oam.paletteNum -= 16; + } + sprite->coordOffsetEnabled = TRUE; + sprite->data0 = a1; + sprite->data1 = z; + if (graphicsInfo->paletteSlot == 10) + { + npc_load_two_palettes__and_record(graphicsInfo->paletteTag1, graphicsInfo->paletteSlot); + } + else if (graphicsInfo->paletteSlot >= 16) + { + sub_808EAB0(graphicsInfo->paletteTag1, graphicsInfo->paletteSlot | 0xf0); + } + if (subspriteTables != NULL) + { + SetSubspriteTables(sprite, subspriteTables); + sprite->subspriteMode = 2; + } + InitObjectPriorityByZCoord(sprite, z); + SetObjectSubpriorityByZCoord(z, sprite, 1); + StartSpriteAnim(sprite, FieldObjectDirectionToImageAnimId(direction)); + } + return spriteId; +} From f128e4c4f0e1214801178e643223a77d8ec904f8 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 7 Sep 2017 15:58:38 -0400 Subject: [PATCH 025/342] SpawnFieldObjectsInView --- asm/field_map_obj.s | 135 -------------------------------------------- src/field_map_obj.c | 44 +++++++++++++++ 2 files changed, 44 insertions(+), 135 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 187797022..af47dd1f0 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,141 +5,6 @@ .text - thumb_func_start SpawnFieldObjectsInView -@ void SpawnFieldObjectsInView(u16 movingCameraOffsetX, u16 movingCameraOffsetY) -SpawnFieldObjectsInView: @ 808DF80 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x10 - lsls r0, 16 - lsrs r0, 16 - str r0, [sp, 0x4] - lsls r1, 16 - lsrs r1, 16 - str r1, [sp, 0x8] - ldr r5, =gMapHeader - ldr r0, [r5, 0x4] - cmp r0, 0 - beq _0808E078 - ldr r0, =gSaveBlock1Ptr - ldr r2, [r0] - ldrh r1, [r2] - subs r0, r1, 0x2 - lsls r0, 16 - lsrs r0, 16 - mov r8, r0 - adds r1, 0x11 - lsls r1, 16 - lsrs r1, 16 - str r1, [sp, 0xC] - ldrh r4, [r2, 0x2] - adds r0, r4, 0 - adds r0, 0x10 - lsls r0, 16 - lsrs r0, 16 - mov r10, r0 - bl InBattlePyramid - lsls r0, 24 - cmp r0, 0 - beq _0808DFE0 - bl sub_81AAA40 - lsls r0, 24 - lsrs r6, r0, 24 - b _0808DFF0 - .pool -_0808DFE0: - bl InTrainerHill - cmp r0, 0 - beq _0808DFEC - movs r6, 0x2 - b _0808DFF0 -_0808DFEC: - ldr r0, [r5, 0x4] - ldrb r6, [r0] -_0808DFF0: - movs r5, 0 - cmp r5, r6 - bcs _0808E078 - lsls r0, r4, 16 - asrs r0, 16 - mov r9, r0 - mov r1, r8 - lsls r0, r1, 16 - asrs r0, 16 - mov r8, r0 -_0808E004: - lsls r0, r5, 1 - adds r0, r5 - lsls r0, 3 - movs r2, 0xC7 - lsls r2, 4 - adds r0, r2 - ldr r3, =gSaveBlock1Ptr - ldr r1, [r3] - adds r4, r1, r0 - ldrh r0, [r4, 0x4] - adds r0, 0x7 - lsls r0, 16 - lsrs r2, r0, 16 - ldrh r0, [r4, 0x6] - adds r0, 0x7 - lsls r0, 16 - asrs r1, r0, 16 - cmp r9, r1 - bgt _0808E06E - mov r7, r10 - lsls r0, r7, 16 - asrs r0, 16 - cmp r0, r1 - blt _0808E06E - lsls r0, r2, 16 - asrs r1, r0, 16 - cmp r8, r1 - bgt _0808E06E - ldr r2, [sp, 0xC] - lsls r0, r2, 16 - asrs r0, 16 - cmp r0, r1 - blt _0808E06E - ldrh r0, [r4, 0x14] - bl FlagGet - lsls r0, 24 - cmp r0, 0 - bne _0808E06E - ldr r3, =gSaveBlock1Ptr - ldr r0, [r3] - ldrb r1, [r0, 0x5] - ldrb r2, [r0, 0x4] - ldr r7, [sp, 0x4] - lsls r3, r7, 16 - ldr r7, [sp, 0x8] - lsls r0, r7, 16 - asrs r0, 16 - str r0, [sp] - adds r0, r4, 0 - asrs r3, 16 - bl SpawnFieldObject -_0808E06E: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, r6 - bcc _0808E004 -_0808E078: - add sp, 0x10 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end SpawnFieldObjectsInView - thumb_func_start RemoveFieldObjectsOutsideView @ void RemoveFieldObjectsOutsideView() RemoveFieldObjectsOutsideView: @ 808E08C diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 82e74747d..b6a7f9c9a 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -695,3 +695,47 @@ u8 sprite_new(u8 graphicsId, u8 a1, s16 x, s16 y, u8 z, u8 direction) } return spriteId; } + +void SpawnFieldObjectsInView(s16 cameraX, s16 cameraY) +{ + u8 i; + s16 left; + s16 right; + s16 top; + s16 bottom; + u8 objectCount; + s16 npcX; + s16 npcY; + + if (gMapHeader.events != NULL) + { + left = gSaveBlock1Ptr->pos.x - 2; + right = gSaveBlock1Ptr->pos.x + 17; + top = gSaveBlock1Ptr->pos.y; + bottom = gSaveBlock1Ptr->pos.y + 16; + + if (InBattlePyramid()) + { + objectCount = sub_81AAA40(); + } + else if (InTrainerHill()) + { + objectCount = 2; + } + else + { + objectCount = gMapHeader.events->mapObjectCount; + } + + for (i = 0; i < objectCount; i++) + { + struct MapObjectTemplate *template = &gSaveBlock1Ptr->mapObjectTemplates[i]; + npcX = template->x + 7; + npcY = template->y + 7; + + if (top <= npcY && bottom >= npcY && left <= npcX && right >= npcX + && !FlagGet(template->flagId)) + SpawnFieldObject(template, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, cameraX, cameraY); + } + } +} From 341a4735bc3e702104574055b97f1d691668bc14 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 7 Sep 2017 16:09:59 -0400 Subject: [PATCH 026/342] RemoveFieldObjectsOutsideView --- asm/field_control_avatar.s | 2 +- asm/field_map_obj.s | 53 +------------------------------------- asm/rom4.s | 28 ++++++++++---------- include/rom4.h | 22 ++++++++++++++++ src/field_map_obj.c | 25 ++++++++++++++++++ sym_ewram.txt | 2 +- 6 files changed, 64 insertions(+), 68 deletions(-) diff --git a/asm/field_control_avatar.s b/asm/field_control_avatar.s index 3b1052473..4f29f2b3a 100644 --- a/asm/field_control_avatar.s +++ b/asm/field_control_avatar.s @@ -567,7 +567,7 @@ _0809C32E: .pool _0809C33C: movs r4, 0 - ldr r1, =gUnknown_02032308 + ldr r1, =gLinkPlayerMapObjects _0809C340: ldrb r0, [r1] cmp r0, 0x1 diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index af47dd1f0..3b3d230ab 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,57 +5,6 @@ .text - thumb_func_start RemoveFieldObjectsOutsideView -@ void RemoveFieldObjectsOutsideView() -RemoveFieldObjectsOutsideView: @ 808E08C - push {r4-r6,lr} - movs r3, 0 - ldr r6, =gUnknown_02032308 -_0808E092: - movs r2, 0 - movs r4, 0 - adds r5, r3, 0x1 -_0808E098: - lsls r0, r2, 2 - adds r1, r0, r6 - ldrb r0, [r1] - cmp r0, 0 - beq _0808E0AA - ldrb r1, [r1, 0x2] - cmp r3, r1 - bne _0808E0AA - movs r4, 0x1 -_0808E0AA: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0x3 - bls _0808E098 - cmp r4, 0 - bne _0808E0D2 - lsls r0, r3, 3 - adds r0, r3 - lsls r0, 2 - ldr r1, =gMapObjects - adds r2, r0, r1 - ldr r0, [r2] - ldr r1, =0x00010001 - ands r0, r1 - cmp r0, 0x1 - bne _0808E0D2 - adds r0, r2, 0 - bl RemoveFieldObjectIfOutsideView -_0808E0D2: - lsls r0, r5, 24 - lsrs r3, r0, 24 - cmp r3, 0xF - bls _0808E092 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end RemoveFieldObjectsOutsideView - thumb_func_start RemoveFieldObjectIfOutsideView @ void RemoveFieldObjectIfOutsideView(npc_state *fieldObject) RemoveFieldObjectIfOutsideView: @ 808E0EC @@ -183,7 +132,7 @@ sub_808E1B8: @ 808E1B8 lsrs r2, 16 str r2, [sp, 0x24] movs r7, 0 - ldr r2, =gUnknown_02032308 + ldr r2, =gLinkPlayerMapObjects _0808E1DA: lsls r0, r7, 2 adds r1, r0, r2 diff --git a/asm/rom4.s b/asm/rom4.s index bf16055e7..b36de6f2e 100644 --- a/asm/rom4.s +++ b/asm/rom4.s @@ -5480,7 +5480,7 @@ sub_80872D8: @ 80872D8 movs r0, 0x1 _080872EA: strb r0, [r6, 0x1] - ldr r1, =gUnknown_02032308 + ldr r1, =gLinkPlayerMapObjects lsls r0, r4, 2 adds r0, r1 ldrb r0, [r0, 0x3] @@ -5977,7 +5977,7 @@ sub_80876C4: @ 80876C4 thumb_func_start strange_npc_table_clear strange_npc_table_clear: @ 80876CC push {lr} - ldr r0, =gUnknown_02032308 + ldr r0, =gLinkPlayerMapObjects movs r1, 0 movs r2, 0x10 bl memset @@ -6025,7 +6025,7 @@ sub_80876F0: @ 80876F0 lsls r6, 24 lsrs r6, 24 lsls r4, r7, 2 - ldr r0, =gUnknown_02032308 + ldr r0, =gLinkPlayerMapObjects adds r4, r0 lsls r5, r6, 3 adds r5, r6 @@ -6118,7 +6118,7 @@ sub_80877DC: @ 80877DC lsls r0, 24 lsls r1, 24 lsrs r2, r1, 24 - ldr r1, =gUnknown_02032308 + ldr r1, =gLinkPlayerMapObjects lsrs r0, 22 adds r1, r0, r1 ldrb r0, [r1] @@ -6142,7 +6142,7 @@ sub_808780C: @ 808780C push {r4,r5,lr} lsls r0, 24 lsrs r0, 22 - ldr r1, =gUnknown_02032308 + ldr r1, =gLinkPlayerMapObjects adds r5, r0, r1 ldrb r1, [r5, 0x2] lsls r0, r1, 3 @@ -6176,7 +6176,7 @@ _08087838: thumb_func_start sub_8087858 sub_8087858: @ 8087858 lsls r0, 24 - ldr r1, =gUnknown_02032308 + ldr r1, =gLinkPlayerMapObjects lsrs r0, 22 adds r0, r1 ldrb r1, [r0, 0x2] @@ -6193,7 +6193,7 @@ sub_8087858: @ 8087858 thumb_func_start sub_8087878 sub_8087878: @ 8087878 lsls r0, 24 - ldr r3, =gUnknown_02032308 + ldr r3, =gLinkPlayerMapObjects lsrs r0, 22 adds r0, r3 ldrb r3, [r0, 0x2] @@ -6213,7 +6213,7 @@ sub_8087878: @ 8087878 thumb_func_start sub_80878A0 sub_80878A0: @ 80878A0 lsls r0, 24 - ldr r1, =gUnknown_02032308 + ldr r1, =gLinkPlayerMapObjects lsrs r0, 22 adds r0, r1 ldrb r1, [r0, 0x2] @@ -6230,7 +6230,7 @@ sub_80878A0: @ 80878A0 thumb_func_start sub_80878C0 sub_80878C0: @ 80878C0 lsls r0, 24 - ldr r1, =gUnknown_02032308 + ldr r1, =gLinkPlayerMapObjects lsrs r0, 22 adds r0, r1 ldrb r1, [r0, 0x2] @@ -6249,7 +6249,7 @@ sub_80878C0: @ 80878C0 thumb_func_start sub_80878E4 sub_80878E4: @ 80878E4 lsls r0, 24 - ldr r1, =gUnknown_02032308 + ldr r1, =gLinkPlayerMapObjects lsrs r0, 22 adds r0, r1 ldrb r1, [r0, 0x2] @@ -6271,7 +6271,7 @@ sub_80878E4: @ 80878E4 sub_808790C: @ 808790C push {r4-r6,lr} movs r2, 0 - ldr r5, =gUnknown_02032308 + ldr r5, =gLinkPlayerMapObjects lsls r0, 16 asrs r4, r0, 16 lsls r1, 16 @@ -6326,7 +6326,7 @@ sub_808796C: @ 808796C lsrs r3, r1, 24 adds r2, r3, 0 lsrs r0, 22 - ldr r1, =gUnknown_02032308 + ldr r1, =gLinkPlayerMapObjects adds r5, r0, r1 ldrb r1, [r5, 0x2] lsls r0, r1, 3 @@ -6654,7 +6654,7 @@ sub_8087BCC: @ 8087BCC lsls r1, 24 lsrs r3, r1, 24 lsls r2, r5, 2 - ldr r0, =gUnknown_02032308 + ldr r0, =gLinkPlayerMapObjects adds r2, r0 ldrb r1, [r2, 0x2] lsls r0, r1, 3 @@ -6742,7 +6742,7 @@ sub_8087C8C: @ 8087C8C movs r0, 0x2E ldrsh r4, [r5, r0] lsls r4, 2 - ldr r0, =gUnknown_02032308 + ldr r0, =gLinkPlayerMapObjects adds r4, r0 ldrb r1, [r4, 0x2] lsls r0, r1, 3 diff --git a/include/rom4.h b/include/rom4.h index 956160afb..655ce3fde 100644 --- a/include/rom4.h +++ b/include/rom4.h @@ -2,6 +2,28 @@ #ifndef POKEEMERALD_ROM4_H #define POKEEMERALD_ROM4_H +struct UnkPlayerStruct +{ + u8 player_field_0; + u8 player_field_1; +}; + +struct LinkPlayerMapObject +{ + u8 active; + u8 linkPlayerId; + u8 mapObjId; + u8 mode; +}; + +struct UCoords32 +{ + u32 x, y; +}; + + +extern struct LinkPlayerMapObject gLinkPlayerMapObjects[4]; + void strange_npc_table_clear(void); #endif //POKEEMERALD_ROM4_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index b6a7f9c9a..0d04c4063 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -33,6 +33,7 @@ void sub_8096518(struct MapObject *, struct Sprite *); /*static*/ void GetFieldObjectMovingCameraOffset(s16 *, s16 *); /*static*/ struct MapObjectTemplate *GetFieldObjectTemplateByLocalIdAndMap(u8, u8, u8); /*static*/ void sub_808E894(u16); +/*static*/ void RemoveFieldObjectIfOutsideView(struct MapObject *mapObject); // ROM data @@ -739,3 +740,27 @@ void SpawnFieldObjectsInView(s16 cameraX, s16 cameraY) } } } + +void RemoveFieldObjectsOutsideView(void) +{ + u8 i; + u8 j; + bool8 isActiveLinkPlayer; + struct MapObject *mapObject; + + for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + { + for (j = 0, isActiveLinkPlayer = FALSE; j < ARRAY_COUNT(gLinkPlayerMapObjects); j ++) + { + if (gLinkPlayerMapObjects[j].active && i == gLinkPlayerMapObjects[j].mapObjId) + isActiveLinkPlayer = TRUE; + } + if (!isActiveLinkPlayer) + { + mapObject = &gMapObjects[i]; + + if (mapObject->active && !mapObject->mapobj_bit_16) + RemoveFieldObjectIfOutsideView(mapObject); + } + } +} diff --git a/sym_ewram.txt b/sym_ewram.txt index bfe8faeb9..f1a138b7a 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -740,7 +740,7 @@ gUnknown_02032304: @ 2032304 gUnknown_02032306: @ 2032306 .space 0x2 -gUnknown_02032308: @ 2032308 +gLinkPlayerMapObjects: @ 2032308 .space 0x10 gUnknown_02032318: @ 2032318 From 44be18e1dfc9a0eb58159b219762b3397d89e449 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 7 Sep 2017 17:41:56 -0400 Subject: [PATCH 027/342] RemoveFieldObjectIfOutsideView --- asm/field_map_obj.s | 69 --------------------------------------------- src/field_map_obj.c | 21 ++++++++++++++ 2 files changed, 21 insertions(+), 69 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 3b3d230ab..61b470b55 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,75 +5,6 @@ .text - thumb_func_start RemoveFieldObjectIfOutsideView -@ void RemoveFieldObjectIfOutsideView(npc_state *fieldObject) -RemoveFieldObjectIfOutsideView: @ 808E0EC - push {r4-r7,lr} - adds r3, r0, 0 - ldr r0, =gSaveBlock1Ptr - ldr r2, [r0] - ldrh r0, [r2] - subs r1, r0, 0x2 - lsls r1, 16 - adds r0, 0x11 - lsls r0, 16 - lsrs r5, r0, 16 - ldrh r4, [r2, 0x2] - adds r0, r4, 0 - adds r0, 0x10 - lsls r0, 16 - lsrs r6, r0, 16 - movs r0, 0x10 - ldrsh r2, [r3, r0] - lsrs r7, r1, 16 - asrs r1, 16 - cmp r2, r1 - blt _0808E132 - lsls r0, r5, 16 - asrs r0, 16 - cmp r2, r0 - bgt _0808E132 - movs r0, 0x12 - ldrsh r1, [r3, r0] - lsls r0, r4, 16 - asrs r0, 16 - cmp r1, r0 - blt _0808E132 - lsls r0, r6, 16 - asrs r0, 16 - cmp r1, r0 - ble _0808E160 -_0808E132: - movs r0, 0xC - ldrsh r1, [r3, r0] - lsls r0, r7, 16 - asrs r0, 16 - cmp r1, r0 - blt _0808E15A - lsls r0, r5, 16 - asrs r0, 16 - cmp r1, r0 - bgt _0808E15A - movs r0, 0xE - ldrsh r1, [r3, r0] - lsls r0, r4, 16 - asrs r0, 16 - cmp r1, r0 - blt _0808E15A - lsls r0, r6, 16 - asrs r0, 16 - cmp r1, r0 - ble _0808E160 -_0808E15A: - adds r0, r3, 0 - bl RemoveFieldObject -_0808E160: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end RemoveFieldObjectIfOutsideView - thumb_func_start sub_808E16C sub_808E16C: @ 808E16C push {r4-r7,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 0d04c4063..caf43ce6a 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -764,3 +764,24 @@ void RemoveFieldObjectsOutsideView(void) } } } + +void RemoveFieldObjectIfOutsideView(struct MapObject *mapObject) +{ + s16 left; + s16 right; + s16 top; + s16 bottom; + + left = gSaveBlock1Ptr->pos.x - 2; + right = gSaveBlock1Ptr->pos.x + 17; + top = gSaveBlock1Ptr->pos.y; + bottom = gSaveBlock1Ptr->pos.y + 16; + + if (mapObject->coords2.x >= left && mapObject->coords2.x <= right + && mapObject->coords2.y >= top && mapObject->coords2.y <= bottom) + return; + if (mapObject->coords1.x >= left && mapObject->coords1.x <= right + && mapObject->coords1.y >= top && mapObject->coords1.y <= bottom) + return; + RemoveFieldObject(mapObject); +} From 113482a7cc748d80526de6b981887c5eca30f6b5 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 7 Sep 2017 18:54:51 -0400 Subject: [PATCH 028/342] sub_808E16C --- asm/field_map_obj.s | 40 ---------------------------------------- src/field_map_obj.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 40 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 61b470b55..0e90f7562 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,46 +5,6 @@ .text - thumb_func_start sub_808E16C -sub_808E16C: @ 808E16C - push {r4-r7,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r4, 16 - lsrs r4, 16 - lsls r5, 16 - lsrs r5, 16 - bl ClearPlayerAvatarInfo - movs r6, 0 - ldr r7, =gMapObjects - lsls r4, 16 - lsls r5, 16 -_0808E186: - lsls r0, r6, 3 - adds r0, r6 - lsls r0, 2 - adds r0, r7 - ldrb r0, [r0] - lsls r0, 31 - cmp r0, 0 - beq _0808E1A0 - adds r0, r6, 0 - asrs r1, r4, 16 - asrs r2, r5, 16 - bl sub_808E1B8 -_0808E1A0: - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, 0xF - bls _0808E186 - bl sub_808D450 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_808E16C - thumb_func_start sub_808E1B8 sub_808E1B8: @ 808E1B8 push {r4-r7,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index caf43ce6a..3e3f22a45 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -34,6 +34,7 @@ void sub_8096518(struct MapObject *, struct Sprite *); /*static*/ struct MapObjectTemplate *GetFieldObjectTemplateByLocalIdAndMap(u8, u8, u8); /*static*/ void sub_808E894(u16); /*static*/ void RemoveFieldObjectIfOutsideView(struct MapObject *mapObject); +/*static*/ void sub_808E1B8(u8, s16, s16); // ROM data @@ -785,3 +786,18 @@ void RemoveFieldObjectIfOutsideView(struct MapObject *mapObject) return; RemoveFieldObject(mapObject); } + +void sub_808E16C(s16 x, s16 y) +{ + u8 i; + + ClearPlayerAvatarInfo(); + for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + { + if (gMapObjects[i].active) + { + sub_808E1B8(i, x, y); + } + } + sub_808D450(); +} From de8ef5e12599098abd71c97f654192f6a8cbe900 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 7 Sep 2017 19:28:46 -0400 Subject: [PATCH 029/342] sub_808E1B8 --- asm/field_map_obj.s | 223 --------------------------------- include/field_effect_helpers.h | 15 +++ src/field_map_obj.c | 82 +++++++++++- 3 files changed, 95 insertions(+), 225 deletions(-) create mode 100644 include/field_effect_helpers.h diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 0e90f7562..aeca020ab 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,229 +5,6 @@ .text - thumb_func_start sub_808E1B8 -sub_808E1B8: @ 808E1B8 - 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 r9, r0 - lsls r1, 16 - lsrs r1, 16 - mov r10, r1 - lsls r2, 16 - lsrs r2, 16 - str r2, [sp, 0x24] - movs r7, 0 - ldr r2, =gLinkPlayerMapObjects -_0808E1DA: - lsls r0, r7, 2 - adds r1, r0, r2 - ldrb r0, [r1] - cmp r0, 0 - beq _0808E1EC - ldrb r1, [r1, 0x2] - cmp r9, r1 - bne _0808E1EC - b _0808E374 -_0808E1EC: - adds r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 - cmp r7, 0x3 - bls _0808E1DA - mov r1, r9 - lsls r0, r1, 3 - add r0, r9 - lsls r0, 2 - ldr r1, =gMapObjects - adds r6, r0, r1 - movs r0, 0 - str r0, [sp, 0x20] - ldrb r0, [r6, 0x5] - bl GetFieldObjectGraphicsInfo - adds r5, r0, 0 - ldrh r2, [r5, 0x6] - ldr r1, =0xffff0000 - add r4, sp, 0x18 - ldr r0, [r4, 0x4] - ands r0, r1 - orrs r0, r2 - str r0, [r4, 0x4] - ldrb r0, [r6, 0x5] - ldrb r1, [r6, 0x6] - add r3, sp, 0x20 - mov r2, sp - bl MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex - str r4, [sp, 0xC] - mov r1, sp - ldr r2, =0x0000ffff - adds r0, r2, 0 - strh r0, [r1, 0x2] - ldrb r0, [r5, 0xC] - lsls r1, r0, 28 - lsrs r0, r1, 28 - mov r8, r0 - cmp r0, 0 - bne _0808E258 - ldrh r0, [r5, 0x2] - lsrs r1, 28 - bl npc_load_two_palettes__no_record - b _0808E27E - .pool -_0808E258: - mov r2, r8 - cmp r2, 0xA - bne _0808E268 - ldrh r0, [r5, 0x2] - lsrs r1, 28 - bl npc_load_two_palettes__and_record - b _0808E27E -_0808E268: - mov r0, r8 - cmp r0, 0xF - bls _0808E27E - subs r0, 0x10 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - ldrh r0, [r5, 0x2] - mov r1, r8 - bl sub_808EAB0 -_0808E27E: - mov r1, sp - ldr r2, =0x0000ffff - adds r0, r2, 0 - strh r0, [r1, 0x2] - mov r0, sp - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r7, r0, 24 - cmp r7, 0x40 - beq _0808E374 - lsls r0, r7, 4 - adds r0, r7 - lsls r0, 2 - ldr r1, =gSprites - adds r4, r0, r1 - mov r1, r10 - lsls r0, r1, 16 - asrs r0, 16 - ldrh r2, [r6, 0x10] - adds r0, r2 - lsls r0, 16 - asrs r0, 16 - ldr r2, [sp, 0x24] - lsls r1, r2, 16 - asrs r1, 16 - ldrh r2, [r6, 0x12] - adds r1, r2 - lsls r1, 16 - asrs r1, 16 - adds r2, r4, 0 - adds r2, 0x20 - adds r3, r4, 0 - adds r3, 0x22 - bl sub_8092FF0 - ldrh r0, [r5, 0x8] - lsls r0, 16 - asrs r0, 17 - negs r0, r0 - adds r1, r4, 0 - adds r1, 0x28 - strb r0, [r1] - ldrh r0, [r5, 0xA] - lsls r0, 16 - asrs r0, 17 - negs r0, r0 - adds r2, r4, 0 - adds r2, 0x29 - strb r0, [r2] - ldrh r0, [r4, 0x20] - adds r0, 0x8 - strh r0, [r4, 0x20] - ldrh r1, [r4, 0x22] - adds r1, 0x10 - movs r0, 0 - ldrsb r0, [r2, r0] - adds r0, r1 - strh r0, [r4, 0x22] - ldr r0, [r5, 0x1C] - str r0, [r4, 0xC] - ldrb r0, [r6, 0x6] - cmp r0, 0xB - bne _0808E312 - mov r0, r9 - adds r1, r7, 0 - bl SetPlayerAvatarFieldObjectIdAndObjectId - bl sub_8154228 - strb r0, [r6, 0x1B] -_0808E312: - ldr r1, [sp, 0x20] - cmp r1, 0 - beq _0808E31E - adds r0, r4, 0 - bl SetSubspriteTables -_0808E31E: - mov r0, r8 - lsls r2, r0, 4 - ldrb r1, [r4, 0x5] - movs r0, 0xF - ands r0, r1 - orrs r0, r2 - strb r0, [r4, 0x5] - adds r2, r4, 0 - adds r2, 0x3E - ldrb r0, [r2] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r2] - mov r1, r9 - strh r1, [r4, 0x2E] - strb r7, [r6, 0x4] - ldrb r0, [r6, 0x1] - lsls r0, 27 - cmp r0, 0 - blt _0808E362 - ldrb r0, [r6, 0x6] - cmp r0, 0xB - beq _0808E362 - ldrb r0, [r6, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl FieldObjectDirectionToImageAnimId - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r4, 0 - bl StartSpriteAnim -_0808E362: - adds r0, r6, 0 - bl sub_808E38C - ldrb r0, [r6, 0xB] - lsrs r0, 4 - adds r1, r4, 0 - movs r2, 0x1 - bl SetObjectSubpriorityByZCoord -_0808E374: - add sp, 0x28 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_808E1B8 - thumb_func_start sub_808E38C @ void sub_808E38C(struct npc_state *fieldObject) sub_808E38C: @ 808E38C diff --git a/include/field_effect_helpers.h b/include/field_effect_helpers.h new file mode 100644 index 000000000..673d59139 --- /dev/null +++ b/include/field_effect_helpers.h @@ -0,0 +1,15 @@ +// +// Created by scott on 9/7/2017. +// + +#ifndef POKEEMERALD_FIELD_EFFECT_HELPERS_H +#define POKEEMERALD_FIELD_EFFECT_HELPERS_H + +// Exported type declarations + +// Exported RAM declarations + +// Exported ROM declarations +u8 sub_8154228(void); + +#endif //POKEEMERALD_FIELD_EFFECT_HELPERS_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 3e3f22a45..69aa2b8f8 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -10,6 +10,7 @@ #include "rom_81BE66C.h" #include "field_ground_effect.h" #include "map_obj_8097404.h" +#include "field_effect_helpers.h" #include "field_map_obj.h" #define NUM_FIELD_MAP_OBJECT_TEMPLATES 0x51 @@ -33,8 +34,10 @@ void sub_8096518(struct MapObject *, struct Sprite *); /*static*/ void GetFieldObjectMovingCameraOffset(s16 *, s16 *); /*static*/ struct MapObjectTemplate *GetFieldObjectTemplateByLocalIdAndMap(u8, u8, u8); /*static*/ void sub_808E894(u16); -/*static*/ void RemoveFieldObjectIfOutsideView(struct MapObject *mapObject); -/*static*/ void sub_808E1B8(u8, s16, s16); +/*static*/ void RemoveFieldObjectIfOutsideView(struct MapObject *); +static void sub_808E1B8(u8, s16, s16); +/*static*/ void SetPlayerAvatarFieldObjectIdAndObjectId(u8, u8); +/*static*/ void sub_808E38C(struct MapObject *); // ROM data @@ -801,3 +804,78 @@ void sub_808E16C(s16 x, s16 y) } sub_808D450(); } + +static void sub_808E1B8(u8 mapObjectId, s16 x, s16 y) +{ + u8 spriteId; + u8 paletteSlot; + struct MapObject *mapObject; + const struct SubspriteTable *subspriteTables; + const struct MapObjectGraphicsInfo *graphicsInfo; + struct SpriteFrameImage spriteFrameImage; + struct SpriteTemplate spriteTemplate; + struct Sprite *sprite; + +#define i spriteId + for (i = 0; i < ARRAY_COUNT(gLinkPlayerMapObjects); i ++) + { + if (gLinkPlayerMapObjects[i].active && mapObjectId == gLinkPlayerMapObjects[i].mapObjId) + { + return; + } + } +#undef i + + mapObject = &gMapObjects[mapObjectId]; + subspriteTables = NULL; + graphicsInfo = GetFieldObjectGraphicsInfo(mapObject->graphicsId); + spriteFrameImage.size = graphicsInfo->size; + MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex(mapObject->graphicsId, mapObject->animPattern, &spriteTemplate, &subspriteTables); + spriteTemplate.images = &spriteFrameImage; + *(u16 *)&spriteTemplate.paletteTag = 0xffff; + paletteSlot = graphicsInfo->paletteSlot; + if (paletteSlot == 0) + { + npc_load_two_palettes__no_record(graphicsInfo->paletteTag1, graphicsInfo->paletteSlot); + } + else if (paletteSlot == 10) + { + npc_load_two_palettes__and_record(graphicsInfo->paletteTag1, graphicsInfo->paletteSlot); + } + else if (paletteSlot >= 16) + { + paletteSlot -= 16; + sub_808EAB0(graphicsInfo->paletteTag1, paletteSlot); + } + *(u16 *)&spriteTemplate.paletteTag = 0xffff; + spriteId = CreateSprite(&spriteTemplate, 0, 0, 0); + if (spriteId != MAX_SPRITES) + { + sprite = &gSprites[spriteId]; + sub_8092FF0(x + mapObject->coords2.x, y + mapObject->coords2.y, &sprite->pos1.x, &sprite->pos1.y); + sprite->centerToCornerVecX = -(graphicsInfo->width >> 1); + sprite->centerToCornerVecY = -(graphicsInfo->height >> 1); + sprite->pos1.x += 8; + sprite->pos1.y += 16 + sprite->centerToCornerVecY; + sprite->images = graphicsInfo->images; + if (mapObject->animPattern == 0x0b) + { + SetPlayerAvatarFieldObjectIdAndObjectId(mapObjectId, spriteId); + mapObject->mapobj_unk_1B = sub_8154228(); + } + if (subspriteTables != NULL) + { + SetSubspriteTables(sprite, subspriteTables); + } + sprite->oam.paletteNum = paletteSlot; + sprite->coordOffsetEnabled = TRUE; + sprite->data0 = mapObjectId; + mapObject->spriteId = spriteId; + if (!mapObject->mapobj_bit_12 && mapObject->animPattern != 0x0b) + { + StartSpriteAnim(sprite, FieldObjectDirectionToImageAnimId(mapObject->mapobj_unk_18)); + } + sub_808E38C(mapObject); + SetObjectSubpriorityByZCoord(mapObject->elevation, sprite, 1); + } +} From 11786cc325937ce4c0a37b3db40df26dcd785018 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 7 Sep 2017 19:45:30 -0400 Subject: [PATCH 030/342] sub_808E38C --- asm/field_map_obj.s | 32 -------------------------------- include/field_map_obj.h | 10 ++++++++-- src/field_map_obj.c | 41 +++++++++++++++++++++++++++-------------- 3 files changed, 35 insertions(+), 48 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index aeca020ab..299893a29 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,38 +5,6 @@ .text - thumb_func_start sub_808E38C -@ void sub_808E38C(struct npc_state *fieldObject) -sub_808E38C: @ 808E38C - push {lr} - ldrb r2, [r0] - movs r3, 0x3 - negs r3, r3 - adds r1, r3, 0 - ands r1, r2 - movs r2, 0x4 - orrs r1, r2 - strb r1, [r0] - ldrb r2, [r0, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r2 - ands r1, r3 - movs r2, 0x5 - negs r2, r2 - ands r1, r2 - subs r2, 0x4 - ands r1, r2 - subs r2, 0x8 - ands r1, r2 - subs r2, 0x10 - ands r1, r2 - strb r1, [r0, 0x2] - bl FieldObjectClearAnim - pop {r0} - bx r0 - thumb_func_end sub_808E38C - thumb_func_start SetPlayerAvatarFieldObjectIdAndObjectId @ void SetPlayerAvatarFieldObjectIdAndObjectId(u8 fieldObjectId, u8 objectId) SetPlayerAvatarFieldObjectIdAndObjectId: @ 808E3C4 diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 40f94ccab..3e7bdf932 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -14,16 +14,22 @@ u8 GetFieldObjectIdByLocalIdAndMap(u8, u8, u8); bool8 TryGetFieldObjectIdByLocalIdAndMap(u8, u8, u8, u8 *); u8 GetFieldObjectIdByXY(s16, s16); void FieldObjectSetDirection(struct MapObject *, u8); -u8 GetFieldObjectIdByXY(s16, s16); u8 sub_808D4F4(void); -void RemoveFieldObject(struct MapObject *); void RemoveFieldObjectByLocalIdAndMap(u8, u8, u8); void npc_load_two_palettes__no_record(u16, u8); void npc_load_two_palettes__and_record(u16, u8); +void sub_808E16C(s16, s16); void sub_808EAB0(u16, u8); void sub_8092FF0(s16, s16, s16 *, s16 *); u8 FieldObjectDirectionToImageAnimId(u8); void sub_80930E0(s16 *, s16 *, u8, u8); +void FieldObjectClearAnim(struct MapObject *); +void SpawnFieldObjectsInView(s16, s16); +u8 sprite_new(u8, u8, s16, s16, u8, u8); +u8 AddPseudoFieldObject(u16, void (*)(struct Sprite *), s16, s16, u8); +u8 show_sprite(u8, u8, u8); +u8 SpawnSpecialFieldObjectParametrized(u8, u8, u8, s16, s16, u8); +u8 SpawnSpecialFieldObject(struct MapObjectTemplate *); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 69aa2b8f8..469993068 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -21,7 +21,7 @@ // Static ROM declarations -void sub_808D450(void); +static void sub_808D450(void); static u8 GetFieldObjectIdByLocalId(u8); static u8 GetFieldObjectIdByLocalIdAndMapInternal(u8, u8, u8); static bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *); @@ -30,11 +30,11 @@ static void RemoveFieldObjectInternal (struct MapObject *); /*static*/ u16 GetFieldObjectFlagIdByFieldObjectId(u8); /*static*/ const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8); void sub_8096518(struct MapObject *, struct Sprite *); -/*static*/ void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); +static void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); /*static*/ void GetFieldObjectMovingCameraOffset(s16 *, s16 *); /*static*/ struct MapObjectTemplate *GetFieldObjectTemplateByLocalIdAndMap(u8, u8, u8); /*static*/ void sub_808E894(u16); -/*static*/ void RemoveFieldObjectIfOutsideView(struct MapObject *); +static void RemoveFieldObjectIfOutsideView(struct MapObject *); static void sub_808E1B8(u8, s16, s16); /*static*/ void SetPlayerAvatarFieldObjectIdAndObjectId(u8, u8); /*static*/ void sub_808E38C(struct MapObject *); @@ -74,7 +74,7 @@ void sub_808D438(void) sub_808D450(); } -/*static*/ void sub_808D450(void) +static void sub_808D450(void) { u8 spriteIdx; @@ -168,7 +168,7 @@ static u8 GetFieldObjectIdByLocalId(u8 localId) // This function has the same nonmatching quirk as in Ruby/Sapphire. #ifdef NONMATCHING -/*static*/ u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u8 mapId, u8 mapGroupId) +static u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u8 mapId, u8 mapGroupId) { u8 slot; struct MapObject *mapObject; @@ -219,7 +219,7 @@ static u8 GetFieldObjectIdByLocalId(u8 localId) return slot; } #else -/*static*/ __attribute__((naked)) u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u8 mapId, u8 mapGroupId) +static __attribute__((naked)) u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u8 mapId, u8 mapGroupId) { asm_unified("\tpush {r4-r7,lr}\n" "\tmov r7, r9\n" @@ -435,7 +435,7 @@ static bool8 GetAvailableFieldObjectSlot(u16 localId, u8 mapNum, u8 mapGroup, u8 return FALSE; } -void RemoveFieldObject(struct MapObject *mapObject) +static void RemoveFieldObject(struct MapObject *mapObject) { mapObject->active = FALSE; RemoveFieldObjectInternal(mapObject); @@ -472,7 +472,7 @@ void unref_sub_808D958(void) } } -u8 SpawnFieldObjectInternal(struct MapObjectTemplate *mapObjectTemplate, struct SpriteTemplate *spriteTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) +static u8 SpawnFieldObjectInternal(struct MapObjectTemplate *mapObjectTemplate, struct SpriteTemplate *spriteTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) { struct MapObject *mapObject; const struct MapObjectGraphicsInfo *graphicsInfo; @@ -533,7 +533,7 @@ u8 SpawnFieldObjectInternal(struct MapObjectTemplate *mapObjectTemplate, struct return mapObjectId; } -u8 SpawnFieldObject(struct MapObjectTemplate *mapObjectTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) +static u8 SpawnFieldObject(struct MapObjectTemplate *mapObjectTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) { const struct MapObjectGraphicsInfo *graphicsInfo; struct SpriteTemplate spriteTemplate; @@ -603,7 +603,7 @@ u8 show_sprite(u8 localId, u8 mapNum, u8 mapGroup) return SpawnFieldObject(mapObjectTemplate, mapNum, mapGroup, cameraX, cameraY); } -void MakeObjectTemplateFromFieldObjectGraphicsInfo(u16 graphicsId, void (*callback)(struct Sprite *), struct SpriteTemplate *sprTemplate, const struct SubspriteTable **subspriteTables) +static void MakeObjectTemplateFromFieldObjectGraphicsInfo(u16 graphicsId, void (*callback)(struct Sprite *), struct SpriteTemplate *sprTemplate, const struct SubspriteTable **subspriteTables) { const struct MapObjectGraphicsInfo *gfxInfo = GetFieldObjectGraphicsInfo(graphicsId); @@ -617,12 +617,12 @@ void MakeObjectTemplateFromFieldObjectGraphicsInfo(u16 graphicsId, void (*callba *subspriteTables = gfxInfo->subspriteTables; } -void MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex(u16 graphicsId, u16 callbackIndex, struct SpriteTemplate *sprTemplate, const struct SubspriteTable **subspriteTables) +static void MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex(u16 graphicsId, u16 callbackIndex, struct SpriteTemplate *sprTemplate, const struct SubspriteTable **subspriteTables) { MakeObjectTemplateFromFieldObjectGraphicsInfo(graphicsId, gUnknown_08505438[callbackIndex], sprTemplate, subspriteTables); } -void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *mapObjectTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) +static void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *mapObjectTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) { MakeObjectTemplateFromFieldObjectGraphicsInfoWithCallbackIndex(mapObjectTemplate->graphicsId, mapObjectTemplate->movementType, spriteTemplate, subspriteTables); } @@ -745,7 +745,7 @@ void SpawnFieldObjectsInView(s16 cameraX, s16 cameraY) } } -void RemoveFieldObjectsOutsideView(void) +/*static*/ void RemoveFieldObjectsOutsideView(void) { u8 i; u8 j; @@ -769,7 +769,7 @@ void RemoveFieldObjectsOutsideView(void) } } -void RemoveFieldObjectIfOutsideView(struct MapObject *mapObject) +static void RemoveFieldObjectIfOutsideView(struct MapObject *mapObject) { s16 left; s16 right; @@ -879,3 +879,16 @@ static void sub_808E1B8(u8 mapObjectId, s16 x, s16 y) SetObjectSubpriorityByZCoord(mapObject->elevation, sprite, 1); } } + +/*static*/ void sub_808E38C(struct MapObject *mapObject) +{ + mapObject->mapobj_bit_1 = FALSE; + mapObject->mapobj_bit_2 = TRUE; + mapObject->mapobj_bit_22 = FALSE; + mapObject->mapobj_bit_17 = FALSE; + mapObject->mapobj_bit_18 = FALSE; + mapObject->mapobj_bit_19 = FALSE; + mapObject->mapobj_bit_20 = FALSE; + mapObject->mapobj_bit_21 = FALSE; + FieldObjectClearAnim(mapObject); +} From f8e8adf82ec56e986ece7a5eb6de87977ce2f506 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 7 Sep 2017 20:04:59 -0400 Subject: [PATCH 031/342] SetPlayerAvatarFieldObjectIdAndObjectId --- asm/field_map_obj.s | 26 -------------------------- include/field_player_avatar.h | 2 ++ src/field_map_obj.c | 12 +++++++++++- 3 files changed, 13 insertions(+), 27 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 299893a29..a560fb8f7 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,32 +5,6 @@ .text - thumb_func_start SetPlayerAvatarFieldObjectIdAndObjectId -@ void SetPlayerAvatarFieldObjectIdAndObjectId(u8 fieldObjectId, u8 objectId) -SetPlayerAvatarFieldObjectIdAndObjectId: @ 808E3C4 - push {r4,r5,lr} - lsls r0, 24 - lsrs r0, 24 - ldr r5, =gPlayerAvatar - strb r0, [r5, 0x5] - strb r1, [r5, 0x4] - ldr r1, =gMapObjects - lsls r4, r0, 3 - adds r4, r0 - lsls r4, 2 - adds r4, r1 - ldrb r0, [r4, 0x5] - bl GetPlayerAvatarGenderByGraphicsId - strb r0, [r5, 0x7] - ldrb r0, [r4, 0x5] - movs r1, 0x20 - bl SetPlayerAvatarExtraStateTransition - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end SetPlayerAvatarFieldObjectIdAndObjectId - thumb_func_start FieldObjectSetGraphicsId @ void FieldObjectSetGraphicsId(npc_state *npcState, u8 graphicsId) FieldObjectSetGraphicsId: @ 808E3F8 diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 8438add26..5e2f0822c 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -6,5 +6,7 @@ #define POKEEMERALD_FIELD_PLAYER_AVATAR_H void ClearPlayerAvatarInfo(void); +void SetPlayerAvatarExtraStateTransition(u8, u8); +u8 GetPlayerAvatarGenderByGraphicsId(u8); #endif //POKEEMERALD_FIELD_PLAYER_AVATAR_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 469993068..53dd1a863 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -36,7 +36,7 @@ static void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate * /*static*/ void sub_808E894(u16); static void RemoveFieldObjectIfOutsideView(struct MapObject *); static void sub_808E1B8(u8, s16, s16); -/*static*/ void SetPlayerAvatarFieldObjectIdAndObjectId(u8, u8); +static void SetPlayerAvatarFieldObjectIdAndObjectId(u8, u8); /*static*/ void sub_808E38C(struct MapObject *); // ROM data @@ -205,6 +205,8 @@ static u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u mapObject->mapobj_unk_20 = gUnknown_085055CD[template->movementType]; FieldObjectSetDirection(mapObject, mapObject->mapobj_unk_20); FieldObjectHandleDynamicGraphicsId(mapObject); + + // This block is the culprit if (gUnknown_0850557C[mapObject->animPattern]) { if (mapObject->mapobj_unk_19 == 0) @@ -892,3 +894,11 @@ static void sub_808E1B8(u8 mapObjectId, s16 x, s16 y) mapObject->mapobj_bit_21 = FALSE; FieldObjectClearAnim(mapObject); } + +static void SetPlayerAvatarFieldObjectIdAndObjectId(u8 mapObjectId, u8 spriteId) +{ + gPlayerAvatar.mapObjectId = mapObjectId; + gPlayerAvatar.spriteId = spriteId; + gPlayerAvatar.gender = GetPlayerAvatarGenderByGraphicsId(gMapObjects[mapObjectId].graphicsId); + SetPlayerAvatarExtraStateTransition(gMapObjects[mapObjectId].graphicsId, 0x20); +} From a87b35f9a73c09994bbe389fc73299b185db1fac Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 7 Sep 2017 21:04:32 -0400 Subject: [PATCH 032/342] FieldObjectSetGraphicsId --- asm/field_map_obj.s | 134 ---------------------------------------- include/field_map_obj.h | 3 + src/field_map_obj.c | 41 ++++++++++++ 3 files changed, 44 insertions(+), 134 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index a560fb8f7..4bd603c83 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,140 +5,6 @@ .text - thumb_func_start FieldObjectSetGraphicsId -@ void FieldObjectSetGraphicsId(npc_state *npcState, u8 graphicsId) -FieldObjectSetGraphicsId: @ 808E3F8 - push {r4-r7,lr} - mov r7, r8 - push {r7} - adds r7, r0, 0 - lsls r1, 24 - lsrs r1, 24 - mov r8, r1 - mov r0, r8 - bl GetFieldObjectGraphicsInfo - adds r6, r0, 0 - ldrb r1, [r7, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r4, r0, r1 - ldrb r0, [r6, 0xC] - lsls r1, r0, 28 - lsrs r5, r1, 28 - cmp r5, 0 - bne _0808E434 - ldrh r0, [r6, 0x2] - adds r1, r5, 0 - bl pal_patch_for_npc - b _0808E456 - .pool -_0808E434: - cmp r5, 0xA - bne _0808E442 - ldrh r0, [r6, 0x2] - lsrs r1, 28 - bl npc_load_two_palettes__and_record - b _0808E456 -_0808E442: - cmp r5, 0xF - bls _0808E456 - adds r0, r5, 0 - subs r0, 0x10 - lsls r0, 24 - lsrs r5, r0, 24 - ldrh r0, [r6, 0x2] - adds r1, r5, 0 - bl sub_808EAB0 -_0808E456: - ldr r0, [r6, 0x10] - ldrb r2, [r0, 0x1] - lsrs r2, 6 - lsls r2, 6 - ldrb r3, [r4, 0x1] - movs r1, 0x3F - adds r0, r1, 0 - ands r0, r3 - orrs r0, r2 - strb r0, [r4, 0x1] - ldr r0, [r6, 0x10] - ldrb r0, [r0, 0x3] - lsrs r0, 6 - lsls r0, 6 - ldrb r2, [r4, 0x3] - ands r1, r2 - orrs r1, r0 - strb r1, [r4, 0x3] - ldr r0, [r6, 0x1C] - str r0, [r4, 0xC] - ldr r0, [r6, 0x18] - str r0, [r4, 0x8] - ldr r0, [r6, 0x14] - str r0, [r4, 0x18] - lsls r2, r5, 4 - ldrb r1, [r4, 0x5] - movs r0, 0xF - ands r0, r1 - orrs r0, r2 - strb r0, [r4, 0x5] - ldrb r1, [r6, 0xC] - lsls r1, 25 - lsrs r1, 31 - lsls r1, 4 - ldrb r2, [r7, 0x1] - movs r0, 0x11 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r7, 0x1] - mov r0, r8 - strb r0, [r7, 0x5] - movs r1, 0x10 - ldrsh r0, [r7, r1] - movs r2, 0x12 - ldrsh r1, [r7, r2] - adds r2, r4, 0 - adds r2, 0x20 - adds r3, r4, 0 - adds r3, 0x22 - bl sub_8093038 - ldrh r0, [r6, 0x8] - lsls r0, 16 - asrs r0, 17 - negs r0, r0 - adds r1, r4, 0 - adds r1, 0x28 - strb r0, [r1] - ldrh r0, [r6, 0xA] - lsls r0, 16 - asrs r0, 17 - negs r0, r0 - adds r2, r4, 0 - adds r2, 0x29 - strb r0, [r2] - ldrh r0, [r4, 0x20] - adds r0, 0x8 - strh r0, [r4, 0x20] - ldrh r1, [r4, 0x22] - adds r1, 0x10 - movs r0, 0 - ldrsb r0, [r2, r0] - adds r0, r1 - strh r0, [r4, 0x22] - ldrb r0, [r7, 0x1] - lsrs r0, 7 - cmp r0, 0 - beq _0808E4F8 - bl CameraObjectReset1 -_0808E4F8: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end FieldObjectSetGraphicsId - thumb_func_start sub_808E504 sub_808E504: @ 808E504 push {r4,lr} diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 3e7bdf932..14845b6d9 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -18,6 +18,7 @@ u8 sub_808D4F4(void); void RemoveFieldObjectByLocalIdAndMap(u8, u8, u8); void npc_load_two_palettes__no_record(u16, u8); void npc_load_two_palettes__and_record(u16, u8); +void pal_patch_for_npc(u16, u8); void sub_808E16C(s16, s16); void sub_808EAB0(u16, u8); void sub_8092FF0(s16, s16, s16 *, s16 *); @@ -30,6 +31,8 @@ u8 AddPseudoFieldObject(u16, void (*)(struct Sprite *), s16, s16, u8); u8 show_sprite(u8, u8, u8); u8 SpawnSpecialFieldObjectParametrized(u8, u8, u8, s16, s16, u8); u8 SpawnSpecialFieldObject(struct MapObjectTemplate *); +void sub_8093038(s16, s16, s16 *, s16 *); +void CameraObjectReset1(void); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 53dd1a863..bbdaaf6ec 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -902,3 +902,44 @@ static void SetPlayerAvatarFieldObjectIdAndObjectId(u8 mapObjectId, u8 spriteId) gPlayerAvatar.gender = GetPlayerAvatarGenderByGraphicsId(gMapObjects[mapObjectId].graphicsId); SetPlayerAvatarExtraStateTransition(gMapObjects[mapObjectId].graphicsId, 0x20); } + +void FieldObjectSetGraphicsId(struct MapObject *mapObject, u8 graphicsId) +{ + const struct MapObjectGraphicsInfo *graphicsInfo; + struct Sprite *sprite; + u8 paletteSlot; + + graphicsInfo = GetFieldObjectGraphicsInfo(graphicsId); + sprite = &gSprites[mapObject->spriteId]; + paletteSlot = graphicsInfo->paletteSlot; + if (paletteSlot == 0) + { + pal_patch_for_npc(graphicsInfo->paletteTag1, graphicsInfo->paletteSlot); + } + else if (paletteSlot == 10) + { + npc_load_two_palettes__and_record(graphicsInfo->paletteTag1, graphicsInfo->paletteSlot); + } + else if (paletteSlot >= 16) + { + paletteSlot -= 16; + sub_808EAB0(graphicsInfo->paletteTag1, paletteSlot); + } + sprite->oam.shape = graphicsInfo->oam->shape; + sprite->oam.size = graphicsInfo->oam->size; + sprite->images = graphicsInfo->images; + sprite->anims = graphicsInfo->anims; + sprite->subspriteTables = graphicsInfo->subspriteTables; + sprite->oam.paletteNum = paletteSlot; + mapObject->mapobj_bit_12 = graphicsInfo->inanimate; + mapObject->graphicsId = graphicsId; + sub_8093038(mapObject->coords2.x, mapObject->coords2.y, &sprite->pos1.x, &sprite->pos1.y); + sprite->centerToCornerVecX = -(graphicsInfo->width >> 1); + sprite->centerToCornerVecY = -(graphicsInfo->height >> 1); + sprite->pos1.x += 8; + sprite->pos1.y += 16 + sprite->centerToCornerVecY; + if (mapObject->mapobj_bit_15) + { + CameraObjectReset1(); + } +} From ad99377734e1f982a347e33da60c82bf1120c2f3 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 7 Sep 2017 21:17:55 -0400 Subject: [PATCH 033/342] unref_sub_808E504 --- asm/field_map_obj.s | 34 ---------------------------------- include/field_map_obj.h | 1 + src/field_map_obj.c | 12 +++++++++++- 3 files changed, 12 insertions(+), 35 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 4bd603c83..798da2ae5 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,40 +5,6 @@ .text - thumb_func_start sub_808E504 -sub_808E504: @ 808E504 - push {r4,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 24 - lsrs r4, r3, 24 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _0808E538 - mov r0, sp - ldrb r1, [r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - ldr r1, =gMapObjects - adds r0, r1 - adds r1, r4, 0 - bl FieldObjectSetGraphicsId -_0808E538: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_808E504 - thumb_func_start FieldObjectTurn @ void FieldObjectTurn(struct npc_state *fieldObject, u8 direction) FieldObjectTurn: @ 808E544 diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 14845b6d9..7b0905c93 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -33,6 +33,7 @@ u8 SpawnSpecialFieldObjectParametrized(u8, u8, u8, s16, s16, u8); u8 SpawnSpecialFieldObject(struct MapObjectTemplate *); void sub_8093038(s16, s16, s16 *, s16 *); void CameraObjectReset1(void); +void FieldObjectSetGraphicsId(struct MapObject *, u8); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index bbdaaf6ec..b85432e69 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -782,7 +782,7 @@ static void RemoveFieldObjectIfOutsideView(struct MapObject *mapObject) right = gSaveBlock1Ptr->pos.x + 17; top = gSaveBlock1Ptr->pos.y; bottom = gSaveBlock1Ptr->pos.y + 16; - + if (mapObject->coords2.x >= left && mapObject->coords2.x <= right && mapObject->coords2.y >= top && mapObject->coords2.y <= bottom) return; @@ -943,3 +943,13 @@ void FieldObjectSetGraphicsId(struct MapObject *mapObject, u8 graphicsId) CameraObjectReset1(); } } + +void unref_sub_808E504(u8 localId, u8 mapNum, u8 mapGroup, u8 graphicsId) +{ + u8 mapObjectId; + + if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId)) + { + FieldObjectSetGraphicsId(&gMapObjects[mapObjectId], graphicsId); + } +} From ddcce8c3bc831023894191ceac058b8f2fe31ced Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 8 Sep 2017 13:41:55 -0400 Subject: [PATCH 034/342] FieldObjectTurn --- asm/field_map_obj.s | 76 ----------------------------------------- include/field_map_obj.h | 2 ++ src/field_map_obj.c | 22 +++++++++++- 3 files changed, 23 insertions(+), 77 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 798da2ae5..e4e4850dc 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,82 +5,6 @@ .text - thumb_func_start FieldObjectTurn -@ void FieldObjectTurn(struct npc_state *fieldObject, u8 direction) -FieldObjectTurn: @ 808E544 - push {r4-r6,lr} - adds r6, r0, 0 - lsls r1, 24 - lsrs r1, 24 - bl FieldObjectSetDirection - ldrb r0, [r6, 0x1] - lsls r0, 27 - cmp r0, 0 - blt _0808E58A - ldrb r0, [r6, 0x4] - lsls r4, r0, 4 - adds r4, r0 - lsls r4, 2 - ldr r5, =gSprites - adds r4, r5 - ldrb r0, [r6, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl FieldObjectDirectionToImageAnimId - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r4, 0 - bl StartSpriteAnim - ldrb r1, [r6, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r1, 0 - bl SeekSpriteAnim -_0808E58A: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectTurn - - thumb_func_start FieldObjectTurnByLocalIdAndMap -@ void FieldObjectTurnByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId) -FieldObjectTurnByLocalIdAndMap: @ 808E594 - push {r4,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 24 - lsrs r4, r3, 24 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _0808E5C8 - mov r0, sp - ldrb r1, [r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - ldr r1, =gMapObjects - adds r0, r1 - adds r1, r4, 0 - bl FieldObjectTurn -_0808E5C8: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectTurnByLocalIdAndMap - thumb_func_start sub_808E5D4 sub_808E5D4: @ 808E5D4 push {lr} diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 7b0905c93..34e8d4ac0 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -34,6 +34,8 @@ u8 SpawnSpecialFieldObject(struct MapObjectTemplate *); void sub_8093038(s16, s16, s16 *, s16 *); void CameraObjectReset1(void); void FieldObjectSetGraphicsId(struct MapObject *, u8); +void FieldObjectTurn(struct MapObject *, u8); +void FieldObjectTurnByLocalIdAndMap(u8, u8, u8); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index b85432e69..55f1fd9fb 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -944,7 +944,7 @@ void FieldObjectSetGraphicsId(struct MapObject *mapObject, u8 graphicsId) } } -void unref_sub_808E504(u8 localId, u8 mapNum, u8 mapGroup, u8 graphicsId) +void FieldObjectSetGraphicsIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 graphicsId) { u8 mapObjectId; @@ -953,3 +953,23 @@ void unref_sub_808E504(u8 localId, u8 mapNum, u8 mapGroup, u8 graphicsId) FieldObjectSetGraphicsId(&gMapObjects[mapObjectId], graphicsId); } } + +void FieldObjectTurn(struct MapObject *mapObject, u8 direction) +{ + FieldObjectSetDirection(mapObject, direction); + if (!mapObject->mapobj_bit_12) + { + StartSpriteAnim(&gSprites[mapObject->spriteId], FieldObjectDirectionToImageAnimId(mapObject->mapobj_unk_18)); + SeekSpriteAnim(&gSprites[mapObject->spriteId], 0); + } +} + +void FieldObjectTurnByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 direction) +{ + u8 mapObjectId; + + if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId)) + { + FieldObjectTurn(&gMapObjects[mapObjectId], direction); + } +} From 9b98055ecc5174e92c1cf4bcad8f7a1ecc317581 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 13:46:21 -0400 Subject: [PATCH 035/342] PlayerObjectTurn --- asm/field_map_obj.s | 17 ----------------- include/field_map_obj.h | 2 +- src/field_map_obj.c | 5 +++++ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index e4e4850dc..18d5d3ed5 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,23 +5,6 @@ .text - thumb_func_start sub_808E5D4 -sub_808E5D4: @ 808E5D4 - push {lr} - lsls r1, 24 - lsrs r1, 24 - ldrb r2, [r0, 0x5] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - bl FieldObjectTurn - pop {r0} - bx r0 - .pool - thumb_func_end sub_808E5D4 - thumb_func_start get_berry_tree_graphics @ void get_berry_tree_graphics(npc_state *npcState, struct obj *obj) get_berry_tree_graphics: @ 808E5F4 diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 34e8d4ac0..97c55f12a 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -35,7 +35,7 @@ void sub_8093038(s16, s16, s16 *, s16 *); void CameraObjectReset1(void); void FieldObjectSetGraphicsId(struct MapObject *, u8); void FieldObjectTurn(struct MapObject *, u8); -void FieldObjectTurnByLocalIdAndMap(u8, u8, u8); +void FieldObjectTurnByLocalIdAndMap(u8, u8, u8, u8); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 55f1fd9fb..4d5efd1b9 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -973,3 +973,8 @@ void FieldObjectTurnByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup, u8 direc FieldObjectTurn(&gMapObjects[mapObjectId], direction); } } + +void PlayerObjectTurn(struct PlayerAvatar *playerAvatar, u8 direction) +{ + FieldObjectTurn(&gMapObjects[playerAvatar->mapObjectId], direction); +} From 823f8d6a0c827025f280e1d57fb71959ca529fbe Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 14:05:45 -0400 Subject: [PATCH 036/342] get_berry_tree_graphics --- asm/field_map_obj.s | 77 --------------------------------------------- include/berry.h | 17 ++++++++++ src/field_map_obj.c | 26 +++++++++++++++ 3 files changed, 43 insertions(+), 77 deletions(-) create mode 100644 include/berry.h diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 18d5d3ed5..4d2cd9f9c 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,83 +5,6 @@ .text - thumb_func_start get_berry_tree_graphics -@ void get_berry_tree_graphics(npc_state *npcState, struct obj *obj) -get_berry_tree_graphics: @ 808E5F4 - push {r4-r7,lr} - adds r5, r0, 0 - adds r7, r1, 0 - ldrb r0, [r5, 0x1] - movs r1, 0x20 - orrs r0, r1 - strb r0, [r5, 0x1] - adds r4, r7, 0 - adds r4, 0x3E - ldrb r0, [r4] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r4] - ldrb r0, [r5, 0x1D] - bl GetStageByBerryTreeId - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, 0 - beq _0808E680 - ldrb r1, [r5, 0x1] - movs r0, 0x21 - negs r0, r0 - ands r0, r1 - strb r0, [r5, 0x1] - ldrb r1, [r4] - movs r0, 0x5 - negs r0, r0 - ands r0, r1 - strb r0, [r4] - ldrb r0, [r5, 0x1D] - bl GetBerryTypeByBerryTreeId - subs r0, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - subs r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - cmp r4, 0x2B - bls _0808E648 - movs r4, 0 -_0808E648: - ldr r0, =gBerryTreeFieldObjectGraphicsIdTablePointers - lsls r4, 2 - adds r0, r4, r0 - ldr r0, [r0] - adds r0, r6 - ldrb r1, [r0] - adds r0, r5, 0 - bl FieldObjectSetGraphicsId - ldr r0, =gBerryTreePicTablePointers - adds r0, r4, r0 - ldr r0, [r0] - str r0, [r7, 0xC] - ldr r0, =gBerryTreePaletteSlotTablePointers - adds r4, r0 - ldr r0, [r4] - adds r0, r6 - ldrb r1, [r0] - lsls r1, 4 - ldrb r2, [r7, 0x5] - movs r0, 0xF - ands r0, r2 - orrs r0, r1 - strb r0, [r7, 0x5] - adds r0, r7, 0 - adds r1, r6, 0 - bl StartSpriteAnim -_0808E680: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end get_berry_tree_graphics - thumb_func_start GetFieldObjectGraphicsInfo @ FieldObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8 graphicsId) GetFieldObjectGraphicsInfo: @ 808E694 diff --git a/include/berry.h b/include/berry.h new file mode 100644 index 000000000..6d8d8d483 --- /dev/null +++ b/include/berry.h @@ -0,0 +1,17 @@ +// +// Created by Scott Norton on 9/8/17. +// + +#ifndef POKEEMERALD_BERRY_H +#define POKEEMERALD_BERRY_H + +#define NUM_BERRIES 44 + +extern const u8 *const gBerryTreeFieldObjectGraphicsIdTablePointers[NUM_BERRIES]; +extern const struct SpriteFrameImage *const gBerryTreePicTablePointers[NUM_BERRIES]; +extern const u8 *const gBerryTreePaletteSlotTablePointers[NUM_BERRIES]; + +u8 GetStageByBerryTreeId(u8); +u8 GetBerryTypeByBerryTreeId(u8); + +#endif //POKEEMERALD_BERRY_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 4d5efd1b9..37ab01762 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4,6 +4,7 @@ #include "malloc.h" #include "sprite.h" #include "rom4.h" +#include "berry.h" #include "field_player_avatar.h" #include "event_data.h" #include "rom_818CFC8.h" @@ -978,3 +979,28 @@ void PlayerObjectTurn(struct PlayerAvatar *playerAvatar, u8 direction) { FieldObjectTurn(&gMapObjects[playerAvatar->mapObjectId], direction); } + +void get_berry_tree_graphics(struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 berryStage; + u8 berryId; + + mapObject->mapobj_bit_13 = TRUE; + sprite->invisible = TRUE; + berryStage = GetStageByBerryTreeId(mapObject->trainerRange_berryTreeId); + if (berryStage != 0) + { + mapObject->mapobj_bit_13 = FALSE; + sprite->invisible = FALSE; + berryId = GetBerryTypeByBerryTreeId(mapObject->trainerRange_berryTreeId) - 1; + berryStage -= 1; + if (berryId >= NUM_BERRIES) + { + berryId = 0; + } + FieldObjectSetGraphicsId(mapObject, gBerryTreeFieldObjectGraphicsIdTablePointers[berryId][berryStage]); + sprite->images = gBerryTreePicTablePointers[berryId]; + sprite->oam.paletteNum = gBerryTreePaletteSlotTablePointers[berryId][berryStage]; + StartSpriteAnim(sprite, berryStage); + } +} From e0b2e6cdbf0ff124a8e6a83f580418a06cee9df7 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 14:16:44 -0400 Subject: [PATCH 037/342] GetFieldObjectGraphicsInfo --- asm/field_map_obj.s | 40 -------------------------------------- include/field_map_obj.h | 5 +++-- include/mauville_old_man.h | 10 ++++++++++ src/field_map_obj.c | 25 +++++++++++++++++++++++- 4 files changed, 37 insertions(+), 43 deletions(-) create mode 100644 include/mauville_old_man.h diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 4d2cd9f9c..8179cb0ec 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,46 +5,6 @@ .text - thumb_func_start GetFieldObjectGraphicsInfo -@ FieldObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8 graphicsId) -GetFieldObjectGraphicsInfo: @ 808E694 - push {lr} - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0xEF - bls _0808E6AC - adds r0, r1, 0 - adds r0, 0x10 - lsls r0, 24 - lsrs r0, 24 - bl VarGetFieldObjectGraphicsId - adds r1, r0, 0 -_0808E6AC: - cmp r1, 0x45 - bne _0808E6C4 - bl sub_81201C8 - lsls r0, 24 - ldr r1, =gMauvilleOldManGraphicsInfoPointers - lsrs r0, 22 - adds r0, r1 - ldr r0, [r0] - b _0808E6D2 - .pool -_0808E6C4: - cmp r1, 0xEE - bls _0808E6CA - movs r1, 0x5 -_0808E6CA: - ldr r0, =gFieldObjectGraphicsInfoPointers - lsls r1, 2 - adds r1, r0 - ldr r0, [r1] -_0808E6D2: - pop {r1} - bx r1 - .pool - thumb_func_end GetFieldObjectGraphicsInfo - thumb_func_start FieldObjectHandleDynamicGraphicsId @ void FieldObjectHandleDynamicGraphicsId(struct npc_state *fieldObject) FieldObjectHandleDynamicGraphicsId: @ 808E6DC diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 97c55f12a..5eaee20d9 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -1,12 +1,13 @@ #ifndef POKEEMERALD_FIELD_MAP_OBJ_H #define POKEEMERALD_FIELD_MAP_OBJ_H +#define NUM_OBJECT_GRAPHICS_INFO 239 +#define SPRITE_VAR 240 + // Exported struct declarations // Exported RAM declarations - - // Exported ROM declarations void sub_808D438(void); diff --git a/include/mauville_old_man.h b/include/mauville_old_man.h new file mode 100644 index 000000000..5ed7b203b --- /dev/null +++ b/include/mauville_old_man.h @@ -0,0 +1,10 @@ +// +// Created by Scott Norton on 9/8/17. +// + +#ifndef POKEEMERALD_MAUVILLE_OLD_MAN_H +#define POKEEMERALD_MAUVILLE_OLD_MAN_H + +u8 sub_81201C8(void); + +#endif //POKEEMERALD_MAUVILLE_OLD_MAN_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 37ab01762..775a7b4e4 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -11,6 +11,7 @@ #include "rom_81BE66C.h" #include "field_ground_effect.h" #include "map_obj_8097404.h" +#include "mauville_old_man.h" #include "field_effect_helpers.h" #include "field_map_obj.h" @@ -45,6 +46,8 @@ static void SetPlayerAvatarFieldObjectIdAndObjectId(u8, u8); void (*const gUnknown_08505438[NUM_FIELD_MAP_OBJECT_TEMPLATES])(struct Sprite *); const u8 gUnknown_0850557C[NUM_FIELD_MAP_OBJECT_TEMPLATES]; const u8 gUnknown_085055CD[NUM_FIELD_MAP_OBJECT_TEMPLATES]; +const struct MapObjectGraphicsInfo *const gMauvilleOldManGraphicsInfoPointers[7]; +const struct MapObjectGraphicsInfo *const gFieldObjectGraphicsInfoPointers[0xEF]; // Code @@ -980,7 +983,7 @@ void PlayerObjectTurn(struct PlayerAvatar *playerAvatar, u8 direction) FieldObjectTurn(&gMapObjects[playerAvatar->mapObjectId], direction); } -void get_berry_tree_graphics(struct MapObject *mapObject, struct Sprite *sprite) +/*static*/ void get_berry_tree_graphics(struct MapObject *mapObject, struct Sprite *sprite) { u8 berryStage; u8 berryId; @@ -1004,3 +1007,23 @@ void get_berry_tree_graphics(struct MapObject *mapObject, struct Sprite *sprite) StartSpriteAnim(sprite, berryStage); } } + +const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8 graphicsId) +{ + u8 bard; + + if (graphicsId >= SPRITE_VAR) + { + graphicsId = VarGetFieldObjectGraphicsId(graphicsId - SPRITE_VAR); + } + if (graphicsId == 0x45) + { + bard = sub_81201C8(); + return gMauvilleOldManGraphicsInfoPointers[bard]; + } + if (graphicsId >= NUM_OBJECT_GRAPHICS_INFO) + { + graphicsId = 0x05; // LittleBoy1 + } + return gFieldObjectGraphicsInfoPointers[graphicsId]; +} From 511474cc15f8c7f52d4311b82898ee5c331b1260 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 14:20:13 -0400 Subject: [PATCH 038/342] FieldObjectHandleDynamicGraphicsId --- asm/field_map_obj.s | 19 ------------------- src/field_map_obj.c | 10 +++++++++- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 8179cb0ec..b41d6607e 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,25 +5,6 @@ .text - thumb_func_start FieldObjectHandleDynamicGraphicsId -@ void FieldObjectHandleDynamicGraphicsId(struct npc_state *fieldObject) -FieldObjectHandleDynamicGraphicsId: @ 808E6DC - push {r4,lr} - adds r4, r0, 0 - ldrb r0, [r4, 0x5] - cmp r0, 0xEF - bls _0808E6F2 - adds r0, 0x10 - lsls r0, 24 - lsrs r0, 24 - bl VarGetFieldObjectGraphicsId - strb r0, [r4, 0x5] -_0808E6F2: - pop {r4} - pop {r0} - bx r0 - thumb_func_end FieldObjectHandleDynamicGraphicsId - thumb_func_start npc_by_local_id_and_map_set_field_1_bit_x20 npc_by_local_id_and_map_set_field_1_bit_x20: @ 808E6F8 push {r4,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 775a7b4e4..c8d25341f 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -27,7 +27,7 @@ static void sub_808D450(void); static u8 GetFieldObjectIdByLocalId(u8); static u8 GetFieldObjectIdByLocalIdAndMapInternal(u8, u8, u8); static bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *); -/*static*/ void FieldObjectHandleDynamicGraphicsId(struct MapObject *); +static void FieldObjectHandleDynamicGraphicsId(struct MapObject *); static void RemoveFieldObjectInternal (struct MapObject *); /*static*/ u16 GetFieldObjectFlagIdByFieldObjectId(u8); /*static*/ const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8); @@ -1027,3 +1027,11 @@ const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8 graphicsId) } return gFieldObjectGraphicsInfoPointers[graphicsId]; } + +static void FieldObjectHandleDynamicGraphicsId(struct MapObject *mapObject) +{ + if (mapObject->graphicsId >= SPRITE_VAR) + { + mapObject->graphicsId = VarGetFieldObjectGraphicsId(mapObject->graphicsId - SPRITE_VAR); + } +} From 67955bb51a14b464add672774a50b67788cf56c6 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 14:36:58 -0400 Subject: [PATCH 039/342] npc_by_local_id_and_map_set_field_1_bit_x20 --- asm/field_map_obj.s | 42 ----------------------------------------- include/field_map_obj.h | 2 ++ src/field_map_obj.c | 11 ++++++++++- 3 files changed, 12 insertions(+), 43 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index b41d6607e..53565e334 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,48 +5,6 @@ .text - thumb_func_start npc_by_local_id_and_map_set_field_1_bit_x20 -npc_by_local_id_and_map_set_field_1_bit_x20: @ 808E6F8 - push {r4,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 24 - lsrs r4, r3, 24 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _0808E73A - ldr r2, =gMapObjects - mov r0, sp - ldrb r0, [r0] - lsls r1, r0, 3 - adds r1, r0 - lsls r1, 2 - adds r1, r2 - movs r0, 0x1 - adds r2, r4, 0 - ands r2, r0 - lsls r2, 5 - ldrb r3, [r1, 0x1] - movs r0, 0x21 - negs r0, r0 - ands r0, r3 - orrs r0, r2 - strb r0, [r1, 0x1] -_0808E73A: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end npc_by_local_id_and_map_set_field_1_bit_x20 - thumb_func_start FieldObjectGetLocalIdAndMap @ void FieldObjectGetLocalIdAndMap(struct npc_state *fieldObject, u8 *localId, u8 *mapId, u8 *mapGroupId) FieldObjectGetLocalIdAndMap: @ 808E748 diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 5eaee20d9..bf99cec87 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -37,6 +37,8 @@ void CameraObjectReset1(void); void FieldObjectSetGraphicsId(struct MapObject *, u8); void FieldObjectTurn(struct MapObject *, u8); void FieldObjectTurnByLocalIdAndMap(u8, u8, u8, u8); +const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8); +void npc_by_local_id_and_map_set_field_1_bit_x20(u8, u8, u8, u8); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index c8d25341f..bac056ee6 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -30,7 +30,6 @@ static bool8 GetAvailableFieldObjectSlot(u16, u8, u8, u8 *); static void FieldObjectHandleDynamicGraphicsId(struct MapObject *); static void RemoveFieldObjectInternal (struct MapObject *); /*static*/ u16 GetFieldObjectFlagIdByFieldObjectId(u8); -/*static*/ const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8); void sub_8096518(struct MapObject *, struct Sprite *); static void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); /*static*/ void GetFieldObjectMovingCameraOffset(s16 *, s16 *); @@ -1035,3 +1034,13 @@ static void FieldObjectHandleDynamicGraphicsId(struct MapObject *mapObject) mapObject->graphicsId = VarGetFieldObjectGraphicsId(mapObject->graphicsId - SPRITE_VAR); } } + +void npc_by_local_id_and_map_set_field_1_bit_x20(u8 localId, u8 mapNum, u8 mapGroup, u8 state) +{ + u8 mapObjectId; + + if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId)) + { + gMapObjects[mapObjectId].mapobj_bit_13 = state; + } +} From 05685f396150113bb4124493e6ada131e0e8307f Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 14:40:34 -0400 Subject: [PATCH 040/342] FieldObjectGetLocalIdAndMap --- asm/field_map_obj.s | 15 --------------- src/field_map_obj.c | 7 +++++++ 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 53565e334..def08bb9c 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,21 +5,6 @@ .text - thumb_func_start FieldObjectGetLocalIdAndMap -@ void FieldObjectGetLocalIdAndMap(struct npc_state *fieldObject, u8 *localId, u8 *mapId, u8 *mapGroupId) -FieldObjectGetLocalIdAndMap: @ 808E748 - push {r4,lr} - ldrb r4, [r0, 0x8] - strb r4, [r1] - ldrb r1, [r0, 0x9] - strb r1, [r2] - ldrb r0, [r0, 0xA] - strb r0, [r3] - pop {r4} - pop {r0} - bx r0 - thumb_func_end FieldObjectGetLocalIdAndMap - thumb_func_start sub_808E75C sub_808E75C: @ 808E75C push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index bac056ee6..94e2fb694 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1044,3 +1044,10 @@ void npc_by_local_id_and_map_set_field_1_bit_x20(u8 localId, u8 mapNum, u8 mapGr gMapObjects[mapObjectId].mapobj_bit_13 = state; } } + +void FieldObjectGetLocalIdAndMap(struct MapObject *mapObject, u8 *localId, u8 *mapNum, u8 *mapGroup) +{ + *localId = mapObject->localId; + *mapNum = mapObject->mapNum; + *mapGroup = mapObject->mapGroup; +} From 62eca9535836a9e57fd15c5ec9f12707d44d0597 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 14:53:00 -0400 Subject: [PATCH 041/342] sub_808E75C --- asm/field_map_obj.s | 27 --------------------- src/field_map_obj.c | 57 ++++++++++++++++++++++++++++----------------- 2 files changed, 35 insertions(+), 49 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index def08bb9c..27e136350 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,33 +5,6 @@ .text - thumb_func_start sub_808E75C -sub_808E75C: @ 808E75C - push {lr} - lsls r0, 16 - asrs r0, 16 - lsls r1, 16 - asrs r1, 16 - bl GetFieldObjectIdByXY - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0x10 - beq _0808E784 - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - ldr r1, =gMapObjects - adds r0, r1 - ldrb r1, [r0] - movs r2, 0x4 - orrs r1, r2 - strb r1, [r0] -_0808E784: - pop {r0} - bx r0 - .pool - thumb_func_end sub_808E75C - thumb_func_start sub_808E78C sub_808E78C: @ 808E78C push {r4,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 94e2fb694..ac4f85a47 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -63,7 +63,7 @@ static void npcs_clear_ids_and_state(void) { u8 i; - for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + for (i = 0; i < NUM_FIELD_OBJECTS; i ++) { npc_clear_ids_and_state(&gMapObjects[i]); } @@ -98,7 +98,7 @@ u8 sub_808D4F4(void) { u8 i; - for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + for (i = 0; i < NUM_FIELD_OBJECTS; i ++) { if (!gMapObjects[i].active) { @@ -120,7 +120,7 @@ u8 GetFieldObjectIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId) bool8 TryGetFieldObjectIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId, u8 *fieldObjectId) { *fieldObjectId = GetFieldObjectIdByLocalIdAndMap(localId, mapId, mapGroupId); - if (*fieldObjectId == ARRAY_COUNT(gMapObjects)) + if (*fieldObjectId == NUM_FIELD_OBJECTS) { return TRUE; } @@ -131,7 +131,7 @@ u8 GetFieldObjectIdByXY(s16 x, s16 y) { u8 i; - for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + for (i = 0; i < NUM_FIELD_OBJECTS; i ++) { if (gMapObjects[i].active && gMapObjects[i].coords2.x == x && gMapObjects[i].coords2.y == y) { @@ -145,28 +145,28 @@ static u8 GetFieldObjectIdByLocalIdAndMapInternal(u8 localId, u8 mapId, u8 mapGr { u8 i; - for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + for (i = 0; i < NUM_FIELD_OBJECTS; i ++) { if (gMapObjects[i].active && gMapObjects[i].localId == localId && gMapObjects[i].mapNum == mapId && gMapObjects[i].mapGroup == mapGroupId) { return i; } } - return ARRAY_COUNT(gMapObjects); + return NUM_FIELD_OBJECTS; } static u8 GetFieldObjectIdByLocalId(u8 localId) { u8 i; - for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + for (i = 0; i < NUM_FIELD_OBJECTS; i ++) { if (gMapObjects[i].active && gMapObjects[i].localId == localId) { return i; } } - return ARRAY_COUNT(gMapObjects); + return NUM_FIELD_OBJECTS; } // This function has the same nonmatching quirk as in Ruby/Sapphire. @@ -180,7 +180,7 @@ static u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u if (GetAvailableFieldObjectSlot(template->localId, mapId, mapGroupId, &slot)) { - return ARRAY_COUNT(gMapObjects); + return NUM_FIELD_OBJECTS; } mapObject = &gMapObjects[slot]; npc_clear_ids_and_state(mapObject); @@ -409,7 +409,7 @@ u8 unref_sub_808D77C(u8 localId) } } } - return ARRAY_COUNT(gMapObjects); + return NUM_FIELD_OBJECTS; } static bool8 GetAvailableFieldObjectSlot(u16 localId, u8 mapNum, u8 mapGroup, u8 *result) @@ -421,14 +421,14 @@ static bool8 GetAvailableFieldObjectSlot(u16 localId, u8 mapNum, u8 mapGroup, u8 { u8 i = 0; - for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + for (i = 0; i < NUM_FIELD_OBJECTS; i ++) { if (!gMapObjects[i].active) break; if (gMapObjects[i].localId == localId && gMapObjects[i].mapNum == mapNum && gMapObjects[i].mapGroup == mapGroup) return TRUE; } - if (i >= ARRAY_COUNT(gMapObjects)) + if (i >= NUM_FIELD_OBJECTS) return TRUE; *result = i; do @@ -436,7 +436,7 @@ static bool8 GetAvailableFieldObjectSlot(u16 localId, u8 mapNum, u8 mapGroup, u8 if (gMapObjects[i].active && gMapObjects[i].localId == localId && gMapObjects[i].mapNum == mapNum && gMapObjects[i].mapGroup == mapGroup) return TRUE; i ++; - } while (i < ARRAY_COUNT(gMapObjects)); + } while (i < NUM_FIELD_OBJECTS); return FALSE; } @@ -468,7 +468,7 @@ void unref_sub_808D958(void) { u8 i; - for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + for (i = 0; i < NUM_FIELD_OBJECTS; i ++) { if (i != gPlayerAvatar.mapObjectId) { @@ -487,9 +487,9 @@ static u8 SpawnFieldObjectInternal(struct MapObjectTemplate *mapObjectTemplate, u8 spriteId; mapObjectId = InitFieldObjectStateFromTemplate(mapObjectTemplate, mapNum, mapGroup); - if (mapObjectId == ARRAY_COUNT(gMapObjects)) + if (mapObjectId == NUM_FIELD_OBJECTS) { - return ARRAY_COUNT(gMapObjects); + return NUM_FIELD_OBJECTS; } mapObject = &gMapObjects[mapObjectId]; graphicsInfo = GetFieldObjectGraphicsInfo(mapObject->graphicsId); @@ -516,7 +516,7 @@ static u8 SpawnFieldObjectInternal(struct MapObjectTemplate *mapObjectTemplate, if (spriteId == MAX_SPRITES) { gMapObjects[mapObjectId].active = FALSE; - return ARRAY_COUNT(gMapObjects); + return NUM_FIELD_OBJECTS; } sprite = &gSprites[spriteId]; sub_8092FF0(mapObject->coords2.x + cameraX, mapObject->coords2.y + cameraY, &sprite->pos1.x, &sprite->pos1.y); @@ -552,9 +552,9 @@ static u8 SpawnFieldObject(struct MapObjectTemplate *mapObjectTemplate, u8 mapNu spriteFrameImage.size = graphicsInfo->size; spriteTemplate.images = &spriteFrameImage; mapObjectId = SpawnFieldObjectInternal(mapObjectTemplate, &spriteTemplate, mapNum, mapGroup, cameraX, cameraY); - if (mapObjectId == ARRAY_COUNT(gMapObjects)) + if (mapObjectId == NUM_FIELD_OBJECTS) { - return ARRAY_COUNT(gMapObjects); + return NUM_FIELD_OBJECTS; } gSprites[gMapObjects[mapObjectId].spriteId].images = graphicsInfo->images; if (subspriteTables != NULL) @@ -602,7 +602,7 @@ u8 show_sprite(u8 localId, u8 mapNum, u8 mapGroup) mapObjectTemplate = GetFieldObjectTemplateByLocalIdAndMap(localId, mapNum, mapGroup); if (mapObjectTemplate == NULL) { - return ARRAY_COUNT(gMapObjects); + return NUM_FIELD_OBJECTS; } GetFieldObjectMovingCameraOffset(&cameraX, &cameraY); return SpawnFieldObject(mapObjectTemplate, mapNum, mapGroup, cameraX, cameraY); @@ -757,7 +757,7 @@ void SpawnFieldObjectsInView(s16 cameraX, s16 cameraY) bool8 isActiveLinkPlayer; struct MapObject *mapObject; - for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + for (i = 0; i < NUM_FIELD_OBJECTS; i ++) { for (j = 0, isActiveLinkPlayer = FALSE; j < ARRAY_COUNT(gLinkPlayerMapObjects); j ++) { @@ -800,7 +800,7 @@ void sub_808E16C(s16 x, s16 y) u8 i; ClearPlayerAvatarInfo(); - for (i = 0; i < ARRAY_COUNT(gMapObjects); i ++) + for (i = 0; i < NUM_FIELD_OBJECTS; i ++) { if (gMapObjects[i].active) { @@ -1051,3 +1051,16 @@ void FieldObjectGetLocalIdAndMap(struct MapObject *mapObject, u8 *localId, u8 *m *mapNum = mapObject->mapNum; *mapGroup = mapObject->mapGroup; } + +void sub_808E75C(s16 x, s16 y) +{ + u8 mapObjectId; + struct MapObject *mapObject; + + mapObjectId = GetFieldObjectIdByXY(x, y); + if (mapObjectId != NUM_FIELD_OBJECTS) + { + mapObject = &gMapObjects[mapObjectId]; + mapObject->mapobj_bit_2 = TRUE; + } +} From 782f21f63e1ac8615203818ebb69f40e91cc70f2 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 14:58:17 -0400 Subject: [PATCH 042/342] sub_808E78C --- asm/field_map_obj.s | 44 -------------------------------------------- src/field_map_obj.c | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 44 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 27e136350..2eac13c30 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,50 +5,6 @@ .text - thumb_func_start sub_808E78C -sub_808E78C: @ 808E78C - push {r4,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 24 - lsrs r4, r3, 24 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _0808E7D2 - mov r0, sp - ldrb r0, [r0] - lsls r2, r0, 3 - adds r2, r0 - lsls r2, 2 - ldr r0, =gMapObjects - adds r2, r0 - ldrb r1, [r2, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - ldrb r1, [r2, 0x3] - movs r3, 0x4 - orrs r1, r3 - strb r1, [r2, 0x3] - adds r0, 0x43 - strb r4, [r0] -_0808E7D2: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_808E78C - thumb_func_start sub_808E7E4 sub_808E7E4: @ 808E7E4 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index ac4f85a47..a4d7e4097 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1064,3 +1064,18 @@ void sub_808E75C(s16 x, s16 y) mapObject->mapobj_bit_2 = TRUE; } } + +void sub_808E78C(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority) +{ + u8 mapObjectId; + struct MapObject *mapObject; + struct Sprite *sprite; + + if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId)) + { + mapObject = &gMapObjects[mapObjectId]; + sprite = &gSprites[mapObject->spriteId]; + mapObject->mapobj_bit_26 = TRUE; + sprite->subpriority = subpriority; + } +} From 8ef5d059550cb5d6d21639992e6ce67a9dd327f0 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 15:05:04 -0400 Subject: [PATCH 043/342] sub_808E7E4 --- asm/field_map_obj.s | 38 -------------------------------------- src/field_map_obj.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 38 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 2eac13c30..6375fd2a3 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,44 +5,6 @@ .text - thumb_func_start sub_808E7E4 -sub_808E7E4: @ 808E7E4 - push {lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _0808E820 - mov r0, sp - ldrb r0, [r0] - lsls r1, r0, 3 - adds r1, r0 - lsls r1, 2 - ldr r0, =gMapObjects - adds r1, r0 - ldrb r2, [r1, 0x3] - movs r0, 0x5 - negs r0, r0 - ands r0, r2 - strb r0, [r1, 0x3] - ldrb r0, [r1] - movs r2, 0x4 - orrs r0, r2 - strb r0, [r1] -_0808E820: - add sp, 0x4 - pop {r0} - bx r0 - .pool - thumb_func_end sub_808E7E4 - thumb_func_start sub_808E82C sub_808E82C: @ 808E82C push {r4,r5,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index a4d7e4097..910a58ffb 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1079,3 +1079,16 @@ void sub_808E78C(u8 localId, u8 mapNum, u8 mapGroup, u8 subpriority) sprite->subpriority = subpriority; } } + +void sub_808E7E4(u8 localId, u8 mapNum, u8 mapGroup) +{ + u8 mapObjectId; + struct MapObject *mapObject; + + if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId)) + { + mapObject = &gMapObjects[mapObjectId]; + mapObject->mapobj_bit_26 = FALSE; + mapObject->mapobj_bit_2 = TRUE; + } +} From d3edf5642ed0f76f678bb4c566a7c96eaf793fdd Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 15:08:10 -0400 Subject: [PATCH 044/342] sub_808E82C --- asm/field_map_obj.s | 43 ------------------------------------------- src/field_map_obj.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 43 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 6375fd2a3..bf6d371e8 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,49 +5,6 @@ .text - thumb_func_start sub_808E82C -sub_808E82C: @ 808E82C - push {r4,r5,lr} - sub sp, 0x4 - ldr r4, [sp, 0x10] - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 16 - lsrs r5, r3, 16 - lsls r4, 16 - lsrs r4, 16 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _0808E870 - ldr r2, =gMapObjects - mov r0, sp - ldrb r1, [r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - strh r5, [r0, 0x24] - strh r4, [r0, 0x26] -_0808E870: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_808E82C - thumb_func_start gpu_pal_allocator_reset__manage_upper_four gpu_pal_allocator_reset__manage_upper_four: @ 808E880 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 910a58ffb..5a31881ad 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1092,3 +1092,16 @@ void sub_808E7E4(u8 localId, u8 mapNum, u8 mapGroup) mapObject->mapobj_bit_2 = TRUE; } } + +void sub_808E82C(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y) +{ + u8 mapObjectId; + struct Sprite *sprite; + + if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId)) + { + sprite = &gSprites[gMapObjects[mapObjectId].spriteId]; + sprite->pos2.x = x; + sprite->pos2.y = y; + } +} From db2b371e70a8cbf1134866906c7eccaae7f65203 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 15:11:29 -0400 Subject: [PATCH 045/342] gpu_pal_allocator_reset__manage_upper_four --- asm/field_map_obj.s | 12 ------------ include/global.h | 2 ++ src/field_map_obj.c | 6 ++++++ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index bf6d371e8..e1925f10e 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,18 +5,6 @@ .text - thumb_func_start gpu_pal_allocator_reset__manage_upper_four -gpu_pal_allocator_reset__manage_upper_four: @ 808E880 - push {lr} - bl FreeAllSpritePalettes - ldr r1, =gReservedSpritePaletteCount - movs r0, 0xC - strb r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end gpu_pal_allocator_reset__manage_upper_four - thumb_func_start sub_808E894 sub_808E894: @ 808E894 push {lr} diff --git a/include/global.h b/include/global.h index 0c0f86470..c406c507f 100644 --- a/include/global.h +++ b/include/global.h @@ -730,4 +730,6 @@ struct Bitmap // TODO: Find a better spot for this u32 height:16; }; +extern u8 gReservedSpritePaletteCount; + #endif // GUARD_GLOBAL_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 5a31881ad..cb3390844 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1105,3 +1105,9 @@ void sub_808E82C(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y) sprite->pos2.y = y; } } + +void gpu_pal_allocator_reset__manage_upper_four(void) +{ + FreeAllSpritePalettes(); + gReservedSpritePaletteCount = 12; +} From 1de5a14a35f6da79a2bc603ce5a0cb3a116c31b0 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 15:18:03 -0400 Subject: [PATCH 046/342] sub_808E894 --- asm/field_map_obj.s | 21 --------------------- include/data3.h | 10 ++++++++++ src/field_map_obj.c | 14 ++++++++++++++ 3 files changed, 24 insertions(+), 21 deletions(-) create mode 100644 include/data3.h diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index e1925f10e..992f70a11 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,27 +5,6 @@ .text - thumb_func_start sub_808E894 -sub_808E894: @ 808E894 - push {lr} - lsls r0, 16 - lsrs r0, 16 - bl FindFieldObjectPaletteIndexByTag - lsls r0, 24 - lsrs r1, r0, 24 - ldr r0, =0x000011ff - cmp r1, r0 - beq _0808E8B2 - lsls r0, r1, 3 - ldr r1, =gUnknown_0850BBC8 - adds r0, r1 - bl sub_808E8F4 -_0808E8B2: - pop {r0} - bx r0 - .pool - thumb_func_end sub_808E894 - thumb_func_start sub_808E8C0 sub_808E8C0: @ 808E8C0 push {r4-r6,lr} diff --git a/include/data3.h b/include/data3.h new file mode 100644 index 000000000..1f082e3fb --- /dev/null +++ b/include/data3.h @@ -0,0 +1,10 @@ +// +// Created by Scott Norton on 9/8/17. +// + +#ifndef POKEEMERALD_DATA3_H +#define POKEEMERALD_DATA3_H + +extern const struct SpritePalette gUnknown_0850BBC8[]; + +#endif //POKEEMERALD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index cb3390844..7122bcc9e 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4,6 +4,7 @@ #include "malloc.h" #include "sprite.h" #include "rom4.h" +#include "data3.h" #include "berry.h" #include "field_player_avatar.h" #include "event_data.h" @@ -39,6 +40,8 @@ static void RemoveFieldObjectIfOutsideView(struct MapObject *); static void sub_808E1B8(u8, s16, s16); static void SetPlayerAvatarFieldObjectIdAndObjectId(u8, u8); /*static*/ void sub_808E38C(struct MapObject *); +/*static*/ void sub_808E8F4(const struct SpritePalette *); +/*static*/ u16 FindFieldObjectPaletteIndexByTag(u16); // ROM data @@ -1111,3 +1114,14 @@ void gpu_pal_allocator_reset__manage_upper_four(void) FreeAllSpritePalettes(); gReservedSpritePaletteCount = 12; } + +void sub_808E894(u16 paletteTag) +{ + u16 paletteSlot; + + paletteSlot = (u8)FindFieldObjectPaletteIndexByTag(paletteTag); + if (paletteSlot != 0x11ff) // always true + { + sub_808E8F4(&gUnknown_0850BBC8[paletteSlot]); + } +} From 444887ba228a94866641bfa2d420cf1903af1a82 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 15:21:32 -0400 Subject: [PATCH 047/342] sub_808E8C0 --- asm/field_map_obj.s | 30 ------------------------------ src/field_map_obj.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 30 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 992f70a11..faf5bb23c 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,36 +5,6 @@ .text - thumb_func_start sub_808E8C0 -sub_808E8C0: @ 808E8C0 - push {r4-r6,lr} - adds r5, r0, 0 - movs r4, 0 - ldrh r0, [r5] - ldr r1, =0x000011ff - cmp r0, r1 - beq _0808E8EA - adds r6, r1, 0 -_0808E8D0: - lsls r0, r4, 1 - adds r0, r5 - ldrh r0, [r0] - bl sub_808E894 - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - lsls r0, r4, 1 - adds r0, r5 - ldrh r0, [r0] - cmp r0, r6 - bne _0808E8D0 -_0808E8EA: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_808E8C0 - thumb_func_start sub_808E8F4 @ u8 sub_808E8F4(struct TaggedObjectPalette *taggedPalette) sub_808E8F4: @ 808E8F4 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 7122bcc9e..1ae142075 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1125,3 +1125,13 @@ void sub_808E894(u16 paletteTag) sub_808E8F4(&gUnknown_0850BBC8[paletteSlot]); } } + +void sub_808E8C0(u16 *paletteTags) +{ + u8 i; + + for (i = 0; paletteTags[i] != 0x11ff; i ++) + { + sub_808E894(paletteTags[i]); + } +} From 2d3ce87c4c653d1789192e0083ee93a2090cdca5 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 15:27:08 -0400 Subject: [PATCH 048/342] sub_808E8F4 --- asm/field_map_obj.s | 24 ------------------------ src/field_map_obj.c | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index faf5bb23c..6316bd0b7 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,30 +5,6 @@ .text - thumb_func_start sub_808E8F4 -@ u8 sub_808E8F4(struct TaggedObjectPalette *taggedPalette) -sub_808E8F4: @ 808E8F4 - push {r4,lr} - adds r4, r0, 0 - ldrh r0, [r4, 0x4] - bl IndexOfSpritePaletteTag - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - bne _0808E912 - adds r0, r4, 0 - bl LoadSpritePalette - lsls r0, 24 - lsrs r0, 24 - b _0808E914 -_0808E912: - movs r0, 0xFF -_0808E914: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_808E8F4 - thumb_func_start pal_patch_for_npc @ void pal_patch_for_npc(u16 tag, u8 slot) pal_patch_for_npc: @ 808E91C diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 1ae142075..ccc88db15 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -35,12 +35,12 @@ void sub_8096518(struct MapObject *, struct Sprite *); static void MakeObjectTemplateFromFieldObjectTemplate(struct MapObjectTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); /*static*/ void GetFieldObjectMovingCameraOffset(s16 *, s16 *); /*static*/ struct MapObjectTemplate *GetFieldObjectTemplateByLocalIdAndMap(u8, u8, u8); -/*static*/ void sub_808E894(u16); +static void sub_808E894(u16); static void RemoveFieldObjectIfOutsideView(struct MapObject *); static void sub_808E1B8(u8, s16, s16); static void SetPlayerAvatarFieldObjectIdAndObjectId(u8, u8); /*static*/ void sub_808E38C(struct MapObject *); -/*static*/ void sub_808E8F4(const struct SpritePalette *); +/*static*/ u8 sub_808E8F4(const struct SpritePalette *); /*static*/ u16 FindFieldObjectPaletteIndexByTag(u16); // ROM data @@ -1115,7 +1115,7 @@ void gpu_pal_allocator_reset__manage_upper_four(void) gReservedSpritePaletteCount = 12; } -void sub_808E894(u16 paletteTag) +static void sub_808E894(u16 paletteTag) { u16 paletteSlot; @@ -1135,3 +1135,12 @@ void sub_808E8C0(u16 *paletteTags) sub_808E894(paletteTags[i]); } } + +u8 sub_808E8F4(const struct SpritePalette *spritePalette) +{ + if (IndexOfSpritePaletteTag(spritePalette->tag) != 0xff) + { + return 0xff; + } + return LoadSpritePalette(spritePalette); +} From e6e0dc80f6ec0284ae49fd83847fac241c9e86b3 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 17:17:03 -0400 Subject: [PATCH 049/342] pal_patch_for_npc --- asm/field_map_obj.s | 29 ----------------------------- src/field_map_obj.c | 9 +++++++++ 2 files changed, 9 insertions(+), 29 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 6316bd0b7..b6ce802ff 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,35 +5,6 @@ .text - thumb_func_start pal_patch_for_npc -@ void pal_patch_for_npc(u16 tag, u8 slot) -pal_patch_for_npc: @ 808E91C - push {r4,lr} - adds r4, r1, 0 - lsls r0, 16 - lsrs r0, 16 - lsls r4, 24 - lsrs r4, 24 - bl FindFieldObjectPaletteIndexByTag - lsls r0, 24 - ldr r1, =gUnknown_0850BBC8 - lsrs r0, 21 - adds r0, r1 - ldr r0, [r0] - lsls r4, 20 - movs r1, 0x80 - lsls r1, 17 - adds r4, r1 - lsrs r4, 16 - adds r1, r4, 0 - movs r2, 0x20 - bl LoadPalette - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end pal_patch_for_npc - thumb_func_start pal_patch_for_npc_range @ void pal_patch_for_npc_range(u16 *tags, u8 minSlot, u8 maxSlot) pal_patch_for_npc_range: @ 808E954 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index ccc88db15..c8d147e6d 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -6,6 +6,7 @@ #include "rom4.h" #include "data3.h" #include "berry.h" +#include "palette.h" #include "field_player_avatar.h" #include "event_data.h" #include "rom_818CFC8.h" @@ -1144,3 +1145,11 @@ u8 sub_808E8F4(const struct SpritePalette *spritePalette) } return LoadSpritePalette(spritePalette); } + +void pal_patch_for_npc(u16 paletteTag, u8 paletteSlot) +{ + u8 paletteIdx; + + paletteIdx = FindFieldObjectPaletteIndexByTag(paletteTag); + LoadPalette(gUnknown_0850BBC8[paletteIdx].data, 16 * paletteSlot + 256, 0x20); +} From 07b1668623f6d028d1c1f32c29e377064f577680 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 17:21:58 -0400 Subject: [PATCH 050/342] pal_patch_for_npc_range --- asm/field_map_obj.s | 27 --------------------------- src/field_map_obj.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index b6ce802ff..9f880e0c1 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,33 +5,6 @@ .text - thumb_func_start pal_patch_for_npc_range -@ void pal_patch_for_npc_range(u16 *tags, u8 minSlot, u8 maxSlot) -pal_patch_for_npc_range: @ 808E954 - push {r4-r6,lr} - adds r5, r0, 0 - lsls r1, 24 - lsrs r4, r1, 24 - lsls r2, 24 - lsrs r6, r2, 24 - cmp r4, r6 - bcs _0808E978 -_0808E964: - ldrh r0, [r5] - adds r1, r4, 0 - bl pal_patch_for_npc - adds r5, 0x2 - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, r6 - bcc _0808E964 -_0808E978: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end pal_patch_for_npc_range - thumb_func_start FindFieldObjectPaletteIndexByTag @ u8 FindFieldObjectPaletteIndexByTag(u16 tag) FindFieldObjectPaletteIndexByTag: @ 808E980 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index c8d147e6d..4e785e969 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1153,3 +1153,13 @@ void pal_patch_for_npc(u16 paletteTag, u8 paletteSlot) paletteIdx = FindFieldObjectPaletteIndexByTag(paletteTag); LoadPalette(gUnknown_0850BBC8[paletteIdx].data, 16 * paletteSlot + 256, 0x20); } + +void pal_patch_for_npc_range(u16 *paletteTags, u8 minSlot, u8 maxSlot) +{ + while (minSlot < maxSlot) + { + pal_patch_for_npc(*paletteTags, minSlot); + paletteTags ++; + minSlot ++; + } +} From 5a020a47f3ac99bf80854817873e211cbf22102d Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 17:34:12 -0400 Subject: [PATCH 051/342] FindFieldObjectPaletteIndexByTag --- asm/field_map_obj.s | 41 ----------------------------------------- include/field_map_obj.h | 6 ++++++ src/field_map_obj.c | 24 +++++++++++++++++++----- 3 files changed, 25 insertions(+), 46 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 9f880e0c1..2475b649b 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,47 +5,6 @@ .text - thumb_func_start FindFieldObjectPaletteIndexByTag -@ u8 FindFieldObjectPaletteIndexByTag(u16 tag) -FindFieldObjectPaletteIndexByTag: @ 808E980 - push {r4-r6,lr} - lsls r0, 16 - lsrs r5, r0, 16 - movs r2, 0 - ldr r0, =gUnknown_0850BBC8 - ldrh r1, [r0, 0x4] - ldr r3, =0x000011ff - adds r4, r0, 0 - cmp r1, r3 - beq _0808E9C0 - adds r6, r4, 0 - adds r1, r3, 0 -_0808E998: - lsls r0, r2, 3 - adds r0, r6 - ldrh r0, [r0, 0x4] - cmp r0, r5 - bne _0808E9B0 - adds r0, r2, 0 - b _0808E9C2 - .pool -_0808E9B0: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - lsls r0, r2, 3 - adds r0, r4 - ldrh r0, [r0, 0x4] - cmp r0, r1 - bne _0808E998 -_0808E9C0: - movs r0, 0xFF -_0808E9C2: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end FindFieldObjectPaletteIndexByTag - thumb_func_start npc_load_two_palettes__no_record @ void npc_load_two_palettes__no_record(u16 tag, u8 slot) npc_load_two_palettes__no_record: @ 808E9C8 diff --git a/include/field_map_obj.h b/include/field_map_obj.h index bf99cec87..04bdb42d4 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -39,6 +39,12 @@ void FieldObjectTurn(struct MapObject *, u8); void FieldObjectTurnByLocalIdAndMap(u8, u8, u8, u8); const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8); void npc_by_local_id_and_map_set_field_1_bit_x20(u8, u8, u8, u8); +void gpu_pal_allocator_reset__manage_upper_four(void); +void sub_808E82C(u8, u8, u8, s16, s16); +void sub_808E7E4(u8, u8, u8); +void sub_808E78C(u8, u8, u8, u8); +void sub_808E75C(s16, s16); +void FieldObjectGetLocalIdAndMap(struct MapObject *, u8 *, u8 *, u8 *); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 4e785e969..0614a82d7 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -41,8 +41,8 @@ static void RemoveFieldObjectIfOutsideView(struct MapObject *); static void sub_808E1B8(u8, s16, s16); static void SetPlayerAvatarFieldObjectIdAndObjectId(u8, u8); /*static*/ void sub_808E38C(struct MapObject *); -/*static*/ u8 sub_808E8F4(const struct SpritePalette *); -/*static*/ u16 FindFieldObjectPaletteIndexByTag(u16); +static u8 sub_808E8F4(const struct SpritePalette *); +static u8 FindFieldObjectPaletteIndexByTag(u16); // ROM data @@ -1120,7 +1120,7 @@ static void sub_808E894(u16 paletteTag) { u16 paletteSlot; - paletteSlot = (u8)FindFieldObjectPaletteIndexByTag(paletteTag); + paletteSlot = FindFieldObjectPaletteIndexByTag(paletteTag); if (paletteSlot != 0x11ff) // always true { sub_808E8F4(&gUnknown_0850BBC8[paletteSlot]); @@ -1137,7 +1137,7 @@ void sub_808E8C0(u16 *paletteTags) } } -u8 sub_808E8F4(const struct SpritePalette *spritePalette) +static u8 sub_808E8F4(const struct SpritePalette *spritePalette) { if (IndexOfSpritePaletteTag(spritePalette->tag) != 0xff) { @@ -1148,7 +1148,7 @@ u8 sub_808E8F4(const struct SpritePalette *spritePalette) void pal_patch_for_npc(u16 paletteTag, u8 paletteSlot) { - u8 paletteIdx; + u16 paletteIdx; paletteIdx = FindFieldObjectPaletteIndexByTag(paletteTag); LoadPalette(gUnknown_0850BBC8[paletteIdx].data, 16 * paletteSlot + 256, 0x20); @@ -1163,3 +1163,17 @@ void pal_patch_for_npc_range(u16 *paletteTags, u8 minSlot, u8 maxSlot) minSlot ++; } } + +static u8 FindFieldObjectPaletteIndexByTag(u16 tag) +{ + u8 i; + + for (i = 0; gUnknown_0850BBC8[i].tag != 0x11ff; i ++) + { + if (gUnknown_0850BBC8[i].tag == tag) + { + return i; + } + } + return 0xff; +} From dddb44e3018ba915564d6e1a3bcc888ec37aa0bd Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 17:58:41 -0400 Subject: [PATCH 052/342] npc_load_two_palettes__no_record --- asm/field_map_obj.s | 53 --------------------------------------------- include/data3.h | 7 ++++++ src/field_map_obj.c | 18 +++++++++++++++ 3 files changed, 25 insertions(+), 53 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 2475b649b..f34bde8ad 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,59 +5,6 @@ .text - thumb_func_start npc_load_two_palettes__no_record -@ void npc_load_two_palettes__no_record(u16 tag, u8 slot) -npc_load_two_palettes__no_record: @ 808E9C8 - push {r4-r6,lr} - lsls r0, 16 - lsrs r4, r0, 16 - lsls r1, 24 - lsrs r5, r1, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl pal_patch_for_npc - movs r3, 0 - ldr r1, =gUnknown_0850BD00 - ldrh r0, [r1] - ldr r2, =0x000011ff - cmp r0, r2 - beq _0808EA30 - ldr r0, =gUnknown_084975C4 - adds r5, r0 - adds r6, r2, 0 -_0808E9EC: - lsls r2, r3, 3 - adds r0, r2, r1 - ldrh r0, [r0] - cmp r0, r4 - bne _0808EA20 - adds r1, 0x4 - adds r1, r2, r1 - ldr r0, =gUnknown_020375B4 - ldrb r0, [r0] - ldr r1, [r1] - lsls r0, 1 - adds r0, r1 - ldrh r0, [r0] - ldrb r1, [r5] - bl pal_patch_for_npc - b _0808EA30 - .pool -_0808EA20: - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - lsls r0, r3, 3 - adds r0, r1 - ldrh r0, [r0] - cmp r0, r6 - bne _0808E9EC -_0808EA30: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end npc_load_two_palettes__no_record - thumb_func_start npc_load_two_palettes__and_record @ void npc_load_two_palettes__and_record(u16 tag, u8 slot) npc_load_two_palettes__and_record: @ 808EA38 diff --git a/include/data3.h b/include/data3.h index 1f082e3fb..5318d44ec 100644 --- a/include/data3.h +++ b/include/data3.h @@ -5,6 +5,13 @@ #ifndef POKEEMERALD_DATA3_H #define POKEEMERALD_DATA3_H +struct PairedPalettes { + u16 tag; + const u16 *data; +}; + extern const struct SpritePalette gUnknown_0850BBC8[]; +extern const struct PairedPalettes gUnknown_0850BD00[15]; +extern u8 gUnknown_084975C4[0x10]; #endif //POKEEMERALD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 0614a82d7..fae9b12d8 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -23,6 +23,9 @@ // Static RAM declarations +extern u8 gUnknown_020375B4; +extern u16 gUnknown_020375B6; + // Static ROM declarations static void sub_808D450(void); @@ -1177,3 +1180,18 @@ static u8 FindFieldObjectPaletteIndexByTag(u16 tag) } return 0xff; } + +void npc_load_two_palettes__no_record(u16 tag, u8 slot) +{ + u8 i; + + pal_patch_for_npc(tag, slot); + for (i = 0; gUnknown_0850BD00[i].tag != 0x11ff; i ++) + { + if (gUnknown_0850BD00[i].tag == tag) + { + pal_patch_for_npc(gUnknown_0850BD00[i].data[gUnknown_020375B4], gUnknown_084975C4[slot]); + return; + } + } +} From a17a1bb27aeca68624c2b8d1b55cbd44e1c34e11 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 18:04:23 -0400 Subject: [PATCH 053/342] npc_load_two_palettes__and_record --- asm/field_map_obj.s | 55 --------------------------------------------- include/data3.h | 1 + src/field_map_obj.c | 16 +++++++++++++ 3 files changed, 17 insertions(+), 55 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index f34bde8ad..0cc7f1fe3 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,61 +5,6 @@ .text - thumb_func_start npc_load_two_palettes__and_record -@ void npc_load_two_palettes__and_record(u16 tag, u8 slot) -npc_load_two_palettes__and_record: @ 808EA38 - push {r4-r6,lr} - lsls r0, 16 - lsrs r4, r0, 16 - lsls r1, 24 - lsrs r5, r1, 24 - ldr r0, =gUnknown_020375B6 - strh r4, [r0] - adds r0, r4, 0 - adds r1, r5, 0 - bl pal_patch_for_npc - movs r3, 0 - ldr r1, =gUnknown_0850BD78 - ldrh r0, [r1] - ldr r2, =0x000011ff - cmp r0, r2 - beq _0808EAA8 - ldr r0, =gUnknown_084975C4 - adds r5, r0 - adds r6, r2, 0 -_0808EA60: - lsls r2, r3, 3 - adds r0, r2, r1 - ldrh r0, [r0] - cmp r0, r4 - bne _0808EA98 - adds r1, 0x4 - adds r1, r2, r1 - ldr r0, =gUnknown_020375B4 - ldrb r0, [r0] - ldr r1, [r1] - lsls r0, 1 - adds r0, r1 - ldrh r0, [r0] - ldrb r1, [r5] - bl pal_patch_for_npc - b _0808EAA8 - .pool -_0808EA98: - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - lsls r0, r3, 3 - adds r0, r1 - ldrh r0, [r0] - cmp r0, r6 - bne _0808EA60 -_0808EAA8: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end npc_load_two_palettes__and_record - thumb_func_start sub_808EAB0 sub_808EAB0: @ 808EAB0 push {lr} diff --git a/include/data3.h b/include/data3.h index 5318d44ec..f44a61263 100644 --- a/include/data3.h +++ b/include/data3.h @@ -12,6 +12,7 @@ struct PairedPalettes { extern const struct SpritePalette gUnknown_0850BBC8[]; extern const struct PairedPalettes gUnknown_0850BD00[15]; +extern const struct PairedPalettes gUnknown_0850BD78[15]; extern u8 gUnknown_084975C4[0x10]; #endif //POKEEMERALD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index fae9b12d8..b5a0ce5e5 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1195,3 +1195,19 @@ void npc_load_two_palettes__no_record(u16 tag, u8 slot) } } } + +void npc_load_two_palettes__and_record(u16 tag, u8 slot) +{ + u8 i; + + gUnknown_020375B6 = tag; + pal_patch_for_npc(tag, slot); + for (i = 0; gUnknown_0850BD78[i].tag != 0x11ff; i ++) + { + if (gUnknown_0850BD78[i].tag == tag) + { + pal_patch_for_npc(gUnknown_0850BD78[i].data[gUnknown_020375B4], gUnknown_084975C4[slot]); + return; + } + } +} From b639ca3b15bea19d7115d7ad619a1e6140015740 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 8 Sep 2017 18:12:27 -0400 Subject: [PATCH 054/342] sub_808EAB0 --- asm/field_map_obj.s | 12 ------------ include/field_map_obj.h | 1 - src/field_map_obj.c | 6 ++++++ 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 0cc7f1fe3..2bf3ce572 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,18 +5,6 @@ .text - thumb_func_start sub_808EAB0 -sub_808EAB0: @ 808EAB0 - push {lr} - lsls r0, 16 - lsrs r0, 16 - lsls r1, 24 - lsrs r1, 24 - bl pal_patch_for_npc - pop {r0} - bx r0 - thumb_func_end sub_808EAB0 - thumb_func_start sub_808EAC4 sub_808EAC4: @ 808EAC4 push {r4,lr} diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 04bdb42d4..c5b23103f 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -21,7 +21,6 @@ void npc_load_two_palettes__no_record(u16, u8); void npc_load_two_palettes__and_record(u16, u8); void pal_patch_for_npc(u16, u8); void sub_808E16C(s16, s16); -void sub_808EAB0(u16, u8); void sub_8092FF0(s16, s16, s16 *, s16 *); u8 FieldObjectDirectionToImageAnimId(u8); void sub_80930E0(s16 *, s16 *, u8, u8); diff --git a/src/field_map_obj.c b/src/field_map_obj.c index b5a0ce5e5..8042348f2 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -46,6 +46,7 @@ static void SetPlayerAvatarFieldObjectIdAndObjectId(u8, u8); /*static*/ void sub_808E38C(struct MapObject *); static u8 sub_808E8F4(const struct SpritePalette *); static u8 FindFieldObjectPaletteIndexByTag(u16); +static void sub_808EAB0(u16, u8); // ROM data @@ -1211,3 +1212,8 @@ void npc_load_two_palettes__and_record(u16 tag, u8 slot) } } } + +static void sub_808EAB0(u16 tag, u8 slot) +{ + pal_patch_for_npc(tag, slot); +} From 43c3b9fdff01c05860969d80fbc6ae0b0dbbcb90 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 8 Sep 2017 21:25:20 -0400 Subject: [PATCH 055/342] unref_sub_808EAC4 --- asm/field_map_obj.s | 20 -------------------- src/field_map_obj.c | 8 ++++++++ 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 2bf3ce572..57ea7af2e 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,26 +5,6 @@ .text - thumb_func_start sub_808EAC4 -sub_808EAC4: @ 808EAC4 - push {r4,lr} - ldrh r3, [r0, 0x10] - strh r3, [r0, 0x14] - ldrh r4, [r0, 0x12] - strh r4, [r0, 0x16] - lsls r1, 16 - asrs r1, 16 - adds r1, r3 - strh r1, [r0, 0x10] - lsls r2, 16 - asrs r2, 16 - adds r2, r4 - strh r2, [r0, 0x12] - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_808EAC4 - thumb_func_start npc_coords_shift @ void npc_coords_shift(struct npc_state *fieldObject, u16 x, u16 y) npc_coords_shift: @ 808EAE4 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 8042348f2..e5025fccf 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1217,3 +1217,11 @@ static void sub_808EAB0(u16 tag, u8 slot) { pal_patch_for_npc(tag, slot); } + +void unref_sub_808EAC4(struct MapObject *mapObject, s16 x, s16 y) +{ + mapObject->coords3.x = mapObject->coords2.x; + mapObject->coords3.y = mapObject->coords2.y; + mapObject->coords2.x = x + mapObject->coords3.x; + mapObject->coords2.y = y + mapObject->coords3.y; +} From 70e982d1fabc62a6d145b1a8dda866931886bb4d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 8 Sep 2017 21:27:02 -0400 Subject: [PATCH 056/342] npc_coords_shift --- asm/field_map_obj.s | 12 ------------ include/field_map_obj.h | 1 + src/field_map_obj.c | 13 +++++++++++-- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 57ea7af2e..f0cd4f07b 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,18 +5,6 @@ .text - thumb_func_start npc_coords_shift -@ void npc_coords_shift(struct npc_state *fieldObject, u16 x, u16 y) -npc_coords_shift: @ 808EAE4 - ldrh r3, [r0, 0x10] - strh r3, [r0, 0x14] - ldrh r3, [r0, 0x12] - strh r3, [r0, 0x16] - strh r1, [r0, 0x10] - strh r2, [r0, 0x12] - bx lr - thumb_func_end npc_coords_shift - thumb_func_start npc_coords_set @ void npc_coords_set(struct npc_state *fieldObject, u16 x, u16 y) npc_coords_set: @ 808EAF4 diff --git a/include/field_map_obj.h b/include/field_map_obj.h index c5b23103f..4eb6f85d5 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -44,6 +44,7 @@ void sub_808E7E4(u8, u8, u8); void sub_808E78C(u8, u8, u8, u8); void sub_808E75C(s16, s16); void FieldObjectGetLocalIdAndMap(struct MapObject *, u8 *, u8 *, u8 *); +void npc_coords_shift(struct MapObject *, s16, s16); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index e5025fccf..6298c977b 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1222,6 +1222,15 @@ void unref_sub_808EAC4(struct MapObject *mapObject, s16 x, s16 y) { mapObject->coords3.x = mapObject->coords2.x; mapObject->coords3.y = mapObject->coords2.y; - mapObject->coords2.x = x + mapObject->coords3.x; - mapObject->coords2.y = y + mapObject->coords3.y; + mapObject->coords2.x += x; + mapObject->coords2.y += y; } + +void npc_coords_shift(struct MapObject *mapObject, s16 x, s16 y) +{ + mapObject->coords3.x = mapObject->coords2.x; + mapObject->coords3.y = mapObject->coords2.y; + mapObject->coords2.x = x; + mapObject->coords2.y = y; +} + From 019935fb73b7a065c735045a80d5124132ee6e5e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 8 Sep 2017 21:28:22 -0400 Subject: [PATCH 057/342] npc_coords_set --- asm/field_map_obj.s | 14 -------------- src/field_map_obj.c | 8 ++++++++ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index f0cd4f07b..fb93b5333 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,20 +5,6 @@ .text - thumb_func_start npc_coords_set -@ void npc_coords_set(struct npc_state *fieldObject, u16 x, u16 y) -npc_coords_set: @ 808EAF4 - lsls r1, 16 - lsrs r1, 16 - lsls r2, 16 - lsrs r2, 16 - strh r1, [r0, 0x14] - strh r2, [r0, 0x16] - strh r1, [r0, 0x10] - strh r2, [r0, 0x12] - bx lr - thumb_func_end npc_coords_set - thumb_func_start sub_808EB08 sub_808EB08: @ 808EB08 push {r4-r7,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 6298c977b..c7d9e32d7 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1234,3 +1234,11 @@ void npc_coords_shift(struct MapObject *mapObject, s16 x, s16 y) mapObject->coords2.y = y; } +/*static*/ void npc_coords_set(struct MapObject *mapObject, s16 x, s16 y) +{ + mapObject->coords3.x = x; + mapObject->coords3.y = y; + mapObject->coords2.x = x; + mapObject->coords2.y = y; +} + From ba6987b7335d6b3f0a641e0dee62be37bff4ffd8 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 8 Sep 2017 21:35:46 -0400 Subject: [PATCH 058/342] sub_808EB08 --- asm/field_map_obj.s | 79 ----------------------------------------- include/field_map_obj.h | 1 + src/field_map_obj.c | 20 +++++++++++ 3 files changed, 21 insertions(+), 79 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index fb93b5333..d61478b62 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,85 +5,6 @@ .text - thumb_func_start sub_808EB08 -sub_808EB08: @ 808EB08 - push {r4-r7,lr} - mov r7, r8 - push {r7} - adds r6, r0, 0 - adds r4, r1, 0 - adds r5, r2, 0 - lsls r4, 16 - lsrs r4, 16 - lsls r5, 16 - lsrs r5, 16 - ldrb r1, [r6, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r7, r0, r1 - ldrb r0, [r6, 0x5] - bl GetFieldObjectGraphicsInfo - mov r8, r0 - lsls r4, 16 - asrs r4, 16 - lsls r5, 16 - asrs r5, 16 - adds r0, r6, 0 - adds r1, r4, 0 - adds r2, r5, 0 - bl npc_coords_set - movs r1, 0x10 - ldrsh r0, [r6, r1] - movs r2, 0x12 - ldrsh r1, [r6, r2] - adds r2, r7, 0 - adds r2, 0x20 - adds r3, r7, 0 - adds r3, 0x22 - bl sub_8093038 - mov r1, r8 - ldrh r0, [r1, 0x8] - lsls r0, 16 - asrs r0, 17 - negs r0, r0 - adds r1, r7, 0 - adds r1, 0x28 - strb r0, [r1] - mov r2, r8 - ldrh r0, [r2, 0xA] - lsls r0, 16 - asrs r0, 17 - negs r0, r0 - adds r2, r7, 0 - adds r2, 0x29 - strb r0, [r2] - ldrh r0, [r7, 0x20] - adds r0, 0x8 - strh r0, [r7, 0x20] - ldrh r1, [r7, 0x22] - adds r1, 0x10 - movs r0, 0 - ldrsb r0, [r2, r0] - adds r0, r1 - strh r0, [r7, 0x22] - adds r0, r6, 0 - bl sub_808E38C - ldrb r0, [r6, 0x1] - lsrs r0, 7 - cmp r0, 0 - beq _0808EB9A - bl CameraObjectReset1 -_0808EB9A: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_808EB08 - thumb_func_start sub_808EBA8 sub_808EBA8: @ 808EBA8 push {r4,r5,lr} diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 4eb6f85d5..b292d200d 100644 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -45,6 +45,7 @@ void sub_808E78C(u8, u8, u8, u8); void sub_808E75C(s16, s16); void FieldObjectGetLocalIdAndMap(struct MapObject *, u8 *, u8 *, u8 *); void npc_coords_shift(struct MapObject *, s16, s16); +void sub_808EB08(struct MapObject *, s16, s16); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index c7d9e32d7..acfbd60a7 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1242,3 +1242,23 @@ void npc_coords_shift(struct MapObject *mapObject, s16 x, s16 y) mapObject->coords2.y = y; } +void sub_808EB08(struct MapObject *mapObject, s16 x, s16 y) +{ + struct Sprite *sprite; + const struct MapObjectGraphicsInfo *graphicsInfo; + + sprite = &gSprites[mapObject->spriteId]; + graphicsInfo = GetFieldObjectGraphicsInfo(mapObject->graphicsId); + npc_coords_set(mapObject, x, y); + sub_8093038(mapObject->coords2.x, mapObject->coords2.y, &sprite->pos1.x, &sprite->pos1.y); + sprite->centerToCornerVecX = -(graphicsInfo->width >> 1); + sprite->centerToCornerVecY = -(graphicsInfo->height >> 1); + sprite->pos1.x += 8; + sprite->pos1.y += 16 + sprite->centerToCornerVecY; + sub_808E38C(mapObject); + if (mapObject->mapobj_bit_15) + { + CameraObjectReset1(); + } +} + From 1ed1fbab1ca140edebb7ec1ebfabaaaf04f9c054 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 10 Sep 2017 15:12:48 -0400 Subject: [PATCH 059/342] sub_808EBA8 --- asm/field_map_obj.s | 44 -------------------------------------------- src/field_map_obj.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 44 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index d61478b62..bb7c95ef4 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,50 +5,6 @@ .text - thumb_func_start sub_808EBA8 -sub_808EBA8: @ 808EBA8 - push {r4,r5,lr} - sub sp, 0x4 - ldr r4, [sp, 0x10] - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 16 - lsrs r5, r3, 16 - lsls r4, 16 - lsrs r4, 16 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _0808EBF0 - lsls r1, r5, 16 - lsls r2, r4, 16 - mov r0, sp - ldrb r3, [r0] - lsls r0, r3, 3 - adds r0, r3 - lsls r0, 2 - ldr r3, =gMapObjects - adds r0, r3 - movs r3, 0xE0 - lsls r3, 11 - adds r1, r3 - asrs r1, 16 - adds r2, r3 - asrs r2, 16 - bl sub_808EB08 -_0808EBF0: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_808EBA8 - thumb_func_start npc_coords_shift_still @ void npc_coords_shift_still(struct npc_state *fieldObject) npc_coords_shift_still: @ 808EBFC diff --git a/src/field_map_obj.c b/src/field_map_obj.c index acfbd60a7..7465370b9 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1262,3 +1262,15 @@ void sub_808EB08(struct MapObject *mapObject, s16 x, s16 y) } } +void sub_808EBA8(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y) +{ + u8 mapObjectId; + + if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId)) + { + x += 7; + y += 7; + sub_808EB08(&gMapObjects[mapObjectId], x, y); + } +} + From 5bb58867748b91de2c20860d73b1a36896f11dd1 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 10 Sep 2017 15:14:46 -0400 Subject: [PATCH 060/342] npc_coords_shift_still --- asm/field_map_obj.s | 13 ------------- src/field_map_obj.c | 5 +++++ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index bb7c95ef4..c15cd3320 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,19 +5,6 @@ .text - thumb_func_start npc_coords_shift_still -@ void npc_coords_shift_still(struct npc_state *fieldObject) -npc_coords_shift_still: @ 808EBFC - push {lr} - movs r2, 0x10 - ldrsh r1, [r0, r2] - movs r3, 0x12 - ldrsh r2, [r0, r3] - bl npc_coords_shift - pop {r0} - bx r0 - thumb_func_end npc_coords_shift_still - thumb_func_start UpdateFieldObjectCoordsForCameraUpdate @ void UpdateFieldObjectCoordsForCameraUpdate() UpdateFieldObjectCoordsForCameraUpdate: @ 808EC10 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 7465370b9..1a4ab1a74 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1274,3 +1274,8 @@ void sub_808EBA8(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y) } } +void npc_coords_shift_still(struct MapObject *mapObject) +{ + npc_coords_shift(mapObject, mapObject->coords2.x, mapObject->coords2.y); +} + From 79b19a36b864abb359f7ec2122dea851f8ac5e7b Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 10 Sep 2017 15:35:21 -0400 Subject: [PATCH 061/342] UpdateFieldObjectCoordsForCameraUpdate --- asm/field_effect_helpers.s | 4 +-- asm/field_map_obj.s | 56 -------------------------------------- asm/field_tasks.s | 2 +- asm/fieldmap.s | 14 +++++----- include/global.fieldmap.h | 3 +- src/field_map_obj.c | 25 +++++++++++++++++ sym_ewram.txt | 2 +- 7 files changed, 38 insertions(+), 68 deletions(-) diff --git a/asm/field_effect_helpers.s b/asm/field_effect_helpers.s index cef6287ff..04307fde5 100644 --- a/asm/field_effect_helpers.s +++ b/asm/field_effect_helpers.s @@ -827,7 +827,7 @@ unc_grass_normal: @ 8154550 lsrs r4, r0, 8 lsls r0, 24 lsrs r7, r0, 24 - ldr r3, =gUnknown_02037334 + ldr r3, =gCamera ldrb r1, [r3] movs r0, 0x1 ands r0, r1 @@ -1166,7 +1166,7 @@ unc_grass_tall: @ 8154800 lsrs r7, r0, 8 lsls r0, 24 lsrs r6, r0, 24 - ldr r3, =gUnknown_02037334 + ldr r3, =gCamera ldrb r1, [r3] movs r0, 0x1 ands r0, r1 diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index c15cd3320..927625ff3 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,62 +5,6 @@ .text - thumb_func_start UpdateFieldObjectCoordsForCameraUpdate -@ void UpdateFieldObjectCoordsForCameraUpdate() -UpdateFieldObjectCoordsForCameraUpdate: @ 808EC10 - push {r4,r5,lr} - ldr r2, =gUnknown_02037334 - ldrb r1, [r2] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0808EC68 - movs r3, 0 - ldr r5, =gMapObjects - movs r0, 0x4 - ldrsh r4, [r2, r0] - movs r0, 0x8 - ldrsh r1, [r2, r0] -_0808EC2A: - lsls r0, r3, 3 - adds r0, r3 - lsls r0, 2 - adds r2, r0, r5 - ldrb r0, [r2] - lsls r0, 31 - cmp r0, 0 - beq _0808EC5E - ldrh r0, [r2, 0xC] - subs r0, r4 - strh r0, [r2, 0xC] - ldrh r0, [r2, 0xE] - subs r0, r1 - strh r0, [r2, 0xE] - ldrh r0, [r2, 0x10] - subs r0, r4 - strh r0, [r2, 0x10] - ldrh r0, [r2, 0x12] - subs r0, r1 - strh r0, [r2, 0x12] - ldrh r0, [r2, 0x14] - subs r0, r4 - strh r0, [r2, 0x14] - ldrh r0, [r2, 0x16] - subs r0, r1 - strh r0, [r2, 0x16] -_0808EC5E: - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0xF - bls _0808EC2A -_0808EC68: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end UpdateFieldObjectCoordsForCameraUpdate - thumb_func_start GetFieldObjectIdByXYZ @ u8 GetFieldObjectIdByXYZ(u16 x, u16 y, u8 z) GetFieldObjectIdByXYZ: @ 808EC78 diff --git a/asm/field_tasks.s b/asm/field_tasks.s index fb99bbc0e..d053f565f 100644 --- a/asm/field_tasks.s +++ b/asm/field_tasks.s @@ -1858,7 +1858,7 @@ _0809E6F8: cmp r6, 0xD ble _0809E6F8 _0809E708: - ldr r2, =gUnknown_02037334 + ldr r2, =gCamera ldrb r1, [r2] movs r0, 0x1 ands r0, r1 diff --git a/asm/fieldmap.s b/asm/fieldmap.s index d2416248f..dbb8a3fa3 100644 --- a/asm/fieldmap.s +++ b/asm/fieldmap.s @@ -1508,12 +1508,12 @@ CameraMove: @ 808887C push {r5-r7} mov r10, r0 mov r9, r1 - ldr r1, =gUnknown_02037334 + ldr r1, =gCamera ldrb r0, [r1] movs r1, 0x2 negs r1, r1 ands r1, r0 - ldr r2, =gUnknown_02037334 + ldr r2, =gCamera strb r1, [r2] mov r0, r10 mov r1, r9 @@ -1556,23 +1556,23 @@ _080888C4: ldrb r0, [r4, 0x8] ldrb r1, [r4, 0x9] bl mliX_load_map - ldr r1, =gUnknown_02037334 + ldr r1, =gCamera ldrb r0, [r1] movs r1, 0x1 orrs r0, r1 - ldr r2, =gUnknown_02037334 + ldr r2, =gCamera strb r0, [r2] ldr r0, =gSaveBlock1Ptr ldr r1, [r0] movs r2, 0 ldrsh r0, [r1, r2] subs r5, r0 - ldr r0, =gUnknown_02037334 + ldr r0, =gCamera str r5, [r0, 0x4] movs r2, 0x2 ldrsh r0, [r1, r2] subs r6, r0 - ldr r0, =gUnknown_02037334 + ldr r0, =gCamera str r6, [r0, 0x8] ldrh r0, [r1] add r0, r10 @@ -1583,7 +1583,7 @@ _080888C4: mov r0, r8 bl sub_80885C4 _08088932: - ldr r0, =gUnknown_02037334 + ldr r0, =gCamera ldrb r0, [r0] lsls r0, 31 lsrs r0, 31 diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index b0a36aa55..5a7a75ccb 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -379,7 +379,7 @@ struct PlayerAvatar /* 0x202E858 */ struct Camera { - bool8 field_0:1; + bool8 active:1; s32 x; s32 y; }; @@ -388,5 +388,6 @@ extern struct MapObject gMapObjects[NUM_FIELD_OBJECTS]; extern u8 gSelectedMapObject; extern struct MapHeader gMapHeader; extern struct PlayerAvatar gPlayerAvatar; +extern struct Camera gCamera; #endif // GUARD_GLOBAL_FIELDMAP_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 1a4ab1a74..ced0ecb27 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1279,3 +1279,28 @@ void npc_coords_shift_still(struct MapObject *mapObject) npc_coords_shift(mapObject, mapObject->coords2.x, mapObject->coords2.y); } +void UpdateFieldObjectCoordsForCameraUpdate(void) +{ + u8 i; + s16 dx; + s16 dy; + + if (gCamera.active) + { + dx = gCamera.x; + dy = gCamera.y; + for (i = 0; i < NUM_FIELD_OBJECTS; i ++) + { + if (gMapObjects[i].active) + { + gMapObjects[i].coords1.x -= dx; + gMapObjects[i].coords1.y -= dy; + gMapObjects[i].coords2.x -= dx; + gMapObjects[i].coords2.y -= dy; + gMapObjects[i].coords3.x -= dx; + gMapObjects[i].coords3.y -= dy; + } + } + } +} + diff --git a/sym_ewram.txt b/sym_ewram.txt index f1a138b7a..ccbb7f3b6 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -749,7 +749,7 @@ gUnknown_02032318: @ 2032318 gMapHeader: @ 2037318 .space 0x1C -gUnknown_02037334: @ 2037334 +gCamera: @ 2037334 .space 0xC gUnknown_02037340: @ 2037340 From d8e22380869e4e04c2ebbc71fae43cd38ed646a9 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 10 Sep 2017 15:54:41 -0400 Subject: [PATCH 062/342] FieldObjectDoesZCoordMatch --- asm/field_map_obj.s | 83 --------------------------------------------- src/field_map_obj.c | 25 ++++++++++++++ 2 files changed, 25 insertions(+), 83 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 927625ff3..895607305 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,89 +5,6 @@ .text - thumb_func_start GetFieldObjectIdByXYZ -@ u8 GetFieldObjectIdByXYZ(u16 x, u16 y, u8 z) -GetFieldObjectIdByXYZ: @ 808EC78 - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 16 - lsrs r7, r0, 16 - lsls r1, 16 - lsrs r6, r1, 16 - lsls r2, 24 - lsrs r5, r2, 24 - movs r4, 0 - ldr r0, =gMapObjects - mov r8, r0 -_0808EC90: - lsls r0, r4, 3 - adds r0, r4 - lsls r0, 2 - mov r2, r8 - adds r1, r0, r2 - ldrb r0, [r1] - lsls r0, 31 - cmp r0, 0 - beq _0808ECC8 - movs r2, 0x10 - ldrsh r0, [r1, r2] - cmp r0, r7 - bne _0808ECC8 - movs r2, 0x12 - ldrsh r0, [r1, r2] - cmp r0, r6 - bne _0808ECC8 - adds r0, r1, 0 - adds r1, r5, 0 - bl FieldObjectDoesZCoordMatch - lsls r0, 24 - cmp r0, 0 - beq _0808ECC8 - adds r0, r4, 0 - b _0808ECD4 - .pool -_0808ECC8: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0xF - bls _0808EC90 - movs r0, 0x10 -_0808ECD4: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end GetFieldObjectIdByXYZ - - thumb_func_start FieldObjectDoesZCoordMatch -@ bool8 FieldObjectDoesZCoordMatch(struct npc_state *fieldObject) -FieldObjectDoesZCoordMatch: @ 808ECE0 - push {lr} - lsls r1, 24 - lsrs r1, 24 - ldrb r2, [r0, 0xB] - movs r0, 0xF - ands r0, r2 - cmp r0, 0 - beq _0808ED00 - cmp r1, 0 - beq _0808ED00 - lsls r0, r2, 28 - lsrs r0, 28 - cmp r0, r1 - beq _0808ED00 - movs r0, 0 - b _0808ED02 -_0808ED00: - movs r0, 0x1 -_0808ED02: - pop {r1} - bx r1 - thumb_func_end FieldObjectDoesZCoordMatch - thumb_func_start UpdateFieldObjectsForCameraUpdate @ void UpdateFieldObjectsForCameraUpdate(u16 movingCameraOffsetX, u16 movingCameraOffsetY) UpdateFieldObjectsForCameraUpdate: @ 808ED08 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index ced0ecb27..a48a2506e 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -47,6 +47,7 @@ static void SetPlayerAvatarFieldObjectIdAndObjectId(u8, u8); static u8 sub_808E8F4(const struct SpritePalette *); static u8 FindFieldObjectPaletteIndexByTag(u16); static void sub_808EAB0(u16, u8); +static bool8 FieldObjectDoesZCoordMatch(struct MapObject *, u8); // ROM data @@ -1304,3 +1305,27 @@ void UpdateFieldObjectCoordsForCameraUpdate(void) } } +u8 GetFieldObjectIdByXYZ(u16 x, u16 y, u8 z) +{ + u8 i; + for (i = 0; i < NUM_FIELD_OBJECTS; i ++) + { + if (gMapObjects[i].active) + { + if (gMapObjects[i].coords2.x == x && gMapObjects[i].coords2.y == y && FieldObjectDoesZCoordMatch(&gMapObjects[i], z)) + { + return i; + } + } + } + return NUM_FIELD_OBJECTS; +} + +static bool8 FieldObjectDoesZCoordMatch(struct MapObject *mapObject, u8 z) +{ + if (mapObject->mapobj_unk_0B_0 != 0 && z != 0 && mapObject->mapobj_unk_0B_0 != z) + { + return FALSE; + } + return TRUE; +} From 5a5ea8c740ba17a542c55aa81a576af18cf76b45 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 10 Sep 2017 15:56:03 -0400 Subject: [PATCH 063/342] UpdateFieldObjectsForCameraUpdate --- asm/field_map_obj.s | 24 ------------------------ src/field_map_obj.c | 7 +++++++ 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 895607305..400fec15a 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,30 +5,6 @@ .text - thumb_func_start UpdateFieldObjectsForCameraUpdate -@ void UpdateFieldObjectsForCameraUpdate(u16 movingCameraOffsetX, u16 movingCameraOffsetY) -UpdateFieldObjectsForCameraUpdate: @ 808ED08 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r4, 16 - lsrs r4, 16 - lsls r5, 16 - lsrs r5, 16 - bl UpdateFieldObjectCoordsForCameraUpdate - lsls r4, 16 - asrs r4, 16 - lsls r5, 16 - asrs r5, 16 - adds r0, r4, 0 - adds r1, r5, 0 - bl SpawnFieldObjectsInView - bl RemoveFieldObjectsOutsideView - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end UpdateFieldObjectsForCameraUpdate - thumb_func_start AddCameraObject @ u8 AddCameraObject(u8 followedObjectId) AddCameraObject: @ 808ED34 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index a48a2506e..8214c5efa 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1329,3 +1329,10 @@ static bool8 FieldObjectDoesZCoordMatch(struct MapObject *mapObject, u8 z) } return TRUE; } + +void UpdateFieldObjectsForCameraUpdate(s16 x, s16 y) +{ + UpdateFieldObjectCoordsForCameraUpdate(); + SpawnFieldObjectsInView(x, y); + RemoveFieldObjectsOutsideView(); +} From 9e0a17109840593a034bd42e96ffbcf73bc16b1c Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 10 Sep 2017 16:02:20 -0400 Subject: [PATCH 064/342] AddCameraObject --- asm/field_map_obj.s | 34 ---------------------------------- include/data3.h | 1 + src/field_map_obj.c | 10 ++++++++++ 3 files changed, 11 insertions(+), 34 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 400fec15a..d31a53f78 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,40 +5,6 @@ .text - thumb_func_start AddCameraObject -@ u8 AddCameraObject(u8 followedObjectId) -AddCameraObject: @ 808ED34 - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - ldr r0, =gUnknown_084975D4 - movs r1, 0 - movs r2, 0 - movs r3, 0x4 - bl CreateSprite - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gSprites - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r2 - movs r2, 0x3E - adds r2, r1 - mov r12, r2 - ldrb r2, [r2] - movs r3, 0x4 - orrs r2, r3 - mov r3, r12 - strb r2, [r3] - strh r4, [r1, 0x2E] - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end AddCameraObject - thumb_func_start ObjectCB_CameraObject @ void ObjectCB_CameraObject(struct obj *object) ObjectCB_CameraObject: @ 808ED78 diff --git a/include/data3.h b/include/data3.h index f44a61263..343f145c0 100644 --- a/include/data3.h +++ b/include/data3.h @@ -14,5 +14,6 @@ extern const struct SpritePalette gUnknown_0850BBC8[]; extern const struct PairedPalettes gUnknown_0850BD00[15]; extern const struct PairedPalettes gUnknown_0850BD78[15]; extern u8 gUnknown_084975C4[0x10]; +extern const struct SpriteTemplate gUnknown_084975D4; #endif //POKEEMERALD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 8214c5efa..933908886 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1336,3 +1336,13 @@ void UpdateFieldObjectsForCameraUpdate(s16 x, s16 y) SpawnFieldObjectsInView(x, y); RemoveFieldObjectsOutsideView(); } + +u8 AddCameraObject(u8 data0) +{ + u8 spriteId; + + spriteId = CreateSprite(&gUnknown_084975D4, 0, 0, 4); + gSprites[spriteId].invisible = TRUE; + gSprites[spriteId].data0 = data0; + return spriteId; +} From c7b1a8c3daa5183f8e522d6d6fcba1ffea79e72f Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 10 Sep 2017 16:13:19 -0400 Subject: [PATCH 065/342] ObjectCB_CameraObject --- asm/field_map_obj.s | 114 -------------------------------------------- include/data3.h | 1 + src/field_map_obj.c | 45 ++++++++++++++++- 3 files changed, 44 insertions(+), 116 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index d31a53f78..38b328cdc 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,120 +5,6 @@ .text - thumb_func_start ObjectCB_CameraObject -@ void ObjectCB_CameraObject(struct obj *object) -ObjectCB_CameraObject: @ 808ED78 - push {r4,r5,lr} - sub sp, 0xC - mov r2, sp - ldr r1, =gUnknown_084975EC - ldm r1!, {r3-r5} - stm r2!, {r3-r5} - movs r2, 0x30 - ldrsh r1, [r0, r2] - lsls r1, 2 - add r1, sp - ldr r1, [r1] - bl _call_via_r1 - add sp, 0xC - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end ObjectCB_CameraObject - - thumb_func_start CameraObject_0 -@ void CameraObject_0(struct obj *object) -CameraObject_0: @ 808EDA0 - push {lr} - ldr r3, =gSprites - movs r1, 0x2E - ldrsh r2, [r0, r1] - lsls r1, r2, 4 - adds r1, r2 - lsls r1, 2 - adds r1, r3 - ldrh r1, [r1, 0x20] - strh r1, [r0, 0x20] - lsls r1, r2, 4 - adds r1, r2 - lsls r1, 2 - adds r1, r3 - ldrh r1, [r1, 0x22] - strh r1, [r0, 0x22] - adds r3, r0, 0 - adds r3, 0x3E - ldrb r1, [r3] - movs r2, 0x4 - orrs r1, r2 - strb r1, [r3] - movs r1, 0x1 - strh r1, [r0, 0x30] - bl CameraObject_1 - pop {r0} - bx r0 - .pool - thumb_func_end CameraObject_0 - - thumb_func_start CameraObject_1 -@ void CameraObject_1(struct obj *object) -CameraObject_1: @ 808EDDC - push {r4,r5,lr} - ldr r3, =gSprites - movs r1, 0x2E - ldrsh r2, [r0, r1] - lsls r1, r2, 4 - adds r1, r2 - lsls r1, 2 - adds r1, r3 - ldrh r3, [r1, 0x22] - ldrh r2, [r0, 0x20] - ldrh r4, [r1, 0x20] - movs r5, 0x20 - ldrsh r1, [r1, r5] - subs r1, r2 - strh r1, [r0, 0x32] - ldrh r2, [r0, 0x22] - lsls r1, r3, 16 - asrs r1, 16 - subs r1, r2 - strh r1, [r0, 0x34] - strh r4, [r0, 0x20] - strh r3, [r0, 0x22] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end CameraObject_1 - - thumb_func_start CameraObject_2 -@ void CameraObject_2(struct obj *object) -CameraObject_2: @ 808EE14 - push {r4,lr} - ldr r4, =gSprites - movs r1, 0x2E - ldrsh r2, [r0, r1] - lsls r1, r2, 4 - adds r1, r2 - lsls r1, 2 - adds r1, r4 - ldrh r1, [r1, 0x20] - movs r3, 0 - strh r1, [r0, 0x20] - lsls r1, r2, 4 - adds r1, r2 - lsls r1, 2 - adds r1, r4 - ldrh r1, [r1, 0x22] - strh r1, [r0, 0x22] - strh r3, [r0, 0x32] - strh r3, [r0, 0x34] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end CameraObject_2 - thumb_func_start FindCameraObject @ struct obj *FindCameraObject() FindCameraObject: @ 808EE44 diff --git a/include/data3.h b/include/data3.h index 343f145c0..6b1569486 100644 --- a/include/data3.h +++ b/include/data3.h @@ -15,5 +15,6 @@ extern const struct PairedPalettes gUnknown_0850BD00[15]; extern const struct PairedPalettes gUnknown_0850BD78[15]; extern u8 gUnknown_084975C4[0x10]; extern const struct SpriteTemplate gUnknown_084975D4; +extern void (*const gUnknown_084975EC[3])(struct Sprite *); #endif //POKEEMERALD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 933908886..3fc962336 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -48,6 +48,9 @@ static u8 sub_808E8F4(const struct SpritePalette *); static u8 FindFieldObjectPaletteIndexByTag(u16); static void sub_808EAB0(u16, u8); static bool8 FieldObjectDoesZCoordMatch(struct MapObject *, u8); +//static void CameraObject_0(struct Sprite *); +/*static*/ void CameraObject_1(struct Sprite *); +//static void CameraObject_2(struct Sprite *); // ROM data @@ -1337,12 +1340,50 @@ void UpdateFieldObjectsForCameraUpdate(s16 x, s16 y) RemoveFieldObjectsOutsideView(); } -u8 AddCameraObject(u8 data0) +u8 AddCameraObject(u8 linkedSpriteId) { u8 spriteId; spriteId = CreateSprite(&gUnknown_084975D4, 0, 0, 4); gSprites[spriteId].invisible = TRUE; - gSprites[spriteId].data0 = data0; + gSprites[spriteId].data0 = linkedSpriteId; return spriteId; } + +void ObjectCB_CameraObject(struct Sprite *sprite) +{ + void (*callbacks[ARRAY_COUNT(gUnknown_084975EC)])(struct Sprite *); + + memcpy(callbacks, gUnknown_084975EC, sizeof gUnknown_084975EC); + callbacks[sprite->data1](sprite); +} + +/*static*/ void CameraObject_0(struct Sprite *sprite) +{ + sprite->pos1.x = gSprites[sprite->data0].pos1.x; + sprite->pos1.y = gSprites[sprite->data0].pos1.y; + sprite->invisible = TRUE; + sprite->data1 = 1; + CameraObject_1(sprite); +} + +/*static*/ void CameraObject_1(struct Sprite *sprite) +{ + s16 x; + s16 y; + + y = gSprites[sprite->data0].pos1.y; + x = gSprites[sprite->data0].pos1.x; + sprite->data2 = x - sprite->pos1.x; + sprite->data3 = y - sprite->pos1.y; + sprite->pos1.x = x; + sprite->pos1.y = y; +} + +/*static*/ void CameraObject_2(struct Sprite *sprite) +{ + sprite->pos1.x = gSprites[sprite->data0].pos1.x; + sprite->pos1.y = gSprites[sprite->data0].pos1.y; + sprite->data2 = 0; + sprite->data3 = 0; +} From 4dfae8b9e450467942b227895853c37043bee401 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 10 Sep 2017 16:32:26 -0400 Subject: [PATCH 066/342] FindCameraObject --- asm/field_map_obj.s | 40 ---------------------------------------- src/field_map_obj.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 40 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 38b328cdc..912d28077 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,46 +5,6 @@ .text - thumb_func_start FindCameraObject -@ struct obj *FindCameraObject() -FindCameraObject: @ 808EE44 - push {r4,r5,lr} - movs r3, 0 - ldr r4, =gSprites - adds r5, r4, 0 - adds r5, 0x1C -_0808EE4E: - lsls r0, r3, 4 - adds r0, r3 - lsls r1, r0, 2 - adds r2, r1, r4 - adds r0, r2, 0 - adds r0, 0x3E - ldrb r0, [r0] - lsls r0, 31 - cmp r0, 0 - beq _0808EE78 - adds r0, r1, r5 - ldr r1, [r0] - ldr r0, =ObjectCB_CameraObject - cmp r1, r0 - bne _0808EE78 - adds r0, r2, 0 - b _0808EE84 - .pool -_0808EE78: - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x3F - bls _0808EE4E - movs r0, 0 -_0808EE84: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end FindCameraObject - thumb_func_start CameraObjectReset1 @ void CameraObjectReset1() CameraObjectReset1: @ 808EE8C diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 3fc962336..f600db934 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1387,3 +1387,17 @@ void ObjectCB_CameraObject(struct Sprite *sprite) sprite->data2 = 0; sprite->data3 = 0; } + +/*static*/ struct Sprite *FindCameraObject(void) +{ + u8 spriteId; + + for (spriteId = 0; spriteId < MAX_SPRITES; spriteId ++) + { + if (gSprites[spriteId].inUse && gSprites[spriteId].callback == ObjectCB_CameraObject) + { + return &gSprites[spriteId]; + } + } + return NULL; +} From a89da3ae31144d032f942fb963acc34f23818a91 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 10 Sep 2017 16:36:19 -0400 Subject: [PATCH 067/342] Functions operating on the camera object --- asm/field_map_obj.s | 64 --------------------------------------------- src/field_map_obj.c | 43 +++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 65 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 912d28077..cdec058de 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,70 +5,6 @@ .text - thumb_func_start CameraObjectReset1 -@ void CameraObjectReset1() -CameraObjectReset1: @ 808EE8C - push {lr} - bl FindCameraObject - adds r2, r0, 0 - cmp r2, 0 - beq _0808EEA4 - movs r0, 0 - strh r0, [r2, 0x30] - ldr r1, [r2, 0x1C] - adds r0, r2, 0 - bl _call_via_r1 -_0808EEA4: - pop {r0} - bx r0 - thumb_func_end CameraObjectReset1 - - thumb_func_start CameraObjectSetFollowedObjectId -@ void CameraObjectSetFollowedObjectId(u8 objectId) -CameraObjectSetFollowedObjectId: @ 808EEA8 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - bl FindCameraObject - cmp r0, 0 - beq _0808EEBC - strh r4, [r0, 0x2E] - bl CameraObjectReset1 -_0808EEBC: - pop {r4} - pop {r0} - bx r0 - thumb_func_end CameraObjectSetFollowedObjectId - - thumb_func_start CameraObjectGetFollowedObjectId -@ u8 CameraObjectGetFollowedObjectId() -CameraObjectGetFollowedObjectId: @ 808EEC4 - push {lr} - bl FindCameraObject - cmp r0, 0 - beq _0808EED6 - ldrh r0, [r0, 0x2E] - lsls r0, 24 - lsrs r0, 24 - b _0808EED8 -_0808EED6: - movs r0, 0x40 -_0808EED8: - pop {r1} - bx r1 - thumb_func_end CameraObjectGetFollowedObjectId - - thumb_func_start CameraObjectReset2 -@ void CameraObjectReset2() -CameraObjectReset2: @ 808EEDC - push {lr} - bl FindCameraObject - movs r1, 0x2 - strh r1, [r0, 0x30] - pop {r0} - bx r0 - thumb_func_end CameraObjectReset2 - thumb_func_start sub_808EEEC sub_808EEEC: @ 808EEEC push {r4-r7,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index f600db934..40b12b1b3 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1388,7 +1388,7 @@ void ObjectCB_CameraObject(struct Sprite *sprite) sprite->data3 = 0; } -/*static*/ struct Sprite *FindCameraObject(void) +static struct Sprite *FindCameraObject(void) { u8 spriteId; @@ -1401,3 +1401,44 @@ void ObjectCB_CameraObject(struct Sprite *sprite) } return NULL; } + +void CameraObjectReset1(void) +{ + struct Sprite *cameraObject; + + cameraObject = FindCameraObject(); + if (cameraObject != NULL) + { + cameraObject->data1 = 0; + cameraObject->callback(cameraObject); + } +} + +void CameraObjectSetFollowedObjectId(u8 objectId) +{ + struct Sprite *cameraObject; + + cameraObject = FindCameraObject(); + if (cameraObject != NULL) + { + cameraObject->data0 = objectId; + CameraObjectReset1(); + } +} + +u8 CameraObjectGetFollowedObjectId(void) +{ + struct Sprite *cameraObject; + + cameraObject = FindCameraObject(); + if (cameraObject == NULL) + { + return MAX_SPRITES; + } + return cameraObject->data0; +} + +void CameraObjectReset2(void) +{ + FindCameraObject()->data1 = 2; +} From 251360624a2f4802a607b7a114a6fe5db66623af Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 10 Sep 2017 16:53:08 -0400 Subject: [PATCH 068/342] CopySprite --- asm/field_map_obj.s | 53 --------------------------------------------- src/field_map_obj.c | 18 +++++++++++++++ 2 files changed, 18 insertions(+), 53 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index cdec058de..4b01ef858 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,59 +5,6 @@ .text - thumb_func_start sub_808EEEC -sub_808EEEC: @ 808EEEC - push {r4-r7,lr} - mov r7, r8 - push {r7} - mov r12, r0 - lsls r1, 16 - lsrs r1, 16 - mov r8, r1 - lsls r2, 16 - lsrs r6, r2, 16 - lsls r3, 24 - lsrs r7, r3, 24 - movs r5, 0 - ldr r1, =gSprites -_0808EF06: - lsls r0, r5, 4 - adds r0, r5 - lsls r0, 2 - adds r4, r0, r1 - adds r0, r4, 0 - adds r0, 0x3E - ldrb r0, [r0] - lsls r0, 31 - cmp r0, 0 - bne _0808EF38 - adds r0, r4, 0 - mov r1, r12 - movs r2, 0x44 - bl memcpy - mov r0, r8 - strh r0, [r4, 0x20] - strh r6, [r4, 0x22] - adds r0, r4, 0 - adds r0, 0x43 - strb r7, [r0] - b _0808EF42 - .pool -_0808EF38: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0x3F - bls _0808EF06 -_0808EF42: - adds r0, r5, 0 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_808EEEC - thumb_func_start obj_unfreeze obj_unfreeze: @ 808EF50 push {r4-r7,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 40b12b1b3..a54444c59 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1442,3 +1442,21 @@ void CameraObjectReset2(void) { FindCameraObject()->data1 = 2; } + +u8 CopySprite(struct Sprite *sprite, s16 x, s16 y, u8 subpriority) +{ + u8 i; + + for (i = 0; i < MAX_SPRITES; i ++) + { + if (!gSprites[i].inUse) + { + gSprites[i] = *sprite; + gSprites[i].pos1.x = x; + gSprites[i].pos1.y = y; + gSprites[i].subpriority = subpriority; + break; + } + } + return i; +} From 69a1ff984d8673bb3a93c490591866573dde2ac7 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 10 Sep 2017 16:57:08 -0400 Subject: [PATCH 069/342] obj_unfreeze --- asm/field_map_obj.s | 60 --------------------------------------------- src/field_map_obj.c | 18 ++++++++++++++ 2 files changed, 18 insertions(+), 60 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 4b01ef858..df335a0bf 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,66 +5,6 @@ .text - thumb_func_start obj_unfreeze -obj_unfreeze: @ 808EF50 - push {r4-r7,lr} - mov r7, r8 - push {r7} - mov r12, r0 - lsls r1, 16 - lsrs r1, 16 - mov r8, r1 - lsls r2, 16 - lsrs r6, r2, 16 - lsls r3, 24 - lsrs r7, r3, 24 - movs r5, 0x3F - ldr r3, =gSprites - movs r2, 0x1 - negs r2, r2 -_0808EF6E: - lsls r0, r5, 16 - asrs r1, r0, 16 - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r4, r0, r3 - adds r0, r4, 0 - adds r0, 0x3E - ldrb r0, [r0] - lsls r0, 31 - cmp r0, 0 - bne _0808EFA8 - adds r0, r4, 0 - mov r1, r12 - movs r2, 0x44 - bl memcpy - mov r0, r8 - strh r0, [r4, 0x20] - strh r6, [r4, 0x22] - adds r0, r4, 0 - adds r0, 0x43 - strb r7, [r0] - lsls r0, r5, 24 - lsrs r0, 24 - b _0808EFB6 - .pool -_0808EFA8: - subs r0, r1, 0x1 - lsls r0, 16 - lsrs r5, r0, 16 - asrs r0, 16 - cmp r0, r2 - bgt _0808EF6E - movs r0, 0x40 -_0808EFB6: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end obj_unfreeze - thumb_func_start FieldObjectSetDirection @ void FieldObjectSetDirection(struct npc_state *fieldObject, u8 direction) FieldObjectSetDirection: @ 808EFC0 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index a54444c59..3d3934aa1 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1460,3 +1460,21 @@ u8 CopySprite(struct Sprite *sprite, s16 x, s16 y, u8 subpriority) } return i; } + +u8 obj_unfreeze(struct Sprite *sprite, s16 x, s16 y, u8 subpriority) +{ + s16 i; + + for (i = MAX_SPRITES - 1; i > -1; i --) + { + if (!gSprites[i].inUse) + { + gSprites[i] = *sprite; + gSprites[i].pos1.x = x; + gSprites[i].pos1.y = y; + gSprites[i].subpriority = subpriority; + return i; + } + } + return MAX_SPRITES; +} From b263dcc7cf6caab910511caf2d1c2aff9f629476 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 10 Sep 2017 17:04:37 -0400 Subject: [PATCH 070/342] FieldObjectSetDirection --- asm/field_map_obj.s | 39 --------------------------------------- src/field_map_obj.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 39 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index df335a0bf..11e93a4ea 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,45 +5,6 @@ .text - thumb_func_start FieldObjectSetDirection -@ void FieldObjectSetDirection(struct npc_state *fieldObject, u8 direction) -FieldObjectSetDirection: @ 808EFC0 - push {r4,lr} - adds r3, r0, 0 - lsls r1, 24 - lsrs r2, r1, 24 - adds r4, r2, 0 - ldrb r0, [r3, 0x18] - lsls r0, 28 - lsrs r0, 28 - adds r1, r3, 0 - adds r1, 0x20 - strb r0, [r1] - ldrb r0, [r3, 0x1] - lsls r0, 30 - cmp r0, 0 - blt _0808EFF0 - movs r0, 0xF - adds r1, r2, 0 - ands r1, r0 - ldrb r2, [r3, 0x18] - movs r0, 0x10 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r3, 0x18] -_0808EFF0: - lsls r2, r4, 4 - ldrb r1, [r3, 0x18] - movs r0, 0xF - ands r0, r1 - orrs r0, r2 - strb r0, [r3, 0x18] - pop {r4} - pop {r0} - bx r0 - thumb_func_end FieldObjectSetDirection - thumb_func_start GetFieldObjectScriptPointerByLocalIdAndMap @ u32 GetFieldObjectScriptPointerByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId) GetFieldObjectScriptPointerByLocalIdAndMap: @ 808F004 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 3d3934aa1..d5481c573 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1478,3 +1478,15 @@ u8 obj_unfreeze(struct Sprite *sprite, s16 x, s16 y, u8 subpriority) } return MAX_SPRITES; } + +void FieldObjectSetDirection(struct MapObject *mapObject, u8 direction) +{ + s8 d2; + mapObject->mapobj_unk_20 = mapObject->mapobj_unk_18; + if (!mapObject->mapobj_bit_9) + { + d2 = direction; + mapObject->mapobj_unk_18 = d2; + } + mapObject->placeholder18 = direction; +} From 84569918376aa346cbb94925a70d64569821a4ac Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 10 Sep 2017 17:11:03 -0400 Subject: [PATCH 071/342] Functions for retrieving flag and script pointer given map object id --- asm/field_map_obj.s | 74 --------------------------------------------- src/field_map_obj.c | 20 ++++++++++++ 2 files changed, 20 insertions(+), 74 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 11e93a4ea..6571f40bc 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,80 +5,6 @@ .text - thumb_func_start GetFieldObjectScriptPointerByLocalIdAndMap -@ u32 GetFieldObjectScriptPointerByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId) -GetFieldObjectScriptPointerByLocalIdAndMap: @ 808F004 - push {lr} - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - bl GetFieldObjectTemplateByLocalIdAndMap - ldr r0, [r0, 0x10] - pop {r1} - bx r1 - thumb_func_end GetFieldObjectScriptPointerByLocalIdAndMap - - thumb_func_start GetFieldObjectScriptPointerByFieldObjectId -@ u32 GetFieldObjectScriptPointerByFieldObjectId(u8 fieldObjectId) -GetFieldObjectScriptPointerByFieldObjectId: @ 808F01C - push {lr} - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gMapObjects - lsls r2, r0, 3 - adds r2, r0 - lsls r2, 2 - adds r2, r1 - ldrb r0, [r2, 0x8] - ldrb r1, [r2, 0x9] - ldrb r2, [r2, 0xA] - bl GetFieldObjectScriptPointerByLocalIdAndMap - pop {r1} - bx r1 - .pool - thumb_func_end GetFieldObjectScriptPointerByFieldObjectId - - thumb_func_start GetFieldObjectFlagIdByLocalIdAndMap -@ u16 GetFieldObjectFlagIdByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId) -GetFieldObjectFlagIdByLocalIdAndMap: @ 808F040 - push {lr} - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - bl GetFieldObjectTemplateByLocalIdAndMap - ldrh r0, [r0, 0x14] - pop {r1} - bx r1 - thumb_func_end GetFieldObjectFlagIdByLocalIdAndMap - - thumb_func_start GetFieldObjectFlagIdByFieldObjectId -@ u16 GetFieldObjectFlagIdByFieldObjectId(u8 fieldObjectId) -GetFieldObjectFlagIdByFieldObjectId: @ 808F058 - push {lr} - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gMapObjects - lsls r2, r0, 3 - adds r2, r0 - lsls r2, 2 - adds r2, r1 - ldrb r0, [r2, 0x8] - ldrb r1, [r2, 0x9] - ldrb r2, [r2, 0xA] - bl GetFieldObjectFlagIdByLocalIdAndMap - lsls r0, 16 - lsrs r0, 16 - pop {r1} - bx r1 - .pool - thumb_func_end GetFieldObjectFlagIdByFieldObjectId - thumb_func_start sub_808F080 sub_808F080: @ 808F080 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index d5481c573..42769ed13 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1490,3 +1490,23 @@ void FieldObjectSetDirection(struct MapObject *mapObject, u8 direction) } mapObject->placeholder18 = direction; } + +static const u8 *GetFieldObjectScriptPointerByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) +{ + return GetFieldObjectTemplateByLocalIdAndMap(localId, mapNum, mapGroup)->script; +} + +const u8 *GetFieldObjectScriptPointerByFieldObjectId(u8 mapObjectId) +{ + return GetFieldObjectScriptPointerByLocalIdAndMap(gMapObjects[mapObjectId].localId, gMapObjects[mapObjectId].mapNum, gMapObjects[mapObjectId].mapGroup); +} + +static u16 GetFieldObjectFlagIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) +{ + return GetFieldObjectTemplateByLocalIdAndMap(localId, mapNum, mapGroup)->flagId; +} + +u16 GetFieldObjectFlagIdByFieldObjectId(u8 mapObjectId) +{ + return GetFieldObjectFlagIdByLocalIdAndMap(gMapObjects[mapObjectId].localId, gMapObjects[mapObjectId].mapNum, gMapObjects[mapObjectId].mapGroup); +} From bcf844f965912cac05b6cfb26f430b2ede75f743 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 10 Sep 2017 17:47:37 -0400 Subject: [PATCH 072/342] sub_808F080 --- asm/field_map_obj.s | 33 --------------------------------- src/field_map_obj.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 33 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 6571f40bc..3ef34cfd6 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,39 +5,6 @@ .text - thumb_func_start sub_808F080 -sub_808F080: @ 808F080 - push {lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _0808F0B4 - ldr r2, =gMapObjects - mov r0, sp - ldrb r1, [r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x7] - b _0808F0B6 - .pool -_0808F0B4: - movs r0, 0xFF -_0808F0B6: - add sp, 0x4 - pop {r1} - bx r1 - thumb_func_end sub_808F080 - thumb_func_start sub_808F0BC sub_808F0BC: @ 808F0BC lsls r0, 24 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 42769ed13..b33332661 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1510,3 +1510,14 @@ u16 GetFieldObjectFlagIdByFieldObjectId(u8 mapObjectId) { return GetFieldObjectFlagIdByLocalIdAndMap(gMapObjects[mapObjectId].localId, gMapObjects[mapObjectId].mapNum, gMapObjects[mapObjectId].mapGroup); } + +u8 sub_808F080(u8 localId, u8 mapNum, u8 mapGroup) +{ + u8 mapObjectId; + + if (TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId)) + { + return 0xFF; + } + return gMapObjects[mapObjectId].trainerType; +} From bd9b81546f4eedae24278b54b02301b8184112a4 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 11 Sep 2017 10:19:03 -0400 Subject: [PATCH 073/342] through FieldObjectGetBerryTreeId --- asm/field_map_obj.s | 62 --------------------------------------------- src/field_map_obj.c | 22 ++++++++++++++++ 2 files changed, 22 insertions(+), 62 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 3ef34cfd6..5cf4550c3 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,68 +5,6 @@ .text - thumb_func_start sub_808F0BC -sub_808F0BC: @ 808F0BC - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gMapObjects - lsls r1, r0, 3 - adds r1, r0 - lsls r1, 2 - adds r1, r2 - ldrb r0, [r1, 0x7] - bx lr - .pool - thumb_func_end sub_808F0BC - - thumb_func_start sub_808F0D4 -sub_808F0D4: @ 808F0D4 - push {lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _0808F108 - ldr r2, =gMapObjects - mov r0, sp - ldrb r1, [r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1D] - b _0808F10A - .pool -_0808F108: - movs r0, 0xFF -_0808F10A: - add sp, 0x4 - pop {r1} - bx r1 - thumb_func_end sub_808F0D4 - - thumb_func_start FieldObjectGetBerryTreeId -@ u8 FieldObjectGetBerryTreeId(u8 fieldObjectId) -FieldObjectGetBerryTreeId: @ 808F110 - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gMapObjects - lsls r1, r0, 3 - adds r1, r0 - lsls r1, 2 - adds r1, r2 - ldrb r0, [r1, 0x1D] - bx lr - .pool - thumb_func_end FieldObjectGetBerryTreeId - thumb_func_start GetFieldObjectTemplateByLocalIdAndMap @ struct FieldObjectTemplate *GetFieldObjectTemplateByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId) GetFieldObjectTemplateByLocalIdAndMap: @ 808F128 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index b33332661..d4f724079 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1521,3 +1521,25 @@ u8 sub_808F080(u8 localId, u8 mapNum, u8 mapGroup) } return gMapObjects[mapObjectId].trainerType; } + +u8 sub_808F0BC(u8 mapObjectId) +{ + return gMapObjects[mapObjectId].trainerType; +} + +u8 sub_808F0D4(u8 localId, u8 mapNum, u8 mapGroup) +{ + u8 mapObjectId; + + if (TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId)) + { + return 0xFF; + } + return gMapObjects[mapObjectId].trainerRange_berryTreeId; +} + +u8 FieldObjectGetBerryTreeId(u8 mapObjectId) +{ + return gMapObjects[mapObjectId].trainerRange_berryTreeId; +} + From 5ad282c82c79205045fce2e8d7db993846d86b17 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 11 Sep 2017 10:29:00 -0400 Subject: [PATCH 074/342] GetFieldObjectTemplateByLocalIdAndMap --- asm/field_map_obj.s | 42 ------------------------------------------ include/rom4.h | 1 + src/field_map_obj.c | 21 +++++++++++++++++++++ 3 files changed, 22 insertions(+), 42 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 5cf4550c3..f3c2929fd 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,48 +5,6 @@ .text - thumb_func_start GetFieldObjectTemplateByLocalIdAndMap -@ struct FieldObjectTemplate *GetFieldObjectTemplateByLocalIdAndMap(u8 localId, u8 mapId, u8 mapGroupId) -GetFieldObjectTemplateByLocalIdAndMap: @ 808F128 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - lsls r1, 24 - lsrs r3, r1, 24 - lsls r2, 24 - lsrs r2, 24 - ldr r0, =gSaveBlock1Ptr - ldr r1, [r0] - movs r0, 0x5 - ldrsb r0, [r1, r0] - cmp r0, r3 - bne _0808F160 - movs r0, 0x4 - ldrsb r0, [r1, r0] - cmp r0, r2 - bne _0808F160 - movs r0, 0xC7 - lsls r0, 4 - adds r1, r0 - ldr r0, =gMapHeader - ldr r0, [r0, 0x4] - b _0808F16C - .pool -_0808F160: - adds r0, r2, 0 - adds r1, r3, 0 - bl get_mapheader_by_bank_and_number - ldr r0, [r0, 0x4] - ldr r1, [r0, 0x4] -_0808F16C: - ldrb r2, [r0] - adds r0, r4, 0 - bl FindFieldObjectTemplateInArrayByLocalId - pop {r4} - pop {r1} - bx r1 - thumb_func_end GetFieldObjectTemplateByLocalIdAndMap - thumb_func_start FindFieldObjectTemplateInArrayByLocalId @ struct FieldObjectTemplate *FindFieldObjectTemplateInArrayByLocalId(u8 localId, struct FieldObjectTemplate *templates, u8 numTemplates) FindFieldObjectTemplateInArrayByLocalId: @ 808F17C diff --git a/include/rom4.h b/include/rom4.h index 655ce3fde..0c7b87353 100644 --- a/include/rom4.h +++ b/include/rom4.h @@ -25,5 +25,6 @@ struct UCoords32 extern struct LinkPlayerMapObject gLinkPlayerMapObjects[4]; void strange_npc_table_clear(void); +const struct MapHeader *get_mapheader_by_bank_and_number(u8, u8); #endif //POKEEMERALD_ROM4_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index d4f724079..78269fd58 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -51,6 +51,7 @@ static bool8 FieldObjectDoesZCoordMatch(struct MapObject *, u8); //static void CameraObject_0(struct Sprite *); /*static*/ void CameraObject_1(struct Sprite *); //static void CameraObject_2(struct Sprite *); +/*static*/ struct MapObjectTemplate *FindFieldObjectTemplateInArrayByLocalId(u8 localId, struct MapObjectTemplate *templates, u8 count); // ROM data @@ -1543,3 +1544,23 @@ u8 FieldObjectGetBerryTreeId(u8 mapObjectId) return gMapObjects[mapObjectId].trainerRange_berryTreeId; } +struct MapObjectTemplate *GetFieldObjectTemplateByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) +{ + struct MapObjectTemplate *templates; + const struct MapHeader *mapHeader; + u8 count; + + if (gSaveBlock1Ptr->location.mapNum == mapNum && gSaveBlock1Ptr->location.mapGroup == mapGroup) + { + templates = gSaveBlock1Ptr->mapObjectTemplates; + count = gMapHeader.events->mapObjectCount; + } + else + { + mapHeader = get_mapheader_by_bank_and_number(mapGroup, mapNum); + templates = mapHeader->events->mapObjects; + count = mapHeader->events->mapObjectCount; + } + return FindFieldObjectTemplateInArrayByLocalId(localId, templates, count); +} + From 7c40186e35a35f4cf84612af5c9326b7879342f2 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 11 Sep 2017 10:31:09 -0400 Subject: [PATCH 075/342] FindFieldObjectTemplateInArrayByLocalId --- asm/field_map_obj.s | 36 ------------------------------------ src/field_map_obj.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 36 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index f3c2929fd..a0bf5fa69 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,42 +5,6 @@ .text - thumb_func_start FindFieldObjectTemplateInArrayByLocalId -@ struct FieldObjectTemplate *FindFieldObjectTemplateInArrayByLocalId(u8 localId, struct FieldObjectTemplate *templates, u8 numTemplates) -FindFieldObjectTemplateInArrayByLocalId: @ 808F17C - push {r4,r5,lr} - adds r5, r1, 0 - lsls r0, 24 - lsrs r4, r0, 24 - lsls r2, 24 - lsrs r2, 24 - movs r1, 0 - cmp r1, r2 - bcs _0808F1AA -_0808F18E: - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 3 - adds r3, r0, r5 - ldrb r0, [r3] - cmp r0, r4 - bne _0808F1A0 - adds r0, r3, 0 - b _0808F1AC -_0808F1A0: - adds r0, r1, 0x1 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, r2 - bcc _0808F18E -_0808F1AA: - movs r0, 0 -_0808F1AC: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end FindFieldObjectTemplateInArrayByLocalId - thumb_func_start sub_808F1B4 @ int sub_808F1B4(struct npc_state *fieldObject) sub_808F1B4: @ 808F1B4 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 78269fd58..86ac6a00f 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1564,3 +1564,16 @@ struct MapObjectTemplate *GetFieldObjectTemplateByLocalIdAndMap(u8 localId, u8 m return FindFieldObjectTemplateInArrayByLocalId(localId, templates, count); } +struct MapObjectTemplate *FindFieldObjectTemplateInArrayByLocalId(u8 localId, struct MapObjectTemplate *templates, u8 count) +{ + u8 i; + + for (i = 0; i < count; i ++) + { + if (templates[i].localId == localId) + { + return &templates[i]; + } + } + return NULL; +} From 2b9b75a8245c32467d97ffeef280003c4fe0bb66 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 11 Sep 2017 10:40:34 -0400 Subject: [PATCH 076/342] sub_808F1B4 --- asm/field_map_obj.s | 50 --------------------------------------------- src/field_map_obj.c | 18 ++++++++++++++++ 2 files changed, 18 insertions(+), 50 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index a0bf5fa69..5c8754ac0 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,56 +5,6 @@ .text - thumb_func_start sub_808F1B4 -@ int sub_808F1B4(struct npc_state *fieldObject) -sub_808F1B4: @ 808F1B4 - push {r4,r5,lr} - adds r3, r0, 0 - ldrb r0, [r3, 0x9] - ldr r1, =gSaveBlock1Ptr - ldr r2, [r1] - movs r1, 0x5 - ldrsb r1, [r2, r1] - cmp r0, r1 - bne _0808F200 - ldrb r1, [r3, 0xA] - movs r0, 0x4 - ldrsb r0, [r2, r0] - cmp r1, r0 - beq _0808F1E2 - b _0808F200 - .pool -_0808F1D8: - movs r1, 0xC7 - lsls r1, 4 - adds r0, r1 - adds r0, r4, r0 - b _0808F202 -_0808F1E2: - movs r1, 0 - adds r4, r2, 0 - ldrb r3, [r3, 0x8] - movs r5, 0xC7 - lsls r5, 4 - adds r2, r4, r5 - movs r0, 0 -_0808F1F0: - ldrb r5, [r2] - cmp r3, r5 - beq _0808F1D8 - adds r2, 0x18 - adds r0, 0x18 - adds r1, 0x1 - cmp r1, 0x3F - ble _0808F1F0 -_0808F200: - movs r0, 0 -_0808F202: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_808F1B4 - thumb_func_start sub_808F208 @ void sub_808F208(struct npc_state *fieldObject) sub_808F208: @ 808F208 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 86ac6a00f..56c5dee85 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1577,3 +1577,21 @@ struct MapObjectTemplate *FindFieldObjectTemplateInArrayByLocalId(u8 localId, st } return NULL; } + +struct MapObjectTemplate *sub_808F1B4(struct MapObject *mapObject) +{ + int i; + + if (mapObject->mapNum != gSaveBlock1Ptr->location.mapNum || mapObject->mapGroup != gSaveBlock1Ptr->location.mapGroup) + { + return NULL; + } + for (i = 0; i < 64; i ++) // Using ARRAY_COUNT here results in the wrong conditional branch instruction (bls instead of ble) + { + if (mapObject->localId == gSaveBlock1Ptr->mapObjectTemplates[i].localId) + { + return &gSaveBlock1Ptr->mapObjectTemplates[i]; + } + } + return NULL; +} From 9306122359968579b27b9a41e3cfd082860a4231 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 11 Sep 2017 10:46:26 -0400 Subject: [PATCH 077/342] through sub_808F23C --- asm/field_map_obj.s | 50 --------------------------------------- include/global.fieldmap.h | 2 +- src/field_map_obj.c | 36 +++++++++++++++++++++++++++- 3 files changed, 36 insertions(+), 52 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 5c8754ac0..243e96c75 100644 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,56 +5,6 @@ .text - thumb_func_start sub_808F208 -@ void sub_808F208(struct npc_state *fieldObject) -sub_808F208: @ 808F208 - push {r4,lr} - adds r4, r0, 0 - bl sub_808F1B4 - adds r1, r0, 0 - cmp r1, 0 - beq _0808F222 - ldrh r0, [r4, 0x10] - subs r0, 0x7 - strh r0, [r1, 0x4] - ldrh r0, [r4, 0x12] - subs r0, 0x7 - strh r0, [r1, 0x6] -_0808F222: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_808F208 - - thumb_func_start sub_808F228 -sub_808F228: @ 808F228 - push {r4,lr} - adds r4, r1, 0 - bl sub_808F1B4 - cmp r0, 0 - beq _0808F236 - str r4, [r0, 0x10] -_0808F236: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_808F228 - - thumb_func_start sub_808F23C -sub_808F23C: @ 808F23C - push {r4,lr} - lsls r1, 24 - lsrs r4, r1, 24 - bl sub_808F1B4 - cmp r0, 0 - beq _0808F24C - strb r4, [r0, 0x9] -_0808F24C: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_808F23C - thumb_func_start sub_808F254 @ void sub_808F254(u8 localId, u8 mapId, u8 mapGroupId) sub_808F254: @ 808F254 diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 5a7a75ccb..f8955b9fd 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -86,7 +86,7 @@ struct MapObjectTemplate ///*0x0B*/ u8 fillerB[1]; /*0x0C*/ u16 unkC; /*0x0E*/ u16 unkE; - /*0x10*/ u8 *script; + /*0x10*/ const u8 *script; /*0x14*/ u16 flagId; /*0x16*/ u8 filler_16[2]; }; /*size = 0x18*/ diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 56c5dee85..59f8d35a1 100644 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1578,7 +1578,7 @@ struct MapObjectTemplate *FindFieldObjectTemplateInArrayByLocalId(u8 localId, st return NULL; } -struct MapObjectTemplate *sub_808F1B4(struct MapObject *mapObject) +struct MapObjectTemplate *sub_808F1B4(const struct MapObject *mapObject) { int i; @@ -1595,3 +1595,37 @@ struct MapObjectTemplate *sub_808F1B4(struct MapObject *mapObject) } return NULL; } + +void sub_808F208(const struct MapObject *mapObject) +{ + struct MapObjectTemplate *mapObjectTemplate; + + mapObjectTemplate = sub_808F1B4(mapObject); + if (mapObjectTemplate != NULL) + { + mapObjectTemplate->x = mapObject->coords2.x - 7; + mapObjectTemplate->y = mapObject->coords2.y - 7; + } +} + +void sub_808F228(const struct MapObject *mapObject, const u8 *script) +{ + struct MapObjectTemplate *mapObjectTemplate; + + mapObjectTemplate = sub_808F1B4(mapObject); + if (mapObjectTemplate != NULL) + { + mapObjectTemplate->script = script; + } +} + +void sub_808F23C(const struct MapObject *mapObject, u8 movementType) +{ + struct MapObjectTemplate *mapObjectTemplate; + + mapObjectTemplate = sub_808F1B4(mapObject); + if (mapObjectTemplate != NULL) + { + mapObjectTemplate->movementType = movementType; + } +} From c6ef3442621227562f15017441aa6fb7709e7187 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Sep 2017 16:17:52 -0400 Subject: [PATCH 078/342] sub_808F254 --- asm/field_map_obj.s | 31 ------------------------------- include/field_map_obj.h | 1 + src/field_map_obj.c | 10 ++++++++++ 3 files changed, 11 insertions(+), 31 deletions(-) mode change 100644 => 100755 asm/field_map_obj.s mode change 100644 => 100755 include/field_map_obj.h mode change 100644 => 100755 src/field_map_obj.c diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s old mode 100644 new mode 100755 index 243e96c75..ef9e6a2e8 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,37 +5,6 @@ .text - thumb_func_start sub_808F254 -@ void sub_808F254(u8 localId, u8 mapId, u8 mapGroupId) -sub_808F254: @ 808F254 - push {lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _0808F282 - mov r0, sp - ldrb r1, [r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - ldr r1, =gMapObjects - adds r0, r1 - bl sub_808F208 -_0808F282: - add sp, 0x4 - pop {r0} - bx r0 - .pool - thumb_func_end sub_808F254 - thumb_func_start sub_808F28C sub_808F28C: @ 808F28C push {r4,lr} diff --git a/include/field_map_obj.h b/include/field_map_obj.h old mode 100644 new mode 100755 index b292d200d..ec28df643 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -46,6 +46,7 @@ void sub_808E75C(s16, s16); void FieldObjectGetLocalIdAndMap(struct MapObject *, u8 *, u8 *, u8 *); void npc_coords_shift(struct MapObject *, s16, s16); void sub_808EB08(struct MapObject *, s16, s16); +void sub_808F254(u8, u8, u8); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c old mode 100644 new mode 100755 index 59f8d35a1..af36d95f7 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1629,3 +1629,13 @@ void sub_808F23C(const struct MapObject *mapObject, u8 movementType) mapObjectTemplate->movementType = movementType; } } + +void sub_808F254(u8 localId, u8 mapNum, u8 mapGroup) +{ + u8 mapObjectId; + + if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId)) + { + sub_808F208(&gMapObjects[mapObjectId]); + } +} From 9286c93c8afd9505259487481e45db6956444004 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 12 Sep 2017 16:47:51 -0400 Subject: [PATCH 079/342] npc_paltag_set_load --- asm/field_map_obj.s | 96 ----------------------------------------- include/data3.h | 7 +-- include/event_scripts.h | 11 +++++ src/field_map_obj.c | 37 +++++++++++++++- 4 files changed, 51 insertions(+), 100 deletions(-) mode change 100644 => 100755 include/data3.h create mode 100755 include/event_scripts.h diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index ef9e6a2e8..8da48cd1a 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,102 +5,6 @@ .text - thumb_func_start sub_808F28C -sub_808F28C: @ 808F28C - push {r4,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 24 - lsrs r4, r3, 24 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _0808F2E8 - cmp r4, 0x6 - beq _0808F2B6 - cmp r4, 0x7 - beq _0808F2D4 - b _0808F2E8 -_0808F2B6: - mov r0, sp - ldrb r1, [r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - ldr r1, =gMapObjects - adds r0, r1 - ldr r1, =gUnknown_082766A2 - bl sub_808F228 - b _0808F2E8 - .pool -_0808F2D4: - mov r0, sp - ldrb r1, [r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - ldr r1, =gMapObjects - adds r0, r1 - ldr r1, =gUnknown_082766A6 - bl sub_808F228 -_0808F2E8: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_808F28C - - thumb_func_start npc_paltag_set_load -npc_paltag_set_load: @ 808F2F8 - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - bl gpu_pal_allocator_reset__manage_upper_four - ldr r1, =gUnknown_020375B6 - ldr r2, =0x000011ff - adds r0, r2, 0 - strh r0, [r1] - ldr r2, =gUnknown_020375B4 - strb r4, [r2] - cmp r4, 0x1 - bne _0808F344 - ldr r1, =gUnknown_0850BE38 - ldrb r0, [r2] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - movs r1, 0 - movs r2, 0x6 - bl pal_patch_for_npc_range - ldr r1, =gReservedSpritePaletteCount - movs r0, 0x8 - strb r0, [r1] - b _0808F356 - .pool -_0808F344: - ldr r0, =gUnknown_0850BE38 - ldrb r1, [r2] - lsls r1, 2 - adds r1, r0 - ldr r0, [r1] - movs r1, 0 - movs r2, 0xA - bl pal_patch_for_npc_range -_0808F356: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end npc_paltag_set_load - thumb_func_start npc_paltag_by_palslot npc_paltag_by_palslot: @ 808F360 push {r4-r6,lr} diff --git a/include/data3.h b/include/data3.h old mode 100644 new mode 100755 index 6b1569486..29b1acc34 --- a/include/data3.h +++ b/include/data3.h @@ -10,11 +10,12 @@ struct PairedPalettes { const u16 *data; }; -extern const struct SpritePalette gUnknown_0850BBC8[]; -extern const struct PairedPalettes gUnknown_0850BD00[15]; -extern const struct PairedPalettes gUnknown_0850BD78[15]; extern u8 gUnknown_084975C4[0x10]; extern const struct SpriteTemplate gUnknown_084975D4; extern void (*const gUnknown_084975EC[3])(struct Sprite *); +extern const struct SpritePalette gUnknown_0850BBC8[]; +extern const struct PairedPalettes gUnknown_0850BD00[15]; +extern const struct PairedPalettes gUnknown_0850BD78[15]; +extern const u16 *const gUnknown_0850BE38[2]; #endif //POKEEMERALD_DATA3_H diff --git a/include/event_scripts.h b/include/event_scripts.h new file mode 100755 index 000000000..967bc196a --- /dev/null +++ b/include/event_scripts.h @@ -0,0 +1,11 @@ +// +// Created by scott on 9/12/2017. +// + +#ifndef POKEEMERALD_EVENT_SCRIPTS_H +#define POKEEMERALD_EVENT_SCRIPTS_H + +extern const u8 gUnknown_082766A2[]; +extern const u8 gUnknown_082766A6[]; + +#endif //POKEEMERALD_EVENT_SCRIPTS_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index af36d95f7..b4617cd5a 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -5,6 +5,7 @@ #include "sprite.h" #include "rom4.h" #include "data3.h" +#include "event_scripts.h" #include "berry.h" #include "palette.h" #include "field_player_avatar.h" @@ -1163,7 +1164,7 @@ void pal_patch_for_npc(u16 paletteTag, u8 paletteSlot) LoadPalette(gUnknown_0850BBC8[paletteIdx].data, 16 * paletteSlot + 256, 0x20); } -void pal_patch_for_npc_range(u16 *paletteTags, u8 minSlot, u8 maxSlot) +void pal_patch_for_npc_range(const u16 *paletteTags, u8 minSlot, u8 maxSlot) { while (minSlot < maxSlot) { @@ -1639,3 +1640,37 @@ void sub_808F254(u8 localId, u8 mapNum, u8 mapGroup) sub_808F208(&gMapObjects[mapObjectId]); } } + +void sub_808F28C(u8 localId, u8 mapNum, u8 mapGroup, u8 action) +{ + u8 mapObjectId; + + if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId)) + { + switch (action) + { + case 6: + sub_808F228(&gMapObjects[mapObjectId], gUnknown_082766A2); + break; + case 7: + sub_808F228(&gMapObjects[mapObjectId], gUnknown_082766A6); + break; + } + } +} + +void npc_paltag_set_load(u8 a0) +{ + gpu_pal_allocator_reset__manage_upper_four(); + gUnknown_020375B6 = 0x11ff; + gUnknown_020375B4 = a0; + if (a0 == 1) + { + pal_patch_for_npc_range(gUnknown_0850BE38[gUnknown_020375B4], 0, 6); + gReservedSpritePaletteCount = 8; + } + else + { + pal_patch_for_npc_range(gUnknown_0850BE38[gUnknown_020375B4], 0, 10); + } +} From c8696f15528add1c1a4a195c5fc02192c3f04a77 Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 12 Sep 2017 17:35:08 -0400 Subject: [PATCH 080/342] npc_paltag_by_palslot --- asm/field_map_obj.s | 63 --------------------------------------------- src/field_map_obj.c | 24 ++++++++++++++--- 2 files changed, 21 insertions(+), 66 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 8da48cd1a..b8fce16f1 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,69 +5,6 @@ .text - thumb_func_start npc_paltag_by_palslot -npc_paltag_by_palslot: @ 808F360 - push {r4-r6,lr} - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0x9 - bhi _0808F39C - ldr r1, =gUnknown_0850BE38 - ldr r0, =gUnknown_020375B4 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - lsls r0, r2, 1 - b _0808F390 - .pool -_0808F384: - adds r1, r4, 0x4 - adds r1, r2, r1 - ldr r0, =gUnknown_020375B4 - ldrb r0, [r0] - ldr r1, [r1] - lsls r0, 1 -_0808F390: - adds r0, r1 - ldrh r0, [r0] - b _0808F3CE - .pool -_0808F39C: - movs r3, 0 - ldr r0, =gUnknown_0850BD78 - ldrh r1, [r0] - ldr r2, =0x000011ff - adds r4, r0, 0 - cmp r1, r2 - beq _0808F3CC - adds r6, r4, 0 - ldr r0, =gUnknown_020375B6 - ldrh r1, [r0] - adds r5, r2, 0 -_0808F3B2: - lsls r2, r3, 3 - adds r0, r2, r6 - ldrh r0, [r0] - cmp r0, r1 - beq _0808F384 - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - lsls r0, r3, 3 - adds r0, r4 - ldrh r0, [r0] - cmp r0, r5 - bne _0808F3B2 -_0808F3CC: - ldr r0, =0x000011ff -_0808F3CE: - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end npc_paltag_by_palslot - thumb_func_start FieldObjectCB_NoMovement1 FieldObjectCB_NoMovement1: @ 808F3E0 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index b4617cd5a..e142a35d6 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1659,12 +1659,12 @@ void sub_808F28C(u8 localId, u8 mapNum, u8 mapGroup, u8 action) } } -void npc_paltag_set_load(u8 a0) +void npc_paltag_set_load(u8 palSlot) { gpu_pal_allocator_reset__manage_upper_four(); gUnknown_020375B6 = 0x11ff; - gUnknown_020375B4 = a0; - if (a0 == 1) + gUnknown_020375B4 = palSlot; + if (palSlot == 1) { pal_patch_for_npc_range(gUnknown_0850BE38[gUnknown_020375B4], 0, 6); gReservedSpritePaletteCount = 8; @@ -1674,3 +1674,21 @@ void npc_paltag_set_load(u8 a0) pal_patch_for_npc_range(gUnknown_0850BE38[gUnknown_020375B4], 0, 10); } } + +u16 npc_paltag_by_palslot(u8 palSlot) +{ + u8 i; + + if (palSlot < 10) + { + return gUnknown_0850BE38[gUnknown_020375B4][palSlot]; + } + for (i = 0; gUnknown_0850BD78[i].tag != 0x11ff; i ++) + { + if (gUnknown_0850BD78[i].tag == gUnknown_020375B6) + { + return gUnknown_0850BD78[i].data[gUnknown_020375B4]; + } + } + return 0x11ff; +} From 28b272bf52e32374a3d0e493b47953bfad8e9cac Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 13 Sep 2017 09:41:11 -0400 Subject: [PATCH 081/342] NoMovement1, GoRandomDirections --- asm/field_map_obj.s | 60 ----------------------------------------- include/field_map_obj.h | 1 + src/field_map_obj.c | 28 +++++++++++++++++++ 3 files changed, 29 insertions(+), 60 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index b8fce16f1..f17d25eba 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,66 +5,6 @@ .text - thumb_func_start FieldObjectCB_NoMovement1 -FieldObjectCB_NoMovement1: @ 808F3E0 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =FieldObjectCB2_NoMovement1 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_NoMovement1 - - thumb_func_start FieldObjectCB2_NoMovement1 -FieldObjectCB2_NoMovement1: @ 808F404 - movs r0, 0 - bx lr - thumb_func_end FieldObjectCB2_NoMovement1 - - thumb_func_start FieldObjectCB_GoRandomDirections -FieldObjectCB_GoRandomDirections: @ 808F408 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =FieldObjectCB2_GoRandomDirections - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoRandomDirections - - thumb_func_start FieldObjectCB2_GoRandomDirections -FieldObjectCB2_GoRandomDirections: @ 808F42C - push {r4,lr} - ldr r3, =gUnknown_0850D6F4 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end FieldObjectCB2_GoRandomDirections - thumb_func_start sub_808F44C sub_808F44C: @ 808F44C push {r4,lr} diff --git a/include/field_map_obj.h b/include/field_map_obj.h index ec28df643..f91b8f9e3 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -47,6 +47,7 @@ void FieldObjectGetLocalIdAndMap(struct MapObject *, u8 *, u8 *, u8 *); void npc_coords_shift(struct MapObject *, s16, s16); void sub_808EB08(struct MapObject *, s16, s16); void sub_808F254(u8, u8, u8); +void FieldObjectStep(struct MapObject *, struct Sprite *, bool8(struct MapObject *, struct Sprite *)); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index e142a35d6..3dd47d540 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -20,6 +20,29 @@ #define NUM_FIELD_MAP_OBJECT_TEMPLATES 0x51 +#define null_object_step(name, retval) \ +static bool8 FieldObjectCB2_##name(struct MapObject *, struct Sprite *);\ +void FieldObjectCB_##name(struct Sprite *sprite)\ +{\ + FieldObjectStep(&gMapObjects[sprite->data0], sprite, FieldObjectCB2_##name);\ +}\ +static bool8 FieldObjectCB2_##name(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + return (retval);\ +} + +#define field_object_step(name, table) \ +extern bool8 (*const (table)[])(struct MapObject *, struct Sprite *);\ +static bool8 FieldObjectCB2_##name(struct MapObject *, struct Sprite *);\ +void FieldObjectCB_##name(struct Sprite *sprite)\ +{\ + FieldObjectStep(&gMapObjects[sprite->data0], sprite, FieldObjectCB2_##name);\ +}\ +static bool8 FieldObjectCB2_##name(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + return (table)[sprite->data1](mapObject, sprite);\ +} + // Static struct declarations // Static RAM declarations @@ -1692,3 +1715,8 @@ u16 npc_paltag_by_palslot(u8 palSlot) } return 0x11ff; } + +null_object_step(NoMovement1, FALSE) + +field_object_step(GoRandomDirections, gUnknown_0850D6F4) + From e26501f130ed84b160f80232db642ec49722025f Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 13 Sep 2017 10:59:25 -0400 Subject: [PATCH 082/342] Support functions for GoRandomDirections --- asm/field_map_obj.s | 174 -------------------------------------------- include/data3.h | 2 + include/global.h | 2 +- src/field_map_obj.c | 79 ++++++++++++++++++++ 4 files changed, 82 insertions(+), 175 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index f17d25eba..8a4931322 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,180 +5,6 @@ .text - thumb_func_start sub_808F44C -sub_808F44C: @ 808F44C - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_808F44C - - thumb_func_start sub_808F460 -sub_808F460: @ 808F460 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_808F460 - - thumb_func_start sub_808F48C -sub_808F48C: @ 808F48C - push {r4-r6,lr} - adds r6, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0808F4C0 - ldr r5, =gUnknown_0850D6DC - bl Random - movs r4, 0x3 - adds r1, r4, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r5 - movs r0, 0 - ldrsh r1, [r1, r0] - adds r0, r6, 0 - bl sub_8097978 - strh r4, [r6, 0x30] - movs r0, 0x1 - b _0808F4C2 - .pool -_0808F4C0: - movs r0, 0 -_0808F4C2: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_808F48C - - thumb_func_start sub_808F4C8 -sub_808F4C8: @ 808F4C8 - push {r4,lr} - adds r4, r1, 0 - adds r0, r4, 0 - bl sub_809797C - lsls r0, 24 - cmp r0, 0 - bne _0808F4DC - movs r0, 0 - b _0808F4E2 -_0808F4DC: - movs r0, 0x4 - strh r0, [r4, 0x30] - movs r0, 0x1 -_0808F4E2: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_808F4C8 - - thumb_func_start sub_808F4E8 -sub_808F4E8: @ 808F4E8 - push {r4-r6,lr} - sub sp, 0x4 - adds r5, r0, 0 - adds r6, r1, 0 - ldr r1, =gUnknown_0850D710 - mov r0, sp - movs r2, 0x4 - bl memcpy - bl Random - movs r1, 0x3 - ands r1, r0 - mov r2, sp - adds r0, r2, r1 - ldrb r4, [r0] - adds r0, r5, 0 - adds r1, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x5 - strh r0, [r6, 0x30] - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_8092B88 - lsls r0, 24 - cmp r0, 0 - beq _0808F526 - movs r0, 0x1 - strh r0, [r6, 0x30] -_0808F526: - movs r0, 0x1 - add sp, 0x4 - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end sub_808F4E8 - - thumb_func_start sub_808F534 -sub_808F534: @ 808F534 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsrs r0, 4 - bl GetGoSpeed0AnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - ldrb r0, [r4] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r4] - movs r0, 0x6 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_808F534 - - thumb_func_start sub_808F564 -sub_808F564: @ 808F564 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0808F582 - ldrb r0, [r4] - movs r1, 0x3 - negs r1, r1 - ands r1, r0 - strb r1, [r4] - movs r0, 0x1 - strh r0, [r5, 0x30] -_0808F582: - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_808F564 - thumb_func_start FieldObjectIsTrainerAndCloseToPlayer @ bool8 FieldObjectIsTrainerAndCloseToPlayer(struct npc_state *fieldObject) FieldObjectIsTrainerAndCloseToPlayer: @ 808F58C diff --git a/include/data3.h b/include/data3.h index 29b1acc34..35dba5942 100755 --- a/include/data3.h +++ b/include/data3.h @@ -17,5 +17,7 @@ extern const struct SpritePalette gUnknown_0850BBC8[]; extern const struct PairedPalettes gUnknown_0850BD00[15]; extern const struct PairedPalettes gUnknown_0850BD78[15]; extern const u16 *const gUnknown_0850BE38[2]; +extern const s16 gUnknown_0850D6DC[4]; +extern const u8 gUnknown_0850D710[4]; #endif //POKEEMERALD_DATA3_H diff --git a/include/global.h b/include/global.h index c406c507f..a006e8591 100644 --- a/include/global.h +++ b/include/global.h @@ -10,7 +10,7 @@ #define asm_comment(x) asm volatile("@ -- " x " -- ") #define asm_unified(x) asm(".syntax unified\n" x "\n.syntax divided") -#ifdef __APPLE__ +#if defined (__APPLE__) || defined (__CYGWIN__) void memset(void *, int, size_t); void memcpy(void *, const void *, size_t); #endif // __APPLE__ diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 3dd47d540..90b2f0302 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4,6 +4,7 @@ #include "malloc.h" #include "sprite.h" #include "rom4.h" +#include "rng.h" #include "data3.h" #include "event_scripts.h" #include "berry.h" @@ -76,6 +77,14 @@ static bool8 FieldObjectDoesZCoordMatch(struct MapObject *, u8); /*static*/ void CameraObject_1(struct Sprite *); //static void CameraObject_2(struct Sprite *); /*static*/ struct MapObjectTemplate *FindFieldObjectTemplateInArrayByLocalId(u8 localId, struct MapObjectTemplate *templates, u8 count); +void npc_reset(struct MapObject *, struct Sprite *); +void FieldObjectSetRegularAnim(struct MapObject *, struct Sprite *, u8); +u8 GetFaceDirectionAnimId(u8); +bool8 FieldObjectExecRegularAnim(struct MapObject *, struct Sprite *); +void sub_8097978(struct Sprite *, s16); +bool8 sub_809797C(struct Sprite *); +bool8 sub_8092B88(struct MapObject *, u8); +u8 GetGoSpeed0AnimId(u8); // ROM data @@ -1716,7 +1725,77 @@ u16 npc_paltag_by_palslot(u8 palSlot) return 0x11ff; } +// Map Object Step Callbacks + null_object_step(NoMovement1, FALSE) field_object_step(GoRandomDirections, gUnknown_0850D6F4) +bool8 sub_808F44C(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_808F460(struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_808F48C(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (!FieldObjectExecRegularAnim(mapObject, sprite)) + { + return FALSE; + } + sub_8097978(sprite, gUnknown_0850D6DC[Random() & 0x03]); + sprite->data1 = 3; + return TRUE; +} + +bool8 sub_808F4C8(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (sub_809797C(sprite)) + { + sprite->data1 = 4; + return TRUE; + } + return FALSE; +} + +bool8 sub_808F4E8(struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[4]; + u8 chosenDirection; + + memcpy(directions, gUnknown_0850D710, sizeof directions); + chosenDirection = directions[Random() & 0x03]; + FieldObjectSetDirection(mapObject, chosenDirection); + sprite->data1 = 5; + if (sub_8092B88(mapObject, chosenDirection)) + { + sprite->data1 = 1; + } + return TRUE; +} + +bool8 sub_808F534(struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetGoSpeed0AnimId(mapObject->placeholder18)); + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 6; + return TRUE; +} + +bool8 sub_808F564(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 1; + } + return FALSE; +} From d72231379bd5b113744cf28c7fe9c9d6784e0174 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 13 Sep 2017 19:13:44 -0400 Subject: [PATCH 083/342] FieldObjectIsTrainerAndCloseToPlayer --- asm/field_map_obj.s | 68 ----------------------------------- include/field_player_avatar.h | 2 ++ src/field_map_obj.c | 33 +++++++++++++++++ 3 files changed, 35 insertions(+), 68 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 8a4931322..0f021ac94 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,74 +5,6 @@ .text - thumb_func_start FieldObjectIsTrainerAndCloseToPlayer -@ bool8 FieldObjectIsTrainerAndCloseToPlayer(struct npc_state *fieldObject) -FieldObjectIsTrainerAndCloseToPlayer: @ 808F58C - push {r4-r7,lr} - sub sp, 0x4 - adds r5, r0, 0 - movs r0, 0x80 - bl TestPlayerAvatarFlags - lsls r0, 24 - cmp r0, 0 - beq _0808F5F8 - ldrb r0, [r5, 0x7] - cmp r0, 0x1 - beq _0808F5A8 - cmp r0, 0x3 - bne _0808F5F8 -_0808F5A8: - mov r7, sp - adds r7, 0x2 - mov r0, sp - adds r1, r7, 0 - bl PlayerGetDestCoords - ldrh r2, [r5, 0x10] - ldrh r4, [r5, 0x12] - ldrb r1, [r5, 0x1D] - subs r3, r2, r1 - subs r0, r4, r1 - lsls r0, 16 - lsrs r5, r0, 16 - adds r2, r1, r2 - lsls r2, 16 - lsrs r2, 16 - adds r1, r4 - lsls r1, 16 - lsrs r6, r1, 16 - mov r0, sp - lsls r3, 16 - asrs r3, 16 - movs r1, 0 - ldrsh r4, [r0, r1] - cmp r3, r4 - bgt _0808F5F8 - lsls r0, r2, 16 - asrs r0, 16 - cmp r0, r4 - blt _0808F5F8 - lsls r0, r5, 16 - asrs r0, 16 - movs r2, 0 - ldrsh r1, [r7, r2] - cmp r0, r1 - bgt _0808F5F8 - lsls r0, r6, 16 - asrs r0, 16 - cmp r0, r1 - bge _0808F5FC -_0808F5F8: - movs r0, 0 - b _0808F5FE -_0808F5FC: - movs r0, 0x1 -_0808F5FE: - add sp, 0x4 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end FieldObjectIsTrainerAndCloseToPlayer - thumb_func_start sub_808F608 sub_808F608: @ 808F608 push {r4,lr} diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 5e2f0822c..3a74b3b10 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -8,5 +8,7 @@ void ClearPlayerAvatarInfo(void); void SetPlayerAvatarExtraStateTransition(u8, u8); u8 GetPlayerAvatarGenderByGraphicsId(u8); +bool8 TestPlayerAvatarFlags(u8); +void PlayerGetDestCoords(s16 *, s16 *); #endif //POKEEMERALD_FIELD_PLAYER_AVATAR_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 90b2f0302..f86e544a8 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1799,3 +1799,36 @@ bool8 sub_808F564(struct MapObject *mapObject, struct Sprite *sprite) } return FALSE; } + +bool8 FieldObjectIsTrainerAndCloseToPlayer(struct MapObject *mapObject) +{ + s16 playerX; + s16 playerY; + s16 objX; + s16 objY; + s16 minX; + s16 maxX; + s16 minY; + s16 maxY; + + if (!TestPlayerAvatarFlags(0x80)) + { + return FALSE; + } + if (mapObject->trainerType != 1 && mapObject->trainerType != 3) + { + return FALSE; + } + PlayerGetDestCoords(&playerX, &playerY); + objX = mapObject->coords2.x; + objY = mapObject->coords2.y; + minX = objX - mapObject->trainerRange_berryTreeId; + minY = objY - mapObject->trainerRange_berryTreeId; + maxX = objX + mapObject->trainerRange_berryTreeId; + maxY = objY + mapObject->trainerRange_berryTreeId; + if (minX > playerX || maxX < playerX || minY > playerY || maxY < playerY) + { + return FALSE; + } + return TRUE; +} From c2e31f0618e19a1edad6bfface74901c8cd405f7 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 13 Sep 2017 19:21:05 -0400 Subject: [PATCH 084/342] sub_808F608 --- asm/field_map_obj.s | 30 ------------------------------ src/field_map_obj.c | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 30 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 0f021ac94..3abd53321 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,36 +5,6 @@ .text - thumb_func_start sub_808F608 -sub_808F608: @ 808F608 - push {r4,lr} - lsls r0, 16 - lsrs r4, r0, 16 - lsls r1, 16 - lsrs r0, r1, 16 - lsls r2, 16 - lsls r3, 16 - cmp r2, r3 - ble _0808F626 - movs r2, 0x4 - lsls r0, r4, 16 - cmp r0, 0 - bge _0808F630 - movs r2, 0x3 - b _0808F630 -_0808F626: - movs r2, 0x1 - lsls r0, 16 - cmp r0, 0 - bge _0808F630 - movs r2, 0x2 -_0808F630: - adds r0, r2, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_808F608 - thumb_func_start sub_808F638 sub_808F638: @ 808F638 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index f86e544a8..fd3cc7967 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1832,3 +1832,26 @@ bool8 FieldObjectIsTrainerAndCloseToPlayer(struct MapObject *mapObject) } return TRUE; } + +u8 sub_808F608(s16 x1, s16 x2, s16 y1, s16 y2) +{ + u8 retval; + + if (y1 > y2) + { + retval = DIR_EAST; + if (x1 < 0) + { + retval = DIR_WEST; + } + } + else + { + retval = DIR_SOUTH; + if (x2 < 0) + { + retval = DIR_NORTH; + } + } + return retval; +} From f9de01dc863fb0b9a7a2d4c4412e213b259eb4c7 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 13 Sep 2017 19:45:59 -0400 Subject: [PATCH 085/342] sub_808F638 and sub_808F648 --- asm/field_map_obj.s | 27 --------------------------- src/field_map_obj.c | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 27 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 3abd53321..972dbbd50 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,33 +5,6 @@ .text - thumb_func_start sub_808F638 -sub_808F638: @ 808F638 - push {lr} - movs r0, 0x1 - lsls r1, 16 - cmp r1, 0 - bge _0808F644 - movs r0, 0x2 -_0808F644: - pop {r1} - bx r1 - thumb_func_end sub_808F638 - - thumb_func_start sub_808F648 -sub_808F648: @ 808F648 - push {lr} - movs r1, 0x4 - lsls r0, 16 - cmp r0, 0 - bge _0808F654 - movs r1, 0x3 -_0808F654: - adds r0, r1, 0 - pop {r1} - bx r1 - thumb_func_end sub_808F648 - thumb_func_start sub_808F65C sub_808F65C: @ 808F65C push {r4-r7,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index fd3cc7967..0cb73620c 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1855,3 +1855,27 @@ u8 sub_808F608(s16 x1, s16 x2, s16 y1, s16 y2) } return retval; } + +u8 sub_808F638(s16 x1, s16 x2, s16 y1, s16 y2) +{ + u8 retval; + + retval = DIR_SOUTH; + if (x2 < 0) + { + retval = DIR_NORTH; + } + return retval; +} + +u8 sub_808F648(s16 x1, s16 x2, s16 y1, s16 y2) +{ + u8 retval; + + retval = DIR_EAST; + if (x1 < 0) + { + retval = DIR_WEST; + } + return retval; +} From a04666e2d3f04e0f8158ce2a769042f696846830 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 13 Sep 2017 19:54:43 -0400 Subject: [PATCH 086/342] Running-past facing direction callbacks (North/East restricted) --- asm/field_map_obj.s | 84 +++++++++------------------------------------ src/field_map_obj.c | 68 ++++++++++++++++++++++++------------ 2 files changed, 63 insertions(+), 89 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 972dbbd50..342b98927 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,56 +5,6 @@ .text - thumb_func_start sub_808F65C -sub_808F65C: @ 808F65C - push {r4-r7,lr} - lsls r0, 16 - asrs r4, r0, 16 - lsls r1, 16 - asrs r5, r1, 16 - lsls r2, 16 - asrs r6, r2, 16 - lsls r3, 16 - asrs r7, r3, 16 - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - adds r3, r7, 0 - bl sub_808F608 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0808F698 - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - adds r3, r7, 0 - bl sub_808F648 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x4 - bne _0808F6B2 - b _0808F6B0 -_0808F698: - cmp r0, 0x4 - bne _0808F6B2 - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - adds r3, r7, 0 - bl sub_808F638 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0808F6B2 -_0808F6B0: - movs r0, 0x2 -_0808F6B2: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_808F65C - thumb_func_start sub_808F6B8 sub_808F6B8: @ 808F6B8 push {r4-r7,lr} @@ -70,7 +20,7 @@ sub_808F6B8: @ 808F6B8 adds r1, r5, 0 adds r2, r6, 0 adds r3, r7, 0 - bl sub_808F608 + bl GetRegularRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -79,7 +29,7 @@ sub_808F6B8: @ 808F6B8 adds r1, r5, 0 adds r2, r6, 0 adds r3, r7, 0 - bl sub_808F648 + bl GetEastWestRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 cmp r0, 0x3 @@ -92,7 +42,7 @@ _0808F6F4: adds r1, r5, 0 adds r2, r6, 0 adds r3, r7, 0 - bl sub_808F638 + bl GetNorthSouthRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -120,7 +70,7 @@ sub_808F714: @ 808F714 adds r1, r5, 0 adds r2, r6, 0 adds r3, r7, 0 - bl sub_808F608 + bl GetRegularRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 cmp r0, 0x2 @@ -129,7 +79,7 @@ sub_808F714: @ 808F714 adds r1, r5, 0 adds r2, r6, 0 adds r3, r7, 0 - bl sub_808F648 + bl GetEastWestRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 cmp r0, 0x4 @@ -142,7 +92,7 @@ _0808F750: adds r1, r5, 0 adds r2, r6, 0 adds r3, r7, 0 - bl sub_808F638 + bl GetNorthSouthRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 cmp r0, 0x2 @@ -170,7 +120,7 @@ sub_808F770: @ 808F770 adds r1, r5, 0 adds r2, r6, 0 adds r3, r7, 0 - bl sub_808F608 + bl GetRegularRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 cmp r0, 0x2 @@ -179,7 +129,7 @@ sub_808F770: @ 808F770 adds r1, r5, 0 adds r2, r6, 0 adds r3, r7, 0 - bl sub_808F648 + bl GetEastWestRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 cmp r0, 0x3 @@ -192,7 +142,7 @@ _0808F7AC: adds r1, r5, 0 adds r2, r6, 0 adds r3, r7, 0 - bl sub_808F638 + bl GetNorthSouthRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 cmp r0, 0x2 @@ -220,7 +170,7 @@ sub_808F7CC: @ 808F7CC adds r1, r6, 0 adds r2, r5, 0 adds r3, r4, 0 - bl sub_808F608 + bl GetRegularRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 cmp r0, 0x4 @@ -229,7 +179,7 @@ sub_808F7CC: @ 808F7CC adds r1, r6, 0 adds r2, r5, 0 adds r3, r4, 0 - bl sub_808F638 + bl GetNorthSouthRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 _0808F802: @@ -253,7 +203,7 @@ sub_808F808: @ 808F808 adds r1, r6, 0 adds r2, r5, 0 adds r3, r4, 0 - bl sub_808F608 + bl GetRegularRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 cmp r0, 0x3 @@ -262,7 +212,7 @@ sub_808F808: @ 808F808 adds r1, r6, 0 adds r2, r5, 0 adds r3, r4, 0 - bl sub_808F638 + bl GetNorthSouthRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 _0808F83E: @@ -286,7 +236,7 @@ sub_808F844: @ 808F844 adds r1, r6, 0 adds r2, r5, 0 adds r3, r4, 0 - bl sub_808F608 + bl GetRegularRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -295,7 +245,7 @@ sub_808F844: @ 808F844 adds r1, r6, 0 adds r2, r5, 0 adds r3, r4, 0 - bl sub_808F648 + bl GetEastWestRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 _0808F87A: @@ -319,7 +269,7 @@ sub_808F880: @ 808F880 adds r1, r6, 0 adds r2, r5, 0 adds r3, r4, 0 - bl sub_808F608 + bl GetRegularRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 cmp r0, 0x2 @@ -328,7 +278,7 @@ sub_808F880: @ 808F880 adds r1, r6, 0 adds r2, r5, 0 adds r3, r4, 0 - bl sub_808F648 + bl GetEastWestRunningPastFacingDirection lsls r0, 24 lsrs r0, 24 _0808F8B6: diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 0cb73620c..4b92a792d 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1833,49 +1833,73 @@ bool8 FieldObjectIsTrainerAndCloseToPlayer(struct MapObject *mapObject) return TRUE; } -u8 sub_808F608(s16 x1, s16 x2, s16 y1, s16 y2) +u8 GetRegularRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) { - u8 retval; + u8 direction; - if (y1 > y2) + if (dx2 > dy2) { - retval = DIR_EAST; - if (x1 < 0) + direction = DIR_EAST; + if (dx1 < 0) { - retval = DIR_WEST; + direction = DIR_WEST; } } else { - retval = DIR_SOUTH; - if (x2 < 0) + direction = DIR_SOUTH; + if (dy1 < 0) { - retval = DIR_NORTH; + direction = DIR_NORTH; } } - return retval; + return direction; } -u8 sub_808F638(s16 x1, s16 x2, s16 y1, s16 y2) +u8 GetNorthSouthRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) { - u8 retval; + u8 direction; - retval = DIR_SOUTH; - if (x2 < 0) + direction = DIR_SOUTH; + if (dy1 < 0) { - retval = DIR_NORTH; + direction = DIR_NORTH; } - return retval; + return direction; } -u8 sub_808F648(s16 x1, s16 x2, s16 y1, s16 y2) +u8 GetEastWestRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) { - u8 retval; + u8 direction; - retval = DIR_EAST; - if (x1 < 0) + direction = DIR_EAST; + if (dx1 < 0) { - retval = DIR_WEST; + direction = DIR_WEST; } - return retval; + return direction; +} + +u8 GetNorthEastRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +{ + u8 direction; + + direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_SOUTH) + { + direction = GetEastWestRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_EAST) + { + direction = DIR_NORTH; + } + } + else if (direction == DIR_EAST) + { + direction = GetNorthSouthRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_SOUTH) + { + direction = DIR_NORTH; + } + } + return direction; } From 6b906d95b986611d148780e8c8fc0be367569ca2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 13 Sep 2017 20:22:38 -0400 Subject: [PATCH 087/342] Three more running-past-facing-direction callbacks --- asm/field_map_obj.s | 150 -------------------------------------------- src/field_map_obj.c | 72 +++++++++++++++++++++ 2 files changed, 72 insertions(+), 150 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 342b98927..95347c52d 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,156 +5,6 @@ .text - thumb_func_start sub_808F6B8 -sub_808F6B8: @ 808F6B8 - push {r4-r7,lr} - lsls r0, 16 - asrs r4, r0, 16 - lsls r1, 16 - asrs r5, r1, 16 - lsls r2, 16 - asrs r6, r2, 16 - lsls r3, 16 - asrs r7, r3, 16 - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - adds r3, r7, 0 - bl GetRegularRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0808F6F4 - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - adds r3, r7, 0 - bl GetEastWestRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3 - bne _0808F70E - b _0808F70C -_0808F6F4: - cmp r0, 0x3 - bne _0808F70E - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - adds r3, r7, 0 - bl GetNorthSouthRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0808F70E -_0808F70C: - movs r0, 0x2 -_0808F70E: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_808F6B8 - - thumb_func_start sub_808F714 -sub_808F714: @ 808F714 - push {r4-r7,lr} - lsls r0, 16 - asrs r4, r0, 16 - lsls r1, 16 - asrs r5, r1, 16 - lsls r2, 16 - asrs r6, r2, 16 - lsls r3, 16 - asrs r7, r3, 16 - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - adds r3, r7, 0 - bl GetRegularRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - bne _0808F750 - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - adds r3, r7, 0 - bl GetEastWestRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x4 - bne _0808F76A - b _0808F768 -_0808F750: - cmp r0, 0x4 - bne _0808F76A - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - adds r3, r7, 0 - bl GetNorthSouthRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - bne _0808F76A -_0808F768: - movs r0, 0x1 -_0808F76A: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_808F714 - - thumb_func_start sub_808F770 -sub_808F770: @ 808F770 - push {r4-r7,lr} - lsls r0, 16 - asrs r4, r0, 16 - lsls r1, 16 - asrs r5, r1, 16 - lsls r2, 16 - asrs r6, r2, 16 - lsls r3, 16 - asrs r7, r3, 16 - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - adds r3, r7, 0 - bl GetRegularRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - bne _0808F7AC - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - adds r3, r7, 0 - bl GetEastWestRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3 - bne _0808F7C6 - b _0808F7C4 -_0808F7AC: - cmp r0, 0x3 - bne _0808F7C6 - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - adds r3, r7, 0 - bl GetNorthSouthRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - bne _0808F7C6 -_0808F7C4: - movs r0, 0x1 -_0808F7C6: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_808F770 - thumb_func_start sub_808F7CC sub_808F7CC: @ 808F7CC push {r4-r7,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 4b92a792d..00ccb4493 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1903,3 +1903,75 @@ u8 GetNorthEastRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) } return direction; } + +u8 GetNorthWestRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +{ + u8 direction; + + direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_SOUTH) + { + direction = GetEastWestRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_WEST) + { + direction = DIR_NORTH; + } + } + else if (direction == DIR_WEST) + { + direction = GetNorthSouthRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_SOUTH) + { + direction = DIR_NORTH; + } + } + return direction; +} + +u8 GetSouthEastRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +{ + u8 direction; + + direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_NORTH) + { + direction = GetEastWestRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_EAST) + { + direction = DIR_SOUTH; + } + } + else if (direction == DIR_EAST) + { + direction = GetNorthSouthRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_NORTH) + { + direction = DIR_SOUTH; + } + } + return direction; +} + +u8 GetSouthWestRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +{ + u8 direction; + + direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_NORTH) + { + direction = GetEastWestRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_WEST) + { + direction = DIR_SOUTH; + } + } + else if (direction == DIR_WEST) + { + direction = GetNorthSouthRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_NORTH) + { + direction = DIR_SOUTH; + } + } + return direction; +} From c1f5183f4033fa29868fdc1c7aa64a51fd939615 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 13 Sep 2017 20:26:08 -0400 Subject: [PATCH 088/342] Three-direction get-running-past-facing callbacks --- asm/field_map_obj.s | 132 -------------------------------------------- src/field_map_obj.c | 48 ++++++++++++++++ 2 files changed, 48 insertions(+), 132 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 95347c52d..914a44500 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,138 +5,6 @@ .text - thumb_func_start sub_808F7CC -sub_808F7CC: @ 808F7CC - push {r4-r7,lr} - lsls r0, 16 - asrs r7, r0, 16 - lsls r1, 16 - asrs r6, r1, 16 - lsls r2, 16 - asrs r5, r2, 16 - lsls r3, 16 - asrs r4, r3, 16 - adds r0, r7, 0 - adds r1, r6, 0 - adds r2, r5, 0 - adds r3, r4, 0 - bl GetRegularRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x4 - bne _0808F802 - adds r0, r7, 0 - adds r1, r6, 0 - adds r2, r5, 0 - adds r3, r4, 0 - bl GetNorthSouthRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 -_0808F802: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_808F7CC - - thumb_func_start sub_808F808 -sub_808F808: @ 808F808 - push {r4-r7,lr} - lsls r0, 16 - asrs r7, r0, 16 - lsls r1, 16 - asrs r6, r1, 16 - lsls r2, 16 - asrs r5, r2, 16 - lsls r3, 16 - asrs r4, r3, 16 - adds r0, r7, 0 - adds r1, r6, 0 - adds r2, r5, 0 - adds r3, r4, 0 - bl GetRegularRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3 - bne _0808F83E - adds r0, r7, 0 - adds r1, r6, 0 - adds r2, r5, 0 - adds r3, r4, 0 - bl GetNorthSouthRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 -_0808F83E: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_808F808 - - thumb_func_start sub_808F844 -sub_808F844: @ 808F844 - push {r4-r7,lr} - lsls r0, 16 - asrs r7, r0, 16 - lsls r1, 16 - asrs r6, r1, 16 - lsls r2, 16 - asrs r5, r2, 16 - lsls r3, 16 - asrs r4, r3, 16 - adds r0, r7, 0 - adds r1, r6, 0 - adds r2, r5, 0 - adds r3, r4, 0 - bl GetRegularRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0808F87A - adds r0, r7, 0 - adds r1, r6, 0 - adds r2, r5, 0 - adds r3, r4, 0 - bl GetEastWestRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 -_0808F87A: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_808F844 - - thumb_func_start sub_808F880 -sub_808F880: @ 808F880 - push {r4-r7,lr} - lsls r0, 16 - asrs r7, r0, 16 - lsls r1, 16 - asrs r6, r1, 16 - lsls r2, 16 - asrs r5, r2, 16 - lsls r3, 16 - asrs r4, r3, 16 - adds r0, r7, 0 - adds r1, r6, 0 - adds r2, r5, 0 - adds r3, r4, 0 - bl GetRegularRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - bne _0808F8B6 - adds r0, r7, 0 - adds r1, r6, 0 - adds r2, r5, 0 - adds r3, r4, 0 - bl GetEastWestRunningPastFacingDirection - lsls r0, 24 - lsrs r0, 24 -_0808F8B6: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_808F880 - thumb_func_start sub_808F8BC sub_808F8BC: @ 808F8BC push {r4-r6,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 00ccb4493..48b423d85 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1975,3 +1975,51 @@ u8 GetSouthWestRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) } return direction; } + +u8 GetNonEastRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +{ + u8 direction; + + direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_EAST) + { + direction = GetNorthSouthRunningPastFacingDirection(dx1, dy1, dx2, dy2); + } + return direction; +} + +u8 GetNonWestRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +{ + u8 direction; + + direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_WEST) + { + direction = GetNorthSouthRunningPastFacingDirection(dx1, dy1, dx2, dy2); + } + return direction; +} + +u8 GetNonSouthRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +{ + u8 direction; + + direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_SOUTH) + { + direction = GetEastWestRunningPastFacingDirection(dx1, dy1, dx2, dy2); + } + return direction; +} + +u8 GetNonNorthRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +{ + u8 direction; + + direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + if (direction == DIR_NORTH) + { + direction = GetEastWestRunningPastFacingDirection(dx1, dy1, dx2, dy2); + } + return direction; +} From ddf712beac8f166c90c0f97d2a6ccdc97c7f6d08 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 13 Sep 2017 20:34:25 -0400 Subject: [PATCH 089/342] sub_808F8BC --- asm/field_map_obj.s | 72 ------------------------------- src/field_map_obj.c | 100 ++++++++++++++++++++++++++++---------------- 2 files changed, 64 insertions(+), 108 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 914a44500..bf447c447 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,78 +5,6 @@ .text - thumb_func_start sub_808F8BC -sub_808F8BC: @ 808F8BC - push {r4-r6,lr} - sub sp, 0x4 - adds r4, r0, 0 - lsls r1, 24 - lsrs r6, r1, 24 - bl FieldObjectIsTrainerAndCloseToPlayer - lsls r0, 24 - cmp r0, 0 - bne _0808F8D4 - movs r0, 0 - b _0808F938 -_0808F8D4: - mov r5, sp - adds r5, 0x2 - mov r0, sp - adds r1, r5, 0 - bl PlayerGetDestCoords - mov r2, sp - mov r0, sp - ldrh r0, [r0] - ldrh r1, [r4, 0x10] - subs r0, r1 - strh r0, [r2] - ldrh r0, [r5] - ldrh r1, [r4, 0x12] - subs r0, r1 - strh r0, [r5] - mov r0, sp - ldrh r3, [r5] - ldrh r2, [r0] - movs r1, 0 - ldrsh r0, [r0, r1] - cmp r0, 0 - bge _0808F908 - negs r0, r0 - lsls r0, 16 - lsrs r2, r0, 16 -_0808F908: - lsls r0, r3, 16 - asrs r0, 16 - cmp r0, 0 - bge _0808F916 - negs r0, r0 - lsls r0, 16 - lsrs r3, r0, 16 -_0808F916: - ldr r0, =gUnknown_0850D714 - lsls r4, r6, 2 - adds r4, r0 - mov r0, sp - movs r6, 0 - ldrsh r0, [r0, r6] - movs r6, 0 - ldrsh r1, [r5, r6] - lsls r2, 16 - asrs r2, 16 - lsls r3, 16 - asrs r3, 16 - ldr r4, [r4] - bl _call_via_r4 - lsls r0, 24 - lsrs r0, 24 -_0808F938: - add sp, 0x4 - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end sub_808F8BC - thumb_func_start FieldObjectCB_LookRandomDirections FieldObjectCB_LookRandomDirections: @ 808F944 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 48b423d85..24f48db40 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -93,6 +93,7 @@ const u8 gUnknown_0850557C[NUM_FIELD_MAP_OBJECT_TEMPLATES]; const u8 gUnknown_085055CD[NUM_FIELD_MAP_OBJECT_TEMPLATES]; const struct MapObjectGraphicsInfo *const gMauvilleOldManGraphicsInfoPointers[7]; const struct MapObjectGraphicsInfo *const gFieldObjectGraphicsInfoPointers[0xEF]; +u8 (*const gUnknown_0850D714[11])(s16, s16, s16, s16); // Code @@ -1833,14 +1834,14 @@ bool8 FieldObjectIsTrainerAndCloseToPlayer(struct MapObject *mapObject) return TRUE; } -u8 GetRegularRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +u8 GetRegularRunningPastFacingDirection(s16 dx, s16 dy, s16 absdx, s16 absdy) { u8 direction; - if (dx2 > dy2) + if (absdx > absdy) { direction = DIR_EAST; - if (dx1 < 0) + if (dx < 0) { direction = DIR_WEST; } @@ -1848,7 +1849,7 @@ u8 GetRegularRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) else { direction = DIR_SOUTH; - if (dy1 < 0) + if (dy < 0) { direction = DIR_NORTH; } @@ -1856,38 +1857,38 @@ u8 GetRegularRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) return direction; } -u8 GetNorthSouthRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +u8 GetNorthSouthRunningPastFacingDirection(s16 dx, s16 dy, s16 absdx, s16 absdy) { u8 direction; direction = DIR_SOUTH; - if (dy1 < 0) + if (dy < 0) { direction = DIR_NORTH; } return direction; } -u8 GetEastWestRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +u8 GetEastWestRunningPastFacingDirection(s16 dx, s16 dy, s16 absdx, s16 absdy) { u8 direction; direction = DIR_EAST; - if (dx1 < 0) + if (dx < 0) { direction = DIR_WEST; } return direction; } -u8 GetNorthEastRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +u8 GetNorthEastRunningPastFacingDirection(s16 dx, s16 dy, s16 absdx, s16 absdy) { u8 direction; - direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetRegularRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_SOUTH) { - direction = GetEastWestRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetEastWestRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_EAST) { direction = DIR_NORTH; @@ -1895,7 +1896,7 @@ u8 GetNorthEastRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) } else if (direction == DIR_EAST) { - direction = GetNorthSouthRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetNorthSouthRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_SOUTH) { direction = DIR_NORTH; @@ -1904,14 +1905,14 @@ u8 GetNorthEastRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) return direction; } -u8 GetNorthWestRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +u8 GetNorthWestRunningPastFacingDirection(s16 dx, s16 dy, s16 absdx, s16 absdy) { u8 direction; - direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetRegularRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_SOUTH) { - direction = GetEastWestRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetEastWestRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_WEST) { direction = DIR_NORTH; @@ -1919,7 +1920,7 @@ u8 GetNorthWestRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) } else if (direction == DIR_WEST) { - direction = GetNorthSouthRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetNorthSouthRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_SOUTH) { direction = DIR_NORTH; @@ -1928,14 +1929,14 @@ u8 GetNorthWestRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) return direction; } -u8 GetSouthEastRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +u8 GetSouthEastRunningPastFacingDirection(s16 dx, s16 dy, s16 absdx, s16 absdy) { u8 direction; - direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetRegularRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_NORTH) { - direction = GetEastWestRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetEastWestRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_EAST) { direction = DIR_SOUTH; @@ -1943,7 +1944,7 @@ u8 GetSouthEastRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) } else if (direction == DIR_EAST) { - direction = GetNorthSouthRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetNorthSouthRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_NORTH) { direction = DIR_SOUTH; @@ -1952,14 +1953,14 @@ u8 GetSouthEastRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) return direction; } -u8 GetSouthWestRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +u8 GetSouthWestRunningPastFacingDirection(s16 dx, s16 dy, s16 absdx, s16 absdy) { u8 direction; - direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetRegularRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_NORTH) { - direction = GetEastWestRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetEastWestRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_WEST) { direction = DIR_SOUTH; @@ -1967,7 +1968,7 @@ u8 GetSouthWestRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) } else if (direction == DIR_WEST) { - direction = GetNorthSouthRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetNorthSouthRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_NORTH) { direction = DIR_SOUTH; @@ -1976,50 +1977,77 @@ u8 GetSouthWestRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) return direction; } -u8 GetNonEastRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +u8 GetNonEastRunningPastFacingDirection(s16 dx, s16 dy, s16 absdx, s16 absdy) { u8 direction; - direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetRegularRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_EAST) { - direction = GetNorthSouthRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetNorthSouthRunningPastFacingDirection(dx, dy, absdx, absdy); } return direction; } -u8 GetNonWestRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +u8 GetNonWestRunningPastFacingDirection(s16 dx, s16 dy, s16 absdx, s16 absdy) { u8 direction; - direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetRegularRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_WEST) { - direction = GetNorthSouthRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetNorthSouthRunningPastFacingDirection(dx, dy, absdx, absdy); } return direction; } -u8 GetNonSouthRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +u8 GetNonSouthRunningPastFacingDirection(s16 dx, s16 dy, s16 absdx, s16 absdy) { u8 direction; - direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetRegularRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_SOUTH) { - direction = GetEastWestRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetEastWestRunningPastFacingDirection(dx, dy, absdx, absdy); } return direction; } -u8 GetNonNorthRunningPastFacingDirection(s16 dx1, s16 dy1, s16 dx2, s16 dy2) +u8 GetNonNorthRunningPastFacingDirection(s16 dx, s16 dy, s16 absdx, s16 absdy) { u8 direction; - direction = GetRegularRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetRegularRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_NORTH) { - direction = GetEastWestRunningPastFacingDirection(dx1, dy1, dx2, dy2); + direction = GetEastWestRunningPastFacingDirection(dx, dy, absdx, absdy); } return direction; } + +u8 sub_808F8BC(struct MapObject *mapObject, u8 movementType) +{ + s16 dx; + s16 dy; + s16 absdx; + s16 absdy; + + if (!FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + { + return 0; + } + PlayerGetDestCoords(&dx, &dy); + dx -= mapObject->coords2.x; + dy -= mapObject->coords2.y; + absdx = dx; + absdy = dy; + if (absdx < 0) + { + absdx = -absdx; + } + if (absdy < 0) + { + absdy = -absdy; + } + return gUnknown_0850D714[movementType](dx, dy, absdx, absdy); +} From 2895765964014d241808ee936293d255a6578daa Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 13 Sep 2017 20:36:58 -0400 Subject: [PATCH 090/342] LookRandomDirections --- asm/field_map_obj.s | 37 ------------------------------------- src/field_map_obj.c | 2 ++ 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index bf447c447..62cc02fb7 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,43 +5,6 @@ .text - thumb_func_start FieldObjectCB_LookRandomDirections -FieldObjectCB_LookRandomDirections: @ 808F944 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =FieldObjectCB2_LookRandomDirections - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_LookRandomDirections - - thumb_func_start FieldObjectCB2_LookRandomDirections -@ bool8 FieldObjectCB2_LookRandomDirections(struct npc_state *fieldObject, struct obj *object) -FieldObjectCB2_LookRandomDirections: @ 808F968 - push {r4,lr} - ldr r3, =gUnknown_0850D740 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end FieldObjectCB2_LookRandomDirections - thumb_func_start sub_808F988 @ bool8 sub_808F988(struct npc_state *fieldObject, struct obj *object) sub_808F988: @ 808F988 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 24f48db40..9fd533f60 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -2051,3 +2051,5 @@ u8 sub_808F8BC(struct MapObject *mapObject, u8 movementType) } return gUnknown_0850D714[movementType](dx, dy, absdx, absdy); } + +field_object_step(LookRandomDirections, gUnknown_0850D740) From c1c12981fe5d89c85750a477229b3b31f2e6f2ee Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 13 Sep 2017 21:11:59 -0400 Subject: [PATCH 091/342] LookRandomDirections helpers --- asm/field_map_obj.s | 137 -------------------------------------------- src/field_map_obj.c | 51 +++++++++++++++++ 2 files changed, 51 insertions(+), 137 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 62cc02fb7..147f5e65c 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,143 +5,6 @@ .text - thumb_func_start sub_808F988 -@ bool8 sub_808F988(struct npc_state *fieldObject, struct obj *object) -sub_808F988: @ 808F988 - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_808F988 - - thumb_func_start sub_808F99C -@ bool8 sub_808F99C(struct npc_state *fieldObject, struct obj *object) -sub_808F99C: @ 808F99C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_808F99C - - thumb_func_start sub_808F9C8 -@ bool8 sub_808F9C8(struct npc_state *fieldObject, struct obj *object) -sub_808F9C8: @ 808F9C8 - push {r4-r7,lr} - adds r6, r0, 0 - adds r7, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0808F9FE - ldr r4, =gUnknown_0850D6DC - bl Random - movs r5, 0x3 - adds r1, r5, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - movs r0, 0 - ldrsh r1, [r1, r0] - adds r0, r7, 0 - bl sub_8097978 - ldrb r1, [r6] - movs r0, 0x3 - negs r0, r0 - ands r0, r1 - strb r0, [r6] - strh r5, [r7, 0x30] -_0808F9FE: - movs r0, 0 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_808F9C8 - - thumb_func_start sub_808FA0C -@ bool8 sub_808FA0C(struct npc_state *fieldObject, struct obj *object) -sub_808FA0C: @ 808FA0C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl sub_809797C - lsls r0, 24 - cmp r0, 0 - bne _0808FA2A - adds r0, r4, 0 - bl FieldObjectIsTrainerAndCloseToPlayer - lsls r0, 24 - cmp r0, 0 - beq _0808FA32 -_0808FA2A: - movs r0, 0x4 - strh r0, [r5, 0x30] - movs r0, 0x1 - b _0808FA34 -_0808FA32: - movs r0, 0 -_0808FA34: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_808FA0C - - thumb_func_start sub_808FA3C -@ bool8 sub_808FA3C(struct npc_state *fieldObject, struct obj *object) -sub_808FA3C: @ 808FA3C - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D710 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r0, r4, 0 - movs r1, 0 - bl sub_808F8BC - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _0808FA6C - bl Random - movs r1, 0x3 - ands r1, r0 - mov r2, sp - adds r0, r2, r1 - ldrb r1, [r0] -_0808FA6C: - adds r0, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x1 - strh r0, [r5, 0x30] - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_808FA3C - thumb_func_start FieldObjectCB_RandomlyGoNorthOrSouth FieldObjectCB_RandomlyGoNorthOrSouth: @ 808FA84 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 9fd533f60..40129cc3f 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -2053,3 +2053,54 @@ u8 sub_808F8BC(struct MapObject *mapObject, u8 movementType) } field_object_step(LookRandomDirections, gUnknown_0850D740) + +bool8 sub_808F988(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_808F99C(struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_808F9C8(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + sub_8097978(sprite, gUnknown_0850D6DC[Random() & 0x03]); + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 3; + } + return FALSE; +} + +bool8 sub_808FA0C(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (sub_809797C(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + { + sprite->data1 = 4; + return TRUE; + } + return FALSE; +} + +bool8 sub_808FA3C(struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[4]; + u8 direction; + + memcpy(directions, gUnknown_0850D710, sizeof directions); + direction = sub_808F8BC(mapObject, 0); + if (direction == 0) + { + direction = directions[Random() & 0x03]; + } + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 1; + return TRUE; +} From 0ae3347e472686be8c7c21862afe4a62222cdcd1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 14 Sep 2017 08:38:21 -0400 Subject: [PATCH 092/342] Rename some functions --- asm/field_map_obj.s | 88 +++++++++++++++++++++---------------------- asm/map_obj_8097404.s | 16 ++++---- include/data3.h | 4 +- src/field_map_obj.c | 16 ++++---- 4 files changed, 62 insertions(+), 62 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 147f5e65c..9f61afc76 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -95,7 +95,7 @@ sub_808FB08: @ 808FB08 movs r0, 0 ldrsh r1, [r1, r0] adds r0, r6, 0 - bl sub_8097978 + bl SetFieldObjectStepTimer strh r4, [r6, 0x30] movs r0, 0x1 b _0808FB3E @@ -114,7 +114,7 @@ sub_808FB44: @ 808FB44 push {r4,lr} adds r4, r1, 0 adds r0, r4, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 bne _0808FB58 @@ -307,7 +307,7 @@ sub_808FC8C: @ 808FC8C movs r0, 0 ldrsh r1, [r1, r0] adds r0, r6, 0 - bl sub_8097978 + bl SetFieldObjectStepTimer strh r4, [r6, 0x30] movs r0, 0x1 b _0808FCC2 @@ -325,7 +325,7 @@ sub_808FCC8: @ 808FCC8 push {r4,lr} adds r4, r1, 0 adds r0, r4, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 bne _0808FCDC @@ -910,7 +910,7 @@ sub_80900D4: @ 80900D4 movs r0, 0 ldrsh r1, [r1, r0] adds r0, r7, 0 - bl sub_8097978 + bl SetFieldObjectStepTimer ldrb r1, [r6] movs r0, 0x3 negs r0, r0 @@ -931,7 +931,7 @@ sub_8090118: @ 8090118 adds r4, r0, 0 adds r5, r1, 0 adds r0, r5, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 bne _08090136 @@ -965,7 +965,7 @@ sub_8090148: @ 8090148 bl memcpy adds r0, r4, 0 movs r1, 0x1 - bl sub_808F8BC + bl GetRunningPastFacingDirection lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0 @@ -1078,7 +1078,7 @@ sub_8090214: @ 8090214 movs r0, 0 ldrsh r1, [r1, r0] adds r0, r7, 0 - bl sub_8097978 + bl SetFieldObjectStepTimer ldrb r1, [r6] movs r0, 0x3 negs r0, r0 @@ -1099,7 +1099,7 @@ sub_8090258: @ 8090258 adds r4, r0, 0 adds r5, r1, 0 adds r0, r5, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 bne _08090276 @@ -1133,7 +1133,7 @@ sub_8090288: @ 8090288 bl memcpy adds r0, r4, 0 movs r1, 0x2 - bl sub_808F8BC + bl GetRunningPastFacingDirection lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0 @@ -1246,7 +1246,7 @@ sub_8090354: @ 8090354 movs r0, 0 ldrsh r1, [r1, r0] adds r0, r7, 0 - bl sub_8097978 + bl SetFieldObjectStepTimer ldrb r1, [r6] movs r0, 0x3 negs r0, r0 @@ -1267,7 +1267,7 @@ sub_8090398: @ 8090398 adds r4, r0, 0 adds r5, r1, 0 adds r0, r5, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 bne _080903B6 @@ -1301,7 +1301,7 @@ sub_80903C8: @ 80903C8 bl memcpy adds r0, r4, 0 movs r1, 0x3 - bl sub_808F8BC + bl GetRunningPastFacingDirection lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0 @@ -1414,7 +1414,7 @@ sub_8090494: @ 8090494 movs r0, 0 ldrsh r1, [r1, r0] adds r0, r7, 0 - bl sub_8097978 + bl SetFieldObjectStepTimer ldrb r1, [r6] movs r0, 0x3 negs r0, r0 @@ -1435,7 +1435,7 @@ sub_80904D8: @ 80904D8 adds r4, r0, 0 adds r5, r1, 0 adds r0, r5, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 bne _080904F6 @@ -1469,7 +1469,7 @@ sub_8090508: @ 8090508 bl memcpy adds r0, r4, 0 movs r1, 0x4 - bl sub_808F8BC + bl GetRunningPastFacingDirection lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0 @@ -1582,7 +1582,7 @@ sub_80905D4: @ 80905D4 movs r0, 0 ldrsh r1, [r1, r0] adds r0, r7, 0 - bl sub_8097978 + bl SetFieldObjectStepTimer ldrb r1, [r6] movs r0, 0x3 negs r0, r0 @@ -1603,7 +1603,7 @@ sub_8090618: @ 8090618 adds r4, r0, 0 adds r5, r1, 0 adds r0, r5, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 bne _08090636 @@ -1637,7 +1637,7 @@ sub_8090648: @ 8090648 bl memcpy adds r0, r4, 0 movs r1, 0x5 - bl sub_808F8BC + bl GetRunningPastFacingDirection lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0 @@ -1750,7 +1750,7 @@ sub_8090714: @ 8090714 movs r0, 0 ldrsh r1, [r1, r0] adds r0, r7, 0 - bl sub_8097978 + bl SetFieldObjectStepTimer ldrb r1, [r6] movs r0, 0x3 negs r0, r0 @@ -1771,7 +1771,7 @@ sub_8090758: @ 8090758 adds r4, r0, 0 adds r5, r1, 0 adds r0, r5, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 bne _08090776 @@ -1805,7 +1805,7 @@ sub_8090788: @ 8090788 bl memcpy adds r0, r4, 0 movs r1, 0x6 - bl sub_808F8BC + bl GetRunningPastFacingDirection lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0 @@ -1918,7 +1918,7 @@ sub_8090854: @ 8090854 movs r0, 0 ldrsh r1, [r1, r0] adds r0, r7, 0 - bl sub_8097978 + bl SetFieldObjectStepTimer ldrb r1, [r6] movs r0, 0x3 negs r0, r0 @@ -1939,7 +1939,7 @@ sub_8090898: @ 8090898 adds r4, r0, 0 adds r5, r1, 0 adds r0, r5, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 bne _080908B6 @@ -1973,7 +1973,7 @@ sub_80908C8: @ 80908C8 bl memcpy adds r0, r4, 0 movs r1, 0x7 - bl sub_808F8BC + bl GetRunningPastFacingDirection lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0 @@ -2086,7 +2086,7 @@ sub_8090994: @ 8090994 movs r0, 0 ldrsh r1, [r1, r0] adds r0, r7, 0 - bl sub_8097978 + bl SetFieldObjectStepTimer ldrb r1, [r6] movs r0, 0x3 negs r0, r0 @@ -2107,7 +2107,7 @@ sub_80909D8: @ 80909D8 adds r4, r0, 0 adds r5, r1, 0 adds r0, r5, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 bne _080909F6 @@ -2141,7 +2141,7 @@ sub_8090A08: @ 8090A08 bl memcpy adds r0, r4, 0 movs r1, 0x8 - bl sub_808F8BC + bl GetRunningPastFacingDirection lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0 @@ -2254,7 +2254,7 @@ sub_8090AD4: @ 8090AD4 movs r0, 0 ldrsh r1, [r1, r0] adds r0, r7, 0 - bl sub_8097978 + bl SetFieldObjectStepTimer ldrb r1, [r6] movs r0, 0x3 negs r0, r0 @@ -2275,7 +2275,7 @@ sub_8090B18: @ 8090B18 adds r4, r0, 0 adds r5, r1, 0 adds r0, r5, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 bne _08090B36 @@ -2309,7 +2309,7 @@ sub_8090B48: @ 8090B48 bl memcpy adds r0, r4, 0 movs r1, 0x9 - bl sub_808F8BC + bl GetRunningPastFacingDirection lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0 @@ -2422,7 +2422,7 @@ sub_8090C14: @ 8090C14 movs r0, 0 ldrsh r1, [r1, r0] adds r0, r7, 0 - bl sub_8097978 + bl SetFieldObjectStepTimer ldrb r1, [r6] movs r0, 0x3 negs r0, r0 @@ -2443,7 +2443,7 @@ sub_8090C58: @ 8090C58 adds r4, r0, 0 adds r5, r1, 0 adds r0, r5, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 bne _08090C76 @@ -2477,7 +2477,7 @@ sub_8090C88: @ 8090C88 bl memcpy adds r0, r4, 0 movs r1, 0xA - bl sub_808F8BC + bl GetRunningPastFacingDirection lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0 @@ -2569,7 +2569,7 @@ sub_8090D40: @ 8090D40 beq _08090D5A adds r0, r4, 0 movs r1, 0x30 - bl sub_8097978 + bl SetFieldObjectStepTimer movs r0, 0x2 strh r0, [r4, 0x30] _08090D5A: @@ -2585,7 +2585,7 @@ sub_8090D64: @ 8090D64 adds r4, r0, 0 adds r5, r1, 0 adds r0, r5, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 bne _08090D82 @@ -2617,7 +2617,7 @@ sub_8090D90: @ 8090D90 bl memcpy adds r0, r4, 0 movs r1, 0 - bl sub_808F8BC + bl GetRunningPastFacingDirection lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0 @@ -2709,7 +2709,7 @@ sub_8090E44: @ 8090E44 beq _08090E5E adds r0, r4, 0 movs r1, 0x30 - bl sub_8097978 + bl SetFieldObjectStepTimer movs r0, 0x2 strh r0, [r4, 0x30] _08090E5E: @@ -2725,7 +2725,7 @@ sub_8090E68: @ 8090E68 adds r4, r0, 0 adds r5, r1, 0 adds r0, r5, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 bne _08090E86 @@ -2756,7 +2756,7 @@ sub_8090E94: @ 8090E94 bl memcpy adds r0, r4, 0 movs r1, 0 - bl sub_808F8BC + bl GetRunningPastFacingDirection lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0 @@ -12667,7 +12667,7 @@ sub_80955C8: @ 80955C8 beq _080955E4 adds r0, r4, 0 movs r1, 0x20 - bl sub_8097978 + bl SetFieldObjectStepTimer movs r0, 0x2 strh r0, [r4, 0x32] _080955E4: @@ -12693,7 +12693,7 @@ sub_80955EC: @ 80955EC orrs r0, r1 strb r0, [r4, 0x1] adds r0, r5, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 beq _0809561E @@ -12737,7 +12737,7 @@ sub_8095644: @ 8095644 beq _08095660 adds r0, r4, 0 movs r1, 0x20 - bl sub_8097978 + bl SetFieldObjectStepTimer movs r0, 0x2 strh r0, [r4, 0x32] _08095660: @@ -12763,7 +12763,7 @@ sub_8095668: @ 8095668 orrs r0, r1 strb r0, [r4, 0x1] adds r0, r5, 0 - bl sub_809797C + bl RunFieldObjectStepTimer lsls r0, 24 cmp r0, 0 beq _0809569A diff --git a/asm/map_obj_8097404.s b/asm/map_obj_8097404.s index 6bc74d0e5..1bbf3eff2 100644 --- a/asm/map_obj_8097404.s +++ b/asm/map_obj_8097404.s @@ -769,16 +769,16 @@ _08097964: .pool thumb_func_end sub_80978E4 - thumb_func_start sub_8097978 -@ void sub_8097978(struct obj *object, u16 a2) -sub_8097978: @ 8097978 + thumb_func_start SetFieldObjectStepTimer +@ void SetFieldObjectStepTimer(struct obj *object, u16 a2) +SetFieldObjectStepTimer: @ 8097978 strh r1, [r0, 0x34] bx lr - thumb_func_end sub_8097978 + thumb_func_end SetFieldObjectStepTimer - thumb_func_start sub_809797C -@ bool8 sub_809797C(struct obj *object) -sub_809797C: @ 809797C + thumb_func_start RunFieldObjectStepTimer +@ bool8 RunFieldObjectStepTimer(struct obj *object) +RunFieldObjectStepTimer: @ 809797C push {lr} ldrh r1, [r0, 0x34] subs r1, 0x1 @@ -793,7 +793,7 @@ _0809798E: _08097990: pop {r1} bx r1 - thumb_func_end sub_809797C + thumb_func_end RunFieldObjectStepTimer thumb_func_start obj_anim_image_set_and_seek obj_anim_image_set_and_seek: @ 8097994 diff --git a/include/data3.h b/include/data3.h index 35dba5942..3c1d34759 100755 --- a/include/data3.h +++ b/include/data3.h @@ -17,7 +17,7 @@ extern const struct SpritePalette gUnknown_0850BBC8[]; extern const struct PairedPalettes gUnknown_0850BD00[15]; extern const struct PairedPalettes gUnknown_0850BD78[15]; extern const u16 *const gUnknown_0850BE38[2]; -extern const s16 gUnknown_0850D6DC[4]; -extern const u8 gUnknown_0850D710[4]; +extern const s16 gUnknown_0850D6DC[4]; // {0x20, 0x40, 0x60, 0x80} +extern const u8 gUnknown_0850D710[4]; // {DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST} #endif //POKEEMERALD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 40129cc3f..cf11e675d 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -81,8 +81,8 @@ void npc_reset(struct MapObject *, struct Sprite *); void FieldObjectSetRegularAnim(struct MapObject *, struct Sprite *, u8); u8 GetFaceDirectionAnimId(u8); bool8 FieldObjectExecRegularAnim(struct MapObject *, struct Sprite *); -void sub_8097978(struct Sprite *, s16); -bool8 sub_809797C(struct Sprite *); +void SetFieldObjectStepTimer(struct Sprite *, s16); +bool8 RunFieldObjectStepTimer(struct Sprite *); bool8 sub_8092B88(struct MapObject *, u8); u8 GetGoSpeed0AnimId(u8); @@ -1752,14 +1752,14 @@ bool8 sub_808F48C(struct MapObject *mapObject, struct Sprite *sprite) { return FALSE; } - sub_8097978(sprite, gUnknown_0850D6DC[Random() & 0x03]); + SetFieldObjectStepTimer(sprite, gUnknown_0850D6DC[Random() & 0x03]); sprite->data1 = 3; return TRUE; } bool8 sub_808F4C8(struct MapObject *mapObject, struct Sprite *sprite) { - if (sub_809797C(sprite)) + if (RunFieldObjectStepTimer(sprite)) { sprite->data1 = 4; return TRUE; @@ -2025,7 +2025,7 @@ u8 GetNonNorthRunningPastFacingDirection(s16 dx, s16 dy, s16 absdx, s16 absdy) return direction; } -u8 sub_808F8BC(struct MapObject *mapObject, u8 movementType) +u8 GetRunningPastFacingDirection(struct MapObject *mapObject, u8 movementType) { s16 dx; s16 dy; @@ -2072,7 +2072,7 @@ bool8 sub_808F9C8(struct MapObject *mapObject, struct Sprite *sprite) { if (FieldObjectExecRegularAnim(mapObject, sprite)) { - sub_8097978(sprite, gUnknown_0850D6DC[Random() & 0x03]); + SetFieldObjectStepTimer(sprite, gUnknown_0850D6DC[Random() & 0x03]); mapObject->mapobj_bit_1 = FALSE; sprite->data1 = 3; } @@ -2081,7 +2081,7 @@ bool8 sub_808F9C8(struct MapObject *mapObject, struct Sprite *sprite) bool8 sub_808FA0C(struct MapObject *mapObject, struct Sprite *sprite) { - if (sub_809797C(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + if (RunFieldObjectStepTimer(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) { sprite->data1 = 4; return TRUE; @@ -2095,7 +2095,7 @@ bool8 sub_808FA3C(struct MapObject *mapObject, struct Sprite *sprite) u8 direction; memcpy(directions, gUnknown_0850D710, sizeof directions); - direction = sub_808F8BC(mapObject, 0); + direction = GetRunningPastFacingDirection(mapObject, 0); if (direction == 0) { direction = directions[Random() & 0x03]; From 4a1383d77bb1da701290848020b5ebf942182283 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 14 Sep 2017 21:22:14 -0400 Subject: [PATCH 093/342] RandomlyGoNorthOrSouth --- asm/field_map_obj.s | 229 ++------------------------------------------ include/data3.h | 1 + src/field_map_obj.c | 75 ++++++++++++++- 3 files changed, 82 insertions(+), 223 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 9f61afc76..cef03345c 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,219 +5,6 @@ .text - thumb_func_start FieldObjectCB_RandomlyGoNorthOrSouth -FieldObjectCB_RandomlyGoNorthOrSouth: @ 808FA84 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =FieldObjectCB2_RandomlyGoNorthOrSouth - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_RandomlyGoNorthOrSouth - - thumb_func_start FieldObjectCB2_RandomlyGoNorthOrSouth -FieldObjectCB2_RandomlyGoNorthOrSouth: @ 808FAA8 - push {r4,lr} - ldr r3, =gUnknown_0850D754 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end FieldObjectCB2_RandomlyGoNorthOrSouth - - thumb_func_start sub_808FAC8 -sub_808FAC8: @ 808FAC8 - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_808FAC8 - - thumb_func_start sub_808FADC -sub_808FADC: @ 808FADC - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_808FADC - - thumb_func_start sub_808FB08 -@ bool8 sub_808FB08(struct npc_state *fieldObject, struct obj *object) -sub_808FB08: @ 808FB08 - push {r4-r6,lr} - adds r6, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0808FB3C - ldr r5, =gUnknown_0850D6DC - bl Random - movs r4, 0x3 - adds r1, r4, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r5 - movs r0, 0 - ldrsh r1, [r1, r0] - adds r0, r6, 0 - bl SetFieldObjectStepTimer - strh r4, [r6, 0x30] - movs r0, 0x1 - b _0808FB3E - .pool -_0808FB3C: - movs r0, 0 -_0808FB3E: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_808FB08 - - thumb_func_start sub_808FB44 -@ bool8 sub_808FB44(struct npc_state *fieldObject, struct obj *object) -sub_808FB44: @ 808FB44 - push {r4,lr} - adds r4, r1, 0 - adds r0, r4, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - bne _0808FB58 - movs r0, 0 - b _0808FB5E -_0808FB58: - movs r0, 0x4 - strh r0, [r4, 0x30] - movs r0, 0x1 -_0808FB5E: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_808FB44 - - thumb_func_start sub_808FB64 -@ bool8 sub_808FB64(struct npc_state *fieldObject, struct obj *object) -sub_808FB64: @ 808FB64 - push {r4-r7,lr} - sub sp, 0x4 - adds r5, r0, 0 - adds r6, r1, 0 - ldr r1, =gUnknown_0850D770 - mov r0, sp - movs r2, 0x2 - bl memcpy - bl Random - movs r7, 0x1 - adds r1, r7, 0 - ands r1, r0 - mov r2, sp - adds r0, r2, r1 - ldrb r4, [r0] - adds r0, r5, 0 - adds r1, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x5 - strh r0, [r6, 0x30] - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_8092B88 - lsls r0, 24 - cmp r0, 0 - beq _0808FBA2 - strh r7, [r6, 0x30] -_0808FBA2: - movs r0, 0x1 - add sp, 0x4 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_808FB64 - - thumb_func_start sub_808FBB0 -sub_808FBB0: @ 808FBB0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsrs r0, 4 - bl GetGoSpeed0AnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - ldrb r0, [r4] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r4] - movs r0, 0x6 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_808FBB0 - - thumb_func_start sub_808FBE0 -sub_808FBE0: @ 808FBE0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0808FBFE - ldrb r0, [r4] - movs r1, 0x3 - negs r1, r1 - ands r1, r0 - strb r1, [r4] - movs r0, 0x1 - strh r0, [r5, 0x30] -_0808FBFE: - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_808FBE0 - thumb_func_start FieldObjectCB_RandomlyGoEastOrWest FieldObjectCB_RandomlyGoEastOrWest: @ 808FC08 push {lr} @@ -365,7 +152,7 @@ sub_808FCE8: @ 808FCE8 strh r0, [r6, 0x30] adds r0, r5, 0 adds r1, r4, 0 - bl sub_8092B88 + bl npc_block_way__next_tile lsls r0, 24 cmp r0, 0 beq _0808FD26 @@ -2887,7 +2674,7 @@ _08090F98: ldrb r1, [r4, 0x18] lsrs r1, 4 adds r0, r4, 0 - bl sub_8092B88 + bl npc_block_way__next_tile lsls r0, 24 lsrs r5, r0, 24 ldrb r0, [r4, 0x18] @@ -2918,7 +2705,7 @@ _08090F98: ldrb r1, [r4, 0x18] lsrs r1, 4 adds r0, r4, 0 - bl sub_8092B88 + bl npc_block_way__next_tile lsls r0, 24 lsrs r5, r0, 24 _08090FEE: @@ -3020,7 +2807,7 @@ _0809107E: ldrb r1, [r4, 0x18] lsrs r1, 4 adds r0, r4, 0 - bl sub_8092B88 + bl npc_block_way__next_tile lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -3041,7 +2828,7 @@ _0809107E: ldrb r1, [r4, 0x18] lsrs r1, 4 adds r0, r4, 0 - bl sub_8092B88 + bl npc_block_way__next_tile lsls r0, 24 lsrs r0, 24 _080910D8: @@ -6629,8 +6416,8 @@ npc_running_behaviour_by_direction: @ 8092B78 .pool thumb_func_end npc_running_behaviour_by_direction - thumb_func_start sub_8092B88 -sub_8092B88: @ 8092B88 + thumb_func_start npc_block_way__next_tile +npc_block_way__next_tile: @ 8092B88 push {r4-r6,lr} sub sp, 0x4 adds r6, r0, 0 @@ -6661,7 +6448,7 @@ sub_8092B88: @ 8092B88 pop {r4-r6} pop {r1} bx r1 - thumb_func_end sub_8092B88 + thumb_func_end npc_block_way__next_tile thumb_func_start npc_block_way @ u8 npc_block_way(struct npc_state *fieldObject, u16 x, u16 y, u8 direction) diff --git a/include/data3.h b/include/data3.h index 3c1d34759..c73a8c991 100755 --- a/include/data3.h +++ b/include/data3.h @@ -19,5 +19,6 @@ extern const struct PairedPalettes gUnknown_0850BD78[15]; extern const u16 *const gUnknown_0850BE38[2]; extern const s16 gUnknown_0850D6DC[4]; // {0x20, 0x40, 0x60, 0x80} extern const u8 gUnknown_0850D710[4]; // {DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST} +extern const u8 gUnknown_0850D770[2]; // {DIR_SOUTH, DIR_NORTH} #endif //POKEEMERALD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index cf11e675d..5b0916e33 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -83,7 +83,7 @@ u8 GetFaceDirectionAnimId(u8); bool8 FieldObjectExecRegularAnim(struct MapObject *, struct Sprite *); void SetFieldObjectStepTimer(struct Sprite *, s16); bool8 RunFieldObjectStepTimer(struct Sprite *); -bool8 sub_8092B88(struct MapObject *, u8); +bool8 npc_block_way__next_tile(struct MapObject *, u8); u8 GetGoSpeed0AnimId(u8); // ROM data @@ -1776,7 +1776,7 @@ bool8 sub_808F4E8(struct MapObject *mapObject, struct Sprite *sprite) chosenDirection = directions[Random() & 0x03]; FieldObjectSetDirection(mapObject, chosenDirection); sprite->data1 = 5; - if (sub_8092B88(mapObject, chosenDirection)) + if (npc_block_way__next_tile(mapObject, chosenDirection)) { sprite->data1 = 1; } @@ -2104,3 +2104,74 @@ bool8 sub_808FA3C(struct MapObject *mapObject, struct Sprite *sprite) sprite->data1 = 1; return TRUE; } + +field_object_step(RandomlyGoNorthOrSouth, gUnknown_0850D754) + +bool8 sub_808FAC8(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_808FADC(struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_808FB08(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (!FieldObjectExecRegularAnim(mapObject, sprite)) + { + return FALSE; + } + SetFieldObjectStepTimer(sprite, gUnknown_0850D6DC[Random() & 0x03]); + sprite->data1 = 3; + return TRUE; +} + +bool8 sub_808FB44(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (RunFieldObjectStepTimer(sprite)) + { + sprite->data1 = 4; + return TRUE; + } + return FALSE; +} + +bool8 sub_808FB64(struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[2]; + u8 direction; + + memcpy(directions, gUnknown_0850D770, sizeof directions); + direction = directions[Random() & 0x01]; + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 5; + if (npc_block_way__next_tile(mapObject, direction)) + { + sprite->data1 = 1; + } + return TRUE; +} + +bool8 sub_808FBB0(struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetGoSpeed0AnimId(mapObject->placeholder18)); + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 6; + return TRUE; +} + +bool8 sub_808FBE0(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 1; + } + return FALSE; +} From 68c62595f569e9b6ccca1596776330ce31d9d805 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 14 Sep 2017 21:25:30 -0400 Subject: [PATCH 094/342] RandomlyGoEastOrWest --- asm/field_map_obj.s | 210 -------------------------------------------- include/data3.h | 1 + src/field_map_obj.c | 71 +++++++++++++++ 3 files changed, 72 insertions(+), 210 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index cef03345c..eca11aafd 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,216 +5,6 @@ .text - thumb_func_start FieldObjectCB_RandomlyGoEastOrWest -FieldObjectCB_RandomlyGoEastOrWest: @ 808FC08 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =FieldObjectCB2_RandomlyGoEastOrWest - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_RandomlyGoEastOrWest - - thumb_func_start FieldObjectCB2_RandomlyGoEastOrWest -FieldObjectCB2_RandomlyGoEastOrWest: @ 808FC2C - push {r4,lr} - ldr r3, =gUnknown_0850D774 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end FieldObjectCB2_RandomlyGoEastOrWest - - thumb_func_start sub_808FC4C -sub_808FC4C: @ 808FC4C - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_808FC4C - - thumb_func_start sub_808FC60 -sub_808FC60: @ 808FC60 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_808FC60 - - thumb_func_start sub_808FC8C -sub_808FC8C: @ 808FC8C - push {r4-r6,lr} - adds r6, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0808FCC0 - ldr r5, =gUnknown_0850D6DC - bl Random - movs r4, 0x3 - adds r1, r4, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r5 - movs r0, 0 - ldrsh r1, [r1, r0] - adds r0, r6, 0 - bl SetFieldObjectStepTimer - strh r4, [r6, 0x30] - movs r0, 0x1 - b _0808FCC2 - .pool -_0808FCC0: - movs r0, 0 -_0808FCC2: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_808FC8C - - thumb_func_start sub_808FCC8 -sub_808FCC8: @ 808FCC8 - push {r4,lr} - adds r4, r1, 0 - adds r0, r4, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - bne _0808FCDC - movs r0, 0 - b _0808FCE2 -_0808FCDC: - movs r0, 0x4 - strh r0, [r4, 0x30] - movs r0, 0x1 -_0808FCE2: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_808FCC8 - - thumb_func_start sub_808FCE8 -sub_808FCE8: @ 808FCE8 - push {r4-r7,lr} - sub sp, 0x4 - adds r5, r0, 0 - adds r6, r1, 0 - ldr r1, =gUnknown_0850D790 - mov r0, sp - movs r2, 0x2 - bl memcpy - bl Random - movs r7, 0x1 - adds r1, r7, 0 - ands r1, r0 - mov r2, sp - adds r0, r2, r1 - ldrb r4, [r0] - adds r0, r5, 0 - adds r1, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x5 - strh r0, [r6, 0x30] - adds r0, r5, 0 - adds r1, r4, 0 - bl npc_block_way__next_tile - lsls r0, 24 - cmp r0, 0 - beq _0808FD26 - strh r7, [r6, 0x30] -_0808FD26: - movs r0, 0x1 - add sp, 0x4 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_808FCE8 - - thumb_func_start sub_808FD34 -sub_808FD34: @ 808FD34 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsrs r0, 4 - bl GetGoSpeed0AnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - ldrb r0, [r4] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r4] - movs r0, 0x6 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_808FD34 - - thumb_func_start sub_808FD64 -sub_808FD64: @ 808FD64 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0808FD82 - ldrb r0, [r4] - movs r1, 0x3 - negs r1, r1 - ands r1, r0 - strb r1, [r4] - movs r0, 0x1 - strh r0, [r5, 0x30] -_0808FD82: - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_808FD64 - thumb_func_start FieldObjectCB_FaceFixedDirection FieldObjectCB_FaceFixedDirection: @ 808FD8C push {lr} diff --git a/include/data3.h b/include/data3.h index c73a8c991..63be33381 100755 --- a/include/data3.h +++ b/include/data3.h @@ -20,5 +20,6 @@ extern const u16 *const gUnknown_0850BE38[2]; extern const s16 gUnknown_0850D6DC[4]; // {0x20, 0x40, 0x60, 0x80} extern const u8 gUnknown_0850D710[4]; // {DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST} extern const u8 gUnknown_0850D770[2]; // {DIR_SOUTH, DIR_NORTH} +extern const u8 gUnknown_0850D790[2]; // {DIR_WEST, DIR_EAST} #endif //POKEEMERALD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 5b0916e33..edd16b6a8 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -2175,3 +2175,74 @@ bool8 sub_808FBE0(struct MapObject *mapObject, struct Sprite *sprite) } return FALSE; } + +field_object_step(RandomlyGoEastOrWest, gUnknown_0850D774) + +bool8 sub_808FC4C(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_808FC60(struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_808FC8C(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (!FieldObjectExecRegularAnim(mapObject, sprite)) + { + return FALSE; + } + SetFieldObjectStepTimer(sprite, gUnknown_0850D6DC[Random() & 0x03]); + sprite->data1 = 3; + return TRUE; +} + +bool8 sub_808FCC8(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (RunFieldObjectStepTimer(sprite)) + { + sprite->data1 = 4; + return TRUE; + } + return FALSE; +} + +bool8 sub_808FCE8(struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[2]; + u8 direction; + + memcpy(directions, gUnknown_0850D790, sizeof directions); + direction = directions[Random() & 0x01]; + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 5; + if (npc_block_way__next_tile(mapObject, direction)) + { + sprite->data1 = 1; + } + return TRUE; +} + +bool8 sub_808FD34(struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetGoSpeed0AnimId(mapObject->placeholder18)); + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 6; + return TRUE; +} + +bool8 sub_808FD64(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 1; + } + return FALSE; +} From 9a13b1f34e8ccb2b4c868a5c7d06ff86210125f2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 14 Sep 2017 21:30:14 -0400 Subject: [PATCH 095/342] FaceFixedDirection --- asm/field_map_obj.s | 94 --------------------------------------------- src/field_map_obj.c | 26 +++++++++++++ 2 files changed, 26 insertions(+), 94 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index eca11aafd..f67a70ef0 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,100 +5,6 @@ .text - thumb_func_start FieldObjectCB_FaceFixedDirection -FieldObjectCB_FaceFixedDirection: @ 808FD8C - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =FieldObjectCB2_FaceFixedDirection - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_FaceFixedDirection - - thumb_func_start FieldObjectCB2_FaceFixedDirection -@ bool8 FieldObjectCB2_FaceFixedDirection(struct npc_state *fieldObject, struct obj *object) -FieldObjectCB2_FaceFixedDirection: @ 808FDB0 - push {r4,lr} - ldr r3, =gUnknown_0850D794 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end FieldObjectCB2_FaceFixedDirection - - thumb_func_start sub_808FDD0 -@ bool8 sub_808FDD0(struct npc_state *fieldObject, struct obj *object) -sub_808FDD0: @ 808FDD0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl npc_reset - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x1 - strh r0, [r5, 0x30] - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_808FDD0 - - thumb_func_start sub_808FDFC -@ bool8 sub_808FDFC(struct npc_state *fieldObject, struct obj *object) -sub_808FDFC: @ 808FDFC - push {r4,lr} - adds r4, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - bne _0808FE0E - movs r0, 0 - b _0808FE14 -_0808FE0E: - movs r0, 0x2 - strh r0, [r4, 0x30] - movs r0, 0x1 -_0808FE14: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_808FDFC - - thumb_func_start sub_808FE1C -@ bool8 sub_808FE1C(struct npc_state *fieldObject, struct obj *object) -sub_808FE1C: @ 808FE1C - ldrb r2, [r0] - movs r1, 0x3 - negs r1, r1 - ands r1, r2 - strb r1, [r0] - movs r0, 0 - bx lr - thumb_func_end sub_808FE1C - thumb_func_start FieldObjectCB_BerryTree FieldObjectCB_BerryTree: @ 808FE2C push {r4,r5,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index edd16b6a8..04b207d96 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -2246,3 +2246,29 @@ bool8 sub_808FD64(struct MapObject *mapObject, struct Sprite *sprite) } return FALSE; } + +field_object_step(FaceFixedDirection, gUnknown_0850D794) + +bool8 sub_808FDD0(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_808FDFC(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + sprite->data1 = 2; + return TRUE; + } + return FALSE; +} + +bool8 sub_808FE1C(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_1 = FALSE; + return FALSE; +} From 9f6a4be9f05a46031d20ed7a48398147def2643c Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 15 Sep 2017 14:26:01 -0400 Subject: [PATCH 096/342] BerryTree --- asm/battle_transition.s | 4 +- asm/braille_puzzles.s | 4 +- asm/field_effect.s | 40 ++--- asm/field_effect_helpers.s | 56 +++---- asm/field_ground_effect.s | 24 +-- asm/field_map_obj.s | 308 +------------------------------------ asm/field_player_avatar.s | 4 +- asm/fldeff_80F9BCC.s | 32 ++-- asm/fldeff_emotion.s | 2 +- asm/fldeff_strength.s | 4 +- asm/fldeff_sweetscent.s | 4 +- asm/fldeff_teleport.s | 2 +- asm/map_obj_8097404.s | 4 +- asm/rom6.s | 10 +- asm/rom_80C6FA0.s | 4 +- asm/rom_818E9AC.s | 10 +- asm/scrcmd.s | 2 +- asm/trainer_see.s | 4 +- include/field_effect.h | 80 ++++++++++ src/field_map_obj.c | 110 ++++++++++++- sym_ewram.txt | 2 +- 21 files changed, 300 insertions(+), 410 deletions(-) create mode 100644 include/field_effect.h diff --git a/asm/battle_transition.s b/asm/battle_transition.s index 9709fb54f..6406a3f24 100644 --- a/asm/battle_transition.s +++ b/asm/battle_transition.s @@ -2151,7 +2151,7 @@ sub_8147018: @ 8147018 ands r5, r0 movs r1, 0 mov r8, r4 - ldr r6, =gUnknown_02038C08 + ldr r6, =gFieldEffectSpawnParams _08147046: lsls r5, 16 asrs r5, 16 @@ -2221,7 +2221,7 @@ _081470C4: sub_81470D0: @ 81470D0 push {r4,r5,lr} ldr r0, =gUnknown_085C8E68 - ldr r5, =gUnknown_02038C08 + ldr r5, =gFieldEffectSpawnParams movs r2, 0 ldrsh r1, [r5, r2] movs r3, 0x4 diff --git a/asm/braille_puzzles.s b/asm/braille_puzzles.s index ceaddbdf0..095b1b793 100644 --- a/asm/braille_puzzles.s +++ b/asm/braille_puzzles.s @@ -271,7 +271,7 @@ _0817982E: sub_8179834: @ 8179834 push {lr} bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] @@ -367,7 +367,7 @@ _08179912: sub_8179918: @ 8179918 push {lr} bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] diff --git a/asm/field_effect.s b/asm/field_effect.s index 6277c127b..08670f556 100644 --- a/asm/field_effect.s +++ b/asm/field_effect.s @@ -1989,7 +1989,7 @@ task00_8084310: @ 80B6A24 cmp r0, 0 beq _080B6A8A bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] @@ -3111,7 +3111,7 @@ oei_waterfall: @ 80B734C adds r1, r0 lsls r1, 3 adds r1, r2 - ldr r2, =gUnknown_02038C08 + ldr r2, =gFieldEffectSpawnParams ldr r2, [r2] strh r2, [r1, 0xA] bl _call_via_r4 @@ -3188,7 +3188,7 @@ waterfall_1_do_anim_probably: @ 80B73F0 bne _080B7420 adds r0, r5, 0 bl FieldObjectClearAnimIfSpecialAnimFinished - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams movs r2, 0xA ldrsh r0, [r4, r2] str r0, [r1] @@ -3304,7 +3304,7 @@ sub_80B74D0: @ 80B74D0 adds r1, r0 lsls r1, 3 adds r1, r2 - ldr r3, =gUnknown_02038C08 + ldr r3, =gFieldEffectSpawnParams ldr r2, [r3] strh r2, [r1, 0x26] ldr r2, [r3, 0x4] @@ -3363,7 +3363,7 @@ dive_2_unknown: @ 80B7558 push {r4,lr} adds r4, r0, 0 bl ScriptContext2_Enable - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams movs r2, 0x26 ldrsh r0, [r4, r2] str r0, [r1] @@ -3536,7 +3536,7 @@ sub_80B76B8: @ 80B76B8 strh r0, [r2, 0x26] movs r0, 0x1 strh r0, [r4, 0xE] - ldr r3, =gUnknown_02038C08 + ldr r3, =gFieldEffectSpawnParams movs r5, 0x10 ldrsh r0, [r1, r5] str r0, [r3] @@ -3835,7 +3835,7 @@ sub_80B791C: @ 80B791C lsls r0, 24 cmp r0, 0 beq _080B795C - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams movs r2, 0x10 ldrsh r0, [r5, r2] str r0, [r1] @@ -3935,7 +3935,7 @@ _080B79E6: thumb_func_start sub_80B79F4 sub_80B79F4: @ 80B79F4 push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -4090,7 +4090,7 @@ sub_80B7B18: @ 80B7B18 ldrsh r0, [r5, r2] cmp r0, 0x3 ble _080B7B6C - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams movs r2, 0x10 ldrsh r0, [r4, r2] str r0, [r1] @@ -4222,7 +4222,7 @@ _080B7C2C: thumb_func_start sub_80B7C48 sub_80B7C48: @ 80B7C48 push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -5229,7 +5229,7 @@ _080B84BE: bl CreateTask lsls r0, 24 lsrs r4, r0, 24 - ldr r2, =gUnknown_02038C08 + ldr r2, =gFieldEffectSpawnParams ldr r0, [r2] ldr r1, [r2, 0x4] ldr r2, [r2, 0x8] @@ -5252,7 +5252,7 @@ _080B84BE: thumb_func_start sub_80B84F8 sub_80B84F8: @ 80B84F8 push {r4-r6,lr} - ldr r5, =gUnknown_02038C08 + ldr r5, =gFieldEffectSpawnParams ldr r0, [r5] movs r6, 0x80 lsls r6, 24 @@ -6292,7 +6292,7 @@ sub_80B8D44: @ 80B8D44 adds r1, r0 lsls r1, 3 adds r1, r2 - ldr r0, =gUnknown_02038C08 + ldr r0, =gFieldEffectSpawnParams ldr r0, [r0] strh r0, [r1, 0x26] bl sav1_reset_battle_music_maybe @@ -6421,7 +6421,7 @@ sub_80B8E60: @ 80B8E60 lsls r0, 24 cmp r0, 0 beq _080B8E96 - ldr r2, =gUnknown_02038C08 + ldr r2, =gFieldEffectSpawnParams movs r1, 0x26 ldrsh r0, [r4, r1] movs r1, 0x80 @@ -6473,7 +6473,7 @@ sub_80B8EA8: @ 80B8EA8 lsrs r1, 24 adds r0, r4, 0 bl FieldObjectSetSpecialAnim - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams movs r2, 0xA ldrsh r0, [r6, r2] str r0, [r1] @@ -6704,7 +6704,7 @@ sub_80B90CC: @ 80B90CC strb r0, [r2, 0x5] ldr r0, =sub_80B9128 str r0, [r2, 0x1C] - ldr r0, =gUnknown_02038C08 + ldr r0, =gFieldEffectSpawnParams ldr r0, [r0] strh r0, [r2, 0x30] movs r0, 0x9E @@ -6793,7 +6793,7 @@ sub_80B91A4: @ 80B91A4 adds r1, r0 lsls r1, 3 adds r1, r2 - ldr r0, =gUnknown_02038C08 + ldr r0, =gFieldEffectSpawnParams ldr r0, [r0] strh r0, [r1, 0xA] movs r0, 0 @@ -6884,7 +6884,7 @@ sub_80B925C: @ 80B925C ldrh r0, [r4, 0x8] adds r0, 0x1 strh r0, [r4, 0x8] - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams movs r2, 0xA ldrsh r0, [r4, r2] str r0, [r1] @@ -7922,7 +7922,7 @@ _080B9ACA: sub_80B9ADC: @ 80B9ADC push {r4,lr} sub sp, 0x4 - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams ldrb r0, [r4] ldrb r1, [r4, 0x4] ldrb r2, [r4, 0x8] @@ -8343,7 +8343,7 @@ _080B9E24: sub_80B9E28: @ 80B9E28 push {r4-r7,lr} sub sp, 0x4 - ldr r7, =gUnknown_02038C08 + ldr r7, =gFieldEffectSpawnParams ldrb r0, [r7] ldrb r1, [r7, 0x4] ldrb r2, [r7, 0x8] diff --git a/asm/field_effect_helpers.s b/asm/field_effect_helpers.s index 04307fde5..76ba35fd2 100644 --- a/asm/field_effect_helpers.s +++ b/asm/field_effect_helpers.s @@ -574,7 +574,7 @@ _0815432E: thumb_func_start oei_shadow oei_shadow: @ 8154340 push {r4,r5,lr} - ldr r5, =gUnknown_02038C08 + ldr r5, =gFieldEffectSpawnParams ldrb r0, [r5] ldrb r1, [r5, 0x4] ldrb r2, [r5, 0x8] @@ -742,7 +742,7 @@ _08154498: oei_grass_normal: @ 81544AC push {r4,r5,lr} sub sp, 0x4 - ldr r5, =gUnknown_02038C08 + ldr r5, =gFieldEffectSpawnParams ldrh r1, [r5] mov r0, sp strh r1, [r0] @@ -951,7 +951,7 @@ _08154648: thumb_func_start sub_8154658 sub_8154658: @ 8154658 push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -1080,7 +1080,7 @@ _0815474C: sub_8154758: @ 8154758 push {r4,r5,lr} sub sp, 0x4 - ldr r5, =gUnknown_02038C08 + ldr r5, =gFieldEffectSpawnParams ldrh r1, [r5] mov r0, sp strh r1, [r0] @@ -1282,7 +1282,7 @@ _081548EA: thumb_func_start sub_81548FC sub_81548FC: @ 81548FC push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -1336,7 +1336,7 @@ _08154958: thumb_func_start sub_815496C sub_815496C: @ 815496C push {r4-r6,lr} - ldr r6, =gUnknown_02038C08 + ldr r6, =gFieldEffectSpawnParams ldrb r0, [r6] ldrb r1, [r6, 0x4] ldrb r2, [r6, 0x8] @@ -1537,7 +1537,7 @@ _08154AF2: thumb_func_start sub_8154B04 sub_8154B04: @ 8154B04 push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -1591,7 +1591,7 @@ _08154B62: thumb_func_start sub_8154B78 sub_8154B78: @ 8154B78 push {r4,r5,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -1646,7 +1646,7 @@ _08154BD8: thumb_func_start sub_8154BEC sub_8154BEC: @ 8154BEC push {r4,r5,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -1777,7 +1777,7 @@ _08154CE4: thumb_func_start sub_8154CEC sub_8154CEC: @ 8154CEC push {r4-r6,lr} - ldr r6, =gUnknown_02038C08 + ldr r6, =gFieldEffectSpawnParams ldrb r0, [r6] ldrb r1, [r6, 0x4] ldrb r2, [r6, 0x8] @@ -1922,7 +1922,7 @@ _08154E0A: thumb_func_start sub_8154E1C sub_8154E1C: @ 8154E1C push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -1976,7 +1976,7 @@ _08154E78: thumb_func_start oei_water_drop_tall oei_water_drop_tall: @ 8154E8C push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -2030,7 +2030,7 @@ _08154EE8: thumb_func_start sub_8154EFC sub_8154EFC: @ 8154EFC push {r4-r7,lr} - ldr r7, =gUnknown_02038C08 + ldr r7, =gFieldEffectSpawnParams ldrb r0, [r7] ldrb r1, [r7, 0x4] ldrb r2, [r7, 0x8] @@ -2193,7 +2193,7 @@ oei_ripples: @ 8155054 push {r4,lr} ldr r0, =gFieldEffectObjectTemplatePointers ldr r0, [r0, 0x14] - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams movs r2, 0 ldrsh r1, [r4, r2] movs r3, 0x4 @@ -2238,7 +2238,7 @@ _081550A0: thumb_func_start sub_81550B4 sub_81550B4: @ 81550B4 push {r4-r6,lr} - ldr r6, =gUnknown_02038C08 + ldr r6, =gFieldEffectSpawnParams ldrb r0, [r6] ldrb r1, [r6, 0x4] ldrb r2, [r6, 0x8] @@ -2393,7 +2393,7 @@ _081551E4: thumb_func_start sub_81551F0 sub_81551F0: @ 81551F0 push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -2445,7 +2445,7 @@ _08155248: thumb_func_start sub_815525C sub_815525C: @ 815525C push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -2497,7 +2497,7 @@ _081552B4: thumb_func_start sub_81552C8 sub_81552C8: @ 81552C8 push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -2549,7 +2549,7 @@ _08155320: thumb_func_start sub_8155334 sub_8155334: @ 8155334 push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -2603,7 +2603,7 @@ ash: @ 81553A0 push {r4,lr} lsls r2, 16 lsrs r2, 16 - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams lsls r0, 16 asrs r0, 16 str r0, [r4] @@ -2630,7 +2630,7 @@ ash: @ 81553A0 oei_ash: @ 81553D4 push {r4,r5,lr} sub sp, 0x4 - ldr r5, =gUnknown_02038C08 + ldr r5, =gFieldEffectSpawnParams ldrh r1, [r5] mov r0, sp strh r1, [r0] @@ -2809,7 +2809,7 @@ _0815552C: thumb_func_start sub_8155534 sub_8155534: @ 8155534 push {r4,r5,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -3261,7 +3261,7 @@ _08155888: thumb_func_start sub_8155890 sub_8155890: @ 8155890 push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -3315,7 +3315,7 @@ _081558EC: thumb_func_start sub_8155900 sub_8155900: @ 8155900 push {r4-r7,lr} - ldr r7, =gUnknown_02038C08 + ldr r7, =gFieldEffectSpawnParams ldrb r0, [r7] ldrb r1, [r7, 0x4] ldrb r2, [r7, 0x8] @@ -3505,7 +3505,7 @@ _08155A76: thumb_func_start sub_8155A88 sub_8155A88: @ 8155A88 push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -3586,7 +3586,7 @@ _08155B20: thumb_func_start sub_8155B2C sub_8155B2C: @ 8155B2C push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams adds r1, r4, 0x4 adds r0, r4, 0 movs r2, 0x8 @@ -3689,7 +3689,7 @@ ShowDisguiseFieldEffect: @ 8155BD0 lsrs r6, r1, 24 lsls r2, 24 lsrs r7, r2, 24 - ldr r5, =gUnknown_02038C08 + ldr r5, =gFieldEffectSpawnParams ldrb r0, [r5] ldrb r1, [r5, 0x4] ldrb r2, [r5, 0x8] @@ -3950,7 +3950,7 @@ _08155DD8: thumb_func_start sub_8155DDC sub_8155DDC: @ 8155DDC push {r4,lr} - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams ldr r0, [r4] adds r0, 0x7 str r0, [r4] diff --git a/asm/field_ground_effect.s b/asm/field_ground_effect.s index e4c6631d4..7d05dbd98 100644 --- a/asm/field_ground_effect.s +++ b/asm/field_ground_effect.s @@ -1166,7 +1166,7 @@ _08096E8C: @ void GroundEffect_SpawnOnTallGrass(struct npc_state *fieldObject, struct obj *object) GroundEffect_SpawnOnTallGrass: @ 8096E90 push {lr} - ldr r3, =gUnknown_02038C08 + ldr r3, =gFieldEffectSpawnParams movs r2, 0x10 ldrsh r1, [r0, r2] str r1, [r3] @@ -1205,7 +1205,7 @@ GroundEffect_SpawnOnTallGrass: @ 8096E90 @ void GroundEffect_StepOnTallGrass(struct npc_state *fieldObject, struct obj *object) GroundEffect_StepOnTallGrass: @ 8096EDC push {lr} - ldr r3, =gUnknown_02038C08 + ldr r3, =gFieldEffectSpawnParams movs r2, 0x10 ldrsh r1, [r0, r2] str r1, [r3] @@ -1244,7 +1244,7 @@ GroundEffect_StepOnTallGrass: @ 8096EDC @ void GroundEffect_SpawnOnLongGrass(struct npc_state *fieldObject, struct obj *object) GroundEffect_SpawnOnLongGrass: @ 8096F28 push {lr} - ldr r3, =gUnknown_02038C08 + ldr r3, =gFieldEffectSpawnParams movs r2, 0x10 ldrsh r1, [r0, r2] str r1, [r3] @@ -1283,7 +1283,7 @@ GroundEffect_SpawnOnLongGrass: @ 8096F28 @ void GroundEffect_StepOnLongGrass(struct npc_state *fieldObject, struct obj *object) GroundEffect_StepOnLongGrass: @ 8096F74 push {lr} - ldr r3, =gUnknown_02038C08 + ldr r3, =gFieldEffectSpawnParams movs r2, 0x10 ldrsh r1, [r0, r2] str r1, [r3] @@ -1413,7 +1413,7 @@ DoTracksGroundEffect_Footprints: @ 8097044 mov r0, sp movs r2, 0x4 bl memcpy - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams movs r2, 0x14 ldrsh r0, [r5, r2] str r0, [r1] @@ -1449,7 +1449,7 @@ DoTracksGroundEffect_BikeTireTracks: @ 8097094 ldr r0, [r4, 0x14] cmp r1, r0 beq _080970D6 - ldr r2, =gUnknown_02038C08 + ldr r2, =gFieldEffectSpawnParams movs r1, 0x14 ldrsh r0, [r4, r1] str r0, [r2] @@ -1520,7 +1520,7 @@ GroundEffect_JumpOnTallGrass: @ 8097110 sub sp, 0x4 adds r5, r0, 0 adds r6, r1, 0 - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams movs r2, 0x10 ldrsh r0, [r5, r2] str r0, [r1] @@ -1562,7 +1562,7 @@ _0809715A: @ void GroundEffect_JumpOnLongGrass(struct npc_state *fieldObject, struct obj *object) GroundEffect_JumpOnLongGrass: @ 8097168 push {lr} - ldr r2, =gUnknown_02038C08 + ldr r2, =gFieldEffectSpawnParams movs r3, 0x10 ldrsh r1, [r0, r3] str r1, [r2] @@ -1585,7 +1585,7 @@ GroundEffect_JumpOnLongGrass: @ 8097168 @ void GroundEffect_JumpOnShallowWater(struct npc_state *fieldObject, struct obj *object) GroundEffect_JumpOnShallowWater: @ 8097190 push {r4,lr} - ldr r3, =gUnknown_02038C08 + ldr r3, =gFieldEffectSpawnParams movs r4, 0x10 ldrsh r2, [r0, r4] str r2, [r3] @@ -1611,7 +1611,7 @@ GroundEffect_JumpOnShallowWater: @ 8097190 @ void GroundEffect_JumpOnWater(struct npc_state *fieldObject, struct obj *object) GroundEffect_JumpOnWater: @ 80971C0 push {r4,lr} - ldr r3, =gUnknown_02038C08 + ldr r3, =gFieldEffectSpawnParams movs r4, 0x10 ldrsh r2, [r0, r4] str r2, [r3] @@ -1637,7 +1637,7 @@ GroundEffect_JumpOnWater: @ 80971C0 @ void GroundEffect_JumpLandingDust(struct npc_state *fieldObject, struct obj *object) GroundEffect_JumpLandingDust: @ 80971F0 push {r4,lr} - ldr r3, =gUnknown_02038C08 + ldr r3, =gFieldEffectSpawnParams movs r4, 0x10 ldrsh r2, [r0, r4] str r2, [r3] @@ -1685,7 +1685,7 @@ GroundEffect_HotSprings: @ 8097230 @ void GroundEffect_Seaweed(struct npc_state *fieldObject, struct obj *object) GroundEffect_Seaweed: @ 8097240 push {lr} - ldr r2, =gUnknown_02038C08 + ldr r2, =gFieldEffectSpawnParams movs r3, 0x10 ldrsh r1, [r0, r3] str r1, [r2] diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index f67a70ef0..6d2de17b9 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,304 +5,6 @@ .text - thumb_func_start FieldObjectCB_BerryTree -FieldObjectCB_BerryTree: @ 808FE2C - push {r4,r5,lr} - adds r4, r0, 0 - movs r0, 0x2E - ldrsh r1, [r4, r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - ldr r1, =gMapObjects - adds r5, r0, r1 - ldrh r1, [r4, 0x3C] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _0808FE58 - adds r0, r5, 0 - adds r1, r4, 0 - bl get_berry_tree_graphics - ldrh r1, [r4, 0x3C] - movs r0, 0x1 - orrs r0, r1 - strh r0, [r4, 0x3C] -_0808FE58: - ldr r2, =FieldObjectCB2_BerryTree - adds r0, r5, 0 - adds r1, r4, 0 - bl FieldObjectStep - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_BerryTree - - thumb_func_start FieldObjectCB2_BerryTree -FieldObjectCB2_BerryTree: @ 808FE70 - push {r4,lr} - ldr r3, =gUnknown_0850D7A0 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end FieldObjectCB2_BerryTree - - thumb_func_start do_berry_tree_growth_sparkle_1 -@ bool8 do_berry_tree_growth_sparkle_1(struct npc_state *fieldObject, struct obj *object) -do_berry_tree_growth_sparkle_1: @ 808FE90 - push {r4-r7,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl npc_reset - ldrb r0, [r4, 0x1] - movs r1, 0x20 - orrs r0, r1 - strb r0, [r4, 0x1] - adds r6, r5, 0 - adds r6, 0x3E - ldrb r0, [r6] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r6] - ldrb r0, [r4, 0x1D] - bl GetStageByBerryTreeId - lsls r0, 24 - lsrs r7, r0, 24 - cmp r7, 0 - bne _0808FF00 - ldrh r1, [r5, 0x3C] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - bne _0808FEF6 - subs r6, 0x14 - ldrb r0, [r6] - cmp r0, 0x4 - bne _0808FEF6 - ldr r1, =gUnknown_02038C08 - movs r2, 0x10 - ldrsh r0, [r4, r2] - str r0, [r1] - movs r2, 0x12 - ldrsh r0, [r4, r2] - str r0, [r1, 0x4] - adds r0, r5, 0 - adds r0, 0x43 - ldrb r0, [r0] - subs r0, 0x1 - str r0, [r1, 0x8] - ldrb r0, [r5, 0x5] - lsls r0, 28 - lsrs r0, 30 - str r0, [r1, 0xC] - movs r0, 0x17 - bl FieldEffectStart - strb r7, [r6] -_0808FEF6: - movs r0, 0 - b _0808FF42 - .pool -_0808FF00: - ldrb r1, [r4, 0x1] - movs r0, 0x21 - negs r0, r0 - ands r0, r1 - strb r0, [r4, 0x1] - ldrb r1, [r6] - movs r0, 0x5 - negs r0, r0 - ands r0, r1 - strb r0, [r6] - subs r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 - adds r0, r5, 0 - adds r0, 0x2A - ldrb r0, [r0] - cmp r0, r7 - bne _0808FF3C - adds r0, r4, 0 - adds r1, r5, 0 - bl get_berry_tree_graphics - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x39 - bl FieldObjectSetRegularAnim - movs r0, 0x1 - strh r0, [r5, 0x30] - b _0808FF42 -_0808FF3C: - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 -_0808FF42: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end do_berry_tree_growth_sparkle_1 - - thumb_func_start sub_808FF48 -@ bool8 sub_808FF48(struct npc_state *fieldObject, struct obj *object) -sub_808FF48: @ 808FF48 - push {r4,lr} - adds r4, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - bne _0808FF5A - movs r0, 0 - b _0808FF60 -_0808FF5A: - movs r0, 0 - strh r0, [r4, 0x30] - movs r0, 0x1 -_0808FF60: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_808FF48 - - thumb_func_start do_berry_tree_growth_sparkle_2 -@ bool8 do_berry_tree_growth_sparkle_2(struct npc_state *fieldObject, struct obj *object) -do_berry_tree_growth_sparkle_2: @ 808FF68 - push {r4,lr} - ldrb r2, [r0] - movs r3, 0x2 - orrs r2, r3 - strb r2, [r0] - movs r3, 0 - movs r2, 0x3 - strh r2, [r1, 0x30] - strh r3, [r1, 0x32] - ldrh r3, [r1, 0x3C] - movs r2, 0x2 - orrs r2, r3 - strh r2, [r1, 0x3C] - ldr r3, =gUnknown_02038C08 - movs r4, 0x10 - ldrsh r2, [r0, r4] - str r2, [r3] - movs r2, 0x12 - ldrsh r0, [r0, r2] - str r0, [r3, 0x4] - adds r0, r1, 0 - adds r0, 0x43 - ldrb r0, [r0] - subs r0, 0x1 - str r0, [r3, 0x8] - ldrb r0, [r1, 0x5] - lsls r0, 28 - lsrs r0, 30 - str r0, [r3, 0xC] - movs r0, 0x17 - bl FieldEffectStart - movs r0, 0x1 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end do_berry_tree_growth_sparkle_2 - - thumb_func_start sub_808FFB4 -@ bool8 sub_808FFB4(struct npc_state *fieldObject, struct obj *object) -sub_808FFB4: @ 808FFB4 - push {r4,lr} - adds r3, r0, 0 - adds r4, r1, 0 - ldrh r1, [r4, 0x32] - adds r1, 0x1 - strh r1, [r4, 0x32] - movs r0, 0x2 - ands r1, r0 - lsls r1, 16 - lsrs r1, 17 - lsls r1, 5 - ldrb r2, [r3, 0x1] - subs r0, 0x23 - ands r0, r2 - orrs r0, r1 - strb r0, [r3, 0x1] - adds r2, r4, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2] - movs r1, 0x32 - ldrsh r0, [r4, r1] - cmp r0, 0x40 - bgt _0808FFEC - movs r0, 0 - b _0808FFFE -_0808FFEC: - adds r0, r3, 0 - adds r1, r4, 0 - bl get_berry_tree_graphics - movs r0, 0x4 - strh r0, [r4, 0x30] - movs r0, 0 - strh r0, [r4, 0x32] - movs r0, 0x1 -_0808FFFE: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_808FFB4 - - thumb_func_start sub_8090004 -@ bool8 sub_8090004(struct npc_state *fieldObject, struct obj *object) -sub_8090004: @ 8090004 - push {r4,lr} - adds r4, r1, 0 - ldrh r2, [r4, 0x32] - adds r2, 0x1 - strh r2, [r4, 0x32] - movs r1, 0x2 - ands r2, r1 - lsls r2, 16 - lsrs r2, 17 - lsls r2, 5 - ldrb r3, [r0, 0x1] - subs r1, 0x23 - ands r1, r3 - orrs r1, r2 - strb r1, [r0, 0x1] - adds r2, r4, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2] - movs r1, 0x32 - ldrsh r0, [r4, r1] - cmp r0, 0x40 - bgt _0809003A - movs r0, 0 - b _08090048 -_0809003A: - movs r0, 0 - strh r0, [r4, 0x30] - ldrh r1, [r4, 0x3C] - subs r0, 0x3 - ands r0, r1 - strh r0, [r4, 0x3C] - movs r0, 0x1 -_08090048: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8090004 - thumb_func_start FieldObjectCB_RandomlyLookNorthOrSouth FieldObjectCB_RandomlyLookNorthOrSouth: @ 8090050 push {lr} @@ -5217,7 +4919,7 @@ FieldObjectCB_TreeDisguise: @ 809253C cmp r0, 0 bne _08092584 _08092564: - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams adds r2, r1, 0x4 adds r3, r1, 0 adds r3, 0x8 @@ -5280,7 +4982,7 @@ FieldObjectCB_MountainDisguise: @ 80925B8 cmp r0, 0 bne _08092600 _080925E0: - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams adds r2, r1, 0x4 adds r3, r1, 0 adds r3, 0x8 @@ -12012,7 +11714,7 @@ sub_80954CC: @ 80954CC do_exclamation_mark_bubble_1: @ 80954DC push {r4,lr} adds r4, r1, 0 - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams adds r2, r1, 0x4 adds r3, r1, 0 adds r3, 0x8 @@ -12031,7 +11733,7 @@ do_exclamation_mark_bubble_1: @ 80954DC do_exclamation_mark_bubble_2: @ 8095500 push {r4,lr} adds r4, r1, 0 - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams adds r2, r1, 0x4 adds r3, r1, 0 adds r3, 0x8 @@ -12050,7 +11752,7 @@ do_exclamation_mark_bubble_2: @ 8095500 do_heart_bubble: @ 8095524 push {r4,lr} adds r4, r1, 0 - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams adds r2, r1, 0x4 adds r3, r1, 0 adds r3, 0x8 diff --git a/asm/field_player_avatar.s b/asm/field_player_avatar.s index f21fdacae..3cf5a70da 100644 --- a/asm/field_player_avatar.s +++ b/asm/field_player_avatar.s @@ -1522,7 +1522,7 @@ PlayerAvatarTransition_Surfing: @ 808B4D8 bl FieldObjectTurn movs r0, 0x8 bl SetPlayerAvatarStateMask - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams movs r2, 0x10 ldrsh r0, [r4, r2] str r0, [r1] @@ -3517,7 +3517,7 @@ _0808C3F0: lsrs r1, 24 adds r0, r4, 0 bl FieldObjectSetSpecialAnim - ldr r2, =gUnknown_02038C08 + ldr r2, =gFieldEffectSpawnParams movs r1, 0x10 ldrsh r0, [r4, r1] str r0, [r2] diff --git a/asm/fldeff_80F9BCC.s b/asm/fldeff_80F9BCC.s index e332a8841..784da5b1f 100644 --- a/asm/fldeff_80F9BCC.s +++ b/asm/fldeff_80F9BCC.s @@ -486,7 +486,7 @@ sub_80F9F78: @ 80F9F78 ands r0, r1 cmp r0, 0 beq _080F9FC0 - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams ldr r0, [r1, 0x4] cmp r0, 0x2 beq _080F9FAE @@ -517,7 +517,7 @@ _080F9FB6: movs r0, 0x18 b _080F9FFC _080F9FC0: - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams ldr r0, [r1, 0x4] cmp r0, 0x2 beq _080F9FEA @@ -643,7 +643,7 @@ _080FA0C4: sub_80FA0DC: @ 80FA0DC push {lr} bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] @@ -701,7 +701,7 @@ sub_80FA13C: @ 80FA13C ldrh r1, [r2, 0x2] lsls r1, 23 lsrs r1, 23 - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams ldr r3, [r4, 0x14] adds r1, r3 lsls r1, 16 @@ -778,7 +778,7 @@ sub_80FA1D8: @ 80FA1D8 sub_80FA1E8: @ 80FA1E8 push {lr} bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] @@ -836,13 +836,13 @@ sub_80FA248: @ 80FA248 ands r2, r0 cmp r2, 0x96 bne _080FA26A - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams movs r0, 0 str r0, [r1, 0x1C] _080FA26A: cmp r2, 0x9C bne _080FA274 - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams movs r0, 0x2 str r0, [r1, 0x1C] _080FA274: @@ -858,7 +858,7 @@ _080FA274: ldrh r1, [r2, 0x2] lsls r1, 23 lsrs r1, 23 - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams ldr r3, [r4, 0x14] adds r1, r3 lsls r1, 16 @@ -891,7 +891,7 @@ sub_80FA2D8: @ 80FA2D8 adds r4, r0, 0 movs r0, 0x9B bl PlaySE - ldr r0, =gUnknown_02038C08 + ldr r0, =gFieldEffectSpawnParams ldr r1, [r0, 0x1C] adds r2, r4, 0 adds r2, 0x2A @@ -917,7 +917,7 @@ sub_80FA304: @ 80FA304 asrs r0, 16 cmp r0, 0x27 ble _080FA32E - ldr r0, =gUnknown_02038C08 + ldr r0, =gFieldEffectSpawnParams ldr r0, [r0, 0x1C] cmp r0, 0 beq _080FA322 @@ -951,7 +951,7 @@ sub_80FA33C: @ 80FA33C sub_80FA34C: @ 80FA34C push {lr} bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] @@ -1009,7 +1009,7 @@ sub_80FA3AC: @ 80FA3AC ldrh r1, [r2, 0x2] lsls r1, 23 lsrs r1, 23 - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams ldr r3, [r4, 0x14] adds r1, r3 lsls r1, 16 @@ -1807,7 +1807,7 @@ sub_80FAA7C: @ 80FAA7C mov r0, sp adds r1, r4, 0 bl GetXYCoordsOneStepInFrontOfPlayer - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams mov r0, sp movs r2, 0 ldrsh r0, [r0, r2] @@ -1930,7 +1930,7 @@ door_restore_tilemap: @ 80FABA4 adds r5, r0, 0 movs r0, 0x83 bl PlaySE - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams ldr r0, [r4, 0x14] ldr r1, [r4, 0x18] subs r1, 0x1 @@ -1953,7 +1953,7 @@ _080FABDC: lsls r2, 2 bl MapGridSetMetatileIdAt _080FABEA: - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams ldr r0, [r4, 0x14] ldr r1, [r4, 0x18] ldr r2, =0x0000020a @@ -1988,7 +1988,7 @@ sub_80FAC24: @ 80FAC24 strh r0, [r5, 0x2E] b _080FAC54 _080FAC38: - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams ldr r0, [r4, 0x14] ldr r1, [r4, 0x18] ldr r2, =0x00000e8c diff --git a/asm/fldeff_emotion.s b/asm/fldeff_emotion.s index dce540074..37096a438 100644 --- a/asm/fldeff_emotion.s +++ b/asm/fldeff_emotion.s @@ -115,7 +115,7 @@ sub_80B46D8: @ 80B46D8 orrs r3, r4 mov r4, r12 strb r3, [r4] - ldr r4, =gUnknown_02038C08 + ldr r4, =gFieldEffectSpawnParams ldr r3, [r4] strh r3, [r0, 0x2E] ldr r3, [r4, 0x4] diff --git a/asm/fldeff_strength.s b/asm/fldeff_strength.s index 3dc64467e..98764625e 100644 --- a/asm/fldeff_strength.s +++ b/asm/fldeff_strength.s @@ -40,7 +40,7 @@ _08145DF2: sub_8145E0C: @ 8145E0C push {lr} bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] @@ -66,7 +66,7 @@ sub_8145E2C: @ 8145E2C lsrs r0, r2, 16 strh r0, [r1, 0x18] strh r2, [r1, 0x1A] - ldr r0, =gUnknown_02038C08 + ldr r0, =gFieldEffectSpawnParams ldr r1, [r0] movs r0, 0x64 muls r0, r1 diff --git a/asm/fldeff_sweetscent.s b/asm/fldeff_sweetscent.s index a297dd41d..5c83b455d 100644 --- a/asm/fldeff_sweetscent.s +++ b/asm/fldeff_sweetscent.s @@ -24,7 +24,7 @@ hm2_sweet_scent: @ 8159F10 movs r0, 0x33 bl FieldEffectStart bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] @@ -217,4 +217,4 @@ _0815A0BE: thumb_func_end sub_815A090 .align 2, 0 @ Don't pad with nop. - \ No newline at end of file + diff --git a/asm/fldeff_teleport.s b/asm/fldeff_teleport.s index f3dc3ec9b..e4f4bce42 100644 --- a/asm/fldeff_teleport.s +++ b/asm/fldeff_teleport.s @@ -39,7 +39,7 @@ hm_teleport_run_dp02scr: @ 817C8FC movs r0, 0x3F bl FieldEffectStart bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] diff --git a/asm/map_obj_8097404.s b/asm/map_obj_8097404.s index 1bbf3eff2..4ed8e3bcd 100644 --- a/asm/map_obj_8097404.s +++ b/asm/map_obj_8097404.s @@ -1396,7 +1396,7 @@ oe_exec_and_other_stuff: @ 8097DD0 adds r0, r1, 0 lsls r4, 24 lsrs r4, 24 - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams adds r2, r1, 0x4 adds r3, r1, 0 adds r3, 0x8 @@ -1434,7 +1434,7 @@ DoRippleFieldEffect: @ 8097E14 adds r4, r1, 0 ldrb r0, [r0, 0x5] bl GetFieldObjectGraphicsInfo - ldr r2, =gUnknown_02038C08 + ldr r2, =gFieldEffectSpawnParams movs r3, 0x20 ldrsh r1, [r4, r3] str r1, [r2] diff --git a/asm/rom6.s b/asm/rom6.s index 18de40366..31d385fa9 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -167,7 +167,7 @@ sub_8135578: @ 8135578 cmp r4, 0 bne _081355FC bl player_get_direction_lower_nybble - ldr r6, =gUnknown_02038C08 + ldr r6, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r6, 0x4] @@ -303,7 +303,7 @@ _081356AC: sub_81356C4: @ 81356C4 push {lr} bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] @@ -380,7 +380,7 @@ hm2_dig: @ 8135760 movs r0, 0x26 bl FieldEffectStart bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] @@ -3381,7 +3381,7 @@ hm2_flash: @ 8137178 lsls r4, 24 lsrs r4, 24 bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] @@ -11039,7 +11039,7 @@ _0813B0F8: ldr r0, =sub_813B160 movs r1, 0x8 bl CreateTask - ldr r3, =gUnknown_02038C08 + ldr r3, =gFieldEffectSpawnParams movs r0, 0x1 str r0, [r3] movs r0, 0x3A diff --git a/asm/rom_80C6FA0.s b/asm/rom_80C6FA0.s index 4c3ada218..d6d3bb375 100644 --- a/asm/rom_80C6FA0.s +++ b/asm/rom_80C6FA0.s @@ -24444,7 +24444,7 @@ hm2_ruin_valley: @ 80D3A50 movs r0, 0x1 bl FieldEffectStart bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] @@ -24480,7 +24480,7 @@ sub_80D3A6C: @ 80D3A6C sub_80D3A9C: @ 80D3A9C push {lr} bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] diff --git a/asm/rom_818E9AC.s b/asm/rom_818E9AC.s index 8363e1308..0ee8404a6 100644 --- a/asm/rom_818E9AC.s +++ b/asm/rom_818E9AC.s @@ -74313,7 +74313,7 @@ task_launch_hm_phase_2: @ 81B5750 cmp r0, 0x1 bne _081B577C bl brm_get_selected_species - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 16 lsrs r0, 16 str r0, [r1] @@ -74397,7 +74397,7 @@ _081B57FE: hm_surf_run_dp02scr: @ 81B5804 push {lr} bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] @@ -74501,7 +74501,7 @@ sub_81B58A8: @ 81B58A8 hm2_waterfall: @ 81B58D4 push {lr} bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] @@ -74561,7 +74561,7 @@ _081B594E: sub_81B5958: @ 81B5958 push {lr} bl brm_get_pokemon_selection - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1] @@ -74576,7 +74576,7 @@ sub_81B5958: @ 81B5958 sub_81B5974: @ 81B5974 push {lr} bl sub_809D1E8 - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r0, 24 lsrs r0, 24 str r0, [r1, 0x4] diff --git a/asm/scrcmd.s b/asm/scrcmd.s index ccfa0074a..6d531821c 100644 --- a/asm/scrcmd.s +++ b/asm/scrcmd.s @@ -4874,7 +4874,7 @@ s9D_set_HM_animation_data: @ 809B7F4 lsls r0, 16 lsrs r0, 16 bl VarGet - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams lsls r4, 2 adds r4, r1 lsls r0, 16 diff --git a/asm/trainer_see.s b/asm/trainer_see.s index ac2528cd8..d57ad1815 100644 --- a/asm/trainer_see.s +++ b/asm/trainer_see.s @@ -734,7 +734,7 @@ sub_80B417C: @ 80B417C push {r4,r5,lr} adds r5, r1, 0 adds r4, r2, 0 - ldr r1, =gUnknown_02038C08 + ldr r1, =gFieldEffectSpawnParams adds r2, r1, 0x4 adds r3, r1, 0 adds r3, 0x8 @@ -1050,7 +1050,7 @@ sub_80B43E0: @ 80B43E0 lsls r0, 24 cmp r0, 0 beq _080B4426 - ldr r2, =gUnknown_02038C08 + ldr r2, =gFieldEffectSpawnParams movs r1, 0x10 ldrsh r0, [r4, r1] str r0, [r2] diff --git a/include/field_effect.h b/include/field_effect.h new file mode 100644 index 000000000..8cf866725 --- /dev/null +++ b/include/field_effect.h @@ -0,0 +1,80 @@ +// +// Created by Scott Norton on 9/15/17. +// + +#ifndef POKEEMERALD_FIELD_EFFECTS_H +#define POKEEMERALD_FIELD_EFFECTS_H + +enum FieldEffectScriptIdx +{ + FLDEFF_EXCLAMATION_MARK_ICON_1, + FLDEFF_USE_CUT_ON_GRASS, + FLDEFF_USE_CUT_ON_TREE, + FLDEFF_SHADOW, + FLDEFF_TALL_GRASS, + FLDEFF_RIPPLE, + FLDEFF_FIELD_MOVE_SHOW_MON, + FLDEFF_ASH, + FLDEFF_SURF_BLOB, + FLDEFF_USE_SURF, + FLDEFF_DUST, + FLDEFF_USE_SECRET_POWER_CAVE, + FLDEFF_JUMP_TALL_GRASS, + FLDEFF_SAND_FOOTPRINTS, + FLDEFF_JUMP_BIG_SPLASH, + FLDEFF_SPLASH, + FLDEFF_JUMP_SMALL_SPLASH, + FLDEFF_LONG_GRASS, + FLDEFF_JUMP_LONG_GRASS, + FLDEFF_UNKNOWN_19, + FLDEFF_UNKNOWN_20, + FLDEFF_UNKNOWN_21, + FLDEFF_UNKNOWN_22, + FLDEFF_BERRY_TREE_GROWTH_SPARKLE, + FLDEFF_DEEP_SAND_FOOTPRINTS, + FLDEFF_POKECENTER_HEAL, + FLDEFF_USE_SECRET_POWER_TREE, + FLDEFF_USE_SECRET_POWER_SHRUB, + FLDEFF_TREE_DISGUISE, + FLDEFF_MOUNTAIN_DISGUISE, + FLDEFF_NPCFLY_OUT, + FLDEFF_USE_FLY, + FLDEFF_FLY_IN, + FLDEFF_EXCLAMATION_MARK_ICON_2, + FLDEFF_FEET_IN_FLOWING_WATER, + FLDEFF_BIKE_TIRE_TRACKS, + FLDEFF_SAND_DISGUISE, + FLDEFF_USE_ROCK_SMASH, + FLDEFF_USE_DIG, + FLDEFF_SAND_PILE, + FLDEFF_USE_STRENGTH, + FLDEFF_SHORT_GRASS, + FLDEFF_HOT_SPRINGS_WATER, + FLDEFF_USE_WATERFALL, + FLDEFF_USE_DIVE, + FLDEFF_POKEBALL, + FLDEFF_HEART_ICON, + FLDEFF_NOP_47, + FLDEFF_NOP_48, + FLDEFF_POP_OUT_OF_ASH, + FLDEFF_LAVARIDGE_GYM_WARP, + FLDEFF_SWEET_SCENT, + FLDEFF_SAND_PILLAR, + FLDEFF_BUBBLES, + FLDEFF_SPARKLE, + FLDEFF_SECRET_POWER_CAVE, + FLDEFF_SECRET_POWER_TREE, + FLDEFF_SECRET_POWER_SHRUB, + FLDEFF_CUT_GRASS, + FLDEFF_FIELD_MOVE_SHOW_MON_INIT, + FLDEFF_USE_FLY_ANCIENT_TOMB, + FLDEFF_PCTURN_ON, + FLDEFF_HALL_OF_FAME_RECORD, + FLDEFF_USE_TELEPORT +}; + +extern u32 gFieldEffectSpawnParams[8]; + +u8 FieldEffectStart(u8); + +#endif //POKEEMERALD_FIELD_EFFECTS_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 04b207d96..16a9e5851 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -16,6 +16,7 @@ #include "field_ground_effect.h" #include "map_obj_8097404.h" #include "mauville_old_man.h" +#include "field_effect.h" #include "field_effect_helpers.h" #include "field_map_obj.h" @@ -1884,7 +1885,7 @@ u8 GetEastWestRunningPastFacingDirection(s16 dx, s16 dy, s16 absdx, s16 absdy) u8 GetNorthEastRunningPastFacingDirection(s16 dx, s16 dy, s16 absdx, s16 absdy) { u8 direction; - + direction = GetRegularRunningPastFacingDirection(dx, dy, absdx, absdy); if (direction == DIR_SOUTH) { @@ -2272,3 +2273,110 @@ bool8 sub_808FE1C(struct MapObject *mapObject, struct Sprite *sprite) mapObject->mapobj_bit_1 = FALSE; return FALSE; } + +static bool8 FieldObjectCB2_BerryTree(struct MapObject *mapObject, struct Sprite *sprite); +extern bool8 (*const gUnknown_0850D7A0[])(struct MapObject *mapObject, struct Sprite *sprite); +void FieldObjectCB_BerryTree(struct Sprite *sprite) +{ + struct MapObject *mapObject; + + mapObject = &gMapObjects[sprite->data0]; + if (!(sprite->data7 & 0x0001)) + { + get_berry_tree_graphics(mapObject, sprite); + sprite->data7 |= 0x0001; + } + FieldObjectStep(mapObject, sprite, FieldObjectCB2_BerryTree); +} +static bool8 FieldObjectCB2_BerryTree(struct MapObject *mapObject, struct Sprite *sprite) +{ + return gUnknown_0850D7A0[sprite->data1](mapObject, sprite); +} + +bool8 do_berry_tree_growth_sparkle_1 (struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 berryStage; + + npc_reset(mapObject, sprite); + mapObject->mapobj_bit_13 = TRUE; + sprite->invisible = TRUE; + berryStage = GetStageByBerryTreeId(mapObject->trainerRange_berryTreeId); + if (berryStage == 0) + { + if (!(sprite->data7 & 0x0004) && sprite->animNum == 4) + { + gFieldEffectSpawnParams[0] = mapObject->coords2.x; + gFieldEffectSpawnParams[1] = mapObject->coords2.y; + gFieldEffectSpawnParams[2] = sprite->subpriority - 1; + gFieldEffectSpawnParams[3] = sprite->oam.priority; + FieldEffectStart(FLDEFF_BERRY_TREE_GROWTH_SPARKLE); + sprite->animNum = berryStage; + } + return FALSE; + } + mapObject->mapobj_bit_13 = FALSE; + sprite->invisible = FALSE; + berryStage --; + if (sprite->animNum != berryStage) + { + sprite->data1 = 2; + return TRUE; + } + get_berry_tree_graphics(mapObject, sprite); + FieldObjectSetRegularAnim(mapObject, sprite, 0x39); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_808FF48 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + sprite->data1 = 0; + return TRUE; + } + return FALSE; +} + +bool8 do_berry_tree_growth_sparkle_2 (struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 3; + sprite->data2 = 0; + sprite->data7 |= 0x0002; + gFieldEffectSpawnParams[0] = mapObject->coords2.x; + gFieldEffectSpawnParams[1] = mapObject->coords2.y; + gFieldEffectSpawnParams[2] = sprite->subpriority - 1; + gFieldEffectSpawnParams[3] = sprite->oam.priority; + FieldEffectStart(FLDEFF_BERRY_TREE_GROWTH_SPARKLE); + return TRUE; +} + +bool8 sub_808FFB4 (struct MapObject *mapObject, struct Sprite *sprite) +{ + sprite->data2 ++; + mapObject->mapobj_bit_13 = (sprite->data2 & 0x02) >> 1; + sprite->animPaused = TRUE; + if (sprite->data2 > 64) + { + get_berry_tree_graphics(mapObject, sprite); + sprite->data1 = 4; + sprite->data2 = 0; + return TRUE; + } + return FALSE; +} + +bool8 sub_8090004 (struct MapObject *mapObject, struct Sprite *sprite) +{ + sprite->data2 ++; + mapObject->mapobj_bit_13 = (sprite->data2 & 0x02) >> 1; + sprite->animPaused = TRUE; + if (sprite->data2 > 64) + { + sprite->data1 = 0; + sprite->data7 &= ~0x0002; + return TRUE; + } + return FALSE; +} diff --git a/sym_ewram.txt b/sym_ewram.txt index b9d1f6650..582518bf3 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -902,7 +902,7 @@ gUnknown_02038C00: @ 2038C00 gUnknown_02038C04: @ 2038C04 .space 0x4 -gUnknown_02038C08: @ 2038C08 +gFieldEffectSpawnParams: @ 2038C08 .space 0x20 gUnknown_02038C28: @ 2038C28 From 7440bba1b19eb8fbd4fa91bc0ad2e722fa1e3c4c Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 15 Sep 2017 14:36:54 -0400 Subject: [PATCH 097/342] RandomlyLookNorthOrSouth --- asm/field_map_obj.s | 168 -------------------------------------------- src/field_map_obj.c | 53 ++++++++++++++ 2 files changed, 53 insertions(+), 168 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 6d2de17b9..623146ed3 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,174 +5,6 @@ .text - thumb_func_start FieldObjectCB_RandomlyLookNorthOrSouth -FieldObjectCB_RandomlyLookNorthOrSouth: @ 8090050 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =FieldObjectCB2_RandomlyLookNorthOrSouth - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_RandomlyLookNorthOrSouth - - thumb_func_start FieldObjectCB2_RandomlyLookNorthOrSouth -FieldObjectCB2_RandomlyLookNorthOrSouth: @ 8090074 - push {r4,lr} - ldr r3, =gUnknown_0850D7B4 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end FieldObjectCB2_RandomlyLookNorthOrSouth - - thumb_func_start sub_8090094 -sub_8090094: @ 8090094 - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8090094 - - thumb_func_start sub_80900A8 -sub_80900A8: @ 80900A8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80900A8 - - thumb_func_start sub_80900D4 -sub_80900D4: @ 80900D4 - push {r4-r7,lr} - adds r6, r0, 0 - adds r7, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0809010A - ldr r4, =gUnknown_0850D6DC - bl Random - movs r5, 0x3 - adds r1, r5, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - movs r0, 0 - ldrsh r1, [r1, r0] - adds r0, r7, 0 - bl SetFieldObjectStepTimer - ldrb r1, [r6] - movs r0, 0x3 - negs r0, r0 - ands r0, r1 - strb r0, [r6] - strh r5, [r7, 0x30] -_0809010A: - movs r0, 0 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80900D4 - - thumb_func_start sub_8090118 -sub_8090118: @ 8090118 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - bne _08090136 - adds r0, r4, 0 - bl FieldObjectIsTrainerAndCloseToPlayer - lsls r0, 24 - cmp r0, 0 - beq _0809013E -_08090136: - movs r0, 0x4 - strh r0, [r5, 0x30] - movs r0, 0x1 - b _08090140 -_0809013E: - movs r0, 0 -_08090140: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090118 - - thumb_func_start sub_8090148 -sub_8090148: @ 8090148 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D770 - mov r0, sp - movs r2, 0x2 - bl memcpy - adds r0, r4, 0 - movs r1, 0x1 - bl GetRunningPastFacingDirection - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _08090178 - bl Random - movs r1, 0x1 - ands r1, r0 - mov r2, sp - adds r0, r2, r1 - ldrb r1, [r0] -_08090178: - adds r0, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x1 - strh r0, [r5, 0x30] - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090148 - thumb_func_start FieldObjectCB_RandomlyLookEastOrWest FieldObjectCB_RandomlyLookEastOrWest: @ 8090190 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 16a9e5851..88b4ab9b7 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -2380,3 +2380,56 @@ bool8 sub_8090004 (struct MapObject *mapObject, struct Sprite *sprite) } return FALSE; } + +field_object_step(RandomlyLookNorthOrSouth, gUnknown_0850D7B4) + +bool8 sub_8090094 (struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_80900A8 (struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_80900D4 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + SetFieldObjectStepTimer(sprite, gUnknown_0850D6DC[Random() & 0x03]); + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 3; + } + return FALSE; +} + +bool8 sub_8090118 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (RunFieldObjectStepTimer(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + { + sprite->data1 = 4; + return TRUE; + } + return FALSE; +} + +bool8 sub_8090148 (struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[2]; + u8 direction; + + memcpy(directions, gUnknown_0850D770, sizeof gUnknown_0850D770); + direction = GetRunningPastFacingDirection(mapObject, 1); + if (direction == 0) + { + direction = directions[Random() & 0x01]; + } + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 1; + return TRUE; +} From bf101743c2d965c97ade9925ff6db17a35de31fc Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 15 Sep 2017 14:42:54 -0400 Subject: [PATCH 098/342] RandomlyLookEastOrWest --- asm/field_map_obj.s | 168 -------------------------------------------- src/field_map_obj.c | 53 ++++++++++++++ 2 files changed, 53 insertions(+), 168 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 623146ed3..12b1cf7b4 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,174 +5,6 @@ .text - thumb_func_start FieldObjectCB_RandomlyLookEastOrWest -FieldObjectCB_RandomlyLookEastOrWest: @ 8090190 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =FieldObjectCB2_RandomlyLookEastOrWest - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_RandomlyLookEastOrWest - - thumb_func_start FieldObjectCB2_RandomlyLookEastOrWest -FieldObjectCB2_RandomlyLookEastOrWest: @ 80901B4 - push {r4,lr} - ldr r3, =gUnknown_0850D7C8 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end FieldObjectCB2_RandomlyLookEastOrWest - - thumb_func_start sub_80901D4 -sub_80901D4: @ 80901D4 - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80901D4 - - thumb_func_start sub_80901E8 -sub_80901E8: @ 80901E8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80901E8 - - thumb_func_start sub_8090214 -sub_8090214: @ 8090214 - push {r4-r7,lr} - adds r6, r0, 0 - adds r7, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0809024A - ldr r4, =gUnknown_0850D6DC - bl Random - movs r5, 0x3 - adds r1, r5, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - movs r0, 0 - ldrsh r1, [r1, r0] - adds r0, r7, 0 - bl SetFieldObjectStepTimer - ldrb r1, [r6] - movs r0, 0x3 - negs r0, r0 - ands r0, r1 - strb r0, [r6] - strh r5, [r7, 0x30] -_0809024A: - movs r0, 0 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090214 - - thumb_func_start sub_8090258 -sub_8090258: @ 8090258 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - bne _08090276 - adds r0, r4, 0 - bl FieldObjectIsTrainerAndCloseToPlayer - lsls r0, 24 - cmp r0, 0 - beq _0809027E -_08090276: - movs r0, 0x4 - strh r0, [r5, 0x30] - movs r0, 0x1 - b _08090280 -_0809027E: - movs r0, 0 -_08090280: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090258 - - thumb_func_start sub_8090288 -sub_8090288: @ 8090288 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D790 - mov r0, sp - movs r2, 0x2 - bl memcpy - adds r0, r4, 0 - movs r1, 0x2 - bl GetRunningPastFacingDirection - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _080902B8 - bl Random - movs r1, 0x1 - ands r1, r0 - mov r2, sp - adds r0, r2, r1 - ldrb r1, [r0] -_080902B8: - adds r0, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x1 - strh r0, [r5, 0x30] - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090288 - thumb_func_start FieldObjectCB_RandomlyLookNorthOrWest FieldObjectCB_RandomlyLookNorthOrWest: @ 80902D0 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 88b4ab9b7..7c99c8a97 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -2433,3 +2433,56 @@ bool8 sub_8090148 (struct MapObject *mapObject, struct Sprite *sprite) sprite->data1 = 1; return TRUE; } + +field_object_step(RandomlyLookEastOrWest, gUnknown_0850D7C8) + +bool8 sub_80901D4 (struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_80901E8 (struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_8090214 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + SetFieldObjectStepTimer(sprite, gUnknown_0850D6DC[Random() & 0x03]); + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 3; + } + return FALSE; +} + +bool8 sub_8090258 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (RunFieldObjectStepTimer(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + { + sprite->data1 = 4; + return TRUE; + } + return FALSE; +} + +bool8 sub_8090288 (struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[2]; + u8 direction; + + memcpy(directions, gUnknown_0850D790, sizeof gUnknown_0850D790); + direction = GetRunningPastFacingDirection(mapObject, 2); + if (direction == 0) + { + direction = directions[Random() & 0x01]; + } + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 1; + return TRUE; +} From 0571056955121d57f7ea691b40f807c8f80ef7b2 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 15 Sep 2017 15:26:51 -0400 Subject: [PATCH 099/342] RandomlyLookNorthOrWest --- asm/field_map_obj.s | 168 -------------------------------------------- include/data3.h | 2 + src/field_map_obj.c | 53 ++++++++++++++ 3 files changed, 55 insertions(+), 168 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 12b1cf7b4..75035836f 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,174 +5,6 @@ .text - thumb_func_start FieldObjectCB_RandomlyLookNorthOrWest -FieldObjectCB_RandomlyLookNorthOrWest: @ 80902D0 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =FieldObjectCB2_RandomlyLookNorthOrWest - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_RandomlyLookNorthOrWest - - thumb_func_start FieldObjectCB2_RandomlyLookNorthOrWest -FieldObjectCB2_RandomlyLookNorthOrWest: @ 80902F4 - push {r4,lr} - ldr r3, =gUnknown_0850D7DC - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end FieldObjectCB2_RandomlyLookNorthOrWest - - thumb_func_start sub_8090314 -sub_8090314: @ 8090314 - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8090314 - - thumb_func_start sub_8090328 -sub_8090328: @ 8090328 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090328 - - thumb_func_start sub_8090354 -sub_8090354: @ 8090354 - push {r4-r7,lr} - adds r6, r0, 0 - adds r7, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0809038A - ldr r4, =gUnknown_0850D6EC - bl Random - movs r5, 0x3 - adds r1, r5, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - movs r0, 0 - ldrsh r1, [r1, r0] - adds r0, r7, 0 - bl SetFieldObjectStepTimer - ldrb r1, [r6] - movs r0, 0x3 - negs r0, r0 - ands r0, r1 - strb r0, [r6] - strh r5, [r7, 0x30] -_0809038A: - movs r0, 0 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090354 - - thumb_func_start sub_8090398 -sub_8090398: @ 8090398 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - bne _080903B6 - adds r0, r4, 0 - bl FieldObjectIsTrainerAndCloseToPlayer - lsls r0, 24 - cmp r0, 0 - beq _080903BE -_080903B6: - movs r0, 0x4 - strh r0, [r5, 0x30] - movs r0, 0x1 - b _080903C0 -_080903BE: - movs r0, 0 -_080903C0: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090398 - - thumb_func_start sub_80903C8 -sub_80903C8: @ 80903C8 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D7F0 - mov r0, sp - movs r2, 0x2 - bl memcpy - adds r0, r4, 0 - movs r1, 0x3 - bl GetRunningPastFacingDirection - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _080903F8 - bl Random - movs r1, 0x1 - ands r1, r0 - mov r2, sp - adds r0, r2, r1 - ldrb r1, [r0] -_080903F8: - adds r0, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x1 - strh r0, [r5, 0x30] - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80903C8 - thumb_func_start FieldObjectCB_RandomlyLookNorthOrEast FieldObjectCB_RandomlyLookNorthOrEast: @ 8090410 push {lr} diff --git a/include/data3.h b/include/data3.h index 63be33381..9ab32e8ce 100755 --- a/include/data3.h +++ b/include/data3.h @@ -18,8 +18,10 @@ extern const struct PairedPalettes gUnknown_0850BD00[15]; extern const struct PairedPalettes gUnknown_0850BD78[15]; extern const u16 *const gUnknown_0850BE38[2]; extern const s16 gUnknown_0850D6DC[4]; // {0x20, 0x40, 0x60, 0x80} +extern const s16 gUnknown_0850D6EC[4]; extern const u8 gUnknown_0850D710[4]; // {DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST} extern const u8 gUnknown_0850D770[2]; // {DIR_SOUTH, DIR_NORTH} extern const u8 gUnknown_0850D790[2]; // {DIR_WEST, DIR_EAST} +extern const u8 gUnknown_0850D7F0[2]; // {DIR_NORTH, DIR_WEST} #endif //POKEEMERALD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 7c99c8a97..014001d93 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -2486,3 +2486,56 @@ bool8 sub_8090288 (struct MapObject *mapObject, struct Sprite *sprite) sprite->data1 = 1; return TRUE; } + +field_object_step(RandomlyLookNorthOrWest, gUnknown_0850D7DC) + +bool8 sub_8090314 (struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_8090328 (struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_8090354 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + SetFieldObjectStepTimer(sprite, gUnknown_0850D6EC[Random() & 0x03]); + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 3; + } + return FALSE; +} + +bool8 sub_8090398 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (RunFieldObjectStepTimer(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + { + sprite->data1 = 4; + return TRUE; + } + return FALSE; +} + +bool8 sub_80903C8 (struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[2]; + u8 direction; + + memcpy(directions, gUnknown_0850D7F0, sizeof gUnknown_0850D7F0); + direction = GetRunningPastFacingDirection(mapObject, 3); + if (direction == 0) + { + direction = directions[Random() & 0x01]; + } + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 1; + return TRUE; +} From 8c6367f997f4c53dfb1819d2cc42953fb7a82eb5 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 15 Sep 2017 15:53:07 -0400 Subject: [PATCH 100/342] RandomlyLookNorthOrEast --- asm/field_map_obj.s | 168 ---------------------------------------- include/data3.h | 1 + include/field_map_obj.h | 14 ++++ src/field_map_obj.c | 61 ++++++++++++++- 4 files changed, 72 insertions(+), 172 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 75035836f..1675489e1 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,174 +5,6 @@ .text - thumb_func_start FieldObjectCB_RandomlyLookNorthOrEast -FieldObjectCB_RandomlyLookNorthOrEast: @ 8090410 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8090434 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_RandomlyLookNorthOrEast - - thumb_func_start sub_8090434 -sub_8090434: @ 8090434 - push {r4,lr} - ldr r3, =gUnknown_0850D7F4 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090434 - - thumb_func_start sub_8090454 -sub_8090454: @ 8090454 - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8090454 - - thumb_func_start sub_8090468 -sub_8090468: @ 8090468 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090468 - - thumb_func_start sub_8090494 -sub_8090494: @ 8090494 - push {r4-r7,lr} - adds r6, r0, 0 - adds r7, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _080904CA - ldr r4, =gUnknown_0850D6EC - bl Random - movs r5, 0x3 - adds r1, r5, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - movs r0, 0 - ldrsh r1, [r1, r0] - adds r0, r7, 0 - bl SetFieldObjectStepTimer - ldrb r1, [r6] - movs r0, 0x3 - negs r0, r0 - ands r0, r1 - strb r0, [r6] - strh r5, [r7, 0x30] -_080904CA: - movs r0, 0 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090494 - - thumb_func_start sub_80904D8 -sub_80904D8: @ 80904D8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - bne _080904F6 - adds r0, r4, 0 - bl FieldObjectIsTrainerAndCloseToPlayer - lsls r0, 24 - cmp r0, 0 - beq _080904FE -_080904F6: - movs r0, 0x4 - strh r0, [r5, 0x30] - movs r0, 0x1 - b _08090500 -_080904FE: - movs r0, 0 -_08090500: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80904D8 - - thumb_func_start sub_8090508 -sub_8090508: @ 8090508 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D808 - mov r0, sp - movs r2, 0x2 - bl memcpy - adds r0, r4, 0 - movs r1, 0x4 - bl GetRunningPastFacingDirection - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _08090538 - bl Random - movs r1, 0x1 - ands r1, r0 - mov r2, sp - adds r0, r2, r1 - ldrb r1, [r0] -_08090538: - adds r0, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x1 - strh r0, [r5, 0x30] - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090508 - thumb_func_start FieldObjectCB_RandomlyLookSouthOrWest FieldObjectCB_RandomlyLookSouthOrWest: @ 8090550 push {lr} diff --git a/include/data3.h b/include/data3.h index 9ab32e8ce..debca9b73 100755 --- a/include/data3.h +++ b/include/data3.h @@ -23,5 +23,6 @@ extern const u8 gUnknown_0850D710[4]; // {DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EA extern const u8 gUnknown_0850D770[2]; // {DIR_SOUTH, DIR_NORTH} extern const u8 gUnknown_0850D790[2]; // {DIR_WEST, DIR_EAST} extern const u8 gUnknown_0850D7F0[2]; // {DIR_NORTH, DIR_WEST} +extern const u8 gUnknown_0850D808[2]; // {DIR_NORTH, DIR_EAST} #endif //POKEEMERALD_DATA3_H diff --git a/include/field_map_obj.h b/include/field_map_obj.h index f91b8f9e3..43446ea84 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -6,6 +6,20 @@ // Exported struct declarations +enum SpinnerRunnerFollowPatterns { + RUNFOLLOW_ANY, + RUNFOLLOW_NORTH_SOUTH, + RUNFOLLOW_EAST_WEST, + RUNFOLLOW_NORTH_WEST, + RUNFOLLOW_NORTH_EAST, + RUNFOLLOW_SOUTH_WEST, + RUNFOLLOW_SOUTH_EAST, + RUNFOLLOW_NORTH_SOUTH_WEST, + RUNFOLLOW_NORTH_SOUTH_EAST, + RUNFOLLOW_NORTH_EAST_WEST, + RUNFOLLOW_SOUTH_EAST_WEST +}; + // Exported RAM declarations // Exported ROM declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 014001d93..1228d93be 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -2096,7 +2096,7 @@ bool8 sub_808FA3C(struct MapObject *mapObject, struct Sprite *sprite) u8 direction; memcpy(directions, gUnknown_0850D710, sizeof directions); - direction = GetRunningPastFacingDirection(mapObject, 0); + direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_ANY); if (direction == 0) { direction = directions[Random() & 0x03]; @@ -2424,7 +2424,7 @@ bool8 sub_8090148 (struct MapObject *mapObject, struct Sprite *sprite) u8 direction; memcpy(directions, gUnknown_0850D770, sizeof gUnknown_0850D770); - direction = GetRunningPastFacingDirection(mapObject, 1); + direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_NORTH_SOUTH); if (direction == 0) { direction = directions[Random() & 0x01]; @@ -2477,7 +2477,7 @@ bool8 sub_8090288 (struct MapObject *mapObject, struct Sprite *sprite) u8 direction; memcpy(directions, gUnknown_0850D790, sizeof gUnknown_0850D790); - direction = GetRunningPastFacingDirection(mapObject, 2); + direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_EAST_WEST); if (direction == 0) { direction = directions[Random() & 0x01]; @@ -2530,7 +2530,60 @@ bool8 sub_80903C8 (struct MapObject *mapObject, struct Sprite *sprite) u8 direction; memcpy(directions, gUnknown_0850D7F0, sizeof gUnknown_0850D7F0); - direction = GetRunningPastFacingDirection(mapObject, 3); + direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_NORTH_WEST); + if (direction == 0) + { + direction = directions[Random() & 0x01]; + } + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 1; + return TRUE; +} + +field_object_step(RandomlyLookNorthOrEast, gUnknown_0850D7F4) + +bool8 sub_8090454 (struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_8090468 (struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_8090494 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + SetFieldObjectStepTimer(sprite, gUnknown_0850D6EC[Random() & 0x03]); + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 3; + } + return FALSE; +} + +bool8 sub_80904D8 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (RunFieldObjectStepTimer(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + { + sprite->data1 = 4; + return TRUE; + } + return FALSE; +} + +bool8 sub_8090508 (struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[2]; + u8 direction; + + memcpy(directions, gUnknown_0850D808, sizeof gUnknown_0850D808); + direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_NORTH_EAST); if (direction == 0) { direction = directions[Random() & 0x01]; From b269048369afcb0a4bf5a5f251d9ff7506a3f588 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 15 Sep 2017 15:57:38 -0400 Subject: [PATCH 101/342] RandomlyLookSouthOrWest --- asm/field_map_obj.s | 168 -------------------------------------------- include/data3.h | 1 + src/field_map_obj.c | 53 ++++++++++++++ 3 files changed, 54 insertions(+), 168 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 1675489e1..f128ba9a4 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,174 +5,6 @@ .text - thumb_func_start FieldObjectCB_RandomlyLookSouthOrWest -FieldObjectCB_RandomlyLookSouthOrWest: @ 8090550 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8090574 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_RandomlyLookSouthOrWest - - thumb_func_start sub_8090574 -sub_8090574: @ 8090574 - push {r4,lr} - ldr r3, =gUnknown_0850D80C - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090574 - - thumb_func_start sub_8090594 -sub_8090594: @ 8090594 - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8090594 - - thumb_func_start sub_80905A8 -sub_80905A8: @ 80905A8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80905A8 - - thumb_func_start sub_80905D4 -sub_80905D4: @ 80905D4 - push {r4-r7,lr} - adds r6, r0, 0 - adds r7, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0809060A - ldr r4, =gUnknown_0850D6EC - bl Random - movs r5, 0x3 - adds r1, r5, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - movs r0, 0 - ldrsh r1, [r1, r0] - adds r0, r7, 0 - bl SetFieldObjectStepTimer - ldrb r1, [r6] - movs r0, 0x3 - negs r0, r0 - ands r0, r1 - strb r0, [r6] - strh r5, [r7, 0x30] -_0809060A: - movs r0, 0 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80905D4 - - thumb_func_start sub_8090618 -sub_8090618: @ 8090618 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - bne _08090636 - adds r0, r4, 0 - bl FieldObjectIsTrainerAndCloseToPlayer - lsls r0, 24 - cmp r0, 0 - beq _0809063E -_08090636: - movs r0, 0x4 - strh r0, [r5, 0x30] - movs r0, 0x1 - b _08090640 -_0809063E: - movs r0, 0 -_08090640: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090618 - - thumb_func_start sub_8090648 -sub_8090648: @ 8090648 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D820 - mov r0, sp - movs r2, 0x2 - bl memcpy - adds r0, r4, 0 - movs r1, 0x5 - bl GetRunningPastFacingDirection - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _08090678 - bl Random - movs r1, 0x1 - ands r1, r0 - mov r2, sp - adds r0, r2, r1 - ldrb r1, [r0] -_08090678: - adds r0, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x1 - strh r0, [r5, 0x30] - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090648 - thumb_func_start FieldObjectCB_RandomlyLookSouthOrEast FieldObjectCB_RandomlyLookSouthOrEast: @ 8090690 push {lr} diff --git a/include/data3.h b/include/data3.h index debca9b73..a1aa86279 100755 --- a/include/data3.h +++ b/include/data3.h @@ -24,5 +24,6 @@ extern const u8 gUnknown_0850D770[2]; // {DIR_SOUTH, DIR_NORTH} extern const u8 gUnknown_0850D790[2]; // {DIR_WEST, DIR_EAST} extern const u8 gUnknown_0850D7F0[2]; // {DIR_NORTH, DIR_WEST} extern const u8 gUnknown_0850D808[2]; // {DIR_NORTH, DIR_EAST} +extern const u8 gUnknown_0850D820[2]; // {DIR_SOUTH, DIR_WEST} #endif //POKEEMERALD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 1228d93be..639267890 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -2592,3 +2592,56 @@ bool8 sub_8090508 (struct MapObject *mapObject, struct Sprite *sprite) sprite->data1 = 1; return TRUE; } + +field_object_step(RandomlyLookSouthOrWest, gUnknown_0850D80C) + +bool8 sub_8090594 (struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_80905A8 (struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_80905D4 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + SetFieldObjectStepTimer(sprite, gUnknown_0850D6EC[Random() & 0x03]); + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 3; + } + return FALSE; +} + +bool8 sub_8090618 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (RunFieldObjectStepTimer(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + { + sprite->data1 = 4; + return TRUE; + } + return FALSE; +} + +bool8 sub_8090648 (struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[2]; + u8 direction; + + memcpy(directions, gUnknown_0850D820, sizeof gUnknown_0850D820); + direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_SOUTH_WEST); + if (direction == 0) + { + direction = directions[Random() & 0x01]; + } + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 1; + return TRUE; +} From f6840ba7e7783cb961f6b6afb7ac7eb45717a13f Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 15 Sep 2017 16:00:39 -0400 Subject: [PATCH 102/342] RandomlyLookSouthOrEast --- asm/field_map_obj.s | 168 -------------------------------------------- include/data3.h | 1 + src/field_map_obj.c | 53 ++++++++++++++ 3 files changed, 54 insertions(+), 168 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index f128ba9a4..83913eaf9 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,174 +5,6 @@ .text - thumb_func_start FieldObjectCB_RandomlyLookSouthOrEast -FieldObjectCB_RandomlyLookSouthOrEast: @ 8090690 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_80906B4 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_RandomlyLookSouthOrEast - - thumb_func_start sub_80906B4 -sub_80906B4: @ 80906B4 - push {r4,lr} - ldr r3, =gUnknown_0850D824 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80906B4 - - thumb_func_start sub_80906D4 -sub_80906D4: @ 80906D4 - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80906D4 - - thumb_func_start sub_80906E8 -sub_80906E8: @ 80906E8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80906E8 - - thumb_func_start sub_8090714 -sub_8090714: @ 8090714 - push {r4-r7,lr} - adds r6, r0, 0 - adds r7, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0809074A - ldr r4, =gUnknown_0850D6EC - bl Random - movs r5, 0x3 - adds r1, r5, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - movs r0, 0 - ldrsh r1, [r1, r0] - adds r0, r7, 0 - bl SetFieldObjectStepTimer - ldrb r1, [r6] - movs r0, 0x3 - negs r0, r0 - ands r0, r1 - strb r0, [r6] - strh r5, [r7, 0x30] -_0809074A: - movs r0, 0 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090714 - - thumb_func_start sub_8090758 -sub_8090758: @ 8090758 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - bne _08090776 - adds r0, r4, 0 - bl FieldObjectIsTrainerAndCloseToPlayer - lsls r0, 24 - cmp r0, 0 - beq _0809077E -_08090776: - movs r0, 0x4 - strh r0, [r5, 0x30] - movs r0, 0x1 - b _08090780 -_0809077E: - movs r0, 0 -_08090780: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090758 - - thumb_func_start sub_8090788 -sub_8090788: @ 8090788 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D838 - mov r0, sp - movs r2, 0x2 - bl memcpy - adds r0, r4, 0 - movs r1, 0x6 - bl GetRunningPastFacingDirection - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _080907B8 - bl Random - movs r1, 0x1 - ands r1, r0 - mov r2, sp - adds r0, r2, r1 - ldrb r1, [r0] -_080907B8: - adds r0, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x1 - strh r0, [r5, 0x30] - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090788 - thumb_func_start FieldObjectCB_RandomlyLookNorthOrSouthOrWest FieldObjectCB_RandomlyLookNorthOrSouthOrWest: @ 80907D0 push {lr} diff --git a/include/data3.h b/include/data3.h index a1aa86279..9aa8bc469 100755 --- a/include/data3.h +++ b/include/data3.h @@ -25,5 +25,6 @@ extern const u8 gUnknown_0850D790[2]; // {DIR_WEST, DIR_EAST} extern const u8 gUnknown_0850D7F0[2]; // {DIR_NORTH, DIR_WEST} extern const u8 gUnknown_0850D808[2]; // {DIR_NORTH, DIR_EAST} extern const u8 gUnknown_0850D820[2]; // {DIR_SOUTH, DIR_WEST} +extern const u8 gUnknown_0850D838[2]; // {DIR_SOUTH, DIR_EAST} #endif //POKEEMERALD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 639267890..f4092265c 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -2645,3 +2645,56 @@ bool8 sub_8090648 (struct MapObject *mapObject, struct Sprite *sprite) sprite->data1 = 1; return TRUE; } + +field_object_step(RandomlyLookSouthOrEast, gUnknown_0850D824) + +bool8 sub_80906D4 (struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_80906E8 (struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_8090714 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + SetFieldObjectStepTimer(sprite, gUnknown_0850D6EC[Random() & 0x03]); + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 3; + } + return FALSE; +} + +bool8 sub_8090758 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (RunFieldObjectStepTimer(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + { + sprite->data1 = 4; + return TRUE; + } + return FALSE; +} + +bool8 sub_8090788 (struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[2]; + u8 direction; + + memcpy(directions, gUnknown_0850D838, sizeof gUnknown_0850D838); + direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_SOUTH_EAST); + if (direction == 0) + { + direction = directions[Random() & 0x01]; + } + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 1; + return TRUE; +} From 2e1ecdb87711172b1916f3e102315867c5b65d18 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 15 Sep 2017 16:08:01 -0400 Subject: [PATCH 103/342] Tridirectional spinners --- asm/field_map_obj.s | 672 -------------------------------------------- include/data3.h | 4 + src/field_map_obj.c | 212 ++++++++++++++ 3 files changed, 216 insertions(+), 672 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 83913eaf9..4d01b95f8 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,678 +5,6 @@ .text - thumb_func_start FieldObjectCB_RandomlyLookNorthOrSouthOrWest -FieldObjectCB_RandomlyLookNorthOrSouthOrWest: @ 80907D0 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_80907F4 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_RandomlyLookNorthOrSouthOrWest - - thumb_func_start sub_80907F4 -sub_80907F4: @ 80907F4 - push {r4,lr} - ldr r3, =gUnknown_0850D83C - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80907F4 - - thumb_func_start sub_8090814 -sub_8090814: @ 8090814 - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8090814 - - thumb_func_start sub_8090828 -sub_8090828: @ 8090828 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090828 - - thumb_func_start sub_8090854 -sub_8090854: @ 8090854 - push {r4-r7,lr} - adds r6, r0, 0 - adds r7, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0809088A - ldr r4, =gUnknown_0850D6EC - bl Random - movs r5, 0x3 - adds r1, r5, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - movs r0, 0 - ldrsh r1, [r1, r0] - adds r0, r7, 0 - bl SetFieldObjectStepTimer - ldrb r1, [r6] - movs r0, 0x3 - negs r0, r0 - ands r0, r1 - strb r0, [r6] - strh r5, [r7, 0x30] -_0809088A: - movs r0, 0 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090854 - - thumb_func_start sub_8090898 -sub_8090898: @ 8090898 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - bne _080908B6 - adds r0, r4, 0 - bl FieldObjectIsTrainerAndCloseToPlayer - lsls r0, 24 - cmp r0, 0 - beq _080908BE -_080908B6: - movs r0, 0x4 - strh r0, [r5, 0x30] - movs r0, 0x1 - b _080908C0 -_080908BE: - movs r0, 0 -_080908C0: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090898 - - thumb_func_start sub_80908C8 -sub_80908C8: @ 80908C8 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D850 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r0, r4, 0 - movs r1, 0x7 - bl GetRunningPastFacingDirection - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _080908F8 - bl Random - movs r1, 0x3 - ands r1, r0 - mov r2, sp - adds r0, r2, r1 - ldrb r1, [r0] -_080908F8: - adds r0, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x1 - strh r0, [r5, 0x30] - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80908C8 - - thumb_func_start FieldObjectCB_RandomlyLookNorthOrSouthOrEast -FieldObjectCB_RandomlyLookNorthOrSouthOrEast: @ 8090910 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8090934 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_RandomlyLookNorthOrSouthOrEast - - thumb_func_start sub_8090934 -sub_8090934: @ 8090934 - push {r4,lr} - ldr r3, =gUnknown_0850D854 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090934 - - thumb_func_start sub_8090954 -sub_8090954: @ 8090954 - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8090954 - - thumb_func_start sub_8090968 -sub_8090968: @ 8090968 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090968 - - thumb_func_start sub_8090994 -sub_8090994: @ 8090994 - push {r4-r7,lr} - adds r6, r0, 0 - adds r7, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _080909CA - ldr r4, =gUnknown_0850D6EC - bl Random - movs r5, 0x3 - adds r1, r5, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - movs r0, 0 - ldrsh r1, [r1, r0] - adds r0, r7, 0 - bl SetFieldObjectStepTimer - ldrb r1, [r6] - movs r0, 0x3 - negs r0, r0 - ands r0, r1 - strb r0, [r6] - strh r5, [r7, 0x30] -_080909CA: - movs r0, 0 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090994 - - thumb_func_start sub_80909D8 -sub_80909D8: @ 80909D8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - bne _080909F6 - adds r0, r4, 0 - bl FieldObjectIsTrainerAndCloseToPlayer - lsls r0, 24 - cmp r0, 0 - beq _080909FE -_080909F6: - movs r0, 0x4 - strh r0, [r5, 0x30] - movs r0, 0x1 - b _08090A00 -_080909FE: - movs r0, 0 -_08090A00: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80909D8 - - thumb_func_start sub_8090A08 -sub_8090A08: @ 8090A08 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D868 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r0, r4, 0 - movs r1, 0x8 - bl GetRunningPastFacingDirection - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _08090A38 - bl Random - movs r1, 0x3 - ands r1, r0 - mov r2, sp - adds r0, r2, r1 - ldrb r1, [r0] -_08090A38: - adds r0, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x1 - strh r0, [r5, 0x30] - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090A08 - - thumb_func_start FieldObjectCB_RandomlyLookNorthOrEastOrWest -FieldObjectCB_RandomlyLookNorthOrEastOrWest: @ 8090A50 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8090A74 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_RandomlyLookNorthOrEastOrWest - - thumb_func_start sub_8090A74 -sub_8090A74: @ 8090A74 - push {r4,lr} - ldr r3, =gUnknown_0850D86C - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090A74 - - thumb_func_start sub_8090A94 -sub_8090A94: @ 8090A94 - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8090A94 - - thumb_func_start sub_8090AA8 -sub_8090AA8: @ 8090AA8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090AA8 - - thumb_func_start sub_8090AD4 -sub_8090AD4: @ 8090AD4 - push {r4-r7,lr} - adds r6, r0, 0 - adds r7, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _08090B0A - ldr r4, =gUnknown_0850D6EC - bl Random - movs r5, 0x3 - adds r1, r5, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - movs r0, 0 - ldrsh r1, [r1, r0] - adds r0, r7, 0 - bl SetFieldObjectStepTimer - ldrb r1, [r6] - movs r0, 0x3 - negs r0, r0 - ands r0, r1 - strb r0, [r6] - strh r5, [r7, 0x30] -_08090B0A: - movs r0, 0 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090AD4 - - thumb_func_start sub_8090B18 -sub_8090B18: @ 8090B18 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - bne _08090B36 - adds r0, r4, 0 - bl FieldObjectIsTrainerAndCloseToPlayer - lsls r0, 24 - cmp r0, 0 - beq _08090B3E -_08090B36: - movs r0, 0x4 - strh r0, [r5, 0x30] - movs r0, 0x1 - b _08090B40 -_08090B3E: - movs r0, 0 -_08090B40: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090B18 - - thumb_func_start sub_8090B48 -sub_8090B48: @ 8090B48 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D880 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r0, r4, 0 - movs r1, 0x9 - bl GetRunningPastFacingDirection - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _08090B78 - bl Random - movs r1, 0x3 - ands r1, r0 - mov r2, sp - adds r0, r2, r1 - ldrb r1, [r0] -_08090B78: - adds r0, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x1 - strh r0, [r5, 0x30] - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090B48 - - thumb_func_start FieldObjectCB_RandomlyLookSouthOrEastOrWest -FieldObjectCB_RandomlyLookSouthOrEastOrWest: @ 8090B90 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8090BB4 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_RandomlyLookSouthOrEastOrWest - - thumb_func_start sub_8090BB4 -sub_8090BB4: @ 8090BB4 - push {r4,lr} - ldr r3, =gUnknown_0850D884 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090BB4 - - thumb_func_start sub_8090BD4 -sub_8090BD4: @ 8090BD4 - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8090BD4 - - thumb_func_start sub_8090BE8 -sub_8090BE8: @ 8090BE8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090BE8 - - thumb_func_start sub_8090C14 -sub_8090C14: @ 8090C14 - push {r4-r7,lr} - adds r6, r0, 0 - adds r7, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _08090C4A - ldr r4, =gUnknown_0850D6EC - bl Random - movs r5, 0x3 - adds r1, r5, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - movs r0, 0 - ldrsh r1, [r1, r0] - adds r0, r7, 0 - bl SetFieldObjectStepTimer - ldrb r1, [r6] - movs r0, 0x3 - negs r0, r0 - ands r0, r1 - strb r0, [r6] - strh r5, [r7, 0x30] -_08090C4A: - movs r0, 0 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090C14 - - thumb_func_start sub_8090C58 -sub_8090C58: @ 8090C58 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - bne _08090C76 - adds r0, r4, 0 - bl FieldObjectIsTrainerAndCloseToPlayer - lsls r0, 24 - cmp r0, 0 - beq _08090C7E -_08090C76: - movs r0, 0x4 - strh r0, [r5, 0x30] - movs r0, 0x1 - b _08090C80 -_08090C7E: - movs r0, 0 -_08090C80: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090C58 - - thumb_func_start sub_8090C88 -sub_8090C88: @ 8090C88 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D898 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r0, r4, 0 - movs r1, 0xA - bl GetRunningPastFacingDirection - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _08090CB8 - bl Random - movs r1, 0x3 - ands r1, r0 - mov r2, sp - adds r0, r2, r1 - ldrb r1, [r0] -_08090CB8: - adds r0, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x1 - strh r0, [r5, 0x30] - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090C88 - thumb_func_start FieldObjectCB_LookAroundCounterclockwise FieldObjectCB_LookAroundCounterclockwise: @ 8090CD0 push {lr} diff --git a/include/data3.h b/include/data3.h index 9aa8bc469..98d22566e 100755 --- a/include/data3.h +++ b/include/data3.h @@ -26,5 +26,9 @@ extern const u8 gUnknown_0850D7F0[2]; // {DIR_NORTH, DIR_WEST} extern const u8 gUnknown_0850D808[2]; // {DIR_NORTH, DIR_EAST} extern const u8 gUnknown_0850D820[2]; // {DIR_SOUTH, DIR_WEST} extern const u8 gUnknown_0850D838[2]; // {DIR_SOUTH, DIR_EAST} +extern const u8 gUnknown_0850D850[4]; +extern const u8 gUnknown_0850D868[4]; +extern const u8 gUnknown_0850D880[4]; +extern const u8 gUnknown_0850D898[4]; #endif //POKEEMERALD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index f4092265c..0ccf6039f 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -2698,3 +2698,215 @@ bool8 sub_8090788 (struct MapObject *mapObject, struct Sprite *sprite) sprite->data1 = 1; return TRUE; } + +field_object_step(RandomlyLookNorthOrSouthOrWest, gUnknown_0850D83C) + +bool8 sub_8090814 (struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_8090828 (struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_8090854 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + SetFieldObjectStepTimer(sprite, gUnknown_0850D6EC[Random() & 0x03]); + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 3; + } + return FALSE; +} + +bool8 sub_8090898 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (RunFieldObjectStepTimer(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + { + sprite->data1 = 4; + return TRUE; + } + return FALSE; +} + +bool8 sub_80908C8 (struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[4]; + u8 direction; + + memcpy(directions, gUnknown_0850D850, sizeof gUnknown_0850D850); + direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_NORTH_SOUTH_WEST); + if (direction == 0) + { + direction = directions[Random() & 0x03]; + } + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 1; + return TRUE; +} + +field_object_step(RandomlyLookNorthOrSouthOrEast, gUnknown_0850D854) + +bool8 sub_8090954 (struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_8090968 (struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_8090994 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + SetFieldObjectStepTimer(sprite, gUnknown_0850D6EC[Random() & 0x03]); + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 3; + } + return FALSE; +} + +bool8 sub_80909D8 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (RunFieldObjectStepTimer(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + { + sprite->data1 = 4; + return TRUE; + } + return FALSE; +} + +bool8 sub_8090A08 (struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[4]; + u8 direction; + + memcpy(directions, gUnknown_0850D868, sizeof gUnknown_0850D868); + direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_NORTH_SOUTH_EAST); + if (direction == 0) + { + direction = directions[Random() & 0x03]; + } + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 1; + return TRUE; +} + +field_object_step(RandomlyLookNorthOrEastOrWest, gUnknown_0850D86C) + +bool8 sub_8090A94 (struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_8090AA8 (struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_8090AD4 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + SetFieldObjectStepTimer(sprite, gUnknown_0850D6EC[Random() & 0x03]); + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 3; + } + return FALSE; +} + +bool8 sub_8090B18 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (RunFieldObjectStepTimer(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + { + sprite->data1 = 4; + return TRUE; + } + return FALSE; +} + +bool8 sub_8090B48 (struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[4]; + u8 direction; + + memcpy(directions, gUnknown_0850D880, sizeof gUnknown_0850D880); + direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_NORTH_EAST_WEST); + if (direction == 0) + { + direction = directions[Random() & 0x03]; + } + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 1; + return TRUE; +} + +field_object_step(RandomlyLookSouthOrEastOrWest, gUnknown_0850D884) + +bool8 sub_8090BD4 (struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_8090BE8 (struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_8090C14 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + SetFieldObjectStepTimer(sprite, gUnknown_0850D6EC[Random() & 0x03]); + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 3; + } + return FALSE; +} + +bool8 sub_8090C58 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (RunFieldObjectStepTimer(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + { + sprite->data1 = 4; + return TRUE; + } + return FALSE; +} + +bool8 sub_8090C88 (struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[4]; + u8 direction; + + memcpy(directions, gUnknown_0850D898, sizeof gUnknown_0850D898); + direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_SOUTH_EAST_WEST); + if (direction == 0) + { + direction = directions[Random() & 0x03]; + } + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 1; + return TRUE; +} From 1c6177f67895a20c99d7dfafd43afd83cf3bfff2 Mon Sep 17 00:00:00 2001 From: scnorton Date: Fri, 15 Sep 2017 16:34:03 -0400 Subject: [PATCH 104/342] Rotatoes --- asm/field_map_obj.s | 279 -------------------------------------------- include/data3.h | 2 + src/field_map_obj.c | 90 ++++++++++++++ 3 files changed, 92 insertions(+), 279 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 4d01b95f8..03453a503 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,285 +5,6 @@ .text - thumb_func_start FieldObjectCB_LookAroundCounterclockwise -FieldObjectCB_LookAroundCounterclockwise: @ 8090CD0 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8090CF4 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_LookAroundCounterclockwise - - thumb_func_start sub_8090CF4 -sub_8090CF4: @ 8090CF4 - push {r4,lr} - ldr r3, =gUnknown_0850D89C - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090CF4 - - thumb_func_start sub_8090D14 -sub_8090D14: @ 8090D14 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl npc_reset - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x1 - strh r0, [r5, 0x30] - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090D14 - - thumb_func_start sub_8090D40 -sub_8090D40: @ 8090D40 - push {r4,lr} - adds r4, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _08090D5A - adds r0, r4, 0 - movs r1, 0x30 - bl SetFieldObjectStepTimer - movs r0, 0x2 - strh r0, [r4, 0x30] -_08090D5A: - movs r0, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8090D40 - - thumb_func_start sub_8090D64 -sub_8090D64: @ 8090D64 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - bne _08090D82 - adds r0, r4, 0 - bl FieldObjectIsTrainerAndCloseToPlayer - lsls r0, 24 - cmp r0, 0 - beq _08090D86 -_08090D82: - movs r0, 0x3 - strh r0, [r5, 0x30] -_08090D86: - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090D64 - - thumb_func_start sub_8090D90 -@ bool8 sub_8090D90(struct npc_state *fieldObject, struct obj *object) -sub_8090D90: @ 8090D90 - push {r4,r5,lr} - sub sp, 0x8 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D8AC - mov r0, sp - movs r2, 0x5 - bl memcpy - adds r0, r4, 0 - movs r1, 0 - bl GetRunningPastFacingDirection - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _08090DBC - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - add r0, sp - ldrb r1, [r0] -_08090DBC: - adds r0, r4, 0 - bl FieldObjectSetDirection - movs r0, 0 - strh r0, [r5, 0x30] - movs r0, 0x1 - add sp, 0x8 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090D90 - - thumb_func_start FieldObjectCB_LookAroundClockwise -FieldObjectCB_LookAroundClockwise: @ 8090DD4 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8090DF8 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_LookAroundClockwise - - thumb_func_start sub_8090DF8 -sub_8090DF8: @ 8090DF8 - push {r4,lr} - ldr r3, =gUnknown_0850D8B4 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090DF8 - - thumb_func_start sub_8090E18 -sub_8090E18: @ 8090E18 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl npc_reset - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x1 - strh r0, [r5, 0x30] - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090E18 - - thumb_func_start sub_8090E44 -sub_8090E44: @ 8090E44 - push {r4,lr} - adds r4, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _08090E5E - adds r0, r4, 0 - movs r1, 0x30 - bl SetFieldObjectStepTimer - movs r0, 0x2 - strh r0, [r4, 0x30] -_08090E5E: - movs r0, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8090E44 - - thumb_func_start sub_8090E68 -sub_8090E68: @ 8090E68 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - bne _08090E86 - adds r0, r4, 0 - bl FieldObjectIsTrainerAndCloseToPlayer - lsls r0, 24 - cmp r0, 0 - beq _08090E8A -_08090E86: - movs r0, 0x3 - strh r0, [r5, 0x30] -_08090E8A: - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8090E68 - - thumb_func_start sub_8090E94 -sub_8090E94: @ 8090E94 - push {r4,r5,lr} - sub sp, 0x8 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D8C4 - mov r0, sp - movs r2, 0x5 - bl memcpy - adds r0, r4, 0 - movs r1, 0 - bl GetRunningPastFacingDirection - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _08090EC0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - add r0, sp - ldrb r1, [r0] -_08090EC0: - adds r0, r4, 0 - bl FieldObjectSetDirection - movs r0, 0 - strh r0, [r5, 0x30] - movs r0, 0x1 - add sp, 0x8 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090E94 - thumb_func_start FieldObjectCB_AlternatelyGoInOppositeDirections FieldObjectCB_AlternatelyGoInOppositeDirections: @ 8090ED8 push {lr} diff --git a/include/data3.h b/include/data3.h index 98d22566e..3cbdcc9ce 100755 --- a/include/data3.h +++ b/include/data3.h @@ -30,5 +30,7 @@ extern const u8 gUnknown_0850D850[4]; extern const u8 gUnknown_0850D868[4]; extern const u8 gUnknown_0850D880[4]; extern const u8 gUnknown_0850D898[4]; +extern const u8 gUnknown_0850D8AC[5]; +extern const u8 gUnknown_0850D8C4[5]; #endif //POKEEMERALD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 0ccf6039f..0ba4cc052 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -2910,3 +2910,93 @@ bool8 sub_8090C88 (struct MapObject *mapObject, struct Sprite *sprite) sprite->data1 = 1; return TRUE; } + +field_object_step(LookAroundCounterclockwise, gUnknown_0850D89C) + +bool8 sub_8090D14 (struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_8090D40 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + SetFieldObjectStepTimer(sprite, 48); + sprite->data1 = 2; + } + return FALSE; +} + +bool8 sub_8090D64 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (RunFieldObjectStepTimer(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + { + sprite->data1 = 3; + } + return FALSE; +} + +bool8 sub_8090D90 (struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[5]; + u8 direction; + + memcpy(directions, gUnknown_0850D8AC, sizeof gUnknown_0850D8AC); + direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_ANY); + if (direction == 0) + { + direction = directions[mapObject->mapobj_unk_18]; + } + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 0; + return TRUE; +} + +field_object_step(LookAroundClockwise, gUnknown_0850D8B4) + +bool8 sub_8090E18 (struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_8090E44 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + SetFieldObjectStepTimer(sprite, 48); + sprite->data1 = 2; + } + return FALSE; +} + +bool8 sub_8090E68 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (RunFieldObjectStepTimer(sprite) || FieldObjectIsTrainerAndCloseToPlayer(mapObject)) + { + sprite->data1 = 3; + } + return FALSE; +} + +bool8 sub_8090E94 (struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 directions[5]; + u8 direction; + + memcpy(directions, gUnknown_0850D8C4, sizeof gUnknown_0850D8C4); + direction = GetRunningPastFacingDirection(mapObject, RUNFOLLOW_ANY); + if (direction == 0) + { + direction = directions[mapObject->mapobj_unk_18]; + } + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 0; + return TRUE; +} From 79e8235701de373e7d7cb84162343c487c7e1a5e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 15 Sep 2017 21:26:56 -0400 Subject: [PATCH 105/342] AlternatelyGoInOppositeDirections --- asm/field_map_obj.s | 192 ---------------------------------------- include/field_map_obj.h | 2 + src/field_map_obj.c | 62 +++++++++++++ 3 files changed, 64 insertions(+), 192 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 03453a503..f9992ae3b 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,198 +5,6 @@ .text - thumb_func_start FieldObjectCB_AlternatelyGoInOppositeDirections -FieldObjectCB_AlternatelyGoInOppositeDirections: @ 8090ED8 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8090EFC - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_AlternatelyGoInOppositeDirections - - thumb_func_start sub_8090EFC -sub_8090EFC: @ 8090EFC - push {r4,lr} - ldr r3, =gUnknown_0850D8CC - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090EFC - - thumb_func_start sub_8090F1C -sub_8090F1C: @ 8090F1C - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8090F1C - - thumb_func_start sub_8090F30 -@ bool8 sub_8090F30(struct npc_state *fieldObject, struct obj *object) -sub_8090F30: @ 8090F30 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldr r0, =gUnknown_085055CD - ldrb r1, [r4, 0x6] - adds r1, r0 - ldrb r1, [r1] - adds r0, r4, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0 - beq _08090F52 - adds r0, r1, 0 - bl GetOppositeDirection - lsls r0, 24 - lsrs r1, r0, 24 -_08090F52: - adds r0, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8090F30 - - thumb_func_start sub_8090F68 -@ bool8 sub_8090F68(struct npc_state *fieldObject, struct obj *object) -sub_8090F68: @ 8090F68 - push {r4-r7,lr} - adds r4, r0, 0 - adds r7, r1, 0 - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0 - beq _08090F98 - ldr r1, [r4, 0xC] - ldr r0, [r4, 0x10] - cmp r1, r0 - bne _08090F98 - movs r0, 0 - strb r0, [r2] - ldrb r0, [r4, 0x18] - lsrs r0, 4 - bl GetOppositeDirection - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r4, 0 - bl FieldObjectSetDirection -_08090F98: - ldrb r1, [r4, 0x18] - lsrs r1, 4 - adds r0, r4, 0 - bl npc_block_way__next_tile - lsls r0, 24 - lsrs r5, r0, 24 - ldrb r0, [r4, 0x18] - lsrs r0, 4 - bl GetGoSpeed0AnimId - lsls r0, 24 - lsrs r6, r0, 24 - cmp r5, 0x1 - bne _08090FEE - adds r1, r4, 0 - adds r1, 0x21 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - ldrb r0, [r4, 0x18] - lsrs r0, 4 - bl GetOppositeDirection - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r4, 0 - bl FieldObjectSetDirection - ldrb r0, [r4, 0x18] - lsrs r0, 4 - bl GetGoSpeed0AnimId - lsls r0, 24 - lsrs r6, r0, 24 - ldrb r1, [r4, 0x18] - lsrs r1, 4 - adds r0, r4, 0 - bl npc_block_way__next_tile - lsls r0, 24 - lsrs r5, r0, 24 -_08090FEE: - cmp r5, 0 - beq _08091000 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetStepInPlaceDelay16AnimId - lsls r0, 24 - lsrs r6, r0, 24 -_08091000: - adds r0, r4, 0 - adds r1, r7, 0 - adds r2, r6, 0 - bl FieldObjectSetRegularAnim - ldrb r0, [r4] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r4] - movs r0, 0x3 - strh r0, [r7, 0x30] - movs r0, 0x1 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_8090F68 - - thumb_func_start sub_8091020 -@ bool8 sub_8091020(struct npc_state *fieldObject, struct obj *object) -sub_8091020: @ 8091020 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0809103E - ldrb r0, [r4] - movs r1, 0x3 - negs r1, r1 - ands r1, r0 - strb r1, [r4] - movs r0, 0x1 - strh r0, [r5, 0x30] -_0809103E: - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8091020 - thumb_func_start sub_8091048 @ bool8 sub_8091048(struct npc_state *fieldObject, struct obj *object) sub_8091048: @ 8091048 diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 43446ea84..db1ed233f 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -62,6 +62,8 @@ void npc_coords_shift(struct MapObject *, s16, s16); void sub_808EB08(struct MapObject *, s16, s16); void sub_808F254(u8, u8, u8); void FieldObjectStep(struct MapObject *, struct Sprite *, bool8(struct MapObject *, struct Sprite *)); +u8 GetOppositeDirection(u8); +u8 GetStepInPlaceDelay16AnimId(u8); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 0ba4cc052..91856d1ee 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3000,3 +3000,65 @@ bool8 sub_8090E94 (struct MapObject *mapObject, struct Sprite *sprite) sprite->data1 = 0; return TRUE; } + +field_object_step(AlternatelyGoInOppositeDirections, gUnknown_0850D8CC) + +bool8 sub_8090F1C (struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_8090F30 (struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 direction; + + direction = gUnknown_085055CD[mapObject->animPattern]; + if (mapObject->mapobj_unk_21) + { + direction = GetOppositeDirection(direction); + } + FieldObjectSetDirection(mapObject, direction); + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_8090F68 (struct MapObject *mapObject, struct Sprite *sprite) +{ + bool8 blockingWay; + u8 animId; + + if (mapObject->mapobj_unk_21 && mapObject->coords1.x == mapObject->coords2.x && mapObject->coords1.y == mapObject->coords2.y) + { + mapObject->mapobj_unk_21 = 0; + FieldObjectSetDirection(mapObject, GetOppositeDirection(mapObject->placeholder18)); + } + blockingWay = npc_block_way__next_tile(mapObject, mapObject->placeholder18); + animId = GetGoSpeed0AnimId(mapObject->placeholder18); + if (blockingWay == TRUE) + { + mapObject->mapobj_unk_21 ++; + FieldObjectSetDirection(mapObject, GetOppositeDirection(mapObject->placeholder18)); + animId = GetGoSpeed0AnimId(mapObject->placeholder18); + blockingWay = npc_block_way__next_tile(mapObject, mapObject->placeholder18); + } + if (blockingWay) + { + animId = GetStepInPlaceDelay16AnimId(mapObject->mapobj_unk_18); + } + FieldObjectSetRegularAnim(mapObject, sprite, animId); + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 3; + return TRUE; +} + +bool8 sub_8091020 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 1; + } + return FALSE; +} From 3e9e4b13ec977cc4f5dd696d2dc8d362f58317dc Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 15 Sep 2017 21:39:24 -0400 Subject: [PATCH 106/342] MoveFieldObjectInNextDirectionInSequence --- asm/field_map_obj.s | 102 -------------------------------------------- src/field_map_obj.c | 36 ++++++++++++++++ 2 files changed, 36 insertions(+), 102 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index f9992ae3b..fc8efe4c8 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,108 +5,6 @@ .text - thumb_func_start sub_8091048 -@ bool8 sub_8091048(struct npc_state *fieldObject, struct obj *object) -sub_8091048: @ 8091048 - push {r4,lr} - adds r4, r1, 0 - bl npc_reset - movs r0, 0x1 - strh r0, [r4, 0x30] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8091048 - - thumb_func_start MoveFieldObjectInNextDirectionInSequence -@ bool8 MoveFieldObjectInNextDirectionInSequence(struct npc_state *fieldObject, struct obj *object, u8 *directions) -MoveFieldObjectInNextDirectionInSequence: @ 809105C - push {r4-r7,lr} - mov r7, r8 - push {r7} - adds r4, r0, 0 - mov r8, r1 - adds r7, r2, 0 - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x3 - bne _0809107E - ldr r1, [r4, 0xC] - ldr r0, [r4, 0x10] - cmp r1, r0 - bne _0809107E - movs r0, 0 - strb r0, [r2] -_0809107E: - adds r5, r4, 0 - adds r5, 0x21 - ldrb r0, [r5] - adds r0, r7, r0 - ldrb r1, [r0] - adds r0, r4, 0 - bl FieldObjectSetDirection - ldrb r0, [r4, 0x18] - lsrs r0, 4 - bl GetGoSpeed0AnimId - lsls r0, 24 - lsrs r6, r0, 24 - ldrb r1, [r4, 0x18] - lsrs r1, 4 - adds r0, r4, 0 - bl npc_block_way__next_tile - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _080910D8 - ldrb r0, [r5] - adds r0, 0x1 - strb r0, [r5] - ldrb r0, [r5] - adds r0, r7, r0 - ldrb r1, [r0] - adds r0, r4, 0 - bl FieldObjectSetDirection - ldrb r0, [r4, 0x18] - lsrs r0, 4 - bl GetGoSpeed0AnimId - lsls r0, 24 - lsrs r6, r0, 24 - ldrb r1, [r4, 0x18] - lsrs r1, 4 - adds r0, r4, 0 - bl npc_block_way__next_tile - lsls r0, 24 - lsrs r0, 24 -_080910D8: - cmp r0, 0 - beq _080910EA - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetStepInPlaceDelay16AnimId - lsls r0, 24 - lsrs r6, r0, 24 -_080910EA: - adds r0, r4, 0 - mov r1, r8 - adds r2, r6, 0 - bl FieldObjectSetRegularAnim - ldrb r0, [r4] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r4] - movs r0, 0x2 - mov r1, r8 - strh r0, [r1, 0x30] - movs r0, 0x1 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end MoveFieldObjectInNextDirectionInSequence - thumb_func_start sub_8091110 @ bool8 sub_8091110(struct npc_state *fieldObject, struct obj *object) sub_8091110: @ 8091110 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 91856d1ee..cfe04f395 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3062,3 +3062,39 @@ bool8 sub_8091020 (struct MapObject *mapObject, struct Sprite *sprite) } return FALSE; } + +bool8 sub_8091048(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + sprite->data1 = 1; + return TRUE; +} + +bool8 MoveFieldObjectInNextDirectionInSequence(struct MapObject *mapObject, struct Sprite *sprite, u8 *route) +{ + u8 blockingWay; + u8 animId; + + if (mapObject->mapobj_unk_21 == 3 && mapObject->coords1.x == mapObject->coords2.x && mapObject->coords1.y == mapObject->coords2.y) + { + mapObject->mapobj_unk_21 = 0; + } + FieldObjectSetDirection(mapObject, route[mapObject->mapobj_unk_21]); + animId = GetGoSpeed0AnimId(mapObject->placeholder18); + blockingWay = npc_block_way__next_tile(mapObject, mapObject->placeholder18); + if (blockingWay == TRUE) + { + mapObject->mapobj_unk_21 ++; + FieldObjectSetDirection(mapObject, route[mapObject->mapobj_unk_21]); + animId = GetGoSpeed0AnimId(mapObject->placeholder18); + blockingWay = npc_block_way__next_tile(mapObject, mapObject->placeholder18); + } + if (blockingWay) + { + animId = GetStepInPlaceDelay16AnimId(mapObject->mapobj_unk_18); + } + FieldObjectSetRegularAnim(mapObject, sprite, animId); + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 2; + return TRUE; +} From 54c8580d34b61dfd1db5dd91e301dfc788e564de Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 15 Sep 2017 22:12:45 -0400 Subject: [PATCH 107/342] rom_81700F8 --- asm/rom_81700F8.s | 64 --------------------------------------------- include/gpu_regs.h | 15 +++++++++++ include/load_save.h | 1 + include/malloc.h | 3 +++ include/new_game.h | 2 ++ include/rom4.h | 15 +++++++++++ include/save.h | 4 +++ ld_script.txt | 2 +- src/rom_81700F8.c | 32 +++++++++++++++++++++++ 9 files changed, 73 insertions(+), 65 deletions(-) delete mode 100644 asm/rom_81700F8.s create mode 100644 include/gpu_regs.h create mode 100644 include/rom4.h create mode 100644 src/rom_81700F8.c diff --git a/asm/rom_81700F8.s b/asm/rom_81700F8.s deleted file mode 100644 index 45c505cd9..000000000 --- a/asm/rom_81700F8.s +++ /dev/null @@ -1,64 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_81700F8 -sub_81700F8: @ 81700F8 - push {r4,r5,lr} - ldr r5, =0x04000208 - ldrh r4, [r5] - movs r0, 0 - strh r0, [r5] - movs r0, 0x1 - bl RegisterRamReset - movs r0, 0 - movs r1, 0x80 - bl ClearGpuRegBits - strh r4, [r5] - ldr r1, =gMain - ldr r0, =0x00000439 - adds r1, r0 - ldrb r2, [r1] - movs r0, 0x3 - negs r0, r0 - ands r0, r2 - strb r0, [r1] - bl sub_815355C - lsls r0, 16 - lsrs r0, 16 - bl SetSaveBlocksPointers - bl sub_808447C - bl ResetSaveCounters - movs r0, 0 - bl sub_81534D0 - ldr r0, =gSaveFileStatus - ldrh r0, [r0] - cmp r0, 0 - beq _08170148 - cmp r0, 0x2 - bne _0817014C -_08170148: - bl Sav2_ClearSetDefault -_0817014C: - ldr r0, =gSaveBlock2Ptr - ldr r0, [r0] - ldrb r0, [r0, 0x15] - lsls r0, 31 - lsrs r0, 31 - bl SetPokemonCryStereo - ldr r0, =0x02000000 - movs r1, 0xE0 - lsls r1, 9 - bl InitHeap - ldr r0, =sub_8086230 - bl SetMainCallback2 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81700F8 - - .align 2, 0 @ Don't pad with nop. diff --git a/include/gpu_regs.h b/include/gpu_regs.h new file mode 100644 index 000000000..2d47d602c --- /dev/null +++ b/include/gpu_regs.h @@ -0,0 +1,15 @@ +// +// Created by scott on 9/15/2017. +// + +#ifndef POKEEMERALD_GPU_REGS_H +#define POKEEMERALD_GPU_REGS_H + +// Exported type declarations + +// Exported RAM declarations + +// Exported ROM declarations +void ClearGpuRegBits(u8 regOffset, u16 mask); + +#endif //POKEEMERALD_GPU_REGS_H diff --git a/include/load_save.h b/include/load_save.h index 0fedd720b..20848e1a7 100644 --- a/include/load_save.h +++ b/include/load_save.h @@ -18,5 +18,6 @@ void SaveSerializedGame(void); void LoadSerializedGame(void); void LoadPlayerBag(void); void SavePlayerBag(void); +void SetSaveBlocksPointers(u16); #endif // GUARD_LOAD_SAVE_H diff --git a/include/malloc.h b/include/malloc.h index bd870ede3..d26d19242 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -1,8 +1,11 @@ #ifndef GUARD_MALLOC_H #define GUARD_MALLOC_H +extern u8 gHeap[]; + void *Alloc(u32 size); void *AllocZeroed(u32 size); void Free(void *pointer); +void InitHeap(void *pointer, u32 size); #endif // GUARD_MALLOC_H diff --git a/include/new_game.h b/include/new_game.h index f9ad7fcb8..060279c25 100644 --- a/include/new_game.h +++ b/include/new_game.h @@ -9,5 +9,7 @@ void ClearPokedexFlags(void); void WarpToTruck(void); void NewGameInitData(void); void ResetMiniGamesResults(void); +void sub_808447C(void); +void Sav2_ClearSetDefault(void); #endif // GUARD_NEW_GAME_H diff --git a/include/rom4.h b/include/rom4.h new file mode 100644 index 000000000..1538f5dbc --- /dev/null +++ b/include/rom4.h @@ -0,0 +1,15 @@ +// +// Created by scott on 9/15/2017. +// + +#ifndef POKEEMERALD_ROM4_H +#define POKEEMERALD_ROM4_H + +// Exported type declarations + +// Exported RAM declarations + +// Exported ROM declarations +void sub_8086230(void); + +#endif //POKEEMERALD_ROM4_H diff --git a/include/save.h b/include/save.h index 1d7fdd6e3..e98233c67 100644 --- a/include/save.h +++ b/include/save.h @@ -1,6 +1,8 @@ #ifndef GUARD_SAVE_H #define GUARD_SAVE_H +extern u16 gSaveFileStatus; + struct SaveSectionLocation { void *data; @@ -88,5 +90,7 @@ u16 CalculateChecksum(void *, u16); //u8 unref_sub_8125FF0(u8 *data, u16 size); //u8 unref_sub_8126068(u8 sector, u8 *data, u32 size); //u8 unref_sub_8126080(u8 sector, u8 *data); +u16 sub_815355C(void); +u8 sub_81534D0(u8); #endif // GUARD_SAVE_H diff --git a/ld_script.txt b/ld_script.txt index 4a5bb643a..e8c8a43ce 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -206,7 +206,7 @@ SECTIONS { asm/battle_controller_wally.o(.text); asm/player_pc.o(.text); asm/intro.o(.text); - asm/rom_81700F8.o(.text); + src/rom_81700F8.o(.text); asm/field_region_map.o(.text); asm/battle_anim_8170478.o(.text); asm/hall_of_fame.o(.text); diff --git a/src/rom_81700F8.c b/src/rom_81700F8.c new file mode 100644 index 000000000..b786ff9f8 --- /dev/null +++ b/src/rom_81700F8.c @@ -0,0 +1,32 @@ +#include "global.h" +#include "main.h" +#include "gpu_regs.h" +#include "m4a.h" +#include "load_save.h" +#include "save.h" +#include "new_game.h" +#include "rom4.h" +#include "malloc.h" + +void sub_81700F8(void) +{ + u16 imeBackup; + + imeBackup = REG_IME; + REG_IME = 0; + RegisterRamReset(0x00000001); + ClearGpuRegBits(REG_OFFSET_DISPCNT, 0x80); + REG_IME = imeBackup; + gMain.inBattle = FALSE; + SetSaveBlocksPointers(sub_815355C()); + sub_808447C(); + ResetSaveCounters(); + sub_81534D0(0); + if (gSaveFileStatus == 0 || gSaveFileStatus == 2) + { + Sav2_ClearSetDefault(); + } + SetPokemonCryStereo(gSaveBlock2Ptr->optionsSound); + InitHeap(gHeap, 0x1c000); + SetMainCallback2(sub_8086230); +} From a082f9258148831bfa35d925e4d0fd05e7479e6f Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 08:13:37 -0400 Subject: [PATCH 108/342] sub_8091110 --- asm/field_map_obj.s | 24 ------------------------ src/field_map_obj.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index fc8efe4c8..7a6d08ea3 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,30 +5,6 @@ .text - thumb_func_start sub_8091110 -@ bool8 sub_8091110(struct npc_state *fieldObject, struct obj *object) -sub_8091110: @ 8091110 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _0809112E - ldrb r0, [r4] - movs r1, 0x3 - negs r1, r1 - ands r1, r0 - strb r1, [r4] - movs r0, 0x1 - strh r0, [r5, 0x30] -_0809112E: - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8091110 - thumb_func_start FieldObjectCB_GoInDirectionSequence1 FieldObjectCB_GoInDirectionSequence1: @ 8091138 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index cfe04f395..0c6397730 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3098,3 +3098,13 @@ bool8 MoveFieldObjectInNextDirectionInSequence(struct MapObject *mapObject, stru sprite->data1 = 2; return TRUE; } + +bool8 sub_8091110(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 1; + } + return FALSE; +} From 86df6d10736e1b680e874d7440f478fe5ddf8105 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 08:44:43 -0400 Subject: [PATCH 109/342] Field object path movement --- asm/field_map_obj.s | 1753 ------------------------------------------- include/data3.h | 1 + src/field_map_obj.c | 39 + 3 files changed, 40 insertions(+), 1753 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 7a6d08ea3..fbe6aa8d8 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,1759 +5,6 @@ .text - thumb_func_start FieldObjectCB_GoInDirectionSequence1 -FieldObjectCB_GoInDirectionSequence1: @ 8091138 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_809115C - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence1 - - thumb_func_start sub_809115C -sub_809115C: @ 809115C - push {r4,lr} - ldr r3, =gUnknown_0850D8DC - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_809115C - - thumb_func_start sub_809117C -sub_809117C: @ 809117C - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D8E8 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _080911A8 - movs r0, 0xC - ldrsh r1, [r4, r0] - movs r3, 0x10 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _080911A8 - movs r0, 0x3 - strb r0, [r2] -_080911A8: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_809117C - - thumb_func_start FieldObjectCB_GoInDirectionSequence2 -FieldObjectCB_GoInDirectionSequence2: @ 80911C4 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_80911E8 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence2 - - thumb_func_start sub_80911E8 -sub_80911E8: @ 80911E8 - push {r4,lr} - ldr r3, =gUnknown_0850D8EC - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80911E8 - - thumb_func_start sub_8091208 -sub_8091208: @ 8091208 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D8F8 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x1 - bne _08091234 - movs r0, 0xC - ldrsh r1, [r4, r0] - movs r3, 0x10 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091234 - movs r0, 0x2 - strb r0, [r2] -_08091234: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091208 - - thumb_func_start FieldObjectCB_GoInDirectionSequence3 -FieldObjectCB_GoInDirectionSequence3: @ 8091250 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091274 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence3 - - thumb_func_start sub_8091274 -sub_8091274: @ 8091274 - push {r4,lr} - ldr r3, =gUnknown_0850D8FC - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091274 - - thumb_func_start sub_8091294 -sub_8091294: @ 8091294 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D908 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x1 - bne _080912C0 - movs r0, 0xE - ldrsh r1, [r4, r0] - movs r3, 0x12 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _080912C0 - movs r0, 0x2 - strb r0, [r2] -_080912C0: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091294 - - thumb_func_start FieldObjectCB_GoInDirectionSequence4 -FieldObjectCB_GoInDirectionSequence4: @ 80912DC - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091300 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence4 - - thumb_func_start sub_8091300 -sub_8091300: @ 8091300 - push {r4,lr} - ldr r3, =gUnknown_0850D90C - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091300 - - thumb_func_start sub_8091320 -sub_8091320: @ 8091320 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D918 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _0809134C - movs r0, 0xE - ldrsh r1, [r4, r0] - movs r3, 0x12 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _0809134C - movs r0, 0x3 - strb r0, [r2] -_0809134C: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091320 - - thumb_func_start FieldObjectCB_GoInDirectionSequence5 -FieldObjectCB_GoInDirectionSequence5: @ 8091368 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_809138C - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence5 - - thumb_func_start sub_809138C -sub_809138C: @ 809138C - push {r4,lr} - ldr r3, =gUnknown_0850D91C - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_809138C - - thumb_func_start sub_80913AC -@ bool8 sub_80913AC(struct npc_state *fieldObject, struct obj *object) -sub_80913AC: @ 80913AC - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D928 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _080913D8 - movs r0, 0xC - ldrsh r1, [r4, r0] - movs r3, 0x10 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _080913D8 - movs r0, 0x3 - strb r0, [r2] -_080913D8: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80913AC - - thumb_func_start FieldObjectCB_GoInDirectionSequence6 -FieldObjectCB_GoInDirectionSequence6: @ 80913F4 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091418 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence6 - - thumb_func_start sub_8091418 -sub_8091418: @ 8091418 - push {r4,lr} - ldr r3, =gUnknown_0850D92C - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091418 - - thumb_func_start sub_8091438 -sub_8091438: @ 8091438 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D938 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x1 - bne _08091464 - movs r0, 0xC - ldrsh r1, [r4, r0] - movs r3, 0x10 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091464 - movs r0, 0x2 - strb r0, [r2] -_08091464: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091438 - - thumb_func_start FieldObjectCB_GoInDirectionSequence7 -FieldObjectCB_GoInDirectionSequence7: @ 8091480 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_80914A4 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence7 - - thumb_func_start sub_80914A4 -sub_80914A4: @ 80914A4 - push {r4,lr} - ldr r3, =gUnknown_0850D93C - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80914A4 - - thumb_func_start sub_80914C4 -sub_80914C4: @ 80914C4 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D710 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x1 - bne _080914F0 - movs r0, 0xE - ldrsh r1, [r4, r0] - movs r3, 0x12 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _080914F0 - movs r0, 0x2 - strb r0, [r2] -_080914F0: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80914C4 - - thumb_func_start FieldObjectCB_GoInDirectionSequence8 -FieldObjectCB_GoInDirectionSequence8: @ 809150C - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091530 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence8 - - thumb_func_start sub_8091530 -sub_8091530: @ 8091530 - push {r4,lr} - ldr r3, =gUnknown_0850D948 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091530 - - thumb_func_start sub_8091550 -sub_8091550: @ 8091550 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D954 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _0809157C - movs r0, 0xE - ldrsh r1, [r4, r0] - movs r3, 0x12 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _0809157C - movs r0, 0x3 - strb r0, [r2] -_0809157C: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091550 - - thumb_func_start FieldObjectCB_GoInDirectionSequence9 -FieldObjectCB_GoInDirectionSequence9: @ 8091598 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_80915BC - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence9 - - thumb_func_start sub_80915BC -sub_80915BC: @ 80915BC - push {r4,lr} - ldr r3, =gUnknown_0850D958 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80915BC - - thumb_func_start sub_80915DC -sub_80915DC: @ 80915DC - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D964 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _08091608 - movs r0, 0xE - ldrsh r1, [r4, r0] - movs r3, 0x12 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091608 - movs r0, 0x3 - strb r0, [r2] -_08091608: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80915DC - - thumb_func_start FieldObjectCB_GoInDirectionSequence10 -FieldObjectCB_GoInDirectionSequence10: @ 8091624 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091648 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence10 - - thumb_func_start sub_8091648 -sub_8091648: @ 8091648 - push {r4,lr} - ldr r3, =gUnknown_0850D968 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091648 - - thumb_func_start sub_8091668 -sub_8091668: @ 8091668 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D974 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x1 - bne _08091694 - movs r0, 0xE - ldrsh r1, [r4, r0] - movs r3, 0x12 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091694 - movs r0, 0x2 - strb r0, [r2] -_08091694: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091668 - - thumb_func_start FieldObjectCB_GoInDirectionSequence11 -FieldObjectCB_GoInDirectionSequence11: @ 80916B0 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_80916D4 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence11 - - thumb_func_start sub_80916D4 -sub_80916D4: @ 80916D4 - push {r4,lr} - ldr r3, =gUnknown_0850D978 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80916D4 - - thumb_func_start sub_80916F4 -sub_80916F4: @ 80916F4 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D984 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x1 - bne _08091720 - movs r0, 0xC - ldrsh r1, [r4, r0] - movs r3, 0x10 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091720 - movs r0, 0x2 - strb r0, [r2] -_08091720: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80916F4 - - thumb_func_start FieldObjectCB_GoInDirectionSequence12 -FieldObjectCB_GoInDirectionSequence12: @ 809173C - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091760 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence12 - - thumb_func_start sub_8091760 -sub_8091760: @ 8091760 - push {r4,lr} - ldr r3, =gUnknown_0850D988 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091760 - - thumb_func_start sub_8091780 -sub_8091780: @ 8091780 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D994 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _080917AC - movs r0, 0xC - ldrsh r1, [r4, r0] - movs r3, 0x10 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _080917AC - movs r0, 0x3 - strb r0, [r2] -_080917AC: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091780 - - thumb_func_start FieldObjectCB_GoInDirectionSequence13 -FieldObjectCB_GoInDirectionSequence13: @ 80917C8 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_80917EC - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence13 - - thumb_func_start sub_80917EC -sub_80917EC: @ 80917EC - push {r4,lr} - ldr r3, =gUnknown_0850D998 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80917EC - - thumb_func_start sub_809180C -sub_809180C: @ 809180C - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D9A4 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _08091838 - movs r0, 0xE - ldrsh r1, [r4, r0] - movs r3, 0x12 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091838 - movs r0, 0x3 - strb r0, [r2] -_08091838: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_809180C - - thumb_func_start FieldObjectCB_GoInDirectionSequence14 -FieldObjectCB_GoInDirectionSequence14: @ 8091854 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091878 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence14 - - thumb_func_start sub_8091878 -sub_8091878: @ 8091878 - push {r4,lr} - ldr r3, =gUnknown_0850D9A8 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091878 - - thumb_func_start sub_8091898 -sub_8091898: @ 8091898 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D9B4 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x1 - bne _080918C4 - movs r0, 0xE - ldrsh r1, [r4, r0] - movs r3, 0x12 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _080918C4 - movs r0, 0x2 - strb r0, [r2] -_080918C4: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091898 - - thumb_func_start FieldObjectCB_GoInDirectionSequence15 -FieldObjectCB_GoInDirectionSequence15: @ 80918E0 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091904 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence15 - - thumb_func_start sub_8091904 -sub_8091904: @ 8091904 - push {r4,lr} - ldr r3, =gUnknown_0850D9B8 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091904 - - thumb_func_start sub_8091924 -sub_8091924: @ 8091924 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D9C4 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x1 - bne _08091950 - movs r0, 0xC - ldrsh r1, [r4, r0] - movs r3, 0x10 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091950 - movs r0, 0x2 - strb r0, [r2] -_08091950: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091924 - - thumb_func_start FieldObjectCB_GoInDirectionSequence16 -FieldObjectCB_GoInDirectionSequence16: @ 809196C - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091990 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence16 - - thumb_func_start sub_8091990 -sub_8091990: @ 8091990 - push {r4,lr} - ldr r3, =gUnknown_0850D9C8 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091990 - - thumb_func_start sub_80919B0 -sub_80919B0: @ 80919B0 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D9D4 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _080919DC - movs r0, 0xC - ldrsh r1, [r4, r0] - movs r3, 0x10 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _080919DC - movs r0, 0x3 - strb r0, [r2] -_080919DC: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80919B0 - - thumb_func_start FieldObjectCB_GoInDirectionSequence17 -FieldObjectCB_GoInDirectionSequence17: @ 80919F8 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091A1C - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence17 - - thumb_func_start sub_8091A1C -sub_8091A1C: @ 8091A1C - push {r4,lr} - ldr r3, =gUnknown_0850D9D8 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091A1C - - thumb_func_start sub_8091A3C -sub_8091A3C: @ 8091A3C - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D9E4 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _08091A68 - movs r0, 0xE - ldrsh r1, [r4, r0] - movs r3, 0x12 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091A68 - movs r0, 0x3 - strb r0, [r2] -_08091A68: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091A3C - - thumb_func_start FieldObjectCB_GoInDirectionSequence18 -FieldObjectCB_GoInDirectionSequence18: @ 8091A84 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091AA8 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence18 - - thumb_func_start sub_8091AA8 -sub_8091AA8: @ 8091AA8 - push {r4,lr} - ldr r3, =gUnknown_0850D9E8 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091AA8 - - thumb_func_start sub_8091AC8 -sub_8091AC8: @ 8091AC8 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850D9F4 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _08091AF4 - movs r0, 0xE - ldrsh r1, [r4, r0] - movs r3, 0x12 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091AF4 - movs r0, 0x3 - strb r0, [r2] -_08091AF4: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091AC8 - - thumb_func_start FieldObjectCB_GoInDirectionSequence19 -FieldObjectCB_GoInDirectionSequence19: @ 8091B10 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091B34 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence19 - - thumb_func_start sub_8091B34 -sub_8091B34: @ 8091B34 - push {r4,lr} - ldr r3, =gUnknown_0850D9F8 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091B34 - - thumb_func_start sub_8091B54 -sub_8091B54: @ 8091B54 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850DA04 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _08091B80 - movs r0, 0xC - ldrsh r1, [r4, r0] - movs r3, 0x10 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091B80 - movs r0, 0x3 - strb r0, [r2] -_08091B80: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091B54 - - thumb_func_start FieldObjectCB_GoInDirectionSequence20 -FieldObjectCB_GoInDirectionSequence20: @ 8091B9C - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091BC0 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence20 - - thumb_func_start sub_8091BC0 -sub_8091BC0: @ 8091BC0 - push {r4,lr} - ldr r3, =gUnknown_0850DA08 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091BC0 - - thumb_func_start sub_8091BE0 -sub_8091BE0: @ 8091BE0 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850DA14 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _08091C0C - movs r0, 0xC - ldrsh r1, [r4, r0] - movs r3, 0x10 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091C0C - movs r0, 0x3 - strb r0, [r2] -_08091C0C: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091BE0 - - thumb_func_start FieldObjectCB_GoInDirectionSequence21 -FieldObjectCB_GoInDirectionSequence21: @ 8091C28 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091C4C - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence21 - - thumb_func_start sub_8091C4C -sub_8091C4C: @ 8091C4C - push {r4,lr} - ldr r3, =gUnknown_0850DA18 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091C4C - - thumb_func_start sub_8091C6C -sub_8091C6C: @ 8091C6C - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850DA24 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _08091C98 - movs r0, 0xE - ldrsh r1, [r4, r0] - movs r3, 0x12 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091C98 - movs r0, 0x3 - strb r0, [r2] -_08091C98: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091C6C - - thumb_func_start FieldObjectCB_GoInDirectionSequence22 -FieldObjectCB_GoInDirectionSequence22: @ 8091CB4 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091CD8 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence22 - - thumb_func_start sub_8091CD8 -sub_8091CD8: @ 8091CD8 - push {r4,lr} - ldr r3, =gUnknown_0850DA28 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091CD8 - - thumb_func_start sub_8091CF8 -sub_8091CF8: @ 8091CF8 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850DA34 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _08091D24 - movs r0, 0xE - ldrsh r1, [r4, r0] - movs r3, 0x12 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091D24 - movs r0, 0x3 - strb r0, [r2] -_08091D24: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091CF8 - - thumb_func_start FieldObjectCB_GoInDirectionSequence23 -FieldObjectCB_GoInDirectionSequence23: @ 8091D40 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091D64 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence23 - - thumb_func_start sub_8091D64 -sub_8091D64: @ 8091D64 - push {r4,lr} - ldr r3, =gUnknown_0850DA38 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091D64 - - thumb_func_start sub_8091D84 -sub_8091D84: @ 8091D84 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850DA44 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _08091DB0 - movs r0, 0xC - ldrsh r1, [r4, r0] - movs r3, 0x10 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091DB0 - movs r0, 0x3 - strb r0, [r2] -_08091DB0: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091D84 - - thumb_func_start FieldObjectCB_GoInDirectionSequence24 -FieldObjectCB_GoInDirectionSequence24: @ 8091DCC - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091DF0 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_GoInDirectionSequence24 - - thumb_func_start sub_8091DF0 -sub_8091DF0: @ 8091DF0 - push {r4,lr} - ldr r3, =gUnknown_0850DA48 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091DF0 - - thumb_func_start sub_8091E10 -sub_8091E10: @ 8091E10 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850DA54 - mov r0, sp - movs r2, 0x4 - bl memcpy - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0x2 - bne _08091E3C - movs r0, 0xC - ldrsh r1, [r4, r0] - movs r3, 0x10 - ldrsh r0, [r4, r3] - cmp r1, r0 - bne _08091E3C - movs r0, 0x3 - strb r0, [r2] -_08091E3C: - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl MoveFieldObjectInNextDirectionInSequence - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091E10 - thumb_func_start FieldObjectCB_CopyPlayer1 FieldObjectCB_CopyPlayer1: @ 8091E58 push {lr} diff --git a/include/data3.h b/include/data3.h index 3cbdcc9ce..a5ec3d08f 100755 --- a/include/data3.h +++ b/include/data3.h @@ -32,5 +32,6 @@ extern const u8 gUnknown_0850D880[4]; extern const u8 gUnknown_0850D898[4]; extern const u8 gUnknown_0850D8AC[5]; extern const u8 gUnknown_0850D8C4[5]; +extern const u8 gUnknown_0850D8E8[4]; #endif //POKEEMERALD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 0c6397730..99d417ae2 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -45,6 +45,20 @@ static bool8 FieldObjectCB2_##name(struct MapObject *mapObject, struct Sprite *s return (table)[sprite->data1](mapObject, sprite);\ } +#define field_object_path(idx, table, sub, path, catch, coord)\ +field_object_step(GoInDirectionSequence##idx, table)\ +extern const u8 path[4];\ +bool8 sub(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + u8 route[sizeof(path)];\ + memcpy(route, path, sizeof(path));\ + if (mapObject->mapobj_unk_21 == (catch) && mapObject->coords1.coord == mapObject->coords2.coord)\ + {\ + mapObject->mapobj_unk_21 = (catch) + 1;\ + }\ + return MoveFieldObjectInNextDirectionInSequence(mapObject, sprite, route);\ +}\ + // Static struct declarations // Static RAM declarations @@ -3108,3 +3122,28 @@ bool8 sub_8091110(struct MapObject *mapObject, struct Sprite *sprite) } return FALSE; } + +field_object_path( 1, gUnknown_0850D8DC, sub_809117C, gUnknown_0850D8E8, 2, x) +field_object_path( 2, gUnknown_0850D8EC, sub_8091208, gUnknown_0850D8F8, 1, x) +field_object_path( 3, gUnknown_0850D8FC, sub_8091294, gUnknown_0850D908, 1, y) +field_object_path( 4, gUnknown_0850D90C, sub_8091320, gUnknown_0850D918, 2, y) +field_object_path( 5, gUnknown_0850D91C, sub_80913AC, gUnknown_0850D928, 2, x) +field_object_path( 6, gUnknown_0850D92C, sub_8091438, gUnknown_0850D938, 1, x) +field_object_path( 7, gUnknown_0850D93C, sub_80914C4, gUnknown_0850D710, 1, y) +field_object_path( 8, gUnknown_0850D948, sub_8091550, gUnknown_0850D954, 2, y) +field_object_path( 9, gUnknown_0850D958, sub_80915DC, gUnknown_0850D964, 2, y) +field_object_path(10, gUnknown_0850D968, sub_8091668, gUnknown_0850D974, 1, y) +field_object_path(11, gUnknown_0850D978, sub_80916F4, gUnknown_0850D984, 1, x) +field_object_path(12, gUnknown_0850D988, sub_8091780, gUnknown_0850D994, 2, x) +field_object_path(13, gUnknown_0850D998, sub_809180C, gUnknown_0850D9A4, 2, y) +field_object_path(14, gUnknown_0850D9A8, sub_8091898, gUnknown_0850D9B4, 1, y) +field_object_path(15, gUnknown_0850D9B8, sub_8091924, gUnknown_0850D9C4, 1, x) +field_object_path(16, gUnknown_0850D9C8, sub_80919B0, gUnknown_0850D9D4, 2, x) +field_object_path(17, gUnknown_0850D9D8, sub_8091A3C, gUnknown_0850D9E4, 2, y) +field_object_path(18, gUnknown_0850D9E8, sub_8091AC8, gUnknown_0850D9F4, 2, y) +field_object_path(19, gUnknown_0850D9F8, sub_8091B54, gUnknown_0850DA04, 2, x) +field_object_path(20, gUnknown_0850DA08, sub_8091BE0, gUnknown_0850DA14, 2, x) +field_object_path(21, gUnknown_0850DA18, sub_8091C6C, gUnknown_0850DA24, 2, y) +field_object_path(22, gUnknown_0850DA28, sub_8091CF8, gUnknown_0850DA34, 2, y) +field_object_path(23, gUnknown_0850DA38, sub_8091D84, gUnknown_0850DA44, 2, x) +field_object_path(24, gUnknown_0850DA48, sub_8091E10, gUnknown_0850DA54, 2, x) From ee3dc1edda08ae6e2bab34b8555ec410f1a930a9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 09:43:49 -0400 Subject: [PATCH 110/342] Some more functions, including some swiss-cheesing that got out of hand --- asm/field_map_obj.s | 303 +--------------------------------- include/data3.h | 4 + include/field_player_avatar.h | 3 + ld_script.txt | 2 + src/field_map_obj.c | 123 +++++++++++++- 5 files changed, 132 insertions(+), 303 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index fbe6aa8d8..596107f53 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,175 +5,6 @@ .text - thumb_func_start FieldObjectCB_CopyPlayer1 -FieldObjectCB_CopyPlayer1: @ 8091E58 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8091E7C - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_CopyPlayer1 - - thumb_func_start sub_8091E7C -sub_8091E7C: @ 8091E7C - push {r4,lr} - ldr r3, =gUnknown_0850DA58 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091E7C - - thumb_func_start mss_npc_reset_oampriv3_1_unk2_unk3 -@ bool8 mss_npc_reset_oampriv3_1_unk2_unk3(struct npc_state *fieldObject, struct obj *object) -mss_npc_reset_oampriv3_1_unk2_unk3: @ 8091E9C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl npc_reset - adds r4, 0x21 - ldrb r0, [r4] - cmp r0, 0 - bne _08091EB4 - bl player_get_direction_lower_nybble - strb r0, [r4] -_08091EB4: - movs r0, 0x1 - strh r0, [r5, 0x30] - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end mss_npc_reset_oampriv3_1_unk2_unk3 - - thumb_func_start sub_8091EC0 -@ bool8 sub_8091EC0(struct npc_state *fieldObject, struct obj *object) -sub_8091EC0: @ 8091EC0 - push {r4-r7,lr} - adds r6, r0, 0 - adds r7, r1, 0 - ldr r2, =gMapObjects - ldr r3, =gPlayerAvatar - ldrb r1, [r3, 0x5] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1C] - cmp r0, 0xFF - beq _08091EE0 - ldrb r0, [r3, 0x3] - cmp r0, 0x2 - bne _08091EEC -_08091EE0: - movs r0, 0 - b _08091F14 - .pool -_08091EEC: - ldr r5, =gUnknown_0850DA64 - bl player_get_x22 - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 22 - adds r4, r5 - bl player_get_direction_upper_nybble - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - ldr r4, [r4] - adds r0, r6, 0 - adds r1, r7, 0 - movs r3, 0 - bl _call_via_r4 - lsls r0, 24 - lsrs r0, 24 -_08091F14: - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091EC0 - - thumb_func_start sub_8091F20 -sub_8091F20: @ 8091F20 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _08091F3E - ldrb r0, [r4] - movs r1, 0x3 - negs r1, r1 - ands r1, r0 - strb r1, [r4] - movs r0, 0x1 - strh r0, [r5, 0x30] -_08091F3E: - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8091F20 - - thumb_func_start sub_8091F48 -sub_8091F48: @ 8091F48 - movs r0, 0 - bx lr - thumb_func_end sub_8091F48 - - thumb_func_start sub_8091F4C -sub_8091F4C: @ 8091F4C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r2, 24 - lsrs r2, 24 - ldr r1, =gUnknown_085055CD - ldrb r0, [r4, 0x6] - adds r0, r1 - ldrb r0, [r0] - adds r1, r4, 0 - adds r1, 0x21 - ldrb r1, [r1] - bl state_to_direction - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - ldrb r0, [r4] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r4] - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091F4C - thumb_func_start sub_8091F94 sub_8091F94: @ 8091F94 push {r4-r7,lr} @@ -2742,139 +2573,7 @@ FieldObjectClearAnim: @ 809323C .pool thumb_func_end FieldObjectClearAnim - thumb_func_start FieldObjectCheckIfSpecialAnimFinishedOrInactive -@ u8 FieldObjectCheckIfSpecialAnimFinishedOrInactive(struct npc_state *fieldObject) -FieldObjectCheckIfSpecialAnimFinishedOrInactive: @ 8093270 - push {lr} - ldrb r1, [r0] - lsls r0, r1, 25 - cmp r0, 0 - blt _0809327E - movs r0, 0x10 - b _08093280 -_0809327E: - lsrs r0, r1, 7 -_08093280: - pop {r1} - bx r1 - thumb_func_end FieldObjectCheckIfSpecialAnimFinishedOrInactive - - thumb_func_start FieldObjectClearAnimIfSpecialAnimFinished -@ u8 FieldObjectClearAnimIfSpecialAnimFinished(struct npc_state *fieldObject) -FieldObjectClearAnimIfSpecialAnimFinished: @ 8093284 - push {r4,r5,lr} - adds r5, r0, 0 - bl FieldObjectCheckIfSpecialAnimFinishedOrInactive - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - beq _0809329E - cmp r4, 0x10 - beq _0809329E - adds r0, r5, 0 - bl FieldObjectClearAnimIfSpecialAnimActive -_0809329E: - adds r0, r4, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end FieldObjectClearAnimIfSpecialAnimFinished - - thumb_func_start FieldObjectGetSpecialAnim -@ u8 FieldObjectGetSpecialAnim(struct npc_state *fieldObject) -FieldObjectGetSpecialAnim: @ 80932A8 - push {lr} - adds r1, r0, 0 - ldrb r0, [r1] - lsls r0, 25 - cmp r0, 0 - blt _080932B8 - movs r0, 0xFF - b _080932BA -_080932B8: - ldrb r0, [r1, 0x1C] -_080932BA: - pop {r1} - bx r1 - thumb_func_end FieldObjectGetSpecialAnim - - thumb_func_start FieldObjectStep -@ void FieldObjectStep(struct npc_state *fieldObject, struct obj *object, bool8 ( *callback)(struct npc_state *fieldObject, struct obj *object)) -FieldObjectStep: @ 80932C0 - push {r4-r6,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r6, r2, 0 - bl DoGroundEffects_OnSpawn - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80964E8 - adds r0, r4, 0 - bl FieldObjectIsSpecialAnimActive - lsls r0, 24 - cmp r0, 0 - beq _080932EA - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectExecSpecialAnim - b _08093300 -_080932EA: - ldrb r0, [r4, 0x1] - lsls r0, 31 - cmp r0, 0 - bne _08093300 -_080932F2: - adds r0, r4, 0 - adds r1, r5, 0 - bl _call_via_r6 - lsls r0, 24 - cmp r0, 0 - bne _080932F2 -_08093300: - adds r0, r4, 0 - adds r1, r5, 0 - bl DoGroundEffects_OnBeginStep - adds r0, r4, 0 - adds r1, r5, 0 - bl DoGroundEffects_OnFinishStep - adds r0, r4, 0 - adds r1, r5, 0 - bl npc_obj_transfer_image_anim_pause_flag - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8096518 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectUpdateSubpriority - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end FieldObjectStep - - thumb_func_start GetFaceDirectionAnimId -@ u8 GetFaceDirectionAnimId(u8 direction) -GetFaceDirectionAnimId: @ 8093330 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBA0 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _08093348 - movs r4, 0 -_08093348: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end GetFaceDirectionAnimId + .section .text.get_simple_go_anim_id thumb_func_start GetSimpleGoAnimId @ u8 GetSimpleGoAnimId(u8 direction) diff --git a/include/data3.h b/include/data3.h index a5ec3d08f..f5efab3b7 100755 --- a/include/data3.h +++ b/include/data3.h @@ -33,5 +33,9 @@ extern const u8 gUnknown_0850D898[4]; extern const u8 gUnknown_0850D8AC[5]; extern const u8 gUnknown_0850D8C4[5]; extern const u8 gUnknown_0850D8E8[4]; +extern bool8 (*const gUnknown_0850DA64[])(struct MapObject *, struct Sprite *, u8, u8); + + +extern const u8 gUnknown_0850DBA0[5]; #endif //POKEEMERALD_DATA3_H diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index 3a74b3b10..cd00832d5 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -10,5 +10,8 @@ void SetPlayerAvatarExtraStateTransition(u8, u8); u8 GetPlayerAvatarGenderByGraphicsId(u8); bool8 TestPlayerAvatarFlags(u8); void PlayerGetDestCoords(s16 *, s16 *); +u8 player_get_direction_lower_nybble(void); +u8 player_get_direction_upper_nybble(void); +u8 player_get_x22(void); #endif //POKEEMERALD_FIELD_PLAYER_AVATAR_H diff --git a/ld_script.txt b/ld_script.txt index 702c51ec2..1e2e72f67 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -95,6 +95,8 @@ SECTIONS { asm/field_player_avatar.o(.text); src/field_map_obj.o(.text); asm/field_map_obj.o(.text); + src/field_map_obj.o(.text.get_face_direction_anim_id); + asm/field_map_obj.o(.text.get_simple_go_anim_id); asm/field_ground_effect.o(.text); asm/map_obj_8097404.o(.text); asm/field_message_box.o(.text); diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 99d417ae2..77c2a8068 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -94,12 +94,21 @@ static bool8 FieldObjectDoesZCoordMatch(struct MapObject *, u8); /*static*/ struct MapObjectTemplate *FindFieldObjectTemplateInArrayByLocalId(u8 localId, struct MapObjectTemplate *templates, u8 count); void npc_reset(struct MapObject *, struct Sprite *); void FieldObjectSetRegularAnim(struct MapObject *, struct Sprite *, u8); -u8 GetFaceDirectionAnimId(u8); +u8 GetFaceDirectionAnimId(u32); bool8 FieldObjectExecRegularAnim(struct MapObject *, struct Sprite *); void SetFieldObjectStepTimer(struct Sprite *, s16); bool8 RunFieldObjectStepTimer(struct Sprite *); bool8 npc_block_way__next_tile(struct MapObject *, u8); u8 GetGoSpeed0AnimId(u8); +u32 state_to_direction(u8, u8, u8); +void DoGroundEffects_OnSpawn(struct MapObject *, struct Sprite *); +void sub_80964E8(struct MapObject *, struct Sprite *); +bool8 FieldObjectIsSpecialAnimActive(struct MapObject *); +void FieldObjectExecSpecialAnim(struct MapObject *, struct Sprite *); +void DoGroundEffects_OnBeginStep(struct MapObject *, struct Sprite *); +void DoGroundEffects_OnFinishStep(struct MapObject *, struct Sprite *); +void npc_obj_transfer_image_anim_pause_flag(struct MapObject *, struct Sprite *); +void FieldObjectUpdateSubpriority(struct MapObject *, struct Sprite *); // ROM data @@ -3147,3 +3156,115 @@ field_object_path(21, gUnknown_0850DA18, sub_8091C6C, gUnknown_0850DA24, 2, y) field_object_path(22, gUnknown_0850DA28, sub_8091CF8, gUnknown_0850DA34, 2, y) field_object_path(23, gUnknown_0850DA38, sub_8091D84, gUnknown_0850DA44, 2, x) field_object_path(24, gUnknown_0850DA48, sub_8091E10, gUnknown_0850DA54, 2, x) + +field_object_step(CopyPlayer1, gUnknown_0850DA58) + +bool8 mss_npc_reset_oampriv3_1_unk2_unk3(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + if (mapObject->mapobj_unk_21 == 0) + { + mapObject->mapobj_unk_21 = player_get_direction_lower_nybble(); + } + sprite->data1 = 1; + return TRUE; +} + +bool8 sub_8091EC0(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (gMapObjects[gPlayerAvatar.mapObjectId].mapobj_unk_1C == 0xFF || gPlayerAvatar.running1 == 2) + { + return FALSE; + } + return gUnknown_0850DA64[player_get_x22()](mapObject, sprite, player_get_direction_upper_nybble(), 0); +} + +bool8 sub_8091F20(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + mapObject->mapobj_bit_1 = FALSE; + sprite->data1 = 1; + } + return FALSE; +} + +bool8 sub_8091F48(struct MapObject *mapObject, struct Sprite *sprite, u8 playerDirection, u8 a3) +{ + return FALSE; +} + +bool8 sub_8091F4C(struct MapObject *mapObject, struct Sprite *sprite, u8 playerDirection, u8 a3) +{ + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(state_to_direction(gUnknown_085055CD[mapObject->animPattern], mapObject->mapobj_unk_21, playerDirection))); + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 2; + return TRUE; +} + +asm(".section .text.get_face_direction_anim_id"); + +void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); + +u8 FieldObjectCheckIfSpecialAnimFinishedOrInactive(struct MapObject *mapObject) +{ + if (mapObject->mapobj_bit_6) + { + return mapObject->mapobj_bit_7; + } + return 0x10; +} + +u8 FieldObjectClearAnimIfSpecialAnimFinished(struct MapObject *mapObject) +{ + u8 specialAnimState; + + specialAnimState = FieldObjectCheckIfSpecialAnimFinishedOrInactive(mapObject); + if (specialAnimState != 0 && specialAnimState != 16) + { + FieldObjectClearAnimIfSpecialAnimActive(mapObject); + } + return specialAnimState; +} + +u8 FieldObjectGetSpecialAnim(struct MapObject *mapObject) +{ + if (mapObject->mapobj_bit_6) + { + return mapObject->mapobj_unk_1C; + } + return 0xFF; +} + +void FieldObjectStep(struct MapObject *mapObject, struct Sprite *sprite, bool8 (*callback)(struct MapObject *, struct Sprite *)) +{ + DoGroundEffects_OnSpawn(mapObject, sprite); + sub_80964E8(mapObject, sprite); + if (FieldObjectIsSpecialAnimActive(mapObject)) + { + FieldObjectExecSpecialAnim(mapObject, sprite); + } + else if (!mapObject->mapobj_bit_8) + { + while (callback(mapObject, sprite)); + } + DoGroundEffects_OnBeginStep(mapObject, sprite); + DoGroundEffects_OnFinishStep(mapObject, sprite); + npc_obj_transfer_image_anim_pause_flag(mapObject, sprite); + sub_8096518(mapObject, sprite); + FieldObjectUpdateSubpriority(mapObject, sprite); +} + +u8 GetFaceDirectionAnimId(u32 direction) +{ + u8 dirn2; + u8 animIds[sizeof gUnknown_0850DBA0]; + + dirn2 = direction; + memcpy(animIds, gUnknown_0850DBA0, sizeof gUnknown_0850DBA0); + if (dirn2 > DIR_EAST) + { + dirn2 = 0; + } + return animIds[dirn2]; +} From 66fbc9753fa8411d715fdad1067eb98c68ace27a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 13:54:33 -0400 Subject: [PATCH 111/342] sub_8091F94 --- asm/field_map_obj.s | 126 ---------------------------------------- include/data3.h | 2 +- include/field_map_obj.h | 1 + include/fieldmap.h | 15 +++++ include/rom4.h | 1 + include/rom_81BE66C.h | 2 + src/field_map_obj.c | 47 +++++++++++++-- 7 files changed, 62 insertions(+), 132 deletions(-) create mode 100644 include/fieldmap.h diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 596107f53..9910d3f42 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,132 +5,6 @@ .text - thumb_func_start sub_8091F94 -sub_8091F94: @ 8091F94 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - adds r4, r0, 0 - adds r7, r1, 0 - mov r8, r3 - lsls r2, 24 - lsrs r5, r2, 24 - adds r6, r5, 0 - bl FieldObjectIsFarawayIslandMew - lsls r0, 24 - cmp r0, 0 - beq _08091FFC - bl sub_81D427C - adds r5, r0, 0 - cmp r5, 0 - bne _08092012 - adds r5, r6, 0 - ldr r1, =gUnknown_085055CD - ldrb r0, [r4, 0x6] - adds r0, r1 - ldrb r0, [r0] - adds r1, r4, 0 - adds r1, 0x21 - ldrb r1, [r1] - adds r2, r5, 0 - bl state_to_direction - adds r5, r0, 0 - mov r3, sp - adds r3, 0x2 - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - bl FieldObjectMoveDestCoords - adds r0, r5, 0 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r7, 0 - bl FieldObjectSetRegularAnim - b _08092084 - .pool -_08091FFC: - ldr r1, =gUnknown_085055CD - ldrb r0, [r4, 0x6] - adds r0, r1 - ldrb r0, [r0] - adds r1, r4, 0 - adds r1, 0x21 - ldrb r1, [r1] - adds r2, r5, 0 - bl state_to_direction - adds r5, r0, 0 -_08092012: - mov r6, sp - adds r6, 0x2 - adds r0, r4, 0 - adds r1, r5, 0 - mov r2, sp - adds r3, r6, 0 - bl FieldObjectMoveDestCoords - adds r0, r5, 0 - bl GetGoSpeed0AnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r7, 0 - bl FieldObjectSetRegularAnim - mov r0, sp - movs r2, 0 - ldrsh r1, [r0, r2] - movs r0, 0 - ldrsh r2, [r6, r0] - adds r0, r4, 0 - adds r3, r5, 0 - bl npc_block_way - lsls r0, 24 - cmp r0, 0 - bne _08092070 - mov r1, r8 - cmp r1, 0 - beq _08092084 - mov r0, sp - movs r2, 0 - ldrsh r0, [r0, r2] - movs r2, 0 - ldrsh r1, [r6, r2] - bl MapGridGetMetatileBehaviorAt - lsls r0, 24 - lsrs r0, 24 - bl _call_via_r8 - lsls r0, 24 - cmp r0, 0 - bne _08092084 -_08092070: - adds r0, r5, 0 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r7, 0 - bl FieldObjectSetRegularAnim -_08092084: - ldrb r0, [r4] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r4] - movs r0, 0x2 - strh r0, [r7, 0x30] - movs r0, 0x1 - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8091F94 - thumb_func_start sub_80920A4 sub_80920A4: @ 80920A4 push {r4-r7,lr} diff --git a/include/data3.h b/include/data3.h index f5efab3b7..2b5cc1bc5 100755 --- a/include/data3.h +++ b/include/data3.h @@ -33,7 +33,7 @@ extern const u8 gUnknown_0850D898[4]; extern const u8 gUnknown_0850D8AC[5]; extern const u8 gUnknown_0850D8C4[5]; extern const u8 gUnknown_0850D8E8[4]; -extern bool8 (*const gUnknown_0850DA64[])(struct MapObject *, struct Sprite *, u8, u8); +extern bool8 (*const gUnknown_0850DA64[])(struct MapObject *, struct Sprite *, u8, bool8(u8)); extern const u8 gUnknown_0850DBA0[5]; diff --git a/include/field_map_obj.h b/include/field_map_obj.h index db1ed233f..536d9d1a4 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -64,6 +64,7 @@ void sub_808F254(u8, u8, u8); void FieldObjectStep(struct MapObject *, struct Sprite *, bool8(struct MapObject *, struct Sprite *)); u8 GetOppositeDirection(u8); u8 GetStepInPlaceDelay16AnimId(u8); +u8 npc_block_way(struct MapObject *, s16, s16, u32); // Exported data declarations diff --git a/include/fieldmap.h b/include/fieldmap.h new file mode 100644 index 000000000..7057fe889 --- /dev/null +++ b/include/fieldmap.h @@ -0,0 +1,15 @@ +// +// Created by scott on 9/16/2017. +// + +#ifndef POKEEMERALD_FIELDMAP_H +#define POKEEMERALD_FIELDMAP_H + +// Exported type declarations + +// Exported RAM declarations + +// Exported ROM declarations +u8 MapGridGetMetatileBehaviorAt(s16, s16); + +#endif //POKEEMERALD_FIELDMAP_H diff --git a/include/rom4.h b/include/rom4.h index 0c7b87353..78dca24c4 100644 --- a/include/rom4.h +++ b/include/rom4.h @@ -26,5 +26,6 @@ extern struct LinkPlayerMapObject gLinkPlayerMapObjects[4]; void strange_npc_table_clear(void); const struct MapHeader *get_mapheader_by_bank_and_number(u8, u8); +void FieldObjectMoveDestCoords(struct MapObject *, u32, s16 *, s16 *); #endif //POKEEMERALD_ROM4_H diff --git a/include/rom_81BE66C.h b/include/rom_81BE66C.h index d92c500d6..e4e39fb08 100644 --- a/include/rom_81BE66C.h +++ b/include/rom_81BE66C.h @@ -6,5 +6,7 @@ #define POKEEMERALD_ROM_81BE66C_H bool32 InTrainerHill(void); +bool8 FieldObjectIsFarawayIslandMew(struct MapObject *); +u32 sub_81D427C(void); #endif //POKEEMERALD_ROM_81BE66C_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 77c2a8068..cdf4006de 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -10,6 +10,7 @@ #include "berry.h" #include "palette.h" #include "field_player_avatar.h" +#include "fieldmap.h" #include "event_data.h" #include "rom_818CFC8.h" #include "rom_81BE66C.h" @@ -95,12 +96,12 @@ static bool8 FieldObjectDoesZCoordMatch(struct MapObject *, u8); void npc_reset(struct MapObject *, struct Sprite *); void FieldObjectSetRegularAnim(struct MapObject *, struct Sprite *, u8); u8 GetFaceDirectionAnimId(u32); +u8 GetGoSpeed0AnimId(u32); bool8 FieldObjectExecRegularAnim(struct MapObject *, struct Sprite *); void SetFieldObjectStepTimer(struct Sprite *, s16); bool8 RunFieldObjectStepTimer(struct Sprite *); bool8 npc_block_way__next_tile(struct MapObject *, u8); -u8 GetGoSpeed0AnimId(u8); -u32 state_to_direction(u8, u8, u8); +u32 state_to_direction(u8, u8, u32); void DoGroundEffects_OnSpawn(struct MapObject *, struct Sprite *); void sub_80964E8(struct MapObject *, struct Sprite *); bool8 FieldObjectIsSpecialAnimActive(struct MapObject *); @@ -3176,7 +3177,7 @@ bool8 sub_8091EC0(struct MapObject *mapObject, struct Sprite *sprite) { return FALSE; } - return gUnknown_0850DA64[player_get_x22()](mapObject, sprite, player_get_direction_upper_nybble(), 0); + return gUnknown_0850DA64[player_get_x22()](mapObject, sprite, player_get_direction_upper_nybble(), NULL); } bool8 sub_8091F20(struct MapObject *mapObject, struct Sprite *sprite) @@ -3189,12 +3190,12 @@ bool8 sub_8091F20(struct MapObject *mapObject, struct Sprite *sprite) return FALSE; } -bool8 sub_8091F48(struct MapObject *mapObject, struct Sprite *sprite, u8 playerDirection, u8 a3) +bool8 sub_8091F48(struct MapObject *mapObject, struct Sprite *sprite, u8 playerDirection, bool8 tileCB(u8)) { return FALSE; } -bool8 sub_8091F4C(struct MapObject *mapObject, struct Sprite *sprite, u8 playerDirection, u8 a3) +bool8 sub_8091F4C(struct MapObject *mapObject, struct Sprite *sprite, u8 playerDirection, bool8 tileCB(u8)) { FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(state_to_direction(gUnknown_085055CD[mapObject->animPattern], mapObject->mapobj_unk_21, playerDirection))); mapObject->mapobj_bit_1 = TRUE; @@ -3202,6 +3203,42 @@ bool8 sub_8091F4C(struct MapObject *mapObject, struct Sprite *sprite, u8 playerD return TRUE; } +bool8 sub_8091F94(struct MapObject *mapObject, struct Sprite *sprite, u8 playerDirection, bool8 tileCB(u8)) +{ + u32 direction; + s16 x; + s16 y; + + direction = playerDirection; + if (FieldObjectIsFarawayIslandMew(mapObject)) + { + direction = sub_81D427C(); + if (direction == 0) + { + direction = playerDirection; + direction = state_to_direction(gUnknown_085055CD[mapObject->animPattern], mapObject->mapobj_unk_21, direction); + FieldObjectMoveDestCoords(mapObject, direction, &x, &y); + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(direction)); + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 2; + return TRUE; + } + } + else + { + direction = state_to_direction(gUnknown_085055CD[mapObject->animPattern], mapObject->mapobj_unk_21, direction); + } + FieldObjectMoveDestCoords(mapObject, direction, &x, &y); + FieldObjectSetRegularAnim(mapObject, sprite, GetGoSpeed0AnimId(direction)); + if (npc_block_way(mapObject, x, y, direction) || (tileCB != NULL && !tileCB(MapGridGetMetatileBehaviorAt(x, y)))) + { + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(direction)); + } + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 2; + return TRUE; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 18e06b480b13143b8870675a763fb2f9854f9679 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 15:13:06 -0400 Subject: [PATCH 112/342] Fix header guards --- include/data3.h | 6 +++--- include/event_scripts.h | 6 +++--- include/field_effect.h | 6 +++--- include/field_effect_helpers.h | 6 +++--- include/field_ground_effect.h | 6 +++--- include/field_map_obj.h | 6 +++--- include/field_player_avatar.h | 6 +++--- include/fieldmap.h | 6 +++--- include/map_obj_8097404.h | 6 +++--- include/rom4.h | 6 +++--- include/rom_818CFC8.h | 6 +++--- include/rom_81BE66C.h | 6 +++--- 12 files changed, 36 insertions(+), 36 deletions(-) diff --git a/include/data3.h b/include/data3.h index 2b5cc1bc5..b2b19b050 100755 --- a/include/data3.h +++ b/include/data3.h @@ -2,8 +2,8 @@ // Created by Scott Norton on 9/8/17. // -#ifndef POKEEMERALD_DATA3_H -#define POKEEMERALD_DATA3_H +#ifndef GUARD_DATA3_H +#define GUARD_DATA3_H struct PairedPalettes { u16 tag; @@ -38,4 +38,4 @@ extern bool8 (*const gUnknown_0850DA64[])(struct MapObject *, struct Sprite *, u extern const u8 gUnknown_0850DBA0[5]; -#endif //POKEEMERALD_DATA3_H +#endif //GUARD_DATA3_H diff --git a/include/event_scripts.h b/include/event_scripts.h index 967bc196a..f1abdd6f6 100755 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -2,10 +2,10 @@ // Created by scott on 9/12/2017. // -#ifndef POKEEMERALD_EVENT_SCRIPTS_H -#define POKEEMERALD_EVENT_SCRIPTS_H +#ifndef GUARD_EVENT_SCRIPTS_H +#define GUARD_EVENT_SCRIPTS_H extern const u8 gUnknown_082766A2[]; extern const u8 gUnknown_082766A6[]; -#endif //POKEEMERALD_EVENT_SCRIPTS_H +#endif //GUARD_EVENT_SCRIPTS_H diff --git a/include/field_effect.h b/include/field_effect.h index 8cf866725..7ec26b3d7 100644 --- a/include/field_effect.h +++ b/include/field_effect.h @@ -2,8 +2,8 @@ // Created by Scott Norton on 9/15/17. // -#ifndef POKEEMERALD_FIELD_EFFECTS_H -#define POKEEMERALD_FIELD_EFFECTS_H +#ifndef GUARD_FIELD_EFFECTS_H +#define GUARD_FIELD_EFFECTS_H enum FieldEffectScriptIdx { @@ -77,4 +77,4 @@ extern u32 gFieldEffectSpawnParams[8]; u8 FieldEffectStart(u8); -#endif //POKEEMERALD_FIELD_EFFECTS_H +#endif //GUARD_FIELD_EFFECTS_H diff --git a/include/field_effect_helpers.h b/include/field_effect_helpers.h index 673d59139..6504a84f1 100644 --- a/include/field_effect_helpers.h +++ b/include/field_effect_helpers.h @@ -2,8 +2,8 @@ // Created by scott on 9/7/2017. // -#ifndef POKEEMERALD_FIELD_EFFECT_HELPERS_H -#define POKEEMERALD_FIELD_EFFECT_HELPERS_H +#ifndef GUARD_FIELD_EFFECT_HELPERS_H +#define GUARD_FIELD_EFFECT_HELPERS_H // Exported type declarations @@ -12,4 +12,4 @@ // Exported ROM declarations u8 sub_8154228(void); -#endif //POKEEMERALD_FIELD_EFFECT_HELPERS_H +#endif //GUARD_FIELD_EFFECT_HELPERS_H diff --git a/include/field_ground_effect.h b/include/field_ground_effect.h index 0c90f50dc..e2dc3a00f 100644 --- a/include/field_ground_effect.h +++ b/include/field_ground_effect.h @@ -2,8 +2,8 @@ // Created by scott on 9/6/2017. // -#ifndef POKEEMERALD_FIELD_GROUND_EFFECT_H -#define POKEEMERALD_FIELD_GROUND_EFFECT_H +#ifndef GUARD_FIELD_GROUND_EFFECT_H +#define GUARD_FIELD_GROUND_EFFECT_H // Exported type declarations @@ -13,4 +13,4 @@ void SetObjectSubpriorityByZCoord(u8, struct Sprite *, u8); void InitObjectPriorityByZCoord(struct Sprite *, u8); -#endif //POKEEMERALD_FIELD_GROUND_EFFECT_H +#endif //GUARD_FIELD_GROUND_EFFECT_H diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 536d9d1a4..f603e9a8e 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -1,5 +1,5 @@ -#ifndef POKEEMERALD_FIELD_MAP_OBJ_H -#define POKEEMERALD_FIELD_MAP_OBJ_H +#ifndef GUARD_FIELD_MAP_OBJ_H +#define GUARD_FIELD_MAP_OBJ_H #define NUM_OBJECT_GRAPHICS_INFO 239 #define SPRITE_VAR 240 @@ -70,4 +70,4 @@ u8 npc_block_way(struct MapObject *, s16, s16, u32); extern const struct SpriteTemplate *const gFieldEffectObjectTemplatePointers[]; -#endif //POKEEMERALD_FIELD_MAP_OBJ_H +#endif //GUARD_FIELD_MAP_OBJ_H diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index cd00832d5..a787cf805 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -2,8 +2,8 @@ // Created by Scott Norton on 9/6/17. // -#ifndef POKEEMERALD_FIELD_PLAYER_AVATAR_H -#define POKEEMERALD_FIELD_PLAYER_AVATAR_H +#ifndef GUARD_FIELD_PLAYER_AVATAR_H +#define GUARD_FIELD_PLAYER_AVATAR_H void ClearPlayerAvatarInfo(void); void SetPlayerAvatarExtraStateTransition(u8, u8); @@ -14,4 +14,4 @@ u8 player_get_direction_lower_nybble(void); u8 player_get_direction_upper_nybble(void); u8 player_get_x22(void); -#endif //POKEEMERALD_FIELD_PLAYER_AVATAR_H +#endif //GUARD_FIELD_PLAYER_AVATAR_H diff --git a/include/fieldmap.h b/include/fieldmap.h index 7057fe889..4c75c3f40 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -2,8 +2,8 @@ // Created by scott on 9/16/2017. // -#ifndef POKEEMERALD_FIELDMAP_H -#define POKEEMERALD_FIELDMAP_H +#ifndef GUARD_FIELDMAP_H +#define GUARD_FIELDMAP_H // Exported type declarations @@ -12,4 +12,4 @@ // Exported ROM declarations u8 MapGridGetMetatileBehaviorAt(s16, s16); -#endif //POKEEMERALD_FIELDMAP_H +#endif //GUARD_FIELDMAP_H diff --git a/include/map_obj_8097404.h b/include/map_obj_8097404.h index 6296febe4..e3b2b1efc 100644 --- a/include/map_obj_8097404.h +++ b/include/map_obj_8097404.h @@ -2,8 +2,8 @@ // Created by scott on 9/7/2017. // -#ifndef POKEEMERALD_MAP_OBJ_8097404_H -#define POKEEMERALD_MAP_OBJ_8097404_H +#ifndef GUARD_MAP_OBJ_8097404_H +#define GUARD_MAP_OBJ_8097404_H // Exported type declarations @@ -12,4 +12,4 @@ // Exported ROM declarations void sub_8097AC8(struct Sprite *); -#endif //POKEEMERALD_MAP_OBJ_8097404_H +#endif //GUARD_MAP_OBJ_8097404_H diff --git a/include/rom4.h b/include/rom4.h index 78dca24c4..d4ece109e 100644 --- a/include/rom4.h +++ b/include/rom4.h @@ -1,6 +1,6 @@ -#ifndef POKEEMERALD_ROM4_H -#define POKEEMERALD_ROM4_H +#ifndef GUARD_ROM4_H +#define GUARD_ROM4_H struct UnkPlayerStruct { @@ -28,4 +28,4 @@ void strange_npc_table_clear(void); const struct MapHeader *get_mapheader_by_bank_and_number(u8, u8); void FieldObjectMoveDestCoords(struct MapObject *, u32, s16 *, s16 *); -#endif //POKEEMERALD_ROM4_H +#endif //GUARD_ROM4_H diff --git a/include/rom_818CFC8.h b/include/rom_818CFC8.h index 9b6f96893..1d0626b2b 100644 --- a/include/rom_818CFC8.h +++ b/include/rom_818CFC8.h @@ -2,10 +2,10 @@ // Created by Scott Norton on 9/6/17. // -#ifndef POKEEMERALD_ROM_818CFC8_H -#define POKEEMERALD_ROM_818CFC8_H +#ifndef GUARD_ROM_818CFC8_H +#define GUARD_ROM_818CFC8_H bool8 InBattlePyramid(void); u8 sub_81AAA40(void); -#endif //POKEEMERALD_ROM_818CFC8_H +#endif //GUARD_ROM_818CFC8_H diff --git a/include/rom_81BE66C.h b/include/rom_81BE66C.h index e4e39fb08..5b4f80249 100644 --- a/include/rom_81BE66C.h +++ b/include/rom_81BE66C.h @@ -2,11 +2,11 @@ // Created by Scott Norton on 9/6/17. // -#ifndef POKEEMERALD_ROM_81BE66C_H -#define POKEEMERALD_ROM_81BE66C_H +#ifndef GUARD_ROM_81BE66C_H +#define GUARD_ROM_81BE66C_H bool32 InTrainerHill(void); bool8 FieldObjectIsFarawayIslandMew(struct MapObject *); u32 sub_81D427C(void); -#endif //POKEEMERALD_ROM_81BE66C_H +#endif //GUARD_ROM_81BE66C_H From 052c9f0234a6034b9db8fce30f779b95b8869df5 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 15:13:26 -0400 Subject: [PATCH 113/342] Fix header guards --- include/gpu_regs.h | 6 +++--- include/rom4.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/gpu_regs.h b/include/gpu_regs.h index 2d47d602c..28b97fb6e 100644 --- a/include/gpu_regs.h +++ b/include/gpu_regs.h @@ -2,8 +2,8 @@ // Created by scott on 9/15/2017. // -#ifndef POKEEMERALD_GPU_REGS_H -#define POKEEMERALD_GPU_REGS_H +#ifndef GUARD_GPU_REGS_H +#define GUARD_GPU_REGS_H // Exported type declarations @@ -12,4 +12,4 @@ // Exported ROM declarations void ClearGpuRegBits(u8 regOffset, u16 mask); -#endif //POKEEMERALD_GPU_REGS_H +#endif //GUARD_GPU_REGS_H diff --git a/include/rom4.h b/include/rom4.h index 1538f5dbc..3164c81ea 100644 --- a/include/rom4.h +++ b/include/rom4.h @@ -2,8 +2,8 @@ // Created by scott on 9/15/2017. // -#ifndef POKEEMERALD_ROM4_H -#define POKEEMERALD_ROM4_H +#ifndef GUARD_ROM4_H +#define GUARD_ROM4_H // Exported type declarations @@ -12,4 +12,4 @@ // Exported ROM declarations void sub_8086230(void); -#endif //POKEEMERALD_ROM4_H +#endif //GUARD_ROM4_H From c7f28f034c4a86b6373b45941f47e5a231392ad0 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 15:16:39 -0400 Subject: [PATCH 114/342] Change type of state_to_direction argument 1 to match pokeruby --- src/field_map_obj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/field_map_obj.c b/src/field_map_obj.c index cdf4006de..cd330a18d 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -101,7 +101,7 @@ bool8 FieldObjectExecRegularAnim(struct MapObject *, struct Sprite *); void SetFieldObjectStepTimer(struct Sprite *, s16); bool8 RunFieldObjectStepTimer(struct Sprite *); bool8 npc_block_way__next_tile(struct MapObject *, u8); -u32 state_to_direction(u8, u8, u32); +u32 state_to_direction(u8, u32, u32); void DoGroundEffects_OnSpawn(struct MapObject *, struct Sprite *); void sub_80964E8(struct MapObject *, struct Sprite *); bool8 FieldObjectIsSpecialAnimActive(struct MapObject *); From c6bb13939e39bfae41ebaa8f1ea63295ddb050e1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 16:10:55 -0400 Subject: [PATCH 115/342] state_to_direction memes --- asm/field_map_obj.s | 482 -------------------------------------------- src/field_map_obj.c | 145 +++++++++++-- 2 files changed, 133 insertions(+), 494 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 9910d3f42..333621879 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,488 +5,6 @@ .text - thumb_func_start sub_80920A4 -sub_80920A4: @ 80920A4 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - adds r4, r0, 0 - adds r7, r1, 0 - mov r8, r3 - lsls r2, 24 - lsrs r6, r2, 24 - ldr r1, =gUnknown_085055CD - ldrb r0, [r4, 0x6] - adds r0, r1 - ldrb r0, [r0] - adds r1, r4, 0 - adds r1, 0x21 - ldrb r1, [r1] - adds r2, r6, 0 - bl state_to_direction - adds r6, r0, 0 - mov r5, sp - adds r5, 0x2 - adds r0, r4, 0 - adds r1, r6, 0 - mov r2, sp - adds r3, r5, 0 - bl FieldObjectMoveDestCoords - adds r0, r6, 0 - bl GetGoSpeed1AnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r7, 0 - bl FieldObjectSetRegularAnim - mov r0, sp - movs r2, 0 - ldrsh r1, [r0, r2] - movs r0, 0 - ldrsh r2, [r5, r0] - adds r0, r4, 0 - adds r3, r6, 0 - bl npc_block_way - lsls r0, 24 - cmp r0, 0 - bne _0809212A - mov r1, r8 - cmp r1, 0 - beq _0809213E - mov r0, sp - movs r2, 0 - ldrsh r0, [r0, r2] - movs r2, 0 - ldrsh r1, [r5, r2] - bl MapGridGetMetatileBehaviorAt - lsls r0, 24 - lsrs r0, 24 - bl _call_via_r8 - lsls r0, 24 - cmp r0, 0 - bne _0809213E -_0809212A: - adds r0, r6, 0 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r7, 0 - bl FieldObjectSetRegularAnim -_0809213E: - ldrb r0, [r4] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r4] - movs r0, 0x2 - strh r0, [r7, 0x30] - movs r0, 0x1 - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80920A4 - - thumb_func_start sub_809215C -sub_809215C: @ 809215C - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - adds r4, r0, 0 - adds r7, r1, 0 - mov r8, r3 - lsls r2, 24 - lsrs r6, r2, 24 - ldr r1, =gUnknown_085055CD - ldrb r0, [r4, 0x6] - adds r0, r1 - ldrb r0, [r0] - adds r1, r4, 0 - adds r1, 0x21 - ldrb r1, [r1] - adds r2, r6, 0 - bl state_to_direction - adds r6, r0, 0 - mov r5, sp - adds r5, 0x2 - adds r0, r4, 0 - adds r1, r6, 0 - mov r2, sp - adds r3, r5, 0 - bl FieldObjectMoveDestCoords - adds r0, r6, 0 - bl GetGoSpeed3AnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r7, 0 - bl FieldObjectSetRegularAnim - mov r0, sp - movs r2, 0 - ldrsh r1, [r0, r2] - movs r0, 0 - ldrsh r2, [r5, r0] - adds r0, r4, 0 - adds r3, r6, 0 - bl npc_block_way - lsls r0, 24 - cmp r0, 0 - bne _080921E2 - mov r1, r8 - cmp r1, 0 - beq _080921F6 - mov r0, sp - movs r2, 0 - ldrsh r0, [r0, r2] - movs r2, 0 - ldrsh r1, [r5, r2] - bl MapGridGetMetatileBehaviorAt - lsls r0, 24 - lsrs r0, 24 - bl _call_via_r8 - lsls r0, 24 - cmp r0, 0 - bne _080921F6 -_080921E2: - adds r0, r6, 0 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r7, 0 - bl FieldObjectSetRegularAnim -_080921F6: - ldrb r0, [r4] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r4] - movs r0, 0x2 - strh r0, [r7, 0x30] - movs r0, 0x1 - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_809215C - - thumb_func_start sub_8092214 -sub_8092214: @ 8092214 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - adds r4, r0, 0 - adds r7, r1, 0 - mov r8, r3 - lsls r2, 24 - lsrs r6, r2, 24 - ldr r1, =gUnknown_085055CD - ldrb r0, [r4, 0x6] - adds r0, r1 - ldrb r0, [r0] - adds r1, r4, 0 - adds r1, 0x21 - ldrb r1, [r1] - adds r2, r6, 0 - bl state_to_direction - adds r6, r0, 0 - mov r5, sp - adds r5, 0x2 - adds r0, r4, 0 - adds r1, r6, 0 - mov r2, sp - adds r3, r5, 0 - bl FieldObjectMoveDestCoords - adds r0, r6, 0 - bl sub_8093438 - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r7, 0 - bl FieldObjectSetRegularAnim - mov r0, sp - movs r2, 0 - ldrsh r1, [r0, r2] - movs r0, 0 - ldrsh r2, [r5, r0] - adds r0, r4, 0 - adds r3, r6, 0 - bl npc_block_way - lsls r0, 24 - cmp r0, 0 - bne _0809229A - mov r1, r8 - cmp r1, 0 - beq _080922AE - mov r0, sp - movs r2, 0 - ldrsh r0, [r0, r2] - movs r2, 0 - ldrsh r1, [r5, r2] - bl MapGridGetMetatileBehaviorAt - lsls r0, 24 - lsrs r0, 24 - bl _call_via_r8 - lsls r0, 24 - cmp r0, 0 - bne _080922AE -_0809229A: - adds r0, r6, 0 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r7, 0 - bl FieldObjectSetRegularAnim -_080922AE: - ldrb r0, [r4] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r4] - movs r0, 0x2 - strh r0, [r7, 0x30] - movs r0, 0x1 - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8092214 - - thumb_func_start cph_IM_DIFFERENT -cph_IM_DIFFERENT: @ 80922CC - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r2, 24 - lsrs r2, 24 - ldr r1, =gUnknown_085055CD - ldrb r0, [r4, 0x6] - adds r0, r1 - ldrb r0, [r0] - adds r1, r4, 0 - adds r1, 0x21 - ldrb r1, [r1] - bl state_to_direction - bl sub_80934BC - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - ldrb r0, [r4] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r4] - movs r0, 0x2 - strh r0, [r5, 0x30] - movs r0, 0x1 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end cph_IM_DIFFERENT - - thumb_func_start sub_8092314 -sub_8092314: @ 8092314 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - adds r4, r0, 0 - adds r7, r1, 0 - mov r8, r3 - lsls r2, 24 - lsrs r6, r2, 24 - ldr r1, =gUnknown_085055CD - ldrb r0, [r4, 0x6] - adds r0, r1 - ldrb r0, [r0] - adds r1, r4, 0 - adds r1, 0x21 - ldrb r1, [r1] - adds r2, r6, 0 - bl state_to_direction - adds r6, r0, 0 - mov r5, sp - adds r5, 0x2 - adds r0, r4, 0 - adds r1, r6, 0 - mov r2, sp - adds r3, r5, 0 - bl FieldObjectMoveDestCoords - adds r0, r6, 0 - bl sub_8093514 - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r7, 0 - bl FieldObjectSetRegularAnim - mov r0, sp - movs r2, 0 - ldrsh r1, [r0, r2] - movs r0, 0 - ldrsh r2, [r5, r0] - adds r0, r4, 0 - adds r3, r6, 0 - bl npc_block_way - lsls r0, 24 - cmp r0, 0 - bne _0809239A - mov r1, r8 - cmp r1, 0 - beq _080923AE - mov r0, sp - movs r2, 0 - ldrsh r0, [r0, r2] - movs r2, 0 - ldrsh r1, [r5, r2] - bl MapGridGetMetatileBehaviorAt - lsls r0, 24 - lsrs r0, 24 - bl _call_via_r8 - lsls r0, 24 - cmp r0, 0 - bne _080923AE -_0809239A: - adds r0, r6, 0 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r7, 0 - bl FieldObjectSetRegularAnim -_080923AE: - ldrb r0, [r4] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r4] - movs r0, 0x2 - strh r0, [r7, 0x30] - movs r0, 0x1 - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8092314 - - thumb_func_start oac_hopping -oac_hopping: @ 80923CC - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x8 - adds r4, r0, 0 - adds r7, r1, 0 - mov r8, r3 - lsls r2, 24 - lsrs r6, r2, 24 - ldr r1, =gUnknown_085055CD - ldrb r0, [r4, 0x6] - adds r0, r1 - ldrb r0, [r0] - adds r1, r4, 0 - adds r1, 0x21 - ldrb r1, [r1] - adds r2, r6, 0 - bl state_to_direction - adds r6, r0, 0 - ldrh r1, [r4, 0x10] - add r0, sp, 0x4 - strh r1, [r0] - ldrh r0, [r4, 0x12] - mov r5, sp - adds r5, 0x6 - strh r0, [r5] - movs r0, 0x2 - str r0, [sp] - adds r0, r6, 0 - add r1, sp, 0x4 - adds r2, r5, 0 - movs r3, 0x2 - bl sub_8092F88 - adds r0, r6, 0 - bl GetJumpLedgeAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r7, 0 - bl FieldObjectSetRegularAnim - add r0, sp, 0x4 - movs r2, 0 - ldrsh r1, [r0, r2] - movs r0, 0 - ldrsh r2, [r5, r0] - adds r0, r4, 0 - adds r3, r6, 0 - bl npc_block_way - lsls r0, 24 - cmp r0, 0 - bne _08092460 - mov r1, r8 - cmp r1, 0 - beq _08092474 - add r0, sp, 0x4 - movs r2, 0 - ldrsh r0, [r0, r2] - movs r2, 0 - ldrsh r1, [r5, r2] - bl MapGridGetMetatileBehaviorAt - lsls r0, 24 - lsrs r0, 24 - bl _call_via_r8 - lsls r0, 24 - cmp r0, 0 - bne _08092474 -_08092460: - adds r0, r6, 0 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r7, 0 - bl FieldObjectSetRegularAnim -_08092474: - ldrb r0, [r4] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r4] - movs r0, 0x2 - strh r0, [r7, 0x30] - movs r0, 0x1 - add sp, 0x8 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end oac_hopping - thumb_func_start FieldObjectCB_CopyPlayer2 FieldObjectCB_CopyPlayer2: @ 8092494 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index cd330a18d..42b18a1ac 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -95,8 +95,17 @@ static bool8 FieldObjectDoesZCoordMatch(struct MapObject *, u8); /*static*/ struct MapObjectTemplate *FindFieldObjectTemplateInArrayByLocalId(u8 localId, struct MapObjectTemplate *templates, u8 count); void npc_reset(struct MapObject *, struct Sprite *); void FieldObjectSetRegularAnim(struct MapObject *, struct Sprite *, u8); + u8 GetFaceDirectionAnimId(u32); u8 GetGoSpeed0AnimId(u32); +u8 GetGoSpeed1AnimId(u32); +u8 GetGoSpeed3AnimId(u32); +u8 sub_8093438(u32); +u8 sub_80934BC(u32); +u8 sub_8093514(u32); +u8 GetJumpLedgeAnimId(u32); +void sub_8092F88(u32, s16 *, s16 *, s16, s16); + bool8 FieldObjectExecRegularAnim(struct MapObject *, struct Sprite *); void SetFieldObjectStepTimer(struct Sprite *, s16); bool8 RunFieldObjectStepTimer(struct Sprite *); @@ -3239,6 +3248,115 @@ bool8 sub_8091F94(struct MapObject *mapObject, struct Sprite *sprite, u8 playerD return TRUE; } +bool8 sub_80920A4(struct MapObject *mapObject, struct Sprite *sprite, u8 playerDirection, bool8 tileCB(u8)) +{ + u32 direction; + s16 x; + s16 y; + + direction = playerDirection; + direction = state_to_direction(gUnknown_085055CD[mapObject->animPattern], mapObject->mapobj_unk_21, direction); + FieldObjectMoveDestCoords(mapObject, direction, &x, &y); + FieldObjectSetRegularAnim(mapObject, sprite, GetGoSpeed1AnimId(direction)); + if (npc_block_way(mapObject, x, y, direction) || (tileCB != NULL && !tileCB(MapGridGetMetatileBehaviorAt(x, y)))) + { + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(direction)); + } + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_809215C(struct MapObject *mapObject, struct Sprite *sprite, u8 playerDirection, bool8 tileCB(u8)) +{ + u32 direction; + s16 x; + s16 y; + + direction = playerDirection; + direction = state_to_direction(gUnknown_085055CD[mapObject->animPattern], mapObject->mapobj_unk_21, direction); + FieldObjectMoveDestCoords(mapObject, direction, &x, &y); + FieldObjectSetRegularAnim(mapObject, sprite, GetGoSpeed3AnimId(direction)); + if (npc_block_way(mapObject, x, y, direction) || (tileCB != NULL && !tileCB(MapGridGetMetatileBehaviorAt(x, y)))) + { + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(direction)); + } + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_8092214(struct MapObject *mapObject, struct Sprite *sprite, u8 playerDirection, bool8 tileCB(u8)) +{ + u32 direction; + s16 x; + s16 y; + + direction = playerDirection; + direction = state_to_direction(gUnknown_085055CD[mapObject->animPattern], mapObject->mapobj_unk_21, direction); + FieldObjectMoveDestCoords(mapObject, direction, &x, &y); + FieldObjectSetRegularAnim(mapObject, sprite, sub_8093438(direction)); + if (npc_block_way(mapObject, x, y, direction) || (tileCB != NULL && !tileCB(MapGridGetMetatileBehaviorAt(x, y)))) + { + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(direction)); + } + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 2; + return TRUE; +} + +bool8 cph_IM_DIFFERENT(struct MapObject *mapObject, struct Sprite *sprite, u8 playerDirection, bool8 tileCB(u8)) +{ + u32 direction; + + direction = playerDirection; + direction = state_to_direction(gUnknown_085055CD[mapObject->animPattern], mapObject->mapobj_unk_21, direction); + FieldObjectSetRegularAnim(mapObject, sprite, sub_80934BC(direction)); + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 2; + return TRUE; +} + +bool8 sub_8092314(struct MapObject *mapObject, struct Sprite *sprite, u8 playerDirection, bool8 tileCB(u8)) +{ + u32 direction; + s16 x; + s16 y; + + direction = playerDirection; + direction = state_to_direction(gUnknown_085055CD[mapObject->animPattern], mapObject->mapobj_unk_21, direction); + FieldObjectMoveDestCoords(mapObject, direction, &x, &y); + FieldObjectSetRegularAnim(mapObject, sprite, sub_8093514(direction)); + if (npc_block_way(mapObject, x, y, direction) || (tileCB != NULL && !tileCB(MapGridGetMetatileBehaviorAt(x, y)))) + { + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(direction)); + } + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 2; + return TRUE; +} + +bool8 oac_hopping(struct MapObject *mapObject, struct Sprite *sprite, u8 playerDirection, bool8 tileCB(u8)) +{ + u32 direction; + s16 x; + s16 y; + + direction = playerDirection; + direction = state_to_direction(gUnknown_085055CD[mapObject->animPattern], mapObject->mapobj_unk_21, direction); + x = mapObject->coords2.x; + y = mapObject->coords2.y; + sub_8092F88(direction, &x, &y, 2, 2); + FieldObjectSetRegularAnim(mapObject, sprite, GetJumpLedgeAnimId(direction)); + if (npc_block_way(mapObject, x, y, direction) || (tileCB != NULL && !tileCB(MapGridGetMetatileBehaviorAt(x, y)))) + { + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(direction)); + } + mapObject->mapobj_bit_1 = TRUE; + sprite->data1 = 2; + return TRUE; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); @@ -3292,16 +3410,19 @@ void FieldObjectStep(struct MapObject *mapObject, struct Sprite *sprite, bool8 ( FieldObjectUpdateSubpriority(mapObject, sprite); } -u8 GetFaceDirectionAnimId(u32 direction) -{ - u8 dirn2; - u8 animIds[sizeof gUnknown_0850DBA0]; - - dirn2 = direction; - memcpy(animIds, gUnknown_0850DBA0, sizeof gUnknown_0850DBA0); - if (dirn2 > DIR_EAST) - { - dirn2 = 0; - } - return animIds[dirn2]; +#define dirn2anim(name, table) \ +extern const u8 table[5]; \ +u8 name(u32 direction) \ +{ \ + u8 dirn2; \ + u8 animIds[5]; \ + dirn2 = direction; \ + memcpy(animIds, table, 5); \ + if (dirn2 > DIR_EAST) \ + { \ + dirn2 = 0; \ + } \ + return animIds[dirn2]; \ } + +dirn2anim(GetFaceDirectionAnimId, gUnknown_0850DBA0); From 12885ca371f0b89d7df6decc133a14452ab567e0 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 16:40:00 -0400 Subject: [PATCH 116/342] CopyPlayer2 --- asm/field_map_obj.s | 83 ------------------------------------- include/metatile_behavior.h | 11 +++++ src/field_map_obj.c | 12 ++++++ 3 files changed, 23 insertions(+), 83 deletions(-) create mode 100644 include/metatile_behavior.h diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 333621879..1da91d1f5 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,89 +5,6 @@ .text - thumb_func_start FieldObjectCB_CopyPlayer2 -FieldObjectCB_CopyPlayer2: @ 8092494 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_80924B8 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_CopyPlayer2 - - thumb_func_start sub_80924B8 -sub_80924B8: @ 80924B8 - push {r4,lr} - ldr r3, =gUnknown_0850DA90 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80924B8 - - thumb_func_start mss_08062EA4 -mss_08062EA4: @ 80924D8 - push {r4-r7,lr} - adds r6, r0, 0 - adds r7, r1, 0 - ldr r2, =gMapObjects - ldr r3, =gPlayerAvatar - ldrb r1, [r3, 0x5] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1C] - cmp r0, 0xFF - beq _080924F8 - ldrb r0, [r3, 0x3] - cmp r0, 0x2 - bne _08092504 -_080924F8: - movs r0, 0 - b _0809252C - .pool -_08092504: - ldr r5, =gUnknown_0850DA64 - bl player_get_x22 - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 22 - adds r4, r5 - bl player_get_direction_upper_nybble - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - ldr r3, =sub_8088E64 - ldr r4, [r4] - adds r0, r6, 0 - adds r1, r7, 0 - bl _call_via_r4 - lsls r0, 24 - lsrs r0, 24 -_0809252C: - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end mss_08062EA4 - thumb_func_start FieldObjectCB_TreeDisguise @ void FieldObjectCB_TreeDisguise(struct obj *object) FieldObjectCB_TreeDisguise: @ 809253C diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h new file mode 100644 index 000000000..5ed36c690 --- /dev/null +++ b/include/metatile_behavior.h @@ -0,0 +1,11 @@ +#ifndef GUARD_METATILE_BEHAVIOR_H +#define GUARD_METATILE_BEHAVIOR_H + +// Exported type declarations + +// Exported RAM declarations + +// Exported ROM declarations +bool8 sub_8088E64(u8); + +#endif //GUARD_METATILE_BEHAVIOR_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 42b18a1ac..c35105b44 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -17,6 +17,7 @@ #include "field_ground_effect.h" #include "map_obj_8097404.h" #include "mauville_old_man.h" +#include "metatile_behavior.h" #include "field_effect.h" #include "field_effect_helpers.h" #include "field_map_obj.h" @@ -3357,6 +3358,17 @@ bool8 oac_hopping(struct MapObject *mapObject, struct Sprite *sprite, u8 playerD return TRUE; } +field_object_step(CopyPlayer2, gUnknown_0850DA90) + +bool8 mss_08062EA4(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (gMapObjects[gPlayerAvatar.mapObjectId].mapobj_unk_1C == 0xFF || gPlayerAvatar.running1 == 2) + { + return FALSE; + } + return gUnknown_0850DA64[player_get_x22()](mapObject, sprite, player_get_direction_upper_nybble(), sub_8088E64); +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 6247fe742c095885fa0938d8e91ee222e25a6354 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 16:53:55 -0400 Subject: [PATCH 117/342] Tree and Mountain Disguise FOCB --- asm/field_map_obj.s | 118 -------------------------------------------- src/field_map_obj.c | 38 ++++++++++++++ 2 files changed, 38 insertions(+), 118 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 1da91d1f5..12941a438 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,124 +5,6 @@ .text - thumb_func_start FieldObjectCB_TreeDisguise -@ void FieldObjectCB_TreeDisguise(struct obj *object) -FieldObjectCB_TreeDisguise: @ 809253C - push {r4-r6,lr} - adds r5, r0, 0 - movs r1, 0x2E - ldrsh r0, [r5, r1] - lsls r1, r0, 3 - adds r1, r0 - lsls r1, 2 - ldr r0, =gMapObjects - adds r4, r1, r0 - adds r6, r4, 0 - adds r6, 0x21 - ldrb r0, [r6] - cmp r0, 0 - beq _08092564 - cmp r0, 0x1 - bne _08092584 - movs r1, 0x3C - ldrsh r0, [r5, r1] - cmp r0, 0 - bne _08092584 -_08092564: - ldr r1, =gFieldEffectSpawnParams - adds r2, r1, 0x4 - adds r3, r1, 0 - adds r3, 0x8 - adds r0, r4, 0 - bl FieldObjectGetLocalIdAndMap - movs r0, 0x1C - bl FieldEffectStart - strb r0, [r4, 0x1A] - movs r0, 0x1 - strb r0, [r6] - ldrh r0, [r5, 0x3C] - adds r0, 0x1 - strh r0, [r5, 0x3C] -_08092584: - movs r0, 0x2E - ldrsh r1, [r5, r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - ldr r1, =gMapObjects - adds r0, r1 - ldr r2, =sub_80925AC - adds r1, r5, 0 - bl FieldObjectStep - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_TreeDisguise - - thumb_func_start sub_80925AC -sub_80925AC: @ 80925AC - push {lr} - bl npc_reset - movs r0, 0 - pop {r1} - bx r1 - thumb_func_end sub_80925AC - - thumb_func_start FieldObjectCB_MountainDisguise -FieldObjectCB_MountainDisguise: @ 80925B8 - push {r4-r6,lr} - adds r5, r0, 0 - movs r1, 0x2E - ldrsh r0, [r5, r1] - lsls r1, r0, 3 - adds r1, r0 - lsls r1, 2 - ldr r0, =gMapObjects - adds r4, r1, r0 - adds r6, r4, 0 - adds r6, 0x21 - ldrb r0, [r6] - cmp r0, 0 - beq _080925E0 - cmp r0, 0x1 - bne _08092600 - movs r1, 0x3C - ldrsh r0, [r5, r1] - cmp r0, 0 - bne _08092600 -_080925E0: - ldr r1, =gFieldEffectSpawnParams - adds r2, r1, 0x4 - adds r3, r1, 0 - adds r3, 0x8 - adds r0, r4, 0 - bl FieldObjectGetLocalIdAndMap - movs r0, 0x1D - bl FieldEffectStart - strb r0, [r4, 0x1A] - movs r0, 0x1 - strb r0, [r6] - ldrh r0, [r5, 0x3C] - adds r0, 0x1 - strh r0, [r5, 0x3C] -_08092600: - movs r0, 0x2E - ldrsh r1, [r5, r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - ldr r1, =gMapObjects - adds r0, r1 - ldr r2, =sub_80925AC - adds r1, r5, 0 - bl FieldObjectStep - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_MountainDisguise - thumb_func_start FieldObjectCB_Hidden1 @ void FieldObjectCB_Hidden1(struct obj *object) FieldObjectCB_Hidden1: @ 8092628 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index c35105b44..7b62e6d05 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3369,6 +3369,44 @@ bool8 mss_08062EA4(struct MapObject *mapObject, struct Sprite *sprite) return gUnknown_0850DA64[player_get_x22()](mapObject, sprite, player_get_direction_upper_nybble(), sub_8088E64); } +bool8 sub_80925AC(struct MapObject *, struct Sprite *); + +void FieldObjectCB_TreeDisguise(struct Sprite *sprite) +{ + struct MapObject *mapObject; + + mapObject = &gMapObjects[sprite->data0]; + if (mapObject->mapobj_unk_21 == 0 || (mapObject->mapobj_unk_21 == 1 && !sprite->data7)) + { + FieldObjectGetLocalIdAndMap(mapObject, (u8 *)&gFieldEffectSpawnParams[0], (u8 *)&gFieldEffectSpawnParams[1], (u8 *)&gFieldEffectSpawnParams[2]); + mapObject->mapobj_unk_1A = FieldEffectStart(FLDEFF_TREE_DISGUISE); + mapObject->mapobj_unk_21 = 1; + sprite->data7 ++; + } + FieldObjectStep(&gMapObjects[sprite->data0], sprite, sub_80925AC); +} + +bool8 sub_80925AC(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + return FALSE; +} + +void FieldObjectCB_MountainDisguise(struct Sprite *sprite) +{ + struct MapObject *mapObject; + + mapObject = &gMapObjects[sprite->data0]; + if (mapObject->mapobj_unk_21 == 0 || (mapObject->mapobj_unk_21 == 1 && !sprite->data7)) + { + FieldObjectGetLocalIdAndMap(mapObject, (u8 *)&gFieldEffectSpawnParams[0], (u8 *)&gFieldEffectSpawnParams[1], (u8 *)&gFieldEffectSpawnParams[2]); + mapObject->mapobj_unk_1A = FieldEffectStart(FLDEFF_MOUNTAIN_DISGUISE); + mapObject->mapobj_unk_21 = 1; + sprite->data7 ++; + } + FieldObjectStep(&gMapObjects[sprite->data0], sprite, sub_80925AC); +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 15aba9a07633092ad340a5f11df962e2aaf6703d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 17:24:26 -0400 Subject: [PATCH 118/342] Hidden1 --- asm/field_map_obj.s | 96 --------------------------------------------- src/field_map_obj.c | 34 ++++++++++++++++ 2 files changed, 34 insertions(+), 96 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 12941a438..92b6022f6 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,102 +5,6 @@ .text - thumb_func_start FieldObjectCB_Hidden1 -@ void FieldObjectCB_Hidden1(struct obj *object) -FieldObjectCB_Hidden1: @ 8092628 - push {r4,lr} - adds r3, r0, 0 - movs r1, 0x3C - ldrsh r0, [r3, r1] - ldr r4, =gMapObjects - cmp r0, 0 - bne _08092668 - movs r0, 0x2E - ldrsh r1, [r3, r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r1, [r0, 0x3] - movs r2, 0x4 - orrs r1, r2 - strb r1, [r0, 0x3] - adds r2, r3, 0 - adds r2, 0x42 - ldrb r1, [r2] - movs r0, 0x3F - ands r0, r1 - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2] - ldrb r0, [r3, 0x5] - movs r1, 0xC - orrs r0, r1 - strb r0, [r3, 0x5] - ldrh r0, [r3, 0x3C] - adds r0, 0x1 - strh r0, [r3, 0x3C] -_08092668: - movs r0, 0x2E - ldrsh r1, [r3, r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldr r2, =sub_809268C - adds r1, r3, 0 - bl FieldObjectStep - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_Hidden1 - - thumb_func_start sub_809268C -sub_809268C: @ 809268C - push {r4,lr} - ldr r3, =gUnknown_0850DA9C - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_809268C - - thumb_func_start sub_80926AC -sub_80926AC: @ 80926AC - push {lr} - bl npc_reset - movs r0, 0 - pop {r1} - bx r1 - thumb_func_end sub_80926AC - - thumb_func_start sub_80926B8 -@ bool8 sub_80926B8(struct npc_state *fieldObject, struct obj *object) -sub_80926B8: @ 80926B8 - push {r4,lr} - adds r4, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - beq _080926CA - movs r0, 0 - strh r0, [r4, 0x30] -_080926CA: - movs r0, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80926B8 - thumb_func_start FieldObjectCB_WalkInPlace1 FieldObjectCB_WalkInPlace1: @ 80926D4 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 7b62e6d05..80c376a2f 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3407,6 +3407,40 @@ void FieldObjectCB_MountainDisguise(struct Sprite *sprite) FieldObjectStep(&gMapObjects[sprite->data0], sprite, sub_80925AC); } +extern bool8 (*const gUnknown_0850DA9C[])(struct MapObject *, struct Sprite *); +bool8 sub_809268C(struct MapObject *, struct Sprite *); + +void FieldObjectCB_Hidden1(struct Sprite *sprite) +{ + if (!sprite->data7) + { + gMapObjects[sprite->data0].mapobj_bit_26 = TRUE; + sprite->subspriteMode = 2; + sprite->oam.priority = 3; + sprite->data7 ++; + } + FieldObjectStep(&gMapObjects[sprite->data0], sprite, sub_809268C); +} + +bool8 sub_809268C(struct MapObject *mapObject, struct Sprite *sprite) +{ + return gUnknown_0850DA9C[sprite->data1](mapObject, sprite); +} + +bool8 sub_80926AC (struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + return FALSE; +} +bool8 sub_80926B8 (struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + sprite->data1 = 0; + } + return FALSE; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 34950dbd13f9ec9e4616b3cb33a9b1aae912eee2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 17:34:41 -0400 Subject: [PATCH 119/342] remaining field object step callbacks --- asm/field_map_obj.s | 331 ---------------------------------------- include/field_map_obj.h | 5 +- src/field_map_obj.c | 66 ++++++++ 3 files changed, 70 insertions(+), 332 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 92b6022f6..8ea5a8b76 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,337 +5,6 @@ .text - thumb_func_start FieldObjectCB_WalkInPlace1 -FieldObjectCB_WalkInPlace1: @ 80926D4 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_80926F8 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_WalkInPlace1 - - thumb_func_start sub_80926F8 -sub_80926F8: @ 80926F8 - push {r4,lr} - ldr r3, =gUnknown_0850DAA0 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80926F8 - - thumb_func_start sub_8092718 -sub_8092718: @ 8092718 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl npc_reset - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetStepInPlaceDelay16AnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x1 - strh r0, [r5, 0x30] - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8092718 - - thumb_func_start FieldObjectCB_WalkInPlace4 -FieldObjectCB_WalkInPlace4: @ 8092744 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8092768 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_WalkInPlace4 - - thumb_func_start sub_8092768 -sub_8092768: @ 8092768 - push {r4,lr} - ldr r3, =gUnknown_0850DAA8 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8092768 - - thumb_func_start sub_8092788 -sub_8092788: @ 8092788 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl npc_reset - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetStepInPlaceDelay32AnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x1 - strh r0, [r5, 0x30] - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8092788 - - thumb_func_start FieldObjectCB_WalkInPlace2 -FieldObjectCB_WalkInPlace2: @ 80927B4 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_80927D8 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_WalkInPlace2 - - thumb_func_start sub_80927D8 -sub_80927D8: @ 80927D8 - push {r4,lr} - ldr r3, =gUnknown_0850DAB0 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80927D8 - - thumb_func_start sub_80927F8 -@ bool8 sub_80927F8(struct npc_state *fieldObject, struct obj *object) -sub_80927F8: @ 80927F8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl npc_reset - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetStepInPlaceDelay8AnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x1 - strh r0, [r5, 0x30] - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80927F8 - - thumb_func_start FieldObjectCB_WalkInPlace3 -FieldObjectCB_WalkInPlace3: @ 8092824 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_8092848 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_WalkInPlace3 - - thumb_func_start sub_8092848 -sub_8092848: @ 8092848 - push {r4,lr} - ldr r3, =gUnknown_0850DAB8 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8092848 - - thumb_func_start sub_8092868 -sub_8092868: @ 8092868 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl npc_reset - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetStepInPlaceDelay4AnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - movs r0, 0x1 - strh r0, [r5, 0x30] - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8092868 - - thumb_func_start FieldObjectCB_Hidden2 -FieldObjectCB_Hidden2: @ 8092894 - push {lr} - adds r1, r0, 0 - movs r0, 0x2E - ldrsh r2, [r1, r0] - lsls r0, r2, 3 - adds r0, r2 - lsls r0, 2 - ldr r2, =gMapObjects - adds r0, r2 - ldr r2, =sub_80928B8 - bl FieldObjectStep - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectCB_Hidden2 - - thumb_func_start sub_80928B8 -sub_80928B8: @ 80928B8 - push {r4,lr} - ldr r3, =gUnknown_0850DAC0 - movs r4, 0x30 - ldrsh r2, [r1, r4] - lsls r2, 2 - adds r2, r3 - ldr r2, [r2] - bl _call_via_r2 - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80928B8 - - thumb_func_start sub_80928D8 -sub_80928D8: @ 80928D8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl npc_reset - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl GetFaceDirectionAnimId - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl FieldObjectSetRegularAnim - ldrb r0, [r4, 0x1] - movs r1, 0x20 - orrs r0, r1 - strb r0, [r4, 0x1] - movs r0, 0x1 - strh r0, [r5, 0x30] - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80928D8 - - thumb_func_start sub_809290C -sub_809290C: @ 809290C - push {r4,lr} - adds r4, r1, 0 - bl FieldObjectExecRegularAnim - lsls r0, 24 - cmp r0, 0 - bne _0809291E - movs r0, 0 - b _08092924 -_0809291E: - movs r0, 0x2 - strh r0, [r4, 0x30] - movs r0, 0x1 -_08092924: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_809290C - - thumb_func_start sub_809292C -sub_809292C: @ 809292C - ldrb r2, [r0] - movs r1, 0x3 - negs r1, r1 - ands r1, r2 - strb r1, [r0] - movs r0, 0 - bx lr - thumb_func_end sub_809292C - thumb_func_start npc_reset @ void npc_reset(struct npc_state *fieldObject, struct obj *object) npc_reset: @ 809293C diff --git a/include/field_map_obj.h b/include/field_map_obj.h index f603e9a8e..03ba36e87 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -63,7 +63,10 @@ void sub_808EB08(struct MapObject *, s16, s16); void sub_808F254(u8, u8, u8); void FieldObjectStep(struct MapObject *, struct Sprite *, bool8(struct MapObject *, struct Sprite *)); u8 GetOppositeDirection(u8); -u8 GetStepInPlaceDelay16AnimId(u8); +u8 GetStepInPlaceDelay4AnimId(u32); +u8 GetStepInPlaceDelay8AnimId(u32); +u8 GetStepInPlaceDelay16AnimId(u32); +u8 GetStepInPlaceDelay32AnimId(u32); u8 npc_block_way(struct MapObject *, s16, s16, u32); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 80c376a2f..5d5747be9 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3441,6 +3441,72 @@ bool8 sub_80926B8 (struct MapObject *mapObject, struct Sprite *sprite) return FALSE; } +field_object_step(WalkInPlace1, gUnknown_0850DAA0) + +bool8 sub_8092718(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + FieldObjectSetRegularAnim(mapObject, sprite, GetStepInPlaceDelay16AnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 1; + return TRUE; +} + +field_object_step(WalkInPlace4, gUnknown_0850DAA8) + +bool8 sub_8092788(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + FieldObjectSetRegularAnim(mapObject, sprite, GetStepInPlaceDelay32AnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 1; + return TRUE; +} + +field_object_step(WalkInPlace2, gUnknown_0850DAB0) + +bool8 sub_80927F8(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + FieldObjectSetRegularAnim(mapObject, sprite, GetStepInPlaceDelay8AnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 1; + return TRUE; +} + +field_object_step(WalkInPlace3, gUnknown_0850DAB8) + +bool8 sub_8092868(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + FieldObjectSetRegularAnim(mapObject, sprite, GetStepInPlaceDelay4AnimId(mapObject->mapobj_unk_18)); + sprite->data1 = 1; + return TRUE; +} + +field_object_step(Hidden2, gUnknown_0850DAC0) + +bool8 sub_80928D8(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_reset(mapObject, sprite); + FieldObjectSetRegularAnim(mapObject, sprite, GetFaceDirectionAnimId(mapObject->mapobj_unk_18)); + mapObject->mapobj_bit_13 = TRUE; + sprite->data1 = 1; + return TRUE; +} +bool8 sub_809290C(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (FieldObjectExecRegularAnim(mapObject, sprite)) + { + sprite->data1 = 2; + return TRUE; + } + return FALSE; +} + +bool8 sub_809292C(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_1 = FALSE; + return FALSE; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From fa436fca4dd0878eb1fdd905dec48e8c2cd310d2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 17:41:46 -0400 Subject: [PATCH 120/342] a block of direction-based anim num fns --- asm/field_map_obj.s | 186 -------------------------------------------- src/field_map_obj.c | 36 ++++++++- 2 files changed, 34 insertions(+), 188 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 8ea5a8b76..0a043682b 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,192 +5,6 @@ .text - thumb_func_start npc_reset -@ void npc_reset(struct npc_state *fieldObject, struct obj *object) -npc_reset: @ 809293C - ldrb r3, [r0] - movs r2, 0x3 - negs r2, r2 - ands r2, r3 - movs r3, 0x41 - negs r3, r3 - ands r2, r3 - movs r3, 0x7F - ands r2, r3 - strb r2, [r0] - movs r2, 0xFF - strb r2, [r0, 0x1C] - movs r0, 0 - strh r0, [r1, 0x30] - bx lr - thumb_func_end npc_reset - - thumb_func_start FieldObjectDirectionToImageAnimId -@ u8 FieldObjectDirectionToImageAnimId(u8 direction) -FieldObjectDirectionToImageAnimId: @ 809295C - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DACC - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end FieldObjectDirectionToImageAnimId - - thumb_func_start get_go_image_anim_num -get_go_image_anim_num: @ 809296C - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DAD5 - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end get_go_image_anim_num - - thumb_func_start get_go_fast_image_anim_num -get_go_fast_image_anim_num: @ 809297C - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DADE - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end get_go_fast_image_anim_num - - thumb_func_start get_go_faster_image_anim_num -get_go_faster_image_anim_num: @ 809298C - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DAE7 - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end get_go_faster_image_anim_num - - thumb_func_start get_go_fastest_image_anim_num -get_go_fastest_image_anim_num: @ 809299C - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DAF0 - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end get_go_fastest_image_anim_num - - thumb_func_start sub_80929AC -sub_80929AC: @ 80929AC - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DAF9 - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end sub_80929AC - - thumb_func_start sub_80929BC -sub_80929BC: @ 80929BC - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DB02 - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end sub_80929BC - - thumb_func_start sub_80929CC -sub_80929CC: @ 80929CC - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DB0B - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end sub_80929CC - - thumb_func_start sub_80929DC -sub_80929DC: @ 80929DC - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DB14 - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end sub_80929DC - - thumb_func_start sub_80929EC -sub_80929EC: @ 80929EC - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DB1D - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end sub_80929EC - - thumb_func_start sub_80929FC -sub_80929FC: @ 80929FC - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DB26 - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end sub_80929FC - - thumb_func_start sub_8092A0C -sub_8092A0C: @ 8092A0C - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DB2F - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end sub_8092A0C - - thumb_func_start sub_8092A1C -sub_8092A1C: @ 8092A1C - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DB38 - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end sub_8092A1C - - thumb_func_start sub_8092A2C -sub_8092A2C: @ 8092A2C - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DB41 - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end sub_8092A2C - - thumb_func_start get_run_image_anim_num -get_run_image_anim_num: @ 8092A3C - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DB4A - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end get_run_image_anim_num - thumb_func_start sub_8092A4C sub_8092A4C: @ 8092A4C push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 5d5747be9..8bb20abb4 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3507,6 +3507,38 @@ bool8 sub_809292C(struct MapObject *mapObject, struct Sprite *sprite) return FALSE; } +void npc_reset(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_1 = FALSE; + mapObject->mapobj_bit_6 = FALSE; + mapObject->mapobj_bit_7 = FALSE; + mapObject->mapobj_unk_1C = 0xFF; + sprite->data1 = 0; +} + +#define dirn2anim(name, table)\ +extern const u8 table[4];\ +u8 name(u8 direction)\ +{\ + return table[direction];\ +} + +dirn2anim(FieldObjectDirectionToImageAnimId, gUnknown_0850DACC) +dirn2anim(get_go_image_anim_num, gUnknown_0850DAD5) +dirn2anim(get_go_fast_image_anim_num, gUnknown_0850DADE) +dirn2anim(get_go_faster_image_anim_num, gUnknown_0850DAE7) +dirn2anim(get_go_fastest_image_anim_num, gUnknown_0850DAF0) +dirn2anim(sub_80929AC, gUnknown_0850DAF9) +dirn2anim(sub_80929BC, gUnknown_0850DB02) +dirn2anim(sub_80929CC, gUnknown_0850DB0B) +dirn2anim(sub_80929DC, gUnknown_0850DB14) +dirn2anim(sub_80929EC, gUnknown_0850DB1D) +dirn2anim(sub_80929FC, gUnknown_0850DB26) +dirn2anim(sub_8092A0C, gUnknown_0850DB2F) +dirn2anim(sub_8092A1C, gUnknown_0850DB38) +dirn2anim(sub_8092A2C, gUnknown_0850DB41) +dirn2anim(get_run_image_anim_num, gUnknown_0850DB4A) + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); @@ -3560,7 +3592,7 @@ void FieldObjectStep(struct MapObject *mapObject, struct Sprite *sprite, bool8 ( FieldObjectUpdateSubpriority(mapObject, sprite); } -#define dirn2anim(name, table) \ +#define dirn2anim_2(name, table) \ extern const u8 table[5]; \ u8 name(u32 direction) \ { \ @@ -3575,4 +3607,4 @@ u8 name(u32 direction) \ return animIds[dirn2]; \ } -dirn2anim(GetFaceDirectionAnimId, gUnknown_0850DBA0); +dirn2anim_2(GetFaceDirectionAnimId, gUnknown_0850DBA0); From 119c0e96b58b33c0b72ad2a209b42e7aa93cdf19 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 18:04:26 -0400 Subject: [PATCH 121/342] sub_8092A4C --- asm/field_map_obj.s | 25 ------------------------- src/field_map_obj.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 0a043682b..06c18eb2c 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,31 +5,6 @@ .text - thumb_func_start sub_8092A4C -sub_8092A4C: @ 8092A4C - push {lr} - adds r2, r0, 0 - ldr r1, =gUnknown_085094AC - b _08092A64 - .pool -_08092A58: - ldr r0, [r1] - cmp r0, r2 - bne _08092A62 - adds r0, r1, 0 - b _08092A6C -_08092A62: - adds r1, 0x8 -_08092A64: - ldr r0, [r1] - cmp r0, 0 - bne _08092A58 - movs r0, 0 -_08092A6C: - pop {r1} - bx r1 - thumb_func_end sub_8092A4C - thumb_func_start npc_apply_anim_looping @ void npc_apply_anim_looping(struct npc_state *fieldObject, struct obj *object, u8 anim) npc_apply_anim_looping: @ 8092A70 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 8bb20abb4..7caa6d03d 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3539,6 +3539,27 @@ dirn2anim(sub_8092A1C, gUnknown_0850DB38) dirn2anim(sub_8092A2C, gUnknown_0850DB41) dirn2anim(get_run_image_anim_num, gUnknown_0850DB4A) +struct UnkStruct_085094AC { + const union AnimCmd **unk00; + u8 unk04[4]; +}; + +extern const struct UnkStruct_085094AC gUnknown_085094AC[]; + +const struct UnkStruct_085094AC *sub_8092A4C(const union AnimCmd **a0) +{ + const struct UnkStruct_085094AC *retval; + + for (retval = gUnknown_085094AC; retval->unk00 != NULL; retval ++) + { + if (retval->unk00 == a0) + { + return retval; + } + } + return NULL; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 589c34e30aa30236b13b7f6621808aca581675c3 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 18:18:34 -0400 Subject: [PATCH 122/342] obj_npc_animation_step, npc_apply_anim_looping --- asm/field_map_obj.s | 79 --------------------------------------------- src/field_map_obj.c | 55 ++++++++++++++++++++++++++++--- 2 files changed, 50 insertions(+), 84 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 06c18eb2c..1c4b5a145 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,85 +5,6 @@ .text - thumb_func_start npc_apply_anim_looping -@ void npc_apply_anim_looping(struct npc_state *fieldObject, struct obj *object, u8 anim) -npc_apply_anim_looping: @ 8092A70 - push {r4,lr} - adds r4, r1, 0 - lsls r2, 24 - lsrs r2, 24 - ldrb r0, [r0, 0x1] - lsls r0, 27 - cmp r0, 0 - blt _08092AB2 - adds r0, r4, 0 - adds r0, 0x2A - strb r2, [r0] - ldr r0, [r4, 0x8] - bl sub_8092A4C - adds r1, r4, 0 - adds r1, 0x2B - cmp r0, 0 - beq _08092AAA - ldrb r2, [r1] - ldrb r3, [r0, 0x4] - cmp r2, r3 - bne _08092AA0 - ldrb r0, [r0, 0x7] - b _08092AA8 -_08092AA0: - ldrb r3, [r0, 0x5] - cmp r2, r3 - bne _08092AAA - ldrb r0, [r0, 0x6] -_08092AA8: - strb r0, [r1] -_08092AAA: - ldrb r1, [r1] - adds r0, r4, 0 - bl SeekSpriteAnim -_08092AB2: - pop {r4} - pop {r0} - bx r0 - thumb_func_end npc_apply_anim_looping - - thumb_func_start obj_npc_animation_step -@ void obj_npc_animation_step(struct npc_state *fieldObject, struct obj *object, u8 anim) -obj_npc_animation_step: @ 8092AB8 - push {r4,lr} - adds r4, r1, 0 - lsls r2, 24 - lsrs r2, 24 - ldrb r0, [r0, 0x1] - lsls r0, 27 - cmp r0, 0 - blt _08092AF0 - adds r0, r4, 0 - adds r0, 0x2A - strb r2, [r0] - ldr r0, [r4, 0x8] - bl sub_8092A4C - adds r2, r0, 0 - cmp r2, 0 - beq _08092AF0 - ldrb r1, [r2, 0x5] - adds r0, r4, 0 - adds r0, 0x2B - ldrb r0, [r0] - ldrb r3, [r2, 0x4] - cmp r0, r3 - bhi _08092AEA - ldrb r1, [r2, 0x4] -_08092AEA: - adds r0, r4, 0 - bl SeekSpriteAnim -_08092AF0: - pop {r4} - pop {r0} - bx r0 - thumb_func_end obj_npc_animation_step - thumb_func_start sub_8092AF8 sub_8092AF8: @ 8092AF8 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 7caa6d03d..f47639a9e 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3540,19 +3540,19 @@ dirn2anim(sub_8092A2C, gUnknown_0850DB41) dirn2anim(get_run_image_anim_num, gUnknown_0850DB4A) struct UnkStruct_085094AC { - const union AnimCmd **unk00; - u8 unk04[4]; + const union AnimCmd *const *anims; + u8 animPos[4]; }; extern const struct UnkStruct_085094AC gUnknown_085094AC[]; -const struct UnkStruct_085094AC *sub_8092A4C(const union AnimCmd **a0) +static const struct UnkStruct_085094AC *sub_8092A4C(const union AnimCmd *const *anims) { const struct UnkStruct_085094AC *retval; - for (retval = gUnknown_085094AC; retval->unk00 != NULL; retval ++) + for (retval = gUnknown_085094AC; retval->anims != NULL; retval ++) { - if (retval->unk00 == a0) + if (retval->anims == anims) { return retval; } @@ -3560,6 +3560,51 @@ const struct UnkStruct_085094AC *sub_8092A4C(const union AnimCmd **a0) return NULL; } +void npc_apply_anim_looping(struct MapObject *mapObject, struct Sprite *sprite, u8 animNum) +{ + const struct UnkStruct_085094AC *unk85094AC; + + if (!mapObject->mapobj_bit_12) + { + sprite->animNum = animNum; + unk85094AC = sub_8092A4C(sprite->anims); + if (unk85094AC != NULL) + { + if (sprite->animCmdIndex == unk85094AC->animPos[0]) + { + sprite->animCmdIndex = unk85094AC->animPos[3]; + } + else if (sprite->animCmdIndex == unk85094AC->animPos[1]) + { + sprite->animCmdIndex = unk85094AC->animPos[2]; + } + } + SeekSpriteAnim(sprite, sprite->animCmdIndex); + } +} + +void obj_npc_animation_step(struct MapObject *mapObject, struct Sprite *sprite, u8 animNum) +{ + const struct UnkStruct_085094AC *unk85094AC; + + if (!mapObject->mapobj_bit_12) + { + u8 animPos; + + sprite->animNum = animNum; + unk85094AC = sub_8092A4C(sprite->anims); + if (unk85094AC != NULL) + { + animPos = unk85094AC->animPos[1]; + if (sprite->animCmdIndex <= unk85094AC->animPos[0]) + { + animPos = unk85094AC->animPos[0]; + } + SeekSpriteAnim(sprite, animPos); + } + } +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From edd5c81a8ee249625dbd015c80e0e0442776bde9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 18:24:58 -0400 Subject: [PATCH 123/342] sub_8092AF8 --- asm/field_map_obj.s | 34 ---------------------------------- src/field_map_obj.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 34 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 1c4b5a145..9a8294ab2 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,40 +5,6 @@ .text - thumb_func_start sub_8092AF8 -sub_8092AF8: @ 8092AF8 - push {lr} - lsls r1, 16 - lsrs r1, 16 - lsls r3, 16 - lsrs r3, 16 - lsls r0, 16 - asrs r0, 16 - lsls r2, 16 - asrs r2, 16 - cmp r0, r2 - ble _08092B12 - movs r0, 0x3 - b _08092B28 -_08092B12: - cmp r0, r2 - bge _08092B1A - movs r0, 0x4 - b _08092B28 -_08092B1A: - lsls r1, 16 - lsls r0, r3, 16 - cmp r1, r0 - bgt _08092B26 - movs r0, 0x1 - b _08092B28 -_08092B26: - movs r0, 0x2 -_08092B28: - pop {r1} - bx r1 - thumb_func_end sub_8092AF8 - thumb_func_start npc_set_running_behaviour_etc npc_set_running_behaviour_etc: @ 8092B2C push {r4,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index f47639a9e..2987c09ee 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3539,6 +3539,8 @@ dirn2anim(sub_8092A1C, gUnknown_0850DB38) dirn2anim(sub_8092A2C, gUnknown_0850DB41) dirn2anim(get_run_image_anim_num, gUnknown_0850DB4A) +// file boundary? + struct UnkStruct_085094AC { const union AnimCmd *const *anims; u8 animPos[4]; @@ -3605,6 +3607,25 @@ void obj_npc_animation_step(struct MapObject *mapObject, struct Sprite *sprite, } } +// file boundary? + +u8 sub_8092AF8(s16 x1, s16 y1, s16 x2, s16 y2) +{ + if (x1 > x2) + { + return DIR_WEST; + } + if (x1 < x2) + { + return DIR_EAST; + } + if (y1 > y2) + { + return DIR_NORTH; + } + return DIR_SOUTH; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From ca88036ebe4441a2afc7267da1fda2a4b68820a8 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 18:29:14 -0400 Subject: [PATCH 124/342] npc_set_running_behaviour_etc --- asm/field_map_obj.s | 39 --------------------------------------- include/global.fieldmap.h | 1 + src/field_map_obj.c | 9 +++++++++ 3 files changed, 10 insertions(+), 39 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 9a8294ab2..a6333af8f 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,45 +5,6 @@ .text - thumb_func_start npc_set_running_behaviour_etc -npc_set_running_behaviour_etc: @ 8092B2C - push {r4,lr} - mov r12, r0 - lsls r1, 24 - lsrs r1, 24 - movs r3, 0 - strb r1, [r0, 0x6] - adds r0, 0x21 - strb r3, [r0] - adds r0, 0x1 - strb r3, [r0] - ldr r4, =gSprites - mov r0, r12 - ldrb r2, [r0, 0x4] - lsls r0, r2, 4 - adds r0, r2 - lsls r0, 2 - adds r2, r4, 0 - adds r2, 0x1C - adds r0, r2 - ldr r2, =gUnknown_08505438 - lsls r1, 2 - adds r1, r2 - ldr r1, [r1] - str r1, [r0] - mov r0, r12 - ldrb r1, [r0, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - strh r3, [r0, 0x30] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end npc_set_running_behaviour_etc - thumb_func_start npc_running_behaviour_by_direction npc_running_behaviour_by_direction: @ 8092B78 lsls r0, 24 diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index f8955b9fd..4a587cf57 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -299,6 +299,7 @@ struct MapObject2 /*0x1F*/ u8 mapobj_unk_1F; /*0x20*/ u8 mapobj_unk_20; /*0x21*/ u8 mapobj_unk_21; + /*0x22*/ u8 animId; /*size = 0x24*/ }; diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 2987c09ee..06fd36be3 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3626,6 +3626,15 @@ u8 sub_8092AF8(s16 x1, s16 y1, s16 x2, s16 y2) return DIR_SOUTH; } +void npc_set_running_behaviour_etc(struct MapObject *mapObject, u8 animPattern) +{ + mapObject->animPattern = animPattern; + mapObject->mapobj_unk_21 = 0; + mapObject->animId = 0; + gSprites[mapObject->spriteId].callback = gUnknown_08505438[animPattern]; + gSprites[mapObject->spriteId].data1 = 0; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 5812bc4ebe83bb80294bbb40846ae6fb1c76e5bf Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 18:33:38 -0400 Subject: [PATCH 125/342] npc_block_way__next_tile --- asm/field_map_obj.s | 45 ----------------------------------------- include/data3.h | 1 - include/field_map_obj.h | 1 + src/field_map_obj.c | 13 ++++++++++++ 4 files changed, 14 insertions(+), 46 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index a6333af8f..e772aa178 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,51 +5,6 @@ .text - thumb_func_start npc_running_behaviour_by_direction -npc_running_behaviour_by_direction: @ 8092B78 - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0850DB53 - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end npc_running_behaviour_by_direction - - thumb_func_start npc_block_way__next_tile -npc_block_way__next_tile: @ 8092B88 - push {r4-r6,lr} - sub sp, 0x4 - adds r6, r0, 0 - lsls r5, r1, 24 - lsrs r5, 24 - ldrh r1, [r6, 0x10] - mov r0, sp - strh r1, [r0] - ldrh r0, [r6, 0x12] - mov r4, sp - adds r4, 0x2 - strh r0, [r4] - adds r0, r5, 0 - mov r1, sp - adds r2, r4, 0 - bl MoveCoords - mov r0, sp - movs r2, 0 - ldrsh r1, [r0, r2] - movs r0, 0 - ldrsh r2, [r4, r0] - adds r0, r6, 0 - adds r3, r5, 0 - bl npc_block_way - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end npc_block_way__next_tile - thumb_func_start npc_block_way @ u8 npc_block_way(struct npc_state *fieldObject, u16 x, u16 y, u8 direction) npc_block_way: @ 8092BC8 diff --git a/include/data3.h b/include/data3.h index b2b19b050..6d9bbd084 100755 --- a/include/data3.h +++ b/include/data3.h @@ -35,7 +35,6 @@ extern const u8 gUnknown_0850D8C4[5]; extern const u8 gUnknown_0850D8E8[4]; extern bool8 (*const gUnknown_0850DA64[])(struct MapObject *, struct Sprite *, u8, bool8(u8)); - extern const u8 gUnknown_0850DBA0[5]; #endif //GUARD_DATA3_H diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 03ba36e87..a952cfac6 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -68,6 +68,7 @@ u8 GetStepInPlaceDelay8AnimId(u32); u8 GetStepInPlaceDelay16AnimId(u32); u8 GetStepInPlaceDelay32AnimId(u32); u8 npc_block_way(struct MapObject *, s16, s16, u32); +void MoveCoords(u8, s16 *, s16 *); // Exported data declarations diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 06fd36be3..93baccf36 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3635,6 +3635,19 @@ void npc_set_running_behaviour_etc(struct MapObject *mapObject, u8 animPattern) gSprites[mapObject->spriteId].data1 = 0; } +dirn2anim(npc_running_behaviour_by_direction, gUnknown_0850DB53) + +bool8 npc_block_way__next_tile(struct MapObject *mapObject, u8 direction) +{ + s16 x; + s16 y; + + x = mapObject->coords2.x; + y = mapObject->coords2.y; + MoveCoords(direction, &x, &y); + return npc_block_way(mapObject, x, y, direction); +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From fedbcd7bb7202f37f4a3a017a2f4c1fe296a6ae3 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 18:42:35 -0400 Subject: [PATCH 126/342] npc_block_way --- asm/field_map_obj.s | 102 ---------------------------------- include/field_ground_effect.h | 1 + include/fieldmap.h | 3 + src/field_map_obj.c | 24 +++++++- 4 files changed, 27 insertions(+), 103 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index e772aa178..2c9418165 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,108 +5,6 @@ .text - thumb_func_start npc_block_way -@ u8 npc_block_way(struct npc_state *fieldObject, u16 x, u16 y, u8 direction) -npc_block_way: @ 8092BC8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - adds r6, r0, 0 - lsls r1, 16 - lsls r2, 16 - lsls r3, 24 - lsrs r7, r3, 24 - mov r8, r7 - lsrs r0, r1, 16 - mov r9, r0 - asrs r5, r1, 16 - lsrs r0, r2, 16 - mov r10, r0 - asrs r4, r2, 16 - adds r0, r6, 0 - adds r1, r5, 0 - adds r2, r4, 0 - bl IsCoordOutsideFieldObjectMovementRect - lsls r0, 24 - cmp r0, 0 - beq _08092BFE - movs r0, 0x1 - b _08092C7E -_08092BFE: - adds r0, r5, 0 - adds r1, r4, 0 - bl MapGridIsImpassableAt - lsls r0, 24 - cmp r0, 0 - bne _08092C40 - adds r0, r5, 0 - adds r1, r4, 0 - bl GetMapBorderIdAt - movs r1, 0x1 - negs r1, r1 - cmp r0, r1 - beq _08092C40 - adds r0, r6, 0 - adds r1, r5, 0 - adds r2, r4, 0 - adds r3, r7, 0 - bl IsMetatileDirectionallyImpassable - lsls r0, 24 - cmp r0, 0 - bne _08092C40 - ldrb r0, [r6, 0x1] - lsrs r0, 7 - cmp r0, 0 - beq _08092C44 - mov r0, r8 - bl CanCameraMoveInDirection - cmp r0, 0 - bne _08092C44 -_08092C40: - movs r0, 0x2 - b _08092C7E -_08092C44: - ldrb r0, [r6, 0xB] - lsls r0, 28 - lsrs r0, 28 - mov r2, r9 - lsls r1, r2, 16 - asrs r5, r1, 16 - mov r2, r10 - lsls r1, r2, 16 - asrs r4, r1, 16 - adds r1, r5, 0 - adds r2, r4, 0 - bl IsZCoordMismatchAt - lsls r0, 24 - cmp r0, 0 - beq _08092C68 - movs r0, 0x3 - b _08092C7E -_08092C68: - adds r0, r6, 0 - adds r1, r5, 0 - adds r2, r4, 0 - bl CheckForCollisionBetweenFieldObjects - lsls r0, 24 - cmp r0, 0 - bne _08092C7C - movs r0, 0 - b _08092C7E -_08092C7C: - movs r0, 0x4 -_08092C7E: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end npc_block_way - thumb_func_start sub_8092C8C sub_8092C8C: @ 8092C8C push {r4-r7,lr} diff --git a/include/field_ground_effect.h b/include/field_ground_effect.h index e2dc3a00f..398265b87 100644 --- a/include/field_ground_effect.h +++ b/include/field_ground_effect.h @@ -12,5 +12,6 @@ // Exported ROM declarations void SetObjectSubpriorityByZCoord(u8, struct Sprite *, u8); void InitObjectPriorityByZCoord(struct Sprite *, u8); +bool8 IsZCoordMismatchAt(u8, s16, s16); #endif //GUARD_FIELD_GROUND_EFFECT_H diff --git a/include/fieldmap.h b/include/fieldmap.h index 511c1061f..7174d98cc 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -12,5 +12,8 @@ // Exported ROM declarations u8 MapGridGetMetatileBehaviorAt(s16, s16); void GetCameraCoords(u16*, u16*); +bool8 MapGridIsImpassableAt(s16, s16); +s32 GetMapBorderIdAt(s16, s16); +bool32 CanCameraMoveInDirection(u8); #endif //GUARD_FIELDMAP_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 93baccf36..5ec5e68f4 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -121,6 +121,10 @@ void DoGroundEffects_OnFinishStep(struct MapObject *, struct Sprite *); void npc_obj_transfer_image_anim_pause_flag(struct MapObject *, struct Sprite *); void FieldObjectUpdateSubpriority(struct MapObject *, struct Sprite *); +bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject *fieldObject, s16 x, s16 y); +bool8 IsMetatileDirectionallyImpassable(struct MapObject *, s16, s16, u8); +bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *, s16, s16); + // ROM data void (*const gUnknown_08505438[NUM_FIELD_MAP_OBJECT_TEMPLATES])(struct Sprite *); @@ -3637,7 +3641,7 @@ void npc_set_running_behaviour_etc(struct MapObject *mapObject, u8 animPattern) dirn2anim(npc_running_behaviour_by_direction, gUnknown_0850DB53) -bool8 npc_block_way__next_tile(struct MapObject *mapObject, u8 direction) +u8 npc_block_way__next_tile(struct MapObject *mapObject, u8 direction) { s16 x; s16 y; @@ -3648,6 +3652,24 @@ bool8 npc_block_way__next_tile(struct MapObject *mapObject, u8 direction) return npc_block_way(mapObject, x, y, direction); } +u8 npc_block_way(struct MapObject *mapObject, s16 x, s16 y, u32 dirn) +{ + u8 direction; + + direction = dirn; + if (IsCoordOutsideFieldObjectMovementRect(mapObject, x, y)) + return 1; + else if (MapGridIsImpassableAt(x, y) || GetMapBorderIdAt(x, y) == -1 || IsMetatileDirectionallyImpassable(mapObject, x, y, direction)) + return 2; + else if (mapObject->mapobj_bit_15 && !CanCameraMoveInDirection(direction)) + return 2; + else if (IsZCoordMismatchAt(mapObject->mapobj_unk_0B_0, x, y)) + return 3; + else if (CheckForCollisionBetweenFieldObjects(mapObject, x, y)) + return 4; + return 0; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 7d58ce75ad421762f9820492d77b6b05c632f60b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 18:52:20 -0400 Subject: [PATCH 127/342] sub_8092C8C --- asm/field_map_obj.s | 103 -------------------------------------------- src/field_map_obj.c | 42 ++++++++++++++++-- 2 files changed, 38 insertions(+), 107 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 2c9418165..166383b24 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,109 +5,6 @@ .text - thumb_func_start sub_8092C8C -sub_8092C8C: @ 8092C8C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - adds r7, r0, 0 - lsls r1, 16 - lsls r2, 16 - lsls r3, 24 - lsrs r3, 24 - mov r8, r3 - lsrs r0, r1, 16 - mov r9, r0 - asrs r6, r1, 16 - lsrs r0, r2, 16 - mov r10, r0 - asrs r5, r2, 16 - adds r0, r7, 0 - adds r1, r6, 0 - adds r2, r5, 0 - bl IsCoordOutsideFieldObjectMovementRect - lsls r0, 24 - lsrs r0, 24 - negs r1, r0 - orrs r1, r0 - lsrs r4, r1, 31 - adds r0, r6, 0 - adds r1, r5, 0 - bl MapGridIsImpassableAt - lsls r0, 24 - cmp r0, 0 - bne _08092D04 - adds r0, r6, 0 - adds r1, r5, 0 - bl GetMapBorderIdAt - movs r1, 0x1 - negs r1, r1 - cmp r0, r1 - beq _08092D04 - adds r0, r7, 0 - adds r1, r6, 0 - adds r2, r5, 0 - mov r3, r8 - bl IsMetatileDirectionallyImpassable - lsls r0, 24 - cmp r0, 0 - bne _08092D04 - ldrb r0, [r7, 0x1] - lsrs r0, 7 - cmp r0, 0 - beq _08092D08 - mov r0, r8 - bl CanCameraMoveInDirection - cmp r0, 0 - bne _08092D08 -_08092D04: - movs r0, 0x2 - orrs r4, r0 -_08092D08: - ldrb r0, [r7, 0xB] - lsls r0, 28 - lsrs r0, 28 - mov r2, r9 - lsls r1, r2, 16 - asrs r6, r1, 16 - mov r2, r10 - lsls r1, r2, 16 - asrs r5, r1, 16 - adds r1, r6, 0 - adds r2, r5, 0 - bl IsZCoordMismatchAt - lsls r0, 24 - cmp r0, 0 - beq _08092D30 - movs r0, 0x4 - orrs r4, r0 - lsls r0, r4, 24 - lsrs r4, r0, 24 -_08092D30: - adds r0, r7, 0 - adds r1, r6, 0 - adds r2, r5, 0 - bl CheckForCollisionBetweenFieldObjects - lsls r0, 24 - cmp r0, 0 - beq _08092D48 - movs r0, 0x8 - orrs r4, r0 - lsls r0, r4, 24 - lsrs r4, r0, 24 -_08092D48: - adds r0, r4, 0 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_8092C8C - thumb_func_start IsCoordOutsideFieldObjectMovementRect @ bool8 IsCoordOutsideFieldObjectMovementRect(struct npc_state *fieldObject, u16 x, u16 y) IsCoordOutsideFieldObjectMovementRect: @ 8092D58 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 5ec5e68f4..a876797a4 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3658,18 +3658,52 @@ u8 npc_block_way(struct MapObject *mapObject, s16 x, s16 y, u32 dirn) direction = dirn; if (IsCoordOutsideFieldObjectMovementRect(mapObject, x, y)) + { return 1; - else if (MapGridIsImpassableAt(x, y) || GetMapBorderIdAt(x, y) == -1 || IsMetatileDirectionallyImpassable(mapObject, x, y, direction)) + } + if (MapGridIsImpassableAt(x, y) || GetMapBorderIdAt(x, y) == -1 || IsMetatileDirectionallyImpassable(mapObject, x, y, direction)) + { return 2; - else if (mapObject->mapobj_bit_15 && !CanCameraMoveInDirection(direction)) + } + if (mapObject->mapobj_bit_15 && !CanCameraMoveInDirection(direction)) + { return 2; - else if (IsZCoordMismatchAt(mapObject->mapobj_unk_0B_0, x, y)) + } + if (IsZCoordMismatchAt(mapObject->mapobj_unk_0B_0, x, y)) + { return 3; - else if (CheckForCollisionBetweenFieldObjects(mapObject, x, y)) + } + if (CheckForCollisionBetweenFieldObjects(mapObject, x, y)) + { return 4; + } return 0; } +u8 sub_8092C8C(struct MapObject *mapObject, s16 x, s16 y, u8 direction) +{ + u8 retval; + + retval = 0x00; + if (IsCoordOutsideFieldObjectMovementRect(mapObject, x, y)) + { + retval |= 1; + } + if (MapGridIsImpassableAt(x, y) || GetMapBorderIdAt(x, y) == -1 || IsMetatileDirectionallyImpassable(mapObject, x, y, direction) || (mapObject->mapobj_bit_15 && !CanCameraMoveInDirection(direction))) + { + retval |= 2; + } + if (IsZCoordMismatchAt(mapObject->mapobj_unk_0B_0, x, y)) + { + retval |= 4; + } + if (CheckForCollisionBetweenFieldObjects(mapObject, x, y)) + { + retval |= 8; + } + return retval; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 3e472ccc8b9231d3b447fdfdb706a3da5773546b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 21:04:52 -0400 Subject: [PATCH 128/342] IsCoordOutsideFieldObjectMovementRect --- asm/field_map_obj.s | 65 --------------------------------------------- src/field_map_obj.c | 34 +++++++++++++++++++++--- 2 files changed, 31 insertions(+), 68 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 166383b24..ee67bde5d 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,71 +5,6 @@ .text - thumb_func_start IsCoordOutsideFieldObjectMovementRect -@ bool8 IsCoordOutsideFieldObjectMovementRect(struct npc_state *fieldObject, u16 x, u16 y) -IsCoordOutsideFieldObjectMovementRect: @ 8092D58 - push {r4,r5,lr} - adds r4, r0, 0 - lsls r1, 16 - lsrs r3, r1, 16 - lsls r2, 16 - lsrs r5, r2, 16 - ldrb r1, [r4, 0x19] - movs r0, 0xF - ands r0, r1 - cmp r0, 0 - beq _08092D90 - lsls r1, 28 - lsrs r2, r1, 28 - ldrh r0, [r4, 0xC] - subs r2, r0, r2 - lsrs r1, 28 - adds r0, r1 - lsls r0, 16 - lsrs r1, r0, 16 - lsls r2, 16 - lsls r0, r3, 16 - asrs r3, r0, 16 - cmp r2, r0 - bgt _08092DBC - lsls r0, r1, 16 - asrs r0, 16 - cmp r0, r3 - blt _08092DBC -_08092D90: - ldrb r1, [r4, 0x19] - movs r0, 0xF0 - ands r0, r1 - cmp r0, 0 - beq _08092DC0 - lsls r1, 24 - lsrs r2, r1, 28 - ldrh r0, [r4, 0xE] - subs r2, r0, r2 - lsrs r1, 28 - adds r0, r1 - lsls r0, 16 - lsrs r1, r0, 16 - lsls r2, 16 - lsls r0, r5, 16 - asrs r3, r0, 16 - cmp r2, r0 - bgt _08092DBC - lsls r0, r1, 16 - asrs r0, 16 - cmp r0, r3 - bge _08092DC0 -_08092DBC: - movs r0, 0x1 - b _08092DC2 -_08092DC0: - movs r0, 0 -_08092DC2: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end IsCoordOutsideFieldObjectMovementRect - thumb_func_start IsMetatileDirectionallyImpassable @ bool8 IsMetatileDirectionallyImpassable(struct npc_state *fieldObject, u16 x, u16 y, u8 direction) IsMetatileDirectionallyImpassable: @ 8092DC8 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index a876797a4..cc81bcb29 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -121,7 +121,7 @@ void DoGroundEffects_OnFinishStep(struct MapObject *, struct Sprite *); void npc_obj_transfer_image_anim_pause_flag(struct MapObject *, struct Sprite *); void FieldObjectUpdateSubpriority(struct MapObject *, struct Sprite *); -bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject *fieldObject, s16 x, s16 y); +bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject2 *fieldObject, s16 x, s16 y); bool8 IsMetatileDirectionallyImpassable(struct MapObject *, s16, s16, u8); bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *, s16, s16); @@ -3657,7 +3657,7 @@ u8 npc_block_way(struct MapObject *mapObject, s16 x, s16 y, u32 dirn) u8 direction; direction = dirn; - if (IsCoordOutsideFieldObjectMovementRect(mapObject, x, y)) + if (IsCoordOutsideFieldObjectMovementRect((struct MapObject2 *)mapObject, x, y)) { return 1; } @@ -3685,7 +3685,7 @@ u8 sub_8092C8C(struct MapObject *mapObject, s16 x, s16 y, u8 direction) u8 retval; retval = 0x00; - if (IsCoordOutsideFieldObjectMovementRect(mapObject, x, y)) + if (IsCoordOutsideFieldObjectMovementRect((struct MapObject2 *)mapObject, x, y)) { retval |= 1; } @@ -3704,6 +3704,34 @@ u8 sub_8092C8C(struct MapObject *mapObject, s16 x, s16 y, u8 direction) return retval; } +bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject2 *mapObject, s16 x, s16 y) +{ + s16 left; + s16 right; + s16 top; + s16 bottom; + + if (mapObject->mapobj_unk_19 != 0) + { + left = mapObject->coords1.x - mapObject->mapobj_unk_19; + right = mapObject->coords1.x + mapObject->mapobj_unk_19; + if (left > x || right < x) + { + return TRUE; + } + } + if (mapObject->mapobj_unk_19b != 0) + { + top = mapObject->coords1.y - mapObject->mapobj_unk_19b; + bottom = mapObject->coords1.y + mapObject->mapobj_unk_19b; + if (top > y || bottom < y) + { + return TRUE; + } + } + return FALSE; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From c98299386077d8a0c34150405ab0458f52fc2015 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 21:08:44 -0400 Subject: [PATCH 129/342] IsMetatileDirectionallyImpassable --- asm/field_map_obj.s | 45 --------------------------------------------- include/data3.h | 2 ++ src/field_map_obj.c | 9 +++++++++ 3 files changed, 11 insertions(+), 45 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index ee67bde5d..7ad4c2818 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,51 +5,6 @@ .text - thumb_func_start IsMetatileDirectionallyImpassable -@ bool8 IsMetatileDirectionallyImpassable(struct npc_state *fieldObject, u16 x, u16 y, u8 direction) -IsMetatileDirectionallyImpassable: @ 8092DC8 - push {r4-r7,lr} - lsls r1, 16 - lsrs r6, r1, 16 - lsls r2, 16 - lsrs r7, r2, 16 - lsls r3, 24 - ldr r1, =gUnknown_0850DB5C - lsrs r3, 22 - subs r5, r3, 0x4 - adds r1, r5, r1 - ldrb r0, [r0, 0x1E] - ldr r1, [r1] - bl _call_via_r1 - lsls r0, 24 - cmp r0, 0 - bne _08092E0A - ldr r4, =gUnknown_0850DB6C - adds r4, r5, r4 - lsls r0, r6, 16 - asrs r0, 16 - lsls r1, r7, 16 - asrs r1, 16 - bl MapGridGetMetatileBehaviorAt - lsls r0, 24 - lsrs r0, 24 - ldr r1, [r4] - bl _call_via_r1 - lsls r0, 24 - cmp r0, 0 - beq _08092E18 -_08092E0A: - movs r0, 0x1 - b _08092E1A - .pool -_08092E18: - movs r0, 0 -_08092E1A: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end IsMetatileDirectionallyImpassable - thumb_func_start CheckForCollisionBetweenFieldObjects @ bool8 CheckForCollisionBetweenFieldObjects(struct npc_state *fieldObject, u16 x, u16 y) CheckForCollisionBetweenFieldObjects: @ 8092E20 diff --git a/include/data3.h b/include/data3.h index 6d9bbd084..0c7de1272 100755 --- a/include/data3.h +++ b/include/data3.h @@ -34,6 +34,8 @@ extern const u8 gUnknown_0850D8AC[5]; extern const u8 gUnknown_0850D8C4[5]; extern const u8 gUnknown_0850D8E8[4]; extern bool8 (*const gUnknown_0850DA64[])(struct MapObject *, struct Sprite *, u8, bool8(u8)); +extern bool8 (*const gUnknown_0850DB5C[])(u8); +extern bool8 (*const gUnknown_0850DB6C[])(u8); extern const u8 gUnknown_0850DBA0[5]; diff --git a/src/field_map_obj.c b/src/field_map_obj.c index cc81bcb29..74c71333c 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3732,6 +3732,15 @@ bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject2 *mapObject, s16 x, return FALSE; } +bool8 IsMetatileDirectionallyImpassable(struct MapObject *mapObject, s16 x, s16 y, u8 direction) +{ + if (gUnknown_0850DB5C[direction - 1](mapObject->mapobj_unk_1E) || gUnknown_0850DB6C[direction - 1](MapGridGetMetatileBehaviorAt(x, y))) + { + return TRUE; + } + return FALSE; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 951acc8c31029327775e90e21ba6c92c24ff8b3b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 21:29:04 -0400 Subject: [PATCH 130/342] CheckForCollisionBetweenFieldObjects --- asm/field_map_obj.s | 68 ----------------------------------- include/field_ground_effect.h | 1 + src/field_map_obj.c | 22 ++++++++++++ 3 files changed, 23 insertions(+), 68 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 7ad4c2818..58060b539 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,74 +5,6 @@ .text - thumb_func_start CheckForCollisionBetweenFieldObjects -@ bool8 CheckForCollisionBetweenFieldObjects(struct npc_state *fieldObject, u16 x, u16 y) -CheckForCollisionBetweenFieldObjects: @ 8092E20 - push {r4-r7,lr} - adds r6, r0, 0 - lsls r1, 16 - lsrs r7, r1, 16 - movs r4, 0 - lsls r2, 16 - asrs r5, r2, 16 -_08092E2E: - lsls r0, r4, 3 - adds r0, r4 - lsls r0, 2 - ldr r1, =gMapObjects - adds r2, r0, r1 - ldrb r0, [r2] - lsls r0, 31 - cmp r0, 0 - beq _08092E88 - cmp r2, r6 - beq _08092E88 - movs r0, 0x10 - ldrsh r1, [r2, r0] - lsls r0, r7, 16 - asrs r3, r0, 16 - cmp r1, r3 - bne _08092E58 - movs r1, 0x12 - ldrsh r0, [r2, r1] - cmp r0, r5 - beq _08092E68 -_08092E58: - movs r1, 0x14 - ldrsh r0, [r2, r1] - cmp r0, r3 - bne _08092E88 - movs r1, 0x16 - ldrsh r0, [r2, r1] - cmp r0, r5 - bne _08092E88 -_08092E68: - ldrb r0, [r6, 0xB] - lsls r0, 28 - lsrs r0, 28 - ldrb r1, [r2, 0xB] - lsls r1, 28 - lsrs r1, 28 - bl AreZCoordsCompatible - lsls r0, 24 - cmp r0, 0 - beq _08092E88 - movs r0, 0x1 - b _08092E94 - .pool -_08092E88: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0xF - bls _08092E2E - movs r0, 0 -_08092E94: - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end CheckForCollisionBetweenFieldObjects - thumb_func_start sub_8092E9C sub_8092E9C: @ 8092E9C push {lr} diff --git a/include/field_ground_effect.h b/include/field_ground_effect.h index 398265b87..b7242ee7c 100644 --- a/include/field_ground_effect.h +++ b/include/field_ground_effect.h @@ -13,5 +13,6 @@ void SetObjectSubpriorityByZCoord(u8, struct Sprite *, u8); void InitObjectPriorityByZCoord(struct Sprite *, u8); bool8 IsZCoordMismatchAt(u8, s16, s16); +bool8 AreZCoordsCompatible(u8, u8); #endif //GUARD_FIELD_GROUND_EFFECT_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 74c71333c..9855321d3 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3741,6 +3741,28 @@ bool8 IsMetatileDirectionallyImpassable(struct MapObject *mapObject, s16 x, s16 return FALSE; } +bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *mapObject, s16 x, s16 y) +{ + u8 i; + struct MapObject *curObject; + + for (i = 0; i < NUM_FIELD_OBJECTS; i ++) + { + curObject = &gMapObjects[i]; + if (curObject->active && curObject != mapObject) + { + if ((curObject->coords2.x == x && curObject->coords2.y == y) || (curObject->coords3.x == x && curObject->coords3.y == y)) + { + if (AreZCoordsCompatible(mapObject->mapobj_unk_0B_0, curObject->mapobj_unk_0B_0)) + { + return TRUE; + } + } + } + } + return FALSE; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 996d9f4b4204396395e67e33a61ffd7111117fc2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 21:31:37 -0400 Subject: [PATCH 131/342] sub_8092E9C --- asm/field_map_obj.s | 44 -------------------------------------------- src/field_map_obj.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 44 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 58060b539..68ec24489 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,50 +5,6 @@ .text - thumb_func_start sub_8092E9C -sub_8092E9C: @ 8092E9C - push {lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _08092EE8 - ldr r3, =gSprites - ldr r2, =gMapObjects - mov r0, sp - ldrb r1, [r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r3 - ldrh r1, [r0, 0x3C] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _08092EE8 - movs r0, 0x1 - b _08092EEA - .pool -_08092EE8: - movs r0, 0 -_08092EEA: - add sp, 0x4 - pop {r1} - bx r1 - thumb_func_end sub_8092E9C - thumb_func_start sub_8092EF0 sub_8092EF0: @ 8092EF0 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 9855321d3..954088edc 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3763,6 +3763,17 @@ bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *mapObject, s16 x, s return FALSE; } +bool8 sub_8092E9C(u8 localId, u8 mapNum, u8 mapGroup) +{ + u8 mapObjectId; + + if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId) && gSprites[gMapObjects[mapObjectId].spriteId].data7 & 0x02) + { + return TRUE; + } + return FALSE; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From f03c0dc3b4f763c65fefaa8cdf10a06b2fd00dc2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 21:39:29 -0400 Subject: [PATCH 132/342] MoveCoords --- asm/field_map_obj.s | 61 --------------------------------------------- include/data3.h | 1 + src/field_map_obj.c | 16 ++++++++++++ 3 files changed, 17 insertions(+), 61 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 68ec24489..bb612f3d5 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,67 +5,6 @@ .text - thumb_func_start sub_8092EF0 -sub_8092EF0: @ 8092EF0 - push {lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r2, 24 - lsrs r2, 24 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _08092F2E - ldr r3, =gSprites - ldr r2, =gMapObjects - mov r0, sp - ldrb r1, [r0] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x4] - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r3 - ldrh r2, [r1, 0x3C] - movs r0, 0x4 - orrs r0, r2 - strh r0, [r1, 0x3C] -_08092F2E: - add sp, 0x4 - pop {r0} - bx r0 - .pool - thumb_func_end sub_8092EF0 - - thumb_func_start MoveCoords -@ void MoveCoords(u8 direction, u16 *x, u16 *y) -MoveCoords: @ 8092F3C - push {r4,lr} - lsls r0, 24 - ldr r3, =gUnknown_0850DB7C - lsrs r0, 22 - adds r0, r3 - ldrh r3, [r0] - ldrh r4, [r1] - adds r3, r4 - strh r3, [r1] - ldrh r0, [r0, 0x2] - ldrh r1, [r2] - adds r0, r1 - strh r0, [r2] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end MoveCoords - thumb_func_start sub_8092F60 sub_8092F60: @ 8092F60 push {r4,lr} diff --git a/include/data3.h b/include/data3.h index 0c7de1272..d5bccf296 100755 --- a/include/data3.h +++ b/include/data3.h @@ -36,6 +36,7 @@ extern const u8 gUnknown_0850D8E8[4]; extern bool8 (*const gUnknown_0850DA64[])(struct MapObject *, struct Sprite *, u8, bool8(u8)); extern bool8 (*const gUnknown_0850DB5C[])(u8); extern bool8 (*const gUnknown_0850DB6C[])(u8); +extern struct Coords16 gUnknown_0850DB7C[4]; extern const u8 gUnknown_0850DBA0[5]; diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 954088edc..56281a10d 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3774,6 +3774,22 @@ bool8 sub_8092E9C(u8 localId, u8 mapNum, u8 mapGroup) return FALSE; } +void sub_8092EF0(u8 localId, u8 mapNum, u8 mapGroup) +{ + u8 mapObjectId; + + if (!TryGetFieldObjectIdByLocalIdAndMap(localId, mapNum, mapGroup, &mapObjectId)) + { + gSprites[gMapObjects[mapObjectId].spriteId].data7 |= 0x04; + } +} + +void MoveCoords(u8 direction, s16 *x, s16 *y) +{ + *x += gUnknown_0850DB7C[direction].x; + *y += gUnknown_0850DB7C[direction].y; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 76b68e039dc6cebee6da0f421be630f96ff75d2d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 21:45:18 -0400 Subject: [PATCH 133/342] MoveCoordsPixel --- asm/field_map_obj.s | 23 ----------------------- src/field_map_obj.c | 6 ++++++ 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index bb612f3d5..ffc55dd34 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,29 +5,6 @@ .text - thumb_func_start sub_8092F60 -sub_8092F60: @ 8092F60 - push {r4,lr} - lsls r0, 24 - ldr r3, =gUnknown_0850DB7C - lsrs r0, 22 - adds r0, r3 - ldrh r3, [r0] - lsls r3, 4 - ldrh r4, [r1] - adds r3, r4 - strh r3, [r1] - ldrh r0, [r0, 0x2] - lsls r0, 4 - ldrh r1, [r2] - adds r0, r1 - strh r0, [r2] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8092F60 - thumb_func_start sub_8092F88 sub_8092F88: @ 8092F88 push {r4-r7,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 56281a10d..d52bd86f7 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3790,6 +3790,12 @@ void MoveCoords(u8 direction, s16 *x, s16 *y) *y += gUnknown_0850DB7C[direction].y; } +void sub_8092F60(u8 direction, s16 *x, s16 *y) +{ + *x += gUnknown_0850DB7C[direction].x << 4; + *y += gUnknown_0850DB7C[direction].y << 4; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From bd48354207282b2948a2198fec35ae36aaa89f7a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 21:52:55 -0400 Subject: [PATCH 134/342] sub_8092F88 --- asm/field_map_obj.s | 58 --------------------------------------------- src/field_map_obj.c | 31 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 58 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index ffc55dd34..5b5ec4e0d 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,64 +5,6 @@ .text - thumb_func_start sub_8092F88 -sub_8092F88: @ 8092F88 - push {r4-r7,lr} - adds r4, r1, 0 - ldr r1, [sp, 0x14] - lsls r0, 24 - lsls r3, 16 - lsrs r3, 16 - adds r7, r3, 0 - lsls r1, 16 - lsrs r6, r1, 16 - mov r12, r6 - ldr r1, =gUnknown_0850DB7C - lsrs r0, 22 - adds r5, r0, r1 - movs r0, 0 - ldrsh r1, [r5, r0] - cmp r1, 0 - ble _08092FB4 - lsls r0, r3, 16 - asrs r0, 16 - ldrh r3, [r4] - adds r0, r3 - strh r0, [r4] -_08092FB4: - cmp r1, 0 - bge _08092FC2 - ldrh r1, [r4] - lsls r0, r7, 16 - asrs r0, 16 - subs r1, r0 - strh r1, [r4] -_08092FC2: - movs r0, 0x2 - ldrsh r1, [r5, r0] - cmp r1, 0 - ble _08092FD4 - lsls r0, r6, 16 - asrs r0, 16 - ldrh r3, [r2] - adds r0, r3 - strh r0, [r2] -_08092FD4: - cmp r1, 0 - bge _08092FE4 - ldrh r1, [r2] - mov r3, r12 - lsls r0, r3, 16 - asrs r0, 16 - subs r1, r0 - strh r1, [r2] -_08092FE4: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8092F88 - thumb_func_start sub_8092FF0 sub_8092FF0: @ 8092FF0 push {r4,r5,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index d52bd86f7..4592c4dfe 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3796,6 +3796,37 @@ void sub_8092F60(u8 direction, s16 *x, s16 *y) *y += gUnknown_0850DB7C[direction].y << 4; } +void sub_8092F88(u32 dirn, s16 *x, s16 *y, s16 dx, s16 dy) +{ + u8 direction; + s16 dx_2; + s16 dy_2; + s16 cur_x; + s16 cur_y; + + direction = dirn; + dx_2 = dx; + dy_2 = dy; + cur_x = gUnknown_0850DB7C[direction].x; + if (cur_x > 0) + { + *x += dx_2; + } + if (cur_x < 0) + { + *x -= dx_2; + } + cur_y = gUnknown_0850DB7C[direction].y; + if (cur_y > 0) + { + *y += dy_2; + } + if (cur_y < 0) + { + *y -= dy_2; + } +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 3f2c6556cb25c178b29b016dd87bb706a7fb631c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 21:59:14 -0400 Subject: [PATCH 135/342] sub_8092FF0 --- asm/field_map_obj.s | 34 ---------------------------------- include/field_camera.h | 13 +++++++++++++ src/field_map_obj.c | 9 +++++++++ 3 files changed, 22 insertions(+), 34 deletions(-) create mode 100644 include/field_camera.h diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 5b5ec4e0d..a1d549266 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,40 +5,6 @@ .text - thumb_func_start sub_8092FF0 -sub_8092FF0: @ 8092FF0 - push {r4,r5,lr} - ldr r5, =gSaveBlock1Ptr - ldr r4, [r5] - ldrh r4, [r4] - lsls r0, 16 - asrs r0, 16 - subs r0, r4 - lsls r0, 4 - strh r0, [r2] - ldr r0, [r5] - ldrh r0, [r0, 0x2] - lsls r1, 16 - asrs r1, 16 - subs r1, r0 - lsls r1, 4 - strh r1, [r3] - ldr r1, =gUnknown_03005DEC - ldrh r0, [r2] - ldrh r1, [r1] - subs r0, r1 - strh r0, [r2] - ldr r1, =gUnknown_03005DE8 - ldrh r0, [r3] - ldrh r1, [r1] - subs r0, r1 - strh r0, [r3] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8092FF0 - thumb_func_start sub_8093038 sub_8093038: @ 8093038 push {r4-r7,lr} diff --git a/include/field_camera.h b/include/field_camera.h new file mode 100644 index 000000000..48c182c8e --- /dev/null +++ b/include/field_camera.h @@ -0,0 +1,13 @@ +#ifndef GUARD_FIELD_CAMERA_H +#define GUARD_FIELD_CAMERA_H + +// Exported type declarations + +// Exported RAM declarations + +extern u16 gUnknown_03005DEC; +extern u16 gUnknown_03005DE8; + +// Exported ROM declarations + +#endif //GUARD_FIELD_CAMERA_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 4592c4dfe..b8be79d73 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -20,6 +20,7 @@ #include "metatile_behavior.h" #include "field_effect.h" #include "field_effect_helpers.h" +#include "field_camera.h" #include "field_map_obj.h" #define NUM_FIELD_MAP_OBJECT_TEMPLATES 0x51 @@ -3827,6 +3828,14 @@ void sub_8092F88(u32 dirn, s16 *x, s16 *y, s16 dx, s16 dy) } } +void sub_8092FF0(s16 x, s16 y, s16 *dest_x, s16 *dest_y) +{ + *dest_x = (x - gSaveBlock1Ptr->pos.x) << 4; + *dest_y = (y - gSaveBlock1Ptr->pos.y) << 4; + *dest_x -= gUnknown_03005DEC; + *dest_y -= gUnknown_03005DE8; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 44e590add0b4f630397b9f9e206a9a66d1a41ccc Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 22:15:54 -0400 Subject: [PATCH 136/342] sub_8093038 --- asm/field_map_obj.s | 82 ------------------------------------------ include/field_camera.h | 12 +++++++ src/field_map_obj.c | 27 ++++++++++++++ 3 files changed, 39 insertions(+), 82 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index a1d549266..d01dce512 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,88 +5,6 @@ .text - thumb_func_start sub_8093038 -sub_8093038: @ 8093038 - push {r4-r7,lr} - adds r7, r2, 0 - mov r12, r3 - lsls r0, 16 - lsrs r5, r0, 16 - lsls r1, 16 - lsrs r6, r1, 16 - ldr r0, =gUnknown_03005DEC - ldrh r0, [r0] - negs r0, r0 - ldr r1, =gUnknown_03005DD0 - ldr r2, [r1, 0x10] - subs r0, r2 - lsls r0, 16 - lsrs r3, r0, 16 - ldr r0, =gUnknown_03005DE8 - ldrh r0, [r0] - negs r0, r0 - ldr r1, [r1, 0x14] - subs r0, r1 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r2, 0 - ble _08093072 - lsls r0, r3, 16 - movs r3, 0x80 - lsls r3, 13 - adds r0, r3 - lsrs r3, r0, 16 -_08093072: - cmp r2, 0 - bge _0809307E - lsls r0, r3, 16 - ldr r2, =0xfff00000 - adds r0, r2 - lsrs r3, r0, 16 -_0809307E: - cmp r1, 0 - ble _0809308C - lsls r0, r4, 16 - movs r2, 0x80 - lsls r2, 13 - adds r0, r2 - lsrs r4, r0, 16 -_0809308C: - cmp r1, 0 - bge _08093098 - lsls r0, r4, 16 - ldr r1, =0xfff00000 - adds r0, r1 - lsrs r4, r0, 16 -_08093098: - ldr r2, =gSaveBlock1Ptr - ldr r0, [r2] - ldrh r1, [r0] - lsls r0, r5, 16 - asrs r0, 16 - subs r0, r1 - lsls r0, 4 - lsls r1, r3, 16 - asrs r1, 16 - adds r1, r0 - strh r1, [r7] - ldr r0, [r2] - ldrh r1, [r0, 0x2] - lsls r0, r6, 16 - asrs r0, 16 - subs r0, r1 - lsls r0, 4 - lsls r1, r4, 16 - asrs r1, 16 - adds r1, r0 - mov r2, r12 - strh r1, [r2] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8093038 - thumb_func_start sub_80930E0 sub_80930E0: @ 80930E0 push {r4-r6,lr} diff --git a/include/field_camera.h b/include/field_camera.h index 48c182c8e..9fbaac6a2 100644 --- a/include/field_camera.h +++ b/include/field_camera.h @@ -3,6 +3,18 @@ // Exported type declarations +struct CameraObject +{ + void (*callback)(struct CameraObject *); + u32 unk4; + s32 unk8; + s32 unkC; + s32 x; + s32 y; +}; + +extern struct CameraObject gUnknown_03005DD0; + // Exported RAM declarations extern u16 gUnknown_03005DEC; diff --git a/src/field_map_obj.c b/src/field_map_obj.c index b8be79d73..d4793b0a7 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3836,6 +3836,33 @@ void sub_8092FF0(s16 x, s16 y, s16 *dest_x, s16 *dest_y) *dest_y -= gUnknown_03005DE8; } +void sub_8093038(s16 x, s16 y, s16 *dest_x, s16 *dest_y) +{ + s16 dx; + s16 dy; + + dx = -gUnknown_03005DEC - gUnknown_03005DD0.x; + dy = -gUnknown_03005DE8 - gUnknown_03005DD0.y; + if (gUnknown_03005DD0.x > 0) + { + dx += 0x10; + } + if (gUnknown_03005DD0.x < 0) + { + dx -= 0x10; + } + if (gUnknown_03005DD0.y > 0) + { + dy += 0x10; + } + if (gUnknown_03005DD0.y < 0) + { + dy -= 0x10; + } + *dest_x = ((x - gSaveBlock1Ptr->pos.x) << 4) + dx; + *dest_y = ((y - gSaveBlock1Ptr->pos.y) << 4) + dy; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 812ad017e892ff3d93b3df8310335287a556e871 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 22:19:23 -0400 Subject: [PATCH 137/342] sub_80930E0 --- asm/field_map_obj.s | 40 ---------------------------------------- include/field_map_obj.h | 2 +- src/field_map_obj.c | 7 +++++++ 3 files changed, 8 insertions(+), 41 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index d01dce512..941c3e7f5 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,46 +5,6 @@ .text - thumb_func_start sub_80930E0 -sub_80930E0: @ 80930E0 - push {r4-r6,lr} - mov r6, r8 - push {r6} - adds r6, r0, 0 - mov r8, r1 - adds r4, r2, 0 - adds r5, r3, 0 - lsls r4, 16 - lsrs r4, 16 - lsls r5, 16 - lsrs r5, 16 - movs r1, 0 - ldrsh r0, [r6, r1] - mov r2, r8 - movs r3, 0 - ldrsh r1, [r2, r3] - adds r2, r6, 0 - mov r3, r8 - bl sub_8093038 - lsls r4, 16 - asrs r4, 16 - ldrh r0, [r6] - adds r4, r0 - strh r4, [r6] - lsls r5, 16 - asrs r5, 16 - mov r1, r8 - ldrh r1, [r1] - adds r5, r1 - mov r2, r8 - strh r5, [r2] - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_80930E0 - thumb_func_start GetFieldObjectMovingCameraOffset @ void GetFieldObjectMovingCameraOffset(s16 *x, s16 *y) GetFieldObjectMovingCameraOffset: @ 809312C diff --git a/include/field_map_obj.h b/include/field_map_obj.h index a952cfac6..23749c91a 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -37,7 +37,7 @@ void pal_patch_for_npc(u16, u8); void sub_808E16C(s16, s16); void sub_8092FF0(s16, s16, s16 *, s16 *); u8 FieldObjectDirectionToImageAnimId(u8); -void sub_80930E0(s16 *, s16 *, u8, u8); +void sub_80930E0(s16 *, s16 *, s16, s16); void FieldObjectClearAnim(struct MapObject *); void SpawnFieldObjectsInView(s16, s16); u8 sprite_new(u8, u8, s16, s16, u8, u8); diff --git a/src/field_map_obj.c b/src/field_map_obj.c index d4793b0a7..eb9ed2129 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3863,6 +3863,13 @@ void sub_8093038(s16 x, s16 y, s16 *dest_x, s16 *dest_y) *dest_y = ((y - gSaveBlock1Ptr->pos.y) << 4) + dy; } +void sub_80930E0(s16 *x, s16 *y, s16 dx, s16 dy) +{ + sub_8093038(*x, *y, x, y); + *x += dx; + *y += dy; +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From eb41c57ecdd008de76b2aa0ad4849a27ea222007 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 22:23:48 -0400 Subject: [PATCH 138/342] GetFieldObjectMovingCameraOffset --- asm/field_map_obj.s | 40 ---------------------------------------- src/field_map_obj.c | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 40 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 941c3e7f5..79786b208 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,46 +5,6 @@ .text - thumb_func_start GetFieldObjectMovingCameraOffset -@ void GetFieldObjectMovingCameraOffset(s16 *x, s16 *y) -GetFieldObjectMovingCameraOffset: @ 809312C - push {lr} - adds r2, r0, 0 - movs r0, 0 - strh r0, [r2] - strh r0, [r1] - ldr r3, =gUnknown_03005DD0 - ldr r0, [r3, 0x10] - cmp r0, 0 - ble _08093142 - movs r0, 0x1 - strh r0, [r2] -_08093142: - ldr r0, [r3, 0x10] - cmp r0, 0 - bge _0809314E - ldrh r0, [r2] - subs r0, 0x1 - strh r0, [r2] -_0809314E: - ldr r2, [r3, 0x14] - cmp r2, 0 - ble _0809315A - ldrh r0, [r1] - adds r0, 0x1 - strh r0, [r1] -_0809315A: - cmp r2, 0 - bge _08093164 - ldrh r0, [r1] - subs r0, 0x1 - strh r0, [r1] -_08093164: - pop {r0} - bx r0 - .pool - thumb_func_end GetFieldObjectMovingCameraOffset - thumb_func_start FieldObjectMoveDestCoords @ void FieldObjectMoveDestCoords(struct npc_state *fieldObject, u8 direction) FieldObjectMoveDestCoords: @ 809316C diff --git a/src/field_map_obj.c b/src/field_map_obj.c index eb9ed2129..de72478cf 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3870,6 +3870,28 @@ void sub_80930E0(s16 *x, s16 *y, s16 dx, s16 dy) *y += dy; } +void GetFieldObjectMovingCameraOffset(s16 *x, s16 *y) +{ + *x = 0; + *y = 0; + if (gUnknown_03005DD0.x > 0) + { + (*x) ++; + } + if (gUnknown_03005DD0.x < 0) + { + (*x) --; + } + if (gUnknown_03005DD0.y > 0) + { + (*y) ++; + } + if (gUnknown_03005DD0.y < 0) + { + (*y) --; + } +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From 64d3a67b0c1750d4ff6f1011b62c0525c335f88e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 22:27:04 -0400 Subject: [PATCH 139/342] FieldObjectMoveDestCoords --- asm/field_map_obj.s | 19 ------------------- src/field_map_obj.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 79786b208..f0bb2ed2e 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,25 +5,6 @@ .text - thumb_func_start FieldObjectMoveDestCoords -@ void FieldObjectMoveDestCoords(struct npc_state *fieldObject, u8 direction) -FieldObjectMoveDestCoords: @ 809316C - push {r4,lr} - lsls r1, 24 - lsrs r1, 24 - ldrh r4, [r0, 0x10] - strh r4, [r2] - ldrh r0, [r0, 0x12] - strh r0, [r3] - adds r0, r1, 0 - adds r1, r2, 0 - adds r2, r3, 0 - bl MoveCoords - pop {r4} - pop {r0} - bx r0 - thumb_func_end FieldObjectMoveDestCoords - thumb_func_start FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive @ bool8 FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive(struct npc_state *fieldObject) FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive: @ 809318C diff --git a/src/field_map_obj.c b/src/field_map_obj.c index de72478cf..fd03082fb 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3892,6 +3892,16 @@ void GetFieldObjectMovingCameraOffset(s16 *x, s16 *y) } } +void FieldObjectMoveDestCoords(struct MapObject *mapObject, u32 dirn, s16 *x, s16 *y) +{ + u8 direction; + + direction = dirn; + *x = mapObject->coords2.x; + *y = mapObject->coords2.y; + MoveCoords(direction, x, y); +} + asm(".section .text.get_face_direction_anim_id"); void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); From eb7e52d2a89d0d491722bcccaf28bfd7709bf371 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 22:44:47 -0400 Subject: [PATCH 140/342] Deswiss the cheese --- asm/field_map_obj.s | 142 -------------------------------------- include/map_obj_8097404.h | 1 + ld_script.txt | 2 - src/field_map_obj.c | 59 +++++++++++++++- 4 files changed, 58 insertions(+), 146 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index f0bb2ed2e..b433e1aa0 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,148 +5,6 @@ .text - thumb_func_start FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive -@ bool8 FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive(struct npc_state *fieldObject) -FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive: @ 809318C - push {lr} - ldrb r1, [r0] - movs r0, 0x42 - ands r0, r1 - cmp r0, 0 - bne _0809319C - movs r0, 0 - b _0809319E -_0809319C: - movs r0, 0x1 -_0809319E: - pop {r1} - bx r1 - thumb_func_end FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive - - thumb_func_start FieldObjectIsSpecialAnimActive -@ bool8 FieldObjectIsSpecialAnimActive(struct npc_state *fieldObject) -FieldObjectIsSpecialAnimActive: @ 80931A4 - push {lr} - adds r1, r0, 0 - ldrb r0, [r1] - lsls r0, 25 - cmp r0, 0 - bge _080931BA - ldrb r0, [r1, 0x1C] - cmp r0, 0xFF - beq _080931BA - movs r0, 0x1 - b _080931BC -_080931BA: - movs r0, 0 -_080931BC: - pop {r1} - bx r1 - thumb_func_end FieldObjectIsSpecialAnimActive - - thumb_func_start FieldObjectSetSpecialAnim -@ bool8 FieldObjectSetSpecialAnim(struct npc_state *fieldObject, u8 animId) -FieldObjectSetSpecialAnim: @ 80931C0 - push {r4-r6,lr} - adds r4, r0, 0 - lsls r1, 24 - lsrs r5, r1, 24 - bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, 0 - bne _08093200 - adds r0, r4, 0 - bl npc_sync_anim_pause_bits - strb r5, [r4, 0x1C] - ldrb r0, [r4] - movs r1, 0x40 - orrs r0, r1 - movs r1, 0x7F - ands r0, r1 - strb r0, [r4] - ldr r2, =gSprites - ldrb r1, [r4, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - strh r6, [r0, 0x32] - movs r0, 0 - b _08093202 - .pool -_08093200: - movs r0, 0x1 -_08093202: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end FieldObjectSetSpecialAnim - - thumb_func_start FieldObjectForceSetSpecialAnim -@ void FieldObjectForceSetSpecialAnim(struct npc_state *fieldObject, u8 animId) -FieldObjectForceSetSpecialAnim: @ 8093208 - push {r4,r5,lr} - adds r5, r0, 0 - lsls r4, r1, 24 - lsrs r4, 24 - bl FieldObjectClearAnimIfSpecialAnimActive - adds r0, r5, 0 - adds r1, r4, 0 - bl FieldObjectSetSpecialAnim - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end FieldObjectForceSetSpecialAnim - - thumb_func_start FieldObjectClearAnimIfSpecialAnimActive -@ void FieldObjectClearAnimIfSpecialAnimActive(struct npc_state *fieldObject) -FieldObjectClearAnimIfSpecialAnimActive: @ 8093224 - push {lr} - adds r1, r0, 0 - ldrb r0, [r1] - lsls r0, 25 - cmp r0, 0 - bge _08093236 - adds r0, r1, 0 - bl FieldObjectClearAnim -_08093236: - pop {r0} - bx r0 - thumb_func_end FieldObjectClearAnimIfSpecialAnimActive - - thumb_func_start FieldObjectClearAnim -@ void FieldObjectClearAnim(struct npc_state *fieldObject) -FieldObjectClearAnim: @ 809323C - movs r1, 0xFF - strb r1, [r0, 0x1C] - ldrb r2, [r0] - movs r1, 0x41 - negs r1, r1 - ands r1, r2 - movs r2, 0x7F - ands r1, r2 - strb r1, [r0] - ldr r3, =gSprites - ldrb r2, [r0, 0x4] - lsls r1, r2, 4 - adds r1, r2 - lsls r1, 2 - adds r1, r3 - movs r2, 0 - strh r2, [r1, 0x30] - ldrb r1, [r0, 0x4] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r3 - strh r2, [r0, 0x32] - bx lr - .pool - thumb_func_end FieldObjectClearAnim - - .section .text.get_simple_go_anim_id - thumb_func_start GetSimpleGoAnimId @ u8 GetSimpleGoAnimId(u8 direction) GetSimpleGoAnimId: @ 809335C diff --git a/include/map_obj_8097404.h b/include/map_obj_8097404.h index e3b2b1efc..851739114 100644 --- a/include/map_obj_8097404.h +++ b/include/map_obj_8097404.h @@ -11,5 +11,6 @@ // Exported ROM declarations void sub_8097AC8(struct Sprite *); +void npc_sync_anim_pause_bits(struct MapObject *); #endif //GUARD_MAP_OBJ_8097404_H diff --git a/ld_script.txt b/ld_script.txt index 0217fe0fb..2c5eb31a9 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -96,8 +96,6 @@ SECTIONS { asm/field_player_avatar.o(.text); src/field_map_obj.o(.text); asm/field_map_obj.o(.text); - src/field_map_obj.o(.text.get_face_direction_anim_id); - asm/field_map_obj.o(.text.get_simple_go_anim_id); asm/field_ground_effect.o(.text); asm/map_obj_8097404.o(.text); asm/field_message_box.o(.text); diff --git a/src/field_map_obj.c b/src/field_map_obj.c index fd03082fb..2fd6f57e5 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -125,6 +125,8 @@ void FieldObjectUpdateSubpriority(struct MapObject *, struct Sprite *); bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject2 *fieldObject, s16 x, s16 y); bool8 IsMetatileDirectionallyImpassable(struct MapObject *, s16, s16, u8); bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *, s16, s16); +void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); +void FieldObjectClearAnim(struct MapObject *); // ROM data @@ -3902,9 +3904,62 @@ void FieldObjectMoveDestCoords(struct MapObject *mapObject, u32 dirn, s16 *x, s1 MoveCoords(direction, x, y); } -asm(".section .text.get_face_direction_anim_id"); +// file boundary? -void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); +bool8 FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive(struct MapObject *mapObject) +{ + if (mapObject->mapobj_bit_1 || mapObject->mapobj_bit_6) + { + return TRUE; + } + return FALSE; +} + +bool8 FieldObjectIsSpecialAnimActive(struct MapObject *mapObject) +{ + if (mapObject->mapobj_bit_6 && mapObject->mapobj_unk_1C != 0xFF) + { + return TRUE; + } + return FALSE; +} + +bool8 FieldObjectSetSpecialAnim(struct MapObject *mapObject, u8 specialAnimId) +{ + if (FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive(mapObject)) + { + return TRUE; + } + npc_sync_anim_pause_bits(mapObject); + mapObject->mapobj_unk_1C = specialAnimId; + mapObject->mapobj_bit_6 = TRUE; + mapObject->mapobj_bit_7 = FALSE; + gSprites[mapObject->spriteId].data2 = 0; + return FALSE; +} + +void FieldObjectForceSetSpecialAnim(struct MapObject *mapObject, u8 specialAnimId) +{ + FieldObjectClearAnimIfSpecialAnimActive(mapObject); + FieldObjectSetSpecialAnim(mapObject, specialAnimId); +} + +void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *mapObject) +{ + if (mapObject->mapobj_bit_6) + { + FieldObjectClearAnim(mapObject); + } +} + +void FieldObjectClearAnim(struct MapObject *mapObject) +{ + mapObject->mapobj_unk_1C = 0xFF; + mapObject->mapobj_bit_6 = FALSE; + mapObject->mapobj_bit_7 = FALSE; + gSprites[mapObject->spriteId].data1 = 0; + gSprites[mapObject->spriteId].data2 = 0; +} u8 FieldObjectCheckIfSpecialAnimFinishedOrInactive(struct MapObject *mapObject) { From d1666473d3a45b5407d5ca3514185d965394e0ed Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 22:48:19 -0400 Subject: [PATCH 141/342] Another block of functions for getting anim IDs from directions --- asm/field_map_obj.s | 400 -------------------------------------------- src/field_map_obj.c | 16 ++ 2 files changed, 16 insertions(+), 400 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index b433e1aa0..6cabf2933 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,406 +5,6 @@ .text - thumb_func_start GetSimpleGoAnimId -@ u8 GetSimpleGoAnimId(u8 direction) -GetSimpleGoAnimId: @ 809335C - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBA5 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _08093374 - movs r4, 0 -_08093374: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end GetSimpleGoAnimId - - thumb_func_start GetGoSpeed0AnimId -@ u8 GetGoSpeed0AnimId(u8 direction) -GetGoSpeed0AnimId: @ 8093388 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBAA - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _080933A0 - movs r4, 0 -_080933A0: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end GetGoSpeed0AnimId - - thumb_func_start GetGoSpeed1AnimId -@ u8 GetGoSpeed1AnimId(u8 direction) -GetGoSpeed1AnimId: @ 80933B4 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBAF - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _080933CC - movs r4, 0 -_080933CC: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end GetGoSpeed1AnimId - - thumb_func_start GetGoSpeed2AnimId -@ u8 GetGoSpeed2AnimId(u8 direction) -GetGoSpeed2AnimId: @ 80933E0 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBB4 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _080933F8 - movs r4, 0 -_080933F8: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end GetGoSpeed2AnimId - - thumb_func_start GetGoSpeed3AnimId -@ u8 GetGoSpeed3AnimId(u8 direction) -GetGoSpeed3AnimId: @ 809340C - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBB9 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _08093424 - movs r4, 0 -_08093424: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end GetGoSpeed3AnimId - - thumb_func_start sub_8093438 -@ u8 sub_8093438(u8 direction) -sub_8093438: @ 8093438 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBBE - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _08093450 - movs r4, 0 -_08093450: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8093438 - - thumb_func_start GetRunAnimId -@ u8 GetRunAnimId(u8 direction) -GetRunAnimId: @ 8093464 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBC3 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _0809347C - movs r4, 0 -_0809347C: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end GetRunAnimId - - thumb_func_start GetJumpLedgeAnimId -@ u8 GetJumpLedgeAnimId(u8 direction) -GetJumpLedgeAnimId: @ 8093490 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBC8 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _080934A8 - movs r4, 0 -_080934A8: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end GetJumpLedgeAnimId - - thumb_func_start sub_80934BC -@ u8 sub_80934BC(u8 direction) -sub_80934BC: @ 80934BC - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBCD - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _080934D4 - movs r4, 0 -_080934D4: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80934BC - - thumb_func_start sub_80934E8 -@ u8 sub_80934E8(u8 direction) -sub_80934E8: @ 80934E8 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBD2 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _08093500 - movs r4, 0 -_08093500: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80934E8 - - thumb_func_start sub_8093514 -@ u8 sub_8093514(u8 direction) -sub_8093514: @ 8093514 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBD7 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _0809352C - movs r4, 0 -_0809352C: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8093514 - - thumb_func_start sub_8093540 -@ u8 sub_8093540(u8 direction) -sub_8093540: @ 8093540 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBDC - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _08093558 - movs r4, 0 -_08093558: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8093540 - - thumb_func_start GetStepInPlaceDelay32AnimId -@ u8 GetStepInPlaceDelay32AnimId(u8 direction) -GetStepInPlaceDelay32AnimId: @ 809356C - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBE1 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _08093584 - movs r4, 0 -_08093584: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end GetStepInPlaceDelay32AnimId - - thumb_func_start GetStepInPlaceDelay16AnimId -@ u8 GetStepInPlaceDelay16AnimId(u8 direction) -GetStepInPlaceDelay16AnimId: @ 8093598 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBE6 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _080935B0 - movs r4, 0 -_080935B0: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end GetStepInPlaceDelay16AnimId - - thumb_func_start GetStepInPlaceDelay8AnimId -@ u8 GetStepInPlaceDelay8AnimId(u8 direction) -GetStepInPlaceDelay8AnimId: @ 80935C4 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBEB - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _080935DC - movs r4, 0 -_080935DC: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end GetStepInPlaceDelay8AnimId - - thumb_func_start GetStepInPlaceDelay4AnimId -@ u8 GetStepInPlaceDelay4AnimId(u8 direction) -GetStepInPlaceDelay4AnimId: @ 80935F0 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBF0 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _08093608 - movs r4, 0 -_08093608: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end GetStepInPlaceDelay4AnimId - thumb_func_start FieldObjectFaceOppositeDirection @ bool8 FieldObjectFaceOppositeDirection(struct npc_state *fieldObject, u8 direction) FieldObjectFaceOppositeDirection: @ 809361C diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 2fd6f57e5..a1eccc9cb 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4026,3 +4026,19 @@ u8 name(u32 direction) \ } dirn2anim_2(GetFaceDirectionAnimId, gUnknown_0850DBA0); +dirn2anim_2(GetSimpleGoAnimId, gUnknown_0850DBA5); +dirn2anim_2(GetGoSpeed0AnimId, gUnknown_0850DBAA); +dirn2anim_2(GetGoSpeed1AnimId, gUnknown_0850DBAF); +dirn2anim_2(GetGoSpeed2AnimId, gUnknown_0850DBB4); +dirn2anim_2(GetGoSpeed3AnimId, gUnknown_0850DBB9); +dirn2anim_2(sub_8093438, gUnknown_0850DBBE); +dirn2anim_2(GetRunAnimId, gUnknown_0850DBC3); +dirn2anim_2(GetJumpLedgeAnimId, gUnknown_0850DBC8); +dirn2anim_2(sub_80934BC, gUnknown_0850DBCD); +dirn2anim_2(sub_80934E8, gUnknown_0850DBD2); +dirn2anim_2(sub_8093514, gUnknown_0850DBD7); +dirn2anim_2(sub_8093540, gUnknown_0850DBDC); +dirn2anim_2(GetStepInPlaceDelay32AnimId, gUnknown_0850DBE1); +dirn2anim_2(GetStepInPlaceDelay16AnimId, gUnknown_0850DBE6); +dirn2anim_2(GetStepInPlaceDelay8AnimId, gUnknown_0850DBEB); +dirn2anim_2(GetStepInPlaceDelay4AnimId, gUnknown_0850DBF0); From 08cb777fd788fd7cfc44d0d41d7b2ba697a4ed9e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 22:54:15 -0400 Subject: [PATCH 142/342] FieldObjectFaceOppositeDirection --- asm/field_map_obj.s | 23 ----------------------- src/field_map_obj.c | 5 +++++ 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 6cabf2933..681bb1707 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,29 +5,6 @@ .text - thumb_func_start FieldObjectFaceOppositeDirection -@ bool8 FieldObjectFaceOppositeDirection(struct npc_state *fieldObject, u8 direction) -FieldObjectFaceOppositeDirection: @ 809361C - push {r4,lr} - adds r4, r0, 0 - lsls r0, r1, 24 - lsrs r0, 24 - bl GetOppositeDirection - lsls r0, 24 - lsrs r0, 24 - bl GetFaceDirectionAnimId - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r4, 0 - bl FieldObjectSetSpecialAnim - lsls r0, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - thumb_func_end FieldObjectFaceOppositeDirection - thumb_func_start sub_8093648 sub_8093648: @ 8093648 push {r4,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index a1eccc9cb..6e2512000 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4042,3 +4042,8 @@ dirn2anim_2(GetStepInPlaceDelay32AnimId, gUnknown_0850DBE1); dirn2anim_2(GetStepInPlaceDelay16AnimId, gUnknown_0850DBE6); dirn2anim_2(GetStepInPlaceDelay8AnimId, gUnknown_0850DBEB); dirn2anim_2(GetStepInPlaceDelay4AnimId, gUnknown_0850DBF0); + +bool8 FieldObjectFaceOppositeDirection(struct MapObject *mapObject, u8 direction) +{ + return FieldObjectSetSpecialAnim(mapObject, GetFaceDirectionAnimId(GetOppositeDirection(direction))); +} From 95142069690b3d2ef30d759f99c0b3710eeab26a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 22:58:17 -0400 Subject: [PATCH 143/342] Another block of functions for getting anim ids given direction --- asm/field_map_obj.s | 240 -------------------------------------------- src/field_map_obj.c | 11 ++ 2 files changed, 11 insertions(+), 240 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 681bb1707..5a7c4061b 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,246 +5,6 @@ .text - thumb_func_start sub_8093648 -sub_8093648: @ 8093648 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBF5 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _08093660 - movs r4, 0 -_08093660: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8093648 - - thumb_func_start sub_8093674 -sub_8093674: @ 8093674 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBFA - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _0809368C - movs r4, 0 -_0809368C: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8093674 - - thumb_func_start sub_80936A0 -sub_80936A0: @ 80936A0 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DBFF - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _080936B8 - movs r4, 0 -_080936B8: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80936A0 - - thumb_func_start sub_80936CC -sub_80936CC: @ 80936CC - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DC04 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _080936E4 - movs r4, 0 -_080936E4: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80936CC - - thumb_func_start sub_80936F8 -sub_80936F8: @ 80936F8 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DC09 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _08093710 - movs r4, 0 -_08093710: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80936F8 - - thumb_func_start sub_8093724 -sub_8093724: @ 8093724 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DC0E - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _0809373C - movs r4, 0 -_0809373C: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8093724 - - thumb_func_start sub_8093750 -sub_8093750: @ 8093750 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DC13 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _08093768 - movs r4, 0 -_08093768: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8093750 - - thumb_func_start sub_809377C -sub_809377C: @ 809377C - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DC18 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _08093794 - movs r4, 0 -_08093794: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_809377C - - thumb_func_start sub_80937A8 -sub_80937A8: @ 80937A8 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DC1D - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _080937C0 - movs r4, 0 -_080937C0: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80937A8 - - thumb_func_start d2s_08064034 -d2s_08064034: @ 80937D4 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DC22 - mov r0, sp - movs r2, 0x5 - bl memcpy - cmp r4, 0x4 - bls _080937EC - movs r4, 0 -_080937EC: - mov r1, sp - adds r0, r1, r4 - ldrb r0, [r0] - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end d2s_08064034 - thumb_func_start GetOppositeDirection @ u8 GetOppositeDirection(u8 direction) GetOppositeDirection: @ 8093800 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 6e2512000..d0673fdbe 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4047,3 +4047,14 @@ bool8 FieldObjectFaceOppositeDirection(struct MapObject *mapObject, u8 direction { return FieldObjectSetSpecialAnim(mapObject, GetFaceDirectionAnimId(GetOppositeDirection(direction))); } + +dirn2anim_2(sub_8093648, gUnknown_0850DBF5); +dirn2anim_2(sub_8093674, gUnknown_0850DBFA); +dirn2anim_2(sub_80936A0, gUnknown_0850DBFF); +dirn2anim_2(sub_80936CC, gUnknown_0850DC04); +dirn2anim_2(sub_80936F8, gUnknown_0850DC09); +dirn2anim_2(sub_8093724, gUnknown_0850DC0E); +dirn2anim_2(sub_8093750, gUnknown_0850DC13); +dirn2anim_2(sub_809377C, gUnknown_0850DC18); +dirn2anim_2(sub_80937A8, gUnknown_0850DC1D); +dirn2anim_2(d2s_08064034, gUnknown_0850DC22); From 0e3dbf32350d41ff871bffcdb4700dc635b243b7 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 23:03:04 -0400 Subject: [PATCH 144/342] GetOppositeDirection --- asm/field_map_obj.s | 30 ------------------------------ src/field_map_obj.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 30 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 5a7c4061b..8066cfd1a 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,36 +5,6 @@ .text - thumb_func_start GetOppositeDirection -@ u8 GetOppositeDirection(u8 direction) -GetOppositeDirection: @ 8093800 - push {r4,lr} - sub sp, 0x8 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gUnknown_0850DC27 - mov r0, sp - movs r2, 0x8 - bl memcpy - subs r1, r4, 0x1 - lsls r0, r1, 24 - lsrs r0, 24 - cmp r0, 0x7 - bhi _08093828 - mov r2, sp - adds r0, r2, r1 - ldrb r0, [r0] - b _0809382A - .pool -_08093828: - adds r0, r4, 0 -_0809382A: - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - thumb_func_end GetOppositeDirection - thumb_func_start zffu_offset_calc zffu_offset_calc: @ 8093834 lsls r0, 24 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index d0673fdbe..d17f77c1b 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4058,3 +4058,17 @@ dirn2anim_2(sub_8093750, gUnknown_0850DC13); dirn2anim_2(sub_809377C, gUnknown_0850DC18); dirn2anim_2(sub_80937A8, gUnknown_0850DC1D); dirn2anim_2(d2s_08064034, gUnknown_0850DC22); + +extern const u8 gUnknown_0850DC27[8]; + +u8 GetOppositeDirection(u8 direction) +{ + u8 directions[sizeof gUnknown_0850DC27]; + + memcpy(directions, gUnknown_0850DC27, sizeof gUnknown_0850DC27); + if (direction < 1 || direction > (sizeof gUnknown_0850DC27)) + { + return direction; + } + return directions[direction - 1]; +} From 5f189fa53b6791c5d0e24b85228797606f719bdc Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 23:05:53 -0400 Subject: [PATCH 145/342] state_to_direction memes --- asm/field_map_obj.s | 52 --------------------------------------------- include/data3.h | 4 +++- src/field_map_obj.c | 18 ++++++++++++++++ 3 files changed, 21 insertions(+), 53 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 8066cfd1a..c81ef0b06 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,58 +5,6 @@ .text - thumb_func_start zffu_offset_calc -zffu_offset_calc: @ 8093834 - lsls r0, 24 - lsls r1, 24 - lsrs r1, 24 - ldr r2, =gUnknown_0850DC2F - lsrs r0, 22 - subs r0, 0x5 - adds r1, r0 - adds r1, r2 - ldrb r0, [r1] - bx lr - .pool - thumb_func_end zffu_offset_calc - - thumb_func_start state_to_direction -state_to_direction: @ 809384C - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - lsls r1, 24 - lsrs r1, 24 - adds r0, r1, 0 - lsls r2, 24 - lsrs r2, 24 - cmp r1, 0 - beq _0809386C - cmp r2, 0 - beq _0809386C - cmp r1, 0x4 - bhi _0809386C - cmp r2, 0x4 - bls _08093870 -_0809386C: - movs r0, 0 - b _08093882 -_08093870: - adds r1, r2, 0 - bl zffu_offset_calc - ldr r2, =gUnknown_0850DC3F - lsls r1, r4, 2 - subs r1, 0x5 - adds r0, r1 - adds r0, r2 - ldrb r0, [r0] -_08093882: - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end state_to_direction - thumb_func_start FieldObjectExecSpecialAnim @ void FieldObjectExecSpecialAnim(struct npc_state *fieldObject, struct obj *object) FieldObjectExecSpecialAnim: @ 809388C diff --git a/include/data3.h b/include/data3.h index d5bccf296..a19aa6fe8 100755 --- a/include/data3.h +++ b/include/data3.h @@ -36,7 +36,9 @@ extern const u8 gUnknown_0850D8E8[4]; extern bool8 (*const gUnknown_0850DA64[])(struct MapObject *, struct Sprite *, u8, bool8(u8)); extern bool8 (*const gUnknown_0850DB5C[])(u8); extern bool8 (*const gUnknown_0850DB6C[])(u8); -extern struct Coords16 gUnknown_0850DB7C[4]; +extern const struct Coords16 gUnknown_0850DB7C[4]; +extern const u8 gUnknown_0850DC2F[4][4]; +extern const u8 gUnknown_0850DC3F[4][4]; extern const u8 gUnknown_0850DBA0[5]; diff --git a/src/field_map_obj.c b/src/field_map_obj.c index d17f77c1b..ba207e2bd 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4072,3 +4072,21 @@ u8 GetOppositeDirection(u8 direction) } return directions[direction - 1]; } + +u32 zffu_offset_calc(u8 a0, u8 a1) +{ + return gUnknown_0850DC2F[a0 - 1][a1 - 1]; +} + +u32 state_to_direction(u8 a0, u32 a1, u32 a2) +{ + u32 zffuOffset; + u8 a1_2 = a1; + u8 a2_2 = a2; + if (a1_2 == 0 || a2_2 == 0 || a1_2 > DIR_EAST || a2_2 > DIR_EAST) + { + return 0; + } + zffuOffset = zffu_offset_calc(a1_2, a2); + return gUnknown_0850DC3F[a0 - 1][zffuOffset - 1]; +} From 4e22f1e55fd43ebfd4c94dc7c22aa6b403249370 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 23:11:09 -0400 Subject: [PATCH 146/342] MapObjectExec***Anim --- asm/field_map_obj.s | 68 --------------------------------------------- include/data3.h | 2 ++ src/field_map_obj.c | 26 +++++++++++++++-- 3 files changed, 26 insertions(+), 70 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index c81ef0b06..c4da7b242 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,74 +5,6 @@ .text - thumb_func_start FieldObjectExecSpecialAnim -@ void FieldObjectExecSpecialAnim(struct npc_state *fieldObject, struct obj *object) -FieldObjectExecSpecialAnim: @ 809388C - push {r4,lr} - adds r4, r0, 0 - ldr r2, =gUnknown_0850DC50 - ldrb r0, [r4, 0x1C] - lsls r0, 2 - adds r0, r2 - movs r3, 0x32 - ldrsh r2, [r1, r3] - ldr r0, [r0] - lsls r2, 2 - adds r2, r0 - ldr r2, [r2] - adds r0, r4, 0 - bl _call_via_r2 - lsls r0, 24 - cmp r0, 0 - beq _080938B8 - ldrb r0, [r4] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r4] -_080938B8: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end FieldObjectExecSpecialAnim - - thumb_func_start FieldObjectExecRegularAnim -@ bool8 FieldObjectExecRegularAnim(struct npc_state *fieldObject, struct obj *object) -FieldObjectExecRegularAnim: @ 80938C4 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldr r1, =gUnknown_0850DC50 - ldrb r0, [r4, 0x1C] - lsls r0, 2 - adds r0, r1 - movs r2, 0x32 - ldrsh r1, [r5, r2] - ldr r0, [r0] - lsls r1, 2 - adds r1, r0 - ldr r2, [r1] - adds r0, r4, 0 - adds r1, r5, 0 - bl _call_via_r2 - lsls r0, 24 - cmp r0, 0 - bne _080938F4 - movs r0, 0 - b _080938FE - .pool -_080938F4: - movs r0, 0xFF - strb r0, [r4, 0x1C] - movs r0, 0 - strh r0, [r5, 0x32] - movs r0, 0x1 -_080938FE: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end FieldObjectExecRegularAnim - thumb_func_start FieldObjectSetRegularAnim @ void FieldObjectSetRegularAnim(struct npc_state *fieldObject, struct obj *object, u8 animState) FieldObjectSetRegularAnim: @ 8093904 diff --git a/include/data3.h b/include/data3.h index a19aa6fe8..ef6f5193d 100755 --- a/include/data3.h +++ b/include/data3.h @@ -42,4 +42,6 @@ extern const u8 gUnknown_0850DC3F[4][4]; extern const u8 gUnknown_0850DBA0[5]; +extern bool8 (*const *const gUnknown_0850DC50[])(struct MapObject *, struct Sprite *); + #endif //GUARD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index ba207e2bd..9702385e4 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4081,8 +4081,11 @@ u32 zffu_offset_calc(u8 a0, u8 a1) u32 state_to_direction(u8 a0, u32 a1, u32 a2) { u32 zffuOffset; - u8 a1_2 = a1; - u8 a2_2 = a2; + u8 a1_2; + u8 a2_2; + + a1_2 = a1; + a2_2 = a2; if (a1_2 == 0 || a2_2 == 0 || a1_2 > DIR_EAST || a2_2 > DIR_EAST) { return 0; @@ -4090,3 +4093,22 @@ u32 state_to_direction(u8 a0, u32 a1, u32 a2) zffuOffset = zffu_offset_calc(a1_2, a2); return gUnknown_0850DC3F[a0 - 1][zffuOffset - 1]; } + +void FieldObjectExecSpecialAnim(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (gUnknown_0850DC50[mapObject->mapobj_unk_1C][sprite->data2](mapObject, sprite)) + { + mapObject->mapobj_bit_7 = TRUE; + } +} + +bool8 FieldObjectExecRegularAnim(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (gUnknown_0850DC50[mapObject->mapobj_unk_1C][sprite->data2](mapObject, sprite)) + { + mapObject->mapobj_unk_1C = 0xFF; + sprite->data2 = 0; + return TRUE; + } + return FALSE; +} From 4ef7127561e4f2f60e2cfa6351b97143f08f6acb Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 23:12:35 -0400 Subject: [PATCH 147/342] FieldObjectSetRegularAnim --- asm/field_map_obj.s | 9 --------- src/field_map_obj.c | 6 ++++++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index c4da7b242..2d2c39ced 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,15 +5,6 @@ .text - thumb_func_start FieldObjectSetRegularAnim -@ void FieldObjectSetRegularAnim(struct npc_state *fieldObject, struct obj *object, u8 animState) -FieldObjectSetRegularAnim: @ 8093904 - movs r3, 0 - strb r2, [r0, 0x1C] - strh r3, [r1, 0x32] - bx lr - thumb_func_end FieldObjectSetRegularAnim - thumb_func_start an_look_any @ void an_look_any(struct npc_state *fieldObject, struct obj *object, u8 direction) an_look_any: @ 809390C diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 9702385e4..0629fd983 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4112,3 +4112,9 @@ bool8 FieldObjectExecRegularAnim(struct MapObject *mapObject, struct Sprite *spr } return FALSE; } + +void FieldObjectSetRegularAnim(struct MapObject *mapObject, struct Sprite *sprite, u8 animId) +{ + mapObject->mapobj_unk_1C = animId; + sprite->data2 = 0; +} From 8e03a0199c3226ae5426319c0e820e3337840fb8 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 23:20:44 -0400 Subject: [PATCH 148/342] an_look_any simple --- asm/field_map_obj.s | 74 --------------------------------------------- src/field_map_obj.c | 36 ++++++++++++++++++++++ 2 files changed, 36 insertions(+), 74 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 2d2c39ced..61d3ba152 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,80 +5,6 @@ .text - thumb_func_start an_look_any -@ void an_look_any(struct npc_state *fieldObject, struct obj *object, u8 direction) -an_look_any: @ 809390C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r1, r2, 24 - lsrs r1, 24 - bl FieldObjectSetDirection - adds r0, r4, 0 - bl npc_coords_shift_still - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl get_go_image_anim_num - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl obj_npc_animation_step - adds r2, r5, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2] - movs r0, 0x1 - strh r0, [r5, 0x32] - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end an_look_any - - thumb_func_start sub_8093950 -sub_8093950: @ 8093950 - push {lr} - movs r2, 0x1 - bl an_look_any - movs r0, 0x1 - pop {r1} - bx r1 - thumb_func_end sub_8093950 - - thumb_func_start sub_8093960 -sub_8093960: @ 8093960 - push {lr} - movs r2, 0x2 - bl an_look_any - movs r0, 0x1 - pop {r1} - bx r1 - thumb_func_end sub_8093960 - - thumb_func_start sub_8093970 -sub_8093970: @ 8093970 - push {lr} - movs r2, 0x3 - bl an_look_any - movs r0, 0x1 - pop {r1} - bx r1 - thumb_func_end sub_8093970 - - thumb_func_start sub_8093980 -sub_8093980: @ 8093980 - push {lr} - movs r2, 0x4 - bl an_look_any - movs r0, 0x1 - pop {r1} - bx r1 - thumb_func_end sub_8093980 - thumb_func_start npc_apply_direction @ void npc_apply_direction(struct npc_state *fieldObject, struct obj *object, u8 direction, u8 speed) npc_apply_direction: @ 8093990 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 0629fd983..80f628bb5 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -1769,6 +1769,7 @@ u16 npc_paltag_by_palslot(u8 palSlot) } // Map Object Step Callbacks +// file boundary? null_object_step(NoMovement1, FALSE) @@ -4118,3 +4119,38 @@ void FieldObjectSetRegularAnim(struct MapObject *mapObject, struct Sprite *sprit mapObject->mapobj_unk_1C = animId; sprite->data2 = 0; } + +// file boundary? + +void an_look_any(struct MapObject *mapObject, struct Sprite *sprite, u8 direction) +{ + FieldObjectSetDirection(mapObject, direction); + npc_coords_shift_still(mapObject); + obj_npc_animation_step(mapObject, sprite, get_go_image_anim_num(mapObject->mapobj_unk_18)); + sprite->animPaused = TRUE; + sprite->data2 = 1; +} + +bool8 sub_8093950(struct MapObject *mapObject, struct Sprite *sprite) +{ + an_look_any(mapObject, sprite, DIR_SOUTH); + return TRUE; +} + +bool8 sub_8093960(struct MapObject *mapObject, struct Sprite *sprite) +{ + an_look_any(mapObject, sprite, DIR_NORTH); + return TRUE; +} + +bool8 sub_8093970(struct MapObject *mapObject, struct Sprite *sprite) +{ + an_look_any(mapObject, sprite, DIR_WEST); + return TRUE; +} + +bool8 sub_8093980(struct MapObject *mapObject, struct Sprite *sprite) +{ + an_look_any(mapObject, sprite, DIR_EAST); + return TRUE; +} From 432924e56d99d37eb721a03907b0eab943458b60 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 23:31:43 -0400 Subject: [PATCH 149/342] npc_apply_direction --- asm/field_map_obj.s | 78 --------------------------------------- include/map_obj_8097404.h | 3 ++ src/field_map_obj.c | 20 ++++++++++ 3 files changed, 23 insertions(+), 78 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 61d3ba152..9b2689951 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,84 +5,6 @@ .text - thumb_func_start npc_apply_direction -@ void npc_apply_direction(struct npc_state *fieldObject, struct obj *object, u8 direction, u8 speed) -npc_apply_direction: @ 8093990 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - adds r7, r0, 0 - mov r8, r1 - adds r4, r2, 0 - adds r6, r3, 0 - lsls r4, 24 - lsrs r4, 24 - lsls r6, 24 - lsrs r6, 24 - ldrh r1, [r7, 0x10] - mov r0, sp - strh r1, [r0] - ldrh r0, [r7, 0x12] - mov r5, sp - adds r5, 0x2 - strh r0, [r5] - adds r0, r7, 0 - adds r1, r4, 0 - bl FieldObjectSetDirection - adds r0, r4, 0 - mov r1, sp - adds r2, r5, 0 - bl MoveCoords - mov r0, sp - movs r2, 0 - ldrsh r1, [r0, r2] - movs r0, 0 - ldrsh r2, [r5, r0] - adds r0, r7, 0 - bl npc_coords_shift - mov r0, r8 - adds r1, r4, 0 - adds r2, r6, 0 - bl oamt_npc_ministep_reset - mov r4, r8 - adds r4, 0x2C - ldrb r1, [r4] - movs r0, 0x41 - negs r0, r0 - ands r0, r1 - strb r0, [r4] - ldr r0, =gUnknown_020375B8 - ldr r0, [r0] - cmp r0, 0 - beq _08093A0E - adds r0, r7, 0 - bl sub_8097F78 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x10 - beq _08093A0E - ldrb r0, [r4] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r4] -_08093A0E: - ldrb r0, [r7] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r7] - movs r0, 0x1 - mov r1, r8 - strh r0, [r1, 0x32] - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end npc_apply_direction - thumb_func_start do_go_anim @ void do_go_anim(struct npc_state *fieldObject, struct obj *object, u8 direction, u8 speed) do_go_anim: @ 8093A2C diff --git a/include/map_obj_8097404.h b/include/map_obj_8097404.h index 851739114..afa7a3bae 100644 --- a/include/map_obj_8097404.h +++ b/include/map_obj_8097404.h @@ -8,9 +8,12 @@ // Exported type declarations // Exported RAM declarations +extern void *gUnknown_020375B8; // Exported ROM declarations void sub_8097AC8(struct Sprite *); void npc_sync_anim_pause_bits(struct MapObject *); +void oamt_npc_ministep_reset(struct Sprite *, u8, u8); +u8 sub_8097F78(struct MapObject *); #endif //GUARD_MAP_OBJ_8097404_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 80f628bb5..4f2a359e4 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4154,3 +4154,23 @@ bool8 sub_8093980(struct MapObject *mapObject, struct Sprite *sprite) an_look_any(mapObject, sprite, DIR_EAST); return TRUE; } + +void npc_apply_direction(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 speed) +{ + s16 x; + s16 y; + + x = mapObject->coords2.x; + y = mapObject->coords2.y; + FieldObjectSetDirection(mapObject, direction); + MoveCoords(direction, &x, &y); + npc_coords_shift(mapObject, x, y); + oamt_npc_ministep_reset(sprite, direction, speed); + sprite->animPaused = FALSE; + if (gUnknown_020375B8 != NULL && sub_8097F78(mapObject) != 0x10) + { + sprite->animPaused = TRUE; + } + mapObject->mapobj_bit_2 = TRUE; + sprite->data2 = 1; +} From 529ccf9a960209333b21aab59b620330370cc791 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 23:49:31 -0400 Subject: [PATCH 150/342] do_go_anim --- asm/field_map_obj.s | 47 --------------------------------------------- include/data3.h | 1 + src/field_map_obj.c | 9 +++++++++ 3 files changed, 10 insertions(+), 47 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 9b2689951..cd7145160 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,53 +5,6 @@ .text - thumb_func_start do_go_anim -@ void do_go_anim(struct npc_state *fieldObject, struct obj *object, u8 direction, u8 speed) -do_go_anim: @ 8093A2C - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x14 - adds r5, r0, 0 - mov r8, r1 - adds r4, r3, 0 - lsls r2, 24 - lsrs r2, 24 - lsls r4, 24 - lsrs r4, 24 - mov r1, sp - ldr r0, =gUnknown_0850DEE8 - ldm r0!, {r3,r6,r7} - stm r1!, {r3,r6,r7} - ldm r0!, {r3,r6} - stm r1!, {r3,r6} - adds r0, r5, 0 - mov r1, r8 - adds r3, r4, 0 - bl npc_apply_direction - lsls r4, 2 - mov r7, sp - adds r1, r7, r4 - ldrb r0, [r5, 0x18] - lsls r0, 28 - lsrs r0, 28 - ldr r1, [r1] - bl _call_via_r1 - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r5, 0 - mov r1, r8 - bl npc_apply_anim_looping - add sp, 0x14 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end do_go_anim - thumb_func_start do_run_anim @ void do_run_anim(struct npc_state *fieldObject, struct obj *object, u8 direction) do_run_anim: @ 8093A88 diff --git a/include/data3.h b/include/data3.h index ef6f5193d..9cd6e2fe1 100755 --- a/include/data3.h +++ b/include/data3.h @@ -43,5 +43,6 @@ extern const u8 gUnknown_0850DC3F[4][4]; extern const u8 gUnknown_0850DBA0[5]; extern bool8 (*const *const gUnknown_0850DC50[])(struct MapObject *, struct Sprite *); +extern u8 (*const gUnknown_0850DEE8[5])(u8); #endif //GUARD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 4f2a359e4..0e9086d33 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4174,3 +4174,12 @@ void npc_apply_direction(struct MapObject *mapObject, struct Sprite *sprite, u8 mapObject->mapobj_bit_2 = TRUE; sprite->data2 = 1; } + +void do_go_anim(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 speed) +{ + u8 (*functions[ARRAY_COUNT(gUnknown_0850DEE8)])(u8); + + memcpy(functions, gUnknown_0850DEE8, sizeof gUnknown_0850DEE8); + npc_apply_direction(mapObject, sprite, direction, speed); + npc_apply_anim_looping(mapObject, sprite, functions[speed](mapObject->mapobj_unk_18)); +} From 7c8991842f10cce925a5b3a23f3887a0bb41ecb5 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 16 Sep 2017 23:52:50 -0400 Subject: [PATCH 151/342] do_run_anim --- asm/field_map_obj.s | 25 ------------------------- src/field_map_obj.c | 6 ++++++ 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index cd7145160..7aa32c862 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,31 +5,6 @@ .text - thumb_func_start do_run_anim -@ void do_run_anim(struct npc_state *fieldObject, struct obj *object, u8 direction) -do_run_anim: @ 8093A88 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r2, 24 - lsrs r2, 24 - movs r3, 0x1 - bl npc_apply_direction - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl get_run_image_anim_num - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl npc_apply_anim_looping - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end do_run_anim - thumb_func_start npc_obj_ministep_stop_on_arrival @ bool8 npc_obj_ministep_stop_on_arrival(struct npc_state *fieldObject, struct obj *object) npc_obj_ministep_stop_on_arrival: @ 8093AB8 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 0e9086d33..5e32d7330 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4183,3 +4183,9 @@ void do_go_anim(struct MapObject *mapObject, struct Sprite *sprite, u8 direction npc_apply_direction(mapObject, sprite, direction, speed); npc_apply_anim_looping(mapObject, sprite, functions[speed](mapObject->mapobj_unk_18)); } + +void do_run_anim(struct MapObject *mapObject, struct Sprite *sprite, u8 direction) +{ + npc_apply_direction(mapObject, sprite, direction, 1); + npc_apply_anim_looping(mapObject, sprite, get_run_image_anim_num(mapObject->mapobj_unk_18)); +} From 0582b5cb909298b49e7f0588c042fb20a951be44 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 08:05:33 -0400 Subject: [PATCH 152/342] npc_obj_ministep_stop_on_arrival --- asm/field_map_obj.s | 33 ------------------------- include/field_ground_effect.h | 4 ++++ include/field_map_obj.h | 2 ++ include/map_obj_8097404.h | 1 + src/field_map_obj.c | 45 +++++++++++++++++++---------------- 5 files changed, 32 insertions(+), 53 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 7aa32c862..25ec2cc28 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,39 +5,6 @@ .text - thumb_func_start npc_obj_ministep_stop_on_arrival -@ bool8 npc_obj_ministep_stop_on_arrival(struct npc_state *fieldObject, struct obj *object) -npc_obj_ministep_stop_on_arrival: @ 8093AB8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl obj_npc_ministep - lsls r0, 24 - cmp r0, 0 - bne _08093ACE - movs r0, 0 - b _08093AEA -_08093ACE: - adds r0, r4, 0 - bl npc_coords_shift_still - ldrb r0, [r4] - movs r1, 0x8 - orrs r0, r1 - strb r0, [r4] - adds r2, r5, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2] - movs r0, 0x1 -_08093AEA: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end npc_obj_ministep_stop_on_arrival - thumb_func_start sub_8093AF0 @ void sub_8093AF0(struct npc_state *fieldObject, struct obj *object, u8 direction) sub_8093AF0: @ 8093AF0 diff --git a/include/field_ground_effect.h b/include/field_ground_effect.h index b7242ee7c..63b67ceaf 100644 --- a/include/field_ground_effect.h +++ b/include/field_ground_effect.h @@ -14,5 +14,9 @@ void SetObjectSubpriorityByZCoord(u8, struct Sprite *, u8); void InitObjectPriorityByZCoord(struct Sprite *, u8); bool8 IsZCoordMismatchAt(u8, s16, s16); bool8 AreZCoordsCompatible(u8, u8); +void FieldObjectUpdateSubpriority(struct MapObject *, struct Sprite *); +void DoGroundEffects_OnSpawn(struct MapObject *, struct Sprite *); +void DoGroundEffects_OnBeginStep(struct MapObject *, struct Sprite *); +void DoGroundEffects_OnFinishStep(struct MapObject *, struct Sprite *); #endif //GUARD_FIELD_GROUND_EFFECT_H diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 23749c91a..40cc64054 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -39,6 +39,7 @@ void sub_8092FF0(s16, s16, s16 *, s16 *); u8 FieldObjectDirectionToImageAnimId(u8); void sub_80930E0(s16 *, s16 *, s16, s16); void FieldObjectClearAnim(struct MapObject *); +void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); void SpawnFieldObjectsInView(s16, s16); u8 sprite_new(u8, u8, s16, s16, u8, u8); u8 AddPseudoFieldObject(u16, void (*)(struct Sprite *), s16, s16, u8); @@ -69,6 +70,7 @@ u8 GetStepInPlaceDelay16AnimId(u32); u8 GetStepInPlaceDelay32AnimId(u32); u8 npc_block_way(struct MapObject *, s16, s16, u32); void MoveCoords(u8, s16 *, s16 *); +bool8 FieldObjectIsSpecialAnimActive(struct MapObject *); // Exported data declarations diff --git a/include/map_obj_8097404.h b/include/map_obj_8097404.h index afa7a3bae..e5e6fba70 100644 --- a/include/map_obj_8097404.h +++ b/include/map_obj_8097404.h @@ -15,5 +15,6 @@ void sub_8097AC8(struct Sprite *); void npc_sync_anim_pause_bits(struct MapObject *); void oamt_npc_ministep_reset(struct Sprite *, u8, u8); u8 sub_8097F78(struct MapObject *); +bool8 obj_npc_ministep(struct Sprite *sprite); #endif //GUARD_MAP_OBJ_8097404_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 5e32d7330..cd840ba70 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -112,21 +112,14 @@ bool8 FieldObjectExecRegularAnim(struct MapObject *, struct Sprite *); void SetFieldObjectStepTimer(struct Sprite *, s16); bool8 RunFieldObjectStepTimer(struct Sprite *); bool8 npc_block_way__next_tile(struct MapObject *, u8); -u32 state_to_direction(u8, u32, u32); -void DoGroundEffects_OnSpawn(struct MapObject *, struct Sprite *); -void sub_80964E8(struct MapObject *, struct Sprite *); -bool8 FieldObjectIsSpecialAnimActive(struct MapObject *); -void FieldObjectExecSpecialAnim(struct MapObject *, struct Sprite *); -void DoGroundEffects_OnBeginStep(struct MapObject *, struct Sprite *); -void DoGroundEffects_OnFinishStep(struct MapObject *, struct Sprite *); -void npc_obj_transfer_image_anim_pause_flag(struct MapObject *, struct Sprite *); -void FieldObjectUpdateSubpriority(struct MapObject *, struct Sprite *); +static u32 state_to_direction(u8, u32, u32); +/*static*/ void sub_80964E8(struct MapObject *, struct Sprite *); +static void FieldObjectExecSpecialAnim(struct MapObject *, struct Sprite *); +/*static*/ void npc_obj_transfer_image_anim_pause_flag(struct MapObject *, struct Sprite *); -bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject2 *fieldObject, s16 x, s16 y); -bool8 IsMetatileDirectionallyImpassable(struct MapObject *, s16, s16, u8); -bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *, s16, s16); -void FieldObjectClearAnimIfSpecialAnimActive(struct MapObject *); -void FieldObjectClearAnim(struct MapObject *); +static bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject2 *, s16, s16); +static bool8 IsMetatileDirectionallyImpassable(struct MapObject *, s16, s16, u8); +static bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *, s16, s16); // ROM data @@ -3708,7 +3701,7 @@ u8 sub_8092C8C(struct MapObject *mapObject, s16 x, s16 y, u8 direction) return retval; } -bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject2 *mapObject, s16 x, s16 y) +static bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject2 *mapObject, s16 x, s16 y) { s16 left; s16 right; @@ -3736,7 +3729,7 @@ bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject2 *mapObject, s16 x, return FALSE; } -bool8 IsMetatileDirectionallyImpassable(struct MapObject *mapObject, s16 x, s16 y, u8 direction) +static bool8 IsMetatileDirectionallyImpassable(struct MapObject *mapObject, s16 x, s16 y, u8 direction) { if (gUnknown_0850DB5C[direction - 1](mapObject->mapobj_unk_1E) || gUnknown_0850DB6C[direction - 1](MapGridGetMetatileBehaviorAt(x, y))) { @@ -3745,7 +3738,7 @@ bool8 IsMetatileDirectionallyImpassable(struct MapObject *mapObject, s16 x, s16 return FALSE; } -bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *mapObject, s16 x, s16 y) +static bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *mapObject, s16 x, s16 y) { u8 i; struct MapObject *curObject; @@ -4074,12 +4067,12 @@ u8 GetOppositeDirection(u8 direction) return directions[direction - 1]; } -u32 zffu_offset_calc(u8 a0, u8 a1) +static u32 zffu_offset_calc(u8 a0, u8 a1) { return gUnknown_0850DC2F[a0 - 1][a1 - 1]; } -u32 state_to_direction(u8 a0, u32 a1, u32 a2) +static u32 state_to_direction(u8 a0, u32 a1, u32 a2) { u32 zffuOffset; u8 a1_2; @@ -4095,7 +4088,7 @@ u32 state_to_direction(u8 a0, u32 a1, u32 a2) return gUnknown_0850DC3F[a0 - 1][zffuOffset - 1]; } -void FieldObjectExecSpecialAnim(struct MapObject *mapObject, struct Sprite *sprite) +static void FieldObjectExecSpecialAnim(struct MapObject *mapObject, struct Sprite *sprite) { if (gUnknown_0850DC50[mapObject->mapobj_unk_1C][sprite->data2](mapObject, sprite)) { @@ -4189,3 +4182,15 @@ void do_run_anim(struct MapObject *mapObject, struct Sprite *sprite, u8 directio npc_apply_direction(mapObject, sprite, direction, 1); npc_apply_anim_looping(mapObject, sprite, get_run_image_anim_num(mapObject->mapobj_unk_18)); } + +bool8 npc_obj_ministep_stop_on_arrival(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (obj_npc_ministep(sprite)) + { + npc_coords_shift_still(mapObject); + mapObject->mapobj_bit_3 = TRUE; + sprite->animPaused = TRUE; + return TRUE; + } + return FALSE; +} From a9a66b06ef9f747d55be846dfc02ee90a39deddb Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 17 Sep 2017 14:10:32 +0200 Subject: [PATCH 153/342] start porting cam's port of battle3 --- asm/battle_2.s | 94 +- asm/battle_3.s | 4600 +------------------------------------ asm/battle_4.s | 314 +-- asm/battle_5.s | 16 +- asm/battle_anim_80FE840.s | 4 +- asm/battle_anim_8170478.s | 2 +- asm/battle_message.s | 4 +- asm/pokemon_item_effect.s | 2 +- asm/recorded_battle.s | 2 +- asm/rom3.s | 10 +- asm/rom_817C95C.s | 16 +- data/battle_scripts_1.s | 64 +- include/battle.h | 172 +- include/hall_of_fame.h | 9 + ld_script.txt | 1 + src/battle_3.c | 1387 +++++++++++ src/battle_ai.c | 6 +- src/hall_of_fame.c | 4 + sym_ewram.txt | 12 +- 19 files changed, 1846 insertions(+), 4873 deletions(-) create mode 100644 include/hall_of_fame.h create mode 100644 src/battle_3.c create mode 100644 src/hall_of_fame.c diff --git a/asm/battle_2.s b/asm/battle_2.s index dd3e6d38c..502f2bab8 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -6434,7 +6434,7 @@ _08039FDC: strb r1, [r0] ldr r2, =gBattleWeather strh r1, [r2] - ldr r1, =gUnknown_020243D0 + ldr r1, =gWishFutureKnock movs r2, 0 movs r3, 0 _0803A004: @@ -7808,7 +7808,7 @@ _0803ABD4: movs r2, 0 bl dp01_build_cmdbuf_x00_a_b_0 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldrb r0, [r5] adds r0, 0x1 strb r0, [r5] @@ -7857,7 +7857,7 @@ bc_load_battlefield: @ 803AC34 movs r0, 0 bl dp01_build_cmdbuf_x2E_a ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattleMainFunc ldr r0, =sub_803AC84 str r0, [r1] @@ -8040,7 +8040,7 @@ _0803ADCA: movs r0, 0 bl dp01_build_cmdbuf_x07_7_7_7 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0803ADE4: ldr r5, =gBattleTypeFlags ldr r0, [r5] @@ -8057,7 +8057,7 @@ _0803ADE4: movs r0, 0 bl dp01_build_cmdbuf_x07_7_7_7 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0803AE0A: ldrb r0, [r4] bl GetBankSide @@ -8114,7 +8114,7 @@ _0803AE96: movs r0, 0 bl dp01_build_cmdbuf_x04_4_4_4 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlePartyID ldrb r0, [r4] lsls r0, 1 @@ -8153,7 +8153,7 @@ _0803AEEA: movs r0, 0 bl dp01_build_cmdbuf_x07_7_7_7 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0803AEF6: ldr r0, =gBattleTypeFlags ldr r0, [r0] @@ -8172,7 +8172,7 @@ _0803AEF6: movs r0, 0 bl dp01_build_cmdbuf_x07_7_7_7 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0803AF20: ldr r0, =gBattleTypeFlags ldr r0, [r0] @@ -8282,7 +8282,7 @@ _0803AFFA: movs r2, 0x80 bl dp01_build_cmdbuf_x30_TODO ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution movs r7, 0 mov r6, r8 mov r5, sp @@ -8334,7 +8334,7 @@ _0803B072: movs r2, 0x80 bl dp01_build_cmdbuf_x30_TODO ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattleMainFunc ldr r0, =bc_battle_begin_message b _0803B10A @@ -8522,7 +8522,7 @@ _0803B20E: movs r0, 0 bl dp01_build_cmdbuf_x2F_2F_2F_2F ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0803B228: ldrb r0, [r4] adds r0, 0x1 @@ -8596,7 +8596,7 @@ _0803B2B2: movs r0, 0 bl dp01_build_cmdbuf_x2F_2F_2F_2F ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, =gBattleTypeFlags ldr r0, [r0] ldr r1, =0x00008040 @@ -8793,7 +8793,7 @@ _0803B45E: movs r0, 0 bl dp01_build_cmdbuf_x2F_2F_2F_2F ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0803B478: ldrb r0, [r4] adds r0, 0x1 @@ -8877,7 +8877,7 @@ _0803B51A: movs r0, 0 bl dp01_build_cmdbuf_x2F_2F_2F_2F ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, =gBattleTypeFlags ldr r0, [r0] movs r1, 0x40 @@ -8949,7 +8949,7 @@ _0803B5B2: movs r2, 0 bl dp01_build_cmdbuf_x05_a_b_c ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0803B5D4: ldrb r0, [r4] adds r0, 0x1 @@ -9177,7 +9177,7 @@ _0803B79A: ldrb r1, [r0] movs r0, 0 movs r2, 0 - bl berry_effects_maybe + bl ItemBattleEffects lsls r0, 24 cmp r0, 0 beq _0803B7BC @@ -9208,7 +9208,7 @@ _0803B7DA: mov r8, r1 movs r7, 0x6 ldr r6, =gUnknown_0202421C - ldr r2, =gUnknown_02024274 + ldr r2, =gChosenMovesByBanks movs r4, 0xFF movs r3, 0 _0803B7EA: @@ -9328,7 +9328,7 @@ bc_8013B1C: @ 803B904 cmp r0, 0 bne _0803B994 ldr r1, =gBattleMainFunc - ldr r0, =sub_803B9BC + ldr r0, =BattleTurnPassed str r0, [r1] ldr r3, =gNoOfAllBanks ldr r1, =gBattleCommunication @@ -9404,8 +9404,8 @@ _0803B994: .pool thumb_func_end bc_8013B1C - thumb_func_start sub_803B9BC -sub_803B9BC: @ 803B9BC + thumb_func_start BattleTurnPassed +BattleTurnPassed: @ 803B9BC push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -9416,13 +9416,13 @@ sub_803B9BC: @ 803B9BC ldrb r0, [r0] cmp r0, 0 bne _0803B9EA - bl sub_80401D0 + bl UpdateTurnCounters lsls r0, 24 cmp r0, 0 beq _0803B9DE b _0803BB78 _0803B9DE: - bl sub_8040924 + bl TurnBasedEffects lsls r0, 24 cmp r0, 0 beq _0803B9EA @@ -9514,7 +9514,7 @@ _0803BAB2: ldr r7, =gUnknown_0202421C movs r6, 0xFF movs r5, 0 - ldr r3, =gUnknown_02024274 + ldr r3, =gChosenMovesByBanks _0803BACC: adds r1, r2, r7 ldrb r0, [r1] @@ -9586,7 +9586,7 @@ _0803BB78: pop {r0} bx r0 .pool - thumb_func_end sub_803B9BC + thumb_func_end BattleTurnPassed thumb_func_start sub_803BB88 sub_803BB88: @ 803BB88 @@ -10178,7 +10178,7 @@ _0803C0A8: .4byte _0803C6C4 .4byte _0803C4B4 _0803C0DC: - bl sub_80400C8 + bl AreAllMovesUnusable lsls r0, 24 cmp r0, 0 beq _0803C134 @@ -10223,7 +10223,7 @@ _0803C134: ldrh r2, [r0, 0x6] cmp r2, 0 beq _0803C188 - ldr r1, =gUnknown_02024274 + ldr r1, =gChosenMovesByBanks lsls r0, r4, 1 adds r0, r1 strh r2, [r0] @@ -10552,7 +10552,7 @@ _0803C410: _0803C42E: ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0803C6C4 .pool _0803C440: @@ -10596,7 +10596,7 @@ _0803C48C: movs r0, 0 bl sub_8033E6C ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0803C6C4 .pool _0803C4B4: @@ -10660,7 +10660,7 @@ _0803C532: movs r0, 0 bl dp01_build_cmdbuf_x32_32_32_32 ldrb r0, [r5] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution bl _0803CD70 .pool _0803C550: @@ -10813,7 +10813,7 @@ _0803C6AE: bl dp01_build_cmdbuf_x32_32_32_32 ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0803CD70 .pool _0803C6C4: @@ -11083,7 +11083,7 @@ _0803C942: adds r0, r5 ldrb r0, [r0] strb r0, [r1] - ldr r0, =gUnknown_02024274 + ldr r0, =gChosenMovesByBanks ldrb r2, [r6] lsls r5, r2, 1 adds r5, r0 @@ -11299,7 +11299,7 @@ _0803CB66: ldr r4, =gActiveBank _0803CB68: ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0803CB6E: ldr r0, =gBattleCommunication ldrb r1, [r4] @@ -12704,7 +12704,7 @@ _0803D71C: ldrb r0, [r1] adds r0, 0x1 strb r0, [r1] - ldr r1, =gUnknown_02024274 + ldr r1, =gChosenMovesByBanks ldrb r3, [r5] lsls r0, r3, 1 adds r0, r1 @@ -13861,7 +13861,7 @@ _0803E2DC: adds r0, r1 adds r3, 0xC adds r0, r3 - ldr r1, =gUnknown_02024274 + ldr r1, =gChosenMovesByBanks lsls r2, 1 adds r2, r1 ldrh r3, [r0] @@ -14400,7 +14400,7 @@ _0803E7EC: movs r0, 0x4 strb r0, [r1, 0x5] ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB6AD + ldr r0, =BattleScript_MoveUsedLoafingAround str r0, [r1] b _0803E824 .pool @@ -15661,7 +15661,7 @@ _0803F430: b _0803F47A .pool _0803F43C: - ldr r0, =gUnknown_0202420E + ldr r0, =gEffectBank ldrb r0, [r0] b _0803F47A .pool @@ -15674,7 +15674,7 @@ _0803F44C: b _0803F47A .pool _0803F458: - ldr r0, =gUnknown_0202420D + ldr r0, =gBank1 ldrb r0, [r0] b _0803F47A .pool @@ -15786,9 +15786,9 @@ _0803F4DE: movs r0, 0 movs r2, 0 movs r3, 0x1 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0803F532: add sp, 0x4 pop {r4-r7} @@ -15933,9 +15933,9 @@ _0803F5F0: movs r0, 0 movs r2, 0 movs r3, 0x1 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0803F658: add sp, 0x4 pop {r3-r5} @@ -16065,9 +16065,9 @@ _0803F6FE: movs r0, 0 movs r2, 0 movs r3, 0x1 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0803F762: add sp, 0x4 pop {r3-r5} @@ -16132,8 +16132,8 @@ _0803F7EE: .pool thumb_func_end sub_803F790 - thumb_func_start dp01_battle_side_mark_buffer_for_execution -dp01_battle_side_mark_buffer_for_execution: @ 803F800 + thumb_func_start MarkBufferBankForExecution +MarkBufferBankForExecution: @ 803F800 push {lr} lsls r0, 24 lsrs r3, r0, 24 @@ -16167,7 +16167,7 @@ _0803F844: pop {r0} bx r0 .pool - thumb_func_end dp01_battle_side_mark_buffer_for_execution + thumb_func_end MarkBufferBankForExecution thumb_func_start sub_803F850 sub_803F850: @ 803F850 @@ -16312,7 +16312,7 @@ b_std_message: @ 803F964 adds r1, r2, 0 bl dp01_build_cmdbuf_x10_TODO ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution pop {r4} pop {r0} bx r0 diff --git a/asm/battle_3.s b/asm/battle_3.s index f2e384c86..56a77e658 100644 --- a/asm/battle_3.s +++ b/asm/battle_3.s @@ -5,4568 +5,6 @@ .text - thumb_func_start b_movescr_stack_push -b_movescr_stack_push: @ 803FAD8 - push {r4,lr} - ldr r1, =gBattleResources - ldr r1, [r1] - ldr r3, [r1, 0x8] - adds r4, r3, 0 - adds r4, 0x20 - ldrb r1, [r4] - adds r2, r1, 0x1 - strb r2, [r4] - lsls r1, 24 - lsrs r1, 22 - adds r3, r1 - str r0, [r3] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end b_movescr_stack_push - - thumb_func_start b_movescr_stack_push_cursor -b_movescr_stack_push_cursor: @ 803FAFC - ldr r0, =gBattleResources - ldr r0, [r0] - ldr r2, [r0, 0x8] - adds r3, r2, 0 - adds r3, 0x20 - ldrb r0, [r3] - adds r1, r0, 0x1 - strb r1, [r3] - lsls r0, 24 - lsrs r0, 22 - adds r2, r0 - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - str r0, [r2] - bx lr - .pool - thumb_func_end b_movescr_stack_push_cursor - - thumb_func_start b_movescr_stack_pop_cursor -b_movescr_stack_pop_cursor: @ 803FB24 - ldr r3, =gBattlescriptCurrInstr - ldr r0, =gBattleResources - ldr r0, [r0] - ldr r1, [r0, 0x8] - adds r2, r1, 0 - adds r2, 0x20 - ldrb r0, [r2] - subs r0, 0x1 - strb r0, [r2] - lsls r0, 24 - lsrs r0, 22 - adds r1, r0 - ldr r0, [r1] - str r0, [r3] - bx lr - .pool - thumb_func_end b_movescr_stack_pop_cursor - - thumb_func_start sub_803FB4C -sub_803FB4C: @ 803FB4C - push {r4-r7,lr} - mov r7, r8 - push {r7} - movs r6, 0 - ldr r2, =gBattleMons - ldr r1, =gBattleBufferB - ldr r3, =gActiveBank - ldrb r4, [r3] - lsls r0, r4, 9 - adds r1, 0x2 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 1 - movs r1, 0x58 - muls r1, r4 - adds r0, r1 - adds r2, 0xC - adds r0, r2 - ldrh r5, [r0] - ldr r1, =gBattleStruct - lsls r0, r4, 1 - adds r0, 0xC8 - ldr r1, [r1] - adds r1, r0 - mov r8, r1 - ldr r1, =gDisableStructs - lsls r0, r4, 3 - subs r0, r4 - lsls r0, 2 - adds r0, r1 - ldrh r0, [r0, 0x4] - adds r7, r3, 0 - adds r3, r1, 0 - cmp r0, r5 - bne _0803FC06 - cmp r5, 0 - beq _0803FC06 - ldr r0, =gBattleScripting - strb r4, [r0, 0x17] - ldr r0, =gCurrentMove - strh r5, [r0] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 10 - ands r0, r1 - cmp r0, 0 - beq _0803FBF8 - ldr r1, =gUnknown_02024230 - ldrb r0, [r7] - lsls r0, 2 - adds r0, r1 - ldr r1, =gUnknown_082DAE2A - str r1, [r0] - ldr r0, =gProtectStructs - ldrb r1, [r7] - lsls r1, 4 - adds r1, r0 - ldrb r0, [r1, 0x2] - movs r2, 0x10 - orrs r0, r2 - strb r0, [r1, 0x2] - b _0803FC06 - .pool -_0803FBF8: - ldr r0, =gUnknown_02024220 - ldrb r1, [r7] - lsls r1, 2 - adds r1, r0 - ldr r0, =gUnknown_082DAE1F - str r0, [r1] - movs r6, 0x1 -_0803FC06: - ldr r1, =gLastUsedMovesByBanks - ldrb r2, [r7] - lsls r0, r2, 1 - adds r0, r1 - ldrh r0, [r0] - cmp r5, r0 - bne _0803FC90 - cmp r5, 0xA5 - beq _0803FC90 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - cmp r0, 0 - bge _0803FC90 - adds r0, r2, 0 - bl CancelMultiTurnMoves - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 10 - ands r0, r1 - cmp r0, 0 - beq _0803FC7C - ldr r1, =gUnknown_02024230 - ldrb r0, [r7] - lsls r0, 2 - adds r0, r1 - ldr r1, =gUnknown_082DB098 - str r1, [r0] - ldr r0, =gProtectStructs - ldrb r1, [r7] - lsls r1, 4 - adds r1, r0 - ldrb r0, [r1, 0x2] - movs r2, 0x10 - orrs r0, r2 - strb r0, [r1, 0x2] - b _0803FC8E - .pool -_0803FC7C: - ldr r1, =gUnknown_02024220 - ldrb r0, [r7] - lsls r0, 2 - adds r0, r1 - ldr r1, =gUnknown_082DB089 - str r1, [r0] - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 -_0803FC8E: - ldr r3, =gDisableStructs -_0803FC90: - ldrb r0, [r7] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r1, r3 - ldrb r0, [r1, 0x13] - lsls r0, 28 - cmp r0, 0 - beq _0803FD1A - ldr r0, =gBattleMoves - lsls r1, r5, 1 - adds r1, r5 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x1] - cmp r0, 0 - bne _0803FD1A - ldr r0, =gCurrentMove - strh r5, [r0] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 10 - ands r0, r1 - cmp r0, 0 - beq _0803FD08 - ldr r1, =gUnknown_02024230 - ldrb r0, [r7] - lsls r0, 2 - adds r0, r1 - ldr r1, =gUnknown_082DB0AF - str r1, [r0] - ldr r0, =gProtectStructs - ldrb r1, [r7] - lsls r1, 4 - adds r1, r0 - ldrb r0, [r1, 0x2] - movs r2, 0x10 - orrs r0, r2 - strb r0, [r1, 0x2] - b _0803FD1A - .pool -_0803FD08: - ldr r1, =gUnknown_02024220 - ldrb r0, [r7] - lsls r0, 2 - adds r0, r1 - ldr r1, =gUnknown_082DB0A0 - str r1, [r0] - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 -_0803FD1A: - ldr r4, =gActiveBank - ldrb r0, [r4] - adds r1, r5, 0 - bl sub_8040130 - lsls r0, 24 - cmp r0, 0 - beq _0803FD8E - ldr r0, =gCurrentMove - strh r5, [r0] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 10 - ands r0, r1 - cmp r0, 0 - beq _0803FD7C - ldr r1, =gUnknown_02024230 - ldrb r0, [r4] - lsls r0, 2 - adds r0, r1 - ldr r1, =gUnknown_082DB185 - str r1, [r0] - ldr r0, =gProtectStructs - ldrb r1, [r4] - lsls r1, 4 - adds r1, r0 - ldrb r0, [r1, 0x2] - movs r2, 0x10 - orrs r0, r2 - strb r0, [r1, 0x2] - b _0803FD8E - .pool -_0803FD7C: - ldr r1, =gUnknown_02024220 - ldrb r0, [r4] - lsls r0, 2 - adds r0, r1 - ldr r1, =gUnknown_082DB181 - str r1, [r0] - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 -_0803FD8E: - ldr r1, =gBattleMons - ldr r0, =gActiveBank - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r1, r0, r1 - ldrh r0, [r1, 0x2E] - cmp r0, 0xAF - bne _0803FDC4 - ldr r1, =gEnigmaBerries - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r1 - ldrb r4, [r0, 0x7] - b _0803FDCE - .pool -_0803FDC4: - ldrh r0, [r1, 0x2E] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r4, r0, 24 -_0803FDCE: - ldr r2, =gStringBank - ldr r1, =gActiveBank - ldrb r0, [r1] - strb r0, [r2] - ldr r0, =gBattleMons - mov r12, r0 - adds r7, r1, 0 - cmp r4, 0x1D - bne _0803FE58 - mov r0, r8 - ldrh r1, [r0] - adds r2, r1, 0 - cmp r2, 0 - beq _0803FE58 - ldr r0, =0x0000ffff - cmp r2, r0 - beq _0803FE58 - cmp r2, r5 - beq _0803FE58 - ldr r0, =gCurrentMove - strh r1, [r0] - ldr r2, =gLastUsedItem - ldrb r1, [r7] - movs r0, 0x58 - muls r0, r1 - add r0, r12 - ldrh r0, [r0, 0x2E] - strh r0, [r2] - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 10 - ands r1, r0 - ldrb r2, [r7] - cmp r1, 0 - beq _0803FE48 - ldr r0, =gProtectStructs - lsls r1, r2, 4 - adds r1, r0 - ldrb r0, [r1, 0x2] - movs r2, 0x10 - orrs r0, r2 - strb r0, [r1, 0x2] - b _0803FE58 - .pool -_0803FE48: - ldr r1, =gUnknown_02024220 - lsls r0, r2, 2 - adds r0, r1 - ldr r1, =gUnknown_082DB812 - str r1, [r0] - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 -_0803FE58: - ldr r0, =gBattleBufferB - ldrb r3, [r7] - lsls r1, r3, 9 - adds r0, 0x2 - adds r1, r0 - movs r0, 0x58 - muls r0, r3 - ldrb r1, [r1] - adds r0, r1 - mov r1, r12 - adds r1, 0x24 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _0803FEB8 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 10 - ands r0, r1 - cmp r0, 0 - beq _0803FEA8 - ldr r0, =gProtectStructs - lsls r1, r3, 4 - adds r1, r0 - ldrb r0, [r1, 0x2] - movs r2, 0x10 - orrs r0, r2 - strb r0, [r1, 0x2] - b _0803FEB8 - .pool -_0803FEA8: - ldr r1, =gUnknown_02024220 - lsls r0, r3, 2 - adds r0, r1 - ldr r1, =gUnknown_082DB076 - str r1, [r0] - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 -_0803FEB8: - adds r0, r6, 0 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_803FB4C - - thumb_func_start CheckMoveLimitations -CheckMoveLimitations: @ 803FECC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x1C - lsls r0, 24 - lsrs r7, r0, 24 - lsls r1, 24 - lsrs r4, r1, 24 - lsls r2, 24 - lsrs r3, r2, 24 - ldr r1, =gBattleStruct - lsls r0, r7, 1 - adds r0, 0xC8 - ldr r1, [r1] - adds r1, r0 - str r1, [sp, 0x4] - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r7 - adds r1, r0, r1 - ldrh r0, [r1, 0x2E] - cmp r0, 0xAF - bne _0803FF1C - ldr r2, =gEnigmaBerries - lsls r1, r7, 3 - subs r0, r1, r7 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x7] - str r0, [sp] - b _0803FF2E - .pool -_0803FF1C: - ldrh r0, [r1, 0x2E] - str r3, [sp, 0x14] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r0, 24 - str r0, [sp] - lsls r1, r7, 3 - ldr r3, [sp, 0x14] -_0803FF2E: - ldr r0, =gStringBank - strb r7, [r0] - movs r0, 0 - mov r9, r0 - lsls r2, r7, 1 - str r2, [sp, 0xC] - ldr r5, =gDisableStructs - mov r12, r5 - ldr r0, =gBattleMons - movs r2, 0x58 - adds r6, r7, 0 - muls r6, r2 - str r6, [sp, 0x8] - ldr r2, =gBattleMons + 0xC - adds r5, r6, r2 - movs r6, 0 - str r6, [sp, 0x10] - mov r10, r0 - subs r0, r1, r7 - lsls r0, 2 - mov r8, r0 - ldr r6, =gBitTable -_0803FF5A: - ldrh r0, [r5] - cmp r0, 0 - bne _0803FF70 - movs r0, 0x1 - ands r0, r3 - cmp r0, 0 - beq _0803FF70 - ldr r0, [r6] - orrs r4, r0 - lsls r0, r4, 24 - lsrs r4, r0, 24 -_0803FF70: - ldr r0, [sp, 0x8] - add r0, r9 - mov r1, r10 - adds r1, 0x24 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _0803FF90 - movs r0, 0x2 - ands r0, r3 - cmp r0, 0 - beq _0803FF90 - ldr r0, [r6] - orrs r4, r0 - lsls r0, r4, 24 - lsrs r4, r0, 24 -_0803FF90: - mov r1, r8 - add r1, r12 - ldrh r0, [r5] - ldrh r1, [r1, 0x4] - cmp r0, r1 - bne _0803FFAC - movs r0, 0x4 - ands r0, r3 - cmp r0, 0 - beq _0803FFAC - ldr r0, [r6] - orrs r4, r0 - lsls r0, r4, 24 - lsrs r4, r0, 24 -_0803FFAC: - movs r0, 0x58 - adds r2, r7, 0 - muls r2, r0 - ldr r1, [sp, 0x10] - adds r0, r1, r2 - ldr r1, =gBattleMons + 0xC - adds r0, r1 - mov r12, r0 - ldr r1, =gLastUsedMovesByBanks - ldr r0, [sp, 0xC] - adds r1, r0, r1 - str r1, [sp, 0x18] - mov r1, r12 - ldrh r1, [r1] - mov r12, r1 - ldr r0, [sp, 0x18] - ldrh r0, [r0] - cmp r12, r0 - bne _0803FFEE - movs r0, 0x8 - ands r0, r3 - cmp r0, 0 - beq _0803FFEE - mov r0, r10 - adds r0, 0x50 - adds r0, r2, r0 - ldr r0, [r0] - cmp r0, 0 - bge _0803FFEE - ldr r0, [r6] - orrs r4, r0 - lsls r0, r4, 24 - lsrs r4, r0, 24 -_0803FFEE: - ldr r0, =gDisableStructs - add r0, r8 - ldrb r0, [r0, 0x13] - lsls r0, 28 - cmp r0, 0 - beq _0804001C - movs r0, 0x10 - ands r0, r3 - cmp r0, 0 - beq _0804001C - ldr r2, =gBattleMoves - ldrh r1, [r5] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - cmp r0, 0 - bne _0804001C - ldr r0, [r6] - orrs r4, r0 - lsls r0, r4, 24 - lsrs r4, r0, 24 -_0804001C: - ldrh r1, [r5] - adds r0, r7, 0 - str r3, [sp, 0x14] - bl sub_8040130 - lsls r0, 24 - ldr r3, [sp, 0x14] - cmp r0, 0 - beq _0804003E - movs r0, 0x20 - ands r0, r3 - cmp r0, 0 - beq _0804003E - ldr r0, [r6] - orrs r4, r0 - lsls r0, r4, 24 - lsrs r4, r0, 24 -_0804003E: - ldr r1, =gDisableStructs - mov r0, r8 - adds r2, r0, r1 - ldrb r0, [r2, 0xE] - lsls r0, 28 - mov r12, r1 - cmp r0, 0 - beq _0804005E - ldrh r0, [r2, 0x6] - ldrh r1, [r5] - cmp r0, r1 - beq _0804005E - ldr r0, [r6] - orrs r4, r0 - lsls r0, r4, 24 - lsrs r4, r0, 24 -_0804005E: - ldr r2, [sp] - cmp r2, 0x1D - bne _08040080 - ldr r0, [sp, 0x4] - ldrh r1, [r0] - cmp r1, 0 - beq _08040080 - ldr r0, =0x0000ffff - cmp r1, r0 - beq _08040080 - ldrh r2, [r5] - cmp r1, r2 - beq _08040080 - ldr r0, [r6] - orrs r4, r0 - lsls r0, r4, 24 - lsrs r4, r0, 24 -_08040080: - adds r6, 0x4 - adds r5, 0x2 - ldr r0, [sp, 0x10] - adds r0, 0x2 - str r0, [sp, 0x10] - movs r1, 0x1 - add r9, r1 - mov r2, r9 - cmp r2, 0x3 - bgt _08040096 - b _0803FF5A -_08040096: - adds r0, r4, 0 - add sp, 0x1C - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end CheckMoveLimitations - - thumb_func_start sub_80400C8 -sub_80400C8: @ 80400C8 - push {r4,lr} - ldr r4, =gActiveBank - ldrb r0, [r4] - movs r1, 0 - movs r2, 0xFF - bl CheckMoveLimitations - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0xF - bne _0804010C - ldr r0, =gProtectStructs - ldrb r1, [r4] - lsls r1, 4 - adds r1, r0 - ldrb r0, [r1] - movs r2, 0x4 - orrs r0, r2 - strb r0, [r1] - ldr r1, =gUnknown_02024220 - ldrb r0, [r4] - lsls r0, 2 - adds r0, r1 - ldr r1, =gUnknown_082DB072 - str r1, [r0] - b _0804011E - .pool -_0804010C: - ldr r0, =gProtectStructs - ldrb r1, [r4] - lsls r1, 4 - adds r1, r0 - ldrb r2, [r1] - movs r0, 0x5 - negs r0, r0 - ands r0, r2 - strb r0, [r1] -_0804011E: - movs r0, 0 - cmp r3, 0xF - bne _08040126 - movs r0, 0x1 -_08040126: - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80400C8 - - thumb_func_start sub_8040130 -sub_8040130: @ 8040130 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - lsls r0, 24 - lsrs r0, 24 - lsls r1, 16 - lsrs r5, r1, 16 - movs r6, 0 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r6, r0 - bge _080401B4 - ldr r7, =gBattleMons + 0xC - mov r8, r7 -_0804015A: - lsls r0, r4, 24 - lsrs r0, 24 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - adds r3, r4, 0x1 - cmp r9, r0 - beq _080401AA - ldr r1, =gStatuses3 - lsls r0, r4, 2 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 6 - ands r0, r1 - cmp r0, 0 - beq _080401AA - movs r2, 0 - movs r0, 0x58 - adds r1, r4, 0 - muls r1, r0 - adds r0, r1, r7 - ldrh r0, [r0] - cmp r5, r0 - beq _080401A0 - mov r4, r8 - adds r0, r1, r4 -_08040192: - adds r0, 0x2 - adds r2, 0x1 - cmp r2, 0x3 - bgt _080401AA - ldrh r1, [r0] - cmp r5, r1 - bne _08040192 -_080401A0: - cmp r2, 0x3 - bgt _080401AA - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 -_080401AA: - adds r4, r3, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _0804015A -_080401B4: - adds r0, r6, 0 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8040130 - - thumb_func_start sub_80401D0 -sub_80401D0: @ 80401D0 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - movs r0, 0 - mov r9, r0 - ldr r1, =gBankAttacker - mov r2, r9 - strb r2, [r1] - ldr r0, =gNoOfAllBanks - ldrb r4, [r0] - adds r6, r1, 0 - mov r10, r0 - ldr r7, =gBankTarget - ldr r3, =gBattleStruct - mov r12, r3 - cmp r9, r4 - bcs _08040224 - ldr r2, =gAbsentBankFlags - ldrb r1, [r2] - ldr r5, =gBitTable - ldr r0, [r5] - ands r1, r0 - cmp r1, 0 - beq _08040224 - adds r3, r6, 0 -_08040206: - ldrb r0, [r3] - adds r0, 0x1 - strb r0, [r3] - lsls r0, 24 - lsrs r0, 24 - cmp r0, r4 - bcs _08040224 - ldrb r0, [r2] - ldrb r1, [r6] - lsls r1, 2 - adds r1, r5 - ldr r1, [r1] - ands r0, r1 - cmp r0, 0 - bne _08040206 -_08040224: - movs r0, 0 - strb r0, [r7] - mov r0, r10 - ldrb r4, [r0] - cmp r4, 0 - beq _0804025E - ldr r2, =gAbsentBankFlags - ldrb r1, [r2] - ldr r5, =gBitTable - ldr r0, [r5] - ands r1, r0 - cmp r1, 0 - beq _0804025E - adds r3, r7, 0 -_08040240: - ldrb r0, [r3] - adds r0, 0x1 - strb r0, [r3] - lsls r0, 24 - lsrs r0, 24 - cmp r0, r4 - bcs _0804025E - ldrb r0, [r2] - ldrb r1, [r7] - lsls r1, 2 - adds r1, r5 - ldr r1, [r1] - ands r0, r1 - cmp r0, 0 - bne _08040240 -_0804025E: - mov r1, r12 - ldr r0, [r1] - ldrb r0, [r0, 0x3] - cmp r0, 0xA - bls _0804026A - b _080408F6 -_0804026A: - lsls r0, 2 - ldr r1, =_08040290 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08040290: - .4byte _080402BC - .4byte _08040342 - .4byte _08040408 - .4byte _080404D4 - .4byte _080405B0 - .4byte _08040668 - .4byte _0804071C - .4byte _080407A0 - .4byte _08040810 - .4byte _08040868 - .4byte _080408EC -_080402BC: - movs r5, 0 - ldr r1, =gNoOfAllBanks - mov r10, r1 - ldrb r2, [r1] - cmp r5, r2 - bge _080402D6 - ldr r2, =gTurnOrder -_080402CA: - adds r0, r5, r2 - strb r5, [r0] - adds r5, 0x1 - ldrb r3, [r1] - cmp r5, r3 - blt _080402CA -_080402D6: - movs r5, 0 - b _08040324 - .pool -_080402E4: - adds r4, r5, 0x1 - adds r6, r4, 0 - ldrb r1, [r1] - cmp r6, r1 - bge _08040322 - ldr r7, =gTurnOrder - ldr r0, =gNoOfAllBanks - mov r10, r0 - lsls r1, r5, 24 - mov r8, r1 -_080402F8: - adds r0, r5, r7 - ldrb r0, [r0] - adds r1, r4, r7 - ldrb r1, [r1] - movs r2, 0 - bl b_first_side - lsls r0, 24 - cmp r0, 0 - beq _08040318 - lsls r1, r4, 24 - lsrs r1, 24 - mov r2, r8 - lsrs r0, r2, 24 - bl sub_803CEDC -_08040318: - adds r4, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _080402F8 -_08040322: - adds r5, r6, 0 -_08040324: - mov r1, r10 - ldrb r0, [r1] - subs r0, 0x1 - cmp r5, r0 - blt _080402E4 - ldr r2, =gBattleStruct - ldr r1, [r2] - ldrb r0, [r1, 0x3] - adds r0, 0x1 - strb r0, [r1, 0x3] - ldr r0, [r2] - adds r0, 0xDB - movs r1, 0 - strb r1, [r0] - mov r12, r2 -_08040342: - mov r1, r12 - ldr r0, [r1] - adds r0, 0xDB - ldrb r0, [r0] - cmp r0, 0x1 - bls _08040350 - b _0804062C -_08040350: - ldr r3, =gActiveBank - mov r8, r3 - movs r7, 0 - ldr r6, =gBankAttacker - ldr r5, =gBattleTextBuff1 -_0804035A: - ldr r0, [r1] - adds r0, 0xDB - ldrb r4, [r0] - ldr r2, =gSideTimers - lsls r1, r4, 1 - adds r0, r1, r4 - lsls r0, 2 - adds r2, r0, r2 - ldrb r0, [r2, 0x1] - strb r0, [r6] - mov r3, r8 - strb r0, [r3] - ldr r0, =gSideAffecting - adds r3, r1, r0 - ldrh r1, [r3] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _080403BC - ldrb r0, [r2] - subs r0, 0x1 - strb r0, [r2] - movs r4, 0xFF - lsls r0, 24 - cmp r0, 0 - bne _080403BC - ldrh r0, [r3] - ldr r2, =0x0000fffe - adds r1, r2, 0 - ands r0, r1 - strh r0, [r3] - ldr r0, =gUnknown_082DACFA - bl b_call_bc_move_exec - movs r0, 0xFD - strb r0, [r5] - movs r0, 0x2 - strb r0, [r5, 0x1] - movs r0, 0x73 - strb r0, [r5, 0x2] - strb r7, [r5, 0x3] - ldrb r0, [r5, 0x4] - orrs r0, r4 - strb r0, [r5, 0x4] - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_080403BC: - ldr r2, =gBattleStruct - ldr r1, [r2] - adds r1, 0xDB - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - mov r12, r2 - mov r3, r9 - cmp r3, 0 - beq _080403D2 - b _080408FE -_080403D2: - mov r1, r12 - ldr r0, [r1] - adds r0, 0xDB - ldrb r0, [r0] - cmp r0, 0x1 - bls _0804035A - b _0804062C - .pool -_08040408: - mov r1, r12 - ldr r0, [r1] - adds r0, 0xDB - ldrb r0, [r0] - cmp r0, 0x1 - bls _08040416 - b _08040570 -_08040416: - movs r0, 0x2 - mov r10, r0 - movs r2, 0 - mov r8, r2 - ldr r7, =gBankAttacker - ldr r5, =gBattleTextBuff1 -_08040422: - ldr r0, [r1] - adds r0, 0xDB - ldrb r4, [r0] - ldr r2, =gSideTimers - lsls r1, r4, 1 - adds r0, r1, r4 - lsls r0, 2 - adds r2, r0, r2 - ldrb r0, [r2, 0x3] - strb r0, [r7] - ldr r3, =gActiveBank - strb r0, [r3] - ldr r0, =gSideAffecting - adds r3, r1, r0 - ldrh r1, [r3] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _0804048A - ldrb r0, [r2, 0x2] - subs r0, 0x1 - strb r0, [r2, 0x2] - movs r6, 0xFF - lsls r0, 24 - cmp r0, 0 - bne _0804048A - ldrh r0, [r3] - ldr r2, =0x0000fffd - adds r1, r2, 0 - ands r0, r1 - strh r0, [r3] - ldr r0, =gUnknown_082DACFA - bl b_call_bc_move_exec - ldr r0, =gBattleCommunication - strb r4, [r0, 0x5] - movs r0, 0xFD - strb r0, [r5] - mov r3, r10 - strb r3, [r5, 0x1] - movs r0, 0x71 - strb r0, [r5, 0x2] - mov r0, r8 - strb r0, [r5, 0x3] - ldrb r0, [r5, 0x4] - orrs r0, r6 - strb r0, [r5, 0x4] - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_0804048A: - ldr r2, =gBattleStruct - ldr r1, [r2] - adds r1, 0xDB - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - mov r12, r2 - mov r1, r9 - cmp r1, 0 - beq _080404A0 - b _080408FE -_080404A0: - mov r1, r12 - ldr r0, [r1] - adds r0, 0xDB - ldrb r0, [r0] - cmp r0, 0x1 - bls _08040422 - b _08040570 - .pool -_080404D4: - mov r1, r12 - ldr r0, [r1] - adds r0, 0xDB - ldrb r0, [r0] - cmp r0, 0x1 - bhi _08040570 - ldr r0, =gActiveBank - mov r10, r0 - movs r2, 0 - mov r8, r2 - ldr r7, =gBankAttacker - ldr r5, =gBattleTextBuff1 -_080404EC: - ldr r0, [r1] - adds r0, 0xDB - ldrb r4, [r0] - ldr r1, =gSideTimers - lsls r3, r4, 1 - adds r0, r3, r4 - lsls r0, 2 - adds r1, r0, r1 - ldrb r0, [r1, 0x5] - strb r0, [r7] - mov r2, r10 - strb r0, [r2] - ldrb r0, [r1, 0x4] - cmp r0, 0 - beq _0804054E - subs r0, 0x1 - strb r0, [r1, 0x4] - movs r6, 0xFF - lsls r0, 24 - cmp r0, 0 - bne _0804054E - ldr r2, =gSideAffecting - adds r2, r3, r2 - ldrh r0, [r2] - ldr r3, =0x0000feff - adds r1, r3, 0 - ands r0, r1 - strh r0, [r2] - ldr r0, =gUnknown_082DACFA - bl b_call_bc_move_exec - ldr r0, =gBattleCommunication - strb r4, [r0, 0x5] - movs r0, 0xFD - strb r0, [r5] - movs r0, 0x2 - strb r0, [r5, 0x1] - movs r0, 0x36 - strb r0, [r5, 0x2] - mov r0, r8 - strb r0, [r5, 0x3] - ldrb r0, [r5, 0x4] - orrs r0, r6 - strb r0, [r5, 0x4] - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_0804054E: - ldr r2, =gBattleStruct - ldr r1, [r2] - adds r1, 0xDB - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - mov r12, r2 - mov r1, r9 - cmp r1, 0 - beq _08040564 - b _080408FE -_08040564: - mov r1, r12 - ldr r0, [r1] - adds r0, 0xDB - ldrb r0, [r0] - cmp r0, 0x1 - bls _080404EC -_08040570: - mov r2, r9 - cmp r2, 0 - beq _08040578 - b _080408FE -_08040578: - mov r3, r12 - ldr r0, [r3] - ldrb r1, [r0, 0x3] - adds r1, 0x1 - strb r1, [r0, 0x3] - ldr r0, [r3] - adds r0, 0xDB - strb r2, [r0] - b _080408F6 - .pool -_080405B0: - mov r1, r12 - ldr r0, [r1] - adds r0, 0xDB - ldrb r0, [r0] - cmp r0, 0x1 - bhi _0804062C - ldr r6, =gActiveBank - ldr r5, =gBankAttacker -_080405C0: - ldr r0, [r1] - adds r0, 0xDB - ldrb r4, [r0] - ldr r2, =gSideTimers - lsls r1, r4, 1 - adds r0, r1, r4 - lsls r0, 2 - adds r2, r0, r2 - ldrb r0, [r2, 0x7] - strb r0, [r5] - strb r0, [r6] - ldr r0, =gSideAffecting - adds r3, r1, r0 - ldrh r1, [r3] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _0804060A - ldrb r0, [r2, 0x6] - subs r0, 0x1 - strb r0, [r2, 0x6] - lsls r0, 24 - cmp r0, 0 - bne _0804060A - ldrh r0, [r3] - ldr r2, =0x0000ffdf - adds r1, r2, 0 - ands r0, r1 - strh r0, [r3] - ldr r0, =gUnknown_082DAD0B - bl b_call_bc_move_exec - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_0804060A: - ldr r2, =gBattleStruct - ldr r1, [r2] - adds r1, 0xDB - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - mov r12, r2 - mov r3, r9 - cmp r3, 0 - beq _08040620 - b _080408FE -_08040620: - mov r1, r12 - ldr r0, [r1] - adds r0, 0xDB - ldrb r0, [r0] - cmp r0, 0x1 - bls _080405C0 -_0804062C: - mov r0, r9 - cmp r0, 0 - beq _08040634 - b _080408FE -_08040634: - mov r1, r12 - ldr r0, [r1] - ldrb r1, [r0, 0x3] - adds r1, 0x1 - strb r1, [r0, 0x3] - mov r2, r12 - ldr r0, [r2] - adds r0, 0xDB - mov r3, r9 - strb r3, [r0] - b _080408F6 - .pool -_08040668: - mov r2, r12 - ldr r0, [r2] - adds r0, 0xDB - ldr r1, =gNoOfAllBanks - ldrb r0, [r0] - ldrb r1, [r1] - cmp r0, r1 - bcs _080406E8 - ldr r4, =gActiveBank - ldr r5, =gTurnOrder -_0804067C: - ldr r0, [r2] - adds r0, 0xDB - ldrb r0, [r0] - adds r0, r5 - ldrb r0, [r0] - strb r0, [r4] - ldr r0, =gUnknown_020243D0 - adds r0, 0x20 - ldrb r2, [r4] - adds r1, r0, r2 - ldrb r0, [r1] - cmp r0, 0 - beq _080406C4 - subs r0, 0x1 - strb r0, [r1] - lsls r0, 24 - cmp r0, 0 - bne _080406C4 - ldr r1, =gBattleMons - ldrb r2, [r4] - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _080406C4 - ldr r0, =gBankTarget - strb r2, [r0] - ldr r0, =gUnknown_082DB0B7 - bl b_call_bc_move_exec - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_080406C4: - ldr r2, =gBattleStruct - ldr r1, [r2] - adds r1, 0xDB - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - mov r12, r2 - mov r3, r9 - cmp r3, 0 - beq _080406DA - b _080408FE -_080406DA: - ldr r0, [r2] - adds r0, 0xDB - ldr r1, =gNoOfAllBanks - ldrb r0, [r0] - ldrb r1, [r1] - cmp r0, r1 - bcc _0804067C -_080406E8: - mov r0, r9 - cmp r0, 0 - beq _080406F0 - b _080408FE -_080406F0: - mov r2, r12 - ldr r1, [r2] - ldrb r0, [r1, 0x3] - adds r0, 0x1 - strb r0, [r1, 0x3] - b _080408F6 - .pool -_0804071C: - ldr r3, =gBattleWeather - ldrh r2, [r3] - movs r0, 0x7 - ands r0, r2 - cmp r0, 0 - bne _0804072A - b _080408C8 -_0804072A: - movs r0, 0x4 - ands r0, r2 - cmp r0, 0 - bne _08040776 - ldr r1, =gUnknown_020243D0 - adds r1, 0x28 - ldrb r0, [r1] - subs r0, 0x1 - strb r0, [r1] - lsls r0, 24 - cmp r0, 0 - bne _08040768 - ldr r0, =0x0000fffe - ands r0, r2 - ldr r1, =0x0000fffd - ands r0, r1 - strh r0, [r3] - ldr r1, =gBattleCommunication - movs r0, 0x2 - strb r0, [r1, 0x5] - b _08040794 - .pool -_08040768: - movs r0, 0x2 - ands r0, r2 - lsls r0, 16 - lsrs r1, r0, 16 - cmp r1, 0 - bne _08040782 - b _08040790 -_08040776: - movs r0, 0x2 - ands r0, r2 - lsls r0, 16 - lsrs r1, r0, 16 - cmp r1, 0 - beq _08040790 -_08040782: - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] - b _08040794 - .pool -_08040790: - ldr r0, =gBattleCommunication - strb r1, [r0, 0x5] -_08040794: - ldr r0, =gUnknown_082DAC2C - b _080408BA - .pool -_080407A0: - ldr r3, =gBattleWeather - ldrh r2, [r3] - movs r0, 0x18 - ands r0, r2 - cmp r0, 0 - bne _080407AE - b _080408C8 -_080407AE: - movs r0, 0x10 - ands r0, r2 - cmp r0, 0 - bne _080407E8 - ldr r1, =gUnknown_020243D0 - adds r1, 0x28 - ldrb r0, [r1] - subs r0, 0x1 - strb r0, [r1] - lsls r0, 24 - cmp r0, 0 - bne _080407E8 - ldr r0, =0x0000fff7 - ands r0, r2 - strh r0, [r3] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DACC9 - b _080407EC - .pool -_080407E8: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAC47 -_080407EC: - str r0, [r1] - adds r3, r1, 0 - ldr r1, =gBattleScripting - movs r2, 0 - movs r0, 0xC - strb r0, [r1, 0x10] - ldr r0, =gBattleCommunication - strb r2, [r0, 0x5] - b _080408B8 - .pool -_08040810: - ldr r3, =gBattleWeather - ldrh r2, [r3] - movs r0, 0x60 - ands r0, r2 - cmp r0, 0 - beq _080408C8 - movs r0, 0x40 - ands r0, r2 - cmp r0, 0 - bne _08040854 - ldr r1, =gUnknown_020243D0 - adds r1, 0x28 - ldrb r0, [r1] - subs r0, 0x1 - strb r0, [r1] - lsls r0, 24 - cmp r0, 0 - bne _08040854 - ldr r0, =0x0000ffdf - ands r0, r2 - strh r0, [r3] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DACE0 - b _08040858 - .pool -_08040854: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DACD2 -_08040858: - str r0, [r1] - adds r3, r1, 0 - b _080408B8 - .pool -_08040868: - ldr r3, =gBattleWeather - ldrh r2, [r3] - movs r0, 0x80 - ands r0, r2 - cmp r0, 0 - beq _080408C8 - ldr r1, =gUnknown_020243D0 - adds r1, 0x28 - ldrb r0, [r1] - subs r0, 0x1 - strb r0, [r1] - lsls r0, 24 - cmp r0, 0 - bne _080408A4 - ldr r0, =0x0000ff7f - ands r0, r2 - strh r0, [r3] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DACC9 - b _080408A8 - .pool -_080408A4: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAC47 -_080408A8: - str r0, [r1] - adds r3, r1, 0 - ldr r1, =gBattleScripting - movs r0, 0xD - strb r0, [r1, 0x10] - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] -_080408B8: - ldr r0, [r3] -_080408BA: - bl b_call_bc_move_exec - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_080408C8: - ldr r2, =gBattleStruct - ldr r1, [r2] - ldrb r0, [r1, 0x3] - adds r0, 0x1 - strb r0, [r1, 0x3] - mov r12, r2 - b _080408F6 - .pool -_080408EC: - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_080408F6: - mov r3, r9 - cmp r3, 0 - bne _080408FE - b _0804025E -_080408FE: - ldr r0, =gBattleMainFunc - ldr r1, [r0] - ldr r0, =sub_803B9BC - eors r1, r0 - negs r0, r1 - orrs r0, r1 - lsrs r0, 31 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80401D0 - - thumb_func_start sub_8040924 -sub_8040924: @ 8040924 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x8 - movs r0, 0 - mov r9, r0 - ldr r2, =gHitMarker - ldr r0, [r2] - ldr r1, =0x01000020 - orrs r0, r1 - str r0, [r2] - ldr r5, =gBattleStruct - ldr r2, [r5] - ldr r0, =gNoOfAllBanks - ldrb r1, [r2, 0x1] - adds r7, r5, 0 - mov r8, r0 - ldrb r3, [r0] - cmp r1, r3 - bcc _08040954 - bl _08041338 -_08040954: - bl _0804132E - .pool -_08040968: - ldr r3, =gActiveBank - ldr r4, =gBankAttacker - ldr r1, =gTurnOrder - ldr r5, [r5] - ldrb r0, [r5, 0x1] - adds r0, r1 - ldrb r0, [r0] - strb r0, [r4] - strb r0, [r3] - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r2, =gBitTable - ldrb r0, [r3] - lsls r0, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - adds r6, r3, 0 - cmp r1, 0 - beq _080409B0 - ldrb r0, [r5, 0x1] - adds r0, 0x1 - strb r0, [r5, 0x1] - bl _0804131C - .pool -_080409B0: - ldrb r0, [r5] - cmp r0, 0x13 - bls _080409BA - bl _08041312 -_080409BA: - lsls r0, 2 - ldr r1, =_080409C8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_080409C8: - .4byte _08040A18 - .4byte _08040A78 - .4byte _08040A96 - .4byte _08040AC6 - .4byte _08040B44 - .4byte _08040B8C - .4byte _08040C0C - .4byte _08040C54 - .4byte _08040CB8 - .4byte _08040D00 - .4byte _08040E60 - .4byte _08040F7C - .4byte _08041024 - .4byte _080410E8 - .4byte _0804119C - .4byte _080411BC - .4byte _08041208 - .4byte _08041238 - .4byte _08040AAE - .4byte _08041304 -_08040A18: - ldr r1, =gStatuses3 - ldrb r3, [r6] - lsls r0, r3, 2 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 3 - ands r0, r1 - cmp r0, 0 - bne _08040A30 - bl _080412DE -_08040A30: - ldr r0, =gBattleMons - movs r1, 0x58 - muls r1, r3 - adds r0, r1, r0 - ldrh r2, [r0, 0x28] - ldrh r5, [r0, 0x2C] - cmp r2, r5 - bne _08040A44 - bl _080412DE -_08040A44: - cmp r2, 0 - bne _08040A4C - bl _080412DE -_08040A4C: - ldr r1, =gBattleMoveDamage - ldrh r0, [r0, 0x2C] - lsrs r0, 4 - str r0, [r1] - cmp r0, 0 - bne _08040A5C - movs r0, 0x1 - str r0, [r1] -_08040A5C: - ldr r0, [r1] - negs r0, r0 - str r0, [r1] - ldr r0, =gUnknown_082DB0EE - bl _080412D0 - .pool -_08040A78: - ldrb r1, [r6] - movs r0, 0 - str r0, [sp] - movs r0, 0x1 - movs r2, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _08040A92 - bl _080412DE -_08040A92: - bl _080412D4 -_08040A96: - ldrb r1, [r6] - movs r0, 0x1 - movs r2, 0 - bl berry_effects_maybe - lsls r0, 24 - cmp r0, 0 - bne _08040AAA - bl _080412DE -_08040AAA: - bl _080412D4 -_08040AAE: - ldrb r1, [r6] - movs r0, 0x1 - movs r2, 0x1 - bl berry_effects_maybe - lsls r0, 24 - cmp r0, 0 - bne _08040AC2 - bl _080412DE -_08040AC2: - bl _080412D4 -_08040AC6: - ldr r0, =gStatuses3 - ldrb r2, [r6] - lsls r1, r2, 2 - adds r1, r0 - ldr r1, [r1] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - bne _08040ADC - bl _080412DE -_08040ADC: - ldr r3, =gBattleMons - movs r5, 0x3 - ands r5, r1 - movs r1, 0x58 - adds r0, r5, 0 - muls r0, r1 - adds r0, r3 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _08040AF4 - bl _080412DE -_08040AF4: - adds r0, r2, 0 - muls r0, r1 - adds r0, r3 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _08040B04 - bl _080412DE -_08040B04: - ldr r0, =gBankTarget - strb r5, [r0] - ldr r2, =gBattleMoveDamage - ldrb r0, [r6] - muls r0, r1 - adds r0, r3 - ldrh r0, [r0, 0x2C] - lsrs r0, 3 - str r0, [r2] - cmp r0, 0 - bne _08040B1E - movs r0, 0x1 - str r0, [r2] -_08040B1E: - ldr r1, =gBattleScripting - strb r5, [r1, 0x10] - ldrb r0, [r4] - strb r0, [r1, 0x11] - ldr r0, =gUnknown_082DAD15 - b _080412D0 - .pool -_08040B44: - ldr r2, =gBattleMons - ldrb r1, [r6] - movs r0, 0x58 - adds r3, r1, 0 - muls r3, r0 - adds r0, r2, 0 - adds r0, 0x4C - adds r0, r3, r0 - ldr r0, [r0] - movs r1, 0x8 - ands r0, r1 - cmp r0, 0 - bne _08040B60 - b _080412DE -_08040B60: - adds r1, r3, r2 - ldrh r0, [r1, 0x28] - cmp r0, 0 - bne _08040B6A - b _080412DE -_08040B6A: - ldr r2, =gBattleMoveDamage - ldrh r0, [r1, 0x2C] - lsrs r0, 3 - str r0, [r2] - cmp r0, 0 - bne _08040B7A - movs r0, 0x1 - str r0, [r2] -_08040B7A: - ldr r0, =gUnknown_082DB23D - b _080412D0 - .pool -_08040B8C: - ldr r4, =gBattleMons - ldrb r0, [r6] - movs r7, 0x58 - mov r8, r7 - mov r2, r8 - muls r2, r0 - adds r3, r4, 0 - adds r3, 0x4C - adds r0, r2, r3 - ldr r0, [r0] - movs r1, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08040BAA - b _080412DE -_08040BAA: - adds r1, r2, r4 - ldrh r0, [r1, 0x28] - cmp r0, 0 - bne _08040BB4 - b _080412DE -_08040BB4: - ldr r5, =gBattleMoveDamage - ldrh r0, [r1, 0x2C] - lsrs r0, 4 - str r0, [r5] - cmp r0, 0 - bne _08040BC4 - movs r0, 0x1 - str r0, [r5] -_08040BC4: - ldrb r0, [r6] - mov r1, r8 - muls r1, r0 - adds r0, r1, 0 - adds r2, r0, r3 - ldr r1, [r2] - movs r4, 0xF0 - lsls r4, 4 - adds r0, r1, 0 - ands r0, r4 - cmp r0, r4 - beq _08040BE4 - movs r7, 0x80 - lsls r7, 1 - adds r0, r1, r7 - str r0, [r2] -_08040BE4: - ldrb r0, [r6] - mov r1, r8 - muls r1, r0 - adds r0, r1, 0 - adds r0, r3 - ldr r0, [r0] - ands r0, r4 - lsrs r0, 8 - ldr r1, [r5] - muls r0, r1 - str r0, [r5] - ldr r0, =gUnknown_082DB23D - b _080412D0 - .pool -_08040C0C: - ldr r2, =gBattleMons - ldrb r1, [r6] - movs r0, 0x58 - adds r3, r1, 0 - muls r3, r0 - adds r0, r2, 0 - adds r0, 0x4C - adds r0, r3, r0 - ldr r0, [r0] - movs r1, 0x10 - ands r0, r1 - cmp r0, 0 - bne _08040C28 - b _080412DE -_08040C28: - adds r1, r3, r2 - ldrh r0, [r1, 0x28] - cmp r0, 0 - bne _08040C32 - b _080412DE -_08040C32: - ldr r2, =gBattleMoveDamage - ldrh r0, [r1, 0x2C] - lsrs r0, 3 - str r0, [r2] - cmp r0, 0 - bne _08040C42 - movs r0, 0x1 - str r0, [r2] -_08040C42: - ldr r0, =gUnknown_082DB25F - b _080412D0 - .pool -_08040C54: - ldr r4, =gBattleMons - ldrb r1, [r6] - movs r0, 0x58 - muls r1, r0 - adds r0, r4, 0 - adds r0, 0x50 - adds r5, r1, r0 - ldr r2, [r5] - movs r0, 0x80 - lsls r0, 20 - ands r0, r2 - cmp r0, 0 - bne _08040C70 - b _080412DE -_08040C70: - adds r3, r1, r4 - ldrh r0, [r3, 0x28] - cmp r0, 0 - bne _08040C7A - b _080412DE -_08040C7A: - adds r0, r4, 0 - adds r0, 0x4C - adds r0, r1, r0 - ldr r0, [r0] - movs r1, 0x7 - ands r0, r1 - cmp r0, 0 - beq _08040CAC - ldr r1, =gBattleMoveDamage - ldrh r0, [r3, 0x2C] - lsrs r0, 2 - str r0, [r1] - cmp r0, 0 - bne _08040C9A - movs r0, 0x1 - str r0, [r1] -_08040C9A: - ldr r0, =gUnknown_082DB33F - b _080412D0 - .pool -_08040CAC: - ldr r0, =0xf7ffffff - ands r2, r0 - str r2, [r5] - b _080412DE - .pool -_08040CB8: - ldr r2, =gBattleMons - ldrb r1, [r6] - movs r0, 0x58 - adds r3, r1, 0 - muls r3, r0 - adds r0, r2, 0 - adds r0, 0x50 - adds r0, r3, r0 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 21 - ands r0, r1 - cmp r0, 0 - bne _08040CD6 - b _080412DE -_08040CD6: - adds r1, r3, r2 - ldrh r0, [r1, 0x28] - cmp r0, 0 - bne _08040CE0 - b _080412DE -_08040CE0: - ldr r2, =gBattleMoveDamage - ldrh r0, [r1, 0x2C] - lsrs r0, 2 - str r0, [r2] - cmp r0, 0 - bne _08040CF0 - movs r0, 0x1 - str r0, [r2] -_08040CF0: - ldr r0, =gUnknown_082DB350 - b _080412D0 - .pool -_08040D00: - ldr r3, =gBattleMons - mov r8, r3 - ldrb r0, [r6] - movs r3, 0x58 - adds r1, r0, 0 - muls r1, r3 - movs r5, 0x50 - add r5, r8 - mov r10, r5 - adds r4, r1, r5 - ldr r2, [r4] - movs r5, 0xE0 - lsls r5, 8 - adds r0, r2, 0 - ands r0, r5 - cmp r0, 0 - bne _08040D24 - b _080412DE -_08040D24: - mov r7, r8 - adds r0, r1, r7 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _08040D30 - b _080412DE -_08040D30: - ldr r1, =0xffffe000 - adds r0, r2, r1 - str r0, [r4] - ldrb r4, [r6] - adds r0, r4, 0 - muls r0, r3 - add r0, r10 - ldr r0, [r0] - ands r0, r5 - cmp r0, 0 - beq _08040DC0 - ldr r1, =gBattleScripting - ldr r0, =gBattleStruct - ldr r2, [r0] - lsls r0, r4, 1 - adds r0, r2 - ldrb r0, [r0, 0x4] - strb r0, [r1, 0x10] - ldrb r0, [r6] - lsls r0, 1 - adds r0, r2 - ldrb r0, [r0, 0x5] - strb r0, [r1, 0x11] - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x2 - strb r0, [r1, 0x1] - ldrb r0, [r6] - lsls r0, 1 - adds r0, r2 - ldrb r0, [r0, 0x4] - strb r0, [r1, 0x2] - ldrb r0, [r6] - lsls r0, 1 - adds r0, r2 - ldrb r0, [r0, 0x5] - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB30E - str r0, [r1] - ldr r2, =gBattleMoveDamage - ldrb r0, [r6] - muls r0, r3 - add r0, r8 - ldrh r0, [r0, 0x2C] - lsrs r0, 4 - str r0, [r2] - cmp r0, 0 - bne _08040DEC - movs r0, 0x1 - str r0, [r2] - b _08040DEC - .pool -_08040DC0: - ldr r2, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r2] - movs r0, 0x2 - strb r0, [r2, 0x1] - ldrb r1, [r6] - ldr r0, =gBattleStruct - ldr r3, [r0] - lsls r1, 1 - adds r1, r3 - ldrb r0, [r1, 0x4] - strb r0, [r2, 0x2] - ldrb r0, [r6] - lsls r0, 1 - adds r0, r3 - ldrb r0, [r0, 0x5] - strb r0, [r2, 0x3] - movs r0, 0xFF - strb r0, [r2, 0x4] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB320 - str r0, [r1] -_08040DEC: - ldr r0, [r1] - b _080412D0 - .pool -_08040E00: - movs r0, 0x8 - negs r0, r0 - ands r3, r0 - str r3, [r2] - ldrb r0, [r6] - mov r2, r8 - muls r2, r0 - mov r0, r10 - adds r0, 0x50 - adds r2, r0 - ldr r0, [r2] - ldr r1, =0xf7ffffff - ands r0, r1 - str r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] - ldr r0, =gUnknown_082DB234 - bl b_call_bc_move_exec - ldr r4, =gActiveBank - ldrb r0, [r6] - strb r0, [r4] - ldrb r0, [r4] - mov r3, r8 - muls r3, r0 - adds r0, r3, 0 - add r0, r9 - str r0, [sp] - movs r0, 0 - movs r1, 0x28 - movs r2, 0 - movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs - ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution - b _08040EC8 - .pool -_08040E60: - ldr r2, =gBattleMons - ldrb r1, [r6] - movs r0, 0x58 - muls r0, r1 - adds r1, r2, 0 - adds r1, 0x50 - adds r0, r1 - ldr r1, [r0] - movs r0, 0x70 - ands r1, r0 - adds r7, r2, 0 - cmp r1, 0 - beq _08040F6A - movs r0, 0 - strb r0, [r4] - mov r5, r8 - ldrb r0, [r5] - cmp r0, 0 - beq _08040EC8 - mov r10, r7 - adds r6, r4, 0 - movs r1, 0x58 - mov r8, r1 - movs r3, 0x4C - adds r3, r7 - mov r9, r3 - str r0, [sp, 0x4] - movs r5, 0x7 - mov r12, r5 -_08040E9A: - ldrb r4, [r6] - mov r1, r8 - muls r1, r4 - mov r0, r9 - adds r2, r1, r0 - ldr r3, [r2] - adds r0, r3, 0 - mov r5, r12 - ands r0, r5 - cmp r0, 0 - beq _08040EBA - adds r0, r1, r7 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x2B - bne _08040E00 -_08040EBA: - adds r0, r4, 0x1 - strb r0, [r6] - lsls r0, 24 - lsrs r0, 24 - ldr r1, [sp, 0x4] - cmp r0, r1 - bcc _08040E9A -_08040EC8: - ldr r2, =gBankAttacker - ldr r1, =gNoOfAllBanks - ldrb r0, [r2] - ldrb r1, [r1] - cmp r0, r1 - beq _08040EE8 - movs r3, 0x2 - mov r9, r3 - b _08041318 - .pool -_08040EE8: - ldr r5, =gActiveBank - ldrb r0, [r5] - strb r0, [r2] - ldr r2, =gBattleMons - ldrb r0, [r5] - movs r7, 0x58 - adds r1, r0, 0 - muls r1, r7 - adds r6, r2, 0 - adds r6, 0x50 - adds r1, r6 - ldr r0, [r1] - subs r0, 0x10 - str r0, [r1] - ldrb r0, [r5] - bl sub_803F90C - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - beq _08040F2C - ldrb r0, [r5] - bl CancelMultiTurnMoves - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] - b _08040F60 - .pool -_08040F2C: - ldrb r3, [r5] - adds r0, r3, 0 - muls r0, r7 - adds r2, r0, r6 - ldr r0, [r2] - movs r1, 0x70 - ands r0, r1 - cmp r0, 0 - beq _08040F54 - ldr r0, =gBattleCommunication - strb r4, [r0, 0x5] - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 5 - orrs r0, r1 - str r0, [r2] - b _08040F60 - .pool -_08040F54: - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] - adds r0, r3, 0 - bl CancelMultiTurnMoves -_08040F60: - ldr r0, =gUnknown_082DB2A6 - bl b_call_bc_move_exec - movs r5, 0x1 - mov r9, r5 -_08040F6A: - mov r7, r9 - cmp r7, 0x2 - bne _08040F72 - b _08041312 -_08040F72: - b _080412DE - .pool -_08040F7C: - ldr r1, =gBattleMons - ldrb r0, [r6] - movs r7, 0x58 - muls r0, r7 - adds r5, r1, 0 - adds r5, 0x50 - adds r2, r0, r5 - ldr r1, [r2] - movs r4, 0xC0 - lsls r4, 4 - adds r0, r1, 0 - ands r0, r4 - cmp r0, 0 - bne _08040F9A - b _080412DE -_08040F9A: - ldr r3, =0xfffffc00 - adds r0, r1, r3 - str r0, [r2] - ldrb r0, [r6] - bl sub_803F90C - lsls r0, 24 - cmp r0, 0 - beq _08040FBC - ldrb r0, [r6] - bl CancelMultiTurnMoves - b _080412DE - .pool -_08040FBC: - ldrb r0, [r6] - muls r0, r7 - adds r2, r0, r5 - ldr r1, [r2] - adds r0, r1, 0 - ands r0, r4 - cmp r0, 0 - beq _08040FCE - b _080412DE -_08040FCE: - movs r0, 0x80 - lsls r0, 5 - ands r0, r1 - cmp r0, 0 - bne _08040FDA - b _080412DE -_08040FDA: - ldr r0, =0xffffefff - ands r1, r0 - str r1, [r2] - ldrb r0, [r6] - muls r0, r7 - adds r0, r5 - ldr r0, [r0] - movs r4, 0x7 - ands r0, r4 - cmp r0, 0 - beq _08040FF2 - b _080412DE -_08040FF2: - ldr r1, =gBattleCommunication - movs r0, 0x47 - strb r0, [r1, 0x3] - movs r0, 0x1 - movs r1, 0 - bl sub_8048760 - ldrb r0, [r6] - muls r0, r7 - adds r0, r5 - ldr r0, [r0] - ands r0, r4 - cmp r0, 0 - bne _08041010 - b _080412D4 -_08041010: - ldr r0, =gUnknown_082DB2AF - bl b_call_bc_move_exec - b _080412D4 - .pool -_08041024: - ldr r0, =gDisableStructs - ldrb r3, [r6] - lsls r1, r3, 3 - subs r1, r3 - lsls r1, 2 - adds r5, r1, r0 - ldrb r1, [r5, 0xB] - lsls r1, 28 - adds r7, r0, 0 - cmp r1, 0 - bne _0804103C - b _080412DE -_0804103C: - movs r4, 0 - ldr r2, =gBattleMons - movs r0, 0x58 - adds r1, r3, 0 - muls r1, r0 - adds r2, 0xC - adds r1, r2 - ldrh r0, [r5, 0x4] - ldrh r1, [r1] - cmp r0, r1 - beq _0804107A - mov r12, r7 - mov r8, r2 - adds r5, r6, 0 - movs r3, 0x58 -_0804105A: - adds r4, 0x1 - cmp r4, 0x3 - bgt _0804107A - ldrb r2, [r5] - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - add r1, r12 - lsls r0, r4, 1 - muls r2, r3 - adds r0, r2 - add r0, r8 - ldrh r1, [r1, 0x4] - ldrh r0, [r0] - cmp r1, r0 - bne _0804105A -_0804107A: - cmp r4, 0x4 - bne _080410AC - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r7 - movs r1, 0 - strh r1, [r0, 0x4] - ldrb r0, [r6] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r1, r7 - ldrb r2, [r1, 0xB] - movs r0, 0x10 - negs r0, r0 - ands r0, r2 - strb r0, [r1, 0xB] - b _080412DE - .pool -_080410AC: - ldrb r0, [r6] - lsls r2, r0, 3 - subs r2, r0 - lsls r2, 2 - adds r2, r7 - ldrb r3, [r2, 0xB] - lsls r1, r3, 28 - lsrs r1, 28 - subs r1, 0x1 - movs r0, 0xF - ands r1, r0 - movs r0, 0x10 - negs r0, r0 - ands r0, r3 - orrs r0, r1 - strb r0, [r2, 0xB] - adds r2, r1, 0 - cmp r2, 0 - beq _080410D4 - b _080412DE -_080410D4: - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r7 - strh r2, [r0, 0x4] - ldr r0, =gUnknown_082DAE23 - b _080412D0 - .pool -_080410E8: - ldr r3, =gDisableStructs - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r2, r0, r3 - ldrb r5, [r2, 0xE] - lsls r4, r5, 28 - cmp r4, 0 - bne _080410FE - b _080412DE -_080410FE: - ldr r7, =gBattleMons - mov r8, r7 - ldrb r0, [r2, 0xC] - lsls r0, 1 - movs r7, 0x58 - muls r1, r7 - adds r0, r1 - mov r1, r8 - adds r1, 0xC - adds r0, r1 - ldrh r0, [r0] - ldrh r1, [r2, 0x6] - cmp r0, r1 - beq _0804113C - movs r0, 0 - strh r0, [r2, 0x6] - ldrb r0, [r6] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r1, r3 - ldrb r2, [r1, 0xE] - movs r0, 0x10 - negs r0, r0 - ands r0, r2 - strb r0, [r1, 0xE] - b _080412DE - .pool -_0804113C: - lsrs r1, r4, 28 - subs r1, 0x1 - movs r0, 0xF - ands r1, r0 - movs r4, 0x10 - negs r4, r4 - adds r0, r4, 0 - ands r0, r5 - orrs r0, r1 - strb r0, [r2, 0xE] - cmp r1, 0 - beq _08041172 - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r3 - muls r1, r7 - ldrb r0, [r0, 0xC] - adds r1, r0 - mov r0, r8 - adds r0, 0x24 - adds r1, r0 - ldrb r0, [r1] - cmp r0, 0 - beq _08041172 - b _080412DE -_08041172: - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r3 - movs r1, 0 - strh r1, [r0, 0x6] - ldrb r0, [r6] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r1, r3 - ldrb r2, [r1, 0xE] - adds r0, r4, 0 - ands r0, r2 - strb r0, [r1, 0xE] - ldr r0, =gUnknown_082DAE37 - b _080412D0 - .pool -_0804119C: - ldr r0, =gStatuses3 - ldrb r1, [r6] - lsls r1, 2 - adds r1, r0 - ldr r2, [r1] - movs r0, 0x18 - ands r0, r2 - cmp r0, 0 - beq _080411B4 - adds r0, r2, 0 - subs r0, 0x8 - str r0, [r1] -_080411B4: - ldr r1, [r7] - b _080412E2 - .pool -_080411BC: - ldr r2, =gDisableStructs - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r3, r0, r2 - ldrb r2, [r3, 0x12] - lsls r1, r2, 28 - cmp r1, 0 - beq _080411F6 - lsrs r1, 28 - subs r1, 0x1 - movs r0, 0xF - ands r1, r0 - movs r0, 0x10 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r3, 0x12] - cmp r1, 0 - bne _080411F6 - ldr r0, =gStatuses3 - ldrb r2, [r6] - lsls r2, 2 - adds r2, r0 - ldr r0, [r2] - ldr r1, =0xfffffdff - ands r0, r1 - str r0, [r2] -_080411F6: - ldr r1, [r7] - b _080412E2 - .pool -_08041208: - ldr r2, =gDisableStructs - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r3, r0, r2 - ldrb r2, [r3, 0x13] - lsls r1, r2, 28 - cmp r1, 0 - beq _0804122E - lsrs r1, 28 - subs r1, 0x1 - movs r0, 0xF - ands r1, r0 - movs r0, 0x10 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r3, 0x13] -_0804122E: - ldr r1, [r7] - b _080412E2 - .pool -_08041238: - ldr r4, =gStatuses3 - ldrb r0, [r6] - lsls r0, 2 - adds r2, r0, r4 - ldr r1, [r2] - movs r3, 0xC0 - lsls r3, 5 - adds r0, r1, 0 - ands r0, r3 - cmp r0, 0 - beq _080412DE - ldr r5, =0xfffff800 - adds r0, r1, r5 - str r0, [r2] - ldrb r2, [r6] - lsls r0, r2, 2 - adds r0, r4 - ldr r0, [r0] - ands r0, r3 - cmp r0, 0 - bne _080412DE - ldr r3, =gBattleMons - movs r5, 0x58 - adds r1, r2, 0 - muls r1, r5 - adds r4, r3, 0 - adds r4, 0x4C - adds r0, r1, r4 - ldrb r0, [r0] - cmp r0, 0 - bne _080412DE - adds r0, r1, r3 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x48 - beq _080412DE - cmp r0, 0xF - beq _080412DE - adds r0, r2, 0 - bl sub_8050650 - lsls r0, 24 - cmp r0, 0 - bne _080412DE - ldrb r0, [r6] - bl CancelMultiTurnMoves - bl Random - ldrb r1, [r6] - adds r2, r1, 0 - muls r2, r5 - adds r2, r4 - movs r1, 0x3 - ands r1, r0 - adds r1, 0x2 - ldr r0, [r2] - orrs r0, r1 - str r0, [r2] - ldrb r0, [r6] - muls r0, r5 - adds r0, r4 - str r0, [sp] - movs r0, 0 - movs r1, 0x28 - movs r2, 0 - movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs - ldrb r0, [r6] - bl dp01_battle_side_mark_buffer_for_execution - ldr r1, =gUnknown_0202420E - ldrb r0, [r6] - strb r0, [r1] - ldr r0, =gUnknown_082DB378 -_080412D0: - bl b_call_bc_move_exec -_080412D4: - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_080412DE: - ldr r0, =gBattleStruct - ldr r1, [r0] -_080412E2: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _08041312 - .pool -_08041304: - ldr r1, [r7] - movs r0, 0 - strb r0, [r1] - ldr r1, [r7] - ldrb r0, [r1, 0x1] - adds r0, 0x1 - strb r0, [r1, 0x1] -_08041312: - mov r7, r9 - cmp r7, 0 - beq _0804131C -_08041318: - mov r0, r9 - b _08041344 -_0804131C: - ldr r5, =gBattleStruct - ldr r2, [r5] - ldr r0, =gNoOfAllBanks - ldrb r1, [r2, 0x1] - adds r7, r5, 0 - mov r8, r0 - ldrb r0, [r0] - cmp r1, r0 - bcs _08041338 -_0804132E: - ldrb r0, [r2] - cmp r0, 0x13 - bhi _08041338 - bl _08040968 -_08041338: - ldr r0, =gHitMarker - ldr r1, [r0] - ldr r2, =0xfeffffdf - ands r1, r2 - str r1, [r0] - movs r0, 0 -_08041344: - add sp, 0x8 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8040924 - - thumb_func_start sub_8041364 -sub_8041364: @ 8041364 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r2, =gHitMarker - ldr r0, [r2] - ldr r1, =0x01000020 - orrs r0, r1 - str r0, [r2] - ldr r1, =gBattleStruct - ldr r3, [r1] - movs r4, 0xD0 - lsls r4, 1 - adds r0, r3, r4 - ldrb r0, [r0] - mov r10, r2 - adds r6, r1, 0 - cmp r0, 0x1 - bne _0804138E - b _08041548 -_0804138E: - cmp r0, 0x1 - bgt _080413A4 - cmp r0, 0 - beq _080413AC - b _08041708 - .pool -_080413A4: - cmp r0, 0x2 - bne _080413AA - b _0804169A -_080413AA: - b _08041708 -_080413AC: - ldr r2, =0x000001a1 - adds r0, r3, r2 - ldr r1, =gNoOfAllBanks - ldrb r0, [r0] - mov r8, r1 - ldrb r7, [r1] - cmp r0, r7 - bcc _080413BE - b _08041532 -_080413BE: - ldr r4, =gActiveBank - ldr r5, =gBattleTextBuff1 - ldr r7, =gUnknown_020243D0 - movs r0, 0x18 - adds r0, r7 - mov r12, r0 -_080413CA: - ldr r0, [r6] - adds r3, r0, r2 - ldrb r0, [r3] - strb r0, [r4] - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r2, =gBitTable - ldrb r0, [r4] - lsls r0, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _0804140C - ldrb r0, [r3] - adds r0, 0x1 - strb r0, [r3] - b _08041520 - .pool -_0804140C: - ldrb r0, [r3] - adds r0, 0x1 - strb r0, [r3] - ldr r1, =gUnknown_020243D0 - ldrb r0, [r4] - adds r2, r0, r1 - ldrb r0, [r2] - mov r9, r1 - cmp r0, 0 - bne _08041422 - b _08041520 -_08041422: - subs r0, 0x1 - strb r0, [r2] - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0 - bne _08041520 - ldr r1, =gBattleMons - ldrb r2, [r4] - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _08041520 - lsls r0, r2, 1 - add r0, r12 - ldrh r0, [r0] - cmp r0, 0xF8 - bne _0804145C - ldr r0, =gBattleCommunication - strb r3, [r0, 0x5] - b _08041462 - .pool -_0804145C: - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] -_08041462: - movs r0, 0xFD - strb r0, [r5] - movs r6, 0x2 - movs r0, 0x2 - strb r0, [r5, 0x1] - ldrb r0, [r4] - lsls r0, 1 - add r0, r12 - ldrh r0, [r0] - strb r0, [r5, 0x2] - ldrb r0, [r4] - lsls r0, 1 - add r0, r12 - ldrh r0, [r0] - lsrs r0, 8 - strb r0, [r5, 0x3] - movs r0, 0xFF - strb r0, [r5, 0x4] - ldr r5, =gBankTarget - ldrb r0, [r4] - strb r0, [r5] - ldr r1, =gBankAttacker - adds r0, r7, 0x4 - ldrb r2, [r4] - adds r0, r2 - ldrb r0, [r0] - strb r0, [r1] - ldr r2, =gBattleMoveDamage - ldrb r0, [r4] - lsls r0, 2 - adds r1, r7, 0 - adds r1, 0x8 - adds r0, r1 - ldr r0, [r0] - str r0, [r2] - ldr r2, =gSpecialStatuses - ldrb r1, [r5] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r2, 0x4 - adds r0, r2 - ldr r1, =0x0000ffff - str r1, [r0] - ldr r0, =gUnknown_082DAFE4 - bl b_call_bc_move_exec - ldrb r1, [r4] - adds r0, r1, r7 - ldrb r0, [r0] - cmp r0, 0 - beq _080414CC - b _08041664 -_080414CC: - eors r1, r6 - mov r3, r9 - adds r0, r1, r3 - ldrb r0, [r0] - cmp r0, 0 - beq _080414DA - b _08041664 -_080414DA: - ldrb r0, [r5] - bl GetBankIdentity - ldr r2, =gSideAffecting - lsls r0, 24 - lsrs r0, 24 - movs r1, 0x1 - ands r0, r1 - lsls r0, 1 - adds r0, r2 - ldrh r1, [r0] - ldr r4, =0x0000ffbf - adds r2, r4, 0 - ands r1, r2 - strh r1, [r0] - b _08041664 - .pool -_08041520: - ldr r0, [r6] - ldr r2, =0x000001a1 - adds r0, r2 - ldrb r0, [r0] - mov r1, r8 - ldrb r1, [r1] - cmp r0, r1 - bcs _08041532 - b _080413CA -_08041532: - ldr r0, [r6] - movs r2, 0xD0 - lsls r2, 1 - adds r0, r2 - movs r1, 0x1 - strb r1, [r0] - ldr r0, [r6] - ldr r3, =0x000001a1 - adds r1, r0, r3 - movs r0, 0 - strb r0, [r1] -_08041548: - adds r3, r6, 0 - ldr r0, [r6] - ldr r2, =0x000001a1 - adds r0, r2 - ldr r1, =gNoOfAllBanks - ldrb r0, [r0] - mov r8, r1 - ldrb r4, [r1] - cmp r0, r4 - bcc _0804155E - b _08041684 -_0804155E: - ldr r5, =gActiveBank - ldr r4, =gBattleTextBuff1 - ldr r7, =gDisableStructs - mov r12, r7 - ldr r0, =gBankAttacker - mov r9, r0 -_0804156A: - ldr r1, =gTurnOrder - ldr r0, [r3] - adds r3, r0, r2 - ldrb r0, [r3] - adds r0, r1 - ldrb r0, [r0] - mov r1, r9 - strb r0, [r1] - strb r0, [r5] - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r2, =gBitTable - ldrb r0, [r5] - lsls r0, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _080415BC - ldrb r0, [r3] - adds r0, 0x1 - strb r0, [r3] - b _08041670 - .pool -_080415BC: - ldrb r0, [r3] - adds r0, 0x1 - strb r0, [r3] - ldr r7, =gStatuses3 - ldrb r0, [r5] - lsls r0, 2 - adds r0, r7 - ldr r0, [r0] - movs r1, 0x20 - ands r0, r1 - cmp r0, 0 - beq _08041670 - movs r0, 0xFD - strb r0, [r4] - movs r0, 0x1 - strb r0, [r4, 0x1] - strb r0, [r4, 0x2] - strb r0, [r4, 0x3] - ldrb r1, [r5] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r12 - ldrb r0, [r0, 0xF] - lsls r0, 28 - lsrs r0, 28 - strb r0, [r4, 0x4] - movs r0, 0xFF - strb r0, [r4, 0x5] - ldrb r2, [r5] - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - mov r3, r12 - adds r4, r0, r3 - ldrb r3, [r4, 0xF] - lsls r1, r3, 28 - cmp r1, 0 - bne _08041644 - lsls r2, 2 - adds r2, r7 - ldr r0, [r2] - movs r1, 0x21 - negs r1, r1 - ands r0, r1 - str r0, [r2] - ldr r3, =gBattleMoveDamage - ldr r2, =gBattleMons - ldrb r1, [r5] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r0, [r0, 0x28] - str r0, [r3] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAF05 - b _0804165C - .pool -_08041644: - lsrs r1, 28 - subs r1, 0x1 - movs r0, 0xF - ands r1, r0 - movs r7, 0x10 - negs r7, r7 - adds r0, r7, 0 - ands r0, r3 - orrs r0, r1 - strb r0, [r4, 0xF] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAF20 -_0804165C: - str r0, [r1] - ldr r0, [r1] - bl b_call_bc_move_exec -_08041664: - movs r0, 0x1 - b _08041714 - .pool -_08041670: - adds r3, r6, 0 - ldr r0, [r6] - ldr r2, =0x000001a1 - adds r0, r2 - ldrb r0, [r0] - mov r1, r8 - ldrb r1, [r1] - cmp r0, r1 - bcs _08041684 - b _0804156A -_08041684: - ldr r0, [r6] - movs r2, 0xD0 - lsls r2, 1 - adds r0, r2 - movs r1, 0x2 - strb r1, [r0] - ldr r0, [r6] - ldr r3, =0x000001a1 - adds r1, r0, r3 - movs r0, 0 - strb r0, [r1] -_0804169A: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 11 - ands r0, r1 - cmp r0, 0 - beq _08041708 - ldr r0, [r6] - adds r0, 0xDA - ldrb r0, [r0] - cmp r0, 0x2 - bne _08041708 - ldr r1, =gBattleMons - ldrh r0, [r1, 0x28] - cmp r0, 0 - beq _08041708 - adds r0, r1, 0 - adds r0, 0x80 - ldrh r0, [r0] - cmp r0, 0 - beq _08041708 - movs r4, 0 -_080416C6: - lsls r0, r4, 24 - lsrs r0, 24 - bl CancelMultiTurnMoves - adds r4, 0x1 - cmp r4, 0x1 - ble _080416C6 - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB8F3 - str r0, [r1] - bl b_call_bc_move_exec - ldr r0, =gBattleStruct - ldr r1, [r0] - movs r4, 0xD0 - lsls r4, 1 - adds r1, r4 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _08041664 - .pool -_08041708: - mov r7, r10 - ldr r0, [r7] - ldr r1, =0xfeffffdf - ands r0, r1 - str r0, [r7] - movs r0, 0 -_08041714: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8041364 - - thumb_func_start sub_8041728 -sub_8041728: @ 8041728 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08041770 - b _08041A0A - .pool -_08041744: - ldr r0, =gUnknown_082DA7C4 - bl b_call_bc_move_exec - ldr r0, [r5] - adds r0, 0x4D - movs r1, 0x2 - b _08041764 - .pool -_08041758: - ldr r0, =gUnknown_082DA7CD - bl b_call_bc_move_exec - ldr r0, [r5] - adds r0, 0x4D - movs r1, 0x5 -_08041764: - strb r1, [r0] -_08041766: - movs r0, 0x1 - b _08041A0C - .pool -_08041770: - ldr r0, =gBattleStruct - mov r8, r0 -_08041774: - mov r1, r8 - ldr r0, [r1] - adds r0, 0x4D - ldrb r0, [r0] - cmp r0, 0x7 - bls _08041782 - b _080419FC -_08041782: - lsls r0, 2 - ldr r1, =_08041794 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08041794: - .4byte _080417B4 - .4byte _08041806 - .4byte _080418A0 - .4byte _080418E2 - .4byte _080418F6 - .4byte _08041960 - .4byte _08041994 - .4byte _080419FC -_080417B4: - mov r4, r8 - ldr r0, [r4] - adds r0, 0x4E - movs r1, 0 - strb r1, [r0] - ldr r1, [r4] - adds r1, 0x4D - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - movs r5, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r5, r0 - bge _08041806 - ldr r6, =gAbsentBankFlags -_080417D4: - ldrb r0, [r6] - ldr r2, =gBitTable - lsls r1, r5, 2 - adds r1, r2 - ldr r4, [r1] - ands r0, r4 - cmp r0, 0 - beq _080417FC - lsls r0, r5, 24 - lsrs r0, 24 - movs r1, 0x6 - movs r2, 0x6 - bl sub_80423F4 - lsls r0, 24 - cmp r0, 0 - bne _080417FC - ldrb r0, [r6] - bics r0, r4 - strb r0, [r6] -_080417FC: - adds r5, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r5, r0 - blt _080417D4 -_08041806: - ldr r0, =gBattleStruct - mov r8, r0 - ldr r1, =gUnknown_0202420D - mov r12, r1 - ldr r2, =gBankTarget - mov r5, r8 - ldr r7, =gBattleMons - ldr r6, =gBattlePartyID -_08041816: - ldr r3, [r5] - adds r1, r3, 0 - adds r1, 0x4E - ldrb r0, [r1] - strb r0, [r2] - mov r4, r12 - strb r0, [r4] - ldrb r4, [r1] - movs r0, 0x58 - muls r0, r4 - adds r0, r7 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _0804185E - adds r0, r3, 0 - adds r0, 0xDF - ldrb r1, [r0] - ldr r3, =gBitTable - lsls r0, r4, 1 - adds r0, r6 - ldrh r0, [r0] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _0804185E - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - lsls r0, r4, 2 - adds r0, r3 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _0804185E - b _08041744 -_0804185E: - ldr r0, [r5] - adds r0, 0x4E - ldrb r1, [r0] - adds r1, 0x1 - strb r1, [r0] - ldr r0, =gNoOfAllBanks - lsls r1, 24 - lsrs r1, 24 - ldrb r0, [r0] - cmp r1, r0 - bne _08041816 - mov r1, r8 - ldr r0, [r1] - adds r0, 0x4D - movs r1, 0x3 - strb r1, [r0] - b _080419FC - .pool -_080418A0: - ldr r0, =gUnknown_0202420D - ldrb r0, [r0] - bl sub_803F9EC - ldr r2, =gBattleStruct - ldr r1, [r2] - adds r1, 0x4E - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bne _080418D8 - ldr r0, [r2] - adds r0, 0x4D - movs r1, 0x3 - strb r1, [r0] - b _080419FA - .pool -_080418D8: - ldr r0, [r2] - adds r0, 0x4D - movs r1, 0x1 - strb r1, [r0] - b _080419FA -_080418E2: - mov r4, r8 - ldr r0, [r4] - adds r0, 0x4E - movs r1, 0 - strb r1, [r0] - ldr r1, [r4] - adds r1, 0x4D - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] -_080418F6: - ldr r0, =gUnknown_0202420D - mov r12, r0 - ldr r7, =gBankTarget - ldr r5, =gBattleStruct - ldr r2, =gBattleMons - ldr r6, =gBitTable -_08041902: - ldr r0, [r5] - adds r4, r0, 0 - adds r4, 0x4E - ldrb r0, [r4] - strb r0, [r7] - mov r1, r12 - strb r0, [r1] - ldrb r3, [r4] - movs r0, 0x58 - muls r0, r3 - adds r0, r2 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _08041930 - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - lsls r0, r3, 2 - adds r0, r6 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _08041930 - b _08041758 -_08041930: - adds r0, r3, 0x1 - strb r0, [r4] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bne _08041902 - b _08041978 - .pool -_08041960: - mov r1, r8 - ldr r0, [r1] - adds r0, 0x4E - ldrb r1, [r0] - adds r1, 0x1 - strb r1, [r0] - ldr r0, =gNoOfAllBanks - lsls r1, 24 - lsrs r1, 24 - ldrb r0, [r0] - cmp r1, r0 - bne _08041988 -_08041978: - mov r4, r8 - ldr r0, [r4] - adds r0, 0x4D - movs r1, 0x6 - strb r1, [r0] - b _080419FC - .pool -_08041988: - mov r1, r8 - ldr r0, [r1] - adds r0, 0x4D - movs r1, 0x4 - strb r1, [r0] - b _080419FC -_08041994: - movs r0, 0 - str r0, [sp] - movs r0, 0x9 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - beq _080419AE - b _08041766 -_080419AE: - str r0, [sp] - movs r0, 0xB - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _080419C4 - b _08041766 -_080419C4: - movs r0, 0x1 - movs r1, 0 - movs r2, 0x1 - bl berry_effects_maybe - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - beq _080419D8 - b _08041766 -_080419D8: - str r0, [sp] - movs r0, 0x6 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _080419EE - b _08041766 -_080419EE: - ldr r2, =gBattleStruct - ldr r1, [r2] - adds r1, 0x4D - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] -_080419FA: - mov r8, r2 -_080419FC: - mov r4, r8 - ldr r0, [r4] - adds r0, 0x4D - ldrb r0, [r0] - cmp r0, 0x7 - beq _08041A0A - b _08041774 -_08041A0A: - movs r0, 0 -_08041A0C: - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8041728 - - thumb_func_start b_clear_atk_up_if_hit_flag_unless_enraged -b_clear_atk_up_if_hit_flag_unless_enraged: @ 8041A1C - push {r4-r6,lr} - movs r3, 0 - ldr r0, =gNoOfAllBanks - adds r5, r0, 0 - ldrb r0, [r5] - cmp r3, r0 - bge _08041A54 - ldr r4, =gUnknown_02024274 - movs r6, 0x80 - lsls r6, 16 - ldr r2, =gBattleMons + 0x50 -_08041A32: - ldr r1, [r2] - adds r0, r1, 0 - ands r0, r6 - cmp r0, 0 - beq _08041A48 - ldrh r0, [r4] - cmp r0, 0x63 - beq _08041A48 - ldr r0, =0xff7fffff - ands r1, r0 - str r1, [r2] -_08041A48: - adds r4, 0x2 - adds r2, 0x58 - adds r3, 0x1 - ldrb r0, [r5] - cmp r3, r0 - blt _08041A32 -_08041A54: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end b_clear_atk_up_if_hit_flag_unless_enraged - - thumb_func_start sub_8041A6C -sub_8041A6C: @ 8041A6C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x10 - movs r0, 0 - mov r9, r0 - ldr r1, =gBattleScripting + 4 - mov r10, r1 - ldr r2, =gBattleStruct - mov r8, r2 - b _08041A9A - .pool -_08041A90: - mov r3, r9 - cmp r3, 0 - beq _08041A9A - bl _08042388 -_08041A9A: - mov r4, r8 - ldr r0, [r4] - ldr r7, =0x000001a3 - adds r0, r7 - ldrb r0, [r0] - cmp r0, 0xE - bls _08041AAC - bl _08042376 -_08041AAC: - lsls r0, 2 - ldr r1, =_08041AC0 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08041AC0: - .4byte _08041AFC - .4byte _08041B48 - .4byte _08041C90 - .4byte _08041D50 - .4byte _08041DC4 - .4byte _08041E40 - .4byte _08041EB8 - .4byte _08041F38 - .4byte _08041FC0 - .4byte _08042028 - .4byte _08042114 - .4byte _08042194 - .4byte _08042234 - .4byte _0804231C - .4byte _08042376 -_08041AFC: - ldr r1, =gBattleMons - ldr r3, =gBankAttacker - ldrb r2, [r3] - movs r0, 0x58 - muls r2, r0 - adds r1, 0x50 - adds r2, r1 - ldr r0, [r2] - ldr r1, =0xfdffffff - ands r0, r1 - str r0, [r2] - ldr r0, =gStatuses3 - ldrb r2, [r3] - lsls r2, 2 - adds r2, r0 - ldr r0, [r2] - ldr r1, =0xffffbfff - ands r0, r1 - str r0, [r2] - mov r1, r8 - ldr r0, [r1] - ldr r2, =0x000001a3 - adds r1, r0, r2 - bl _08042370 - .pool -_08041B48: - ldr r7, =gBattleMons - ldr r4, =gBankAttacker - ldrb r1, [r4] - movs r5, 0x58 - adds r0, r1, 0 - muls r0, r5 - adds r6, r7, 0 - adds r6, 0x4C - adds r0, r6 - ldr r0, [r0] - movs r3, 0x7 - mov r8, r3 - ands r0, r3 - cmp r0, 0 - bne _08041B68 - b _08041C6E -_08041B68: - adds r0, r1, 0 - bl sub_8050650 - lsls r0, 24 - cmp r0, 0 - beq _08041BC8 - ldrb r0, [r4] - adds r2, r0, 0 - muls r2, r5 - adds r2, r6 - ldr r0, [r2] - movs r1, 0x8 - negs r1, r1 - ands r0, r1 - str r0, [r2] - ldrb r0, [r4] - adds r2, r0, 0 - muls r2, r5 - adds r0, r7, 0 - adds r0, 0x50 - adds r2, r0 - ldr r0, [r2] - ldr r1, =0xf7ffffff - ands r0, r1 - str r0, [r2] - bl b_movescr_stack_push_cursor - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB220 - str r0, [r1] - movs r4, 0x2 - mov r9, r4 - b _08041C6E - .pool -_08041BC8: - ldrb r0, [r4] - adds r1, r0, 0 - muls r1, r5 - adds r0, r1, r7 - adds r0, 0x20 - ldrb r0, [r0] - movs r3, 0x1 - cmp r0, 0x30 - bne _08041BDC - movs r3, 0x2 -_08041BDC: - adds r2, r1, r6 - ldr r1, [r2] - adds r0, r1, 0 - mov r7, r8 - ands r0, r7 - cmp r0, r3 - bcs _08041BF4 - movs r0, 0x8 - negs r0, r0 - ands r1, r0 - str r1, [r2] - b _08041BF8 -_08041BF4: - subs r0, r1, r3 - str r0, [r2] -_08041BF8: - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r1, r0 - adds r0, r2, 0 - adds r0, 0x4C - adds r0, r1, r0 - ldr r4, [r0] - movs r0, 0x7 - ands r4, r0 - cmp r4, 0 - beq _08041C50 - ldr r0, =gCurrentMove - ldrh r0, [r0] - cmp r0, 0xAD - beq _08041C6E - cmp r0, 0xD6 - beq _08041C6E - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB213 - str r0, [r1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 12 - orrs r0, r1 - str r0, [r2] - movs r0, 0x2 - mov r9, r0 - b _08041C6E - .pool -_08041C50: - adds r2, 0x50 - adds r2, r1, r2 - ldr r0, [r2] - ldr r1, =0xf7ffffff - ands r0, r1 - str r0, [r2] - bl b_movescr_stack_push_cursor - ldr r0, =gBattleCommunication - strb r4, [r0, 0x5] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB220 - str r0, [r1] - movs r1, 0x2 - mov r9, r1 -_08041C6E: - ldr r1, =gBattleStruct - ldr r0, [r1] - ldr r3, =0x000001a3 - adds r2, r0, r3 - b _0804216A - .pool -_08041C90: - ldr r1, =gBattleMons - ldr r7, =gBankAttacker - ldrb r0, [r7] - movs r6, 0x58 - muls r0, r6 - adds r5, r1, 0 - adds r5, 0x4C - adds r0, r5 - ldr r0, [r0] - movs r1, 0x20 - ands r0, r1 - cmp r0, 0 - beq _08041D30 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x5 - bl __umodsi3 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, 0 - beq _08041D08 - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - cmp r0, 0x7D - bne _08041CD6 - b _08042162 -_08041CD6: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB26A - str r0, [r1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 2 - orrs r0, r1 - str r0, [r2] - b _08041D28 - .pool -_08041D08: - ldrb r0, [r7] - adds r2, r0, 0 - muls r2, r6 - adds r2, r5 - ldr r0, [r2] - movs r1, 0x21 - negs r1, r1 - ands r0, r1 - str r0, [r2] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB277 - str r0, [r1] - ldr r0, =gBattleCommunication - strb r4, [r0, 0x5] -_08041D28: - movs r7, 0x2 - mov r9, r7 - ldr r0, =gBattleStruct - mov r8, r0 -_08041D30: - mov r1, r8 - ldr r0, [r1] - ldr r2, =0x000001a3 - adds r1, r0, r2 - b _08042370 - .pool -_08041D50: - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x36 - beq _08041D66 - b _08042162 -_08041D66: - ldr r0, =gDisableStructs - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x18] - lsls r0, 31 - cmp r0, 0 - bne _08041D7A - b _08042162 -_08041D7A: - adds r0, r2, 0 - bl CancelMultiTurnMoves - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 12 - orrs r0, r1 - str r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0 - strb r0, [r1, 0x5] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB6AD - str r0, [r1] - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - b _0804215E - .pool -_08041DC4: - ldr r1, =gBattleMons - ldr r3, =gBankAttacker - ldrb r2, [r3] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r2, r0, r1 - ldr r1, [r2] - movs r0, 0x80 - lsls r0, 15 - ands r0, r1 - cmp r0, 0 - beq _08041E10 - ldr r0, =0xffbfffff - ands r1, r0 - str r1, [r2] - ldr r2, =gDisableStructs - ldrb r1, [r3] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - movs r1, 0 - strb r1, [r0, 0x19] - ldrb r0, [r3] - bl CancelMultiTurnMoves - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082D9462 - str r0, [r1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 12 - orrs r0, r1 - str r0, [r2] - movs r7, 0x1 - mov r9, r7 -_08041E10: - ldr r1, =gBattleStruct - ldr r0, [r1] - ldr r3, =0x000001a3 - adds r2, r0, r3 - b _0804216A - .pool -_08041E40: - ldr r1, =gBattleMons - ldr r3, =gBankAttacker - ldrb r2, [r3] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r2, r0, r1 - ldr r1, [r2] - movs r0, 0x8 - ands r0, r1 - cmp r0, 0 - beq _08041E8C - movs r0, 0x9 - negs r0, r0 - ands r1, r0 - str r1, [r2] - ldr r0, =gProtectStructs - ldrb r2, [r3] - lsls r2, 4 - adds r2, r0 - ldrb r0, [r2, 0x2] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r2, 0x2] - ldrb r0, [r3] - bl CancelMultiTurnMoves - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB29B - str r0, [r1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 12 - orrs r0, r1 - str r0, [r2] - movs r4, 0x1 - mov r9, r4 -_08041E8C: - ldr r1, =gBattleStruct - ldr r0, [r1] - ldr r7, =0x000001a3 - adds r2, r0, r7 - b _0804216A - .pool -_08041EB8: - ldr r0, =gDisableStructs - ldr r3, =gBankAttacker - ldrb r2, [r3] - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - adds r1, r0 - ldr r0, =gCurrentMove - ldrh r1, [r1, 0x4] - ldrh r0, [r0] - cmp r1, r0 - bne _08041F04 - cmp r1, 0 - beq _08041F04 - ldr r0, =gProtectStructs - lsls r2, 4 - adds r2, r0 - ldrb r0, [r2, 0x1] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2, 0x1] - ldr r1, =gBattleScripting - ldrb r0, [r3] - strb r0, [r1, 0x17] - ldrb r0, [r3] - bl CancelMultiTurnMoves - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAE14 - str r0, [r1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 12 - orrs r0, r1 - str r0, [r2] - movs r0, 0x1 - mov r9, r0 -_08041F04: - ldr r1, =gBattleStruct - ldr r0, [r1] - ldr r3, =0x000001a3 - adds r2, r0, r3 - b _0804216A - .pool -_08041F38: - ldr r0, =gDisableStructs - ldr r4, =gBankAttacker - ldrb r3, [r4] - lsls r1, r3, 3 - subs r1, r3 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x13] - lsls r0, 28 - cmp r0, 0 - beq _08041F8C - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - cmp r0, 0 - bne _08041F8C - ldr r0, =gProtectStructs - lsls r2, r3, 4 - adds r2, r0 - ldrb r0, [r2, 0x2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2, 0x2] - ldrb r0, [r4] - bl CancelMultiTurnMoves - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB0A4 - str r0, [r1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 12 - orrs r0, r1 - str r0, [r2] - movs r4, 0x1 - mov r9, r4 -_08041F8C: - ldr r1, =gBattleStruct - ldr r0, [r1] - ldr r7, =0x000001a3 - adds r2, r0, r7 - b _0804216A - .pool -_08041FC0: - ldr r4, =gBankAttacker - ldrb r0, [r4] - ldr r1, =gCurrentMove - ldrh r1, [r1] - bl sub_8040130 - lsls r0, 24 - cmp r0, 0 - beq _08041FFE - ldr r0, =gProtectStructs - ldrb r2, [r4] - lsls r2, 4 - adds r2, r0 - ldrb r0, [r2, 0x1] - movs r1, 0x20 - orrs r0, r1 - strb r0, [r2, 0x1] - ldrb r0, [r4] - bl CancelMultiTurnMoves - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB176 - str r0, [r1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 12 - orrs r0, r1 - str r0, [r2] - movs r0, 0x1 - mov r9, r0 -_08041FFE: - ldr r1, =gBattleStruct - ldr r0, [r1] - ldr r3, =0x000001a3 - adds r2, r0, r3 - b _0804216A - .pool -_08042028: - ldr r7, =gBattleMons - ldr r5, =gBankAttacker - ldrb r0, [r5] - movs r6, 0x58 - muls r0, r6 - adds r4, r7, 0 - adds r4, 0x50 - adds r2, r0, r4 - ldr r1, [r2] - movs r3, 0x7 - adds r0, r1, 0 - ands r0, r3 - cmp r0, 0 - beq _080420FA - subs r0, r1, 0x1 - str r0, [r2] - ldrb r0, [r5] - muls r0, r6 - adds r0, r4 - ldr r0, [r0] - ands r0, r3 - cmp r0, 0 - beq _080420E8 - bl Random - movs r1, 0x1 - movs r2, 0x1 - ands r2, r0 - cmp r2, 0 - beq _0804207C - ldr r1, =gBattleCommunication - movs r0, 0 - strb r0, [r1, 0x5] - bl b_movescr_stack_push_cursor - b _080420C6 - .pool -_0804207C: - ldr r0, =gBattleCommunication - movs r4, 0x1 - strb r1, [r0, 0x5] - ldr r1, =gBankTarget - ldrb r0, [r5] - strb r0, [r1] - ldrb r0, [r5] - adds r1, r0, 0 - muls r1, r6 - adds r1, r7 - movs r0, 0x28 - str r0, [sp] - str r2, [sp, 0x4] - ldrb r0, [r5] - str r0, [sp, 0x8] - ldrb r0, [r5] - str r0, [sp, 0xC] - adds r0, r1, 0 - movs r2, 0x1 - movs r3, 0 - bl CalculateBaseDamage - ldr r1, =gBattleMoveDamage - str r0, [r1] - ldr r0, =gProtectStructs - ldrb r1, [r5] - lsls r1, 4 - adds r1, r0 - ldrb r0, [r1, 0x1] - orrs r0, r4 - strb r0, [r1, 0x1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 12 - orrs r0, r1 - str r0, [r2] -_080420C6: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB2BD - b _080420F0 - .pool -_080420E8: - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB300 -_080420F0: - str r0, [r1] - movs r4, 0x1 - mov r9, r4 - ldr r7, =gBattleStruct - mov r8, r7 -_080420FA: - mov r1, r8 - ldr r0, [r1] - ldr r2, =0x000001a3 - adds r1, r0, r2 - b _08042370 - .pool -_08042114: - ldr r1, =gBattleMons - ldr r4, =gBankAttacker - ldrb r2, [r4] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x4C - adds r0, r1 - ldr r0, [r0] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - beq _08042162 - bl Random - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - cmp r1, 0 - bne _08042162 - ldr r0, =gProtectStructs - ldrb r2, [r4] - lsls r2, 4 - adds r2, r0 - ldrb r0, [r2] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB28B - str r0, [r1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 12 - orrs r0, r1 - str r0, [r2] -_0804215E: - movs r3, 0x1 - mov r9, r3 -_08042162: - ldr r1, =gBattleStruct - ldr r0, [r1] - ldr r4, =0x000001a3 - adds r2, r0, r4 -_0804216A: - ldrb r0, [r2] - adds r0, 0x1 - strb r0, [r2] - mov r8, r1 - b _08042376 - .pool -_08042194: - ldr r1, =gBattleMons - ldr r4, =gBankAttacker - ldrb r2, [r4] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r1, [r0] - movs r0, 0xF0 - lsls r0, 12 - ands r1, r0 - cmp r1, 0 - beq _0804220E - lsrs r0, r1, 16 - bl CountTrailingZeroBits - ldr r1, =gBattleScripting - strb r0, [r1, 0x17] - bl Random - movs r1, 0x1 - ands r1, r0 - cmp r1, 0 - beq _080421D8 - bl b_movescr_stack_push_cursor - b _08042200 - .pool -_080421D8: - ldr r0, =gUnknown_082DB334 - bl b_movescr_stack_push - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 12 - orrs r0, r1 - str r0, [r2] - ldr r0, =gProtectStructs - ldrb r2, [r4] - lsls r2, 4 - adds r2, r0 - ldrb r0, [r2, 0x1] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2, 0x1] - ldrb r0, [r4] - bl CancelMultiTurnMoves -_08042200: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB327 - str r0, [r1] - movs r7, 0x1 - mov r9, r7 - ldr r0, =gBattleStruct - mov r8, r0 -_0804220E: - mov r1, r8 - ldr r0, [r1] - ldr r2, =0x000001a3 - adds r1, r0, r2 - b _08042370 - .pool -_08042234: - ldr r1, =gBattleMons - ldr r6, =gBankAttacker - ldrb r0, [r6] - movs r5, 0x58 - muls r0, r5 - adds r1, 0x50 - adds r3, r0, r1 - ldr r2, [r3] - movs r4, 0xC0 - lsls r4, 2 - adds r0, r2, 0 - ands r0, r4 - cmp r0, 0 - beq _08042306 - ldr r7, =0xffffff00 - adds r0, r2, r7 - str r0, [r3] - ldrb r2, [r6] - adds r0, r2, 0 - muls r0, r5 - adds r0, r1 - ldr r0, [r0] - ands r0, r4 - cmp r0, 0 - beq _08042280 - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAD71 - b _08042300 - .pool -_08042280: - ldr r3, =gUnknown_020241F8 - lsls r0, r2, 2 - adds r0, r3 - ldr r0, [r0] - cmp r0, 0 - beq _080422FC - ldr r1, =gCurrentMove - movs r0, 0x75 - strh r0, [r1] - ldrb r0, [r6] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - lsls r0, 1 - mov r1, r10 - str r0, [r1] - ldr r4, =gBankTarget - ldr r1, =gUnknown_02024288 - ldrb r0, [r6] - adds r0, r1 - ldrb r0, [r0] - strb r0, [r4] - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r2, =gBitTable - ldrb r0, [r4] - lsls r0, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _080422CA - movs r0, 0x75 - movs r1, 0x1 - bl GetMoveTarget - strb r0, [r4] -_080422CA: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAD7C - str r0, [r1] - ldr r2, =gBattleStruct - mov r8, r2 - b _08042302 - .pool -_080422FC: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DADC4 -_08042300: - str r0, [r1] -_08042302: - movs r3, 0x1 - mov r9, r3 -_08042306: - mov r4, r8 - ldr r0, [r4] - ldr r7, =0x000001a3 - adds r1, r0, r7 - b _08042370 - .pool -_0804231C: - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x4C - adds r4, r0, r1 - ldr r3, [r4] - movs r0, 0x20 - ands r0, r3 - cmp r0, 0 - beq _08042368 - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - cmp r0, 0x7D - bne _08042360 - movs r0, 0x21 - negs r0, r0 - ands r3, r0 - str r3, [r4] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB277 - str r0, [r1] - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] -_08042360: - movs r0, 0x2 - mov r9, r0 - ldr r1, =gBattleStruct - mov r8, r1 -_08042368: - mov r2, r8 - ldr r0, [r2] - ldr r3, =0x000001a3 - adds r1, r0, r3 -_08042370: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] -_08042376: - mov r4, r8 - ldr r0, [r4] - ldr r7, =0x000001a3 - adds r0, r7 - ldrb r0, [r0] - cmp r0, 0xE - beq _08042388 - bl _08041A90 -_08042388: - mov r0, r9 - cmp r0, 0x2 - bne _080423B4 - ldr r4, =gActiveBank - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r4] - ldrb r1, [r4] - movs r0, 0x58 - muls r0, r1 - ldr r1, =gBattleMons + 0x4C - adds r0, r1 - str r0, [sp] - movs r0, 0 - movs r1, 0x28 - movs r2, 0 - movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs - ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution -_080423B4: - mov r0, r9 - add sp, 0x10 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8041A6C thumb_func_start sub_80423F4 sub_80423F4: @ 80423F4 @@ -5779,9 +1217,9 @@ _08042E24: movs r1, 0x28 movs r2, 0 movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution bl _080443D0 .pool _08042E84: @@ -7173,9 +2611,9 @@ _08043BFC: movs r1, 0x28 movs r2, 0 movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution bl _0804443A .pool _08043C50: @@ -8179,8 +3617,8 @@ b_push_move_exec: @ 8044498 .pool thumb_func_end b_push_move_exec - thumb_func_start berry_effects_maybe -berry_effects_maybe: @ 80444DC + thumb_func_start ItemBattleEffects +ItemBattleEffects: @ 80444DC push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -8570,10 +4008,10 @@ _08044864: movs r0, 0 movs r2, 0 movs r3, 0x1 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution movs r0, 0x3 str r0, [sp, 0xC] bl _080451DE @@ -9044,7 +4482,7 @@ _08044C5C: strb r6, [r1, 0x3] subs r0, 0xD3 strb r0, [r1, 0x4] - ldr r0, =gUnknown_0202420E + ldr r0, =gEffectBank strb r7, [r0] ldr r1, =gBattleScripting movs r0, 0x11 @@ -9084,7 +4522,7 @@ _08044CC4: strb r0, [r1, 0x2] movs r0, 0xFF strb r0, [r1, 0x3] - ldr r0, =gUnknown_0202420E + ldr r0, =gEffectBank strb r7, [r0] ldr r1, =gBattleScripting movs r0, 0x12 @@ -9124,7 +4562,7 @@ _08044D18: strb r0, [r1, 0x2] movs r0, 0xFF strb r0, [r1, 0x3] - ldr r0, =gUnknown_0202420E + ldr r0, =gEffectBank strb r7, [r0] ldr r1, =gBattleScripting movs r0, 0x13 @@ -9164,7 +4602,7 @@ _08044D6C: strb r0, [r1, 0x2] movs r0, 0xFF strb r0, [r1, 0x3] - ldr r0, =gUnknown_0202420E + ldr r0, =gEffectBank strb r7, [r0] ldr r1, =gBattleScripting movs r0, 0x14 @@ -9210,7 +4648,7 @@ _08044DD4: strb r0, [r1, 0x2] movs r0, 0xFF strb r0, [r1, 0x3] - ldr r0, =gUnknown_0202420E + ldr r0, =gEffectBank strb r7, [r0] ldr r1, =gBattleScripting movs r0, 0x15 @@ -9355,7 +4793,7 @@ _08044EBC: strb r2, [r0, 0x6] subs r1, 0xD3 strb r1, [r0, 0x7] - ldr r0, =gUnknown_0202420E + ldr r0, =gEffectBank strb r7, [r0] ldr r1, =gBattleScripting mov r0, r10 @@ -10165,9 +5603,9 @@ _0804568C: movs r1, 0x28 movs r2, 0 movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0804582A .pool _080456B8: @@ -10261,7 +5699,7 @@ _08045720: bl b_movescr_stack_push_cursor movs r0, 0 movs r1, 0 - bl sub_8048760 + bl SetMoveEffect bl b_movescr_stack_pop_cursor b _0804582A .pool @@ -10351,7 +5789,7 @@ _0804582A: pop {r1} bx r1 .pool - thumb_func_end berry_effects_maybe + thumb_func_end ItemBattleEffects thumb_func_start sub_8045868 sub_8045868: @ 8045868 @@ -11109,7 +6547,7 @@ _08045F6A: ands r1, r0 strb r1, [r2, 0x5] ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB6AD + ldr r0, =BattleScript_MoveUsedLoafingAround _08045F7A: str r0, [r1] movs r0, 0x1 diff --git a/asm/battle_4.s b/asm/battle_4.s index 8651b9724..38430bac1 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -48,7 +48,7 @@ _08046020: b _08046396 .pool _08046064: - bl sub_8041A6C + bl AtkCanceller_UnableToUseMove lsls r0, 24 lsrs r2, r0, 24 cmp r2, 0 @@ -1339,10 +1339,10 @@ _08046B72: movs r0, 0 movs r2, 0 movs r3, 0x1 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes mov r7, r9 ldrb r0, [r7] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _08046BDC: ldr r2, =gHitMarker ldr r0, [r2] @@ -3431,7 +3431,7 @@ _08047D44: adds r0, 0x1 strb r0, [r5, 0x19] ldrb r0, [r7] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _08047D88: ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] @@ -3535,7 +3535,7 @@ _08047E76: bl dp01_build_cmdbuf_x18_0_aa_health_bar_update ldr r4, =gActiveBank ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldrb r0, [r4] bl GetBankSide lsls r0, 24 @@ -3763,7 +3763,7 @@ _0804807C: b _080480E0 .pool _08048098: - ldr r0, =gUnknown_020241F8 + ldr r0, =gTakenDmg ldr r2, =gActiveBank ldrb r1, [r2] lsls r1, 2 @@ -3777,14 +3777,14 @@ _08048098: adds r5, r2, 0 cmp r0, 0 bne _080480D4 - ldr r1, =gUnknown_02024288 + ldr r1, =gTakenDmgBanks ldrb r0, [r5] adds r0, r1 ldr r1, =gBankAttacker b _080480DC .pool _080480D4: - ldr r1, =gUnknown_02024288 + ldr r1, =gTakenDmgBanks ldrb r0, [r5] adds r0, r1 ldr r1, =gBankTarget @@ -3965,9 +3965,9 @@ _0804823A: movs r1, 0x2A movs r2, 0 movs r3, 0x2 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r5] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0804829A .pool _08048274: @@ -4090,7 +4090,7 @@ _08048372: _08048376: bl dp01_build_cmdbuf_x2B_aa_0 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _080483C8 _08048382: ldrb r1, [r1] @@ -4112,7 +4112,7 @@ _0804839E: bl dp01_build_cmdbuf_x2B_aa_0 ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _080483C8 .pool _080483B0: @@ -4125,7 +4125,7 @@ _080483B0: bl dp01_build_cmdbuf_x2B_aa_0 ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _080483C8: ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] @@ -4384,7 +4384,7 @@ atk11_printstring_playeronly: @ 80485D0 movs r0, 0 bl dp01_build_cmdbuf_x11_TODO ldrb r0, [r5] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r4] adds r0, 0x3 str r0, [r4] @@ -4511,7 +4511,7 @@ atk14_printfromtable_playeronly: @ 80486C4 movs r0, 0 bl dp01_build_cmdbuf_x11_TODO ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r5] adds r0, 0x5 str r0, [r5] @@ -4555,8 +4555,8 @@ _0804874E: .pool thumb_func_end sub_8048728 - thumb_func_start sub_8048760 -sub_8048760: @ 8048760 + thumb_func_start SetMoveEffect +SetMoveEffect: @ 8048760 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -4578,7 +4578,7 @@ sub_8048760: @ 8048760 ands r0, r3 cmp r0, 0 beq _080487B8 - ldr r2, =gUnknown_0202420E + ldr r2, =gEffectBank ldr r0, =gBankAttacker ldrb r0, [r0] strb r0, [r2] @@ -4592,7 +4592,7 @@ sub_8048760: @ 8048760 b _080487C4 .pool _080487B8: - ldr r2, =gUnknown_0202420E + ldr r2, =gEffectBank ldr r0, =gBankTarget ldrb r0, [r0] strb r0, [r2] @@ -4670,7 +4670,7 @@ _08048828: .pool _08048880: ldr r3, =gBattleMons - ldr r2, =gUnknown_0202420E + ldr r2, =gEffectBank ldrb r1, [r2] movs r0, 0x58 muls r0, r1 @@ -5123,7 +5123,7 @@ _08048BEA: str r2, [sp, 0x4] _08048C26: ldr r4, =gBattleMons - ldr r0, =gUnknown_0202420E + ldr r0, =gEffectBank ldrb r3, [r0] movs r0, 0x58 adds r2, r3, 0 @@ -5360,7 +5360,7 @@ _08048DFC: bne _08048E50 bl Random ldr r2, =gBattleMons - ldr r1, =gUnknown_0202420E + ldr r1, =gEffectBank ldrb r3, [r1] movs r1, 0x58 muls r3, r1 @@ -5376,7 +5376,7 @@ _08048DFC: .pool _08048E50: ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420E + ldr r0, =gEffectBank ldrb r1, [r0] movs r0, 0x58 muls r1, r0 @@ -5395,7 +5395,7 @@ _08048E64: ldr r0, [r0] str r0, [r2] ldr r4, =gActiveBank - ldr r1, =gUnknown_0202420E + ldr r1, =gEffectBank ldrb r0, [r1] strb r0, [r4] ldrb r1, [r1] @@ -5408,9 +5408,9 @@ _08048E64: movs r1, 0x28 movs r2, 0 movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r2, =gHitMarker ldr r1, [r2] movs r0, 0x80 @@ -5777,7 +5777,7 @@ _0804925A: strb r0, [r4, 0x3] movs r0, 0 movs r1, 0 - bl sub_8048760 + bl SetMoveEffect b _080499B2 .pool _0804927C: @@ -6131,7 +6131,7 @@ _080495A8: ands r0, r1 cmp r0, 0 bne _080495D4 - ldr r0, =gUnknown_020243D0 + ldr r0, =gWishFutureKnock adds r0, 0x29 adds r0, r4, r0 ldrb r1, [r0] @@ -6242,10 +6242,10 @@ _0804967C: movs r1, 0x2 movs r2, 0 movs r3, 0x2 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes mov r2, r10 ldrb r0, [r2] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldrb r0, [r7] strb r0, [r4] ldrb r0, [r7] @@ -6260,9 +6260,9 @@ _0804967C: movs r1, 0x2 movs r2, 0 movs r3, 0x2 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r7] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] adds r0, 0x1 @@ -6368,9 +6368,9 @@ _080497C2: movs r1, 0x28 movs r2, 0 movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] adds r0, 0x1 @@ -6500,7 +6500,7 @@ _08049900: movs r5, 0 movs r1, 0 strh r1, [r0, 0x2E] - ldr r2, =gUnknown_020243D0 + ldr r2, =gWishFutureKnock adds r2, 0x29 adds r2, r4, r2 ldr r3, =gBitTable @@ -6568,7 +6568,7 @@ _080499B8: pop {r0} bx r0 .pool - thumb_func_end sub_8048760 + thumb_func_end SetMoveEffect thumb_func_start atk15_seteffectwithchancetarget atk15_seteffectwithchancetarget: @ 80499D4 @@ -6646,13 +6646,13 @@ _08049A50: _08049A7E: movs r0, 0 movs r1, 0x80 - bl sub_8048760 + bl SetMoveEffect b _08049AA2 .pool _08049A90: movs r0, 0 movs r1, 0 - bl sub_8048760 + bl SetMoveEffect b _08049AA2 _08049A9A: ldr r1, =gBattlescriptCurrInstr @@ -6676,7 +6676,7 @@ atk16_seteffectprimary: @ 8049AC0 push {lr} movs r0, 0x1 movs r1, 0 - bl sub_8048760 + bl SetMoveEffect pop {r0} bx r0 thumb_func_end atk16_seteffectprimary @@ -6686,7 +6686,7 @@ atk17_seteffectsecondary: @ 8049AD0 push {lr} movs r0, 0 movs r1, 0 - bl sub_8048760 + bl SetMoveEffect pop {r0} bx r0 thumb_func_end atk17_seteffectsecondary @@ -7006,9 +7006,9 @@ _08049D34: movs r0, 0 movs r2, 0 movs r3, 0x1 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r5] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattleTextBuff1 movs r0, 0xFD strb r0, [r1] @@ -7066,7 +7066,7 @@ atk1A_faint_animation: @ 8049E40 movs r0, 0 bl dp01_build_cmdbuf_x0A_A_A_A ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r5] adds r0, 0x2 str r0, [r5] @@ -7122,9 +7122,9 @@ _08049EB4: movs r1, 0x28 movs r2, 0 movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _08049EDC: bl sub_803A75C ldr r1, =gBattlescriptCurrInstr @@ -7665,7 +7665,7 @@ atk23_getexp: @ 804A32C ldr r0, [r0] ldrb r0, [r0, 0x1] bl get_battle_side_of_something - ldr r1, =gUnknown_0202420D + ldr r1, =gBank1 strb r0, [r1] ldr r2, =gUnknown_020243FE movs r1, 0x2 @@ -7697,7 +7697,7 @@ _0804A38C: .4byte _0804AC40 .4byte _0804AC88 _0804A3A8: - ldr r4, =gUnknown_0202420D + ldr r4, =gBank1 ldrb r0, [r4] bl GetBankSide lsls r0, 24 @@ -7792,7 +7792,7 @@ _0804A486: ble _0804A418 ldr r3, =gBaseStats ldr r2, =gBattleMons - ldr r0, =gUnknown_0202420D + ldr r0, =gBank1 ldrb r1, [r0] movs r0, 0x58 muls r1, r0 @@ -8183,7 +8183,7 @@ _0804A78E: ldr r1, =gPlayerParty adds r0, r1 ldr r3, =gBattleMons - ldr r1, =gUnknown_0202420D + ldr r1, =gBank1 ldrb r2, [r1] movs r1, 0x58 muls r1, r2 @@ -8299,7 +8299,7 @@ _0804A85A: movs r0, 0 bl dp01_build_cmdbuf_x19_a_bb ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0804A92A: ldr r1, =gBattleScripting ldrb r0, [r1, 0x1C] @@ -8672,7 +8672,7 @@ _0804AC88: cmp r5, 0 bne _0804ACB2 ldr r4, =gBattleMons - ldr r2, =gUnknown_0202420D + ldr r2, =gBank1 ldrb r0, [r2] movs r1, 0x58 muls r0, r1 @@ -9941,7 +9941,7 @@ _0804B624: bl dp01_build_cmdbuf_x18_0_aa_health_bar_update ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] adds r0, 0x2 @@ -10192,7 +10192,7 @@ _0804B822: bl dp01_build_cmdbuf_x34_a_bb_aka_battle_anim ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r4] adds r0, 0x7 str r0, [r4] @@ -10235,7 +10235,7 @@ _0804B894: movs r0, 0 bl dp01_build_cmdbuf_x34_a_bb_aka_battle_anim ldrb r0, [r6] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r5] adds r0, 0x7 _0804B8A8: @@ -10291,7 +10291,7 @@ _0804B8FA: bl dp01_build_cmdbuf_x34_a_bb_aka_battle_anim ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] adds r0, 0xA @@ -10333,7 +10333,7 @@ _0804B960: movs r0, 0 bl dp01_build_cmdbuf_x34_a_bb_aka_battle_anim ldrb r0, [r7] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r6] _0804B972: adds r0, 0xA @@ -10613,7 +10613,7 @@ _0804BB6C: bl dp01_build_cmdbuf_x34_a_bb_aka_battle_anim ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r1, [r0, 0x3] @@ -10720,7 +10720,7 @@ _0804BC68: movs r1, 0x1 bl dp01_build_cmdbuf_x33_a_33_33 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0804C15A .pool _0804BC80: @@ -10730,7 +10730,7 @@ _0804BC80: movs r1, 0 bl dp01_build_cmdbuf_x33_a_33_33 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldrb r1, [r6] lsls r1, 2 adds r1, r5 @@ -10986,9 +10986,9 @@ _0804BEBA: movs r1, 0x28 movs r2, 0 movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution bl b_movescr_stack_push_cursor ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DB282 @@ -11177,7 +11177,7 @@ _0804C088: movs r0, 0x3 movs r1, 0 movs r2, 0 - bl berry_effects_maybe + bl ItemBattleEffects lsls r0, 24 cmp r0, 0 beq _0804C184 @@ -11191,7 +11191,7 @@ _0804C0A8: movs r0, 0x4 movs r1, 0 movs r2, 0 - bl berry_effects_maybe + bl ItemBattleEffects _0804C0B2: lsls r0, 24 cmp r0, 0 @@ -11254,7 +11254,7 @@ _0804C120: movs r1, 0 bl dp01_build_cmdbuf_x33_a_33_33 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, =gStatuses3 ldrb r2, [r5] lsls r2, 2 @@ -12061,7 +12061,7 @@ atk4B_return_atk_to_ball: @ 804C844 movs r1, 0 bl dp01_build_cmdbuf_x06_a ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0804C872: ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] @@ -12108,7 +12108,7 @@ atk4C_copy_poke_data: @ 804C894 movs r1, 0 bl dp01_build_cmdbuf_x00_a_b_0 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r5] adds r0, 0x2 str r0, [r5] @@ -12206,7 +12206,7 @@ _0804C93E: bl GetBankSide lsls r0, 24 lsrs r2, r0, 24 - ldr r0, =gUnknown_020243D0 + ldr r0, =gWishFutureKnock adds r0, 0x29 adds r0, r2, r0 ldrb r1, [r0] @@ -12401,7 +12401,7 @@ _0804CB3E: movs r0, 0 bl dp01_build_cmdbuf_x05_a_b_c ldrb r0, [r5] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r4] adds r0, 0x3 str r0, [r4] @@ -12864,7 +12864,7 @@ sub_804CF10: @ 804CF10 movs r3, 0 bl dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f ldrb r0, [r5] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution add sp, 0x4 pop {r4,r5} pop {r0} @@ -12959,7 +12959,7 @@ _0804CFE2: movs r2, 0 bl sub_8034464 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0804D098 .pool _0804D054: @@ -12992,7 +12992,7 @@ _0804D088: movs r2, 0 bl sub_8034464 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0804D098: ldrb r0, [r4] adds r0, 0x1 @@ -13049,7 +13049,7 @@ _0804D0B8: movs r0, 0 bl dp01_build_cmdbuf_x2A_2A_2A_2A ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0804D170 .pool _0804D120: @@ -13085,7 +13085,7 @@ _0804D15C: movs r2, 0 bl sub_8034464 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution movs r0, 0x1 mov r9, r0 _0804D170: @@ -13128,7 +13128,7 @@ _0804D170: movs r0, 0 bl dp01_build_cmdbuf_x2A_2A_2A_2A ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0804D22E .pool _0804D1D8: @@ -13169,7 +13169,7 @@ _0804D214: movs r2, 0 bl sub_8034464 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0804D22E: ldr r6, =gBitTable ldr r0, [r6, 0x4] @@ -13206,7 +13206,7 @@ _0804D22E: movs r0, 0 bl dp01_build_cmdbuf_x2A_2A_2A_2A ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0804D2E4 .pool _0804D290: @@ -13242,7 +13242,7 @@ _0804D2CC: movs r2, 0 bl sub_8034464 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution movs r0, 0x2 mov r2, r9 orrs r2, r0 @@ -13287,7 +13287,7 @@ _0804D2E4: movs r0, 0 bl dp01_build_cmdbuf_x2A_2A_2A_2A ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0804D3A2 .pool _0804D34C: @@ -13328,7 +13328,7 @@ _0804D388: movs r2, 0 bl sub_8034464 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0804D3A2: ldr r1, =gSpecialStatuses ldrb r0, [r1] @@ -13365,7 +13365,7 @@ _0804D3E8: bl sub_8034464 ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0804D3FA: ldr r1, =gSpecialStatuses ldrb r0, [r1, 0x14] @@ -13402,7 +13402,7 @@ _0804D43C: bl sub_8034464 ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0804D450: ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] @@ -13471,7 +13471,7 @@ _0804D482: movs r0, 0 bl dp01_build_cmdbuf_x2A_2A_2A_2A ldrb r0, [r6] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0804D52A .pool _0804D4F8: @@ -13542,7 +13542,7 @@ _0804D52A: movs r0, 0 bl dp01_build_cmdbuf_x2A_2A_2A_2A ldrb r0, [r5] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0804D5DA .pool _0804D5A8: @@ -13585,7 +13585,7 @@ _0804D5F8: ldr r0, =gHitMarker ldr r0, [r0] lsrs r5, r0, 28 - ldr r1, =gUnknown_0202420D + ldr r1, =gBank1 movs r0, 0 strb r0, [r1] ldr r4, =gBitTable @@ -13731,7 +13731,7 @@ _0804D6E0: movs r3, 0 bl dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r6] adds r0, 0x6 str r0, [r6] @@ -13770,7 +13770,7 @@ _0804D77C: movs r2, 0 bl sub_8034464 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0804D792: ldrb r0, [r4] adds r0, 0x1 @@ -13812,7 +13812,7 @@ _0804D7F4: movs r2, 0 bl sub_8034464 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0804D804: add sp, 0x4 pop {r3,r4} @@ -14340,7 +14340,7 @@ _0804DC88: ldrb r1, [r5] movs r0, 0 movs r2, 0 - bl berry_effects_maybe + bl ItemBattleEffects lsls r0, 24 cmp r0, 0 bne _0804DD8E @@ -14414,7 +14414,7 @@ _0804DD0C: ldr r0, =gHitMarker ldr r0, [r0] lsrs r4, r0, 28 - ldr r1, =gUnknown_0202420D + ldr r1, =gBank1 ldrb r0, [r1] adds r0, 0x1 strb r0, [r1] @@ -14471,7 +14471,7 @@ atk53_trainer_slide: @ 804DDA8 movs r0, 0 bl dp01_build_cmdbuf_x08_8_8_8 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r5] adds r0, 0x2 str r0, [r5] @@ -14497,7 +14497,7 @@ atk54_effectiveness_sound: @ 804DDD8 movs r0, 0 bl dp01_build_cmdbuf_x2B_aa_0 ldrb r0, [r5] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r4] adds r0, 0x3 str r0, [r4] @@ -14524,7 +14524,7 @@ atk55_play_sound: @ 804DE14 movs r2, 0 bl sub_8034300 ldrb r0, [r5] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r4] adds r0, 0x3 str r0, [r4] @@ -14546,7 +14546,7 @@ atk56_fainting_cry: @ 804DE50 movs r0, 0 bl dp01_build_cmdbuf_x2D_2D_2D_2D ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r5] adds r0, 0x2 str r0, [r5] @@ -14568,7 +14568,7 @@ atk57: @ 804DE80 movs r0, 0 bl dp01_build_cmdbuf_x37_a ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] adds r0, 0x1 @@ -14592,7 +14592,7 @@ atk58_return_to_ball: @ 804DEB8 movs r1, 0x1 bl dp01_build_cmdbuf_x06_a ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r5] adds r0, 0x2 str r0, [r5] @@ -15327,7 +15327,7 @@ _0804E55A: bl dp01_build_cmdbuf_x29_29_29_29 ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] adds r0, 0x2 @@ -15596,7 +15596,7 @@ _0804E794: movs r2, 0 bl dp01_build_cmdbuf_x00_a_b_0 ldrb r0, [r6] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldrb r0, [r5] adds r0, 0x1 strb r0, [r5] @@ -15786,7 +15786,7 @@ _0804E926: bl dp01_build_cmdbuf_x30_TODO ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] adds r0, 0x2 @@ -15813,7 +15813,7 @@ atk62_08025C6C: @ 804E960 movs r0, 0 bl dp01_build_cmdbuf_x31_31_31_31 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r5] adds r0, 0x2 str r0, [r5] @@ -15911,7 +15911,7 @@ atk64_statusanimation: @ 804E9F4 movs r1, 0 bl dp01_build_cmdbuf_x1B_aaaa_b ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0804EA54: ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] @@ -15982,7 +15982,7 @@ atk65_status2animation: @ 804EA84 movs r1, 0x1 bl dp01_build_cmdbuf_x1B_aaaa_b ldrb r0, [r5] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0804EAFC: ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] @@ -16046,7 +16046,7 @@ atk66_chosenstatusanimation: @ 804EB2C movs r0, 0 bl dp01_build_cmdbuf_x1B_aaaa_b ldrb r0, [r5] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0804EB96: ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] @@ -16392,9 +16392,9 @@ atk6A_removeitem: @ 804EE58 movs r1, 0x2 movs r2, 0 movs r3, 0x2 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r5] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r6] adds r0, 0x2 str r0, [r6] @@ -17139,7 +17139,7 @@ atk6F_set_visible: @ 804F50C movs r1, 0 bl dp01_build_cmdbuf_x33_a_33_33 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r5] adds r0, 0x2 str r0, [r5] @@ -17208,7 +17208,7 @@ atk71_buffer_move_to_learn: @ 804F59C thumb_func_start atk72_jump_if_can_run_frombattle atk72_jump_if_can_run_frombattle: @ 804F5B4 push {lr} - ldr r0, =gUnknown_0202420D + ldr r0, =gBank1 ldrb r0, [r0] bl sub_803EC20 lsls r0, 24 @@ -17905,7 +17905,7 @@ _0804FC18: bl sub_8033E10 ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0804FD70 .pool _0804FC2C: @@ -17969,7 +17969,7 @@ _0804FCA2: movs r1, 0 bl dp01_build_cmdbuf_x06_a ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _0804FD70 .pool _0804FCC4: @@ -18038,7 +18038,7 @@ _0804FD5C: bl sub_8034300 ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _0804FD70: ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] @@ -18253,7 +18253,7 @@ _0804FF14: movs r0, 0 bl dp01_build_cmdbuf_x18_0_aa_health_bar_update ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] adds r0, 0x1 @@ -18340,9 +18340,9 @@ atk79_setatkhptozero: @ 804FFE4 movs r1, 0x2A movs r2, 0 movs r3, 0x2 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] adds r0, 0x1 @@ -18672,7 +18672,7 @@ _080502F4: strh r0, [r2] ldr r0, =gBattleCommunication strb r1, [r0, 0x5] - ldr r0, =gUnknown_020243D0 + ldr r0, =gWishFutureKnock adds r0, 0x28 movs r1, 0x5 strb r1, [r0] @@ -19010,9 +19010,9 @@ _080505B8: movs r1, 0x28 movs r2, 0 movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r7] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] adds r0, 0x5 @@ -19072,8 +19072,8 @@ atk83_nop: @ 8050640 .pool thumb_func_end atk83_nop - thumb_func_start sub_8050650 -sub_8050650: @ 8050650 + thumb_func_start UproarWakeUpCheck +UproarWakeUpCheck: @ 8050650 push {r4-r7,lr} mov r7, r8 push {r7} @@ -19148,7 +19148,7 @@ _080506E2: pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_8050650 + thumb_func_end UproarWakeUpCheck thumb_func_start atk84_jump_if_cant_sleep atk84_jump_if_cant_sleep: @ 80506EC @@ -19167,7 +19167,7 @@ atk84_jump_if_cant_sleep: @ 80506EC orrs r4, r0 ldr r6, =gBankTarget ldrb r0, [r6] - bl sub_8050650 + bl UproarWakeUpCheck lsls r0, 24 cmp r0, 0 beq _08050720 @@ -20133,7 +20133,7 @@ atk8B_setbide: @ 8050F40 ldrh r1, [r1] movs r2, 0 strh r1, [r0] - ldr r1, =gUnknown_020241F8 + ldr r1, =gTakenDmg ldrb r0, [r3] lsls r0, 2 adds r0, r1 @@ -21477,7 +21477,7 @@ _08051AEC: ldr r1, =gBattleCommunication movs r0, 0x3 strb r0, [r1, 0x5] - ldr r0, =gUnknown_020243D0 + ldr r0, =gWishFutureKnock adds r0, 0x28 movs r1, 0x5 strb r1, [r0] @@ -21878,7 +21878,7 @@ atk98_status_icon_update: @ 8051E48 movs r0, 0 bl dp01_build_cmdbuf_x1A_aaaa_bbbb ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r5] adds r0, 0x2 str r0, [r5] @@ -21912,7 +21912,7 @@ _08051EA0: movs r0, 0 bl dp01_build_cmdbuf_x1A_aaaa_bbbb ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _08051EDC: ldr r0, =gBattleTypeFlags ldr r0, [r0] @@ -21949,7 +21949,7 @@ _08051EDC: movs r0, 0 bl dp01_build_cmdbuf_x1A_aaaa_bbbb ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _08051F2C: ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] @@ -22251,7 +22251,7 @@ _080521CA: bl dp01_build_cmdbuf_x38_a mov r2, r8 ldrb r0, [r2] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattleCommunication movs r0, 0 _080521EC: @@ -23769,10 +23769,10 @@ _08052E7A: movs r1, 0x3 movs r2, 0 movs r3, 0x10 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattleTextBuff1 movs r0, 0xFD strb r0, [r1] @@ -24378,9 +24378,9 @@ _08053304: movs r0, 0 movs r2, 0 movs r3, 0x1 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _080533B8: ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] @@ -24723,9 +24723,9 @@ _080536BC: movs r0, 0 movs r1, 0x28 movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _080536DE: ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] @@ -25708,7 +25708,7 @@ _08053F2A: lsls r0, 31 cmp r0, 0 bne _08054030 - ldr r0, =gUnknown_02024274 + ldr r0, =gChosenMovesByBanks lsls r1, r3, 1 adds r1, r0 ldrh r0, [r1] @@ -25824,7 +25824,7 @@ _08054088: ldr r1, =gBattleCommunication movs r0, 0x4 strb r0, [r1, 0x5] - ldr r0, =gUnknown_020243D0 + ldr r0, =gWishFutureKnock adds r0, 0x28 movs r1, 0x5 strb r1, [r0] @@ -26413,7 +26413,7 @@ atkC3_setfutureattack: @ 8054598 mov r5, r8 push {r5-r7} sub sp, 0x14 - ldr r0, =gUnknown_020243D0 + ldr r0, =gWishFutureKnock mov r8, r0 ldr r6, =gBankTarget ldrb r1, [r6] @@ -26965,7 +26965,7 @@ _08054A78: ldr r0, =gBattleCommunication movs r1, 0x5 strb r1, [r0, 0x5] - ldr r0, =gUnknown_020243D0 + ldr r0, =gWishFutureKnock adds r0, 0x28 strb r1, [r0] _08054A86: @@ -27031,7 +27031,7 @@ _08054AF4: movs r0, 0 bl dp01_build_cmdbuf_x18_0_aa_health_bar_update ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] adds r0, 0x5 @@ -27202,9 +27202,9 @@ atkCD_cureifburnedparalysedorpoisoned: @ 8054C60 movs r1, 0x28 movs r2, 0 movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution b _08054CD6 .pool _08054CBC: @@ -27492,7 +27492,7 @@ _08054EE8: ands r0, r1 cmp r0, 0 bne _08054F46 - ldr r0, =gUnknown_020243D0 + ldr r0, =gWishFutureKnock adds r2, r0, 0 adds r2, 0x29 adds r0, r4, r2 @@ -27633,10 +27633,10 @@ _08055010: movs r1, 0x2 movs r2, 0 movs r3, 0x2 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldr r1, =gBankAttacker ldrb r0, [r1] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldrb r0, [r7] strb r0, [r4] ldrb r0, [r7] @@ -27649,9 +27649,9 @@ _08055010: movs r1, 0x2 movs r2, 0 movs r3, 0x2 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r7] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldrb r0, [r7] mov r2, r10 ldr r1, [r2] @@ -27813,7 +27813,7 @@ atkD4_wish_effect: @ 80551C0 b _0805528C .pool _080551D8: - ldr r1, =gUnknown_020243D0 + ldr r1, =gWishFutureKnock ldr r4, =gBankAttacker adds r0, r1, 0 adds r0, 0x20 @@ -27845,7 +27845,7 @@ _08055210: ldr r4, =gBankTarget ldrb r0, [r4] strb r0, [r1, 0x2] - ldr r0, =gUnknown_020243D0 + ldr r0, =gWishFutureKnock adds r0, 0x24 ldrb r5, [r4] adds r0, r5 @@ -28875,9 +28875,9 @@ atkE2_switchout_abilities: @ 8055A78 movs r0, 0 movs r1, 0x28 movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _08055AD2: ldr r0, [r5] adds r0, 0x2 @@ -29276,7 +29276,7 @@ _08055E2C: movs r1, 0 bl dp01_build_cmdbuf_x34_a_bb_aka_battle_anim ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] adds r0, 0x1 @@ -29529,9 +29529,9 @@ atkEA_recycleitem: @ 8056014 movs r1, 0x2 movs r2, 0 movs r3, 0x2 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r7] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] adds r0, 0x5 @@ -29676,7 +29676,7 @@ atkEC_pursuit_sth: @ 805616C ldrb r0, [r0] cmp r0, 0 bne _0805620C - ldr r1, =gUnknown_02024274 + ldr r1, =gChosenMovesByBanks lsls r0, r3, 1 adds r0, r1 ldrh r2, [r0] @@ -29725,7 +29725,7 @@ _08056226: thumb_func_start atkED_802B4B4 atkED_802B4B4: @ 8056230 push {r4,lr} - ldr r1, =gUnknown_0202420E + ldr r1, =gEffectBank ldr r3, =gBankAttacker ldrb r0, [r3] strb r0, [r1] @@ -29841,7 +29841,7 @@ _0805630E: movs r1, 0x5 bl dp01_build_cmdbuf_x0D_a ldrb r0, [r5] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DBE02 b _08056694 @@ -29856,7 +29856,7 @@ _0805635C: movs r1, 0x4 bl dp01_build_cmdbuf_x0D_a ldrb r0, [r5] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DBDCA b _08056694 @@ -30082,7 +30082,7 @@ _08056564: bl dp01_build_cmdbuf_x0D_a ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DBD84 str r0, [r1] @@ -30148,7 +30148,7 @@ _08056614: bl dp01_build_cmdbuf_x0D_a ldr r0, =gActiveBank ldrb r0, [r0] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution cmp r4, 0x4 bne _0805668C ldr r1, =gBattlescriptCurrInstr @@ -31146,7 +31146,7 @@ sub_8056EF8: @ 8056EF8 movs r0, 0 bl dp01_build_cmdbuf_x09_9_9_9 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution ldr r0, [r5] adds r0, 0x2 str r0, [r5] diff --git a/asm/battle_5.s b/asm/battle_5.s index 064171dd8..3db603531 100644 --- a/asm/battle_5.s +++ b/asm/battle_5.s @@ -398,7 +398,7 @@ _0805729A: cmp r0, 0 beq _08057372 mov r0, r9 - bl sub_8050650 + bl UproarWakeUpCheck lsls r0, 24 cmp r0, 0 beq _080572FC @@ -419,7 +419,7 @@ _0805729A: mov r2, r10 strb r0, [r2, 0x5] ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB220 + ldr r0, =BattleScript_MoveUsedWokeUp str r0, [r1] movs r0, 0x2 mov r8, r0 @@ -461,7 +461,7 @@ _08057322: cmp r4, 0 beq _08057354 ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB213 + ldr r0, =BattleScript_MoveUsedIsAsleep str r0, [r1] movs r1, 0x2 mov r8, r1 @@ -478,7 +478,7 @@ _08057354: ldr r0, =gBattleCommunication strb r4, [r0, 0x5] ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB220 + ldr r0, =BattleScript_MoveUsedWokeUp str r0, [r1] movs r2, 0x2 mov r8, r2 @@ -513,7 +513,7 @@ _08057390: cmp r5, 0 beq _080573D4 ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB26A + ldr r0, =BattleScript_MoveUsedIsFrozen str r0, [r1] b _080573EC .pool @@ -525,7 +525,7 @@ _080573D4: str r0, [r4] bl b_movescr_stack_push_cursor ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB277 + ldr r0, =BattleScript_MoveUsedUnfroze str r0, [r1] mov r0, r10 strb r5, [r0, 0x5] @@ -562,9 +562,9 @@ _08057406: movs r1, 0x28 movs r2, 0 movs r3, 0x4 - bl dp01_build_cmdbuf_x02_a_b_varargs + bl EmitSetAttributes ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution _08057430: mov r0, r8 add sp, 0x4 diff --git a/asm/battle_anim_80FE840.s b/asm/battle_anim_80FE840.s index fc2c36fc8..f35b2f7da 100644 --- a/asm/battle_anim_80FE840.s +++ b/asm/battle_anim_80FE840.s @@ -50069,7 +50069,7 @@ sub_8117E94: @ 8117E94 ldrb r1, [r1] strb r1, [r2] ldr r2, =gAnimationBankTarget - ldr r1, =gUnknown_0202420E + ldr r1, =gEffectBank ldrb r1, [r1] strb r1, [r2] bl move_anim_task_del @@ -50136,7 +50136,7 @@ sub_8117F30: @ 8117F30 ldrb r1, [r1] strb r1, [r2] ldr r2, =gAnimationBankTarget - ldr r1, =gUnknown_0202420E + ldr r1, =gEffectBank ldrb r1, [r1] strb r1, [r2] bl move_anim_task_del diff --git a/asm/battle_anim_8170478.s b/asm/battle_anim_8170478.s index c64dd69e5..abbca8ff7 100644 --- a/asm/battle_anim_8170478.s +++ b/asm/battle_anim_8170478.s @@ -5069,7 +5069,7 @@ sub_8172ED0: @ 8172ED0 lsls r0, 24 lsrs r0, 24 ldr r2, =gAnimationBankTarget - ldr r1, =gUnknown_0202420E + ldr r1, =gEffectBank ldrb r1, [r1] strb r1, [r2] bl move_anim_task_del diff --git a/asm/battle_message.s b/asm/battle_message.s index dec210b25..4688a5add 100644 --- a/asm/battle_message.s +++ b/asm/battle_message.s @@ -1349,7 +1349,7 @@ _0814ED5E: bl _0814F5BE .pool _0814ED70: - ldr r5, =gUnknown_0202420E + ldr r5, =gEffectBank ldrb r0, [r5] bl GetBankSide lsls r0, 24 @@ -1695,7 +1695,7 @@ _0814F0A8: .pool _0814F0B8: ldr r1, =gAbilitiesPerBank - ldr r0, =gUnknown_0202420E + ldr r0, =gEffectBank _0814F0BC: ldrb r0, [r0] _0814F0BE: diff --git a/asm/pokemon_item_effect.s b/asm/pokemon_item_effect.s index 137f7a5c0..c798d7753 100644 --- a/asm/pokemon_item_effect.s +++ b/asm/pokemon_item_effect.s @@ -1157,7 +1157,7 @@ _0806C6AE: movs r2, 0 bl dp01_build_cmdbuf_x00_a_b_0 ldrb r0, [r4] - bl dp01_battle_side_mark_buffer_for_execution + bl MarkBufferBankForExecution strb r5, [r4] b _0806C6EC .pool diff --git a/asm/recorded_battle.s b/asm/recorded_battle.s index 53824dfea..94d96b2f8 100644 --- a/asm/recorded_battle.s +++ b/asm/recorded_battle.s @@ -2599,7 +2599,7 @@ _081863A2: ldr r2, [sp, 0x40] bl SetMonData _081863CA: - ldr r2, =gUnknown_02024274 + ldr r2, =gChosenMovesByBanks ldr r3, [sp, 0x44] adds r2, r3, r2 ldr r0, =gBattleStruct diff --git a/asm/rom3.s b/asm/rom3.s index e2f268f43..c3a730836 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -1573,7 +1573,7 @@ _08033346: ldrsh r1, [r0, r2] ldr r0, [r4] adds r1, r0 - ldr r0, =gUnknown_0202420E + ldr r0, =gEffectBank ldrb r0, [r0] strb r0, [r1, 0x7] movs r2, 0 @@ -2084,7 +2084,7 @@ _080337D2: adds r0, r1 ldrb r0, [r0, 0x6] strb r0, [r2] - ldr r2, =gUnknown_0202420E + ldr r2, =gEffectBank movs r4, 0x26 ldrsh r0, [r5, r4] adds r0, r1 @@ -2175,8 +2175,8 @@ dp01_build_cmdbuf_x01_a_b_0: @ 80338D8 .pool thumb_func_end dp01_build_cmdbuf_x01_a_b_0 - thumb_func_start dp01_build_cmdbuf_x02_a_b_varargs -dp01_build_cmdbuf_x02_a_b_varargs: @ 8033900 + thumb_func_start EmitSetAttributes +EmitSetAttributes: @ 8033900 push {r4-r6,lr} ldr r4, [sp, 0x10] lsls r0, 24 @@ -2209,7 +2209,7 @@ _0803392E: pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x02_a_b_varargs + thumb_func_end EmitSetAttributes thumb_func_start sub_8033940 sub_8033940: @ 8033940 diff --git a/asm/rom_817C95C.s b/asm/rom_817C95C.s index a08d34cad..94ae7ad7f 100644 --- a/asm/rom_817C95C.s +++ b/asm/rom_817C95C.s @@ -44,7 +44,7 @@ _0817C988: bl GetBankSide lsls r0, 24 lsrs r6, r0, 24 - ldr r0, =gUnknown_0202420E + ldr r0, =gEffectBank ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -145,7 +145,7 @@ _0817CA9C: bl GetBankIdentity lsls r0, 24 lsrs r5, r0, 25 - ldr r0, =gUnknown_0202420E + ldr r0, =gEffectBank ldrb r0, [r0] bl GetBankIdentity lsls r0, 24 @@ -1302,7 +1302,7 @@ _0817D6F2: bl _0817E0A6 _0817D704: ldr r5, =gBattlePartyID - ldr r6, =gUnknown_0202420E + ldr r6, =gEffectBank ldrb r0, [r6] lsls r0, 1 adds r0, r5 @@ -1396,7 +1396,7 @@ _0817D7B2: .pool _0817D7D8: ldr r5, =gBattlePartyID - ldr r6, =gUnknown_0202420E + ldr r6, =gEffectBank ldrb r0, [r6] lsls r0, 1 adds r0, r5 @@ -1440,7 +1440,7 @@ _0817D7D8: .pool _0817D838: ldr r5, =gBattlePartyID - ldr r6, =gUnknown_0202420E + ldr r6, =gEffectBank ldrb r0, [r6] lsls r0, 1 adds r0, r5 @@ -1628,7 +1628,7 @@ _0817D9AE: b _0817E086 _0817D9C2: ldr r5, =gBattlePartyID - ldr r6, =gUnknown_0202420E + ldr r6, =gEffectBank ldrb r0, [r6] lsls r0, 1 adds r0, r5 @@ -1703,7 +1703,7 @@ _0817DA48: .pool _0817DA68: ldr r5, =gBattlePartyID - ldr r6, =gUnknown_0202420E + ldr r6, =gEffectBank ldrb r0, [r6] lsls r0, 1 adds r0, r5 @@ -1791,7 +1791,7 @@ _0817DB10: .pool _0817DB24: ldr r5, =gBattlePartyID - ldr r6, =gUnknown_0202420E + ldr r6, =gEffectBank ldrb r0, [r6] lsls r0, 1 adds r0, r5 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index da05b9367..48669befb 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -21,7 +21,7 @@ gUnknown_082D8CD4:: @ 82D8CD4 gUnknown_082D8D65:: @ 82D8D65 .incbin "baserom.gba", 0x2d8d65, 0x6fd -gUnknown_082D9462:: @ 82D9462 +BattleScript_MoveUsedMustRecharge:: @ 82D9462 .incbin "baserom.gba", 0x2d9462, 0xa7f gUnknown_082D9EE1:: @ 82D9EE1 @@ -120,16 +120,16 @@ gUnknown_082DACFA:: @ 82DACFA gUnknown_082DAD0B:: @ 82DAD0B .incbin "baserom.gba", 0x2dad0b, 0xa -gUnknown_082DAD15:: @ 82DAD15 +BattleScript_LeechSeedTurnDrain:: @ 82DAD15 .incbin "baserom.gba", 0x2dad15, 0x5c -gUnknown_082DAD71:: @ 82DAD71 +BattleScript_BideStoringEnergy:: @ 82DAD71 .incbin "baserom.gba", 0x2dad71, 0xb -gUnknown_082DAD7C:: @ 82DAD7C +BattleScript_BideAttack:: @ 82DAD7C .incbin "baserom.gba", 0x2dad7c, 0x48 -gUnknown_082DADC4:: @ 82DADC4 +BattleScript_BideNoEnergyToAttack:: @ 82DADC4 .incbin "baserom.gba", 0x2dadc4, 0x14 gUnknown_082DADD8:: @ 82DADD8 @@ -141,19 +141,19 @@ gUnknown_082DAE03:: @ 82DAE03 gUnknown_082DAE0D:: @ 82DAE0D .incbin "baserom.gba", 0x2dae0d, 0x7 -gUnknown_082DAE14:: @ 82DAE14 +BattleScript_MoveUsedIsDisabled:: @ 82DAE14 .incbin "baserom.gba", 0x2dae14, 0xb gUnknown_082DAE1F:: @ 82DAE1F .incbin "baserom.gba", 0x2dae1f, 0x4 -gUnknown_082DAE23:: @ 82DAE23 +BattleScript_DisabledNoMore:: @ 82DAE23 .incbin "baserom.gba", 0x2dae23, 0x7 gUnknown_082DAE2A:: @ 82DAE2A .incbin "baserom.gba", 0x2dae2a, 0xd -gUnknown_082DAE37:: @ 82DAE37 +BattleScript_EncoredNoMore:: @ 82DAE37 .incbin "baserom.gba", 0x2dae37, 0x7 gUnknown_082DAE3E:: @ 82DAE3E @@ -192,7 +192,7 @@ gUnknown_082DAFDD:: @ 82DAFDD gUnknown_082DAFE4:: @ 82DAFE4 .incbin "baserom.gba", 0x2dafe4, 0x8e -gUnknown_082DB072:: @ 82DB072 +BattleScript_NoMovesLeft:: @ 82DB072 .incbin "baserom.gba", 0x2db072, 0x4 gUnknown_082DB076:: @ 82DB076 @@ -210,16 +210,16 @@ gUnknown_082DB098:: @ 82DB098 gUnknown_082DB0A0:: @ 82DB0A0 .incbin "baserom.gba", 0x2db0a0, 0x4 -gUnknown_082DB0A4:: @ 82DB0A4 +BattleScript_MoveUsedIsTaunted:: @ 82DB0A4 .incbin "baserom.gba", 0x2db0a4, 0xb gUnknown_082DB0AF:: @ 82DB0AF .incbin "baserom.gba", 0x2db0af, 0x8 -gUnknown_082DB0B7:: @ 82DB0B7 +BattleScript_WishComesTrue:: @ 82DB0B7 .incbin "baserom.gba", 0x2db0b7, 0x37 -gUnknown_082DB0EE:: @ 82DB0EE +BattleScript_IngrainTurnHeal:: @ 82DB0EE .incbin "baserom.gba", 0x2db0ee, 0x29 gUnknown_082DB117:: @ 82DB117 @@ -228,7 +228,7 @@ gUnknown_082DB117:: @ 82DB117 gUnknown_082DB168:: @ 82DB168 .incbin "baserom.gba", 0x2db168, 0xe -gUnknown_082DB176:: @ 82DB176 +BattleScript_MoveUsedIsImprisoned:: @ 82DB176 .incbin "baserom.gba", 0x2db176, 0xb gUnknown_082DB181:: @ 82DB181 @@ -258,73 +258,73 @@ gUnknown_082DB1D5:: @ 82DB1D5 gUnknown_082DB1FF:: @ 82DB1FF .incbin "baserom.gba", 0x2db1ff, 0x14 -gUnknown_082DB213:: @ 82DB213 +BattleScript_MoveUsedIsAsleep:: @ 82DB213 .incbin "baserom.gba", 0x2db213, 0xd -gUnknown_082DB220:: @ 82DB220 +BattleScript_MoveUsedWokeUp:: @ 82DB220 .incbin "baserom.gba", 0x2db220, 0x14 gUnknown_082DB234:: @ 82DB234 .incbin "baserom.gba", 0x2db234, 0x9 -gUnknown_082DB23D:: @ 82DB23D +BattleScript_PoisonTurnDmg:: @ 82DB23D .incbin "baserom.gba", 0x2db23d, 0x22 -gUnknown_082DB25F:: @ 82DB25F +BattleScript_BurnTurnDmg:: @ 82DB25F .incbin "baserom.gba", 0x2db25f, 0xb -gUnknown_082DB26A:: @ 82DB26A +BattleScript_MoveUsedIsFrozen:: @ 82DB26A .incbin "baserom.gba", 0x2db26a, 0xd -gUnknown_082DB277:: @ 82DB277 +BattleScript_MoveUsedUnfroze:: @ 82DB277 .incbin "baserom.gba", 0x2db277, 0xb gUnknown_082DB282:: @ 82DB282 .incbin "baserom.gba", 0x2db282, 0x9 -gUnknown_082DB28B:: @ 82DB28B +BattleScript_MoveUsedIsParalyzed:: @ 82DB28B .incbin "baserom.gba", 0x2db28b, 0x10 -gUnknown_082DB29B:: @ 82DB29B +BattleScript_MoveUsedFlinched:: @ 82DB29B .incbin "baserom.gba", 0x2db29b, 0xb gUnknown_082DB2A6:: @ 82DB2A6 .incbin "baserom.gba", 0x2db2a6, 0x9 -gUnknown_082DB2AF:: @ 82DB2AF +BattleScript_ThrashConfuses:: @ 82DB2AF .incbin "baserom.gba", 0x2db2af, 0xe -gUnknown_082DB2BD:: @ 82DB2BD +BattleScript_MoveUsedIsConfused:: @ 82DB2BD .incbin "baserom.gba", 0x2db2bd, 0x43 -gUnknown_082DB300:: @ 82DB300 +BattleScript_MoveUsedIsConfusedNoMore:: @ 82DB300 .incbin "baserom.gba", 0x2db300, 0x7 gUnknown_082DB307:: @ 82DB307 .incbin "baserom.gba", 0x2db307, 0x7 -gUnknown_082DB30E:: @ 82DB30E +BattleScript_WrapTurnDmg:: @ 82DB30E .incbin "baserom.gba", 0x2db30e, 0x12 -gUnknown_082DB320:: @ 82DB320 +BattleScript_WrapEnds:: @ 82DB320 .incbin "baserom.gba", 0x2db320, 0x7 -gUnknown_082DB327:: @ 82DB327 +BattleScript_MoveUsedIsInLove:: @ 82DB327 .incbin "baserom.gba", 0x2db327, 0xd -gUnknown_082DB334:: @ 82DB334 +BattleScript_MoveUsedIsParalyzedCantAttack:: @ 82DB334 .incbin "baserom.gba", 0x2db334, 0xb -gUnknown_082DB33F:: @ 82DB33F +BattleScript_NightmareTurnDmg:: @ 82DB33F .incbin "baserom.gba", 0x2db33f, 0x11 -gUnknown_082DB350:: @ 82DB350 +BattleScript_CurseTurnDmg:: @ 82DB350 .incbin "baserom.gba", 0x2db350, 0x11 gUnknown_082DB361:: @ 82DB361 .incbin "baserom.gba", 0x2db361, 0x17 -gUnknown_082DB378:: @ 82DB378 +BattleScript_YawnMakesAsleep:: @ 82DB378 .incbin "baserom.gba", 0x2db378, 0xaa gUnknown_082DB422:: @ 82DB422 @@ -441,7 +441,7 @@ gUnknown_082DB695:: @ 82DB695 gUnknown_082DB6A5:: @ 82DB6A5 .incbin "baserom.gba", 0x2db6a5, 0x8 -gUnknown_082DB6AD:: @ 82DB6AD +BattleScript_MoveUsedLoafingAround:: @ 82DB6AD .incbin "baserom.gba", 0x2db6ad, 0x2c gUnknown_082DB6D9:: @ 82DB6D9 diff --git a/include/battle.h b/include/battle.h index 51f9298cc..4def33967 100644 --- a/include/battle.h +++ b/include/battle.h @@ -1,6 +1,8 @@ #ifndef GUARD_BATTLE_H #define GUARD_BATTLE_H +#define BATTLE_BANKS_COUNT 4 + #define BATTLE_TYPE_DOUBLE 0x0001 #define BATTLE_TYPE_LINK 0x0002 #define BATTLE_TYPE_WILD 0x0004 @@ -171,7 +173,6 @@ #define MAX_TRAINER_ITEMS 4 #define MAX_MON_MOVES 4 -#define MAX_BANKS_BATTLE 4 #define WEATHER_RAIN_TEMPORARY (1 << 0) #define WEATHER_RAIN_DOWNPOUR (1 << 1) @@ -186,8 +187,26 @@ #define WEATHER_HAIL (1 << 7) #define WEATHER_HAIL_ANY ((WEATHER_HAIL)) -u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg); -u8 GetBankSide(u8 bank); +#define REQUEST_ALL_BATTLE 0x0 +#define REQUEST_SPECIES_BATTLE 0x1 +#define REQUEST_HELDITEM_BATTLE 0x2 +#define REQUEST_MOVES_PP_BATTLE 0x3 +#define REQUEST_PPMOVE1_BATTLE 0x9 +#define REQUEST_PPMOVE2_BATTLE 0xA +#define REQUEST_PPMOVE3_BATTLE 0xB +#define REQUEST_PPMOVE4_BATTLE 0xC +#define REQUEST_STATUS_BATTLE 0x28 +#define REQUEST_HP_BATTLE 0x2A + +// array entries for battle communication +#define MOVE_EFFECT_BYTE 0x3 +#define MULTISTRING_CHOOSER 0x5 +#define MSG_DISPLAY 0x7 + +// functions + +extern u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg); +extern u8 GetBankSide(u8 bank); struct Trainer { @@ -248,9 +267,102 @@ struct DisableStruct /*0x1A*/ u8 unk1A[2]; }; -extern struct DisableStruct gDisableStructs[]; +extern struct DisableStruct gDisableStructs[BATTLE_BANKS_COUNT]; + +struct ProtectStruct +{ + /* field_0 */ + u32 protected:1; + u32 endured:1; + u32 onlyStruggle:1; + u32 helpingHand:1; + u32 bounceMove:1; + u32 stealMove:1; + u32 flag0Unknown:1; + u32 prlzImmobility:1; + /* field_1 */ + u32 confusionSelfDmg:1; + u32 notEffective:1; + u32 chargingTurn:1; + u32 fleeFlag:2; // for RunAway and Smoke Ball + u32 usedImprisionedMove:1; + u32 loveImmobility:1; + u32 usedDisabledMove:1; + /* field_2 */ + u32 usedTauntedMove:1; // 0x1 + u32 flag2Unknown:1; // 0x2 + u32 flinchImmobility:1; // 0x4 + u32 notFirstStrike:1; // 0x8 + u32 flag_x10 : 1; // 0x10 + u32 flag_x20 : 1; // 0x20 + u32 flag_x40 : 1; // 0x40 + u32 flag_x80 : 1; // 0x80 + /* field_3 */ + u32 field3 : 8; + + /* field_4 */ u32 physicalDmg; + /* field_8 */ u32 specialDmg; + /* field_C */ u8 physicalBank; + /* field_D */ u8 specialBank; + /* field_E */ u16 fieldE; +}; + +extern struct ProtectStruct gProtectStructs[BATTLE_BANKS_COUNT]; + +struct SpecialStatus +{ + u8 statLowered : 1; + u8 lightningRodRedirected : 1; + u8 restoredBankSprite: 1; + u8 intimidatedPoke : 1; + u8 traced : 1; + u8 flag20 : 1; + u8 flag40 : 1; + u8 focusBanded : 1; + u8 field1[3]; + s32 moveturnLostHP; + s32 moveturnLostHP_physical; + s32 moveturnLostHP_special; + u8 moveturnPhysicalBank; + u8 moveturnSpecialBank; + u8 field12; + u8 field13; +}; + +extern struct SpecialStatus gSpecialStatuses[BATTLE_BANKS_COUNT]; + +struct SideTimer +{ + /*0x00*/ u8 reflectTimer; + /*0x01*/ u8 reflectBank; + /*0x02*/ u8 lightscreenTimer; + /*0x03*/ u8 lightscreenBank; + /*0x04*/ u8 mistTimer; + /*0x05*/ u8 mistBank; + /*0x06*/ u8 safeguardTimer; + /*0x07*/ u8 safeguardBank; + /*0x08*/ u8 followmeTimer; + /*0x09*/ u8 followmeTarget; + /*0x0A*/ u8 spikesAmount; + /*0x0B*/ u8 fieldB; +}; + +extern struct SideTimer gSideTimers[]; + +struct WishFutureKnock +{ + u8 futureSightCounter[BATTLE_BANKS_COUNT]; + u8 futureSightAttacker[BATTLE_BANKS_COUNT]; + s32 futureSightDmg[BATTLE_BANKS_COUNT]; + u16 futureSightMove[BATTLE_BANKS_COUNT]; + u8 wishCounter[BATTLE_BANKS_COUNT]; + u8 wishUserID[BATTLE_BANKS_COUNT]; + u8 weatherDuration; + u16 knockedOffPokes; +}; + +extern struct WishFutureKnock gWishFutureKnock; -//size should be 0x1C struct AI_ThinkingStruct { u8 aiState; @@ -267,23 +379,22 @@ struct AI_ThinkingStruct struct UsedMoves { - u16 moves[4]; - u16 unknown[4]; + u16 moves[BATTLE_BANKS_COUNT]; + u16 unknown[BATTLE_BANKS_COUNT]; }; -//size should be 0x54 struct BattleHistory { - struct UsedMoves usedMoves[4]; - u8 abilities[4]; - u8 itemEffects[4]; - u16 TrainerItems[4]; + struct UsedMoves usedMoves[BATTLE_BANKS_COUNT]; + u8 abilities[BATTLE_BANKS_COUNT]; + u8 itemEffects[BATTLE_BANKS_COUNT]; + u16 TrainerItems[BATTLE_BANKS_COUNT]; u8 itemsNo; }; struct BattleScriptsStack { - u8 *ptr[8]; + const u8 *ptr[8]; u8 size; }; @@ -301,6 +412,8 @@ struct BattleResources extern struct BattleResources* gBattleResources; +#define BATTLESCRIPTS_STACK (gBattleResources->battleScriptsStack) + struct BattleResults { u8 playerFaintCounter; // 0x0 @@ -331,12 +444,11 @@ extern struct BattleResults gBattleResults; struct BattleStruct { - u8 field_1; - u8 field_2; - u8 field_3; - u8 field_4; - u8 wrappedMove1[4]; - u8 wrappedMove2[4]; + u8 turnEffectsTracker; + u8 turnEffectsBank; + u8 filler2; + u8 turncountersTracker; + u8 wrappedMove[8]; // ask gamefreak why they declared it that way u8 moveTarget[4]; u8 expGetterId; u8 field_11; @@ -494,6 +606,20 @@ struct BattleStruct u8 field_B6; u8 field_B7; u16 usedHeldItems[4]; + u8 field_C0[8]; + u16 choicedMove[4]; + u8 field_D0[8]; + u8 intimidateBank; + u8 fillerD9[0xDA-0xD9]; + u8 unkDA; + u8 turnSideTracker; + u8 fillerDC[0xDF-0xDC]; + u8 unkDF; + u8 fillerE0[0x1A0-0xE0]; + u8 unk1A0; + u8 unk1A1; + u8 filler1A2; + u8 atkCancellerTracker; }; extern struct BattleStruct* gBattleStruct; @@ -513,6 +639,14 @@ struct BattleScripting u8 field_D; u8 dmgMultiplier; u8 field_F; + u8 animArg1; + u8 animArg2; + u8 field_12; + u8 field_13; + u8 atk49_state; + u8 field_15; + u8 field_16; + u8 bank; }; extern struct BattleScripting gBattleScripting; diff --git a/include/hall_of_fame.h b/include/hall_of_fame.h new file mode 100644 index 000000000..62e84c39e --- /dev/null +++ b/include/hall_of_fame.h @@ -0,0 +1,9 @@ +#ifndef GUARD_HALL_OF_FAME_H +#define GUARD_HALL_OF_FAME_H + +void sub_8141F90(void); +void sub_8143648(u16 paletteTag, u8 arg1); +void sub_81428CC(void); +void sub_8143680(int, u8); + +#endif // GUARD_HALL_OF_FAME_H diff --git a/ld_script.txt b/ld_script.txt index 940616eeb..05fb41f21 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -58,6 +58,7 @@ SECTIONS { src/decompress.o(.text); asm/rom_8034C54.o(.text); asm/battle_2.o(.text); + src/battle_3.o(.text); asm/battle_3.o(.text); src/battle_4.o(.text); asm/battle_4.o(.text); diff --git a/src/battle_3.c b/src/battle_3.c new file mode 100644 index 000000000..34e45ca74 --- /dev/null +++ b/src/battle_3.c @@ -0,0 +1,1387 @@ +#include "global.h" +#include "battle.h" +#include "abilities.h" +#include "moves.h" +#include "hold_effects.h" +#include "pokemon.h" +#include "species.h" +#include "item.h" +#include "items.h" +#include "util.h" +#include "battle_move_effects.h" +#include "rng.h" +#include "text.h" +#include "string_util.h" +#include "battle_message.h" + +extern const u8* gBattlescriptCurrInstr; +extern const u8* gUnknown_02024220[BATTLE_BANKS_COUNT]; +extern const u8* gUnknown_02024230[BATTLE_BANKS_COUNT]; +extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT]; +extern u8 gActiveBank; +extern u8 gStringBank; +extern u16 gCurrentMove; +extern u16 gLastUsedItem; +extern u8 gNoOfAllBanks; +extern u32 gStatuses3[BATTLE_BANKS_COUNT]; +extern u8 gBankAttacker; +extern u8 gBankTarget; +extern u8 gAbsentBankFlags; +extern u16 gBattleWeather; +extern u8 gTurnOrder[BATTLE_BANKS_COUNT]; +extern u16 gSideAffecting[]; +extern u8 gBattleCommunication[]; +extern void (*gBattleMainFunc)(void); +extern s32 gBattleMoveDamage; +extern struct BattleEnigmaBerry gEnigmaBerries[BATTLE_BANKS_COUNT]; +extern u8 gBattleBufferB[BATTLE_BANKS_COUNT][0x200]; +extern u32 gBattleTypeFlags; +extern u16 gLastUsedMovesByBanks[BATTLE_BANKS_COUNT]; +extern u32 gHitMarker; +extern u8 gEffectBank; +extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; +extern u8 gBank1; +extern u16 gChosenMovesByBanks[]; +extern u8 gBattleMoveFlags; +extern s32 gTakenDmg[BATTLE_BANKS_COUNT]; +extern u8 gTakenDmgBanks[BATTLE_BANKS_COUNT]; + +extern const struct BattleMove gBattleMoves[]; + +// scripts +extern const u8 gUnknown_082DAE2A[]; +extern const u8 gUnknown_082DAE1F[]; +extern const u8 gUnknown_082DB089[]; +extern const u8 gUnknown_082DB098[]; +extern const u8 gUnknown_082DB0AF[]; +extern const u8 gUnknown_082DB0A0[]; +extern const u8 gUnknown_082DB185[]; +extern const u8 gUnknown_082DB181[]; +extern const u8 gUnknown_082DB812[]; +extern const u8 gUnknown_082DB076[]; +extern const u8 BattleScript_NoMovesLeft[]; +extern const u8 gUnknown_082DACFA[]; +extern const u8 gUnknown_082DAD0B[]; +extern const u8 gUnknown_082DACC9[]; +extern const u8 gUnknown_082DAC47[]; +extern const u8 gUnknown_082DACE0[]; +extern const u8 gUnknown_082DACD2[]; +extern const u8 BattleScript_WishComesTrue[]; +extern const u8 gUnknown_082DACC9[]; +extern const u8 gUnknown_082DAC2C[]; +extern const u8 BattleScript_IngrainTurnHeal[]; +extern const u8 BattleScript_LeechSeedTurnDrain[]; +extern const u8 BattleScript_PoisonTurnDmg[]; +extern const u8 BattleScript_BurnTurnDmg[]; +extern const u8 BattleScript_NightmareTurnDmg[]; +extern const u8 BattleScript_CurseTurnDmg[]; +extern const u8 BattleScript_WrapTurnDmg[]; +extern const u8 BattleScript_WrapEnds[]; +extern const u8 gUnknown_082DB234[]; +extern const u8 gUnknown_082DB2A6[]; +extern const u8 BattleScript_ThrashConfuses[]; +extern const u8 BattleScript_DisabledNoMore[]; +extern const u8 BattleScript_EncoredNoMore[]; +extern const u8 BattleScript_YawnMakesAsleep[]; +extern const u8 gUnknown_082DAFE4[]; +extern const u8 gUnknown_082DB8F3[]; +extern const u8 gUnknown_082DAF05[]; +extern const u8 gUnknown_082DAF20[]; +extern const u8 gUnknown_082DA7C4[]; +extern const u8 gUnknown_082DA7CD[]; +extern const u8 BattleScript_MoveUsedWokeUp[]; +extern const u8 BattleScript_MoveUsedIsAsleep[]; +extern const u8 BattleScript_MoveUsedIsFrozen[]; +extern const u8 BattleScript_MoveUsedUnfroze[]; +extern const u8 BattleScript_MoveUsedLoafingAround[]; +extern const u8 BattleScript_MoveUsedMustRecharge[]; +extern const u8 BattleScript_MoveUsedFlinched[]; +extern const u8 BattleScript_MoveUsedIsDisabled[]; +extern const u8 BattleScript_MoveUsedIsTaunted[]; +extern const u8 BattleScript_MoveUsedIsImprisoned[]; +extern const u8 BattleScript_MoveUsedIsConfused[]; +extern const u8 BattleScript_MoveUsedIsConfusedNoMore[]; +extern const u8 BattleScript_MoveUsedIsParalyzed[]; +extern const u8 BattleScript_MoveUsedIsParalyzedCantAttack[]; +extern const u8 BattleScript_MoveUsedIsInLove[]; +extern const u8 BattleScript_BideStoringEnergy[]; +extern const u8 BattleScript_BideAttack[]; +extern const u8 BattleScript_BideNoEnergyToAttack[]; + +extern void CancelMultiTurnMoves(u8 bank); +extern u8 b_first_side(u8, u8, u8); +extern void sub_803CEDC(u8, u8); +extern void b_call_bc_move_exec(const u8 *); +extern void BattleTurnPassed(void); +extern void EmitSetAttributes(u8 a, u8 request, u8 c, u8 bytes, void *data); +extern void SetMoveEffect(bool8 primary, u8 certainArg); +extern bool8 UproarWakeUpCheck(u8 bank); +extern void MarkBufferBankForExecution(u8 bank); +extern u8 sub_803F90C(u8 bank); +extern u8 GetBankIdentity(u8); +extern void sub_803F9EC(); +extern bool8 sub_80423F4(u8 bank, u8, u8); +extern s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *defender, u32 move, u16 sideFlags, u16 powerOverride, u8 typeOverride, u8 bankAtk, u8 bankDef); + +u8 IsImprisoned(u8 bank, u16 move); +u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn); +u8 GetMoveTarget(u16 move, u8 useMoveTarget); + +void b_movescr_stack_push(const u8* bsPtr) +{ + BATTLESCRIPTS_STACK->ptr[BATTLESCRIPTS_STACK->size++] = bsPtr; +} + +void b_movescr_stack_push_cursor(void) +{ + BATTLESCRIPTS_STACK->ptr[BATTLESCRIPTS_STACK->size++] = gBattlescriptCurrInstr; +} + +void b_movescr_stack_pop_cursor(void) +{ + gBattlescriptCurrInstr = BATTLESCRIPTS_STACK->ptr[--BATTLESCRIPTS_STACK->size]; +} + +u8 sub_803FB4C(void) // msg, can't select a move +{ + u8 limitations = 0; + u16 move = gBattleMons[gActiveBank].moves[gBattleBufferB[gActiveBank][2]]; + u8 holdEffect; + u16* choicedMove = &gBattleStruct->choicedMove[gActiveBank]; + + if (gDisableStructs[gActiveBank].disabledMove == move && move != 0) + { + gBattleScripting.bank = gActiveBank; + gCurrentMove = move; + if (gBattleTypeFlags & BATTLE_TYPE_PALACE) + { + gUnknown_02024230[gActiveBank] = gUnknown_082DAE2A; + gProtectStructs[gActiveBank].flag_x10 = 1; + } + else + { + gUnknown_02024220[gActiveBank] = gUnknown_082DAE1F; + limitations = 1; + } + } + + if (move == gLastUsedMovesByBanks[gActiveBank] && move != MOVE_STRUGGLE && (gBattleMons[gActiveBank].status2 & STATUS2_TORMENT)) + { + CancelMultiTurnMoves(gActiveBank); + if (gBattleTypeFlags & BATTLE_TYPE_PALACE) + { + gUnknown_02024230[gActiveBank] = gUnknown_082DB098; + gProtectStructs[gActiveBank].flag_x10 = 1; + } + else + { + gUnknown_02024220[gActiveBank] = gUnknown_082DB089; + limitations++; + } + } + + if (gDisableStructs[gActiveBank].tauntTimer1 != 0 && gBattleMoves[move].power == 0) + { + gCurrentMove = move; + if (gBattleTypeFlags & BATTLE_TYPE_PALACE) + { + gUnknown_02024230[gActiveBank] = gUnknown_082DB0AF; + gProtectStructs[gActiveBank].flag_x10 = 1; + } + else + { + gUnknown_02024220[gActiveBank] = gUnknown_082DB0A0; + limitations++; + } + } + + if (IsImprisoned(gActiveBank, move)) + { + gCurrentMove = move; + if (gBattleTypeFlags & BATTLE_TYPE_PALACE) + { + gUnknown_02024230[gActiveBank] = gUnknown_082DB185; + gProtectStructs[gActiveBank].flag_x10 = 1; + } + else + { + gUnknown_02024220[gActiveBank] = gUnknown_082DB181; + limitations++; + } + } + + if (gBattleMons[gActiveBank].item == ITEM_ENIGMA_BERRY) + holdEffect = gEnigmaBerries[gActiveBank].holdEffect; + else + holdEffect = ItemId_GetHoldEffect(gBattleMons[gActiveBank].item); + + gStringBank = gActiveBank; + + if (holdEffect == HOLD_EFFECT_CHOICE_BAND && *choicedMove != 0 && *choicedMove != 0xFFFF && *choicedMove != move) + { + gCurrentMove = *choicedMove; + gLastUsedItem = gBattleMons[gActiveBank].item; + if (gBattleTypeFlags & BATTLE_TYPE_PALACE) + { + gProtectStructs[gActiveBank].flag_x10 = 1; + } + else + { + gUnknown_02024220[gActiveBank] = gUnknown_082DB812; + limitations++; + } + } + + if (gBattleMons[gActiveBank].pp[gBattleBufferB[gActiveBank][2]] == 0) + { + if (gBattleTypeFlags & BATTLE_TYPE_PALACE) + { + gProtectStructs[gActiveBank].flag_x10 = 1; + } + else + { + gUnknown_02024220[gActiveBank] = gUnknown_082DB076; + limitations++; + } + } + + return limitations; +} + +#define MOVE_LIMITATION_ZEROMOVE (1 << 0) +#define MOVE_LIMITATION_PP (1 << 1) +#define MOVE_LIMITATION_DISABLED (1 << 2) +#define MOVE_LIMITATION_TORMENTED (1 << 3) +#define MOVE_LIMITATION_TAUNT (1 << 4) +#define MOVE_LIMITATION_IMPRISION (1 << 5) + +u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check) +{ + u8 holdEffect; + u16* choicedMove = &gBattleStruct->choicedMove[bank]; + s32 i; + + if (gBattleMons[bank].item == ITEM_ENIGMA_BERRY) + holdEffect = gEnigmaBerries[bank].holdEffect; + else + holdEffect = ItemId_GetHoldEffect(gBattleMons[bank].item); + + gStringBank = bank; + + for (i = 0; i < BATTLE_BANKS_COUNT; i++) + { + if (gBattleMons[bank].moves[i] == 0 && check & MOVE_LIMITATION_ZEROMOVE) + unusableMoves |= gBitTable[i]; + if (gBattleMons[bank].pp[i] == 0 && check & MOVE_LIMITATION_PP) + unusableMoves |= gBitTable[i]; + if (gBattleMons[bank].moves[i] == gDisableStructs[bank].disabledMove && check & MOVE_LIMITATION_DISABLED) + unusableMoves |= gBitTable[i]; + if (gBattleMons[bank].moves[i] == gLastUsedMovesByBanks[bank] && check & MOVE_LIMITATION_TORMENTED && gBattleMons[bank].status2 & STATUS2_TORMENT) + unusableMoves |= gBitTable[i]; + if (gDisableStructs[bank].tauntTimer1 && check & MOVE_LIMITATION_TAUNT && gBattleMoves[gBattleMons[bank].moves[i]].power == 0) + unusableMoves |= gBitTable[i]; + if (IsImprisoned(bank, gBattleMons[bank].moves[i]) && check & MOVE_LIMITATION_IMPRISION) + unusableMoves |= gBitTable[i]; + if (gDisableStructs[bank].encoreTimer1 && gDisableStructs[bank].encoredMove != gBattleMons[bank].moves[i]) + unusableMoves |= gBitTable[i]; + if (holdEffect == HOLD_EFFECT_CHOICE_BAND && *choicedMove != 0 && *choicedMove != 0xFFFF && *choicedMove != gBattleMons[bank].moves[i]) + unusableMoves |= gBitTable[i]; + } + return unusableMoves; +} + +bool8 AreAllMovesUnusable(void) +{ + u8 unusable; + unusable = CheckMoveLimitations(gActiveBank, 0, 0xFF); + + if (unusable == 0xF) // all moves are unusable + { + gProtectStructs[gActiveBank].onlyStruggle = 1; + gUnknown_02024220[gActiveBank] = BattleScript_NoMovesLeft; + } + else + { + gProtectStructs[gActiveBank].onlyStruggle = 0; + } + + return (unusable == 0xF); +} + +u8 IsImprisoned(u8 bank, u16 move) +{ + s32 i; + u8 imprisionedMoves = 0; + u8 bankSide = GetBankSide(bank); + + for (i = 0; i < gNoOfAllBanks; i++) + { + if (bankSide != GetBankSide(i) && gStatuses3[i] & STATUS3_IMPRISIONED) + { + s32 j; + for (j = 0; j < 4; j++) + { + if (move == gBattleMons[i].moves[j]) + break; + } + if (j < 4) + imprisionedMoves++; + } + } + + return imprisionedMoves; +} + +u8 UpdateTurnCounters(void) +{ + u8 effect = 0; + s32 i; + + for (gBankAttacker = 0; gBankAttacker < gNoOfAllBanks && gAbsentBankFlags & gBitTable[gBankAttacker]; gBankAttacker++) + { + } + for (gBankTarget = 0; gBankTarget < gNoOfAllBanks && gAbsentBankFlags & gBitTable[gBankTarget]; gBankTarget++) + { + } + + do + { + u8 sideBank; + + switch (gBattleStruct->turncountersTracker) + { + case 0: + for (i = 0; i < gNoOfAllBanks; i++) + { + gTurnOrder[i] = i; + } + for (i = 0; i < gNoOfAllBanks - 1; i++) + { + s32 j; + for (j = i + 1; j < gNoOfAllBanks; j++) + { + if (b_first_side(gTurnOrder[i], gTurnOrder[j], 0)) + sub_803CEDC(i, j); + } + } + + // It's stupid, but won't match without it + { + u8* var = &gBattleStruct->turncountersTracker; + (*var)++; + gBattleStruct->turnSideTracker = 0; + } + // fall through + case 1: + while (gBattleStruct->turnSideTracker < 2) + { + sideBank = gBattleStruct->turnSideTracker; + gActiveBank = gBankAttacker = gSideTimers[sideBank].reflectBank; + if (gSideAffecting[sideBank] & SIDE_STATUS_REFLECT) + { + if (--gSideTimers[sideBank].reflectTimer == 0) + { + gSideAffecting[sideBank] &= ~SIDE_STATUS_REFLECT; + b_call_bc_move_exec(gUnknown_082DACFA); + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 2; + gBattleTextBuff1[2] = MOVE_REFLECT; + gBattleTextBuff1[3] = MOVE_REFLECT >> 8; + gBattleTextBuff1[4] = EOS; + effect++; + } + } + gBattleStruct->turnSideTracker++; + if (effect) + break; + } + if (!effect) + { + gBattleStruct->turncountersTracker++; + gBattleStruct->turnSideTracker = 0; + } + break; + case 2: + while (gBattleStruct->turnSideTracker < 2) + { + sideBank = gBattleStruct->turnSideTracker; + gActiveBank = gBankAttacker = gSideTimers[sideBank].lightscreenBank; + if (gSideAffecting[sideBank] & SIDE_STATUS_LIGHTSCREEN) + { + if (--gSideTimers[sideBank].lightscreenTimer == 0) + { + gSideAffecting[sideBank] &= ~SIDE_STATUS_LIGHTSCREEN; + b_call_bc_move_exec(gUnknown_082DACFA); + gBattleCommunication[MULTISTRING_CHOOSER] = sideBank; + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 2; + gBattleTextBuff1[2] = MOVE_LIGHT_SCREEN; + gBattleTextBuff1[3] = MOVE_LIGHT_SCREEN >> 8; + gBattleTextBuff1[4] = EOS; + effect++; + } + } + gBattleStruct->turnSideTracker++; + if (effect) + break; + } + if (!effect) + { + gBattleStruct->turncountersTracker++; + gBattleStruct->turnSideTracker = 0; + } + break; + case 3: + while (gBattleStruct->turnSideTracker < 2) + { + sideBank = gBattleStruct->turnSideTracker; + gActiveBank = gBankAttacker = gSideTimers[sideBank].mistBank; + if (gSideTimers[sideBank].mistTimer != 0 + && --gSideTimers[sideBank].mistTimer == 0) + { + gSideAffecting[sideBank] &= ~SIDE_STATUS_MIST; + b_call_bc_move_exec(gUnknown_082DACFA); + gBattleCommunication[MULTISTRING_CHOOSER] = sideBank; + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 2; + gBattleTextBuff1[2] = MOVE_MIST; + gBattleTextBuff1[3] = MOVE_MIST >> 8; + gBattleTextBuff1[4] = EOS; + effect++; + } + gBattleStruct->turnSideTracker++; + if (effect) + break; + } + if (!effect) + { + gBattleStruct->turncountersTracker++; + gBattleStruct->turnSideTracker = 0; + } + break; + case 4: + while (gBattleStruct->turnSideTracker < 2) + { + sideBank = gBattleStruct->turnSideTracker; + gActiveBank = gBankAttacker = gSideTimers[sideBank].safeguardBank; + if (gSideAffecting[sideBank] & SIDE_STATUS_SAFEGUARD) + { + if (--gSideTimers[sideBank].safeguardTimer == 0) + { + gSideAffecting[sideBank] &= ~SIDE_STATUS_SAFEGUARD; + b_call_bc_move_exec(gUnknown_082DAD0B); + effect++; + } + } + gBattleStruct->turnSideTracker++; + if (effect) + break; + } + if (!effect) + { + gBattleStruct->turncountersTracker++; + gBattleStruct->turnSideTracker = 0; + } + break; + case 5: + while (gBattleStruct->turnSideTracker < gNoOfAllBanks) + { + gActiveBank = gTurnOrder[gBattleStruct->turnSideTracker]; + if (gWishFutureKnock.wishCounter[gActiveBank] != 0 + && --gWishFutureKnock.wishCounter[gActiveBank] == 0 + && gBattleMons[gActiveBank].hp != 0) + { + gBankTarget = gActiveBank; + b_call_bc_move_exec(BattleScript_WishComesTrue); + effect++; + } + gBattleStruct->turnSideTracker++; + if (effect) + break; + } + if (!effect) + { + gBattleStruct->turncountersTracker++; + } + break; + case 6: + if (gBattleWeather & WEATHER_RAIN_ANY) + { + if (!(gBattleWeather & WEATHER_RAIN_PERMANENT)) + { + if (--gWishFutureKnock.weatherDuration == 0) + { + gBattleWeather &= ~WEATHER_RAIN_TEMPORARY; + gBattleWeather &= ~WEATHER_RAIN_DOWNPOUR; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + } + else if (gBattleWeather & WEATHER_RAIN_DOWNPOUR) + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + else if (gBattleWeather & WEATHER_RAIN_DOWNPOUR) + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + b_call_bc_move_exec(gUnknown_082DAC2C); + effect++; + } + gBattleStruct->turncountersTracker++; + break; + case 7: + if (gBattleWeather & WEATHER_SANDSTORM_ANY) + { + if (!(gBattleWeather & WEATHER_SANDSTORM_PERMANENT) && --gWishFutureKnock.weatherDuration == 0) + { + gBattleWeather &= ~WEATHER_SANDSTORM_TEMPORARY; + gBattlescriptCurrInstr = gUnknown_082DACC9; + } + else + gBattlescriptCurrInstr = gUnknown_082DAC47; + + gBattleScripting.animArg1 = 0xC; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + b_call_bc_move_exec(gBattlescriptCurrInstr); + effect++; + } + gBattleStruct->turncountersTracker++; + break; + case 8: + if (gBattleWeather & WEATHER_SUN_ANY) + { + if (!(gBattleWeather & WEATHER_SUN_PERMANENT) && --gWishFutureKnock.weatherDuration == 0) + { + gBattleWeather &= ~WEATHER_SUN_TEMPORARY; + gBattlescriptCurrInstr = gUnknown_082DACE0; + } + else + gBattlescriptCurrInstr = gUnknown_082DACD2; + + b_call_bc_move_exec(gBattlescriptCurrInstr); + effect++; + } + gBattleStruct->turncountersTracker++; + break; + case 9: + if (gBattleWeather & WEATHER_HAIL) + { + if (--gWishFutureKnock.weatherDuration == 0) + { + gBattleWeather &= ~WEATHER_HAIL; + gBattlescriptCurrInstr = gUnknown_082DACC9; + } + else + gBattlescriptCurrInstr = gUnknown_082DAC47; + + gBattleScripting.animArg1 = 0xD; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + b_call_bc_move_exec(gBattlescriptCurrInstr); + effect++; + } + gBattleStruct->turncountersTracker++; + break; + case 10: + effect++; + break; + } + } while (effect == 0); + return (gBattleMainFunc != BattleTurnPassed); +} + +#define TURNBASED_MAX_CASE 19 + +u8 TurnBasedEffects(void) +{ + u8 effect = 0; + + gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_x20); + while (gBattleStruct->turnEffectsBank < gNoOfAllBanks && gBattleStruct->turnEffectsTracker <= TURNBASED_MAX_CASE) + { + gActiveBank = gBankAttacker = gTurnOrder[gBattleStruct->turnEffectsBank]; + if (gAbsentBankFlags & gBitTable[gActiveBank]) + { + gBattleStruct->turnEffectsBank++; + } + else + { + switch (gBattleStruct->turnEffectsTracker) + { + case 0: // ingrain + if ((gStatuses3[gActiveBank] & STATUS3_ROOTED) + && gBattleMons[gActiveBank].hp != gBattleMons[gActiveBank].maxHP + && gBattleMons[gActiveBank].hp != 0) + { + gBattleMoveDamage = gBattleMons[gActiveBank].maxHP / 16; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + gBattleMoveDamage *= -1; + b_call_bc_move_exec(BattleScript_IngrainTurnHeal); + effect++; + } + gBattleStruct->turnEffectsTracker++; + break; + case 1: // end turn abilities + if (AbilityBattleEffects(ABILITYEFFECT_ENDTURN, gActiveBank, 0, 0, 0)) + effect++; + gBattleStruct->turnEffectsTracker++; + break; + case 2: // item effects + if (ItemBattleEffects(1, gActiveBank, 0)) + effect++; + gBattleStruct->turnEffectsTracker++; + break; + case 18: // item effects again + if (ItemBattleEffects(1, gActiveBank, 1)) + effect++; + gBattleStruct->turnEffectsTracker++; + break; + case 3: // leech seed + if ((gStatuses3[gActiveBank] & STATUS3_LEECHSEED) + && gBattleMons[gStatuses3[gActiveBank] & STATUS3_LEECHSEED_BANK].hp != 0 + && gBattleMons[gActiveBank].hp != 0) + { + gBankTarget = gStatuses3[gActiveBank] & STATUS3_LEECHSEED_BANK; //funny how the 'target' is actually the bank that receives HP + gBattleMoveDamage = gBattleMons[gActiveBank].maxHP / 8; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + gBattleScripting.animArg1 = gBankTarget; + gBattleScripting.animArg2 = gBankAttacker; + b_call_bc_move_exec(BattleScript_LeechSeedTurnDrain); + effect++; + } + gBattleStruct->turnEffectsTracker++; + break; + case 4: // poison + if ((gBattleMons[gActiveBank].status1 & STATUS_POISON) && gBattleMons[gActiveBank].hp != 0) + { + gBattleMoveDamage = gBattleMons[gActiveBank].maxHP / 8; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + b_call_bc_move_exec(BattleScript_PoisonTurnDmg); + effect++; + } + gBattleStruct->turnEffectsTracker++; + break; + case 5: // toxic poison + if ((gBattleMons[gActiveBank].status1 & STATUS_TOXIC_POISON) && gBattleMons[gActiveBank].hp != 0) + { + gBattleMoveDamage = gBattleMons[gActiveBank].maxHP / 16; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + if ((gBattleMons[gActiveBank].status1 & 0xF00) != 0xF00) //not 16 turns + gBattleMons[gActiveBank].status1 += 0x100; + gBattleMoveDamage *= (gBattleMons[gActiveBank].status1 & 0xF00) >> 8; + b_call_bc_move_exec(BattleScript_PoisonTurnDmg); + effect++; + } + gBattleStruct->turnEffectsTracker++; + break; + case 6: // burn + if ((gBattleMons[gActiveBank].status1 & STATUS_BURN) && gBattleMons[gActiveBank].hp != 0) + { + gBattleMoveDamage = gBattleMons[gActiveBank].maxHP / 8; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + b_call_bc_move_exec(BattleScript_BurnTurnDmg); + effect++; + } + gBattleStruct->turnEffectsTracker++; + break; + case 7: // spooky nightmares + if ((gBattleMons[gActiveBank].status2 & STATUS2_NIGHTMARE) && gBattleMons[gActiveBank].hp != 0) + { + // R/S does not perform this sleep check, which causes the nighmare effect to + // persist even after the affected Pokemon has been awakened by Shed Skin + if (gBattleMons[gActiveBank].status1 & STATUS_SLEEP) + { + gBattleMoveDamage = gBattleMons[gActiveBank].maxHP / 4; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + b_call_bc_move_exec(BattleScript_NightmareTurnDmg); + effect++; + } + else + { + gBattleMons[gActiveBank].status2 &= ~STATUS2_NIGHTMARE; + } + } + gBattleStruct->turnEffectsTracker++; + break; + case 8: // curse + if ((gBattleMons[gActiveBank].status2 & STATUS2_CURSED) && gBattleMons[gActiveBank].hp != 0) + { + gBattleMoveDamage = gBattleMons[gActiveBank].maxHP / 4; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + b_call_bc_move_exec(BattleScript_CurseTurnDmg); + effect++; + } + gBattleStruct->turnEffectsTracker++; + break; + case 9: // wrap + if ((gBattleMons[gActiveBank].status2 & STATUS2_WRAPPED) && gBattleMons[gActiveBank].hp != 0) + { + gBattleMons[gActiveBank].status2 -= 0x2000; + if (gBattleMons[gActiveBank].status2 & STATUS2_WRAPPED) // damaged by wrap + { + // This is the only way I could get this array access to match. + gBattleScripting.animArg1 = *(gBattleStruct->wrappedMove + gActiveBank * 2 + 0); + gBattleScripting.animArg2 = *(gBattleStruct->wrappedMove + gActiveBank * 2 + 1); + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 2; + gBattleTextBuff1[2] = *(gBattleStruct->wrappedMove + gActiveBank * 2 + 0); + gBattleTextBuff1[3] = *(gBattleStruct->wrappedMove + gActiveBank * 2 + 1); + gBattleTextBuff1[4] = EOS; + gBattlescriptCurrInstr = BattleScript_WrapTurnDmg; + gBattleMoveDamage = gBattleMons[gActiveBank].maxHP / 16; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + } + else // broke free + { + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 2; + gBattleTextBuff1[2] = *(gBattleStruct->wrappedMove + gActiveBank * 2 + 0); + gBattleTextBuff1[3] = *(gBattleStruct->wrappedMove + gActiveBank * 2 + 1); + gBattleTextBuff1[4] = EOS; + gBattlescriptCurrInstr = BattleScript_WrapEnds; + } + b_call_bc_move_exec(gBattlescriptCurrInstr); + effect++; + } + gBattleStruct->turnEffectsTracker++; + break; + case 10: // uproar + if (gBattleMons[gActiveBank].status2 & STATUS2_UPROAR) + { + for (gBankAttacker = 0; gBankAttacker < gNoOfAllBanks; gBankAttacker++) + { + if ((gBattleMons[gBankAttacker].status1 & STATUS_SLEEP) + && gBattleMons[gBankAttacker].ability != ABILITY_SOUNDPROOF) + { + gBattleMons[gBankAttacker].status1 &= ~(STATUS_SLEEP); + gBattleMons[gBankAttacker].status2 &= ~(STATUS2_NIGHTMARE); + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + b_call_bc_move_exec(gUnknown_082DB234); + gActiveBank = gBankAttacker; + EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); + MarkBufferBankForExecution(gActiveBank); + break; + } + } + if (gBankAttacker != gNoOfAllBanks) + { + effect = 2; // a pokemon was awaken + break; + } + else + { + gBankAttacker = gActiveBank; + gBattleMons[gActiveBank].status2 -= 0x10; // uproar timer goes down + if (sub_803F90C(gActiveBank)) + { + CancelMultiTurnMoves(gActiveBank); + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + else if (gBattleMons[gActiveBank].status2 & STATUS2_UPROAR) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattleMons[gActiveBank].status2 |= STATUS2_MULTIPLETURNS; + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + CancelMultiTurnMoves(gActiveBank); + } + b_call_bc_move_exec(gUnknown_082DB2A6); + effect = 1; + } + } + if (effect != 2) + gBattleStruct->turnEffectsTracker++; + break; + case 11: // thrash + if (gBattleMons[gActiveBank].status2 & STATUS2_LOCK_CONFUSE) + { + gBattleMons[gActiveBank].status2 -= 0x400; + if (sub_803F90C(gActiveBank)) + CancelMultiTurnMoves(gActiveBank); + else if (!(gBattleMons[gActiveBank].status2 & STATUS2_LOCK_CONFUSE) + && (gBattleMons[gActiveBank].status2 & STATUS2_MULTIPLETURNS)) + { + gBattleMons[gActiveBank].status2 &= ~(STATUS2_MULTIPLETURNS); + if (!(gBattleMons[gActiveBank].status2 & STATUS2_CONFUSION)) + { + gBattleCommunication[MOVE_EFFECT_BYTE] = 0x47; + SetMoveEffect(1, 0); + if (gBattleMons[gActiveBank].status2 & STATUS2_CONFUSION) + b_call_bc_move_exec(BattleScript_ThrashConfuses); + effect++; + } + } + } + gBattleStruct->turnEffectsTracker++; + break; + case 12: // disable + if (gDisableStructs[gActiveBank].disableTimer1 != 0) + { + int i; + for (i = 0; i < 4; i++) + { + if (gDisableStructs[gActiveBank].disabledMove == gBattleMons[gActiveBank].moves[i]) + break; + } + if (i == 4) // pokemon does not have the disabled move anymore + { + gDisableStructs[gActiveBank].disabledMove = 0; + gDisableStructs[gActiveBank].disableTimer1 = 0; + } + else if (--gDisableStructs[gActiveBank].disableTimer1 == 0) // disable ends + { + gDisableStructs[gActiveBank].disabledMove = 0; + b_call_bc_move_exec(BattleScript_DisabledNoMore); + effect++; + } + } + gBattleStruct->turnEffectsTracker++; + break; + case 13: // encore + if (gDisableStructs[gActiveBank].encoreTimer1 != 0) + { + if (gBattleMons[gActiveBank].moves[gDisableStructs[gActiveBank].encoredMovePos] != gDisableStructs[gActiveBank].encoredMove) // pokemon does not have the encored move anymore + { + gDisableStructs[gActiveBank].encoredMove = 0; + gDisableStructs[gActiveBank].encoreTimer1 = 0; + } + else if (--gDisableStructs[gActiveBank].encoreTimer1 == 0 + || gBattleMons[gActiveBank].pp[gDisableStructs[gActiveBank].encoredMovePos] == 0) + { + gDisableStructs[gActiveBank].encoredMove = 0; + gDisableStructs[gActiveBank].encoreTimer1 = 0; + b_call_bc_move_exec(BattleScript_EncoredNoMore); + effect++; + } + } + gBattleStruct->turnEffectsTracker++; + break; + case 14: // lock-on decrement + if (gStatuses3[gActiveBank] & STATUS3_ALWAYS_HITS) + gStatuses3[gActiveBank] -= 0x8; + gBattleStruct->turnEffectsTracker++; + break; + case 15: // charge + if (gDisableStructs[gActiveBank].chargeTimer1 && --gDisableStructs[gActiveBank].chargeTimer1 == 0) + gStatuses3[gActiveBank] &= ~STATUS3_CHARGED_UP; + gBattleStruct->turnEffectsTracker++; + break; + case 16: // taunt + if (gDisableStructs[gActiveBank].tauntTimer1) + gDisableStructs[gActiveBank].tauntTimer1--; + gBattleStruct->turnEffectsTracker++; + break; + case 17: // yawn + if (gStatuses3[gActiveBank] & STATUS3_YAWN) + { + gStatuses3[gActiveBank] -= 0x800; + if (!(gStatuses3[gActiveBank] & STATUS3_YAWN) && !(gBattleMons[gActiveBank].status1 & STATUS_ANY) + && gBattleMons[gActiveBank].ability != ABILITY_VITAL_SPIRIT + && gBattleMons[gActiveBank].ability != ABILITY_INSOMNIA && !UproarWakeUpCheck(gActiveBank)) + { + CancelMultiTurnMoves(gActiveBank); + gBattleMons[gActiveBank].status1 |= (Random() & 3) + 2; + EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); + MarkBufferBankForExecution(gActiveBank); + gEffectBank = gActiveBank; + b_call_bc_move_exec(BattleScript_YawnMakesAsleep); + effect++; + } + } + gBattleStruct->turnEffectsTracker++; + break; + case 19: // done + gBattleStruct->turnEffectsTracker = 0; + gBattleStruct->turnEffectsBank++; + break; + } + if (effect != 0) + return effect; + } + } + gHitMarker &= ~(HITMARKER_GRUDGE | HITMARKER_x20); + return 0; +} + +bool8 sub_8041364(void) +{ + gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_x20); + + switch (gBattleStruct->unk1A0) + { + case 0: + while (gBattleStruct->unk1A1 < gNoOfAllBanks) + { + gActiveBank = gBattleStruct->unk1A1; + if (gAbsentBankFlags & gBitTable[gActiveBank]) + { + gBattleStruct->unk1A1++; + continue; + } + + gBattleStruct->unk1A1++; + if (gWishFutureKnock.futureSightCounter[gActiveBank] != 0 + && --gWishFutureKnock.futureSightCounter[gActiveBank] == 0 + && gBattleMons[gActiveBank].hp != 0) + { + if (gWishFutureKnock.futureSightMove[gActiveBank] == MOVE_FUTURE_SIGHT) + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 2; + gBattleTextBuff1[2] = gWishFutureKnock.futureSightMove[gActiveBank]; + gBattleTextBuff1[3] = gWishFutureKnock.futureSightMove[gActiveBank] >> 8; + gBattleTextBuff1[4] = EOS; + gBankTarget = gActiveBank; + gBankAttacker = gWishFutureKnock.futureSightAttacker[gActiveBank]; + gBattleMoveDamage = gWishFutureKnock.futureSightDmg[gActiveBank]; + gSpecialStatuses[gBankTarget].moveturnLostHP = 0xFFFF; + b_call_bc_move_exec(gUnknown_082DAFE4); + + if (gWishFutureKnock.futureSightCounter[gActiveBank] == 0 + && gWishFutureKnock.futureSightCounter[gActiveBank ^ 2] == 0) + { + gSideAffecting[GetBankIdentity(gBankTarget) & 1] &= ~SIDE_STATUS_FUTUREATTACK; + } + return 1; + } + } + // Why do I have to keep doing this to match? + { + u8* var = &gBattleStruct->unk1A0; + *var = 1; + gBattleStruct->unk1A1 = 0; + } + // fall through + case 1: + while (gBattleStruct->unk1A1 < gNoOfAllBanks) + { + gActiveBank = gBankAttacker = gTurnOrder[gBattleStruct->unk1A1]; + if (gAbsentBankFlags & gBitTable[gActiveBank]) + { + gBattleStruct->unk1A1++; + continue; + } + gBattleStruct->unk1A1++; + if (gStatuses3[gActiveBank] & STATUS3_PERISH_SONG) + { + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 1; + gBattleTextBuff1[2] = 1; + gBattleTextBuff1[3] = 1; + gBattleTextBuff1[4] = gDisableStructs[gActiveBank].perishSong1; + gBattleTextBuff1[5] = EOS; + if (gDisableStructs[gActiveBank].perishSong1 == 0) + { + gStatuses3[gActiveBank] &= ~STATUS3_PERISH_SONG; + gBattleMoveDamage = gBattleMons[gActiveBank].hp; + gBattlescriptCurrInstr = gUnknown_082DAF05; + } + else + { + gDisableStructs[gActiveBank].perishSong1--; + gBattlescriptCurrInstr = gUnknown_082DAF20; + } + b_call_bc_move_exec(gBattlescriptCurrInstr); + return 1; + } + } + // Hm... + { + u8* var = &gBattleStruct->unk1A0; + *var = 2; + gBattleStruct->unk1A1 = 0; + } + // fall through + case 2: + if ((gBattleTypeFlags & BATTLE_TYPE_ARENA) + && gBattleStruct->unkDA == 2 + && gBattleMons[0].hp != 0 && gBattleMons[1].hp != 0) + { + s32 i; + + for (i = 0; i < 2; i++) + CancelMultiTurnMoves(i); + + gBattlescriptCurrInstr = gUnknown_082DB8F3; + b_call_bc_move_exec(gUnknown_082DB8F3); + gBattleStruct->unk1A0++; + return 1; + } + break; + } + + gHitMarker &= ~(HITMARKER_GRUDGE | HITMARKER_x20); + + return 0; +} + +#define sub_8041728_MAX_CASE 7 + +bool8 sub_8041728(void) +{ + if (gBattleTypeFlags & BATTLE_TYPE_SAFARI) + return FALSE; + do + { + int i; + switch (gBattleStruct->field_4D) + { + case 0: + gBattleStruct->field_4E = 0; + gBattleStruct->field_4D++; + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gAbsentBankFlags & gBitTable[i] && !sub_80423F4(i, 6, 6)) + gAbsentBankFlags &= ~(gBitTable[i]); + } + // fall through + case 1: + do + { + gBank1 = gBankTarget = gBattleStruct->field_4E; + if (gBattleMons[gBattleStruct->field_4E].hp == 0 + && !(gBattleStruct->unkDF & gBitTable[gBattlePartyID[gBattleStruct->field_4E]]) + && !(gAbsentBankFlags & gBitTable[gBattleStruct->field_4E])) + { + b_call_bc_move_exec(gUnknown_082DA7C4); + gBattleStruct->field_4D = 2; + return TRUE; + } + } while (++gBattleStruct->field_4E != gNoOfAllBanks); + gBattleStruct->field_4D = 3; + break; + case 2: + sub_803F9EC(gBank1); + if (++gBattleStruct->field_4E == gNoOfAllBanks) + gBattleStruct->field_4D = 3; + else + gBattleStruct->field_4D = 1; + break; + case 3: + gBattleStruct->field_4E = 0; + gBattleStruct->field_4D++; + // fall through + case 4: + do + { + gBank1 = gBankTarget = gBattleStruct->field_4E; //or should banks be switched? + if (gBattleMons[gBattleStruct->field_4E].hp == 0 + && !(gAbsentBankFlags & gBitTable[gBattleStruct->field_4E])) + { + b_call_bc_move_exec(gUnknown_082DA7CD); + gBattleStruct->field_4D = 5; + return TRUE; + } + } while (++gBattleStruct->field_4E != gNoOfAllBanks); + gBattleStruct->field_4D = 6; + break; + case 5: + if (++gBattleStruct->field_4E == gNoOfAllBanks) + gBattleStruct->field_4D = 6; + else + gBattleStruct->field_4D = 4; + break; + case 6: + if (AbilityBattleEffects(9, 0, 0, 0, 0) || AbilityBattleEffects(0xB, 0, 0, 0, 0) || ItemBattleEffects(1, 0, 1) || AbilityBattleEffects(6, 0, 0, 0, 0)) + return TRUE; + gBattleStruct->field_4D++; + break; + case 7: + break; + } + } while (gBattleStruct->field_4D != sub_8041728_MAX_CASE); + return FALSE; +} + +void b_clear_atk_up_if_hit_flag_unless_enraged(void) +{ + int i; + for (i = 0; i < gNoOfAllBanks; i++) + { + if ((gBattleMons[i].status2 & STATUS2_RAGE) && gChosenMovesByBanks[i] != MOVE_RAGE) + gBattleMons[i].status2 &= ~(STATUS2_RAGE); + } +} + +#define ATKCANCELLER_MAX_CASE 14 + +u8 AtkCanceller_UnableToUseMove(void) +{ + u8 effect = 0; + s32* bideDmg = &gBattleScripting.bideDmg; + do + { + switch (gBattleStruct->atkCancellerTracker) + { + case 0: // flags clear + gBattleMons[gBankAttacker].status2 &= ~(STATUS2_DESTINY_BOND); + gStatuses3[gBankAttacker] &= ~(STATUS3_GRUDGE); + gBattleStruct->atkCancellerTracker++; + break; + case 1: // check being asleep + if (gBattleMons[gBankAttacker].status1 & STATUS_SLEEP) + { + if (UproarWakeUpCheck(gBankAttacker)) + { + gBattleMons[gBankAttacker].status1 &= ~(STATUS_SLEEP); + gBattleMons[gBankAttacker].status2 &= ~(STATUS2_NIGHTMARE); + b_movescr_stack_push_cursor(); + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattlescriptCurrInstr = BattleScript_MoveUsedWokeUp; + effect = 2; + } + else + { + u8 toSub; + if (gBattleMons[gBankAttacker].ability == ABILITY_EARLY_BIRD) + toSub = 2; + else + toSub = 1; + if ((gBattleMons[gBankAttacker].status1 & STATUS_SLEEP) < toSub) + gBattleMons[gBankAttacker].status1 &= ~(STATUS_SLEEP); + else + gBattleMons[gBankAttacker].status1 -= toSub; + if (gBattleMons[gBankAttacker].status1 & STATUS_SLEEP) + { + if (gCurrentMove != MOVE_SNORE && gCurrentMove != MOVE_SLEEP_TALK) + { + gBattlescriptCurrInstr = BattleScript_MoveUsedIsAsleep; + gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; + effect = 2; + } + } + else + { + gBattleMons[gBankAttacker].status2 &= ~(STATUS2_NIGHTMARE); + b_movescr_stack_push_cursor(); + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattlescriptCurrInstr = BattleScript_MoveUsedWokeUp; + effect = 2; + } + } + } + gBattleStruct->atkCancellerTracker++; + break; + case 2: // check being frozen + if (gBattleMons[gBankAttacker].status1 & STATUS_FREEZE) + { + if (Random() % 5) + { + if (gBattleMoves[gCurrentMove].effect != EFFECT_THAW_HIT) // unfreezing via a move effect happens in case 13 + { + gBattlescriptCurrInstr = BattleScript_MoveUsedIsFrozen; + gHitMarker |= HITMARKER_NO_ATTACKSTRING; + } + else + { + gBattleStruct->atkCancellerTracker++; + break; + } + } + else // unfreeze + { + gBattleMons[gBankAttacker].status1 &= ~(STATUS_FREEZE); + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + effect = 2; + } + gBattleStruct->atkCancellerTracker++; + break; + case 3: // truant + if (gBattleMons[gBankAttacker].ability == ABILITY_TRUANT && gDisableStructs[gBankAttacker].truantCounter) + { + CancelMultiTurnMoves(gBankAttacker); + gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattlescriptCurrInstr = BattleScript_MoveUsedLoafingAround; + gBattleMoveFlags |= MOVESTATUS_MISSED; + effect = 1; + } + gBattleStruct->atkCancellerTracker++; + break; + case 4: // recharge + if (gBattleMons[gBankAttacker].status2 & STATUS2_RECHARGE) + { + gBattleMons[gBankAttacker].status2 &= ~(STATUS2_RECHARGE); + gDisableStructs[gBankAttacker].rechargeCounter = 0; + CancelMultiTurnMoves(gBankAttacker); + gBattlescriptCurrInstr = BattleScript_MoveUsedMustRecharge; + gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; + effect = 1; + } + gBattleStruct->atkCancellerTracker++; + break; + case 5: // flinch + if (gBattleMons[gBankAttacker].status2 & STATUS2_FLINCHED) + { + gBattleMons[gBankAttacker].status2 &= ~(STATUS2_FLINCHED); + gProtectStructs[gBankAttacker].flinchImmobility = 1; + CancelMultiTurnMoves(gBankAttacker); + gBattlescriptCurrInstr = BattleScript_MoveUsedFlinched; + gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; + effect = 1; + } + gBattleStruct->atkCancellerTracker++; + break; + case 6: // disabled move + if (gDisableStructs[gBankAttacker].disabledMove == gCurrentMove && gDisableStructs[gBankAttacker].disabledMove != 0) + { + gProtectStructs[gBankAttacker].usedDisabledMove = 1; + gBattleScripting.bank = gBankAttacker; + CancelMultiTurnMoves(gBankAttacker); + gBattlescriptCurrInstr = BattleScript_MoveUsedIsDisabled; + gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; + effect = 1; + } + gBattleStruct->atkCancellerTracker++; + break; + case 7: // taunt + if (gDisableStructs[gBankAttacker].tauntTimer1 && gBattleMoves[gCurrentMove].power == 0) + { + gProtectStructs[gBankAttacker].usedTauntedMove = 1; + CancelMultiTurnMoves(gBankAttacker); + gBattlescriptCurrInstr = BattleScript_MoveUsedIsTaunted; + gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; + effect = 1; + } + gBattleStruct->atkCancellerTracker++; + break; + case 8: // imprisoned + if (IsImprisoned(gBankAttacker, gCurrentMove)) + { + gProtectStructs[gBankAttacker].usedImprisionedMove = 1; + CancelMultiTurnMoves(gBankAttacker); + gBattlescriptCurrInstr = BattleScript_MoveUsedIsImprisoned; + gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; + effect = 1; + } + gBattleStruct->atkCancellerTracker++; + break; + case 9: // confusion + if (gBattleMons[gBankAttacker].status2 & STATUS2_CONFUSION) + { + gBattleMons[gBankAttacker].status2--; + if (gBattleMons[gBankAttacker].status2 & STATUS2_CONFUSION) + { + if (Random() & 1) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + b_movescr_stack_push_cursor(); + } + else // confusion dmg + { + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBankTarget = gBankAttacker; + gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[gBankAttacker], &gBattleMons[gBankAttacker], MOVE_POUND, 0, 40, 0, gBankAttacker, gBankAttacker); + gProtectStructs[gBankAttacker].confusionSelfDmg = 1; + gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; + } + gBattlescriptCurrInstr = BattleScript_MoveUsedIsConfused; + } + else // snapped out of confusion + { + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_MoveUsedIsConfusedNoMore; + } + effect = 1; + } + gBattleStruct->atkCancellerTracker++; + break; + case 10: // paralysis + if ((gBattleMons[gBankAttacker].status1 & STATUS_PARALYSIS) && (Random() % 4) == 0) + { + gProtectStructs[gBankAttacker].prlzImmobility = 1; + // This is removed in Emerald for some reason + //CancelMultiTurnMoves(gBankAttacker); + gBattlescriptCurrInstr = BattleScript_MoveUsedIsParalyzed; + gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; + effect = 1; + } + gBattleStruct->atkCancellerTracker++; + break; + case 11: // infatuation + if (gBattleMons[gBankAttacker].status2 & STATUS2_INFATUATION) + { + gBattleScripting.bank = CountTrailingZeroBits((gBattleMons[gBankAttacker].status2 & STATUS2_INFATUATION) >> 0x10); + if (Random() & 1) + b_movescr_stack_push_cursor(); + else + { + b_movescr_stack_push(BattleScript_MoveUsedIsParalyzedCantAttack); + gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; + gProtectStructs[gBankAttacker].loveImmobility = 1; + CancelMultiTurnMoves(gBankAttacker); + } + gBattlescriptCurrInstr = BattleScript_MoveUsedIsInLove; + effect = 1; + } + gBattleStruct->atkCancellerTracker++; + break; + case 12: // bide + if (gBattleMons[gBankAttacker].status2 & STATUS2_BIDE) + { + gBattleMons[gBankAttacker].status2 -= 0x100; + if (gBattleMons[gBankAttacker].status2 & STATUS2_BIDE) + gBattlescriptCurrInstr = BattleScript_BideStoringEnergy; + else + { + // This is removed in Emerald for some reason + //gBattleMons[gBankAttacker].status2 &= ~(STATUS2_MULTIPLETURNS); + if (gTakenDmg[gBankAttacker]) + { + gCurrentMove = MOVE_BIDE; + *bideDmg = gTakenDmg[gBankAttacker] * 2; + gBankTarget = gTakenDmgBanks[gBankAttacker]; + if (gAbsentBankFlags & gBitTable[gBankTarget]) + gBankTarget = GetMoveTarget(MOVE_BIDE, 1); + gBattlescriptCurrInstr = BattleScript_BideAttack; + } + else + gBattlescriptCurrInstr = BattleScript_BideNoEnergyToAttack; + } + effect = 1; + } + gBattleStruct->atkCancellerTracker++; + break; + case 13: // move thawing + if (gBattleMons[gBankAttacker].status1 & STATUS_FREEZE) + { + if (gBattleMoves[gCurrentMove].effect == EFFECT_THAW_HIT) + { + gBattleMons[gBankAttacker].status1 &= ~(STATUS_FREEZE); + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + effect = 2; + } + gBattleStruct->atkCancellerTracker++; + break; + case 14: // last case + break; + } + + } while (gBattleStruct->atkCancellerTracker != ATKCANCELLER_MAX_CASE && effect == 0); + + if (effect == 2) + { + gActiveBank = gBankAttacker; + EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); + MarkBufferBankForExecution(gActiveBank); + } + return effect; +} diff --git a/src/battle_ai.c b/src/battle_ai.c index 76bf4156d..3b696b84e 100644 --- a/src/battle_ai.c +++ b/src/battle_ai.c @@ -87,7 +87,7 @@ static u8 BattleAI_ChooseMoveOrAction_Singles(void); static u8 BattleAI_ChooseMoveOrAction_Doubles(void); static void RecordLastUsedMoveByTarget(void); static void BattleAI_DoAIProcessing(void); -static void AIStackPushVar(u8 *); +static void AIStackPushVar(const u8 *); static bool8 AIStackPop(void); static void BattleAICmd_if_random_less_than(void); @@ -192,7 +192,7 @@ static void BattleAICmd_if_holds_item(void); // ewram -EWRAM_DATA u8 *gAIScriptPtr = NULL; +EWRAM_DATA const u8 *gAIScriptPtr = NULL; EWRAM_DATA static u8 sBank_AI = 0; // const rom data @@ -2902,7 +2902,7 @@ static void BattleAICmd_if_flash_fired(void) gAIScriptPtr += 6; } -static void AIStackPushVar(u8 *var) +static void AIStackPushVar(const u8 *var) { gBattleResources->AI_ScriptsStack->ptr[gBattleResources->AI_ScriptsStack->size++] = var; } diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c new file mode 100644 index 000000000..d9fd40b84 --- /dev/null +++ b/src/hall_of_fame.c @@ -0,0 +1,4 @@ +#include "global.h" +#include "hall_of_fame.h" + + diff --git a/sym_ewram.txt b/sym_ewram.txt index 5c48c224d..a675fa4e2 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -346,7 +346,7 @@ gBattleMoveDamage: @ 20241F0 gUnknown_020241F4: @ 20241F4 .space 0x4 -gUnknown_020241F8: @ 20241F8 +gTakenDmg: @ 20241F8 .space 0x10 gLastUsedItem: @ 2024208 @@ -361,10 +361,10 @@ gBankAttacker: @ 202420B gBankTarget: @ 202420C .space 0x1 -gUnknown_0202420D: @ 202420D +gBank1: @ 202420D .space 0x1 -gUnknown_0202420E: @ 202420E +gEffectBank: @ 202420E .space 0x1 gStringBank: @ 202420F @@ -412,7 +412,7 @@ gUnknown_02024268: @ 2024268 gUnknown_02024270: @ 2024270 .space 0x4 -gUnknown_02024274: @ 2024274 +gChosenMovesByBanks: @ 2024274 .space 0x8 gBattleMoveFlags: @ 202427C @@ -424,7 +424,7 @@ gHitMarker: @ 2024280 gUnknown_02024284: @ 2024284 .space 0x4 -gUnknown_02024288: @ 2024288 +gTakenDmgBanks: @ 2024288 .space 0x4 gUnknown_0202428C: @ 202428C @@ -469,7 +469,7 @@ gSpecialStatuses: @ 202437C gBattleWeather: @ 20243CC .space 0x4 -gUnknown_020243D0: @ 20243D0 +gWishFutureKnock: @ 20243D0 .space 0x2C gUnknown_020243FC: @ 20243FC From 6439551e1a1effa0282145627aaef934a1b4b797 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 08:20:42 -0400 Subject: [PATCH 154/342] Another chunk of functions, including some expanded from macros --- asm/field_map_obj.s | 412 -------------------------------------- include/map_obj_8097404.h | 2 + src/field_map_obj.c | 61 ++++++ 3 files changed, 63 insertions(+), 412 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 25ec2cc28..c8fb45942 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,418 +5,6 @@ .text - thumb_func_start sub_8093AF0 -@ void sub_8093AF0(struct npc_state *fieldObject, struct obj *object, u8 direction) -sub_8093AF0: @ 8093AF0 - push {r4-r6,lr} - mov r6, r8 - push {r6} - sub sp, 0x4 - adds r6, r0, 0 - mov r8, r1 - lsls r5, r2, 24 - lsrs r5, 24 - ldrh r1, [r6, 0x10] - mov r0, sp - strh r1, [r0] - ldrh r0, [r6, 0x12] - mov r4, sp - adds r4, 0x2 - strh r0, [r4] - adds r0, r6, 0 - adds r1, r5, 0 - bl FieldObjectSetDirection - adds r0, r5, 0 - mov r1, sp - adds r2, r4, 0 - bl MoveCoords - mov r0, sp - movs r2, 0 - ldrsh r1, [r0, r2] - movs r0, 0 - ldrsh r2, [r4, r0] - adds r0, r6, 0 - bl npc_coords_shift - mov r0, r8 - adds r1, r5, 0 - bl sub_80976DC - mov r2, r8 - adds r2, 0x2C - ldrb r1, [r2] - movs r0, 0x41 - negs r0, r0 - ands r0, r1 - strb r0, [r2] - ldrb r0, [r6] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r6] - movs r0, 0x1 - mov r1, r8 - strh r0, [r1, 0x32] - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_8093AF0 - - thumb_func_start sub_8093B60 -@ void sub_8093B60(struct npc_state *fieldObject, struct obj *object, u8 direction) -sub_8093B60: @ 8093B60 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r2, 24 - lsrs r2, 24 - bl sub_8093AF0 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl get_go_image_anim_num - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl npc_apply_anim_looping - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8093B60 - - thumb_func_start an_walk_any_2 -@ bool8 an_walk_any_2(struct npc_state *fieldObject, struct obj *object) -an_walk_any_2: @ 8093B8C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl sub_80976EC - lsls r0, 24 - cmp r0, 0 - bne _08093BA2 - movs r0, 0 - b _08093BBE -_08093BA2: - adds r0, r4, 0 - bl npc_coords_shift_still - ldrb r0, [r4] - movs r1, 0x8 - orrs r0, r1 - strb r0, [r4] - adds r2, r5, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2] - movs r0, 0x1 -_08093BBE: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end an_walk_any_2 - - thumb_func_start sub_8093BC4 -sub_8093BC4: @ 8093BC4 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x7 - bl sub_8093B60 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093BE4 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093BC4 - - thumb_func_start sub_8093BE4 -sub_8093BE4: @ 8093BE4 - push {r4,lr} - adds r4, r1, 0 - bl an_walk_any_2 - lsls r0, 24 - cmp r0, 0 - bne _08093BF6 - movs r0, 0 - b _08093BFC -_08093BF6: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093BFC: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093BE4 - - thumb_func_start sub_8093C04 -sub_8093C04: @ 8093C04 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x8 - bl sub_8093B60 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093C24 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093C04 - - thumb_func_start sub_8093C24 -sub_8093C24: @ 8093C24 - push {r4,lr} - adds r4, r1, 0 - bl an_walk_any_2 - lsls r0, 24 - cmp r0, 0 - bne _08093C36 - movs r0, 0 - b _08093C3C -_08093C36: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093C3C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093C24 - - thumb_func_start sub_8093C44 -sub_8093C44: @ 8093C44 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x5 - bl sub_8093B60 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093C64 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093C44 - - thumb_func_start sub_8093C64 -sub_8093C64: @ 8093C64 - push {r4,lr} - adds r4, r1, 0 - bl an_walk_any_2 - lsls r0, 24 - cmp r0, 0 - bne _08093C76 - movs r0, 0 - b _08093C7C -_08093C76: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093C7C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093C64 - - thumb_func_start sub_8093C84 -sub_8093C84: @ 8093C84 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x6 - bl sub_8093B60 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093CA4 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093C84 - - thumb_func_start sub_8093CA4 -sub_8093CA4: @ 8093CA4 - push {r4,lr} - adds r4, r1, 0 - bl an_walk_any_2 - lsls r0, 24 - cmp r0, 0 - bne _08093CB6 - movs r0, 0 - b _08093CBC -_08093CB6: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093CBC: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093CA4 - - thumb_func_start sub_8093CC4 -@ bool8 sub_8093CC4(struct npc_state *fieldObject, struct obj *object) -sub_8093CC4: @ 8093CC4 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x1 - bl sub_8093B60 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093CE4 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093CC4 - - thumb_func_start sub_8093CE4 -@ bool8 sub_8093CE4(struct npc_state *fieldObject, struct obj *object) -sub_8093CE4: @ 8093CE4 - push {r4,lr} - adds r4, r1, 0 - bl an_walk_any_2 - lsls r0, 24 - cmp r0, 0 - bne _08093CF6 - movs r0, 0 - b _08093CFC -_08093CF6: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093CFC: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093CE4 - - thumb_func_start sub_8093D04 -sub_8093D04: @ 8093D04 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x2 - bl sub_8093B60 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093D24 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093D04 - - thumb_func_start sub_8093D24 -sub_8093D24: @ 8093D24 - push {r4,lr} - adds r4, r1, 0 - bl an_walk_any_2 - lsls r0, 24 - cmp r0, 0 - bne _08093D36 - movs r0, 0 - b _08093D3C -_08093D36: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093D3C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093D24 - - thumb_func_start sub_8093D44 -sub_8093D44: @ 8093D44 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x3 - bl sub_8093B60 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093D64 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093D44 - - thumb_func_start sub_8093D64 -sub_8093D64: @ 8093D64 - push {r4,lr} - adds r4, r1, 0 - bl an_walk_any_2 - lsls r0, 24 - cmp r0, 0 - bne _08093D76 - movs r0, 0 - b _08093D7C -_08093D76: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093D7C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093D64 - - thumb_func_start sub_8093D84 -sub_8093D84: @ 8093D84 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x4 - bl sub_8093B60 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093DA4 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093D84 - - thumb_func_start sub_8093DA4 -sub_8093DA4: @ 8093DA4 - push {r4,lr} - adds r4, r1, 0 - bl an_walk_any_2 - lsls r0, 24 - cmp r0, 0 - bne _08093DB6 - movs r0, 0 - b _08093DBC -_08093DB6: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093DBC: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093DA4 - thumb_func_start sub_8093DC4 sub_8093DC4: @ 8093DC4 push {r4,r5,lr} diff --git a/include/map_obj_8097404.h b/include/map_obj_8097404.h index e5e6fba70..85153f941 100644 --- a/include/map_obj_8097404.h +++ b/include/map_obj_8097404.h @@ -16,5 +16,7 @@ void npc_sync_anim_pause_bits(struct MapObject *); void oamt_npc_ministep_reset(struct Sprite *, u8, u8); u8 sub_8097F78(struct MapObject *); bool8 obj_npc_ministep(struct Sprite *sprite); +bool8 sub_80976EC(struct Sprite *sprite); +void sub_80976DC(struct Sprite *, u8); #endif //GUARD_MAP_OBJ_8097404_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index cd840ba70..bffce24ac 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4194,3 +4194,64 @@ bool8 npc_obj_ministep_stop_on_arrival(struct MapObject *mapObject, struct Sprit } return FALSE; } + +void sub_8093AF0(struct MapObject *mapObject, struct Sprite *sprite, u8 direction) +{ + s16 x; + s16 y; + + x = mapObject->coords2.x; + y = mapObject->coords2.y; + FieldObjectSetDirection(mapObject, direction); + MoveCoords(direction, &x, &y); + npc_coords_shift(mapObject, x, y); + sub_80976DC(sprite, direction); + sprite->animPaused = FALSE; + mapObject->mapobj_bit_2 = TRUE; + sprite->data2 = 1; +} + +void sub_8093B60(struct MapObject *mapObject, struct Sprite *sprite, u8 direction) +{ + sub_8093AF0(mapObject, sprite, direction); + npc_apply_anim_looping(mapObject, sprite, get_go_image_anim_num(mapObject->mapobj_unk_18)); +} + +bool8 an_walk_any_2(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (sub_80976EC(sprite)) + { + npc_coords_shift_still(mapObject); + mapObject->mapobj_bit_3 = TRUE; + sprite->animPaused = TRUE; + return TRUE; + } + return FALSE; +} + +#define an_walk_any_2_macro(name, dirn) \ +static bool8 name##_2(struct MapObject *, struct Sprite *);\ +bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + sub_8093B60(mapObject, sprite, dirn);\ + return name##_2(mapObject, sprite);\ +}\ +static bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + if (an_walk_any_2(mapObject, sprite))\ + {\ + sprite->data2 = 2;\ + return TRUE;\ + }\ + return FALSE;\ +} + +an_walk_any_2_macro(sub_8093BC4, 7) +an_walk_any_2_macro(sub_8093C04, 8) +an_walk_any_2_macro(sub_8093C44, 5) +an_walk_any_2_macro(sub_8093C84, 6) +an_walk_any_2_macro(sub_8093CC4, 1) +an_walk_any_2_macro(sub_8093D04, 2) +an_walk_any_2_macro(sub_8093D44, 3) +an_walk_any_2_macro(sub_8093D84, 4) + From 501baffc48a505231e650f67576a844f4d0d74c9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 08:26:27 -0400 Subject: [PATCH 155/342] Yet another chunk of highly similar functions --- asm/field_map_obj.s | 305 -------------------------------------------- src/field_map_obj.c | 25 ++++ 2 files changed, 25 insertions(+), 305 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index c8fb45942..405abb959 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,311 +5,6 @@ .text - thumb_func_start sub_8093DC4 -sub_8093DC4: @ 8093DC4 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x7 - movs r3, 0 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093DE4 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093DC4 - - thumb_func_start sub_8093DE4 -@ bool8 sub_8093DE4(struct npc_state *fieldObject, struct obj *object) -sub_8093DE4: @ 8093DE4 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08093DF6 - movs r0, 0 - b _08093DFC -_08093DF6: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093DFC: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093DE4 - - thumb_func_start sub_8093E04 -sub_8093E04: @ 8093E04 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x8 - movs r3, 0 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093E24 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093E04 - - thumb_func_start sub_8093E24 -sub_8093E24: @ 8093E24 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08093E36 - movs r0, 0 - b _08093E3C -_08093E36: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093E3C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093E24 - - thumb_func_start sub_8093E44 -sub_8093E44: @ 8093E44 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x5 - movs r3, 0 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093E64 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093E44 - - thumb_func_start sub_8093E64 -sub_8093E64: @ 8093E64 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08093E76 - movs r0, 0 - b _08093E7C -_08093E76: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093E7C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093E64 - - thumb_func_start sub_8093E84 -sub_8093E84: @ 8093E84 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x6 - movs r3, 0 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093EA4 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093E84 - - thumb_func_start sub_8093EA4 -sub_8093EA4: @ 8093EA4 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08093EB6 - movs r0, 0 - b _08093EBC -_08093EB6: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093EBC: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093EA4 - - thumb_func_start sub_8093EC4 -sub_8093EC4: @ 8093EC4 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x1 - movs r3, 0 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093EE4 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093EC4 - - thumb_func_start sub_8093EE4 -sub_8093EE4: @ 8093EE4 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08093EF6 - movs r0, 0 - b _08093EFC -_08093EF6: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093EFC: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093EE4 - - thumb_func_start sub_8093F04 -sub_8093F04: @ 8093F04 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x2 - movs r3, 0 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093F24 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093F04 - - thumb_func_start sub_8093F24 -sub_8093F24: @ 8093F24 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08093F36 - movs r0, 0 - b _08093F3C -_08093F36: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093F3C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093F24 - - thumb_func_start sub_8093F44 -sub_8093F44: @ 8093F44 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x3 - movs r3, 0 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093F64 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093F44 - - thumb_func_start sub_8093F64 -sub_8093F64: @ 8093F64 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08093F76 - movs r0, 0 - b _08093F7C -_08093F76: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093F7C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093F64 - - thumb_func_start sub_8093F84 -sub_8093F84: @ 8093F84 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x4 - movs r3, 0 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8093FA4 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8093F84 - - thumb_func_start sub_8093FA4 -sub_8093FA4: @ 8093FA4 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08093FB6 - movs r0, 0 - b _08093FBC -_08093FB6: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08093FBC: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8093FA4 - thumb_func_start sub_8093FC4 sub_8093FC4: @ 8093FC4 push {r4-r7,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index bffce24ac..648f6bd46 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4246,6 +4246,23 @@ static bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ return FALSE;\ } +#define npc_obj_ministep_stop_on_arrival_macro(name, dirn, speed) \ +static bool8 name##_2(struct MapObject *, struct Sprite *);\ +bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + do_go_anim(mapObject, sprite, dirn, speed);\ + return name##_2(mapObject, sprite);\ +}\ +static bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + if (npc_obj_ministep_stop_on_arrival(mapObject, sprite))\ + {\ + sprite->data2 = 2;\ + return TRUE;\ + }\ + return FALSE;\ +} + an_walk_any_2_macro(sub_8093BC4, 7) an_walk_any_2_macro(sub_8093C04, 8) an_walk_any_2_macro(sub_8093C44, 5) @@ -4254,4 +4271,12 @@ an_walk_any_2_macro(sub_8093CC4, 1) an_walk_any_2_macro(sub_8093D04, 2) an_walk_any_2_macro(sub_8093D44, 3) an_walk_any_2_macro(sub_8093D84, 4) +npc_obj_ministep_stop_on_arrival_macro(sub_8093DC4, 7, 0) +npc_obj_ministep_stop_on_arrival_macro(sub_8093E04, 8, 0) +npc_obj_ministep_stop_on_arrival_macro(sub_8093E44, 5, 0) +npc_obj_ministep_stop_on_arrival_macro(sub_8093E84, 6, 0) +npc_obj_ministep_stop_on_arrival_macro(sub_8093EC4, 1, 0) +npc_obj_ministep_stop_on_arrival_macro(sub_8093F04, 2, 0) +npc_obj_ministep_stop_on_arrival_macro(sub_8093F44, 3, 0) +npc_obj_ministep_stop_on_arrival_macro(sub_8093F84, 4, 0) From ed6e95fbd72e1619fda2de6b96d336f37ef8b300 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 08:30:36 -0400 Subject: [PATCH 156/342] Avoid using duplicate macros --- src/field_map_obj.c | 55 ++++++++++++++++----------------------------- 1 file changed, 19 insertions(+), 36 deletions(-) diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 648f6bd46..9446f5c67 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4229,16 +4229,16 @@ bool8 an_walk_any_2(struct MapObject *mapObject, struct Sprite *sprite) return FALSE; } -#define an_walk_any_2_macro(name, dirn) \ +#define an_walk_any_2_macro(name, fn1, fn2, ...) \ static bool8 name##_2(struct MapObject *, struct Sprite *);\ bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ {\ - sub_8093B60(mapObject, sprite, dirn);\ + fn1(mapObject, sprite, __VA_ARGS__);\ return name##_2(mapObject, sprite);\ }\ static bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ {\ - if (an_walk_any_2(mapObject, sprite))\ + if (fn2(mapObject, sprite))\ {\ sprite->data2 = 2;\ return TRUE;\ @@ -4246,37 +4246,20 @@ static bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ return FALSE;\ } -#define npc_obj_ministep_stop_on_arrival_macro(name, dirn, speed) \ -static bool8 name##_2(struct MapObject *, struct Sprite *);\ -bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ -{\ - do_go_anim(mapObject, sprite, dirn, speed);\ - return name##_2(mapObject, sprite);\ -}\ -static bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ -{\ - if (npc_obj_ministep_stop_on_arrival(mapObject, sprite))\ - {\ - sprite->data2 = 2;\ - return TRUE;\ - }\ - return FALSE;\ -} - -an_walk_any_2_macro(sub_8093BC4, 7) -an_walk_any_2_macro(sub_8093C04, 8) -an_walk_any_2_macro(sub_8093C44, 5) -an_walk_any_2_macro(sub_8093C84, 6) -an_walk_any_2_macro(sub_8093CC4, 1) -an_walk_any_2_macro(sub_8093D04, 2) -an_walk_any_2_macro(sub_8093D44, 3) -an_walk_any_2_macro(sub_8093D84, 4) -npc_obj_ministep_stop_on_arrival_macro(sub_8093DC4, 7, 0) -npc_obj_ministep_stop_on_arrival_macro(sub_8093E04, 8, 0) -npc_obj_ministep_stop_on_arrival_macro(sub_8093E44, 5, 0) -npc_obj_ministep_stop_on_arrival_macro(sub_8093E84, 6, 0) -npc_obj_ministep_stop_on_arrival_macro(sub_8093EC4, 1, 0) -npc_obj_ministep_stop_on_arrival_macro(sub_8093F04, 2, 0) -npc_obj_ministep_stop_on_arrival_macro(sub_8093F44, 3, 0) -npc_obj_ministep_stop_on_arrival_macro(sub_8093F84, 4, 0) +an_walk_any_2_macro(sub_8093BC4, sub_8093B60, an_walk_any_2, 7) +an_walk_any_2_macro(sub_8093C04, sub_8093B60, an_walk_any_2, 8) +an_walk_any_2_macro(sub_8093C44, sub_8093B60, an_walk_any_2, 5) +an_walk_any_2_macro(sub_8093C84, sub_8093B60, an_walk_any_2, 6) +an_walk_any_2_macro(sub_8093CC4, sub_8093B60, an_walk_any_2, 1) +an_walk_any_2_macro(sub_8093D04, sub_8093B60, an_walk_any_2, 2) +an_walk_any_2_macro(sub_8093D44, sub_8093B60, an_walk_any_2, 3) +an_walk_any_2_macro(sub_8093D84, sub_8093B60, an_walk_any_2, 4) +an_walk_any_2_macro(sub_8093DC4, do_go_anim, npc_obj_ministep_stop_on_arrival, 7, 0) +an_walk_any_2_macro(sub_8093E04, do_go_anim, npc_obj_ministep_stop_on_arrival, 8, 0) +an_walk_any_2_macro(sub_8093E44, do_go_anim, npc_obj_ministep_stop_on_arrival, 5, 0) +an_walk_any_2_macro(sub_8093E84, do_go_anim, npc_obj_ministep_stop_on_arrival, 6, 0) +an_walk_any_2_macro(sub_8093EC4, do_go_anim, npc_obj_ministep_stop_on_arrival, 1, 0) +an_walk_any_2_macro(sub_8093F04, do_go_anim, npc_obj_ministep_stop_on_arrival, 2, 0) +an_walk_any_2_macro(sub_8093F44, do_go_anim, npc_obj_ministep_stop_on_arrival, 3, 0) +an_walk_any_2_macro(sub_8093F84, do_go_anim, npc_obj_ministep_stop_on_arrival, 4, 0) From bf9a00250ba8f3d986b4829c0728ba620b58ec1c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 08:38:00 -0400 Subject: [PATCH 157/342] maybe_shadow_1 which may or may not be a shadow --- asm/field_map_obj.s | 126 -------------------------------------- include/data3.h | 1 + include/map_obj_8097404.h | 2 + src/field_map_obj.c | 25 ++++++++ 4 files changed, 28 insertions(+), 126 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 405abb959..23ee23b72 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,132 +5,6 @@ .text - thumb_func_start sub_8093FC4 -sub_8093FC4: @ 8093FC4 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x10 - adds r7, r0, 0 - mov r10, r1 - adds r4, r2, 0 - mov r8, r3 - ldr r0, [sp, 0x30] - lsls r4, 24 - lsrs r4, 24 - mov r1, r8 - lsls r1, 24 - lsrs r1, 24 - mov r8, r1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - ldr r1, =gUnknown_0850DFBC - add r0, sp, 0x4 - movs r2, 0x6 - bl memcpy - add r5, sp, 0xC - movs r0, 0 - strh r0, [r5] - mov r6, sp - adds r6, 0xE - strh r0, [r6] - adds r0, r7, 0 - adds r1, r4, 0 - bl FieldObjectSetDirection - mov r1, r8 - lsls r0, r1, 1 - add r0, sp - adds r0, 0x4 - movs r1, 0 - ldrsh r3, [r0, r1] - str r3, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - adds r2, r6, 0 - bl sub_8092F88 - ldrh r1, [r5] - ldrh r0, [r7, 0x10] - adds r1, r0 - lsls r1, 16 - asrs r1, 16 - ldrh r2, [r6] - ldrh r0, [r7, 0x12] - adds r2, r0 - lsls r2, 16 - asrs r2, 16 - adds r0, r7, 0 - bl npc_coords_shift - mov r0, r10 - adds r1, r4, 0 - mov r2, r8 - mov r3, r9 - bl sub_809783C - movs r0, 0x1 - mov r1, r10 - strh r0, [r1, 0x32] - movs r0, 0x2C - add r10, r0 - mov r0, r10 - ldrb r1, [r0] - movs r0, 0x41 - negs r0, r0 - ands r0, r1 - mov r1, r10 - strb r0, [r1] - ldrb r0, [r7] - movs r1, 0x4 - orrs r0, r1 - movs r1, 0x10 - orrs r0, r1 - strb r0, [r7] - add sp, 0x10 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8093FC4 - - thumb_func_start maybe_shadow_1 -maybe_shadow_1: @ 8094080 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - ldr r0, [sp, 0x10] - lsls r2, 24 - lsrs r2, 24 - lsls r3, 24 - lsrs r3, 24 - lsls r0, 24 - lsrs r0, 24 - str r0, [sp] - adds r0, r4, 0 - bl sub_8093FC4 - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl get_go_image_anim_num - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl npc_apply_anim_looping - adds r0, r4, 0 - bl DoShadowFieldEffect - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end maybe_shadow_1 - thumb_func_start sub_80940C4 @ int sub_80940C4(int a1, int a2, int a3) sub_80940C4: @ 80940C4 diff --git a/include/data3.h b/include/data3.h index 9cd6e2fe1..b9ddf3e55 100755 --- a/include/data3.h +++ b/include/data3.h @@ -44,5 +44,6 @@ extern const u8 gUnknown_0850DBA0[5]; extern bool8 (*const *const gUnknown_0850DC50[])(struct MapObject *, struct Sprite *); extern u8 (*const gUnknown_0850DEE8[5])(u8); +extern const s16 gUnknown_0850DFBC[3]; #endif //GUARD_DATA3_H diff --git a/include/map_obj_8097404.h b/include/map_obj_8097404.h index 85153f941..707860dbd 100644 --- a/include/map_obj_8097404.h +++ b/include/map_obj_8097404.h @@ -18,5 +18,7 @@ u8 sub_8097F78(struct MapObject *); bool8 obj_npc_ministep(struct Sprite *sprite); bool8 sub_80976EC(struct Sprite *sprite); void sub_80976DC(struct Sprite *, u8); +void sub_809783C(struct Sprite *, u8, u8, u8); +void DoShadowFieldEffect(struct MapObject *); #endif //GUARD_MAP_OBJ_8097404_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 9446f5c67..5852f220c 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4263,3 +4263,28 @@ an_walk_any_2_macro(sub_8093F04, do_go_anim, npc_obj_ministep_stop_on_arrival, 2 an_walk_any_2_macro(sub_8093F44, do_go_anim, npc_obj_ministep_stop_on_arrival, 3, 0) an_walk_any_2_macro(sub_8093F84, do_go_anim, npc_obj_ministep_stop_on_arrival, 4, 0) +void sub_8093FC4(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 speed, u8 a5) +{ + s16 displacements[ARRAY_COUNT(gUnknown_0850DFBC)]; + s16 x; + s16 y; + + memcpy(displacements, gUnknown_0850DFBC, sizeof gUnknown_0850DFBC); + x = 0; + y = 0; + FieldObjectSetDirection(mapObject, direction); + sub_8092F88(direction, &x, &y, displacements[speed], displacements[speed]); + npc_coords_shift(mapObject, mapObject->coords2.x + x, mapObject->coords2.y + y); + sub_809783C(sprite, direction, speed, a5); + sprite->data2 = 1; + sprite->animPaused = 0; + mapObject->mapobj_bit_2 = 1; + mapObject->mapobj_bit_4 = 1; +} + +void maybe_shadow_1(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 speed, u8 a4) +{ + sub_8093FC4(mapObject, sprite, direction, speed, a4); + npc_apply_anim_looping(mapObject, sprite, get_go_image_anim_num(mapObject->mapobj_unk_18)); + DoShadowFieldEffect(mapObject); +} From 8ee004b9b16f621e2ea9d4dffe5cfb34d3a1c38a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 08:45:24 -0400 Subject: [PATCH 158/342] sub_80940C4 which may or may not be a meme --- asm/field_map_obj.s | 97 --------------------------------------------- include/data3.h | 1 + src/field_map_obj.c | 28 +++++++++++++ 3 files changed, 29 insertions(+), 97 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 23ee23b72..8acfa8114 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,103 +5,6 @@ .text - thumb_func_start sub_80940C4 -@ int sub_80940C4(int a1, int a2, int a3) -sub_80940C4: @ 80940C4 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x10 - adds r6, r0, 0 - adds r7, r1, 0 - adds r4, r2, 0 - ldr r1, =gUnknown_0850DFC2 - add r0, sp, 0x4 - movs r2, 0x6 - bl memcpy - adds r0, r7, 0 - bl _call_via_r4 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - cmp r0, 0x1 - bne _08094154 - movs r1, 0x36 - ldrsh r0, [r7, r1] - lsls r0, 1 - add r0, sp - adds r0, 0x4 - movs r2, 0 - ldrsh r0, [r0, r2] - cmp r0, 0 - beq _08094154 - add r4, sp, 0xC - movs r0, 0 - strh r0, [r4] - mov r5, sp - adds r5, 0xE - strh r0, [r5] - ldrb r0, [r6, 0x18] - lsrs r0, 4 - movs r2, 0x36 - ldrsh r1, [r7, r2] - lsls r1, 1 - add r1, sp - adds r1, 0x4 - movs r2, 0 - ldrsh r3, [r1, r2] - str r3, [sp] - adds r1, r4, 0 - adds r2, r5, 0 - bl sub_8092F88 - ldrh r1, [r4] - ldrh r0, [r6, 0x10] - adds r1, r0 - lsls r1, 16 - asrs r1, 16 - ldrh r2, [r5] - ldrh r0, [r6, 0x12] - adds r2, r0 - lsls r2, 16 - asrs r2, 16 - adds r0, r6, 0 - bl npc_coords_shift - ldrb r0, [r6] - movs r1, 0x4 - orrs r0, r1 - movs r1, 0x10 - orrs r0, r1 - strb r0, [r6] - b _08094178 - .pool -_08094154: - mov r1, r8 - cmp r1, 0xFF - bne _08094178 - adds r0, r6, 0 - bl npc_coords_shift_still - ldrb r0, [r6] - movs r1, 0x8 - orrs r0, r1 - movs r1, 0x20 - orrs r0, r1 - strb r0, [r6] - adds r2, r7, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2] -_08094178: - mov r0, r8 - add sp, 0x10 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_80940C4 - thumb_func_start sub_8094188 sub_8094188: @ 8094188 push {lr} diff --git a/include/data3.h b/include/data3.h index b9ddf3e55..8151e418c 100755 --- a/include/data3.h +++ b/include/data3.h @@ -45,5 +45,6 @@ extern const u8 gUnknown_0850DBA0[5]; extern bool8 (*const *const gUnknown_0850DC50[])(struct MapObject *, struct Sprite *); extern u8 (*const gUnknown_0850DEE8[5])(u8); extern const s16 gUnknown_0850DFBC[3]; +extern const s16 gUnknown_0850DFC2[3]; #endif //GUARD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 5852f220c..3e3bbfa6f 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4288,3 +4288,31 @@ void maybe_shadow_1(struct MapObject *mapObject, struct Sprite *sprite, u8 direc npc_apply_anim_looping(mapObject, sprite, get_go_image_anim_num(mapObject->mapobj_unk_18)); DoShadowFieldEffect(mapObject); } + +u8 sub_80940C4(struct MapObject *mapObject, struct Sprite *sprite, u8 callback(struct Sprite *)) +{ + s16 displacements[ARRAY_COUNT(gUnknown_0850DFC2)]; + s16 x; + s16 y; + u8 result; + + memcpy(displacements, gUnknown_0850DFC2, sizeof gUnknown_0850DFC2); + result = callback(sprite); + if (result == 1 && displacements[sprite->data4] != 0) + { + x = 0; + y = 0; + sub_8092F88(mapObject->placeholder18, &x, &y, displacements[sprite->data4], displacements[sprite->data4]); + npc_coords_shift(mapObject, mapObject->coords2.x + x, mapObject->coords2.y + y); + mapObject->mapobj_bit_2 = TRUE; + mapObject->mapobj_bit_4 = TRUE; + } + else if (result == 0xFF) + { + npc_coords_shift_still(mapObject); + mapObject->mapobj_bit_3 = TRUE; + mapObject->mapobj_bit_5 = TRUE; + sprite->animPaused = TRUE; + } + return result; +} From c7592bc87c4b0f7007817784025046c304ca43c5 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 17 Sep 2017 15:19:15 +0200 Subject: [PATCH 159/342] finish porting cam's port --- asm/battle_3.s | 3583 +--------------------------------- asm/battle_4.s | 4 +- data/battle_scripts_1.s | 36 +- data/data2b.s | 16 +- include/battle.h | 52 +- include/pokemon.h | 6 + src/battle_3.c | 4072 ++++++++++++++++++++++++++++++++++++++- 7 files changed, 4128 insertions(+), 3641 deletions(-) diff --git a/asm/battle_3.s b/asm/battle_3.s index 56a77e658..646eba2d5 100644 --- a/asm/battle_3.s +++ b/asm/battle_3.s @@ -6,3561 +6,6 @@ .text - thumb_func_start sub_80423F4 -sub_80423F4: @ 80423F4 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - lsls r0, 24 - lsrs r4, r0, 24 - lsls r1, 24 - lsrs r1, 24 - mov r10, r1 - lsls r2, 24 - lsrs r2, 24 - mov r9, r2 - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _08042424 - movs r0, 0 - b _080426A0 - .pool -_08042424: - movs r0, 0x80 - lsls r0, 15 - ands r0, r1 - cmp r0, 0 - beq _0804249C - adds r0, r4, 0 - bl GetBankSide - lsls r0, 24 - ldr r1, =gEnemyParty - mov r8, r1 - cmp r0, 0 - bne _08042442 - ldr r2, =gPlayerParty - mov r8, r2 -_08042442: - movs r0, 0x2 - ands r0, r4 - lsls r0, 24 - lsrs r6, r0, 25 - lsls r0, r6, 1 - adds r4, r0, r6 - adds r0, r4, 0x3 - cmp r4, r0 - bge _0804248C - adds r7, r0, 0 -_08042456: - movs r0, 0x64 - muls r0, r4 - mov r1, r8 - adds r5, r1, r0 - adds r0, r5, 0 - movs r1, 0x39 - bl GetMonData - cmp r0, 0 - beq _08042486 - adds r0, r5, 0 - movs r1, 0x41 - bl GetMonData - cmp r0, 0 - beq _08042486 - adds r0, r5, 0 - movs r1, 0x41 - bl GetMonData - movs r1, 0xCE - lsls r1, 1 - cmp r0, r1 - bne _0804248C -_08042486: - adds r4, 0x1 - cmp r4, r7 - blt _08042456 -_0804248C: - movs r1, 0 - lsls r0, r6, 1 - adds r0, r6 - b _08042556 - .pool -_0804249C: - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0804256C - movs r0, 0x80 - lsls r0, 16 - ands r1, r0 - cmp r1, 0 - beq _080424E4 - adds r0, r4, 0 - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _080424D0 - ldr r2, =gPlayerParty - mov r8, r2 - adds r0, r4, 0 - bl sub_806D864 - lsls r0, 24 - lsrs r7, r0, 24 - b _08042502 - .pool -_080424D0: - ldr r0, =gEnemyParty - mov r8, r0 - movs r1, 0x1 - eors r1, r4 - negs r0, r1 - orrs r0, r1 - lsrs r6, r0, 31 - b _0804250C - .pool -_080424E4: - adds r0, r4, 0 - bl sub_806D864 - lsls r0, 24 - lsrs r7, r0, 24 - adds r0, r4, 0 - bl GetBankSide - lsls r0, 24 - ldr r1, =gEnemyParty - mov r8, r1 - cmp r0, 0 - bne _08042502 - ldr r2, =gPlayerParty - mov r8, r2 -_08042502: - adds r0, r7, 0 - bl sub_806D82C - lsls r0, 24 - lsrs r6, r0, 24 -_0804250C: - lsls r0, r6, 1 - adds r4, r0, r6 - adds r1, r4, 0x3 - mov r9, r0 - cmp r4, r1 - bge _08042550 - adds r7, r1, 0 -_0804251A: - movs r0, 0x64 - muls r0, r4 - mov r1, r8 - adds r5, r1, r0 - adds r0, r5, 0 - movs r1, 0x39 - bl GetMonData - cmp r0, 0 - beq _0804254A - adds r0, r5, 0 - movs r1, 0x41 - bl GetMonData - cmp r0, 0 - beq _0804254A - adds r0, r5, 0 - movs r1, 0x41 - bl GetMonData - movs r1, 0xCE - lsls r1, 1 - cmp r0, r1 - bne _08042550 -_0804254A: - adds r4, 0x1 - cmp r4, r7 - blt _0804251A -_08042550: - movs r1, 0 - mov r2, r9 - adds r0, r2, r6 -_08042556: - adds r0, 0x3 - cmp r4, r0 - bne _0804255E - movs r1, 0x1 -_0804255E: - adds r0, r1, 0 - b _080426A0 - .pool -_0804256C: - movs r0, 0x80 - lsls r0, 8 - ands r1, r0 - cmp r1, 0 - beq _080425DA - adds r0, r4, 0 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _080425DA - ldr r0, =gEnemyParty - mov r8, r0 - movs r6, 0x3 - cmp r4, 0x1 - bne _08042590 - movs r6, 0 -_08042590: - adds r4, r6, 0 - adds r6, r4, 0x3 - b _0804259E - .pool -_0804259C: - adds r4, 0x1 -_0804259E: - cmp r4, r6 - bge _080425D2 - movs r0, 0x64 - muls r0, r4 - mov r1, r8 - adds r5, r1, r0 - adds r0, r5, 0 - movs r1, 0x39 - bl GetMonData - cmp r0, 0 - beq _0804259C - adds r0, r5, 0 - movs r1, 0x41 - bl GetMonData - cmp r0, 0 - beq _0804259C - adds r0, r5, 0 - movs r1, 0x41 - bl GetMonData - movs r1, 0xCE - lsls r1, 1 - cmp r0, r1 - beq _0804259C -_080425D2: - movs r0, 0 - cmp r4, r6 - bne _080426A0 - b _0804269E -_080425DA: - adds r0, r4, 0 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _08042608 - movs r0, 0x1 - bl GetBankByPlayerAI - lsls r0, 24 - lsrs r7, r0, 24 - movs r0, 0x3 - bl GetBankByPlayerAI - lsls r0, 24 - lsrs r6, r0, 24 - ldr r2, =gEnemyParty - mov r8, r2 - b _08042620 - .pool -_08042608: - movs r0, 0 - bl GetBankByPlayerAI - lsls r0, 24 - lsrs r7, r0, 24 - movs r0, 0x2 - bl GetBankByPlayerAI - lsls r0, 24 - lsrs r6, r0, 24 - ldr r0, =gPlayerParty - mov r8, r0 -_08042620: - mov r1, r10 - cmp r1, 0x6 - bne _08042630 - ldr r1, =gBattlePartyID - lsls r0, r7, 1 - adds r0, r1 - ldrb r0, [r0] - mov r10, r0 -_08042630: - mov r2, r9 - cmp r2, 0x6 - bne _08042640 - ldr r1, =gBattlePartyID - lsls r0, r6, 1 - adds r0, r1 - ldrb r0, [r0] - mov r9, r0 -_08042640: - movs r4, 0 -_08042642: - movs r0, 0x64 - muls r0, r4 - mov r1, r8 - adds r5, r1, r0 - adds r0, r5, 0 - movs r1, 0x39 - bl GetMonData - cmp r0, 0 - beq _08042692 - adds r0, r5, 0 - movs r1, 0x41 - bl GetMonData - cmp r0, 0 - beq _08042692 - adds r0, r5, 0 - movs r1, 0x41 - bl GetMonData - movs r1, 0xCE - lsls r1, 1 - cmp r0, r1 - beq _08042692 - cmp r4, r10 - beq _08042692 - cmp r4, r9 - beq _08042692 - ldr r0, =gBattleStruct - ldr r1, [r0] - adds r0, r7, r1 - adds r0, 0x5C - ldrb r0, [r0] - cmp r4, r0 - beq _08042692 - adds r0, r6, r1 - adds r0, 0x5C - ldrb r0, [r0] - cmp r4, r0 - bne _08042698 -_08042692: - adds r4, 0x1 - cmp r4, 0x5 - ble _08042642 -_08042698: - movs r0, 0 - cmp r4, 0x6 - bne _080426A0 -_0804269E: - movs r0, 0x1 -_080426A0: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80423F4 - - thumb_func_start castform_switch -castform_switch: @ 80426BC - push {r4-r6,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r6, r0, 24 - movs r5, 0 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r6 - adds r4, r0, r1 - ldrh r1, [r4] - ldr r0, =0x00000181 - cmp r1, r0 - bne _08042760 - adds r0, r4, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x3B - bne _08042760 - ldrh r0, [r4, 0x28] - cmp r0, 0 - beq _08042760 - str r5, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0xD - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _0804270E - str r5, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0x4D - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _08042734 -_0804270E: - adds r2, r4, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0 - beq _08042734 - adds r1, r4, 0 - adds r1, 0x22 - ldrb r0, [r1] - cmp r0, 0 - beq _08042734 - strb r5, [r2] - strb r5, [r1] - movs r0, 0x1 - b _08042818 - .pool -_08042734: - movs r0, 0 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0xD - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - bne _08042760 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0x4D - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _08042764 -_08042760: - movs r0, 0 - b _08042818 -_08042764: - ldr r1, =gBattleWeather - ldrh r0, [r1] - movs r2, 0xE7 - ands r2, r0 - adds r4, r1, 0 - cmp r2, 0 - bne _08042792 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r6 - adds r1, r0, r1 - adds r3, r1, 0 - adds r3, 0x21 - ldrb r0, [r3] - cmp r0, 0 - beq _08042792 - adds r1, 0x22 - ldrb r0, [r1] - cmp r0, 0 - beq _08042792 - strb r2, [r3] - strb r2, [r1] - movs r5, 0x1 -_08042792: - ldrh r1, [r4] - movs r0, 0x60 - ands r0, r1 - cmp r0, 0 - beq _080427BE - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r6 - adds r1, r0, r1 - adds r2, r1, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0xA - beq _080427BE - adds r1, 0x22 - ldrb r0, [r1] - cmp r0, 0xA - beq _080427BE - movs r0, 0xA - strb r0, [r2] - strb r0, [r1] - movs r5, 0x2 -_080427BE: - ldrh r1, [r4] - movs r0, 0x7 - ands r0, r1 - cmp r0, 0 - beq _080427EA - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r6 - adds r1, r0, r1 - adds r2, r1, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0xB - beq _080427EA - adds r1, 0x22 - ldrb r0, [r1] - cmp r0, 0xB - beq _080427EA - movs r0, 0xB - strb r0, [r2] - strb r0, [r1] - movs r5, 0x3 -_080427EA: - ldrh r1, [r4] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08042816 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r6 - adds r1, r0, r1 - adds r2, r1, 0 - adds r2, 0x21 - ldrb r0, [r2] - cmp r0, 0xF - beq _08042816 - adds r1, 0x22 - ldrb r0, [r1] - cmp r0, 0xF - beq _08042816 - movs r0, 0xF - strb r0, [r2] - strb r0, [r1] - movs r5, 0x4 -_08042816: - adds r0, r5, 0 -_08042818: - add sp, 0x4 - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end castform_switch - - thumb_func_start AbilityBattleEffects -AbilityBattleEffects: @ 8042828 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x28 - ldr r4, [sp, 0x48] - lsls r0, 24 - lsrs r0, 24 - str r0, [sp, 0x4] - lsls r1, 24 - lsrs r1, 24 - mov r10, r1 - lsls r2, 24 - lsrs r6, r2, 24 - lsls r3, 24 - lsrs r3, 24 - mov r8, r3 - lsls r4, 16 - lsrs r4, 16 - movs r0, 0 - mov r9, r0 - ldr r5, =gBankAttacker - ldr r1, =gNoOfAllBanks - ldrb r0, [r5] - ldrb r1, [r1] - cmp r0, r1 - bcc _08042864 - mov r1, r10 - strb r1, [r5] -_08042864: - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _08042894 - ldr r1, =gBattlePartyID - ldrb r0, [r5] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r1, r0 - ldr r0, =gPlayerParty - b _080428A4 - .pool -_08042894: - ldr r1, =gBattlePartyID - ldrb r0, [r5] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r1, r0 - ldr r0, =gEnemyParty -_080428A4: - adds r7, r1, r0 - ldr r5, =gBankTarget - ldr r1, =gNoOfAllBanks - ldrb r0, [r5] - ldrb r1, [r1] - cmp r0, r1 - bcc _080428B6 - mov r2, r10 - strb r2, [r5] -_080428B6: - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _080428E8 - ldr r1, =gBattlePartyID - ldrb r0, [r5] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r1, r0 - ldr r0, =gPlayerParty - b _080428F8 - .pool -_080428E8: - ldr r1, =gBattlePartyID - ldrb r0, [r5] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r1, r0 - ldr r0, =gEnemyParty -_080428F8: - adds r5, r1, r0 - adds r0, r7, 0 - movs r1, 0xB - bl GetMonData - lsls r0, 16 - lsrs r0, 16 - str r0, [sp, 0x8] - adds r0, r7, 0 - movs r1, 0 - bl GetMonData - str r0, [sp, 0x10] - adds r0, r5, 0 - movs r1, 0xB - bl GetMonData - lsls r0, 16 - lsrs r0, 16 - str r0, [sp, 0xC] - adds r0, r5, 0 - movs r1, 0 - bl GetMonData - str r0, [sp, 0x14] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0804293A - bl _0804443A -_0804293A: - mov r3, r8 - cmp r3, 0 - beq _08042958 - ldr r0, =gLastUsedAbility - strb r3, [r0] - adds r7, r0, 0 - b _0804296E - .pool -_08042958: - ldr r2, =gLastUsedAbility - ldr r1, =gBattleMons - movs r0, 0x58 - mov r5, r10 - muls r5, r0 - adds r0, r5, 0 - adds r0, r1 - adds r0, 0x20 - ldrb r0, [r0] - strb r0, [r2] - adds r7, r2, 0 -_0804296E: - cmp r4, 0 - beq _08042980 - adds r5, r4, 0 - b _08042984 - .pool -_08042980: - ldr r0, =gCurrentMove - ldrh r5, [r0] -_08042984: - ldr r1, =gBattleStruct - ldr r0, [r1] - ldrb r0, [r0, 0x13] - mov r8, r1 - cmp r0, 0 - beq _080429A0 - movs r3, 0x3F - ands r3, r0 - b _080429AC - .pool -_080429A0: - ldr r1, =gBattleMoves - lsls r0, r5, 1 - adds r0, r5 - lsls r0, 2 - adds r0, r1 - ldrb r3, [r0, 0x2] -_080429AC: - ldr r0, [sp, 0x4] - cmp r0, 0x13 - bls _080429B6 - bl _0804441E -_080429B6: - lsls r0, 2 - ldr r1, =_080429C8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_080429C8: - .4byte _08042A18 - .4byte _08042CDC - .4byte _08042EF8 - .4byte _08042F8C - .4byte _080431AC - .4byte _08043908 - .4byte _08043C6C - .4byte _08043CBC - .4byte _08043D40 - .4byte _08043DC4 - .4byte _08043FE4 - .4byte _08043E08 - .4byte _08044028 - .4byte _08044084 - .4byte _080440E0 - .4byte _080441DC - .4byte _08044220 - .4byte _0804427C - .4byte _080443EC - .4byte _08044196 -_08042A18: - ldr r2, =gBankAttacker - ldr r0, =gNoOfAllBanks - ldrb r1, [r2] - adds r5, r0, 0 - ldrb r3, [r5] - cmp r1, r3 - bcc _08042A2A - mov r0, r10 - strb r0, [r2] -_08042A2A: - ldrb r0, [r7] - cmp r0, 0x2D - bne _08042A32 - b _08042BA8 -_08042A32: - cmp r0, 0x2D - bgt _08042A64 - cmp r0, 0xD - bne _08042A3C - b _08042CA4 -_08042A3C: - cmp r0, 0xD - bgt _08042A54 - cmp r0, 0x2 - bne _08042A46 - b _08042B78 -_08042A46: - bl _0804441E - .pool -_08042A54: - cmp r0, 0x16 - bne _08042A5A - b _08042C08 -_08042A5A: - cmp r0, 0x24 - bne _08042A60 - b _08042C68 -_08042A60: - bl _0804441E -_08042A64: - cmp r0, 0x46 - bne _08042A6A - b _08042BD8 -_08042A6A: - cmp r0, 0x46 - bgt _08042A78 - cmp r0, 0x3B - bne _08042A74 - b _08042C3C -_08042A74: - bl _0804441E -_08042A78: - cmp r0, 0x4D - bne _08042A7E - b _08042CA4 -_08042A7E: - cmp r0, 0xFF - beq _08042A86 - bl _0804441E -_08042A86: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 17 - ands r0, r1 - cmp r0, 0 - bne _08042B4C - bl weather_get_current - lsls r0, 24 - lsrs r0, 24 - subs r0, 0x3 - cmp r0, 0xA - bhi _08042B4C - lsls r0, 2 - ldr r1, =_08042AB4 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08042AB4: - .4byte _08042AE0 - .4byte _08042B4C - .4byte _08042AE0 - .4byte _08042B4C - .4byte _08042B4C - .4byte _08042B04 - .4byte _08042B4C - .4byte _08042B4C - .4byte _08042B4C - .4byte _08042B28 - .4byte _08042AE0 -_08042AE0: - ldr r2, =gBattleWeather - ldrh r1, [r2] - movs r0, 0x7 - ands r0, r1 - cmp r0, 0 - bne _08042B4C - movs r0, 0x5 - strh r0, [r2] - ldr r1, =gBattleScripting - movs r0, 0xA - strb r0, [r1, 0x10] - mov r2, r10 - strb r2, [r1, 0x17] - b _08042B42 - .pool -_08042B04: - ldr r3, =gBattleWeather - ldrh r1, [r3] - movs r2, 0x18 - adds r0, r2, 0 - ands r0, r1 - cmp r0, 0 - bne _08042B4C - strh r2, [r3] - ldr r1, =gBattleScripting - movs r0, 0xC - strb r0, [r1, 0x10] - mov r3, r10 - strb r3, [r1, 0x17] - b _08042B42 - .pool -_08042B28: - ldr r3, =gBattleWeather - ldrh r1, [r3] - movs r2, 0x60 - adds r0, r2, 0 - ands r0, r1 - cmp r0, 0 - bne _08042B4C - strh r2, [r3] - ldr r1, =gBattleScripting - movs r0, 0xB - strb r0, [r1, 0x10] - mov r5, r10 - strb r5, [r1, 0x17] -_08042B42: - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_08042B4C: - mov r0, r9 - cmp r0, 0 - bne _08042B56 - bl _0804443A -_08042B56: - bl weather_get_current - ldr r1, =gBattleCommunication - strb r0, [r1, 0x5] - ldr r0, =gUnknown_082DACE7 - bl b_push_move_exec - bl _0804441E - .pool -_08042B78: - ldr r2, =gBattleWeather - ldrh r1, [r2] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _08042B88 - bl _0804441E -_08042B88: - movs r0, 0x5 - strh r0, [r2] - ldr r0, =gUnknown_082DB430 - bl b_push_move_exec - ldr r0, =gBattleScripting - mov r1, r10 - strb r1, [r0, 0x17] - bl _080443D0 - .pool -_08042BA8: - ldr r2, =gBattleWeather - ldrh r1, [r2] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _08042BB8 - bl _0804441E -_08042BB8: - movs r0, 0x18 - strh r0, [r2] - ldr r0, =gUnknown_082DB470 - bl b_push_move_exec - ldr r0, =gBattleScripting - mov r2, r10 - strb r2, [r0, 0x17] - bl _080443D0 - .pool -_08042BD8: - ldr r2, =gBattleWeather - ldrh r1, [r2] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _08042BE8 - bl _0804441E -_08042BE8: - movs r0, 0x60 - strh r0, [r2] - ldr r0, =gUnknown_082DB52A - bl b_push_move_exec - ldr r0, =gBattleScripting - mov r3, r10 - strb r3, [r0, 0x17] - bl _080443D0 - .pool -_08042C08: - ldr r0, =gSpecialStatuses - mov r5, r10 - lsls r2, r5, 2 - adds r1, r2, r5 - lsls r1, 2 - adds r3, r1, r0 - ldrb r0, [r3] - lsls r0, 28 - cmp r0, 0 - bge _08042C20 - bl _0804441E -_08042C20: - ldr r1, =gStatuses3 - adds r1, r2, r1 - ldr r0, [r1] - movs r2, 0x80 - lsls r2, 12 - orrs r0, r2 - str r0, [r1] - ldrb r0, [r3] - movs r1, 0x8 - b _08042C92 - .pool -_08042C3C: - mov r0, r10 - bl castform_switch - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - cmp r0, 0 - bne _08042C50 - bl _0804443A -_08042C50: - ldr r0, =gUnknown_082DB4A9 - bl b_push_move_exec - ldr r0, =gBattleScripting - mov r1, r10 - strb r1, [r0, 0x17] - bl _080442E2 - .pool -_08042C68: - ldr r0, =gSpecialStatuses - mov r3, r10 - lsls r2, r3, 2 - adds r1, r2, r3 - lsls r1, 2 - adds r3, r1, r0 - ldrb r0, [r3] - lsls r0, 27 - cmp r0, 0 - bge _08042C80 - bl _0804441E -_08042C80: - ldr r1, =gStatuses3 - adds r1, r2, r1 - ldr r0, [r1] - movs r2, 0x80 - lsls r2, 13 - orrs r0, r2 - str r0, [r1] - ldrb r0, [r3] - movs r1, 0x10 -_08042C92: - orrs r0, r1 - strb r0, [r3] - bl _0804441E - .pool -_08042CA4: - movs r6, 0 - ldrb r5, [r5] - cmp r6, r5 - bcc _08042CB0 - bl _0804441E -_08042CB0: - adds r0, r6, 0 - bl castform_switch - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - cmp r0, 0 - beq _08042CC4 - bl _080442D8 -_08042CC4: - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r6, r0 - bcc _08042CB0 - bl _0804441E - .pool -_08042CDC: - ldr r5, =gBattleMons - mov r8, r5 - movs r0, 0x58 - mov r6, r10 - muls r6, r0 - adds r4, r6, r5 - ldrh r0, [r4, 0x28] - cmp r0, 0 - bne _08042CF2 - bl _0804441E -_08042CF2: - ldr r0, =gBankAttacker - mov r1, r10 - strb r1, [r0] - ldrb r5, [r7] - cmp r5, 0x2C - beq _08042D22 - cmp r5, 0x2C - bgt _08042D14 - cmp r5, 0x3 - bne _08042D08 - b _08042E84 -_08042D08: - bl _0804441E - .pool -_08042D14: - cmp r5, 0x36 - bne _08042D1A - b _08042ED0 -_08042D1A: - cmp r5, 0x3D - beq _08042DA0 - bl _0804441E -_08042D22: - movs r0, 0 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0xD - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - beq _08042D3E - bl _0804441E -_08042D3E: - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0x4D - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _08042D56 - bl _0804441E -_08042D56: - ldr r0, =gBattleWeather - ldrh r1, [r0] - movs r0, 0x7 - ands r0, r1 - cmp r0, 0 - bne _08042D66 - bl _0804441E -_08042D66: - ldrh r0, [r4, 0x2C] - ldrh r2, [r4, 0x28] - cmp r0, r2 - bhi _08042D72 - bl _0804441E -_08042D72: - strb r5, [r7] - ldr r0, =gUnknown_082DB45C - bl b_push_move_exec - ldr r1, =gBattleMoveDamage - ldrh r0, [r4, 0x2C] - lsrs r0, 4 - str r0, [r1] - cmp r0, 0 - bne _08042D8A - movs r0, 0x1 - str r0, [r1] -_08042D8A: - ldr r0, [r1] - negs r0, r0 - str r0, [r1] - bl _080443D0 - .pool -_08042DA0: - mov r0, r8 - adds r0, 0x4C - adds r5, r6, r0 - ldrb r0, [r5] - cmp r0, 0 - bne _08042DB0 - bl _0804441E -_08042DB0: - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - bl __umodsi3 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, 0 - beq _08042DCA - bl _0804441E -_08042DCA: - ldr r0, [r5] - movs r1, 0x88 - ands r0, r1 - cmp r0, 0 - beq _08042DDC - ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC70 - bl StringCopy -_08042DDC: - ldr r0, [r5] - movs r1, 0x7 - ands r0, r1 - cmp r0, 0 - beq _08042DEE - ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC78 - bl StringCopy -_08042DEE: - ldr r0, [r5] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - beq _08042E00 - ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC80 - bl StringCopy -_08042E00: - ldr r0, [r5] - movs r1, 0x10 - ands r0, r1 - cmp r0, 0 - beq _08042E12 - ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC88 - bl StringCopy -_08042E12: - ldr r0, [r5] - movs r1, 0x20 - ands r0, r1 - cmp r0, 0 - beq _08042E24 - ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC90 - bl StringCopy -_08042E24: - str r4, [r5] - mov r1, r8 - adds r1, 0x50 - adds r1, r6, r1 - ldr r0, [r1] - ldr r2, =0xf7ffffff - ands r0, r2 - str r0, [r1] - ldr r0, =gBattleScripting - ldr r4, =gActiveBank - mov r3, r10 - strb r3, [r4] - strb r3, [r0, 0x17] - ldr r0, =gUnknown_082DB484 - bl b_push_move_exec - str r5, [sp] - movs r0, 0 - movs r1, 0x28 - movs r2, 0 - movs r3, 0x4 - bl EmitSetAttributes - ldrb r0, [r4] - bl MarkBufferBankForExecution - bl _080443D0 - .pool -_08042E84: - ldrb r2, [r4, 0x1B] - movs r0, 0x1B - ldrsb r0, [r4, r0] - cmp r0, 0xB - ble _08042E92 - bl _0804441E -_08042E92: - ldr r0, =gDisableStructs - mov r5, r10 - lsls r1, r5, 3 - subs r1, r5 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x16] - cmp r0, 0x2 - bne _08042EA8 - bl _0804441E -_08042EA8: - adds r0, r2, 0x1 - movs r1, 0 - strb r0, [r4, 0x1B] - ldr r4, =gBattleScripting - movs r0, 0x11 - strb r0, [r4, 0x10] - strb r1, [r4, 0x11] - ldr r0, =gUnknown_082DB444 - bl b_push_move_exec - strb r5, [r4, 0x17] - bl _080443D0 - .pool -_08042ED0: - ldr r2, =gDisableStructs - ldrb r0, [r0] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r1, r2 - ldrb r3, [r1, 0x18] - lsls r0, r3, 31 - lsrs r0, 31 - movs r2, 0x1 - eors r2, r0 - movs r0, 0x2 - negs r0, r0 - ands r0, r3 - orrs r0, r2 - strb r0, [r1, 0x18] - bl _0804441E - .pool -_08042EF8: - ldrb r0, [r7] - cmp r0, 0x2B - beq _08042F02 - bl _0804441E -_08042F02: - movs r4, 0 - ldr r0, =gUnknown_0831BCF8 - ldrh r2, [r0] - ldr r3, =0x0000ffff - adds r1, r0, 0 - cmp r2, r3 - bne _08042F14 - bl _0804441E -_08042F14: - cmp r2, r5 - beq _08042F2C - adds r2, r1, 0 -_08042F1A: - adds r2, 0x2 - adds r4, 0x1 - ldrh r0, [r2] - cmp r0, r3 - bne _08042F28 - bl _0804441E -_08042F28: - cmp r0, r5 - bne _08042F1A -_08042F2C: - lsls r0, r4, 1 - adds r0, r1 - ldrh r1, [r0] - ldr r0, =0x0000ffff - cmp r1, r0 - bne _08042F3C - bl _0804441E -_08042F3C: - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 5 - ands r0, r1 - cmp r0, 0 - beq _08042F62 - ldr r0, =gHitMarker - ldr r1, [r0] - movs r2, 0x80 - lsls r2, 4 - orrs r1, r2 - str r1, [r0] -_08042F62: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB61F - str r0, [r1] - movs r0, 0x1 - mov r9, r0 - bl _08044424 - .pool -_08042F8C: - cmp r5, 0 - bne _08042F94 - bl _0804441E -_08042F94: - ldrb r0, [r7] - cmp r0, 0xB - beq _08043004 - cmp r0, 0xB - bgt _08042FA4 - cmp r0, 0xA - beq _08042FAA - b _08043126 -_08042FA4: - cmp r0, 0x12 - beq _0804305C - b _08043126 -_08042FAA: - cmp r3, 0xD - beq _08042FB0 - b _08043126 -_08042FB0: - ldr r0, =gBattleMoves - lsls r1, r5, 1 - adds r1, r5 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x1] - cmp r0, 0 - bne _08042FC2 - b _08043126 -_08042FC2: - ldr r1, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0, 0x2] - lsls r0, 28 - cmp r0, 0 - bge _08042FF0 - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB56F - b _08042FF4 - .pool -_08042FF0: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB56E -_08042FF4: - str r0, [r1] - movs r1, 0x1 - b _08043124 - .pool -_08043004: - cmp r3, 0xB - beq _0804300A - b _08043126 -_0804300A: - ldr r0, =gBattleMoves - lsls r1, r5, 1 - adds r1, r5 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x1] - cmp r0, 0 - bne _0804301C - b _08043126 -_0804301C: - ldr r1, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0, 0x2] - lsls r0, 28 - cmp r0, 0 - bge _08043048 - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB56F - b _0804304C - .pool -_08043048: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB56E -_0804304C: - str r0, [r1] - movs r2, 0x1 - mov r9, r2 - b _08043126 - .pool -_0804305C: - cmp r3, 0xA - bne _08043126 - ldr r1, =gBattleMons - movs r0, 0x58 - mov r3, r10 - muls r3, r0 - adds r0, r3, 0 - adds r1, 0x4C - adds r0, r1 - ldr r0, [r0] - movs r1, 0x20 - ands r0, r1 - cmp r0, 0 - bne _08043126 - ldr r2, =gBattleResources - ldr r0, [r2] - ldr r0, [r0, 0x4] - mov r5, r10 - lsls r1, r5, 2 - adds r0, r1 - ldr r3, [r0] - movs r4, 0x1 - ands r3, r4 - adds r5, r1, 0 - cmp r3, 0 - bne _080430EC - ldr r0, =gBattleCommunication - strb r3, [r0, 0x5] - ldr r1, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0, 0x2] - lsls r0, 28 - cmp r0, 0 - bge _080430C8 - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB5A8 - b _080430CC - .pool -_080430C8: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB5A7 -_080430CC: - str r0, [r1] - ldr r0, [r2] - ldr r1, [r0, 0x4] - adds r1, r5 - ldr r0, [r1] - movs r2, 0x1 - orrs r0, r2 - str r0, [r1] - movs r0, 0x2 - mov r9, r0 - b _08043126 - .pool -_080430EC: - ldr r0, =gBattleCommunication - strb r4, [r0, 0x5] - ldr r1, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0, 0x2] - lsls r0, 28 - cmp r0, 0 - bge _0804311C - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB5A8 - b _08043120 - .pool -_0804311C: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB5A7 -_08043120: - str r0, [r1] - movs r1, 0x2 -_08043124: - mov r9, r1 -_08043126: - mov r2, r9 - cmp r2, 0x1 - beq _08043130 - bl _0804441E -_08043130: - ldr r1, =gBattleMons - movs r0, 0x58 - mov r3, r10 - muls r3, r0 - adds r0, r3, 0 - adds r1, r0, r1 - ldrh r0, [r1, 0x2C] - ldrh r5, [r1, 0x28] - cmp r0, r5 - bne _0804318C - ldr r1, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0, 0x2] - lsls r0, 28 - cmp r0, 0 - bge _08043178 - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB592 - str r0, [r1] - bl _0804441E - .pool -_08043178: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB591 - str r0, [r1] - bl _0804441E - .pool -_0804318C: - ldr r2, =gBattleMoveDamage - ldrh r0, [r1, 0x2C] - lsrs r0, 2 - str r0, [r2] - cmp r0, 0 - bne _0804319C - mov r0, r9 - str r0, [r2] -_0804319C: - ldr r0, [r2] - negs r0, r0 - str r0, [r2] - bl _0804441E - .pool -_080431AC: - ldrb r0, [r7] - subs r0, 0x9 - cmp r0, 0x2F - bls _080431B8 - bl _0804441E -_080431B8: - lsls r0, 2 - ldr r1, =_080431C8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_080431C8: - .4byte _080435E4 - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _08043288 - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _08043350 - .4byte _0804441E - .4byte _0804441E - .4byte _08043410 - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _08043508 - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _080436C0 - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804441E - .4byte _0804379C -_08043288: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _08043298 - bl _0804441E -_08043298: - cmp r5, 0xA5 - bne _080432A0 - bl _0804441E -_080432A0: - ldr r0, =gBattleMoves - lsls r1, r5, 1 - adds r1, r5 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x1] - cmp r0, 0 - bne _080432B4 - bl _0804441E -_080432B4: - ldr r2, =gSpecialStatuses - ldr r0, =gBankTarget - ldrb r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r1, r0, 2 - adds r0, r2, 0 - adds r0, 0x8 - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _080432DC - adds r0, r2, 0 - adds r0, 0xC - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _080432DC - bl _0804441E -_080432DC: - ldr r1, =gBattleMons - movs r0, 0x58 - mov r2, r10 - muls r2, r0 - adds r0, r2, 0 - adds r1, r0, r1 - adds r4, r1, 0 - adds r4, 0x21 - ldrb r0, [r4] - cmp r0, r3 - bne _080432F6 - bl _0804441E -_080432F6: - adds r2, r1, 0 - adds r2, 0x22 - ldrb r0, [r2] - cmp r0, r3 - bne _08043304 - bl _0804441E -_08043304: - ldrh r0, [r1, 0x28] - cmp r0, 0 - bne _0804330E - bl _0804441E -_0804330E: - strb r3, [r4] - strb r3, [r2] - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x3 - strb r0, [r1, 0x1] - strb r3, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB64D - str r0, [r1] - bl _080443D0 - .pool -_08043350: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _08043360 - bl _0804441E -_08043360: - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r3, r0, r1 - ldrh r0, [r3, 0x28] - cmp r0, 0 - bne _08043376 - bl _0804441E -_08043376: - ldr r0, =gProtectStructs - lsls r1, r2, 4 - adds r1, r0 - ldrb r0, [r1, 0x1] - lsls r0, 31 - cmp r0, 0 - beq _08043388 - bl _0804441E -_08043388: - ldr r2, =gSpecialStatuses - ldr r0, =gBankTarget - ldrb r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r1, r0, 2 - adds r0, r2, 0 - adds r0, 0x8 - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _080433B0 - adds r0, r2, 0 - adds r0, 0xC - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _080433B0 - bl _0804441E -_080433B0: - ldr r1, =gBattleMoves - lsls r0, r5, 1 - adds r0, r5 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x8] - movs r2, 0x1 - adds r0, r2, 0 - ands r0, r1 - cmp r0, 0 - bne _080433CA - bl _0804441E -_080433CA: - ldr r1, =gBattleMoveDamage - ldrh r0, [r3, 0x2C] - lsrs r0, 4 - str r0, [r1] - cmp r0, 0 - bne _080433D8 - str r2, [r1] -_080433D8: - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB654 - str r0, [r1] - bl _080443D0 - .pool -_08043410: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _08043420 - bl _0804441E -_08043420: - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _08043436 - bl _0804441E -_08043436: - ldr r0, =gProtectStructs - lsls r1, r2, 4 - adds r1, r0 - ldrb r0, [r1, 0x1] - lsls r0, 31 - cmp r0, 0 - beq _08043448 - bl _0804441E -_08043448: - ldr r2, =gSpecialStatuses - ldr r0, =gBankTarget - ldrb r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r1, r0, 2 - adds r0, r2, 0 - adds r0, 0x8 - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _08043470 - adds r0, r2, 0 - adds r0, 0xC - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _08043470 - bl _0804441E -_08043470: - ldr r1, =gBattleMoves - lsls r0, r5, 1 - adds r0, r5 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x8] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _08043488 - bl _0804441E -_08043488: - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0xA - bl __umodsi3 - lsls r0, 16 - cmp r0, 0 - beq _080434A0 - bl _0804441E -_080434A0: - ldr r5, =gBattleCommunication - movs r4, 0x3 -_080434A4: - bl Random - ands r0, r4 - strb r0, [r5, 0x3] - cmp r0, 0 - beq _080434A4 - ldr r1, =gBattleCommunication - ldrb r0, [r1, 0x3] - cmp r0, 0x3 - bne _080434BC - adds r0, 0x2 - strb r0, [r1, 0x3] -_080434BC: - ldrb r0, [r1, 0x3] - adds r0, 0x40 - strb r0, [r1, 0x3] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB67C - str r0, [r1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 6 - orrs r0, r1 - str r0, [r2] - bl _080443D0 - .pool -_08043508: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _08043518 - bl _0804441E -_08043518: - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _0804352E - bl _0804441E -_0804352E: - ldr r0, =gProtectStructs - lsls r1, r2, 4 - adds r1, r0 - ldrb r0, [r1, 0x1] - lsls r0, 31 - cmp r0, 0 - beq _08043540 - bl _0804441E -_08043540: - ldr r2, =gSpecialStatuses - ldr r0, =gBankTarget - ldrb r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r1, r0, 2 - adds r0, r2, 0 - adds r0, 0x8 - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _08043568 - adds r0, r2, 0 - adds r0, 0xC - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _08043568 - bl _0804441E -_08043568: - ldr r1, =gBattleMoves - lsls r0, r5, 1 - adds r0, r5 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x8] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _08043580 - bl _0804441E -_08043580: - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - bl __umodsi3 - lsls r0, 16 - cmp r0, 0 - beq _08043598 - bl _0804441E -_08043598: - ldr r1, =gBattleCommunication - movs r0, 0x42 - strb r0, [r1, 0x3] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB67C - str r0, [r1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 6 - orrs r0, r1 - str r0, [r2] - bl _080443D0 - .pool -_080435E4: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _080435F4 - bl _0804441E -_080435F4: - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _0804360A - bl _0804441E -_0804360A: - ldr r0, =gProtectStructs - lsls r1, r2, 4 - adds r1, r0 - ldrb r0, [r1, 0x1] - lsls r0, 31 - cmp r0, 0 - beq _0804361C - bl _0804441E -_0804361C: - ldr r2, =gSpecialStatuses - ldr r0, =gBankTarget - ldrb r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r1, r0, 2 - adds r0, r2, 0 - adds r0, 0x8 - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _08043644 - adds r0, r2, 0 - adds r0, 0xC - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _08043644 - bl _0804441E -_08043644: - ldr r1, =gBattleMoves - lsls r0, r5, 1 - adds r0, r5 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x8] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _0804365C - bl _0804441E -_0804365C: - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - bl __umodsi3 - lsls r0, 16 - cmp r0, 0 - beq _08043674 - bl _0804441E -_08043674: - ldr r1, =gBattleCommunication - movs r0, 0x45 - strb r0, [r1, 0x3] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB67C - str r0, [r1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 6 - orrs r0, r1 - str r0, [r2] - bl _080443D0 - .pool -_080436C0: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _080436D0 - bl _0804441E -_080436D0: - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _080436E6 - bl _0804441E -_080436E6: - ldr r0, =gProtectStructs - lsls r1, r2, 4 - adds r1, r0 - ldrb r0, [r1, 0x1] - lsls r0, 31 - cmp r0, 0 - beq _080436F8 - bl _0804441E -_080436F8: - ldr r1, =gBattleMoves - lsls r0, r5, 1 - adds r0, r5 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x8] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _08043710 - bl _0804441E -_08043710: - ldr r2, =gSpecialStatuses - ldr r0, =gBankTarget - ldrb r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r1, r0, 2 - adds r0, r2, 0 - adds r0, 0x8 - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _08043738 - adds r0, r2, 0 - adds r0, 0xC - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _08043738 - bl _0804441E -_08043738: - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - bl __umodsi3 - lsls r0, 16 - cmp r0, 0 - beq _08043750 - bl _0804441E -_08043750: - ldr r1, =gBattleCommunication - movs r0, 0x43 - strb r0, [r1, 0x3] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB67C - str r0, [r1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 6 - orrs r0, r1 - str r0, [r2] - bl _080443D0 - .pool -_0804379C: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _080437AC - bl _0804441E -_080437AC: - ldr r6, =gBattleMons - ldr r3, =gBankAttacker - mov r8, r3 - ldrb r1, [r3] - movs r7, 0x58 - adds r0, r1, 0 - muls r0, r7 - adds r0, r6 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _080437C6 - bl _0804441E -_080437C6: - ldr r0, =gProtectStructs - lsls r1, 4 - adds r1, r0 - ldrb r0, [r1, 0x1] - lsls r0, 31 - cmp r0, 0 - beq _080437D8 - bl _0804441E -_080437D8: - ldr r1, =gBattleMoves - lsls r0, r5, 1 - adds r0, r5 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x8] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _080437F0 - bl _0804441E -_080437F0: - ldr r3, =gSpecialStatuses - ldr r5, =gBankTarget - ldrb r1, [r5] - lsls r0, r1, 2 - adds r0, r1 - lsls r2, r0, 2 - adds r0, r3, 0 - adds r0, 0x8 - adds r0, r2, r0 - ldr r0, [r0] - cmp r0, 0 - bne _08043818 - adds r0, r3, 0 - adds r0, 0xC - adds r0, r2, r0 - ldr r0, [r0] - cmp r0, 0 - bne _08043818 - bl _0804441E -_08043818: - adds r0, r1, 0 - muls r0, r7 - adds r0, r6 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _08043828 - bl _0804441E -_08043828: - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - bl __umodsi3 - lsls r0, 16 - cmp r0, 0 - beq _08043840 - bl _0804441E -_08043840: - mov r1, r8 - ldrb r0, [r1] - muls r0, r7 - adds r0, r6 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0xC - bne _08043854 - bl _0804441E -_08043854: - ldr r0, [sp, 0x8] - ldr r1, [sp, 0x10] - bl GetGenderFromSpeciesAndPersonality - adds r4, r0, 0 - ldr r0, [sp, 0xC] - ldr r1, [sp, 0x14] - bl GetGenderFromSpeciesAndPersonality - lsls r4, 24 - lsls r0, 24 - cmp r4, r0 - bne _08043872 - bl _0804441E -_08043872: - mov r2, r8 - ldrb r0, [r2] - muls r0, r7 - adds r4, r6, 0 - adds r4, 0x50 - adds r0, r4 - ldr r0, [r0] - movs r1, 0xF0 - lsls r1, 12 - ands r0, r1 - cmp r0, 0 - beq _0804388E - bl _0804441E -_0804388E: - ldr r0, [sp, 0x8] - ldr r1, [sp, 0x10] - bl GetGenderFromSpeciesAndPersonality - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - bne _080438A2 - bl _0804441E -_080438A2: - ldr r0, [sp, 0xC] - ldr r1, [sp, 0x14] - bl GetGenderFromSpeciesAndPersonality - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - bne _080438B6 - bl _0804441E -_080438B6: - mov r3, r8 - ldrb r0, [r3] - adds r2, r0, 0 - muls r2, r7 - adds r2, r4 - ldr r1, =gBitTable - ldrb r0, [r5] - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - lsls r1, 16 - ldr r0, [r2] - orrs r0, r1 - str r0, [r2] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB66F - str r0, [r1] - bl _080443D0 - .pool -_08043908: - movs r5, 0 - mov r10, r5 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r10, r0 - bcc _08043918 - bl _0804441E -_08043918: - ldr r1, =gBattleMons - movs r0, 0x58 - mov r2, r10 - muls r2, r0 - adds r0, r2, 0 - adds r0, r1 - adds r0, 0x20 - ldrb r0, [r0] - subs r0, 0x7 - adds r2, r1, 0 - cmp r0, 0x41 - bls _08043932 - b _08043B96 -_08043932: - lsls r0, 2 - ldr r1, =_08043948 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08043948: - .4byte _08043AAC - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B70 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043AD4 - .4byte _08043B96 - .4byte _08043A50 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043A7C - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B40 - .4byte _08043B10 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043B96 - .4byte _08043AD4 -_08043A50: - movs r0, 0x58 - mov r3, r10 - muls r3, r0 - adds r0, r3, 0 - adds r1, r2, 0 - adds r1, 0x4C - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x00000f88 - ands r0, r1 - cmp r0, 0 - bne _08043A6A - b _08043B96 -_08043A6A: - ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC70 - b _08043B5C - .pool -_08043A7C: - movs r0, 0x58 - mov r1, r10 - muls r1, r0 - adds r0, r1, 0 - adds r1, r2, 0 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x7 - ands r0, r1 - cmp r0, 0 - bne _08043A96 - b _08043B96 -_08043A96: - ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC98 - bl StringCopy - movs r2, 0x2 - mov r9, r2 - b _08043B9C - .pool -_08043AAC: - movs r0, 0x58 - mov r3, r10 - muls r3, r0 - adds r0, r3, 0 - adds r1, r2, 0 - adds r1, 0x4C - adds r0, r1 - ldr r0, [r0] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - beq _08043B96 - ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC80 - b _08043B5C - .pool -_08043AD4: - movs r0, 0x58 - mov r3, r10 - muls r3, r0 - adds r0, r2, 0 - adds r0, 0x4C - adds r0, r3, r0 - ldr r0, [r0] - movs r1, 0x7 - ands r0, r1 - cmp r0, 0 - beq _08043B96 - adds r2, 0x50 - adds r2, r3, r2 - ldr r0, [r2] - ldr r1, =0xf7ffffff - ands r0, r1 - str r0, [r2] - ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC78 - bl StringCopy - movs r0, 0x1 - mov r9, r0 - b _08043B9C - .pool -_08043B10: - movs r0, 0x58 - mov r1, r10 - muls r1, r0 - adds r0, r1, 0 - adds r1, r2, 0 - adds r1, 0x4C - adds r0, r1 - ldr r0, [r0] - movs r1, 0x10 - ands r0, r1 - cmp r0, 0 - beq _08043B96 - ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC88 - bl StringCopy - movs r2, 0x1 - mov r9, r2 - b _08043B9C - .pool -_08043B40: - movs r0, 0x58 - mov r3, r10 - muls r3, r0 - adds r0, r3, 0 - adds r1, r2, 0 - adds r1, 0x4C - adds r0, r1 - ldr r0, [r0] - movs r1, 0x20 - ands r0, r1 - cmp r0, 0 - beq _08043B96 - ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC90 -_08043B5C: - bl StringCopy - movs r5, 0x1 - mov r9, r5 - b _08043B9C - .pool -_08043B70: - movs r0, 0x58 - mov r1, r10 - muls r1, r0 - adds r0, r1, 0 - adds r1, r2, 0 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0xF0 - lsls r1, 12 - ands r0, r1 - cmp r0, 0 - beq _08043B96 - ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BCA0 - bl StringCopy - movs r2, 0x3 - mov r9, r2 -_08043B96: - mov r3, r9 - cmp r3, 0 - beq _08043C50 -_08043B9C: - mov r5, r9 - cmp r5, 0x2 - beq _08043BD0 - cmp r5, 0x2 - bgt _08043BB4 - cmp r5, 0x1 - beq _08043BBC - b _08043BFC - .pool -_08043BB4: - mov r0, r9 - cmp r0, 0x3 - beq _08043BE8 - b _08043BFC -_08043BBC: - ldr r1, =gBattleMons - movs r0, 0x58 - mov r2, r10 - muls r2, r0 - adds r1, 0x4C - adds r2, r1 - movs r0, 0 - b _08043BFA - .pool -_08043BD0: - ldr r1, =gBattleMons - movs r0, 0x58 - mov r2, r10 - muls r2, r0 - adds r1, 0x50 - adds r2, r1 - ldr r0, [r2] - movs r1, 0x8 - negs r1, r1 - b _08043BF8 - .pool -_08043BE8: - ldr r1, =gBattleMons - movs r0, 0x58 - mov r2, r10 - muls r2, r0 - adds r1, 0x50 - adds r2, r1 - ldr r0, [r2] - ldr r1, =0xfff0ffff -_08043BF8: - ands r0, r1 -_08043BFA: - str r0, [r2] -_08043BFC: - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB68C - str r0, [r1] - ldr r0, =gBattleScripting - mov r1, r10 - strb r1, [r0, 0x17] - ldr r4, =gActiveBank - strb r1, [r4] - ldrb r1, [r4] - movs r0, 0x58 - muls r0, r1 - ldr r1, =gBattleMons + 0x4C - adds r0, r1 - str r0, [sp] - movs r0, 0 - movs r1, 0x28 - movs r2, 0 - movs r3, 0x4 - bl EmitSetAttributes - ldrb r0, [r4] - bl MarkBufferBankForExecution - bl _0804443A - .pool -_08043C50: - mov r0, r10 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r10, r0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r10, r0 - bcs _08043C64 - b _08043918 -_08043C64: - bl _0804441E - .pool -_08043C6C: - movs r2, 0 - mov r10, r2 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r10, r0 - bcc _08043C7A - b _0804441E -_08043C7A: - ldr r4, =gBattleMons -_08043C7C: - movs r0, 0x58 - mov r3, r10 - muls r3, r0 - adds r0, r3, 0 - adds r0, r4 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x3B - bne _08043CA0 - mov r0, r10 - bl castform_switch - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - cmp r0, 0 - beq _08043CA0 - b _080442FC -_08043CA0: - mov r0, r10 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r10, r0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r10, r0 - bcc _08043C7C - b _0804441E - .pool -_08043CBC: - ldrb r0, [r7] - cmp r0, 0x1C - beq _08043CC4 - b _0804441E -_08043CC4: - ldr r4, =gHitMarker - ldr r1, [r4] - movs r0, 0x80 - lsls r0, 7 - ands r0, r1 - cmp r0, 0 - bne _08043CD4 - b _0804441E -_08043CD4: - ldr r0, =0xffffbfff - ands r1, r0 - str r1, [r4] - mov r5, r8 - ldr r1, [r5] - adds r1, 0xB2 - ldrb r2, [r1] - movs r0, 0x3F - ands r0, r2 - strb r0, [r1] - ldr r0, [r5] - adds r1, r0, 0 - adds r1, 0xB2 - ldrb r0, [r1] - cmp r0, 0x6 - bne _08043CF8 - movs r0, 0x2 - strb r0, [r1] -_08043CF8: - ldr r1, =gBattleCommunication - mov r2, r8 - ldr r0, [r2] - adds r0, 0xB2 - ldrb r0, [r0] - adds r0, 0x40 - strb r0, [r1, 0x3] - ldr r1, =gBattleScripting - ldr r0, =gBankTarget - ldrb r0, [r0] - strb r0, [r1, 0x17] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB67F - str r0, [r1] - ldr r0, [r4] - movs r1, 0x80 - lsls r1, 6 - orrs r0, r1 - str r0, [r4] - b _080443D0 - .pool -_08043D40: - ldrb r0, [r7] - cmp r0, 0x1C - beq _08043D48 - b _0804441E -_08043D48: - ldr r4, =gHitMarker - ldr r1, [r4] - movs r0, 0x80 - lsls r0, 7 - ands r0, r1 - cmp r0, 0 - bne _08043D58 - b _0804441E -_08043D58: - ldr r0, =0xffffbfff - ands r1, r0 - str r1, [r4] - mov r3, r8 - ldr r1, [r3] - adds r1, 0xB2 - ldrb r2, [r1] - movs r0, 0x3F - ands r0, r2 - strb r0, [r1] - ldr r0, [r3] - adds r1, r0, 0 - adds r1, 0xB2 - ldrb r0, [r1] - cmp r0, 0x6 - bne _08043D7C - movs r0, 0x2 - strb r0, [r1] -_08043D7C: - ldr r1, =gBattleCommunication - mov r3, r8 - ldr r0, [r3] - adds r0, 0xB2 - ldrb r0, [r0] - strb r0, [r1, 0x3] - ldr r1, =gBattleScripting - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r1, 0x17] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB67F - str r0, [r1] - ldr r0, [r4] - movs r1, 0x80 - lsls r1, 6 - orrs r0, r1 - str r0, [r4] - b _080443D0 - .pool -_08043DC4: - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r1, [r0] - cmp r4, r1 - blt _08043DD0 - b _0804441E -_08043DD0: - ldr r0, =gBattleMons - adds r5, r1, 0 - ldr r2, =gStatuses3 - adds r3, r0, 0 - adds r3, 0x20 - movs r6, 0x80 - lsls r6, 12 -_08043DDE: - ldrb r1, [r3] - cmp r1, 0x16 - bne _08043DEE - ldr r0, [r2] - ands r0, r6 - cmp r0, 0 - beq _08043DEE - b _08044324 -_08043DEE: - adds r2, 0x4 - adds r3, 0x58 - adds r4, 0x1 - cmp r4, r5 - blt _08043DDE - b _0804441E - .pool -_08043E08: - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _08043E14 - b _0804441E -_08043E14: - ldr r5, =gActiveBank - mov r8, r5 - ldr r0, =gBattleMons - adds r0, 0x20 - str r0, [sp, 0x1C] - movs r1, 0 - str r1, [sp, 0x20] -_08043E22: - ldr r2, [sp, 0x1C] - ldrb r0, [r2] - cmp r0, 0x24 - beq _08043E2C - b _08043FBE -_08043E2C: - ldr r0, =gStatuses3 - ldr r3, [sp, 0x20] - adds r0, r3, r0 - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 13 - ands r1, r0 - str r3, [sp, 0x18] - cmp r1, 0 - bne _08043E42 - b _08043FBE -_08043E42: - lsls r0, r4, 24 - lsrs r0, 24 - bl GetBankIdentity - movs r1, 0x1 - adds r5, r0, 0 - eors r5, r1 - ands r5, r1 - adds r0, r5, 0 - bl GetBankByPlayerAI - lsls r0, 24 - lsrs r6, r0, 24 - adds r0, r5, 0x2 - bl GetBankByPlayerAI - lsls r0, 24 - lsrs r7, r0, 24 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r2, 0x1 - ands r0, r2 - cmp r0, 0 - bne _08043E74 - b _08043F84 -_08043E74: - movs r1, 0x58 - adds r0, r6, 0 - muls r0, r1 - ldr r3, =gBattleMons - adds r1, r0, r3 - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0 - beq _08043F40 - ldrh r0, [r1, 0x28] - cmp r0, 0 - beq _08043EFC - movs r1, 0x58 - adds r0, r7, 0 - muls r0, r1 - adds r1, r0, r3 - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0 - beq _08043EFC - ldrh r0, [r1, 0x28] - cmp r0, 0 - beq _08043EFC - str r2, [sp, 0x24] - bl Random - ldr r2, [sp, 0x24] - adds r1, r2, 0 - ands r1, r0 - lsls r1, 1 - orrs r5, r1 - adds r0, r5, 0 - bl GetBankByPlayerAI - mov r2, r8 - strb r0, [r2] - ldrb r0, [r2] - movs r3, 0x58 - muls r0, r3 - ldr r5, =gBattleMons - adds r0, r5 - adds r0, 0x20 - ldrb r0, [r0] - ldr r1, [sp, 0x1C] - strb r0, [r1] - ldrb r0, [r2] - muls r0, r3 - adds r0, r5 - adds r0, 0x20 - ldrb r0, [r0] - ldr r2, =gLastUsedAbility - strb r0, [r2] - b _08043FAC - .pool -_08043EFC: - ldr r3, =gBattleMons - movs r2, 0x58 - adds r0, r6, 0 - muls r0, r2 - adds r1, r0, r3 - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0 - beq _08043F40 - ldrh r0, [r1, 0x28] - cmp r0, 0 - beq _08043F40 - mov r5, r8 - strb r6, [r5] - adds r1, r4, 0 - muls r1, r2 - adds r1, r3 - ldrb r0, [r5] - muls r0, r2 - adds r0, r3 - adds r0, 0x20 - ldrb r0, [r0] - adds r1, 0x20 - strb r0, [r1] - ldrb r0, [r5] - muls r0, r2 - adds r0, r3 - adds r0, 0x20 - ldrb r0, [r0] - b _08043FA8 - .pool -_08043F40: - ldr r3, =gBattleMons - movs r2, 0x58 - adds r0, r7, 0 - muls r0, r2 - adds r1, r0, r3 - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0 - beq _08043FB6 - ldrh r0, [r1, 0x28] - cmp r0, 0 - beq _08043FB6 - mov r5, r8 - strb r7, [r5] - adds r1, r4, 0 - muls r1, r2 - adds r1, r3 - ldrb r0, [r5] - muls r0, r2 - adds r0, r3 - adds r0, 0x20 - ldrb r0, [r0] - adds r1, 0x20 - strb r0, [r1] - ldrb r0, [r5] - muls r0, r2 - adds r0, r3 - adds r0, 0x20 - ldrb r0, [r0] - b _08043FA8 - .pool -_08043F84: - mov r2, r8 - strb r6, [r2] - movs r3, 0x58 - adds r0, r6, 0 - muls r0, r3 - ldr r5, =gBattleMons - adds r0, r5 - adds r2, r0, 0 - adds r2, 0x20 - ldrb r1, [r2] - cmp r1, 0 - beq _08043FB6 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _08043FB6 - ldr r0, [sp, 0x1C] - strb r1, [r0] - ldrb r0, [r2] -_08043FA8: - ldr r1, =gLastUsedAbility - strb r0, [r1] -_08043FAC: - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_08043FB6: - mov r2, r9 - cmp r2, 0 - beq _08043FBE - b _08044340 -_08043FBE: - ldr r3, [sp, 0x1C] - adds r3, 0x58 - str r3, [sp, 0x1C] - ldr r5, [sp, 0x20] - adds r5, 0x4 - str r5, [sp, 0x20] - adds r4, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - bge _08043FD6 - b _08043E22 -_08043FD6: - b _0804441E - .pool -_08043FE4: - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r1, [r0] - cmp r4, r1 - blt _08043FF0 - b _0804441E -_08043FF0: - ldr r0, =gBattleMons - adds r5, r1, 0 - ldr r2, =gStatuses3 - adds r3, r0, 0 - adds r3, 0x20 - movs r6, 0x80 - lsls r6, 12 -_08043FFE: - ldrb r1, [r3] - cmp r1, 0x16 - bne _0804400E - ldr r0, [r2] - ands r0, r6 - cmp r0, 0 - beq _0804400E - b _080443B4 -_0804400E: - adds r2, 0x4 - adds r3, 0x58 - adds r4, 0x1 - cmp r4, r5 - blt _08043FFE - b _0804441E - .pool -_08044028: - mov r0, r10 - bl GetBankSide - lsls r0, 24 - lsrs r5, r0, 24 - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _0804403E - b _0804441E -_0804403E: - ldr r7, =gBattleMons -_08044040: - lsls r0, r4, 24 - lsrs r0, 24 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - adds r3, r4, 0x1 - cmp r0, r5 - beq _0804406A - movs r0, 0x58 - muls r0, r4 - adds r0, r7 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, r6 - bne _0804406A - ldr r0, =gLastUsedAbility - strb r6, [r0] - lsls r0, r3, 24 - lsrs r0, 24 - mov r9, r0 -_0804406A: - adds r4, r3, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _08044040 - b _0804441E - .pool -_08044084: - mov r0, r10 - bl GetBankSide - lsls r0, 24 - lsrs r5, r0, 24 - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _0804409A - b _0804441E -_0804409A: - ldr r7, =gBattleMons -_0804409C: - lsls r0, r4, 24 - lsrs r0, 24 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - adds r3, r4, 0x1 - cmp r0, r5 - bne _080440C6 - movs r0, 0x58 - muls r0, r4 - adds r0, r7 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, r6 - bne _080440C6 - ldr r0, =gLastUsedAbility - strb r6, [r0] - lsls r0, r3, 24 - lsrs r0, 24 - mov r9, r0 -_080440C6: - adds r4, r3, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _0804409C - b _0804441E - .pool -_080440E0: - ldrb r0, [r7] - cmp r0, 0xFD - beq _08044104 - cmp r0, 0xFE - beq _0804413C - movs r4, 0 - ldr r0, =gNoOfAllBanks - adds r5, r0, 0 - ldrb r0, [r5] - cmp r4, r0 - blt _080440F8 - b _0804441E -_080440F8: - ldr r2, =gBattleMons - b _08044174 - .pool -_08044104: - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _08044110 - b _0804441E -_08044110: - ldr r5, =gStatuses3 - movs r2, 0x80 - lsls r2, 9 - adds r1, r0, 0 -_08044118: - lsls r0, r4, 2 - adds r0, r5 - ldr r0, [r0] - ands r0, r2 - adds r3, r4, 0x1 - cmp r0, 0 - beq _0804412C - lsls r0, r3, 24 - lsrs r0, 24 - mov r9, r0 -_0804412C: - adds r4, r3, 0 - cmp r4, r1 - blt _08044118 - b _0804441E - .pool -_0804413C: - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _08044148 - b _0804441E -_08044148: - ldr r5, =gStatuses3 - movs r2, 0x80 - lsls r2, 10 - adds r1, r0, 0 -_08044150: - lsls r0, r4, 2 - adds r0, r5 - ldr r0, [r0] - ands r0, r2 - adds r3, r4, 0x1 - cmp r0, 0 - beq _08044164 - lsls r0, r3, 24 - lsrs r0, 24 - mov r9, r0 -_08044164: - adds r4, r3, 0 - cmp r4, r1 - blt _08044150 - b _0804441E - .pool -_08044174: - movs r0, 0x58 - muls r0, r4 - adds r0, r2 - adds r0, 0x20 - ldrb r0, [r0] - adds r3, r4, 0x1 - cmp r0, r6 - bne _0804418C - strb r6, [r7] - lsls r0, r3, 24 - lsrs r0, 24 - mov r9, r0 -_0804418C: - adds r4, r3, 0 - ldrb r1, [r5] - cmp r4, r1 - blt _08044174 - b _0804441E -_08044196: - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _080441A2 - b _0804441E -_080441A2: - ldr r2, =gBattleMons - mov r8, r2 - adds r2, r0, 0 - movs r5, 0x58 -_080441AA: - adds r0, r4, 0 - muls r0, r5 - mov r3, r8 - adds r1, r0, r3 - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - adds r3, r4, 0x1 - cmp r0, r6 - bne _080441CC - ldrh r0, [r1, 0x28] - cmp r0, 0 - beq _080441CC - strb r6, [r7] - lsls r0, r3, 24 - lsrs r0, 24 - mov r9, r0 -_080441CC: - adds r4, r3, 0 - cmp r4, r2 - blt _080441AA - b _0804441E - .pool -_080441DC: - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _080441E8 - b _0804441E -_080441E8: - ldr r7, =gBattleMons - adds r1, r0, 0 - movs r5, 0x58 - ldr r2, =gLastUsedAbility -_080441F0: - adds r0, r4, 0 - muls r0, r5 - adds r0, r7 - adds r0, 0x20 - ldrb r0, [r0] - adds r3, r4, 0x1 - cmp r0, r6 - bne _0804420C - cmp r4, r10 - beq _0804420C - strb r6, [r2] - lsls r0, r3, 24 - lsrs r0, 24 - mov r9, r0 -_0804420C: - adds r4, r3, 0 - cmp r4, r1 - blt _080441F0 - b _0804441E - .pool -_08044220: - mov r0, r10 - bl GetBankSide - lsls r0, 24 - lsrs r5, r0, 24 - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _08044236 - b _0804441E -_08044236: - ldr r7, =gBattleMons -_08044238: - lsls r0, r4, 24 - lsrs r0, 24 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, r5 - beq _08044264 - movs r0, 0x58 - muls r0, r4 - adds r0, r7 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, r6 - bne _08044264 - ldr r0, =gLastUsedAbility - strb r6, [r0] - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_08044264: - adds r4, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _08044238 - b _0804441E - .pool -_0804427C: - mov r0, r10 - bl GetBankSide - lsls r0, 24 - lsrs r5, r0, 24 - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _08044292 - b _0804441E -_08044292: - ldr r7, =gBattleMons -_08044294: - lsls r0, r4, 24 - lsrs r0, 24 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, r5 - bne _080442C0 - movs r0, 0x58 - muls r0, r4 - adds r0, r7 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, r6 - bne _080442C0 - ldr r0, =gLastUsedAbility - strb r6, [r0] - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_080442C0: - adds r4, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _08044294 - b _0804441E - .pool -_080442D8: - ldr r0, =gUnknown_082DB4A9 - bl b_push_move_exec - ldr r0, =gBattleScripting - strb r6, [r0, 0x17] -_080442E2: - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x7F - mov r1, r9 - subs r1, 0x1 - strb r1, [r0] - b _0804441E - .pool -_080442FC: - ldr r0, =gUnknown_082DB4A9 - bl b_push_move_exec - ldr r0, =gBattleScripting - mov r5, r10 - strb r5, [r0, 0x17] - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x7F - mov r1, r9 - subs r1, 0x1 - strb r1, [r0] - b _0804443A - .pool -_08044324: - strb r1, [r7] - ldr r0, [r2] - ldr r1, =0xfff7ffff - ands r0, r1 - str r0, [r2] - ldr r0, =gUnknown_082DB4B8 - bl b_push_move_exec - b _080443C8 - .pool -_08044340: - ldr r0, =gUnknown_082DB452 - bl b_push_move_exec - ldr r1, =gStatuses3 - ldr r0, [sp, 0x18] - adds r1, r0, r1 - ldr r0, [r1] - ldr r2, =0xffefffff - ands r0, r2 - str r0, [r1] - ldr r0, =gBattleScripting - strb r4, [r0, 0x17] - ldr r1, =gBattleTextBuff1 - movs r4, 0xFD - strb r4, [r1] - movs r0, 0x4 - strb r0, [r1, 0x1] - ldr r2, =gActiveBank - ldrb r0, [r2] - strb r0, [r1, 0x2] - ldr r3, =gBattlePartyID - ldrb r0, [r2] - lsls r0, 1 - adds r0, r3 - ldrh r0, [r0] - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r1, =gBattleTextBuff2 - strb r4, [r1] - movs r0, 0x9 - strb r0, [r1, 0x1] - ldr r0, =gLastUsedAbility - ldrb r0, [r0] - strb r0, [r1, 0x2] - movs r0, 0x1 - negs r0, r0 - strb r0, [r1, 0x3] - b _0804441E - .pool -_080443B4: - strb r1, [r7] - ldr r0, [r2] - ldr r1, =0xfff7ffff - ands r0, r1 - str r0, [r2] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB4C1 - str r0, [r1] -_080443C8: - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0xD8 - strb r4, [r0] -_080443D0: - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - b _0804441E - .pool -_080443EC: - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r1, [r0] - cmp r4, r1 - bge _0804441E - ldr r0, =gBattleMons - adds r2, r1, 0 - adds r1, r0, 0 - adds r1, 0x20 - ldr r3, =gLastUsedAbility -_08044400: - ldrb r0, [r1] - cmp r0, r6 - bne _08044416 - cmp r4, r10 - beq _08044416 - strb r6, [r3] - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_08044416: - adds r1, 0x58 - adds r4, 0x1 - cmp r4, r2 - blt _08044400 -_0804441E: - mov r1, r9 - cmp r1, 0 - beq _0804443A -_08044424: - ldr r2, [sp, 0x4] - cmp r2, 0xB - bhi _0804443A - ldr r1, =gLastUsedAbility - ldrb r0, [r1] - cmp r0, 0xFF - beq _0804443A - adds r1, r0, 0 - mov r0, r10 - bl RecordAbilityBattle -_0804443A: - mov r0, r9 - add sp, 0x28 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end AbilityBattleEffects - thumb_func_start b_call_bc_move_exec b_call_bc_move_exec: @ 8044458 ldr r1, =gBattlescriptCurrInstr @@ -4983,7 +1428,7 @@ _0804509A: cmp r2, 0 beq _080450B2 ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC70 + ldr r1, =gStatusConditionString_PoisonJpn bl StringCopy movs r0, 0x1 mov r10, r0 @@ -5002,7 +1447,7 @@ _080450B2: ands r0, r1 str r0, [r2] ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC78 + ldr r1, =gStatusConditionString_SleepJpn bl StringCopy movs r2, 0x1 add r10, r2 @@ -5013,7 +1458,7 @@ _080450D8: cmp r0, 0 beq _080450EE ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC80 + ldr r1, =gStatusConditionString_ParalysisJpn bl StringCopy movs r3, 0x1 add r10, r3 @@ -5024,7 +1469,7 @@ _080450EE: cmp r0, 0 beq _08045104 ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC88 + ldr r1, =gStatusConditionString_BurnJpn bl StringCopy movs r0, 0x1 add r10, r0 @@ -5035,7 +1480,7 @@ _08045104: cmp r0, 0 beq _0804511A ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC90 + ldr r1, =gStatusConditionString_IceJpn bl StringCopy movs r1, 0x1 add r10, r1 @@ -5047,7 +1492,7 @@ _0804511A: cmp r0, 0 beq _08045132 ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC98 + ldr r1, =gStatusConditionString_ConfusionJpn bl StringCopy movs r3, 0x1 add r10, r3 @@ -5103,7 +1548,7 @@ _080451A0: ands r2, r0 str r2, [r1] ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BCA0 + ldr r1, =gStatusConditionString_LoveJpn bl StringCopy ldr r0, =gUnknown_082DB794 bl b_call_bc_move_exec @@ -5426,7 +1871,7 @@ _080454E0: ands r1, r0 str r1, [r2] ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BCA0 + ldr r1, =gStatusConditionString_LoveJpn bl StringCopy bl b_movescr_stack_push_cursor ldr r1, =gBattleCommunication @@ -5466,7 +1911,7 @@ _08045548: cmp r2, 0 beq _08045558 ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC70 + ldr r1, =gStatusConditionString_PoisonJpn bl StringCopy _08045558: ldr r0, [r6] @@ -5482,7 +1927,7 @@ _08045558: ands r0, r1 str r0, [r2] ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC78 + ldr r1, =gStatusConditionString_SleepJpn bl StringCopy _08045578: ldr r0, [r6] @@ -5491,7 +1936,7 @@ _08045578: cmp r0, 0 beq _0804558A ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC80 + ldr r1, =gStatusConditionString_ParalysisJpn bl StringCopy _0804558A: ldr r0, [r6] @@ -5500,7 +1945,7 @@ _0804558A: cmp r0, 0 beq _0804559C ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC88 + ldr r1, =gStatusConditionString_BurnJpn bl StringCopy _0804559C: ldr r0, [r6] @@ -5509,7 +1954,7 @@ _0804559C: cmp r0, 0 beq _080455AE ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC90 + ldr r1, =gStatusConditionString_IceJpn bl StringCopy _080455AE: adds r5, r4 @@ -5519,7 +1964,7 @@ _080455AE: cmp r0, 0 beq _080455C2 ldr r0, =gBattleTextBuff1 - ldr r1, =gUnknown_0831BC98 + ldr r1, =gStatusConditionString_ConfusionJpn bl StringCopy _080455C2: movs r4, 0 diff --git a/asm/battle_4.s b/asm/battle_4.s index 38430bac1..094bf868e 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -29296,12 +29296,12 @@ atkE7_castform_data_change: @ 8055E64 str r0, [r1] ldr r0, =gBattleScripting ldrb r0, [r0, 0x17] - bl castform_switch + bl CastformDataTypeChange lsls r0, 24 lsrs r4, r0, 24 cmp r4, 0 beq _08055E8E - ldr r0, =gUnknown_082DB4A9 + ldr r0, =BattleScript_CastformChange bl b_push_move_exec ldr r0, =gBattleStruct ldr r0, [r0] diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 48669befb..73b2d2cb9 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -330,25 +330,25 @@ BattleScript_YawnMakesAsleep:: @ 82DB378 gUnknown_082DB422:: @ 82DB422 .incbin "baserom.gba", 0x2db422, 0xe -gUnknown_082DB430:: @ 82DB430 +BattleScript_DrizzleActivates:: @ 82DB430 .incbin "baserom.gba", 0x2db430, 0x14 -gUnknown_082DB444:: @ 82DB444 +BattleScript_SpeedBoostActivates:: @ 82DB444 .incbin "baserom.gba", 0x2db444, 0xe -gUnknown_082DB452:: @ 82DB452 +BattleScript_TraceActivates:: @ 82DB452 .incbin "baserom.gba", 0x2db452, 0xa -gUnknown_082DB45C:: @ 82DB45C +BattleScript_RainDishActivates:: @ 82DB45C .incbin "baserom.gba", 0x2db45c, 0x14 -gUnknown_082DB470:: @ 82DB470 +BattleScript_SandstreamActivates:: @ 82DB470 .incbin "baserom.gba", 0x2db470, 0x14 -gUnknown_082DB484:: @ 82DB484 +BattleScript_ShedSkinActivates:: @ 82DB484 .incbin "baserom.gba", 0x2db484, 0x25 -gUnknown_082DB4A9:: @ 82DB4A9 +BattleScript_CastformChange:: @ 82DB4A9 .incbin "baserom.gba", 0x2db4a9, 0xf gUnknown_082DB4B8:: @ 82DB4B8 @@ -357,7 +357,7 @@ gUnknown_082DB4B8:: @ 82DB4B8 gUnknown_082DB4C1:: @ 82DB4C1 .incbin "baserom.gba", 0x2db4c1, 0x69 -gUnknown_082DB52A:: @ 82DB52A +BattleScript_DroughtActivates:: @ 82DB52A .incbin "baserom.gba", 0x2db52a, 0x14 gUnknown_082DB53E:: @ 82DB53E @@ -369,10 +369,10 @@ gUnknown_082DB552:: @ 82DB552 gUnknown_082DB560:: @ 82DB560 .incbin "baserom.gba", 0x2db560, 0xe -gUnknown_082DB56E:: @ 82DB56E +BattleScript_MoveHPDrain_PPLoss:: @ 82DB56E .incbin "baserom.gba", 0x2db56e, 0x1 -gUnknown_082DB56F:: @ 82DB56F +BattleScript_MoveHPDrain:: @ 82DB56F .incbin "baserom.gba", 0x2db56f, 0x22 gUnknown_082DB591:: @ 82DB591 @@ -381,10 +381,10 @@ gUnknown_082DB591:: @ 82DB591 gUnknown_082DB592:: @ 82DB592 .incbin "baserom.gba", 0x2db592, 0x15 -gUnknown_082DB5A7:: @ 82DB5A7 +BattleScript_FlashFireBoost_PPLoss:: @ 82DB5A7 .incbin "baserom.gba", 0x2db5a7, 0x1 -gUnknown_082DB5A8:: @ 82DB5A8 +BattleScript_FlashFireBoost:: @ 82DB5A8 .incbin "baserom.gba", 0x2db5a8, 0x1f gUnknown_082DB5C7:: @ 82DB5C7 @@ -405,7 +405,7 @@ gUnknown_082DB5F5:: @ 82DB5F5 gUnknown_082DB603:: @ 82DB603 .incbin "baserom.gba", 0x2db603, 0x1c -gUnknown_082DB61F:: @ 82DB61F +BattleScript_SoundproofProtected:: @ 82DB61F .incbin "baserom.gba", 0x2db61f, 0x10 gUnknown_082DB62F:: @ 82DB62F @@ -414,19 +414,19 @@ gUnknown_082DB62F:: @ 82DB62F gUnknown_082DB63F:: @ 82DB63F .incbin "baserom.gba", 0x2db63f, 0xe -gUnknown_082DB64D:: @ 82DB64D +BattleScript_ColorChangeActivates:: @ 82DB64D .incbin "baserom.gba", 0x2db64d, 0x7 -gUnknown_082DB654:: @ 82DB654 +BattleScript_RoughSkinActivates:: @ 82DB654 .incbin "baserom.gba", 0x2db654, 0x1b -gUnknown_082DB66F:: @ 82DB66F +BattleScript_CuteCharmActivates:: @ 82DB66F .incbin "baserom.gba", 0x2db66f, 0xd -gUnknown_082DB67C:: @ 82DB67C +BattleScript_ApplySecondaryEffect:: @ 82DB67C .incbin "baserom.gba", 0x2db67c, 0x3 -gUnknown_082DB67F:: @ 82DB67F +BattleScript_SynchronizeActivates:: @ 82DB67F .incbin "baserom.gba", 0x2db67f, 0x3 gUnknown_082DB682:: @ 82DB682 diff --git a/data/data2b.s b/data/data2b.s index 28d34f79b..1499c51fe 100644 --- a/data/data2b.s +++ b/data/data2b.s @@ -227,25 +227,25 @@ gUnknown_0831BC0C:: @ 831BC0C gUnknown_0831BC44:: @ 831BC44 .incbin "baserom.gba", 0x31bc44, 0x2c -gUnknown_0831BC70:: @ 831BC70 +gStatusConditionString_PoisonJpn:: @ 831BC70 .incbin "baserom.gba", 0x31bc70, 0x8 -gUnknown_0831BC78:: @ 831BC78 +gStatusConditionString_SleepJpn:: @ 831BC78 .incbin "baserom.gba", 0x31bc78, 0x8 -gUnknown_0831BC80:: @ 831BC80 +gStatusConditionString_ParalysisJpn:: @ 831BC80 .incbin "baserom.gba", 0x31bc80, 0x8 -gUnknown_0831BC88:: @ 831BC88 +gStatusConditionString_BurnJpn:: @ 831BC88 .incbin "baserom.gba", 0x31bc88, 0x8 -gUnknown_0831BC90:: @ 831BC90 +gStatusConditionString_IceJpn:: @ 831BC90 .incbin "baserom.gba", 0x31bc90, 0x8 -gUnknown_0831BC98:: @ 831BC98 +gStatusConditionString_ConfusionJpn:: @ 831BC98 .incbin "baserom.gba", 0x31bc98, 0x8 -gUnknown_0831BCA0:: @ 831BCA0 +gStatusConditionString_LoveJpn:: @ 831BCA0 .incbin "baserom.gba", 0x31bca0, 0x8 gUnknown_0831BCA8:: @ 831BCA8 @@ -260,6 +260,6 @@ gUnknown_0831BCEF:: @ 831BCEF gUnknown_0831BCF3:: @ 831BCF3 .incbin "baserom.gba", 0x31bcf3, 0x5 -gUnknown_0831BCF8:: @ 831BCF8 +gSoundMovesTable:: @ 831BCF8 .incbin "baserom.gba", 0x31bcf8, 0x18 diff --git a/include/battle.h b/include/battle.h index 4def33967..c31aff6e8 100644 --- a/include/battle.h +++ b/include/battle.h @@ -26,6 +26,7 @@ #define BATTLE_TYPE_x100000 0x100000 #define BATTLE_TYPE_PYRAMID 0x200000 #define BATTLE_TYPE_INGAME_PARTNER 0x400000 +#define BATTLE_TYPE_x800000 0x800000 #define BATTLE_TYPE_RECORDED 0x1000000 #define BATTLE_TYPE_x2000000 0x2000000 #define BATTLE_TYPE_x4000000 0x4000000 @@ -137,26 +138,26 @@ #define SIDE_STATUS_MIST (1 << 8) #define SIDE_STATUS_SPIKES_DAMAGED (1 << 9) -#define ABILITYEFFECT_ON_SWITCHIN 0x0 -#define ABILITYEFFECT_ENDTURN 0x1 -#define ABILITYEFFECT_MOVES_BLOCK 0x2 -#define ABILITYEFFECT_ABSORBING 0x3 -#define ABILITYEFFECT_CONTACT 0x4 -#define ABILITYEFFECT_IMMUNITY 0x5 -#define ABILITYEFFECT_FORECAST 0x6 -#define ABILITYEFFECT_SYNCHRONIZE 0x7 -#define ABILITYEFFECT_ATK_SYNCHRONIZE 0x8 -#define ABILITYEFFECT_INTIMIDATE1 0x9 -#define ABILITYEFFECT_INTIMIDATE2 0xA -#define ABILITYEFFECT_TRACE 0xB -#define ABILITYEFFECT_CHECK_OTHER_SIDE 0xC -#define ABILITYEFFECT_CHECK_BANK_SIDE 0xD -#define ABILITYEFFECT_FIELD_SPORT 0xE +#define ABILITYEFFECT_ON_SWITCHIN 0x0 +#define ABILITYEFFECT_ENDTURN 0x1 +#define ABILITYEFFECT_MOVES_BLOCK 0x2 +#define ABILITYEFFECT_ABSORBING 0x3 +#define ABILITYEFFECT_CONTACT 0x4 +#define ABILITYEFFECT_IMMUNITY 0x5 +#define ABILITYEFFECT_FORECAST 0x6 +#define ABILITYEFFECT_SYNCHRONIZE 0x7 +#define ABILITYEFFECT_ATK_SYNCHRONIZE 0x8 +#define ABILITYEFFECT_INTIMIDATE1 0x9 +#define ABILITYEFFECT_INTIMIDATE2 0xA +#define ABILITYEFFECT_TRACE 0xB +#define ABILITYEFFECT_CHECK_OTHER_SIDE 0xC +#define ABILITYEFFECT_CHECK_BANK_SIDE 0xD +#define ABILITYEFFECT_FIELD_SPORT 0xE #define ABILITYEFFECT_CHECK_FIELD_EXCEPT_BANK 0xF -#define ABILITYEFFECT_COUNT_OTHER_SIZE 0x10 -#define ABILITYEFFECT_COUNT_BANK_SIDE 0x11 -#define ABILITYEFFECT_COUNT_ON_FIELD 0x12 -#define ABILITYEFFECT_CHECK_ON_FIELD 0x13 +#define ABILITYEFFECT_COUNT_OTHER_SIZE 0x10 +#define ABILITYEFFECT_COUNT_BANK_SIDE 0x11 +#define ABILITYEFFECT_COUNT_ON_FIELD 0x12 +#define ABILITYEFFECT_CHECK_ON_FIELD 0x13 #define WEATHER_HAS_EFFECT ((!AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_CLOUD_NINE, 0, 0) && !AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_AIR_LOCK, 0, 0))) @@ -523,10 +524,7 @@ struct BattleStruct u8 field_59; u8 field_5A; u8 field_5B; - u8 field_5C; - u8 field_5D; - u8 field_5E; - u8 field_5F; + u8 field_5C[4]; u8 field_60; u8 field_61; u8 field_62; @@ -611,13 +609,13 @@ struct BattleStruct u8 field_D0[8]; u8 intimidateBank; u8 fillerD9[0xDA-0xD9]; - u8 unkDA; + u8 field_DA; u8 turnSideTracker; u8 fillerDC[0xDF-0xDC]; - u8 unkDF; + u8 field_DF; u8 fillerE0[0x1A0-0xE0]; - u8 unk1A0; - u8 unk1A1; + u8 field_1A0; + u8 field_1A1; u8 filler1A2; u8 atkCancellerTracker; }; diff --git a/include/pokemon.h b/include/pokemon.h index fefe2bd28..595ec38fd 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -439,6 +439,12 @@ struct BattleMove u8 flags; }; +#define FLAG_MAKES_CONTACT 0x1 +#define FLAG_PROTECT_AFFECTED 0x2 +#define FLAG_MAGICCOAT_AFFECTED 0x4 +#define FLAG_SNATCH_AFFECTED 0x8 +#define FLAG_KINGSROCK_AFFECTED 0x20 + struct SpindaSpot { u8 x, y; diff --git a/src/battle_3.c b/src/battle_3.c index 34e45ca74..09c401a5c 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -13,6 +13,7 @@ #include "text.h" #include "string_util.h" #include "battle_message.h" +#include "battle_ai.h" extern const u8* gBattlescriptCurrInstr; extern const u8* gUnknown_02024220[BATTLE_BANKS_COUNT]; @@ -45,6 +46,7 @@ extern u16 gChosenMovesByBanks[]; extern u8 gBattleMoveFlags; extern s32 gTakenDmg[BATTLE_BANKS_COUNT]; extern u8 gTakenDmgBanks[BATTLE_BANKS_COUNT]; +extern u8 gLastUsedAbility; extern const struct BattleMove gBattleMoves[]; @@ -107,6 +109,37 @@ extern const u8 BattleScript_MoveUsedIsInLove[]; extern const u8 BattleScript_BideStoringEnergy[]; extern const u8 BattleScript_BideAttack[]; extern const u8 BattleScript_BideNoEnergyToAttack[]; +extern const u8 gUnknown_082DACE7[]; +extern const u8 BattleScript_DrizzleActivates[]; +extern const u8 BattleScript_SandstreamActivates[]; +extern const u8 BattleScript_DroughtActivates[]; +extern const u8 BattleScript_CastformChange[]; +extern const u8 BattleScript_RainDishActivates[]; +extern const u8 BattleScript_ShedSkinActivates[]; +extern const u8 BattleScript_SpeedBoostActivates[]; +extern const u8 BattleScript_SoundproofProtected[]; +extern const u8 BattleScript_MoveHPDrain[]; +extern const u8 BattleScript_MoveHPDrain_PPLoss[]; +extern const u8 BattleScript_FlashFireBoost[]; +extern const u8 BattleScript_FlashFireBoost_PPLoss[]; +extern const u8 BattleScript_ColorChangeActivates[]; +extern const u8 BattleScript_RoughSkinActivates[]; +extern const u8 BattleScript_ApplySecondaryEffect[]; +extern const u8 BattleScript_CuteCharmActivates[]; +extern const u8 gUnknown_082DB68C[]; +extern const u8 BattleScript_SynchronizeActivates[]; +extern const u8 gUnknown_082DB4B8[]; +extern const u8 gUnknown_082DB4C1[]; +extern const u8 BattleScript_TraceActivates[]; + +extern const u8 gStatusConditionString_PoisonJpn[]; +extern const u8 gStatusConditionString_SleepJpn[]; +extern const u8 gStatusConditionString_ParalysisJpn[]; +extern const u8 gStatusConditionString_BurnJpn[]; +extern const u8 gStatusConditionString_IceJpn[]; +extern const u8 gStatusConditionString_ConfusionJpn[]; +extern const u8 gStatusConditionString_LoveJpn[]; +extern const u16 gSoundMovesTable[]; extern void CancelMultiTurnMoves(u8 bank); extern u8 b_first_side(u8, u8, u8); @@ -122,10 +155,15 @@ extern u8 GetBankIdentity(u8); extern void sub_803F9EC(); extern bool8 sub_80423F4(u8 bank, u8, u8); extern s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *defender, u32 move, u16 sideFlags, u16 powerOverride, u8 typeOverride, u8 bankAtk, u8 bankDef); +extern u8 GetBankByPlayerAI(u8); +extern u8 sub_806D864(u8); +extern u8 sub_806D82C(u8); +extern u8 weather_get_current(void); u8 IsImprisoned(u8 bank, u16 move); u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn); u8 GetMoveTarget(u16 move, u8 useMoveTarget); +void b_push_move_exec(const u8* BS_ptr); void b_movescr_stack_push(const u8* bsPtr) { @@ -916,19 +954,19 @@ bool8 sub_8041364(void) { gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_x20); - switch (gBattleStruct->unk1A0) + switch (gBattleStruct->field_1A0) { case 0: - while (gBattleStruct->unk1A1 < gNoOfAllBanks) + while (gBattleStruct->field_1A1 < gNoOfAllBanks) { - gActiveBank = gBattleStruct->unk1A1; + gActiveBank = gBattleStruct->field_1A1; if (gAbsentBankFlags & gBitTable[gActiveBank]) { - gBattleStruct->unk1A1++; + gBattleStruct->field_1A1++; continue; } - gBattleStruct->unk1A1++; + gBattleStruct->field_1A1++; if (gWishFutureKnock.futureSightCounter[gActiveBank] != 0 && --gWishFutureKnock.futureSightCounter[gActiveBank] == 0 && gBattleMons[gActiveBank].hp != 0) @@ -959,21 +997,21 @@ bool8 sub_8041364(void) } // Why do I have to keep doing this to match? { - u8* var = &gBattleStruct->unk1A0; + u8* var = &gBattleStruct->field_1A0; *var = 1; - gBattleStruct->unk1A1 = 0; + gBattleStruct->field_1A1 = 0; } // fall through case 1: - while (gBattleStruct->unk1A1 < gNoOfAllBanks) + while (gBattleStruct->field_1A1 < gNoOfAllBanks) { - gActiveBank = gBankAttacker = gTurnOrder[gBattleStruct->unk1A1]; + gActiveBank = gBankAttacker = gTurnOrder[gBattleStruct->field_1A1]; if (gAbsentBankFlags & gBitTable[gActiveBank]) { - gBattleStruct->unk1A1++; + gBattleStruct->field_1A1++; continue; } - gBattleStruct->unk1A1++; + gBattleStruct->field_1A1++; if (gStatuses3[gActiveBank] & STATUS3_PERISH_SONG) { gBattleTextBuff1[0] = 0xFD; @@ -999,14 +1037,14 @@ bool8 sub_8041364(void) } // Hm... { - u8* var = &gBattleStruct->unk1A0; + u8* var = &gBattleStruct->field_1A0; *var = 2; - gBattleStruct->unk1A1 = 0; + gBattleStruct->field_1A1 = 0; } // fall through case 2: if ((gBattleTypeFlags & BATTLE_TYPE_ARENA) - && gBattleStruct->unkDA == 2 + && gBattleStruct->field_DA == 2 && gBattleMons[0].hp != 0 && gBattleMons[1].hp != 0) { s32 i; @@ -1016,7 +1054,7 @@ bool8 sub_8041364(void) gBattlescriptCurrInstr = gUnknown_082DB8F3; b_call_bc_move_exec(gUnknown_082DB8F3); - gBattleStruct->unk1A0++; + gBattleStruct->field_1A0++; return 1; } break; @@ -1052,7 +1090,7 @@ bool8 sub_8041728(void) { gBank1 = gBankTarget = gBattleStruct->field_4E; if (gBattleMons[gBattleStruct->field_4E].hp == 0 - && !(gBattleStruct->unkDF & gBitTable[gBattlePartyID[gBattleStruct->field_4E]]) + && !(gBattleStruct->field_DF & gBitTable[gBattlePartyID[gBattleStruct->field_4E]]) && !(gAbsentBankFlags & gBitTable[gBattleStruct->field_4E])) { b_call_bc_move_exec(gUnknown_082DA7C4); @@ -1094,7 +1132,7 @@ bool8 sub_8041728(void) gBattleStruct->field_4D = 4; break; case 6: - if (AbilityBattleEffects(9, 0, 0, 0, 0) || AbilityBattleEffects(0xB, 0, 0, 0, 0) || ItemBattleEffects(1, 0, 1) || AbilityBattleEffects(6, 0, 0, 0, 0)) + if (AbilityBattleEffects(ABILITYEFFECT_INTIMIDATE1, 0, 0, 0, 0) || AbilityBattleEffects(ABILITYEFFECT_TRACE, 0, 0, 0, 0) || ItemBattleEffects(1, 0, 1) || AbilityBattleEffects(ABILITYEFFECT_FORECAST, 0, 0, 0, 0)) return TRUE; gBattleStruct->field_4D++; break; @@ -1385,3 +1423,4003 @@ u8 AtkCanceller_UnableToUseMove(void) } return effect; } + +bool8 sub_80423F4(u8 bank, u8 r1, u8 r2) +{ + struct Pokemon* party; + u8 r7; + u8 r6; + s32 i; + if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) + return FALSE; + if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) + { + if (GetBankSide(bank) == 0) + party = gPlayerParty; + else + party = gEnemyParty; + r6 = ((bank & 2) >> 1); + for (i = r6 * 3; i < r6 * 3 + 3; i++) + { + if (GetMonData(&party[i], MON_DATA_HP) != 0 + && GetMonData(&party[i], MON_DATA_SPECIES2) != 0 + && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) + break; + } + return (i == r6 * 3 + 3); + } + else if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + if (gBattleTypeFlags & BATTLE_TYPE_x800000) + { + if (GetBankSide(bank) == SIDE_PLAYER) + { + party = gPlayerParty; + r7 = sub_806D864(bank); + r6 = sub_806D82C(r7); + } + else + { + // FIXME: Compiler insists on moving r4 into r1 before doing the eor + #ifndef NONMATCHING + register u32 var asm("r1"); + #else + u32 var; + #endif // NONMATCHING + + party = gEnemyParty; + var = bank ^ 1; + r6 = (var == 0) ? 0 : 1; + } + } + else + { + r7 = sub_806D864(bank); + if (GetBankSide(bank) == 0) + party = gPlayerParty; + else + party = gEnemyParty; + r6 = sub_806D82C(r7); + } + for (i = r6 * 3; i < r6 * 3 + 3; i++) + { + if (GetMonData(&party[i], MON_DATA_HP) != 0 + && GetMonData(&party[i], MON_DATA_SPECIES2) != 0 + && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) + break; + } + return (i == r6 * 3 + 3); + } + else if ((gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) && GetBankSide(bank) == 1) + { + party = gEnemyParty; + + if (bank == 1) + r6 = 0; + else + r6 = 3; + for (i = r6; i < r6 + 3; i++) + { + if (GetMonData(&party[i], MON_DATA_HP) != 0 + && GetMonData(&party[i], MON_DATA_SPECIES2) != 0 + && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) + break; + } + return (i == r6 + 3); + } + else + { + if (GetBankSide(bank) == 1) + { + r7 = GetBankByPlayerAI(1); + r6 = GetBankByPlayerAI(3); + party = gEnemyParty; + } + else + { + r7 = GetBankByPlayerAI(0); + r6 = GetBankByPlayerAI(2); + party = gPlayerParty; + } + if (r1 == 6) + r1 = gBattlePartyID[r7]; + if (r2 == 6) + r2 = gBattlePartyID[r6]; + for (i = 0; i < 6; i++) + { + if (GetMonData(&party[i], MON_DATA_HP) != 0 + && GetMonData(&party[i], MON_DATA_SPECIES2) != 0 + && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG + // FIXME: Using index[array] instead of array[index] is BAD! + && i != r1 && i != r2 && i != r7[gBattleStruct->field_5C] && i != r6[gBattleStruct->field_5C]) + break; + } + return (i == 6); + } +} + +enum +{ + CASTFORM_NO_CHANGE, //0 + CASTFORM_TO_NORMAL, //1 + CASTFORM_TO_FIRE, //2 + CASTFORM_TO_WATER, //3 + CASTFORM_TO_ICE, //4 +}; + +u8 CastformDataTypeChange(u8 bank) +{ + u8 formChange = 0; + if (gBattleMons[bank].species != SPECIES_CASTFORM || gBattleMons[bank].ability != ABILITY_FORECAST || gBattleMons[bank].hp == 0) + return CASTFORM_NO_CHANGE; + if (!WEATHER_HAS_EFFECT && gBattleMons[bank].type1 != TYPE_NORMAL && gBattleMons[bank].type2 != TYPE_NORMAL) + { + gBattleMons[bank].type1 = TYPE_NORMAL; + gBattleMons[bank].type2 = TYPE_NORMAL; + return CASTFORM_TO_NORMAL; + } + if (!WEATHER_HAS_EFFECT) + return CASTFORM_NO_CHANGE; + if (!(gBattleWeather & (WEATHER_RAIN_ANY | WEATHER_SUN_ANY | WEATHER_HAIL)) && gBattleMons[bank].type1 != TYPE_NORMAL && gBattleMons[bank].type2 != TYPE_NORMAL) + { + gBattleMons[bank].type1 = TYPE_NORMAL; + gBattleMons[bank].type2 = TYPE_NORMAL; + formChange = CASTFORM_TO_NORMAL; + } + if (gBattleWeather & WEATHER_SUN_ANY && gBattleMons[bank].type1 != TYPE_FIRE && gBattleMons[bank].type2 != TYPE_FIRE) + { + gBattleMons[bank].type1 = TYPE_FIRE; + gBattleMons[bank].type2 = TYPE_FIRE; + formChange = CASTFORM_TO_FIRE; + } + if (gBattleWeather & WEATHER_RAIN_ANY && gBattleMons[bank].type1 != TYPE_WATER && gBattleMons[bank].type2 != TYPE_WATER) + { + gBattleMons[bank].type1 = TYPE_WATER; + gBattleMons[bank].type2 = TYPE_WATER; + formChange = CASTFORM_TO_WATER; + } + if (gBattleWeather & WEATHER_HAIL && gBattleMons[bank].type1 != TYPE_ICE && gBattleMons[bank].type2 != TYPE_ICE) + { + gBattleMons[bank].type1 = TYPE_ICE; + gBattleMons[bank].type2 = TYPE_ICE; + formChange = CASTFORM_TO_ICE; + } + return formChange; +} + +// We meet again, ABE. +#ifdef NONMATCHING +u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) +{ + u8 effect = 0; + struct Pokemon* pokeAtk; + struct Pokemon* pokeDef; + u16 speciesAtk; + u16 speciesDef; + u32 pidAtk; + u32 pidDef; + + if (gBankAttacker >= gNoOfAllBanks) + gBankAttacker = bank; + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + pokeAtk = &gPlayerParty[gBattlePartyID[gBankAttacker]]; + else + pokeAtk = &gEnemyParty[gBattlePartyID[gBankAttacker]]; + + if (gBankTarget >= gNoOfAllBanks) + gBankTarget = bank; + if (GetBankSide(gBankTarget) == SIDE_PLAYER) + pokeDef = &gPlayerParty[gBattlePartyID[gBankTarget]]; + else + pokeDef = &gEnemyParty[gBattlePartyID[gBankTarget]]; + + speciesAtk = GetMonData(pokeAtk, MON_DATA_SPECIES); + pidAtk = GetMonData(pokeAtk, MON_DATA_PERSONALITY); + + speciesDef = GetMonData(pokeDef, MON_DATA_SPECIES); + pidDef = GetMonData(pokeDef, MON_DATA_PERSONALITY); + + if (!(gBattleTypeFlags & BATTLE_TYPE_SAFARI)) // why isn't that check done at the beginning? + { + int i; // r4 + u16 move; + // Hmm... + #define moveType moveArg + //u16 moveType; + u8 side; + + if (special) + gLastUsedAbility = special; + else + gLastUsedAbility = gBattleMons[bank].ability; + + if (moveArg) + move = moveArg; + else + move = gCurrentMove; + + if (gBattleStruct->dynamicMoveType) + moveType = gBattleStruct->dynamicMoveType & 0x3F; + else + moveType = gBattleMoves[move].type; + + switch (caseID) + { + case ABILITYEFFECT_ON_SWITCHIN: // 0 + //_08042A18 + if (gBankAttacker >= gNoOfAllBanks) + gBankAttacker = bank; + switch (gLastUsedAbility) + { + case 0xFF: //weather from overworld + //_08042A86 + switch (weather_get_current()) + { + case 3: + case 5: + case 13: + if (!(gBattleWeather & WEATHER_RAIN_ANY)) + { + gBattleWeather = (WEATHER_RAIN_TEMPORARY | WEATHER_RAIN_PERMANENT); + gBattleScripting.animArg1 = 0xA; + gBattleScripting.bank = bank; + effect++; + } + break; + case 8: + if (!(gBattleWeather & WEATHER_SANDSTORM_ANY)) + { + gBattleWeather = (WEATHER_SANDSTORM_PERMANENT | WEATHER_SANDSTORM_TEMPORARY); + gBattleScripting.animArg1 = 0xC; + gBattleScripting.bank = bank; + effect++; + } + break; + case 12: + if (!(gBattleWeather & WEATHER_SUN_ANY)) + { + gBattleWeather = (WEATHER_SUN_PERMANENT | WEATHER_SUN_TEMPORARY); + gBattleScripting.animArg1 = 0xB; + gBattleScripting.bank = bank; + effect++; + } + break; + } + if (effect) + { + gBattleCommunication[MULTISTRING_CHOOSER] = weather_get_current(); + b_push_move_exec(gUnknown_082DACE7); + } + break; + case ABILITY_DRIZZLE: + //_08042B78 + if (!(gBattleWeather & WEATHER_RAIN_PERMANENT)) + { + gBattleWeather = (WEATHER_RAIN_PERMANENT | WEATHER_RAIN_TEMPORARY); + b_push_move_exec(BattleScript_DrizzleActivates); + gBattleScripting.bank = bank; + effect++; + } + break; + case ABILITY_SAND_STREAM: + //_08042BA8 + if (!(gBattleWeather & WEATHER_SANDSTORM_PERMANENT)) + { + gBattleWeather = (WEATHER_SANDSTORM_PERMANENT | WEATHER_SANDSTORM_TEMPORARY); + b_push_move_exec(BattleScript_SandstreamActivates); + gBattleScripting.bank = bank; + effect++; + } + break; + case ABILITY_DROUGHT: + //_08042BD8 + if (!(gBattleWeather & WEATHER_SUN_PERMANENT)) + { + gBattleWeather = (WEATHER_SUN_PERMANENT | WEATHER_SUN_TEMPORARY); + b_push_move_exec(BattleScript_DroughtActivates); + gBattleScripting.bank = bank; + effect++; + } + break; + case ABILITY_INTIMIDATE: + //_08042C08 + if (!(gSpecialStatuses[bank].intimidatedPoke)) + { + gStatuses3[bank] |= STATUS3_INTIMIDATE_POKES; + gSpecialStatuses[bank].intimidatedPoke = 1; + } + break; + case ABILITY_FORECAST: + //_08042C3C + effect = CastformDataTypeChange(bank); + if (effect != 0) + { + b_push_move_exec(BattleScript_CastformChange); + gBattleScripting.bank = bank; + gBattleStruct->formToChangeInto = effect - 1; + } + break; + case ABILITY_TRACE: + if (!(gSpecialStatuses[bank].traced)) + { + gStatuses3[bank] |= STATUS3_TRACE; + gSpecialStatuses[bank].traced = 1; + } + break; + case ABILITY_CLOUD_NINE: + case ABILITY_AIR_LOCK: + { + u8 i; + + for (i = 0; i < gNoOfAllBanks; i++) + { + // TODO: i should be in r6 here + //asm("":::"r4","r5"); + effect = CastformDataTypeChange(i); + if (effect != 0) + { + b_push_move_exec(BattleScript_CastformChange); + gBattleScripting.bank = i; + gBattleStruct->formToChangeInto = effect - 1; + break; + } + } + } + break; + } + break; + case ABILITYEFFECT_ENDTURN: // 1 + //_08042CDC + if (gBattleMons[bank].hp != 0) + { + gBankAttacker = bank; + switch (gLastUsedAbility) + { + case ABILITY_RAIN_DISH: + //_08042D22 + if (WEATHER_HAS_EFFECT && (gBattleWeather & WEATHER_RAIN_ANY) + && gBattleMons[bank].maxHP > gBattleMons[bank].hp) + { + gLastUsedAbility = ABILITY_RAIN_DISH; //why + b_push_move_exec(BattleScript_RainDishActivates); + gBattleMoveDamage = gBattleMons[bank].maxHP / 16; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + gBattleMoveDamage *= -1; + effect++; + } + break; + case ABILITY_SHED_SKIN: + //_08042DA0 + if ((gBattleMons[bank].status1 & STATUS_ANY) && (Random() % 3) == 0) + { + if (gBattleMons[bank].status1 & (STATUS_POISON | STATUS_TOXIC_POISON)) + StringCopy(gBattleTextBuff1, gStatusConditionString_PoisonJpn); + if (gBattleMons[bank].status1 & STATUS_SLEEP) + StringCopy(gBattleTextBuff1, gStatusConditionString_SleepJpn); + if (gBattleMons[bank].status1 & STATUS_PARALYSIS) + StringCopy(gBattleTextBuff1, gStatusConditionString_ParalysisJpn); + if (gBattleMons[bank].status1 & STATUS_BURN) + StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn); + if (gBattleMons[bank].status1 & STATUS_FREEZE) + StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn); + gBattleMons[bank].status1 = 0; + gBattleMons[bank].status2 &= ~(STATUS2_NIGHTMARE); // fix nighmare glitch + gBattleScripting.bank = gActiveBank = bank; + b_push_move_exec(BattleScript_ShedSkinActivates); + EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[bank].status1); + MarkBufferBankForExecution(gActiveBank); + effect++; + } + break; + case ABILITY_SPEED_BOOST: + //_08042E84 + if (gBattleMons[bank].statStages[STAT_STAGE_SPEED] < 0xC && gDisableStructs[bank].isFirstTurn != 2) + { + gBattleMons[bank].statStages[STAT_STAGE_SPEED]++; + gBattleScripting.animArg1 = 0x11; + gBattleScripting.animArg2 = 0; + b_push_move_exec(BattleScript_SpeedBoostActivates); + gBattleScripting.bank = bank; + effect++; + } + break; + case ABILITY_TRUANT: + gDisableStructs[gBankAttacker].truantCounter ^= 1; + break; + } + } + break; + case ABILITYEFFECT_MOVES_BLOCK: // 2 + //_08042EF8 + if (gLastUsedAbility == ABILITY_SOUNDPROOF) + { + for (i = 0; gSoundMovesTable[i] != 0xFFFF; i++) + { + if (gSoundMovesTable[i] == move) + break; + } + if (gSoundMovesTable[i] != 0xFFFF) + { + if (gBattleMons[gBankAttacker].status2 & STATUS2_MULTIPLETURNS) + gHitMarker |= HITMARKER_NO_PPDEDUCT; + gBattlescriptCurrInstr = BattleScript_SoundproofProtected; + effect = 1; + } + } + break; + case ABILITYEFFECT_ABSORBING: // 3 + if (move) + { + switch (gLastUsedAbility) + { + case ABILITY_VOLT_ABSORB: + if (moveType == TYPE_ELECTRIC && gBattleMoves[move].power != 0) + { + if (gProtectStructs[gBankAttacker].notFirstStrike) + gBattlescriptCurrInstr = BattleScript_MoveHPDrain; + else + gBattlescriptCurrInstr = BattleScript_MoveHPDrain_PPLoss; + effect = 1; + } + break; + case ABILITY_WATER_ABSORB: + if (moveType == TYPE_WATER && gBattleMoves[move].power != 0) + { + if (gProtectStructs[gBankAttacker].notFirstStrike) + gBattlescriptCurrInstr = BattleScript_MoveHPDrain; + else + gBattlescriptCurrInstr = BattleScript_MoveHPDrain_PPLoss; + effect = 1; + } + break; + case ABILITY_FLASH_FIRE: + //_0804305C + if (moveType == TYPE_FIRE && !(gBattleMons[bank].status1 & STATUS_FREEZE)) + { + if (!(gBattleResources->flags->flags[bank] & UNKNOWN_FLAG_FLASH_FIRE)) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + if (gProtectStructs[gBankAttacker].notFirstStrike) + gBattlescriptCurrInstr = BattleScript_FlashFireBoost; + else + gBattlescriptCurrInstr = BattleScript_FlashFireBoost_PPLoss; + gBattleResources->flags->flags[bank] |= UNKNOWN_FLAG_FLASH_FIRE; + effect = 2; + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + if (gProtectStructs[gBankAttacker].notFirstStrike) + gBattlescriptCurrInstr = BattleScript_FlashFireBoost; + else + gBattlescriptCurrInstr = BattleScript_FlashFireBoost_PPLoss; + effect = 2; + } + } + break; + } + if (effect == 1) + { + if (gBattleMons[bank].maxHP == gBattleMons[bank].hp) + { + if ((gProtectStructs[gBankAttacker].notFirstStrike)) + gBattlescriptCurrInstr = BattleScript_MoveHPDrain; + else + gBattlescriptCurrInstr = BattleScript_MoveHPDrain_PPLoss; + } + else + { + gBattleMoveDamage = gBattleMons[bank].maxHP / 4; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + gBattleMoveDamage *= -1; + } + } + } + break; + case ABILITYEFFECT_CONTACT: // 4 + //_080431AC + switch (gLastUsedAbility) + { + case ABILITY_COLOR_CHANGE: + //_08043288 + if (!(gBattleMoveFlags & MOVESTATUS_NOEFFECT) + && move != MOVE_STRUGGLE + && gBattleMoves[move].power != 0 + && (gSpecialStatuses[gBankTarget].moveturnLostHP_physical || gSpecialStatuses[gBankTarget].moveturnLostHP_special) + && gBattleMons[bank].type1 != moveType + && gBattleMons[bank].type2 != moveType + && gBattleMons[bank].hp != 0) + { + gBattleMons[bank].type1 = moveType; + gBattleMons[bank].type2 = moveType; + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 3; + gBattleTextBuff1[2] = moveType; + gBattleTextBuff1[3] = 0xFF; + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_ColorChangeActivates; + effect++; + } + break; + case ABILITY_ROUGH_SKIN: + //_08043350 + if (!(gBattleMoveFlags & MOVESTATUS_NOEFFECT) + && gBattleMons[gBankAttacker].hp != 0 + && !gProtectStructs[gBankAttacker].confusionSelfDmg + && (gSpecialStatuses[gBankTarget].moveturnLostHP_physical || gSpecialStatuses[gBankTarget].moveturnLostHP_special) + && (gBattleMoves[move].flags & FLAG_MAKES_CONTACT)) + { + gBattleMoveDamage = gBattleMons[gBankAttacker].maxHP / 16; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_RoughSkinActivates; + effect++; + } + break; + case ABILITY_EFFECT_SPORE: + //_08043410 + if (!(gBattleMoveFlags & MOVESTATUS_NOEFFECT) + && gBattleMons[gBankAttacker].hp != 0 + && !gProtectStructs[gBankAttacker].confusionSelfDmg + && (gSpecialStatuses[gBankTarget].moveturnLostHP_physical || gSpecialStatuses[gBankTarget].moveturnLostHP_special) + && (gBattleMoves[move].flags & FLAG_MAKES_CONTACT) + && (Random() % 10) == 0) + { + do + { + gBattleCommunication[MOVE_EFFECT_BYTE] = Random() & 3; + } while (gBattleCommunication[MOVE_EFFECT_BYTE] == 0); + if (gBattleCommunication[MOVE_EFFECT_BYTE] == 3) + gBattleCommunication[MOVE_EFFECT_BYTE] += 2; + gBattleCommunication[MOVE_EFFECT_BYTE] += 0x40; + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_ApplySecondaryEffect; + gHitMarker |= HITMARKER_IGNORE_SAFEGUARD; + effect++; + } + break; + case ABILITY_POISON_POINT: + if (!(gBattleMoveFlags & MOVESTATUS_NOEFFECT) + && gBattleMons[gBankAttacker].hp != 0 + && !gProtectStructs[gBankAttacker].confusionSelfDmg + && (gSpecialStatuses[gBankTarget].moveturnLostHP_physical || gSpecialStatuses[gBankTarget].moveturnLostHP_special) + && (gBattleMoves[move].flags & FLAG_MAKES_CONTACT) + && (Random() % 3) == 0) + { + gBattleCommunication[MOVE_EFFECT_BYTE] = 0x42; + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_ApplySecondaryEffect; + gHitMarker |= HITMARKER_IGNORE_SAFEGUARD; + effect++; + } + break; + case ABILITY_STATIC: + if (!(gBattleMoveFlags & MOVESTATUS_NOEFFECT) + && gBattleMons[gBankAttacker].hp != 0 + && !gProtectStructs[gBankAttacker].confusionSelfDmg + && (gSpecialStatuses[gBankTarget].moveturnLostHP_physical || gSpecialStatuses[gBankTarget].moveturnLostHP_special) + && (gBattleMoves[move].flags & FLAG_MAKES_CONTACT) + && (Random() % 3) == 0) + { + gBattleCommunication[MOVE_EFFECT_BYTE] = 0x45; + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_ApplySecondaryEffect; + gHitMarker |= HITMARKER_IGNORE_SAFEGUARD; + effect++; + } + break; + case ABILITY_FLAME_BODY: + if (!(gBattleMoveFlags & MOVESTATUS_NOEFFECT) + && gBattleMons[gBankAttacker].hp != 0 + && !gProtectStructs[gBankAttacker].confusionSelfDmg + && (gBattleMoves[move].flags & FLAG_MAKES_CONTACT) + && (gSpecialStatuses[gBankTarget].moveturnLostHP_physical || gSpecialStatuses[gBankTarget].moveturnLostHP_special) + && (Random() % 3) == 0) + { + gBattleCommunication[MOVE_EFFECT_BYTE] = 0x43; + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_ApplySecondaryEffect; + gHitMarker |= HITMARKER_IGNORE_SAFEGUARD; + effect++; + } + break; + case ABILITY_CUTE_CHARM: + //_0804379C + if (!(gBattleMoveFlags & MOVESTATUS_NOEFFECT) + && gBattleMons[gBankAttacker].hp != 0 + && !gProtectStructs[gBankAttacker].confusionSelfDmg + && (gBattleMoves[move].flags & FLAG_MAKES_CONTACT) + && (gSpecialStatuses[gBankTarget].moveturnLostHP_physical || gSpecialStatuses[gBankTarget].moveturnLostHP_special) + && gBattleMons[gBankTarget].hp != 0 + && (Random() % 3) == 0 + && gBattleMons[gBankAttacker].ability != ABILITY_OBLIVIOUS + && GetGenderFromSpeciesAndPersonality(speciesAtk, pidAtk) != GetGenderFromSpeciesAndPersonality(speciesDef, pidDef) + && !(gBattleMons[gBankAttacker].status2 & STATUS2_INFATUATION) + && GetGenderFromSpeciesAndPersonality(speciesAtk, pidAtk) != 0xFF + && GetGenderFromSpeciesAndPersonality(speciesDef, pidDef) != 0xFF) + { + gBattleMons[gBankAttacker].status2 |= (gBitTable[gBankTarget] << 0x10); + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_CuteCharmActivates; + effect++; + } + break; + } + break; + case ABILITYEFFECT_IMMUNITY: // 5 + { + #define i bank + for (i = 0; i < gNoOfAllBanks; i++) + { + switch (gBattleMons[i].ability) + { + case ABILITY_IMMUNITY: + if (gBattleMons[i].status1 & (STATUS_POISON | STATUS_TOXIC_POISON | 0xF00)) // TODO: what is 0xF00? + { + StringCopy(gBattleTextBuff1, gStatusConditionString_PoisonJpn); + effect = 1; + } + break; + case ABILITY_OWN_TEMPO: + //_08043A7C + if (gBattleMons[i].status2 & STATUS2_CONFUSION) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_ConfusionJpn); + effect = 2; + } + break; + case ABILITY_LIMBER: + if (gBattleMons[i].status1 & STATUS_PARALYSIS) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_ParalysisJpn); + effect = 1; + } + break; + case ABILITY_INSOMNIA: + case ABILITY_VITAL_SPIRIT: + if (gBattleMons[i].status1 & STATUS_SLEEP) + { + gBattleMons[i].status2 &= ~(STATUS2_NIGHTMARE); + StringCopy(gBattleTextBuff1, gStatusConditionString_SleepJpn); + effect = 1; + } + break; + case ABILITY_WATER_VEIL: + if (gBattleMons[i].status1 & STATUS_BURN) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn); + effect = 1; + } + break; + case ABILITY_MAGMA_ARMOR: + if (gBattleMons[i].status1 & STATUS_FREEZE) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn); + effect = 1; + } + break; + case ABILITY_OBLIVIOUS: + //_08043B70 + if (gBattleMons[i].status2 & STATUS2_INFATUATION) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_LoveJpn); + effect = 3; + } + break; + } + if (effect) + { + switch (effect) + { + case 1: // status cleared + gBattleMons[i].status1 = 0; + break; + case 2: // get rid of confusion + gBattleMons[i].status2 &= ~(STATUS2_CONFUSION); + break; + case 3: // get rid of infatuation + gBattleMons[i].status2 &= ~(STATUS2_INFATUATION); + break; + } + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = gUnknown_082DB68C; + gBattleScripting.bank = i; + gActiveBank = i; + EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); + MarkBufferBankForExecution(gActiveBank); + return effect; + } + } + #undef i + } + break; + case ABILITYEFFECT_FORECAST: // 6 + { + #define i bank + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gBattleMons[i].ability == ABILITY_FORECAST) + { + effect = CastformDataTypeChange(i); + if (effect) + { + b_push_move_exec(BattleScript_CastformChange); + gBattleScripting.bank = i; + gBattleStruct->formToChangeInto = effect - 1; + return effect; + } + } + } + #undef i + } + break; + case ABILITYEFFECT_SYNCHRONIZE: // 7 + //_08043CBC + if (gLastUsedAbility == ABILITY_SYNCHRONIZE && (gHitMarker & HITMARKER_SYNCHRONISE_EFFECT)) + { + gHitMarker &= ~(HITMARKER_SYNCHRONISE_EFFECT); + gBattleStruct->synchronizeMoveEffect &= 0x3F; + if (gBattleStruct->synchronizeMoveEffect == 6) + gBattleStruct->synchronizeMoveEffect = 2; + gBattleCommunication[MOVE_EFFECT_BYTE] = gBattleStruct->synchronizeMoveEffect + 0x40; + gBattleScripting.bank = gBankTarget; + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_SynchronizeActivates; + gHitMarker |= HITMARKER_IGNORE_SAFEGUARD; + effect++; + } + break; + case ABILITYEFFECT_ATK_SYNCHRONIZE: // 8 + if (gLastUsedAbility == ABILITY_SYNCHRONIZE && (gHitMarker & HITMARKER_SYNCHRONISE_EFFECT)) + { + gHitMarker &= ~(HITMARKER_SYNCHRONISE_EFFECT); + gBattleStruct->synchronizeMoveEffect &= 0x3F; + if (gBattleStruct->synchronizeMoveEffect == 6) + gBattleStruct->synchronizeMoveEffect = 2; + gBattleCommunication[MOVE_EFFECT_BYTE] = gBattleStruct->synchronizeMoveEffect; + gBattleScripting.bank = gBankAttacker; + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_SynchronizeActivates; + gHitMarker |= HITMARKER_IGNORE_SAFEGUARD; + effect++; + } + break; + case ABILITYEFFECT_INTIMIDATE1: // 9 + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gBattleMons[i].ability == ABILITY_INTIMIDATE && gStatuses3[i] & STATUS3_INTIMIDATE_POKES) + { + gLastUsedAbility = ABILITY_INTIMIDATE; + gStatuses3[i] &= ~(STATUS3_INTIMIDATE_POKES); + b_push_move_exec(gUnknown_082DB4B8); + gBattleStruct->intimidateBank = i; + effect++; + break; + } + } + break; + case ABILITYEFFECT_TRACE: // 11 + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gBattleMons[i].ability == ABILITY_TRACE && (gStatuses3[i] & STATUS3_TRACE)) + { + u8 opposite = (GetBankIdentity(i) ^ 1) & 1; + u8 target1 = GetBankByPlayerAI(opposite); + u8 target2 = GetBankByPlayerAI(opposite + 2); + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + { + if (gBattleMons[target1].ability != 0 && gBattleMons[target1].hp != 0 + && gBattleMons[target2].ability != 0 && gBattleMons[target2].hp != 0) + { + gActiveBank = GetBankByPlayerAI(((Random() & 1) * 2) | opposite); + gBattleMons[i].ability = gBattleMons[gActiveBank].ability; + gLastUsedAbility = gBattleMons[gActiveBank].ability; + effect++; + } + else if (gBattleMons[target1].ability != 0 && gBattleMons[target1].hp != 0) + { + gActiveBank = target1; + gBattleMons[i].ability = gBattleMons[gActiveBank].ability; + gLastUsedAbility = gBattleMons[gActiveBank].ability; + effect++; + } + else if (gBattleMons[target2].ability != 0 && gBattleMons[target2].hp != 0) + { + gActiveBank = target2; + gBattleMons[i].ability = gBattleMons[gActiveBank].ability; + gLastUsedAbility = gBattleMons[gActiveBank].ability; + effect++; + } + } + else + { + gActiveBank = target1; + if (gBattleMons[target1].ability && gBattleMons[target1].hp) + { + gBattleMons[i].ability = gBattleMons[target1].ability; + gLastUsedAbility = gBattleMons[target1].ability; + effect++; + } + } + if (effect) + { + b_push_move_exec(BattleScript_TraceActivates); + gStatuses3[i] &= ~(STATUS3_TRACE); + gBattleScripting.bank = i; + + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 4; + gBattleTextBuff1[2] = gActiveBank; + gBattleTextBuff1[3] = gBattlePartyID[gActiveBank]; + gBattleTextBuff1[4] = EOS; + + gBattleTextBuff2[0] = 0xFD; + gBattleTextBuff2[1] = 9; + gBattleTextBuff2[2] = gLastUsedAbility; + gBattleTextBuff2[3] = EOS; + break; + } + } + } + break; + case ABILITYEFFECT_INTIMIDATE2: // 10 + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gBattleMons[i].ability == ABILITY_INTIMIDATE && (gStatuses3[i] & STATUS3_INTIMIDATE_POKES)) + { + gLastUsedAbility = ABILITY_INTIMIDATE; + gStatuses3[i] &= ~(STATUS3_INTIMIDATE_POKES); + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = gUnknown_082DB4C1; + gBattleStruct->intimidateBank = i; + effect++; + break; + } + } + break; + case ABILITYEFFECT_CHECK_OTHER_SIDE: // 12 + side = GetBankSide(bank); + for (i = 0; i < gNoOfAllBanks; i++) + { + if (GetBankSide(i) != side && gBattleMons[i].ability == ability) + { + gLastUsedAbility = ability; + effect = i + 1; + } + } + break; + case ABILITYEFFECT_CHECK_BANK_SIDE: // 13 + side = GetBankSide(bank); + for (i = 0; i < gNoOfAllBanks; i++) + { + if (GetBankSide(i) == side && gBattleMons[i].ability == ability) + { + gLastUsedAbility = ability; + effect = i + 1; + } + } + break; + case ABILITYEFFECT_FIELD_SPORT: // 14 + switch (gLastUsedAbility) + { + case 0xFD: + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gStatuses3[i] & STATUS3_MUDSPORT) + effect = i + 1; + } + break; + case 0xFE: + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gStatuses3[i] & STATUS3_WATERSPORT) + effect = i + 1; + } + break; + default: + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gBattleMons[i].ability == ability) + { + gLastUsedAbility = ability; + effect = i + 1; + } + } + break; + } + break; + case ABILITYEFFECT_CHECK_ON_FIELD: // 19 + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gBattleMons[i].ability == ability && gBattleMons[i].hp != 0) + { + gLastUsedAbility = ability; + effect = i + 1; + } + } + break; + case ABILITYEFFECT_CHECK_FIELD_EXCEPT_BANK: // 15 + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gBattleMons[i].ability == ability && i != bank) + { + gLastUsedAbility = ability; + effect = i + 1; + } + } + break; + case ABILITYEFFECT_COUNT_OTHER_SIZE: // 16 + side = GetBankSide(bank); + for (i = 0; i < gNoOfAllBanks; i++) + { + if (GetBankSide(i) != side && gBattleMons[i].ability == ability) + { + gLastUsedAbility = ability; + effect++; + } + } + break; + case ABILITYEFFECT_COUNT_BANK_SIDE: // 17 + side = GetBankSide(bank); + for (i = 0; i < gNoOfAllBanks; i++) + { + if (GetBankSide(i) == side && gBattleMons[i].ability == ability) + { + gLastUsedAbility = ability; + effect++; + } + } + break; + case ABILITYEFFECT_COUNT_ON_FIELD: // 18 + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gBattleMons[i].ability == ability && i != bank) + { + gLastUsedAbility = ability; + effect++; + } + } + break; + } + if (effect && caseID < 0xC && gLastUsedAbility != 0xFF) + RecordAbilityBattle(bank, gLastUsedAbility); + } + + return effect; +} +#else +__attribute__((naked)) +u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) +{ + asm( + "\n\ + .syntax unified\n\ + push {r4-r7,lr}\n\ + mov r7, r10\n\ + mov r6, r9\n\ + mov r5, r8\n\ + push {r5-r7}\n\ + sub sp, 0x28\n\ + ldr r4, [sp, 0x48]\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + str r0, [sp, 0x4]\n\ + lsls r1, 24\n\ + lsrs r1, 24\n\ + mov r10, r1\n\ + lsls r2, 24\n\ + lsrs r6, r2, 24\n\ + lsls r3, 24\n\ + lsrs r3, 24\n\ + mov r8, r3\n\ + lsls r4, 16\n\ + lsrs r4, 16\n\ + movs r0, 0\n\ + mov r9, r0\n\ + ldr r5, =gBankAttacker\n\ + ldr r1, =gNoOfAllBanks\n\ + ldrb r0, [r5]\n\ + ldrb r1, [r1]\n\ + cmp r0, r1\n\ + bcc _08042864\n\ + mov r1, r10\n\ + strb r1, [r5]\n\ +_08042864:\n\ + ldrb r0, [r5]\n\ + bl GetBankSide\n\ + lsls r0, 24\n\ + cmp r0, 0\n\ + bne _08042894\n\ + ldr r1, =gBattlePartyID\n\ + ldrb r0, [r5]\n\ + lsls r0, 1\n\ + adds r0, r1\n\ + ldrh r1, [r0]\n\ + movs r0, 0x64\n\ + muls r1, r0\n\ + ldr r0, =gPlayerParty\n\ + b _080428A4\n\ + .pool\n\ +_08042894:\n\ + ldr r1, =gBattlePartyID\n\ + ldrb r0, [r5]\n\ + lsls r0, 1\n\ + adds r0, r1\n\ + ldrh r1, [r0]\n\ + movs r0, 0x64\n\ + muls r1, r0\n\ + ldr r0, =gEnemyParty\n\ +_080428A4:\n\ + adds r7, r1, r0\n\ + ldr r5, =gBankTarget\n\ + ldr r1, =gNoOfAllBanks\n\ + ldrb r0, [r5]\n\ + ldrb r1, [r1]\n\ + cmp r0, r1\n\ + bcc _080428B6\n\ + mov r2, r10\n\ + strb r2, [r5]\n\ +_080428B6:\n\ + ldrb r0, [r5]\n\ + bl GetBankSide\n\ + lsls r0, 24\n\ + cmp r0, 0\n\ + bne _080428E8\n\ + ldr r1, =gBattlePartyID\n\ + ldrb r0, [r5]\n\ + lsls r0, 1\n\ + adds r0, r1\n\ + ldrh r1, [r0]\n\ + movs r0, 0x64\n\ + muls r1, r0\n\ + ldr r0, =gPlayerParty\n\ + b _080428F8\n\ + .pool\n\ +_080428E8:\n\ + ldr r1, =gBattlePartyID\n\ + ldrb r0, [r5]\n\ + lsls r0, 1\n\ + adds r0, r1\n\ + ldrh r1, [r0]\n\ + movs r0, 0x64\n\ + muls r1, r0\n\ + ldr r0, =gEnemyParty\n\ +_080428F8:\n\ + adds r5, r1, r0\n\ + adds r0, r7, 0\n\ + movs r1, 0xB\n\ + bl GetMonData\n\ + lsls r0, 16\n\ + lsrs r0, 16\n\ + str r0, [sp, 0x8]\n\ + adds r0, r7, 0\n\ + movs r1, 0\n\ + bl GetMonData\n\ + str r0, [sp, 0x10]\n\ + adds r0, r5, 0\n\ + movs r1, 0xB\n\ + bl GetMonData\n\ + lsls r0, 16\n\ + lsrs r0, 16\n\ + str r0, [sp, 0xC]\n\ + adds r0, r5, 0\n\ + movs r1, 0\n\ + bl GetMonData\n\ + str r0, [sp, 0x14]\n\ + ldr r0, =gBattleTypeFlags\n\ + ldr r0, [r0]\n\ + movs r1, 0x80\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _0804293A\n\ + bl _0804443A\n\ +_0804293A:\n\ + mov r3, r8\n\ + cmp r3, 0\n\ + beq _08042958\n\ + ldr r0, =gLastUsedAbility\n\ + strb r3, [r0]\n\ + adds r7, r0, 0\n\ + b _0804296E\n\ + .pool\n\ +_08042958:\n\ + ldr r2, =gLastUsedAbility\n\ + ldr r1, =gBattleMons\n\ + movs r0, 0x58\n\ + mov r5, r10\n\ + muls r5, r0\n\ + adds r0, r5, 0\n\ + adds r0, r1\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + strb r0, [r2]\n\ + adds r7, r2, 0\n\ +_0804296E:\n\ + cmp r4, 0\n\ + beq _08042980\n\ + adds r5, r4, 0\n\ + b _08042984\n\ + .pool\n\ +_08042980:\n\ + ldr r0, =gCurrentMove\n\ + ldrh r5, [r0]\n\ +_08042984:\n\ + ldr r1, =gBattleStruct\n\ + ldr r0, [r1]\n\ + ldrb r0, [r0, 0x13]\n\ + mov r8, r1\n\ + cmp r0, 0\n\ + beq _080429A0\n\ + movs r3, 0x3F\n\ + ands r3, r0\n\ + b _080429AC\n\ + .pool\n\ +_080429A0:\n\ + ldr r1, =gBattleMoves\n\ + lsls r0, r5, 1\n\ + adds r0, r5\n\ + lsls r0, 2\n\ + adds r0, r1\n\ + ldrb r3, [r0, 0x2]\n\ +_080429AC:\n\ + ldr r0, [sp, 0x4]\n\ + cmp r0, 0x13\n\ + bls _080429B6\n\ + bl _0804441E\n\ +_080429B6:\n\ + lsls r0, 2\n\ + ldr r1, =_080429C8\n\ + adds r0, r1\n\ + ldr r0, [r0]\n\ + mov pc, r0\n\ + .pool\n\ + .align 2, 0\n\ +_080429C8:\n\ + .4byte _08042A18\n\ + .4byte _08042CDC\n\ + .4byte _08042EF8\n\ + .4byte _08042F8C\n\ + .4byte _080431AC\n\ + .4byte _08043908\n\ + .4byte _08043C6C\n\ + .4byte _08043CBC\n\ + .4byte _08043D40\n\ + .4byte _08043DC4\n\ + .4byte _08043FE4\n\ + .4byte _08043E08\n\ + .4byte _08044028\n\ + .4byte _08044084\n\ + .4byte _080440E0\n\ + .4byte _080441DC\n\ + .4byte _08044220\n\ + .4byte _0804427C\n\ + .4byte _080443EC\n\ + .4byte _08044196\n\ +_08042A18:\n\ + ldr r2, =gBankAttacker\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r1, [r2]\n\ + adds r5, r0, 0\n\ + ldrb r3, [r5]\n\ + cmp r1, r3\n\ + bcc _08042A2A\n\ + mov r0, r10\n\ + strb r0, [r2]\n\ +_08042A2A:\n\ + ldrb r0, [r7]\n\ + cmp r0, 0x2D\n\ + bne _08042A32\n\ + b _08042BA8\n\ +_08042A32:\n\ + cmp r0, 0x2D\n\ + bgt _08042A64\n\ + cmp r0, 0xD\n\ + bne _08042A3C\n\ + b _08042CA4\n\ +_08042A3C:\n\ + cmp r0, 0xD\n\ + bgt _08042A54\n\ + cmp r0, 0x2\n\ + bne _08042A46\n\ + b _08042B78\n\ +_08042A46:\n\ + bl _0804441E\n\ + .pool\n\ +_08042A54:\n\ + cmp r0, 0x16\n\ + bne _08042A5A\n\ + b _08042C08\n\ +_08042A5A:\n\ + cmp r0, 0x24\n\ + bne _08042A60\n\ + b _08042C68\n\ +_08042A60:\n\ + bl _0804441E\n\ +_08042A64:\n\ + cmp r0, 0x46\n\ + bne _08042A6A\n\ + b _08042BD8\n\ +_08042A6A:\n\ + cmp r0, 0x46\n\ + bgt _08042A78\n\ + cmp r0, 0x3B\n\ + bne _08042A74\n\ + b _08042C3C\n\ +_08042A74:\n\ + bl _0804441E\n\ +_08042A78:\n\ + cmp r0, 0x4D\n\ + bne _08042A7E\n\ + b _08042CA4\n\ +_08042A7E:\n\ + cmp r0, 0xFF\n\ + beq _08042A86\n\ + bl _0804441E\n\ +_08042A86:\n\ + ldr r0, =gBattleTypeFlags\n\ + ldr r0, [r0]\n\ + movs r1, 0x80\n\ + lsls r1, 17\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _08042B4C\n\ + bl weather_get_current\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + subs r0, 0x3\n\ + cmp r0, 0xA\n\ + bhi _08042B4C\n\ + lsls r0, 2\n\ + ldr r1, =_08042AB4\n\ + adds r0, r1\n\ + ldr r0, [r0]\n\ + mov pc, r0\n\ + .pool\n\ + .align 2, 0\n\ +_08042AB4:\n\ + .4byte _08042AE0\n\ + .4byte _08042B4C\n\ + .4byte _08042AE0\n\ + .4byte _08042B4C\n\ + .4byte _08042B4C\n\ + .4byte _08042B04\n\ + .4byte _08042B4C\n\ + .4byte _08042B4C\n\ + .4byte _08042B4C\n\ + .4byte _08042B28\n\ + .4byte _08042AE0\n\ +_08042AE0:\n\ + ldr r2, =gBattleWeather\n\ + ldrh r1, [r2]\n\ + movs r0, 0x7\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _08042B4C\n\ + movs r0, 0x5\n\ + strh r0, [r2]\n\ + ldr r1, =gBattleScripting\n\ + movs r0, 0xA\n\ + strb r0, [r1, 0x10]\n\ + mov r2, r10\n\ + strb r2, [r1, 0x17]\n\ + b _08042B42\n\ + .pool\n\ +_08042B04:\n\ + ldr r3, =gBattleWeather\n\ + ldrh r1, [r3]\n\ + movs r2, 0x18\n\ + adds r0, r2, 0\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _08042B4C\n\ + strh r2, [r3]\n\ + ldr r1, =gBattleScripting\n\ + movs r0, 0xC\n\ + strb r0, [r1, 0x10]\n\ + mov r3, r10\n\ + strb r3, [r1, 0x17]\n\ + b _08042B42\n\ + .pool\n\ +_08042B28:\n\ + ldr r3, =gBattleWeather\n\ + ldrh r1, [r3]\n\ + movs r2, 0x60\n\ + adds r0, r2, 0\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _08042B4C\n\ + strh r2, [r3]\n\ + ldr r1, =gBattleScripting\n\ + movs r0, 0xB\n\ + strb r0, [r1, 0x10]\n\ + mov r5, r10\n\ + strb r5, [r1, 0x17]\n\ +_08042B42:\n\ + mov r0, r9\n\ + adds r0, 0x1\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ +_08042B4C:\n\ + mov r0, r9\n\ + cmp r0, 0\n\ + bne _08042B56\n\ + bl _0804443A\n\ +_08042B56:\n\ + bl weather_get_current\n\ + ldr r1, =gBattleCommunication\n\ + strb r0, [r1, 0x5]\n\ + ldr r0, =gUnknown_082DACE7\n\ + bl b_push_move_exec\n\ + bl _0804441E\n\ + .pool\n\ +_08042B78:\n\ + ldr r2, =gBattleWeather\n\ + ldrh r1, [r2]\n\ + movs r0, 0x4\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08042B88\n\ + bl _0804441E\n\ +_08042B88:\n\ + movs r0, 0x5\n\ + strh r0, [r2]\n\ + ldr r0, =BattleScript_DrizzleActivates\n\ + bl b_push_move_exec\n\ + ldr r0, =gBattleScripting\n\ + mov r1, r10\n\ + strb r1, [r0, 0x17]\n\ + bl _080443D0\n\ + .pool\n\ +_08042BA8:\n\ + ldr r2, =gBattleWeather\n\ + ldrh r1, [r2]\n\ + movs r0, 0x10\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08042BB8\n\ + bl _0804441E\n\ +_08042BB8:\n\ + movs r0, 0x18\n\ + strh r0, [r2]\n\ + ldr r0, =BattleScript_SandstreamActivates\n\ + bl b_push_move_exec\n\ + ldr r0, =gBattleScripting\n\ + mov r2, r10\n\ + strb r2, [r0, 0x17]\n\ + bl _080443D0\n\ + .pool\n\ +_08042BD8:\n\ + ldr r2, =gBattleWeather\n\ + ldrh r1, [r2]\n\ + movs r0, 0x40\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08042BE8\n\ + bl _0804441E\n\ +_08042BE8:\n\ + movs r0, 0x60\n\ + strh r0, [r2]\n\ + ldr r0, =BattleScript_DroughtActivates\n\ + bl b_push_move_exec\n\ + ldr r0, =gBattleScripting\n\ + mov r3, r10\n\ + strb r3, [r0, 0x17]\n\ + bl _080443D0\n\ + .pool\n\ +_08042C08:\n\ + ldr r0, =gSpecialStatuses\n\ + mov r5, r10\n\ + lsls r2, r5, 2\n\ + adds r1, r2, r5\n\ + lsls r1, 2\n\ + adds r3, r1, r0\n\ + ldrb r0, [r3]\n\ + lsls r0, 28\n\ + cmp r0, 0\n\ + bge _08042C20\n\ + bl _0804441E\n\ +_08042C20:\n\ + ldr r1, =gStatuses3\n\ + adds r1, r2, r1\n\ + ldr r0, [r1]\n\ + movs r2, 0x80\n\ + lsls r2, 12\n\ + orrs r0, r2\n\ + str r0, [r1]\n\ + ldrb r0, [r3]\n\ + movs r1, 0x8\n\ + b _08042C92\n\ + .pool\n\ +_08042C3C:\n\ + mov r0, r10\n\ + bl CastformDataTypeChange\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ + cmp r0, 0\n\ + bne _08042C50\n\ + bl _0804443A\n\ +_08042C50:\n\ + ldr r0, =BattleScript_CastformChange\n\ + bl b_push_move_exec\n\ + ldr r0, =gBattleScripting\n\ + mov r1, r10\n\ + strb r1, [r0, 0x17]\n\ + bl _080442E2\n\ + .pool\n\ +_08042C68:\n\ + ldr r0, =gSpecialStatuses\n\ + mov r3, r10\n\ + lsls r2, r3, 2\n\ + adds r1, r2, r3\n\ + lsls r1, 2\n\ + adds r3, r1, r0\n\ + ldrb r0, [r3]\n\ + lsls r0, 27\n\ + cmp r0, 0\n\ + bge _08042C80\n\ + bl _0804441E\n\ +_08042C80:\n\ + ldr r1, =gStatuses3\n\ + adds r1, r2, r1\n\ + ldr r0, [r1]\n\ + movs r2, 0x80\n\ + lsls r2, 13\n\ + orrs r0, r2\n\ + str r0, [r1]\n\ + ldrb r0, [r3]\n\ + movs r1, 0x10\n\ +_08042C92:\n\ + orrs r0, r1\n\ + strb r0, [r3]\n\ + bl _0804441E\n\ + .pool\n\ +_08042CA4:\n\ + movs r6, 0\n\ + ldrb r5, [r5]\n\ + cmp r6, r5\n\ + bcc _08042CB0\n\ + bl _0804441E\n\ +_08042CB0:\n\ + adds r0, r6, 0\n\ + bl CastformDataTypeChange\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ + cmp r0, 0\n\ + beq _08042CC4\n\ + bl _080442D8\n\ +_08042CC4:\n\ + adds r0, r6, 0x1\n\ + lsls r0, 24\n\ + lsrs r6, r0, 24\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r6, r0\n\ + bcc _08042CB0\n\ + bl _0804441E\n\ + .pool\n\ +_08042CDC:\n\ + ldr r5, =gBattleMons\n\ + mov r8, r5\n\ + movs r0, 0x58\n\ + mov r6, r10\n\ + muls r6, r0\n\ + adds r4, r6, r5\n\ + ldrh r0, [r4, 0x28]\n\ + cmp r0, 0\n\ + bne _08042CF2\n\ + bl _0804441E\n\ +_08042CF2:\n\ + ldr r0, =gBankAttacker\n\ + mov r1, r10\n\ + strb r1, [r0]\n\ + ldrb r5, [r7]\n\ + cmp r5, 0x2C\n\ + beq _08042D22\n\ + cmp r5, 0x2C\n\ + bgt _08042D14\n\ + cmp r5, 0x3\n\ + bne _08042D08\n\ + b _08042E84\n\ +_08042D08:\n\ + bl _0804441E\n\ + .pool\n\ +_08042D14:\n\ + cmp r5, 0x36\n\ + bne _08042D1A\n\ + b _08042ED0\n\ +_08042D1A:\n\ + cmp r5, 0x3D\n\ + beq _08042DA0\n\ + bl _0804441E\n\ +_08042D22:\n\ + movs r0, 0\n\ + str r0, [sp]\n\ + movs r0, 0x13\n\ + movs r1, 0\n\ + movs r2, 0xD\n\ + movs r3, 0\n\ + bl AbilityBattleEffects\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + cmp r0, 0\n\ + beq _08042D3E\n\ + bl _0804441E\n\ +_08042D3E:\n\ + str r0, [sp]\n\ + movs r0, 0x13\n\ + movs r1, 0\n\ + movs r2, 0x4D\n\ + movs r3, 0\n\ + bl AbilityBattleEffects\n\ + lsls r0, 24\n\ + cmp r0, 0\n\ + beq _08042D56\n\ + bl _0804441E\n\ +_08042D56:\n\ + ldr r0, =gBattleWeather\n\ + ldrh r1, [r0]\n\ + movs r0, 0x7\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _08042D66\n\ + bl _0804441E\n\ +_08042D66:\n\ + ldrh r0, [r4, 0x2C]\n\ + ldrh r2, [r4, 0x28]\n\ + cmp r0, r2\n\ + bhi _08042D72\n\ + bl _0804441E\n\ +_08042D72:\n\ + strb r5, [r7]\n\ + ldr r0, =BattleScript_RainDishActivates\n\ + bl b_push_move_exec\n\ + ldr r1, =gBattleMoveDamage\n\ + ldrh r0, [r4, 0x2C]\n\ + lsrs r0, 4\n\ + str r0, [r1]\n\ + cmp r0, 0\n\ + bne _08042D8A\n\ + movs r0, 0x1\n\ + str r0, [r1]\n\ +_08042D8A:\n\ + ldr r0, [r1]\n\ + negs r0, r0\n\ + str r0, [r1]\n\ + bl _080443D0\n\ + .pool\n\ +_08042DA0:\n\ + mov r0, r8\n\ + adds r0, 0x4C\n\ + adds r5, r6, r0\n\ + ldrb r0, [r5]\n\ + cmp r0, 0\n\ + bne _08042DB0\n\ + bl _0804441E\n\ +_08042DB0:\n\ + bl Random\n\ + lsls r0, 16\n\ + lsrs r0, 16\n\ + movs r1, 0x3\n\ + bl __umodsi3\n\ + lsls r0, 16\n\ + lsrs r4, r0, 16\n\ + cmp r4, 0\n\ + beq _08042DCA\n\ + bl _0804441E\n\ +_08042DCA:\n\ + ldr r0, [r5]\n\ + movs r1, 0x88\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08042DDC\n\ + ldr r0, =gBattleTextBuff1\n\ + ldr r1, =gStatusConditionString_PoisonJpn\n\ + bl StringCopy\n\ +_08042DDC:\n\ + ldr r0, [r5]\n\ + movs r1, 0x7\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08042DEE\n\ + ldr r0, =gBattleTextBuff1\n\ + ldr r1, =gStatusConditionString_SleepJpn\n\ + bl StringCopy\n\ +_08042DEE:\n\ + ldr r0, [r5]\n\ + movs r1, 0x40\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08042E00\n\ + ldr r0, =gBattleTextBuff1\n\ + ldr r1, =gStatusConditionString_ParalysisJpn\n\ + bl StringCopy\n\ +_08042E00:\n\ + ldr r0, [r5]\n\ + movs r1, 0x10\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08042E12\n\ + ldr r0, =gBattleTextBuff1\n\ + ldr r1, =gStatusConditionString_BurnJpn\n\ + bl StringCopy\n\ +_08042E12:\n\ + ldr r0, [r5]\n\ + movs r1, 0x20\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08042E24\n\ + ldr r0, =gBattleTextBuff1\n\ + ldr r1, =gStatusConditionString_IceJpn\n\ + bl StringCopy\n\ +_08042E24:\n\ + str r4, [r5]\n\ + mov r1, r8\n\ + adds r1, 0x50\n\ + adds r1, r6, r1\n\ + ldr r0, [r1]\n\ + ldr r2, =0xf7ffffff\n\ + ands r0, r2\n\ + str r0, [r1]\n\ + ldr r0, =gBattleScripting\n\ + ldr r4, =gActiveBank\n\ + mov r3, r10\n\ + strb r3, [r4]\n\ + strb r3, [r0, 0x17]\n\ + ldr r0, =BattleScript_ShedSkinActivates\n\ + bl b_push_move_exec\n\ + str r5, [sp]\n\ + movs r0, 0\n\ + movs r1, 0x28\n\ + movs r2, 0\n\ + movs r3, 0x4\n\ + bl EmitSetAttributes\n\ + ldrb r0, [r4]\n\ + bl MarkBufferBankForExecution\n\ + bl _080443D0\n\ + .pool\n\ +_08042E84:\n\ + ldrb r2, [r4, 0x1B]\n\ + movs r0, 0x1B\n\ + ldrsb r0, [r4, r0]\n\ + cmp r0, 0xB\n\ + ble _08042E92\n\ + bl _0804441E\n\ +_08042E92:\n\ + ldr r0, =gDisableStructs\n\ + mov r5, r10\n\ + lsls r1, r5, 3\n\ + subs r1, r5\n\ + lsls r1, 2\n\ + adds r1, r0\n\ + ldrb r0, [r1, 0x16]\n\ + cmp r0, 0x2\n\ + bne _08042EA8\n\ + bl _0804441E\n\ +_08042EA8:\n\ + adds r0, r2, 0x1\n\ + movs r1, 0\n\ + strb r0, [r4, 0x1B]\n\ + ldr r4, =gBattleScripting\n\ + movs r0, 0x11\n\ + strb r0, [r4, 0x10]\n\ + strb r1, [r4, 0x11]\n\ + ldr r0, =BattleScript_SpeedBoostActivates\n\ + bl b_push_move_exec\n\ + strb r5, [r4, 0x17]\n\ + bl _080443D0\n\ + .pool\n\ +_08042ED0:\n\ + ldr r2, =gDisableStructs\n\ + ldrb r0, [r0]\n\ + lsls r1, r0, 3\n\ + subs r1, r0\n\ + lsls r1, 2\n\ + adds r1, r2\n\ + ldrb r3, [r1, 0x18]\n\ + lsls r0, r3, 31\n\ + lsrs r0, 31\n\ + movs r2, 0x1\n\ + eors r2, r0\n\ + movs r0, 0x2\n\ + negs r0, r0\n\ + ands r0, r3\n\ + orrs r0, r2\n\ + strb r0, [r1, 0x18]\n\ + bl _0804441E\n\ + .pool\n\ +_08042EF8:\n\ + ldrb r0, [r7]\n\ + cmp r0, 0x2B\n\ + beq _08042F02\n\ + bl _0804441E\n\ +_08042F02:\n\ + movs r4, 0\n\ + ldr r0, =gSoundMovesTable\n\ + ldrh r2, [r0]\n\ + ldr r3, =0x0000ffff\n\ + adds r1, r0, 0\n\ + cmp r2, r3\n\ + bne _08042F14\n\ + bl _0804441E\n\ +_08042F14:\n\ + cmp r2, r5\n\ + beq _08042F2C\n\ + adds r2, r1, 0\n\ +_08042F1A:\n\ + adds r2, 0x2\n\ + adds r4, 0x1\n\ + ldrh r0, [r2]\n\ + cmp r0, r3\n\ + bne _08042F28\n\ + bl _0804441E\n\ +_08042F28:\n\ + cmp r0, r5\n\ + bne _08042F1A\n\ +_08042F2C:\n\ + lsls r0, r4, 1\n\ + adds r0, r1\n\ + ldrh r1, [r0]\n\ + ldr r0, =0x0000ffff\n\ + cmp r1, r0\n\ + bne _08042F3C\n\ + bl _0804441E\n\ +_08042F3C:\n\ + ldr r1, =gBattleMons\n\ + ldr r0, =gBankAttacker\n\ + ldrb r2, [r0]\n\ + movs r0, 0x58\n\ + muls r0, r2\n\ + adds r1, 0x50\n\ + adds r0, r1\n\ + ldr r0, [r0]\n\ + movs r1, 0x80\n\ + lsls r1, 5\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08042F62\n\ + ldr r0, =gHitMarker\n\ + ldr r1, [r0]\n\ + movs r2, 0x80\n\ + lsls r2, 4\n\ + orrs r1, r2\n\ + str r1, [r0]\n\ +_08042F62:\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_SoundproofProtected\n\ + str r0, [r1]\n\ + movs r0, 0x1\n\ + mov r9, r0\n\ + bl _08044424\n\ + .pool\n\ +_08042F8C:\n\ + cmp r5, 0\n\ + bne _08042F94\n\ + bl _0804441E\n\ +_08042F94:\n\ + ldrb r0, [r7]\n\ + cmp r0, 0xB\n\ + beq _08043004\n\ + cmp r0, 0xB\n\ + bgt _08042FA4\n\ + cmp r0, 0xA\n\ + beq _08042FAA\n\ + b _08043126\n\ +_08042FA4:\n\ + cmp r0, 0x12\n\ + beq _0804305C\n\ + b _08043126\n\ +_08042FAA:\n\ + cmp r3, 0xD\n\ + beq _08042FB0\n\ + b _08043126\n\ +_08042FB0:\n\ + ldr r0, =gBattleMoves\n\ + lsls r1, r5, 1\n\ + adds r1, r5\n\ + lsls r1, 2\n\ + adds r1, r0\n\ + ldrb r0, [r1, 0x1]\n\ + cmp r0, 0\n\ + bne _08042FC2\n\ + b _08043126\n\ +_08042FC2:\n\ + ldr r1, =gProtectStructs\n\ + ldr r0, =gBankAttacker\n\ + ldrb r0, [r0]\n\ + lsls r0, 4\n\ + adds r0, r1\n\ + ldrb r0, [r0, 0x2]\n\ + lsls r0, 28\n\ + cmp r0, 0\n\ + bge _08042FF0\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_MoveHPDrain\n\ + b _08042FF4\n\ + .pool\n\ +_08042FF0:\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_MoveHPDrain_PPLoss\n\ +_08042FF4:\n\ + str r0, [r1]\n\ + movs r1, 0x1\n\ + b _08043124\n\ + .pool\n\ +_08043004:\n\ + cmp r3, 0xB\n\ + beq _0804300A\n\ + b _08043126\n\ +_0804300A:\n\ + ldr r0, =gBattleMoves\n\ + lsls r1, r5, 1\n\ + adds r1, r5\n\ + lsls r1, 2\n\ + adds r1, r0\n\ + ldrb r0, [r1, 0x1]\n\ + cmp r0, 0\n\ + bne _0804301C\n\ + b _08043126\n\ +_0804301C:\n\ + ldr r1, =gProtectStructs\n\ + ldr r0, =gBankAttacker\n\ + ldrb r0, [r0]\n\ + lsls r0, 4\n\ + adds r0, r1\n\ + ldrb r0, [r0, 0x2]\n\ + lsls r0, 28\n\ + cmp r0, 0\n\ + bge _08043048\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_MoveHPDrain\n\ + b _0804304C\n\ + .pool\n\ +_08043048:\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_MoveHPDrain_PPLoss\n\ +_0804304C:\n\ + str r0, [r1]\n\ + movs r2, 0x1\n\ + mov r9, r2\n\ + b _08043126\n\ + .pool\n\ +_0804305C:\n\ + cmp r3, 0xA\n\ + bne _08043126\n\ + ldr r1, =gBattleMons\n\ + movs r0, 0x58\n\ + mov r3, r10\n\ + muls r3, r0\n\ + adds r0, r3, 0\n\ + adds r1, 0x4C\n\ + adds r0, r1\n\ + ldr r0, [r0]\n\ + movs r1, 0x20\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _08043126\n\ + ldr r2, =gBattleResources\n\ + ldr r0, [r2]\n\ + ldr r0, [r0, 0x4]\n\ + mov r5, r10\n\ + lsls r1, r5, 2\n\ + adds r0, r1\n\ + ldr r3, [r0]\n\ + movs r4, 0x1\n\ + ands r3, r4\n\ + adds r5, r1, 0\n\ + cmp r3, 0\n\ + bne _080430EC\n\ + ldr r0, =gBattleCommunication\n\ + strb r3, [r0, 0x5]\n\ + ldr r1, =gProtectStructs\n\ + ldr r0, =gBankAttacker\n\ + ldrb r0, [r0]\n\ + lsls r0, 4\n\ + adds r0, r1\n\ + ldrb r0, [r0, 0x2]\n\ + lsls r0, 28\n\ + cmp r0, 0\n\ + bge _080430C8\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_FlashFireBoost\n\ + b _080430CC\n\ + .pool\n\ +_080430C8:\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_FlashFireBoost_PPLoss\n\ +_080430CC:\n\ + str r0, [r1]\n\ + ldr r0, [r2]\n\ + ldr r1, [r0, 0x4]\n\ + adds r1, r5\n\ + ldr r0, [r1]\n\ + movs r2, 0x1\n\ + orrs r0, r2\n\ + str r0, [r1]\n\ + movs r0, 0x2\n\ + mov r9, r0\n\ + b _08043126\n\ + .pool\n\ +_080430EC:\n\ + ldr r0, =gBattleCommunication\n\ + strb r4, [r0, 0x5]\n\ + ldr r1, =gProtectStructs\n\ + ldr r0, =gBankAttacker\n\ + ldrb r0, [r0]\n\ + lsls r0, 4\n\ + adds r0, r1\n\ + ldrb r0, [r0, 0x2]\n\ + lsls r0, 28\n\ + cmp r0, 0\n\ + bge _0804311C\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_FlashFireBoost\n\ + b _08043120\n\ + .pool\n\ +_0804311C:\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_FlashFireBoost_PPLoss\n\ +_08043120:\n\ + str r0, [r1]\n\ + movs r1, 0x2\n\ +_08043124:\n\ + mov r9, r1\n\ +_08043126:\n\ + mov r2, r9\n\ + cmp r2, 0x1\n\ + beq _08043130\n\ + bl _0804441E\n\ +_08043130:\n\ + ldr r1, =gBattleMons\n\ + movs r0, 0x58\n\ + mov r3, r10\n\ + muls r3, r0\n\ + adds r0, r3, 0\n\ + adds r1, r0, r1\n\ + ldrh r0, [r1, 0x2C]\n\ + ldrh r5, [r1, 0x28]\n\ + cmp r0, r5\n\ + bne _0804318C\n\ + ldr r1, =gProtectStructs\n\ + ldr r0, =gBankAttacker\n\ + ldrb r0, [r0]\n\ + lsls r0, 4\n\ + adds r0, r1\n\ + ldrb r0, [r0, 0x2]\n\ + lsls r0, 28\n\ + cmp r0, 0\n\ + bge _08043178\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =gUnknown_082DB592\n\ + str r0, [r1]\n\ + bl _0804441E\n\ + .pool\n\ +_08043178:\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =gUnknown_082DB591\n\ + str r0, [r1]\n\ + bl _0804441E\n\ + .pool\n\ +_0804318C:\n\ + ldr r2, =gBattleMoveDamage\n\ + ldrh r0, [r1, 0x2C]\n\ + lsrs r0, 2\n\ + str r0, [r2]\n\ + cmp r0, 0\n\ + bne _0804319C\n\ + mov r0, r9\n\ + str r0, [r2]\n\ +_0804319C:\n\ + ldr r0, [r2]\n\ + negs r0, r0\n\ + str r0, [r2]\n\ + bl _0804441E\n\ + .pool\n\ +_080431AC:\n\ + ldrb r0, [r7]\n\ + subs r0, 0x9\n\ + cmp r0, 0x2F\n\ + bls _080431B8\n\ + bl _0804441E\n\ +_080431B8:\n\ + lsls r0, 2\n\ + ldr r1, =_080431C8\n\ + adds r0, r1\n\ + ldr r0, [r0]\n\ + mov pc, r0\n\ + .pool\n\ + .align 2, 0\n\ +_080431C8:\n\ + .4byte _080435E4\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _08043288\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _08043350\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _08043410\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _08043508\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _080436C0\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804441E\n\ + .4byte _0804379C\n\ +_08043288:\n\ + ldr r0, =gBattleMoveFlags\n\ + ldrb r1, [r0]\n\ + movs r0, 0x29\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08043298\n\ + bl _0804441E\n\ +_08043298:\n\ + cmp r5, 0xA5\n\ + bne _080432A0\n\ + bl _0804441E\n\ +_080432A0:\n\ + ldr r0, =gBattleMoves\n\ + lsls r1, r5, 1\n\ + adds r1, r5\n\ + lsls r1, 2\n\ + adds r1, r0\n\ + ldrb r0, [r1, 0x1]\n\ + cmp r0, 0\n\ + bne _080432B4\n\ + bl _0804441E\n\ +_080432B4:\n\ + ldr r2, =gSpecialStatuses\n\ + ldr r0, =gBankTarget\n\ + ldrb r1, [r0]\n\ + lsls r0, r1, 2\n\ + adds r0, r1\n\ + lsls r1, r0, 2\n\ + adds r0, r2, 0\n\ + adds r0, 0x8\n\ + adds r0, r1, r0\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + bne _080432DC\n\ + adds r0, r2, 0\n\ + adds r0, 0xC\n\ + adds r0, r1, r0\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + bne _080432DC\n\ + bl _0804441E\n\ +_080432DC:\n\ + ldr r1, =gBattleMons\n\ + movs r0, 0x58\n\ + mov r2, r10\n\ + muls r2, r0\n\ + adds r0, r2, 0\n\ + adds r1, r0, r1\n\ + adds r4, r1, 0\n\ + adds r4, 0x21\n\ + ldrb r0, [r4]\n\ + cmp r0, r3\n\ + bne _080432F6\n\ + bl _0804441E\n\ +_080432F6:\n\ + adds r2, r1, 0\n\ + adds r2, 0x22\n\ + ldrb r0, [r2]\n\ + cmp r0, r3\n\ + bne _08043304\n\ + bl _0804441E\n\ +_08043304:\n\ + ldrh r0, [r1, 0x28]\n\ + cmp r0, 0\n\ + bne _0804330E\n\ + bl _0804441E\n\ +_0804330E:\n\ + strb r3, [r4]\n\ + strb r3, [r2]\n\ + ldr r1, =gBattleTextBuff1\n\ + movs r0, 0xFD\n\ + strb r0, [r1]\n\ + movs r0, 0x3\n\ + strb r0, [r1, 0x1]\n\ + strb r3, [r1, 0x2]\n\ + movs r0, 0xFF\n\ + strb r0, [r1, 0x3]\n\ + bl b_movescr_stack_push_cursor\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_ColorChangeActivates\n\ + str r0, [r1]\n\ + bl _080443D0\n\ + .pool\n\ +_08043350:\n\ + ldr r0, =gBattleMoveFlags\n\ + ldrb r1, [r0]\n\ + movs r0, 0x29\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08043360\n\ + bl _0804441E\n\ +_08043360:\n\ + ldr r1, =gBattleMons\n\ + ldr r0, =gBankAttacker\n\ + ldrb r2, [r0]\n\ + movs r0, 0x58\n\ + muls r0, r2\n\ + adds r3, r0, r1\n\ + ldrh r0, [r3, 0x28]\n\ + cmp r0, 0\n\ + bne _08043376\n\ + bl _0804441E\n\ +_08043376:\n\ + ldr r0, =gProtectStructs\n\ + lsls r1, r2, 4\n\ + adds r1, r0\n\ + ldrb r0, [r1, 0x1]\n\ + lsls r0, 31\n\ + cmp r0, 0\n\ + beq _08043388\n\ + bl _0804441E\n\ +_08043388:\n\ + ldr r2, =gSpecialStatuses\n\ + ldr r0, =gBankTarget\n\ + ldrb r1, [r0]\n\ + lsls r0, r1, 2\n\ + adds r0, r1\n\ + lsls r1, r0, 2\n\ + adds r0, r2, 0\n\ + adds r0, 0x8\n\ + adds r0, r1, r0\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + bne _080433B0\n\ + adds r0, r2, 0\n\ + adds r0, 0xC\n\ + adds r0, r1, r0\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + bne _080433B0\n\ + bl _0804441E\n\ +_080433B0:\n\ + ldr r1, =gBattleMoves\n\ + lsls r0, r5, 1\n\ + adds r0, r5\n\ + lsls r0, 2\n\ + adds r0, r1\n\ + ldrb r1, [r0, 0x8]\n\ + movs r2, 0x1\n\ + adds r0, r2, 0\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _080433CA\n\ + bl _0804441E\n\ +_080433CA:\n\ + ldr r1, =gBattleMoveDamage\n\ + ldrh r0, [r3, 0x2C]\n\ + lsrs r0, 4\n\ + str r0, [r1]\n\ + cmp r0, 0\n\ + bne _080433D8\n\ + str r2, [r1]\n\ +_080433D8:\n\ + bl b_movescr_stack_push_cursor\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_RoughSkinActivates\n\ + str r0, [r1]\n\ + bl _080443D0\n\ + .pool\n\ +_08043410:\n\ + ldr r0, =gBattleMoveFlags\n\ + ldrb r1, [r0]\n\ + movs r0, 0x29\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08043420\n\ + bl _0804441E\n\ +_08043420:\n\ + ldr r1, =gBattleMons\n\ + ldr r0, =gBankAttacker\n\ + ldrb r2, [r0]\n\ + movs r0, 0x58\n\ + muls r0, r2\n\ + adds r0, r1\n\ + ldrh r0, [r0, 0x28]\n\ + cmp r0, 0\n\ + bne _08043436\n\ + bl _0804441E\n\ +_08043436:\n\ + ldr r0, =gProtectStructs\n\ + lsls r1, r2, 4\n\ + adds r1, r0\n\ + ldrb r0, [r1, 0x1]\n\ + lsls r0, 31\n\ + cmp r0, 0\n\ + beq _08043448\n\ + bl _0804441E\n\ +_08043448:\n\ + ldr r2, =gSpecialStatuses\n\ + ldr r0, =gBankTarget\n\ + ldrb r1, [r0]\n\ + lsls r0, r1, 2\n\ + adds r0, r1\n\ + lsls r1, r0, 2\n\ + adds r0, r2, 0\n\ + adds r0, 0x8\n\ + adds r0, r1, r0\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + bne _08043470\n\ + adds r0, r2, 0\n\ + adds r0, 0xC\n\ + adds r0, r1, r0\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + bne _08043470\n\ + bl _0804441E\n\ +_08043470:\n\ + ldr r1, =gBattleMoves\n\ + lsls r0, r5, 1\n\ + adds r0, r5\n\ + lsls r0, 2\n\ + adds r0, r1\n\ + ldrb r1, [r0, 0x8]\n\ + movs r0, 0x1\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _08043488\n\ + bl _0804441E\n\ +_08043488:\n\ + bl Random\n\ + lsls r0, 16\n\ + lsrs r0, 16\n\ + movs r1, 0xA\n\ + bl __umodsi3\n\ + lsls r0, 16\n\ + cmp r0, 0\n\ + beq _080434A0\n\ + bl _0804441E\n\ +_080434A0:\n\ + ldr r5, =gBattleCommunication\n\ + movs r4, 0x3\n\ +_080434A4:\n\ + bl Random\n\ + ands r0, r4\n\ + strb r0, [r5, 0x3]\n\ + cmp r0, 0\n\ + beq _080434A4\n\ + ldr r1, =gBattleCommunication\n\ + ldrb r0, [r1, 0x3]\n\ + cmp r0, 0x3\n\ + bne _080434BC\n\ + adds r0, 0x2\n\ + strb r0, [r1, 0x3]\n\ +_080434BC:\n\ + ldrb r0, [r1, 0x3]\n\ + adds r0, 0x40\n\ + strb r0, [r1, 0x3]\n\ + bl b_movescr_stack_push_cursor\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_ApplySecondaryEffect\n\ + str r0, [r1]\n\ + ldr r2, =gHitMarker\n\ + ldr r0, [r2]\n\ + movs r1, 0x80\n\ + lsls r1, 6\n\ + orrs r0, r1\n\ + str r0, [r2]\n\ + bl _080443D0\n\ + .pool\n\ +_08043508:\n\ + ldr r0, =gBattleMoveFlags\n\ + ldrb r1, [r0]\n\ + movs r0, 0x29\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08043518\n\ + bl _0804441E\n\ +_08043518:\n\ + ldr r1, =gBattleMons\n\ + ldr r0, =gBankAttacker\n\ + ldrb r2, [r0]\n\ + movs r0, 0x58\n\ + muls r0, r2\n\ + adds r0, r1\n\ + ldrh r0, [r0, 0x28]\n\ + cmp r0, 0\n\ + bne _0804352E\n\ + bl _0804441E\n\ +_0804352E:\n\ + ldr r0, =gProtectStructs\n\ + lsls r1, r2, 4\n\ + adds r1, r0\n\ + ldrb r0, [r1, 0x1]\n\ + lsls r0, 31\n\ + cmp r0, 0\n\ + beq _08043540\n\ + bl _0804441E\n\ +_08043540:\n\ + ldr r2, =gSpecialStatuses\n\ + ldr r0, =gBankTarget\n\ + ldrb r1, [r0]\n\ + lsls r0, r1, 2\n\ + adds r0, r1\n\ + lsls r1, r0, 2\n\ + adds r0, r2, 0\n\ + adds r0, 0x8\n\ + adds r0, r1, r0\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + bne _08043568\n\ + adds r0, r2, 0\n\ + adds r0, 0xC\n\ + adds r0, r1, r0\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + bne _08043568\n\ + bl _0804441E\n\ +_08043568:\n\ + ldr r1, =gBattleMoves\n\ + lsls r0, r5, 1\n\ + adds r0, r5\n\ + lsls r0, 2\n\ + adds r0, r1\n\ + ldrb r1, [r0, 0x8]\n\ + movs r0, 0x1\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _08043580\n\ + bl _0804441E\n\ +_08043580:\n\ + bl Random\n\ + lsls r0, 16\n\ + lsrs r0, 16\n\ + movs r1, 0x3\n\ + bl __umodsi3\n\ + lsls r0, 16\n\ + cmp r0, 0\n\ + beq _08043598\n\ + bl _0804441E\n\ +_08043598:\n\ + ldr r1, =gBattleCommunication\n\ + movs r0, 0x42\n\ + strb r0, [r1, 0x3]\n\ + bl b_movescr_stack_push_cursor\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_ApplySecondaryEffect\n\ + str r0, [r1]\n\ + ldr r2, =gHitMarker\n\ + ldr r0, [r2]\n\ + movs r1, 0x80\n\ + lsls r1, 6\n\ + orrs r0, r1\n\ + str r0, [r2]\n\ + bl _080443D0\n\ + .pool\n\ +_080435E4:\n\ + ldr r0, =gBattleMoveFlags\n\ + ldrb r1, [r0]\n\ + movs r0, 0x29\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _080435F4\n\ + bl _0804441E\n\ +_080435F4:\n\ + ldr r1, =gBattleMons\n\ + ldr r0, =gBankAttacker\n\ + ldrb r2, [r0]\n\ + movs r0, 0x58\n\ + muls r0, r2\n\ + adds r0, r1\n\ + ldrh r0, [r0, 0x28]\n\ + cmp r0, 0\n\ + bne _0804360A\n\ + bl _0804441E\n\ +_0804360A:\n\ + ldr r0, =gProtectStructs\n\ + lsls r1, r2, 4\n\ + adds r1, r0\n\ + ldrb r0, [r1, 0x1]\n\ + lsls r0, 31\n\ + cmp r0, 0\n\ + beq _0804361C\n\ + bl _0804441E\n\ +_0804361C:\n\ + ldr r2, =gSpecialStatuses\n\ + ldr r0, =gBankTarget\n\ + ldrb r1, [r0]\n\ + lsls r0, r1, 2\n\ + adds r0, r1\n\ + lsls r1, r0, 2\n\ + adds r0, r2, 0\n\ + adds r0, 0x8\n\ + adds r0, r1, r0\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + bne _08043644\n\ + adds r0, r2, 0\n\ + adds r0, 0xC\n\ + adds r0, r1, r0\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + bne _08043644\n\ + bl _0804441E\n\ +_08043644:\n\ + ldr r1, =gBattleMoves\n\ + lsls r0, r5, 1\n\ + adds r0, r5\n\ + lsls r0, 2\n\ + adds r0, r1\n\ + ldrb r1, [r0, 0x8]\n\ + movs r0, 0x1\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _0804365C\n\ + bl _0804441E\n\ +_0804365C:\n\ + bl Random\n\ + lsls r0, 16\n\ + lsrs r0, 16\n\ + movs r1, 0x3\n\ + bl __umodsi3\n\ + lsls r0, 16\n\ + cmp r0, 0\n\ + beq _08043674\n\ + bl _0804441E\n\ +_08043674:\n\ + ldr r1, =gBattleCommunication\n\ + movs r0, 0x45\n\ + strb r0, [r1, 0x3]\n\ + bl b_movescr_stack_push_cursor\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_ApplySecondaryEffect\n\ + str r0, [r1]\n\ + ldr r2, =gHitMarker\n\ + ldr r0, [r2]\n\ + movs r1, 0x80\n\ + lsls r1, 6\n\ + orrs r0, r1\n\ + str r0, [r2]\n\ + bl _080443D0\n\ + .pool\n\ +_080436C0:\n\ + ldr r0, =gBattleMoveFlags\n\ + ldrb r1, [r0]\n\ + movs r0, 0x29\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _080436D0\n\ + bl _0804441E\n\ +_080436D0:\n\ + ldr r1, =gBattleMons\n\ + ldr r0, =gBankAttacker\n\ + ldrb r2, [r0]\n\ + movs r0, 0x58\n\ + muls r0, r2\n\ + adds r0, r1\n\ + ldrh r0, [r0, 0x28]\n\ + cmp r0, 0\n\ + bne _080436E6\n\ + bl _0804441E\n\ +_080436E6:\n\ + ldr r0, =gProtectStructs\n\ + lsls r1, r2, 4\n\ + adds r1, r0\n\ + ldrb r0, [r1, 0x1]\n\ + lsls r0, 31\n\ + cmp r0, 0\n\ + beq _080436F8\n\ + bl _0804441E\n\ +_080436F8:\n\ + ldr r1, =gBattleMoves\n\ + lsls r0, r5, 1\n\ + adds r0, r5\n\ + lsls r0, 2\n\ + adds r0, r1\n\ + ldrb r1, [r0, 0x8]\n\ + movs r0, 0x1\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _08043710\n\ + bl _0804441E\n\ +_08043710:\n\ + ldr r2, =gSpecialStatuses\n\ + ldr r0, =gBankTarget\n\ + ldrb r1, [r0]\n\ + lsls r0, r1, 2\n\ + adds r0, r1\n\ + lsls r1, r0, 2\n\ + adds r0, r2, 0\n\ + adds r0, 0x8\n\ + adds r0, r1, r0\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + bne _08043738\n\ + adds r0, r2, 0\n\ + adds r0, 0xC\n\ + adds r0, r1, r0\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + bne _08043738\n\ + bl _0804441E\n\ +_08043738:\n\ + bl Random\n\ + lsls r0, 16\n\ + lsrs r0, 16\n\ + movs r1, 0x3\n\ + bl __umodsi3\n\ + lsls r0, 16\n\ + cmp r0, 0\n\ + beq _08043750\n\ + bl _0804441E\n\ +_08043750:\n\ + ldr r1, =gBattleCommunication\n\ + movs r0, 0x43\n\ + strb r0, [r1, 0x3]\n\ + bl b_movescr_stack_push_cursor\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_ApplySecondaryEffect\n\ + str r0, [r1]\n\ + ldr r2, =gHitMarker\n\ + ldr r0, [r2]\n\ + movs r1, 0x80\n\ + lsls r1, 6\n\ + orrs r0, r1\n\ + str r0, [r2]\n\ + bl _080443D0\n\ + .pool\n\ +_0804379C:\n\ + ldr r0, =gBattleMoveFlags\n\ + ldrb r1, [r0]\n\ + movs r0, 0x29\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _080437AC\n\ + bl _0804441E\n\ +_080437AC:\n\ + ldr r6, =gBattleMons\n\ + ldr r3, =gBankAttacker\n\ + mov r8, r3\n\ + ldrb r1, [r3]\n\ + movs r7, 0x58\n\ + adds r0, r1, 0\n\ + muls r0, r7\n\ + adds r0, r6\n\ + ldrh r0, [r0, 0x28]\n\ + cmp r0, 0\n\ + bne _080437C6\n\ + bl _0804441E\n\ +_080437C6:\n\ + ldr r0, =gProtectStructs\n\ + lsls r1, 4\n\ + adds r1, r0\n\ + ldrb r0, [r1, 0x1]\n\ + lsls r0, 31\n\ + cmp r0, 0\n\ + beq _080437D8\n\ + bl _0804441E\n\ +_080437D8:\n\ + ldr r1, =gBattleMoves\n\ + lsls r0, r5, 1\n\ + adds r0, r5\n\ + lsls r0, 2\n\ + adds r0, r1\n\ + ldrb r1, [r0, 0x8]\n\ + movs r0, 0x1\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _080437F0\n\ + bl _0804441E\n\ +_080437F0:\n\ + ldr r3, =gSpecialStatuses\n\ + ldr r5, =gBankTarget\n\ + ldrb r1, [r5]\n\ + lsls r0, r1, 2\n\ + adds r0, r1\n\ + lsls r2, r0, 2\n\ + adds r0, r3, 0\n\ + adds r0, 0x8\n\ + adds r0, r2, r0\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + bne _08043818\n\ + adds r0, r3, 0\n\ + adds r0, 0xC\n\ + adds r0, r2, r0\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + bne _08043818\n\ + bl _0804441E\n\ +_08043818:\n\ + adds r0, r1, 0\n\ + muls r0, r7\n\ + adds r0, r6\n\ + ldrh r0, [r0, 0x28]\n\ + cmp r0, 0\n\ + bne _08043828\n\ + bl _0804441E\n\ +_08043828:\n\ + bl Random\n\ + lsls r0, 16\n\ + lsrs r0, 16\n\ + movs r1, 0x3\n\ + bl __umodsi3\n\ + lsls r0, 16\n\ + cmp r0, 0\n\ + beq _08043840\n\ + bl _0804441E\n\ +_08043840:\n\ + mov r1, r8\n\ + ldrb r0, [r1]\n\ + muls r0, r7\n\ + adds r0, r6\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + cmp r0, 0xC\n\ + bne _08043854\n\ + bl _0804441E\n\ +_08043854:\n\ + ldr r0, [sp, 0x8]\n\ + ldr r1, [sp, 0x10]\n\ + bl GetGenderFromSpeciesAndPersonality\n\ + adds r4, r0, 0\n\ + ldr r0, [sp, 0xC]\n\ + ldr r1, [sp, 0x14]\n\ + bl GetGenderFromSpeciesAndPersonality\n\ + lsls r4, 24\n\ + lsls r0, 24\n\ + cmp r4, r0\n\ + bne _08043872\n\ + bl _0804441E\n\ +_08043872:\n\ + mov r2, r8\n\ + ldrb r0, [r2]\n\ + muls r0, r7\n\ + adds r4, r6, 0\n\ + adds r4, 0x50\n\ + adds r0, r4\n\ + ldr r0, [r0]\n\ + movs r1, 0xF0\n\ + lsls r1, 12\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _0804388E\n\ + bl _0804441E\n\ +_0804388E:\n\ + ldr r0, [sp, 0x8]\n\ + ldr r1, [sp, 0x10]\n\ + bl GetGenderFromSpeciesAndPersonality\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + cmp r0, 0xFF\n\ + bne _080438A2\n\ + bl _0804441E\n\ +_080438A2:\n\ + ldr r0, [sp, 0xC]\n\ + ldr r1, [sp, 0x14]\n\ + bl GetGenderFromSpeciesAndPersonality\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + cmp r0, 0xFF\n\ + bne _080438B6\n\ + bl _0804441E\n\ +_080438B6:\n\ + mov r3, r8\n\ + ldrb r0, [r3]\n\ + adds r2, r0, 0\n\ + muls r2, r7\n\ + adds r2, r4\n\ + ldr r1, =gBitTable\n\ + ldrb r0, [r5]\n\ + lsls r0, 2\n\ + adds r0, r1\n\ + ldr r1, [r0]\n\ + lsls r1, 16\n\ + ldr r0, [r2]\n\ + orrs r0, r1\n\ + str r0, [r2]\n\ + bl b_movescr_stack_push_cursor\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_CuteCharmActivates\n\ + str r0, [r1]\n\ + bl _080443D0\n\ + .pool\n\ +_08043908:\n\ + movs r5, 0\n\ + mov r10, r5\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r10, r0\n\ + bcc _08043918\n\ + bl _0804441E\n\ +_08043918:\n\ + ldr r1, =gBattleMons\n\ + movs r0, 0x58\n\ + mov r2, r10\n\ + muls r2, r0\n\ + adds r0, r2, 0\n\ + adds r0, r1\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + subs r0, 0x7\n\ + adds r2, r1, 0\n\ + cmp r0, 0x41\n\ + bls _08043932\n\ + b _08043B96\n\ +_08043932:\n\ + lsls r0, 2\n\ + ldr r1, =_08043948\n\ + adds r0, r1\n\ + ldr r0, [r0]\n\ + mov pc, r0\n\ + .pool\n\ + .align 2, 0\n\ +_08043948:\n\ + .4byte _08043AAC\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B70\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043AD4\n\ + .4byte _08043B96\n\ + .4byte _08043A50\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043A7C\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B40\n\ + .4byte _08043B10\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043B96\n\ + .4byte _08043AD4\n\ +_08043A50:\n\ + movs r0, 0x58\n\ + mov r3, r10\n\ + muls r3, r0\n\ + adds r0, r3, 0\n\ + adds r1, r2, 0\n\ + adds r1, 0x4C\n\ + adds r0, r1\n\ + ldr r0, [r0]\n\ + ldr r1, =0x00000f88\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _08043A6A\n\ + b _08043B96\n\ +_08043A6A:\n\ + ldr r0, =gBattleTextBuff1\n\ + ldr r1, =gStatusConditionString_PoisonJpn\n\ + b _08043B5C\n\ + .pool\n\ +_08043A7C:\n\ + movs r0, 0x58\n\ + mov r1, r10\n\ + muls r1, r0\n\ + adds r0, r1, 0\n\ + adds r1, r2, 0\n\ + adds r1, 0x50\n\ + adds r0, r1\n\ + ldr r0, [r0]\n\ + movs r1, 0x7\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _08043A96\n\ + b _08043B96\n\ +_08043A96:\n\ + ldr r0, =gBattleTextBuff1\n\ + ldr r1, =gStatusConditionString_ConfusionJpn\n\ + bl StringCopy\n\ + movs r2, 0x2\n\ + mov r9, r2\n\ + b _08043B9C\n\ + .pool\n\ +_08043AAC:\n\ + movs r0, 0x58\n\ + mov r3, r10\n\ + muls r3, r0\n\ + adds r0, r3, 0\n\ + adds r1, r2, 0\n\ + adds r1, 0x4C\n\ + adds r0, r1\n\ + ldr r0, [r0]\n\ + movs r1, 0x40\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08043B96\n\ + ldr r0, =gBattleTextBuff1\n\ + ldr r1, =gStatusConditionString_ParalysisJpn\n\ + b _08043B5C\n\ + .pool\n\ +_08043AD4:\n\ + movs r0, 0x58\n\ + mov r3, r10\n\ + muls r3, r0\n\ + adds r0, r2, 0\n\ + adds r0, 0x4C\n\ + adds r0, r3, r0\n\ + ldr r0, [r0]\n\ + movs r1, 0x7\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08043B96\n\ + adds r2, 0x50\n\ + adds r2, r3, r2\n\ + ldr r0, [r2]\n\ + ldr r1, =0xf7ffffff\n\ + ands r0, r1\n\ + str r0, [r2]\n\ + ldr r0, =gBattleTextBuff1\n\ + ldr r1, =gStatusConditionString_SleepJpn\n\ + bl StringCopy\n\ + movs r0, 0x1\n\ + mov r9, r0\n\ + b _08043B9C\n\ + .pool\n\ +_08043B10:\n\ + movs r0, 0x58\n\ + mov r1, r10\n\ + muls r1, r0\n\ + adds r0, r1, 0\n\ + adds r1, r2, 0\n\ + adds r1, 0x4C\n\ + adds r0, r1\n\ + ldr r0, [r0]\n\ + movs r1, 0x10\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08043B96\n\ + ldr r0, =gBattleTextBuff1\n\ + ldr r1, =gStatusConditionString_BurnJpn\n\ + bl StringCopy\n\ + movs r2, 0x1\n\ + mov r9, r2\n\ + b _08043B9C\n\ + .pool\n\ +_08043B40:\n\ + movs r0, 0x58\n\ + mov r3, r10\n\ + muls r3, r0\n\ + adds r0, r3, 0\n\ + adds r1, r2, 0\n\ + adds r1, 0x4C\n\ + adds r0, r1\n\ + ldr r0, [r0]\n\ + movs r1, 0x20\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08043B96\n\ + ldr r0, =gBattleTextBuff1\n\ + ldr r1, =gStatusConditionString_IceJpn\n\ +_08043B5C:\n\ + bl StringCopy\n\ + movs r5, 0x1\n\ + mov r9, r5\n\ + b _08043B9C\n\ + .pool\n\ +_08043B70:\n\ + movs r0, 0x58\n\ + mov r1, r10\n\ + muls r1, r0\n\ + adds r0, r1, 0\n\ + adds r1, r2, 0\n\ + adds r1, 0x50\n\ + adds r0, r1\n\ + ldr r0, [r0]\n\ + movs r1, 0xF0\n\ + lsls r1, 12\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08043B96\n\ + ldr r0, =gBattleTextBuff1\n\ + ldr r1, =gStatusConditionString_LoveJpn\n\ + bl StringCopy\n\ + movs r2, 0x3\n\ + mov r9, r2\n\ +_08043B96:\n\ + mov r3, r9\n\ + cmp r3, 0\n\ + beq _08043C50\n\ +_08043B9C:\n\ + mov r5, r9\n\ + cmp r5, 0x2\n\ + beq _08043BD0\n\ + cmp r5, 0x2\n\ + bgt _08043BB4\n\ + cmp r5, 0x1\n\ + beq _08043BBC\n\ + b _08043BFC\n\ + .pool\n\ +_08043BB4:\n\ + mov r0, r9\n\ + cmp r0, 0x3\n\ + beq _08043BE8\n\ + b _08043BFC\n\ +_08043BBC:\n\ + ldr r1, =gBattleMons\n\ + movs r0, 0x58\n\ + mov r2, r10\n\ + muls r2, r0\n\ + adds r1, 0x4C\n\ + adds r2, r1\n\ + movs r0, 0\n\ + b _08043BFA\n\ + .pool\n\ +_08043BD0:\n\ + ldr r1, =gBattleMons\n\ + movs r0, 0x58\n\ + mov r2, r10\n\ + muls r2, r0\n\ + adds r1, 0x50\n\ + adds r2, r1\n\ + ldr r0, [r2]\n\ + movs r1, 0x8\n\ + negs r1, r1\n\ + b _08043BF8\n\ + .pool\n\ +_08043BE8:\n\ + ldr r1, =gBattleMons\n\ + movs r0, 0x58\n\ + mov r2, r10\n\ + muls r2, r0\n\ + adds r1, 0x50\n\ + adds r2, r1\n\ + ldr r0, [r2]\n\ + ldr r1, =0xfff0ffff\n\ +_08043BF8:\n\ + ands r0, r1\n\ +_08043BFA:\n\ + str r0, [r2]\n\ +_08043BFC:\n\ + bl b_movescr_stack_push_cursor\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =gUnknown_082DB68C\n\ + str r0, [r1]\n\ + ldr r0, =gBattleScripting\n\ + mov r1, r10\n\ + strb r1, [r0, 0x17]\n\ + ldr r4, =gActiveBank\n\ + strb r1, [r4]\n\ + ldrb r1, [r4]\n\ + movs r0, 0x58\n\ + muls r0, r1\n\ + ldr r1, =gBattleMons + 0x4C\n\ + adds r0, r1\n\ + str r0, [sp]\n\ + movs r0, 0\n\ + movs r1, 0x28\n\ + movs r2, 0\n\ + movs r3, 0x4\n\ + bl EmitSetAttributes\n\ + ldrb r0, [r4]\n\ + bl MarkBufferBankForExecution\n\ + bl _0804443A\n\ + .pool\n\ +_08043C50:\n\ + mov r0, r10\n\ + adds r0, 0x1\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + mov r10, r0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r10, r0\n\ + bcs _08043C64\n\ + b _08043918\n\ +_08043C64:\n\ + bl _0804441E\n\ + .pool\n\ +_08043C6C:\n\ + movs r2, 0\n\ + mov r10, r2\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r10, r0\n\ + bcc _08043C7A\n\ + b _0804441E\n\ +_08043C7A:\n\ + ldr r4, =gBattleMons\n\ +_08043C7C:\n\ + movs r0, 0x58\n\ + mov r3, r10\n\ + muls r3, r0\n\ + adds r0, r3, 0\n\ + adds r0, r4\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + cmp r0, 0x3B\n\ + bne _08043CA0\n\ + mov r0, r10\n\ + bl CastformDataTypeChange\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ + cmp r0, 0\n\ + beq _08043CA0\n\ + b _080442FC\n\ +_08043CA0:\n\ + mov r0, r10\n\ + adds r0, 0x1\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + mov r10, r0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r10, r0\n\ + bcc _08043C7C\n\ + b _0804441E\n\ + .pool\n\ +_08043CBC:\n\ + ldrb r0, [r7]\n\ + cmp r0, 0x1C\n\ + beq _08043CC4\n\ + b _0804441E\n\ +_08043CC4:\n\ + ldr r4, =gHitMarker\n\ + ldr r1, [r4]\n\ + movs r0, 0x80\n\ + lsls r0, 7\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _08043CD4\n\ + b _0804441E\n\ +_08043CD4:\n\ + ldr r0, =0xffffbfff\n\ + ands r1, r0\n\ + str r1, [r4]\n\ + mov r5, r8\n\ + ldr r1, [r5]\n\ + adds r1, 0xB2\n\ + ldrb r2, [r1]\n\ + movs r0, 0x3F\n\ + ands r0, r2\n\ + strb r0, [r1]\n\ + ldr r0, [r5]\n\ + adds r1, r0, 0\n\ + adds r1, 0xB2\n\ + ldrb r0, [r1]\n\ + cmp r0, 0x6\n\ + bne _08043CF8\n\ + movs r0, 0x2\n\ + strb r0, [r1]\n\ +_08043CF8:\n\ + ldr r1, =gBattleCommunication\n\ + mov r2, r8\n\ + ldr r0, [r2]\n\ + adds r0, 0xB2\n\ + ldrb r0, [r0]\n\ + adds r0, 0x40\n\ + strb r0, [r1, 0x3]\n\ + ldr r1, =gBattleScripting\n\ + ldr r0, =gBankTarget\n\ + ldrb r0, [r0]\n\ + strb r0, [r1, 0x17]\n\ + bl b_movescr_stack_push_cursor\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_SynchronizeActivates\n\ + str r0, [r1]\n\ + ldr r0, [r4]\n\ + movs r1, 0x80\n\ + lsls r1, 6\n\ + orrs r0, r1\n\ + str r0, [r4]\n\ + b _080443D0\n\ + .pool\n\ +_08043D40:\n\ + ldrb r0, [r7]\n\ + cmp r0, 0x1C\n\ + beq _08043D48\n\ + b _0804441E\n\ +_08043D48:\n\ + ldr r4, =gHitMarker\n\ + ldr r1, [r4]\n\ + movs r0, 0x80\n\ + lsls r0, 7\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _08043D58\n\ + b _0804441E\n\ +_08043D58:\n\ + ldr r0, =0xffffbfff\n\ + ands r1, r0\n\ + str r1, [r4]\n\ + mov r3, r8\n\ + ldr r1, [r3]\n\ + adds r1, 0xB2\n\ + ldrb r2, [r1]\n\ + movs r0, 0x3F\n\ + ands r0, r2\n\ + strb r0, [r1]\n\ + ldr r0, [r3]\n\ + adds r1, r0, 0\n\ + adds r1, 0xB2\n\ + ldrb r0, [r1]\n\ + cmp r0, 0x6\n\ + bne _08043D7C\n\ + movs r0, 0x2\n\ + strb r0, [r1]\n\ +_08043D7C:\n\ + ldr r1, =gBattleCommunication\n\ + mov r3, r8\n\ + ldr r0, [r3]\n\ + adds r0, 0xB2\n\ + ldrb r0, [r0]\n\ + strb r0, [r1, 0x3]\n\ + ldr r1, =gBattleScripting\n\ + ldr r0, =gBankAttacker\n\ + ldrb r0, [r0]\n\ + strb r0, [r1, 0x17]\n\ + bl b_movescr_stack_push_cursor\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =BattleScript_SynchronizeActivates\n\ + str r0, [r1]\n\ + ldr r0, [r4]\n\ + movs r1, 0x80\n\ + lsls r1, 6\n\ + orrs r0, r1\n\ + str r0, [r4]\n\ + b _080443D0\n\ + .pool\n\ +_08043DC4:\n\ + movs r4, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r1, [r0]\n\ + cmp r4, r1\n\ + blt _08043DD0\n\ + b _0804441E\n\ +_08043DD0:\n\ + ldr r0, =gBattleMons\n\ + adds r5, r1, 0\n\ + ldr r2, =gStatuses3\n\ + adds r3, r0, 0\n\ + adds r3, 0x20\n\ + movs r6, 0x80\n\ + lsls r6, 12\n\ +_08043DDE:\n\ + ldrb r1, [r3]\n\ + cmp r1, 0x16\n\ + bne _08043DEE\n\ + ldr r0, [r2]\n\ + ands r0, r6\n\ + cmp r0, 0\n\ + beq _08043DEE\n\ + b _08044324\n\ +_08043DEE:\n\ + adds r2, 0x4\n\ + adds r3, 0x58\n\ + adds r4, 0x1\n\ + cmp r4, r5\n\ + blt _08043DDE\n\ + b _0804441E\n\ + .pool\n\ +_08043E08:\n\ + movs r4, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r4, r0\n\ + blt _08043E14\n\ + b _0804441E\n\ +_08043E14:\n\ + ldr r5, =gActiveBank\n\ + mov r8, r5\n\ + ldr r0, =gBattleMons\n\ + adds r0, 0x20\n\ + str r0, [sp, 0x1C]\n\ + movs r1, 0\n\ + str r1, [sp, 0x20]\n\ +_08043E22:\n\ + ldr r2, [sp, 0x1C]\n\ + ldrb r0, [r2]\n\ + cmp r0, 0x24\n\ + beq _08043E2C\n\ + b _08043FBE\n\ +_08043E2C:\n\ + ldr r0, =gStatuses3\n\ + ldr r3, [sp, 0x20]\n\ + adds r0, r3, r0\n\ + ldr r1, [r0]\n\ + movs r0, 0x80\n\ + lsls r0, 13\n\ + ands r1, r0\n\ + str r3, [sp, 0x18]\n\ + cmp r1, 0\n\ + bne _08043E42\n\ + b _08043FBE\n\ +_08043E42:\n\ + lsls r0, r4, 24\n\ + lsrs r0, 24\n\ + bl GetBankIdentity\n\ + movs r1, 0x1\n\ + adds r5, r0, 0\n\ + eors r5, r1\n\ + ands r5, r1\n\ + adds r0, r5, 0\n\ + bl GetBankByPlayerAI\n\ + lsls r0, 24\n\ + lsrs r6, r0, 24\n\ + adds r0, r5, 0x2\n\ + bl GetBankByPlayerAI\n\ + lsls r0, 24\n\ + lsrs r7, r0, 24\n\ + ldr r0, =gBattleTypeFlags\n\ + ldr r0, [r0]\n\ + movs r2, 0x1\n\ + ands r0, r2\n\ + cmp r0, 0\n\ + bne _08043E74\n\ + b _08043F84\n\ +_08043E74:\n\ + movs r1, 0x58\n\ + adds r0, r6, 0\n\ + muls r0, r1\n\ + ldr r3, =gBattleMons\n\ + adds r1, r0, r3\n\ + adds r0, r1, 0\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + cmp r0, 0\n\ + beq _08043F40\n\ + ldrh r0, [r1, 0x28]\n\ + cmp r0, 0\n\ + beq _08043EFC\n\ + movs r1, 0x58\n\ + adds r0, r7, 0\n\ + muls r0, r1\n\ + adds r1, r0, r3\n\ + adds r0, r1, 0\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + cmp r0, 0\n\ + beq _08043EFC\n\ + ldrh r0, [r1, 0x28]\n\ + cmp r0, 0\n\ + beq _08043EFC\n\ + str r2, [sp, 0x24]\n\ + bl Random\n\ + ldr r2, [sp, 0x24]\n\ + adds r1, r2, 0\n\ + ands r1, r0\n\ + lsls r1, 1\n\ + orrs r5, r1\n\ + adds r0, r5, 0\n\ + bl GetBankByPlayerAI\n\ + mov r2, r8\n\ + strb r0, [r2]\n\ + ldrb r0, [r2]\n\ + movs r3, 0x58\n\ + muls r0, r3\n\ + ldr r5, =gBattleMons\n\ + adds r0, r5\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + ldr r1, [sp, 0x1C]\n\ + strb r0, [r1]\n\ + ldrb r0, [r2]\n\ + muls r0, r3\n\ + adds r0, r5\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + ldr r2, =gLastUsedAbility\n\ + strb r0, [r2]\n\ + b _08043FAC\n\ + .pool\n\ +_08043EFC:\n\ + ldr r3, =gBattleMons\n\ + movs r2, 0x58\n\ + adds r0, r6, 0\n\ + muls r0, r2\n\ + adds r1, r0, r3\n\ + adds r0, r1, 0\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + cmp r0, 0\n\ + beq _08043F40\n\ + ldrh r0, [r1, 0x28]\n\ + cmp r0, 0\n\ + beq _08043F40\n\ + mov r5, r8\n\ + strb r6, [r5]\n\ + adds r1, r4, 0\n\ + muls r1, r2\n\ + adds r1, r3\n\ + ldrb r0, [r5]\n\ + muls r0, r2\n\ + adds r0, r3\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + adds r1, 0x20\n\ + strb r0, [r1]\n\ + ldrb r0, [r5]\n\ + muls r0, r2\n\ + adds r0, r3\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + b _08043FA8\n\ + .pool\n\ +_08043F40:\n\ + ldr r3, =gBattleMons\n\ + movs r2, 0x58\n\ + adds r0, r7, 0\n\ + muls r0, r2\n\ + adds r1, r0, r3\n\ + adds r0, r1, 0\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + cmp r0, 0\n\ + beq _08043FB6\n\ + ldrh r0, [r1, 0x28]\n\ + cmp r0, 0\n\ + beq _08043FB6\n\ + mov r5, r8\n\ + strb r7, [r5]\n\ + adds r1, r4, 0\n\ + muls r1, r2\n\ + adds r1, r3\n\ + ldrb r0, [r5]\n\ + muls r0, r2\n\ + adds r0, r3\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + adds r1, 0x20\n\ + strb r0, [r1]\n\ + ldrb r0, [r5]\n\ + muls r0, r2\n\ + adds r0, r3\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + b _08043FA8\n\ + .pool\n\ +_08043F84:\n\ + mov r2, r8\n\ + strb r6, [r2]\n\ + movs r3, 0x58\n\ + adds r0, r6, 0\n\ + muls r0, r3\n\ + ldr r5, =gBattleMons\n\ + adds r0, r5\n\ + adds r2, r0, 0\n\ + adds r2, 0x20\n\ + ldrb r1, [r2]\n\ + cmp r1, 0\n\ + beq _08043FB6\n\ + ldrh r0, [r0, 0x28]\n\ + cmp r0, 0\n\ + beq _08043FB6\n\ + ldr r0, [sp, 0x1C]\n\ + strb r1, [r0]\n\ + ldrb r0, [r2]\n\ +_08043FA8:\n\ + ldr r1, =gLastUsedAbility\n\ + strb r0, [r1]\n\ +_08043FAC:\n\ + mov r0, r9\n\ + adds r0, 0x1\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ +_08043FB6:\n\ + mov r2, r9\n\ + cmp r2, 0\n\ + beq _08043FBE\n\ + b _08044340\n\ +_08043FBE:\n\ + ldr r3, [sp, 0x1C]\n\ + adds r3, 0x58\n\ + str r3, [sp, 0x1C]\n\ + ldr r5, [sp, 0x20]\n\ + adds r5, 0x4\n\ + str r5, [sp, 0x20]\n\ + adds r4, 0x1\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r4, r0\n\ + bge _08043FD6\n\ + b _08043E22\n\ +_08043FD6:\n\ + b _0804441E\n\ + .pool\n\ +_08043FE4:\n\ + movs r4, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r1, [r0]\n\ + cmp r4, r1\n\ + blt _08043FF0\n\ + b _0804441E\n\ +_08043FF0:\n\ + ldr r0, =gBattleMons\n\ + adds r5, r1, 0\n\ + ldr r2, =gStatuses3\n\ + adds r3, r0, 0\n\ + adds r3, 0x20\n\ + movs r6, 0x80\n\ + lsls r6, 12\n\ +_08043FFE:\n\ + ldrb r1, [r3]\n\ + cmp r1, 0x16\n\ + bne _0804400E\n\ + ldr r0, [r2]\n\ + ands r0, r6\n\ + cmp r0, 0\n\ + beq _0804400E\n\ + b _080443B4\n\ +_0804400E:\n\ + adds r2, 0x4\n\ + adds r3, 0x58\n\ + adds r4, 0x1\n\ + cmp r4, r5\n\ + blt _08043FFE\n\ + b _0804441E\n\ + .pool\n\ +_08044028:\n\ + mov r0, r10\n\ + bl GetBankSide\n\ + lsls r0, 24\n\ + lsrs r5, r0, 24\n\ + movs r4, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r4, r0\n\ + blt _0804403E\n\ + b _0804441E\n\ +_0804403E:\n\ + ldr r7, =gBattleMons\n\ +_08044040:\n\ + lsls r0, r4, 24\n\ + lsrs r0, 24\n\ + bl GetBankSide\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + adds r3, r4, 0x1\n\ + cmp r0, r5\n\ + beq _0804406A\n\ + movs r0, 0x58\n\ + muls r0, r4\n\ + adds r0, r7\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + cmp r0, r6\n\ + bne _0804406A\n\ + ldr r0, =gLastUsedAbility\n\ + strb r6, [r0]\n\ + lsls r0, r3, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ +_0804406A:\n\ + adds r4, r3, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r4, r0\n\ + blt _08044040\n\ + b _0804441E\n\ + .pool\n\ +_08044084:\n\ + mov r0, r10\n\ + bl GetBankSide\n\ + lsls r0, 24\n\ + lsrs r5, r0, 24\n\ + movs r4, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r4, r0\n\ + blt _0804409A\n\ + b _0804441E\n\ +_0804409A:\n\ + ldr r7, =gBattleMons\n\ +_0804409C:\n\ + lsls r0, r4, 24\n\ + lsrs r0, 24\n\ + bl GetBankSide\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + adds r3, r4, 0x1\n\ + cmp r0, r5\n\ + bne _080440C6\n\ + movs r0, 0x58\n\ + muls r0, r4\n\ + adds r0, r7\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + cmp r0, r6\n\ + bne _080440C6\n\ + ldr r0, =gLastUsedAbility\n\ + strb r6, [r0]\n\ + lsls r0, r3, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ +_080440C6:\n\ + adds r4, r3, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r4, r0\n\ + blt _0804409C\n\ + b _0804441E\n\ + .pool\n\ +_080440E0:\n\ + ldrb r0, [r7]\n\ + cmp r0, 0xFD\n\ + beq _08044104\n\ + cmp r0, 0xFE\n\ + beq _0804413C\n\ + movs r4, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + adds r5, r0, 0\n\ + ldrb r0, [r5]\n\ + cmp r4, r0\n\ + blt _080440F8\n\ + b _0804441E\n\ +_080440F8:\n\ + ldr r2, =gBattleMons\n\ + b _08044174\n\ + .pool\n\ +_08044104:\n\ + movs r4, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r4, r0\n\ + blt _08044110\n\ + b _0804441E\n\ +_08044110:\n\ + ldr r5, =gStatuses3\n\ + movs r2, 0x80\n\ + lsls r2, 9\n\ + adds r1, r0, 0\n\ +_08044118:\n\ + lsls r0, r4, 2\n\ + adds r0, r5\n\ + ldr r0, [r0]\n\ + ands r0, r2\n\ + adds r3, r4, 0x1\n\ + cmp r0, 0\n\ + beq _0804412C\n\ + lsls r0, r3, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ +_0804412C:\n\ + adds r4, r3, 0\n\ + cmp r4, r1\n\ + blt _08044118\n\ + b _0804441E\n\ + .pool\n\ +_0804413C:\n\ + movs r4, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r4, r0\n\ + blt _08044148\n\ + b _0804441E\n\ +_08044148:\n\ + ldr r5, =gStatuses3\n\ + movs r2, 0x80\n\ + lsls r2, 10\n\ + adds r1, r0, 0\n\ +_08044150:\n\ + lsls r0, r4, 2\n\ + adds r0, r5\n\ + ldr r0, [r0]\n\ + ands r0, r2\n\ + adds r3, r4, 0x1\n\ + cmp r0, 0\n\ + beq _08044164\n\ + lsls r0, r3, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ +_08044164:\n\ + adds r4, r3, 0\n\ + cmp r4, r1\n\ + blt _08044150\n\ + b _0804441E\n\ + .pool\n\ +_08044174:\n\ + movs r0, 0x58\n\ + muls r0, r4\n\ + adds r0, r2\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + adds r3, r4, 0x1\n\ + cmp r0, r6\n\ + bne _0804418C\n\ + strb r6, [r7]\n\ + lsls r0, r3, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ +_0804418C:\n\ + adds r4, r3, 0\n\ + ldrb r1, [r5]\n\ + cmp r4, r1\n\ + blt _08044174\n\ + b _0804441E\n\ +_08044196:\n\ + movs r4, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r4, r0\n\ + blt _080441A2\n\ + b _0804441E\n\ +_080441A2:\n\ + ldr r2, =gBattleMons\n\ + mov r8, r2\n\ + adds r2, r0, 0\n\ + movs r5, 0x58\n\ +_080441AA:\n\ + adds r0, r4, 0\n\ + muls r0, r5\n\ + mov r3, r8\n\ + adds r1, r0, r3\n\ + adds r0, r1, 0\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + adds r3, r4, 0x1\n\ + cmp r0, r6\n\ + bne _080441CC\n\ + ldrh r0, [r1, 0x28]\n\ + cmp r0, 0\n\ + beq _080441CC\n\ + strb r6, [r7]\n\ + lsls r0, r3, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ +_080441CC:\n\ + adds r4, r3, 0\n\ + cmp r4, r2\n\ + blt _080441AA\n\ + b _0804441E\n\ + .pool\n\ +_080441DC:\n\ + movs r4, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r4, r0\n\ + blt _080441E8\n\ + b _0804441E\n\ +_080441E8:\n\ + ldr r7, =gBattleMons\n\ + adds r1, r0, 0\n\ + movs r5, 0x58\n\ + ldr r2, =gLastUsedAbility\n\ +_080441F0:\n\ + adds r0, r4, 0\n\ + muls r0, r5\n\ + adds r0, r7\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + adds r3, r4, 0x1\n\ + cmp r0, r6\n\ + bne _0804420C\n\ + cmp r4, r10\n\ + beq _0804420C\n\ + strb r6, [r2]\n\ + lsls r0, r3, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ +_0804420C:\n\ + adds r4, r3, 0\n\ + cmp r4, r1\n\ + blt _080441F0\n\ + b _0804441E\n\ + .pool\n\ +_08044220:\n\ + mov r0, r10\n\ + bl GetBankSide\n\ + lsls r0, 24\n\ + lsrs r5, r0, 24\n\ + movs r4, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r4, r0\n\ + blt _08044236\n\ + b _0804441E\n\ +_08044236:\n\ + ldr r7, =gBattleMons\n\ +_08044238:\n\ + lsls r0, r4, 24\n\ + lsrs r0, 24\n\ + bl GetBankSide\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + cmp r0, r5\n\ + beq _08044264\n\ + movs r0, 0x58\n\ + muls r0, r4\n\ + adds r0, r7\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + cmp r0, r6\n\ + bne _08044264\n\ + ldr r0, =gLastUsedAbility\n\ + strb r6, [r0]\n\ + mov r0, r9\n\ + adds r0, 0x1\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ +_08044264:\n\ + adds r4, 0x1\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r4, r0\n\ + blt _08044238\n\ + b _0804441E\n\ + .pool\n\ +_0804427C:\n\ + mov r0, r10\n\ + bl GetBankSide\n\ + lsls r0, 24\n\ + lsrs r5, r0, 24\n\ + movs r4, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r4, r0\n\ + blt _08044292\n\ + b _0804441E\n\ +_08044292:\n\ + ldr r7, =gBattleMons\n\ +_08044294:\n\ + lsls r0, r4, 24\n\ + lsrs r0, 24\n\ + bl GetBankSide\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + cmp r0, r5\n\ + bne _080442C0\n\ + movs r0, 0x58\n\ + muls r0, r4\n\ + adds r0, r7\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + cmp r0, r6\n\ + bne _080442C0\n\ + ldr r0, =gLastUsedAbility\n\ + strb r6, [r0]\n\ + mov r0, r9\n\ + adds r0, 0x1\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ +_080442C0:\n\ + adds r4, 0x1\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r0, [r0]\n\ + cmp r4, r0\n\ + blt _08044294\n\ + b _0804441E\n\ + .pool\n\ +_080442D8:\n\ + ldr r0, =BattleScript_CastformChange\n\ + bl b_push_move_exec\n\ + ldr r0, =gBattleScripting\n\ + strb r6, [r0, 0x17]\n\ +_080442E2:\n\ + ldr r0, =gBattleStruct\n\ + ldr r0, [r0]\n\ + adds r0, 0x7F\n\ + mov r1, r9\n\ + subs r1, 0x1\n\ + strb r1, [r0]\n\ + b _0804441E\n\ + .pool\n\ +_080442FC:\n\ + ldr r0, =BattleScript_CastformChange\n\ + bl b_push_move_exec\n\ + ldr r0, =gBattleScripting\n\ + mov r5, r10\n\ + strb r5, [r0, 0x17]\n\ + ldr r0, =gBattleStruct\n\ + ldr r0, [r0]\n\ + adds r0, 0x7F\n\ + mov r1, r9\n\ + subs r1, 0x1\n\ + strb r1, [r0]\n\ + b _0804443A\n\ + .pool\n\ +_08044324:\n\ + strb r1, [r7]\n\ + ldr r0, [r2]\n\ + ldr r1, =0xfff7ffff\n\ + ands r0, r1\n\ + str r0, [r2]\n\ + ldr r0, =gUnknown_082DB4B8\n\ + bl b_push_move_exec\n\ + b _080443C8\n\ + .pool\n\ +_08044340:\n\ + ldr r0, =BattleScript_TraceActivates\n\ + bl b_push_move_exec\n\ + ldr r1, =gStatuses3\n\ + ldr r0, [sp, 0x18]\n\ + adds r1, r0, r1\n\ + ldr r0, [r1]\n\ + ldr r2, =0xffefffff\n\ + ands r0, r2\n\ + str r0, [r1]\n\ + ldr r0, =gBattleScripting\n\ + strb r4, [r0, 0x17]\n\ + ldr r1, =gBattleTextBuff1\n\ + movs r4, 0xFD\n\ + strb r4, [r1]\n\ + movs r0, 0x4\n\ + strb r0, [r1, 0x1]\n\ + ldr r2, =gActiveBank\n\ + ldrb r0, [r2]\n\ + strb r0, [r1, 0x2]\n\ + ldr r3, =gBattlePartyID\n\ + ldrb r0, [r2]\n\ + lsls r0, 1\n\ + adds r0, r3\n\ + ldrh r0, [r0]\n\ + strb r0, [r1, 0x3]\n\ + movs r0, 0xFF\n\ + strb r0, [r1, 0x4]\n\ + ldr r1, =gBattleTextBuff2\n\ + strb r4, [r1]\n\ + movs r0, 0x9\n\ + strb r0, [r1, 0x1]\n\ + ldr r0, =gLastUsedAbility\n\ + ldrb r0, [r0]\n\ + strb r0, [r1, 0x2]\n\ + movs r0, 0x1\n\ + negs r0, r0\n\ + strb r0, [r1, 0x3]\n\ + b _0804441E\n\ + .pool\n\ +_080443B4:\n\ + strb r1, [r7]\n\ + ldr r0, [r2]\n\ + ldr r1, =0xfff7ffff\n\ + ands r0, r1\n\ + str r0, [r2]\n\ + bl b_movescr_stack_push_cursor\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, =gUnknown_082DB4C1\n\ + str r0, [r1]\n\ +_080443C8:\n\ + ldr r0, =gBattleStruct\n\ + ldr r0, [r0]\n\ + adds r0, 0xD8\n\ + strb r4, [r0]\n\ +_080443D0:\n\ + mov r0, r9\n\ + adds r0, 0x1\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ + b _0804441E\n\ + .pool\n\ +_080443EC:\n\ + movs r4, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r1, [r0]\n\ + cmp r4, r1\n\ + bge _0804441E\n\ + ldr r0, =gBattleMons\n\ + adds r2, r1, 0\n\ + adds r1, r0, 0\n\ + adds r1, 0x20\n\ + ldr r3, =gLastUsedAbility\n\ +_08044400:\n\ + ldrb r0, [r1]\n\ + cmp r0, r6\n\ + bne _08044416\n\ + cmp r4, r10\n\ + beq _08044416\n\ + strb r6, [r3]\n\ + mov r0, r9\n\ + adds r0, 0x1\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + mov r9, r0\n\ +_08044416:\n\ + adds r1, 0x58\n\ + adds r4, 0x1\n\ + cmp r4, r2\n\ + blt _08044400\n\ +_0804441E:\n\ + mov r1, r9\n\ + cmp r1, 0\n\ + beq _0804443A\n\ +_08044424:\n\ + ldr r2, [sp, 0x4]\n\ + cmp r2, 0xB\n\ + bhi _0804443A\n\ + ldr r1, =gLastUsedAbility\n\ + ldrb r0, [r1]\n\ + cmp r0, 0xFF\n\ + beq _0804443A\n\ + adds r1, r0, 0\n\ + mov r0, r10\n\ + bl RecordAbilityBattle\n\ +_0804443A:\n\ + mov r0, r9\n\ + add sp, 0x28\n\ + pop {r3-r5}\n\ + mov r8, r3\n\ + mov r9, r4\n\ + mov r10, r5\n\ + pop {r4-r7}\n\ + pop {r1}\n\ + bx r1\n\ + .pool\n\ + .syntax divided"); +} +#endif // NONMATCHING From 9dc7839dd875cc06b582bd78f2263478a0571535 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 09:49:50 -0400 Subject: [PATCH 160/342] callers of sub_80940C4 --- asm/field_map_obj.s | 24 ------------------------ include/map_obj_8097404.h | 2 ++ src/field_map_obj.c | 10 ++++++++++ 3 files changed, 12 insertions(+), 24 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 8acfa8114..980edf29c 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,30 +5,6 @@ .text - thumb_func_start sub_8094188 -sub_8094188: @ 8094188 - push {lr} - ldr r2, =sub_809785C - bl sub_80940C4 - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - .pool - thumb_func_end sub_8094188 - - thumb_func_start sub_809419C -sub_809419C: @ 809419C - push {lr} - ldr r2, =sub_80978E4 - bl sub_80940C4 - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - .pool - thumb_func_end sub_809419C - thumb_func_start sub_80941B0 sub_80941B0: @ 80941B0 push {lr} diff --git a/include/map_obj_8097404.h b/include/map_obj_8097404.h index 707860dbd..1fc653163 100644 --- a/include/map_obj_8097404.h +++ b/include/map_obj_8097404.h @@ -20,5 +20,7 @@ bool8 sub_80976EC(struct Sprite *sprite); void sub_80976DC(struct Sprite *, u8); void sub_809783C(struct Sprite *, u8, u8, u8); void DoShadowFieldEffect(struct MapObject *); +u8 sub_809785C(struct Sprite *); +u8 sub_80978E4(struct Sprite *); #endif //GUARD_MAP_OBJ_8097404_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 3e3bbfa6f..7ef901eec 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4316,3 +4316,13 @@ u8 sub_80940C4(struct MapObject *mapObject, struct Sprite *sprite, u8 callback(s } return result; } + +u8 sub_8094188(struct MapObject *mapObject, struct Sprite *sprite) +{ + return sub_80940C4(mapObject, sprite, sub_809785C); +} + +u8 sub_809419C(struct MapObject *mapObject, struct Sprite *sprite) +{ + return sub_80940C4(mapObject, sprite, sub_80978E4); +} From 99e0fe1f241dbdd780f7330ab5891574a8a21080 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 09:52:17 -0400 Subject: [PATCH 161/342] callers of callers of sub_80940C4 --- asm/field_map_obj.s | 34 ---------------------------------- src/field_map_obj.c | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 34 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 980edf29c..a0d55e64c 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,40 +5,6 @@ .text - thumb_func_start sub_80941B0 -sub_80941B0: @ 80941B0 - push {lr} - bl sub_8094188 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - beq _080941C2 - movs r0, 0 - b _080941C4 -_080941C2: - movs r0, 0x1 -_080941C4: - pop {r1} - bx r1 - thumb_func_end sub_80941B0 - - thumb_func_start sub_80941C8 -sub_80941C8: @ 80941C8 - push {lr} - bl sub_809419C - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - beq _080941DA - movs r0, 0 - b _080941DC -_080941DA: - movs r0, 0x1 -_080941DC: - pop {r1} - bx r1 - thumb_func_end sub_80941C8 - thumb_func_start sub_80941E0 sub_80941E0: @ 80941E0 push {r4,r5,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 7ef901eec..bc8c7512d 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4326,3 +4326,21 @@ u8 sub_809419C(struct MapObject *mapObject, struct Sprite *sprite) { return sub_80940C4(mapObject, sprite, sub_80978E4); } + +bool8 sub_80941B0(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (sub_8094188(mapObject, sprite) == 0xFF) + { + return TRUE; + } + return FALSE; +} + +bool8 sub_80941C8(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (sub_809419C(mapObject, sprite) == 0xFF) + { + return TRUE; + } + return FALSE; +} From 3fdb217ba3ba4d30a915fe0e7df85ebe09b226fb Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 09:55:17 -0400 Subject: [PATCH 162/342] sub_80941E0 --- asm/field_map_obj.s | 41 ----------------------------------------- src/field_map_obj.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 41 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index a0d55e64c..d318a0a1c 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,47 +5,6 @@ .text - thumb_func_start sub_80941E0 -sub_80941E0: @ 80941E0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_8094188 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _080941FA - cmp r0, 0xFF - bne _08094226 - movs r0, 0x1 - b _08094228 -_080941FA: - ldrb r0, [r4, 0x18] - lsrs r0, 4 - bl GetOppositeDirection - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r4, 0 - bl FieldObjectSetDirection - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl get_go_image_anim_num - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl obj_npc_animation_step -_08094226: - movs r0, 0 -_08094228: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80941E0 - thumb_func_start sub_8094230 sub_8094230: @ 8094230 push {r4,r5,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index bc8c7512d..fb0d1c81b 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4344,3 +4344,17 @@ bool8 sub_80941C8(struct MapObject *mapObject, struct Sprite *sprite) } return FALSE; } + +bool8 sub_80941E0(struct MapObject *mapObject, struct Sprite *sprite) +{ + switch (sub_8094188(mapObject, sprite)) + { + case 255: + return TRUE; + case 1: + FieldObjectSetDirection(mapObject, GetOppositeDirection(mapObject->placeholder18)); + obj_npc_animation_step(mapObject, sprite, get_go_image_anim_num(mapObject->mapobj_unk_18)); + default: + return FALSE; + } +} From 3a7f771eabc3054029c73828ca3872b1157af01a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 10:01:27 -0400 Subject: [PATCH 163/342] maybe_shadow_1 might be a meme --- asm/field_map_obj.s | 196 -------------------------------------------- src/field_map_obj.c | 23 ++++++ 2 files changed, 23 insertions(+), 196 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index d318a0a1c..e9a96a6e0 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,202 +5,6 @@ .text - thumb_func_start sub_8094230 -sub_8094230: @ 8094230 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x1 - movs r3, 0x2 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809425C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094230 - - thumb_func_start sub_809425C -sub_809425C: @ 809425C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08094270 - movs r0, 0 - b _08094280 -_08094270: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08094280: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_809425C - - thumb_func_start sub_8094288 -sub_8094288: @ 8094288 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x2 - movs r3, 0x2 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80942B4 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094288 - - thumb_func_start sub_80942B4 -sub_80942B4: @ 80942B4 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _080942C8 - movs r0, 0 - b _080942D8 -_080942C8: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_080942D8: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80942B4 - - thumb_func_start sub_80942E0 -sub_80942E0: @ 80942E0 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x3 - movs r3, 0x2 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809430C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80942E0 - - thumb_func_start sub_809430C -sub_809430C: @ 809430C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08094320 - movs r0, 0 - b _08094330 -_08094320: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08094330: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_809430C - - thumb_func_start sub_8094338 -sub_8094338: @ 8094338 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x4 - movs r3, 0x2 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094364 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094338 - - thumb_func_start sub_8094364 -sub_8094364: @ 8094364 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08094378 - movs r0, 0 - b _08094388 -_08094378: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08094388: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094364 - thumb_func_start sub_8094390 sub_8094390: @ 8094390 movs r2, 0x1 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index fb0d1c81b..dcf439b9b 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4358,3 +4358,26 @@ bool8 sub_80941E0(struct MapObject *mapObject, struct Sprite *sprite) return FALSE; } } + +#define maybe_shadow_1_macro(name, fn1, fn2, ...) \ +static bool8 name##_2(struct MapObject *, struct Sprite *);\ +bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + fn1(mapObject, sprite, __VA_ARGS__);\ + return name##_2(mapObject, sprite);\ +}\ +static bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + if (fn2(mapObject, sprite))\ + {\ + mapObject->mapobj_bit_22 = FALSE;\ + sprite->data2 = 2;\ + return TRUE;\ + }\ + return FALSE;\ +} + +maybe_shadow_1_macro(sub_8094230, maybe_shadow_1, sub_80941B0, 1, 2, 0) +maybe_shadow_1_macro(sub_8094288, maybe_shadow_1, sub_80941B0, 2, 2, 0) +maybe_shadow_1_macro(sub_80942E0, maybe_shadow_1, sub_80941B0, 3, 2, 0) +maybe_shadow_1_macro(sub_8094338, maybe_shadow_1, sub_80941B0, 4, 2, 0) From cd958b1e4376058db61607e1cff4427d8a0175b8 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 10:07:43 -0400 Subject: [PATCH 164/342] special_anim_with_timer --- asm/field_map_obj.s | 118 -------------------------------------------- src/field_map_obj.c | 29 +++++++++++ 2 files changed, 29 insertions(+), 118 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index e9a96a6e0..9a27d4c06 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,124 +5,6 @@ .text - thumb_func_start sub_8094390 -sub_8094390: @ 8094390 - movs r2, 0x1 - strh r2, [r0, 0x32] - strh r1, [r0, 0x34] - bx lr - thumb_func_end sub_8094390 - - thumb_func_start sub_8094398 -sub_8094398: @ 8094398 - push {lr} - ldrh r0, [r1, 0x34] - subs r0, 0x1 - strh r0, [r1, 0x34] - lsls r0, 16 - cmp r0, 0 - beq _080943AA - movs r0, 0 - b _080943B0 -_080943AA: - movs r0, 0x2 - strh r0, [r1, 0x32] - movs r0, 0x1 -_080943B0: - pop {r1} - bx r1 - thumb_func_end sub_8094398 - - thumb_func_start sub_80943B4 -sub_80943B4: @ 80943B4 - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - adds r0, r4, 0 - movs r1, 0x1 - bl sub_8094390 - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_8094398 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80943B4 - - thumb_func_start sub_80943D4 -sub_80943D4: @ 80943D4 - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - adds r0, r4, 0 - movs r1, 0x2 - bl sub_8094390 - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_8094398 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80943D4 - - thumb_func_start sub_80943F4 -sub_80943F4: @ 80943F4 - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - adds r0, r4, 0 - movs r1, 0x4 - bl sub_8094390 - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_8094398 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80943F4 - - thumb_func_start sub_8094414 -sub_8094414: @ 8094414 - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - adds r0, r4, 0 - movs r1, 0x8 - bl sub_8094390 - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_8094398 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094414 - - thumb_func_start sub_8094434 -sub_8094434: @ 8094434 - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - adds r0, r4, 0 - movs r1, 0x10 - bl sub_8094390 - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_8094398 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094434 - thumb_func_start sub_8094454 sub_8094454: @ 8094454 push {r4,r5,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index dcf439b9b..9fedc7f0b 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4381,3 +4381,32 @@ maybe_shadow_1_macro(sub_8094230, maybe_shadow_1, sub_80941B0, 1, 2, 0) maybe_shadow_1_macro(sub_8094288, maybe_shadow_1, sub_80941B0, 2, 2, 0) maybe_shadow_1_macro(sub_80942E0, maybe_shadow_1, sub_80941B0, 3, 2, 0) maybe_shadow_1_macro(sub_8094338, maybe_shadow_1, sub_80941B0, 4, 2, 0) + +void sub_8094390(struct Sprite *sprite, u16 duration) +{ + sprite->data2 = 1; + sprite->data3 = duration; +} + +bool8 sub_8094398(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (-- sprite->data3 == 0) + { + sprite->data2 = 2; + return TRUE; + } + return FALSE; +} + +#define special_anim_with_timer(name, duration)\ +bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + sub_8094390(sprite, duration);\ + return sub_8094398(mapObject, sprite);\ +} + +special_anim_with_timer(sub_80943B4, 1) +special_anim_with_timer(sub_80943D4, 2) +special_anim_with_timer(sub_80943F4, 4) +special_anim_with_timer(sub_8094414, 8) +special_anim_with_timer(sub_8094434, 16) From 43b3195bc853ac9d88ae93d9a36060de8a2295ac Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 10:23:18 -0400 Subject: [PATCH 165/342] More special anims with timers --- asm/field_map_obj.s | 700 -------------------------------------------- src/field_map_obj.c | 60 ++++ 2 files changed, 60 insertions(+), 700 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 9a27d4c06..3fcc3dfbf 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,706 +5,6 @@ .text - thumb_func_start sub_8094454 -sub_8094454: @ 8094454 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x1 - movs r3, 0x1 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094474 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094454 - - thumb_func_start sub_8094474 -sub_8094474: @ 8094474 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094486 - movs r0, 0 - b _0809448C -_08094486: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_0809448C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094474 - - thumb_func_start sub_8094494 -sub_8094494: @ 8094494 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x2 - movs r3, 0x1 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80944B4 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094494 - - thumb_func_start sub_80944B4 -sub_80944B4: @ 80944B4 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _080944C6 - movs r0, 0 - b _080944CC -_080944C6: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_080944CC: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80944B4 - - thumb_func_start sub_80944D4 -sub_80944D4: @ 80944D4 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x3 - movs r3, 0x1 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80944F4 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80944D4 - - thumb_func_start sub_80944F4 -sub_80944F4: @ 80944F4 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094506 - movs r0, 0 - b _0809450C -_08094506: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_0809450C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80944F4 - - thumb_func_start sub_8094514 -sub_8094514: @ 8094514 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x4 - movs r3, 0x1 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094534 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094514 - - thumb_func_start sub_8094534 -sub_8094534: @ 8094534 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094546 - movs r0, 0 - b _0809454C -_08094546: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_0809454C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094534 - - thumb_func_start sub_8094554 -sub_8094554: @ 8094554 - push {r4-r6,lr} - mov r6, r8 - push {r6} - mov r8, r0 - adds r6, r1, 0 - adds r1, r2, 0 - adds r4, r3, 0 - ldr r5, [sp, 0x14] - lsls r1, 24 - lsrs r1, 24 - lsls r4, 24 - lsrs r4, 24 - lsls r5, 16 - lsrs r5, 16 - bl FieldObjectSetDirection - mov r0, r8 - adds r1, r6, 0 - adds r2, r4, 0 - bl npc_apply_anim_looping - adds r2, r6, 0 - adds r2, 0x2C - ldrb r1, [r2] - movs r0, 0x41 - negs r0, r0 - ands r0, r1 - strb r0, [r2] - movs r0, 0x1 - strh r0, [r6, 0x32] - strh r5, [r6, 0x34] - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_8094554 - - thumb_func_start sub_809459C -@ signed int sub_809459C(int a1, obj *a2) -sub_809459C: @ 809459C - push {lr} - ldrh r0, [r1, 0x34] - subs r0, 0x1 - strh r0, [r1, 0x34] - lsls r0, 16 - cmp r0, 0 - beq _080945AE - movs r0, 0 - b _080945C0 -_080945AE: - movs r0, 0x2 - strh r0, [r1, 0x32] - adds r2, r1, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2] - movs r0, 0x1 -_080945C0: - pop {r1} - bx r1 - thumb_func_end sub_809459C - - thumb_func_start sub_80945C4 -@ int sub_80945C4(int a1, obj *a2) -sub_80945C4: @ 80945C4 - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - ldrh r1, [r4, 0x34] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _080945EE - adds r3, r4, 0 - adds r3, 0x2C - ldrb r2, [r3] - lsls r1, r2, 26 - lsrs r1, 26 - adds r1, 0x1 - movs r0, 0x3F - ands r1, r0 - movs r0, 0x40 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r3] -_080945EE: - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80945C4 - - thumb_func_start sub_8094600 -sub_8094600: @ 8094600 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - bl get_go_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x20 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x1 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80945C4 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094600 - - thumb_func_start sub_8094638 -sub_8094638: @ 8094638 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - bl get_go_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x20 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x2 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80945C4 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094638 - - thumb_func_start sub_8094670 -sub_8094670: @ 8094670 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x3 - bl get_go_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x20 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x3 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80945C4 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094670 - - thumb_func_start sub_80946A8 -sub_80946A8: @ 80946A8 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x4 - bl get_go_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x20 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x4 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80945C4 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80946A8 - - thumb_func_start sub_80946E0 -sub_80946E0: @ 80946E0 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - bl get_go_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x10 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x1 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80946E0 - - thumb_func_start sub_8094718 -sub_8094718: @ 8094718 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - bl get_go_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x10 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x2 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094718 - - thumb_func_start sub_8094750 -sub_8094750: @ 8094750 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x3 - bl get_go_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x10 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x3 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094750 - - thumb_func_start sub_8094788 -sub_8094788: @ 8094788 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x4 - bl get_go_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x10 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x4 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094788 - - thumb_func_start sub_80947C0 -sub_80947C0: @ 80947C0 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - bl get_go_fast_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x8 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x1 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80947C0 - - thumb_func_start sub_80947F8 -sub_80947F8: @ 80947F8 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - bl get_go_fast_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x8 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x2 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80947F8 - - thumb_func_start sub_8094830 -sub_8094830: @ 8094830 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x3 - bl get_go_fast_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x8 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x3 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094830 - - thumb_func_start sub_8094868 -sub_8094868: @ 8094868 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x4 - bl get_go_fast_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x8 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x4 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094868 - - thumb_func_start sub_80948A0 -sub_80948A0: @ 80948A0 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - bl get_go_faster_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x4 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x1 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80948A0 - - thumb_func_start sub_80948D8 -sub_80948D8: @ 80948D8 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - bl get_go_faster_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x4 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x2 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80948D8 - - thumb_func_start sub_8094910 -sub_8094910: @ 8094910 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x3 - bl get_go_faster_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x4 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x3 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094910 - - thumb_func_start sub_8094948 -sub_8094948: @ 8094948 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x4 - bl get_go_faster_image_anim_num - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x4 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x4 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094948 - thumb_func_start sub_8094980 sub_8094980: @ 8094980 push {r4,r5,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 9fedc7f0b..e6a4c4181 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4410,3 +4410,63 @@ special_anim_with_timer(sub_80943D4, 2) special_anim_with_timer(sub_80943F4, 4) special_anim_with_timer(sub_8094414, 8) special_anim_with_timer(sub_8094434, 16) + +an_walk_any_2_macro(sub_8094454, do_go_anim, npc_obj_ministep_stop_on_arrival, 1, 1) +an_walk_any_2_macro(sub_8094494, do_go_anim, npc_obj_ministep_stop_on_arrival, 2, 1) +an_walk_any_2_macro(sub_80944D4, do_go_anim, npc_obj_ministep_stop_on_arrival, 3, 1) +an_walk_any_2_macro(sub_8094514, do_go_anim, npc_obj_ministep_stop_on_arrival, 4, 1) + +void sub_8094554(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 animNum, u16 duration) +{ + FieldObjectSetDirection(mapObject, direction); + npc_apply_anim_looping(mapObject, sprite, animNum); + sprite->animPaused = FALSE; + sprite->data2 = 1; + sprite->data3 = duration; +} + +bool8 sub_809459C(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (-- sprite->data3 == 0) + { + sprite->data2 = 2; + sprite->animPaused = TRUE; + return TRUE; + } + return FALSE; +} + +bool8 sub_80945C4(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (sprite->data3 & 1) + { + sprite->animDelayCounter ++; + } + return sub_809459C(mapObject, sprite); +} + +#define special_anim_with_timer_2(name, direction, images, duration, timer) \ +bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + u8 animId;\ + animId = get_##images##_image_anim_num(direction);\ + sub_8094554(mapObject, sprite, direction, animId, duration);\ + return timer(mapObject, sprite);\ +} + +special_anim_with_timer_2(sub_8094600, DIR_SOUTH, go, 32, sub_80945C4) +special_anim_with_timer_2(sub_8094638, DIR_NORTH, go, 32, sub_80945C4) +special_anim_with_timer_2(sub_8094670, DIR_WEST, go, 32, sub_80945C4) +special_anim_with_timer_2(sub_80946A8, DIR_EAST, go, 32, sub_80945C4) +special_anim_with_timer_2(sub_80946E0, DIR_SOUTH, go, 16, sub_809459C) +special_anim_with_timer_2(sub_8094718, DIR_NORTH, go, 16, sub_809459C) +special_anim_with_timer_2(sub_8094750, DIR_WEST, go, 16, sub_809459C) +special_anim_with_timer_2(sub_8094788, DIR_EAST, go, 16, sub_809459C) +special_anim_with_timer_2(sub_80947C0, DIR_SOUTH, go_fast, 8, sub_809459C) +special_anim_with_timer_2(sub_80947F8, DIR_NORTH, go_fast, 8, sub_809459C) +special_anim_with_timer_2(sub_8094830, DIR_WEST, go_fast, 8, sub_809459C) +special_anim_with_timer_2(sub_8094868, DIR_EAST, go_fast, 8, sub_809459C) +special_anim_with_timer_2(sub_80948A0, DIR_SOUTH, go_faster, 4, sub_809459C) +special_anim_with_timer_2(sub_80948D8, DIR_NORTH, go_faster, 4, sub_809459C) +special_anim_with_timer_2(sub_8094910, DIR_WEST, go_faster, 4, sub_809459C) +special_anim_with_timer_2(sub_8094948, DIR_EAST, go_faster, 4, sub_809459C) From f8b08d3ee7f2836f86eed171b064ebb125d43400 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 10:25:48 -0400 Subject: [PATCH 166/342] more an_walk_any_2_macro functions --- asm/field_map_obj.s | 456 -------------------------------------------- src/field_map_obj.c | 13 ++ 2 files changed, 13 insertions(+), 456 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 3fcc3dfbf..d1d4596eb 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,462 +5,6 @@ .text - thumb_func_start sub_8094980 -sub_8094980: @ 8094980 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x1 - movs r3, 0x2 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80949A0 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094980 - - thumb_func_start sub_80949A0 -sub_80949A0: @ 80949A0 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _080949B2 - movs r0, 0 - b _080949B8 -_080949B2: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_080949B8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80949A0 - - thumb_func_start sub_80949C0 -sub_80949C0: @ 80949C0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x2 - movs r3, 0x2 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80949E0 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80949C0 - - thumb_func_start sub_80949E0 -sub_80949E0: @ 80949E0 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _080949F2 - movs r0, 0 - b _080949F8 -_080949F2: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_080949F8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80949E0 - - thumb_func_start sub_8094A00 -sub_8094A00: @ 8094A00 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x3 - movs r3, 0x2 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094A20 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094A00 - - thumb_func_start sub_8094A20 -sub_8094A20: @ 8094A20 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094A32 - movs r0, 0 - b _08094A38 -_08094A32: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094A38: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094A20 - - thumb_func_start sub_8094A40 -sub_8094A40: @ 8094A40 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x4 - movs r3, 0x2 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094A60 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094A40 - - thumb_func_start sub_8094A60 -sub_8094A60: @ 8094A60 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094A72 - movs r0, 0 - b _08094A78 -_08094A72: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094A78: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094A60 - - thumb_func_start sub_8094A80 -sub_8094A80: @ 8094A80 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x1 - movs r3, 0x3 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094AA0 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094A80 - - thumb_func_start sub_8094AA0 -sub_8094AA0: @ 8094AA0 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094AB2 - movs r0, 0 - b _08094AB8 -_08094AB2: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094AB8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094AA0 - - thumb_func_start sub_8094AC0 -sub_8094AC0: @ 8094AC0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x2 - movs r3, 0x3 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094AE0 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094AC0 - - thumb_func_start sub_8094AE0 -sub_8094AE0: @ 8094AE0 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094AF2 - movs r0, 0 - b _08094AF8 -_08094AF2: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094AF8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094AE0 - - thumb_func_start sub_8094B00 -sub_8094B00: @ 8094B00 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x3 - movs r3, 0x3 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094B20 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094B00 - - thumb_func_start sub_8094B20 -sub_8094B20: @ 8094B20 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094B32 - movs r0, 0 - b _08094B38 -_08094B32: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094B38: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094B20 - - thumb_func_start sub_8094B40 -sub_8094B40: @ 8094B40 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x4 - movs r3, 0x3 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094B60 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094B40 - - thumb_func_start sub_8094B60 -sub_8094B60: @ 8094B60 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094B72 - movs r0, 0 - b _08094B78 -_08094B72: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094B78: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094B60 - - thumb_func_start sub_8094B80 -sub_8094B80: @ 8094B80 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x1 - movs r3, 0x4 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094BA0 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094B80 - - thumb_func_start sub_8094BA0 -sub_8094BA0: @ 8094BA0 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094BB2 - movs r0, 0 - b _08094BB8 -_08094BB2: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094BB8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094BA0 - - thumb_func_start sub_8094BC0 -sub_8094BC0: @ 8094BC0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x2 - movs r3, 0x4 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094BE0 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094BC0 - - thumb_func_start sub_8094BE0 -sub_8094BE0: @ 8094BE0 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094BF2 - movs r0, 0 - b _08094BF8 -_08094BF2: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094BF8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094BE0 - - thumb_func_start sub_8094C00 -sub_8094C00: @ 8094C00 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x3 - movs r3, 0x4 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094C20 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094C00 - - thumb_func_start sub_8094C20 -sub_8094C20: @ 8094C20 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094C32 - movs r0, 0 - b _08094C38 -_08094C32: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094C38: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094C20 - - thumb_func_start sub_8094C40 -sub_8094C40: @ 8094C40 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x4 - movs r3, 0x4 - bl do_go_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094C60 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094C40 - - thumb_func_start sub_8094C60 -sub_8094C60: @ 8094C60 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094C72 - movs r0, 0 - b _08094C78 -_08094C72: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094C78: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094C60 - thumb_func_start do_run_south_anim @ bool8 do_run_south_anim(struct npc_state *fieldObject, struct obj *object) do_run_south_anim: @ 8094C80 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index e6a4c4181..c4847ae4f 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4470,3 +4470,16 @@ special_anim_with_timer_2(sub_80948A0, DIR_SOUTH, go_faster, 4, sub_809459C) special_anim_with_timer_2(sub_80948D8, DIR_NORTH, go_faster, 4, sub_809459C) special_anim_with_timer_2(sub_8094910, DIR_WEST, go_faster, 4, sub_809459C) special_anim_with_timer_2(sub_8094948, DIR_EAST, go_faster, 4, sub_809459C) + +an_walk_any_2_macro(sub_8094980, do_go_anim, npc_obj_ministep_stop_on_arrival, 1, 2) +an_walk_any_2_macro(sub_80949C0, do_go_anim, npc_obj_ministep_stop_on_arrival, 2, 2) +an_walk_any_2_macro(sub_8094A00, do_go_anim, npc_obj_ministep_stop_on_arrival, 3, 2) +an_walk_any_2_macro(sub_8094A40, do_go_anim, npc_obj_ministep_stop_on_arrival, 4, 2) +an_walk_any_2_macro(sub_8094A80, do_go_anim, npc_obj_ministep_stop_on_arrival, 1, 3) +an_walk_any_2_macro(sub_8094AC0, do_go_anim, npc_obj_ministep_stop_on_arrival, 2, 3) +an_walk_any_2_macro(sub_8094B00, do_go_anim, npc_obj_ministep_stop_on_arrival, 3, 3) +an_walk_any_2_macro(sub_8094B40, do_go_anim, npc_obj_ministep_stop_on_arrival, 4, 3) +an_walk_any_2_macro(sub_8094B80, do_go_anim, npc_obj_ministep_stop_on_arrival, 1, 4) +an_walk_any_2_macro(sub_8094BC0, do_go_anim, npc_obj_ministep_stop_on_arrival, 2, 4) +an_walk_any_2_macro(sub_8094C00, do_go_anim, npc_obj_ministep_stop_on_arrival, 3, 4) +an_walk_any_2_macro(sub_8094C40, do_go_anim, npc_obj_ministep_stop_on_arrival, 4, 4) From 384ca4658b84168bc836a32ebd8b17ce70279555 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 10:29:57 -0400 Subject: [PATCH 167/342] yet more an_walk_any_2_macro functions --- asm/field_map_obj.s | 150 -------------------------------------------- src/field_map_obj.c | 64 ++++++++++--------- 2 files changed, 34 insertions(+), 180 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index d1d4596eb..7ef8e24c6 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,156 +5,6 @@ .text - thumb_func_start do_run_south_anim -@ bool8 do_run_south_anim(struct npc_state *fieldObject, struct obj *object) -do_run_south_anim: @ 8094C80 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x1 - bl do_run_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094CA0 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end do_run_south_anim - - thumb_func_start sub_8094CA0 -@ bool8 sub_8094CA0(struct npc_state *fieldObject, struct obj *object) -sub_8094CA0: @ 8094CA0 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094CB2 - movs r0, 0 - b _08094CB8 -_08094CB2: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094CB8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094CA0 - - thumb_func_start do_run_north_anim -do_run_north_anim: @ 8094CC0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x2 - bl do_run_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094CE0 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end do_run_north_anim - - thumb_func_start sub_8094CE0 -sub_8094CE0: @ 8094CE0 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094CF2 - movs r0, 0 - b _08094CF8 -_08094CF2: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094CF8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094CE0 - - thumb_func_start do_run_west_anim -do_run_west_anim: @ 8094D00 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x3 - bl do_run_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094D20 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end do_run_west_anim - - thumb_func_start sub_8094D20 -sub_8094D20: @ 8094D20 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094D32 - movs r0, 0 - b _08094D38 -_08094D32: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094D38: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094D20 - - thumb_func_start do_run_east_anim -do_run_east_anim: @ 8094D40 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x4 - bl do_run_anim - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094D60 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end do_run_east_anim - - thumb_func_start sub_8094D60 -sub_8094D60: @ 8094D60 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08094D72 - movs r0, 0 - b _08094D78 -_08094D72: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094D78: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094D60 - thumb_func_start npc_set_direction_and_anim__an_proceed npc_set_direction_and_anim__an_proceed: @ 8094D80 push {r4-r6,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index c4847ae4f..5fd92199f 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4449,37 +4449,41 @@ bool8 sub_80945C4(struct MapObject *mapObject, struct Sprite *sprite) bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ {\ u8 animId;\ - animId = get_##images##_image_anim_num(direction);\ - sub_8094554(mapObject, sprite, direction, animId, duration);\ + animId = get_##images##_image_anim_num(DIR_##direction);\ + sub_8094554(mapObject, sprite, DIR_##direction, animId, duration);\ return timer(mapObject, sprite);\ } -special_anim_with_timer_2(sub_8094600, DIR_SOUTH, go, 32, sub_80945C4) -special_anim_with_timer_2(sub_8094638, DIR_NORTH, go, 32, sub_80945C4) -special_anim_with_timer_2(sub_8094670, DIR_WEST, go, 32, sub_80945C4) -special_anim_with_timer_2(sub_80946A8, DIR_EAST, go, 32, sub_80945C4) -special_anim_with_timer_2(sub_80946E0, DIR_SOUTH, go, 16, sub_809459C) -special_anim_with_timer_2(sub_8094718, DIR_NORTH, go, 16, sub_809459C) -special_anim_with_timer_2(sub_8094750, DIR_WEST, go, 16, sub_809459C) -special_anim_with_timer_2(sub_8094788, DIR_EAST, go, 16, sub_809459C) -special_anim_with_timer_2(sub_80947C0, DIR_SOUTH, go_fast, 8, sub_809459C) -special_anim_with_timer_2(sub_80947F8, DIR_NORTH, go_fast, 8, sub_809459C) -special_anim_with_timer_2(sub_8094830, DIR_WEST, go_fast, 8, sub_809459C) -special_anim_with_timer_2(sub_8094868, DIR_EAST, go_fast, 8, sub_809459C) -special_anim_with_timer_2(sub_80948A0, DIR_SOUTH, go_faster, 4, sub_809459C) -special_anim_with_timer_2(sub_80948D8, DIR_NORTH, go_faster, 4, sub_809459C) -special_anim_with_timer_2(sub_8094910, DIR_WEST, go_faster, 4, sub_809459C) -special_anim_with_timer_2(sub_8094948, DIR_EAST, go_faster, 4, sub_809459C) +special_anim_with_timer_2(sub_8094600, SOUTH, go, 32, sub_80945C4) +special_anim_with_timer_2(sub_8094638, NORTH, go, 32, sub_80945C4) +special_anim_with_timer_2(sub_8094670, WEST, go, 32, sub_80945C4) +special_anim_with_timer_2(sub_80946A8, EAST, go, 32, sub_80945C4) +special_anim_with_timer_2(sub_80946E0, SOUTH, go, 16, sub_809459C) +special_anim_with_timer_2(sub_8094718, NORTH, go, 16, sub_809459C) +special_anim_with_timer_2(sub_8094750, WEST, go, 16, sub_809459C) +special_anim_with_timer_2(sub_8094788, EAST, go, 16, sub_809459C) +special_anim_with_timer_2(sub_80947C0, SOUTH, go_fast, 8, sub_809459C) +special_anim_with_timer_2(sub_80947F8, NORTH, go_fast, 8, sub_809459C) +special_anim_with_timer_2(sub_8094830, WEST, go_fast, 8, sub_809459C) +special_anim_with_timer_2(sub_8094868, EAST, go_fast, 8, sub_809459C) +special_anim_with_timer_2(sub_80948A0, SOUTH, go_faster, 4, sub_809459C) +special_anim_with_timer_2(sub_80948D8, NORTH, go_faster, 4, sub_809459C) +special_anim_with_timer_2(sub_8094910, WEST, go_faster, 4, sub_809459C) +special_anim_with_timer_2(sub_8094948, EAST, go_faster, 4, sub_809459C) -an_walk_any_2_macro(sub_8094980, do_go_anim, npc_obj_ministep_stop_on_arrival, 1, 2) -an_walk_any_2_macro(sub_80949C0, do_go_anim, npc_obj_ministep_stop_on_arrival, 2, 2) -an_walk_any_2_macro(sub_8094A00, do_go_anim, npc_obj_ministep_stop_on_arrival, 3, 2) -an_walk_any_2_macro(sub_8094A40, do_go_anim, npc_obj_ministep_stop_on_arrival, 4, 2) -an_walk_any_2_macro(sub_8094A80, do_go_anim, npc_obj_ministep_stop_on_arrival, 1, 3) -an_walk_any_2_macro(sub_8094AC0, do_go_anim, npc_obj_ministep_stop_on_arrival, 2, 3) -an_walk_any_2_macro(sub_8094B00, do_go_anim, npc_obj_ministep_stop_on_arrival, 3, 3) -an_walk_any_2_macro(sub_8094B40, do_go_anim, npc_obj_ministep_stop_on_arrival, 4, 3) -an_walk_any_2_macro(sub_8094B80, do_go_anim, npc_obj_ministep_stop_on_arrival, 1, 4) -an_walk_any_2_macro(sub_8094BC0, do_go_anim, npc_obj_ministep_stop_on_arrival, 2, 4) -an_walk_any_2_macro(sub_8094C00, do_go_anim, npc_obj_ministep_stop_on_arrival, 3, 4) -an_walk_any_2_macro(sub_8094C40, do_go_anim, npc_obj_ministep_stop_on_arrival, 4, 4) +an_walk_any_2_macro(sub_8094980, do_go_anim, npc_obj_ministep_stop_on_arrival, DIR_SOUTH, 2) +an_walk_any_2_macro(sub_80949C0, do_go_anim, npc_obj_ministep_stop_on_arrival, DIR_NORTH, 2) +an_walk_any_2_macro(sub_8094A00, do_go_anim, npc_obj_ministep_stop_on_arrival, DIR_WEST, 2) +an_walk_any_2_macro(sub_8094A40, do_go_anim, npc_obj_ministep_stop_on_arrival, DIR_EAST, 2) +an_walk_any_2_macro(sub_8094A80, do_go_anim, npc_obj_ministep_stop_on_arrival, DIR_SOUTH, 3) +an_walk_any_2_macro(sub_8094AC0, do_go_anim, npc_obj_ministep_stop_on_arrival, DIR_NORTH, 3) +an_walk_any_2_macro(sub_8094B00, do_go_anim, npc_obj_ministep_stop_on_arrival, DIR_WEST, 3) +an_walk_any_2_macro(sub_8094B40, do_go_anim, npc_obj_ministep_stop_on_arrival, DIR_EAST, 3) +an_walk_any_2_macro(sub_8094B80, do_go_anim, npc_obj_ministep_stop_on_arrival, DIR_SOUTH, 4) +an_walk_any_2_macro(sub_8094BC0, do_go_anim, npc_obj_ministep_stop_on_arrival, DIR_NORTH, 4) +an_walk_any_2_macro(sub_8094C00, do_go_anim, npc_obj_ministep_stop_on_arrival, DIR_WEST, 4) +an_walk_any_2_macro(sub_8094C40, do_go_anim, npc_obj_ministep_stop_on_arrival, DIR_EAST, 4) +an_walk_any_2_macro(sub_8094C80, do_run_anim, npc_obj_ministep_stop_on_arrival, DIR_SOUTH) +an_walk_any_2_macro(sub_8094CC0, do_run_anim, npc_obj_ministep_stop_on_arrival, DIR_NORTH) +an_walk_any_2_macro(sub_8094D00, do_run_anim, npc_obj_ministep_stop_on_arrival, DIR_WEST) +an_walk_any_2_macro(sub_8094D40, do_run_anim, npc_obj_ministep_stop_on_arrival, DIR_EAST) From 9b4c61658a6a5d164ba67d6434be94540601cc83 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 10:58:24 -0400 Subject: [PATCH 168/342] npc_set_direction_and_anim__an_proceed --- asm/field_map_obj.s | 59 --------------------------------------- include/map_obj_8097404.h | 2 ++ src/field_map_obj.c | 23 +++++++++++++++ 3 files changed, 25 insertions(+), 59 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 7ef8e24c6..958e66bd6 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,65 +5,6 @@ .text - thumb_func_start npc_set_direction_and_anim__an_proceed -npc_set_direction_and_anim__an_proceed: @ 8094D80 - push {r4-r6,lr} - adds r6, r0, 0 - adds r5, r1, 0 - adds r4, r2, 0 - adds r1, r3, 0 - lsls r4, 24 - lsrs r4, 24 - lsls r1, 24 - lsrs r1, 24 - adds r0, r5, 0 - movs r2, 0 - bl obj_anim_image_set_and_seek - adds r0, r6, 0 - adds r1, r4, 0 - bl FieldObjectSetDirection - movs r0, 0x1 - strh r0, [r5, 0x32] - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end npc_set_direction_and_anim__an_proceed - - thumb_func_start sub_8094DAC -sub_8094DAC: @ 8094DAC - push {lr} - ldrb r2, [r0, 0x18] - lsrs r2, 4 - adds r3, r1, 0 - adds r3, 0x2A - ldrb r3, [r3] - bl npc_set_direction_and_anim__an_proceed - movs r0, 0 - pop {r1} - bx r1 - thumb_func_end sub_8094DAC - - thumb_func_start sub_8094DC4 -sub_8094DC4: @ 8094DC4 - push {r4,lr} - adds r4, r1, 0 - adds r0, r4, 0 - bl sub_80979BC - lsls r0, 24 - cmp r0, 0 - bne _08094DD8 - movs r0, 0 - b _08094DDE -_08094DD8: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08094DDE: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8094DC4 - thumb_func_start sub_8094DE4 sub_8094DE4: @ 8094DE4 push {r4,r5,lr} diff --git a/include/map_obj_8097404.h b/include/map_obj_8097404.h index 1fc653163..08b69f49a 100644 --- a/include/map_obj_8097404.h +++ b/include/map_obj_8097404.h @@ -22,5 +22,7 @@ void sub_809783C(struct Sprite *, u8, u8, u8); void DoShadowFieldEffect(struct MapObject *); u8 sub_809785C(struct Sprite *); u8 sub_80978E4(struct Sprite *); +void obj_anim_image_set_and_seek(struct Sprite *, u8, u8); +bool8 sub_80979BC(struct Sprite *); #endif //GUARD_MAP_OBJ_8097404_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 5fd92199f..e1ba386e0 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4487,3 +4487,26 @@ an_walk_any_2_macro(sub_8094C80, do_run_anim, npc_obj_ministep_stop_on_arrival, an_walk_any_2_macro(sub_8094CC0, do_run_anim, npc_obj_ministep_stop_on_arrival, DIR_NORTH) an_walk_any_2_macro(sub_8094D00, do_run_anim, npc_obj_ministep_stop_on_arrival, DIR_WEST) an_walk_any_2_macro(sub_8094D40, do_run_anim, npc_obj_ministep_stop_on_arrival, DIR_EAST) + +void npc_set_direction_and_anim__an_proceed(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 animNum) +{ + obj_anim_image_set_and_seek(sprite, animNum, 0); + FieldObjectSetDirection(mapObject, direction); + sprite->data2 = 1; +} + +bool8 sub_8094DAC(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_set_direction_and_anim__an_proceed(mapObject, sprite, mapObject->placeholder18, sprite->animNum); + return FALSE; +} + +bool8 sub_8094DC4(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (sub_80979BC(sprite)) + { + sprite->data2 = 2; + return TRUE; + } + return FALSE; +} From 75595f9b3dfc57707183dae5d842ba21a8c2ff7f Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 17 Sep 2017 17:14:32 +0200 Subject: [PATCH 169/342] decompile battle 3 --- asm/battle_3.s | 3047 --------------------------------------- asm/battle_4.s | 2 +- data/battle_scripts_1.s | 46 +- include/battle.h | 23 +- ld_script.txt | 1 - src/battle_3.c | 1006 +++++++++++++ 6 files changed, 1050 insertions(+), 3075 deletions(-) delete mode 100644 asm/battle_3.s diff --git a/asm/battle_3.s b/asm/battle_3.s deleted file mode 100644 index 646eba2d5..000000000 --- a/asm/battle_3.s +++ /dev/null @@ -1,3047 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - - thumb_func_start b_call_bc_move_exec -b_call_bc_move_exec: @ 8044458 - ldr r1, =gBattlescriptCurrInstr - str r0, [r1] - ldr r0, =gBattleResources - ldr r0, [r0] - ldr r2, [r0, 0xC] - adds r3, r2, 0 - adds r3, 0x20 - ldrb r0, [r3] - adds r1, r0, 0x1 - strb r1, [r3] - lsls r0, 24 - lsrs r0, 22 - adds r2, r0 - ldr r1, =gBattleMainFunc - ldr r0, [r1] - str r0, [r2] - ldr r0, =bc_move_exec_returning - str r0, [r1] - ldr r1, =gFightStateTracker - movs r0, 0 - strb r0, [r1] - bx lr - .pool - thumb_func_end b_call_bc_move_exec - - thumb_func_start b_push_move_exec -b_push_move_exec: @ 8044498 - push {r4,lr} - adds r4, r0, 0 - bl b_movescr_stack_push_cursor - ldr r0, =gBattlescriptCurrInstr - str r4, [r0] - ldr r0, =gBattleResources - ldr r0, [r0] - ldr r2, [r0, 0xC] - adds r3, r2, 0 - adds r3, 0x20 - ldrb r0, [r3] - adds r1, r0, 0x1 - strb r1, [r3] - lsls r0, 24 - lsrs r0, 22 - adds r2, r0 - ldr r1, =gBattleMainFunc - ldr r0, [r1] - str r0, [r2] - ldr r0, =sub_803E08C - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end b_push_move_exec - - thumb_func_start ItemBattleEffects -ItemBattleEffects: @ 80444DC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x2C - lsls r0, 24 - lsrs r0, 24 - str r0, [sp, 0x8] - lsls r1, 24 - lsrs r7, r1, 24 - lsls r2, 24 - lsrs r6, r2, 24 - movs r0, 0 - mov r10, r0 - movs r1, 0 - str r1, [sp, 0xC] - add r0, sp, 0x4 - strb r1, [r0] - ldr r4, =gLastUsedItem - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r7 - adds r0, r1 - ldrh r0, [r0, 0x2E] - strh r0, [r4] - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0xAF - bne _08044534 - ldr r1, =gEnigmaBerries - lsls r0, r7, 3 - subs r0, r7 - lsls r0, 2 - adds r0, r1 - ldrb r5, [r0, 0x7] - ldrb r0, [r0, 0x1A] - b _08044548 - .pool -_08044534: - ldrh r0, [r4] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r5, r0, 24 - ldrh r0, [r4] - bl ItemId_GetHoldEffectParam - lsls r0, 24 - lsrs r0, 24 -_08044548: - mov r9, r0 - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - ldrh r0, [r0, 0x2E] - str r0, [sp, 0x14] - cmp r0, 0xAF - bne _0804457C - ldr r1, =gEnigmaBerries - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r1 - ldrb r3, [r0, 0x7] - mov r8, r3 - ldrb r0, [r0, 0x1A] - b _08044592 - .pool -_0804457C: - ldr r0, [sp, 0x14] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - ldr r0, [sp, 0x14] - bl ItemId_GetHoldEffectParam - lsls r0, 24 - lsrs r0, 24 -_08044592: - str r0, [sp, 0x10] - ldr r2, =gBattleMons - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r4, [r0, 0x2E] - cmp r4, 0xAF - beq _080445B2 - adds r0, r4, 0 - bl ItemId_GetHoldEffect - adds r0, r4, 0 - bl ItemId_GetHoldEffectParam -_080445B2: - ldr r0, [sp, 0x8] - cmp r0, 0x4 - bls _080445BC - bl _0804582A -_080445BC: - lsls r0, 2 - ldr r1, =_080445D4 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_080445D4: - .4byte _080445E8 - .4byte _08044688 - .4byte _0804582A - .4byte _08045280 - .4byte _080456D0 -_080445E8: - cmp r5, 0x17 - beq _08044618 - cmp r5, 0x20 - beq _080445F4 - bl _0804582A -_080445F4: - adds r0, r7, 0 - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _08044604 - bl _0804582A -_08044604: - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x4A - movs r1, 0x2 - strb r1, [r0] - bl _0804582A - .pool -_08044618: - ldr r1, =gBattleMons - mov r8, r1 - movs r0, 0x58 - adds r1, r7, 0 - muls r1, r0 - mov r0, r8 - adds r0, 0x18 - adds r1, r0 - movs r2, 0x6 - movs r3, 0x7 - mov r10, r3 -_0804462E: - movs r0, 0 - ldrsb r0, [r1, r0] - cmp r0, 0x5 - bgt _0804463C - strb r2, [r1] - movs r5, 0x5 - str r5, [sp, 0xC] -_0804463C: - adds r1, 0x1 - movs r0, 0x1 - negs r0, r0 - add r10, r0 - mov r3, r10 - cmp r3, 0 - bge _0804462E - ldr r5, [sp, 0xC] - cmp r5, 0 - bne _08044654 - bl _0804582A -_08044654: - ldr r0, =gBattleScripting - strb r7, [r0, 0x17] - ldr r0, =gStringBank - strb r7, [r0] - ldr r1, =gActiveBank - ldr r0, =gBankAttacker - strb r7, [r0] - strb r7, [r1] - ldr r0, =gUnknown_082DB7AE - bl b_call_bc_move_exec - bl _0804582A - .pool -_08044688: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r7 - adds r0, r1 - ldrh r0, [r0, 0x28] - mov r8, r1 - cmp r0, 0 - bne _0804469C - bl _0804582A -_0804469C: - subs r0, r5, 0x1 - cmp r0, 0x2A - bls _080446A6 - bl _080451D6 -_080446A6: - lsls r0, 2 - ldr r1, =_080446B8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_080446B8: - .4byte _08044764 - .4byte _08044F44 - .4byte _08045008 - .4byte _08044F74 - .4byte _08044FA8 - .4byte _08044FD8 - .4byte _080447B0 - .4byte _08045044 - .4byte _08045074 - .4byte _0804497C - .4byte _080449FC - .4byte _08044A78 - .4byte _08044B0C - .4byte _08044BA0 - .4byte _08044C34 - .4byte _08044C9C - .4byte _08044CF0 - .4byte _08044D44 - .4byte _08044DAC - .4byte _08044E10 - .4byte _08044E5C - .4byte _080451D6 - .4byte _080448B0 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451A0 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451D6 - .4byte _080451D6 - .4byte _0804491C -_08044764: - movs r0, 0x58 - muls r0, r7 - mov r1, r8 - adds r2, r0, r1 - ldrh r0, [r2, 0x2C] - ldrh r1, [r2, 0x28] - lsrs r0, 1 - cmp r1, r0 - bls _0804477A - bl _080451D6 -_0804477A: - cmp r6, 0 - beq _08044782 - bl _080451D6 -_08044782: - ldr r4, =gBattleMoveDamage - mov r3, r9 - str r3, [r4] - ldrh r3, [r2, 0x28] - mov r5, r9 - adds r0, r3, r5 - ldrh r1, [r2, 0x2C] - cmp r0, r1 - ble _08044798 - subs r0, r1, r3 - str r0, [r4] -_08044798: - ldr r0, [r4] - negs r0, r0 - str r0, [r4] - ldr r0, =gUnknown_082DB7C4 - bl b_call_bc_move_exec - b _08044B02 - .pool -_080447B0: - cmp r6, 0 - beq _080447B8 - bl _080451D6 -_080447B8: - adds r0, r7, 0 - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _080447DC - ldr r1, =gBattlePartyID - lsls r0, r7, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r1, r0 - ldr r0, =gPlayerParty - b _080447EA - .pool -_080447DC: - ldr r1, =gBattlePartyID - lsls r0, r7, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r1, r0 - ldr r0, =gEnemyParty -_080447EA: - adds r4, r1, r0 - movs r1, 0 - mov r10, r1 - add r5, sp, 0x4 -_080447F2: - mov r1, r10 - adds r1, 0xD - adds r0, r4, 0 - bl GetMonData - lsls r0, 16 - lsrs r6, r0, 16 - mov r1, r10 - adds r1, 0x11 - adds r0, r4, 0 - bl GetMonData - strb r0, [r5] - adds r0, r4, 0 - movs r1, 0x15 - bl GetMonData - lsls r0, 24 - lsrs r1, r0, 24 - cmp r6, 0 - beq _08044822 - ldrb r0, [r5] - cmp r0, 0 - beq _0804482C -_08044822: - movs r2, 0x1 - add r10, r2 - mov r3, r10 - cmp r3, 0x3 - ble _080447F2 -_0804482C: - mov r5, r10 - cmp r5, 0x4 - bne _08044836 - bl _080451D6 -_08044836: - lsls r2, r5, 24 - lsrs r2, 24 - adds r0, r6, 0 - bl CalculatePPWithBonus - lsls r0, 24 - lsrs r2, r0, 24 - add r0, sp, 0x4 - ldrb r0, [r0] - mov r3, r9 - adds r1, r0, r3 - cmp r1, r2 - ble _08044860 - add r0, sp, 0x4 - strb r2, [r0] - b _08044864 - .pool -_08044860: - add r0, sp, 0x4 - strb r1, [r0] -_08044864: - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x2 - strb r0, [r1, 0x1] - strb r6, [r1, 0x2] - lsrs r0, r6, 8 - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r0, =gUnknown_082DB7E1 - bl b_call_bc_move_exec - mov r1, r10 - adds r1, 0x9 - lsls r1, 24 - lsrs r1, 24 - add r5, sp, 0x4 - str r5, [sp] - movs r0, 0 - movs r2, 0 - movs r3, 0x1 - bl EmitSetAttributes - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution - movs r0, 0x3 - str r0, [sp, 0xC] - bl _080451DE - .pool -_080448B0: - ldr r0, =gBattleMons - movs r1, 0x58 - muls r1, r7 - adds r0, 0x18 - adds r1, r0 - movs r2, 0x6 - movs r3, 0x7 - mov r10, r3 -_080448C0: - movs r0, 0 - ldrsb r0, [r1, r0] - cmp r0, 0x5 - bgt _080448CE - strb r2, [r1] - movs r5, 0x5 - str r5, [sp, 0xC] -_080448CE: - adds r1, 0x1 - movs r0, 0x1 - negs r0, r0 - add r10, r0 - mov r3, r10 - cmp r3, 0 - bge _080448C0 - movs r5, 0x8 - mov r10, r5 - ldr r0, [sp, 0xC] - cmp r0, 0 - bne _080448EA - bl _0804582A -_080448EA: - ldr r0, =gBattleScripting - strb r7, [r0, 0x17] - ldr r0, =gStringBank - strb r7, [r0] - ldr r1, =gActiveBank - ldr r0, =gBankAttacker - strb r7, [r0] - strb r7, [r1] - ldr r0, =gUnknown_082DB7AE - bl b_call_bc_move_exec - bl _080451D6 - .pool -_0804491C: - movs r0, 0x58 - muls r0, r7 - mov r2, r8 - adds r1, r0, r2 - ldrh r0, [r1, 0x28] - ldrh r3, [r1, 0x2C] - cmp r0, r3 - bcc _08044930 - bl _080451D6 -_08044930: - cmp r6, 0 - beq _08044938 - bl _080451D6 -_08044938: - ldr r3, =gBattleMoveDamage - ldrh r0, [r1, 0x2C] - lsrs r0, 4 - str r0, [r3] - cmp r0, 0 - bne _08044948 - movs r0, 0x1 - str r0, [r3] -_08044948: - ldrh r2, [r1, 0x28] - ldr r0, [r3] - adds r0, r2, r0 - ldrh r1, [r1, 0x2C] - cmp r0, r1 - ble _08044958 - subs r0, r1, r2 - str r0, [r3] -_08044958: - ldr r0, [r3] - negs r0, r0 - str r0, [r3] - ldr r0, =gUnknown_082DB7F1 - bl b_call_bc_move_exec - movs r0, 0x4 - str r0, [sp, 0xC] - adds r0, r7, 0 - adds r1, r5, 0 - bl RecordItemEffectBattle - bl _080451D6 - .pool -_0804497C: - movs r0, 0x58 - adds r1, r7, 0 - muls r1, r0 - str r1, [sp, 0x18] - adds r4, r1, 0 - add r4, r8 - ldrh r0, [r4, 0x2C] - ldrh r1, [r4, 0x28] - lsrs r0, 1 - cmp r1, r0 - bls _08044996 - bl _080451D6 -_08044996: - cmp r6, 0 - beq _0804499E - bl _080451D6 -_0804499E: - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x8 - strb r0, [r1, 0x1] - strb r6, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - ldr r5, =gBattleMoveDamage - ldrh r0, [r4, 0x2C] - mov r1, r9 - bl __divsi3 - str r0, [r5] - cmp r0, 0 - bne _080449C2 - movs r0, 0x1 - str r0, [r5] -_080449C2: - ldrh r2, [r4, 0x28] - ldr r0, [r5] - adds r0, r2, r0 - ldrh r1, [r4, 0x2C] - cmp r0, r1 - ble _080449D2 - subs r0, r1, r2 - str r0, [r5] -_080449D2: - ldr r0, [r5] - negs r0, r0 - str r0, [r5] - mov r0, r8 - adds r0, 0x48 - ldr r2, [sp, 0x18] - adds r0, r2, r0 - ldr r0, [r0] - movs r1, 0 - bl GetFlavourRelationByPersonality - lsls r0, 24 - cmp r0, 0 - bge _080449F0 - b _08044B7C -_080449F0: - b _08044B90 - .pool -_080449FC: - movs r0, 0x58 - adds r5, r7, 0 - muls r5, r0 - str r5, [sp, 0x1C] - add r5, r8 - ldrh r0, [r5, 0x2C] - ldrh r1, [r5, 0x28] - lsrs r0, 1 - cmp r1, r0 - bls _08044A14 - bl _080451D6 -_08044A14: - cmp r6, 0 - beq _08044A1C - bl _080451D6 -_08044A1C: - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x8 - strb r0, [r1, 0x1] - movs r6, 0x1 - strb r6, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - ldr r4, =gBattleMoveDamage - ldrh r0, [r5, 0x2C] - mov r1, r9 - bl __divsi3 - str r0, [r4] - cmp r0, 0 - bne _08044A40 - str r6, [r4] -_08044A40: - ldrh r2, [r5, 0x28] - ldr r0, [r4] - adds r0, r2, r0 - ldrh r1, [r5, 0x2C] - cmp r0, r1 - ble _08044A50 - subs r0, r1, r2 - str r0, [r4] -_08044A50: - ldr r0, [r4] - negs r0, r0 - str r0, [r4] - mov r0, r8 - adds r0, 0x48 - ldr r1, [sp, 0x1C] - adds r0, r1, r0 - ldr r0, [r0] - movs r1, 0x1 - bl GetFlavourRelationByPersonality - lsls r0, 24 - cmp r0, 0 - bge _08044A6E - b _08044C0E -_08044A6E: - b _08044C24 - .pool -_08044A78: - movs r0, 0x58 - adds r3, r7, 0 - muls r3, r0 - str r3, [sp, 0x20] - adds r5, r3, 0 - add r5, r8 - ldrh r0, [r5, 0x2C] - ldrh r1, [r5, 0x28] - lsrs r0, 1 - cmp r1, r0 - bls _08044A90 - b _080451D6 -_08044A90: - cmp r6, 0 - beq _08044A96 - b _080451D6 -_08044A96: - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x8 - strb r0, [r1, 0x1] - movs r0, 0x2 - strb r0, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - ldr r4, =gBattleMoveDamage - ldrh r0, [r5, 0x2C] - mov r1, r9 - bl __divsi3 - str r0, [r4] - cmp r0, 0 - bne _08044ABC - movs r0, 0x1 - str r0, [r4] -_08044ABC: - ldrh r2, [r5, 0x28] - ldr r0, [r4] - adds r0, r2, r0 - ldrh r1, [r5, 0x2C] - cmp r0, r1 - ble _08044ACC - subs r0, r1, r2 - str r0, [r4] -_08044ACC: - ldr r0, [r4] - negs r0, r0 - str r0, [r4] - mov r0, r8 - adds r0, 0x48 - ldr r5, [sp, 0x20] - adds r0, r5, r0 - ldr r0, [r0] - movs r1, 0x2 - bl GetFlavourRelationByPersonality - lsls r0, 24 - cmp r0, 0 - bge _08044AFC - ldr r0, =gUnknown_082DB824 - bl b_call_bc_move_exec - b _08044B02 - .pool -_08044AFC: - ldr r0, =gUnknown_082DB7C4 - bl b_call_bc_move_exec -_08044B02: - movs r0, 0x4 - str r0, [sp, 0xC] - b _080451DE - .pool -_08044B0C: - movs r0, 0x58 - adds r1, r7, 0 - muls r1, r0 - str r1, [sp, 0x24] - adds r5, r1, 0 - add r5, r8 - ldrh r0, [r5, 0x2C] - ldrh r1, [r5, 0x28] - lsrs r0, 1 - cmp r1, r0 - bls _08044B24 - b _080451D6 -_08044B24: - cmp r6, 0 - beq _08044B2A - b _080451D6 -_08044B2A: - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x8 - strb r0, [r1, 0x1] - movs r0, 0x3 - strb r0, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - ldr r4, =gBattleMoveDamage - ldrh r0, [r5, 0x2C] - mov r1, r9 - bl __divsi3 - str r0, [r4] - cmp r0, 0 - bne _08044B50 - movs r0, 0x1 - str r0, [r4] -_08044B50: - ldrh r2, [r5, 0x28] - ldr r0, [r4] - adds r0, r2, r0 - ldrh r1, [r5, 0x2C] - cmp r0, r1 - ble _08044B60 - subs r0, r1, r2 - str r0, [r4] -_08044B60: - ldr r0, [r4] - negs r0, r0 - str r0, [r4] - mov r0, r8 - adds r0, 0x48 - ldr r2, [sp, 0x24] - adds r0, r2, r0 - ldr r0, [r0] - movs r1, 0x3 - bl GetFlavourRelationByPersonality - lsls r0, 24 - cmp r0, 0 - bge _08044B90 -_08044B7C: - ldr r0, =gUnknown_082DB824 - bl b_call_bc_move_exec - b _08044B96 - .pool -_08044B90: - ldr r0, =gUnknown_082DB7C4 - bl b_call_bc_move_exec -_08044B96: - movs r3, 0x4 - str r3, [sp, 0xC] - b _080451DE - .pool -_08044BA0: - movs r0, 0x58 - adds r5, r7, 0 - muls r5, r0 - str r5, [sp, 0x28] - add r5, r8 - ldrh r0, [r5, 0x2C] - ldrh r1, [r5, 0x28] - lsrs r0, 1 - cmp r1, r0 - bls _08044BB6 - b _080451D6 -_08044BB6: - cmp r6, 0 - beq _08044BBC - b _080451D6 -_08044BBC: - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x8 - strb r0, [r1, 0x1] - movs r0, 0x4 - strb r0, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - ldr r4, =gBattleMoveDamage - ldrh r0, [r5, 0x2C] - mov r1, r9 - bl __divsi3 - str r0, [r4] - cmp r0, 0 - bne _08044BE2 - movs r0, 0x1 - str r0, [r4] -_08044BE2: - ldrh r2, [r5, 0x28] - ldr r0, [r4] - adds r0, r2, r0 - ldrh r1, [r5, 0x2C] - cmp r0, r1 - ble _08044BF2 - subs r0, r1, r2 - str r0, [r4] -_08044BF2: - ldr r0, [r4] - negs r0, r0 - str r0, [r4] - mov r0, r8 - adds r0, 0x48 - ldr r1, [sp, 0x28] - adds r0, r1, r0 - ldr r0, [r0] - movs r1, 0x4 - bl GetFlavourRelationByPersonality - lsls r0, 24 - cmp r0, 0 - bge _08044C24 -_08044C0E: - ldr r0, =gUnknown_082DB824 - bl b_call_bc_move_exec - b _08044C2A - .pool -_08044C24: - ldr r0, =gUnknown_082DB7C4 - bl b_call_bc_move_exec -_08044C2A: - movs r2, 0x4 - str r2, [sp, 0xC] - b _080451DE - .pool -_08044C34: - movs r0, 0x58 - muls r0, r7 - mov r3, r8 - adds r5, r0, r3 - ldrh r4, [r5, 0x28] - ldrh r0, [r5, 0x2C] - mov r1, r9 - bl __divsi3 - cmp r4, r0 - ble _08044C4C - b _080451D6 -_08044C4C: - cmp r6, 0 - beq _08044C52 - b _080451D6 -_08044C52: - movs r0, 0x19 - ldrsb r0, [r5, r0] - cmp r0, 0xB - ble _08044C5C - b _080451D6 -_08044C5C: - ldr r1, =gBattleTextBuff1 - movs r2, 0xFD - strb r2, [r1] - movs r0, 0x5 - strb r0, [r1, 0x1] - movs r0, 0x1 - strb r0, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - ldr r1, =gBattleTextBuff2 - strb r2, [r1] - strb r6, [r1, 0x1] - movs r0, 0xD2 - strb r0, [r1, 0x2] - strb r6, [r1, 0x3] - subs r0, 0xD3 - strb r0, [r1, 0x4] - ldr r0, =gEffectBank - strb r7, [r0] - ldr r1, =gBattleScripting - movs r0, 0x11 - strb r0, [r1, 0x1A] - movs r0, 0xF - b _08044DF0 - .pool -_08044C9C: - movs r0, 0x58 - muls r0, r7 - mov r1, r8 - adds r5, r0, r1 - ldrh r4, [r5, 0x28] - ldrh r0, [r5, 0x2C] - mov r1, r9 - bl __divsi3 - cmp r4, r0 - ble _08044CB4 - b _080451D6 -_08044CB4: - cmp r6, 0 - beq _08044CBA - b _080451D6 -_08044CBA: - movs r0, 0x1A - ldrsb r0, [r5, r0] - cmp r0, 0xB - ble _08044CC4 - b _080451D6 -_08044CC4: - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x5 - strb r0, [r1, 0x1] - movs r0, 0x2 - strb r0, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - ldr r0, =gEffectBank - strb r7, [r0] - ldr r1, =gBattleScripting - movs r0, 0x12 - strb r0, [r1, 0x1A] - movs r0, 0x10 - b _08044D8A - .pool -_08044CF0: - movs r0, 0x58 - muls r0, r7 - mov r3, r8 - adds r5, r0, r3 - ldrh r4, [r5, 0x28] - ldrh r0, [r5, 0x2C] - mov r1, r9 - bl __divsi3 - cmp r4, r0 - ble _08044D08 - b _080451D6 -_08044D08: - cmp r6, 0 - beq _08044D0E - b _080451D6 -_08044D0E: - movs r0, 0x1B - ldrsb r0, [r5, r0] - cmp r0, 0xB - ble _08044D18 - b _080451D6 -_08044D18: - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x5 - strb r0, [r1, 0x1] - movs r0, 0x3 - strb r0, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - ldr r0, =gEffectBank - strb r7, [r0] - ldr r1, =gBattleScripting - movs r0, 0x13 - strb r0, [r1, 0x1A] - movs r0, 0x11 - b _08044DF0 - .pool -_08044D44: - movs r0, 0x58 - muls r0, r7 - mov r1, r8 - adds r5, r0, r1 - ldrh r4, [r5, 0x28] - ldrh r0, [r5, 0x2C] - mov r1, r9 - bl __divsi3 - cmp r4, r0 - ble _08044D5C - b _080451D6 -_08044D5C: - cmp r6, 0 - beq _08044D62 - b _080451D6 -_08044D62: - movs r0, 0x1C - ldrsb r0, [r5, r0] - cmp r0, 0xB - ble _08044D6C - b _080451D6 -_08044D6C: - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x5 - strb r0, [r1, 0x1] - movs r0, 0x4 - strb r0, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - ldr r0, =gEffectBank - strb r7, [r0] - ldr r1, =gBattleScripting - movs r0, 0x14 - strb r0, [r1, 0x1A] - movs r0, 0x12 -_08044D8A: - strb r0, [r1, 0x10] - strb r6, [r1, 0x11] - ldr r0, =gUnknown_082DB84E - bl b_call_bc_move_exec - movs r2, 0x5 - str r2, [sp, 0xC] - b _080451DE - .pool -_08044DAC: - movs r0, 0x58 - muls r0, r7 - mov r3, r8 - adds r5, r0, r3 - ldrh r4, [r5, 0x28] - ldrh r0, [r5, 0x2C] - mov r1, r9 - bl __divsi3 - cmp r4, r0 - ble _08044DC4 - b _080451D6 -_08044DC4: - cmp r6, 0 - beq _08044DCA - b _080451D6 -_08044DCA: - movs r0, 0x1D - ldrsb r0, [r5, r0] - cmp r0, 0xB - ble _08044DD4 - b _080451D6 -_08044DD4: - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x5 - strb r0, [r1, 0x1] - strb r0, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - ldr r0, =gEffectBank - strb r7, [r0] - ldr r1, =gBattleScripting - movs r0, 0x15 - strb r0, [r1, 0x1A] - movs r0, 0x13 -_08044DF0: - strb r0, [r1, 0x10] - strb r6, [r1, 0x11] - ldr r0, =gUnknown_082DB84E - bl b_call_bc_move_exec - movs r5, 0x5 - str r5, [sp, 0xC] - b _080451DE - .pool -_08044E10: - movs r0, 0x58 - adds r5, r7, 0 - muls r5, r0 - mov r1, r8 - adds r0, r5, r1 - ldrh r4, [r0, 0x28] - ldrh r0, [r0, 0x2C] - mov r1, r9 - bl __divsi3 - cmp r4, r0 - ble _08044E2A - b _080451D6 -_08044E2A: - cmp r6, 0 - beq _08044E30 - b _080451D6 -_08044E30: - mov r0, r8 - adds r0, 0x50 - adds r1, r5, r0 - ldr r2, [r1] - movs r3, 0x80 - lsls r3, 13 - adds r0, r2, 0 - ands r0, r3 - cmp r0, 0 - beq _08044E46 - b _080451D6 -_08044E46: - orrs r2, r3 - str r2, [r1] - ldr r0, =gUnknown_082DB869 - bl b_call_bc_move_exec - movs r2, 0x2 - str r2, [sp, 0xC] - b _080451DE - .pool -_08044E5C: - cmp r6, 0 - beq _08044E62 - b _080451D6 -_08044E62: - movs r0, 0x58 - adds r5, r7, 0 - muls r5, r0 - mov r3, r8 - adds r0, r5, r3 - ldrh r4, [r0, 0x28] - ldrh r0, [r0, 0x2C] - mov r1, r9 - bl __divsi3 - cmp r4, r0 - ble _08044E7C - b _080451D6 -_08044E7C: - movs r0, 0 - mov r10, r0 - adds r0, r5, 0x1 - mov r1, r8 - adds r1, 0x18 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - cmp r0, 0xB - ble _08044EAC - mov r0, r8 - adds r0, 0x19 - adds r1, r5, r0 -_08044E98: - adds r1, 0x1 - movs r2, 0x1 - add r10, r2 - mov r3, r10 - cmp r3, 0x4 - bgt _08044EAC - movs r0, 0 - ldrsb r0, [r1, r0] - cmp r0, 0xB - bgt _08044E98 -_08044EAC: - mov r5, r10 - cmp r5, 0x5 - bne _08044EB4 - b _080451D6 -_08044EB4: - movs r0, 0x58 - muls r0, r7 - adds r4, r0, 0x1 - ldr r5, =gBattleMons + 0x18 -_08044EBC: - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x5 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - mov r10, r0 - adds r0, r4 - adds r0, r5 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - cmp r0, 0xC - beq _08044EBC - ldr r1, =gBattleTextBuff1 - movs r2, 0 - movs r3, 0xFD - strb r3, [r1] - movs r0, 0x5 - strb r0, [r1, 0x1] - mov r0, r10 - adds r0, 0x1 - strb r0, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - ldr r0, =gBattleTextBuff2 - strb r3, [r0] - strb r2, [r0, 0x1] - movs r1, 0xD1 - strb r1, [r0, 0x2] - strb r2, [r0, 0x3] - strb r2, [r0, 0x4] - movs r1, 0xD2 - strb r1, [r0, 0x5] - strb r2, [r0, 0x6] - subs r1, 0xD3 - strb r1, [r0, 0x7] - ldr r0, =gEffectBank - strb r7, [r0] - ldr r1, =gBattleScripting - mov r0, r10 - adds r0, 0x21 - strb r0, [r1, 0x1A] - adds r0, 0x6 - strb r0, [r1, 0x10] - strb r2, [r1, 0x11] - ldr r0, =gUnknown_082DB84E - bl b_call_bc_move_exec - movs r0, 0x5 - str r0, [sp, 0xC] - b _080451DE - .pool -_08044F44: - movs r0, 0x58 - adds r1, r7, 0 - muls r1, r0 - mov r0, r8 - adds r0, 0x4C - adds r1, r0 - ldr r2, [r1] - movs r0, 0x40 - ands r0, r2 - cmp r0, 0 - bne _08044F5C - b _080451D6 -_08044F5C: - movs r0, 0x41 - negs r0, r0 - ands r2, r0 - str r2, [r1] - ldr r0, =gUnknown_082DB706 - bl b_call_bc_move_exec - movs r1, 0x1 - str r1, [sp, 0xC] - b _080451DE - .pool -_08044F74: - movs r0, 0x58 - adds r1, r7, 0 - muls r1, r0 - mov r0, r8 - adds r0, 0x4C - adds r1, r0 - ldr r2, [r1] - movs r0, 0x88 - ands r0, r2 - cmp r0, 0 - bne _08044F8C - b _080451D6 -_08044F8C: - ldr r0, =0xfffff077 - ands r2, r0 - str r2, [r1] - ldr r0, =gUnknown_082DB71E - bl b_call_bc_move_exec - movs r2, 0x1 - str r2, [sp, 0xC] - b _080451DE - .pool -_08044FA8: - movs r0, 0x58 - adds r1, r7, 0 - muls r1, r0 - mov r0, r8 - adds r0, 0x4C - adds r1, r0 - ldr r2, [r1] - movs r0, 0x10 - ands r0, r2 - cmp r0, 0 - bne _08044FC0 - b _080451D6 -_08044FC0: - movs r0, 0x11 - negs r0, r0 - ands r2, r0 - str r2, [r1] - ldr r0, =gUnknown_082DB736 - bl b_call_bc_move_exec - movs r3, 0x1 - str r3, [sp, 0xC] - b _080451DE - .pool -_08044FD8: - movs r0, 0x58 - adds r1, r7, 0 - muls r1, r0 - mov r0, r8 - adds r0, 0x4C - adds r1, r0 - ldr r2, [r1] - movs r0, 0x20 - ands r0, r2 - cmp r0, 0 - bne _08044FF0 - b _080451D6 -_08044FF0: - movs r0, 0x21 - negs r0, r0 - ands r2, r0 - str r2, [r1] - ldr r0, =gUnknown_082DB74E - bl b_call_bc_move_exec - movs r5, 0x1 - str r5, [sp, 0xC] - b _080451DE - .pool -_08045008: - movs r0, 0x58 - adds r3, r7, 0 - muls r3, r0 - mov r0, r8 - adds r0, 0x4C - adds r2, r3, r0 - ldr r1, [r2] - movs r0, 0x7 - ands r0, r1 - cmp r0, 0 - bne _08045020 - b _080451D6 -_08045020: - movs r0, 0x8 - negs r0, r0 - ands r1, r0 - str r1, [r2] - mov r1, r8 - adds r1, 0x50 - adds r1, r3, r1 - ldr r0, [r1] - ldr r2, =0xf7ffffff - ands r0, r2 - str r0, [r1] - ldr r0, =gUnknown_082DB766 - b _0804518A - .pool -_08045044: - movs r0, 0x58 - adds r1, r7, 0 - muls r1, r0 - mov r0, r8 - adds r0, 0x50 - adds r1, r0 - ldr r2, [r1] - movs r0, 0x7 - ands r0, r2 - cmp r0, 0 - bne _0804505C - b _080451D6 -_0804505C: - movs r0, 0x8 - negs r0, r0 - ands r2, r0 - str r2, [r1] - ldr r0, =gUnknown_082DB77E - bl b_call_bc_move_exec - movs r1, 0x2 - str r1, [sp, 0xC] - b _080451DE - .pool -_08045074: - movs r0, 0x58 - adds r5, r7, 0 - muls r5, r0 - mov r0, r8 - adds r0, 0x4C - adds r4, r5, r0 - ldr r2, [r4] - ldrb r0, [r4] - cmp r0, 0 - bne _0804509A - mov r0, r8 - adds r0, 0x50 - adds r0, r5, r0 - ldr r0, [r0] - movs r1, 0x7 - ands r0, r1 - cmp r0, 0 - bne _0804509A - b _080451D6 -_0804509A: - movs r3, 0 - mov r10, r3 - movs r0, 0x88 - ands r2, r0 - cmp r2, 0 - beq _080450B2 - ldr r0, =gBattleTextBuff1 - ldr r1, =gStatusConditionString_PoisonJpn - bl StringCopy - movs r0, 0x1 - mov r10, r0 -_080450B2: - ldr r0, [r4] - movs r1, 0x7 - mov r9, r1 - ands r0, r1 - mov r6, r8 - adds r6, 0x50 - cmp r0, 0 - beq _080450D8 - adds r2, r5, r6 - ldr r0, [r2] - ldr r1, =0xf7ffffff - ands r0, r1 - str r0, [r2] - ldr r0, =gBattleTextBuff1 - ldr r1, =gStatusConditionString_SleepJpn - bl StringCopy - movs r2, 0x1 - add r10, r2 -_080450D8: - ldr r0, [r4] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - beq _080450EE - ldr r0, =gBattleTextBuff1 - ldr r1, =gStatusConditionString_ParalysisJpn - bl StringCopy - movs r3, 0x1 - add r10, r3 -_080450EE: - ldr r0, [r4] - movs r1, 0x10 - ands r0, r1 - cmp r0, 0 - beq _08045104 - ldr r0, =gBattleTextBuff1 - ldr r1, =gStatusConditionString_BurnJpn - bl StringCopy - movs r0, 0x1 - add r10, r0 -_08045104: - ldr r0, [r4] - movs r1, 0x20 - ands r0, r1 - cmp r0, 0 - beq _0804511A - ldr r0, =gBattleTextBuff1 - ldr r1, =gStatusConditionString_IceJpn - bl StringCopy - movs r1, 0x1 - add r10, r1 -_0804511A: - adds r0, r5, r6 - ldr r0, [r0] - mov r2, r9 - ands r0, r2 - cmp r0, 0 - beq _08045132 - ldr r0, =gBattleTextBuff1 - ldr r1, =gStatusConditionString_ConfusionJpn - bl StringCopy - movs r3, 0x1 - add r10, r3 -_08045132: - mov r5, r10 - cmp r5, 0x1 - bgt _08045164 - ldr r1, =gBattleCommunication - movs r0, 0 - b _08045168 - .pool -_08045164: - ldr r1, =gBattleCommunication - movs r0, 0x1 -_08045168: - strb r0, [r1, 0x5] - ldr r2, =gBattleMons - movs r0, 0x58 - adds r3, r7, 0 - muls r3, r0 - adds r0, r2, 0 - adds r0, 0x4C - adds r0, r3, r0 - movs r1, 0 - str r1, [r0] - adds r2, 0x50 - adds r3, r2 - ldr r0, [r3] - subs r1, 0x8 - ands r0, r1 - str r0, [r3] - ldr r0, =gUnknown_082DB794 -_0804518A: - bl b_call_bc_move_exec - movs r0, 0x1 - str r0, [sp, 0xC] - b _080451DE - .pool -_080451A0: - movs r0, 0x58 - adds r1, r7, 0 - muls r1, r0 - mov r0, r8 - adds r0, 0x50 - adds r1, r0 - ldr r2, [r1] - movs r0, 0xF0 - lsls r0, 12 - ands r0, r2 - cmp r0, 0 - beq _080451D6 - ldr r0, =0xfff0ffff - ands r2, r0 - str r2, [r1] - ldr r0, =gBattleTextBuff1 - ldr r1, =gStatusConditionString_LoveJpn - bl StringCopy - ldr r0, =gUnknown_082DB794 - bl b_call_bc_move_exec - ldr r1, =gBattleCommunication - movs r0, 0 - strb r0, [r1, 0x5] - movs r1, 0x2 - str r1, [sp, 0xC] -_080451D6: - ldr r2, [sp, 0xC] - cmp r2, 0 - bne _080451DE - b _0804582A -_080451DE: - ldr r0, =gBattleScripting - strb r7, [r0, 0x17] - ldr r0, =gStringBank - strb r7, [r0] - ldr r4, =gActiveBank - ldr r0, =gBankAttacker - strb r7, [r0] - strb r7, [r4] - ldr r3, [sp, 0xC] - cmp r3, 0x1 - beq _08045220 - cmp r3, 0x3 - beq _08045226 - b _0804582A - .pool -_08045220: - movs r0, 0x58 - muls r0, r7 - b _0804568C -_08045226: - ldr r4, =gBattleMons - movs r0, 0x58 - adds r3, r7, 0 - muls r3, r0 - adds r0, r4, 0 - adds r0, 0x50 - adds r0, r3, r0 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 14 - ands r0, r1 - cmp r0, 0 - beq _08045242 - b _0804582A -_08045242: - ldr r1, =gDisableStructs - lsls r0, r7, 3 - subs r0, r7 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x18] - lsrs r1, 4 - ldr r2, =gBitTable - mov r5, r10 - lsls r0, r5, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _08045262 - b _0804582A -_08045262: - adds r1, r5, r3 - adds r0, r4, 0 - adds r0, 0x24 - adds r1, r0 - add r0, sp, 0x4 - ldrb r0, [r0] - strb r0, [r1] - b _0804582A - .pool -_08045280: - movs r7, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r7, r0 - bcc _0804528C - b _0804582A -_0804528C: - ldr r4, =gLastUsedItem - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r7 - adds r0, r1 - ldrh r0, [r0, 0x2E] - strh r0, [r4] - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0xAF - bne _080452C0 - ldr r1, =gEnigmaBerries - lsls r0, r7, 3 - subs r0, r7 - lsls r0, 2 - adds r0, r1 - ldrb r5, [r0, 0x7] - b _080452D0 - .pool -_080452C0: - ldrh r0, [r4] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r5, r0, 24 - ldrh r0, [r4] - bl ItemId_GetHoldEffectParam -_080452D0: - subs r0, r5, 0x2 - cmp r0, 0x1A - bls _080452D8 - b _08045674 -_080452D8: - lsls r0, 2 - ldr r1, =_080452E8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_080452E8: - .4byte _08045354 - .4byte _08045444 - .4byte _08045390 - .4byte _080453CC - .4byte _08045408 - .4byte _08045674 - .4byte _0804548C - .4byte _08045520 - .4byte _08045674 - .4byte _08045674 - .4byte _08045674 - .4byte _08045674 - .4byte _08045674 - .4byte _08045674 - .4byte _08045674 - .4byte _08045674 - .4byte _08045674 - .4byte _08045674 - .4byte _08045674 - .4byte _08045674 - .4byte _08045674 - .4byte _08045614 - .4byte _08045674 - .4byte _08045674 - .4byte _08045674 - .4byte _08045674 - .4byte _080454C8 -_08045354: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r7 - adds r1, 0x4C - adds r2, r0, r1 - ldr r1, [r2] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - bne _0804536A - b _08045674 -_0804536A: - movs r0, 0x41 - negs r0, r0 - ands r1, r0 - str r1, [r2] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB70C - str r0, [r1] - movs r0, 0x1 - str r0, [sp, 0xC] - b _0804567A - .pool -_08045390: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r7 - adds r1, 0x4C - adds r2, r0, r1 - ldr r1, [r2] - movs r0, 0x88 - ands r0, r1 - cmp r0, 0 - bne _080453A6 - b _08045674 -_080453A6: - ldr r0, =0xfffff077 - ands r1, r0 - str r1, [r2] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB724 - str r0, [r1] - movs r1, 0x1 - str r1, [sp, 0xC] - b _0804567A - .pool -_080453CC: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r7 - adds r1, 0x4C - adds r2, r0, r1 - ldr r1, [r2] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - bne _080453E2 - b _08045674 -_080453E2: - movs r0, 0x11 - negs r0, r0 - ands r1, r0 - str r1, [r2] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB73C - str r0, [r1] - movs r2, 0x1 - str r2, [sp, 0xC] - b _0804567A - .pool -_08045408: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r7 - adds r1, 0x4C - adds r2, r0, r1 - ldr r1, [r2] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - bne _0804541E - b _08045674 -_0804541E: - movs r0, 0x21 - negs r0, r0 - ands r1, r0 - str r1, [r2] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB754 - str r0, [r1] - movs r3, 0x1 - str r3, [sp, 0xC] - b _0804567A - .pool -_08045444: - ldr r2, =gBattleMons - movs r0, 0x58 - adds r4, r7, 0 - muls r4, r0 - adds r0, r2, 0 - adds r0, 0x4C - adds r3, r4, r0 - ldr r1, [r3] - movs r0, 0x7 - ands r0, r1 - cmp r0, 0 - bne _0804545E - b _08045674 -_0804545E: - movs r0, 0x8 - negs r0, r0 - ands r1, r0 - str r1, [r3] - adds r2, 0x50 - adds r2, r4, r2 - ldr r0, [r2] - ldr r1, =0xf7ffffff - ands r0, r1 - str r0, [r2] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB76C - b _080455DC - .pool -_0804548C: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r7 - adds r1, 0x50 - adds r2, r0, r1 - ldr r1, [r2] - movs r0, 0x7 - ands r0, r1 - cmp r0, 0 - bne _080454A2 - b _08045674 -_080454A2: - movs r0, 0x8 - negs r0, r0 - ands r1, r0 - str r1, [r2] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB784 - str r0, [r1] - movs r0, 0x2 - str r0, [sp, 0xC] - b _0804567A - .pool -_080454C8: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r7 - adds r1, 0x50 - adds r2, r0, r1 - ldr r1, [r2] - movs r0, 0xF0 - lsls r0, 12 - ands r0, r1 - cmp r0, 0 - bne _080454E0 - b _08045674 -_080454E0: - ldr r0, =0xfff0ffff - ands r1, r0 - str r1, [r2] - ldr r0, =gBattleTextBuff1 - ldr r1, =gStatusConditionString_LoveJpn - bl StringCopy - bl b_movescr_stack_push_cursor - ldr r1, =gBattleCommunication - movs r0, 0 - strb r0, [r1, 0x5] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB79A - str r0, [r1] - movs r1, 0x2 - str r1, [sp, 0xC] - b _0804567A - .pool -_08045520: - ldr r4, =gBattleMons - movs r0, 0x58 - adds r5, r7, 0 - muls r5, r0 - adds r0, r4, 0 - adds r0, 0x4C - adds r6, r5, r0 - ldr r2, [r6] - ldrb r0, [r6] - cmp r0, 0 - bne _08045548 - adds r0, r4, 0 - adds r0, 0x50 - adds r0, r5, r0 - ldr r0, [r0] - movs r1, 0x7 - ands r0, r1 - cmp r0, 0 - bne _08045548 - b _08045674 -_08045548: - movs r0, 0x88 - ands r2, r0 - cmp r2, 0 - beq _08045558 - ldr r0, =gBattleTextBuff1 - ldr r1, =gStatusConditionString_PoisonJpn - bl StringCopy -_08045558: - ldr r0, [r6] - movs r2, 0x7 - mov r8, r2 - ands r0, r2 - adds r4, 0x50 - cmp r0, 0 - beq _08045578 - adds r2, r5, r4 - ldr r0, [r2] - ldr r1, =0xf7ffffff - ands r0, r1 - str r0, [r2] - ldr r0, =gBattleTextBuff1 - ldr r1, =gStatusConditionString_SleepJpn - bl StringCopy -_08045578: - ldr r0, [r6] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0804558A - ldr r0, =gBattleTextBuff1 - ldr r1, =gStatusConditionString_ParalysisJpn - bl StringCopy -_0804558A: - ldr r0, [r6] - movs r1, 0x10 - ands r0, r1 - cmp r0, 0 - beq _0804559C - ldr r0, =gBattleTextBuff1 - ldr r1, =gStatusConditionString_BurnJpn - bl StringCopy -_0804559C: - ldr r0, [r6] - movs r1, 0x20 - ands r0, r1 - cmp r0, 0 - beq _080455AE - ldr r0, =gBattleTextBuff1 - ldr r1, =gStatusConditionString_IceJpn - bl StringCopy -_080455AE: - adds r5, r4 - ldr r0, [r5] - mov r3, r8 - ands r0, r3 - cmp r0, 0 - beq _080455C2 - ldr r0, =gBattleTextBuff1 - ldr r1, =gStatusConditionString_ConfusionJpn - bl StringCopy -_080455C2: - movs r4, 0 - str r4, [r6] - ldr r0, [r5] - movs r1, 0x8 - negs r1, r1 - ands r0, r1 - str r0, [r5] - bl b_movescr_stack_push_cursor - ldr r0, =gBattleCommunication - strb r4, [r0, 0x5] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB79A -_080455DC: - str r0, [r1] - movs r5, 0x1 - str r5, [sp, 0xC] - b _0804567A - .pool -_08045614: - ldr r0, =gBattleMons - mov r8, r0 - movs r0, 0x58 - adds r1, r7, 0 - muls r1, r0 - mov r0, r8 - adds r0, 0x18 - adds r1, r0 - movs r2, 0x6 - movs r3, 0x7 - mov r10, r3 -_0804562A: - movs r0, 0 - ldrsb r0, [r1, r0] - cmp r0, 0x5 - bgt _08045638 - strb r2, [r1] - movs r5, 0x5 - str r5, [sp, 0xC] -_08045638: - adds r1, 0x1 - movs r0, 0x1 - negs r0, r0 - add r10, r0 - mov r3, r10 - cmp r3, 0 - bge _0804562A - ldr r5, [sp, 0xC] - cmp r5, 0 - beq _080456B8 - ldr r0, =gBattleScripting - strb r7, [r0, 0x17] - ldr r0, =gStringBank - strb r7, [r0] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB7B4 - str r0, [r1] - b _0804582A - .pool -_08045674: - ldr r0, [sp, 0xC] - cmp r0, 0 - beq _080456B8 -_0804567A: - ldr r0, =gBattleScripting - strb r7, [r0, 0x17] - ldr r0, =gStringBank - strb r7, [r0] - ldr r4, =gActiveBank - strb r7, [r4] - ldrb r1, [r4] - movs r0, 0x58 - muls r0, r1 -_0804568C: - ldr r1, =gBattleMons + 0x4C - adds r0, r1 - str r0, [sp] - movs r0, 0 - movs r1, 0x28 - movs r2, 0 - movs r3, 0x4 - bl EmitSetAttributes - ldrb r0, [r4] - bl MarkBufferBankForExecution - b _0804582A - .pool -_080456B8: - adds r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r7, r0 - bcs _080456C8 - b _0804528C -_080456C8: - b _0804582A - .pool -_080456D0: - ldr r7, =gBattleMoveDamage - ldr r0, [r7] - cmp r0, 0 - bne _080456DA - b _0804582A -_080456DA: - mov r1, r8 - cmp r1, 0x1E - beq _080456EC - cmp r1, 0x3E - beq _08045794 - b _0804582A - .pool -_080456EC: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _080456FA - b _0804582A -_080456FA: - ldr r2, =gSpecialStatuses - ldr r4, =gBankTarget - ldrb r1, [r4] - lsls r0, r1, 2 - adds r0, r1 - lsls r1, r0, 2 - adds r0, r2, 0 - adds r0, 0x8 - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _08045720 - adds r0, r2, 0 - adds r0, 0xC - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _08045720 - b _0804582A -_08045720: - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x64 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - ldr r2, [sp, 0x10] - cmp r0, r2 - bcs _0804582A - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0, 0x8] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _0804582A - ldr r2, =gBattleMons - ldrb r1, [r4] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _0804582A - ldr r1, =gBattleCommunication - movs r0, 0x8 - strb r0, [r1, 0x3] - bl b_movescr_stack_push_cursor - movs r0, 0 - movs r1, 0 - bl SetMoveEffect - bl b_movescr_stack_pop_cursor - b _0804582A - .pool -_08045794: - ldr r0, =gBattleMoveFlags - ldrb r0, [r0] - movs r5, 0x29 - ands r5, r0 - cmp r5, 0 - bne _0804582A - ldr r1, =gSpecialStatuses - ldr r4, =gBankTarget - ldrb r2, [r4] - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 2 - adds r6, r1, 0x4 - adds r0, r6 - ldr r1, [r0] - cmp r1, 0 - beq _0804582A - ldr r0, =0x0000ffff - cmp r1, r0 - beq _0804582A - ldr r0, =gBankAttacker - ldrb r3, [r0] - cmp r3, r2 - beq _0804582A - ldr r2, =gBattleMons - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r1, [r0, 0x28] - ldrh r0, [r0, 0x2C] - cmp r1, r0 - beq _0804582A - cmp r1, 0 - beq _0804582A - ldr r0, =gLastUsedItem - mov r1, sp - ldrh r1, [r1, 0x14] - strh r1, [r0] - ldr r0, =gStringBank - strb r3, [r0] - ldr r0, =gBattleScripting - strb r3, [r0, 0x17] - ldrb r1, [r4] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - ldr r1, [sp, 0x10] - bl __divsi3 - negs r0, r0 - str r0, [r7] - ldrb r1, [r4] - cmp r0, 0 - bne _0804580C - movs r0, 0x1 - negs r0, r0 - str r0, [r7] -_0804580C: - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - str r5, [r0] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB7F7 - str r0, [r1] - ldr r0, [sp, 0xC] - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - str r0, [sp, 0xC] -_0804582A: - ldr r0, [sp, 0xC] - add sp, 0x2C - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end ItemBattleEffects - - thumb_func_start sub_8045868 -sub_8045868: @ 8045868 - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gDisableStructs - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r1, r2 - movs r2, 0 - strb r2, [r1, 0x10] - ldr r1, =gBattleMons - movs r2, 0x58 - adds r3, r0, 0 - muls r3, r2 - adds r1, 0x50 - adds r3, r1 - ldr r1, [r3] - ldr r2, =0xfdffffff - ands r1, r2 - str r1, [r3] - ldr r1, =gStatuses3 - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - ldr r2, =0xffffbfff - ands r1, r2 - str r1, [r0] - bx lr - .pool - thumb_func_end sub_8045868 - - thumb_func_start sub_80458B4 -sub_80458B4: @ 80458B4 - push {lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _080458D0 - ldr r1, =gBattleScriptingCommandsTable - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - bl _call_via_r0 -_080458D0: - pop {r0} - bx r0 - .pool - thumb_func_end sub_80458B4 - - thumb_func_start GetMoveTarget -GetMoveTarget: @ 80458E0 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - lsls r0, 16 - lsrs r7, r0, 16 - lsls r1, 24 - lsrs r0, r1, 24 - movs r5, 0 - cmp r0, 0 - beq _080458FE - subs r0, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - b _0804590A -_080458FE: - ldr r1, =gBattleMoves - lsls r0, r7, 1 - adds r0, r7 - lsls r0, 2 - adds r0, r1 - ldrb r6, [r0, 0x6] -_0804590A: - cmp r6, 0x40 - bls _08045910 - b _08045C20 -_08045910: - lsls r0, r6, 2 - ldr r1, =_08045924 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08045924: - .4byte _08045A28 - .4byte _08045B28 - .4byte _08045C1C - .4byte _08045C20 - .4byte _08045B40 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045B28 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C1C - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045B28 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045C20 - .4byte _08045B28 -_08045A28: - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankSide - movs r1, 0x1 - eors r0, r1 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gSideTimers - lsls r0, r4, 1 - adds r0, r4 - lsls r0, 2 - adds r2, r0, r1 - ldrb r0, [r2, 0x8] - cmp r0, 0 - beq _08045A5A - ldr r1, =gBattleMons - ldrb r4, [r2, 0x9] - movs r0, 0x58 - muls r0, r4 - adds r0, r1 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _08045A5A - b _08045B70 -_08045A5A: - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - lsrs r4, r0, 24 - lsls r0, r7, 1 - mov r8, r0 -_08045A6A: - bl Random - lsls r0, 16 - lsrs r0, 16 - ldr r1, =gNoOfAllBanks - ldrb r1, [r1] - bl __modsi3 - lsls r0, 24 - lsrs r5, r0, 24 - ldr r6, =gBankAttacker - ldrb r3, [r6] - cmp r5, r3 - beq _08045A6A - adds r0, r5, 0 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r4, r0 - beq _08045A6A - ldr r0, =gAbsentBankFlags - ldrb r2, [r0] - ldr r1, =gBitTable - lsls r0, r5, 2 - adds r0, r1 - ldr r0, [r0] - ands r2, r0 - cmp r2, 0 - bne _08045A6A - ldr r0, =gBattleMoves - mov r3, r8 - adds r1, r3, r7 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x2] - cmp r0, 0xD - beq _08045AB8 - b _08045C20 -_08045AB8: - ldrb r1, [r6] - str r2, [sp] - movs r0, 0x10 - movs r2, 0x1F - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _08045ACE - b _08045C20 -_08045ACE: - ldr r2, =gBattleMons - movs r1, 0x58 - adds r0, r5, 0 - muls r0, r1 - adds r0, r2 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x1F - bne _08045AE2 - b _08045C20 -_08045AE2: - movs r4, 0x2 - eors r5, r4 - adds r0, r5, 0 - muls r0, r1 - adds r0, r2 - adds r0, 0x20 - ldrb r1, [r0] - adds r0, r5, 0 - bl RecordAbilityBattle - ldr r1, =gSpecialStatuses - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0] - orrs r1, r4 - strb r1, [r0] - b _08045C20 - .pool -_08045B28: - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankIdentity - adds r1, r0, 0 - movs r2, 0x1 - movs r0, 0x1 - ands r0, r1 - eors r0, r2 - b _08045BD2 - .pool -_08045B40: - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankSide - movs r1, 0x1 - eors r0, r1 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gSideTimers - lsls r0, r4, 1 - adds r0, r4 - lsls r0, 2 - adds r2, r0, r1 - ldrb r0, [r2, 0x8] - cmp r0, 0 - beq _08045B80 - ldr r1, =gBattleMons - ldrb r4, [r2, 0x9] - movs r0, 0x58 - muls r0, r4 - adds r0, r1 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _08045B80 -_08045B70: - adds r5, r4, 0 - b _08045C20 - .pool -_08045B80: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r4, 0x1 - ands r0, r4 - cmp r0, 0 - beq _08045BFC - movs r0, 0x4 - ands r6, r0 - cmp r6, 0 - beq _08045BFC - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _08045BC0 - bl Random - adds r1, r4, 0 - ands r1, r0 - cmp r1, 0 - beq _08045BBC - movs r0, 0x1 - b _08045BD2 - .pool -_08045BBC: - movs r0, 0x3 - b _08045BD2 -_08045BC0: - bl Random - adds r1, r4, 0 - ands r1, r0 - cmp r1, 0 - beq _08045BD0 - movs r0, 0 - b _08045BD2 -_08045BD0: - movs r0, 0x2 -_08045BD2: - bl GetBankByPlayerAI - lsls r0, 24 - lsrs r5, r0, 24 - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r2, =gBitTable - lsls r0, r5, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _08045C20 - movs r0, 0x2 - eors r5, r0 - b _08045C20 - .pool -_08045BFC: - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankIdentity - adds r1, r0, 0 - movs r2, 0x1 - movs r0, 0x1 - ands r0, r1 - eors r0, r2 - bl GetBankByPlayerAI - lsls r0, 24 - lsrs r5, r0, 24 - b _08045C20 - .pool -_08045C1C: - ldr r0, =gBankAttacker - ldrb r5, [r0] -_08045C20: - ldr r0, =gBankAttacker - ldrb r0, [r0] - ldr r1, =gBattleStruct - ldr r1, [r1] - adds r0, r1 - strb r5, [r0, 0xC] - adds r0, r5, 0 - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end GetMoveTarget - - thumb_func_start sub_8045C44 -sub_8045C44: @ 8045C44 - push {r4-r7,lr} - lsls r0, 24 - lsrs r4, r0, 24 - adds r0, r4, 0 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _08045C8A - ldr r0, =gBattlePartyID - lsls r4, 1 - adds r5, r4, r0 - ldrh r0, [r5] - movs r7, 0x64 - muls r0, r7 - ldr r6, =gPlayerParty - adds r0, r6 - movs r1, 0xB - movs r2, 0 - bl GetMonData - movs r1, 0xCD - lsls r1, 1 - cmp r0, r1 - beq _08045C98 - ldrh r0, [r5] - muls r0, r7 - adds r0, r6 - movs r1, 0xB - movs r2, 0 - bl GetMonData - cmp r0, 0x97 - beq _08045C98 -_08045C8A: - movs r0, 0x1 - b _08045CAE - .pool -_08045C98: - ldr r0, =gBattlePartyID - adds r0, r4, r0 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x50 - movs r2, 0 - bl GetMonData -_08045CAE: - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8045C44 - - thumb_func_start sub_8045CBC -sub_8045CBC: @ 8045CBC - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x10 - movs r6, 0 - ldr r5, =gBattleTypeFlags - ldr r0, [r5] - ldr r1, =0x02000002 - ands r0, r1 - cmp r0, 0 - bne _08045DAC - ldr r4, =gBankAttacker - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _08045DAC - ldrb r0, [r4] - bl sub_8045C44 - cmp r0, 0 - beq _08045D76 - ldr r0, [r5] - movs r1, 0x80 - lsls r1, 15 - ands r0, r1 - cmp r0, 0 - beq _08045D08 - ldrb r0, [r4] - bl GetBankIdentity - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - beq _08045DAC -_08045D08: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - ldr r0, =0x003f0100 - ands r0, r1 - cmp r0, 0 - bne _08045DAC - movs r0, 0x80 - lsls r0, 17 - ands r1, r0 - cmp r1, 0 - bne _08045DAC - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r1, r0 - adds r0, r2, 0 - adds r0, 0x54 - adds r0, r1, r0 - ldr r0, [r0] - adds r2, 0x3C - adds r1, r2 - bl IsOtherTrainer - lsls r0, 24 - cmp r0, 0 - beq _08045DAC - ldr r0, =0x0000086e - bl FlagGet - lsls r0, 24 - cmp r0, 0 - bne _08045DAC - movs r6, 0xA - ldr r0, =0x00000868 - bl FlagGet - lsls r0, 24 - cmp r0, 0 - beq _08045D5A - movs r6, 0x1E -_08045D5A: - ldr r0, =0x0000086a - bl FlagGet - lsls r0, 24 - cmp r0, 0 - beq _08045D68 - movs r6, 0x32 -_08045D68: - ldr r0, =0x0000086c - bl FlagGet - lsls r0, 24 - cmp r0, 0 - beq _08045D76 - movs r6, 0x46 -_08045D76: - ldr r5, =gBattleMons - ldr r0, =gBankAttacker - mov r8, r0 - ldrb r0, [r0] - movs r7, 0x58 - muls r0, r7 - adds r0, r5 - adds r0, 0x2A - ldrb r0, [r0] - cmp r0, r6 - bls _08045DAC - bl Random - movs r1, 0xFF - ands r1, r0 - mov r2, r8 - ldrb r0, [r2] - adds r2, r0, 0 - muls r2, r7 - adds r0, r2, r5 - adds r0, 0x2A - ldrb r0, [r0] - adds r0, r6 - muls r0, r1 - asrs r4, r0, 8 - cmp r4, r6 - bge _08045DD4 -_08045DAC: - movs r0, 0 - b _08045FD0 - .pool -_08045DD4: - ldr r3, =gCurrentMove - ldrh r0, [r3] - cmp r0, 0x63 - bne _08045DEA - adds r0, r5, 0 - adds r0, 0x50 - adds r0, r2, r0 - ldr r1, [r0] - ldr r2, =0xff7fffff - ands r1, r2 - str r1, [r0] -_08045DEA: - mov r1, r8 - ldrb r0, [r1] - muls r0, r7 - adds r1, r5, 0 - adds r1, 0x4C - adds r0, r1 - ldr r0, [r0] - movs r1, 0x7 - ands r0, r1 - cmp r0, 0 - beq _08045E20 - ldrh r0, [r3] - cmp r0, 0xAD - beq _08045E0A - cmp r0, 0xD6 - bne _08045E20 -_08045E0A: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB695 - b _08045F7A - .pool -_08045E20: - bl Random - movs r5, 0xFF - adds r1, r5, 0 - ands r1, r0 - ldr r7, =gBattleMons - ldr r2, =gBankAttacker - mov r9, r2 - ldrb r3, [r2] - movs r0, 0x58 - mov r8, r0 - mov r0, r8 - muls r0, r3 - adds r0, r7 - adds r0, 0x2A - ldrb r2, [r0] - adds r0, r2, r6 - muls r0, r1 - asrs r4, r0, 8 - cmp r4, r6 - bge _08045EE8 - ldr r6, =gBitTable - ldr r5, =gCurrMovePos - ldrb r0, [r5] - lsls r0, 2 - adds r0, r6 - ldrb r1, [r0] - adds r0, r3, 0 - movs r2, 0xFF - bl CheckMoveLimitations - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0xF - bne _08045E68 - b _08045F6A -_08045E68: - ldr r1, =gUnknown_020241E9 - mov r8, r1 - movs r7, 0x3 -_08045E6E: - bl Random - ands r0, r7 - mov r2, r8 - strb r0, [r2] - strb r0, [r5] - ldrb r0, [r5] - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - ands r0, r4 - cmp r0, 0 - bne _08045E6E - ldr r4, =gRandomMove - ldr r3, =gBattleMons - ldr r0, =gCurrMovePos - ldrb r0, [r0] - lsls r0, 1 - ldr r1, =gBankAttacker - ldrb r2, [r1] - movs r1, 0x58 - muls r1, r2 - adds r0, r1 - adds r3, 0xC - adds r0, r3 - ldrh r0, [r0] - strh r0, [r4] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB6A5 - str r0, [r1] - ldrh r0, [r4] - movs r1, 0 - bl GetMoveTarget - ldr r1, =gBankTarget - strb r0, [r1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 14 - b _08045FCA - .pool -_08045EE8: - subs r0, r2, r6 - lsls r0, 24 - lsrs r6, r0, 24 - bl Random - adds r4, r5, 0 - ands r4, r0 - cmp r4, r6 - bge _08045F64 - mov r1, r9 - ldrb r0, [r1] - mov r1, r8 - muls r1, r0 - adds r0, r7, 0 - adds r0, 0x4C - adds r0, r1, r0 - ldr r0, [r0] - ands r0, r5 - cmp r0, 0 - bne _08045F64 - adds r0, r1, r7 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x48 - beq _08045F64 - cmp r0, 0xF - beq _08045F64 - movs r2, 0 - ldr r0, =gNoOfAllBanks - ldrb r3, [r0] - mov r8, r0 - cmp r2, r3 - bge _08045F4A - ldr r0, [r7, 0x50] - movs r1, 0x70 - ands r0, r1 - cmp r0, 0 - bne _08045F4A - adds r1, r7, 0 - adds r1, 0x50 - movs r5, 0x70 -_08045F3A: - adds r1, 0x58 - adds r2, 0x1 - cmp r2, r3 - bge _08045F4A - ldr r0, [r1] - ands r0, r5 - cmp r0, 0 - beq _08045F3A -_08045F4A: - mov r0, r8 - ldrb r0, [r0] - cmp r2, r0 - bne _08045F64 - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB6D9 - b _08045F7A - .pool -_08045F64: - subs r4, r6 - cmp r4, r6 - blt _08045F8C -_08045F6A: - bl Random - ldr r2, =gBattleCommunication - movs r1, 0x3 - ands r1, r0 - strb r1, [r2, 0x5] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =BattleScript_MoveUsedLoafingAround -_08045F7A: - str r0, [r1] - movs r0, 0x1 - b _08045FD0 - .pool -_08045F8C: - ldr r4, =gBankAttacker - ldrb r1, [r4] - movs r0, 0x58 - muls r1, r0 - ldr r0, =gBattleMons - adds r1, r0 - movs r0, 0x28 - str r0, [sp] - movs r0, 0 - str r0, [sp, 0x4] - ldrb r0, [r4] - str r0, [sp, 0x8] - ldrb r0, [r4] - str r0, [sp, 0xC] - adds r0, r1, 0 - movs r2, 0x1 - movs r3, 0 - bl CalculateBaseDamage - ldr r1, =gBattleMoveDamage - str r0, [r1] - ldr r1, =gBankTarget - ldrb r0, [r4] - strb r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB6F0 - str r0, [r1] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 12 -_08045FCA: - orrs r0, r1 - str r0, [r2] - movs r0, 0x2 -_08045FD0: - add sp, 0x10 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8045CBC - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/battle_4.s b/asm/battle_4.s index 094bf868e..6580e45b0 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -132,7 +132,7 @@ _08046108: ands r0, r1 cmp r0, 0 bne _08046160 - bl sub_8045CBC + bl IsPokeDisobedient lsls r0, 24 lsrs r2, r0, 24 cmp r2, 0 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 73b2d2cb9..ca599631c 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -453,64 +453,64 @@ gUnknown_082DB6F0:: @ 82DB6F0 gUnknown_082DB6FB:: @ 82DB6FB .incbin "baserom.gba", 0x2db6fb, 0xb -gUnknown_082DB706:: @ 82DB706 +BattleScript_BerryCurePrlzEnd2:: @ 82DB706 .incbin "baserom.gba", 0x2db706, 0x6 -gUnknown_082DB70C:: @ 82DB70C +BattleScript_BerryCureParRet:: @ 82DB70C .incbin "baserom.gba", 0x2db70c, 0x12 -gUnknown_082DB71E:: @ 82DB71E +BattleScript_BerryCurePsnEnd2:: @ 82DB71E .incbin "baserom.gba", 0x2db71e, 0x6 -gUnknown_082DB724:: @ 82DB724 +BattleScript_BerryCurePsnRet:: @ 82DB724 .incbin "baserom.gba", 0x2db724, 0x12 -gUnknown_082DB736:: @ 82DB736 +BattleScript_BerryCureBrnEnd2:: @ 82DB736 .incbin "baserom.gba", 0x2db736, 0x6 -gUnknown_082DB73C:: @ 82DB73C +BattleScript_BerryCureBrnRet:: @ 82DB73C .incbin "baserom.gba", 0x2db73c, 0x12 -gUnknown_082DB74E:: @ 82DB74E +BattleScript_BerryCureFrzEnd2:: @ 82DB74E .incbin "baserom.gba", 0x2db74e, 0x6 -gUnknown_082DB754:: @ 82DB754 +BattleScript_BerryCureFrzRet:: @ 82DB754 .incbin "baserom.gba", 0x2db754, 0x12 -gUnknown_082DB766:: @ 82DB766 +BattleScript_BerryCureSlpEnd2:: @ 82DB766 .incbin "baserom.gba", 0x2db766, 0x6 -gUnknown_082DB76C:: @ 82DB76C +BattleScript_BerryCureSlpRet:: @ 82DB76C .incbin "baserom.gba", 0x2db76c, 0x12 -gUnknown_082DB77E:: @ 82DB77E +BattleScript_BerryCureConfusionEnd2:: @ 82DB77E .incbin "baserom.gba", 0x2db77e, 0x6 -gUnknown_082DB784:: @ 82DB784 +BattleScript_BerryCureConfusionRet:: @ 82DB784 .incbin "baserom.gba", 0x2db784, 0x10 -gUnknown_082DB794:: @ 82DB794 +BattleScript_BerryCureChosenStatusEnd2:: @ 82DB794 .incbin "baserom.gba", 0x2db794, 0x6 -gUnknown_082DB79A:: @ 82DB79A +BattleScript_BerryCureChosenStatusRet:: @ 82DB79A .incbin "baserom.gba", 0x2db79a, 0x14 -gUnknown_082DB7AE:: @ 82DB7AE +BattleScript_WhiteHerbEnd2:: @ 82DB7AE .incbin "baserom.gba", 0x2db7ae, 0x6 -gUnknown_082DB7B4:: @ 82DB7B4 +BattleScript_WhiteHerbRet:: @ 82DB7B4 .incbin "baserom.gba", 0x2db7b4, 0x10 -gUnknown_082DB7C4:: @ 82DB7C4 +BattleScript_ItemHealHP_RemoveItem:: @ 82DB7C4 .incbin "baserom.gba", 0x2db7c4, 0x1d -gUnknown_082DB7E1:: @ 82DB7E1 +BattleScript_BerryPPHealEnd2:: @ 82DB7E1 .incbin "baserom.gba", 0x2db7e1, 0x10 -gUnknown_082DB7F1:: @ 82DB7F1 +BattleScript_ItemHealHP_End2:: @ 82DB7F1 .incbin "baserom.gba", 0x2db7f1, 0x6 -gUnknown_082DB7F7:: @ 82DB7F7 +BattleScript_ItemHealHP_Ret:: @ 82DB7F7 .incbin "baserom.gba", 0x2db7f7, 0x1b gUnknown_082DB812:: @ 82DB812 @@ -519,13 +519,13 @@ gUnknown_082DB812:: @ 82DB812 gUnknown_082DB816:: @ 82DB816 .incbin "baserom.gba", 0x2db816, 0xe -gUnknown_082DB824:: @ 82DB824 +BattleScript_BerryConfuseHealEnd2:: @ 82DB824 .incbin "baserom.gba", 0x2db824, 0x2a -gUnknown_082DB84E:: @ 82DB84E +BattleScript_BerryStatRaiseEnd2:: @ 82DB84E .incbin "baserom.gba", 0x2db84e, 0x1b -gUnknown_082DB869:: @ 82DB869 +BattleScript_BerryFocusEnergyEnd2:: @ 82DB869 .incbin "baserom.gba", 0x2db869, 0x10 gUnknown_082DB879:: @ 82DB879 diff --git a/include/battle.h b/include/battle.h index c31aff6e8..4093f55d1 100644 --- a/include/battle.h +++ b/include/battle.h @@ -399,12 +399,18 @@ struct BattleScriptsStack u8 size; }; +struct BattleCallbacksStack +{ + void (*function[8])(void); + u8 size; +}; + struct BattleResources { struct SecretBaseRecord* secretBase; struct UnknownFlags *flags; struct BattleScriptsStack* battleScriptsStack; - void* battleCallbackStack; + struct BattleCallbacksStack* battleCallbackStack; void* statsBeforeLvlUp; struct AI_ThinkingStruct *ai; struct BattleHistory *battleHistory; @@ -413,7 +419,8 @@ struct BattleResources extern struct BattleResources* gBattleResources; -#define BATTLESCRIPTS_STACK (gBattleResources->battleScriptsStack) +#define BATTLESCRIPTS_STACK (gBattleResources->battleScriptsStack) +#define BATTLE_CALLBACKS_STACK (gBattleResources->battleCallbackStack) struct BattleResults { @@ -506,7 +513,7 @@ struct BattleStruct u8 field_47; u8 field_48; u8 field_49; - u8 field_4A; + u8 moneyMultiplier; u8 field_4B; u8 field_4C; u8 field_4D; @@ -622,6 +629,13 @@ struct BattleStruct extern struct BattleStruct* gBattleStruct; +#define MEME_ACCESS_U8(structName, structPtr, arrayId, offsetField, value) \ +{ \ + u8* var2 = (u8*)((u32)(arrayId)); \ + var2 = (u32)(structPtr) + var2; \ + var2[offsetof(struct structName, offsetField)] = value; \ +} + struct BattleScripting { u8 field_0; @@ -645,6 +659,9 @@ struct BattleScripting u8 field_15; u8 field_16; u8 bank; + u8 field_18; + u8 field_19; + u8 statChanger; }; extern struct BattleScripting gBattleScripting; diff --git a/ld_script.txt b/ld_script.txt index 05fb41f21..0af0cd1a1 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -59,7 +59,6 @@ SECTIONS { asm/rom_8034C54.o(.text); asm/battle_2.o(.text); src/battle_3.o(.text); - asm/battle_3.o(.text); src/battle_4.o(.text); asm/battle_4.o(.text); asm/battle_5.o(.text); diff --git a/src/battle_3.c b/src/battle_3.c index 09c401a5c..af3d4ebdd 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -14,6 +14,7 @@ #include "string_util.h" #include "battle_message.h" #include "battle_ai.h" +#include "event_data.h" extern const u8* gBattlescriptCurrInstr; extern const u8* gUnknown_02024220[BATTLE_BANKS_COUNT]; @@ -47,8 +48,14 @@ extern u8 gBattleMoveFlags; extern s32 gTakenDmg[BATTLE_BANKS_COUNT]; extern u8 gTakenDmgBanks[BATTLE_BANKS_COUNT]; extern u8 gLastUsedAbility; +extern u8 gFightStateTracker; +extern u32 gBattleExecBuffer; +extern u16 gRandomMove; +extern u8 gCurrMovePos; +extern u8 gUnknown_020241E9; extern const struct BattleMove gBattleMoves[]; +extern void (* const gBattleScriptingCommandsTable[])(void); // scripts extern const u8 gUnknown_082DAE2A[]; @@ -132,6 +139,35 @@ extern const u8 gUnknown_082DB4B8[]; extern const u8 gUnknown_082DB4C1[]; extern const u8 BattleScript_TraceActivates[]; +extern const u8 BattleScript_WhiteHerbEnd2[]; +extern const u8 BattleScript_WhiteHerbRet[]; +extern const u8 BattleScript_ItemHealHP_RemoveItem[]; +extern const u8 BattleScript_BerryPPHealEnd2[]; +extern const u8 BattleScript_ItemHealHP_End2[]; +extern const u8 BattleScript_BerryConfuseHealEnd2[]; +extern const u8 BattleScript_BerryStatRaiseEnd2[]; +extern const u8 BattleScript_BerryFocusEnergyEnd2[]; +extern const u8 BattleScript_BerryCurePrlzEnd2[]; +extern const u8 BattleScript_BerryCurePsnEnd2[]; +extern const u8 BattleScript_BerryCureBrnEnd2[]; +extern const u8 BattleScript_BerryCureFrzEnd2[]; +extern const u8 BattleScript_BerryCureSlpEnd2[]; +extern const u8 BattleScript_BerryCureConfusionEnd2[]; +extern const u8 BattleScript_BerryCureChosenStatusEnd2[]; +extern const u8 BattleScript_BerryCureParRet[]; +extern const u8 BattleScript_BerryCurePsnRet[]; +extern const u8 BattleScript_BerryCureBrnRet[]; +extern const u8 BattleScript_BerryCureFrzRet[]; +extern const u8 BattleScript_BerryCureSlpRet[]; +extern const u8 BattleScript_BerryCureConfusionRet[]; +extern const u8 BattleScript_BerryCureChosenStatusRet[]; +extern const u8 BattleScript_ItemHealHP_Ret[]; + +extern const u8 gUnknown_082DB695[]; //disobedient while asleep +extern const u8 gUnknown_082DB6A5[]; //disobedient, uses a random move +extern const u8 gUnknown_082DB6D9[]; //disobedient, went to sleep +extern const u8 gUnknown_082DB6F0[]; //disobedient, hits itself + extern const u8 gStatusConditionString_PoisonJpn[]; extern const u8 gStatusConditionString_SleepJpn[]; extern const u8 gStatusConditionString_ParalysisJpn[]; @@ -159,6 +195,9 @@ extern u8 GetBankByPlayerAI(u8); extern u8 sub_806D864(u8); extern u8 sub_806D82C(u8); extern u8 weather_get_current(void); +extern void sub_803E08C(void); +extern void bc_move_exec_returning(void); +extern s8 GetFlavourRelationByPersonality(u32 personality, u8 flavor); u8 IsImprisoned(u8 bank, u16 move); u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn); @@ -5423,3 +5462,970 @@ _0804443A:\n\ .syntax divided"); } #endif // NONMATCHING + +void b_call_bc_move_exec(const u8* BS_ptr) +{ + gBattlescriptCurrInstr = BS_ptr; + BATTLE_CALLBACKS_STACK->function[BATTLE_CALLBACKS_STACK->size++] = gBattleMainFunc; + gBattleMainFunc = bc_move_exec_returning; + gFightStateTracker = 0; +} + +void b_push_move_exec(const u8* BS_ptr) +{ + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BS_ptr; + BATTLE_CALLBACKS_STACK->function[BATTLE_CALLBACKS_STACK->size++] = gBattleMainFunc; + gBattleMainFunc = sub_803E08C; +} + +enum +{ + ITEM_NO_EFFECT, // 0 + ITEM_STATUS_CHANGE, // 1 + ITEM_EFFECT_OTHER, // 2 + ITEM_PP_CHANGE, // 3 + ITEM_HP_CHANGE, // 4 + ITEM_STATS_CHANGE, // 5 +}; + +enum +{ + FLAVOR_SPICY, // 0 + FLAVOR_DRY, // 1 + FLAVOR_SWEET, // 2 + FLAVOR_BITTER, // 3 + FLAVOR_SOUR, // 4 +}; + +u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) +{ + int i = 0; + u8 effect = ITEM_NO_EFFECT; + u8 changedPP = 0; + u8 bankHoldEffect, atkHoldEffect, defHoldEffect; + u8 bankQuality, atkQuality, defQuality; + u16 atkItem, defItem; + + gLastUsedItem = gBattleMons[bank].item; + if (gLastUsedItem == ITEM_ENIGMA_BERRY) + { + bankHoldEffect = gEnigmaBerries[bank].holdEffect; + bankQuality = gEnigmaBerries[bank].holdEffectParam; + } + else + { + bankHoldEffect = ItemId_GetHoldEffect(gLastUsedItem); + bankQuality = ItemId_GetHoldEffectParam(gLastUsedItem); + } + + atkItem = gBattleMons[gBankAttacker].item; + if (atkItem == ITEM_ENIGMA_BERRY) + { + atkHoldEffect = gEnigmaBerries[gBankAttacker].holdEffect; + atkQuality = gEnigmaBerries[gBankAttacker].holdEffectParam; + } + else + { + atkHoldEffect = ItemId_GetHoldEffect(atkItem); + atkQuality = ItemId_GetHoldEffectParam(atkItem); + } + + // def variables are unused + defItem = gBattleMons[gBankTarget].item; + if (defItem == ITEM_ENIGMA_BERRY) + { + defHoldEffect = gEnigmaBerries[gBankTarget].holdEffect; + defQuality = gEnigmaBerries[gBankTarget].holdEffectParam; + } + else + { + defHoldEffect = ItemId_GetHoldEffect(defItem); + defQuality = ItemId_GetHoldEffectParam(defItem); + } + + switch (caseID) + { + case 0: + switch (bankHoldEffect) + { + case HOLD_EFFECT_DOUBLE_PRIZE: + if (GetBankSide(bank) == SIDE_PLAYER) + gBattleStruct->moneyMultiplier = 2; + break; + case HOLD_EFFECT_RESTORE_STATS: + for (i = 0; i < 8; i++) + { + if (gBattleMons[bank].statStages[i] < 6) + { + gBattleMons[bank].statStages[i] = 6; + effect = ITEM_STATS_CHANGE; + } + } + if (effect) + { + gBattleScripting.bank = bank; + gStringBank = bank; + gActiveBank = gBankAttacker = bank; + b_call_bc_move_exec(BattleScript_WhiteHerbEnd2); + } + break; + } + break; + case 1: + if (gBattleMons[bank].hp) + { + switch (bankHoldEffect) + { + case HOLD_EFFECT_RESTORE_HP: + if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / 2 && !moveTurn) + { + gBattleMoveDamage = bankQuality; + if (gBattleMons[bank].hp + bankQuality > gBattleMons[bank].maxHP) + gBattleMoveDamage = gBattleMons[bank].maxHP - gBattleMons[bank].hp; + gBattleMoveDamage *= -1; + b_call_bc_move_exec(BattleScript_ItemHealHP_RemoveItem); + effect = 4; + } + break; + case HOLD_EFFECT_RESTORE_PP: + if (!moveTurn) + { + struct Pokemon* poke; + u8 ppBonuses; + u16 move; + + if (GetBankSide(bank) == 0) + poke = &gPlayerParty[gBattlePartyID[bank]]; + else + poke = &gEnemyParty[gBattlePartyID[bank]]; + for (i = 0; i < 4; i++) + { + move = GetMonData(poke, MON_DATA_MOVE1 + i); + changedPP = GetMonData(poke, MON_DATA_PP1 + i); + ppBonuses = GetMonData(poke, MON_DATA_PP_BONUSES); + if (move && changedPP == 0) + break; + } + if (i != 4) + { + u8 maxPP = CalculatePPWithBonus(move, ppBonuses, i); + if (changedPP + bankQuality > maxPP) + changedPP = maxPP; + else + changedPP = changedPP + bankQuality; + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 2; + gBattleTextBuff1[2] = move; + gBattleTextBuff1[3] = move >> 8; + gBattleTextBuff1[4] = 0xFF; + b_call_bc_move_exec(BattleScript_BerryPPHealEnd2); + EmitSetAttributes(0, i + REQUEST_PPMOVE1_BATTLE, 0, 1, &changedPP); + MarkBufferBankForExecution(gActiveBank); + effect = ITEM_PP_CHANGE; + } + } + break; + case HOLD_EFFECT_RESTORE_STATS: + for (i = 0; i < 8; i++) + { + if (gBattleMons[bank].statStages[i] < 6) + { + gBattleMons[bank].statStages[i] = 6; + effect = ITEM_STATS_CHANGE; + } + } + if (effect) + { + gBattleScripting.bank = bank; + gStringBank = bank; + gActiveBank = gBankAttacker = bank; + b_call_bc_move_exec(BattleScript_WhiteHerbEnd2); + } + break; + case HOLD_EFFECT_LEFTOVERS: + if (gBattleMons[bank].hp < gBattleMons[bank].maxHP && !moveTurn) + { + gBattleMoveDamage = gBattleMons[bank].maxHP / 16; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + if (gBattleMons[bank].hp + gBattleMoveDamage > gBattleMons[bank].maxHP) + gBattleMoveDamage = gBattleMons[bank].maxHP - gBattleMons[bank].hp; + gBattleMoveDamage *= -1; + b_call_bc_move_exec(BattleScript_ItemHealHP_End2); + effect = ITEM_HP_CHANGE; + RecordItemEffectBattle(bank, bankHoldEffect); + } + break; + // nice copy/paste there gamefreak, making a function for confuse berries was too much eh? + case HOLD_EFFECT_CONFUSE_SPICY: + if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / 2 && !moveTurn) + { + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 8; + gBattleTextBuff1[2] = FLAVOR_SPICY; + gBattleTextBuff1[3] = EOS; + gBattleMoveDamage = gBattleMons[bank].maxHP / bankQuality; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + if (gBattleMons[bank].hp + gBattleMoveDamage > gBattleMons[bank].maxHP) + gBattleMoveDamage = gBattleMons[bank].maxHP - gBattleMons[bank].hp; + gBattleMoveDamage *= -1; + if (GetFlavourRelationByPersonality(gBattleMons[bank].personality, FLAVOR_SPICY) < 0) + b_call_bc_move_exec(BattleScript_BerryConfuseHealEnd2); + else + b_call_bc_move_exec(BattleScript_ItemHealHP_RemoveItem); + effect = ITEM_HP_CHANGE; + } + break; + case HOLD_EFFECT_CONFUSE_DRY: + if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / 2 && !moveTurn) + { + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 8; + gBattleTextBuff1[2] = FLAVOR_DRY; + gBattleTextBuff1[3] = EOS; + gBattleMoveDamage = gBattleMons[bank].maxHP / bankQuality; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + if (gBattleMons[bank].hp + gBattleMoveDamage > gBattleMons[bank].maxHP) + gBattleMoveDamage = gBattleMons[bank].maxHP - gBattleMons[bank].hp; + gBattleMoveDamage *= -1; + if (GetFlavourRelationByPersonality(gBattleMons[bank].personality, FLAVOR_DRY) < 0) + b_call_bc_move_exec(BattleScript_BerryConfuseHealEnd2); + else + b_call_bc_move_exec(BattleScript_ItemHealHP_RemoveItem); + effect = ITEM_HP_CHANGE; + } + break; + case HOLD_EFFECT_CONFUSE_SWEET: + if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / 2 && !moveTurn) + { + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 8; + gBattleTextBuff1[2] = FLAVOR_SWEET; + gBattleTextBuff1[3] = EOS; + gBattleMoveDamage = gBattleMons[bank].maxHP / bankQuality; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + if (gBattleMons[bank].hp + gBattleMoveDamage > gBattleMons[bank].maxHP) + gBattleMoveDamage = gBattleMons[bank].maxHP - gBattleMons[bank].hp; + gBattleMoveDamage *= -1; + if (GetFlavourRelationByPersonality(gBattleMons[bank].personality, FLAVOR_SWEET) < 0) + b_call_bc_move_exec(BattleScript_BerryConfuseHealEnd2); + else + b_call_bc_move_exec(BattleScript_ItemHealHP_RemoveItem); + effect = ITEM_HP_CHANGE; + } + break; + case HOLD_EFFECT_CONFUSE_BITTER: + if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / 2 && !moveTurn) + { + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 8; + gBattleTextBuff1[2] = FLAVOR_BITTER; + gBattleTextBuff1[3] = EOS; + gBattleMoveDamage = gBattleMons[bank].maxHP / bankQuality; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + if (gBattleMons[bank].hp + gBattleMoveDamage > gBattleMons[bank].maxHP) + gBattleMoveDamage = gBattleMons[bank].maxHP - gBattleMons[bank].hp; + gBattleMoveDamage *= -1; + if (GetFlavourRelationByPersonality(gBattleMons[bank].personality, FLAVOR_BITTER) < 0) + b_call_bc_move_exec(BattleScript_BerryConfuseHealEnd2); + else + b_call_bc_move_exec(BattleScript_ItemHealHP_RemoveItem); + effect = ITEM_HP_CHANGE; + } + break; + case HOLD_EFFECT_CONFUSE_SOUR: + if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / 2 && !moveTurn) + { + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 8; + gBattleTextBuff1[2] = FLAVOR_SOUR; + gBattleTextBuff1[3] = EOS; + gBattleMoveDamage = gBattleMons[bank].maxHP / bankQuality; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + if (gBattleMons[bank].hp + gBattleMoveDamage > gBattleMons[bank].maxHP) + gBattleMoveDamage = gBattleMons[bank].maxHP - gBattleMons[bank].hp; + gBattleMoveDamage *= -1; + if (GetFlavourRelationByPersonality(gBattleMons[bank].personality, FLAVOR_SOUR) < 0) + b_call_bc_move_exec(BattleScript_BerryConfuseHealEnd2); + else + b_call_bc_move_exec(BattleScript_ItemHealHP_RemoveItem); + effect = ITEM_HP_CHANGE; + } + break; + // copy/paste again, smh + case HOLD_EFFECT_ATTACK_UP: + if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / bankQuality && !moveTurn && gBattleMons[bank].statStages[STAT_STAGE_ATK] < 0xC) + { + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 5; + gBattleTextBuff1[2] = STAT_STAGE_ATK; + gBattleTextBuff1[3] = EOS; + + gBattleTextBuff2[0] = 0xFD; + gBattleTextBuff2[1] = 0; + gBattleTextBuff2[2] = 0xD2; + gBattleTextBuff2[3] = 0xD2 >> 8; + gBattleTextBuff2[4] = EOS; + + gEffectBank = bank; + gBattleScripting.statChanger = 0x10 + STAT_STAGE_ATK; + gBattleScripting.animArg1 = 0xE + STAT_STAGE_ATK; + gBattleScripting.animArg2 = 0; + b_call_bc_move_exec(BattleScript_BerryStatRaiseEnd2); + effect = ITEM_STATS_CHANGE; + } + break; + case HOLD_EFFECT_DEFENSE_UP: + if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / bankQuality && !moveTurn && gBattleMons[bank].statStages[STAT_STAGE_DEF] < 0xC) + { + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 5; + gBattleTextBuff1[2] = STAT_STAGE_DEF; + gBattleTextBuff1[3] = EOS; + + gEffectBank = bank; + gBattleScripting.statChanger = 0x10 + STAT_STAGE_DEF; + gBattleScripting.animArg1 = 0xE + STAT_STAGE_DEF; + gBattleScripting.animArg2 = 0; + b_call_bc_move_exec(BattleScript_BerryStatRaiseEnd2); + effect = ITEM_STATS_CHANGE; + } + break; + case HOLD_EFFECT_SPEED_UP: + if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / bankQuality && !moveTurn && gBattleMons[bank].statStages[STAT_STAGE_SPEED] < 0xC) + { + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 5; + gBattleTextBuff1[2] = STAT_STAGE_SPEED; + gBattleTextBuff1[3] = EOS; + + gEffectBank = bank; + gBattleScripting.statChanger = 0x10 + STAT_STAGE_SPEED; + gBattleScripting.animArg1 = 0xE + STAT_STAGE_SPEED; + gBattleScripting.animArg2 = 0; + b_call_bc_move_exec(BattleScript_BerryStatRaiseEnd2); + effect = ITEM_STATS_CHANGE; + } + break; + case HOLD_EFFECT_SP_ATTACK_UP: + if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / bankQuality && !moveTurn && gBattleMons[bank].statStages[STAT_STAGE_SPATK] < 0xC) + { + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 5; + gBattleTextBuff1[2] = STAT_STAGE_SPATK; + gBattleTextBuff1[3] = EOS; + + gEffectBank = bank; + gBattleScripting.statChanger = 0x10 + STAT_STAGE_SPATK; + gBattleScripting.animArg1 = 0xE + STAT_STAGE_SPATK; + gBattleScripting.animArg2 = 0; + b_call_bc_move_exec(BattleScript_BerryStatRaiseEnd2); + effect = ITEM_STATS_CHANGE; + } + break; + case HOLD_EFFECT_SP_DEFENSE_UP: + if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / bankQuality && !moveTurn && gBattleMons[bank].statStages[STAT_STAGE_SPDEF] < 0xC) + { + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 5; + gBattleTextBuff1[2] = STAT_STAGE_SPDEF; + gBattleTextBuff1[3] = EOS; + + gEffectBank = bank; + gBattleScripting.statChanger = 0x10 + STAT_STAGE_SPDEF; + gBattleScripting.animArg1 = 0xE + STAT_STAGE_SPDEF; + gBattleScripting.animArg2 = 0; + b_call_bc_move_exec(BattleScript_BerryStatRaiseEnd2); + effect = ITEM_STATS_CHANGE; + } + break; + case HOLD_EFFECT_CRITICAL_UP: + if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / bankQuality && !moveTurn && !(gBattleMons[bank].status2 & STATUS2_FOCUS_ENERGY)) + { + gBattleMons[bank].status2 |= STATUS2_FOCUS_ENERGY; + b_call_bc_move_exec(BattleScript_BerryFocusEnergyEnd2); + effect = ITEM_EFFECT_OTHER; + } + break; + case HOLD_EFFECT_RANDOM_STAT_UP: + if (!moveTurn && gBattleMons[bank].hp <= gBattleMons[bank].maxHP / bankQuality) + { + for (i = 0; i < 5; i++) + { + if (gBattleMons[bank].statStages[STAT_STAGE_ATK + i] < 0xC) + break; + } + if (i != 5) + { + do + { + i = Random() % 5; + } while (gBattleMons[bank].statStages[STAT_STAGE_ATK + i] == 0xC); + + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 5; + gBattleTextBuff1[2] = i + 1; + gBattleTextBuff1[3] = EOS; + + gBattleTextBuff2[0] = 0xFD; + gBattleTextBuff2[1] = 0; + gBattleTextBuff2[2] = 0xD1; + gBattleTextBuff2[3] = 0xD1 >> 8; + gBattleTextBuff2[4] = 0; + gBattleTextBuff2[5] = 0xD2; + gBattleTextBuff2[6] = 0xD2 >> 8; + gBattleTextBuff2[7] = EOS; + + gEffectBank = bank; + gBattleScripting.statChanger = 0x21 + i; + gBattleScripting.animArg1 = 0x21 + i + 6; + gBattleScripting.animArg2 = 0; + b_call_bc_move_exec(BattleScript_BerryStatRaiseEnd2); + effect = ITEM_STATS_CHANGE; + } + } + break; + case HOLD_EFFECT_CURE_PAR: + if (gBattleMons[bank].status1 & STATUS_PARALYSIS) + { + gBattleMons[bank].status1 &= ~(STATUS_PARALYSIS); + b_call_bc_move_exec(BattleScript_BerryCurePrlzEnd2); + effect = ITEM_STATUS_CHANGE; + } + break; + case HOLD_EFFECT_CURE_PSN: + if (gBattleMons[bank].status1 & STATUS_PSN_ANY) + { + gBattleMons[bank].status1 &= ~(STATUS_PSN_ANY | STATUS_TOXIC_COUNTER); + b_call_bc_move_exec(BattleScript_BerryCurePsnEnd2); + effect = ITEM_STATUS_CHANGE; + } + break; + case HOLD_EFFECT_CURE_BRN: + if (gBattleMons[bank].status1 & STATUS_BURN) + { + gBattleMons[bank].status1 &= ~(STATUS_BURN); + b_call_bc_move_exec(BattleScript_BerryCureBrnEnd2); + effect = ITEM_STATUS_CHANGE; + } + break; + case HOLD_EFFECT_CURE_FRZ: + if (gBattleMons[bank].status1 & STATUS_FREEZE) + { + gBattleMons[bank].status1 &= ~(STATUS_FREEZE); + b_call_bc_move_exec(BattleScript_BerryCureFrzEnd2); + effect = ITEM_STATUS_CHANGE; + } + break; + case HOLD_EFFECT_CURE_SLP: + if (gBattleMons[bank].status1 & STATUS_SLEEP) + { + gBattleMons[bank].status1 &= ~(STATUS_SLEEP); + gBattleMons[bank].status2 &= ~(STATUS2_NIGHTMARE); + b_call_bc_move_exec(BattleScript_BerryCureSlpEnd2); + effect = ITEM_STATUS_CHANGE; + } + break; + case HOLD_EFFECT_CURE_CONFUSION: + if (gBattleMons[bank].status2 & STATUS2_CONFUSION) + { + gBattleMons[bank].status2 &= ~(STATUS2_CONFUSION); + b_call_bc_move_exec(BattleScript_BerryCureConfusionEnd2); + effect = ITEM_EFFECT_OTHER; + } + break; + case HOLD_EFFECT_CURE_STATUS: + if (gBattleMons[bank].status1 & STATUS_ANY || gBattleMons[bank].status2 & STATUS2_CONFUSION) + { + i = 0; + if (gBattleMons[bank].status1 & STATUS_PSN_ANY) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_PoisonJpn); + i++; + } + if (gBattleMons[bank].status1 & STATUS_SLEEP) + { + gBattleMons[bank].status2 &= ~(STATUS2_NIGHTMARE); + StringCopy(gBattleTextBuff1, gStatusConditionString_SleepJpn); + i++; + } + if (gBattleMons[bank].status1 & STATUS_PARALYSIS) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_ParalysisJpn); + i++; + } + if (gBattleMons[bank].status1 & STATUS_BURN) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn); + i++; + } + if (gBattleMons[bank].status1 & STATUS_FREEZE) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn); + i++; + } + if (gBattleMons[bank].status2 & STATUS2_CONFUSION) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_ConfusionJpn); + i++; + } + if (!(i > 1)) + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattleMons[bank].status1 = 0; + gBattleMons[bank].status2 &= ~(STATUS2_CONFUSION); + b_call_bc_move_exec(BattleScript_BerryCureChosenStatusEnd2); + effect = ITEM_STATUS_CHANGE; + } + break; + case HOLD_EFFECT_CURE_ATTRACT: + if (gBattleMons[bank].status2 & STATUS2_INFATUATION) + { + gBattleMons[bank].status2 &= ~(STATUS2_INFATUATION); + StringCopy(gBattleTextBuff1, gStatusConditionString_LoveJpn); + b_call_bc_move_exec(BattleScript_BerryCureChosenStatusEnd2); + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + effect = ITEM_EFFECT_OTHER; + } + break; + } + if (effect) + { + gBattleScripting.bank = bank; + gStringBank = bank; + gActiveBank = gBankAttacker = bank; + switch (effect) + { + case ITEM_STATUS_CHANGE: + EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[bank].status1); + MarkBufferBankForExecution(gActiveBank); + break; + case ITEM_PP_CHANGE: + if (!(gBattleMons[bank].status2 & STATUS2_TRANSFORMED) && !(gDisableStructs[bank].unk18_b & gBitTable[i])) + gBattleMons[bank].pp[i] = changedPP; + break; + } + } + } + break; + case 2: + break; + case 3: + for (bank = 0; bank < gNoOfAllBanks; bank++) + { + gLastUsedItem = gBattleMons[bank].item; + if (gBattleMons[bank].item == ITEM_ENIGMA_BERRY) + { + bankHoldEffect = gEnigmaBerries[bank].holdEffect; + bankQuality = gEnigmaBerries[bank].holdEffectParam; + } + else + { + bankHoldEffect = ItemId_GetHoldEffect(gLastUsedItem); + bankQuality = ItemId_GetHoldEffectParam(gLastUsedItem); + } + switch (bankHoldEffect) + { + case HOLD_EFFECT_CURE_PAR: + if (gBattleMons[bank].status1 & STATUS_PARALYSIS) + { + gBattleMons[bank].status1 &= ~(STATUS_PARALYSIS); + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_BerryCureParRet; + effect = ITEM_STATUS_CHANGE; + } + break; + case HOLD_EFFECT_CURE_PSN: + if (gBattleMons[bank].status1 & STATUS_PSN_ANY) + { + gBattleMons[bank].status1 &= ~(STATUS_PSN_ANY | STATUS_TOXIC_COUNTER); + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_BerryCurePsnRet; + effect = ITEM_STATUS_CHANGE; + } + break; + case HOLD_EFFECT_CURE_BRN: + if (gBattleMons[bank].status1 & STATUS_BURN) + { + gBattleMons[bank].status1 &= ~(STATUS_BURN); + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_BerryCureBrnRet; + effect = ITEM_STATUS_CHANGE; + } + break; + case HOLD_EFFECT_CURE_FRZ: + if (gBattleMons[bank].status1 & STATUS_FREEZE) + { + gBattleMons[bank].status1 &= ~(STATUS_FREEZE); + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_BerryCureFrzRet; + effect = ITEM_STATUS_CHANGE; + } + break; + case HOLD_EFFECT_CURE_SLP: + if (gBattleMons[bank].status1 & STATUS_SLEEP) + { + gBattleMons[bank].status1 &= ~(STATUS_SLEEP); + gBattleMons[bank].status2 &= ~(STATUS2_NIGHTMARE); + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_BerryCureSlpRet; + effect = ITEM_STATUS_CHANGE; + } + break; + case HOLD_EFFECT_CURE_CONFUSION: + if (gBattleMons[bank].status2 & STATUS2_CONFUSION) + { + gBattleMons[bank].status2 &= ~(STATUS2_CONFUSION); + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_BerryCureConfusionRet; + effect = ITEM_EFFECT_OTHER; + } + break; + case HOLD_EFFECT_CURE_ATTRACT: + if (gBattleMons[bank].status2 & STATUS2_INFATUATION) + { + gBattleMons[bank].status2 &= ~(STATUS2_INFATUATION); + StringCopy(gBattleTextBuff1, gStatusConditionString_LoveJpn); + b_movescr_stack_push_cursor(); + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattlescriptCurrInstr = BattleScript_BerryCureChosenStatusRet; + effect = ITEM_EFFECT_OTHER; + } + break; + case HOLD_EFFECT_CURE_STATUS: + if (gBattleMons[bank].status1 & STATUS_ANY || gBattleMons[bank].status2 & STATUS2_CONFUSION) + { + if (gBattleMons[bank].status1 & STATUS_PSN_ANY) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_PoisonJpn); + } + if (gBattleMons[bank].status1 & STATUS_SLEEP) + { + gBattleMons[bank].status2 &= ~(STATUS2_NIGHTMARE); + StringCopy(gBattleTextBuff1, gStatusConditionString_SleepJpn); + } + if (gBattleMons[bank].status1 & STATUS_PARALYSIS) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_ParalysisJpn); + } + if (gBattleMons[bank].status1 & STATUS_BURN) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_BurnJpn); + } + if (gBattleMons[bank].status1 & STATUS_FREEZE) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_IceJpn); + } + if (gBattleMons[bank].status2 & STATUS2_CONFUSION) + { + StringCopy(gBattleTextBuff1, gStatusConditionString_ConfusionJpn); + } + gBattleMons[bank].status1 = 0; + gBattleMons[bank].status2 &= ~(STATUS2_CONFUSION); + b_movescr_stack_push_cursor(); + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gBattlescriptCurrInstr = BattleScript_BerryCureChosenStatusRet; + effect = ITEM_STATUS_CHANGE; + } + break; + case HOLD_EFFECT_RESTORE_STATS: + for (i = 0; i < 8; i++) + { + if (gBattleMons[bank].statStages[i] < 6) + { + gBattleMons[bank].statStages[i] = 6; + effect = ITEM_STATS_CHANGE; + } + } + if (effect) + { + gBattleScripting.bank = bank; + gStringBank = bank; + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_WhiteHerbRet; + return effect; // unnecessary return + } + break; + } + if (effect) + { + gBattleScripting.bank = bank; + gStringBank = bank; + gActiveBank = bank; + EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); + MarkBufferBankForExecution(gActiveBank); + break; + } + } + break; + case 4: + if (gBattleMoveDamage) + { + switch (atkHoldEffect) + { + case HOLD_EFFECT_FLINCH: + if (!(gBattleMoveFlags & MOVESTATUS_NOEFFECT) + && (gSpecialStatuses[gBankTarget].moveturnLostHP_physical || gSpecialStatuses[gBankTarget].moveturnLostHP_special) + && (Random() % 100) < atkQuality + && gBattleMoves[gCurrentMove].flags & FLAG_KINGSROCK_AFFECTED + && gBattleMons[gBankTarget].hp) + { + gBattleCommunication[MOVE_EFFECT_BYTE] = 8; + b_movescr_stack_push_cursor(); + SetMoveEffect(0, 0); + b_movescr_stack_pop_cursor(); + } + break; + case HOLD_EFFECT_SHELL_BELL: + if (!(gBattleMoveFlags & MOVESTATUS_NOEFFECT) + && gSpecialStatuses[gBankTarget].moveturnLostHP != 0 + && gSpecialStatuses[gBankTarget].moveturnLostHP != 0xFFFF + && gBankAttacker != gBankTarget + && gBattleMons[gBankAttacker].hp != gBattleMons[gBankAttacker].maxHP + && gBattleMons[gBankAttacker].hp != 0) + { + gLastUsedItem = atkItem; + gStringBank = gBankAttacker; + gBattleScripting.bank = gBankAttacker; + gBattleMoveDamage = (gSpecialStatuses[gBankTarget].moveturnLostHP / atkQuality) * -1; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = -1; + gSpecialStatuses[gBankTarget].moveturnLostHP = 0; + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_ItemHealHP_Ret; + effect++; + } + break; + } + } + break; + } + + return effect; +} + +void sub_8045868(u8 bank) +{ + gDisableStructs[bank].furyCutterCounter = 0; + gBattleMons[bank].status2 &= ~(STATUS2_DESTINY_BOND); + gStatuses3[bank] &= ~(STATUS3_GRUDGE); +} + +void sub_80458B4(void) +{ + if (gBattleExecBuffer == 0) + gBattleScriptingCommandsTable[*gBattlescriptCurrInstr](); +} + +u8 GetMoveTarget(u16 move, u8 useMoveTarget) +{ + u8 targetBank = 0; + u8 moveTarget; + u8 side; + + if (useMoveTarget) + moveTarget = useMoveTarget - 1; + else + moveTarget = gBattleMoves[move].target; + + switch (moveTarget) + { + case 0: + side = GetBankSide(gBankAttacker) ^ 1; + if (gSideTimers[side].followmeTimer && gBattleMons[gSideTimers[side].followmeTarget].hp) + targetBank = gSideTimers[side].followmeTarget; + else + { + side = GetBankSide(gBankAttacker); + do + { + targetBank = Random() % gNoOfAllBanks; + } while (targetBank == gBankAttacker || side == GetBankSide(targetBank) || gAbsentBankFlags & gBitTable[targetBank]); + if (gBattleMoves[move].type == TYPE_ELECTRIC + && AbilityBattleEffects(ABILITYEFFECT_COUNT_OTHER_SIZE, gBankAttacker, ABILITY_LIGHTNING_ROD, 0, 0) + && gBattleMons[targetBank].ability != ABILITY_LIGHTNING_ROD) + { + targetBank ^= 2; + RecordAbilityBattle(targetBank, gBattleMons[targetBank].ability); + gSpecialStatuses[targetBank].lightningRodRedirected = 1; + } + } + break; + case 1: + case 8: + case 32: + case 64: + targetBank = GetBankByPlayerAI((GetBankIdentity(gBankAttacker) & 1) ^ 1); + if (gAbsentBankFlags & gBitTable[targetBank]) + targetBank ^= 2; + break; + case 4: + side = GetBankSide(gBankAttacker) ^ 1; + if (gSideTimers[side].followmeTimer && gBattleMons[gSideTimers[side].followmeTarget].hp) + targetBank = gSideTimers[side].followmeTarget; + else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && moveTarget & 4) + { + if (GetBankSide(gBankAttacker) == 0) + { + if (Random() & 1) + targetBank = GetBankByPlayerAI(1); + else + targetBank = GetBankByPlayerAI(3); + } + else + { + if (Random() & 1) + targetBank = GetBankByPlayerAI(0); + else + targetBank = GetBankByPlayerAI(2); + } + if (gAbsentBankFlags & gBitTable[targetBank]) + targetBank ^= 2; + } + else + targetBank = GetBankByPlayerAI((GetBankIdentity(gBankAttacker) & 1) ^ 1); + break; + case 2: + case 16: + targetBank = gBankAttacker; + break; + } + + #ifndef NONMATCHING + MEME_ACCESS_U8(BattleStruct, gBattleStruct, gBankAttacker, moveTarget, targetBank); + #else + gBattleStruct->moveTarget[gBankAttacker] = targetBank; + #endif // NONMATCHING + + return targetBank; +} + +static bool32 HasObedientBitSet(u8 bank) +{ + if (GetBankSide(bank) == SIDE_OPPONENT) + return TRUE; + if (GetMonData(&gPlayerParty[gBattlePartyID[bank]], MON_DATA_SPECIES, NULL) != SPECIES_DEOXYS + && GetMonData(&gPlayerParty[gBattlePartyID[bank]], MON_DATA_SPECIES, NULL) != SPECIES_MEW) + return TRUE; + return GetMonData(&gPlayerParty[gBattlePartyID[bank]], MON_DATA_OBEDIENCE, NULL); +} + +u8 IsPokeDisobedient(void) +{ + s32 rnd; + s32 calc; + u8 obedienceLevel = 0; + + if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) + return 0; + if (GetBankSide(gBankAttacker) == SIDE_OPPONENT) + return 0; + + if (HasObedientBitSet(gBankAttacker)) // only if species is Mew or Deoxys + { + if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && GetBankIdentity(gBankAttacker) == 2) + return 0; + if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) + return 0; + if (gBattleTypeFlags & BATTLE_TYPE_RECORDED) + return 0; + if (!IsOtherTrainer(gBattleMons[gBankAttacker].otId, gBattleMons[gBankAttacker].otName)) + return 0; + if (FlagGet(BADGE08_GET)) + return 0; + + obedienceLevel = 10; + + if (FlagGet(BADGE02_GET)) + obedienceLevel = 30; + if (FlagGet(BADGE04_GET)) + obedienceLevel = 50; + if (FlagGet(BADGE06_GET)) + obedienceLevel = 70; + } + + if (gBattleMons[gBankAttacker].level <= obedienceLevel) + return 0; + rnd = (Random() & 255); + calc = (gBattleMons[gBankAttacker].level + obedienceLevel) * rnd >> 8; + if (calc < obedienceLevel) + return 0; + + // is not obedient + if (gCurrentMove == MOVE_RAGE) + gBattleMons[gBankAttacker].status2 &= ~(STATUS2_RAGE); + if (gBattleMons[gBankAttacker].status1 & STATUS_SLEEP && (gCurrentMove == MOVE_SNORE || gCurrentMove == MOVE_SLEEP_TALK)) + { + gBattlescriptCurrInstr = gUnknown_082DB695; + return 1; + } + + rnd = (Random() & 255); + calc = (gBattleMons[gBankAttacker].level + obedienceLevel) * rnd >> 8; + if (calc < obedienceLevel) + { + calc = CheckMoveLimitations(gBankAttacker, gBitTable[gCurrMovePos], 0xFF); + if (calc == 0xF) // all moves cannot be used + { + gBattleCommunication[MULTISTRING_CHOOSER] = Random() & 3; + gBattlescriptCurrInstr = BattleScript_MoveUsedLoafingAround; + return 1; + } + else // use a random move + { + do + { + gCurrMovePos = gUnknown_020241E9 = Random() & 3; + } while (gBitTable[gCurrMovePos] & calc); + + gRandomMove = gBattleMons[gBankAttacker].moves[gCurrMovePos]; + gBattlescriptCurrInstr = gUnknown_082DB6A5; + gBankTarget = GetMoveTarget(gRandomMove, 0); + gHitMarker |= HITMARKER_x200000; + return 2; + } + } + else + { + obedienceLevel = gBattleMons[gBankAttacker].level - obedienceLevel; + + calc = (Random() & 255); + if (calc < obedienceLevel && !(gBattleMons[gBankAttacker].status1 & STATUS_ANY) && gBattleMons[gBankAttacker].ability != ABILITY_VITAL_SPIRIT && gBattleMons[gBankAttacker].ability != ABILITY_INSOMNIA) + { + // try putting asleep + int i; + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gBattleMons[i].status2 & STATUS2_UPROAR) + break; + } + if (i == gNoOfAllBanks) + { + gBattlescriptCurrInstr = gUnknown_082DB6D9; + return 1; + } + } + calc -= obedienceLevel; + if (calc < obedienceLevel) + { + gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[gBankAttacker], &gBattleMons[gBankAttacker], MOVE_POUND, 0, 40, 0, gBankAttacker, gBankAttacker); + gBankTarget = gBankAttacker; + gBattlescriptCurrInstr = gUnknown_082DB6F0; + gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; + return 2; + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = Random() & 3; + gBattlescriptCurrInstr = BattleScript_MoveUsedLoafingAround; + return 1; + } + } +} From 3356a4fb923d73bba9422b564bc1c0ef7e62f47c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 11:39:49 -0400 Subject: [PATCH 170/342] Failed attempt to fix InitFieldObjectStateFromTemplate, but at least we fixed the weirdness with the double MapObject structs --- include/global.fieldmap.h | 72 ++++----------------------------------- src/field_map_obj.c | 50 ++++++++++++++------------- 2 files changed, 33 insertions(+), 89 deletions(-) diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 4a587cf57..ed5054b7d 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -226,71 +226,13 @@ struct MapObject /*0x14*/ struct Coords16 coords3; /*0x18*/ u8 mapobj_unk_18:4; //current direction? /*0x18*/ u8 placeholder18:4; - /*0x19*/ u8 mapobj_unk_19:4; - /*0x19*/ u8 mapobj_unk_19b:4; - /*0x1A*/ u8 mapobj_unk_1A; - /*0x1B*/ u8 mapobj_unk_1B; - /*0x1C*/ u8 mapobj_unk_1C; - /*0x1D*/ u8 trainerRange_berryTreeId; - /*0x1E*/ u8 mapobj_unk_1E; - /*0x1F*/ u8 mapobj_unk_1F; - /*0x20*/ u8 mapobj_unk_20; - /*0x21*/ u8 mapobj_unk_21; - /*0x22*/ u8 animId; - /*size = 0x24*/ -}; - -// THIS IS NEEDED TO MAKE TRAINER_SEE.C MATCH, PLEASE DO NOT REMOVE UNLESS YOU FIX CHECKPATHBETWEENTRAINERANDPLAYER -struct MapObject2 -{ - /*0x00*/ u32 active:1; - u32 mapobj_bit_1:1; - u32 mapobj_bit_2:1; - u32 mapobj_bit_3:1; - u32 mapobj_bit_4:1; - u32 mapobj_bit_5:1; - u32 mapobj_bit_6:1; - u32 mapobj_bit_7:1; - /*0x01*/ u32 mapobj_bit_8:1; - u32 mapobj_bit_9:1; - u32 mapobj_bit_10:1; - u32 mapobj_bit_11:1; - u32 mapobj_bit_12:1; - u32 mapobj_bit_13:1; - u32 mapobj_bit_14:1; - u32 mapobj_bit_15:1; - /*0x02*/ u32 mapobj_bit_16:1; - u32 mapobj_bit_17:1; - u32 mapobj_bit_18:1; - u32 mapobj_bit_19:1; - u32 mapobj_bit_20:1; - u32 mapobj_bit_21:1; - u32 mapobj_bit_22:1; - u32 mapobj_bit_23:1; - /*0x03*/ u32 mapobj_bit_24:1; - u32 mapobj_bit_25:1; - u32 mapobj_bit_26:1; - u32 mapobj_bit_27:1; - u32 mapobj_bit_28:1; - u32 mapobj_bit_29:1; - u32 mapobj_bit_30:1; - u32 mapobj_bit_31:1; - /*0x04*/ u8 spriteId; - /*0x05*/ u8 graphicsId; - /*0x06*/ u8 animPattern; - /*0x07*/ u8 trainerType; - /*0x08*/ u8 localId; - /*0x09*/ u8 mapNum; - /*0x0A*/ u8 mapGroup; - /*0x0B*/ u8 mapobj_unk_0B_0:4; - u8 elevation:4; - /*0x0C*/ struct Coords16 coords1; - /*0x10*/ struct Coords16 coords2; - /*0x14*/ struct Coords16 coords3; - /*0x18*/ u8 mapobj_unk_18:4; - /*0x18*/ u8 placeholder18:4; - /*0x19*/ u8 mapobj_unk_19:4; - /*0x19*/ u8 mapobj_unk_19b:4; + /*0x19*/ union __attribute__((packed)) { + u8 as_byte; + struct __attribute__((packed)) { + u8 x:4; + u8 y:4; + } __attribute__((aligned (1))) as_nybbles; + } __attribute__((aligned (1))) range; /*0x1A*/ u8 mapobj_unk_1A; /*0x1B*/ u8 mapobj_unk_1B; /*0x1C*/ u8 mapobj_unk_1C; diff --git a/src/field_map_obj.c b/src/field_map_obj.c index e1ba386e0..9f01e87df 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -117,7 +117,7 @@ static u32 state_to_direction(u8, u32, u32); static void FieldObjectExecSpecialAnim(struct MapObject *, struct Sprite *); /*static*/ void npc_obj_transfer_image_anim_pause_flag(struct MapObject *, struct Sprite *); -static bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject2 *, s16, s16); +static bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject *, s16, s16); static bool8 IsMetatileDirectionallyImpassable(struct MapObject *, s16, s16, u8); static bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *, s16, s16); @@ -253,14 +253,15 @@ static u8 GetFieldObjectIdByLocalId(u8 localId) // This function has the same nonmatching quirk as in Ruby/Sapphire. #ifdef NONMATCHING -static u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u8 mapId, u8 mapGroupId) +static u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u8 mapNum, u8 mapGroup) { - u8 slot; struct MapObject *mapObject; - u16 x; - u16 y; + s16 x; + s16 y; + u8 slot; - if (GetAvailableFieldObjectSlot(template->localId, mapId, mapGroupId, &slot)) + // mapNum and mapGroup are in the wrong registers (r7/r6 instead of r6/r7) + if (GetAvailableFieldObjectSlot(template->localId, mapNum, mapGroup, &slot)) { return NUM_FIELD_OBJECTS; } @@ -273,8 +274,8 @@ static u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u mapObject->graphicsId = template->graphicsId; mapObject->animPattern = template->movementType; mapObject->localId = template->localId; - mapObject->mapNum = mapId; - mapObject->mapGroup = mapGroupId; + mapObject->mapNum = mapNum; + mapObject->mapGroup = mapGroup; mapObject->coords1.x = x; mapObject->coords1.y = y; mapObject->coords2.x = x; @@ -283,24 +284,25 @@ static u8 InitFieldObjectStateFromTemplate(struct MapObjectTemplate *template, u mapObject->coords3.y = y; mapObject->mapobj_unk_0B_0 = template->elevation; mapObject->elevation = template->elevation; - mapObject->mapobj_unk_19 = template->unkA_0; - mapObject->mapobj_unk_19b = template->unkA_4; + // For some reason, 0x0F is placed in r9, to be used later + mapObject->range.as_nybbles.x = template->unkA_0; + mapObject->range.as_nybbles.y = template->unkA_4; mapObject->trainerType = template->unkC; mapObject->trainerRange_berryTreeId = template->unkE; mapObject->mapobj_unk_20 = gUnknown_085055CD[template->movementType]; FieldObjectSetDirection(mapObject, mapObject->mapobj_unk_20); FieldObjectHandleDynamicGraphicsId(mapObject); - // This block is the culprit if (gUnknown_0850557C[mapObject->animPattern]) { - if (mapObject->mapobj_unk_19 == 0) + if ((mapObject->range.as_nybbles.x) == 0) { - mapObject->mapobj_unk_19 ++; + // r9 is invoked here + mapObject->range.as_nybbles.x ++; } - if (mapObject->mapobj_unk_19b == 0) + if ((mapObject->range.as_nybbles.y) == 0) { - mapObject->mapobj_unk_19b ++; + mapObject->range.as_nybbles.y ++; } } return slot; @@ -3654,7 +3656,7 @@ u8 npc_block_way(struct MapObject *mapObject, s16 x, s16 y, u32 dirn) u8 direction; direction = dirn; - if (IsCoordOutsideFieldObjectMovementRect((struct MapObject2 *)mapObject, x, y)) + if (IsCoordOutsideFieldObjectMovementRect(mapObject, x, y)) { return 1; } @@ -3682,7 +3684,7 @@ u8 sub_8092C8C(struct MapObject *mapObject, s16 x, s16 y, u8 direction) u8 retval; retval = 0x00; - if (IsCoordOutsideFieldObjectMovementRect((struct MapObject2 *)mapObject, x, y)) + if (IsCoordOutsideFieldObjectMovementRect(mapObject, x, y)) { retval |= 1; } @@ -3701,26 +3703,26 @@ u8 sub_8092C8C(struct MapObject *mapObject, s16 x, s16 y, u8 direction) return retval; } -static bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject2 *mapObject, s16 x, s16 y) +static bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject *mapObject, s16 x, s16 y) { s16 left; s16 right; s16 top; s16 bottom; - if (mapObject->mapobj_unk_19 != 0) + if (mapObject->range.as_nybbles.x != 0) { - left = mapObject->coords1.x - mapObject->mapobj_unk_19; - right = mapObject->coords1.x + mapObject->mapobj_unk_19; + left = mapObject->coords1.x - mapObject->range.as_nybbles.x; + right = mapObject->coords1.x + mapObject->range.as_nybbles.x; if (left > x || right < x) { return TRUE; } } - if (mapObject->mapobj_unk_19b != 0) + if (mapObject->range.as_nybbles.y != 0) { - top = mapObject->coords1.y - mapObject->mapobj_unk_19b; - bottom = mapObject->coords1.y + mapObject->mapobj_unk_19b; + top = mapObject->coords1.y - mapObject->range.as_nybbles.y; + bottom = mapObject->coords1.y + mapObject->range.as_nybbles.y; if (top > y || bottom < y) { return TRUE; From 20152fb0aff7e4e7de34be319f6ce120ae09aaa1 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 12:19:35 -0400 Subject: [PATCH 171/342] Yet Another Macro Cluster TM --- asm/field_map_obj.s | 194 -------------------------------------------- src/field_map_obj.c | 29 +++++++ 2 files changed, 29 insertions(+), 194 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 958e66bd6..cd3f7022a 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,200 +5,6 @@ .text - thumb_func_start sub_8094DE4 -sub_8094DE4: @ 8094DE4 - push {r4,r5,lr} - sub sp, 0x4 - adds r5, r1, 0 - lsls r4, r2, 24 - lsrs r4, 24 - movs r1, 0 - str r1, [sp] - adds r1, r5, 0 - adds r2, r4, 0 - movs r3, 0x1 - bl sub_8093FC4 - adds r0, r4, 0 - bl sub_80929AC - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r5, 0 - bl StartSpriteAnim - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8094DE4 - - thumb_func_start sub_8094E18 -sub_8094E18: @ 8094E18 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x1 - bl sub_8094DE4 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094E38 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094E18 - - thumb_func_start sub_8094E38 -sub_8094E38: @ 8094E38 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941C8 - lsls r0, 24 - cmp r0, 0 - bne _08094E4C - movs r0, 0 - b _08094E5A -_08094E4C: - movs r0, 0x2 - strh r0, [r5, 0x32] - ldrb r1, [r4] - subs r0, 0x23 - ands r0, r1 - strb r0, [r4] - movs r0, 0x1 -_08094E5A: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094E38 - - thumb_func_start sub_8094E60 -sub_8094E60: @ 8094E60 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x2 - bl sub_8094DE4 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094E80 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094E60 - - thumb_func_start sub_8094E80 -sub_8094E80: @ 8094E80 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941C8 - lsls r0, 24 - cmp r0, 0 - bne _08094E94 - movs r0, 0 - b _08094EA2 -_08094E94: - movs r0, 0x2 - strh r0, [r5, 0x32] - ldrb r1, [r4] - subs r0, 0x23 - ands r0, r1 - strb r0, [r4] - movs r0, 0x1 -_08094EA2: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094E80 - - thumb_func_start sub_8094EA8 -sub_8094EA8: @ 8094EA8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x3 - bl sub_8094DE4 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094EC8 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094EA8 - - thumb_func_start sub_8094EC8 -sub_8094EC8: @ 8094EC8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941C8 - lsls r0, 24 - cmp r0, 0 - bne _08094EDC - movs r0, 0 - b _08094EEA -_08094EDC: - movs r0, 0x2 - strh r0, [r5, 0x32] - ldrb r1, [r4] - subs r0, 0x23 - ands r0, r1 - strb r0, [r4] - movs r0, 0x1 -_08094EEA: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094EC8 - - thumb_func_start sub_8094EF0 -sub_8094EF0: @ 8094EF0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x4 - bl sub_8094DE4 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8094F10 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094EF0 - - thumb_func_start sub_8094F10 -sub_8094F10: @ 8094F10 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941C8 - lsls r0, 24 - cmp r0, 0 - bne _08094F24 - movs r0, 0 - b _08094F32 -_08094F24: - movs r0, 0x2 - strh r0, [r5, 0x32] - ldrb r1, [r4] - subs r0, 0x23 - ands r0, r1 - strb r0, [r4] - movs r0, 0x1 -_08094F32: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8094F10 - thumb_func_start sub_8094F38 sub_8094F38: @ 8094F38 push {r4-r6,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 9f01e87df..1d91184ec 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4512,3 +4512,32 @@ bool8 sub_8094DC4(struct MapObject *mapObject, struct Sprite *sprite) } return FALSE; } + +void sub_8094DE4(struct MapObject *mapObject, struct Sprite *sprite, u8 direction) +{ + sub_8093FC4(mapObject, sprite, direction, 1, 0); + StartSpriteAnim(sprite, sub_80929AC(direction)); +} + +#define unk_macro_8094E18(name, direction)\ +static bool8 name##_2(struct MapObject *, struct Sprite *);\ +bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + sub_8094DE4(mapObject, sprite, direction);\ + return name##_2(mapObject, sprite);\ +}\ +static bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + if (sub_80941C8(mapObject, sprite))\ + {\ + sprite->data2 = 2;\ + mapObject->mapobj_bit_5 = FALSE;\ + return TRUE;\ + }\ + return FALSE;\ +} + +unk_macro_8094E18(sub_8094E18, DIR_SOUTH) +unk_macro_8094E18(sub_8094E60, DIR_NORTH) +unk_macro_8094E18(sub_8094EB8, DIR_WEST) +unk_macro_8094E18(sub_8094710, DIR_EAST) From b06631f6540bc1b08613e08edb0f615ec1d3c28d Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 12:25:27 -0400 Subject: [PATCH 172/342] Functions for facing towards/away from another object? --- asm/field_map_obj.s | 95 --------------------------------------------- src/field_map_obj.c | 24 ++++++++++++ 2 files changed, 24 insertions(+), 95 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index cd3f7022a..5b81fa7b5 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,101 +5,6 @@ .text - thumb_func_start sub_8094F38 -sub_8094F38: @ 8094F38 - push {r4-r6,lr} - sub sp, 0x4 - adds r5, r0, 0 - adds r6, r1, 0 - movs r0, 0xFF - movs r1, 0 - movs r2, 0 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _08094F82 - movs r1, 0x10 - ldrsh r0, [r5, r1] - movs r2, 0x12 - ldrsh r1, [r5, r2] - ldr r4, =gMapObjects - mov r2, sp - ldrb r2, [r2] - lsls r3, r2, 3 - adds r3, r2 - lsls r3, 2 - adds r3, r4 - movs r4, 0x10 - ldrsh r2, [r3, r4] - movs r4, 0x12 - ldrsh r3, [r3, r4] - bl sub_8092AF8 - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r5, 0 - adds r1, r6, 0 - bl an_look_any -_08094F82: - movs r0, 0x1 - strh r0, [r6, 0x32] - add sp, 0x4 - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8094F38 - - thumb_func_start sub_8094F94 -sub_8094F94: @ 8094F94 - push {r4-r6,lr} - sub sp, 0x4 - adds r5, r0, 0 - adds r6, r1, 0 - movs r0, 0xFF - movs r1, 0 - movs r2, 0 - mov r3, sp - bl TryGetFieldObjectIdByLocalIdAndMap - lsls r0, 24 - cmp r0, 0 - bne _08094FE6 - movs r1, 0x10 - ldrsh r0, [r5, r1] - movs r2, 0x12 - ldrsh r1, [r5, r2] - ldr r4, =gMapObjects - mov r2, sp - ldrb r2, [r2] - lsls r3, r2, 3 - adds r3, r2 - lsls r3, 2 - adds r3, r4 - movs r4, 0x10 - ldrsh r2, [r3, r4] - movs r4, 0x12 - ldrsh r3, [r3, r4] - bl sub_8092AF8 - lsls r0, 24 - lsrs r0, 24 - bl GetOppositeDirection - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r5, 0 - adds r1, r6, 0 - bl an_look_any -_08094FE6: - movs r0, 0x1 - strh r0, [r6, 0x32] - add sp, 0x4 - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8094F94 - thumb_func_start sub_8094FF8 sub_8094FF8: @ 8094FF8 ldrb r2, [r0, 0x1] diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 1d91184ec..c4b1255ad 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4541,3 +4541,27 @@ unk_macro_8094E18(sub_8094E18, DIR_SOUTH) unk_macro_8094E18(sub_8094E60, DIR_NORTH) unk_macro_8094E18(sub_8094EB8, DIR_WEST) unk_macro_8094E18(sub_8094710, DIR_EAST) + +bool8 sub_8094F38(struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 mapObjectId; + + if (!TryGetFieldObjectIdByLocalIdAndMap(0xFF, 0, 0, &mapObjectId)) + { + an_look_any(mapObject, sprite, sub_8092AF8(mapObject->coords2.x, mapObject->coords2.y, gMapObjects[mapObjectId].coords2.x, gMapObjects[mapObjectId].coords2.y)); + } + sprite->data2 = 1; + return TRUE; +} + +bool8 sub_8094F94(struct MapObject *mapObject, struct Sprite *sprite) +{ + u8 mapObjectId; + + if (!TryGetFieldObjectIdByLocalIdAndMap(0xFF, 0, 0, &mapObjectId)) + { + an_look_any(mapObject, sprite, GetOppositeDirection(sub_8092AF8(mapObject->coords2.x, mapObject->coords2.y, gMapObjects[mapObjectId].coords2.x, gMapObjects[mapObjectId].coords2.y))); + } + sprite->data2 = 1; + return TRUE; +} From 92a3f1cb2e2dae3275a595b847d3ffcf05817663 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 12:57:42 -0400 Subject: [PATCH 173/342] More maybe_shadow_1_macro memes --- asm/field_map_obj.s | 611 -------------------------------------------- src/field_map_obj.c | 27 ++ 2 files changed, 27 insertions(+), 611 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 5b81fa7b5..86baf1b30 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,617 +5,6 @@ .text - thumb_func_start sub_8094FF8 -sub_8094FF8: @ 8094FF8 - ldrb r2, [r0, 0x1] - movs r3, 0x2 - orrs r2, r3 - strb r2, [r0, 0x1] - movs r0, 0x1 - strh r0, [r1, 0x32] - bx lr - thumb_func_end sub_8094FF8 - - thumb_func_start sub_8095008 -sub_8095008: @ 8095008 - ldrb r3, [r0, 0x1] - movs r2, 0x3 - negs r2, r2 - ands r2, r3 - strb r2, [r0, 0x1] - movs r0, 0x1 - strh r0, [r1, 0x32] - bx lr - thumb_func_end sub_8095008 - - thumb_func_start sub_8095018 -sub_8095018: @ 8095018 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x1 - movs r3, 0x1 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095044 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095018 - - thumb_func_start sub_8095044 -sub_8095044: @ 8095044 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095058 - movs r0, 0 - b _08095068 -_08095058: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095068: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095044 - - thumb_func_start sub_8095070 -sub_8095070: @ 8095070 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x2 - movs r3, 0x1 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809509C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095070 - - thumb_func_start sub_809509C -sub_809509C: @ 809509C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _080950B0 - movs r0, 0 - b _080950C0 -_080950B0: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_080950C0: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_809509C - - thumb_func_start sub_80950C8 -sub_80950C8: @ 80950C8 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x3 - movs r3, 0x1 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80950F4 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80950C8 - - thumb_func_start sub_80950F4 -sub_80950F4: @ 80950F4 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095108 - movs r0, 0 - b _08095118 -_08095108: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095118: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80950F4 - - thumb_func_start sub_8095120 -sub_8095120: @ 8095120 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x4 - movs r3, 0x1 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809514C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095120 - - thumb_func_start sub_809514C -sub_809514C: @ 809514C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095160 - movs r0, 0 - b _08095170 -_08095160: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095170: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_809514C - - thumb_func_start sub_8095178 -sub_8095178: @ 8095178 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x1 - movs r3, 0 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80951A4 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095178 - - thumb_func_start sub_80951A4 -sub_80951A4: @ 80951A4 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _080951B8 - movs r0, 0 - b _080951C8 -_080951B8: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_080951C8: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80951A4 - - thumb_func_start sub_80951D0 -sub_80951D0: @ 80951D0 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x2 - movs r3, 0 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80951FC - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80951D0 - - thumb_func_start sub_80951FC -sub_80951FC: @ 80951FC - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095210 - movs r0, 0 - b _08095220 -_08095210: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095220: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80951FC - - thumb_func_start sub_8095228 -sub_8095228: @ 8095228 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x3 - movs r3, 0 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095254 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095228 - - thumb_func_start sub_8095254 -sub_8095254: @ 8095254 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095268 - movs r0, 0 - b _08095278 -_08095268: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095278: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095254 - - thumb_func_start sub_8095280 -sub_8095280: @ 8095280 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x4 - movs r3, 0 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80952AC - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095280 - - thumb_func_start sub_80952AC -sub_80952AC: @ 80952AC - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _080952C0 - movs r0, 0 - b _080952D0 -_080952C0: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_080952D0: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80952AC - - thumb_func_start sub_80952D8 -sub_80952D8: @ 80952D8 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x1 - movs r3, 0 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095304 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80952D8 - - thumb_func_start sub_8095304 -sub_8095304: @ 8095304 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941E0 - lsls r0, 24 - cmp r0, 0 - bne _08095318 - movs r0, 0 - b _08095328 -_08095318: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095328: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095304 - - thumb_func_start sub_8095330 -sub_8095330: @ 8095330 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x2 - movs r3, 0 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809535C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095330 - - thumb_func_start sub_809535C -sub_809535C: @ 809535C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941E0 - lsls r0, 24 - cmp r0, 0 - bne _08095370 - movs r0, 0 - b _08095380 -_08095370: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095380: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_809535C - - thumb_func_start sub_8095388 -sub_8095388: @ 8095388 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x3 - movs r3, 0 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80953B4 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095388 - - thumb_func_start sub_80953B4 -sub_80953B4: @ 80953B4 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941E0 - lsls r0, 24 - cmp r0, 0 - bne _080953C8 - movs r0, 0 - b _080953D8 -_080953C8: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_080953D8: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80953B4 - - thumb_func_start sub_80953E0 -sub_80953E0: @ 80953E0 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x4 - movs r3, 0 - bl maybe_shadow_1 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809540C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80953E0 - - thumb_func_start sub_809540C -sub_809540C: @ 809540C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941E0 - lsls r0, 24 - cmp r0, 0 - bne _08095420 - movs r0, 0 - b _08095430 -_08095420: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095430: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_809540C - thumb_func_start sub_8095438 sub_8095438: @ 8095438 push {lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index c4b1255ad..db28ce1ca 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4565,3 +4565,30 @@ bool8 sub_8094F94(struct MapObject *mapObject, struct Sprite *sprite) sprite->data2 = 1; return TRUE; } + +bool8 sub_8094FF8(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_9 = TRUE; + sprite->data2 = 1; + return TRUE; +} + +bool8 sub_8095008(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_9 = FALSE; + sprite->data2 = 1; + return TRUE; +} + +maybe_shadow_1_macro(sub_8095018, maybe_shadow_1, sub_80941B0, DIR_SOUTH, 1, 2) +maybe_shadow_1_macro(sub_8095070, maybe_shadow_1, sub_80941B0, DIR_NORTH, 1, 2) +maybe_shadow_1_macro(sub_80950C8, maybe_shadow_1, sub_80941B0, DIR_WEST, 1, 2) +maybe_shadow_1_macro(sub_8095120, maybe_shadow_1, sub_80941B0, DIR_EAST, 1, 2) +maybe_shadow_1_macro(sub_8095178, maybe_shadow_1, sub_80941B0, DIR_SOUTH, 0, 0) +maybe_shadow_1_macro(sub_80951D0, maybe_shadow_1, sub_80941B0, DIR_NORTH, 0, 0) +maybe_shadow_1_macro(sub_8095228, maybe_shadow_1, sub_80941B0, DIR_WEST, 0, 0) +maybe_shadow_1_macro(sub_8095280, maybe_shadow_1, sub_80941B0, DIR_EAST, 0, 0) +maybe_shadow_1_macro(sub_80952D8, maybe_shadow_1, sub_80941E0, DIR_SOUTH, 0, 2) +maybe_shadow_1_macro(sub_8095330, maybe_shadow_1, sub_80941E0, DIR_NORTH, 0, 2) +maybe_shadow_1_macro(sub_8095388, maybe_shadow_1, sub_80941E0, DIR_WEST, 0, 2) +maybe_shadow_1_macro(sub_80953E0, maybe_shadow_1, sub_80941E0, DIR_EAST, 0, 2) From 513e3cd9bcd7628b9f2f24ab0e7a5f78763cf44e Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 13:00:43 -0400 Subject: [PATCH 174/342] Five small functions --- asm/field_map_obj.s | 59 --------------------------------------------- src/field_map_obj.c | 33 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 59 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 86baf1b30..f560a9372 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,65 +5,6 @@ .text - thumb_func_start sub_8095438 -sub_8095438: @ 8095438 - push {lr} - ldr r3, =gUnknown_085055CD - ldrb r2, [r0, 0x6] - adds r2, r3 - ldrb r2, [r2] - bl an_look_any - movs r0, 0x1 - pop {r1} - bx r1 - .pool - thumb_func_end sub_8095438 - - thumb_func_start sub_8095450 -sub_8095450: @ 8095450 - push {lr} - movs r2, 0x1 - movs r3, 0x14 - bl npc_set_direction_and_anim__an_proceed - movs r0, 0 - pop {r1} - bx r1 - thumb_func_end sub_8095450 - - thumb_func_start sub_8095460 -sub_8095460: @ 8095460 - ldrb r3, [r0, 0x3] - movs r2, 0x3 - negs r2, r2 - ands r2, r3 - strb r2, [r0, 0x3] - movs r0, 0x1 - strh r0, [r1, 0x32] - bx lr - thumb_func_end sub_8095460 - - thumb_func_start sub_8095470 -sub_8095470: @ 8095470 - ldrb r2, [r0, 0x3] - movs r3, 0x2 - orrs r2, r3 - strb r2, [r0, 0x3] - movs r0, 0x1 - strh r0, [r1, 0x32] - bx lr - thumb_func_end sub_8095470 - - thumb_func_start sub_8095480 -sub_8095480: @ 8095480 - ldrb r2, [r0, 0x1] - movs r3, 0x10 - orrs r2, r3 - strb r2, [r0, 0x1] - movs r0, 0x1 - strh r0, [r1, 0x32] - bx lr - thumb_func_end sub_8095480 - thumb_func_start sub_8095490 @ int sub_8095490(npc_state *npcState, int a2) sub_8095490: @ 8095490 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index db28ce1ca..b337349a2 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4592,3 +4592,36 @@ maybe_shadow_1_macro(sub_80952D8, maybe_shadow_1, sub_80941E0, DIR_SOUTH, 0, 2) maybe_shadow_1_macro(sub_8095330, maybe_shadow_1, sub_80941E0, DIR_NORTH, 0, 2) maybe_shadow_1_macro(sub_8095388, maybe_shadow_1, sub_80941E0, DIR_WEST, 0, 2) maybe_shadow_1_macro(sub_80953E0, maybe_shadow_1, sub_80941E0, DIR_EAST, 0, 2) + +bool8 sub_8095438(struct MapObject *mapObject, struct Sprite *sprite) +{ + an_look_any(mapObject, sprite, gUnknown_085055CD[mapObject->animPattern]); + return TRUE; +} + +bool8 sub_8095450(struct MapObject *mapObject, struct Sprite *sprite) +{ + npc_set_direction_and_anim__an_proceed(mapObject, sprite, DIR_SOUTH, 0x14); + return FALSE; +} + +bool8 sub_8095460(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_25 = FALSE; + sprite->data2 = 1; + return TRUE; +} + +bool8 sub_8095470(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_25 = TRUE; + sprite->data2 = 1; + return TRUE; +} + +bool8 sub_8095480(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_12 = TRUE; + sprite->data2 = 1; + return TRUE; +} From 7af98338830aaeb33be4c28dc26f14cc788f9df7 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 13:06:03 -0400 Subject: [PATCH 175/342] Additional script object callbacks --- asm/field_map_obj.s | 105 -------------------------------------------- src/field_map_obj.c | 45 +++++++++++++++++++ 2 files changed, 45 insertions(+), 105 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index f560a9372..526b37db6 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,111 +5,6 @@ .text - thumb_func_start sub_8095490 -@ int sub_8095490(npc_state *npcState, int a2) -sub_8095490: @ 8095490 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x5] - bl GetFieldObjectGraphicsInfo - ldrb r1, [r0, 0xC] - lsls r1, 25 - lsrs r1, 31 - lsls r1, 4 - ldrb r2, [r4, 0x1] - movs r0, 0x11 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r4, 0x1] - movs r0, 0x1 - strh r0, [r5, 0x32] - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095490 - - thumb_func_start sub_80954BC -sub_80954BC: @ 80954BC - ldrb r2, [r0, 0x1] - movs r3, 0x20 - orrs r2, r3 - strb r2, [r0, 0x1] - movs r0, 0x1 - strh r0, [r1, 0x32] - bx lr - thumb_func_end sub_80954BC - - thumb_func_start sub_80954CC -sub_80954CC: @ 80954CC - ldrb r3, [r0, 0x1] - movs r2, 0x21 - negs r2, r2 - ands r2, r3 - strb r2, [r0, 0x1] - movs r0, 0x1 - strh r0, [r1, 0x32] - bx lr - thumb_func_end sub_80954CC - - thumb_func_start do_exclamation_mark_bubble_1 -do_exclamation_mark_bubble_1: @ 80954DC - push {r4,lr} - adds r4, r1, 0 - ldr r1, =gFieldEffectSpawnParams - adds r2, r1, 0x4 - adds r3, r1, 0 - adds r3, 0x8 - bl FieldObjectGetLocalIdAndMap - movs r0, 0 - bl FieldEffectStart - movs r0, 0x1 - strh r0, [r4, 0x32] - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end do_exclamation_mark_bubble_1 - - thumb_func_start do_exclamation_mark_bubble_2 -do_exclamation_mark_bubble_2: @ 8095500 - push {r4,lr} - adds r4, r1, 0 - ldr r1, =gFieldEffectSpawnParams - adds r2, r1, 0x4 - adds r3, r1, 0 - adds r3, 0x8 - bl FieldObjectGetLocalIdAndMap - movs r0, 0x21 - bl FieldEffectStart - movs r0, 0x1 - strh r0, [r4, 0x32] - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end do_exclamation_mark_bubble_2 - - thumb_func_start do_heart_bubble -do_heart_bubble: @ 8095524 - push {r4,lr} - adds r4, r1, 0 - ldr r1, =gFieldEffectSpawnParams - adds r2, r1, 0x4 - adds r3, r1, 0 - adds r3, 0x8 - bl FieldObjectGetLocalIdAndMap - movs r0, 0x2E - bl FieldEffectStart - movs r0, 0x1 - strh r0, [r4, 0x32] - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end do_heart_bubble - thumb_func_start sub_8095548 sub_8095548: @ 8095548 push {r4,r5,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index b337349a2..432eb5b47 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4625,3 +4625,48 @@ bool8 sub_8095480(struct MapObject *mapObject, struct Sprite *sprite) sprite->data2 = 1; return TRUE; } + +bool8 sub_8095490(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_12 = GetFieldObjectGraphicsInfo(mapObject->graphicsId)->inanimate; + sprite->data2 = 1; + return TRUE; +} + +bool8 sub_80954BC(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_13 = TRUE; + sprite->data2 = 1; + return TRUE; +} + +bool8 sub_80954CC(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_13 = FALSE; + sprite->data2 = 1; + return TRUE; +} + +bool8 do_exclamation_mark_bubble_1(struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectGetLocalIdAndMap(mapObject, (u8 *)&gFieldEffectSpawnParams[0], (u8 *)&gFieldEffectSpawnParams[1], (u8 *)&gFieldEffectSpawnParams[2]); + FieldEffectStart(FLDEFF_EXCLAMATION_MARK_ICON_1); + sprite->data2 = 1; + return TRUE; +} + +bool8 do_exclamation_mark_bubble_2(struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectGetLocalIdAndMap(mapObject, (u8 *)&gFieldEffectSpawnParams[0], (u8 *)&gFieldEffectSpawnParams[1], (u8 *)&gFieldEffectSpawnParams[2]); + FieldEffectStart(FLDEFF_EXCLAMATION_MARK_ICON_2); + sprite->data2 = 1; + return TRUE; +} + +bool8 do_heart_bubble(struct MapObject *mapObject, struct Sprite *sprite) +{ + FieldObjectGetLocalIdAndMap(mapObject, (u8 *)&gFieldEffectSpawnParams[0], (u8 *)&gFieldEffectSpawnParams[1], (u8 *)&gFieldEffectSpawnParams[2]); + FieldEffectStart(FLDEFF_HEART_ICON); + sprite->data2 = 1; + return TRUE; +} From 4b04e92e8b236d91ea5cc45813f914f10a86b748 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 13:26:17 -0400 Subject: [PATCH 176/342] Ten more functions (remaining function count is 99) --- asm/field_map_obj.s | 221 --------------------------------- include/field_effect_helpers.h | 1 + include/trainer_see.h | 7 ++ src/field_map_obj.c | 99 +++++++++++++++ 4 files changed, 107 insertions(+), 221 deletions(-) create mode 100644 include/trainer_see.h diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 526b37db6..18e4298a0 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,227 +5,6 @@ .text - thumb_func_start sub_8095548 -sub_8095548: @ 8095548 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r0, [r4, 0x6] - cmp r0, 0x3F - bne _0809555E - adds r0, r4, 0 - bl sub_80B4578 - movs r0, 0 - b _08095586 -_0809555E: - subs r0, 0x39 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bhi _08095580 - adds r0, r4, 0 - bl sub_8155D78 - movs r0, 0x1 - strh r0, [r5, 0x32] - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809558C - lsls r0, 24 - lsrs r0, 24 - b _08095586 -_08095580: - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095586: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095548 - - thumb_func_start sub_809558C -sub_809558C: @ 809558C - push {r4,lr} - adds r4, r1, 0 - bl sub_8155DA0 - lsls r0, 24 - cmp r0, 0 - bne _0809559E - movs r0, 0 - b _080955A4 -_0809559E: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_080955A4: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_809558C - - thumb_func_start sub_80955AC -sub_80955AC: @ 80955AC - push {r4,lr} - adds r4, r1, 0 - adds r0, r4, 0 - movs r1, 0x1 - movs r2, 0 - bl obj_anim_image_set_and_seek - movs r0, 0x1 - strh r0, [r4, 0x32] - movs r0, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80955AC - - thumb_func_start sub_80955C8 -sub_80955C8: @ 80955C8 - push {r4,lr} - adds r4, r1, 0 - adds r0, r4, 0 - bl sub_80979BC - lsls r0, 24 - cmp r0, 0 - beq _080955E4 - adds r0, r4, 0 - movs r1, 0x20 - bl SetFieldObjectStepTimer - movs r0, 0x2 - strh r0, [r4, 0x32] -_080955E4: - movs r0, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80955C8 - - thumb_func_start sub_80955EC -sub_80955EC: @ 80955EC - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r2, [r4, 0x1] - lsls r1, r2, 26 - lsrs r1, 31 - movs r0, 0x1 - eors r1, r0 - lsls r1, 5 - subs r0, 0x22 - ands r0, r2 - orrs r0, r1 - strb r0, [r4, 0x1] - adds r0, r5, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - beq _0809561E - ldrb r0, [r4, 0x1] - movs r1, 0x20 - orrs r0, r1 - strb r0, [r4, 0x1] - movs r0, 0x3 - strh r0, [r5, 0x32] -_0809561E: - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80955EC - - thumb_func_start sub_8095628 -sub_8095628: @ 8095628 - push {r4,lr} - adds r4, r1, 0 - adds r0, r4, 0 - movs r1, 0x1 - movs r2, 0 - bl obj_anim_image_set_and_seek - movs r0, 0x1 - strh r0, [r4, 0x32] - movs r0, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8095628 - - thumb_func_start sub_8095644 -sub_8095644: @ 8095644 - push {r4,lr} - adds r4, r1, 0 - adds r0, r4, 0 - bl sub_80979BC - lsls r0, 24 - cmp r0, 0 - beq _08095660 - adds r0, r4, 0 - movs r1, 0x20 - bl SetFieldObjectStepTimer - movs r0, 0x2 - strh r0, [r4, 0x32] -_08095660: - movs r0, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8095644 - - thumb_func_start sub_8095668 -sub_8095668: @ 8095668 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - ldrb r2, [r4, 0x1] - lsls r1, r2, 26 - lsrs r1, 31 - movs r0, 0x1 - eors r1, r0 - lsls r1, 5 - subs r0, 0x22 - ands r0, r2 - orrs r0, r1 - strb r0, [r4, 0x1] - adds r0, r5, 0 - bl RunFieldObjectStepTimer - lsls r0, 24 - cmp r0, 0 - beq _0809569A - ldrb r0, [r4, 0x1] - movs r1, 0x20 - orrs r0, r1 - strb r0, [r4, 0x1] - movs r0, 0x3 - strh r0, [r5, 0x32] -_0809569A: - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095668 - - thumb_func_start sub_80956A4 -sub_80956A4: @ 80956A4 - ldrb r2, [r0, 0x3] - movs r3, 0x4 - orrs r2, r3 - strb r2, [r0, 0x3] - movs r0, 0x1 - strh r0, [r1, 0x32] - bx lr - thumb_func_end sub_80956A4 - - thumb_func_start sub_80956B4 -sub_80956B4: @ 80956B4 - ldrb r3, [r0, 0x3] - movs r2, 0x5 - negs r2, r2 - ands r2, r3 - strb r2, [r0, 0x3] - movs r0, 0x1 - strh r0, [r1, 0x32] - bx lr - thumb_func_end sub_80956B4 - thumb_func_start sub_80956C4 sub_80956C4: @ 80956C4 push {r4,lr} diff --git a/include/field_effect_helpers.h b/include/field_effect_helpers.h index 6504a84f1..e80daf3bd 100644 --- a/include/field_effect_helpers.h +++ b/include/field_effect_helpers.h @@ -11,5 +11,6 @@ // Exported ROM declarations u8 sub_8154228(void); +bool8 sub_8155DA0(struct MapObject *); #endif //GUARD_FIELD_EFFECT_HELPERS_H diff --git a/include/trainer_see.h b/include/trainer_see.h new file mode 100644 index 000000000..3f39783b8 --- /dev/null +++ b/include/trainer_see.h @@ -0,0 +1,7 @@ +#ifndef GUARD_TRAINER_SEE_H +#define GUARD_TRAINER_SEE_H + +void sub_80B4578(struct MapObject *); +void sub_8155D78(struct MapObject *); + +#endif //GUARD_TRAINER_SEE_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 432eb5b47..cc645751c 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -21,6 +21,7 @@ #include "field_effect.h" #include "field_effect_helpers.h" #include "field_camera.h" +#include "trainer_see.h" #include "field_map_obj.h" #define NUM_FIELD_MAP_OBJECT_TEMPLATES 0x51 @@ -120,6 +121,7 @@ static void FieldObjectExecSpecialAnim(struct MapObject *, struct Sprite *); static bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject *, s16, s16); static bool8 IsMetatileDirectionallyImpassable(struct MapObject *, s16, s16, u8); static bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *, s16, s16); +static bool8 sub_809558C(struct MapObject *, struct Sprite *); // ROM data @@ -4670,3 +4672,100 @@ bool8 do_heart_bubble(struct MapObject *mapObject, struct Sprite *sprite) sprite->data2 = 1; return TRUE; } + +bool8 sub_8095548(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (mapObject->animPattern == 0x3F) + { + sub_80B4578(mapObject); + return FALSE; + } + if (mapObject->animPattern != 0x39 && mapObject->animPattern != 0x3A) + { + sprite->data2 = 2; + return TRUE; + } + sub_8155D78(mapObject); + sprite->data2 = 1; + return sub_809558C(mapObject, sprite); +} + +static bool8 sub_809558C(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (sub_8155DA0(mapObject)) + { + sprite->data2 = 2; + return TRUE; + } + return FALSE; +} + +bool8 sub_80955AC(struct MapObject *mapObject, struct Sprite *sprite) +{ + obj_anim_image_set_and_seek(sprite, 1, 0); + sprite->data2 = 1; + return FALSE; +} + +bool8 sub_80955C8(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (sub_80979BC(sprite)) + { + SetFieldObjectStepTimer(sprite, 32); + sprite->data2 = 2; + } + return FALSE; +} + +bool8 sub_80955EC(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_13 ^= TRUE; + if (RunFieldObjectStepTimer(sprite)) + { + mapObject->mapobj_bit_13 = TRUE; + sprite->data2 = 3; + } + return FALSE; +} + +bool8 sub_8095628(struct MapObject *mapObject, struct Sprite *sprite) +{ + obj_anim_image_set_and_seek(sprite, 1, 0); + sprite->data2 = 1; + return FALSE; +} + +bool8 sub_8095644(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (sub_80979BC(sprite)) + { + SetFieldObjectStepTimer(sprite, 32); + sprite->data2 = 2; + } + return FALSE; +} + +bool8 sub_8095668(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_13 ^= TRUE; + if (RunFieldObjectStepTimer(sprite)) + { + mapObject->mapobj_bit_13 = TRUE; + sprite->data2 = 3; + } + return FALSE; +} + +bool8 sub_80956A4(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_26 = TRUE; + sprite->data2 = 1; + return TRUE; +} + +bool8 sub_80956B4(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_26 = FALSE; + sprite->data2 = 1; + return TRUE; +} From 283d9060a78cbf618c2c3807f3fa8e3b4b240c0d Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 13:59:30 -0400 Subject: [PATCH 177/342] Some functions relating to affine animations --- asm/field_map_obj.s | 283 -------------------------------------------- src/field_map_obj.c | 54 +++++++++ 2 files changed, 54 insertions(+), 283 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 18e4298a0..37c85f20f 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,289 +5,6 @@ .text - thumb_func_start sub_80956C4 -sub_80956C4: @ 80956C4 - push {r4,lr} - adds r4, r1, 0 - ldrb r0, [r4, 0x1] - movs r1, 0x3 - orrs r0, r1 - strb r0, [r4, 0x1] - adds r0, r4, 0 - bl InitSpriteAffineAnim - adds r2, r4, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2] - adds r4, 0x42 - ldrb r1, [r4] - movs r0, 0x3F - ands r0, r1 - strb r0, [r4] - movs r0, 0x1 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80956C4 - - thumb_func_start sub_80956F4 -sub_80956F4: @ 80956F4 - push {r4,lr} - adds r4, r1, 0 - ldrb r0, [r4, 0x3] - lsls r0, 26 - lsrs r0, 27 - bl FreeOamMatrix - ldrb r0, [r4, 0x1] - movs r1, 0x4 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x1] - lsrs r1, 6 - ldrb r2, [r4, 0x3] - lsrs r2, 6 - movs r3, 0 - adds r0, r4, 0 - bl CalcCenterToCornerVec - movs r0, 0x1 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80956F4 - - thumb_func_start sub_8095724 -sub_8095724: @ 8095724 - ldrb r1, [r0, 0x3] - movs r2, 0x8 - orrs r1, r2 - strb r1, [r0, 0x3] - movs r0, 0x1 - bx lr - thumb_func_end sub_8095724 - - thumb_func_start sub_8095730 -sub_8095730: @ 8095730 - ldrb r2, [r0, 0x3] - movs r1, 0x9 - negs r1, r1 - ands r1, r2 - strb r1, [r0, 0x3] - movs r0, 0x1 - bx lr - thumb_func_end sub_8095730 - - thumb_func_start sub_8095740 -sub_8095740: @ 8095740 - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - movs r2, 0x1 - bl sub_8093B60 - adds r2, r4, 0 - adds r2, 0x2C - ldrb r1, [r2] - movs r0, 0x7F - ands r0, r1 - strb r0, [r2] - adds r0, r4, 0 - movs r1, 0 - bl StartSpriteAffineAnimIfDifferent - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_8095774 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095740 - - thumb_func_start sub_8095774 -sub_8095774: @ 8095774 - push {r4,lr} - adds r4, r1, 0 - bl an_walk_any_2 - lsls r0, 24 - cmp r0, 0 - bne _08095786 - movs r0, 0 - b _08095798 -_08095786: - adds r2, r4, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2] - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08095798: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8095774 - - thumb_func_start sub_80957A0 -sub_80957A0: @ 80957A0 - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - movs r2, 0x1 - bl sub_8093B60 - adds r2, r4, 0 - adds r2, 0x2C - ldrb r1, [r2] - movs r0, 0x7F - ands r0, r1 - strb r0, [r2] - adds r0, r4, 0 - movs r1, 0x1 - bl ChangeSpriteAffineAnimIfDifferent - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_80957D4 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80957A0 - - thumb_func_start sub_80957D4 -sub_80957D4: @ 80957D4 - push {r4,lr} - adds r4, r1, 0 - bl an_walk_any_2 - lsls r0, 24 - cmp r0, 0 - bne _080957E6 - movs r0, 0 - b _080957F8 -_080957E6: - adds r2, r4, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2] - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_080957F8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80957D4 - - thumb_func_start sub_8095800 -sub_8095800: @ 8095800 - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - movs r2, 0x3 - movs r3, 0x1 - bl do_go_anim - adds r2, r4, 0 - adds r2, 0x2C - ldrb r1, [r2] - movs r0, 0x7F - ands r0, r1 - strb r0, [r2] - adds r0, r4, 0 - movs r1, 0x2 - bl ChangeSpriteAffineAnimIfDifferent - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_8095834 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095800 - - thumb_func_start sub_8095834 -sub_8095834: @ 8095834 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08095846 - movs r0, 0 - b _08095858 -_08095846: - adds r2, r4, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2] - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08095858: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8095834 - - thumb_func_start sub_8095860 -sub_8095860: @ 8095860 - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - movs r2, 0x4 - movs r3, 0x1 - bl do_go_anim - adds r2, r4, 0 - adds r2, 0x2C - ldrb r1, [r2] - movs r0, 0x7F - ands r0, r1 - strb r0, [r2] - adds r0, r4, 0 - movs r1, 0x3 - bl ChangeSpriteAffineAnimIfDifferent - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_8095894 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095860 - - thumb_func_start sub_8095894 -sub_8095894: @ 8095894 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _080958A6 - movs r0, 0 - b _080958B8 -_080958A6: - adds r2, r4, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2] - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_080958B8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8095894 - thumb_func_start sub_80958C0 sub_80958C0: @ 80958C0 push {r4-r6,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index cc645751c..3e72f538c 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4769,3 +4769,57 @@ bool8 sub_80956B4(struct MapObject *mapObject, struct Sprite *sprite) sprite->data2 = 1; return TRUE; } + +bool8 sub_80956C4(struct MapObject *mapObject, struct Sprite *sprite) +{ + sprite->oam.affineMode = 3; + InitSpriteAffineAnim(sprite); + sprite->affineAnimPaused = TRUE; + sprite->subspriteMode = 0; + return TRUE; +} + +bool8 sub_80956F4(struct MapObject *mapObject, struct Sprite *sprite) +{ + FreeOamMatrix(sprite->oam.matrixNum); + sprite->oam.affineMode = 0; + CalcCenterToCornerVec(sprite, sprite->oam.shape, sprite->oam.size, sprite->oam.affineMode); + return TRUE; +} + +bool8 sub_8095724(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_27 = TRUE; + return TRUE; +} + +bool8 sub_8095730(struct MapObject *mapObject, struct Sprite *sprite) +{ + mapObject->mapobj_bit_27 = FALSE; + return TRUE; +} + +#define affine_an_walk_any_2_macro(name, fn, fn2, action, anim, ...)\ +static bool8 name##_2(struct MapObject *, struct Sprite *);\ +bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + fn(mapObject, sprite, __VA_ARGS__);\ + sprite->affineAnimPaused = FALSE;\ + action(sprite, anim);\ + return name##_2(mapObject, sprite);\ +}\ +static bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + if (fn2(mapObject, sprite))\ + {\ + sprite->affineAnimPaused = TRUE;\ + sprite->data2 = 2;\ + return TRUE;\ + }\ + return FALSE;\ +}\ + +affine_an_walk_any_2_macro(sub_8095740, sub_8093B60, an_walk_any_2, StartSpriteAffineAnimIfDifferent, 0, DIR_SOUTH) +affine_an_walk_any_2_macro(sub_80957A0, sub_8093B60, an_walk_any_2, ChangeSpriteAffineAnimIfDifferent, 1, DIR_SOUTH) +affine_an_walk_any_2_macro(sub_8095800, do_go_anim, npc_obj_ministep_stop_on_arrival, ChangeSpriteAffineAnimIfDifferent, 2, DIR_WEST, 1) +affine_an_walk_any_2_macro(sub_8095860, do_go_anim, npc_obj_ministep_stop_on_arrival, ChangeSpriteAffineAnimIfDifferent, 3, DIR_EAST, 1) From e544d5f8b8704d5ca77de8b1bd8245daad973490 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 14:02:43 -0400 Subject: [PATCH 178/342] sub_80958C0 and callers --- asm/field_map_obj.s | 72 --------------------------------------------- src/field_map_obj.c | 33 +++++++++++++++++++++ 2 files changed, 33 insertions(+), 72 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 37c85f20f..5831f7213 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,78 +5,6 @@ .text - thumb_func_start sub_80958C0 -sub_80958C0: @ 80958C0 - push {r4-r6,lr} - adds r5, r0, 0 - adds r6, r1, 0 - lsls r4, r2, 24 - lsrs r4, 24 - adds r1, r4, 0 - bl FieldObjectSetDirection - adds r0, r5, 0 - bl npc_coords_shift_still - adds r0, r4, 0 - bl sub_80929FC - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r5, 0 - adds r1, r6, 0 - bl obj_npc_animation_step - adds r2, r6, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2] - movs r0, 0x1 - strh r0, [r6, 0x32] - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_80958C0 - - thumb_func_start sub_8095900 -sub_8095900: @ 8095900 - push {lr} - movs r2, 0x1 - bl sub_80958C0 - movs r0, 0x1 - pop {r1} - bx r1 - thumb_func_end sub_8095900 - - thumb_func_start sub_8095910 -sub_8095910: @ 8095910 - push {lr} - movs r2, 0x2 - bl sub_80958C0 - movs r0, 0x1 - pop {r1} - bx r1 - thumb_func_end sub_8095910 - - thumb_func_start sub_8095920 -sub_8095920: @ 8095920 - push {lr} - movs r2, 0x3 - bl sub_80958C0 - movs r0, 0x1 - pop {r1} - bx r1 - thumb_func_end sub_8095920 - - thumb_func_start sub_8095930 -sub_8095930: @ 8095930 - push {lr} - movs r2, 0x4 - bl sub_80958C0 - movs r0, 0x1 - pop {r1} - bx r1 - thumb_func_end sub_8095930 - thumb_func_start sub_8095940 sub_8095940: @ 8095940 push {r4,r5,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 3e72f538c..a5c3c013f 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4823,3 +4823,36 @@ affine_an_walk_any_2_macro(sub_8095740, sub_8093B60, an_walk_any_2, StartSpriteA affine_an_walk_any_2_macro(sub_80957A0, sub_8093B60, an_walk_any_2, ChangeSpriteAffineAnimIfDifferent, 1, DIR_SOUTH) affine_an_walk_any_2_macro(sub_8095800, do_go_anim, npc_obj_ministep_stop_on_arrival, ChangeSpriteAffineAnimIfDifferent, 2, DIR_WEST, 1) affine_an_walk_any_2_macro(sub_8095860, do_go_anim, npc_obj_ministep_stop_on_arrival, ChangeSpriteAffineAnimIfDifferent, 3, DIR_EAST, 1) + +static void sub_80958C0(struct MapObject *mapObject, struct Sprite *sprite, u8 direction) +{ + FieldObjectSetDirection(mapObject, direction); + npc_coords_shift_still(mapObject); + obj_npc_animation_step(mapObject, sprite, sub_80929FC(direction)); + sprite->animPaused = TRUE; + sprite->data2 = 1; +} + +bool8 sub_8095900(struct MapObject *mapObject, struct Sprite *sprite) +{ + sub_80958C0(mapObject, sprite, DIR_SOUTH); + return TRUE; +} + +bool8 sub_8095910(struct MapObject *mapObject, struct Sprite *sprite) +{ + sub_80958C0(mapObject, sprite, DIR_NORTH); + return TRUE; +} + +bool8 sub_8095920(struct MapObject *mapObject, struct Sprite *sprite) +{ + sub_80958C0(mapObject, sprite, DIR_WEST); + return TRUE; +} + +bool8 sub_8095930(struct MapObject *mapObject, struct Sprite *sprite) +{ + sub_80958C0(mapObject, sprite, DIR_EAST); + return TRUE; +} From c9699169ad0e07326a3d77b1836681b870ecd618 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 14:06:43 -0400 Subject: [PATCH 179/342] another block of directional anim functions --- asm/field_map_obj.s | 240 -------------------------------------------- src/field_map_obj.c | 20 ++++ 2 files changed, 20 insertions(+), 240 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 5831f7213..088fd279a 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,246 +5,6 @@ .text - thumb_func_start sub_8095940 -sub_8095940: @ 8095940 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - bl sub_80929BC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x1 - bl npc_set_direction_and_anim__an_proceed - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095940 - - thumb_func_start sub_8095964 -sub_8095964: @ 8095964 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - bl sub_80929BC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x2 - bl npc_set_direction_and_anim__an_proceed - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095964 - - thumb_func_start sub_8095988 -sub_8095988: @ 8095988 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x3 - bl sub_80929BC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x3 - bl npc_set_direction_and_anim__an_proceed - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095988 - - thumb_func_start sub_80959AC -sub_80959AC: @ 80959AC - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x4 - bl sub_80929BC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x4 - bl npc_set_direction_and_anim__an_proceed - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80959AC - - thumb_func_start sub_80959D0 -sub_80959D0: @ 80959D0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - bl sub_80929DC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x1 - bl npc_set_direction_and_anim__an_proceed - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80959D0 - - thumb_func_start sub_80959F4 -sub_80959F4: @ 80959F4 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - bl sub_80929DC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x2 - bl npc_set_direction_and_anim__an_proceed - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80959F4 - - thumb_func_start sub_8095A18 -sub_8095A18: @ 8095A18 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x3 - bl sub_80929DC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x3 - bl npc_set_direction_and_anim__an_proceed - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095A18 - - thumb_func_start sub_8095A3C -sub_8095A3C: @ 8095A3C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x4 - bl sub_80929DC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x4 - bl npc_set_direction_and_anim__an_proceed - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095A3C - - thumb_func_start sub_8095A60 -sub_8095A60: @ 8095A60 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - bl sub_80929EC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x1 - bl npc_set_direction_and_anim__an_proceed - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095A60 - - thumb_func_start sub_8095A84 -sub_8095A84: @ 8095A84 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - bl sub_80929EC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x2 - bl npc_set_direction_and_anim__an_proceed - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095A84 - - thumb_func_start sub_8095AA8 -sub_8095AA8: @ 8095AA8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x3 - bl sub_80929EC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x3 - bl npc_set_direction_and_anim__an_proceed - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095AA8 - - thumb_func_start sub_8095ACC -sub_8095ACC: @ 8095ACC - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x4 - bl sub_80929EC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x4 - bl npc_set_direction_and_anim__an_proceed - movs r0, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095ACC - thumb_func_start sub_8095AF0 sub_8095AF0: @ 8095AF0 push {r4,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index a5c3c013f..3e1e3d19e 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4856,3 +4856,23 @@ bool8 sub_8095930(struct MapObject *mapObject, struct Sprite *sprite) sub_80958C0(mapObject, sprite, DIR_EAST); return TRUE; } + +#define set_dirn_and_anim__an_proceed(name, direction, anims)\ +bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ +{\ + npc_set_direction_and_anim__an_proceed(mapObject, sprite, direction, anims(direction));\ + return FALSE;\ +} + +set_dirn_and_anim__an_proceed(sub_8095940, DIR_SOUTH, sub_80929BC) +set_dirn_and_anim__an_proceed(sub_8095964, DIR_NORTH, sub_80929BC) +set_dirn_and_anim__an_proceed(sub_8095988, DIR_WEST, sub_80929BC) +set_dirn_and_anim__an_proceed(sub_80959AC, DIR_EAST, sub_80929BC) +set_dirn_and_anim__an_proceed(sub_80959D0, DIR_SOUTH, sub_80929DC) +set_dirn_and_anim__an_proceed(sub_80959F4, DIR_NORTH, sub_80929DC) +set_dirn_and_anim__an_proceed(sub_8095A18, DIR_WEST, sub_80929DC) +set_dirn_and_anim__an_proceed(sub_8095A3C, DIR_EAST, sub_80929DC) +set_dirn_and_anim__an_proceed(sub_8095A60, DIR_SOUTH, sub_80929EC) +set_dirn_and_anim__an_proceed(sub_8095A84, DIR_NORTH, sub_80929EC) +set_dirn_and_anim__an_proceed(sub_8095AA8, DIR_WEST, sub_80929EC) +set_dirn_and_anim__an_proceed(sub_8095ACC, DIR_EAST, sub_80929EC) From b54689b9a37d38ada226504c384054c56310e2dc Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 14:12:32 -0400 Subject: [PATCH 180/342] Another four functions --- asm/field_map_obj.s | 87 --------------------------------------- include/map_obj_8097404.h | 2 + src/field_map_obj.c | 37 +++++++++++++++++ 3 files changed, 39 insertions(+), 87 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 088fd279a..a04e75e80 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,93 +5,6 @@ .text - thumb_func_start sub_8095AF0 -sub_8095AF0: @ 8095AF0 - push {r4,lr} - adds r4, r1, 0 - adds r0, r4, 0 - bl sub_8097750 - adds r4, 0x2C - ldrb r1, [r4] - movs r0, 0x41 - negs r0, r0 - ands r0, r1 - strb r0, [r4] - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_8095AF0 - - thumb_func_start sub_8095B0C -sub_8095B0C: @ 8095B0C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - adds r0, r5, 0 - bl sub_8097758 - lsls r0, 24 - cmp r0, 0 - bne _08095B22 - movs r0, 0 - b _08095B3E -_08095B22: - adds r0, r4, 0 - bl npc_coords_shift_still - ldrb r0, [r4] - movs r1, 0x8 - orrs r0, r1 - strb r0, [r4] - adds r2, r5, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2] - movs r0, 0x1 -_08095B3E: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095B0C - - thumb_func_start sub_8095B44 -sub_8095B44: @ 8095B44 - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - bl sub_8095AF0 - movs r0, 0x1 - strh r0, [r4, 0x32] - adds r0, r5, 0 - adds r1, r4, 0 - bl sub_8095B64 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095B44 - - thumb_func_start sub_8095B64 -sub_8095B64: @ 8095B64 - push {r4,lr} - adds r4, r1, 0 - bl sub_8095B0C - lsls r0, 24 - cmp r0, 0 - bne _08095B76 - movs r0, 0 - b _08095B7C -_08095B76: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08095B7C: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8095B64 - thumb_func_start sub_8095B84 sub_8095B84: @ 8095B84 push {r4-r6,lr} diff --git a/include/map_obj_8097404.h b/include/map_obj_8097404.h index 08b69f49a..fd5616330 100644 --- a/include/map_obj_8097404.h +++ b/include/map_obj_8097404.h @@ -24,5 +24,7 @@ u8 sub_809785C(struct Sprite *); u8 sub_80978E4(struct Sprite *); void obj_anim_image_set_and_seek(struct Sprite *, u8, u8); bool8 sub_80979BC(struct Sprite *); +void sub_8097750(struct Sprite *); +bool8 sub_8097758(struct Sprite *); #endif //GUARD_MAP_OBJ_8097404_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 3e1e3d19e..9092a6089 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4876,3 +4876,40 @@ set_dirn_and_anim__an_proceed(sub_8095A60, DIR_SOUTH, sub_80929EC) set_dirn_and_anim__an_proceed(sub_8095A84, DIR_NORTH, sub_80929EC) set_dirn_and_anim__an_proceed(sub_8095AA8, DIR_WEST, sub_80929EC) set_dirn_and_anim__an_proceed(sub_8095ACC, DIR_EAST, sub_80929EC) + +void sub_8095AF0(struct MapObject *mapObject, struct Sprite *sprite) +{ + sub_8097750(sprite); + sprite->animPaused = FALSE; +} + +bool8 sub_8095B0C(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (sub_8097758(sprite)) + { + npc_coords_shift_still(mapObject); + mapObject->mapobj_bit_3 = TRUE; + sprite->animPaused = TRUE; + return TRUE; + } + return FALSE; +} + +static bool8 sub_8095B64(struct MapObject *, struct Sprite *); + +bool8 sub_8095B44(struct MapObject *mapObject, struct Sprite *sprite) +{ + sub_8095AF0(mapObject, sprite); + sprite->data2 = 1; + return sub_8095B64(mapObject, sprite); +} + +static bool8 sub_8095B64(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (sub_8095B0C(mapObject, sprite)) + { + sprite->data2 = 2; + return TRUE; + } + return FALSE; +} From 0689afbd865d017171c86c1743d2a3d123abb156 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 14:51:10 -0400 Subject: [PATCH 181/342] Yet more maybe_shadow_1 memes --- asm/field_map_obj.s | 621 -------------------------------------------- src/field_map_obj.c | 40 ++- 2 files changed, 30 insertions(+), 631 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index a04e75e80..72fe317e4 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,627 +5,6 @@ .text - thumb_func_start sub_8095B84 -sub_8095B84: @ 8095B84 - push {r4-r6,lr} - sub sp, 0x4 - adds r6, r0, 0 - adds r5, r1, 0 - adds r4, r2, 0 - ldr r0, [sp, 0x14] - lsls r4, 24 - lsrs r4, 24 - lsls r3, 24 - lsrs r3, 24 - lsls r0, 24 - lsrs r0, 24 - str r0, [sp] - adds r0, r6, 0 - adds r2, r4, 0 - bl sub_8093FC4 - adds r0, r4, 0 - bl sub_80929BC - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r5, 0 - bl StartSpriteAnimIfDifferent - adds r0, r6, 0 - bl DoShadowFieldEffect - add sp, 0x4 - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_8095B84 - - thumb_func_start sub_8095BC8 -sub_8095BC8: @ 8095BC8 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x1 - movs r3, 0 - bl sub_8095B84 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095BF4 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095BC8 - - thumb_func_start sub_8095BF4 -sub_8095BF4: @ 8095BF4 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095C08 - movs r0, 0 - b _08095C18 -_08095C08: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095C18: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095BF4 - - thumb_func_start sub_8095C20 -sub_8095C20: @ 8095C20 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x2 - movs r3, 0 - bl sub_8095B84 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095C4C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095C20 - - thumb_func_start sub_8095C4C -sub_8095C4C: @ 8095C4C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095C60 - movs r0, 0 - b _08095C70 -_08095C60: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095C70: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095C4C - - thumb_func_start sub_8095C78 -sub_8095C78: @ 8095C78 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x3 - movs r3, 0 - bl sub_8095B84 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095CA4 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095C78 - - thumb_func_start sub_8095CA4 -sub_8095CA4: @ 8095CA4 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095CB8 - movs r0, 0 - b _08095CC8 -_08095CB8: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095CC8: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095CA4 - - thumb_func_start sub_8095CD0 -sub_8095CD0: @ 8095CD0 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x4 - movs r3, 0 - bl sub_8095B84 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095CFC - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095CD0 - - thumb_func_start sub_8095CFC -sub_8095CFC: @ 8095CFC - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095D10 - movs r0, 0 - b _08095D20 -_08095D10: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095D20: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095CFC - - thumb_func_start sub_8095D28 -sub_8095D28: @ 8095D28 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x1 - movs r3, 0x1 - bl sub_8095B84 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095D54 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095D28 - - thumb_func_start sub_8095D54 -sub_8095D54: @ 8095D54 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095D68 - movs r0, 0 - b _08095D78 -_08095D68: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095D78: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095D54 - - thumb_func_start sub_8095D80 -sub_8095D80: @ 8095D80 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x2 - movs r3, 0x1 - bl sub_8095B84 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095DAC - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095D80 - - thumb_func_start sub_8095DAC -sub_8095DAC: @ 8095DAC - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095DC0 - movs r0, 0 - b _08095DD0 -_08095DC0: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095DD0: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095DAC - - thumb_func_start sub_8095DD8 -sub_8095DD8: @ 8095DD8 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x3 - movs r3, 0x1 - bl sub_8095B84 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095E04 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095DD8 - - thumb_func_start sub_8095E04 -sub_8095E04: @ 8095E04 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095E18 - movs r0, 0 - b _08095E28 -_08095E18: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095E28: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095E04 - - thumb_func_start sub_8095E30 -sub_8095E30: @ 8095E30 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x4 - movs r3, 0x1 - bl sub_8095B84 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095E5C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095E30 - - thumb_func_start sub_8095E5C -sub_8095E5C: @ 8095E5C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095E70 - movs r0, 0 - b _08095E80 -_08095E70: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095E80: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095E5C - - thumb_func_start sub_8095E88 -sub_8095E88: @ 8095E88 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x1 - movs r3, 0x2 - bl sub_8095B84 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095EB4 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095E88 - - thumb_func_start sub_8095EB4 -sub_8095EB4: @ 8095EB4 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095EC8 - movs r0, 0 - b _08095ED8 -_08095EC8: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095ED8: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095EB4 - - thumb_func_start sub_8095EE0 -sub_8095EE0: @ 8095EE0 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x2 - movs r3, 0x2 - bl sub_8095B84 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095F0C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095EE0 - - thumb_func_start sub_8095F0C -sub_8095F0C: @ 8095F0C - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095F20 - movs r0, 0 - b _08095F30 -_08095F20: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095F30: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095F0C - - thumb_func_start sub_8095F38 -sub_8095F38: @ 8095F38 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x3 - movs r3, 0x2 - bl sub_8095B84 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095F64 - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095F38 - - thumb_func_start sub_8095F64 -sub_8095F64: @ 8095F64 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095F78 - movs r0, 0 - b _08095F88 -_08095F78: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095F88: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095F64 - - thumb_func_start sub_8095F90 -sub_8095F90: @ 8095F90 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0 - str r0, [sp] - adds r0, r4, 0 - movs r2, 0x4 - movs r3, 0x2 - bl sub_8095B84 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8095FBC - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095F90 - - thumb_func_start sub_8095FBC -sub_8095FBC: @ 8095FBC - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_80941B0 - lsls r0, 24 - cmp r0, 0 - bne _08095FD0 - movs r0, 0 - b _08095FE0 -_08095FD0: - ldrb r0, [r4, 0x2] - movs r1, 0x41 - negs r1, r1 - ands r1, r0 - strb r1, [r4, 0x2] - movs r0, 0x2 - strh r0, [r5, 0x32] - movs r0, 0x1 -_08095FE0: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095FBC - thumb_func_start sub_8095FE8 sub_8095FE8: @ 8095FE8 push {r4,r5,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 9092a6089..87ae05ad7 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4381,10 +4381,10 @@ static bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ return FALSE;\ } -maybe_shadow_1_macro(sub_8094230, maybe_shadow_1, sub_80941B0, 1, 2, 0) -maybe_shadow_1_macro(sub_8094288, maybe_shadow_1, sub_80941B0, 2, 2, 0) -maybe_shadow_1_macro(sub_80942E0, maybe_shadow_1, sub_80941B0, 3, 2, 0) -maybe_shadow_1_macro(sub_8094338, maybe_shadow_1, sub_80941B0, 4, 2, 0) +maybe_shadow_1_macro(sub_8094230, maybe_shadow_1, sub_80941B0, DIR_SOUTH, 2, 0) +maybe_shadow_1_macro(sub_8094288, maybe_shadow_1, sub_80941B0, DIR_NORTH, 2, 0) +maybe_shadow_1_macro(sub_80942E0, maybe_shadow_1, sub_80941B0, DIR_WEST, 2, 0) +maybe_shadow_1_macro(sub_8094338, maybe_shadow_1, sub_80941B0, DIR_EAST, 2, 0) void sub_8094390(struct Sprite *sprite, u16 duration) { @@ -4584,16 +4584,16 @@ bool8 sub_8095008(struct MapObject *mapObject, struct Sprite *sprite) maybe_shadow_1_macro(sub_8095018, maybe_shadow_1, sub_80941B0, DIR_SOUTH, 1, 2) maybe_shadow_1_macro(sub_8095070, maybe_shadow_1, sub_80941B0, DIR_NORTH, 1, 2) -maybe_shadow_1_macro(sub_80950C8, maybe_shadow_1, sub_80941B0, DIR_WEST, 1, 2) -maybe_shadow_1_macro(sub_8095120, maybe_shadow_1, sub_80941B0, DIR_EAST, 1, 2) +maybe_shadow_1_macro(sub_80950C8, maybe_shadow_1, sub_80941B0, DIR_WEST, 1, 2) +maybe_shadow_1_macro(sub_8095120, maybe_shadow_1, sub_80941B0, DIR_EAST, 1, 2) maybe_shadow_1_macro(sub_8095178, maybe_shadow_1, sub_80941B0, DIR_SOUTH, 0, 0) maybe_shadow_1_macro(sub_80951D0, maybe_shadow_1, sub_80941B0, DIR_NORTH, 0, 0) -maybe_shadow_1_macro(sub_8095228, maybe_shadow_1, sub_80941B0, DIR_WEST, 0, 0) -maybe_shadow_1_macro(sub_8095280, maybe_shadow_1, sub_80941B0, DIR_EAST, 0, 0) +maybe_shadow_1_macro(sub_8095228, maybe_shadow_1, sub_80941B0, DIR_WEST, 0, 0) +maybe_shadow_1_macro(sub_8095280, maybe_shadow_1, sub_80941B0, DIR_EAST, 0, 0) maybe_shadow_1_macro(sub_80952D8, maybe_shadow_1, sub_80941E0, DIR_SOUTH, 0, 2) maybe_shadow_1_macro(sub_8095330, maybe_shadow_1, sub_80941E0, DIR_NORTH, 0, 2) -maybe_shadow_1_macro(sub_8095388, maybe_shadow_1, sub_80941E0, DIR_WEST, 0, 2) -maybe_shadow_1_macro(sub_80953E0, maybe_shadow_1, sub_80941E0, DIR_EAST, 0, 2) +maybe_shadow_1_macro(sub_8095388, maybe_shadow_1, sub_80941E0, DIR_WEST, 0, 2) +maybe_shadow_1_macro(sub_80953E0, maybe_shadow_1, sub_80941E0, DIR_EAST, 0, 2) bool8 sub_8095438(struct MapObject *mapObject, struct Sprite *sprite) { @@ -4913,3 +4913,23 @@ static bool8 sub_8095B64(struct MapObject *mapObject, struct Sprite *sprite) } return FALSE; } + +void sub_8095B84(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 speed, u8 a4) +{ + sub_8093FC4(mapObject, sprite, direction, speed, a4); + StartSpriteAnimIfDifferent(sprite, sub_80929BC(direction)); + DoShadowFieldEffect(mapObject); +} + +maybe_shadow_1_macro(sub_8095BC8, sub_8095B84, sub_80941B0, DIR_SOUTH, 0, 1) +maybe_shadow_1_macro(sub_8095C20, sub_8095B84, sub_80941B0, DIR_NORTH, 0, 1) +maybe_shadow_1_macro(sub_8095C78, sub_8095B84, sub_80941B0, DIR_WEST, 0, 1) +maybe_shadow_1_macro(sub_8095CD0, sub_8095B84, sub_80941B0, DIR_EAST, 0, 1) +maybe_shadow_1_macro(sub_8095D28, sub_8095B84, sub_80941B0, DIR_SOUTH, 1, 1) +maybe_shadow_1_macro(sub_8095D80, sub_8095B84, sub_80941B0, DIR_NORTH, 1, 1) +maybe_shadow_1_macro(sub_8095DD8, sub_8095B84, sub_80941B0, DIR_WEST, 1, 1) +maybe_shadow_1_macro(sub_8095E30, sub_8095B84, sub_80941B0, DIR_EAST, 1, 1) +maybe_shadow_1_macro(sub_8095E88, sub_8095B84, sub_80941B0, DIR_SOUTH, 2, 0) +maybe_shadow_1_macro(sub_8095EE0, sub_8095B84, sub_80941B0, DIR_NORTH, 2, 0) +maybe_shadow_1_macro(sub_8095F38, sub_8095B84, sub_80941B0, DIR_WEST, 2, 0) +maybe_shadow_1_macro(sub_8095F90, sub_8095B84, sub_80941B0, DIR_EAST, 2, 0) From 7bf307e7aee242ddba099d8963b13ad022efb9f1 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 14:59:52 -0400 Subject: [PATCH 182/342] The memes keep coming --- asm/field_map_obj.s | 112 -------------------------------------------- src/field_map_obj.c | 39 ++++++++------- 2 files changed, 22 insertions(+), 129 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 72fe317e4..ded1a6b97 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,118 +5,6 @@ .text - thumb_func_start sub_8095FE8 -sub_8095FE8: @ 8095FE8 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x1 - bl sub_80929FC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x8 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x1 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8095FE8 - - thumb_func_start sub_8096020 -sub_8096020: @ 8096020 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x2 - bl sub_80929FC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x8 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x2 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8096020 - - thumb_func_start sub_8096058 -sub_8096058: @ 8096058 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x3 - bl sub_80929FC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x8 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x3 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8096058 - - thumb_func_start sub_8096090 -sub_8096090: @ 8096090 - push {r4,r5,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r5, r1, 0 - movs r0, 0x4 - bl sub_80929FC - adds r3, r0, 0 - lsls r3, 24 - lsrs r3, 24 - movs r0, 0x8 - str r0, [sp] - adds r0, r4, 0 - adds r1, r5, 0 - movs r2, 0x4 - bl sub_8094554 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_809459C - lsls r0, 24 - lsrs r0, 24 - add sp, 0x4 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8096090 - thumb_func_start sub_80960C8 sub_80960C8: @ 80960C8 push {r4,r5,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 87ae05ad7..f1de23307 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4453,27 +4453,27 @@ bool8 sub_80945C4(struct MapObject *mapObject, struct Sprite *sprite) bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ {\ u8 animId;\ - animId = get_##images##_image_anim_num(DIR_##direction);\ + animId = images(DIR_##direction);\ sub_8094554(mapObject, sprite, DIR_##direction, animId, duration);\ return timer(mapObject, sprite);\ } -special_anim_with_timer_2(sub_8094600, SOUTH, go, 32, sub_80945C4) -special_anim_with_timer_2(sub_8094638, NORTH, go, 32, sub_80945C4) -special_anim_with_timer_2(sub_8094670, WEST, go, 32, sub_80945C4) -special_anim_with_timer_2(sub_80946A8, EAST, go, 32, sub_80945C4) -special_anim_with_timer_2(sub_80946E0, SOUTH, go, 16, sub_809459C) -special_anim_with_timer_2(sub_8094718, NORTH, go, 16, sub_809459C) -special_anim_with_timer_2(sub_8094750, WEST, go, 16, sub_809459C) -special_anim_with_timer_2(sub_8094788, EAST, go, 16, sub_809459C) -special_anim_with_timer_2(sub_80947C0, SOUTH, go_fast, 8, sub_809459C) -special_anim_with_timer_2(sub_80947F8, NORTH, go_fast, 8, sub_809459C) -special_anim_with_timer_2(sub_8094830, WEST, go_fast, 8, sub_809459C) -special_anim_with_timer_2(sub_8094868, EAST, go_fast, 8, sub_809459C) -special_anim_with_timer_2(sub_80948A0, SOUTH, go_faster, 4, sub_809459C) -special_anim_with_timer_2(sub_80948D8, NORTH, go_faster, 4, sub_809459C) -special_anim_with_timer_2(sub_8094910, WEST, go_faster, 4, sub_809459C) -special_anim_with_timer_2(sub_8094948, EAST, go_faster, 4, sub_809459C) +special_anim_with_timer_2(sub_8094600, SOUTH, get_go_image_anim_num, 32, sub_80945C4) +special_anim_with_timer_2(sub_8094638, NORTH, get_go_image_anim_num, 32, sub_80945C4) +special_anim_with_timer_2(sub_8094670, WEST, get_go_image_anim_num, 32, sub_80945C4) +special_anim_with_timer_2(sub_80946A8, EAST, get_go_image_anim_num, 32, sub_80945C4) +special_anim_with_timer_2(sub_80946E0, SOUTH, get_go_image_anim_num, 16, sub_809459C) +special_anim_with_timer_2(sub_8094718, NORTH, get_go_image_anim_num, 16, sub_809459C) +special_anim_with_timer_2(sub_8094750, WEST, get_go_image_anim_num, 16, sub_809459C) +special_anim_with_timer_2(sub_8094788, EAST, get_go_image_anim_num, 16, sub_809459C) +special_anim_with_timer_2(sub_80947C0, SOUTH, get_go_fast_image_anim_num, 8, sub_809459C) +special_anim_with_timer_2(sub_80947F8, NORTH, get_go_fast_image_anim_num, 8, sub_809459C) +special_anim_with_timer_2(sub_8094830, WEST, get_go_fast_image_anim_num, 8, sub_809459C) +special_anim_with_timer_2(sub_8094868, EAST, get_go_fast_image_anim_num, 8, sub_809459C) +special_anim_with_timer_2(sub_80948A0, SOUTH, get_go_faster_image_anim_num, 4, sub_809459C) +special_anim_with_timer_2(sub_80948D8, NORTH, get_go_faster_image_anim_num, 4, sub_809459C) +special_anim_with_timer_2(sub_8094910, WEST, get_go_faster_image_anim_num, 4, sub_809459C) +special_anim_with_timer_2(sub_8094948, EAST, get_go_faster_image_anim_num, 4, sub_809459C) an_walk_any_2_macro(sub_8094980, do_go_anim, npc_obj_ministep_stop_on_arrival, DIR_SOUTH, 2) an_walk_any_2_macro(sub_80949C0, do_go_anim, npc_obj_ministep_stop_on_arrival, DIR_NORTH, 2) @@ -4933,3 +4933,8 @@ maybe_shadow_1_macro(sub_8095E88, sub_8095B84, sub_80941B0, DIR_SOUTH, 2, 0) maybe_shadow_1_macro(sub_8095EE0, sub_8095B84, sub_80941B0, DIR_NORTH, 2, 0) maybe_shadow_1_macro(sub_8095F38, sub_8095B84, sub_80941B0, DIR_WEST, 2, 0) maybe_shadow_1_macro(sub_8095F90, sub_8095B84, sub_80941B0, DIR_EAST, 2, 0) + +special_anim_with_timer_2(sub_8095FE8, SOUTH, sub_80929FC, 8, sub_809459C) +special_anim_with_timer_2(sub_8096020, NORTH, sub_80929FC, 8, sub_809459C) +special_anim_with_timer_2(sub_8096058, WEST, sub_80929FC, 8, sub_809459C) +special_anim_with_timer_2(sub_8096090, EAST, sub_80929FC, 8, sub_809459C) From 8d34e9c3970d23832bb5500358fe4a2e250c5124 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 15:03:47 -0400 Subject: [PATCH 183/342] More an_walk_any_2_macro memes --- asm/field_map_obj.s | 179 -------------------------------------------- src/field_map_obj.c | 12 +++ 2 files changed, 12 insertions(+), 179 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index ded1a6b97..5e0e3de0d 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,185 +5,6 @@ .text - thumb_func_start sub_80960C8 -sub_80960C8: @ 80960C8 - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 24 - lsrs r3, 24 - bl npc_apply_direction - ldrb r0, [r5, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl sub_80929BC - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r4, 0 - bl StartSpriteAnim - adds r0, r4, 0 - movs r1, 0 - bl SeekSpriteAnim - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80960C8 - - thumb_func_start sub_8096100 -sub_8096100: @ 8096100 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x1 - movs r3, 0x1 - bl sub_80960C8 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8096120 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8096100 - - thumb_func_start sub_8096120 -sub_8096120: @ 8096120 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08096132 - movs r0, 0 - b _08096138 -_08096132: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08096138: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8096120 - - thumb_func_start sub_8096140 -sub_8096140: @ 8096140 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x2 - movs r3, 0x1 - bl sub_80960C8 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8096160 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8096140 - - thumb_func_start sub_8096160 -sub_8096160: @ 8096160 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08096172 - movs r0, 0 - b _08096178 -_08096172: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08096178: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8096160 - - thumb_func_start sub_8096180 -sub_8096180: @ 8096180 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x3 - movs r3, 0x1 - bl sub_80960C8 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80961A0 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8096180 - - thumb_func_start sub_80961A0 -sub_80961A0: @ 80961A0 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _080961B2 - movs r0, 0 - b _080961B8 -_080961B2: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_080961B8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80961A0 - - thumb_func_start sub_80961C0 -sub_80961C0: @ 80961C0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x4 - movs r3, 0x1 - bl sub_80960C8 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80961E0 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80961C0 - - thumb_func_start sub_80961E0 -sub_80961E0: @ 80961E0 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _080961F2 - movs r0, 0 - b _080961F8 -_080961F2: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_080961F8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80961E0 - thumb_func_start sub_8096200 sub_8096200: @ 8096200 push {r4,r5,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index f1de23307..b5f92645d 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4938,3 +4938,15 @@ special_anim_with_timer_2(sub_8095FE8, SOUTH, sub_80929FC, 8, sub_809459C) special_anim_with_timer_2(sub_8096020, NORTH, sub_80929FC, 8, sub_809459C) special_anim_with_timer_2(sub_8096058, WEST, sub_80929FC, 8, sub_809459C) special_anim_with_timer_2(sub_8096090, EAST, sub_80929FC, 8, sub_809459C) + +void sub_80960C8(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 speed) +{ + npc_apply_direction(mapObject, sprite, direction, speed); + StartSpriteAnim(sprite, sub_80929BC(mapObject->mapobj_unk_18)); + SeekSpriteAnim(sprite, 0); +} + +an_walk_any_2_macro(sub_8096100, sub_80960C8, npc_obj_ministep_stop_on_arrival, DIR_SOUTH, 1) +an_walk_any_2_macro(sub_8096140, sub_80960C8, npc_obj_ministep_stop_on_arrival, DIR_NORTH, 1) +an_walk_any_2_macro(sub_8096180, sub_80960C8, npc_obj_ministep_stop_on_arrival, DIR_WEST, 1) +an_walk_any_2_macro(sub_80961C0, sub_80960C8, npc_obj_ministep_stop_on_arrival, DIR_EAST, 1) From a9d3949c915a6ccb58f0fe6b58af18ae34a60974 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 15:05:23 -0400 Subject: [PATCH 184/342] More an_walk_any_2_macro memes (again) --- asm/field_map_obj.s | 177 -------------------------------------------- src/field_map_obj.c | 11 +++ 2 files changed, 11 insertions(+), 177 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 5e0e3de0d..6ebef8976 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,183 +5,6 @@ .text - thumb_func_start sub_8096200 -sub_8096200: @ 8096200 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 24 - lsrs r3, 24 - bl npc_apply_direction - ldrb r0, [r4, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl sub_80929FC - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - adds r0, r4, 0 - adds r1, r5, 0 - bl npc_apply_anim_looping - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8096200 - - thumb_func_start sub_8096230 -sub_8096230: @ 8096230 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x1 - movs r3, 0x1 - bl sub_8096200 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8096250 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8096230 - - thumb_func_start sub_8096250 -sub_8096250: @ 8096250 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08096262 - movs r0, 0 - b _08096268 -_08096262: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08096268: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8096250 - - thumb_func_start sub_8096270 -sub_8096270: @ 8096270 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x2 - movs r3, 0x1 - bl sub_8096200 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8096290 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8096270 - - thumb_func_start sub_8096290 -sub_8096290: @ 8096290 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _080962A2 - movs r0, 0 - b _080962A8 -_080962A2: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_080962A8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8096290 - - thumb_func_start sub_80962B0 -sub_80962B0: @ 80962B0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x3 - movs r3, 0x1 - bl sub_8096200 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80962D0 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80962B0 - - thumb_func_start sub_80962D0 -sub_80962D0: @ 80962D0 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _080962E2 - movs r0, 0 - b _080962E8 -_080962E2: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_080962E8: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80962D0 - - thumb_func_start sub_80962F0 -sub_80962F0: @ 80962F0 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x4 - movs r3, 0x1 - bl sub_8096200 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8096310 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80962F0 - - thumb_func_start sub_8096310 -sub_8096310: @ 8096310 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _08096322 - movs r0, 0 - b _08096328 -_08096322: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08096328: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8096310 - thumb_func_start sub_8096330 sub_8096330: @ 8096330 push {r4,r5,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index b5f92645d..9769c6a03 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4950,3 +4950,14 @@ an_walk_any_2_macro(sub_8096100, sub_80960C8, npc_obj_ministep_stop_on_arrival, an_walk_any_2_macro(sub_8096140, sub_80960C8, npc_obj_ministep_stop_on_arrival, DIR_NORTH, 1) an_walk_any_2_macro(sub_8096180, sub_80960C8, npc_obj_ministep_stop_on_arrival, DIR_WEST, 1) an_walk_any_2_macro(sub_80961C0, sub_80960C8, npc_obj_ministep_stop_on_arrival, DIR_EAST, 1) + +void sub_8096200(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 speed) +{ + npc_apply_direction(mapObject, sprite, direction, speed); + npc_apply_anim_looping(mapObject, sprite, sub_80929FC(mapObject->mapobj_unk_18)); +} + +an_walk_any_2_macro(sub_8096230, sub_8096200, npc_obj_ministep_stop_on_arrival, DIR_SOUTH, 1) +an_walk_any_2_macro(sub_8096270, sub_8096200, npc_obj_ministep_stop_on_arrival, DIR_NORTH, 1) +an_walk_any_2_macro(sub_80962B0, sub_8096200, npc_obj_ministep_stop_on_arrival, DIR_WEST, 1) +an_walk_any_2_macro(sub_80962F0, sub_8096200, npc_obj_ministep_stop_on_arrival, DIR_EAST, 1) From fb01dd2e5a6d76974eaceeb6fdaab11abfd4f910 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 15:06:45 -0400 Subject: [PATCH 185/342] More an_walk_any_2_macro memes (again again) --- asm/field_map_obj.s | 179 -------------------------------------------- src/field_map_obj.c | 11 +++ 2 files changed, 11 insertions(+), 179 deletions(-) diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s index 6ebef8976..f3a044d44 100755 --- a/asm/field_map_obj.s +++ b/asm/field_map_obj.s @@ -5,185 +5,6 @@ .text - thumb_func_start sub_8096330 -sub_8096330: @ 8096330 - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 24 - lsrs r3, 24 - bl npc_apply_direction - ldrb r0, [r5, 0x18] - lsls r0, 28 - lsrs r0, 28 - bl sub_80929DC - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r4, 0 - bl StartSpriteAnim - adds r0, r4, 0 - movs r1, 0 - bl SeekSpriteAnim - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8096330 - - thumb_func_start sub_8096368 -sub_8096368: @ 8096368 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x1 - movs r3, 0x1 - bl sub_8096330 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8096388 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8096368 - - thumb_func_start sub_8096388 -sub_8096388: @ 8096388 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _0809639A - movs r0, 0 - b _080963A0 -_0809639A: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_080963A0: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8096388 - - thumb_func_start sub_80963A8 -sub_80963A8: @ 80963A8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x2 - movs r3, 0x1 - bl sub_8096330 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_80963C8 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80963A8 - - thumb_func_start sub_80963C8 -sub_80963C8: @ 80963C8 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _080963DA - movs r0, 0 - b _080963E0 -_080963DA: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_080963E0: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80963C8 - - thumb_func_start sub_80963E8 -sub_80963E8: @ 80963E8 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x3 - movs r3, 0x1 - bl sub_8096330 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8096408 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_80963E8 - - thumb_func_start sub_8096408 -sub_8096408: @ 8096408 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _0809641A - movs r0, 0 - b _08096420 -_0809641A: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08096420: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8096408 - - thumb_func_start sub_8096428 -sub_8096428: @ 8096428 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - movs r2, 0x4 - movs r3, 0x1 - bl sub_8096330 - adds r0, r4, 0 - adds r1, r5, 0 - bl sub_8096448 - lsls r0, 24 - lsrs r0, 24 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8096428 - - thumb_func_start sub_8096448 -sub_8096448: @ 8096448 - push {r4,lr} - adds r4, r1, 0 - bl npc_obj_ministep_stop_on_arrival - lsls r0, 24 - cmp r0, 0 - bne _0809645A - movs r0, 0 - b _08096460 -_0809645A: - movs r0, 0x2 - strh r0, [r4, 0x32] - movs r0, 0x1 -_08096460: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8096448 - thumb_func_start sub_8096468 sub_8096468: @ 8096468 push {r4,lr} diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 9769c6a03..d4c00685f 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -4961,3 +4961,14 @@ an_walk_any_2_macro(sub_8096230, sub_8096200, npc_obj_ministep_stop_on_arrival, an_walk_any_2_macro(sub_8096270, sub_8096200, npc_obj_ministep_stop_on_arrival, DIR_NORTH, 1) an_walk_any_2_macro(sub_80962B0, sub_8096200, npc_obj_ministep_stop_on_arrival, DIR_WEST, 1) an_walk_any_2_macro(sub_80962F0, sub_8096200, npc_obj_ministep_stop_on_arrival, DIR_EAST, 1) + +void sub_8096330(struct MapObject *mapObject, struct Sprite *sprite, u8 direction, u8 speed) +{ + npc_apply_direction(mapObject, sprite, direction, speed); + StartSpriteAnim(sprite, sub_80929DC(mapObject->mapobj_unk_18)); + SeekSpriteAnim(sprite, 0); +} +an_walk_any_2_macro(sub_8096368, sub_8096330, npc_obj_ministep_stop_on_arrival, DIR_SOUTH, 1) +an_walk_any_2_macro(sub_80963A8, sub_8096330, npc_obj_ministep_stop_on_arrival, DIR_NORTH, 1) +an_walk_any_2_macro(sub_80963E8, sub_8096330, npc_obj_ministep_stop_on_arrival, DIR_WEST, 1) +an_walk_any_2_macro(sub_8096428, sub_8096330, npc_obj_ministep_stop_on_arrival, DIR_EAST, 1) From 70b1ad485719ce1854020222131a0c0daa5a16cd Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 15:33:26 -0400 Subject: [PATCH 186/342] Remaining functions --- asm/field_map_obj.s | 280 -------------------------------------- include/map_obj_8097404.h | 2 + include/sprite.h | 2 + ld_script.txt | 1 - src/field_map_obj.c | 106 +++++++++++++++ 5 files changed, 110 insertions(+), 281 deletions(-) delete mode 100755 asm/field_map_obj.s diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s deleted file mode 100755 index f3a044d44..000000000 --- a/asm/field_map_obj.s +++ /dev/null @@ -1,280 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_8096468 -sub_8096468: @ 8096468 - push {r4,lr} - adds r4, r1, 0 - bl sub_8097FA4 - movs r0, 0x1 - strh r0, [r4, 0x32] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8096468 - - thumb_func_start sub_809647C -sub_809647C: @ 809647C - push {r4,lr} - adds r4, r1, 0 - ldrb r0, [r0, 0x1B] - bl sub_8098044 - movs r0, 0 - strh r0, [r4, 0x26] - movs r0, 0x1 - strh r0, [r4, 0x32] - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_809647C - - thumb_func_start sub_8096494 -sub_8096494: @ 8096494 - push {r4,lr} - adds r2, r0, 0 - adds r4, r1, 0 - movs r1, 0x26 - ldrsh r0, [r4, r1] - cmp r0, 0 - beq _080964A6 - movs r0, 0 - b _080964B0 -_080964A6: - ldrb r0, [r2, 0x1B] - bl sub_8098044 - movs r0, 0x1 - strh r0, [r4, 0x32] -_080964B0: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8096494 - - thumb_func_start sub_80964B8 -sub_80964B8: @ 80964B8 - movs r0, 0x1 - bx lr - thumb_func_end sub_80964B8 - - thumb_func_start sub_80964BC -@ bool8 sub_80964BC(struct npc_state *fieldObject, struct obj *object) -sub_80964BC: @ 80964BC - adds r1, 0x2C - ldrb r0, [r1] - movs r2, 0x40 - orrs r0, r2 - strb r0, [r1] - movs r0, 0x1 - bx lr - thumb_func_end sub_80964BC - - thumb_func_start npc_obj_transfer_image_anim_pause_flag -@ void npc_obj_transfer_image_anim_pause_flag(struct npc_state *fieldObject, struct obj *object) -npc_obj_transfer_image_anim_pause_flag: @ 80964CC - push {lr} - ldrb r0, [r0, 0x1] - lsls r0, 29 - cmp r0, 0 - bge _080964E2 - adds r0, r1, 0 - adds r0, 0x2C - ldrb r1, [r0] - movs r2, 0x40 - orrs r1, r2 - strb r1, [r0] -_080964E2: - pop {r0} - bx r0 - thumb_func_end npc_obj_transfer_image_anim_pause_flag - - thumb_func_start sub_80964E8 -@ void sub_80964E8(struct npc_state *fieldObject, struct obj *object) -sub_80964E8: @ 80964E8 - push {r4,lr} - adds r4, r0, 0 - ldrb r3, [r4, 0x1] - lsls r0, r3, 28 - cmp r0, 0 - bge _08096510 - adds r2, r1, 0 - adds r2, 0x2C - ldrb r1, [r2] - movs r0, 0x41 - negs r0, r0 - ands r0, r1 - strb r0, [r2] - movs r0, 0x5 - negs r0, r0 - ands r0, r3 - movs r1, 0x9 - negs r1, r1 - ands r0, r1 - strb r0, [r4, 0x1] -_08096510: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80964E8 - - thumb_func_start sub_8096518 -@ void sub_8096518(struct npc_state *fieldObject, struct obj *object) -sub_8096518: @ 8096518 - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - bl sub_8096530 - adds r0, r4, 0 - adds r1, r5, 0 - bl npc_update_obj_anim_flag - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8096518 - - thumb_func_start sub_8096530 -sub_8096530: @ 8096530 - push {r4-r6,lr} - adds r5, r0, 0 - adds r4, r1, 0 - ldrb r1, [r5, 0x1] - movs r0, 0x41 - negs r0, r0 - ands r0, r1 - strb r0, [r5, 0x1] - ldrb r0, [r5, 0x5] - bl GetFieldObjectGraphicsInfo - adds r6, r0, 0 - adds r0, r4, 0 - adds r0, 0x3E - ldrb r1, [r0] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _08096594 - ldrh r1, [r4, 0x24] - ldrh r0, [r4, 0x20] - adds r1, r0 - adds r0, r4, 0 - adds r0, 0x28 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - ldr r2, =gSpriteCoordOffsetX - adds r0, r1 - ldrh r2, [r2] - adds r0, r2 - lsls r0, 16 - lsrs r3, r0, 16 - ldrh r1, [r4, 0x26] - ldrh r0, [r4, 0x22] - adds r1, r0 - adds r0, r4, 0 - adds r0, 0x29 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - ldr r2, =gSpriteCoordOffsetY - adds r0, r1 - ldrh r2, [r2] - adds r0, r2 - b _080965BC - .pool -_08096594: - ldrh r1, [r4, 0x24] - ldrh r0, [r4, 0x20] - adds r1, r0 - adds r0, r4, 0 - adds r0, 0x28 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - adds r0, r1 - lsls r0, 16 - lsrs r3, r0, 16 - ldrh r1, [r4, 0x26] - ldrh r0, [r4, 0x22] - adds r1, r0 - adds r0, r4, 0 - adds r0, 0x29 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - adds r0, r1 -_080965BC: - lsls r0, 16 - lsrs r2, r0, 16 - ldrh r0, [r6, 0x8] - adds r0, r3 - lsls r0, 16 - lsrs r1, r0, 16 - ldrh r0, [r6, 0xA] - adds r0, r2 - lsls r0, 16 - lsrs r4, r0, 16 - lsls r0, r3, 16 - asrs r0, 16 - cmp r0, 0xFF - bgt _080965E4 - lsls r0, r1, 16 - asrs r0, 16 - movs r1, 0x10 - negs r1, r1 - cmp r0, r1 - bge _080965EC -_080965E4: - ldrb r0, [r5, 0x1] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r5, 0x1] -_080965EC: - lsls r0, r2, 16 - asrs r0, 16 - cmp r0, 0xAF - bgt _08096600 - lsls r0, r4, 16 - asrs r0, 16 - movs r1, 0x10 - negs r1, r1 - cmp r0, r1 - bge _08096608 -_08096600: - ldrb r0, [r5, 0x1] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r5, 0x1] -_08096608: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_8096530 - - thumb_func_start npc_update_obj_anim_flag -@ void npc_update_obj_anim_flag(struct npc_state *fieldObject, struct obj *object) -npc_update_obj_anim_flag: @ 8096610 - push {lr} - adds r2, r1, 0 - adds r2, 0x3E - ldrb r1, [r2] - movs r3, 0x5 - negs r3, r3 - ands r3, r1 - strb r3, [r2] - ldrb r1, [r0, 0x1] - movs r0, 0x60 - ands r0, r1 - cmp r0, 0 - beq _08096632 - movs r1, 0x4 - adds r0, r3, 0 - orrs r0, r1 - strb r0, [r2] -_08096632: - pop {r0} - bx r0 - thumb_func_end npc_update_obj_anim_flag - - .align 2, 0 @ Don't pad with nop. diff --git a/include/map_obj_8097404.h b/include/map_obj_8097404.h index fd5616330..27ffd18cb 100644 --- a/include/map_obj_8097404.h +++ b/include/map_obj_8097404.h @@ -26,5 +26,7 @@ void obj_anim_image_set_and_seek(struct Sprite *, u8, u8); bool8 sub_80979BC(struct Sprite *); void sub_8097750(struct Sprite *); bool8 sub_8097758(struct Sprite *); +void sub_8097FA4(struct MapObject *); +void sub_8098044(u8); #endif //GUARD_MAP_OBJ_8097404_H diff --git a/include/sprite.h b/include/sprite.h index 7b3c9fb5a..838b0d7c0 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -240,6 +240,8 @@ struct OamMatrix extern const struct OamData gDummyOamData; extern const union AnimCmd *const gDummySpriteAnimTable[]; extern const union AffineAnimCmd *const gDummySpriteAffineAnimTable[]; +extern s16 gSpriteCoordOffsetX; +extern s16 gSpriteCoordOffsetY; extern struct Sprite gSprites[]; diff --git a/ld_script.txt b/ld_script.txt index 0cff77ca8..81e4fc3ab 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -97,7 +97,6 @@ SECTIONS { asm/field_door.o(.text); asm/field_player_avatar.o(.text); src/field_map_obj.o(.text); - asm/field_map_obj.o(.text); asm/field_ground_effect.o(.text); asm/map_obj_8097404.o(.text); asm/field_message_box.o(.text); diff --git a/src/field_map_obj.c b/src/field_map_obj.c index d4c00685f..a79f78434 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -122,6 +122,8 @@ static bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject *, s16, s16) static bool8 IsMetatileDirectionallyImpassable(struct MapObject *, s16, s16, u8); static bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *, s16, s16); static bool8 sub_809558C(struct MapObject *, struct Sprite *); +static void sub_8096530(struct MapObject *, struct Sprite *); +static void npc_update_obj_anim_flag(struct MapObject *, struct Sprite *); // ROM data @@ -4972,3 +4974,107 @@ an_walk_any_2_macro(sub_8096368, sub_8096330, npc_obj_ministep_stop_on_arrival, an_walk_any_2_macro(sub_80963A8, sub_8096330, npc_obj_ministep_stop_on_arrival, DIR_NORTH, 1) an_walk_any_2_macro(sub_80963E8, sub_8096330, npc_obj_ministep_stop_on_arrival, DIR_WEST, 1) an_walk_any_2_macro(sub_8096428, sub_8096330, npc_obj_ministep_stop_on_arrival, DIR_EAST, 1) + +bool8 sub_8096468(struct MapObject *mapObject, struct Sprite *sprite) +{ + sub_8097FA4(mapObject); + sprite->data2 = 1; + return TRUE; +} + +bool8 sub_809647C(struct MapObject *mapObject, struct Sprite *sprite) +{ + sub_8098044(mapObject->mapobj_unk_1B); + sprite->pos2.y = 0; + sprite->data2 = 1; + return TRUE; +} + +bool8 sub_8096494(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (sprite->pos2.y == 0) + { + sub_8098044(mapObject->mapobj_unk_1B); + sprite->data2 = 1; + return TRUE; + } + return FALSE; +} + +bool8 sub_80964B8(struct MapObject *mapObject, struct Sprite *sprite) +{ + return TRUE; +} + +bool8 sub_80964BC(struct MapObject *mapObject, struct Sprite *sprite) +{ + sprite->animPaused = TRUE; + return TRUE; +} + +void npc_obj_transfer_image_anim_pause_flag(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (mapObject->mapobj_bit_10) + { + sprite->animPaused = TRUE; + } +} + +void sub_80964E8(struct MapObject *mapObject, struct Sprite *sprite) +{ + if (mapObject->mapobj_bit_11) + { + sprite->animPaused = FALSE; + mapObject->mapobj_bit_10 = FALSE; + mapObject->mapobj_bit_11 = FALSE; + } +} + +void sub_8096518(struct MapObject *mapObject, struct Sprite *sprite) +{ + sub_8096530(mapObject, sprite); + npc_update_obj_anim_flag(mapObject, sprite); +} + +static void sub_8096530(struct MapObject *mapObject, struct Sprite *sprite) +{ + u16 x; + u16 y; + u16 x2; + u16 y2; + const struct MapObjectGraphicsInfo *graphicsInfo; + + mapObject->mapobj_bit_14 = FALSE; + graphicsInfo = GetFieldObjectGraphicsInfo(mapObject->graphicsId); + if (sprite->coordOffsetEnabled) + { + x = sprite->pos1.x + sprite->pos2.x + sprite->centerToCornerVecX + gSpriteCoordOffsetX; + y = sprite->pos1.y + sprite->pos2.y + sprite->centerToCornerVecY + gSpriteCoordOffsetY; + } + else + { + x = sprite->pos1.x + sprite->pos2.x + sprite->centerToCornerVecX; + y = sprite->pos1.y + sprite->pos2.y + sprite->centerToCornerVecY; + } + x2 = graphicsInfo->width; + x2 += x; + y2 = y; + y2 += graphicsInfo->height; + if ((s16)x >= 0x100 || (s16)x2 < -0x10) + { + mapObject->mapobj_bit_14 = TRUE; + } + if ((s16)y >= 0xB0 || (s16)y2 < -0x10) + { + mapObject->mapobj_bit_14 = TRUE; + } +} + +static void npc_update_obj_anim_flag(struct MapObject *mapObject, struct Sprite *sprite) +{ + sprite->invisible = FALSE; + if (mapObject->mapobj_bit_13 || mapObject->mapobj_bit_14) + { + sprite->invisible = TRUE; + } +} From 6106bc93b38e505091fcf17e7e3dfec449583e70 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 17:33:25 -0400 Subject: [PATCH 187/342] Remove data/field_map_obj.s from data/data3.s --- data/data3.s | 498 +----------------------------------------- data/field_map_obj.s | 499 +++++++++++++++++++++++++++++++++++++++++++ ld_script.txt | 2 + 3 files changed, 504 insertions(+), 495 deletions(-) create mode 100644 data/field_map_obj.s diff --git a/data/data3.s b/data/data3.s index 889b78b6d..70b057884 100644 --- a/data/data3.s +++ b/data/data3.s @@ -634,502 +634,10 @@ gUnknown_084975BC:: @ 84975BC // data/field_map_obj.s -gUnknown_084975C4:: @ 84975C4 - .incbin "baserom.gba", 0x4975c4, 0x10 - -gUnknown_084975D4:: @ 84975D4 - .incbin "baserom.gba", 0x4975d4, 0x18 - -gUnknown_084975EC:: @ 84975EC - .incbin "baserom.gba", 0x4975ec, 0xc - -@ 84975F8 - .include "data/graphics/field_objects/field_object_graphics.inc" - -gUnknown_08505438:: @ 8505438 - .incbin "baserom.gba", 0x505438, 0x144 - -gUnknown_0850557C:: @ 850557C - .incbin "baserom.gba", 0x50557c, 0x51 - -gUnknown_085055CD:: @ 85055CD - .incbin "baserom.gba", 0x5055cd, 0x51 - - .align 2, 0 -@ 8505620 - .include "data/graphics/field_objects/field_object_graphics_info_pointers.inc" - -@ 85059F8 - .include "data/graphics/field_objects/field_effect_object_template_pointers.inc" - -@ 8505A8C - .include "data/graphics/field_objects/field_object_pic_tables.inc" - -@ 85089FC - .include "data/graphics/field_objects/field_object_anims.inc" - -gUnknown_085094AC:: @ 85094AC - .incbin "baserom.gba", 0x5094ac, 0x40 - -@ 85094EC - .include "data/graphics/field_objects/field_object_oam.inc" - -@ 8509954 - .include "data/graphics/field_objects/field_object_graphics_info.inc" - -gUnknown_0850BBC8:: @ 850BBC8 - .incbin "baserom.gba", 0x50bbc8, 0x138 - -gUnknown_0850BD00:: @ 850BD00 - .incbin "baserom.gba", 0x50bd00, 0x78 - -gUnknown_0850BD78:: @ 850BD78 - .incbin "baserom.gba", 0x50bd78, 0xc0 - -gUnknown_0850BE38:: @ 850BE38 - .incbin "baserom.gba", 0x50be38, 0x10 - -@ 850BE48 - .include "data/graphics/field_objects/berry_tree_graphics_tables.inc" - -@ 850C9C0 - .include "data/graphics/field_objects/field_effect_objects.inc" - - .incbin "baserom.gba", 0x50d6d4, 0x8 - -gUnknown_0850D6DC:: @ 850D6DC - .incbin "baserom.gba", 0x50d6dc, 0x10 - -gUnknown_0850D6EC:: @ 850D6EC - .incbin "baserom.gba", 0x50d6ec, 0x8 - -gUnknown_0850D6F4:: @ 850D6F4 - .incbin "baserom.gba", 0x50d6f4, 0x1c - -gUnknown_0850D710:: @ 850D710 - .incbin "baserom.gba", 0x50d710, 0x4 - -gUnknown_0850D714:: @ 850D714 - .incbin "baserom.gba", 0x50d714, 0x2c - -gUnknown_0850D740:: @ 850D740 - .incbin "baserom.gba", 0x50d740, 0x14 - -gUnknown_0850D754:: @ 850D754 - .incbin "baserom.gba", 0x50d754, 0x1c - -gUnknown_0850D770:: @ 850D770 - .incbin "baserom.gba", 0x50d770, 0x4 - -gUnknown_0850D774:: @ 850D774 - .incbin "baserom.gba", 0x50d774, 0x1c - -gUnknown_0850D790:: @ 850D790 - .incbin "baserom.gba", 0x50d790, 0x4 - -gUnknown_0850D794:: @ 850D794 - .incbin "baserom.gba", 0x50d794, 0xc - -gUnknown_0850D7A0:: @ 850D7A0 - .incbin "baserom.gba", 0x50d7a0, 0x14 - -gUnknown_0850D7B4:: @ 850D7B4 - .incbin "baserom.gba", 0x50d7b4, 0x14 - -gUnknown_0850D7C8:: @ 850D7C8 - .incbin "baserom.gba", 0x50d7c8, 0x14 - -gUnknown_0850D7DC:: @ 850D7DC - .incbin "baserom.gba", 0x50d7dc, 0x14 - -gUnknown_0850D7F0:: @ 850D7F0 - .incbin "baserom.gba", 0x50d7f0, 0x4 - -gUnknown_0850D7F4:: @ 850D7F4 - .incbin "baserom.gba", 0x50d7f4, 0x14 - -gUnknown_0850D808:: @ 850D808 - .incbin "baserom.gba", 0x50d808, 0x4 - -gUnknown_0850D80C:: @ 850D80C - .incbin "baserom.gba", 0x50d80c, 0x14 - -gUnknown_0850D820:: @ 850D820 - .incbin "baserom.gba", 0x50d820, 0x4 - -gUnknown_0850D824:: @ 850D824 - .incbin "baserom.gba", 0x50d824, 0x14 - -gUnknown_0850D838:: @ 850D838 - .incbin "baserom.gba", 0x50d838, 0x4 - -gUnknown_0850D83C:: @ 850D83C - .incbin "baserom.gba", 0x50d83c, 0x14 - -gUnknown_0850D850:: @ 850D850 - .incbin "baserom.gba", 0x50d850, 0x4 - -gUnknown_0850D854:: @ 850D854 - .incbin "baserom.gba", 0x50d854, 0x14 - -gUnknown_0850D868:: @ 850D868 - .incbin "baserom.gba", 0x50d868, 0x4 - -gUnknown_0850D86C:: @ 850D86C - .incbin "baserom.gba", 0x50d86c, 0x14 - -gUnknown_0850D880:: @ 850D880 - .incbin "baserom.gba", 0x50d880, 0x4 - -gUnknown_0850D884:: @ 850D884 - .incbin "baserom.gba", 0x50d884, 0x14 - -gUnknown_0850D898:: @ 850D898 - .incbin "baserom.gba", 0x50d898, 0x4 - -gUnknown_0850D89C:: @ 850D89C - .incbin "baserom.gba", 0x50d89c, 0x10 - -gUnknown_0850D8AC:: @ 850D8AC - .incbin "baserom.gba", 0x50d8ac, 0x8 - -gUnknown_0850D8B4:: @ 850D8B4 - .incbin "baserom.gba", 0x50d8b4, 0x10 - -gUnknown_0850D8C4:: @ 850D8C4 - .incbin "baserom.gba", 0x50d8c4, 0x8 - -gUnknown_0850D8CC:: @ 850D8CC - .incbin "baserom.gba", 0x50d8cc, 0x10 - -gUnknown_0850D8DC:: @ 850D8DC - .incbin "baserom.gba", 0x50d8dc, 0xc - -gUnknown_0850D8E8:: @ 850D8E8 - .incbin "baserom.gba", 0x50d8e8, 0x4 - -gUnknown_0850D8EC:: @ 850D8EC - .incbin "baserom.gba", 0x50d8ec, 0xc - -gUnknown_0850D8F8:: @ 850D8F8 - .incbin "baserom.gba", 0x50d8f8, 0x4 - -gUnknown_0850D8FC:: @ 850D8FC - .incbin "baserom.gba", 0x50d8fc, 0xc - -gUnknown_0850D908:: @ 850D908 - .incbin "baserom.gba", 0x50d908, 0x4 - -gUnknown_0850D90C:: @ 850D90C - .incbin "baserom.gba", 0x50d90c, 0xc - -gUnknown_0850D918:: @ 850D918 - .incbin "baserom.gba", 0x50d918, 0x4 - -gUnknown_0850D91C:: @ 850D91C - .incbin "baserom.gba", 0x50d91c, 0xc - -gUnknown_0850D928:: @ 850D928 - .incbin "baserom.gba", 0x50d928, 0x4 - -gUnknown_0850D92C:: @ 850D92C - .incbin "baserom.gba", 0x50d92c, 0xc - -gUnknown_0850D938:: @ 850D938 - .incbin "baserom.gba", 0x50d938, 0x4 - -gUnknown_0850D93C:: @ 850D93C - .incbin "baserom.gba", 0x50d93c, 0xc - -gUnknown_0850D948:: @ 850D948 - .incbin "baserom.gba", 0x50d948, 0xc - -gUnknown_0850D954:: @ 850D954 - .incbin "baserom.gba", 0x50d954, 0x4 - -gUnknown_0850D958:: @ 850D958 - .incbin "baserom.gba", 0x50d958, 0xc - -gUnknown_0850D964:: @ 850D964 - .incbin "baserom.gba", 0x50d964, 0x4 - -gUnknown_0850D968:: @ 850D968 - .incbin "baserom.gba", 0x50d968, 0xc - -gUnknown_0850D974:: @ 850D974 - .incbin "baserom.gba", 0x50d974, 0x4 - -gUnknown_0850D978:: @ 850D978 - .incbin "baserom.gba", 0x50d978, 0xc - -gUnknown_0850D984:: @ 850D984 - .incbin "baserom.gba", 0x50d984, 0x4 - -gUnknown_0850D988:: @ 850D988 - .incbin "baserom.gba", 0x50d988, 0xc - -gUnknown_0850D994:: @ 850D994 - .incbin "baserom.gba", 0x50d994, 0x4 - -gUnknown_0850D998:: @ 850D998 - .incbin "baserom.gba", 0x50d998, 0xc - -gUnknown_0850D9A4:: @ 850D9A4 - .incbin "baserom.gba", 0x50d9a4, 0x4 - -gUnknown_0850D9A8:: @ 850D9A8 - .incbin "baserom.gba", 0x50d9a8, 0xc - -gUnknown_0850D9B4:: @ 850D9B4 - .incbin "baserom.gba", 0x50d9b4, 0x4 - -gUnknown_0850D9B8:: @ 850D9B8 - .incbin "baserom.gba", 0x50d9b8, 0xc - -gUnknown_0850D9C4:: @ 850D9C4 - .incbin "baserom.gba", 0x50d9c4, 0x4 - -gUnknown_0850D9C8:: @ 850D9C8 - .incbin "baserom.gba", 0x50d9c8, 0xc - -gUnknown_0850D9D4:: @ 850D9D4 - .incbin "baserom.gba", 0x50d9d4, 0x4 - -gUnknown_0850D9D8:: @ 850D9D8 - .incbin "baserom.gba", 0x50d9d8, 0xc - -gUnknown_0850D9E4:: @ 850D9E4 - .incbin "baserom.gba", 0x50d9e4, 0x4 - -gUnknown_0850D9E8:: @ 850D9E8 - .incbin "baserom.gba", 0x50d9e8, 0xc - -gUnknown_0850D9F4:: @ 850D9F4 - .incbin "baserom.gba", 0x50d9f4, 0x4 - -gUnknown_0850D9F8:: @ 850D9F8 - .incbin "baserom.gba", 0x50d9f8, 0xc - -gUnknown_0850DA04:: @ 850DA04 - .incbin "baserom.gba", 0x50da04, 0x4 - -gUnknown_0850DA08:: @ 850DA08 - .incbin "baserom.gba", 0x50da08, 0xc - -gUnknown_0850DA14:: @ 850DA14 - .incbin "baserom.gba", 0x50da14, 0x4 - -gUnknown_0850DA18:: @ 850DA18 - .incbin "baserom.gba", 0x50da18, 0xc - -gUnknown_0850DA24:: @ 850DA24 - .incbin "baserom.gba", 0x50da24, 0x4 - -gUnknown_0850DA28:: @ 850DA28 - .incbin "baserom.gba", 0x50da28, 0xc - -gUnknown_0850DA34:: @ 850DA34 - .incbin "baserom.gba", 0x50da34, 0x4 - -gUnknown_0850DA38:: @ 850DA38 - .incbin "baserom.gba", 0x50da38, 0xc - -gUnknown_0850DA44:: @ 850DA44 - .incbin "baserom.gba", 0x50da44, 0x4 - -gUnknown_0850DA48:: @ 850DA48 - .incbin "baserom.gba", 0x50da48, 0xc - -gUnknown_0850DA54:: @ 850DA54 - .incbin "baserom.gba", 0x50da54, 0x4 - -gUnknown_0850DA58:: @ 850DA58 - .incbin "baserom.gba", 0x50da58, 0xc - -gUnknown_0850DA64:: @ 850DA64 - .incbin "baserom.gba", 0x50da64, 0x2c - -gUnknown_0850DA90:: @ 850DA90 - .incbin "baserom.gba", 0x50da90, 0xc - -gUnknown_0850DA9C:: @ 850DA9C - .incbin "baserom.gba", 0x50da9c, 0x4 - -gUnknown_0850DAA0:: @ 850DAA0 - .incbin "baserom.gba", 0x50daa0, 0x8 - -gUnknown_0850DAA8:: @ 850DAA8 - .incbin "baserom.gba", 0x50daa8, 0x8 - -gUnknown_0850DAB0:: @ 850DAB0 - .incbin "baserom.gba", 0x50dab0, 0x8 - -gUnknown_0850DAB8:: @ 850DAB8 - .incbin "baserom.gba", 0x50dab8, 0x8 - -gUnknown_0850DAC0:: @ 850DAC0 - .incbin "baserom.gba", 0x50dac0, 0xc - -gUnknown_0850DACC:: @ 850DACC - .incbin "baserom.gba", 0x50dacc, 0x9 - -gUnknown_0850DAD5:: @ 850DAD5 - .incbin "baserom.gba", 0x50dad5, 0x9 - -gUnknown_0850DADE:: @ 850DADE - .incbin "baserom.gba", 0x50dade, 0x9 - -gUnknown_0850DAE7:: @ 850DAE7 - .incbin "baserom.gba", 0x50dae7, 0x9 - -gUnknown_0850DAF0:: @ 850DAF0 - .incbin "baserom.gba", 0x50daf0, 0x9 - -gUnknown_0850DAF9:: @ 850DAF9 - .incbin "baserom.gba", 0x50daf9, 0x9 - -gUnknown_0850DB02:: @ 850DB02 - .incbin "baserom.gba", 0x50db02, 0x9 - -gUnknown_0850DB0B:: @ 850DB0B - .incbin "baserom.gba", 0x50db0b, 0x9 - -gUnknown_0850DB14:: @ 850DB14 - .incbin "baserom.gba", 0x50db14, 0x9 - -gUnknown_0850DB1D:: @ 850DB1D - .incbin "baserom.gba", 0x50db1d, 0x9 - -gUnknown_0850DB26:: @ 850DB26 - .incbin "baserom.gba", 0x50db26, 0x9 - -gUnknown_0850DB2F:: @ 850DB2F - .incbin "baserom.gba", 0x50db2f, 0x9 - -gUnknown_0850DB38:: @ 850DB38 - .incbin "baserom.gba", 0x50db38, 0x9 - -gUnknown_0850DB41:: @ 850DB41 - .incbin "baserom.gba", 0x50db41, 0x9 - -gUnknown_0850DB4A:: @ 850DB4A - .incbin "baserom.gba", 0x50db4a, 0x9 - -gUnknown_0850DB53:: @ 850DB53 - .incbin "baserom.gba", 0x50db53, 0x9 - -gUnknown_0850DB5C:: @ 850DB5C - .incbin "baserom.gba", 0x50db5c, 0x10 - -gUnknown_0850DB6C:: @ 850DB6C - .incbin "baserom.gba", 0x50db6c, 0x10 - -gUnknown_0850DB7C:: @ 850DB7C - .incbin "baserom.gba", 0x50db7c, 0x24 - -gUnknown_0850DBA0:: @ 850DBA0 - .incbin "baserom.gba", 0x50dba0, 0x5 - -gUnknown_0850DBA5:: @ 850DBA5 - .incbin "baserom.gba", 0x50dba5, 0x5 - -gUnknown_0850DBAA:: @ 850DBAA - .incbin "baserom.gba", 0x50dbaa, 0x5 - -gUnknown_0850DBAF:: @ 850DBAF - .incbin "baserom.gba", 0x50dbaf, 0x5 - -gUnknown_0850DBB4:: @ 850DBB4 - .incbin "baserom.gba", 0x50dbb4, 0x5 - -gUnknown_0850DBB9:: @ 850DBB9 - .incbin "baserom.gba", 0x50dbb9, 0x5 - -gUnknown_0850DBBE:: @ 850DBBE - .incbin "baserom.gba", 0x50dbbe, 0x5 - -gUnknown_0850DBC3:: @ 850DBC3 - .incbin "baserom.gba", 0x50dbc3, 0x5 - -gUnknown_0850DBC8:: @ 850DBC8 - .incbin "baserom.gba", 0x50dbc8, 0x5 - -gUnknown_0850DBCD:: @ 850DBCD - .incbin "baserom.gba", 0x50dbcd, 0x5 - -gUnknown_0850DBD2:: @ 850DBD2 - .incbin "baserom.gba", 0x50dbd2, 0x5 - -gUnknown_0850DBD7:: @ 850DBD7 - .incbin "baserom.gba", 0x50dbd7, 0x5 - -gUnknown_0850DBDC:: @ 850DBDC - .incbin "baserom.gba", 0x50dbdc, 0x5 - -gUnknown_0850DBE1:: @ 850DBE1 - .incbin "baserom.gba", 0x50dbe1, 0x5 - -gUnknown_0850DBE6:: @ 850DBE6 - .incbin "baserom.gba", 0x50dbe6, 0x5 - -gUnknown_0850DBEB:: @ 850DBEB - .incbin "baserom.gba", 0x50dbeb, 0x5 - -gUnknown_0850DBF0:: @ 850DBF0 - .incbin "baserom.gba", 0x50dbf0, 0x5 - -gUnknown_0850DBF5:: @ 850DBF5 - .incbin "baserom.gba", 0x50dbf5, 0x5 - -gUnknown_0850DBFA:: @ 850DBFA - .incbin "baserom.gba", 0x50dbfa, 0x5 - -gUnknown_0850DBFF:: @ 850DBFF - .incbin "baserom.gba", 0x50dbff, 0x5 - -gUnknown_0850DC04:: @ 850DC04 - .incbin "baserom.gba", 0x50dc04, 0x5 - -gUnknown_0850DC09:: @ 850DC09 - .incbin "baserom.gba", 0x50dc09, 0x5 - -gUnknown_0850DC0E:: @ 850DC0E - .incbin "baserom.gba", 0x50dc0e, 0x5 - -gUnknown_0850DC13:: @ 850DC13 - .incbin "baserom.gba", 0x50dc13, 0x5 - -gUnknown_0850DC18:: @ 850DC18 - .incbin "baserom.gba", 0x50dc18, 0x5 - -gUnknown_0850DC1D:: @ 850DC1D - .incbin "baserom.gba", 0x50dc1d, 0x5 - -gUnknown_0850DC22:: @ 850DC22 - .incbin "baserom.gba", 0x50dc22, 0x5 - -gUnknown_0850DC27:: @ 850DC27 - .incbin "baserom.gba", 0x50dc27, 0x8 - -gUnknown_0850DC2F:: @ 850DC2F - .incbin "baserom.gba", 0x50dc2f, 0x10 - -gUnknown_0850DC3F:: @ 850DC3F - .incbin "baserom.gba", 0x50dc3f, 0x11 - -gUnknown_0850DC50:: @ 850DC50 - .incbin "baserom.gba", 0x50dc50, 0x298 - -gUnknown_0850DEE8:: @ 850DEE8 - .incbin "baserom.gba", 0x50dee8, 0xd4 - -gUnknown_0850DFBC:: @ 850DFBC - .incbin "baserom.gba", 0x50dfbc, 0x6 - -gUnknown_0850DFC2:: @ 850DFC2 - .incbin "baserom.gba", 0x50dfc2, 0x61a - // end data/field_map_obj.s + .section .rodata_b + + .incbin "baserom.gba", 0x50dfc8, 0x614 gUnknown_0850E5DC:: @ 850E5DC .incbin "baserom.gba", 0x50e5dc, 0x8 diff --git a/data/field_map_obj.s b/data/field_map_obj.s new file mode 100644 index 000000000..2030ec578 --- /dev/null +++ b/data/field_map_obj.s @@ -0,0 +1,499 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_084975C4:: @ 84975C4 + .incbin "baserom.gba", 0x4975c4, 0x10 + +gUnknown_084975D4:: @ 84975D4 + .incbin "baserom.gba", 0x4975d4, 0x18 + +gUnknown_084975EC:: @ 84975EC + .incbin "baserom.gba", 0x4975ec, 0xc + +@ 84975F8 + .include "data/graphics/field_objects/field_object_graphics.inc" + +gUnknown_08505438:: @ 8505438 + .incbin "baserom.gba", 0x505438, 0x144 + +gUnknown_0850557C:: @ 850557C + .incbin "baserom.gba", 0x50557c, 0x51 + +gUnknown_085055CD:: @ 85055CD + .incbin "baserom.gba", 0x5055cd, 0x51 + + .align 2, 0 +@ 8505620 + .include "data/graphics/field_objects/field_object_graphics_info_pointers.inc" + +@ 85059F8 + .include "data/graphics/field_objects/field_effect_object_template_pointers.inc" + +@ 8505A8C + .include "data/graphics/field_objects/field_object_pic_tables.inc" + +@ 85089FC + .include "data/graphics/field_objects/field_object_anims.inc" + +gUnknown_085094AC:: @ 85094AC + .incbin "baserom.gba", 0x5094ac, 0x40 + +@ 85094EC + .include "data/graphics/field_objects/field_object_oam.inc" + +@ 8509954 + .include "data/graphics/field_objects/field_object_graphics_info.inc" + +gUnknown_0850BBC8:: @ 850BBC8 + .incbin "baserom.gba", 0x50bbc8, 0x138 + +gUnknown_0850BD00:: @ 850BD00 + .incbin "baserom.gba", 0x50bd00, 0x78 + +gUnknown_0850BD78:: @ 850BD78 + .incbin "baserom.gba", 0x50bd78, 0xc0 + +gUnknown_0850BE38:: @ 850BE38 + .incbin "baserom.gba", 0x50be38, 0x10 + +@ 850BE48 + .include "data/graphics/field_objects/berry_tree_graphics_tables.inc" + +@ 850C9C0 + .include "data/graphics/field_objects/field_effect_objects.inc" + + .incbin "baserom.gba", 0x50d6d4, 0x8 + +gUnknown_0850D6DC:: @ 850D6DC + .incbin "baserom.gba", 0x50d6dc, 0x10 + +gUnknown_0850D6EC:: @ 850D6EC + .incbin "baserom.gba", 0x50d6ec, 0x8 + +gUnknown_0850D6F4:: @ 850D6F4 + .incbin "baserom.gba", 0x50d6f4, 0x1c + +gUnknown_0850D710:: @ 850D710 + .incbin "baserom.gba", 0x50d710, 0x4 + +gUnknown_0850D714:: @ 850D714 + .incbin "baserom.gba", 0x50d714, 0x2c + +gUnknown_0850D740:: @ 850D740 + .incbin "baserom.gba", 0x50d740, 0x14 + +gUnknown_0850D754:: @ 850D754 + .incbin "baserom.gba", 0x50d754, 0x1c + +gUnknown_0850D770:: @ 850D770 + .incbin "baserom.gba", 0x50d770, 0x4 + +gUnknown_0850D774:: @ 850D774 + .incbin "baserom.gba", 0x50d774, 0x1c + +gUnknown_0850D790:: @ 850D790 + .incbin "baserom.gba", 0x50d790, 0x4 + +gUnknown_0850D794:: @ 850D794 + .incbin "baserom.gba", 0x50d794, 0xc + +gUnknown_0850D7A0:: @ 850D7A0 + .incbin "baserom.gba", 0x50d7a0, 0x14 + +gUnknown_0850D7B4:: @ 850D7B4 + .incbin "baserom.gba", 0x50d7b4, 0x14 + +gUnknown_0850D7C8:: @ 850D7C8 + .incbin "baserom.gba", 0x50d7c8, 0x14 + +gUnknown_0850D7DC:: @ 850D7DC + .incbin "baserom.gba", 0x50d7dc, 0x14 + +gUnknown_0850D7F0:: @ 850D7F0 + .incbin "baserom.gba", 0x50d7f0, 0x4 + +gUnknown_0850D7F4:: @ 850D7F4 + .incbin "baserom.gba", 0x50d7f4, 0x14 + +gUnknown_0850D808:: @ 850D808 + .incbin "baserom.gba", 0x50d808, 0x4 + +gUnknown_0850D80C:: @ 850D80C + .incbin "baserom.gba", 0x50d80c, 0x14 + +gUnknown_0850D820:: @ 850D820 + .incbin "baserom.gba", 0x50d820, 0x4 + +gUnknown_0850D824:: @ 850D824 + .incbin "baserom.gba", 0x50d824, 0x14 + +gUnknown_0850D838:: @ 850D838 + .incbin "baserom.gba", 0x50d838, 0x4 + +gUnknown_0850D83C:: @ 850D83C + .incbin "baserom.gba", 0x50d83c, 0x14 + +gUnknown_0850D850:: @ 850D850 + .incbin "baserom.gba", 0x50d850, 0x4 + +gUnknown_0850D854:: @ 850D854 + .incbin "baserom.gba", 0x50d854, 0x14 + +gUnknown_0850D868:: @ 850D868 + .incbin "baserom.gba", 0x50d868, 0x4 + +gUnknown_0850D86C:: @ 850D86C + .incbin "baserom.gba", 0x50d86c, 0x14 + +gUnknown_0850D880:: @ 850D880 + .incbin "baserom.gba", 0x50d880, 0x4 + +gUnknown_0850D884:: @ 850D884 + .incbin "baserom.gba", 0x50d884, 0x14 + +gUnknown_0850D898:: @ 850D898 + .incbin "baserom.gba", 0x50d898, 0x4 + +gUnknown_0850D89C:: @ 850D89C + .incbin "baserom.gba", 0x50d89c, 0x10 + +gUnknown_0850D8AC:: @ 850D8AC + .incbin "baserom.gba", 0x50d8ac, 0x8 + +gUnknown_0850D8B4:: @ 850D8B4 + .incbin "baserom.gba", 0x50d8b4, 0x10 + +gUnknown_0850D8C4:: @ 850D8C4 + .incbin "baserom.gba", 0x50d8c4, 0x8 + +gUnknown_0850D8CC:: @ 850D8CC + .incbin "baserom.gba", 0x50d8cc, 0x10 + +gUnknown_0850D8DC:: @ 850D8DC + .incbin "baserom.gba", 0x50d8dc, 0xc + +gUnknown_0850D8E8:: @ 850D8E8 + .incbin "baserom.gba", 0x50d8e8, 0x4 + +gUnknown_0850D8EC:: @ 850D8EC + .incbin "baserom.gba", 0x50d8ec, 0xc + +gUnknown_0850D8F8:: @ 850D8F8 + .incbin "baserom.gba", 0x50d8f8, 0x4 + +gUnknown_0850D8FC:: @ 850D8FC + .incbin "baserom.gba", 0x50d8fc, 0xc + +gUnknown_0850D908:: @ 850D908 + .incbin "baserom.gba", 0x50d908, 0x4 + +gUnknown_0850D90C:: @ 850D90C + .incbin "baserom.gba", 0x50d90c, 0xc + +gUnknown_0850D918:: @ 850D918 + .incbin "baserom.gba", 0x50d918, 0x4 + +gUnknown_0850D91C:: @ 850D91C + .incbin "baserom.gba", 0x50d91c, 0xc + +gUnknown_0850D928:: @ 850D928 + .incbin "baserom.gba", 0x50d928, 0x4 + +gUnknown_0850D92C:: @ 850D92C + .incbin "baserom.gba", 0x50d92c, 0xc + +gUnknown_0850D938:: @ 850D938 + .incbin "baserom.gba", 0x50d938, 0x4 + +gUnknown_0850D93C:: @ 850D93C + .incbin "baserom.gba", 0x50d93c, 0xc + +gUnknown_0850D948:: @ 850D948 + .incbin "baserom.gba", 0x50d948, 0xc + +gUnknown_0850D954:: @ 850D954 + .incbin "baserom.gba", 0x50d954, 0x4 + +gUnknown_0850D958:: @ 850D958 + .incbin "baserom.gba", 0x50d958, 0xc + +gUnknown_0850D964:: @ 850D964 + .incbin "baserom.gba", 0x50d964, 0x4 + +gUnknown_0850D968:: @ 850D968 + .incbin "baserom.gba", 0x50d968, 0xc + +gUnknown_0850D974:: @ 850D974 + .incbin "baserom.gba", 0x50d974, 0x4 + +gUnknown_0850D978:: @ 850D978 + .incbin "baserom.gba", 0x50d978, 0xc + +gUnknown_0850D984:: @ 850D984 + .incbin "baserom.gba", 0x50d984, 0x4 + +gUnknown_0850D988:: @ 850D988 + .incbin "baserom.gba", 0x50d988, 0xc + +gUnknown_0850D994:: @ 850D994 + .incbin "baserom.gba", 0x50d994, 0x4 + +gUnknown_0850D998:: @ 850D998 + .incbin "baserom.gba", 0x50d998, 0xc + +gUnknown_0850D9A4:: @ 850D9A4 + .incbin "baserom.gba", 0x50d9a4, 0x4 + +gUnknown_0850D9A8:: @ 850D9A8 + .incbin "baserom.gba", 0x50d9a8, 0xc + +gUnknown_0850D9B4:: @ 850D9B4 + .incbin "baserom.gba", 0x50d9b4, 0x4 + +gUnknown_0850D9B8:: @ 850D9B8 + .incbin "baserom.gba", 0x50d9b8, 0xc + +gUnknown_0850D9C4:: @ 850D9C4 + .incbin "baserom.gba", 0x50d9c4, 0x4 + +gUnknown_0850D9C8:: @ 850D9C8 + .incbin "baserom.gba", 0x50d9c8, 0xc + +gUnknown_0850D9D4:: @ 850D9D4 + .incbin "baserom.gba", 0x50d9d4, 0x4 + +gUnknown_0850D9D8:: @ 850D9D8 + .incbin "baserom.gba", 0x50d9d8, 0xc + +gUnknown_0850D9E4:: @ 850D9E4 + .incbin "baserom.gba", 0x50d9e4, 0x4 + +gUnknown_0850D9E8:: @ 850D9E8 + .incbin "baserom.gba", 0x50d9e8, 0xc + +gUnknown_0850D9F4:: @ 850D9F4 + .incbin "baserom.gba", 0x50d9f4, 0x4 + +gUnknown_0850D9F8:: @ 850D9F8 + .incbin "baserom.gba", 0x50d9f8, 0xc + +gUnknown_0850DA04:: @ 850DA04 + .incbin "baserom.gba", 0x50da04, 0x4 + +gUnknown_0850DA08:: @ 850DA08 + .incbin "baserom.gba", 0x50da08, 0xc + +gUnknown_0850DA14:: @ 850DA14 + .incbin "baserom.gba", 0x50da14, 0x4 + +gUnknown_0850DA18:: @ 850DA18 + .incbin "baserom.gba", 0x50da18, 0xc + +gUnknown_0850DA24:: @ 850DA24 + .incbin "baserom.gba", 0x50da24, 0x4 + +gUnknown_0850DA28:: @ 850DA28 + .incbin "baserom.gba", 0x50da28, 0xc + +gUnknown_0850DA34:: @ 850DA34 + .incbin "baserom.gba", 0x50da34, 0x4 + +gUnknown_0850DA38:: @ 850DA38 + .incbin "baserom.gba", 0x50da38, 0xc + +gUnknown_0850DA44:: @ 850DA44 + .incbin "baserom.gba", 0x50da44, 0x4 + +gUnknown_0850DA48:: @ 850DA48 + .incbin "baserom.gba", 0x50da48, 0xc + +gUnknown_0850DA54:: @ 850DA54 + .incbin "baserom.gba", 0x50da54, 0x4 + +gUnknown_0850DA58:: @ 850DA58 + .incbin "baserom.gba", 0x50da58, 0xc + +gUnknown_0850DA64:: @ 850DA64 + .incbin "baserom.gba", 0x50da64, 0x2c + +gUnknown_0850DA90:: @ 850DA90 + .incbin "baserom.gba", 0x50da90, 0xc + +gUnknown_0850DA9C:: @ 850DA9C + .incbin "baserom.gba", 0x50da9c, 0x4 + +gUnknown_0850DAA0:: @ 850DAA0 + .incbin "baserom.gba", 0x50daa0, 0x8 + +gUnknown_0850DAA8:: @ 850DAA8 + .incbin "baserom.gba", 0x50daa8, 0x8 + +gUnknown_0850DAB0:: @ 850DAB0 + .incbin "baserom.gba", 0x50dab0, 0x8 + +gUnknown_0850DAB8:: @ 850DAB8 + .incbin "baserom.gba", 0x50dab8, 0x8 + +gUnknown_0850DAC0:: @ 850DAC0 + .incbin "baserom.gba", 0x50dac0, 0xc + +gUnknown_0850DACC:: @ 850DACC + .incbin "baserom.gba", 0x50dacc, 0x9 + +gUnknown_0850DAD5:: @ 850DAD5 + .incbin "baserom.gba", 0x50dad5, 0x9 + +gUnknown_0850DADE:: @ 850DADE + .incbin "baserom.gba", 0x50dade, 0x9 + +gUnknown_0850DAE7:: @ 850DAE7 + .incbin "baserom.gba", 0x50dae7, 0x9 + +gUnknown_0850DAF0:: @ 850DAF0 + .incbin "baserom.gba", 0x50daf0, 0x9 + +gUnknown_0850DAF9:: @ 850DAF9 + .incbin "baserom.gba", 0x50daf9, 0x9 + +gUnknown_0850DB02:: @ 850DB02 + .incbin "baserom.gba", 0x50db02, 0x9 + +gUnknown_0850DB0B:: @ 850DB0B + .incbin "baserom.gba", 0x50db0b, 0x9 + +gUnknown_0850DB14:: @ 850DB14 + .incbin "baserom.gba", 0x50db14, 0x9 + +gUnknown_0850DB1D:: @ 850DB1D + .incbin "baserom.gba", 0x50db1d, 0x9 + +gUnknown_0850DB26:: @ 850DB26 + .incbin "baserom.gba", 0x50db26, 0x9 + +gUnknown_0850DB2F:: @ 850DB2F + .incbin "baserom.gba", 0x50db2f, 0x9 + +gUnknown_0850DB38:: @ 850DB38 + .incbin "baserom.gba", 0x50db38, 0x9 + +gUnknown_0850DB41:: @ 850DB41 + .incbin "baserom.gba", 0x50db41, 0x9 + +gUnknown_0850DB4A:: @ 850DB4A + .incbin "baserom.gba", 0x50db4a, 0x9 + +gUnknown_0850DB53:: @ 850DB53 + .incbin "baserom.gba", 0x50db53, 0x9 + +gUnknown_0850DB5C:: @ 850DB5C + .incbin "baserom.gba", 0x50db5c, 0x10 + +gUnknown_0850DB6C:: @ 850DB6C + .incbin "baserom.gba", 0x50db6c, 0x10 + +gUnknown_0850DB7C:: @ 850DB7C + .incbin "baserom.gba", 0x50db7c, 0x24 + +gUnknown_0850DBA0:: @ 850DBA0 + .incbin "baserom.gba", 0x50dba0, 0x5 + +gUnknown_0850DBA5:: @ 850DBA5 + .incbin "baserom.gba", 0x50dba5, 0x5 + +gUnknown_0850DBAA:: @ 850DBAA + .incbin "baserom.gba", 0x50dbaa, 0x5 + +gUnknown_0850DBAF:: @ 850DBAF + .incbin "baserom.gba", 0x50dbaf, 0x5 + +gUnknown_0850DBB4:: @ 850DBB4 + .incbin "baserom.gba", 0x50dbb4, 0x5 + +gUnknown_0850DBB9:: @ 850DBB9 + .incbin "baserom.gba", 0x50dbb9, 0x5 + +gUnknown_0850DBBE:: @ 850DBBE + .incbin "baserom.gba", 0x50dbbe, 0x5 + +gUnknown_0850DBC3:: @ 850DBC3 + .incbin "baserom.gba", 0x50dbc3, 0x5 + +gUnknown_0850DBC8:: @ 850DBC8 + .incbin "baserom.gba", 0x50dbc8, 0x5 + +gUnknown_0850DBCD:: @ 850DBCD + .incbin "baserom.gba", 0x50dbcd, 0x5 + +gUnknown_0850DBD2:: @ 850DBD2 + .incbin "baserom.gba", 0x50dbd2, 0x5 + +gUnknown_0850DBD7:: @ 850DBD7 + .incbin "baserom.gba", 0x50dbd7, 0x5 + +gUnknown_0850DBDC:: @ 850DBDC + .incbin "baserom.gba", 0x50dbdc, 0x5 + +gUnknown_0850DBE1:: @ 850DBE1 + .incbin "baserom.gba", 0x50dbe1, 0x5 + +gUnknown_0850DBE6:: @ 850DBE6 + .incbin "baserom.gba", 0x50dbe6, 0x5 + +gUnknown_0850DBEB:: @ 850DBEB + .incbin "baserom.gba", 0x50dbeb, 0x5 + +gUnknown_0850DBF0:: @ 850DBF0 + .incbin "baserom.gba", 0x50dbf0, 0x5 + +gUnknown_0850DBF5:: @ 850DBF5 + .incbin "baserom.gba", 0x50dbf5, 0x5 + +gUnknown_0850DBFA:: @ 850DBFA + .incbin "baserom.gba", 0x50dbfa, 0x5 + +gUnknown_0850DBFF:: @ 850DBFF + .incbin "baserom.gba", 0x50dbff, 0x5 + +gUnknown_0850DC04:: @ 850DC04 + .incbin "baserom.gba", 0x50dc04, 0x5 + +gUnknown_0850DC09:: @ 850DC09 + .incbin "baserom.gba", 0x50dc09, 0x5 + +gUnknown_0850DC0E:: @ 850DC0E + .incbin "baserom.gba", 0x50dc0e, 0x5 + +gUnknown_0850DC13:: @ 850DC13 + .incbin "baserom.gba", 0x50dc13, 0x5 + +gUnknown_0850DC18:: @ 850DC18 + .incbin "baserom.gba", 0x50dc18, 0x5 + +gUnknown_0850DC1D:: @ 850DC1D + .incbin "baserom.gba", 0x50dc1d, 0x5 + +gUnknown_0850DC22:: @ 850DC22 + .incbin "baserom.gba", 0x50dc22, 0x5 + +gUnknown_0850DC27:: @ 850DC27 + .incbin "baserom.gba", 0x50dc27, 0x8 + +gUnknown_0850DC2F:: @ 850DC2F + .incbin "baserom.gba", 0x50dc2f, 0x10 + +gUnknown_0850DC3F:: @ 850DC3F + .incbin "baserom.gba", 0x50dc3f, 0x11 + +gUnknown_0850DC50:: @ 850DC50 + .incbin "baserom.gba", 0x50dc50, 0x298 + +gUnknown_0850DEE8:: @ 850DEE8 + .incbin "baserom.gba", 0x50dee8, 0xd4 + +gUnknown_0850DFBC:: @ 850DFBC + .incbin "baserom.gba", 0x50dfbc, 0x6 + +gUnknown_0850DFC2:: @ 850DFC2 + .incbin "baserom.gba", 0x50dfc2, 0x6 diff --git a/ld_script.txt b/ld_script.txt index 81e4fc3ab..b050d3c51 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -340,6 +340,8 @@ SECTIONS { src/trig.o(.rodata); src/util.o(.rodata); data/data3.o(.rodata); + data/field_map_obj.o(.rodata); + data/data3.o(.rodata_b); src/berry.o(.rodata); data/data3_a1.o(.rodata); src/pokemon_size_record.o(.rodata) From b92b690d2ac893c058b9f2192855833aaf220ad4 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 17:40:38 -0400 Subject: [PATCH 188/342] never mind, this actually is in field_map_obj.s --- data/data3.s | 3 --- data/field_map_obj.s | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/data3.s b/data/data3.s index 70b057884..ec29349bd 100644 --- a/data/data3.s +++ b/data/data3.s @@ -634,11 +634,8 @@ gUnknown_084975BC:: @ 84975BC // data/field_map_obj.s -// end data/field_map_obj.s .section .rodata_b - .incbin "baserom.gba", 0x50dfc8, 0x614 - gUnknown_0850E5DC:: @ 850E5DC .incbin "baserom.gba", 0x50e5dc, 0x8 diff --git a/data/field_map_obj.s b/data/field_map_obj.s index 2030ec578..6a9682574 100644 --- a/data/field_map_obj.s +++ b/data/field_map_obj.s @@ -497,3 +497,6 @@ gUnknown_0850DFBC:: @ 850DFBC gUnknown_0850DFC2:: @ 850DFC2 .incbin "baserom.gba", 0x50dfc2, 0x6 + +gUnknown_0850DFC8:: @ 850DFC8 + .incbin "baserom.gba", 0x50dfc8, 0x614 From 130ba76533e6b87696b8e960eb8a09cb951417ad Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 17:50:07 -0400 Subject: [PATCH 189/342] remove data3.h --- include/data3.h | 50 --------------------------------------------- src/field_map_obj.c | 41 ++++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 51 deletions(-) delete mode 100755 include/data3.h diff --git a/include/data3.h b/include/data3.h deleted file mode 100755 index 8151e418c..000000000 --- a/include/data3.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// Created by Scott Norton on 9/8/17. -// - -#ifndef GUARD_DATA3_H -#define GUARD_DATA3_H - -struct PairedPalettes { - u16 tag; - const u16 *data; -}; - -extern u8 gUnknown_084975C4[0x10]; -extern const struct SpriteTemplate gUnknown_084975D4; -extern void (*const gUnknown_084975EC[3])(struct Sprite *); -extern const struct SpritePalette gUnknown_0850BBC8[]; -extern const struct PairedPalettes gUnknown_0850BD00[15]; -extern const struct PairedPalettes gUnknown_0850BD78[15]; -extern const u16 *const gUnknown_0850BE38[2]; -extern const s16 gUnknown_0850D6DC[4]; // {0x20, 0x40, 0x60, 0x80} -extern const s16 gUnknown_0850D6EC[4]; -extern const u8 gUnknown_0850D710[4]; // {DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST} -extern const u8 gUnknown_0850D770[2]; // {DIR_SOUTH, DIR_NORTH} -extern const u8 gUnknown_0850D790[2]; // {DIR_WEST, DIR_EAST} -extern const u8 gUnknown_0850D7F0[2]; // {DIR_NORTH, DIR_WEST} -extern const u8 gUnknown_0850D808[2]; // {DIR_NORTH, DIR_EAST} -extern const u8 gUnknown_0850D820[2]; // {DIR_SOUTH, DIR_WEST} -extern const u8 gUnknown_0850D838[2]; // {DIR_SOUTH, DIR_EAST} -extern const u8 gUnknown_0850D850[4]; -extern const u8 gUnknown_0850D868[4]; -extern const u8 gUnknown_0850D880[4]; -extern const u8 gUnknown_0850D898[4]; -extern const u8 gUnknown_0850D8AC[5]; -extern const u8 gUnknown_0850D8C4[5]; -extern const u8 gUnknown_0850D8E8[4]; -extern bool8 (*const gUnknown_0850DA64[])(struct MapObject *, struct Sprite *, u8, bool8(u8)); -extern bool8 (*const gUnknown_0850DB5C[])(u8); -extern bool8 (*const gUnknown_0850DB6C[])(u8); -extern const struct Coords16 gUnknown_0850DB7C[4]; -extern const u8 gUnknown_0850DC2F[4][4]; -extern const u8 gUnknown_0850DC3F[4][4]; - -extern const u8 gUnknown_0850DBA0[5]; - -extern bool8 (*const *const gUnknown_0850DC50[])(struct MapObject *, struct Sprite *); -extern u8 (*const gUnknown_0850DEE8[5])(u8); -extern const s16 gUnknown_0850DFBC[3]; -extern const s16 gUnknown_0850DFC2[3]; - -#endif //GUARD_DATA3_H diff --git a/src/field_map_obj.c b/src/field_map_obj.c index a79f78434..1ffa0a594 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -5,7 +5,6 @@ #include "sprite.h" #include "rom4.h" #include "rng.h" -#include "data3.h" #include "event_scripts.h" #include "berry.h" #include "palette.h" @@ -134,6 +133,46 @@ const struct MapObjectGraphicsInfo *const gMauvilleOldManGraphicsInfoPointers[7] const struct MapObjectGraphicsInfo *const gFieldObjectGraphicsInfoPointers[0xEF]; u8 (*const gUnknown_0850D714[11])(s16, s16, s16, s16); +struct PairedPalettes { + u16 tag; + const u16 *data; +}; + +u8 gUnknown_084975C4[0x10]; +const struct SpriteTemplate gUnknown_084975D4; +void (*const gUnknown_084975EC[3])(struct Sprite *); +const struct SpritePalette gUnknown_0850BBC8[39]; +const struct PairedPalettes gUnknown_0850BD00[15]; +const struct PairedPalettes gUnknown_0850BD78[15]; +const u16 *const gUnknown_0850BE38[2]; +const s16 gUnknown_0850D6DC[4]; // {0x20, 0x40, 0x60, 0x80} +const s16 gUnknown_0850D6EC[4]; +const u8 gUnknown_0850D710[4]; // {DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST} +const u8 gUnknown_0850D770[2]; // {DIR_SOUTH, DIR_NORTH} +const u8 gUnknown_0850D790[2]; // {DIR_WEST, DIR_EAST} +const u8 gUnknown_0850D7F0[2]; // {DIR_NORTH, DIR_WEST} +const u8 gUnknown_0850D808[2]; // {DIR_NORTH, DIR_EAST} +const u8 gUnknown_0850D820[2]; // {DIR_SOUTH, DIR_WEST} +const u8 gUnknown_0850D838[2]; // {DIR_SOUTH, DIR_EAST} +const u8 gUnknown_0850D850[4]; +const u8 gUnknown_0850D868[4]; +const u8 gUnknown_0850D880[4]; +const u8 gUnknown_0850D898[4]; +const u8 gUnknown_0850D8AC[5]; +const u8 gUnknown_0850D8C4[5]; +const u8 gUnknown_0850D8E8[4]; +bool8 (*const gUnknown_0850DA64[11])(struct MapObject *, struct Sprite *, u8, bool8(u8)); +bool8 (*const gUnknown_0850DB5C[4])(u8); +bool8 (*const gUnknown_0850DB6C[4])(u8); +const struct Coords16 gUnknown_0850DB7C[4]; +const u8 gUnknown_0850DC2F[4][4]; +const u8 gUnknown_0850DC3F[4][4]; +const u8 gUnknown_0850DBA0[5]; +bool8 (*const *const gUnknown_0850DC50[166])(struct MapObject *, struct Sprite *); +u8 (*const gUnknown_0850DEE8[5])(u8); +const s16 gUnknown_0850DFBC[3]; +const s16 gUnknown_0850DFC2[3]; + // Code static void npc_clear_ids_and_state(struct MapObject *mapObject) From d8dd96fa07e7e40e8f599659deb03ec14081548a Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 18:36:38 -0400 Subject: [PATCH 190/342] Start dumping data --- data/field_map_obj.s | 108 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 101 insertions(+), 7 deletions(-) diff --git a/data/field_map_obj.s b/data/field_map_obj.s index 6a9682574..7b1b1f1d6 100644 --- a/data/field_map_obj.s +++ b/data/field_map_obj.s @@ -4,25 +4,118 @@ .section .rodata gUnknown_084975C4:: @ 84975C4 - .incbin "baserom.gba", 0x4975c4, 0x10 +@ replacing .incbin "baserom.gba", 0x004975c4, 0x10 +.byte 0x01, 0x01, 0x06, 0x07, 0x08, 0x09, 0x06, 0x07, 0x08, 0x09, 0x0b, 0x0b, 0x00, 0x00, 0x00, 0x00 gUnknown_084975D4:: @ 84975D4 - .incbin "baserom.gba", 0x4975d4, 0x18 +@ replacing .incbin "baserom.gba", 0x004975d4, 0x18 + .2byte 0, 65535 + .4byte gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, ObjectCB_CameraObject gUnknown_084975EC:: @ 84975EC - .incbin "baserom.gba", 0x4975ec, 0xc +@ replacing .incbin "baserom.gba", 0x004975ec, 0xc +.4byte CameraObject_0 +.4byte CameraObject_1 +.4byte CameraObject_2 @ 84975F8 .include "data/graphics/field_objects/field_object_graphics.inc" gUnknown_08505438:: @ 8505438 - .incbin "baserom.gba", 0x505438, 0x144 +@ replacing .incbin "baserom.gba", 0x00505438, 0x144 +.4byte FieldObjectCB_NoMovement1 +.4byte FieldObjectCB_LookRandomDirections +.4byte FieldObjectCB_GoRandomDirections +.4byte FieldObjectCB_RandomlyGoNorthOrSouth +.4byte FieldObjectCB_RandomlyGoNorthOrSouth +.4byte FieldObjectCB_RandomlyGoEastOrWest +.4byte FieldObjectCB_RandomlyGoEastOrWest +.4byte FieldObjectCB_FaceFixedDirection +.4byte FieldObjectCB_FaceFixedDirection +.4byte FieldObjectCB_FaceFixedDirection +.4byte FieldObjectCB_FaceFixedDirection +.4byte FieldObjectCB_NoMovement2 +.4byte FieldObjectCB_BerryTree +.4byte FieldObjectCB_RandomlyLookNorthOrSouth +.4byte FieldObjectCB_RandomlyLookEastOrWest +.4byte FieldObjectCB_RandomlyLookNorthOrWest +.4byte FieldObjectCB_RandomlyLookNorthOrEast +.4byte FieldObjectCB_RandomlyLookSouthOrWest +.4byte FieldObjectCB_RandomlyLookSouthOrEast +.4byte FieldObjectCB_RandomlyLookNorthOrSouthOrWest +.4byte FieldObjectCB_RandomlyLookNorthOrSouthOrEast +.4byte FieldObjectCB_RandomlyLookNorthOrEastOrWest +.4byte FieldObjectCB_RandomlyLookSouthOrEastOrWest +.4byte FieldObjectCB_LookAroundCounterclockwise +.4byte FieldObjectCB_LookAroundClockwise +.4byte FieldObjectCB_AlternatelyGoInOppositeDirections +.4byte FieldObjectCB_AlternatelyGoInOppositeDirections +.4byte FieldObjectCB_AlternatelyGoInOppositeDirections +.4byte FieldObjectCB_AlternatelyGoInOppositeDirections +.4byte FieldObjectCB_GoInDirectionSequence1 +.4byte FieldObjectCB_GoInDirectionSequence2 +.4byte FieldObjectCB_GoInDirectionSequence3 +.4byte FieldObjectCB_GoInDirectionSequence4 +.4byte FieldObjectCB_GoInDirectionSequence5 +.4byte FieldObjectCB_GoInDirectionSequence6 +.4byte FieldObjectCB_GoInDirectionSequence7 +.4byte FieldObjectCB_GoInDirectionSequence8 +.4byte FieldObjectCB_GoInDirectionSequence9 +.4byte FieldObjectCB_GoInDirectionSequence10 +.4byte FieldObjectCB_GoInDirectionSequence11 +.4byte FieldObjectCB_GoInDirectionSequence12 +.4byte FieldObjectCB_GoInDirectionSequence13 +.4byte FieldObjectCB_GoInDirectionSequence14 +.4byte FieldObjectCB_GoInDirectionSequence15 +.4byte FieldObjectCB_GoInDirectionSequence16 +.4byte FieldObjectCB_GoInDirectionSequence17 +.4byte FieldObjectCB_GoInDirectionSequence18 +.4byte FieldObjectCB_GoInDirectionSequence19 +.4byte FieldObjectCB_GoInDirectionSequence20 +.4byte FieldObjectCB_GoInDirectionSequence21 +.4byte FieldObjectCB_GoInDirectionSequence22 +.4byte FieldObjectCB_GoInDirectionSequence23 +.4byte FieldObjectCB_GoInDirectionSequence24 +.4byte FieldObjectCB_CopyPlayer1 +.4byte FieldObjectCB_CopyPlayer1 +.4byte FieldObjectCB_CopyPlayer1 +.4byte FieldObjectCB_CopyPlayer1 +.4byte FieldObjectCB_TreeDisguise +.4byte FieldObjectCB_MountainDisguise +.4byte FieldObjectCB_CopyPlayer2 +.4byte FieldObjectCB_CopyPlayer2 +.4byte FieldObjectCB_CopyPlayer2 +.4byte FieldObjectCB_CopyPlayer2 +.4byte FieldObjectCB_Hidden1 +.4byte FieldObjectCB_WalkInPlace1 +.4byte FieldObjectCB_WalkInPlace1 +.4byte FieldObjectCB_WalkInPlace1 +.4byte FieldObjectCB_WalkInPlace1 +.4byte FieldObjectCB_WalkInPlace2 +.4byte FieldObjectCB_WalkInPlace2 +.4byte FieldObjectCB_WalkInPlace2 +.4byte FieldObjectCB_WalkInPlace2 +.4byte FieldObjectCB_WalkInPlace3 +.4byte FieldObjectCB_WalkInPlace3 +.4byte FieldObjectCB_WalkInPlace3 +.4byte FieldObjectCB_WalkInPlace3 +.4byte FieldObjectCB_Hidden2 +.4byte FieldObjectCB_WalkInPlace4 +.4byte FieldObjectCB_WalkInPlace4 +.4byte FieldObjectCB_WalkInPlace4 +.4byte FieldObjectCB_WalkInPlace4 gUnknown_0850557C:: @ 850557C - .incbin "baserom.gba", 0x50557c, 0x51 +@ replacing .incbin "baserom.gba", 0x0050557c, 0x51 +.byte 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 +.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00 +.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 gUnknown_085055CD:: @ 85055CD - .incbin "baserom.gba", 0x5055cd, 0x51 +@ replacing .incbin "baserom.gba", 0x005055cd, 0x51 +.byte 0x01, 0x01, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01, 0x03, 0x04, 0x01, 0x01, 0x01, 0x03, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x04, 0x01 +.byte 0x03, 0x02, 0x03, 0x01, 0x04, 0x03, 0x02, 0x04, 0x01, 0x04, 0x02, 0x03, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01, 0x03, 0x04, 0x01, 0x01, 0x02, 0x01, 0x03, 0x04, 0x01 +.byte 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x04, 0x01, 0x01, 0x02, 0x03, 0x04 .align 2, 0 @ 8505620 @@ -38,7 +131,7 @@ gUnknown_085055CD:: @ 85055CD .include "data/graphics/field_objects/field_object_anims.inc" gUnknown_085094AC:: @ 85094AC - .incbin "baserom.gba", 0x5094ac, 0x40 + .incbin "baserom.gba", 0x005094ac, 0x40 @ 85094EC .include "data/graphics/field_objects/field_object_oam.inc" @@ -500,3 +593,4 @@ gUnknown_0850DFC2:: @ 850DFC2 gUnknown_0850DFC8:: @ 850DFC8 .incbin "baserom.gba", 0x50dfc8, 0x614 + From 88bb0dfc3991d7b64d0df995cd6730df4a869532 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 18:54:19 -0400 Subject: [PATCH 191/342] More data dism --- data/field_map_obj.s | 142 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 136 insertions(+), 6 deletions(-) diff --git a/data/field_map_obj.s b/data/field_map_obj.s index 7b1b1f1d6..635231d83 100644 --- a/data/field_map_obj.s +++ b/data/field_map_obj.s @@ -9,8 +9,8 @@ gUnknown_084975C4:: @ 84975C4 gUnknown_084975D4:: @ 84975D4 @ replacing .incbin "baserom.gba", 0x004975d4, 0x18 - .2byte 0, 65535 - .4byte gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, ObjectCB_CameraObject + .2byte 0, 65535 + .4byte gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, ObjectCB_CameraObject gUnknown_084975EC:: @ 84975EC @ replacing .incbin "baserom.gba", 0x004975ec, 0xc @@ -117,7 +117,7 @@ gUnknown_085055CD:: @ 85055CD .byte 0x03, 0x02, 0x03, 0x01, 0x04, 0x03, 0x02, 0x04, 0x01, 0x04, 0x02, 0x03, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01, 0x03, 0x04, 0x01, 0x01, 0x02, 0x01, 0x03, 0x04, 0x01 .byte 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x04, 0x01, 0x01, 0x02, 0x03, 0x04 - .align 2, 0 + .align 2, 0 @ 8505620 .include "data/graphics/field_objects/field_object_graphics_info_pointers.inc" @@ -131,7 +131,23 @@ gUnknown_085055CD:: @ 85055CD .include "data/graphics/field_objects/field_object_anims.inc" gUnknown_085094AC:: @ 85094AC - .incbin "baserom.gba", 0x005094ac, 0x40 +@ replacing .incbin "baserom.gba", 0x005094ac, 0x40 + .4byte gFieldObjectImageAnimTable_QuintyPlump + .byte 1, 3, 0, 2 + .4byte gFieldObjectImageAnimTable_Standard + .byte 1, 3, 0, 2 + .4byte gFieldObjectImageAnimTable_BrendanMayNormal + .byte 1, 3, 0, 2 + .4byte gFieldObjectImageAnimTable_AcroBike + .byte 1, 3, 0, 2 + .4byte gFieldObjectImageAnimTable_Surfing + .byte 1, 3, 0, 2 + .4byte gFieldObjectImageAnimTable_Nurse + .byte 1, 3, 0, 2 + .4byte gFieldObjectImageAnimTable_Fishing + .byte 1, 3, 0, 2 + .4byte NULL + .byte 0, 0, 0, 0 @ 85094EC .include "data/graphics/field_objects/field_object_oam.inc" @@ -140,7 +156,120 @@ gUnknown_085094AC:: @ 85094AC .include "data/graphics/field_objects/field_object_graphics_info.inc" gUnknown_0850BBC8:: @ 850BBC8 - .incbin "baserom.gba", 0x50bbc8, 0x138 +gUnknown_0850BBC8:: @ 850BBC8 +@ replacing .incbin "baserom.gba", 0x0050bbc8, 0x138 + .align 2, 0 + .4byte gFieldObjectPalette0 + .2byte 4355 + .align 2, 0 + .4byte gFieldObjectPalette1 + .2byte 4356 + .align 2, 0 + .4byte gFieldObjectPalette2 + .2byte 4357 + .align 2, 0 + .4byte gFieldObjectPalette3 + .2byte 4358 + .align 2, 0 + .4byte gFieldObjectPalette4 + .2byte 4359 + .align 2, 0 + .4byte gFieldObjectPalette5 + .2byte 4360 + .align 2, 0 + .4byte gFieldObjectPalette6 + .2byte 4361 + .align 2, 0 + .4byte gFieldObjectPalette7 + .2byte 4362 + .align 2, 0 + .4byte gFieldObjectPalette8 + .2byte 4352 + .align 2, 0 + .4byte gFieldObjectPalette9 + .2byte 4353 + .align 2, 0 + .4byte gFieldObjectPalette10 + .2byte 4354 + .align 2, 0 + .4byte gFieldObjectPalette11 + .2byte 4373 + .align 2, 0 + .4byte gFieldObjectPalette12 + .2byte 4363 + .align 2, 0 + .4byte gFieldObjectPalette13 + .2byte 4364 + .align 2, 0 + .4byte gFieldObjectPalette14 + .2byte 4365 + .align 2, 0 + .4byte gFieldObjectPalette15 + .2byte 4366 + .align 2, 0 + .4byte gFieldObjectPalette16 + .2byte 4367 + .align 2, 0 + .4byte gFieldObjectPalette17 + .2byte 4368 + .align 2, 0 + .4byte gFieldObjectPalette18 + .2byte 4369 + .align 2, 0 + .4byte gFieldObjectPalette19 + .2byte 4370 + .align 2, 0 + .4byte gFieldObjectPalette20 + .2byte 4371 + .align 2, 0 + .4byte gFieldObjectPalette21 + .2byte 4372 + .align 2, 0 + .4byte gFieldObjectPalette22 + .2byte 4374 + .align 2, 0 + .4byte gFieldObjectPalette23 + .2byte 4375 + .align 2, 0 + .4byte gFieldObjectPalette24 + .2byte 4376 + .align 2, 0 + .4byte gFieldObjectPalette25 + .2byte 4377 + .align 2, 0 + .4byte gFieldObjectPalette26 + .2byte 4379 + .align 2, 0 + .4byte gFieldObjectPalette27 + .2byte 4380 + .align 2, 0 + .4byte gFieldObjectPalette28 + .2byte 4381 + .align 2, 0 + .4byte gFieldObjectPalette29 + .2byte 4382 + .align 2, 0 + .4byte gFieldObjectPalette30 + .2byte 4383 + .align 2, 0 + .4byte gFieldObjectPalette31 + .2byte 4384 + .align 2, 0 + .4byte gFieldObjectPalette32 + .2byte 4385 + .align 2, 0 + .4byte gFieldObjectPalette33 + .2byte 4386 + .align 2, 0 + .4byte gFieldObjectPalette34 + .2byte 4387 + .align 2, 0 + .4byte NULL + .2byte 0 + .align 2, 0 + +gUnknown_0850BCE8:: @ 0850BCE8 + .incbin "baserom.gba", 0x50bce8, 0x18 gUnknown_0850BD00:: @ 850BD00 .incbin "baserom.gba", 0x50bd00, 0x78 @@ -589,8 +718,9 @@ gUnknown_0850DFBC:: @ 850DFBC .incbin "baserom.gba", 0x50dfbc, 0x6 gUnknown_0850DFC2:: @ 850DFC2 - .incbin "baserom.gba", 0x50dfc2, 0x6 + .incbin "baserom.gba", 0x50dfc2, 0x6 gUnknown_0850DFC8:: @ 850DFC8 .incbin "baserom.gba", 0x50dfc8, 0x614 + From a23f1a4b11a2d1b5a87898146c7eb0a6ec44da46 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 19:17:58 -0400 Subject: [PATCH 192/342] hooray, another data dump --- .gitignore | 1 + data/field_map_obj.s | 86 +++++++++++++++++++++++++++++++++++++++++--- src/field_map_obj.c | 4 +-- 3 files changed, 84 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index f450c83f7..e1600820c 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ tools/* *.sa* Thumbs.db .DS_Store +*.ddump diff --git a/data/field_map_obj.s b/data/field_map_obj.s index 635231d83..6092e8b26 100644 --- a/data/field_map_obj.s +++ b/data/field_map_obj.s @@ -155,7 +155,6 @@ gUnknown_085094AC:: @ 85094AC @ 8509954 .include "data/graphics/field_objects/field_object_graphics_info.inc" -gUnknown_0850BBC8:: @ 850BBC8 gUnknown_0850BBC8:: @ 850BBC8 @ replacing .incbin "baserom.gba", 0x0050bbc8, 0x138 .align 2, 0 @@ -268,14 +267,91 @@ gUnknown_0850BBC8:: @ 850BBC8 .2byte 0 .align 2, 0 -gUnknown_0850BCE8:: @ 0850BCE8 - .incbin "baserom.gba", 0x50bce8, 0x18 +Unknown_0850BCE8:: @ 0850BCE8 + .incbin "baserom.gba", 0x50bce8, 0x08 + +Unknown_0850BCF0:: @ 0850BCF0 + .incbin "baserom.gba", 0x50bcf0, 0x08 + +Unknown_0850BCF8:: @ 0850BCF8 + .incbin "baserom.gba", 0x50bcf8, 0x08 gUnknown_0850BD00:: @ 850BD00 - .incbin "baserom.gba", 0x50bd00, 0x78 +@ replacing .incbin "baserom.gba", 0x0050bd00, 0x78 + .2byte 4352, 0 + .4byte Unknown_0850BCE8 + .2byte 4368, 0 + .4byte Unknown_0850BCF0 + .2byte 4373, 0 + .4byte Unknown_0850BCF8 + .2byte 4607, 0 + .4byte NULL + +Unknown_0850BD20:: @ 0850BD20 + .incbin "baserom.gba", 0x50bd20, 0x08 + +Unknown_0850BD28:: @ 0x0850bd28 + .incbin "baserom.gba", 0x50bd28, 0x08 + +Unknown_0850BD30:: @ 0x0850bd30 + .incbin "baserom.gba", 0x50bd30, 0x08 + +Unknown_0850BD38:: @ 0x0850bd38 + .incbin "baserom.gba", 0x50bd38, 0x08 + +Unknown_0850BD40:: @ 0x0850bd40 + .incbin "baserom.gba", 0x50bd40, 0x08 + +Unknown_0850BD48:: @ 0x0850bd48 + .incbin "baserom.gba", 0x50bd48, 0x08 + +Unknown_0850BD50:: @ 0x0850bd50 + .incbin "baserom.gba", 0x50bd50, 0x08 + +Unknown_0850BD58:: @ 0x0850bd58 + .incbin "baserom.gba", 0x50bd58, 0x08 + +Unknown_0850BD60:: @ 0x0850bd60 + .incbin "baserom.gba", 0x50bd60, 0x08 + +Unknown_0850BD68:: @ 0x0850bd68 + .incbin "baserom.gba", 0x50bd68, 0x08 + +Unknown_0850BD70:: @ 0x0850bd70 + .incbin "baserom.gba", 0x50bd70, 0x08 gUnknown_0850BD78:: @ 850BD78 - .incbin "baserom.gba", 0x50bd78, 0xc0 +@ replacing .incbin "baserom.gba", 0x0050bd78, 0xc0 + .2byte 4352, 0 + .4byte Unknown_0850BCE8 + .2byte 4368, 0 + .4byte Unknown_0850BCF0 + .2byte 4363, 0 + .4byte Unknown_0850BD20 + .2byte 4365, 0 + .4byte Unknown_0850BD28 + .2byte 4366, 0 + .4byte Unknown_0850BD30 + .2byte 4370, 0 + .4byte Unknown_0850BD38 + .2byte 4371, 0 + .4byte Unknown_0850BD40 + .2byte 4372, 0 + .4byte Unknown_0850BD48 + .2byte 4374, 0 + .4byte Unknown_0850BD58 + .2byte 4376, 0 + .4byte Unknown_0850BD60 + .2byte 4357, 0 + .4byte Unknown_0850BD68 + .2byte 4379, 0 + .4byte Unknown_0850BD50 + .2byte 4381, 0 + .4byte Unknown_0850BD70 + .2byte 4607, 0 + .4byte NULL + + .incbin "baserom.gba", 0x50bde8, 0x50 gUnknown_0850BE38:: @ 850BE38 .incbin "baserom.gba", 0x50be38, 0x10 diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 1ffa0a594..ed51d5fe8 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -142,8 +142,8 @@ u8 gUnknown_084975C4[0x10]; const struct SpriteTemplate gUnknown_084975D4; void (*const gUnknown_084975EC[3])(struct Sprite *); const struct SpritePalette gUnknown_0850BBC8[39]; -const struct PairedPalettes gUnknown_0850BD00[15]; -const struct PairedPalettes gUnknown_0850BD78[15]; +const struct PairedPalettes gUnknown_0850BD00[4]; +const struct PairedPalettes gUnknown_0850BD78[14]; const u16 *const gUnknown_0850BE38[2]; const s16 gUnknown_0850D6DC[4]; // {0x20, 0x40, 0x60, 0x80} const s16 gUnknown_0850D6EC[4]; From c9800706575024da3192360cb3055b90424e7045 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 19:33:44 -0400 Subject: [PATCH 193/342] More glorious data dumping --- data/field_map_obj.s | 1477 ++++++++++++++++++++++++++++++++++-------- src/field_map_obj.c | 33 +- 2 files changed, 1218 insertions(+), 292 deletions(-) diff --git a/data/field_map_obj.s b/data/field_map_obj.s index 6092e8b26..49fb56a9d 100644 --- a/data/field_map_obj.s +++ b/data/field_map_obj.s @@ -5,7 +5,7 @@ gUnknown_084975C4:: @ 84975C4 @ replacing .incbin "baserom.gba", 0x004975c4, 0x10 -.byte 0x01, 0x01, 0x06, 0x07, 0x08, 0x09, 0x06, 0x07, 0x08, 0x09, 0x0b, 0x0b, 0x00, 0x00, 0x00, 0x00 + .byte 0x01, 0x01, 0x06, 0x07, 0x08, 0x09, 0x06, 0x07, 0x08, 0x09, 0x0b, 0x0b, 0x00, 0x00, 0x00, 0x00 gUnknown_084975D4:: @ 84975D4 @ replacing .incbin "baserom.gba", 0x004975d4, 0x18 @@ -14,108 +14,108 @@ gUnknown_084975D4:: @ 84975D4 gUnknown_084975EC:: @ 84975EC @ replacing .incbin "baserom.gba", 0x004975ec, 0xc -.4byte CameraObject_0 -.4byte CameraObject_1 -.4byte CameraObject_2 + .4byte CameraObject_0 + .4byte CameraObject_1 + .4byte CameraObject_2 @ 84975F8 .include "data/graphics/field_objects/field_object_graphics.inc" gUnknown_08505438:: @ 8505438 @ replacing .incbin "baserom.gba", 0x00505438, 0x144 -.4byte FieldObjectCB_NoMovement1 -.4byte FieldObjectCB_LookRandomDirections -.4byte FieldObjectCB_GoRandomDirections -.4byte FieldObjectCB_RandomlyGoNorthOrSouth -.4byte FieldObjectCB_RandomlyGoNorthOrSouth -.4byte FieldObjectCB_RandomlyGoEastOrWest -.4byte FieldObjectCB_RandomlyGoEastOrWest -.4byte FieldObjectCB_FaceFixedDirection -.4byte FieldObjectCB_FaceFixedDirection -.4byte FieldObjectCB_FaceFixedDirection -.4byte FieldObjectCB_FaceFixedDirection -.4byte FieldObjectCB_NoMovement2 -.4byte FieldObjectCB_BerryTree -.4byte FieldObjectCB_RandomlyLookNorthOrSouth -.4byte FieldObjectCB_RandomlyLookEastOrWest -.4byte FieldObjectCB_RandomlyLookNorthOrWest -.4byte FieldObjectCB_RandomlyLookNorthOrEast -.4byte FieldObjectCB_RandomlyLookSouthOrWest -.4byte FieldObjectCB_RandomlyLookSouthOrEast -.4byte FieldObjectCB_RandomlyLookNorthOrSouthOrWest -.4byte FieldObjectCB_RandomlyLookNorthOrSouthOrEast -.4byte FieldObjectCB_RandomlyLookNorthOrEastOrWest -.4byte FieldObjectCB_RandomlyLookSouthOrEastOrWest -.4byte FieldObjectCB_LookAroundCounterclockwise -.4byte FieldObjectCB_LookAroundClockwise -.4byte FieldObjectCB_AlternatelyGoInOppositeDirections -.4byte FieldObjectCB_AlternatelyGoInOppositeDirections -.4byte FieldObjectCB_AlternatelyGoInOppositeDirections -.4byte FieldObjectCB_AlternatelyGoInOppositeDirections -.4byte FieldObjectCB_GoInDirectionSequence1 -.4byte FieldObjectCB_GoInDirectionSequence2 -.4byte FieldObjectCB_GoInDirectionSequence3 -.4byte FieldObjectCB_GoInDirectionSequence4 -.4byte FieldObjectCB_GoInDirectionSequence5 -.4byte FieldObjectCB_GoInDirectionSequence6 -.4byte FieldObjectCB_GoInDirectionSequence7 -.4byte FieldObjectCB_GoInDirectionSequence8 -.4byte FieldObjectCB_GoInDirectionSequence9 -.4byte FieldObjectCB_GoInDirectionSequence10 -.4byte FieldObjectCB_GoInDirectionSequence11 -.4byte FieldObjectCB_GoInDirectionSequence12 -.4byte FieldObjectCB_GoInDirectionSequence13 -.4byte FieldObjectCB_GoInDirectionSequence14 -.4byte FieldObjectCB_GoInDirectionSequence15 -.4byte FieldObjectCB_GoInDirectionSequence16 -.4byte FieldObjectCB_GoInDirectionSequence17 -.4byte FieldObjectCB_GoInDirectionSequence18 -.4byte FieldObjectCB_GoInDirectionSequence19 -.4byte FieldObjectCB_GoInDirectionSequence20 -.4byte FieldObjectCB_GoInDirectionSequence21 -.4byte FieldObjectCB_GoInDirectionSequence22 -.4byte FieldObjectCB_GoInDirectionSequence23 -.4byte FieldObjectCB_GoInDirectionSequence24 -.4byte FieldObjectCB_CopyPlayer1 -.4byte FieldObjectCB_CopyPlayer1 -.4byte FieldObjectCB_CopyPlayer1 -.4byte FieldObjectCB_CopyPlayer1 -.4byte FieldObjectCB_TreeDisguise -.4byte FieldObjectCB_MountainDisguise -.4byte FieldObjectCB_CopyPlayer2 -.4byte FieldObjectCB_CopyPlayer2 -.4byte FieldObjectCB_CopyPlayer2 -.4byte FieldObjectCB_CopyPlayer2 -.4byte FieldObjectCB_Hidden1 -.4byte FieldObjectCB_WalkInPlace1 -.4byte FieldObjectCB_WalkInPlace1 -.4byte FieldObjectCB_WalkInPlace1 -.4byte FieldObjectCB_WalkInPlace1 -.4byte FieldObjectCB_WalkInPlace2 -.4byte FieldObjectCB_WalkInPlace2 -.4byte FieldObjectCB_WalkInPlace2 -.4byte FieldObjectCB_WalkInPlace2 -.4byte FieldObjectCB_WalkInPlace3 -.4byte FieldObjectCB_WalkInPlace3 -.4byte FieldObjectCB_WalkInPlace3 -.4byte FieldObjectCB_WalkInPlace3 -.4byte FieldObjectCB_Hidden2 -.4byte FieldObjectCB_WalkInPlace4 -.4byte FieldObjectCB_WalkInPlace4 -.4byte FieldObjectCB_WalkInPlace4 -.4byte FieldObjectCB_WalkInPlace4 + .4byte FieldObjectCB_NoMovement1 + .4byte FieldObjectCB_LookRandomDirections + .4byte FieldObjectCB_GoRandomDirections + .4byte FieldObjectCB_RandomlyGoNorthOrSouth + .4byte FieldObjectCB_RandomlyGoNorthOrSouth + .4byte FieldObjectCB_RandomlyGoEastOrWest + .4byte FieldObjectCB_RandomlyGoEastOrWest + .4byte FieldObjectCB_FaceFixedDirection + .4byte FieldObjectCB_FaceFixedDirection + .4byte FieldObjectCB_FaceFixedDirection + .4byte FieldObjectCB_FaceFixedDirection + .4byte FieldObjectCB_NoMovement2 + .4byte FieldObjectCB_BerryTree + .4byte FieldObjectCB_RandomlyLookNorthOrSouth + .4byte FieldObjectCB_RandomlyLookEastOrWest + .4byte FieldObjectCB_RandomlyLookNorthOrWest + .4byte FieldObjectCB_RandomlyLookNorthOrEast + .4byte FieldObjectCB_RandomlyLookSouthOrWest + .4byte FieldObjectCB_RandomlyLookSouthOrEast + .4byte FieldObjectCB_RandomlyLookNorthOrSouthOrWest + .4byte FieldObjectCB_RandomlyLookNorthOrSouthOrEast + .4byte FieldObjectCB_RandomlyLookNorthOrEastOrWest + .4byte FieldObjectCB_RandomlyLookSouthOrEastOrWest + .4byte FieldObjectCB_LookAroundCounterclockwise + .4byte FieldObjectCB_LookAroundClockwise + .4byte FieldObjectCB_AlternatelyGoInOppositeDirections + .4byte FieldObjectCB_AlternatelyGoInOppositeDirections + .4byte FieldObjectCB_AlternatelyGoInOppositeDirections + .4byte FieldObjectCB_AlternatelyGoInOppositeDirections + .4byte FieldObjectCB_GoInDirectionSequence1 + .4byte FieldObjectCB_GoInDirectionSequence2 + .4byte FieldObjectCB_GoInDirectionSequence3 + .4byte FieldObjectCB_GoInDirectionSequence4 + .4byte FieldObjectCB_GoInDirectionSequence5 + .4byte FieldObjectCB_GoInDirectionSequence6 + .4byte FieldObjectCB_GoInDirectionSequence7 + .4byte FieldObjectCB_GoInDirectionSequence8 + .4byte FieldObjectCB_GoInDirectionSequence9 + .4byte FieldObjectCB_GoInDirectionSequence10 + .4byte FieldObjectCB_GoInDirectionSequence11 + .4byte FieldObjectCB_GoInDirectionSequence12 + .4byte FieldObjectCB_GoInDirectionSequence13 + .4byte FieldObjectCB_GoInDirectionSequence14 + .4byte FieldObjectCB_GoInDirectionSequence15 + .4byte FieldObjectCB_GoInDirectionSequence16 + .4byte FieldObjectCB_GoInDirectionSequence17 + .4byte FieldObjectCB_GoInDirectionSequence18 + .4byte FieldObjectCB_GoInDirectionSequence19 + .4byte FieldObjectCB_GoInDirectionSequence20 + .4byte FieldObjectCB_GoInDirectionSequence21 + .4byte FieldObjectCB_GoInDirectionSequence22 + .4byte FieldObjectCB_GoInDirectionSequence23 + .4byte FieldObjectCB_GoInDirectionSequence24 + .4byte FieldObjectCB_CopyPlayer1 + .4byte FieldObjectCB_CopyPlayer1 + .4byte FieldObjectCB_CopyPlayer1 + .4byte FieldObjectCB_CopyPlayer1 + .4byte FieldObjectCB_TreeDisguise + .4byte FieldObjectCB_MountainDisguise + .4byte FieldObjectCB_CopyPlayer2 + .4byte FieldObjectCB_CopyPlayer2 + .4byte FieldObjectCB_CopyPlayer2 + .4byte FieldObjectCB_CopyPlayer2 + .4byte FieldObjectCB_Hidden1 + .4byte FieldObjectCB_WalkInPlace1 + .4byte FieldObjectCB_WalkInPlace1 + .4byte FieldObjectCB_WalkInPlace1 + .4byte FieldObjectCB_WalkInPlace1 + .4byte FieldObjectCB_WalkInPlace2 + .4byte FieldObjectCB_WalkInPlace2 + .4byte FieldObjectCB_WalkInPlace2 + .4byte FieldObjectCB_WalkInPlace2 + .4byte FieldObjectCB_WalkInPlace3 + .4byte FieldObjectCB_WalkInPlace3 + .4byte FieldObjectCB_WalkInPlace3 + .4byte FieldObjectCB_WalkInPlace3 + .4byte FieldObjectCB_Hidden2 + .4byte FieldObjectCB_WalkInPlace4 + .4byte FieldObjectCB_WalkInPlace4 + .4byte FieldObjectCB_WalkInPlace4 + .4byte FieldObjectCB_WalkInPlace4 gUnknown_0850557C:: @ 850557C @ replacing .incbin "baserom.gba", 0x0050557c, 0x51 -.byte 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 -.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00 -.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 + .byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00 + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 gUnknown_085055CD:: @ 85055CD @ replacing .incbin "baserom.gba", 0x005055cd, 0x51 -.byte 0x01, 0x01, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01, 0x03, 0x04, 0x01, 0x01, 0x01, 0x03, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x04, 0x01 -.byte 0x03, 0x02, 0x03, 0x01, 0x04, 0x03, 0x02, 0x04, 0x01, 0x04, 0x02, 0x03, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01, 0x03, 0x04, 0x01, 0x01, 0x02, 0x01, 0x03, 0x04, 0x01 -.byte 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x04, 0x01, 0x01, 0x02, 0x03, 0x04 + .byte 0x01, 0x01, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01, 0x03, 0x04, 0x01, 0x01, 0x01, 0x03, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x04, 0x01 + .byte 0x03, 0x02, 0x03, 0x01, 0x04, 0x03, 0x02, 0x04, 0x01, 0x04, 0x02, 0x03, 0x01, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01, 0x03, 0x04, 0x02, 0x01, 0x03, 0x04, 0x01, 0x01, 0x02, 0x01, 0x03, 0x04, 0x01 + .byte 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x04, 0x01, 0x02, 0x03, 0x04, 0x01, 0x01, 0x02, 0x03, 0x04 .align 2, 0 @ 8505620 @@ -278,14 +278,14 @@ Unknown_0850BCF8:: @ 0850BCF8 gUnknown_0850BD00:: @ 850BD00 @ replacing .incbin "baserom.gba", 0x0050bd00, 0x78 - .2byte 4352, 0 - .4byte Unknown_0850BCE8 - .2byte 4368, 0 - .4byte Unknown_0850BCF0 - .2byte 4373, 0 - .4byte Unknown_0850BCF8 - .2byte 4607, 0 - .4byte NULL + .2byte 4352, 0 + .4byte Unknown_0850BCE8 + .2byte 4368, 0 + .4byte Unknown_0850BCF0 + .2byte 4373, 0 + .4byte Unknown_0850BCF8 + .2byte 4607, 0 + .4byte NULL Unknown_0850BD20:: @ 0850BD20 .incbin "baserom.gba", 0x50bd20, 0x08 @@ -322,39 +322,47 @@ Unknown_0850BD70:: @ 0x0850bd70 gUnknown_0850BD78:: @ 850BD78 @ replacing .incbin "baserom.gba", 0x0050bd78, 0xc0 - .2byte 4352, 0 - .4byte Unknown_0850BCE8 - .2byte 4368, 0 - .4byte Unknown_0850BCF0 - .2byte 4363, 0 - .4byte Unknown_0850BD20 - .2byte 4365, 0 - .4byte Unknown_0850BD28 - .2byte 4366, 0 - .4byte Unknown_0850BD30 - .2byte 4370, 0 - .4byte Unknown_0850BD38 - .2byte 4371, 0 - .4byte Unknown_0850BD40 - .2byte 4372, 0 - .4byte Unknown_0850BD48 - .2byte 4374, 0 - .4byte Unknown_0850BD58 - .2byte 4376, 0 - .4byte Unknown_0850BD60 - .2byte 4357, 0 - .4byte Unknown_0850BD68 - .2byte 4379, 0 - .4byte Unknown_0850BD50 - .2byte 4381, 0 - .4byte Unknown_0850BD70 - .2byte 4607, 0 - .4byte NULL + .2byte 4352, 0 + .4byte Unknown_0850BCE8 + .2byte 4368, 0 + .4byte Unknown_0850BCF0 + .2byte 4363, 0 + .4byte Unknown_0850BD20 + .2byte 4365, 0 + .4byte Unknown_0850BD28 + .2byte 4366, 0 + .4byte Unknown_0850BD30 + .2byte 4370, 0 + .4byte Unknown_0850BD38 + .2byte 4371, 0 + .4byte Unknown_0850BD40 + .2byte 4372, 0 + .4byte Unknown_0850BD48 + .2byte 4374, 0 + .4byte Unknown_0850BD58 + .2byte 4376, 0 + .4byte Unknown_0850BD60 + .2byte 4357, 0 + .4byte Unknown_0850BD68 + .2byte 4379, 0 + .4byte Unknown_0850BD50 + .2byte 4381, 0 + .4byte Unknown_0850BD70 + .2byte 4607, 0 + .4byte NULL - .incbin "baserom.gba", 0x50bde8, 0x50 +gUnknown_0850BDE8:: @ 850BDE8 +@ replacing .incbin "baserom.gba", 0x0050bde8, 0x50 + .2byte 0x1100, 0x1101, 0x1103, 0x1104, 0x1105, 0x1106, 0x1107, 0x1108, 0x1109, 0x110a, 0x1100, 0x1101, 0x1103, 0x1104, 0x1105, 0x1106 + .2byte 0x1107, 0x1108, 0x1109, 0x110a, 0x1100, 0x1101, 0x1103, 0x1104, 0x1105, 0x1106, 0x1107, 0x1108, 0x1109, 0x110a, 0x1100, 0x1101 + .2byte 0x1103, 0x1104, 0x1105, 0x1106, 0x1107, 0x1108, 0x1109, 0x110a gUnknown_0850BE38:: @ 850BE38 - .incbin "baserom.gba", 0x50be38, 0x10 +@ replacing .incbin "baserom.gba", 0x0050be38, 0x10 + .4byte 0x850bde8 + .4byte 0x850bdfc + .4byte 0x850be10 + .4byte 0x850be24 @ 850BE48 .include "data/graphics/field_objects/berry_tree_graphics_tables.inc" @@ -362,441 +370,1360 @@ gUnknown_0850BE38:: @ 850BE38 @ 850C9C0 .include "data/graphics/field_objects/field_effect_objects.inc" - .incbin "baserom.gba", 0x50d6d4, 0x8 +@ replacing .incbin "baserom.gba", 0x0050d6d4, 0x8 + .align 2, 0 + .4byte 0x084ad8f8 + .2byte 4113 + .align 2, 0 gUnknown_0850D6DC:: @ 850D6DC - .incbin "baserom.gba", 0x50d6dc, 0x10 +@ replacing .incbin "baserom.gba", 0x0050d6dc, 0x10 + .2byte 0x0020, 0x0040, 0x0060, 0x0080, 0x0020, 0x0040, 0x0080, 0x00c0 gUnknown_0850D6EC:: @ 850D6EC - .incbin "baserom.gba", 0x50d6ec, 0x8 +@ replacing .incbin "baserom.gba", 0x0050d6ec, 0x8 + .2byte 0x0020, 0x0030, 0x0040, 0x0050 gUnknown_0850D6F4:: @ 850D6F4 - .incbin "baserom.gba", 0x50d6f4, 0x1c +@ replacing .incbin "baserom.gba", 0x0050d6f4, 0x1c + .4byte sub_808F44C + .4byte sub_808F460 + .4byte sub_808F48C + .4byte sub_808F4C8 + .4byte sub_808F4E8 + .4byte sub_808F534 + .4byte sub_808F564 gUnknown_0850D710:: @ 850D710 - .incbin "baserom.gba", 0x50d710, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d710, 0x4 + .byte 0x01, 0x02, 0x03, 0x04 gUnknown_0850D714:: @ 850D714 - .incbin "baserom.gba", 0x50d714, 0x2c +@ replacing .incbin "baserom.gba", 0x0050d714, 0x2c + .4byte GetRegularRunningPastFacingDirection + .4byte GetNorthSouthRunningPastFacingDirection + .4byte GetEastWestRunningPastFacingDirection + .4byte GetNorthEastRunningPastFacingDirection + .4byte GetNorthWestRunningPastFacingDirection + .4byte GetSouthEastRunningPastFacingDirection + .4byte GetSouthWestRunningPastFacingDirection + .4byte GetNonEastRunningPastFacingDirection + .4byte GetNonWestRunningPastFacingDirection + .4byte GetNonSouthRunningPastFacingDirection + .4byte GetNonNorthRunningPastFacingDirection gUnknown_0850D740:: @ 850D740 - .incbin "baserom.gba", 0x50d740, 0x14 +@ replacing .incbin "baserom.gba", 0x0050d740, 0x14 + .4byte sub_808F988 + .4byte sub_808F99C + .4byte sub_808F9C8 + .4byte sub_808FA0C + .4byte sub_808FA3C gUnknown_0850D754:: @ 850D754 - .incbin "baserom.gba", 0x50d754, 0x1c +@ replacing .incbin "baserom.gba", 0x0050d754, 0x1c + .4byte sub_808FAC8 + .4byte sub_808FADC + .4byte sub_808FB08 + .4byte sub_808FB44 + .4byte sub_808FB64 + .4byte sub_808FBB0 + .4byte sub_808FBE0 gUnknown_0850D770:: @ 850D770 - .incbin "baserom.gba", 0x50d770, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d770, 0x4 + .byte 0x01, 0x02, 0x00, 0x00 gUnknown_0850D774:: @ 850D774 - .incbin "baserom.gba", 0x50d774, 0x1c +@ replacing .incbin "baserom.gba", 0x0050d774, 0x1c + .4byte sub_808FC4C + .4byte sub_808FC60 + .4byte sub_808FC8C + .4byte sub_808FCC8 + .4byte sub_808FCE8 + .4byte sub_808FD34 + .4byte sub_808FD64 gUnknown_0850D790:: @ 850D790 - .incbin "baserom.gba", 0x50d790, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d790, 0x4 + .byte 0x03, 0x04, 0x00, 0x00 gUnknown_0850D794:: @ 850D794 - .incbin "baserom.gba", 0x50d794, 0xc +@ replacing .incbin "baserom.gba", 0x0050d794, 0xc + .4byte sub_808FDD0 + .4byte sub_808FDFC + .4byte sub_808FE1C gUnknown_0850D7A0:: @ 850D7A0 - .incbin "baserom.gba", 0x50d7a0, 0x14 +@ replacing .incbin "baserom.gba", 0x0050d7a0, 0x14 + .4byte do_berry_tree_growth_sparkle_1 + .4byte sub_808FF48 + .4byte do_berry_tree_growth_sparkle_2 + .4byte sub_808FFB4 + .4byte sub_8090004 gUnknown_0850D7B4:: @ 850D7B4 - .incbin "baserom.gba", 0x50d7b4, 0x14 +@ replacing .incbin "baserom.gba", 0x0050d7b4, 0x14 + .4byte sub_8090094 + .4byte sub_80900A8 + .4byte sub_80900D4 + .4byte sub_8090118 + .4byte sub_8090148 gUnknown_0850D7C8:: @ 850D7C8 - .incbin "baserom.gba", 0x50d7c8, 0x14 +@ replacing .incbin "baserom.gba", 0x0050d7c8, 0x14 + .4byte sub_80901D4 + .4byte sub_80901E8 + .4byte sub_8090214 + .4byte sub_8090258 + .4byte sub_8090288 gUnknown_0850D7DC:: @ 850D7DC - .incbin "baserom.gba", 0x50d7dc, 0x14 +@ replacing .incbin "baserom.gba", 0x0050d7dc, 0x14 + .4byte sub_8090314 + .4byte sub_8090328 + .4byte sub_8090354 + .4byte sub_8090398 + .4byte sub_80903C8 gUnknown_0850D7F0:: @ 850D7F0 - .incbin "baserom.gba", 0x50d7f0, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d7f0, 0x4 + .byte 0x02, 0x03, 0x00, 0x00 gUnknown_0850D7F4:: @ 850D7F4 - .incbin "baserom.gba", 0x50d7f4, 0x14 +@ replacing .incbin "baserom.gba", 0x0050d7f4, 0x14 + .4byte sub_8090454 + .4byte sub_8090468 + .4byte sub_8090494 + .4byte sub_80904D8 + .4byte sub_8090508 gUnknown_0850D808:: @ 850D808 - .incbin "baserom.gba", 0x50d808, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d808, 0x4 + .byte 0x02, 0x04, 0x00, 0x00 gUnknown_0850D80C:: @ 850D80C - .incbin "baserom.gba", 0x50d80c, 0x14 +@ replacing .incbin "baserom.gba", 0x0050d80c, 0x14 + .4byte sub_8090594 + .4byte sub_80905A8 + .4byte sub_80905D4 + .4byte sub_8090618 + .4byte sub_8090648 gUnknown_0850D820:: @ 850D820 - .incbin "baserom.gba", 0x50d820, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d820, 0x4 + .byte 0x01, 0x03, 0x00, 0x00 gUnknown_0850D824:: @ 850D824 - .incbin "baserom.gba", 0x50d824, 0x14 +@ replacing .incbin "baserom.gba", 0x0050d824, 0x14 + .4byte sub_80906D4 + .4byte sub_80906E8 + .4byte sub_8090714 + .4byte sub_8090758 + .4byte sub_8090788 gUnknown_0850D838:: @ 850D838 - .incbin "baserom.gba", 0x50d838, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d838, 0x4 + .byte 0x01, 0x04, 0x00, 0x00 gUnknown_0850D83C:: @ 850D83C - .incbin "baserom.gba", 0x50d83c, 0x14 +@ replacing .incbin "baserom.gba", 0x0050d83c, 0x14 + .4byte sub_8090814 + .4byte sub_8090828 + .4byte sub_8090854 + .4byte sub_8090898 + .4byte sub_80908C8 gUnknown_0850D850:: @ 850D850 - .incbin "baserom.gba", 0x50d850, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d850, 0x4 + .byte 0x02, 0x01, 0x03, 0x01 gUnknown_0850D854:: @ 850D854 - .incbin "baserom.gba", 0x50d854, 0x14 +@ replacing .incbin "baserom.gba", 0x0050d854, 0x14 + .4byte sub_8090954 + .4byte sub_8090968 + .4byte sub_8090994 + .4byte sub_80909D8 + .4byte sub_8090A08 gUnknown_0850D868:: @ 850D868 - .incbin "baserom.gba", 0x50d868, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d868, 0x4 + .byte 0x01, 0x02, 0x04, 0x01 gUnknown_0850D86C:: @ 850D86C - .incbin "baserom.gba", 0x50d86c, 0x14 +@ replacing .incbin "baserom.gba", 0x0050d86c, 0x14 + .4byte sub_8090A94 + .4byte sub_8090AA8 + .4byte sub_8090AD4 + .4byte sub_8090B18 + .4byte sub_8090B48 gUnknown_0850D880:: @ 850D880 - .incbin "baserom.gba", 0x50d880, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d880, 0x4 + .byte 0x02, 0x03, 0x04, 0x02 gUnknown_0850D884:: @ 850D884 - .incbin "baserom.gba", 0x50d884, 0x14 +@ replacing .incbin "baserom.gba", 0x0050d884, 0x14 + .4byte sub_8090BD4 + .4byte sub_8090BE8 + .4byte sub_8090C14 + .4byte sub_8090C58 + .4byte sub_8090C88 gUnknown_0850D898:: @ 850D898 - .incbin "baserom.gba", 0x50d898, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d898, 0x4 + .byte 0x03, 0x04, 0x01, 0x01 gUnknown_0850D89C:: @ 850D89C - .incbin "baserom.gba", 0x50d89c, 0x10 +@ replacing .incbin "baserom.gba", 0x0050d89c, 0x10 + .4byte sub_8090D14 + .4byte sub_8090D40 + .4byte sub_8090D64 + .4byte sub_8090D90 gUnknown_0850D8AC:: @ 850D8AC - .incbin "baserom.gba", 0x50d8ac, 0x8 +@ replacing .incbin "baserom.gba", 0x0050d8ac, 0x8 + .byte 0x01, 0x04, 0x03, 0x01, 0x02, 0x00, 0x00, 0x00 gUnknown_0850D8B4:: @ 850D8B4 - .incbin "baserom.gba", 0x50d8b4, 0x10 +@ replacing .incbin "baserom.gba", 0x0050d8b4, 0x10 + .4byte sub_8090E18 + .4byte sub_8090E44 + .4byte sub_8090E68 + .4byte sub_8090E94 gUnknown_0850D8C4:: @ 850D8C4 - .incbin "baserom.gba", 0x50d8c4, 0x8 +@ replacing .incbin "baserom.gba", 0x0050d8c4, 0x8 + .byte 0x01, 0x03, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00 gUnknown_0850D8CC:: @ 850D8CC - .incbin "baserom.gba", 0x50d8cc, 0x10 +@ replacing .incbin "baserom.gba", 0x0050d8cc, 0x10 + .4byte sub_8090F1C + .4byte sub_8090F30 + .4byte sub_8090F68 + .4byte sub_8091020 gUnknown_0850D8DC:: @ 850D8DC - .incbin "baserom.gba", 0x50d8dc, 0xc +@ replacing .incbin "baserom.gba", 0x0050d8dc, 0xc + .4byte sub_8091048 + .4byte sub_809117C + .4byte sub_8091110 gUnknown_0850D8E8:: @ 850D8E8 - .incbin "baserom.gba", 0x50d8e8, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d8e8, 0x4 + .byte 0x02, 0x04, 0x03, 0x01 gUnknown_0850D8EC:: @ 850D8EC - .incbin "baserom.gba", 0x50d8ec, 0xc +@ replacing .incbin "baserom.gba", 0x0050d8ec, 0xc + .4byte sub_8091048 + .4byte sub_8091208 + .4byte sub_8091110 gUnknown_0850D8F8:: @ 850D8F8 - .incbin "baserom.gba", 0x50d8f8, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d8f8, 0x4 + .byte 0x04, 0x03, 0x01, 0x02 gUnknown_0850D8FC:: @ 850D8FC - .incbin "baserom.gba", 0x50d8fc, 0xc +@ replacing .incbin "baserom.gba", 0x0050d8fc, 0xc + .4byte sub_8091048 + .4byte sub_8091294 + .4byte sub_8091110 gUnknown_0850D908:: @ 850D908 - .incbin "baserom.gba", 0x50d908, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d908, 0x4 + .byte 0x01, 0x02, 0x04, 0x03 gUnknown_0850D90C:: @ 850D90C - .incbin "baserom.gba", 0x50d90c, 0xc +@ replacing .incbin "baserom.gba", 0x0050d90c, 0xc + .4byte sub_8091048 + .4byte sub_8091320 + .4byte sub_8091110 gUnknown_0850D918:: @ 850D918 - .incbin "baserom.gba", 0x50d918, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d918, 0x4 + .byte 0x03, 0x01, 0x02, 0x04 gUnknown_0850D91C:: @ 850D91C - .incbin "baserom.gba", 0x50d91c, 0xc +@ replacing .incbin "baserom.gba", 0x0050d91c, 0xc + .4byte sub_8091048 + .4byte sub_80913AC + .4byte sub_8091110 gUnknown_0850D928:: @ 850D928 - .incbin "baserom.gba", 0x50d928, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d928, 0x4 + .byte 0x02, 0x03, 0x04, 0x01 gUnknown_0850D92C:: @ 850D92C - .incbin "baserom.gba", 0x50d92c, 0xc +@ replacing .incbin "baserom.gba", 0x0050d92c, 0xc + .4byte sub_8091048 + .4byte sub_8091438 + .4byte sub_8091110 gUnknown_0850D938:: @ 850D938 - .incbin "baserom.gba", 0x50d938, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d938, 0x4 + .byte 0x03, 0x04, 0x01, 0x02 gUnknown_0850D93C:: @ 850D93C - .incbin "baserom.gba", 0x50d93c, 0xc +@ replacing .incbin "baserom.gba", 0x0050d93c, 0xc + .4byte sub_8091048 + .4byte sub_80914C4 + .4byte sub_8091110 gUnknown_0850D948:: @ 850D948 - .incbin "baserom.gba", 0x50d948, 0xc +@ replacing .incbin "baserom.gba", 0x0050d948, 0xc + .4byte sub_8091048 + .4byte sub_8091550 + .4byte sub_8091110 gUnknown_0850D954:: @ 850D954 - .incbin "baserom.gba", 0x50d954, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d954, 0x4 + .byte 0x04, 0x01, 0x02, 0x03 gUnknown_0850D958:: @ 850D958 - .incbin "baserom.gba", 0x50d958, 0xc +@ replacing .incbin "baserom.gba", 0x0050d958, 0xc + .4byte sub_8091048 + .4byte sub_80915DC + .4byte sub_8091110 gUnknown_0850D964:: @ 850D964 - .incbin "baserom.gba", 0x50d964, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d964, 0x4 + .byte 0x03, 0x02, 0x01, 0x04 gUnknown_0850D968:: @ 850D968 - .incbin "baserom.gba", 0x50d968, 0xc +@ replacing .incbin "baserom.gba", 0x0050d968, 0xc + .4byte sub_8091048 + .4byte sub_8091668 + .4byte sub_8091110 gUnknown_0850D974:: @ 850D974 - .incbin "baserom.gba", 0x50d974, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d974, 0x4 + .byte 0x02, 0x01, 0x04, 0x03 gUnknown_0850D978:: @ 850D978 - .incbin "baserom.gba", 0x50d978, 0xc +@ replacing .incbin "baserom.gba", 0x0050d978, 0xc + .4byte sub_8091048 + .4byte sub_80916F4 + .4byte sub_8091110 gUnknown_0850D984:: @ 850D984 - .incbin "baserom.gba", 0x50d984, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d984, 0x4 + .byte 0x04, 0x03, 0x02, 0x01 gUnknown_0850D988:: @ 850D988 - .incbin "baserom.gba", 0x50d988, 0xc +@ replacing .incbin "baserom.gba", 0x0050d988, 0xc + .4byte sub_8091048 + .4byte sub_8091780 + .4byte sub_8091110 gUnknown_0850D994:: @ 850D994 - .incbin "baserom.gba", 0x50d994, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d994, 0x4 + .byte 0x01, 0x04, 0x03, 0x02 gUnknown_0850D998:: @ 850D998 - .incbin "baserom.gba", 0x50d998, 0xc +@ replacing .incbin "baserom.gba", 0x0050d998, 0xc + .4byte sub_8091048 + .4byte sub_809180C + .4byte sub_8091110 gUnknown_0850D9A4:: @ 850D9A4 - .incbin "baserom.gba", 0x50d9a4, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d9a4, 0x4 + .byte 0x04, 0x02, 0x01, 0x03 gUnknown_0850D9A8:: @ 850D9A8 - .incbin "baserom.gba", 0x50d9a8, 0xc +@ replacing .incbin "baserom.gba", 0x0050d9a8, 0xc + .4byte sub_8091048 + .4byte sub_8091898 + .4byte sub_8091110 gUnknown_0850D9B4:: @ 850D9B4 - .incbin "baserom.gba", 0x50d9b4, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d9b4, 0x4 + .byte 0x02, 0x01, 0x03, 0x04 gUnknown_0850D9B8:: @ 850D9B8 - .incbin "baserom.gba", 0x50d9b8, 0xc +@ replacing .incbin "baserom.gba", 0x0050d9b8, 0xc + .4byte sub_8091048 + .4byte sub_8091924 + .4byte sub_8091110 gUnknown_0850D9C4:: @ 850D9C4 - .incbin "baserom.gba", 0x50d9c4, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d9c4, 0x4 + .byte 0x03, 0x04, 0x02, 0x01 gUnknown_0850D9C8:: @ 850D9C8 - .incbin "baserom.gba", 0x50d9c8, 0xc +@ replacing .incbin "baserom.gba", 0x0050d9c8, 0xc + .4byte sub_8091048 + .4byte sub_80919B0 + .4byte sub_8091110 gUnknown_0850D9D4:: @ 850D9D4 - .incbin "baserom.gba", 0x50d9d4, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d9d4, 0x4 + .byte 0x01, 0x03, 0x04, 0x02 gUnknown_0850D9D8:: @ 850D9D8 - .incbin "baserom.gba", 0x50d9d8, 0xc +@ replacing .incbin "baserom.gba", 0x0050d9d8, 0xc + .4byte sub_8091048 + .4byte sub_8091A3C + .4byte sub_8091110 gUnknown_0850D9E4:: @ 850D9E4 - .incbin "baserom.gba", 0x50d9e4, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d9e4, 0x4 + .byte 0x02, 0x03, 0x01, 0x04 gUnknown_0850D9E8:: @ 850D9E8 - .incbin "baserom.gba", 0x50d9e8, 0xc +@ replacing .incbin "baserom.gba", 0x0050d9e8, 0xc + .4byte sub_8091048 + .4byte sub_8091AC8 + .4byte sub_8091110 gUnknown_0850D9F4:: @ 850D9F4 - .incbin "baserom.gba", 0x50d9f4, 0x4 +@ replacing .incbin "baserom.gba", 0x0050d9f4, 0x4 + .byte 0x01, 0x04, 0x02, 0x03 gUnknown_0850D9F8:: @ 850D9F8 - .incbin "baserom.gba", 0x50d9f8, 0xc +@ replacing .incbin "baserom.gba", 0x0050d9f8, 0xc + .4byte sub_8091048 + .4byte sub_8091B54 + .4byte sub_8091110 gUnknown_0850DA04:: @ 850DA04 - .incbin "baserom.gba", 0x50da04, 0x4 +@ replacing .incbin "baserom.gba", 0x0050da04, 0x4 + .byte 0x03, 0x01, 0x04, 0x02 gUnknown_0850DA08:: @ 850DA08 - .incbin "baserom.gba", 0x50da08, 0xc +@ replacing .incbin "baserom.gba", 0x0050da08, 0xc + .4byte sub_8091048 + .4byte sub_8091BE0 + .4byte sub_8091110 gUnknown_0850DA14:: @ 850DA14 - .incbin "baserom.gba", 0x50da14, 0x4 +@ replacing .incbin "baserom.gba", 0x0050da14, 0x4 + .byte 0x04, 0x02, 0x03, 0x01 gUnknown_0850DA18:: @ 850DA18 - .incbin "baserom.gba", 0x50da18, 0xc +@ replacing .incbin "baserom.gba", 0x0050da18, 0xc + .4byte sub_8091048 + .4byte sub_8091C6C + .4byte sub_8091110 gUnknown_0850DA24:: @ 850DA24 - .incbin "baserom.gba", 0x50da24, 0x4 +@ replacing .incbin "baserom.gba", 0x0050da24, 0x4 + .byte 0x02, 0x04, 0x01, 0x03 gUnknown_0850DA28:: @ 850DA28 - .incbin "baserom.gba", 0x50da28, 0xc +@ replacing .incbin "baserom.gba", 0x0050da28, 0xc + .4byte sub_8091048 + .4byte sub_8091CF8 + .4byte sub_8091110 gUnknown_0850DA34:: @ 850DA34 - .incbin "baserom.gba", 0x50da34, 0x4 +@ replacing .incbin "baserom.gba", 0x0050da34, 0x4 + .byte 0x01, 0x03, 0x02, 0x04 gUnknown_0850DA38:: @ 850DA38 - .incbin "baserom.gba", 0x50da38, 0xc +@ replacing .incbin "baserom.gba", 0x0050da38, 0xc + .4byte sub_8091048 + .4byte sub_8091D84 + .4byte sub_8091110 gUnknown_0850DA44:: @ 850DA44 - .incbin "baserom.gba", 0x50da44, 0x4 +@ replacing .incbin "baserom.gba", 0x0050da44, 0x4 + .byte 0x03, 0x02, 0x04, 0x01 gUnknown_0850DA48:: @ 850DA48 - .incbin "baserom.gba", 0x50da48, 0xc +@ replacing .incbin "baserom.gba", 0x0050da48, 0xc + .4byte sub_8091048 + .4byte sub_8091E10 + .4byte sub_8091110 gUnknown_0850DA54:: @ 850DA54 - .incbin "baserom.gba", 0x50da54, 0x4 +@ replacing .incbin "baserom.gba", 0x0050da54, 0x4 + .byte 0x04, 0x01, 0x03, 0x02 gUnknown_0850DA58:: @ 850DA58 - .incbin "baserom.gba", 0x50da58, 0xc +@ replacing .incbin "baserom.gba", 0x0050da58, 0xc + .4byte mss_npc_reset_oampriv3_1_unk2_unk3 + .4byte sub_8091EC0 + .4byte sub_8091F20 gUnknown_0850DA64:: @ 850DA64 - .incbin "baserom.gba", 0x50da64, 0x2c +@ replacing .incbin "baserom.gba", 0x0050da64, 0x2c + .4byte sub_8091F48 + .4byte sub_8091F4C + .4byte sub_8091F94 + .4byte sub_80920A4 + .4byte sub_809215C + .4byte sub_8092214 + .4byte cph_IM_DIFFERENT + .4byte sub_8092314 + .4byte oac_hopping + .4byte sub_8091F48 + .4byte sub_8091F48 gUnknown_0850DA90:: @ 850DA90 - .incbin "baserom.gba", 0x50da90, 0xc +@ replacing .incbin "baserom.gba", 0x0050da90, 0xc + .4byte mss_npc_reset_oampriv3_1_unk2_unk3 + .4byte mss_08062EA4 + .4byte sub_8091F20 gUnknown_0850DA9C:: @ 850DA9C - .incbin "baserom.gba", 0x50da9c, 0x4 +@ replacing .incbin "baserom.gba", 0x0050da9c, 0x4 + .4byte sub_80926AC gUnknown_0850DAA0:: @ 850DAA0 - .incbin "baserom.gba", 0x50daa0, 0x8 +@ replacing .incbin "baserom.gba", 0x0050daa0, 0x8 + .4byte sub_8092718 + .4byte sub_80926B8 gUnknown_0850DAA8:: @ 850DAA8 - .incbin "baserom.gba", 0x50daa8, 0x8 +@ replacing .incbin "baserom.gba", 0x0050daa8, 0x8 + .4byte sub_8092788 + .4byte sub_80926B8 gUnknown_0850DAB0:: @ 850DAB0 - .incbin "baserom.gba", 0x50dab0, 0x8 +@ replacing .incbin "baserom.gba", 0x0050dab0, 0x8 + .4byte sub_80927F8 + .4byte sub_80926B8 gUnknown_0850DAB8:: @ 850DAB8 - .incbin "baserom.gba", 0x50dab8, 0x8 +@ replacing .incbin "baserom.gba", 0x0050dab8, 0x8 + .4byte sub_8092868 + .4byte sub_80926B8 gUnknown_0850DAC0:: @ 850DAC0 - .incbin "baserom.gba", 0x50dac0, 0xc +@ replacing .incbin "baserom.gba", 0x0050dac0, 0xc + .4byte sub_80928D8 + .4byte sub_809290C + .4byte sub_809292C gUnknown_0850DACC:: @ 850DACC - .incbin "baserom.gba", 0x50dacc, 0x9 +@ replacing .incbin "baserom.gba", 0x0050dacc, 0x9 + .byte 0x00, 0x00, 0x01, 0x02, 0x03, 0x00, 0x00, 0x01, 0x01 gUnknown_0850DAD5:: @ 850DAD5 - .incbin "baserom.gba", 0x50dad5, 0x9 +@ replacing .incbin "baserom.gba", 0x0050dad5, 0x9 + .byte 0x04, 0x04, 0x05, 0x06, 0x07, 0x04, 0x04, 0x05, 0x05 gUnknown_0850DADE:: @ 850DADE - .incbin "baserom.gba", 0x50dade, 0x9 +@ replacing .incbin "baserom.gba", 0x0050dade, 0x9 + .byte 0x08, 0x08, 0x09, 0x0a, 0x0b, 0x08, 0x08, 0x09, 0x09 gUnknown_0850DAE7:: @ 850DAE7 - .incbin "baserom.gba", 0x50dae7, 0x9 +@ replacing .incbin "baserom.gba", 0x0050dae7, 0x9 + .byte 0x0c, 0x0c, 0x0d, 0x0e, 0x0f, 0x0c, 0x0c, 0x0d, 0x0d gUnknown_0850DAF0:: @ 850DAF0 - .incbin "baserom.gba", 0x50daf0, 0x9 +@ replacing .incbin "baserom.gba", 0x0050daf0, 0x9 + .byte 0x10, 0x10, 0x11, 0x12, 0x13, 0x10, 0x10, 0x11, 0x11 gUnknown_0850DAF9:: @ 850DAF9 - .incbin "baserom.gba", 0x50daf9, 0x9 +@ replacing .incbin "baserom.gba", 0x0050daf9, 0x9 + .byte 0x14, 0x14, 0x15, 0x16, 0x17, 0x14, 0x14, 0x15, 0x15 gUnknown_0850DB02:: @ 850DB02 - .incbin "baserom.gba", 0x50db02, 0x9 +@ replacing .incbin "baserom.gba", 0x0050db02, 0x9 + .byte 0x14, 0x14, 0x15, 0x16, 0x17, 0x14, 0x14, 0x15, 0x15 gUnknown_0850DB0B:: @ 850DB0B - .incbin "baserom.gba", 0x50db0b, 0x9 +@ replacing .incbin "baserom.gba", 0x0050db0b, 0x9 + .byte 0x18, 0x18, 0x19, 0x1a, 0x1b, 0x18, 0x18, 0x19, 0x19 gUnknown_0850DB14:: @ 850DB14 - .incbin "baserom.gba", 0x50db14, 0x9 +@ replacing .incbin "baserom.gba", 0x0050db14, 0x9 + .byte 0x1c, 0x1c, 0x1d, 0x1e, 0x1f, 0x1c, 0x1c, 0x1d, 0x1d gUnknown_0850DB1D:: @ 850DB1D - .incbin "baserom.gba", 0x50db1d, 0x9 +@ replacing .incbin "baserom.gba", 0x0050db1d, 0x9 + .byte 0x20, 0x20, 0x21, 0x22, 0x23, 0x20, 0x20, 0x21, 0x21 gUnknown_0850DB26:: @ 850DB26 - .incbin "baserom.gba", 0x50db26, 0x9 +@ replacing .incbin "baserom.gba", 0x0050db26, 0x9 + .byte 0x24, 0x24, 0x25, 0x26, 0x27, 0x24, 0x24, 0x25, 0x25 gUnknown_0850DB2F:: @ 850DB2F - .incbin "baserom.gba", 0x50db2f, 0x9 +@ replacing .incbin "baserom.gba", 0x0050db2f, 0x9 + .byte 0x00, 0x00, 0x01, 0x02, 0x03, 0x00, 0x00, 0x01, 0x01 gUnknown_0850DB38:: @ 850DB38 - .incbin "baserom.gba", 0x50db38, 0x9 +@ replacing .incbin "baserom.gba", 0x0050db38, 0x9 + .byte 0x04, 0x04, 0x05, 0x06, 0x07, 0x04, 0x04, 0x05, 0x05 gUnknown_0850DB41:: @ 850DB41 - .incbin "baserom.gba", 0x50db41, 0x9 +@ replacing .incbin "baserom.gba", 0x0050db41, 0x9 + .byte 0x08, 0x08, 0x09, 0x0a, 0x0b, 0x08, 0x08, 0x09, 0x09 gUnknown_0850DB4A:: @ 850DB4A - .incbin "baserom.gba", 0x50db4a, 0x9 +@ replacing .incbin "baserom.gba", 0x0050db4a, 0x9 + .byte 0x14, 0x14, 0x15, 0x16, 0x17, 0x14, 0x14, 0x15, 0x15 gUnknown_0850DB53:: @ 850DB53 - .incbin "baserom.gba", 0x50db53, 0x9 +@ replacing .incbin "baserom.gba", 0x0050db53, 0x9 + .byte 0x08, 0x08, 0x07, 0x09, 0x0a, 0x08, 0x08, 0x07, 0x07 + .align 2, 0 gUnknown_0850DB5C:: @ 850DB5C - .incbin "baserom.gba", 0x50db5c, 0x10 +@ replacing .incbin "baserom.gba", 0x0050db5c, 0x10 + .4byte MetatileBehavior_IsSouthBlocked + .4byte MetatileBehavior_IsNorthBlocked + .4byte MetatileBehavior_IsWestBlocked + .4byte MetatileBehavior_IsEastBlocked gUnknown_0850DB6C:: @ 850DB6C - .incbin "baserom.gba", 0x50db6c, 0x10 +@ replacing .incbin "baserom.gba", 0x0050db6c, 0x10 + .4byte MetatileBehavior_IsNorthBlocked + .4byte MetatileBehavior_IsSouthBlocked + .4byte MetatileBehavior_IsEastBlocked + .4byte MetatileBehavior_IsWestBlocked gUnknown_0850DB7C:: @ 850DB7C - .incbin "baserom.gba", 0x50db7c, 0x24 +@ replacing .incbin "baserom.gba", 0x0050db7c, 0x24 + .2byte 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0xffff, 0xffff, 0x0000, 0x0001, 0x0000, 0xffff, 0x0001, 0x0001, 0x0001, 0xffff, 0xffff + .2byte 0x0001, 0xffff gUnknown_0850DBA0:: @ 850DBA0 - .incbin "baserom.gba", 0x50dba0, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dba0, 0x5 + .byte 0x00, 0x00, 0x01, 0x02, 0x03 gUnknown_0850DBA5:: @ 850DBA5 - .incbin "baserom.gba", 0x50dba5, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dba5, 0x5 + .byte 0x04, 0x04, 0x05, 0x06, 0x07 gUnknown_0850DBAA:: @ 850DBAA - .incbin "baserom.gba", 0x50dbaa, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbaa, 0x5 + .byte 0x08, 0x08, 0x09, 0x0a, 0x0b gUnknown_0850DBAF:: @ 850DBAF - .incbin "baserom.gba", 0x50dbaf, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbaf, 0x5 + .byte 0x15, 0x15, 0x16, 0x17, 0x18 gUnknown_0850DBB4:: @ 850DBB4 - .incbin "baserom.gba", 0x50dbb4, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbb4, 0x5 + .byte 0x29, 0x29, 0x2a, 0x2b, 0x2c gUnknown_0850DBB9:: @ 850DBB9 - .incbin "baserom.gba", 0x50dbb9, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbb9, 0x5 + .byte 0x2d, 0x2d, 0x2e, 0x2f, 0x30 gUnknown_0850DBBE:: @ 850DBBE - .incbin "baserom.gba", 0x50dbbe, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbbe, 0x5 + .byte 0x31, 0x31, 0x32, 0x33, 0x34 gUnknown_0850DBC3:: @ 850DBC3 - .incbin "baserom.gba", 0x50dbc3, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbc3, 0x5 + .byte 0x35, 0x35, 0x36, 0x37, 0x38 gUnknown_0850DBC8:: @ 850DBC8 - .incbin "baserom.gba", 0x50dbc8, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbc8, 0x5 + .byte 0x0c, 0x0c, 0x0d, 0x0e, 0x0f gUnknown_0850DBCD:: @ 850DBCD - .incbin "baserom.gba", 0x50dbcd, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbcd, 0x5 + .byte 0x46, 0x46, 0x47, 0x48, 0x49 gUnknown_0850DBD2:: @ 850DBD2 - .incbin "baserom.gba", 0x50dbd2, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbd2, 0x5 + .byte 0x4b, 0x4b, 0x4a, 0x4d, 0x4c gUnknown_0850DBD7:: @ 850DBD7 - .incbin "baserom.gba", 0x50dbd7, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbd7, 0x5 + .byte 0x42, 0x42, 0x43, 0x44, 0x45 gUnknown_0850DBDC:: @ 850DBDC - .incbin "baserom.gba", 0x50dbdc, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbdc, 0x5 + .byte 0x3a, 0x3a, 0x3b, 0x3c, 0x3d gUnknown_0850DBE1:: @ 850DBE1 - .incbin "baserom.gba", 0x50dbe1, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbe1, 0x5 + .byte 0x19, 0x19, 0x1a, 0x1b, 0x1c gUnknown_0850DBE6:: @ 850DBE6 - .incbin "baserom.gba", 0x50dbe6, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbe6, 0x5 + .byte 0x1d, 0x1d, 0x1e, 0x1f, 0x20 gUnknown_0850DBEB:: @ 850DBEB - .incbin "baserom.gba", 0x50dbeb, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbeb, 0x5 + .byte 0x21, 0x21, 0x22, 0x23, 0x24 gUnknown_0850DBF0:: @ 850DBF0 - .incbin "baserom.gba", 0x50dbf0, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbf0, 0x5 + .byte 0x25, 0x25, 0x26, 0x27, 0x28 gUnknown_0850DBF5:: @ 850DBF5 - .incbin "baserom.gba", 0x50dbf5, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbf5, 0x5 + .byte 0x64, 0x64, 0x65, 0x66, 0x67 gUnknown_0850DBFA:: @ 850DBFA - .incbin "baserom.gba", 0x50dbfa, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbfa, 0x5 + .byte 0x68, 0x68, 0x69, 0x6a, 0x6b gUnknown_0850DBFF:: @ 850DBFF - .incbin "baserom.gba", 0x50dbff, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dbff, 0x5 + .byte 0x6c, 0x6c, 0x6d, 0x6e, 0x6f gUnknown_0850DC04:: @ 850DC04 - .incbin "baserom.gba", 0x50dc04, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dc04, 0x5 + .byte 0x70, 0x70, 0x71, 0x72, 0x73 gUnknown_0850DC09:: @ 850DC09 - .incbin "baserom.gba", 0x50dc09, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dc09, 0x5 + .byte 0x74, 0x74, 0x75, 0x76, 0x77 gUnknown_0850DC0E:: @ 850DC0E - .incbin "baserom.gba", 0x50dc0e, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dc0e, 0x5 + .byte 0x78, 0x78, 0x79, 0x7a, 0x7b gUnknown_0850DC13:: @ 850DC13 - .incbin "baserom.gba", 0x50dc13, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dc13, 0x5 + .byte 0x7c, 0x7c, 0x7d, 0x7e, 0x7f gUnknown_0850DC18:: @ 850DC18 - .incbin "baserom.gba", 0x50dc18, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dc18, 0x5 + .byte 0x80, 0x80, 0x81, 0x82, 0x83 gUnknown_0850DC1D:: @ 850DC1D - .incbin "baserom.gba", 0x50dc1d, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dc1d, 0x5 + .byte 0x84, 0x84, 0x85, 0x86, 0x87 gUnknown_0850DC22:: @ 850DC22 - .incbin "baserom.gba", 0x50dc22, 0x5 +@ replacing .incbin "baserom.gba", 0x0050dc22, 0x5 + .byte 0x88, 0x88, 0x89, 0x8a, 0x8b gUnknown_0850DC27:: @ 850DC27 - .incbin "baserom.gba", 0x50dc27, 0x8 +@ replacing .incbin "baserom.gba", 0x0050dc27, 0x8 + .byte 0x02, 0x01, 0x04, 0x03, 0x08, 0x07, 0x06, 0x05 gUnknown_0850DC2F:: @ 850DC2F - .incbin "baserom.gba", 0x50dc2f, 0x10 +@ replacing .incbin "baserom.gba", 0x0050dc2f, 0x10 + .byte 0x02, 0x01, 0x04, 0x03, 0x01, 0x02, 0x03, 0x04, 0x03, 0x04, 0x02, 0x01, 0x04, 0x03, 0x01, 0x02 gUnknown_0850DC3F:: @ 850DC3F - .incbin "baserom.gba", 0x50dc3f, 0x11 +@ replacing .incbin "baserom.gba", 0x0050dc3f, 0x11 + .byte 0x02, 0x01, 0x04, 0x03, 0x01, 0x02, 0x03, 0x04, 0x04, 0x03, 0x01, 0x02, 0x03, 0x04, 0x02, 0x01, 0x00 + .align 2, 0 gUnknown_0850DC50:: @ 850DC50 - .incbin "baserom.gba", 0x50dc50, 0x298 +@ replacing .incbin "baserom.gba", 0x0050dc50, 0x298 + .4byte gUnknown_0850DC50 + 0x278 + .4byte gUnknown_0850DC50 + 0x280 + .4byte gUnknown_0850DC50 + 0x288 + .4byte gUnknown_0850DC50 + 0x290 + .4byte 0x850df2c + .4byte 0x850df38 + .4byte 0x850df44 + .4byte 0x850df50 + .4byte 0x850df8c + .4byte 0x850df98 + .4byte 0x850dfa4 + .4byte 0x850dfb0 + .4byte gUnknown_0850DFC2 + 0x6 + .4byte 0x850dfd4 + .4byte 0x850dfe0 + .4byte 0x850dfec + .4byte 0x850dff8 + .4byte 0x850e004 + .4byte 0x850e010 + .4byte 0x850e01c + .4byte 0x850e028 + .4byte 0x850e034 + .4byte 0x850e040 + .4byte 0x850e04c + .4byte 0x850e058 + .4byte 0x850e064 + .4byte 0x850e070 + .4byte 0x850e07c + .4byte 0x850e088 + .4byte 0x850e094 + .4byte 0x850e0a0 + .4byte 0x850e0ac + .4byte 0x850e0b8 + .4byte 0x850e0c4 + .4byte 0x850e0d0 + .4byte 0x850e0dc + .4byte 0x850e0e8 + .4byte 0x850e0f4 + .4byte 0x850e100 + .4byte 0x850e10c + .4byte 0x850e118 + .4byte 0x850e124 + .4byte 0x850e130 + .4byte 0x850e13c + .4byte 0x850e148 + .4byte 0x850e154 + .4byte 0x850e160 + .4byte 0x850e16c + .4byte 0x850e178 + .4byte 0x850e184 + .4byte 0x850e190 + .4byte 0x850e19c + .4byte 0x850e1a8 + .4byte 0x850e1b4 + .4byte 0x850e1c0 + .4byte 0x850e1cc + .4byte 0x850e1d8 + .4byte 0x850e1e4 + .4byte 0x850e1f0 + .4byte 0x850e1fc + .4byte 0x850e208 + .4byte 0x850e214 + .4byte 0x850e220 + .4byte 0x850e228 + .4byte 0x850e230 + .4byte 0x850e238 + .4byte 0x850e240 + .4byte 0x850e24c + .4byte 0x850e258 + .4byte 0x850e264 + .4byte 0x850e270 + .4byte 0x850e27c + .4byte 0x850e288 + .4byte 0x850e294 + .4byte 0x850e2a0 + .4byte 0x850e2ac + .4byte 0x850e2b8 + .4byte 0x850e2c4 + .4byte 0x850e2d0 + .4byte 0x850e2d8 + .4byte 0x850e2e4 + .4byte 0x850e2ec + .4byte 0x850e2f4 + .4byte 0x850e2fc + .4byte 0x850e304 + .4byte 0x850e30c + .4byte 0x850e314 + .4byte 0x850e31c + .4byte 0x850e324 + .4byte 0x850e32c + .4byte 0x850e338 + .4byte 0x850e348 + .4byte 0x850e358 + .4byte 0x850e360 + .4byte 0x850e368 + .4byte 0x850e370 + .4byte 0x850e378 + .4byte 0x850e380 + .4byte 0x850e388 + .4byte 0x850e394 + .4byte 0x850e3b8 + .4byte 0x850e3c0 + .4byte 0x850e3c8 + .4byte 0x850e3d0 + .4byte 0x850e3d8 + .4byte 0x850e3e4 + .4byte 0x850e3f0 + .4byte 0x850e3fc + .4byte 0x850e408 + .4byte 0x850e414 + .4byte 0x850e420 + .4byte 0x850e42c + .4byte 0x850e474 + .4byte 0x850e480 + .4byte 0x850e48c + .4byte 0x850e498 + .4byte 0x850e4a4 + .4byte 0x850e4b0 + .4byte 0x850e4bc + .4byte 0x850e4c8 + .4byte 0x850e4d4 + .4byte 0x850e4e0 + .4byte 0x850e4ec + .4byte 0x850e4f8 + .4byte 0x850e504 + .4byte 0x850e510 + .4byte 0x850e51c + .4byte 0x850e528 + .4byte 0x850e534 + .4byte 0x850e540 + .4byte 0x850e54c + .4byte 0x850e558 + .4byte 0x850e564 + .4byte 0x850e570 + .4byte 0x850e57c + .4byte 0x850e588 + .4byte 0x850e594 + .4byte 0x850e5a0 + .4byte 0x850e5ac + .4byte 0x850e5b8 + .4byte 0x850df5c + .4byte 0x850df68 + .4byte 0x850df74 + .4byte 0x850df80 + .4byte 0x850defc + .4byte 0x850df08 + .4byte 0x850df14 + .4byte 0x850df20 + .4byte 0x850e854 + .4byte 0x850e85c + .4byte 0x850e3a0 + .4byte 0x850e3ac + .4byte 0x850e5c4 + .4byte 0x850e5cc + .4byte 0x850e5d4 + .4byte 0x850e468 + .4byte 0x850e864 + .4byte 0x850e870 + .4byte sub_8093950 + .4byte sub_80964BC + .4byte sub_8093960 + .4byte sub_80964BC + .4byte sub_8093970 + .4byte sub_80964BC + .4byte sub_8093980 + .4byte sub_80964BC gUnknown_0850DEE8:: @ 850DEE8 - .incbin "baserom.gba", 0x50dee8, 0xd4 +@ replacing .incbin "baserom.gba", 0x0050dee8, 0xd4 + .4byte get_go_image_anim_num + .4byte get_go_fast_image_anim_num + .4byte get_go_fast_image_anim_num + .4byte get_go_faster_image_anim_num + .4byte get_go_fastest_image_anim_num + .4byte sub_8093BC4 + .4byte sub_8093BC4_2 + .4byte sub_80964BC + .4byte sub_8093C04 + .4byte sub_8093C04_2 + .4byte sub_80964BC + .4byte sub_8093C44 + .4byte sub_8093C44_2 + .4byte sub_80964BC + .4byte sub_8093C84 + .4byte sub_8093C84_2 + .4byte sub_80964BC + .4byte sub_8093CC4 + .4byte sub_8093CC4_2 + .4byte sub_80964BC + .4byte sub_8093D04 + .4byte sub_8093D04_2 + .4byte sub_80964BC + .4byte sub_8093D44 + .4byte sub_8093D44_2 + .4byte sub_80964BC + .4byte sub_8093D84 + .4byte sub_8093D84_2 + .4byte sub_80964BC + .4byte sub_8093DC4 + .4byte sub_8093DC4_2 + .4byte sub_80964BC + .4byte sub_8093E04 + .4byte sub_8093E04_2 + .4byte sub_80964BC + .4byte sub_8093E44 + .4byte sub_8093E44_2 + .4byte sub_80964BC + .4byte sub_8093E84 + .4byte sub_8093E84_2 + .4byte sub_80964BC + .4byte sub_8093EC4 + .4byte sub_8093EC4_2 + .4byte sub_80964BC + .4byte sub_8093F04 + .4byte sub_8093F04_2 + .4byte sub_80964BC + .4byte sub_8093F44 + .4byte sub_8093F44_2 + .4byte sub_80964BC + .4byte sub_8093F84 + .4byte sub_8093F84_2 + .4byte sub_80964BC gUnknown_0850DFBC:: @ 850DFBC - .incbin "baserom.gba", 0x50dfbc, 0x6 +@ replacing .incbin "baserom.gba", 0x0050dfbc, 0x6 + .byte 0x00, 0x00, 0x01, 0x00, 0x01, 0x00 gUnknown_0850DFC2:: @ 850DFC2 - .incbin "baserom.gba", 0x50dfc2, 0x6 +@ replacing .incbin "baserom.gba", 0x0050dfc2, 0x6 + .byte 0x00, 0x00, 0x00, 0x00, 0x01, 0x00 gUnknown_0850DFC8:: @ 850DFC8 - .incbin "baserom.gba", 0x50dfc8, 0x614 +@ replacing .incbin "baserom.gba", 0x0050dfc8, 0x614 + .4byte sub_8094230 + .4byte sub_8094230_2 + .4byte sub_80964BC + .4byte sub_8094288 + .4byte sub_8094288_2 + .4byte sub_80964BC + .4byte sub_80942E0 + .4byte sub_80942E0_2 + .4byte sub_80964BC + .4byte sub_8094338 + .4byte sub_8094338_2 + .4byte sub_80964BC + .4byte sub_80943B4 + .4byte sub_8094398 + .4byte sub_80964B8 + .4byte sub_80943D4 + .4byte sub_8094398 + .4byte sub_80964B8 + .4byte sub_80943F4 + .4byte sub_8094398 + .4byte sub_80964B8 + .4byte sub_8094414 + .4byte sub_8094398 + .4byte sub_80964B8 + .4byte sub_8094434 + .4byte sub_8094398 + .4byte sub_80964B8 + .4byte sub_8094454 + .4byte sub_8094454_2 + .4byte sub_80964BC + .4byte sub_8094494 + .4byte sub_8094494_2 + .4byte sub_80964BC + .4byte sub_80944D4 + .4byte sub_80944D4_2 + .4byte sub_80964BC + .4byte sub_8094514 + .4byte sub_8094514_2 + .4byte sub_80964BC + .4byte sub_8094600 + .4byte sub_80945C4 + .4byte sub_80964BC + .4byte sub_8094638 + .4byte sub_80945C4 + .4byte sub_80964BC + .4byte sub_8094670 + .4byte sub_80945C4 + .4byte sub_80964BC + .4byte sub_80946A8 + .4byte sub_80945C4 + .4byte sub_80964BC + .4byte sub_80946E0 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_8094718 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_8094750 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_8094788 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_80947C0 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_80947F8 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_8094830 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_8094868 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_80948A0 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_80948D8 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_8094910 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_8094948 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_8094980 + .4byte sub_8094980_2 + .4byte sub_80964BC + .4byte sub_80949C0 + .4byte sub_80949C0_2 + .4byte sub_80964BC + .4byte sub_8094A00 + .4byte sub_8094A00_2 + .4byte sub_80964BC + .4byte sub_8094A40 + .4byte sub_8094A40_2 + .4byte sub_80964BC + .4byte sub_8094A80 + .4byte sub_8094A80_2 + .4byte sub_80964BC + .4byte sub_8094AC0 + .4byte sub_8094AC0_2 + .4byte sub_80964BC + .4byte sub_8094B00 + .4byte sub_8094B00_2 + .4byte sub_80964BC + .4byte sub_8094B40 + .4byte sub_8094B40_2 + .4byte sub_80964BC + .4byte sub_8094B80 + .4byte sub_8094B80_2 + .4byte sub_80964BC + .4byte sub_8094BC0 + .4byte sub_8094BC0_2 + .4byte sub_80964BC + .4byte sub_8094C00 + .4byte sub_8094C00_2 + .4byte sub_80964BC + .4byte sub_8094C40 + .4byte sub_8094C40_2 + .4byte sub_80964BC + .4byte sub_8094C80 + .4byte sub_8094C80_2 + .4byte sub_80964BC + .4byte sub_8094CC0 + .4byte sub_8094CC0_2 + .4byte sub_80964BC + .4byte sub_8094D00 + .4byte sub_8094D00_2 + .4byte sub_80964BC + .4byte sub_8094D40 + .4byte sub_8094D40_2 + .4byte sub_80964BC + .4byte sub_8094DAC + .4byte sub_8094DC4 + .4byte sub_80964BC + .4byte sub_8094E18 + .4byte sub_8094E18_2 + .4byte sub_80964BC + .4byte sub_8094E60 + .4byte sub_8094E60_2 + .4byte sub_80964BC + .4byte sub_8094EB8 + .4byte sub_8094EB8_2 + .4byte sub_80964BC + .4byte sub_8094710 + .4byte sub_8094710_2 + .4byte sub_80964BC + .4byte sub_8094F38 + .4byte sub_80964BC + .4byte sub_8094F94 + .4byte sub_80964BC + .4byte sub_8094FF8 + .4byte sub_80964BC + .4byte sub_8095008 + .4byte sub_80964BC + .4byte sub_8095018 + .4byte sub_8095018_2 + .4byte sub_80964BC + .4byte sub_8095070 + .4byte sub_8095070_2 + .4byte sub_80964BC + .4byte sub_80950C8 + .4byte sub_80950C8_2 + .4byte sub_80964BC + .4byte sub_8095120 + .4byte sub_8095120_2 + .4byte sub_80964BC + .4byte sub_8095178 + .4byte sub_8095178_2 + .4byte sub_80964BC + .4byte sub_80951D0 + .4byte sub_80951D0_2 + .4byte sub_80964BC + .4byte sub_8095228 + .4byte sub_8095228_2 + .4byte sub_80964BC + .4byte sub_8095280 + .4byte sub_8095280_2 + .4byte sub_80964BC + .4byte sub_80952D8 + .4byte sub_80952D8_2 + .4byte sub_80964BC + .4byte sub_8095330 + .4byte sub_8095330_2 + .4byte sub_80964BC + .4byte sub_8095388 + .4byte sub_8095388_2 + .4byte sub_80964BC + .4byte sub_80953E0 + .4byte sub_80953E0_2 + .4byte sub_80964BC + .4byte sub_8095438 + .4byte sub_80964BC + .4byte sub_8095450 + .4byte sub_8094DC4 + .4byte sub_80964BC + .4byte sub_8095460 + .4byte sub_80964B8 + .4byte sub_8095470 + .4byte sub_80964B8 + .4byte sub_8095480 + .4byte sub_80964B8 + .4byte sub_8095490 + .4byte sub_80964B8 + .4byte sub_80954BC + .4byte sub_80964B8 + .4byte sub_80954CC + .4byte sub_80964B8 + .4byte do_exclamation_mark_bubble_1 + .4byte sub_80964B8 + .4byte do_exclamation_mark_bubble_2 + .4byte sub_80964B8 + .4byte do_heart_bubble + .4byte sub_80964B8 + .4byte sub_8095548 + .4byte sub_809558C + .4byte sub_80964B8 + .4byte sub_80955AC + .4byte sub_80955C8 + .4byte sub_80955EC + .4byte sub_80964B8 + .4byte sub_8095628 + .4byte sub_8095644 + .4byte sub_8095668 + .4byte sub_80964B8 + .4byte sub_80956A4 + .4byte sub_80964B8 + .4byte sub_80956B4 + .4byte sub_80964B8 + .4byte sub_80956C4 + .4byte sub_80964B8 + .4byte sub_80956F4 + .4byte sub_80964B8 + .4byte sub_8095724 + .4byte sub_80964B8 + .4byte sub_8095730 + .4byte sub_80964B8 + .4byte sub_8095740 + .4byte sub_8095740_2 + .4byte sub_80964BC + .4byte sub_80957A0 + .4byte sub_80957A0_2 + .4byte sub_80964BC + .4byte sub_8095800 + .4byte sub_8095800_2 + .4byte sub_80964BC + .4byte sub_8095860 + .4byte sub_8095860_2 + .4byte sub_80964BC + .4byte sub_8095900 + .4byte sub_80964BC + .4byte sub_8095910 + .4byte sub_80964BC + .4byte sub_8095920 + .4byte sub_80964BC + .4byte sub_8095930 + .4byte sub_80964BC + .4byte sub_8095940 + .4byte sub_8094DC4 + .4byte sub_80964BC + .4byte sub_8095964 + .4byte sub_8094DC4 + .4byte sub_80964BC + .4byte sub_8095988 + .4byte sub_8094DC4 + .4byte sub_80964BC + .4byte sub_80959AC + .4byte sub_8094DC4 + .4byte sub_80964BC + .4byte sub_80959D0 + .4byte sub_8094DC4 + .4byte sub_80964BC + .4byte sub_80959F4 + .4byte sub_8094DC4 + .4byte sub_80964BC + .4byte sub_8095A18 + .4byte sub_8094DC4 + .4byte sub_80964BC + .4byte sub_8095A3C + .4byte sub_8094DC4 + .4byte sub_80964BC + .4byte sub_8095A60 + .4byte sub_8094DC4 + .4byte sub_80964BC + .4byte sub_8095A84 + .4byte sub_8094DC4 + .4byte sub_80964BC + .4byte sub_8095AA8 + .4byte sub_8094DC4 + .4byte sub_80964BC + .4byte sub_8095ACC + .4byte sub_8094DC4 + .4byte sub_80964BC + .4byte sub_8095B44 + .4byte sub_8095B64 + .4byte sub_80964BC + .4byte sub_8095BC8 + .4byte sub_8095BC8_2 + .4byte sub_80964BC + .4byte sub_8095C20 + .4byte sub_8095C20_2 + .4byte sub_80964BC + .4byte sub_8095C78 + .4byte sub_8095C78_2 + .4byte sub_80964BC + .4byte sub_8095CD0 + .4byte sub_8095CD0_2 + .4byte sub_80964BC + .4byte sub_8095D28 + .4byte sub_8095D28_2 + .4byte sub_80964BC + .4byte sub_8095D80 + .4byte sub_8095D80_2 + .4byte sub_80964BC + .4byte sub_8095DD8 + .4byte sub_8095DD8_2 + .4byte sub_80964BC + .4byte sub_8095E30 + .4byte sub_8095E30_2 + .4byte sub_80964BC + .4byte sub_8095E88 + .4byte sub_8095E88_2 + .4byte sub_80964BC + .4byte sub_8095EE0 + .4byte sub_8095EE0_2 + .4byte sub_80964BC + .4byte sub_8095F38 + .4byte sub_8095F38_2 + .4byte sub_80964BC + .4byte sub_8095F90 + .4byte sub_8095F90_2 + .4byte sub_80964BC + .4byte sub_8095FE8 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_8096020 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_8096058 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_8096090 + .4byte sub_809459C + .4byte sub_80964BC + .4byte sub_8096100 + .4byte sub_8096100_2 + .4byte sub_80964BC + .4byte sub_8096140 + .4byte sub_8096140_2 + .4byte sub_80964BC + .4byte sub_8096180 + .4byte sub_8096180_2 + .4byte sub_80964BC + .4byte sub_80961C0 + .4byte sub_80961C0_2 + .4byte sub_80964BC + .4byte sub_8096230 + .4byte sub_8096230_2 + .4byte sub_80964BC + .4byte sub_8096270 + .4byte sub_8096270_2 + .4byte sub_80964BC + .4byte sub_80962B0 + .4byte sub_80962B0_2 + .4byte sub_80964BC + .4byte sub_80962F0 + .4byte sub_80962F0_2 + .4byte sub_80964BC + .4byte sub_8096368 + .4byte sub_8096368_2 + .4byte sub_80964BC + .4byte sub_80963A8 + .4byte sub_80963A8_2 + .4byte sub_80964BC + .4byte sub_80963E8 + .4byte sub_80963E8_2 + .4byte sub_80964BC + .4byte sub_8096428 + .4byte sub_8096428_2 + .4byte sub_80964BC + .4byte sub_8096468 + .4byte sub_80964B8 + .4byte sub_809647C + .4byte sub_80964B8 + .4byte sub_8096494 + .4byte sub_80964B8 + diff --git a/src/field_map_obj.c b/src/field_map_obj.c index ed51d5fe8..60e622f28 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -26,24 +26,24 @@ #define NUM_FIELD_MAP_OBJECT_TEMPLATES 0x51 #define null_object_step(name, retval) \ -static bool8 FieldObjectCB2_##name(struct MapObject *, struct Sprite *);\ +bool8 FieldObjectCB2_##name(struct MapObject *, struct Sprite *);\ void FieldObjectCB_##name(struct Sprite *sprite)\ {\ FieldObjectStep(&gMapObjects[sprite->data0], sprite, FieldObjectCB2_##name);\ }\ -static bool8 FieldObjectCB2_##name(struct MapObject *mapObject, struct Sprite *sprite)\ +bool8 FieldObjectCB2_##name(struct MapObject *mapObject, struct Sprite *sprite)\ {\ return (retval);\ } #define field_object_step(name, table) \ extern bool8 (*const (table)[])(struct MapObject *, struct Sprite *);\ -static bool8 FieldObjectCB2_##name(struct MapObject *, struct Sprite *);\ +bool8 FieldObjectCB2_##name(struct MapObject *, struct Sprite *);\ void FieldObjectCB_##name(struct Sprite *sprite)\ {\ FieldObjectStep(&gMapObjects[sprite->data0], sprite, FieldObjectCB2_##name);\ }\ -static bool8 FieldObjectCB2_##name(struct MapObject *mapObject, struct Sprite *sprite)\ +bool8 FieldObjectCB2_##name(struct MapObject *mapObject, struct Sprite *sprite)\ {\ return (table)[sprite->data1](mapObject, sprite);\ } @@ -120,7 +120,8 @@ static void FieldObjectExecSpecialAnim(struct MapObject *, struct Sprite *); static bool8 IsCoordOutsideFieldObjectMovementRect(struct MapObject *, s16, s16); static bool8 IsMetatileDirectionallyImpassable(struct MapObject *, s16, s16, u8); static bool8 CheckForCollisionBetweenFieldObjects(struct MapObject *, s16, s16); -static bool8 sub_809558C(struct MapObject *, struct Sprite *); +bool8 sub_809558C(struct MapObject *, struct Sprite *); +bool8 sub_8095B64(struct MapObject *, struct Sprite *); static void sub_8096530(struct MapObject *, struct Sprite *); static void npc_update_obj_anim_flag(struct MapObject *, struct Sprite *); @@ -4275,13 +4276,13 @@ bool8 an_walk_any_2(struct MapObject *mapObject, struct Sprite *sprite) } #define an_walk_any_2_macro(name, fn1, fn2, ...) \ -static bool8 name##_2(struct MapObject *, struct Sprite *);\ +bool8 name##_2(struct MapObject *, struct Sprite *);\ bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ {\ fn1(mapObject, sprite, __VA_ARGS__);\ return name##_2(mapObject, sprite);\ }\ -static bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ +bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ {\ if (fn2(mapObject, sprite))\ {\ @@ -4405,13 +4406,13 @@ bool8 sub_80941E0(struct MapObject *mapObject, struct Sprite *sprite) } #define maybe_shadow_1_macro(name, fn1, fn2, ...) \ -static bool8 name##_2(struct MapObject *, struct Sprite *);\ +bool8 name##_2(struct MapObject *, struct Sprite *);\ bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ {\ fn1(mapObject, sprite, __VA_ARGS__);\ return name##_2(mapObject, sprite);\ }\ -static bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ +bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ {\ if (fn2(mapObject, sprite))\ {\ @@ -4563,13 +4564,13 @@ void sub_8094DE4(struct MapObject *mapObject, struct Sprite *sprite, u8 directio } #define unk_macro_8094E18(name, direction)\ -static bool8 name##_2(struct MapObject *, struct Sprite *);\ +bool8 name##_2(struct MapObject *, struct Sprite *);\ bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ {\ sub_8094DE4(mapObject, sprite, direction);\ return name##_2(mapObject, sprite);\ }\ -static bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ +bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ {\ if (sub_80941C8(mapObject, sprite))\ {\ @@ -4731,7 +4732,7 @@ bool8 sub_8095548(struct MapObject *mapObject, struct Sprite *sprite) return sub_809558C(mapObject, sprite); } -static bool8 sub_809558C(struct MapObject *mapObject, struct Sprite *sprite) +bool8 sub_809558C(struct MapObject *mapObject, struct Sprite *sprite) { if (sub_8155DA0(mapObject)) { @@ -4841,7 +4842,7 @@ bool8 sub_8095730(struct MapObject *mapObject, struct Sprite *sprite) } #define affine_an_walk_any_2_macro(name, fn, fn2, action, anim, ...)\ -static bool8 name##_2(struct MapObject *, struct Sprite *);\ +bool8 name##_2(struct MapObject *, struct Sprite *);\ bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ {\ fn(mapObject, sprite, __VA_ARGS__);\ @@ -4849,7 +4850,7 @@ bool8 name(struct MapObject *mapObject, struct Sprite *sprite)\ action(sprite, anim);\ return name##_2(mapObject, sprite);\ }\ -static bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ +bool8 name##_2(struct MapObject *mapObject, struct Sprite *sprite)\ {\ if (fn2(mapObject, sprite))\ {\ @@ -4936,8 +4937,6 @@ bool8 sub_8095B0C(struct MapObject *mapObject, struct Sprite *sprite) return FALSE; } -static bool8 sub_8095B64(struct MapObject *, struct Sprite *); - bool8 sub_8095B44(struct MapObject *mapObject, struct Sprite *sprite) { sub_8095AF0(mapObject, sprite); @@ -4945,7 +4944,7 @@ bool8 sub_8095B44(struct MapObject *mapObject, struct Sprite *sprite) return sub_8095B64(mapObject, sprite); } -static bool8 sub_8095B64(struct MapObject *mapObject, struct Sprite *sprite) +bool8 sub_8095B64(struct MapObject *mapObject, struct Sprite *sprite) { if (sub_8095B0C(mapObject, sprite)) { From b7a373e700698f638e8fba46b72ec6138d62937e Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 19:35:09 -0400 Subject: [PATCH 194/342] No more incbins --- data/field_map_obj.s | 45 +++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/data/field_map_obj.s b/data/field_map_obj.s index 49fb56a9d..96551b703 100644 --- a/data/field_map_obj.s +++ b/data/field_map_obj.s @@ -268,13 +268,16 @@ gUnknown_0850BBC8:: @ 850BBC8 .align 2, 0 Unknown_0850BCE8:: @ 0850BCE8 - .incbin "baserom.gba", 0x50bce8, 0x08 +@ replacing .incbin "baserom.gba", 0x0050bce8, 0x8 +.2byte 0x1101, 0x1101, 0x1101, 0x1101 Unknown_0850BCF0:: @ 0850BCF0 - .incbin "baserom.gba", 0x50bcf0, 0x08 +@ replacing .incbin "baserom.gba", 0x0050bcf0, 0x8 +.2byte 0x1111, 0x1111, 0x1111, 0x1111 Unknown_0850BCF8:: @ 0850BCF8 - .incbin "baserom.gba", 0x50bcf8, 0x08 +@ replacing .incbin "baserom.gba", 0x0050bcf8, 0x8 +.2byte 0x1115, 0x1115, 0x1115, 0x1115 gUnknown_0850BD00:: @ 850BD00 @ replacing .incbin "baserom.gba", 0x0050bd00, 0x78 @@ -288,37 +291,48 @@ gUnknown_0850BD00:: @ 850BD00 .4byte NULL Unknown_0850BD20:: @ 0850BD20 - .incbin "baserom.gba", 0x50bd20, 0x08 +@ replacing .incbin "baserom.gba", 0x0050bd20, 0x8 +.2byte 0x110c, 0x110c, 0x110c, 0x110c Unknown_0850BD28:: @ 0x0850bd28 - .incbin "baserom.gba", 0x50bd28, 0x08 +@ replacing .incbin "baserom.gba", 0x0050bd28, 0x8 +.2byte 0x110d, 0x110d, 0x110d, 0x110d Unknown_0850BD30:: @ 0x0850bd30 - .incbin "baserom.gba", 0x50bd30, 0x08 +@ replacing .incbin "baserom.gba", 0x0050bd30, 0x8 +.2byte 0x110e, 0x110e, 0x110e, 0x110e Unknown_0850BD38:: @ 0x0850bd38 - .incbin "baserom.gba", 0x50bd38, 0x08 +@ replacing .incbin "baserom.gba", 0x0050bd38, 0x8 +.2byte 0x1112, 0x1112, 0x1112, 0x1112 Unknown_0850BD40:: @ 0x0850bd40 - .incbin "baserom.gba", 0x50bd40, 0x08 +@ replacing .incbin "baserom.gba", 0x0050bd40, 0x8 +.2byte 0x1113, 0x1113, 0x1113, 0x1113 Unknown_0850BD48:: @ 0x0850bd48 - .incbin "baserom.gba", 0x50bd48, 0x08 +@ replacing .incbin "baserom.gba", 0x0050bd48, 0x8 +.2byte 0x1114, 0x1114, 0x1114, 0x1114 Unknown_0850BD50:: @ 0x0850bd50 - .incbin "baserom.gba", 0x50bd50, 0x08 +@ replacing .incbin "baserom.gba", 0x0050bd50, 0x8 +.2byte 0x111b, 0x111b, 0x111b, 0x111b Unknown_0850BD58:: @ 0x0850bd58 - .incbin "baserom.gba", 0x50bd58, 0x08 +@ replacing .incbin "baserom.gba", 0x0050bd58, 0x8 +.2byte 0x1117, 0x1117, 0x1117, 0x1117 Unknown_0850BD60:: @ 0x0850bd60 - .incbin "baserom.gba", 0x50bd60, 0x08 +@ replacing .incbin "baserom.gba", 0x0050bd60, 0x8 +.2byte 0x1119, 0x1119, 0x1119, 0x1119 Unknown_0850BD68:: @ 0x0850bd68 - .incbin "baserom.gba", 0x50bd68, 0x08 +@ replacing .incbin "baserom.gba", 0x0050bd68, 0x8 +.2byte 0x1109, 0x1109, 0x1109, 0x1109 Unknown_0850BD70:: @ 0x0850bd70 - .incbin "baserom.gba", 0x50bd70, 0x08 +@ replacing .incbin "baserom.gba", 0x0050bd70, 0x8 +.2byte 0x111d, 0x111d, 0x111d, 0x111d gUnknown_0850BD78:: @ 850BD78 @ replacing .incbin "baserom.gba", 0x0050bd78, 0xc0 @@ -1724,6 +1738,3 @@ gUnknown_0850DFC8:: @ 850DFC8 .4byte sub_80964B8 .4byte sub_8096494 .4byte sub_80964B8 - - - From 25c7b4cd9243bb32e7d5ebd90d629acf91706133 Mon Sep 17 00:00:00 2001 From: scnorton Date: Sun, 17 Sep 2017 20:08:29 -0400 Subject: [PATCH 195/342] Remaining pointers --- data/data3.s | 10 +- data/field_map_obj.s | 497 ++++++++++++++++++++++++++++--------------- 2 files changed, 339 insertions(+), 168 deletions(-) diff --git a/data/data3.s b/data/data3.s index ec29349bd..1d4dc544c 100644 --- a/data/data3.s +++ b/data/data3.s @@ -694,7 +694,15 @@ gUnknown_0850E84A:: @ 850E84A .incbin "baserom.gba", 0x50e84a, 0x6 gUnknown_0850E850:: @ 850E850 - .incbin "baserom.gba", 0x50e850, 0x2c + .incbin "baserom.gba", 0x50e850, 0x4 +gUnknown_0850E854:: + .incbin "baserom.gba", 0x50e854, 0x8 +gUnknown_0850E85C:: + .incbin "baserom.gba", 0x50e85C, 0x8 +gUnknown_0850E864:: + .incbin "baserom.gba", 0x50e864, 0xc +gUnknown_0850E870:: + .incbin "baserom.gba", 0x50e870, 0xc gUnknown_0850E87C:: @ 850E87C .incbin "baserom.gba", 0x50e87c, 0x1680 diff --git a/data/field_map_obj.s b/data/field_map_obj.s index 96551b703..52b39f932 100644 --- a/data/field_map_obj.s +++ b/data/field_map_obj.s @@ -367,16 +367,20 @@ gUnknown_0850BD78:: @ 850BD78 gUnknown_0850BDE8:: @ 850BDE8 @ replacing .incbin "baserom.gba", 0x0050bde8, 0x50 - .2byte 0x1100, 0x1101, 0x1103, 0x1104, 0x1105, 0x1106, 0x1107, 0x1108, 0x1109, 0x110a, 0x1100, 0x1101, 0x1103, 0x1104, 0x1105, 0x1106 - .2byte 0x1107, 0x1108, 0x1109, 0x110a, 0x1100, 0x1101, 0x1103, 0x1104, 0x1105, 0x1106, 0x1107, 0x1108, 0x1109, 0x110a, 0x1100, 0x1101 - .2byte 0x1103, 0x1104, 0x1105, 0x1106, 0x1107, 0x1108, 0x1109, 0x110a + .2byte 0x1100, 0x1101, 0x1103, 0x1104, 0x1105, 0x1106, 0x1107, 0x1108, 0x1109, 0x110a +gUnknown_0850BDFC:: + .2byte 0x1100, 0x1101, 0x1103, 0x1104, 0x1105, 0x1106, 0x1107, 0x1108, 0x1109, 0x110a +gUnknown_0850BE10:: + .2byte 0x1100, 0x1101, 0x1103, 0x1104, 0x1105, 0x1106, 0x1107, 0x1108, 0x1109, 0x110a +gUnknown_0850BE24:: + .2byte 0x1100, 0x1101, 0x1103, 0x1104, 0x1105, 0x1106, 0x1107, 0x1108, 0x1109, 0x110a gUnknown_0850BE38:: @ 850BE38 @ replacing .incbin "baserom.gba", 0x0050be38, 0x10 - .4byte 0x850bde8 - .4byte 0x850bdfc - .4byte 0x850be10 - .4byte 0x850be24 + .4byte gUnknown_0850BDE8 + .4byte gUnknown_0850BDFC + .4byte gUnknown_0850BE10 + .4byte gUnknown_0850BE24 @ 850BE48 .include "data/graphics/field_objects/berry_tree_graphics_tables.inc" @@ -386,7 +390,7 @@ gUnknown_0850BE38:: @ 850BE38 @ replacing .incbin "baserom.gba", 0x0050d6d4, 0x8 .align 2, 0 - .4byte 0x084ad8f8 + .4byte gFieldObjectPalette2 .2byte 4113 .align 2, 0 @@ -1115,171 +1119,179 @@ gUnknown_0850DC3F:: @ 850DC3F .align 2, 0 gUnknown_0850DC50:: @ 850DC50 -@ replacing .incbin "baserom.gba", 0x0050dc50, 0x298 - .4byte gUnknown_0850DC50 + 0x278 - .4byte gUnknown_0850DC50 + 0x280 - .4byte gUnknown_0850DC50 + 0x288 - .4byte gUnknown_0850DC50 + 0x290 - .4byte 0x850df2c - .4byte 0x850df38 - .4byte 0x850df44 - .4byte 0x850df50 - .4byte 0x850df8c - .4byte 0x850df98 - .4byte 0x850dfa4 - .4byte 0x850dfb0 - .4byte gUnknown_0850DFC2 + 0x6 - .4byte 0x850dfd4 - .4byte 0x850dfe0 - .4byte 0x850dfec - .4byte 0x850dff8 - .4byte 0x850e004 - .4byte 0x850e010 - .4byte 0x850e01c - .4byte 0x850e028 - .4byte 0x850e034 - .4byte 0x850e040 - .4byte 0x850e04c - .4byte 0x850e058 - .4byte 0x850e064 - .4byte 0x850e070 - .4byte 0x850e07c - .4byte 0x850e088 - .4byte 0x850e094 - .4byte 0x850e0a0 - .4byte 0x850e0ac - .4byte 0x850e0b8 - .4byte 0x850e0c4 - .4byte 0x850e0d0 - .4byte 0x850e0dc - .4byte 0x850e0e8 - .4byte 0x850e0f4 - .4byte 0x850e100 - .4byte 0x850e10c - .4byte 0x850e118 - .4byte 0x850e124 - .4byte 0x850e130 - .4byte 0x850e13c - .4byte 0x850e148 - .4byte 0x850e154 - .4byte 0x850e160 - .4byte 0x850e16c - .4byte 0x850e178 - .4byte 0x850e184 - .4byte 0x850e190 - .4byte 0x850e19c - .4byte 0x850e1a8 - .4byte 0x850e1b4 - .4byte 0x850e1c0 - .4byte 0x850e1cc - .4byte 0x850e1d8 - .4byte 0x850e1e4 - .4byte 0x850e1f0 - .4byte 0x850e1fc - .4byte 0x850e208 - .4byte 0x850e214 - .4byte 0x850e220 - .4byte 0x850e228 - .4byte 0x850e230 - .4byte 0x850e238 - .4byte 0x850e240 - .4byte 0x850e24c - .4byte 0x850e258 - .4byte 0x850e264 - .4byte 0x850e270 - .4byte 0x850e27c - .4byte 0x850e288 - .4byte 0x850e294 - .4byte 0x850e2a0 - .4byte 0x850e2ac - .4byte 0x850e2b8 - .4byte 0x850e2c4 - .4byte 0x850e2d0 - .4byte 0x850e2d8 - .4byte 0x850e2e4 - .4byte 0x850e2ec - .4byte 0x850e2f4 - .4byte 0x850e2fc - .4byte 0x850e304 - .4byte 0x850e30c - .4byte 0x850e314 - .4byte 0x850e31c - .4byte 0x850e324 - .4byte 0x850e32c - .4byte 0x850e338 - .4byte 0x850e348 - .4byte 0x850e358 - .4byte 0x850e360 - .4byte 0x850e368 - .4byte 0x850e370 - .4byte 0x850e378 - .4byte 0x850e380 - .4byte 0x850e388 - .4byte 0x850e394 - .4byte 0x850e3b8 - .4byte 0x850e3c0 - .4byte 0x850e3c8 - .4byte 0x850e3d0 - .4byte 0x850e3d8 - .4byte 0x850e3e4 - .4byte 0x850e3f0 - .4byte 0x850e3fc - .4byte 0x850e408 - .4byte 0x850e414 - .4byte 0x850e420 - .4byte 0x850e42c - .4byte 0x850e474 - .4byte 0x850e480 - .4byte 0x850e48c - .4byte 0x850e498 - .4byte 0x850e4a4 - .4byte 0x850e4b0 - .4byte 0x850e4bc - .4byte 0x850e4c8 - .4byte 0x850e4d4 - .4byte 0x850e4e0 - .4byte 0x850e4ec - .4byte 0x850e4f8 - .4byte 0x850e504 - .4byte 0x850e510 - .4byte 0x850e51c - .4byte 0x850e528 - .4byte 0x850e534 - .4byte 0x850e540 - .4byte 0x850e54c - .4byte 0x850e558 - .4byte 0x850e564 - .4byte 0x850e570 - .4byte 0x850e57c - .4byte 0x850e588 - .4byte 0x850e594 - .4byte 0x850e5a0 - .4byte 0x850e5ac - .4byte 0x850e5b8 - .4byte 0x850df5c - .4byte 0x850df68 - .4byte 0x850df74 - .4byte 0x850df80 - .4byte 0x850defc - .4byte 0x850df08 - .4byte 0x850df14 - .4byte 0x850df20 - .4byte 0x850e854 - .4byte 0x850e85c - .4byte 0x850e3a0 - .4byte 0x850e3ac - .4byte 0x850e5c4 - .4byte 0x850e5cc - .4byte 0x850e5d4 - .4byte 0x850e468 - .4byte 0x850e864 - .4byte 0x850e870 +@ replacing .incbin "baserom.gba", 0x0050dc50, 0x278 +.4byte gUnknown_0850DEC8 +.4byte gUnknown_0850DED0 +.4byte gUnknown_0850DED8 +.4byte gUnknown_0850DEE0 +.4byte gUnknown_0850DF2C +.4byte gUnknown_0850DF38 +.4byte gUnknown_0850DF44 +.4byte gUnknown_0850DF50 +.4byte gUnknown_0850DF8C +.4byte gUnknown_0850DF98 +.4byte gUnknown_0850DFA4 +.4byte gUnknown_0850DFB0 +.4byte gUnknown_0850DFC8 +.4byte gUnknown_0850DFD4 +.4byte gUnknown_0850DFE0 +.4byte gUnknown_0850DFEC +.4byte gUnknown_0850DFF8 +.4byte gUnknown_0850E004 +.4byte gUnknown_0850E010 +.4byte gUnknown_0850E01C +.4byte gUnknown_0850E028 +.4byte gUnknown_0850E034 +.4byte gUnknown_0850E040 +.4byte gUnknown_0850E04C +.4byte gUnknown_0850E058 +.4byte gUnknown_0850E064 +.4byte gUnknown_0850E070 +.4byte gUnknown_0850E07C +.4byte gUnknown_0850E088 +.4byte gUnknown_0850E094 +.4byte gUnknown_0850E0A0 +.4byte gUnknown_0850E0AC +.4byte gUnknown_0850E0B8 +.4byte gUnknown_0850E0C4 +.4byte gUnknown_0850E0D0 +.4byte gUnknown_0850E0DC +.4byte gUnknown_0850E0E8 +.4byte gUnknown_0850E0F4 +.4byte gUnknown_0850E100 +.4byte gUnknown_0850E10C +.4byte gUnknown_0850E118 +.4byte gUnknown_0850E124 +.4byte gUnknown_0850E130 +.4byte gUnknown_0850E13C +.4byte gUnknown_0850E148 +.4byte gUnknown_0850E154 +.4byte gUnknown_0850E160 +.4byte gUnknown_0850E16C +.4byte gUnknown_0850E178 +.4byte gUnknown_0850E184 +.4byte gUnknown_0850E190 +.4byte gUnknown_0850E19C +.4byte gUnknown_0850E1A8 +.4byte gUnknown_0850E1B4 +.4byte gUnknown_0850E1C0 +.4byte gUnknown_0850E1CC +.4byte gUnknown_0850E1D8 +.4byte gUnknown_0850E1E4 +.4byte gUnknown_0850E1F0 +.4byte gUnknown_0850E1FC +.4byte gUnknown_0850E208 +.4byte gUnknown_0850E214 +.4byte gUnknown_0850E220 +.4byte gUnknown_0850E228 +.4byte gUnknown_0850E230 +.4byte gUnknown_0850E238 +.4byte gUnknown_0850E240 +.4byte gUnknown_0850E24C +.4byte gUnknown_0850E258 +.4byte gUnknown_0850E264 +.4byte gUnknown_0850E270 +.4byte gUnknown_0850E27C +.4byte gUnknown_0850E288 +.4byte gUnknown_0850E294 +.4byte gUnknown_0850E2A0 +.4byte gUnknown_0850E2AC +.4byte gUnknown_0850E2B8 +.4byte gUnknown_0850E2C4 +.4byte gUnknown_0850E2D0 +.4byte gUnknown_0850E2D8 +.4byte gUnknown_0850E2E4 +.4byte gUnknown_0850E2EC +.4byte gUnknown_0850E2F4 +.4byte gUnknown_0850E2FC +.4byte gUnknown_0850E304 +.4byte gUnknown_0850E30C +.4byte gUnknown_0850E314 +.4byte gUnknown_0850E31C +.4byte gUnknown_0850E324 +.4byte gUnknown_0850E32C +.4byte gUnknown_0850E338 +.4byte gUnknown_0850E348 +.4byte gUnknown_0850E358 +.4byte gUnknown_0850E360 +.4byte gUnknown_0850E368 +.4byte gUnknown_0850E370 +.4byte gUnknown_0850E378 +.4byte gUnknown_0850E380 +.4byte gUnknown_0850E388 +.4byte gUnknown_0850E394 +.4byte gUnknown_0850E3B8 +.4byte gUnknown_0850E3C0 +.4byte gUnknown_0850E3C8 +.4byte gUnknown_0850E3D0 +.4byte gUnknown_0850E3D8 +.4byte gUnknown_0850E3E4 +.4byte gUnknown_0850E3F0 +.4byte gUnknown_0850E3FC +.4byte gUnknown_0850E408 +.4byte gUnknown_0850E414 +.4byte gUnknown_0850E420 +.4byte gUnknown_0850E42C +.4byte gUnknown_0850E474 +.4byte gUnknown_0850E480 +.4byte gUnknown_0850E48C +.4byte gUnknown_0850E498 +.4byte gUnknown_0850E4A4 +.4byte gUnknown_0850E4B0 +.4byte gUnknown_0850E4BC +.4byte gUnknown_0850E4C8 +.4byte gUnknown_0850E4D4 +.4byte gUnknown_0850E4E0 +.4byte gUnknown_0850E4EC +.4byte gUnknown_0850E4F8 +.4byte gUnknown_0850E504 +.4byte gUnknown_0850E510 +.4byte gUnknown_0850E51C +.4byte gUnknown_0850E528 +.4byte gUnknown_0850E534 +.4byte gUnknown_0850E540 +.4byte gUnknown_0850E54C +.4byte gUnknown_0850E558 +.4byte gUnknown_0850E564 +.4byte gUnknown_0850E570 +.4byte gUnknown_0850E57C +.4byte gUnknown_0850E588 +.4byte gUnknown_0850E594 +.4byte gUnknown_0850E5A0 +.4byte gUnknown_0850E5AC +.4byte gUnknown_0850E5B8 +.4byte gUnknown_0850DF5C +.4byte gUnknown_0850DF68 +.4byte gUnknown_0850DF74 +.4byte gUnknown_0850DF80 +.4byte gUnknown_0850DEFC +.4byte gUnknown_0850DF08 +.4byte gUnknown_0850DF14 +.4byte gUnknown_0850DF20 +.4byte gUnknown_0850E854 +.4byte gUnknown_0850E85C +.4byte gUnknown_0850E3A0 +.4byte gUnknown_0850E3AC +.4byte gUnknown_0850E5C4 +.4byte gUnknown_0850E5CC +.4byte gUnknown_0850E5D4 +.4byte gUnknown_0850E468 +.4byte gUnknown_0850E864 +.4byte gUnknown_0850E870 + +gUnknown_0850DEC8:: @ 850DEC8 .4byte sub_8093950 .4byte sub_80964BC + +gUnknown_0850DED0:: .4byte sub_8093960 .4byte sub_80964BC + +gUnknown_0850DED8:: .4byte sub_8093970 .4byte sub_80964BC + +gUnknown_0850DEE0:: .4byte sub_8093980 .4byte sub_80964BC @@ -1290,51 +1302,68 @@ gUnknown_0850DEE8:: @ 850DEE8 .4byte get_go_fast_image_anim_num .4byte get_go_faster_image_anim_num .4byte get_go_fastest_image_anim_num + +gUnknown_0850DEFC:: .4byte sub_8093BC4 .4byte sub_8093BC4_2 .4byte sub_80964BC +gUnknown_0850DF08:: .4byte sub_8093C04 .4byte sub_8093C04_2 .4byte sub_80964BC +gUnknown_0850DF14:: .4byte sub_8093C44 .4byte sub_8093C44_2 .4byte sub_80964BC +gUnknown_0850DF20:: .4byte sub_8093C84 .4byte sub_8093C84_2 .4byte sub_80964BC +gUnknown_0850DF2C:: .4byte sub_8093CC4 .4byte sub_8093CC4_2 .4byte sub_80964BC +gUnknown_0850DF38:: .4byte sub_8093D04 .4byte sub_8093D04_2 .4byte sub_80964BC +gUnknown_0850DF44:: .4byte sub_8093D44 .4byte sub_8093D44_2 .4byte sub_80964BC +gUnknown_0850DF50:: .4byte sub_8093D84 .4byte sub_8093D84_2 .4byte sub_80964BC +gUnknown_0850DF5C:: .4byte sub_8093DC4 .4byte sub_8093DC4_2 .4byte sub_80964BC +gUnknown_0850DF68:: .4byte sub_8093E04 .4byte sub_8093E04_2 .4byte sub_80964BC +gUnknown_0850DF74:: .4byte sub_8093E44 .4byte sub_8093E44_2 .4byte sub_80964BC +gUnknown_0850DF80:: .4byte sub_8093E84 .4byte sub_8093E84_2 .4byte sub_80964BC +gUnknown_0850DF8C:: .4byte sub_8093EC4 .4byte sub_8093EC4_2 .4byte sub_80964BC +gUnknown_0850DF98:: .4byte sub_8093F04 .4byte sub_8093F04_2 .4byte sub_80964BC +gUnknown_0850DFA4:: .4byte sub_8093F44 .4byte sub_8093F44_2 .4byte sub_80964BC +gUnknown_0850DFB0:: .4byte sub_8093F84 .4byte sub_8093F84_2 .4byte sub_80964BC @@ -1352,284 +1381,385 @@ gUnknown_0850DFC8:: @ 850DFC8 .4byte sub_8094230 .4byte sub_8094230_2 .4byte sub_80964BC +gUnknown_0850DFD4:: .4byte sub_8094288 .4byte sub_8094288_2 .4byte sub_80964BC +gUnknown_0850DFE0:: .4byte sub_80942E0 .4byte sub_80942E0_2 .4byte sub_80964BC +gUnknown_0850DFEC:: .4byte sub_8094338 .4byte sub_8094338_2 .4byte sub_80964BC +gUnknown_0850DFF8:: .4byte sub_80943B4 .4byte sub_8094398 .4byte sub_80964B8 +gUnknown_0850E004:: .4byte sub_80943D4 .4byte sub_8094398 .4byte sub_80964B8 +gUnknown_0850E010:: .4byte sub_80943F4 .4byte sub_8094398 .4byte sub_80964B8 +gUnknown_0850E01C:: .4byte sub_8094414 .4byte sub_8094398 .4byte sub_80964B8 +gUnknown_0850E028:: .4byte sub_8094434 .4byte sub_8094398 .4byte sub_80964B8 +gUnknown_0850E034:: .4byte sub_8094454 .4byte sub_8094454_2 .4byte sub_80964BC +gUnknown_0850E040:: .4byte sub_8094494 .4byte sub_8094494_2 .4byte sub_80964BC +gUnknown_0850E04C:: .4byte sub_80944D4 .4byte sub_80944D4_2 .4byte sub_80964BC +gUnknown_0850E058:: .4byte sub_8094514 .4byte sub_8094514_2 .4byte sub_80964BC +gUnknown_0850E064:: .4byte sub_8094600 .4byte sub_80945C4 .4byte sub_80964BC +gUnknown_0850E070:: .4byte sub_8094638 .4byte sub_80945C4 .4byte sub_80964BC +gUnknown_0850E07C:: .4byte sub_8094670 .4byte sub_80945C4 .4byte sub_80964BC +gUnknown_0850E088:: .4byte sub_80946A8 .4byte sub_80945C4 .4byte sub_80964BC +gUnknown_0850E094:: .4byte sub_80946E0 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E0A0:: .4byte sub_8094718 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E0AC:: .4byte sub_8094750 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E0B8:: .4byte sub_8094788 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E0C4:: .4byte sub_80947C0 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E0D0:: .4byte sub_80947F8 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E0DC:: .4byte sub_8094830 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E0E8:: .4byte sub_8094868 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E0F4:: .4byte sub_80948A0 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E100:: .4byte sub_80948D8 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E10C:: .4byte sub_8094910 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E118:: .4byte sub_8094948 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E124:: .4byte sub_8094980 .4byte sub_8094980_2 .4byte sub_80964BC +gUnknown_0850E130:: .4byte sub_80949C0 .4byte sub_80949C0_2 .4byte sub_80964BC +gUnknown_0850E13C:: .4byte sub_8094A00 .4byte sub_8094A00_2 .4byte sub_80964BC +gUnknown_0850E148:: .4byte sub_8094A40 .4byte sub_8094A40_2 .4byte sub_80964BC +gUnknown_0850E154:: .4byte sub_8094A80 .4byte sub_8094A80_2 .4byte sub_80964BC +gUnknown_0850E160:: .4byte sub_8094AC0 .4byte sub_8094AC0_2 .4byte sub_80964BC +gUnknown_0850E16C:: .4byte sub_8094B00 .4byte sub_8094B00_2 .4byte sub_80964BC +gUnknown_0850E178:: .4byte sub_8094B40 .4byte sub_8094B40_2 .4byte sub_80964BC +gUnknown_0850E184:: .4byte sub_8094B80 .4byte sub_8094B80_2 .4byte sub_80964BC +gUnknown_0850E190:: .4byte sub_8094BC0 .4byte sub_8094BC0_2 .4byte sub_80964BC +gUnknown_0850E19C:: .4byte sub_8094C00 .4byte sub_8094C00_2 .4byte sub_80964BC +gUnknown_0850E1A8:: .4byte sub_8094C40 .4byte sub_8094C40_2 .4byte sub_80964BC +gUnknown_0850E1B4:: .4byte sub_8094C80 .4byte sub_8094C80_2 .4byte sub_80964BC +gUnknown_0850E1C0:: .4byte sub_8094CC0 .4byte sub_8094CC0_2 .4byte sub_80964BC +gUnknown_0850E1CC:: .4byte sub_8094D00 .4byte sub_8094D00_2 .4byte sub_80964BC +gUnknown_0850E1D8:: .4byte sub_8094D40 .4byte sub_8094D40_2 .4byte sub_80964BC +gUnknown_0850E1E4:: .4byte sub_8094DAC .4byte sub_8094DC4 .4byte sub_80964BC +gUnknown_0850E1F0:: .4byte sub_8094E18 .4byte sub_8094E18_2 .4byte sub_80964BC +gUnknown_0850E1FC:: .4byte sub_8094E60 .4byte sub_8094E60_2 .4byte sub_80964BC +gUnknown_0850E208:: .4byte sub_8094EB8 .4byte sub_8094EB8_2 .4byte sub_80964BC +gUnknown_0850E214:: .4byte sub_8094710 .4byte sub_8094710_2 .4byte sub_80964BC +gUnknown_0850E220:: .4byte sub_8094F38 .4byte sub_80964BC +gUnknown_0850E228:: .4byte sub_8094F94 .4byte sub_80964BC +gUnknown_0850E230:: .4byte sub_8094FF8 .4byte sub_80964BC +gUnknown_0850E238:: .4byte sub_8095008 .4byte sub_80964BC +gUnknown_0850E240:: .4byte sub_8095018 .4byte sub_8095018_2 .4byte sub_80964BC +gUnknown_0850E24C:: .4byte sub_8095070 .4byte sub_8095070_2 .4byte sub_80964BC +gUnknown_0850E258:: .4byte sub_80950C8 .4byte sub_80950C8_2 .4byte sub_80964BC +gUnknown_0850E264:: .4byte sub_8095120 .4byte sub_8095120_2 .4byte sub_80964BC +gUnknown_0850E270:: .4byte sub_8095178 .4byte sub_8095178_2 .4byte sub_80964BC +gUnknown_0850E27C:: .4byte sub_80951D0 .4byte sub_80951D0_2 .4byte sub_80964BC +gUnknown_0850E288:: .4byte sub_8095228 .4byte sub_8095228_2 .4byte sub_80964BC +gUnknown_0850E294:: .4byte sub_8095280 .4byte sub_8095280_2 .4byte sub_80964BC +gUnknown_0850E2A0:: .4byte sub_80952D8 .4byte sub_80952D8_2 .4byte sub_80964BC +gUnknown_0850E2AC:: .4byte sub_8095330 .4byte sub_8095330_2 .4byte sub_80964BC +gUnknown_0850E2B8:: .4byte sub_8095388 .4byte sub_8095388_2 .4byte sub_80964BC +gUnknown_0850E2C4:: .4byte sub_80953E0 .4byte sub_80953E0_2 .4byte sub_80964BC +gUnknown_0850E2D0:: .4byte sub_8095438 .4byte sub_80964BC +gUnknown_0850E2D8:: .4byte sub_8095450 .4byte sub_8094DC4 .4byte sub_80964BC +gUnknown_0850E2E4:: .4byte sub_8095460 .4byte sub_80964B8 +gUnknown_0850E2EC:: .4byte sub_8095470 .4byte sub_80964B8 +gUnknown_0850E2F4:: .4byte sub_8095480 .4byte sub_80964B8 +gUnknown_0850E2FC:: .4byte sub_8095490 .4byte sub_80964B8 +gUnknown_0850E304:: .4byte sub_80954BC .4byte sub_80964B8 +gUnknown_0850E30C:: .4byte sub_80954CC .4byte sub_80964B8 +gUnknown_0850E314:: .4byte do_exclamation_mark_bubble_1 .4byte sub_80964B8 +gUnknown_0850E31C:: .4byte do_exclamation_mark_bubble_2 .4byte sub_80964B8 +gUnknown_0850E324:: .4byte do_heart_bubble .4byte sub_80964B8 +gUnknown_0850E32C:: .4byte sub_8095548 .4byte sub_809558C .4byte sub_80964B8 +gUnknown_0850E338:: .4byte sub_80955AC .4byte sub_80955C8 .4byte sub_80955EC .4byte sub_80964B8 +gUnknown_0850E348:: .4byte sub_8095628 .4byte sub_8095644 .4byte sub_8095668 .4byte sub_80964B8 +gUnknown_0850E358:: .4byte sub_80956A4 .4byte sub_80964B8 +gUnknown_0850E360:: .4byte sub_80956B4 .4byte sub_80964B8 +gUnknown_0850E368:: .4byte sub_80956C4 .4byte sub_80964B8 +gUnknown_0850E370:: .4byte sub_80956F4 .4byte sub_80964B8 +gUnknown_0850E378:: .4byte sub_8095724 .4byte sub_80964B8 +gUnknown_0850E380:: .4byte sub_8095730 .4byte sub_80964B8 +gUnknown_0850E388:: .4byte sub_8095740 .4byte sub_8095740_2 .4byte sub_80964BC +gUnknown_0850E394:: .4byte sub_80957A0 .4byte sub_80957A0_2 .4byte sub_80964BC +gUnknown_0850E3A0:: .4byte sub_8095800 .4byte sub_8095800_2 .4byte sub_80964BC +gUnknown_0850E3AC:: .4byte sub_8095860 .4byte sub_8095860_2 .4byte sub_80964BC +gUnknown_0850E3B8:: .4byte sub_8095900 .4byte sub_80964BC +gUnknown_0850E3C0:: .4byte sub_8095910 .4byte sub_80964BC +gUnknown_0850E3C8:: .4byte sub_8095920 .4byte sub_80964BC +gUnknown_0850E3D0:: .4byte sub_8095930 .4byte sub_80964BC +gUnknown_0850E3D8:: .4byte sub_8095940 .4byte sub_8094DC4 .4byte sub_80964BC +gUnknown_0850E3E4:: .4byte sub_8095964 .4byte sub_8094DC4 .4byte sub_80964BC +gUnknown_0850E3F0:: .4byte sub_8095988 .4byte sub_8094DC4 .4byte sub_80964BC +gUnknown_0850E3FC:: .4byte sub_80959AC .4byte sub_8094DC4 .4byte sub_80964BC +gUnknown_0850E408:: .4byte sub_80959D0 .4byte sub_8094DC4 .4byte sub_80964BC +gUnknown_0850E414:: .4byte sub_80959F4 .4byte sub_8094DC4 .4byte sub_80964BC +gUnknown_0850E420:: .4byte sub_8095A18 .4byte sub_8094DC4 .4byte sub_80964BC +gUnknown_0850E42C:: .4byte sub_8095A3C .4byte sub_8094DC4 .4byte sub_80964BC @@ -1645,96 +1775,129 @@ gUnknown_0850DFC8:: @ 850DFC8 .4byte sub_8095ACC .4byte sub_8094DC4 .4byte sub_80964BC +gUnknown_0850E468:: .4byte sub_8095B44 .4byte sub_8095B64 .4byte sub_80964BC +gUnknown_0850E474:: .4byte sub_8095BC8 .4byte sub_8095BC8_2 .4byte sub_80964BC +gUnknown_0850E480:: .4byte sub_8095C20 .4byte sub_8095C20_2 .4byte sub_80964BC +gUnknown_0850E48C:: .4byte sub_8095C78 .4byte sub_8095C78_2 .4byte sub_80964BC +gUnknown_0850E498:: .4byte sub_8095CD0 .4byte sub_8095CD0_2 .4byte sub_80964BC +gUnknown_0850E4A4:: .4byte sub_8095D28 .4byte sub_8095D28_2 .4byte sub_80964BC +gUnknown_0850E4B0:: .4byte sub_8095D80 .4byte sub_8095D80_2 .4byte sub_80964BC +gUnknown_0850E4BC:: .4byte sub_8095DD8 .4byte sub_8095DD8_2 .4byte sub_80964BC +gUnknown_0850E4C8:: .4byte sub_8095E30 .4byte sub_8095E30_2 .4byte sub_80964BC +gUnknown_0850E4D4:: .4byte sub_8095E88 .4byte sub_8095E88_2 .4byte sub_80964BC +gUnknown_0850E4E0:: .4byte sub_8095EE0 .4byte sub_8095EE0_2 .4byte sub_80964BC +gUnknown_0850E4EC:: .4byte sub_8095F38 .4byte sub_8095F38_2 .4byte sub_80964BC +gUnknown_0850E4F8:: .4byte sub_8095F90 .4byte sub_8095F90_2 .4byte sub_80964BC +gUnknown_0850E504:: .4byte sub_8095FE8 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E510:: .4byte sub_8096020 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E51C:: .4byte sub_8096058 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E528:: .4byte sub_8096090 .4byte sub_809459C .4byte sub_80964BC +gUnknown_0850E534:: .4byte sub_8096100 .4byte sub_8096100_2 .4byte sub_80964BC +gUnknown_0850E540:: .4byte sub_8096140 .4byte sub_8096140_2 .4byte sub_80964BC +gUnknown_0850E54C:: .4byte sub_8096180 .4byte sub_8096180_2 .4byte sub_80964BC +gUnknown_0850E558:: .4byte sub_80961C0 .4byte sub_80961C0_2 .4byte sub_80964BC +gUnknown_0850E564:: .4byte sub_8096230 .4byte sub_8096230_2 .4byte sub_80964BC +gUnknown_0850E570:: .4byte sub_8096270 .4byte sub_8096270_2 .4byte sub_80964BC +gUnknown_0850E57C:: .4byte sub_80962B0 .4byte sub_80962B0_2 .4byte sub_80964BC +gUnknown_0850E588:: .4byte sub_80962F0 .4byte sub_80962F0_2 .4byte sub_80964BC +gUnknown_0850E594:: .4byte sub_8096368 .4byte sub_8096368_2 .4byte sub_80964BC +gUnknown_0850E5A0:: .4byte sub_80963A8 .4byte sub_80963A8_2 .4byte sub_80964BC +gUnknown_0850E5AC:: .4byte sub_80963E8 .4byte sub_80963E8_2 .4byte sub_80964BC +gUnknown_0850E5B8:: .4byte sub_8096428 .4byte sub_8096428_2 .4byte sub_80964BC +gUnknown_0850E5C4:: .4byte sub_8096468 .4byte sub_80964B8 +gUnknown_0850E5CC:: .4byte sub_809647C .4byte sub_80964B8 +gUnknown_0850E5D4:: .4byte sub_8096494 .4byte sub_80964B8 + From 9f87103ea0df19ff4f3bc6bd4acf9fd7f68e9b5b Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Sun, 17 Sep 2017 20:32:32 -0500 Subject: [PATCH 196/342] Extract baserom calls from files Extract calls from crt0.s, bard_music.s, battle_4.s --- asm/crt0.s | 56 +- data/bard_music.s | 5576 ++++++++++++++++++- data/battle_4.s | 116 +- data/battle_scripts_1.s | 37 +- data/link.s | 32 +- graphics/battle_interface/unk_battlebox.pal | 19 + graphics/battle_interface/unk_battlebox.png | Bin 0 -> 174 bytes 7 files changed, 5793 insertions(+), 43 deletions(-) create mode 100644 graphics/battle_interface/unk_battlebox.pal create mode 100644 graphics/battle_interface/unk_battlebox.png diff --git a/asm/crt0.s b/asm/crt0.s index 14675fe4c..3ece5c7d0 100644 --- a/asm/crt0.s +++ b/asm/crt0.s @@ -18,17 +18,65 @@ Start: @ 8000000 .global GPIOPortData GPIOPortData: @ 80000C4 - .hword 0 + .2byte 0 .global GPIOPortDirection GPIOPortDirection: @ 80000C6 - .hword 0 + .2byte 0 .global GPIOPortReadEnable GPIOPortReadEnable: @ 80000C8 - .hword 0 + .2byte 0 - .incbin "baserom.gba", 0xCA, 0x204 - 0xCA +@ 80000CA + .2byte 0 + +@ 80000CC + .space 0x34 + + .4byte 3 + .4byte 2 + + .ascii "pokemon emerald version" + .space 9 + + .4byte gMonFrontPicTable + .4byte gMonBackPicTable + .4byte gMonPaletteTable + .4byte gMonShinyPaletteTable + .4byte gMonIconTable + .4byte gMonIconPaletteIndices + .4byte gMonIconPaletteTable + .4byte gSpeciesNames + .4byte gMoveNames + .4byte gDecorations + + .4byte 0x00001270, 0x0000139c, 0x00000018, 0x00000988 + .4byte 0x00003b24, 0x00000046, 0x000008e4, 0x000008ac + .4byte 0x00000182 + + .byte 0x07, 0x0a, 0x0a, 0x0a, 0x0c, 0x0c, 0x06, 0x0c + .byte 0x06, 0x10, 0x12, 0x0c, 0x0f, 0x0b, 0x01, 0x08 + + .4byte 0x0000000c, 0x00000f2c, 0x00003d88, 0x00000234 + .4byte 0x00000238, 0x00000009, 0x0000000a, 0x00000000 + .4byte 0x00000008, 0x00000ca8, 0x00000ca8, 0x000031c7 + .4byte 0x000031b3, 0x00000000 + + .4byte gBaseStats + .4byte gAbilityNames + .4byte gAbilityDescriptionPointers + .4byte gItems + .4byte gBattleMoves + .4byte gUnknown_0832C400 + .4byte gUnknown_0832C460 + + .4byte 0x000000a8, 0x00000864, 0x0000089b + + .byte 0x1e, 0x1e, 0x10, 0x40 + + .4byte 0x0000322e, 0x00000498, 0x000031a8, 0x000031f8 + .4byte 0x00000034, 0x00000000, 0x00000000 .arm .align 2, 0 diff --git a/data/bard_music.s b/data/bard_music.s index ba775dd83..2e7326f9d 100644 --- a/data/bard_music.s +++ b/data/bard_music.s @@ -3,26 +3,5586 @@ .section .rodata + .align 2 gUnknown_085F5490:: @ 85F5490 - .incbin "baserom.gba", 0x5f5490, 0x4 + .4byte 0x19C + .align 2 gUnknown_085F5494:: @ 85F5494 - .incbin "baserom.gba", 0x5f5494, 0x4d40 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000002, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000015, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000008, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000017, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000021, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000015, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000021, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000015, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000008, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002d, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000015, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000015, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000015, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000015, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000015, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000015, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002d, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002d, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x00000008, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000021, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000021, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000008, 0x00000000, 0x00000010, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000008, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000010, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000001c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000023, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000015, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000028, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002d, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000017, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x0000001e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000001, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000021, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000007, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .align 2 gUnknown_085FA1D4:: @ 85FA1D4 - .incbin "baserom.gba", 0x5fa1d4, 0x4 + .4byte 0x163 + .align 2 gUnknown_085FA1D8:: @ 85FA1D8 - .incbin "baserom.gba", 0x5fa1d8, 0xff90 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000000a, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000002, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000023, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000002, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x0000000a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000021, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000029, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000000d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000002d, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000029, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000001e, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002b, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000028, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000001, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000014, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000021, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000000d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000000a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000021, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000014, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000004, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .align 2 +gUnknown_085FE468:: @ 85FE468 + .4byte 0x00000012, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x0000002d, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000008, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_085FE978:: @ 85FE978 + .4byte 0x00000008, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000015, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000029, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000029, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002d, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000017, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000008, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002d, 0x00000000, 0x00000021, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000002, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000020, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000020, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000004, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000008, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000021, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000015, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000015, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000004, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000007, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002d, 0x00000000, 0x00000007, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000014, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002d, 0x00000000, 0x00000021, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000002b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_085FFDE8:: @ 85FFDE8 + .4byte 0x00000002, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000008, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000001, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000017, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000002, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000023, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x0000000a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000029, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000016, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000008, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000029, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000029, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_086009B8:: @ 86009B8 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000017, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000002, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000010, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000004, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000014, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000028, 0x00000000 + .4byte 0x0000000d, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000004, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000002b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000a, 0x00000000, 0x0000000a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000001, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000023, 0x00000000, 0x00000017, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_08601198:: @ 8601198 + .4byte 0x0000002c, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000013, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000f71a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x00000008, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000008, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000007, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000004, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000010, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000000d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000002, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000029, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000029, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000010, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000010, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000014, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000028, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000031, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000031, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000002, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000010, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000001, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_08601FA8:: @ 8601FA8 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0008051b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000031, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000028, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000019, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001c, 0x00000000, 0x00000031, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000023, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000002, 0x00000000 + .4byte 0x00000024, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000013, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x0000001e, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000001, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000017, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000013, 0x00000000, 0x0000000d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000007, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000004, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000004, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000004, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000007, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000022, 0x00000000, 0x0000000d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000007, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_08602B78:: @ 8602B78 + .4byte 0x00000009, 0x00000000, 0x00000010, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000017, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000002d, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000a, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000014, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000023, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000023, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000a, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000007, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000010, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000028, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000006, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000008, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_086036B8:: @ 86036B8 + .4byte 0x00000010, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000010, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000010, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000004, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000023, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000023, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_086043A8:: @ 86043A8 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000004, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000019, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000014, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000020, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000031, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000031, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000008, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000014, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000020, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000020, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000008, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000002, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000031, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000031, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000014, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000020, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000020, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000029, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000014, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000004, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_08605098:: @ 8605098 + .4byte 0x00000015, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x00000029, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000029, 0x00000000, 0x0000000a, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000020, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000019, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x00000014, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000a, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000014, 0x00000000 + .4byte 0x00000023, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000000a, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000a, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x00000016, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000016, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000029, 0x00000000, 0x0000001c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000008, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_08605D88:: @ 8605D88 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000010, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000010, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000004, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000006, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000008, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000d, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000002f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002f, 0x00000000, 0x0000000a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002f, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x0000000d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000029, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000023, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000000a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_08606C28:: @ 8606C28 + .4byte 0x00000031, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000023, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000029, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000027, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_08607498:: @ 8607498 + .4byte 0x00000014, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000004, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002f, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002f, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000a, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000008, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000026, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_08607EB8:: @ 8607EB8 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000001c, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000014, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000a, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000028, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000000f, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000000a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_08608728:: @ 8608728 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000018, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000010, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000004, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000010, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000001, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000002e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_08608F08:: @ 8608F08 + .4byte 0x0000001d, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000008, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002d, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000012, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000032, 0x00000000, 0x00000005, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000001e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000003, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000033, 0x00000000 + + .align 2 +gUnknown_086095C8:: @ 86095C8 + .4byte 0x0000002c, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000000, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000032, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000015, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000004, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001a, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000002, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000021, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000004, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000a, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000002a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000009, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000030, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 +gUnknown_08609B38:: @ 8609B38 + .4byte 0x00000005, 0x00000000, 0x00000002, 0x00000000 + .4byte 0x00000014, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001b, 0x00000000, 0x0000001b, 0x00000000 + .4byte 0x00000017, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000026, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000012, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000d, 0x00000000, 0x0000001d, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x0000001a, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000b, 0x00000000, 0x00000011, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000000b, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x00000009, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000027, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000000, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000e, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000011, 0x00000000, 0x00000001, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000000c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002c, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000a, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000003, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x00000023, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x00000024, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000f, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x00000030, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001d, 0x00000000, 0x0000002c, 0x00000000 + .4byte 0x0000000c, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000005, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000001c, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x00000018, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002b, 0x00000000, 0x00000033, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x0000002a, 0x00000000, 0x0000000e, 0x00000000 + .4byte 0x00000033, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + + .align 2 gUnknown_0860A168:: @ 860A168 - .incbin "baserom.gba", 0x60a168, 0x1b8 + .4byte NULL + .4byte gUnknown_085FE468 + .4byte gUnknown_085FE978 + .4byte gUnknown_085FFDE8 + .4byte gUnknown_086009B8 + .4byte gUnknown_08601198 + .4byte gUnknown_08601FA8 + .4byte gUnknown_08602B78 + .4byte gUnknown_086036B8 + .4byte gUnknown_086043A8 + .4byte gUnknown_08605098 + .4byte gUnknown_08605D88 + .4byte gUnknown_08606C28 + .4byte gUnknown_08607498 + .4byte gUnknown_08607EB8 + .4byte gUnknown_08608728 + .4byte gUnknown_08608F08 + .4byte gUnknown_086095C8 + .4byte NULL + .4byte NULL + .4byte gUnknown_08609B38 + .4byte NULL + .align 2 +gUnknown_0860A1C0:: @ 860A1C0 + .2byte 0xfd00, 0x1800 + +gUnknown_0860A1C4:: @ 860A1C4 + .2byte 0x0900, 0x1800 + +gUnknown_0860A1C8:: @ 860A1C7 + .2byte 0x0100, 0x1800 + +gUnknown_0860A1CC:: @ 860A1CC + .2byte 0x0400, 0x1800 + +gUnknown_0860A1D0:: @ 860A1D0 + .2byte 0x0b00, 0x1800 + +gUnknown_0860A1D4:: @ 860A1D4 + .2byte 0xfd00, 0xff00, 0x1800 + +gUnknown_0860A1DA:: @ 860A1DA + .2byte 0xfd00, 0x0200, 0x1800 + +gUnknown_0860A1E0:: @ 860A1E0 + .2byte 0x0200, 0x0400, 0x1800 + +gUnknown_0860A1E6:: @ 860A1E6 + .2byte 0x0600, 0x0800, 0x1800 + +gUnknown_0860A1EC:: @ 860A1EC + .2byte 0x0900, 0x0800, 0x1800 + +gUnknown_0860A1F2:: @ 860A1F2 + .2byte 0xfd00, 0xff00, 0xfd00, 0x1800 + +gUnknown_0860A1FA:: @ 860A1FA + .2byte 0x0400, 0xfd00, 0x0400, 0x1800 + +gUnknown_0860A202:: @ 860A202 + .2byte 0x0900, 0x0800, 0x0600, 0x1800 + +gUnknown_0860A20A:: @ 860A20A + .2byte 0x0100, 0x0200, 0x0400, 0x1800 + +gUnknown_0860A212:: @ 860A212 + .2byte 0x0600, 0x1000, 0x0d00, 0x1800 + +gUnknown_0860A21A:: @ 860A21A + .2byte 0x0400, 0x0900, 0x0400, 0x0900, 0x1800 + +gUnknown_0860A224:: @ 860A224 + .2byte 0x0900, 0x0400, 0x0d00, 0x0400, 0x1800 + +gUnknown_0860A22E:: @ 860A22E + .2byte 0x0100, 0x0200, 0x0400, 0x0600, 0x1800 + +gUnknown_0860A238:: @ 860A238 + .2byte 0x0800, 0x0600, 0x0400, 0x0200, 0x1800 + +gUnknown_0860A242:: @ 860A242 + .2byte 0x0f00, 0x0d00, 0x0b00, 0x0a00, 0x1800 + +gUnknown_0860A24C:: @ 860A24C + .2byte 0xfd00, 0xff00, 0x0100, 0x0200, 0x0400, 0x1800 + +gUnknown_0860A258:: @ 860A258 + .2byte 0x0900, 0x0800, 0x0600, 0x0400, 0x0200, 0x1800 + +gUnknown_0860A264:: @ 860A264 + .2byte 0x0100, 0x0400, 0x0900, 0x0400, 0x0100, 0x1800 + +gUnknown_0860A270:: @ 860A270 + .2byte 0x0900, 0x0400, 0x0900, 0x0400, 0xfd00, 0x1800 + +gUnknown_0860A27C:: @ 860A27C + .2byte 0x0b00, 0x0800, 0x0400, 0x0400, 0x0600, 0x1800 + +gUnknown_0860A288:: @ 860A288 + .2byte 0xfd00, 0xff00, 0x0100, 0x0200, 0x0400, 0x0600, 0x1800 + +gUnknown_0860A296:: @ 860A296 + .2byte 0x0800, 0x0600, 0x0400, 0x0200, 0x0100, 0xff00, 0x1800 + +gUnknown_0860A2A4:: @ 860A2A4 + .2byte 0x0100, 0x0200, 0x0400, 0x0100, 0x0200, 0x1000, 0x1800 + +gUnknown_0860A2B2:: @ 860A2B2 + .2byte 0x0400, 0xfd00, 0x0900, 0x0400, 0x0900, 0x0400, 0x1800 + +gUnknown_0860A2C0:: @ 860A2C0 + .2byte 0x0800, 0x0900, 0x0800, 0x0900, 0x0800, 0x0900, 0x1800 + +gUnknown_0860A2CE:: @ 860A2CE + .2byte 0x0200, 0x0100, 0x0200, 0x0100, 0x0200, 0x0400, 0x0200, 0x1800 + +gUnknown_0860A2DE:: @ 860A2DE + .2byte 0x0100, 0x0100, 0xff00, 0xff00, 0xfd00, 0x0400, 0xfd00, 0x1800 + +gUnknown_0860A2EE:: @ 860A2EE + .2byte 0x0800, 0x0900, 0x0b00, 0x0d00, 0x0e00, 0x0d00, 0x0b00, 0x1800 + +gUnknown_0860A2FE:: @ 860A2FE + .2byte 0x0800, 0x0600, 0x0400, 0x0200, 0x0d00, 0x0b00, 0x0900, 0x1800 + +gUnknown_0860A30E:: @ 860A30E + .2byte 0x0300, 0x0400, 0x0600, 0x0800, 0x0700, 0x0800, 0x0400, 0x1800 + + .align 2 gUnknown_0860A320:: @ 860A320 - .incbin "baserom.gba", 0x60a320, 0x8c + .4byte gUnknown_0860A1C0 + .4byte gUnknown_0860A1C4 + .4byte gUnknown_0860A1C8 + .4byte gUnknown_0860A1CC + .4byte gUnknown_0860A1D0 + .4byte gUnknown_0860A1D4 + .4byte gUnknown_0860A1DA + .4byte gUnknown_0860A1E0 + .4byte gUnknown_0860A1E6 + .4byte gUnknown_0860A1EC + .4byte gUnknown_0860A1F2 + .4byte gUnknown_0860A1FA + .4byte gUnknown_0860A202 + .4byte gUnknown_0860A20A + .4byte gUnknown_0860A212 + .4byte gUnknown_0860A21A + .4byte gUnknown_0860A224 + .4byte gUnknown_0860A22E + .4byte gUnknown_0860A238 + .4byte gUnknown_0860A242 + .4byte gUnknown_0860A24C + .4byte gUnknown_0860A258 + .4byte gUnknown_0860A264 + .4byte gUnknown_0860A270 + .4byte gUnknown_0860A27C + .4byte gUnknown_0860A288 + .4byte gUnknown_0860A296 + .4byte gUnknown_0860A2A4 + .4byte gUnknown_0860A2B2 + .4byte gUnknown_0860A2C0 + .4byte gUnknown_0860A2CE + .4byte gUnknown_0860A2DE + .4byte gUnknown_0860A2EE + .4byte gUnknown_0860A2FE + .4byte gUnknown_0860A30E + .align 2 gUnknown_0860A3AC:: @ 860A3AC - .incbin "baserom.gba", 0x60a3ac, 0x30 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .4byte 0x000000ff, 0x00000000, 0x000000ff, 0x00000000 + .align 2 gUnknown_0860A3DC:: @ 860A3DC - .incbin "baserom.gba", 0x60a3dc, 0xd0 + .4byte 0x00000009, 0x00000016, 0x0000000f, 0x00000010 + .4byte 0x00000027, 0x00000015, 0x00000009, 0x0000001e + .4byte 0x00000018, 0x0000000f, 0x00000019, 0x0000000c + .4byte 0x00000016, 0x0000002d, 0x00000018, 0x0000000f + .4byte 0x00000028, 0x00000009, 0x00000015, 0x0000002a + .4byte 0x00000012, 0x00000009, 0x00000016, 0x0000000f + .4byte 0x0000001b, 0x00000030, 0x00000012, 0x0000001b + .4byte 0x00000021, 0x00000018, 0x00000019, 0x00000027 + .4byte 0x00000013, 0x00000010, 0x00000036, 0x00000012 + .4byte 0x00000009, 0x0000002d, 0x0000000f, 0x0000000c + .4byte 0x00000027, 0x00000017, 0x00000005, 0x0000002d + .4byte 0x0000000c, 0x00000015, 0x00000030, 0x0000000c + .4byte 0x00000015, 0x00000045, 0x00000012, 0x0000000f diff --git a/data/battle_4.s b/data/battle_4.s index 1c8fb5384..0f799eac8 100644 --- a/data/battle_4.s +++ b/data/battle_4.s @@ -7,44 +7,134 @@ gMoveEffectBS_Ptrs:: @ 831C224 - .incbin "baserom.gba", 0x31c224, 0xa4 + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB386 + .4byte gUnknown_082DB395 + .4byte gUnknown_082DB3A4 + .4byte gUnknown_082DB3B3 + .4byte gUnknown_082DB3C9 + .4byte gUnknown_082DB3E6 + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB3C2 + .4byte gUnknown_082DB3D6 + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB3DD + .4byte gUnknown_082DB3F4 + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB36A + .4byte gUnknown_082DB3F4 + .align 2 + window_template 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x003f + + .align 2 gUnknown_0831C2C8:: @ 831C2C8 - .incbin "baserom.gba", 0x31c2c8, 0x20 + .incbin "graphics/battle_interface/unk_battlebox.gbapal" + .align 2 gUnknown_0831C2E8:: @ 831C2E8 - .incbin "baserom.gba", 0x31c2e8, 0xd8 + .incbin "graphics/battle_interface/unk_battlebox.4bpp.lz" + .align 2 + .byte 0x3A, 0x3E, 0x3B, 0x3F, 0x3C, 0x3D, 0x00, 0x00 + + .align 2 +gUnknown_0831C3B8:: @ 831C3B8 + .byte 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00 + + .align 2 gUnknown_0831C3C0:: @ 831C3C0 - .incbin "baserom.gba", 0x31c3c0, 0x18 + .2byte 0xd75a @ tileTag + .2byte 0xd75a @ paletteTag + .4byte gUnknown_0831C3B8 + .4byte gDummySpriteAnimTable + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte sub_804F450 + .align 2 sProtectSuccessRates:: @ 831C3D8 - .incbin "baserom.gba", 0x31c3d8, 0x8 + .2byte 0xffff, 0x7fff, 0x3fff, 0x1fff + .align 2 gUnknown_0831C3E0:: @ 831C3E0 - .incbin "baserom.gba", 0x31c3e0, 0x28 + .2byte 0x0076, 0x00a5, 0x00a6, 0x0066 + .2byte 0xfffe, 0x0044, 0x00f3, 0x00b6 + .2byte 0x00c5, 0x00cb, 0x00c2, 0x00d6 + .2byte 0x00a8, 0x010a, 0x0121, 0x010e + .2byte 0x0157, 0x010f, 0x0108, 0xffff + .align 2 gUnknown_0831C408:: @ 831C408 - .incbin "baserom.gba", 0x31c408, 0xc + .byte 0x01, 0xc8, 0x04, 0x96, 0x09, 0x64, 0x10, 0x50 + .byte 0x20, 0x28, 0x30, 0x14 + .align 2 gUnknown_0831C414:: @ 831C414 - .incbin "baserom.gba", 0x31c414, 0x14 + .2byte 0x004e, 0x004b, 0x0059, 0x0038 + .2byte 0x0039, 0x003d, 0x009d, 0x00f7 + .2byte 0x0081, 0x0081 + .align 2 gUnknown_0831C428:: @ 831C428 - .incbin "baserom.gba", 0x31c428, 0x18 + .2byte 0x0064, 0x0014, 0x00fa, 0x0028 + .2byte 0x01f4, 0x003c, 0x03e8, 0x0050 + .2byte 0x07d0, 0x0064, 0xffff, 0xffff + .align 2 @ 831C440 .include "data/pickup_items.inc" sTerrainToType:: @ 831C483 - .incbin "baserom.gba", 0x31c483, 0xa + .byte 0x0c, 0x0c, 0x04, 0x0b, 0x0b, 0x0b, 0x05, 0x05 + .byte 0x00, 0x00 sBallCatchBonuses:: @ 831C48D - .incbin "baserom.gba", 0x31c48d, 0x7 + .byte 0x14, 0x0f, 0x0a, 0x0f, 0x00, 0x00, 0x00 + .align 2 gUnknown_0831C494:: @ 831C494 - .incbin "baserom.gba", 0x31c494, 0x64 + .byte 0x3d, 0x44, 0x3d, 0x44, 0x14, 0x2d, 0x54, 0x5c + .byte 0x46, 0x55, 0x20, 0x5c, 0x26, 0x45, 0x46, 0x55 + .byte 0x14, 0x5a, 0x46, 0x5c, 0x1e, 0x32, 0x20, 0x5a + .byte 0x38, 0x4e, 0x38, 0x4e, 0x19, 0x28, 0x4b, 0x5a + .byte 0x45, 0x4b, 0x1c, 0x53, 0x23, 0x2d, 0x1d, 0x23 + .byte 0x3e, 0x48, 0x1e, 0x32, 0x3a, 0x5f, 0x58, 0x5e + .byte 0x22, 0x2d, 0x1d, 0x28, 0x23, 0x28, 0x23, 0x5f + .byte 0x38, 0x4e, 0x38, 0x4e, 0x23, 0x50, 0x22, 0x5e + .byte 0x2c, 0x5e, 0x22, 0x28, 0x38, 0x4e, 0x38, 0x4e + .byte 0x1e, 0x58, 0x1e, 0x58, 0x1e, 0x2b, 0x1b, 0x21 + .byte 0x28, 0x5a, 0x19, 0x57, 0x12, 0x58, 0x5a, 0x5f + .byte 0x58, 0x5e, 0x16, 0x2a, 0x2a, 0x5c, 0x2a, 0x2f + .byte 0x38, 0x4e, 0x38, 0x4e + .align 2 gUnknown_0831C4F8:: @ 831C4F8 - .incbin "baserom.gba", 0x31c4f8, 0x1c + .byte 0x03, 0x00, 0x01, 0x00, 0x00, 0x01, 0x03, 0x00 + .byte 0x01, 0x02, 0x02, 0x00, 0x03, 0x01, 0x03, 0x01 + .byte 0x02, 0x03, 0x03, 0x02, 0x01, 0x00, 0x02, 0x02 + .byte 0x03, 0x00, 0x00, 0x00 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index da05b9367..604e84ee7 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -322,10 +322,43 @@ gUnknown_082DB350:: @ 82DB350 .incbin "baserom.gba", 0x2db350, 0x11 gUnknown_082DB361:: @ 82DB361 - .incbin "baserom.gba", 0x2db361, 0x17 + .incbin "baserom.gba", 0x2db361, 0x9 + +gUnknown_082DB36A:: @ 82DB36A + .incbin "baserom.gba", 0x2db36A, 0xE gUnknown_082DB378:: @ 82DB378 - .incbin "baserom.gba", 0x2db378, 0xaa + .incbin "baserom.gba", 0x2db378, 0xE + +gUnknown_082DB386:: @ 82DB386 + .incbin "baserom.gba", 0x2db386, 0xF + +gUnknown_082DB395:: @ 82DB395 + .incbin "baserom.gba", 0x2db395, 0xF + +gUnknown_082DB3A4:: @ 82DB3A4 + .incbin "baserom.gba", 0x2db3A4, 0xF + +gUnknown_082DB3B3:: @ 82DB3B3 + .incbin "baserom.gba", 0x2db3B3, 0xF + +gUnknown_082DB3C2:: @ 82DB3C2 + .incbin "baserom.gba", 0x2db3C2, 0x7 + +gUnknown_082DB3C9:: @ 82DB3C9 + .incbin "baserom.gba", 0x2db3C9, 0xD + +gUnknown_082DB3D6:: @ 82DB3D6 + .incbin "baserom.gba", 0x2db3D6, 0x7 + +gUnknown_082DB3DD:: @ 82DB3DD + .incbin "baserom.gba", 0x2db3DD, 0x9 + +gUnknown_082DB3E6:: @ 82DB3E6 + .incbin "baserom.gba", 0x2db3E6, 0xE + +gUnknown_082DB3F4:: @ 82DB3F4 + .incbin "baserom.gba", 0x2db3F4, 0x2e gUnknown_082DB422:: @ 82DB422 .incbin "baserom.gba", 0x2db422, 0xe diff --git a/data/link.s b/data/link.s index 900659502..a7424cc1a 100644 --- a/data/link.s +++ b/data/link.s @@ -256,52 +256,52 @@ gUnknown_082ED6E0:: @ 82ED6E0 .2byte 0x0002, 0x7f7d, 0x0000, 0xffff .ascii "RFU WAIT" - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .space 7 .ascii "RFU BOOT" - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .space 7 .ascii "RFU ERROR" - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .space 6 .ascii "RFU RESET" - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .space 6 .ascii "RFU CONFIG" - .byte 0x00, 0x00, 0x00, 0x00, 0x00 + .space 5 .ascii "RFU START" - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .space 6 .ascii "RFU SC POLL" - .byte 0x00, 0x00, 0x00, 0x00 + .space 4 .ascii "RFU SP POLL" - .byte 0x00, 0x00, 0x00, 0x00 + .space 4 .ascii "RFU START" - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .space 6 .ascii "RFU SEND ERR" - .byte 0x00, 0x00, 0x00 + .space 3 .ascii "RFU CP POLL" - .byte 0x00, 0x00, 0x00, 0x00 + .space 4 .ascii " " - .byte 0x00, 0x00 + .space 2 .ascii "RECOVER START " - .byte 0x00, 0x00 + .space 2 .ascii "DISSCONECT " - .byte 0x00, 0x00 + .space 2 .ascii "RECOVER SUUSES" - .byte 0x00, 0x00 + .space 2 .ascii "RECOVER FAILED" - .byte 0x00, 0x00 + .space 2 .align 2 gUnknown_082ED7E0:: @ 82ED7E0 diff --git a/graphics/battle_interface/unk_battlebox.pal b/graphics/battle_interface/unk_battlebox.pal new file mode 100644 index 000000000..862165f3f --- /dev/null +++ b/graphics/battle_interface/unk_battlebox.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 255 255 +255 255 255 +106 90 115 +0 0 0 +213 230 255 +189 205 238 +238 238 255 +106 172 197 +90 139 180 +123 197 205 +0 0 0 +0 0 0 +123 197 255 +0 0 139 +255 131 131 +164 0 0 diff --git a/graphics/battle_interface/unk_battlebox.png b/graphics/battle_interface/unk_battlebox.png new file mode 100644 index 0000000000000000000000000000000000000000..24700ef4d1f822b008d25f4246d58add0ca812b8 GIT binary patch literal 174 zcmeAS@N?(olHy`uVBq!ia0vp^2|z5t!VDz8AAhQtTjiYy0=sxJqr{Bg6gCH85p|%H#aX~U})rKxepYw^mK6yvFJ@sFjM1{FpxN} z!YN@K;is?8YGNEQX-Qqk;RP2Ho;e9|$Xzv1G2OvtEYUuRrAN|3H;rMU!)(JD|8h5g O4EA*Ob6Mw<&;$U2tUR6o literal 0 HcmV?d00001 From 16f2e40576b29fd85366305b4165da3aff4aef0e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 17 Sep 2017 23:42:44 -0400 Subject: [PATCH 197/342] Fix naming conflicts --- include/global.berry.h | 4 ---- ld_script.txt | 2 +- src/berry.c | 6 +++--- src/load_save.c | 4 ---- src/{rom_81700F8.c => reset_save_heap.c} | 0 5 files changed, 4 insertions(+), 12 deletions(-) rename src/{rom_81700F8.c => reset_save_heap.c} (100%) diff --git a/include/global.berry.h b/include/global.berry.h index 4b9ca644c..a77da20ba 100644 --- a/include/global.berry.h +++ b/include/global.berry.h @@ -46,10 +46,6 @@ struct EnigmaBerry u8 holdEffect; u8 holdEffectParam; u32 checksum; - u8 pic[(6 * 6) * TILE_SIZE_4BPP]; - u16 palette[16]; - u8 description1[45]; - u8 description2[45]; }; struct BattleEnigmaBerry diff --git a/ld_script.txt b/ld_script.txt index 78d0e6cca..19ddabab1 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -207,7 +207,7 @@ SECTIONS { asm/battle_controller_wally.o(.text); asm/player_pc.o(.text); asm/intro.o(.text); - src/rom_81700F8.o(.text); + src/reset_save_heap.o(.text); asm/field_region_map.o(.text); asm/battle_anim_8170478.o(.text); asm/hall_of_fame.o(.text); diff --git a/src/berry.c b/src/berry.c index b6eaa14a0..46b93d6ff 100644 --- a/src/berry.c +++ b/src/berry.c @@ -807,7 +807,7 @@ const struct Berry gBerries[] = // unused void ClearEnigmaBerries(void) { - CpuFill16(0, &gSaveBlock1Ptr->enigmaBerry, sizeof(gSaveBlock1Ptr->enigmaBerry)); + CpuFill16(0, &gSaveBlock1Ptr->enigmaBerry, 52 /*FIXME: sizeof(gSaveBlock1Ptr->enigmaBerry)*/); } void SetEnigmaBerry(u8 *src) @@ -815,7 +815,7 @@ void SetEnigmaBerry(u8 *src) u32 i; u8 *dest = (u8*)&gSaveBlock1Ptr->enigmaBerry; - for (i = 0; i < sizeof(gSaveBlock1Ptr->enigmaBerry); i++) + for (i = 0; i < 52 /*FIXME: sizeof(gSaveBlock1Ptr->enigmaBerry)*/; i++) dest[i] = src[i]; } @@ -827,7 +827,7 @@ u32 GetEnigmaBerryChecksum(struct EnigmaBerry *enigmaBerry) dest = (u8*)enigmaBerry; checksum = 0; - for (i = 0; i < sizeof(gSaveBlock1Ptr->enigmaBerry) - sizeof(gSaveBlock1Ptr->enigmaBerry.checksum); i++) + for (i = 0; i < 52 /*FIXME: sizeof(gSaveBlock1Ptr->enigmaBerry)*/ - sizeof(gSaveBlock1Ptr->enigmaBerry.checksum); i++) { checksum += dest[i]; } diff --git a/src/load_save.c b/src/load_save.c index 588387186..68d978e3d 100644 --- a/src/load_save.c +++ b/src/load_save.c @@ -6,15 +6,11 @@ #include "rng.h" #include "malloc.h" -extern u8 gPlayerPartyCount; -extern struct PokemonStorage* gPokemonStoragePtr; extern void* gUnknown_0203CF5C; -extern u8 gHeap[0x1C000]; extern bool16 IdentifyFlash(void); extern void SetBagItemsPointers(void); extern void SetDecorationInventoriesPointers(void); -extern void InitHeap(void *heapStart, u32 heapSize); void ApplyNewEncyprtionKeyToAllEncryptedData(u32 encryptionKey); diff --git a/src/rom_81700F8.c b/src/reset_save_heap.c similarity index 100% rename from src/rom_81700F8.c rename to src/reset_save_heap.c From ecd659f46ef26be357118543321d8f4ef7e2e4e9 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 18 Sep 2017 12:51:16 +0200 Subject: [PATCH 198/342] add side labels --- src/battle_3.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/battle_3.c b/src/battle_3.c index af3d4ebdd..d5d14e040 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -1473,11 +1473,11 @@ bool8 sub_80423F4(u8 bank, u8 r1, u8 r2) return FALSE; if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) { - if (GetBankSide(bank) == 0) + if (GetBankSide(bank) == SIDE_PLAYER) party = gPlayerParty; else party = gEnemyParty; - r6 = ((bank & 2) >> 1); + r6 = ((bank & 2) / 2); for (i = r6 * 3; i < r6 * 3 + 3; i++) { if (GetMonData(&party[i], MON_DATA_HP) != 0 @@ -1508,13 +1508,13 @@ bool8 sub_80423F4(u8 bank, u8 r1, u8 r2) party = gEnemyParty; var = bank ^ 1; - r6 = (var == 0) ? 0 : 1; + r6 = (var != 0) ? 1 : 0; } } else { r7 = sub_806D864(bank); - if (GetBankSide(bank) == 0) + if (GetBankSide(bank) == SIDE_PLAYER) party = gPlayerParty; else party = gEnemyParty; @@ -1529,7 +1529,7 @@ bool8 sub_80423F4(u8 bank, u8 r1, u8 r2) } return (i == r6 * 3 + 3); } - else if ((gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) && GetBankSide(bank) == 1) + else if ((gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) && GetBankSide(bank) == SIDE_OPPONENT) { party = gEnemyParty; @@ -1548,7 +1548,7 @@ bool8 sub_80423F4(u8 bank, u8 r1, u8 r2) } else { - if (GetBankSide(bank) == 1) + if (GetBankSide(bank) == SIDE_OPPONENT) { r7 = GetBankByPlayerAI(1); r6 = GetBankByPlayerAI(3); @@ -5595,7 +5595,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) u8 ppBonuses; u16 move; - if (GetBankSide(bank) == 0) + if (GetBankSide(bank) == SIDE_PLAYER) poke = &gPlayerParty[gBattlePartyID[bank]]; else poke = &gEnemyParty[gBattlePartyID[bank]]; @@ -6272,7 +6272,7 @@ u8 GetMoveTarget(u16 move, u8 useMoveTarget) targetBank = gSideTimers[side].followmeTarget; else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && moveTarget & 4) { - if (GetBankSide(gBankAttacker) == 0) + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) { if (Random() & 1) targetBank = GetBankByPlayerAI(1); From 8604291b0f0e430b01f0099ea4e098171938505b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 18 Sep 2017 08:52:57 -0400 Subject: [PATCH 199/342] Start decomp --- asm/berry_fix_program.s | 236 ------------------------------ data/multiboot_berry_glitch_fix.s | 1 + include/gba/multiboot.h | 26 ++-- include/gpu_regs.h | 13 ++ include/multiboot.h | 2 +- include/unknown_task.h | 11 ++ ld_script.txt | 1 + src/berry_fix_program.c | 123 ++++++++++++++++ 8 files changed, 163 insertions(+), 250 deletions(-) create mode 100644 include/gpu_regs.h create mode 100644 include/unknown_task.h create mode 100644 src/berry_fix_program.c diff --git a/asm/berry_fix_program.s b/asm/berry_fix_program.s index 19ed0babd..caeae0115 100755 --- a/asm/berry_fix_program.s +++ b/asm/berry_fix_program.s @@ -5,242 +5,6 @@ .text - thumb_func_start sub_81BF384 -sub_81BF384: @ 81BF384 - push {r4,lr} - ldr r0, =0x0000ffff - bl DisableInterrupts - movs r0, 0x1 - bl EnableInterrupts - bl m4aSoundVSyncOff - movs r0, 0 - bl SetVBlankCallback - bl ResetSpriteData - bl ResetTasks - bl remove_some_task - movs r0, 0 - movs r1, 0 - bl SetGpuReg - ldr r4, =gUnknown_030012B8 - movs r0, 0x50 - bl AllocZeroed - str r0, [r4] - movs r1, 0 - strb r1, [r0] - ldr r1, [r4] - movs r0, 0x6 - strb r0, [r1, 0x1] - ldr r0, =sub_81BF3DC - bl SetMainCallback2 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81BF384 - - thumb_func_start sub_81BF3DC -sub_81BF3DC: @ 81BF3DC - push {r4,r5,lr} - sub sp, 0x4 - ldr r1, =gUnknown_030012B8 - ldr r0, [r1] - ldrb r0, [r0] - adds r5, r1, 0 - cmp r0, 0x7 - bls _081BF3EE - b _081BF592 -_081BF3EE: - lsls r0, 2 - ldr r1, =_081BF400 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081BF400: - .4byte _081BF420 - .4byte _081BF430 - .4byte _081BF45C - .4byte _081BF488 - .4byte _081BF4BC - .4byte _081BF514 - .4byte _081BF552 - .4byte _081BF574 -_081BF420: - bl sub_81BF5A4 - ldr r0, =gUnknown_030012B8 - ldr r1, [r0] - movs r0, 0x1 - b _081BF590 - .pool -_081BF430: - movs r0, 0x5 - bl sub_81BF7A4 - cmp r0, 0x5 - beq _081BF43C - b _081BF592 -_081BF43C: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _081BF44A - b _081BF592 -_081BF44A: - ldr r0, =gUnknown_030012B8 - ldr r1, [r0] - movs r0, 0x2 - b _081BF590 - .pool -_081BF45C: - movs r0, 0 - bl sub_81BF7A4 - cmp r0, 0 - beq _081BF468 - b _081BF592 -_081BF468: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _081BF476 - b _081BF592 -_081BF476: - ldr r0, =gUnknown_030012B8 - ldr r1, [r0] - movs r0, 0x3 - b _081BF590 - .pool -_081BF488: - movs r0, 0x1 - bl sub_81BF7A4 - cmp r0, 0x1 - beq _081BF494 - b _081BF592 -_081BF494: - ldr r4, =gUnknown_030012B8 - ldr r0, [r4] - ldr r1, =gUnknown_089A6550 - str r1, [r0, 0x2C] - adds r0, 0x4F - movs r5, 0 - strb r5, [r0] - ldr r0, [r4] - adds r0, 0x4 - bl MultiBootInit - ldr r1, [r4] - strh r5, [r1, 0x2] - movs r0, 0x4 - b _081BF590 - .pool -_081BF4BC: - adds r4, r5, 0 - ldr r0, [r4] - adds r0, 0x4 - bl MultiBootMain - ldr r4, [r4] - ldrb r0, [r4, 0x1C] - cmp r0, 0 - bne _081BF4D8 - ldr r0, [r4, 0x20] - ldr r1, =0x00020200 - ands r0, r1 - cmp r0, r1 - beq _081BF4E4 -_081BF4D8: - movs r0, 0 - strh r0, [r4, 0x2] - b _081BF592 - .pool -_081BF4E4: - ldrh r0, [r4, 0x2] - adds r0, 0x1 - strh r0, [r4, 0x2] - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0xB4 - bls _081BF592 - adds r0, r4, 0x4 - ldr r1, =gMultiBootProgram_BerryGlitchFix_Start - ldr r2, =gMultiBootProgram_BerryGlitchFix_End - subs r2, r1 - movs r3, 0x1 - str r3, [sp] - movs r3, 0x4 - bl MultiBootStartMaster - ldr r1, [r5] - movs r0, 0x5 - b _081BF590 - .pool -_081BF514: - movs r0, 0x2 - bl sub_81BF7A4 - adds r4, r0, 0 - cmp r4, 0x2 - bne _081BF592 - ldr r5, =gUnknown_030012B8 - ldr r0, [r5] - adds r0, 0x4 - bl MultiBootMain - ldr r0, [r5] - adds r0, 0x4 - bl MultiBootCheckComplete - cmp r0, 0 - beq _081BF540 - ldr r1, [r5] - movs r0, 0x6 - b _081BF590 - .pool -_081BF540: - ldr r1, [r5] - adds r0, r1, 0 - adds r0, 0x22 - ldrb r0, [r0] - ands r4, r0 - cmp r4, 0 - bne _081BF592 - movs r0, 0x7 - b _081BF590 -_081BF552: - movs r0, 0x3 - bl sub_81BF7A4 - cmp r0, 0x3 - bne _081BF592 - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _081BF592 - bl DoSoftReset - b _081BF592 - .pool -_081BF574: - movs r0, 0x4 - bl sub_81BF7A4 - cmp r0, 0x4 - bne _081BF592 - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _081BF592 - ldr r0, =gUnknown_030012B8 - ldr r1, [r0] - movs r0, 0x1 -_081BF590: - strb r0, [r1] -_081BF592: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81BF3DC - thumb_func_start sub_81BF5A4 sub_81BF5A4: @ 81BF5A4 push {r4-r6,lr} diff --git a/data/multiboot_berry_glitch_fix.s b/data/multiboot_berry_glitch_fix.s index bc97eb553..e6a26c619 100644 --- a/data/multiboot_berry_glitch_fix.s +++ b/data/multiboot_berry_glitch_fix.s @@ -3,6 +3,7 @@ gUnknown_089A6550:: @ 89A6550 .incbin "baserom.gba", 0x9a6550, 0xc0 +gMultiBootProgram_BerryGlitchFix_Script:: @ 89A6610 gMultiBootProgram_BerryGlitchFix_Start:: @ 89A6610 .incbin "baserom.gba", 0x9a6610, 0x3b34 gMultiBootProgram_BerryGlitchFix_End:: diff --git a/include/gba/multiboot.h b/include/gba/multiboot.h index e88b43a19..61c02ec52 100644 --- a/include/gba/multiboot.h +++ b/include/gba/multiboot.h @@ -8,19 +8,19 @@ struct MultiBootParam { - u32 system_work[5]; - u8 handshake_data; - u8 padding; - u16 handshake_timeout; - u8 probe_count; - u8 client_data[MULTIBOOT_NCHILD]; - u8 palette_data; - u8 response_bit; - u8 client_bit; - u8 reserved1; - u8 *boot_srcp; - u8 *boot_endp; - u8 *masterp; + u32 system_work[5]; // 00 + u8 handshake_data; // 14 + u8 padding; // 15 + u16 handshake_timeout; // 16 + u8 probe_count; // 18 + u8 client_data[MULTIBOOT_NCHILD]; // 19 + u8 palette_data; // 1c + u8 response_bit; // 1d + u8 client_bit; // 1e + u8 reserved1; // 1f + u8 *boot_srcp; // 20 + u8 *boot_endp; // 24 + const u8 *masterp; u8 *reserved2[MULTIBOOT_NCHILD]; u32 system_work2[4]; u8 sendflag; diff --git a/include/gpu_regs.h b/include/gpu_regs.h new file mode 100644 index 000000000..d0528bb83 --- /dev/null +++ b/include/gpu_regs.h @@ -0,0 +1,13 @@ +#ifndef GUARD_gpu_regs_H +#define GUARD_gpu_regs_H + +// Exported type declarations + +// Exported RAM declarations + +// Exported ROM declarations +void DisableInterrupts(u16); +void EnableInterrupts(u16); +void SetGpuReg(u8, u16); + +#endif //GUARD_gpu_regs_H diff --git a/include/multiboot.h b/include/multiboot.h index 950c853d0..d4700ff4e 100644 --- a/include/multiboot.h +++ b/include/multiboot.h @@ -15,7 +15,7 @@ void MultiBootInit(struct MultiBootParam *mp); int MultiBootMain(struct MultiBootParam *mp); void MultiBootStartProbe(struct MultiBootParam *mp); -void MultiBootStartMaster(struct MultiBootParam *mp, u8 *srcp, int length, u8 palette_color, s8 palette_speed); +void MultiBootStartMaster(struct MultiBootParam *mp, const u8 *srcp, int length, u8 palette_color, s8 palette_speed); int MultiBootCheckComplete(struct MultiBootParam *mp); #endif // GUARD_MULTIBOOT_H diff --git a/include/unknown_task.h b/include/unknown_task.h new file mode 100644 index 000000000..f59ca9ac3 --- /dev/null +++ b/include/unknown_task.h @@ -0,0 +1,11 @@ +#ifndef GUARD_unknown_task_H +#define GUARD_unknown_task_H + +// Exported type declarations + +// Exported RAM declarations + +// Exported ROM declarations +void remove_some_task(void); + +#endif //GUARD_unknown_task_H diff --git a/ld_script.txt b/ld_script.txt index d6b3953fe..b62125311 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -259,6 +259,7 @@ SECTIONS { asm/battle_controller_player_partner.o(.text); asm/fldeff_groundshake.o(.text); asm/fossil_specials.o(.text); + src/berry_fix_program.o(.text); asm/berry_fix_program.o(.text); asm/pokemon_summary_screen.o(.text); asm/pokenav.o(.text); diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c new file mode 100644 index 000000000..bafefaf7a --- /dev/null +++ b/src/berry_fix_program.c @@ -0,0 +1,123 @@ + +// Includes +#include "global.h" +#include "multiboot.h" +#include "gpu_regs.h" +#include "main.h" +#include "sprite.h" +#include "task.h" +#include "unknown_task.h" +#include "malloc.h" +#include "m4a.h" + +// Static type declarations + +typedef struct { + u8 state; + u8 unk1; + u16 unk2; + struct MultiBootParam mb; +} berryfix_t; + +// Static RAM declarations + +extern berryfix_t *gUnknown_030012B8; + +// Static ROM declarations + +static void sub_81BF3DC(void); +void sub_81BF5A4(void); +u32 sub_81BF7A4(u8); + +// .rodata + +extern const u8 gUnknown_089A6550[0xC0]; +extern const u8 gMultiBootProgram_BerryGlitchFix_Script[0x3b34]; +extern const u8 gMultiBootProgram_BerryGlitchFix_Start[]; +extern const u8 gMultiBootProgram_BerryGlitchFix_End[]; + +// .text + +void sub_81BF384(void) +{ + DisableInterrupts(0xFFFF); + EnableInterrupts(0x0001); + m4aSoundVSyncOff(); + SetVBlankCallback(NULL); + ResetSpriteData(); + ResetTasks(); + remove_some_task(); + SetGpuReg(REG_OFFSET_DISPCNT, 0x0000); + gUnknown_030012B8 = AllocZeroed(0x50); + gUnknown_030012B8->state = 0; + gUnknown_030012B8->unk1 = 6; + SetMainCallback2(sub_81BF3DC); +} + +static void sub_81BF3DC(void) +{ + switch (gUnknown_030012B8->state) + { + case 0: + sub_81BF5A4(); + gUnknown_030012B8->state = 1; + break; + case 1: + if (sub_81BF7A4(5) == 5 && (gMain.newKeys & A_BUTTON)) + { + gUnknown_030012B8->state = 2; + } + break; + case 2: + if (sub_81BF7A4(0) == 0 && (gMain.newKeys & A_BUTTON)) + { + gUnknown_030012B8->state = 3; + } + break; + case 3: + if (sub_81BF7A4(1) == 1) + { + gUnknown_030012B8->mb.masterp = gUnknown_089A6550; + gUnknown_030012B8->mb.server_type = 0; + MultiBootInit(&gUnknown_030012B8->mb); + gUnknown_030012B8->unk2 = 0; + gUnknown_030012B8->state = 4; + } + break; + case 4: + MultiBootMain(&gUnknown_030012B8->mb); + if (gUnknown_030012B8->mb.probe_count != 0 || (!(gUnknown_030012B8->mb.response_bit & 2) || !(gUnknown_030012B8->mb.client_bit & 2))) + { + gUnknown_030012B8->unk2 = 0; + } + else if (++ gUnknown_030012B8->unk2 > 180) + { + MultiBootStartMaster(&gUnknown_030012B8->mb, gMultiBootProgram_BerryGlitchFix_Start, (u32)(gMultiBootProgram_BerryGlitchFix_End - gMultiBootProgram_BerryGlitchFix_Start), 4, 1); + gUnknown_030012B8->state = 5; + } + break; + case 5: + if (sub_81BF7A4(2) == 2) { + MultiBootMain(&gUnknown_030012B8->mb); + if (MultiBootCheckComplete(&gUnknown_030012B8->mb)) { + gUnknown_030012B8->state = 6; + } + else if (!(gUnknown_030012B8->mb.client_bit & 2)) { + gUnknown_030012B8->state = 7; + } + } + break; + case 6: + if (sub_81BF7A4(3) == 3 && gMain.newKeys & A_BUTTON) + { + DoSoftReset(); + } + break; + case 7: + if (sub_81BF7A4(4) == 4 && gMain.newKeys & A_BUTTON) + { + gUnknown_030012B8->state = 1; + } + break; + } +} From c5dddf41f58446139b52d3b60cb8738052e4a084 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 18 Sep 2017 11:26:45 -0400 Subject: [PATCH 200/342] sub_81BF5A4 --- asm/berry_fix_program.s | 205 ------------------------------ include/bg.h | 19 +++ include/gba/multiboot.h | 4 +- include/menu.h | 2 + include/text.h | 4 +- include/window.h | 2 +- src/berry_fix_program.c | 272 +++++++++++++++++++++++++++++++++++++++- src/bg.c | 189 +++++++++++++--------------- src/multiboot.c | 2 +- src/text.c | 6 +- src/window.c | 2 +- 11 files changed, 390 insertions(+), 317 deletions(-) create mode 100644 include/bg.h diff --git a/asm/berry_fix_program.s b/asm/berry_fix_program.s index caeae0115..83be5e453 100755 --- a/asm/berry_fix_program.s +++ b/asm/berry_fix_program.s @@ -5,211 +5,6 @@ .text - thumb_func_start sub_81BF5A4 -sub_81BF5A4: @ 81BF5A4 - push {r4-r6,lr} - mov r6, r8 - push {r6} - sub sp, 0x10 - movs r0, 0x8 - movs r1, 0 - bl SetGpuReg - movs r0, 0xA - movs r1, 0 - bl SetGpuReg - movs r0, 0x10 - movs r1, 0 - bl SetGpuReg - movs r0, 0x12 - movs r1, 0 - bl SetGpuReg - movs r0, 0x14 - movs r1, 0 - bl SetGpuReg - movs r0, 0x16 - movs r1, 0 - bl SetGpuReg - movs r0, 0x50 - movs r1, 0 - bl SetGpuReg - movs r1, 0 - str r1, [sp, 0xC] - ldr r4, =0x040000d4 - add r0, sp, 0xC - str r0, [r4] - movs r0, 0xC0 - lsls r0, 19 - str r0, [r4, 0x4] - ldr r0, =0x85006000 - str r0, [r4, 0x8] - ldr r0, [r4, 0x8] - str r1, [sp, 0xC] - add r0, sp, 0xC - str r0, [r4] - movs r0, 0xE0 - lsls r0, 19 - str r0, [r4, 0x4] - ldr r2, =0x85000100 - str r2, [r4, 0x8] - ldr r0, [r4, 0x8] - str r1, [sp, 0xC] - add r0, sp, 0xC - str r0, [r4] - movs r0, 0xA0 - lsls r0, 19 - str r0, [r4, 0x4] - str r2, [r4, 0x8] - ldr r0, [r4, 0x8] - movs r0, 0 - bl ResetBgsAndClearDma3BusyFlags - ldr r1, =gUnknown_08618108 - movs r0, 0 - movs r2, 0x2 - bl InitBgsFromTemplates - movs r0, 0 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - ldr r0, =gUnknown_08618110 - bl InitWindows - bl DeactivateAllTextPrinters - ldr r0, =gUnknown_08618138 - str r0, [r4] - ldr r0, =0x050001e0 - str r0, [r4, 0x4] - ldr r0, =0x84000008 - str r0, [r4, 0x8] - ldr r0, [r4, 0x8] - movs r0, 0 - movs r1, 0x40 - bl SetGpuReg - movs r0, 0x2 - movs r1, 0 - bl FillWindowPixelBuffer - movs r0, 0x3 - movs r1, 0 - bl FillWindowPixelBuffer - movs r0, 0 - movs r1, 0xAA - bl FillWindowPixelBuffer - ldr r5, =gUnknown_08617E9B - movs r0, 0 - adds r1, r5, 0 - movs r2, 0 - bl GetStringWidth - adds r1, r0, 0 - movs r4, 0x78 - subs r0, r4, r1 - lsrs r1, r0, 31 - adds r0, r1 - asrs r0, 1 - lsls r2, r0, 24 - lsrs r2, 24 - ldr r6, =gUnknown_0861815B - str r6, [sp] - movs r0, 0x1 - negs r0, r0 - mov r8, r0 - str r0, [sp, 0x4] - str r5, [sp, 0x8] - movs r0, 0x2 - movs r1, 0 - movs r3, 0x3 - bl box_print - ldr r5, =gUnknown_08617E8D - movs r0, 0 - adds r1, r5, 0 - movs r2, 0 - bl GetStringWidth - adds r1, r0, 0 - subs r4, r1 - lsrs r0, r4, 31 - adds r4, r0 - asrs r4, 1 - adds r0, r4, 0 - adds r0, 0x78 - lsls r2, r0, 24 - lsrs r2, 24 - str r6, [sp] - mov r0, r8 - str r0, [sp, 0x4] - str r5, [sp, 0x8] - movs r0, 0x2 - movs r1, 0 - movs r3, 0x3 - bl box_print - movs r0, 0 - adds r1, r5, 0 - movs r2, 0 - bl GetStringWidth - adds r1, r0, 0 - movs r0, 0x70 - subs r0, r1 - lsrs r1, r0, 31 - adds r0, r1 - asrs r0, 1 - lsls r2, r0, 24 - lsrs r2, 24 - str r6, [sp] - mov r0, r8 - str r0, [sp, 0x4] - str r5, [sp, 0x8] - movs r0, 0x3 - movs r1, 0 - movs r3, 0 - bl box_print - ldr r4, =gUnknown_08617E78 - movs r0, 0x1 - adds r1, r4, 0 - movs r2, 0 - bl GetStringWidth - adds r1, r0, 0 - movs r0, 0xD0 - subs r0, r1 - lsrs r1, r0, 31 - adds r0, r1 - asrs r0, 1 - lsls r2, r0, 24 - lsrs r2, 24 - ldr r0, =gUnknown_08618158 - str r0, [sp] - mov r0, r8 - str r0, [sp, 0x4] - str r4, [sp, 0x8] - movs r0, 0 - movs r1, 0x1 - movs r3, 0x2 - bl box_print - movs r0, 0x2 - movs r1, 0x2 - bl CopyWindowToVram - movs r0, 0x3 - movs r1, 0x2 - bl CopyWindowToVram - movs r0, 0 - movs r1, 0x2 - bl CopyWindowToVram - add sp, 0x10 - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81BF5A4 - thumb_func_start sub_81BF7A4 sub_81BF7A4: @ 81BF7A4 push {r4,r5,lr} diff --git a/include/bg.h b/include/bg.h new file mode 100644 index 000000000..7a0782c1b --- /dev/null +++ b/include/bg.h @@ -0,0 +1,19 @@ +#ifndef GUARD_bg_H +#define GUARD_bg_H + +struct BgTemplate { + u32 bg:2; + u32 charBaseIndex:2; + u32 mapBaseIndex:5; + u32 screenSize:2; + u32 paletteMode:1; + u32 priority:2; + u32 baseTile:10; +}; + +void ResetBgsAndClearDma3BusyFlags(u32); +void InitBgsFromTemplates(u8, const struct BgTemplate *, u8); +u32 ChangeBgX(u8, u32, u8); +u32 ChangeBgY(u8, u32, u8); + +#endif //GUARD_bg_H diff --git a/include/gba/multiboot.h b/include/gba/multiboot.h index 61c02ec52..14b6594b2 100644 --- a/include/gba/multiboot.h +++ b/include/gba/multiboot.h @@ -18,8 +18,8 @@ struct MultiBootParam u8 response_bit; // 1d u8 client_bit; // 1e u8 reserved1; // 1f - u8 *boot_srcp; // 20 - u8 *boot_endp; // 24 + const u8 *boot_srcp; // 20 + const u8 *boot_endp; // 24 const u8 *masterp; u8 *reserved2[MULTIBOOT_NCHILD]; u32 system_work2[4]; diff --git a/include/menu.h b/include/menu.h index c8aafcb30..9a23401e0 100644 --- a/include/menu.h +++ b/include/menu.h @@ -15,4 +15,6 @@ struct MenuAction2 void (*func)(u8); }; +void box_print(u8, u8, u8, u8, const void *, s8, const u8 *); + #endif // GUARD_MENU_H diff --git a/include/text.h b/include/text.h index 73e6e5437..c61f6cc98 100644 --- a/include/text.h +++ b/include/text.h @@ -186,9 +186,9 @@ bool8 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter); bool8 TextPrinterWait(struct TextPrinter *textPrinter); void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex); u16 RenderText(struct TextPrinter *textPrinter); -u32 GetStringWidthFixedWidthFont(u8 *str, u8 fontId, u8 letterSpacing); +u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing); u32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32); -s32 GetStringWidth(u8 fontId, u8 *str, s16 letterSpacing); +u32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing); u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str); u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y); u8 GetKeypadIconTileOffset(u8 keypadIconId); diff --git a/include/window.h b/include/window.h index 36a71a1e0..20e5fefa3 100644 --- a/include/window.h +++ b/include/window.h @@ -30,7 +30,7 @@ struct Window u8 *tileData; }; -bool16 InitWindows(struct WindowTemplate *templates); +bool16 InitWindows(const struct WindowTemplate *templates); u16 AddWindow(const struct WindowTemplate *template); int AddWindowWithoutTileMap(struct WindowTemplate *template); void RemoveWindow(u8 windowId); diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index bafefaf7a..58e50e509 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -1,13 +1,16 @@ // Includes #include "global.h" -#include "multiboot.h" #include "gpu_regs.h" +#include "multiboot.h" +#include "malloc.h" +#include "bg.h" #include "main.h" #include "sprite.h" #include "task.h" #include "unknown_task.h" -#include "malloc.h" +#include "window.h" +#include "menu.h" #include "m4a.h" // Static type declarations @@ -26,7 +29,7 @@ extern berryfix_t *gUnknown_030012B8; // Static ROM declarations static void sub_81BF3DC(void); -void sub_81BF5A4(void); +static void sub_81BF5A4(void); u32 sub_81BF7A4(u8); // .rodata @@ -35,6 +38,14 @@ extern const u8 gUnknown_089A6550[0xC0]; extern const u8 gMultiBootProgram_BerryGlitchFix_Script[0x3b34]; extern const u8 gMultiBootProgram_BerryGlitchFix_Start[]; extern const u8 gMultiBootProgram_BerryGlitchFix_End[]; +extern const u8 gUnknown_08617E78[]; +extern const u8 gUnknown_08617E8D[]; +extern const u8 gUnknown_08617E9B[]; +extern const struct BgTemplate gUnknown_08618108[2]; +extern const struct WindowTemplate gUnknown_08618110[7]; +extern const u16 gUnknown_08618138[16]; +extern const u8 gUnknown_08618158[3]; +extern const u8 gUnknown_0861815B[3]; // .text @@ -121,3 +132,258 @@ static void sub_81BF3DC(void) break; } } + +#ifdef NONMATCHING +static void sub_81BF5A4(void) +{ + s32 width; + + SetGpuReg(REG_OFFSET_BG0CNT, 0x0000); + SetGpuReg(REG_OFFSET_BG1CNT, 0x0000); + SetGpuReg(REG_OFFSET_BG0HOFS, 0x0000); + SetGpuReg(REG_OFFSET_BG0VOFS, 0x0000); + SetGpuReg(REG_OFFSET_BG1HOFS, 0x0000); + SetGpuReg(REG_OFFSET_BG1VOFS, 0x0000); + SetGpuReg(REG_OFFSET_BLDCNT, 0x0000); + + DmaFill32(3, 0, VRAM, VRAM_SIZE); + DmaFill32(3, 0, OAM, OAM_SIZE); + DmaFill32(3, 0, PLTT, PLTT_SIZE); + ResetBgsAndClearDma3BusyFlags(0); + + InitBgsFromTemplates(0, gUnknown_08618108, ARRAY_COUNT(gUnknown_08618108)); + ChangeBgX(0, 0, 0); + ChangeBgY(0, 0, 0); + ChangeBgX(1, 0, 0); + ChangeBgY(1, 0, 0); + InitWindows(gUnknown_08618110); + DeactivateAllTextPrinters(); + + DmaCopy32(3, gUnknown_08618138, BG_PLTT + 0x1E0, 0x20); + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP); + FillWindowPixelBuffer(2, 0); + FillWindowPixelBuffer(3, 0); + FillWindowPixelBuffer(0, 0xAA); + +// This block is a meme among memes + width = (0x78 - GetStringWidth(0, gUnknown_08617E9B, 0)) / 2; + box_print(2, 0, width, 3, gUnknown_0861815B, -1, gUnknown_08617E9B); + width = (s32)(0x78 - GetStringWidth(0, gUnknown_08617E9B, 0)) / 2 + 0x78; + box_print(2, 0, width, 3, gUnknown_0861815B, -1, gUnknown_08617E8D); + width = (0x70 - GetStringWidth(0, gUnknown_08617E8D, 0)) / 2; + box_print(3, 0, width, 0, gUnknown_0861815B, -1, gUnknown_08617E8D); + width = (0xd0 - GetStringWidth(1, gUnknown_08617E78, 0)) / 2; + box_print(0, 1, width, 2, gUnknown_08618158, -1, gUnknown_08617E78); + + CopyWindowToVram(2, 2); + CopyWindowToVram(3, 2); + CopyWindowToVram(0, 2); +} +#else +__attribute__((naked)) static void sub_81BF5A4(void) +{ + asm(".syntax unified\n" + "\tpush {r4-r6,lr}\n" + "\tmov r6, r8\n" + "\tpush {r6}\n" + "\tsub sp, 0x10\n" + "\tmovs r0, 0x8\n" + "\tmovs r1, 0\n" + "\tbl SetGpuReg\n" + "\tmovs r0, 0xA\n" + "\tmovs r1, 0\n" + "\tbl SetGpuReg\n" + "\tmovs r0, 0x10\n" + "\tmovs r1, 0\n" + "\tbl SetGpuReg\n" + "\tmovs r0, 0x12\n" + "\tmovs r1, 0\n" + "\tbl SetGpuReg\n" + "\tmovs r0, 0x14\n" + "\tmovs r1, 0\n" + "\tbl SetGpuReg\n" + "\tmovs r0, 0x16\n" + "\tmovs r1, 0\n" + "\tbl SetGpuReg\n" + "\tmovs r0, 0x50\n" + "\tmovs r1, 0\n" + "\tbl SetGpuReg\n" + "\tmovs r1, 0\n" + "\tstr r1, [sp, 0xC]\n" + "\tldr r4, =0x040000d4\n" + "\tadd r0, sp, 0xC\n" + "\tstr r0, [r4]\n" + "\tmovs r0, 0xC0\n" + "\tlsls r0, 19\n" + "\tstr r0, [r4, 0x4]\n" + "\tldr r0, =0x85006000\n" + "\tstr r0, [r4, 0x8]\n" + "\tldr r0, [r4, 0x8]\n" + "\tstr r1, [sp, 0xC]\n" + "\tadd r0, sp, 0xC\n" + "\tstr r0, [r4]\n" + "\tmovs r0, 0xE0\n" + "\tlsls r0, 19\n" + "\tstr r0, [r4, 0x4]\n" + "\tldr r2, =0x85000100\n" + "\tstr r2, [r4, 0x8]\n" + "\tldr r0, [r4, 0x8]\n" + "\tstr r1, [sp, 0xC]\n" + "\tadd r0, sp, 0xC\n" + "\tstr r0, [r4]\n" + "\tmovs r0, 0xA0\n" + "\tlsls r0, 19\n" + "\tstr r0, [r4, 0x4]\n" + "\tstr r2, [r4, 0x8]\n" + "\tldr r0, [r4, 0x8]\n" + "\tmovs r0, 0\n" + "\tbl ResetBgsAndClearDma3BusyFlags\n" + "\tldr r1, =gUnknown_08618108\n" + "\tmovs r0, 0\n" + "\tmovs r2, 0x2\n" + "\tbl InitBgsFromTemplates\n" + "\tmovs r0, 0\n" + "\tmovs r1, 0\n" + "\tmovs r2, 0\n" + "\tbl ChangeBgX\n" + "\tmovs r0, 0\n" + "\tmovs r1, 0\n" + "\tmovs r2, 0\n" + "\tbl ChangeBgY\n" + "\tmovs r0, 0x1\n" + "\tmovs r1, 0\n" + "\tmovs r2, 0\n" + "\tbl ChangeBgX\n" + "\tmovs r0, 0x1\n" + "\tmovs r1, 0\n" + "\tmovs r2, 0\n" + "\tbl ChangeBgY\n" + "\tldr r0, =gUnknown_08618110\n" + "\tbl InitWindows\n" + "\tbl DeactivateAllTextPrinters\n" + "\tldr r0, =gUnknown_08618138\n" + "\tstr r0, [r4]\n" + "\tldr r0, =0x050001e0\n" + "\tstr r0, [r4, 0x4]\n" + "\tldr r0, =0x84000008\n" + "\tstr r0, [r4, 0x8]\n" + "\tldr r0, [r4, 0x8]\n" + "\tmovs r0, 0\n" + "\tmovs r1, 0x40\n" + "\tbl SetGpuReg\n" + "\tmovs r0, 0x2\n" + "\tmovs r1, 0\n" + "\tbl FillWindowPixelBuffer\n" + "\tmovs r0, 0x3\n" + "\tmovs r1, 0\n" + "\tbl FillWindowPixelBuffer\n" + "\tmovs r0, 0\n" + "\tmovs r1, 0xAA\n" + "\tbl FillWindowPixelBuffer\n" + "\tldr r5, =gUnknown_08617E9B\n" + "\tmovs r0, 0\n" + "\tadds r1, r5, 0\n" + "\tmovs r2, 0\n" + "\tbl GetStringWidth\n" + "\tadds r1, r0, 0\n" + "\tmovs r4, 0x78\n" + "\tsubs r0, r4, r1\n" + "\tlsrs r1, r0, 31\n" + "\tadds r0, r1\n" + "\tasrs r0, 1\n" + "\tlsls r2, r0, 24\n" + "\tlsrs r2, 24\n" + "\tldr r6, =gUnknown_0861815B\n" + "\tstr r6, [sp]\n" + "\tmovs r0, 0x1\n" + "\tnegs r0, r0\n" + "\tmov r8, r0\n" + "\tstr r0, [sp, 0x4]\n" + "\tstr r5, [sp, 0x8]\n" + "\tmovs r0, 0x2\n" + "\tmovs r1, 0\n" + "\tmovs r3, 0x3\n" + "\tbl box_print\n" + "\tldr r5, =gUnknown_08617E8D\n" + "\tmovs r0, 0\n" + "\tadds r1, r5, 0\n" + "\tmovs r2, 0\n" + "\tbl GetStringWidth\n" + "\tadds r1, r0, 0\n" + "\tsubs r4, r1\n" + "\tlsrs r0, r4, 31\n" + "\tadds r4, r0\n" + "\tasrs r4, 1\n" + "\tadds r0, r4, 0\n" + "\tadds r0, 0x78\n" + "\tlsls r2, r0, 24\n" + "\tlsrs r2, 24\n" + "\tstr r6, [sp]\n" + "\tmov r0, r8\n" + "\tstr r0, [sp, 0x4]\n" + "\tstr r5, [sp, 0x8]\n" + "\tmovs r0, 0x2\n" + "\tmovs r1, 0\n" + "\tmovs r3, 0x3\n" + "\tbl box_print\n" + "\tmovs r0, 0\n" + "\tadds r1, r5, 0\n" + "\tmovs r2, 0\n" + "\tbl GetStringWidth\n" + "\tadds r1, r0, 0\n" + "\tmovs r0, 0x70\n" + "\tsubs r0, r1\n" + "\tlsrs r1, r0, 31\n" + "\tadds r0, r1\n" + "\tasrs r0, 1\n" + "\tlsls r2, r0, 24\n" + "\tlsrs r2, 24\n" + "\tstr r6, [sp]\n" + "\tmov r0, r8\n" + "\tstr r0, [sp, 0x4]\n" + "\tstr r5, [sp, 0x8]\n" + "\tmovs r0, 0x3\n" + "\tmovs r1, 0\n" + "\tmovs r3, 0\n" + "\tbl box_print\n" + "\tldr r4, =gUnknown_08617E78\n" + "\tmovs r0, 0x1\n" + "\tadds r1, r4, 0\n" + "\tmovs r2, 0\n" + "\tbl GetStringWidth\n" + "\tadds r1, r0, 0\n" + "\tmovs r0, 0xD0\n" + "\tsubs r0, r1\n" + "\tlsrs r1, r0, 31\n" + "\tadds r0, r1\n" + "\tasrs r0, 1\n" + "\tlsls r2, r0, 24\n" + "\tlsrs r2, 24\n" + "\tldr r0, =gUnknown_08618158\n" + "\tstr r0, [sp]\n" + "\tmov r0, r8\n" + "\tstr r0, [sp, 0x4]\n" + "\tstr r4, [sp, 0x8]\n" + "\tmovs r0, 0\n" + "\tmovs r1, 0x1\n" + "\tmovs r3, 0x2\n" + "\tbl box_print\n" + "\tmovs r0, 0x2\n" + "\tmovs r1, 0x2\n" + "\tbl CopyWindowToVram\n" + "\tmovs r0, 0x3\n" + "\tmovs r1, 0x2\n" + "\tbl CopyWindowToVram\n" + "\tmovs r0, 0\n" + "\tmovs r1, 0x2\n" + "\tbl CopyWindowToVram\n" + "\tadd sp, 0x10\n" + "\tpop {r3}\n" + "\tmov r8, r3\n" + "\tpop {r4-r6}\n" + "\tpop {r0}\n" + "\tbx r0\n" + "\t.pool\n" + ".syntax divided"); +} +#endif diff --git a/src/bg.c b/src/bg.c index 8979eaecd..390a99d50 100644 --- a/src/bg.c +++ b/src/bg.c @@ -1,5 +1,6 @@ #include "global.h" #include "dma3.h" +#include "bg.h" #define DISPCNT_ALL_BG_AND_MODE_BITS 0x0F07 @@ -22,33 +23,23 @@ struct BgControl { u16 priority:2; u16 mosaic:1; u16 wraparound:1; - + u16 charBaseIndex:2; u16 mapBaseIndex:5; u16 paletteMode:1; - + u8 unknown_2; u8 unknown_3; } configs[4]; - - u16 bgVisibilityAndMode; -}; -struct BgTemplate { - u32 bg:2; - u32 charBaseIndex:2; - u32 mapBaseIndex:5; - u32 screenSize:2; - u32 paletteMode:1; - u32 priority:2; - u32 baseTile:10; + u16 bgVisibilityAndMode; }; struct BgConfig2 { u32 baseTile:10; u32 basePalette:4; u32 unk_3:18; - + void* tilemap; u32 bg_x; u32 bg_y; @@ -103,7 +94,7 @@ void ResetBgControlStructs(void) struct BgConfig* bgConfigs = &gGpuBgConfigs.configs[0]; struct BgConfig zeroedConfig = gZeroedBgControlStruct; int i; - + for (i = 0; i < 4; i++) { bgConfigs[i] = zeroedConfig; @@ -126,40 +117,40 @@ void SetBgControlAttributes(u8 bg, u8 charBaseIndex, u8 mapBaseIndex, u8 screenS { gGpuBgConfigs.configs[bg].charBaseIndex = charBaseIndex & 0x3; } - + if (mapBaseIndex != 0xFF) { gGpuBgConfigs.configs[bg].mapBaseIndex = mapBaseIndex & 0x1F; } - + if (screenSize != 0xFF) { gGpuBgConfigs.configs[bg].screenSize = screenSize & 0x3; } - + if (paletteMode != 0xFF) { gGpuBgConfigs.configs[bg].paletteMode = paletteMode; } - + if (priority != 0xFF) { gGpuBgConfigs.configs[bg].priority = priority & 0x3; } - + if (mosaic != 0xFF) { gGpuBgConfigs.configs[bg].mosaic = mosaic & 0x1; } - + if (wraparound != 0xFF) { gGpuBgConfigs.configs[bg].wraparound = wraparound; } - + gGpuBgConfigs.configs[bg].unknown_2 = 0; gGpuBgConfigs.configs[bg].unknown_3 = 0; - + gGpuBgConfigs.configs[bg].visible = 1; } } @@ -188,7 +179,7 @@ u16 GetBgControlAttribute(u8 bg, u8 attributeId) return gGpuBgConfigs.configs[bg].wraparound; } } - + return 0xFF; } @@ -196,7 +187,7 @@ u8 LoadBgVram(u8 bg, void *src, u16 size, u16 destOffset, u8 mode) { u16 offset; s8 cursor; - + if (IsInvalidBg(bg) == FALSE && gGpuBgConfigs.configs[bg].visible != FALSE) { switch (mode) @@ -211,11 +202,11 @@ u8 LoadBgVram(u8 bg, void *src, u16 size, u16 destOffset, u8 mode) cursor = -1; goto end; } - + offset = destOffset + offset; - + cursor = RequestDma3Copy(src, (void*)(offset + BG_VRAM), size, 0); - + if (cursor == -1) { return -1; @@ -225,7 +216,7 @@ u8 LoadBgVram(u8 bg, void *src, u16 size, u16 destOffset, u8 mode) { return -1; } - + end: return cursor; } @@ -242,9 +233,9 @@ void ShowBgInternal(u8 bg) (gGpuBgConfigs.configs[bg].mapBaseIndex << 8) | (gGpuBgConfigs.configs[bg].wraparound << 13) | (gGpuBgConfigs.configs[bg].screenSize << 14); - + SetGpuReg((bg << 1) + 0x8, value); - + gGpuBgConfigs.bgVisibilityAndMode |= 1 << (bg + 8); gGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS; } @@ -273,7 +264,7 @@ void SetBgAffineInternal(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, { struct BgAffineSrcData src; struct BgAffineDstData dest; - + switch (gGpuBgConfigs.bgVisibilityAndMode & 0x7) { case 1: @@ -288,7 +279,7 @@ void SetBgAffineInternal(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, default: return; } - + src.texX = srcCenterX; src.texY = srcCenterY; src.scrX = dispCenterX; @@ -296,7 +287,7 @@ void SetBgAffineInternal(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, src.sx = scaleX; src.sy = scaleY; src.alpha = rotationAngle; - + BgAffineSet(&src, &dest, 1); SetGpuReg(REG_OFFSET_BG2PA, dest.pa); @@ -326,20 +317,20 @@ void ResetBgsAndClearDma3BusyFlags(u32 leftoverFireRedLeafGreenVariable) { int i; ResetBgs(); - + for (i = 0; i < 4; i++) { gDmaBusyBitfield[i] = 0; } - + gUnneededFireRedVariable = leftoverFireRedLeafGreenVariable; } -void InitBgsFromTemplates(u8 bgMode, struct BgTemplate *templates, u8 numTemplates) +void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numTemplates) { int i; u8 bg; - + SetBgModeInternal(bgMode); ResetBgControlStructs(); @@ -355,11 +346,11 @@ void InitBgsFromTemplates(u8 bgMode, struct BgTemplate *templates, u8 numTemplat templates[i].priority, 0, 0); - + gGpuBgConfigs2[bg].baseTile = templates[i].baseTile; gGpuBgConfigs2[bg].basePalette = 0; gGpuBgConfigs2[bg].unk_3 = 0; - + gGpuBgConfigs2[bg].tilemap = NULL; gGpuBgConfigs2[bg].bg_x = 0; gGpuBgConfigs2[bg].bg_y = 0; @@ -367,10 +358,10 @@ void InitBgsFromTemplates(u8 bgMode, struct BgTemplate *templates, u8 numTemplat } } -void InitBgFromTemplate(struct BgTemplate *template) +void InitBgFromTemplate(const struct BgTemplate *template) { u8 bg = template->bg; - + if (bg < 4) { SetBgControlAttributes(bg, @@ -381,11 +372,11 @@ void InitBgFromTemplate(struct BgTemplate *template) template->priority, 0, 0); - + gGpuBgConfigs2[bg].baseTile = template->baseTile; gGpuBgConfigs2[bg].basePalette = 0; gGpuBgConfigs2[bg].unk_3 = 0; - + gGpuBgConfigs2[bg].tilemap = NULL; gGpuBgConfigs2[bg].bg_x = 0; gGpuBgConfigs2[bg].bg_y = 0; @@ -401,7 +392,7 @@ u16 LoadBgTiles(u8 bg, void* src, u16 size, u16 destOffset) { u16 tileOffset; u8 cursor; - + if (GetBgControlAttribute(bg, BG_CTRL_ATTR_PALETTEMODE) == 0) { tileOffset = (gGpuBgConfigs2[bg].baseTile + destOffset) * 0x20; @@ -410,37 +401,37 @@ u16 LoadBgTiles(u8 bg, void* src, u16 size, u16 destOffset) { tileOffset = (gGpuBgConfigs2[bg].baseTile + destOffset) * 0x40; } - + cursor = LoadBgVram(bg, src, size, tileOffset, DISPCNT_MODE_1); - + if (cursor == 0xFF) { return -1; } - + gDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); - + if (gUnneededFireRedVariable == 1) { DummiedOutFireRedLeafGreenTileAllocFunc(bg, tileOffset / 0x20, size / 0x20, 1); } - + return cursor; } u16 LoadBgTilemap(u8 bg, void *src, u16 size, u16 destOffset) { u8 cursor; - + cursor = LoadBgVram(bg, src, size, destOffset * 2, DISPCNT_MODE_2); - + if (cursor == 0xFF) { return -1; } - + gDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); - + return cursor; } @@ -448,12 +439,12 @@ u16 Unused_LoadBgPalette(u8 bg, void *src, u16 size, u16 destOffset) { u16 paletteOffset; s8 cursor; - + if (IsInvalidBg32(bg) == FALSE) { paletteOffset = (gGpuBgConfigs2[bg].basePalette * 0x20) + (destOffset * 2); cursor = RequestDma3Copy(src, (void*)(paletteOffset + BG_PLTT), size, 0); - + if (cursor == -1) { return -1; @@ -475,14 +466,14 @@ bool8 IsDma3ManagerBusyWithBgCopy(void) u8 mod; u8 div; s8 reqSpace; - + int i; - + for (i = 0; i < 0x80; i++) { div = i / 0x20; mod = i % 0x20; - + if ((gDmaBusyBitfield[div] & (1 << mod)) != FALSE) { reqSpace = CheckForSpaceForDma3Request(i); @@ -490,7 +481,7 @@ bool8 IsDma3ManagerBusyWithBgCopy(void) { return TRUE; } - + gDmaBusyBitfield[div] &= ~(1 << mod); } } @@ -634,12 +625,12 @@ u32 ChangeBgX(u8 bg, u32 value, u8 op) u8 mode; u16 temp1; u16 temp2; - + if (IsInvalidBg32(bg) != FALSE || GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) { return -1; } - + switch (op) { case 0: @@ -653,9 +644,9 @@ u32 ChangeBgX(u8 bg, u32 value, u8 op) gGpuBgConfigs2[bg].bg_x -= value; break; } - + mode = GetBgMode(); - + switch (bg) { case 0: @@ -695,7 +686,7 @@ u32 ChangeBgX(u8 bg, u32 value, u8 op) } break; } - + return gGpuBgConfigs2[bg].bg_x; } @@ -713,12 +704,12 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op) u8 mode; u16 temp1; u16 temp2; - + if (IsInvalidBg32(bg) != FALSE || GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) { return -1; } - + switch (op) { case 0: @@ -732,9 +723,9 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op) gGpuBgConfigs2[bg].bg_y -= value; break; } - + mode = GetBgMode(); - + switch (bg) { case 0: @@ -774,7 +765,7 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op) } break; } - + return gGpuBgConfigs2[bg].bg_y; } @@ -783,12 +774,12 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) u8 mode; u16 temp1; u16 temp2; - + if (IsInvalidBg32(bg) != FALSE || GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) { return -1; } - + switch (op) { case 0: @@ -802,9 +793,9 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) gGpuBgConfigs2[bg].bg_y -= value; break; } - + mode = GetBgMode(); - + switch (bg) { case 0: @@ -820,7 +811,7 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) { temp1 = gGpuBgConfigs2[2].bg_y >> 0x8; SetGpuReg_ForcedBlank(REG_OFFSET_BG2VOFS, temp1); - + } else { @@ -845,7 +836,7 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) } break; } - + return gGpuBgConfigs2[bg].bg_y; } @@ -868,13 +859,13 @@ u8 Unused_AdjustBgMosaic(u8 a1, u8 a2) u16 result; s16 test1; s16 test2; - + result = GetGpuReg(REG_OFFSET_MOSAIC); - + test1 = result & 0xF; test2 = (result >> 4) & 0xF; result &= 0xFF00; - + switch (a2) { case 0: @@ -929,12 +920,12 @@ u8 Unused_AdjustBgMosaic(u8 a1, u8 a2) } break; } - + result |= ((test2 << 0x4) & 0xF0); result |= (test1 & 0xF); - + SetGpuReg(REG_OFFSET_MOSAIC, result); - + return result; } @@ -981,7 +972,7 @@ void CopyToBgTilemapBuffer(u8 bg, void *src, u16 mode, u16 destOffset) void CopyBgTilemapBufferToVram(u8 bg) { u16 sizeToLoad; - + if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) { switch (GetBgType(bg)) @@ -1006,7 +997,7 @@ void CopyToBgTilemapBufferRect(u8 bg, void* src, u8 destX, u8 destY, u8 width, u u16 destX16; u16 destY16; u16 mode; - + if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) { switch (GetBgType(bg)) @@ -1047,11 +1038,11 @@ void CopyRectToBgTilemapBufferRect(u8 bg, void* src, u8 srcX, u8 srcY, u8 srcWid u16 attribute; u16 mode; u16 mode2; - + void* srcCopy; u16 destX16; u16 destY16; - + if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) { attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE); @@ -1336,7 +1327,7 @@ void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u16 x16; u16 y16; u16 mode; - + if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) { switch (GetBgType(bg)) @@ -1375,10 +1366,10 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt u16 mode2; u16 attribute; u16 mode3; - + u16 x16; u16 y16; - + if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) { attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE); @@ -1414,9 +1405,9 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt u16 GetBgMetricTextMode(u8 bg, u8 whichMetric) { u8 attribute; - + attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE); - + switch (whichMetric) { case 0: @@ -1462,9 +1453,9 @@ u16 GetBgMetricTextMode(u8 bg, u8 whichMetric) u32 GetBgMetricAffineMode(u8 bg, u8 whichMetric) { u8 attribute; - + attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE); - + switch (whichMetric) { case 0: @@ -1491,7 +1482,7 @@ u32 GetTileMapIndexFromCoords(s32 x, s32 y, s32 screenSize, u32 screenWidth, u32 { x = x & (screenWidth - 1); y = y & (screenHeight - 1); - + switch (screenSize) { case 0: @@ -1526,7 +1517,7 @@ void CopyTileMapEntry(u16 *src, u16 *dest, s32 palette1, u32 tileOffset, u32 pal test = ((*dest & 0xFC00) + (palette2 << 12)) | ((*src + tileOffset) & 0x3FF); break; } - + *dest = test; } #else @@ -1586,10 +1577,10 @@ _08002B3C:\n\ u32 GetBgType(u8 bg) { u8 mode; - + mode = GetBgMode(); - - + + switch (bg) { case 0: @@ -1621,7 +1612,7 @@ u32 GetBgType(u8 bg) } break; } - + return 0xFFFF; } diff --git a/src/multiboot.c b/src/multiboot.c index 80291ff46..7fd6df2d0 100644 --- a/src/multiboot.c +++ b/src/multiboot.c @@ -316,7 +316,7 @@ void MultiBootStartProbe(struct MultiBootParam *mp) mp->probe_count = 1; } -void MultiBootStartMaster(struct MultiBootParam *mp, u8 *srcp, int length, u8 palette_color, s8 palette_speed) +void MultiBootStartMaster(struct MultiBootParam *mp, const u8 *srcp, int length, u8 palette_color, s8 palette_speed) { int i = 0; diff --git a/src/text.c b/src/text.c index cad8326e3..aa4e201c0 100644 --- a/src/text.c +++ b/src/text.c @@ -2779,7 +2779,7 @@ _08005D6E:\n\ bx r1"); } -u32 GetStringWidthFixedWidthFont(u8 *str, u8 fontId, u8 letterSpacing) +u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing) { int i; u8 width; @@ -2788,7 +2788,7 @@ u32 GetStringWidthFixedWidthFont(u8 *str, u8 fontId, u8 letterSpacing) u8 line; int strPos; u8 lineWidths[8]; - u8 *strLocal; + const u8 *strLocal; for (i = 0; i < 8; i++) { @@ -2883,7 +2883,7 @@ u32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32) return 0; } -s32 GetStringWidth(u8 fontId, u8 *str, s16 letterSpacing) +u32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing) { bool8 isJapanese; int minGlyphWidth; diff --git a/src/window.c b/src/window.c index 574b13aa0..164031bee 100644 --- a/src/window.c +++ b/src/window.c @@ -35,7 +35,7 @@ static void nullsub_8(void) } -bool16 InitWindows(struct WindowTemplate *templates) +bool16 InitWindows(const struct WindowTemplate *templates) { int i; void *bgTilemapBuffer; From c253bf5e75796c462fe5e389c7e8f6040f826c0f Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 18 Sep 2017 18:36:05 +0200 Subject: [PATCH 201/342] add important headers, const ptrs and egg hatch start --- asm/battle_setup.s | 2 +- asm/cable_car.s | 2 +- asm/contest.s | 2 +- asm/daycare.s | 30 +- asm/decoration.s | 4 +- asm/egg_hatch.s | 845 +++-------------------------------- asm/field_effect.s | 28 +- asm/field_screen.s | 22 +- asm/item_menu.s | 6 +- asm/item_use.s | 6 +- asm/learn_move.s | 2 +- asm/link.s | 4 +- asm/party_menu.s | 2 +- asm/player_pc.s | 6 +- asm/pokemon_storage_system.s | 2 +- asm/rom4.s | 24 +- asm/rom6.s | 4 +- asm/roulette.s | 2 +- asm/secret_base.s | 6 +- asm/shop.s | 4 +- asm/trade.s | 2 +- asm/walda_phrase.s | 2 +- include/bg.h | 43 ++ include/dma3.h | 4 +- include/global.h | 3 +- include/gpu_regs.h | 12 + include/m4a.h | 1 + include/text.h | 2 +- include/window.h | 2 +- ld_script.txt | 1 + src/bg.c | 204 ++++----- src/dma3_manager.c | 30 +- src/egg_hatch.c | 364 +++++++++++++++ src/safari_zone.c | 4 +- src/window.c | 2 +- sym_bss.txt | 2 +- sym_common.txt | 2 +- 37 files changed, 683 insertions(+), 1000 deletions(-) create mode 100644 include/bg.h create mode 100644 include/gpu_regs.h create mode 100644 src/egg_hatch.c diff --git a/asm/battle_setup.s b/asm/battle_setup.s index 608d7843c..752e4adf1 100644 --- a/asm/battle_setup.s +++ b/asm/battle_setup.s @@ -585,7 +585,7 @@ sub_80B0AF8: @ 80B0AF8 _080B0B4C: ldr r0, =c2_exit_to_overworld_2_switch bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF6F0 str r0, [r1] _080B0B58: diff --git a/asm/cable_car.s b/asm/cable_car.s index 9307c54ff..ba228b729 100644 --- a/asm/cable_car.s +++ b/asm/cable_car.s @@ -775,7 +775,7 @@ _08150340: str r3, [r2, 0x8] ldr r0, [r2, 0x8] bl warp_in - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback str r4, [r0] ldr r0, =c2_load_new_map bl SetMainCallback2 diff --git a/asm/contest.s b/asm/contest.s index 76effb4e7..a380164cb 100644 --- a/asm/contest.s +++ b/asm/contest.s @@ -5582,7 +5582,7 @@ sub_80DA830: @ 80DA830 bne _080DA860 adds r0, r2, 0 bl DestroyTask - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_80DA874 str r1, [r0] bl FreeAllWindowBuffers diff --git a/asm/daycare.s b/asm/daycare.s index 711d63e42..282a7b22c 100644 --- a/asm/daycare.s +++ b/asm/daycare.s @@ -5,8 +5,8 @@ .text - thumb_func_start pokemon_get_nick -pokemon_get_nick: @ 806FA2C + thumb_func_start GetMonNick +GetMonNick: @ 806FA2C push {r4,lr} sub sp, 0x14 adds r4, r1, 0 @@ -20,10 +20,10 @@ pokemon_get_nick: @ 806FA2C pop {r4} pop {r1} bx r1 - thumb_func_end pokemon_get_nick + thumb_func_end GetMonNick - thumb_func_start pokemon_get_nick_ -pokemon_get_nick_: @ 806FA4C + thumb_func_start GetBoxMonNick +GetBoxMonNick: @ 806FA4C push {r4,lr} sub sp, 0x14 adds r4, r1, 0 @@ -37,7 +37,7 @@ pokemon_get_nick_: @ 806FA4C pop {r4} pop {r1} bx r1 - thumb_func_end pokemon_get_nick_ + thumb_func_end GetBoxMonNick thumb_func_start daycare_count_pokemon daycare_count_pokemon: @ 806FA6C @@ -177,7 +177,7 @@ sub_806FB38: @ 806FB38 adds r4, 0x7C adds r0, r6, 0 adds r1, r4, 0 - bl pokemon_get_nick + bl GetMonNick adds r0, r4, 0 bl StripExtCtrlCodes adds r4, 0xB @@ -376,7 +376,7 @@ sub_806FCF8: @ 806FCF8 sub sp, 0x68 adds r5, r0, 0 ldr r1, =gStringVar1 - bl pokemon_get_nick_ + bl GetBoxMonNick adds r0, r5, 0 movs r1, 0xB bl GetBoxMonData @@ -547,7 +547,7 @@ sub_806FE54: @ 806FE54 bl ConvertIntToDecimalStringN ldr r1, =gStringVar1 adds r0, r5, 0 - bl pokemon_get_nick_ + bl GetBoxMonNick adds r0, r4, 0 pop {r4,r5} pop {r1} @@ -565,7 +565,7 @@ sub_806FE88: @ 806FE88 lsrs r4, 24 ldr r1, =gStringVar1 adds r0, r5, 0 - bl pokemon_get_nick_ + bl GetBoxMonNick movs r0, 0x64 muls r4, r0 adds r4, 0x64 @@ -2280,7 +2280,7 @@ sub_8070C04: @ 8070C04 beq _08070C2E ldr r1, =gStringVar1 adds r0, r4, 0 - bl pokemon_get_nick_ + bl GetBoxMonNick adds r0, r4, 0 movs r1, 0x7 mov r2, sp @@ -2297,7 +2297,7 @@ _08070C2E: beq _08070C44 ldr r1, =gStringVar2 adds r0, r4, 0 - bl pokemon_get_nick_ + bl GetBoxMonNick _08070C44: add sp, 0xC pop {r4} @@ -2317,7 +2317,7 @@ sub_8070C58: @ 8070C58 ldr r4, =gPlayerParty adds r0, r4 ldr r1, =gStringVar1 - bl pokemon_get_nick_ + bl GetBoxMonNick bl brm_get_pokemon_selection lsls r0, 24 lsrs r0, 24 @@ -2788,7 +2788,7 @@ _08070FCC: adds r5, r1, r0 adds r0, r4, 0 adds r1, r5, 0 - bl pokemon_get_nick_ + bl GetBoxMonNick adds r0, r5, 0 adds r1, r4, 0 bl sub_8070F98 @@ -2944,7 +2944,7 @@ sub_8071110: @ 8071110 adds r5, r0 adds r0, r5, 0 mov r1, sp - bl pokemon_get_nick_ + bl GetBoxMonNick mov r0, sp adds r1, r5, 0 bl sub_8070F98 diff --git a/asm/decoration.s b/asm/decoration.s index 4efc70e04..48a76a8f9 100644 --- a/asm/decoration.s +++ b/asm/decoration.s @@ -4149,7 +4149,7 @@ _08128C30: bl sub_812A3C8 ldr r0, =0x00000be5 bl FreeSpritePaletteByTag - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_8128CD4 str r0, [r1] ldr r0, =c2_exit_to_overworld_2_switch @@ -6907,7 +6907,7 @@ _0812A280: .pool _0812A29C: bl sub_812A3C8 - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_812A334 str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch diff --git a/asm/egg_hatch.s b/asm/egg_hatch.s index d646dbb73..d97fc8c65 100644 --- a/asm/egg_hatch.s +++ b/asm/egg_hatch.s @@ -5,728 +5,9 @@ .text - thumb_func_start sub_8071348 -sub_8071348: @ 8071348 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x50 - adds r5, r0, 0 - adds r6, r1, 0 - movs r1, 0xB - bl GetMonData - lsls r0, 16 - lsrs r0, 16 - str r0, [sp, 0x3C] - movs r4, 0 - add r7, sp, 0x18 - add r0, sp, 0x30 - mov r8, r0 - movs r1, 0x31 - add r1, sp - mov r10, r1 - mov r0, sp - adds r0, 0x32 - str r0, [sp, 0x40] - mov r1, sp - adds r1, 0x34 - str r1, [sp, 0x48] - adds r0, 0x1 - str r0, [sp, 0x44] - adds r1, 0x4 - str r1, [sp, 0x4C] -_08071386: - adds r1, r4, 0 - adds r1, 0xD - adds r0, r5, 0 - bl GetMonData - lsls r1, r4, 1 - add r1, sp - adds r1, 0x10 - strh r0, [r1] - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x3 - bls _08071386 - adds r0, r5, 0 - movs r1, 0 - bl GetMonData - mov r9, r0 - movs r4, 0 -_080713AE: - adds r1, r4, 0 - adds r1, 0x27 - adds r0, r5, 0 - bl GetMonData - lsls r1, r4, 2 - adds r1, r7, r1 - str r0, [r1] - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x5 - bls _080713AE - adds r0, r5, 0 - movs r1, 0x3 - bl GetMonData - mov r1, r8 - strb r0, [r1] - adds r0, r5, 0 - movs r1, 0x25 - bl GetMonData - mov r1, r10 - strb r0, [r1] - adds r0, r5, 0 - movs r1, 0x8 - bl GetMonData - ldr r1, [sp, 0x40] - strb r0, [r1] - adds r0, r5, 0 - movs r1, 0x22 - bl GetMonData - str r0, [sp, 0x38] - adds r0, r5, 0 - movs r1, 0x50 - bl GetMonData - ldr r1, [sp, 0x48] - strb r0, [r1] - movs r0, 0x1 - str r0, [sp] - mov r0, r9 - str r0, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x8] - str r0, [sp, 0xC] - adds r0, r6, 0 - ldr r1, [sp, 0x3C] - movs r2, 0x5 - movs r3, 0x20 - bl CreateMon - movs r4, 0 -_0807141E: - adds r1, r4, 0 - adds r1, 0xD - lsls r0, r4, 1 - mov r2, sp - adds r2, r0 - adds r2, 0x10 - adds r0, r6, 0 - bl SetMonData - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x3 - bls _0807141E - movs r4, 0 -_0807143C: - adds r1, r4, 0 - adds r1, 0x27 - lsls r2, r4, 2 - adds r2, r7, r2 - adds r0, r6, 0 - bl SetMonData - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x5 - bls _0807143C - movs r0, 0x2 - mov r1, r8 - strb r0, [r1] - adds r0, r6, 0 - movs r1, 0x3 - mov r2, r8 - bl SetMonData - adds r0, r6, 0 - movs r1, 0x25 - mov r2, r10 - bl SetMonData - adds r0, r6, 0 - movs r1, 0x8 - ldr r2, [sp, 0x40] - bl SetMonData - movs r0, 0x78 - ldr r1, [sp, 0x44] - strb r0, [r1] - adds r0, r6, 0 - movs r1, 0x20 - ldr r2, [sp, 0x44] - bl SetMonData - adds r0, r6, 0 - movs r1, 0x22 - ldr r2, [sp, 0x4C] - bl SetMonData - adds r0, r6, 0 - movs r1, 0x50 - ldr r2, [sp, 0x48] - bl SetMonData - adds r0, r5, 0 - adds r1, r6, 0 - movs r2, 0x64 - bl memcpy - add sp, 0x50 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8071348 - thumb_func_start sub_80714B8 -sub_80714B8: @ 80714B8 - push {r4,r5,lr} - sub sp, 0x14 - lsls r0, 24 - lsrs r0, 24 - add r4, sp, 0xC - movs r1, 0x46 - strb r1, [r4] - movs r1, 0x64 - adds r5, r0, 0 - muls r5, r1 - ldr r0, =gPlayerParty - adds r5, r0 - ldr r1, =gEnemyParty - adds r0, r5, 0 - bl sub_8071348 - adds r0, r5, 0 - movs r1, 0x2D - adds r2, r4, 0 - bl SetMonData - adds r0, r5, 0 - movs r1, 0xB - bl GetMonData - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - mov r0, sp - adds r1, r4, 0 - bl GetSpeciesName - adds r0, r5, 0 - movs r1, 0x2 - mov r2, sp - bl SetMonData - adds r0, r4, 0 - bl SpeciesToNationalPokedexNum - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - adds r0, r4, 0 - movs r1, 0x2 - bl GetSetPokedexFlag - adds r0, r4, 0 - movs r1, 0x3 - bl GetSetPokedexFlag - ldr r1, =gStringVar1 - adds r0, r5, 0 - bl pokemon_get_nick - mov r2, sp - adds r2, 0xE - movs r0, 0x4 - strh r0, [r2] - adds r0, r5, 0 - movs r1, 0x26 - bl SetMonData - add r2, sp, 0x10 - movs r0, 0 - strh r0, [r2] - adds r0, r5, 0 - movs r1, 0x24 - bl SetMonData - bl sav1_map_get_name - mov r2, sp - adds r2, 0x12 - strb r0, [r2] - adds r0, r5, 0 - movs r1, 0x23 - bl SetMonData - adds r0, r5, 0 - bl MonRestorePP - adds r0, r5, 0 - bl CalculateMonStats - add sp, 0x14 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80714B8 - - thumb_func_start sub_8071578 -sub_8071578: @ 8071578 - push {lr} - ldr r0, =gSpecialVar_0x8004 - ldrb r0, [r0] - bl sub_80714B8 - pop {r0} - bx r0 - .pool - thumb_func_end sub_8071578 - - thumb_func_start sub_807158C -sub_807158C: @ 807158C - push {r4-r6,lr} - sub sp, 0x20 - lsls r1, 24 - lsrs r1, 24 - movs r2, 0x8C - muls r1, r2 - adds r4, r0, r1 - adds r0, r4, 0 - mov r1, sp - bl pokemon_get_nick_ - adds r0, r4, 0 - adds r0, 0x70 - ldrh r0, [r0] - cmp r0, 0 - beq _08071608 - adds r6, r4, 0 - adds r6, 0x7C - mov r0, sp - adds r1, r6, 0 - bl StringCompareWithoutExtCtrlCodes - adds r5, r4, 0 - adds r5, 0x74 - cmp r0, 0 - bne _080715CE - ldr r0, =gSaveBlock2Ptr - ldr r0, [r0] - adds r1, r5, 0 - bl StringCompareWithoutExtCtrlCodes - cmp r0, 0 - beq _08071608 -_080715CE: - ldr r0, =gStringVar1 - mov r1, sp - bl StringCopy - ldr r0, =gStringVar2 - adds r4, 0x87 - ldrb r2, [r4] - lsls r2, 28 - lsrs r2, 28 - adds r1, r5, 0 - bl sub_81DB5E8 - ldr r0, =gStringVar3 - ldrb r2, [r4] - lsrs r2, 4 - adds r1, r6, 0 - bl sub_81DB5E8 - movs r0, 0x1 - b _0807160A - .pool -_08071608: - movs r0, 0 -_0807160A: - add sp, 0x20 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_807158C - - thumb_func_start sub_8071614 -sub_8071614: @ 8071614 - push {lr} - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003030 - adds r0, r1 - ldr r1, =gSpecialVar_0x8004 - ldrb r1, [r1] - bl sub_807158C - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - .pool - thumb_func_end sub_8071614 - - thumb_func_start sub_807163C -sub_807163C: @ 807163C - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - mov r9, r3 - lsls r0, 24 - lsrs r3, r0, 24 - mov r8, r3 - lsls r1, 24 - lsrs r6, r1, 24 - lsls r2, 24 - lsrs r1, r2, 24 - adds r2, r1, 0 - movs r4, 0 - movs r7, 0 - movs r5, 0 - cmp r3, 0 - bne _0807166A - movs r0, 0x64 - muls r1, r0 - ldr r0, =gPlayerParty - adds r5, r1, r0 - movs r4, 0x1 -_0807166A: - cmp r3, 0x1 - bne _0807167A - movs r0, 0x64 - adds r1, r2, 0 - muls r1, r0 - ldr r0, =gPlayerParty - adds r5, r1, r0 - movs r4, 0x3 -_0807167A: - cmp r6, 0 - beq _08071688 - cmp r6, 0x1 - beq _080716D8 - b _08071712 - .pool -_08071688: - adds r0, r5, 0 - movs r1, 0xB - bl GetMonData - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - adds r0, r5, 0 - movs r1, 0 - bl GetMonData - adds r3, r0, 0 - lsls r0, r4, 3 - ldr r1, =gMonFrontPicTable - adds r0, r1 - ldr r1, =gBattleSpritesGfx - ldr r2, [r1] - mov r6, r8 - lsls r1, r6, 1 - adds r1, 0x1 - lsls r1, 2 - adds r2, 0x4 - adds r2, r1 - ldr r1, [r2] - adds r2, r4, 0 - bl HandleLoadSpecialPokePic_DontHandleDeoxys - adds r0, r5, 0 - bl sub_806E794 - bl LoadCompressedObjectPalette - mov r0, r9 - strh r4, [r0] - b _08071712 - .pool -_080716D8: - adds r0, r5, 0 - bl sub_806E794 - ldrh r0, [r0, 0x4] - adds r1, r4, 0 - bl sub_806A068 - ldr r0, =gUnknown_0202499C - movs r1, 0x78 - movs r2, 0x4B - movs r3, 0x6 - bl CreateSprite - lsls r0, 24 - lsrs r7, r0, 24 - ldr r4, =gSprites - lsls r1, r7, 4 - adds r1, r7 - lsls r1, 2 - adds r2, r1, r4 - adds r2, 0x3E - ldrb r0, [r2] - movs r3, 0x4 - orrs r0, r3 - strb r0, [r2] - adds r4, 0x1C - adds r1, r4 - ldr r0, =SpriteCallbackDummy - str r0, [r1] -_08071712: - adds r0, r7, 0 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_807163C - - thumb_func_start sub_807172C -sub_807172C: @ 807172C - push {lr} - bl LoadOam - bl ProcessSpriteCopyRequests - bl TransferPlttBuffer - pop {r0} - bx r0 - thumb_func_end sub_807172C - - thumb_func_start sub_8071740 -sub_8071740: @ 8071740 - push {lr} - bl ScriptContext2_Enable - ldr r0, =sub_8071760 - movs r1, 0xA - bl CreateTask - movs r0, 0x1 - movs r1, 0 - bl fade_screen - pop {r0} - bx r0 - .pool - thumb_func_end sub_8071740 - - thumb_func_start sub_8071760 -sub_8071760: @ 8071760 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08071788 - bl overworld_free_bg_tilemaps - ldr r0, =c1_hatching_egg - bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC - ldr r0, =sub_80AF168 - str r0, [r1] - adds r0, r4, 0 - bl DestroyTask -_08071788: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8071760 - - thumb_func_start c1_hatching_egg -c1_hatching_egg: @ 80717A0 - push {r4,lr} - sub sp, 0x4 - ldr r0, =gMain - movs r1, 0x87 - lsls r1, 3 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0x8 - bls _080717B4 - b _080719D6 -_080717B4: - lsls r0, 2 - ldr r1, =_080717C8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_080717C8: - .4byte _080717EC - .4byte _080718B8 - .4byte _080718D0 - .4byte _08071904 - .4byte _08071924 - .4byte _0807193C - .4byte _08071954 - .4byte _08071970 - .4byte _080719C8 -_080717EC: - movs r0, 0 - movs r1, 0 - bl SetGpuReg - ldr r4, =gUnknown_03000DE0 - movs r0, 0x14 - bl Alloc - str r0, [r4] - bl init_uns_table_pokemon_copy - ldr r2, [r4] - ldr r0, =gSpecialVar_0x8004 - ldrh r0, [r0] - movs r1, 0 - strb r0, [r2, 0x4] - ldr r0, [r4] - strb r1, [r0, 0x7] - ldr r0, =sub_807172C - bl SetVBlankCallback - bl GetCurrentMapMusic - ldr r1, =gSpecialVar_0x8005 - strh r0, [r1] - bl reset_temp_tile_data_buffers - movs r0, 0 - bl ResetBgsAndClearDma3BusyFlags - ldr r1, =gUnknown_0832C064 - movs r0, 0 - movs r2, 0x2 - bl InitBgsFromTemplates - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0x1 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - movs r0, 0 - movs r1, 0 - movs r2, 0 - bl ChangeBgX - movs r0, 0 - movs r1, 0 - movs r2, 0 - bl ChangeBgY - movs r0, 0x1 - movs r1, 0x7 - movs r2, 0x2 - bl SetBgAttribute - movs r0, 0x80 - lsls r0, 5 - bl Alloc - adds r1, r0, 0 - movs r0, 0x1 - bl SetBgTilemapBuffer - movs r0, 0x80 - lsls r0, 6 - bl Alloc - adds r1, r0, 0 - movs r0, 0 - bl SetBgTilemapBuffer - bl DeactivateAllTextPrinters - bl ResetPaletteFade - bl FreeAllSpritePalettes - bl ResetSpriteData - bl ResetTasks - bl remove_some_task - bl m4aSoundVSyncOn - b _080719A6 - .pool -_080718B8: - ldr r0, =gUnknown_0832C06C - bl InitWindows - ldr r0, =gUnknown_03000DE0 - ldr r1, [r0] - movs r0, 0 - strb r0, [r1, 0x8] - b _080719A6 - .pool -_080718D0: - ldr r1, =gUnknown_08C00000 - movs r0, 0 - str r0, [sp] - movs r2, 0 - movs r3, 0 - bl copy_decompressed_tile_data_to_vram_autofree - ldr r1, =gUnknown_08C00524 - movs r0, 0 - movs r2, 0 - movs r3, 0 - bl CopyToBgTilemapBuffer - ldr r0, =gUnknown_08C004E0 - movs r1, 0 - movs r2, 0x20 - bl LoadCompressedPalette - b _080719A6 - .pool -_08071904: - ldr r0, =gUnknown_0832BFE4 - bl LoadSpriteSheet - ldr r0, =gUnknown_0832BFEC - bl LoadSpriteSheet - ldr r0, =gUnknown_0832BFF4 - bl LoadSpritePalette - b _080719A6 - .pool -_08071924: - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r0, =gUnknown_03000DE0 - ldr r0, [r0] - ldrb r0, [r0, 0x4] - bl sub_80714B8 - b _080719A6 - .pool -_0807193C: - ldr r0, =gUnknown_03000DE0 - ldr r3, [r0] - ldrb r2, [r3, 0x4] - adds r3, 0xC - movs r0, 0 - movs r1, 0 - bl sub_807163C - b _080719A6 - .pool -_08071954: - ldr r4, =gUnknown_03000DE0 - ldr r3, [r4] - ldrb r2, [r3, 0x4] - adds r3, 0xC - movs r0, 0 - movs r1, 0x1 - bl sub_807163C - ldr r1, [r4] - strb r0, [r1, 0x1] - b _080719A6 - .pool -_08071970: - movs r1, 0x82 - lsls r1, 5 - movs r0, 0 - bl SetGpuReg - ldr r0, =gUnknown_08DD7300 - movs r1, 0x10 - movs r2, 0xA0 - bl LoadPalette - ldr r1, =gUnknown_08DD7360 - movs r2, 0xA1 - lsls r2, 5 - movs r0, 0x1 - movs r3, 0 - bl LoadBgTiles - ldr r1, =gUnknown_08331F60 - movs r2, 0x80 - lsls r2, 5 - movs r0, 0x1 - movs r3, 0 - bl CopyToBgTilemapBuffer - movs r0, 0x1 - bl CopyBgTilemapBufferToVram -_080719A6: - ldr r1, =gMain - movs r0, 0x87 - lsls r0, 3 - adds r1, r0 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _080719D6 - .pool -_080719C8: - ldr r0, =sub_8071A94 - bl SetMainCallback2 - ldr r0, =gUnknown_03000DE0 - ldr r1, [r0] - movs r0, 0 - strb r0, [r1, 0x2] -_080719D6: - bl RunTasks - bl RunTextPrinters - bl AnimateSprites - bl BuildOamBuffer - bl UpdatePaletteFade - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end c1_hatching_egg - - thumb_func_start sub_80719FC -sub_80719FC: @ 80719FC + thumb_func_start EggHatchSetMonNickname +EggHatchSetMonNickname: @ 80719FC push {lr} ldr r0, =gSpecialVar_0x8004 ldrh r1, [r0] @@ -738,7 +19,7 @@ sub_80719FC: @ 80719FC movs r1, 0x2 bl SetMonData bl sub_805F094 - ldr r0, =gUnknown_03000DE0 + ldr r0, =gEggHatchData ldr r0, [r0] bl Free ldr r0, =c2_exit_to_overworld_2_switch @@ -746,10 +27,10 @@ sub_80719FC: @ 80719FC pop {r0} bx r0 .pool - thumb_func_end sub_80719FC + thumb_func_end EggHatchSetMonNickname - thumb_func_start c3_080472E4 -c3_080472E4: @ 8071A3C + thumb_func_start Task_EggHatchPlayBGM +Task_EggHatchPlayBGM: @ 8071A3C push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 @@ -789,16 +70,16 @@ _08071A80: pop {r0} bx r0 .pool - thumb_func_end c3_080472E4 + thumb_func_end Task_EggHatchPlayBGM - thumb_func_start sub_8071A94 -sub_8071A94: @ 8071A94 + thumb_func_start CB2_EggHatch_1 +CB2_EggHatch_1: @ 8071A94 push {r4-r7,lr} mov r7, r9 mov r6, r8 push {r6,r7} sub sp, 0x8 - ldr r1, =gUnknown_03000DE0 + ldr r1, =gEggHatchData ldr r0, [r1] ldrb r0, [r0, 0x2] adds r5, r1, 0 @@ -840,7 +121,7 @@ _08071AF4: movs r2, 0x4B movs r3, 0x5 bl CreateSprite - ldr r4, =gUnknown_03000DE0 + ldr r4, =gEggHatchData ldr r1, [r4] strb r0, [r1] movs r0, 0 @@ -851,7 +132,7 @@ _08071AF4: ldrb r0, [r1, 0x2] adds r0, 0x1 strb r0, [r1, 0x2] - ldr r0, =c3_080472E4 + ldr r0, =Task_EggHatchPlayBGM movs r1, 0x5 bl CreateTask b _08071E06 @@ -899,7 +180,7 @@ _08071B7A: lsls r0, 2 adds r2, 0x1C adds r0, r2 - ldr r1, =sub_8071E34 + ldr r1, =SpriteCB_Egg_0 str r1, [r0] b _08071E06 .pool @@ -969,7 +250,7 @@ _08071C24: ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gStringVar1 - bl pokemon_get_nick + bl GetMonNick ldr r4, =gStringVar4 ldr r1, =gUnknown_085ED5A5 adds r0, r4, 0 @@ -1021,7 +302,7 @@ _08071CA4: ldr r1, =gPlayerParty adds r0, r1 ldr r1, =gStringVar1 - bl pokemon_get_nick + bl GetMonNick ldr r4, =gStringVar4 ldr r1, =gUnknown_085ED5BE adds r0, r4, 0 @@ -1079,7 +360,7 @@ _08071D36: beq _08071DC4 b _08071E06 _08071D3C: - ldr r0, =gUnknown_03000DE0 + ldr r0, =gEggHatchData mov r8, r0 ldr r0, [r0] ldrb r0, [r0, 0x4] @@ -1089,7 +370,7 @@ _08071D3C: adds r0, r5 ldr r1, =gStringVar3 mov r9, r1 - bl pokemon_get_nick + bl GetMonNick mov r1, r8 ldr r0, [r1] ldrb r0, [r0, 0x4] @@ -1117,7 +398,7 @@ _08071D3C: movs r2, 0 bl GetMonData str r0, [sp] - ldr r0, =sub_80719FC + ldr r0, =EggHatchSetMonNickname str r0, [sp, 0x4] movs r0, 0x3 mov r1, r9 @@ -1135,7 +416,7 @@ _08071DB4: movs r3, 0x10 bl BeginNormalPaletteFade _08071DC4: - ldr r0, =gUnknown_03000DE0 + ldr r0, =gEggHatchData ldr r1, [r0] _08071DC8: ldrb r0, [r1, 0x2] @@ -1151,7 +432,7 @@ _08071DD4: cmp r0, 0 bne _08071E06 bl sub_805F094 - ldr r4, =gUnknown_03000DE0 + ldr r4, =gEggHatchData ldr r0, [r4] ldrb r0, [r0, 0x8] bl RemoveWindow @@ -1177,10 +458,10 @@ _08071E06: pop {r0} bx r0 .pool - thumb_func_end sub_8071A94 + thumb_func_end CB2_EggHatch_1 - thumb_func_start sub_8071E34 -sub_8071E34: @ 8071E34 + thumb_func_start SpriteCB_Egg_0 +SpriteCB_Egg_0: @ 8071E34 push {r4,lr} adds r4, r0, 0 ldrh r0, [r4, 0x2E] @@ -1190,7 +471,7 @@ sub_8071E34: @ 8071E34 asrs r0, 16 cmp r0, 0x14 ble _08071E54 - ldr r0, =sub_8071E8C + ldr r0, =SpriteCB_Egg_1 str r0, [r4, 0x1C] movs r0, 0 strh r0, [r4, 0x2E] @@ -1216,15 +497,15 @@ _08071E54: adds r0, r4, 0 movs r1, 0x1 bl StartSpriteAnim - bl sub_8072140 + bl CreateRandomEggShardSprite _08071E84: pop {r4} pop {r0} bx r0 - thumb_func_end sub_8071E34 + thumb_func_end SpriteCB_Egg_0 - thumb_func_start sub_8071E8C -sub_8071E8C: @ 8071E8C + thumb_func_start SpriteCB_Egg_1 +SpriteCB_Egg_1: @ 8071E8C push {r4,lr} adds r4, r0, 0 ldrh r0, [r4, 0x32] @@ -1242,7 +523,7 @@ sub_8071E8C: @ 8071E8C asrs r0, 16 cmp r0, 0x14 ble _08071EBC - ldr r0, =sub_8071EF0 + ldr r0, =SpriteCB_Egg_2 str r0, [r4, 0x1C] strh r1, [r4, 0x2E] strh r1, [r4, 0x32] @@ -1272,10 +553,10 @@ _08071EE8: pop {r4} pop {r0} bx r0 - thumb_func_end sub_8071E8C + thumb_func_end SpriteCB_Egg_1 - thumb_func_start sub_8071EF0 -sub_8071EF0: @ 8071EF0 + thumb_func_start SpriteCB_Egg_2 +SpriteCB_Egg_2: @ 8071EF0 push {r4,r5,lr} adds r4, r0, 0 ldrh r0, [r4, 0x32] @@ -1293,10 +574,10 @@ sub_8071EF0: @ 8071EF0 asrs r0, 16 cmp r0, 0x26 ble _08071F5C - ldr r0, =sub_8071FA4 + ldr r0, =SpriteCB_Egg_3 str r0, [r4, 0x1C] strh r5, [r4, 0x2E] - ldr r4, =gUnknown_03000DE0 + ldr r4, =gEggHatchData ldr r0, [r4] ldrb r1, [r0, 0x4] movs r0, 0x64 @@ -1341,8 +622,8 @@ _08071F5C: adds r0, r4, 0 movs r1, 0x2 bl StartSpriteAnim - bl sub_8072140 - bl sub_8072140 + bl CreateRandomEggShardSprite + bl CreateRandomEggShardSprite _08071F90: movs r1, 0x2E ldrsh r0, [r4, r1] @@ -1354,10 +635,10 @@ _08071F9E: pop {r4,r5} pop {r0} bx r0 - thumb_func_end sub_8071EF0 + thumb_func_end SpriteCB_Egg_2 - thumb_func_start sub_8071FA4 -sub_8071FA4: @ 8071FA4 + thumb_func_start SpriteCB_Egg_3 +SpriteCB_Egg_3: @ 8071FA4 push {lr} adds r1, r0, 0 ldrh r0, [r1, 0x2E] @@ -1367,7 +648,7 @@ sub_8071FA4: @ 8071FA4 asrs r0, 16 cmp r0, 0x32 ble _08071FBE - ldr r0, =sub_8071FC8 + ldr r0, =SpriteCB_Egg_4 str r0, [r1, 0x1C] movs r0, 0 strh r0, [r1, 0x2E] @@ -1375,10 +656,10 @@ _08071FBE: pop {r0} bx r0 .pool - thumb_func_end sub_8071FA4 + thumb_func_end SpriteCB_Egg_3 - thumb_func_start sub_8071FC8 -sub_8071FC8: @ 8071FC8 + thumb_func_start SpriteCB_Egg_4 +SpriteCB_Egg_4: @ 8071FC8 push {r4,r5,lr} sub sp, 0x4 adds r5, r0, 0 @@ -1400,7 +681,7 @@ _08071FE8: bhi _08072004 movs r4, 0 _08071FF0: - bl sub_8072140 + bl CreateRandomEggShardSprite lsls r0, r4, 16 movs r1, 0x80 lsls r1, 9 @@ -1429,7 +710,7 @@ _08072004: movs r1, 0x4 orrs r0, r1 strb r0, [r2] - ldr r0, =sub_8072048 + ldr r0, =SpriteCB_Egg_5 str r0, [r5, 0x1C] strh r4, [r5, 0x2E] _08072032: @@ -1438,10 +719,10 @@ _08072032: pop {r0} bx r0 .pool - thumb_func_end sub_8071FC8 + thumb_func_end SpriteCB_Egg_4 - thumb_func_start sub_8072048 -sub_8072048: @ 8072048 + thumb_func_start SpriteCB_Egg_5 +SpriteCB_Egg_5: @ 8072048 push {r4,r5,lr} sub sp, 0x4 adds r5, r0, 0 @@ -1450,7 +731,7 @@ sub_8072048: @ 8072048 cmp r0, 0 bne _08072084 ldr r4, =gSprites - ldr r3, =gUnknown_03000DE0 + ldr r3, =gEggHatchData ldr r0, [r3] ldrb r1, [r0, 0x1] lsls r0, r1, 4 @@ -1490,7 +771,7 @@ _0807209E: cmp r0, 0x9 bgt _080720BC ldr r2, =gSprites - ldr r0, =gUnknown_03000DE0 + ldr r0, =gEggHatchData ldr r0, [r0] ldrb r1, [r0, 0x1] lsls r0, r1, 4 @@ -1516,10 +797,10 @@ _080720CA: pop {r0} bx r0 .pool - thumb_func_end sub_8072048 + thumb_func_end SpriteCB_Egg_5 - thumb_func_start sub_80720E8 -sub_80720E8: @ 80720E8 + thumb_func_start SpriteCB_EggShard +SpriteCB_EggShard: @ 80720E8 push {r4,lr} adds r2, r0, 0 ldrh r0, [r2, 0x30] @@ -1566,14 +847,14 @@ _0807213A: pop {r4} pop {r0} bx r0 - thumb_func_end sub_80720E8 + thumb_func_end SpriteCB_EggShard - thumb_func_start sub_8072140 -sub_8072140: @ 8072140 + thumb_func_start CreateRandomEggShardSprite +CreateRandomEggShardSprite: @ 8072140 push {r4-r6,lr} sub sp, 0x8 ldr r2, =gUnknown_0832C084 - ldr r0, =gUnknown_03000DE0 + ldr r0, =gEggHatchData ldr r6, [r0] ldrb r3, [r6, 0x7] lsls r0, r3, 2 @@ -1601,16 +882,16 @@ sub_8072140: @ 8072140 movs r1, 0x3C adds r2, r5, 0 adds r3, r4, 0 - bl sub_8072194 + bl CreateEggShardSprite add sp, 0x8 pop {r4-r6} pop {r0} bx r0 .pool - thumb_func_end sub_8072140 + thumb_func_end CreateRandomEggShardSprite - thumb_func_start sub_8072194 -sub_8072194: @ 8072194 + thumb_func_start CreateEggShardSprite +CreateEggShardSprite: @ 8072194 push {r4-r6,lr} mov r6, r10 mov r5, r9 @@ -1670,7 +951,7 @@ sub_8072194: @ 8072194 pop {r0} bx r0 .pool - thumb_func_end sub_8072194 + thumb_func_end CreateEggShardSprite thumb_func_start sub_8072214 sub_8072214: @ 8072214 @@ -1697,7 +978,7 @@ sub_8072214: @ 8072214 adds r0, r5, 0 movs r1, 0xFF bl FillWindowPixelBuffer - ldr r3, =gUnknown_03000DE0 + ldr r3, =gEggHatchData ldr r0, [r3] movs r2, 0 strb r2, [r0, 0xE] diff --git a/asm/field_effect.s b/asm/field_effect.s index c40098993..3e218e7db 100644 --- a/asm/field_effect.s +++ b/asm/field_effect.s @@ -1945,7 +1945,7 @@ sub_80B69DC: @ 80B69DC push {lr} ldr r0, =c2_exit_to_overworld_2_switch bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =mapldr_080842E8 str r0, [r1] pop {r0} @@ -1962,7 +1962,7 @@ mapldr_080842E8: @ 80B69FC bl CreateTask bl ScriptContext2_Enable bl player_bitmagic - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback movs r0, 0 str r0, [r1] pop {r0} @@ -2012,7 +2012,7 @@ _080B6A64: bl warp_in ldr r0, =c2_load_new_map bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =mapldr_08084390 str r0, [r1] adds r0, r5, 0 @@ -2058,7 +2058,7 @@ mapldr_08084390: @ 80B6AA4 _080B6AE6: bl ScriptContext2_Enable bl player_bitmagic - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback movs r0, 0 str r0, [r1] pop {r4} @@ -2120,7 +2120,7 @@ sub_80B6B68: @ 80B6B68 ldr r0, =sub_80B6B94 movs r1, 0 bl CreateTask - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback movs r0, 0 str r0, [r1] pop {r0} @@ -2761,7 +2761,7 @@ sub_80B7060: @ 80B7060 bne _080B709C bl sub_80E1570 bl warp_in - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80B70B4 str r0, [r1] ldr r0, =c2_load_new_map @@ -2786,7 +2786,7 @@ sub_80B70B4: @ 80B70B4 ldr r0, =sub_80B70DC movs r1, 0 bl CreateTask - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback movs r0, 0 str r0, [r1] pop {r0} @@ -3727,7 +3727,7 @@ sub_80B7814: @ 80B7814 cmp r0, 0x1 bne _080B784C bl warp_in - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =mapldr_080851BC str r0, [r1] ldr r0, =c2_load_new_map @@ -3750,7 +3750,7 @@ mapldr_080851BC: @ 80B7868 bl sub_8085784 bl pal_fill_for_maplights bl ScriptContext2_Enable - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback movs r1, 0 str r1, [r0] ldr r0, =sub_80B7890 @@ -4202,7 +4202,7 @@ sub_80B7BF4: @ 80B7BF4 cmp r0, 0x1 bne _080B7C2C bl warp_in - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80B6B68 str r0, [r1] ldr r0, =c2_load_new_map @@ -4399,7 +4399,7 @@ _080B7D86: bl FieldObjectSetDirection bl sub_8084E14 bl warp_in - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =mapldr_080859D4 str r0, [r1] ldr r0, =c2_load_new_map @@ -4462,7 +4462,7 @@ mapldr_080859D4: @ 80B7E48 bl pal_fill_for_maplights bl ScriptContext2_Enable bl player_bitmagic - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback movs r0, 0 str r0, [r1] ldr r2, =gMapObjects @@ -4885,7 +4885,7 @@ _080B81B8: bl warp_in ldr r0, =c2_load_new_map bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =mapldr_08085D88 str r0, [r1] ldr r0, =sub_80B7FDC @@ -4907,7 +4907,7 @@ mapldr_08085D88: @ 80B8200 bl pal_fill_for_maplights bl ScriptContext2_Enable bl player_bitmagic - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback movs r0, 0 str r0, [r1] ldr r2, =gMapObjects diff --git a/asm/field_screen.s b/asm/field_screen.s index e30408654..13f418f17 100644 --- a/asm/field_screen.s +++ b/asm/field_screen.s @@ -8725,7 +8725,7 @@ sub_80AF734: @ 80AF734 bl play_some_sound movs r0, 0x9 bl PlaySE - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =mapldr_default str r1, [r0] ldr r0, =sub_80AFA0C @@ -8743,7 +8743,7 @@ sp13E_warp_to_last_warp: @ 80AF76C bl music_something bl sub_80AF0B4 bl play_some_sound - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =mapldr_default str r1, [r0] ldr r0, =sub_80AFA0C @@ -8763,7 +8763,7 @@ sub_80AF79C: @ 80AF79C movs r1, 0x8 bl fade_screen bl play_some_sound - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_80AF3B0 str r1, [r0] ldr r0, =sub_80AFA0C @@ -8778,7 +8778,7 @@ sub_80AF79C: @ 80AF79C sub_80AF7D0: @ 80AF7D0 push {lr} bl ScriptContext2_Enable - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =mapldr_default str r1, [r0] ldr r0, =sub_80AFA88 @@ -8793,7 +8793,7 @@ sub_80AF7D0: @ 80AF7D0 sp13F_fall_to_last_warp: @ 80AF7F4 push {lr} bl sp13E_warp_to_last_warp - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80B6B68 str r0, [r1] pop {r0} @@ -8847,7 +8847,7 @@ sub_80AF848: @ 80AF848 ldr r0, =sub_80AFA0C movs r1, 0xA bl CreateTask - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF3E8 str r0, [r1] pop {r0} @@ -8869,7 +8869,7 @@ sub_80AF87C: @ 80AF87C ldr r0, =sub_80AFA0C movs r1, 0xA bl CreateTask - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF40C str r0, [r1] pop {r0} @@ -8885,7 +8885,7 @@ sub_80AF8B8: @ 80AF8B8 ldr r0, =sub_80AFA0C movs r1, 0xA bl CreateTask - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80FB768 str r0, [r1] pop {r0} @@ -9328,7 +9328,7 @@ sub_80AFC60: @ 80AFC60 bl play_some_sound movs r0, 0x9 bl PlaySE - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_80AF3C8 str r1, [r0] ldr r0, =task0A_fade_n_map_maybe @@ -10078,7 +10078,7 @@ sub_80B0244: @ 80B0244 ldr r0, =sub_80AFA0C movs r1, 0xA bl CreateTask - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF3E8 str r0, [r1] pop {r0} @@ -10090,7 +10090,7 @@ sub_80B0244: @ 80B0244 sub_80B0268: @ 80B0268 push {lr} bl ScriptContext2_Enable - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =mapldr_default str r1, [r0] ldr r0, =sub_80B01BC diff --git a/asm/item_menu.s b/asm/item_menu.s index 914fdf2b3..f3eefb7b9 100755 --- a/asm/item_menu.s +++ b/asm/item_menu.s @@ -5744,7 +5744,7 @@ unknown_ItemMenu_Show: @ 81ADE38 thumb_func_start bag_menu_leave_maybe_3 bag_menu_leave_maybe_3: @ 81ADE6C push {lr} - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_819FA50 str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch @@ -5779,7 +5779,7 @@ unknown_ItemMenu_Give2: @ 81ADE8C thumb_func_start bag_menu_leave_maybe_2 bag_menu_leave_maybe_2: @ 81ADEBC push {lr} - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_818DEF4 str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch @@ -5810,7 +5810,7 @@ unknown_ItemMenu_Confirm2: @ 81ADEDC thumb_func_start bag_menu_leave_maybe bag_menu_leave_maybe: @ 81ADF00 push {lr} - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_818E564 str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch diff --git a/asm/item_use.s b/asm/item_use.s index a2488b6df..f3086ae5f 100644 --- a/asm/item_use.s +++ b/asm/item_use.s @@ -77,7 +77,7 @@ SetUpItemUseOnFieldCallback: @ 80FD0DC ldrsh r0, [r0, r1] cmp r0, 0x1 beq _080FD110 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =MapPostLoadHook_UseItem str r0, [r1] adds r0, r2, 0 @@ -1477,7 +1477,7 @@ _080FDB98: b _080FDBDA .pool _080FDBC8: - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_80AF6D4 str r1, [r0] movs r0, 0x1 @@ -1630,7 +1630,7 @@ sub_80FDD10: @ 80FDD10 ldr r1, =gUnknown_0203A0F4 ldr r0, =sub_80FDD74 str r0, [r1] - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =MapPostLoadHook_UseItem str r0, [r1] ldr r0, =gUnknown_0203CE54 diff --git a/asm/learn_move.s b/asm/learn_move.s index c2ef76350..2fd4a3a33 100755 --- a/asm/learn_move.s +++ b/asm/learn_move.s @@ -49,7 +49,7 @@ sub_8160664: @ 8160664 bne _08160688 ldr r0, =sub_81606A0 bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF168 str r0, [r1] adds r0, r4, 0 diff --git a/asm/link.s b/asm/link.s index 9ee94412d..42d24b53d 100644 --- a/asm/link.s +++ b/asm/link.s @@ -24689,7 +24689,7 @@ _08016502: ldr r1, =gUnknown_02022C40 movs r0, 0x1 strh r0, [r1] - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF128 str r0, [r1] ldr r1, =c2_exit_to_overworld_2_switch @@ -24987,7 +24987,7 @@ _0801677E: lsls r0, 22 lsrs r0, 22 strh r0, [r2] - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF128 str r0, [r1] ldr r1, =c2_exit_to_overworld_2_switch diff --git a/asm/party_menu.s b/asm/party_menu.s index cf00d63c1..5d5783116 100755 --- a/asm/party_menu.s +++ b/asm/party_menu.s @@ -17478,7 +17478,7 @@ sub_81B968C: @ 81B968C str r0, [sp] movs r0, 0x3 bl sub_81BF8EC - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF168 str r0, [r1] add sp, 0x4 diff --git a/asm/player_pc.s b/asm/player_pc.s index 7f4ab354c..8cf0ee332 100644 --- a/asm/player_pc.s +++ b/asm/player_pc.s @@ -583,7 +583,7 @@ _0816B310: thumb_func_start sub_816B31C sub_816B31C: @ 816B31C push {lr} - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =mapldr_080EBC0C str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch @@ -1276,7 +1276,7 @@ _0816B8E6: thumb_func_start sub_816B900 sub_816B900: @ 816B900 push {lr} - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =pal_fill_for_maplights_or_black str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch @@ -1535,7 +1535,7 @@ _0816BB1C: thumb_func_start sub_816BB28 sub_816BB28: @ 816BB28 push {lr} - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_816BB48 str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch diff --git a/asm/pokemon_storage_system.s b/asm/pokemon_storage_system.s index df90540e8..3aca5c92d 100755 --- a/asm/pokemon_storage_system.s +++ b/asm/pokemon_storage_system.s @@ -870,7 +870,7 @@ sub_80C7678: @ 80C7678 bl sub_80CAEA0 ldr r1, =gUnknown_02039D00 strb r0, [r1] - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =mapldr_0808C6D8 str r0, [r1] ldr r0, =c2_exit_to_overworld_2_switch diff --git a/asm/rom4.s b/asm/rom4.s index 9e4e9f108..4ec39325e 100644 --- a/asm/rom4.s +++ b/asm/rom4.s @@ -3136,12 +3136,12 @@ map_post_load_hook_exec: @ 8085EA0 _08085EBC: movs r1, 0 str r1, [r4] - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback str r1, [r0] b _08085EEA .pool _08085ECC: - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r0, [r0] cmp r0, 0 beq _08085EE0 @@ -3151,7 +3151,7 @@ _08085ECC: _08085EE0: bl mapldr_default _08085EE4: - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback movs r0, 0 str r0, [r1] _08085EEA: @@ -3174,7 +3174,7 @@ CB2_NewGame: @ 8085EF8 bl PlayTimeCounter_Start bl ScriptContext1_Init bl ScriptContext2_Disable - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80FB4E0 str r0, [r1] ldr r1, =gUnknown_03005DB0 @@ -3214,7 +3214,7 @@ c2_whiteout: @ 8085F58 bl player_avatar_init_params_reset bl ScriptContext1_Init bl ScriptContext2_Disable - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF3C8 str r0, [r1] mov r1, sp @@ -3304,7 +3304,7 @@ _08086062: sub_8086074: @ 8086074 push {lr} bl sub_808631C - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_80AF314 str r1, [r0] ldr r0, =c2_80567AC @@ -3399,12 +3399,12 @@ c2_8056854: @ 8086140 ldrb r0, [r0] cmp r0, 0 beq _08086174 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF314 b _08086178 .pool _08086174: - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF214 _08086178: str r0, [r1] @@ -3433,7 +3433,7 @@ sub_8086194: @ 8086194 sub_80861B0: @ 80861B0 push {lr} bl sub_808631C - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF188 str r0, [r1] bl c2_exit_to_overworld_2_switch @@ -3446,7 +3446,7 @@ sub_80861B0: @ 80861B0 c2_exit_to_overworld_1_continue_scripts_restart_music: @ 80861CC push {lr} bl sub_808631C - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF168 str r0, [r1] bl c2_exit_to_overworld_2_switch @@ -3459,7 +3459,7 @@ c2_exit_to_overworld_1_continue_scripts_restart_music: @ 80861CC sub_80861E8: @ 80861E8 push {lr} bl sub_808631C - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF3C8 str r0, [r1] bl c2_exit_to_overworld_2_switch @@ -3562,7 +3562,7 @@ _080862BE: .pool _080862F4: bl sub_80EDB44 - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_8086204 str r1, [r0] ldr r0, =c1_overworld diff --git a/asm/rom6.s b/asm/rom6.s index c5e0265a0..1b1be36c7 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -1984,7 +1984,7 @@ sub_8136524: @ 8136524 lsrs r0, 24 cmp r0, 0x1 bhi _0813655A - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF168 str r0, [r1] _0813655A: @@ -4651,7 +4651,7 @@ sub_8137C3C: @ 8137C3C push {lr} ldr r0, =c2_exit_to_overworld_2_switch bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =mapldr_080CA5C0 str r0, [r1] pop {r0} diff --git a/asm/roulette.s b/asm/roulette.s index 5742e089f..009f30717 100644 --- a/asm/roulette.s +++ b/asm/roulette.s @@ -3273,7 +3273,7 @@ sub_8141E7C: @ 8141E7C bl ResetPaletteFade bl ResetSpriteData bl sub_8140418 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF168 str r0, [r1] ldr r0, =c2_exit_to_overworld_2_switch diff --git a/asm/secret_base.s b/asm/secret_base.s index 2188e634d..2e87a7419 100644 --- a/asm/secret_base.s +++ b/asm/secret_base.s @@ -686,7 +686,7 @@ _080E900C: _080E9030: bl sub_80E8F9C bl warp_in - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =sub_80AF168 str r1, [r0] ldr r0, =c2_load_new_map @@ -863,7 +863,7 @@ sub_80E916C: @ 80E916C adds r0, r5, 0 bl warp1_set bl warp_in - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80E9108 str r0, [r1] ldr r0, =c2_load_new_map @@ -1486,7 +1486,7 @@ _080E96F4: movs r0, 0x7E bl copy_saved_warp2_bank_and_enter_x_to_warp1 bl warp_in - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =mapldr_default str r1, [r0] ldr r0, =c2_load_new_map diff --git a/asm/shop.s b/asm/shop.s index 9e03399fc..c79250a43 100644 --- a/asm/shop.s +++ b/asm/shop.s @@ -227,7 +227,7 @@ HandleShopMenuSell: @ 80DFC0C @ int CB2_ExitSellMenu() CB2_ExitSellMenu: @ 80DFC48 push {lr} - ldr r0, =gUnknown_03005DAC + ldr r0, =gFieldCallback ldr r1, =MapPostLoadHook_ExitBuyOrSellMenu str r1, [r0] ldr r0, =c2_exit_to_overworld_2_switch @@ -2668,7 +2668,7 @@ ExitBuyMenu: @ 80E1168 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =MapPostLoadHook_ExitBuyOrSellMenu str r0, [r1] movs r0, 0x1 diff --git a/asm/trade.s b/asm/trade.s index 3f9323971..bfe1695f9 100644 --- a/asm/trade.s +++ b/asm/trade.s @@ -14195,7 +14195,7 @@ sub_807F110: @ 807F110 bne _0807F134 ldr r0, =sub_807B270 bl SetMainCallback2 - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF168 str r0, [r1] adds r0, r4, 0 diff --git a/asm/walda_phrase.s b/asm/walda_phrase.s index 2f1f7da60..dd5f30049 100755 --- a/asm/walda_phrase.s +++ b/asm/walda_phrase.s @@ -70,7 +70,7 @@ _081D9A68: adds r1, r0, 0 adds r0, r4, 0 bl StringCopy - ldr r1, =gUnknown_03005DAC + ldr r1, =gFieldCallback ldr r0, =sub_80AF168 str r0, [r1] ldr r0, =c2_exit_to_overworld_2_switch diff --git a/include/bg.h b/include/bg.h new file mode 100644 index 000000000..ca21070e0 --- /dev/null +++ b/include/bg.h @@ -0,0 +1,43 @@ +#ifndef GUARD_BG_H +#define GUARD_BG_H + +enum +{ + BG_CTRL_ATTR_VISIBLE = 1, + BG_CTRL_ATTR_CHARBASEINDEX = 2, + BG_CTRL_ATTR_MAPBASEINDEX = 3, + BG_CTRL_ATTR_SCREENSIZE = 4, + BG_CTRL_ATTR_PALETTEMODE = 5, + BG_CTRL_ATTR_PRIORITY = 6, + BG_CTRL_ATTR_MOSAIC = 7, + BG_CTRL_ATTR_WRAPAROUND = 8, +}; + +struct BgTemplate +{ + u32 bg:2; + u32 charBaseIndex:2; + u32 mapBaseIndex:5; + u32 screenSize:2; + u32 paletteMode:1; + u32 priority:2; + u32 baseTile:10; +}; + +void ResetBgsAndClearDma3BusyFlags(u32 leftoverFireRedLeafGreenVariable); +void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numTemplates); +void SetBgAttribute(u8 bg, u8 attributeId, u8 value); +u16 GetBgAttribute(u8 bg, u8 attributeId); +u32 ChangeBgX(u8 bg, u32 value, u8 op); +u32 GetBgX(u8 bg); +u32 ChangeBgY(u8 bg, u32 value, u8 op); +u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op); +u32 GetBgY(u8 bg); +void SetBgAffine(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle); +void SetBgTilemapBuffer(u8 bg, void *tilemap); +void UnsetBgTilemapBuffer(u8 bg); +void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset); +void CopyBgTilemapBufferToVram(u8 bg); +u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset); + +#endif // GUARD_BG_H diff --git a/include/dma3.h b/include/dma3.h index beb00745d..ea3171662 100644 --- a/include/dma3.h +++ b/include/dma3.h @@ -6,7 +6,7 @@ extern u8 gDma3RequestCursor; struct DmaRequestsStruct { - /* 0x00 */ u8 *src; + /* 0x00 */ const u8 *src; /* 0x04 */ u8 *dest; /* 0x08 */ u16 size; /* 0x0A */ u16 mode; @@ -17,7 +17,7 @@ extern struct DmaRequestsStruct gDma3Requests[128]; void ClearDma3Requests(void); void ProcessDma3Requests(void); -int RequestDma3Copy(void *src, void *dest, u16 size, u8 mode); +int RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode); int RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode); #endif diff --git a/include/global.h b/include/global.h index e694a5974..f4b2a8349 100644 --- a/include/global.h +++ b/include/global.h @@ -639,7 +639,8 @@ struct DaycareMon struct MailStruct mail; u8 OT_name[OT_NAME_LENGTH + 1]; u8 monName[11]; - u8 language; + u8 language_maybe : 4; + u8 unknown : 4; u32 stepsTaken; }; diff --git a/include/gpu_regs.h b/include/gpu_regs.h new file mode 100644 index 000000000..684578f43 --- /dev/null +++ b/include/gpu_regs.h @@ -0,0 +1,12 @@ +#ifndef GUARD_GPU_REGS_H +#define GUARD_GPU_REGS_H + +void SetGpuReg(u8 regOffset, u16 value); +void SetGpuReg_ForcedBlank(u8 regOffset, u16 value); +u16 GetGpuReg(u8 regOffset); +void SetGpuRegBits(u8 regOffset, u16 mask); +void ClearGpuRegBits(u8 regOffset, u16 mask); +void EnableInterrupts(u16 mask); +void DisableInterrupts(u16 mask); + +#endif // GUARD_GPU_REGS_H diff --git a/include/m4a.h b/include/m4a.h index b6c8f9072..8c3380dd8 100644 --- a/include/m4a.h +++ b/include/m4a.h @@ -4,6 +4,7 @@ #include "gba/m4a_internal.h" void m4aSoundVSync(void); +void m4aSoundVSyncOn(void); void m4aSoundInit(void); void m4aSoundMain(void); diff --git a/include/text.h b/include/text.h index 73e6e5437..5aadaac32 100644 --- a/include/text.h +++ b/include/text.h @@ -155,7 +155,7 @@ extern u8 gStringVar3[]; extern u8 gStringVar4[]; void SetFontsPointer(const struct FontInfo *fonts); -void DeactivateAllTextPrinters (void); +void DeactivateAllTextPrinters(void); u16 PrintTextOnWindow(u8 windowId, u8 fontId, u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextSubPrinter *, u16)); bool16 AddTextPrinter(struct TextSubPrinter *textSubPrinter, u8 speed, void (*callback)(struct TextSubPrinter *, u16)); void RunTextPrinters(void); diff --git a/include/window.h b/include/window.h index 36a71a1e0..20e5fefa3 100644 --- a/include/window.h +++ b/include/window.h @@ -30,7 +30,7 @@ struct Window u8 *tileData; }; -bool16 InitWindows(struct WindowTemplate *templates); +bool16 InitWindows(const struct WindowTemplate *templates); u16 AddWindow(const struct WindowTemplate *template); int AddWindowWithoutTileMap(struct WindowTemplate *template); void RemoveWindow(u8 windowId); diff --git a/ld_script.txt b/ld_script.txt index d6b3953fe..9b0384427 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -80,6 +80,7 @@ SECTIONS { src/util.o(.text); src/blend_palette.o(.text); asm/daycare.o(.text); + src/egg_hatch.o(.text); asm/egg_hatch.o(.text); asm/battle_interface.o(.text); asm/smokescreen.o(.text); diff --git a/src/bg.c b/src/bg.c index 8979eaecd..9f6d12062 100644 --- a/src/bg.c +++ b/src/bg.c @@ -1,19 +1,9 @@ #include "global.h" +#include "bg.h" #include "dma3.h" #define DISPCNT_ALL_BG_AND_MODE_BITS 0x0F07 -enum { - BG_CTRL_ATTR_VISIBLE = 1, - BG_CTRL_ATTR_CHARBASEINDEX = 2, - BG_CTRL_ATTR_MAPBASEINDEX = 3, - BG_CTRL_ATTR_SCREENSIZE = 4, - BG_CTRL_ATTR_PALETTEMODE = 5, - BG_CTRL_ATTR_PRIORITY = 6, - BG_CTRL_ATTR_MOSAIC = 7, - BG_CTRL_ATTR_WRAPAROUND = 8, -}; - struct BgControl { struct BgConfig { u16 visible:1; @@ -22,33 +12,23 @@ struct BgControl { u16 priority:2; u16 mosaic:1; u16 wraparound:1; - + u16 charBaseIndex:2; u16 mapBaseIndex:5; u16 paletteMode:1; - + u8 unknown_2; u8 unknown_3; } configs[4]; - - u16 bgVisibilityAndMode; -}; -struct BgTemplate { - u32 bg:2; - u32 charBaseIndex:2; - u32 mapBaseIndex:5; - u32 screenSize:2; - u32 paletteMode:1; - u32 priority:2; - u32 baseTile:10; + u16 bgVisibilityAndMode; }; struct BgConfig2 { u32 baseTile:10; u32 basePalette:4; u32 unk_3:18; - + void* tilemap; u32 bg_x; u32 bg_y; @@ -103,7 +83,7 @@ void ResetBgControlStructs(void) struct BgConfig* bgConfigs = &gGpuBgConfigs.configs[0]; struct BgConfig zeroedConfig = gZeroedBgControlStruct; int i; - + for (i = 0; i < 4; i++) { bgConfigs[i] = zeroedConfig; @@ -126,40 +106,40 @@ void SetBgControlAttributes(u8 bg, u8 charBaseIndex, u8 mapBaseIndex, u8 screenS { gGpuBgConfigs.configs[bg].charBaseIndex = charBaseIndex & 0x3; } - + if (mapBaseIndex != 0xFF) { gGpuBgConfigs.configs[bg].mapBaseIndex = mapBaseIndex & 0x1F; } - + if (screenSize != 0xFF) { gGpuBgConfigs.configs[bg].screenSize = screenSize & 0x3; } - + if (paletteMode != 0xFF) { gGpuBgConfigs.configs[bg].paletteMode = paletteMode; } - + if (priority != 0xFF) { gGpuBgConfigs.configs[bg].priority = priority & 0x3; } - + if (mosaic != 0xFF) { gGpuBgConfigs.configs[bg].mosaic = mosaic & 0x1; } - + if (wraparound != 0xFF) { gGpuBgConfigs.configs[bg].wraparound = wraparound; } - + gGpuBgConfigs.configs[bg].unknown_2 = 0; gGpuBgConfigs.configs[bg].unknown_3 = 0; - + gGpuBgConfigs.configs[bg].visible = 1; } } @@ -188,15 +168,15 @@ u16 GetBgControlAttribute(u8 bg, u8 attributeId) return gGpuBgConfigs.configs[bg].wraparound; } } - + return 0xFF; } -u8 LoadBgVram(u8 bg, void *src, u16 size, u16 destOffset, u8 mode) +u8 LoadBgVram(u8 bg, const void *src, u16 size, u16 destOffset, u8 mode) { u16 offset; s8 cursor; - + if (IsInvalidBg(bg) == FALSE && gGpuBgConfigs.configs[bg].visible != FALSE) { switch (mode) @@ -211,11 +191,11 @@ u8 LoadBgVram(u8 bg, void *src, u16 size, u16 destOffset, u8 mode) cursor = -1; goto end; } - + offset = destOffset + offset; - + cursor = RequestDma3Copy(src, (void*)(offset + BG_VRAM), size, 0); - + if (cursor == -1) { return -1; @@ -225,7 +205,7 @@ u8 LoadBgVram(u8 bg, void *src, u16 size, u16 destOffset, u8 mode) { return -1; } - + end: return cursor; } @@ -242,9 +222,9 @@ void ShowBgInternal(u8 bg) (gGpuBgConfigs.configs[bg].mapBaseIndex << 8) | (gGpuBgConfigs.configs[bg].wraparound << 13) | (gGpuBgConfigs.configs[bg].screenSize << 14); - + SetGpuReg((bg << 1) + 0x8, value); - + gGpuBgConfigs.bgVisibilityAndMode |= 1 << (bg + 8); gGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS; } @@ -273,7 +253,7 @@ void SetBgAffineInternal(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, { struct BgAffineSrcData src; struct BgAffineDstData dest; - + switch (gGpuBgConfigs.bgVisibilityAndMode & 0x7) { case 1: @@ -288,7 +268,7 @@ void SetBgAffineInternal(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, default: return; } - + src.texX = srcCenterX; src.texY = srcCenterY; src.scrX = dispCenterX; @@ -296,7 +276,7 @@ void SetBgAffineInternal(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, src.sx = scaleX; src.sy = scaleY; src.alpha = rotationAngle; - + BgAffineSet(&src, &dest, 1); SetGpuReg(REG_OFFSET_BG2PA, dest.pa); @@ -326,20 +306,20 @@ void ResetBgsAndClearDma3BusyFlags(u32 leftoverFireRedLeafGreenVariable) { int i; ResetBgs(); - + for (i = 0; i < 4; i++) { gDmaBusyBitfield[i] = 0; } - + gUnneededFireRedVariable = leftoverFireRedLeafGreenVariable; } -void InitBgsFromTemplates(u8 bgMode, struct BgTemplate *templates, u8 numTemplates) +void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numTemplates) { int i; u8 bg; - + SetBgModeInternal(bgMode); ResetBgControlStructs(); @@ -355,11 +335,11 @@ void InitBgsFromTemplates(u8 bgMode, struct BgTemplate *templates, u8 numTemplat templates[i].priority, 0, 0); - + gGpuBgConfigs2[bg].baseTile = templates[i].baseTile; gGpuBgConfigs2[bg].basePalette = 0; gGpuBgConfigs2[bg].unk_3 = 0; - + gGpuBgConfigs2[bg].tilemap = NULL; gGpuBgConfigs2[bg].bg_x = 0; gGpuBgConfigs2[bg].bg_y = 0; @@ -370,7 +350,7 @@ void InitBgsFromTemplates(u8 bgMode, struct BgTemplate *templates, u8 numTemplat void InitBgFromTemplate(struct BgTemplate *template) { u8 bg = template->bg; - + if (bg < 4) { SetBgControlAttributes(bg, @@ -381,11 +361,11 @@ void InitBgFromTemplate(struct BgTemplate *template) template->priority, 0, 0); - + gGpuBgConfigs2[bg].baseTile = template->baseTile; gGpuBgConfigs2[bg].basePalette = 0; gGpuBgConfigs2[bg].unk_3 = 0; - + gGpuBgConfigs2[bg].tilemap = NULL; gGpuBgConfigs2[bg].bg_x = 0; gGpuBgConfigs2[bg].bg_y = 0; @@ -397,11 +377,11 @@ void SetBgMode(u8 bgMode) SetBgModeInternal(bgMode); } -u16 LoadBgTiles(u8 bg, void* src, u16 size, u16 destOffset) +u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset) { u16 tileOffset; u8 cursor; - + if (GetBgControlAttribute(bg, BG_CTRL_ATTR_PALETTEMODE) == 0) { tileOffset = (gGpuBgConfigs2[bg].baseTile + destOffset) * 0x20; @@ -410,37 +390,37 @@ u16 LoadBgTiles(u8 bg, void* src, u16 size, u16 destOffset) { tileOffset = (gGpuBgConfigs2[bg].baseTile + destOffset) * 0x40; } - + cursor = LoadBgVram(bg, src, size, tileOffset, DISPCNT_MODE_1); - + if (cursor == 0xFF) { return -1; } - + gDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); - + if (gUnneededFireRedVariable == 1) { DummiedOutFireRedLeafGreenTileAllocFunc(bg, tileOffset / 0x20, size / 0x20, 1); } - + return cursor; } u16 LoadBgTilemap(u8 bg, void *src, u16 size, u16 destOffset) { u8 cursor; - + cursor = LoadBgVram(bg, src, size, destOffset * 2, DISPCNT_MODE_2); - + if (cursor == 0xFF) { return -1; } - + gDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); - + return cursor; } @@ -448,12 +428,12 @@ u16 Unused_LoadBgPalette(u8 bg, void *src, u16 size, u16 destOffset) { u16 paletteOffset; s8 cursor; - + if (IsInvalidBg32(bg) == FALSE) { paletteOffset = (gGpuBgConfigs2[bg].basePalette * 0x20) + (destOffset * 2); cursor = RequestDma3Copy(src, (void*)(paletteOffset + BG_PLTT), size, 0); - + if (cursor == -1) { return -1; @@ -475,14 +455,14 @@ bool8 IsDma3ManagerBusyWithBgCopy(void) u8 mod; u8 div; s8 reqSpace; - + int i; - + for (i = 0; i < 0x80; i++) { div = i / 0x20; mod = i % 0x20; - + if ((gDmaBusyBitfield[div] & (1 << mod)) != FALSE) { reqSpace = CheckForSpaceForDma3Request(i); @@ -490,7 +470,7 @@ bool8 IsDma3ManagerBusyWithBgCopy(void) { return TRUE; } - + gDmaBusyBitfield[div] &= ~(1 << mod); } } @@ -634,12 +614,12 @@ u32 ChangeBgX(u8 bg, u32 value, u8 op) u8 mode; u16 temp1; u16 temp2; - + if (IsInvalidBg32(bg) != FALSE || GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) { return -1; } - + switch (op) { case 0: @@ -653,9 +633,9 @@ u32 ChangeBgX(u8 bg, u32 value, u8 op) gGpuBgConfigs2[bg].bg_x -= value; break; } - + mode = GetBgMode(); - + switch (bg) { case 0: @@ -695,7 +675,7 @@ u32 ChangeBgX(u8 bg, u32 value, u8 op) } break; } - + return gGpuBgConfigs2[bg].bg_x; } @@ -713,12 +693,12 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op) u8 mode; u16 temp1; u16 temp2; - + if (IsInvalidBg32(bg) != FALSE || GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) { return -1; } - + switch (op) { case 0: @@ -732,9 +712,9 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op) gGpuBgConfigs2[bg].bg_y -= value; break; } - + mode = GetBgMode(); - + switch (bg) { case 0: @@ -774,7 +754,7 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op) } break; } - + return gGpuBgConfigs2[bg].bg_y; } @@ -783,12 +763,12 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) u8 mode; u16 temp1; u16 temp2; - + if (IsInvalidBg32(bg) != FALSE || GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) { return -1; } - + switch (op) { case 0: @@ -802,9 +782,9 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) gGpuBgConfigs2[bg].bg_y -= value; break; } - + mode = GetBgMode(); - + switch (bg) { case 0: @@ -820,7 +800,7 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) { temp1 = gGpuBgConfigs2[2].bg_y >> 0x8; SetGpuReg_ForcedBlank(REG_OFFSET_BG2VOFS, temp1); - + } else { @@ -845,7 +825,7 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) } break; } - + return gGpuBgConfigs2[bg].bg_y; } @@ -868,13 +848,13 @@ u8 Unused_AdjustBgMosaic(u8 a1, u8 a2) u16 result; s16 test1; s16 test2; - + result = GetGpuReg(REG_OFFSET_MOSAIC); - + test1 = result & 0xF; test2 = (result >> 4) & 0xF; result &= 0xFF00; - + switch (a2) { case 0: @@ -929,12 +909,12 @@ u8 Unused_AdjustBgMosaic(u8 a1, u8 a2) } break; } - + result |= ((test2 << 0x4) & 0xF0); result |= (test1 & 0xF); - + SetGpuReg(REG_OFFSET_MOSAIC, result); - + return result; } @@ -963,7 +943,7 @@ void* GetBgTilemapBuffer(u8 bg) return gGpuBgConfigs2[bg].tilemap; } -void CopyToBgTilemapBuffer(u8 bg, void *src, u16 mode, u16 destOffset) +void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset) { if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) { @@ -981,7 +961,7 @@ void CopyToBgTilemapBuffer(u8 bg, void *src, u16 mode, u16 destOffset) void CopyBgTilemapBufferToVram(u8 bg) { u16 sizeToLoad; - + if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) { switch (GetBgType(bg)) @@ -1006,7 +986,7 @@ void CopyToBgTilemapBufferRect(u8 bg, void* src, u8 destX, u8 destY, u8 width, u u16 destX16; u16 destY16; u16 mode; - + if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) { switch (GetBgType(bg)) @@ -1047,11 +1027,11 @@ void CopyRectToBgTilemapBufferRect(u8 bg, void* src, u8 srcX, u8 srcY, u8 srcWid u16 attribute; u16 mode; u16 mode2; - + void* srcCopy; u16 destX16; u16 destY16; - + if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) { attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE); @@ -1336,7 +1316,7 @@ void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u16 x16; u16 y16; u16 mode; - + if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) { switch (GetBgType(bg)) @@ -1375,10 +1355,10 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt u16 mode2; u16 attribute; u16 mode3; - + u16 x16; u16 y16; - + if (IsInvalidBg32(bg) == FALSE && IsTileMapOutsideWram(bg) == FALSE) { attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE); @@ -1414,9 +1394,9 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt u16 GetBgMetricTextMode(u8 bg, u8 whichMetric) { u8 attribute; - + attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE); - + switch (whichMetric) { case 0: @@ -1462,9 +1442,9 @@ u16 GetBgMetricTextMode(u8 bg, u8 whichMetric) u32 GetBgMetricAffineMode(u8 bg, u8 whichMetric) { u8 attribute; - + attribute = GetBgControlAttribute(bg, BG_CTRL_ATTR_SCREENSIZE); - + switch (whichMetric) { case 0: @@ -1491,7 +1471,7 @@ u32 GetTileMapIndexFromCoords(s32 x, s32 y, s32 screenSize, u32 screenWidth, u32 { x = x & (screenWidth - 1); y = y & (screenHeight - 1); - + switch (screenSize) { case 0: @@ -1526,7 +1506,7 @@ void CopyTileMapEntry(u16 *src, u16 *dest, s32 palette1, u32 tileOffset, u32 pal test = ((*dest & 0xFC00) + (palette2 << 12)) | ((*src + tileOffset) & 0x3FF); break; } - + *dest = test; } #else @@ -1586,10 +1566,10 @@ _08002B3C:\n\ u32 GetBgType(u8 bg) { u8 mode; - + mode = GetBgMode(); - - + + switch (bg) { case 0: @@ -1621,7 +1601,7 @@ u32 GetBgType(u8 bg) } break; } - + return 0xFFFF; } diff --git a/src/dma3_manager.c b/src/dma3_manager.c index 6d12dec05..0d3cf264b 100644 --- a/src/dma3_manager.c +++ b/src/dma3_manager.c @@ -14,7 +14,7 @@ void ClearDma3Requests(void) gDma3Requests[i].src = 0; gDma3Requests[i].dest = 0; } - + gDma3ManagerLocked = FALSE; } @@ -24,7 +24,7 @@ void ProcessDma3Requests(void) // NOTE: the fillerA member of the DMA struct is actually u32 value; // NOTE: gUnknown_0300001C is just a pointer inside the gDma3Requests structure, not a true symbol; feel free to remove u16 total_size; - + if (gDma3ManagerLocked) return; @@ -34,7 +34,7 @@ void ProcessDma3Requests(void) while (gDma3Requests[gDma3RequestCursor].size) { total_size += gDma3Requests[gDma3RequestCursor].size; - + if (total_size > 0xA000) return; // don't do too much at once @@ -90,14 +90,14 @@ void ProcessDma3Requests(void) } DmaFill16(3, gDma3Requests[gDma3RequestCursor].value, gDma3Requests[gDma3RequestCursor].dest, gDma3Requests[gDma3RequestCursor].size); break; - } + } gDma3Requests[gDma3RequestCursor].src = 0; gDma3Requests[gDma3RequestCursor].dest = 0; gDma3Requests[gDma3RequestCursor].size = 0; gDma3Requests[gDma3RequestCursor].mode = 0; gDma3Requests[gDma3RequestCursor].value = 0; gDma3RequestCursor++; - + if (gDma3RequestCursor >= 128) // loop back to the first DMA request gDma3RequestCursor = 0; } @@ -419,13 +419,13 @@ _08000E46:\n\ } #endif -int RequestDma3Copy(void *src, void *dest, u16 size, u8 mode) +int RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode) { int cursor; int var = 0; - + gDma3ManagerLocked = 1; - + cursor = gDma3RequestCursor; while(1) { @@ -434,12 +434,12 @@ int RequestDma3Copy(void *src, void *dest, u16 size, u8 mode) gDma3Requests[cursor].src = src; gDma3Requests[cursor].dest = dest; gDma3Requests[cursor].size = size; - + if(mode == 1) gDma3Requests[cursor].mode = mode; else gDma3Requests[cursor].mode = 3; - + gDma3ManagerLocked = FALSE; return (s16)cursor; } @@ -460,10 +460,10 @@ int RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode) { int cursor; int var = 0; - + cursor = gDma3RequestCursor; gDma3ManagerLocked = 1; - + while(1) { if(!gDma3Requests[cursor].size) @@ -477,7 +477,7 @@ int RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode) gDma3Requests[cursor].mode = 2; else gDma3Requests[cursor].mode = 4; - + gDma3ManagerLocked = FALSE; return (s16)cursor; } @@ -503,9 +503,9 @@ int CheckForSpaceForDma3Request(s16 index) for (; current < 0x80; current ++) if (gDma3Requests[current].size) return -1; - + return 0; - } + } if (gDma3Requests[index].size) return -1; diff --git a/src/egg_hatch.c b/src/egg_hatch.c new file mode 100644 index 000000000..0b924fced --- /dev/null +++ b/src/egg_hatch.c @@ -0,0 +1,364 @@ +#include "global.h" +#include "pokemon.h" +#include "pokedex.h" +#include "items.h" +#include "script.h" +#include "decompress.h" +#include "task.h" +#include "palette.h" +#include "main.h" +#include "event_data.h" +#include "sound.h" +#include "songs.h" +#include "text.h" +#include "text_window.h" +#include "string_util.h" +#include "menu.h" +#include "trig.h" +#include "rng.h" +#include "malloc.h" +#include "dma3.h" +#include "gpu_regs.h" +#include "bg.h" +#include "m4a.h" +#include "window.h" +#include "battle.h" // to get rid of later + +struct EggHatchData +{ + u8 eggSpriteID; + u8 pokeSpriteID; + u8 CB2_state; + u8 CB2_PalCounter; + u8 eggPartyID; + u8 field_5; + u8 field_6; + u8 eggShardVelocityID; + u8 field_8; + u8 field_9; + u8 field_A; + u8 field_B; + u16 species; + u8 field_E; + u8 field_F; + u8 field_10; + u8 field_11; + u8 field_12; + u8 field_13; +}; + +extern struct EggHatchData* gEggHatchData; + +extern struct SpriteTemplate gUnknown_0202499C; +extern void (*gFieldCallback)(void); + +extern const struct CompressedSpriteSheet gMonFrontPicTable[]; +extern const struct BgTemplate gUnknown_0832C064[2]; +extern const struct WindowTemplate gUnknown_0832C06C[2]; +extern const u8 gUnknown_08C00000[]; +extern const u8 gUnknown_08C00524[]; +extern const u8 gUnknown_08C004E0[]; +extern const struct SpriteSheet gUnknown_0832BFE4; // hatching egg +extern const struct SpriteSheet gUnknown_0832BFEC; // egg shell +extern const struct SpritePalette gUnknown_0832BFF4; // hatching egg +extern const u16 gUnknown_08DD7300[]; // palette, gameboy advance +extern const u32 gUnknown_08DD7360[]; // tileset gameboy advance +extern const u32 gUnknown_08331F60[]; // tilemap gameboy circle + +extern u8* GetMonNick(struct Pokemon* mon, u8* dst); +extern u8* GetBoxMonNick(struct BoxPokemon* boxMon, u8* dst); +extern u8 sav1_map_get_name(void); +extern void sub_81DB5E8(u8* str1, u8* str2, u8); +extern void sub_806A068(u16, u8); +extern void fade_screen(u8, u8); +extern void overworld_free_bg_tilemaps(void); +extern void sub_80AF168(void); +extern void init_uns_table_pokemon_copy(void); +extern void remove_some_task(void); +extern void reset_temp_tile_data_buffers(void); +extern void copy_decompressed_tile_data_to_vram_autofree(u8 bg_id, const void* src, u16 size, u16 offset, u8 mode); + + void Task_EggHatch(u8 taskID); + void CB2_EggHatch_0(void); + void CB2_EggHatch_1(void); + void SpriteCB_Egg_0(struct Sprite* sprite); + void SpriteCB_Egg_1(struct Sprite* sprite); + void SpriteCB_Egg_2(struct Sprite* sprite); + void SpriteCB_Egg_3(struct Sprite* sprite); + void SpriteCB_Egg_4(struct Sprite* sprite); + void SpriteCB_Egg_5(struct Sprite* sprite); + void SpriteCB_EggShard(struct Sprite* sprite); + void EggHatchPrintMessage2(u8* src); + void EggHatchPrintMessage1(u8* src); + bool8 EggHatchUpdateWindowText(void); + void CreateRandomEggShardSprite(void); + void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex); + +static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp) +{ + u16 species; + u32 personality, pokerus; + u8 i, friendship, language, gameMet, markings, obedience; + u16 moves[4]; + u32 ivs[6]; + + + species = GetMonData(egg, MON_DATA_SPECIES); + + for (i = 0; i < 4; i++) + { + moves[i] = GetMonData(egg, MON_DATA_MOVE1 + i); + } + + personality = GetMonData(egg, MON_DATA_PERSONALITY); + + for (i = 0; i < 6; i++) + { + ivs[i] = GetMonData(egg, MON_DATA_HP_IV + i); + } + + language = GetMonData(egg, MON_DATA_LANGUAGE); + gameMet = GetMonData(egg, MON_DATA_MET_GAME); + markings = GetMonData(egg, MON_DATA_MARKINGS); + pokerus = GetMonData(egg, MON_DATA_POKERUS); + obedience = GetMonData(egg, MON_DATA_OBEDIENCE); + + CreateMon(temp, species, 5, 32, TRUE, personality, 0, 0); + + for (i = 0; i < 4; i++) + { + SetMonData(temp, MON_DATA_MOVE1 + i, &moves[i]); + } + + for (i = 0; i < 6; i++) + { + SetMonData(temp, MON_DATA_HP_IV + i, &ivs[i]); + } + + language = GAME_LANGUAGE; + SetMonData(temp, MON_DATA_LANGUAGE, &language); + SetMonData(temp, MON_DATA_MET_GAME, &gameMet); + SetMonData(temp, MON_DATA_MARKINGS, &markings); + + friendship = 120; + SetMonData(temp, MON_DATA_FRIENDSHIP, &friendship); + SetMonData(temp, MON_DATA_POKERUS, &pokerus); + SetMonData(temp, MON_DATA_OBEDIENCE, &obedience); + + *egg = *temp; +} + +void AddHatchedMonToParty(u8 id) +{ + u8 isEgg = 0x46; // ? + u16 pokeNum; + u8 name[12]; + u16 ball; + u16 caughtLvl; + u8 mapNameID; + struct Pokemon* mon = &gPlayerParty[id]; + + CreatedHatchedMon(mon, &gEnemyParty[0]); + SetMonData(mon, MON_DATA_IS_EGG, &isEgg); + + pokeNum = GetMonData(mon, MON_DATA_SPECIES); + GetSpeciesName(name, pokeNum); + SetMonData(mon, MON_DATA_NICKNAME, name); + + pokeNum = SpeciesToNationalPokedexNum(pokeNum); + GetSetPokedexFlag(pokeNum, FLAG_SET_SEEN); + GetSetPokedexFlag(pokeNum, FLAG_SET_CAUGHT); + + GetMonNick(mon, gStringVar1); + + ball = ITEM_POKE_BALL; + SetMonData(mon, MON_DATA_POKEBALL, &ball); + + caughtLvl = 0; + SetMonData(mon, MON_DATA_MET_LEVEL, &caughtLvl); + + mapNameID = sav1_map_get_name(); + SetMonData(mon, MON_DATA_MET_LOCATION, &mapNameID); + + MonRestorePP(mon); + CalculateMonStats(mon); +} + +void ScriptHatchMon(void) +{ + AddHatchedMonToParty(gSpecialVar_0x8004); +} + +static bool8 sub_807158C(struct DaycareData* daycare, u8 daycareId) +{ + u8 nick[0x20]; + struct DaycareMon* daycareMon = &daycare->mons[daycareId]; + + GetBoxMonNick(&daycareMon->mon, nick); + if (daycareMon->mail.itemId != 0 + && (StringCompareWithoutExtCtrlCodes(nick, daycareMon->monName) != 0 + || StringCompareWithoutExtCtrlCodes(gSaveBlock2Ptr->playerName, daycareMon->OT_name) != 0)) + { + StringCopy(gStringVar1, nick); + sub_81DB5E8(gStringVar2, daycareMon->OT_name, daycareMon->language_maybe); + sub_81DB5E8(gStringVar3, daycareMon->monName, daycareMon->unknown); + return TRUE; + } + return FALSE; +} + +bool8 sub_8071614(void) +{ + return sub_807158C(&gSaveBlock1Ptr->daycare, gSpecialVar_0x8004); +} + +u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID, u16* speciesLoc) +{ + u8 r5 = 0; + u8 spriteID = 0; + struct Pokemon* mon = NULL; + + if (a0 == 0) + { + mon = &gPlayerParty[pokeID]; + r5 = 1; + } + if (a0 == 1) + { + mon = &gPlayerParty[pokeID]; + r5 = 3; + } + switch (switchID) + { + case 0: + { + u16 species = GetMonData(mon, MON_DATA_SPECIES); + u32 pid = GetMonData(mon, MON_DATA_PERSONALITY); + HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], + gBattleSpritesGfx->sprites[(a0 * 2) + 1], + species, pid); + LoadCompressedObjectPalette(sub_806E794(mon)); + *speciesLoc = species; + } + break; + case 1: + sub_806A068(sub_806E794(mon)->tag, r5); + spriteID = CreateSprite(&gUnknown_0202499C, 120, 75, 6); + gSprites[spriteID].invisible = 1; + gSprites[spriteID].callback = SpriteCallbackDummy; + break; + } + return spriteID; +} + +void VBlankCB_EggHatch(void) +{ + LoadOam(); + ProcessSpriteCopyRequests(); + TransferPlttBuffer(); +} + +void EggHatch(void) +{ + ScriptContext2_Enable(); + CreateTask(Task_EggHatch, 10); + fade_screen(1, 0); +} + + void Task_EggHatch(u8 taskID) +{ + if (!gPaletteFade.active) + { + overworld_free_bg_tilemaps(); + SetMainCallback2(CB2_EggHatch_0); + gFieldCallback = sub_80AF168; + DestroyTask(taskID); + } +} + + void CB2_EggHatch_0(void) +{ + switch (gMain.state) + { + case 0: + SetGpuReg(REG_OFFSET_DISPCNT, 0); + + gEggHatchData = Alloc(sizeof(struct EggHatchData)); + init_uns_table_pokemon_copy(); + gEggHatchData->eggPartyID = gSpecialVar_0x8004; + gEggHatchData->eggShardVelocityID = 0; + + SetVBlankCallback(VBlankCB_EggHatch); + gSpecialVar_0x8005 = GetCurrentMapMusic(); + + reset_temp_tile_data_buffers(); + ResetBgsAndClearDma3BusyFlags(0); + InitBgsFromTemplates(0, gUnknown_0832C064, 2); + + ChangeBgX(1, 0, 0); + ChangeBgY(1, 0, 0); + ChangeBgX(0, 0, 0); + ChangeBgY(0, 0, 0); + + SetBgAttribute(1, BG_CTRL_ATTR_MOSAIC, 2); + SetBgTilemapBuffer(1, Alloc(0x1000)); + SetBgTilemapBuffer(0, Alloc(0x2000)); + + DeactivateAllTextPrinters(); + ResetPaletteFade(); + FreeAllSpritePalettes(); + ResetSpriteData(); + ResetTasks(); + remove_some_task(); + m4aSoundVSyncOn(); + gMain.state++; + break; + case 1: + InitWindows(gUnknown_0832C06C); + gEggHatchData->field_8 = 0; + gMain.state++; + break; + case 2: + copy_decompressed_tile_data_to_vram_autofree(0, gUnknown_08C00000, 0, 0, 0); + CopyToBgTilemapBuffer(0, gUnknown_08C00524, 0, 0); + LoadCompressedPalette(gUnknown_08C004E0, 0, 0x20); + gMain.state++; + break; + case 3: + LoadSpriteSheet(&gUnknown_0832BFE4); + LoadSpriteSheet(&gUnknown_0832BFEC); + LoadSpritePalette(&gUnknown_0832BFF4); + gMain.state++; + break; + case 4: + CopyBgTilemapBufferToVram(0); + AddHatchedMonToParty(gEggHatchData->eggPartyID); + gMain.state++; + break; + case 5: + EggHatchCreateMonSprite(0, 0, gEggHatchData->eggPartyID, &gEggHatchData->species); + gMain.state++; + break; + case 6: + gEggHatchData->pokeSpriteID = EggHatchCreateMonSprite(0, 1, gEggHatchData->eggPartyID, &gEggHatchData->species); + gMain.state++; + break; + case 7: + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); + LoadPalette(gUnknown_08DD7300, 0x10, 0xA0); + LoadBgTiles(1, gUnknown_08DD7360, 0x1420, 0); + CopyToBgTilemapBuffer(1, gUnknown_08331F60, 0x1000, 0); + CopyBgTilemapBufferToVram(1); + gMain.state++; + break; + case 8: + SetMainCallback2(CB2_EggHatch_1); + gEggHatchData->CB2_state = 0; + break; + } + RunTasks(); + RunTextPrinters(); + AnimateSprites(); + BuildOamBuffer(); + UpdatePaletteFade(); +} diff --git a/src/safari_zone.c b/src/safari_zone.c index fdfdd961a..3e25468bf 100644 --- a/src/safari_zone.c +++ b/src/safari_zone.c @@ -18,7 +18,7 @@ struct PokeblockFeeder #define NUM_POKEBLOCK_FEEDERS 10 extern u8 gBattleOutcome; -extern void* gUnknown_03005DAC; +extern void* gFieldCallback; extern u8 gUnknown_082A4B8A[]; extern u8 gUnknown_082A4B6F[]; @@ -118,7 +118,7 @@ void sub_80FC190(void) { ScriptContext2_RunNewScript(gUnknown_082A4B4C); warp_in(); - gUnknown_03005DAC = sub_80AF6F0; + gFieldCallback = sub_80AF6F0; SetMainCallback2(c2_load_new_map); } else if (gBattleOutcome == BATTLE_CAUGHT) diff --git a/src/window.c b/src/window.c index 574b13aa0..164031bee 100644 --- a/src/window.c +++ b/src/window.c @@ -35,7 +35,7 @@ static void nullsub_8(void) } -bool16 InitWindows(struct WindowTemplate *templates) +bool16 InitWindows(const struct WindowTemplate *templates) { int i; void *bgTilemapBuffer; diff --git a/sym_bss.txt b/sym_bss.txt index 070e7e5f9..c9128c7a4 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -113,7 +113,7 @@ gUnknown_03000DD8: @ 3000DD8 gUnknown_03000DDC: @ 3000DDC .space 0x4 -gUnknown_03000DE0: @ 3000DE0 +gEggHatchData: @ 3000DE0 .space 0x8 gUnknown_03000DE8: @ 3000DE8 diff --git a/sym_common.txt b/sym_common.txt index cf737c390..23809c1a7 100644 --- a/sym_common.txt +++ b/sym_common.txt @@ -269,7 +269,7 @@ gUnknown_03005DA4: @ 3005DA4 gUnknown_03005DA8: @ 3005DA8 .space 0x4 -gUnknown_03005DAC: @ 3005DAC +gFieldCallback: @ 3005DAC .space 0x4 gUnknown_03005DB0: @ 3005DB0 From 097a38f054c8a858917049fdf8973cb16a26c771 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 18 Sep 2017 13:54:39 -0400 Subject: [PATCH 202/342] nonmatching sub_81BF7A4 --- asm/berry_fix_program.s | 36 --------------------- src/berry_fix_program.c | 69 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 37 deletions(-) diff --git a/asm/berry_fix_program.s b/asm/berry_fix_program.s index 83be5e453..50771f338 100755 --- a/asm/berry_fix_program.s +++ b/asm/berry_fix_program.s @@ -5,42 +5,6 @@ .text - thumb_func_start sub_81BF7A4 -sub_81BF7A4: @ 81BF7A4 - push {r4,r5,lr} - adds r4, r0, 0 - ldr r5, =gUnknown_030012B8 - ldr r0, [r5] - ldrb r0, [r0, 0x1] - cmp r0, r4 - bne _081BF7BC - adds r0, r4, 0 - b _081BF7DC - .pool -_081BF7BC: - cmp r0, 0x6 - bne _081BF7CC - adds r0, r4, 0 - bl sub_81BF7E8 - ldr r0, [r5] - strb r4, [r0, 0x1] - b _081BF7D6 -_081BF7CC: - bl sub_81BF8D8 - ldr r1, [r5] - movs r0, 0x6 - strb r0, [r1, 0x1] -_081BF7D6: - ldr r0, =gUnknown_030012B8 - ldr r0, [r0] - ldrb r0, [r0, 0x1] -_081BF7DC: - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_81BF7A4 - thumb_func_start sub_81BF7E8 sub_81BF7E8: @ 81BF7E8 push {r4-r6,lr} diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index 58e50e509..b63bc12be 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -30,7 +30,9 @@ extern berryfix_t *gUnknown_030012B8; static void sub_81BF3DC(void); static void sub_81BF5A4(void); -u32 sub_81BF7A4(u8); +static int sub_81BF7A4(int); +void sub_81BF7E8(int); +void sub_81BF8D8(int); // .rodata @@ -179,6 +181,32 @@ static void sub_81BF5A4(void) CopyWindowToVram(3, 2); CopyWindowToVram(0, 2); } + +static int sub_81BF7A4(int checkval) +{ + int retval; + + retval = gUnknown_030012B8->unk1; + if (retval == checkval) + { + retval = checkval; + } + else + { + if (retval == 6) + { + sub_81BF7E8(checkval); + gUnknown_030012B8->unk1 = checkval; + } + else + { + sub_81BF8D8(gUnknown_030012B8->unk1); + gUnknown_030012B8->unk1 = 6; + } + retval = gUnknown_030012B8->unk1; + } + return retval; +} #else __attribute__((naked)) static void sub_81BF5A4(void) { @@ -386,4 +414,43 @@ __attribute__((naked)) static void sub_81BF5A4(void) "\t.pool\n" ".syntax divided"); } + +__attribute__((naked)) static int sub_81BF7A4(int checkval) +{ + asm(".syntax unified\n" + "\tpush {r4,r5,lr}\n" + "\tadds r4, r0, 0\n" + "\tldr r5, =gUnknown_030012B8\n" + "\tldr r0, [r5]\n" + "\tldrb r0, [r0, 0x1]\n" + "\tcmp r0, r4\n" + "\tbne _081BF7BC\n" + "\tadds r0, r4, 0\n" + "\tb _081BF7DC\n" + "\t.pool\n" + "_081BF7BC:\n" + "\tcmp r0, 0x6\n" + "\tbne _081BF7CC\n" + "\tadds r0, r4, 0\n" + "\tbl sub_81BF7E8\n" + "\tldr r0, [r5]\n" + "\tstrb r4, [r0, 0x1]\n" + "\tb _081BF7D6\n" + "_081BF7CC:\n" + "\tbl sub_81BF8D8\n" + "\tldr r1, [r5]\n" + "\tmovs r0, 0x6\n" + "\tstrb r0, [r1, 0x1]\n" + "_081BF7D6:\n" + "\tldr r0, =gUnknown_030012B8\n" + "\tldr r0, [r0]\n" + "\tldrb r0, [r0, 0x1]\n" + "_081BF7DC:\n" + "\tpop {r4,r5}\n" + "\tpop {r1}\n" + "\tbx r1\n" + "\t.pool\n" + ".syntax divided"); +} #endif + From 39e6bdf094ac1b53109782c9b5b98c211bbe3149 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 18 Sep 2017 14:04:00 -0400 Subject: [PATCH 203/342] sub_81BF7E8 --- asm/berry_fix_program.s | 96 ----------------------------------------- include/bg.h | 4 ++ src/berry_fix_program.c | 33 +++++++++++++- 3 files changed, 36 insertions(+), 97 deletions(-) diff --git a/asm/berry_fix_program.s b/asm/berry_fix_program.s index 50771f338..3dfc07fa8 100755 --- a/asm/berry_fix_program.s +++ b/asm/berry_fix_program.s @@ -5,102 +5,6 @@ .text - thumb_func_start sub_81BF7E8 -sub_81BF7E8: @ 81BF7E8 - push {r4-r6,lr} - sub sp, 0xC - adds r6, r0, 0 - movs r0, 0x20 - str r0, [sp] - str r0, [sp, 0x4] - movs r0, 0 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl FillBgTilemapBufferRect_Palette0 - movs r0, 0x1 - movs r1, 0xAA - bl FillWindowPixelBuffer - ldr r0, =gUnknown_08618158 - str r0, [sp] - movs r0, 0x1 - negs r0, r0 - str r0, [sp, 0x4] - ldr r0, =gUnknown_08618160 - lsls r4, r6, 2 - adds r0, r4, r0 - ldr r0, [r0] - str r0, [sp, 0x8] - movs r0, 0x1 - movs r1, 0x1 - movs r2, 0 - movs r3, 0 - bl box_print - movs r0, 0x1 - bl PutWindowTilemap - movs r0, 0x1 - movs r1, 0x2 - bl CopyWindowToVram - cmp r6, 0x5 - bhi _081BF87E - ldr r0, =_081BF850 - adds r0, r4, r0 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081BF850: - .4byte _081BF868 - .4byte _081BF870 - .4byte _081BF868 - .4byte _081BF868 - .4byte _081BF868 - .4byte _081BF878 -_081BF868: - movs r0, 0x2 - bl PutWindowTilemap - b _081BF87E -_081BF870: - movs r0, 0x3 - bl PutWindowTilemap - b _081BF87E -_081BF878: - movs r0, 0 - bl PutWindowTilemap -_081BF87E: - movs r0, 0 - bl CopyBgTilemapBufferToVram - ldr r5, =gUnknown_08618178 - lsls r4, r6, 1 - adds r4, r6 - lsls r4, 2 - adds r0, r4, r5 - ldr r0, [r0] - ldr r1, =0x06004000 - bl LZ77UnCompVram - adds r0, r5, 0x4 - adds r0, r4, r0 - ldr r0, [r0] - ldr r1, =0x0600f800 - bl LZ77UnCompVram - adds r5, 0x8 - adds r4, r5 - ldr r0, [r4] - movs r1, 0xA0 - lsls r1, 19 - ldr r2, =0x04000040 - bl CpuSet - movs r0, 0 - bl ShowBg - movs r0, 0x1 - bl ShowBg - add sp, 0xC - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_81BF7E8 - thumb_func_start sub_81BF8D8 sub_81BF8D8: @ 81BF8D8 push {lr} diff --git a/include/bg.h b/include/bg.h index 7a0782c1b..444d3f3c2 100644 --- a/include/bg.h +++ b/include/bg.h @@ -15,5 +15,9 @@ void ResetBgsAndClearDma3BusyFlags(u32); void InitBgsFromTemplates(u8, const struct BgTemplate *, u8); u32 ChangeBgX(u8, u32, u8); u32 ChangeBgY(u8, u32, u8); +void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height); +void ShowBg(u8); +void HideBg(u8); +void CopyBgTilemapBufferToVram(u8); #endif //GUARD_bg_H diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index b63bc12be..6f4c1c79e 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -31,7 +31,7 @@ extern berryfix_t *gUnknown_030012B8; static void sub_81BF3DC(void); static void sub_81BF5A4(void); static int sub_81BF7A4(int); -void sub_81BF7E8(int); +static void sub_81BF7E8(int); void sub_81BF8D8(int); // .rodata @@ -48,6 +48,8 @@ extern const struct WindowTemplate gUnknown_08618110[7]; extern const u16 gUnknown_08618138[16]; extern const u8 gUnknown_08618158[3]; extern const u8 gUnknown_0861815B[3]; +extern const u8 *const gUnknown_08618160[6]; +extern const u8 *const gUnknown_08618178[6][3]; // .text @@ -454,3 +456,32 @@ __attribute__((naked)) static int sub_81BF7A4(int checkval) } #endif +static void sub_81BF7E8(int scene) +{ + FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); + FillWindowPixelBuffer(1, 0xAA); + box_print(1, 1, 0, 0, gUnknown_08618158, -1, gUnknown_08618160[scene]); + PutWindowTilemap(1); + CopyWindowToVram(1, 2); + switch (scene) + { + case 0: + case 2: + case 3: + case 4: + PutWindowTilemap(2); + break; + case 1: + PutWindowTilemap(3); + break; + case 5: + PutWindowTilemap(0); + break; + } + CopyBgTilemapBufferToVram(0); + LZ77UnCompVram(gUnknown_08618178[scene][0], (void *)BG_CHAR_ADDR(1)); + LZ77UnCompVram(gUnknown_08618178[scene][1], (void *)BG_SCREEN_ADDR(31)); + CpuCopy32(gUnknown_08618178[scene][2], (void *)BG_PLTT, 0x100); + ShowBg(0); + ShowBg(1); +} From 0e2d84f24d22b6ec47e6adf32bc5f4d6b4c6289b Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 18 Sep 2017 14:07:34 -0400 Subject: [PATCH 204/342] Remaining functions --- asm/berry_fix_program.s | 11 ----- ld_script.txt | 1 - src/berry_fix_program.c | 90 ++++++++++++----------------------------- 3 files changed, 26 insertions(+), 76 deletions(-) diff --git a/asm/berry_fix_program.s b/asm/berry_fix_program.s index 3dfc07fa8..2428f2984 100755 --- a/asm/berry_fix_program.s +++ b/asm/berry_fix_program.s @@ -5,15 +5,4 @@ .text - thumb_func_start sub_81BF8D8 -sub_81BF8D8: @ 81BF8D8 - push {lr} - movs r0, 0 - bl HideBg - movs r0, 0x1 - bl HideBg - pop {r0} - bx r0 - thumb_func_end sub_81BF8D8 - .align 2, 0 @ Don't pad with nop. diff --git a/ld_script.txt b/ld_script.txt index b62125311..621df10f8 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -260,7 +260,6 @@ SECTIONS { asm/fldeff_groundshake.o(.text); asm/fossil_specials.o(.text); src/berry_fix_program.o(.text); - asm/berry_fix_program.o(.text); asm/pokemon_summary_screen.o(.text); asm/pokenav.o(.text); asm/rayquaza_scene.o(.text); diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index 6f4c1c79e..e4ec0d8c4 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -32,7 +32,7 @@ static void sub_81BF3DC(void); static void sub_81BF5A4(void); static int sub_81BF7A4(int); static void sub_81BF7E8(int); -void sub_81BF8D8(int); +static void sub_81BF8D8(void); // .rodata @@ -184,31 +184,6 @@ static void sub_81BF5A4(void) CopyWindowToVram(0, 2); } -static int sub_81BF7A4(int checkval) -{ - int retval; - - retval = gUnknown_030012B8->unk1; - if (retval == checkval) - { - retval = checkval; - } - else - { - if (retval == 6) - { - sub_81BF7E8(checkval); - gUnknown_030012B8->unk1 = checkval; - } - else - { - sub_81BF8D8(gUnknown_030012B8->unk1); - gUnknown_030012B8->unk1 = 6; - } - retval = gUnknown_030012B8->unk1; - } - return retval; -} #else __attribute__((naked)) static void sub_81BF5A4(void) { @@ -416,46 +391,27 @@ __attribute__((naked)) static void sub_81BF5A4(void) "\t.pool\n" ".syntax divided"); } - -__attribute__((naked)) static int sub_81BF7A4(int checkval) -{ - asm(".syntax unified\n" - "\tpush {r4,r5,lr}\n" - "\tadds r4, r0, 0\n" - "\tldr r5, =gUnknown_030012B8\n" - "\tldr r0, [r5]\n" - "\tldrb r0, [r0, 0x1]\n" - "\tcmp r0, r4\n" - "\tbne _081BF7BC\n" - "\tadds r0, r4, 0\n" - "\tb _081BF7DC\n" - "\t.pool\n" - "_081BF7BC:\n" - "\tcmp r0, 0x6\n" - "\tbne _081BF7CC\n" - "\tadds r0, r4, 0\n" - "\tbl sub_81BF7E8\n" - "\tldr r0, [r5]\n" - "\tstrb r4, [r0, 0x1]\n" - "\tb _081BF7D6\n" - "_081BF7CC:\n" - "\tbl sub_81BF8D8\n" - "\tldr r1, [r5]\n" - "\tmovs r0, 0x6\n" - "\tstrb r0, [r1, 0x1]\n" - "_081BF7D6:\n" - "\tldr r0, =gUnknown_030012B8\n" - "\tldr r0, [r0]\n" - "\tldrb r0, [r0, 0x1]\n" - "_081BF7DC:\n" - "\tpop {r4,r5}\n" - "\tpop {r1}\n" - "\tbx r1\n" - "\t.pool\n" - ".syntax divided"); -} #endif +static int sub_81BF7A4(int checkval) +{ + if (gUnknown_030012B8->unk1 == checkval) + { + return checkval; + } + if (gUnknown_030012B8->unk1 == 6) + { + sub_81BF7E8(checkval); + gUnknown_030012B8->unk1 = checkval; + } + else + { + sub_81BF8D8(); + gUnknown_030012B8->unk1 = 6; + } + return gUnknown_030012B8->unk1; +} + static void sub_81BF7E8(int scene) { FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); @@ -485,3 +441,9 @@ static void sub_81BF7E8(int scene) ShowBg(0); ShowBg(1); } + +static void sub_81BF8D8() +{ + HideBg(0); + HideBg(1); +} From 810bfffd1242ebfd29fcc2db6fef19b34545ad0b Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 18 Sep 2017 15:10:25 -0400 Subject: [PATCH 205/342] data decomp --- data/data_emerald2.s | 31 +--------- data/graphics.s | 58 +++++++++++++++++- data/text/move_descriptions.inc | 3 + get_diffs.py | 24 ++++++++ ld_script.txt | 2 + src/berry_fix_program.c | 103 ++++++++++++++++++++++++++++---- 6 files changed, 179 insertions(+), 42 deletions(-) create mode 100644 get_diffs.py diff --git a/data/data_emerald2.s b/data/data_emerald2.s index 7efcbbecf..ce7e2a6e3 100644 --- a/data/data_emerald2.s +++ b/data/data_emerald2.s @@ -34,36 +34,7 @@ gUnknown_08617E34:: @ 8617E34 gUnknown_08617E60:: @ 8617E60 .incbin "baserom.gba", 0x617e60, 0x18 -gUnknown_08617E78:: @ 8617E78 - .incbin "baserom.gba", 0x617e78, 0x15 - -gUnknown_08617E8D:: @ 8617E8D - .incbin "baserom.gba", 0x617e8d, 0xe - -gUnknown_08617E9B:: @ 8617E9B - .incbin "baserom.gba", 0x617e9b, 0x26d - -gUnknown_08618108:: @ 8618108 - .incbin "baserom.gba", 0x618108, 0x8 - -gUnknown_08618110:: @ 8618110 - .incbin "baserom.gba", 0x618110, 0x28 - -gUnknown_08618138:: @ 8618138 - .incbin "baserom.gba", 0x618138, 0x20 - -gUnknown_08618158:: @ 8618158 - .incbin "baserom.gba", 0x618158, 0x3 - -gUnknown_0861815B:: @ 861815B - .incbin "baserom.gba", 0x61815b, 0x5 - -gUnknown_08618160:: @ 8618160 - .incbin "baserom.gba", 0x618160, 0x18 - -gUnknown_08618178:: @ 8618178 - .incbin "baserom.gba", 0x618178, 0x49 - + .section .rodata.2 @ 86181C1 .include "data/text/move_descriptions.inc" diff --git a/data/graphics.s b/data/graphics.s index bf080fd95..1be6d1a07 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -953,7 +953,7 @@ gUnknown_08DD4BF0:: @ 8DD4BF0 gUnknown_08DD4C4C:: @ 8DD4C4C .incbin "baserom.gba", 0xdd4c4c, 0xac - + .align 2 gUnknown_08DD4CF8:: @ 8DD4CF8 .incbin "graphics/interface/unk_change_case.4bpp.lz" @@ -988,7 +988,61 @@ gUnknown_08DD7300:: @ 8DD7300 .incbin "baserom.gba", 0xdd7300, 0x60 gUnknown_08DD7360:: @ 8DD7360 - .incbin "baserom.gba", 0xdd7360, 0x4084 + .incbin "baserom.gba", 0xdd7360, 0x1420 + +gUnknown_08DD8780:: @ 8DD8780 + .incbin "baserom.gba", 0xdd8780, 0x40 + +gUnknown_08DD87C0:: @ 8DD87C0 + .incbin "baserom.gba", 0xdd87c0, 0x720 + +gUnknown_08DD8EE0:: @ 8DD8EE0 + .incbin "baserom.gba", 0xdd8ee0, 0x1a0 + +gUnknown_08DD9080:: @ 8DD9080 + .incbin "baserom.gba", 0xdd9080, 0x60 + +gUnknown_08DD90E0:: @ 8DD90E0 + .incbin "baserom.gba", 0xdd90e0, 0x638 + +gUnknown_08DD9718:: @ 8DD9718 + .incbin "baserom.gba", 0xdd9718, 0x15c + +gUnknown_08DD9874:: @ 8DD9874 + .incbin "baserom.gba", 0xdd9874, 0x40 + +gUnknown_08DD98B4:: @ 8DD98B4 + .incbin "baserom.gba", 0xdd98b4, 0x5a4 + +gUnknown_08DD9E58:: @ 8DD9E58 + .incbin "baserom.gba", 0xdd9e58, 0x194 + +gUnknown_08DD9FEC:: @ 8DD9FEC + .incbin "baserom.gba", 0xdd9fec, 0x40 + +gUnknown_08DDA02C:: @ 8DDA02C + .incbin "baserom.gba", 0xdda02c, 0x610 + +gUnknown_08DDA63C:: @ 8DDA63C + .incbin "baserom.gba", 0xdda63c, 0x1c4 + +gUnknown_08DDA800:: @ 8DDA800 + .incbin "baserom.gba", 0xdda800, 0x40 + +gUnknown_08DDA840:: @ 8DDA840 + .incbin "baserom.gba", 0xdda840, 0x600 + +gUnknown_08DDAE40:: @ 8DDAE40 + .incbin "baserom.gba", 0xddae40, 0x1a0 + +gUnknown_08DDAFE0:: @ 8DDAFE0 + .incbin "baserom.gba", 0xddafe0, 0x40 + +gUnknown_08DDB020:: @ 8DDB020 + .incbin "baserom.gba", 0xddb020, 0x2a4 + +gUnknown_08DDB2C4:: @ 8DDB2C4 + .incbin "baserom.gba", 0xddb2c4, 0x120 gUnknown_08DDB3E4:: @ 8DDB3E4 .incbin "baserom.gba", 0xddb3e4, 0x80 diff --git a/data/text/move_descriptions.inc b/data/text/move_descriptions.inc index 454e49ae1..0f6b1adbf 100644 --- a/data/text/move_descriptions.inc +++ b/data/text/move_descriptions.inc @@ -1,3 +1,6 @@ +gNullMoveDescription:: @ 86181C0 + .string "$" + gPoundMoveDescription:: @ 86181C1 .string "Pounds the foe with\nforelegs or tail.$" diff --git a/get_diffs.py b/get_diffs.py new file mode 100644 index 000000000..d42ce7827 --- /dev/null +++ b/get_diffs.py @@ -0,0 +1,24 @@ +addrs = sorted([0xdd7360, + 0xdd87c0, + 0xdd8ee0, + 0xdd8780, + 0xdd90e0, + 0xdd9718, + 0xdd9080, + 0xdd98b4, + 0xdd9e58, + 0xdd9874, + 0xdda02c, + 0xdda63c, + 0xdd9fec, + 0xdda840, + 0xddae40, + 0xdda800, + 0xddb020, + 0xddb2c4, + 0xddafe0, + 0xddb3e4]) +for i, addr in enumerate(addrs[:-1]): + print 'gUnknown_08{0:06X}:: @ 8{0:06X}'.format(addr) + print '\t.incbin "baserom.gba", 0x{:06x}, 0x{:x}'.format(addr, addrs[i + 1] - addr) + print '' diff --git a/ld_script.txt b/ld_script.txt index 621df10f8..24356a435 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -379,6 +379,8 @@ SECTIONS { data/data_emerald.o(.rodata); data/battle_controller_player_partner.o(.rodata); data/data_emerald2.o(.rodata); + src/berry_fix_program.o(.rodata); + data/data_emerald2.o(.rodata.2); data/fonts.o(.rodata); data/mystery_event_msg.o(.rodata); src/m4a_tables.o(.rodata); diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index e4ec0d8c4..fa13c7e1e 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -36,20 +36,103 @@ static void sub_81BF8D8(void); // .rodata +const u8 gUnknown_08617E78[] = _("Berry Program Update"); +const u8 gUnknown_08617E8D[] = _("Ruby/Sapphire"); +const u8 gUnknown_08617E9B[] = _("Emerald"); + +const u8 Unknown_08617EA3[] = _("The Berry Program on your POKéMON\nRuby/Sapphire Game Pak will be updated.\n{COLOR RED}{SHADOW LIGHT_RED}Press the A Button."); +const u8 Unknown_08617F07[] = _("Please ensure the connection of your\nGame Boy Advance system matches this.\n{COLOR RED}{SHADOW LIGHT_RED}YES: Press the A Button.\nNO: Turn off the power and try again."); +const u8 Unknown_08617F97[] = _("Please turn on the power of POKéMON\nRuby/Sapphire while holding START and\nSELECT simultaneously. Then, ensure\nthe picture above appears."); +const u8 Unknown_08618020[] = _("Transmitting. Please wait.\n{COLOR RED}{SHADOW LIGHT_RED}Please do not turn off the power or\nunplug the Game Boy Advance Game\nLink Cable."); +const u8 Unknown_08618092[] = _("Please follow the instructions on your\nPOKéMON Ruby/Sapphire screen."); +const u8 Unknown_086180D7[] = _("Transmission failure.\n{COLOR RED}{SHADOW LIGHT_RED}Please try again."); + +const struct BgTemplate gUnknown_08618108[] = { + { + 0, 0, 30, 0, 0, 0 + }, { + 1, 1, 31, 0, 0, 1 + } +}; + +const struct WindowTemplate gUnknown_08618110[] = { + {0, 2, 4, 26, 2, 15, 0x001}, + {0, 1, 11, 28, 8, 15, 0x035}, + {0, 0, 8, 30, 2, 15, 0x115}, + {0, 8, 0, 14, 2, 15, 0x151}, + {-1} +}; + +const u16 gUnknown_08618138[] = { + 0x7fff, 0x7fff, 0x318c, 0x675a, + 0x043c, 0x3aff, 0x0664, 0x4bd2, + 0x6546, 0x7b14, 0x7fff, 0x318c, + 0x675a, 0x0000, 0x0000, 0x0000 +}; + +const u8 gUnknown_08618158[] = {10, 11, 12}; +const u8 gUnknown_0861815B[] = { 0, 10, 13}; + +const u8 *const gUnknown_08618160[] = { + Unknown_08617F07, + Unknown_08617F97, + Unknown_08618020, + Unknown_08618092, + Unknown_086180D7, + Unknown_08617EA3 +}; + +extern const u8 gUnknown_08DD87C0[]; +extern const u8 gUnknown_08DD8EE0[]; +extern const u8 gUnknown_08DD8780[]; +extern const u8 gUnknown_08DD90E0[]; +extern const u8 gUnknown_08DD9718[]; +extern const u8 gUnknown_08DD9080[]; +extern const u8 gUnknown_08DD98B4[]; +extern const u8 gUnknown_08DD9E58[]; +extern const u8 gUnknown_08DD9874[]; +extern const u8 gUnknown_08DDA02C[]; +extern const u8 gUnknown_08DDA63C[]; +extern const u8 gUnknown_08DD9FEC[]; +extern const u8 gUnknown_08DDA840[]; +extern const u8 gUnknown_08DDAE40[]; +extern const u8 gUnknown_08DDA800[]; +extern const u8 gUnknown_08DDB020[]; +extern const u8 gUnknown_08DDB2C4[]; +extern const u8 gUnknown_08DDAFE0[]; + +const u8 *const gUnknown_08618178[][3] = { + { + gUnknown_08DD87C0, + gUnknown_08DD8EE0, + gUnknown_08DD8780 + }, { + gUnknown_08DD90E0, + gUnknown_08DD9718, + gUnknown_08DD9080 + }, { + gUnknown_08DD98B4, + gUnknown_08DD9E58, + gUnknown_08DD9874 + }, { + gUnknown_08DDA02C, + gUnknown_08DDA63C, + gUnknown_08DD9FEC + }, { + gUnknown_08DDA840, + gUnknown_08DDAE40, + gUnknown_08DDA800 + }, { + gUnknown_08DDB020, + gUnknown_08DDB2C4, + gUnknown_08DDAFE0 + }, +}; + extern const u8 gUnknown_089A6550[0xC0]; extern const u8 gMultiBootProgram_BerryGlitchFix_Script[0x3b34]; extern const u8 gMultiBootProgram_BerryGlitchFix_Start[]; extern const u8 gMultiBootProgram_BerryGlitchFix_End[]; -extern const u8 gUnknown_08617E78[]; -extern const u8 gUnknown_08617E8D[]; -extern const u8 gUnknown_08617E9B[]; -extern const struct BgTemplate gUnknown_08618108[2]; -extern const struct WindowTemplate gUnknown_08618110[7]; -extern const u16 gUnknown_08618138[16]; -extern const u8 gUnknown_08618158[3]; -extern const u8 gUnknown_0861815B[3]; -extern const u8 *const gUnknown_08618160[6]; -extern const u8 *const gUnknown_08618178[6][3]; // .text From d48c4ab7a95c0b3cc59e96ca2bf30fdbc7ff1581 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 18 Sep 2017 15:28:55 -0400 Subject: [PATCH 206/342] Slight cleanup and relabeling of functions --- asm/title_screen.s | 2 +- src/berry_fix_program.c | 136 ++++++++++++++++++++-------------------- sym_bss.txt | 5 +- 3 files changed, 71 insertions(+), 72 deletions(-) diff --git a/asm/title_screen.s b/asm/title_screen.s index 39247aef4..15037e80d 100644 --- a/asm/title_screen.s +++ b/asm/title_screen.s @@ -1259,7 +1259,7 @@ c2_berry_program_update_screen_1: @ 80AAF28 cmp r0, 0 bne _080AAF3E bl m4aMPlayAllStop - ldr r0, =sub_81BF384 + ldr r0, =InitBerryFixProgram bl SetMainCallback2 _080AAF3E: pop {r0} diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index fa13c7e1e..931e92746 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -24,30 +24,30 @@ typedef struct { // Static RAM declarations -extern berryfix_t *gUnknown_030012B8; +static berryfix_t *berry_fix_mb_manager; // Static ROM declarations -static void sub_81BF3DC(void); -static void sub_81BF5A4(void); -static int sub_81BF7A4(int); -static void sub_81BF7E8(int); -static void sub_81BF8D8(void); +static void berry_fix_main(void); +static void berry_fix_gpu_set(void); +static int berry_fix_text_update(int); +static void berry_fix_text_print(int); +static void berry_fix_bg_hide(void); // .rodata -const u8 gUnknown_08617E78[] = _("Berry Program Update"); -const u8 gUnknown_08617E8D[] = _("Ruby/Sapphire"); -const u8 gUnknown_08617E9B[] = _("Emerald"); +static const u8 gUnknown_08617E78[] = _("Berry Program Update"); +static const u8 gUnknown_08617E8D[] = _("Ruby/Sapphire"); +static const u8 gUnknown_08617E9B[] = _("Emerald"); -const u8 Unknown_08617EA3[] = _("The Berry Program on your POKéMON\nRuby/Sapphire Game Pak will be updated.\n{COLOR RED}{SHADOW LIGHT_RED}Press the A Button."); -const u8 Unknown_08617F07[] = _("Please ensure the connection of your\nGame Boy Advance system matches this.\n{COLOR RED}{SHADOW LIGHT_RED}YES: Press the A Button.\nNO: Turn off the power and try again."); -const u8 Unknown_08617F97[] = _("Please turn on the power of POKéMON\nRuby/Sapphire while holding START and\nSELECT simultaneously. Then, ensure\nthe picture above appears."); -const u8 Unknown_08618020[] = _("Transmitting. Please wait.\n{COLOR RED}{SHADOW LIGHT_RED}Please do not turn off the power or\nunplug the Game Boy Advance Game\nLink Cable."); -const u8 Unknown_08618092[] = _("Please follow the instructions on your\nPOKéMON Ruby/Sapphire screen."); -const u8 Unknown_086180D7[] = _("Transmission failure.\n{COLOR RED}{SHADOW LIGHT_RED}Please try again."); +static const u8 Unknown_08617EA3[] = _("The Berry Program on your POKéMON\nRuby/Sapphire Game Pak will be updated.\n{COLOR RED}{SHADOW LIGHT_RED}Press the A Button."); +static const u8 Unknown_08617F07[] = _("Please ensure the connection of your\nGame Boy Advance system matches this.\n{COLOR RED}{SHADOW LIGHT_RED}YES: Press the A Button.\nNO: Turn off the power and try again."); +static const u8 Unknown_08617F97[] = _("Please turn on the power of POKéMON\nRuby/Sapphire while holding START and\nSELECT simultaneously. Then, ensure\nthe picture above appears."); +static const u8 Unknown_08618020[] = _("Transmitting. Please wait.\n{COLOR RED}{SHADOW LIGHT_RED}Please do not turn off the power or\nunplug the Game Boy Advance Game\nLink Cable."); +static const u8 Unknown_08618092[] = _("Please follow the instructions on your\nPOKéMON Ruby/Sapphire screen."); +static const u8 Unknown_086180D7[] = _("Transmission failure.\n{COLOR RED}{SHADOW LIGHT_RED}Please try again."); -const struct BgTemplate gUnknown_08618108[] = { +static const struct BgTemplate gUnknown_08618108[] = { { 0, 0, 30, 0, 0, 0 }, { @@ -55,7 +55,7 @@ const struct BgTemplate gUnknown_08618108[] = { } }; -const struct WindowTemplate gUnknown_08618110[] = { +static const struct WindowTemplate gUnknown_08618110[] = { {0, 2, 4, 26, 2, 15, 0x001}, {0, 1, 11, 28, 8, 15, 0x035}, {0, 0, 8, 30, 2, 15, 0x115}, @@ -63,17 +63,17 @@ const struct WindowTemplate gUnknown_08618110[] = { {-1} }; -const u16 gUnknown_08618138[] = { +static const u16 gUnknown_08618138[] = { 0x7fff, 0x7fff, 0x318c, 0x675a, 0x043c, 0x3aff, 0x0664, 0x4bd2, 0x6546, 0x7b14, 0x7fff, 0x318c, 0x675a, 0x0000, 0x0000, 0x0000 }; -const u8 gUnknown_08618158[] = {10, 11, 12}; -const u8 gUnknown_0861815B[] = { 0, 10, 13}; +static const u8 gUnknown_08618158[] = {10, 11, 12}; +static const u8 gUnknown_0861815B[] = { 0, 10, 13}; -const u8 *const gUnknown_08618160[] = { +static const u8 *const gUnknown_08618160[] = { Unknown_08617F07, Unknown_08617F97, Unknown_08618020, @@ -101,7 +101,7 @@ extern const u8 gUnknown_08DDB020[]; extern const u8 gUnknown_08DDB2C4[]; extern const u8 gUnknown_08DDAFE0[]; -const u8 *const gUnknown_08618178[][3] = { +static const u8 *const gUnknown_08618178[][3] = { { gUnknown_08DD87C0, gUnknown_08DD8EE0, @@ -136,7 +136,7 @@ extern const u8 gMultiBootProgram_BerryGlitchFix_End[]; // .text -void sub_81BF384(void) +void InitBerryFixProgram(void) { DisableInterrupts(0xFFFF); EnableInterrupts(0x0001); @@ -146,82 +146,82 @@ void sub_81BF384(void) ResetTasks(); remove_some_task(); SetGpuReg(REG_OFFSET_DISPCNT, 0x0000); - gUnknown_030012B8 = AllocZeroed(0x50); - gUnknown_030012B8->state = 0; - gUnknown_030012B8->unk1 = 6; - SetMainCallback2(sub_81BF3DC); + berry_fix_mb_manager = AllocZeroed(0x50); + berry_fix_mb_manager->state = 0; + berry_fix_mb_manager->unk1 = 6; + SetMainCallback2(berry_fix_main); } -static void sub_81BF3DC(void) +static void berry_fix_main(void) { - switch (gUnknown_030012B8->state) + switch (berry_fix_mb_manager->state) { case 0: - sub_81BF5A4(); - gUnknown_030012B8->state = 1; + berry_fix_gpu_set(); + berry_fix_mb_manager->state = 1; break; case 1: - if (sub_81BF7A4(5) == 5 && (gMain.newKeys & A_BUTTON)) + if (berry_fix_text_update(5) == 5 && (gMain.newKeys & A_BUTTON)) { - gUnknown_030012B8->state = 2; + berry_fix_mb_manager->state = 2; } break; case 2: - if (sub_81BF7A4(0) == 0 && (gMain.newKeys & A_BUTTON)) + if (berry_fix_text_update(0) == 0 && (gMain.newKeys & A_BUTTON)) { - gUnknown_030012B8->state = 3; + berry_fix_mb_manager->state = 3; } break; case 3: - if (sub_81BF7A4(1) == 1) + if (berry_fix_text_update(1) == 1) { - gUnknown_030012B8->mb.masterp = gUnknown_089A6550; - gUnknown_030012B8->mb.server_type = 0; - MultiBootInit(&gUnknown_030012B8->mb); - gUnknown_030012B8->unk2 = 0; - gUnknown_030012B8->state = 4; + berry_fix_mb_manager->mb.masterp = gUnknown_089A6550; + berry_fix_mb_manager->mb.server_type = 0; + MultiBootInit(&berry_fix_mb_manager->mb); + berry_fix_mb_manager->unk2 = 0; + berry_fix_mb_manager->state = 4; } break; case 4: - MultiBootMain(&gUnknown_030012B8->mb); - if (gUnknown_030012B8->mb.probe_count != 0 || (!(gUnknown_030012B8->mb.response_bit & 2) || !(gUnknown_030012B8->mb.client_bit & 2))) + MultiBootMain(&berry_fix_mb_manager->mb); + if (berry_fix_mb_manager->mb.probe_count != 0 || (!(berry_fix_mb_manager->mb.response_bit & 2) || !(berry_fix_mb_manager->mb.client_bit & 2))) { - gUnknown_030012B8->unk2 = 0; + berry_fix_mb_manager->unk2 = 0; } - else if (++ gUnknown_030012B8->unk2 > 180) + else if (++ berry_fix_mb_manager->unk2 > 180) { - MultiBootStartMaster(&gUnknown_030012B8->mb, gMultiBootProgram_BerryGlitchFix_Start, (u32)(gMultiBootProgram_BerryGlitchFix_End - gMultiBootProgram_BerryGlitchFix_Start), 4, 1); - gUnknown_030012B8->state = 5; + MultiBootStartMaster(&berry_fix_mb_manager->mb, gMultiBootProgram_BerryGlitchFix_Start, (u32)(gMultiBootProgram_BerryGlitchFix_End - gMultiBootProgram_BerryGlitchFix_Start), 4, 1); + berry_fix_mb_manager->state = 5; } break; case 5: - if (sub_81BF7A4(2) == 2) { - MultiBootMain(&gUnknown_030012B8->mb); - if (MultiBootCheckComplete(&gUnknown_030012B8->mb)) { - gUnknown_030012B8->state = 6; + if (berry_fix_text_update(2) == 2) { + MultiBootMain(&berry_fix_mb_manager->mb); + if (MultiBootCheckComplete(&berry_fix_mb_manager->mb)) { + berry_fix_mb_manager->state = 6; } - else if (!(gUnknown_030012B8->mb.client_bit & 2)) { - gUnknown_030012B8->state = 7; + else if (!(berry_fix_mb_manager->mb.client_bit & 2)) { + berry_fix_mb_manager->state = 7; } } break; case 6: - if (sub_81BF7A4(3) == 3 && gMain.newKeys & A_BUTTON) + if (berry_fix_text_update(3) == 3 && gMain.newKeys & A_BUTTON) { DoSoftReset(); } break; case 7: - if (sub_81BF7A4(4) == 4 && gMain.newKeys & A_BUTTON) + if (berry_fix_text_update(4) == 4 && gMain.newKeys & A_BUTTON) { - gUnknown_030012B8->state = 1; + berry_fix_mb_manager->state = 1; } break; } } #ifdef NONMATCHING -static void sub_81BF5A4(void) +static void berry_fix_gpu_set(void) { s32 width; @@ -268,7 +268,7 @@ static void sub_81BF5A4(void) } #else -__attribute__((naked)) static void sub_81BF5A4(void) +__attribute__((naked)) static void berry_fix_gpu_set(void) { asm(".syntax unified\n" "\tpush {r4-r6,lr}\n" @@ -476,26 +476,26 @@ __attribute__((naked)) static void sub_81BF5A4(void) } #endif -static int sub_81BF7A4(int checkval) +static int berry_fix_text_update(int checkval) { - if (gUnknown_030012B8->unk1 == checkval) + if (berry_fix_mb_manager->unk1 == checkval) { return checkval; } - if (gUnknown_030012B8->unk1 == 6) + if (berry_fix_mb_manager->unk1 == 6) { - sub_81BF7E8(checkval); - gUnknown_030012B8->unk1 = checkval; + berry_fix_text_print(checkval); + berry_fix_mb_manager->unk1 = checkval; } else { - sub_81BF8D8(); - gUnknown_030012B8->unk1 = 6; + berry_fix_bg_hide(); + berry_fix_mb_manager->unk1 = 6; } - return gUnknown_030012B8->unk1; + return berry_fix_mb_manager->unk1; } -static void sub_81BF7E8(int scene) +static void berry_fix_text_print(int scene) { FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 32, 32); FillWindowPixelBuffer(1, 0xAA); @@ -525,7 +525,7 @@ static void sub_81BF7E8(int scene) ShowBg(1); } -static void sub_81BF8D8() +static void berry_fix_bg_hide() { HideBg(0); HideBg(1); diff --git a/sym_bss.txt b/sym_bss.txt index 070e7e5f9..ce2549850 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -129,7 +129,7 @@ gUnknown_03000E06: @ 3000E06 .space 0x2 .include "src/play_time.o" - + .align 2 gUnknown_03000E0C: @ 3000E0C @@ -376,8 +376,7 @@ gUnknown_03001298: @ 3001298 gUnknown_030012A8: @ 30012A8 .space 0x10 -gUnknown_030012B8: @ 30012B8 - .space 0x4 + .include "src/berry_fix_program.o" gUnknown_030012BC: @ 30012BC .space 0x4 From 9a0438af6abb2a90e1004ae686e504bf8e2335da Mon Sep 17 00:00:00 2001 From: yenatch Date: Mon, 18 Sep 2017 17:44:55 -0400 Subject: [PATCH 207/342] battle_3: tabs --- src/battle_3.c | 66 +++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/battle_3.c b/src/battle_3.c index d5d14e040..a2ddd1c2d 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -1689,11 +1689,11 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) if (gBankAttacker >= gNoOfAllBanks) gBankAttacker = bank; switch (gLastUsedAbility) - { - case 0xFF: //weather from overworld + { + case 0xFF: //weather from overworld //_08042A86 - switch (weather_get_current()) - { + switch (weather_get_current()) + { case 3: case 5: case 13: @@ -1723,34 +1723,34 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) effect++; } break; - } - if (effect) + } + if (effect) { gBattleCommunication[MULTISTRING_CHOOSER] = weather_get_current(); b_push_move_exec(gUnknown_082DACE7); } - break; - case ABILITY_DRIZZLE: + break; + case ABILITY_DRIZZLE: //_08042B78 - if (!(gBattleWeather & WEATHER_RAIN_PERMANENT)) + if (!(gBattleWeather & WEATHER_RAIN_PERMANENT)) { gBattleWeather = (WEATHER_RAIN_PERMANENT | WEATHER_RAIN_TEMPORARY); b_push_move_exec(BattleScript_DrizzleActivates); gBattleScripting.bank = bank; effect++; } - break; - case ABILITY_SAND_STREAM: + break; + case ABILITY_SAND_STREAM: //_08042BA8 - if (!(gBattleWeather & WEATHER_SANDSTORM_PERMANENT)) + if (!(gBattleWeather & WEATHER_SANDSTORM_PERMANENT)) { gBattleWeather = (WEATHER_SANDSTORM_PERMANENT | WEATHER_SANDSTORM_TEMPORARY); b_push_move_exec(BattleScript_SandstreamActivates); gBattleScripting.bank = bank; effect++; } - break; - case ABILITY_DROUGHT: + break; + case ABILITY_DROUGHT: //_08042BD8 if (!(gBattleWeather & WEATHER_SUN_PERMANENT)) { @@ -1759,16 +1759,16 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) gBattleScripting.bank = bank; effect++; } - break; - case ABILITY_INTIMIDATE: + break; + case ABILITY_INTIMIDATE: //_08042C08 if (!(gSpecialStatuses[bank].intimidatedPoke)) { gStatuses3[bank] |= STATUS3_INTIMIDATE_POKES; gSpecialStatuses[bank].intimidatedPoke = 1; } - break; - case ABILITY_FORECAST: + break; + case ABILITY_FORECAST: //_08042C3C effect = CastformDataTypeChange(bank); if (effect != 0) @@ -1777,20 +1777,20 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) gBattleScripting.bank = bank; gBattleStruct->formToChangeInto = effect - 1; } - break; - case ABILITY_TRACE: - if (!(gSpecialStatuses[bank].traced)) + break; + case ABILITY_TRACE: + if (!(gSpecialStatuses[bank].traced)) { gStatuses3[bank] |= STATUS3_TRACE; gSpecialStatuses[bank].traced = 1; } - break; - case ABILITY_CLOUD_NINE: - case ABILITY_AIR_LOCK: - { - u8 i; + break; + case ABILITY_CLOUD_NINE: + case ABILITY_AIR_LOCK: + { + u8 i; - for (i = 0; i < gNoOfAllBanks; i++) + for (i = 0; i < gNoOfAllBanks; i++) { // TODO: i should be in r6 here //asm("":::"r4","r5"); @@ -1803,10 +1803,10 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) break; } } - } - break; - } - break; + } + break; + } + break; case ABILITYEFFECT_ENDTURN: // 1 //_08042CDC if (gBattleMons[bank].hp != 0) @@ -2435,7 +2435,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) { asm( "\n\ - .syntax unified\n\ + .syntax unified\n\ push {r4-r7,lr}\n\ mov r7, r10\n\ mov r6, r9\n\ @@ -5459,7 +5459,7 @@ _0804443A:\n\ pop {r1}\n\ bx r1\n\ .pool\n\ - .syntax divided"); + .syntax divided"); } #endif // NONMATCHING From 2e7127284f98cb4c8c02b1a41a19fdc73ed4eb79 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 18 Sep 2017 23:48:47 +0200 Subject: [PATCH 208/342] egg hatch almost decompiled --- asm/battle_4.s | 2 +- asm/egg_hatch.s | 1008 ---------------------------------- asm/main_menu.s | 2 +- asm/naming_screen.s | 16 +- asm/pokemon_storage_system.s | 2 +- asm/tv.s | 4 +- asm/walda_phrase.s | 2 +- data/data3.s | 2 +- data/strings.s | 4 +- include/bg.h | 2 + include/pokemon.h | 4 + include/text.h | 15 +- src/egg_hatch.c | 379 +++++++++++-- src/pokemon_3.c | 2 - src/text.c | 3 +- 15 files changed, 381 insertions(+), 1066 deletions(-) diff --git a/asm/battle_4.s b/asm/battle_4.s index 8651b9724..a1c1ddf7f 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -30996,7 +30996,7 @@ _08056D0A: movs r0, 0x2 adds r2, r6, 0 adds r3, r5, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen ldr r1, =gBattleCommunication ldrb r0, [r1] adds r0, 0x1 diff --git a/asm/egg_hatch.s b/asm/egg_hatch.s index d97fc8c65..194aedd7b 100644 --- a/asm/egg_hatch.s +++ b/asm/egg_hatch.s @@ -5,1014 +5,6 @@ .text - - thumb_func_start EggHatchSetMonNickname -EggHatchSetMonNickname: @ 80719FC - push {lr} - ldr r0, =gSpecialVar_0x8004 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - ldr r2, =gStringVar3 - movs r1, 0x2 - bl SetMonData - bl sub_805F094 - ldr r0, =gEggHatchData - ldr r0, [r0] - bl Free - ldr r0, =c2_exit_to_overworld_2_switch - bl SetMainCallback2 - pop {r0} - bx r0 - .pool - thumb_func_end EggHatchSetMonNickname - - thumb_func_start Task_EggHatchPlayBGM -Task_EggHatchPlayBGM: @ 8071A3C - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - ldr r1, =gTasks - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - adds r4, r0, r1 - movs r1, 0x8 - ldrsh r0, [r4, r1] - cmp r0, 0 - bne _08071A5C - bl StopMapMusic - bl play_some_sound -_08071A5C: - movs r1, 0x8 - ldrsh r0, [r4, r1] - cmp r0, 0x1 - bne _08071A6C - movs r0, 0xBC - lsls r0, 1 - bl PlayBGM -_08071A6C: - movs r1, 0x8 - ldrsh r0, [r4, r1] - cmp r0, 0x3C - ble _08071A80 - ldr r0, =0x00000179 - bl PlayBGM - adds r0, r5, 0 - bl DestroyTask -_08071A80: - ldrh r0, [r4, 0x8] - adds r0, 0x1 - strh r0, [r4, 0x8] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end Task_EggHatchPlayBGM - - thumb_func_start CB2_EggHatch_1 -CB2_EggHatch_1: @ 8071A94 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x8 - ldr r1, =gEggHatchData - ldr r0, [r1] - ldrb r0, [r0, 0x2] - adds r5, r1, 0 - cmp r0, 0xC - bls _08071AAC - b _08071E06 -_08071AAC: - lsls r0, 2 - ldr r1, =_08071AC0 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08071AC0: - .4byte _08071AF4 - .4byte _08071B40 - .4byte _08071B68 - .4byte _08071BA0 - .4byte _08071BF8 - .4byte _08071C24 - .4byte _08071C88 - .4byte _08071C96 - .4byte _08071CA4 - .4byte _08071CE8 - .4byte _08071D1C - .4byte _08071DB4 - .4byte _08071DD4 -_08071AF4: - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - ldr r0, =gUnknown_0832BFFC - movs r1, 0x78 - movs r2, 0x4B - movs r3, 0x5 - bl CreateSprite - ldr r4, =gEggHatchData - ldr r1, [r4] - strb r0, [r1] - movs r0, 0 - bl ShowBg - movs r0, 0x1 - bl ShowBg - ldr r1, [r4] - ldrb r0, [r1, 0x2] - adds r0, 0x1 - strb r0, [r1, 0x2] - ldr r0, =Task_EggHatchPlayBGM - movs r1, 0x5 - bl CreateTask - b _08071E06 - .pool -_08071B40: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - beq _08071B52 - b _08071E06 -_08071B52: - ldr r0, [r5] - ldrb r0, [r0, 0x8] - movs r1, 0 - bl FillWindowPixelBuffer - ldr r0, [r5] - strb r4, [r0, 0x3] - ldr r1, [r5] - b _08071DC8 - .pool -_08071B68: - ldr r1, [r5] - ldrb r0, [r1, 0x3] - adds r0, 0x1 - strb r0, [r1, 0x3] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1E - bhi _08071B7A - b _08071E06 -_08071B7A: - ldr r1, [r5] - ldrb r0, [r1, 0x2] - adds r0, 0x1 - strb r0, [r1, 0x2] - ldr r2, =gSprites - ldr r0, [r5] - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r2, 0x1C - adds r0, r2 - ldr r1, =SpriteCB_Egg_0 - str r1, [r0] - b _08071E06 - .pool -_08071BA0: - ldr r4, =gSprites - ldr r2, [r5] - ldrb r1, [r2] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r1, r4, 0 - adds r1, 0x1C - adds r0, r1 - ldr r1, [r0] - ldr r0, =SpriteCallbackDummy - cmp r1, r0 - beq _08071BBC - b _08071E06 -_08071BBC: - ldrb r1, [r2, 0x4] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0xB - bl GetMonData - lsls r0, 16 - lsrs r7, r0, 16 - ldr r0, [r5] - ldrb r1, [r0, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - adds r1, r7, 0 - movs r2, 0 - movs r3, 0x1 - bl DoMonFrontSpriteAnimation - ldr r1, [r5] - b _08071DC8 - .pool -_08071BF8: - ldr r2, =gSprites - ldr r3, [r5] - ldrb r1, [r3, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r2, 0x1C - adds r0, r2 - ldr r1, [r0] - ldr r0, =SpriteCallbackDummy - cmp r1, r0 - beq _08071C12 - b _08071E06 -_08071C12: - ldrb r0, [r3, 0x2] - adds r0, 0x1 - strb r0, [r3, 0x2] - b _08071E06 - .pool -_08071C24: - ldr r0, [r5] - ldrb r1, [r0, 0x4] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - ldr r1, =gStringVar1 - bl GetMonNick - ldr r4, =gStringVar4 - ldr r1, =gUnknown_085ED5A5 - adds r0, r4, 0 - bl StringExpandPlaceholders - ldr r0, [r5] - ldrb r0, [r0, 0x8] - movs r1, 0xFF - str r1, [sp] - adds r1, r4, 0 - movs r2, 0 - movs r3, 0x3 - bl sub_8072214 - ldr r0, =0x00000173 - bl PlayFanfare - ldr r1, [r5] - ldrb r0, [r1, 0x2] - adds r0, 0x1 - strb r0, [r1, 0x2] - ldr r0, [r5] - ldrb r0, [r0, 0x8] - bl PutWindowTilemap - ldr r0, [r5] - ldrb r0, [r0, 0x8] - movs r1, 0x3 - bl CopyWindowToVram - b _08071E06 - .pool -_08071C88: - bl IsFanfareTaskInactive - lsls r0, 24 - cmp r0, 0 - bne _08071C94 - b _08071E06 -_08071C94: - b _08071DC4 -_08071C96: - bl IsFanfareTaskInactive - lsls r0, 24 - cmp r0, 0 - bne _08071CA2 - b _08071E06 -_08071CA2: - b _08071DC4 -_08071CA4: - ldr r0, [r5] - ldrb r1, [r0, 0x4] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - ldr r1, =gStringVar1 - bl GetMonNick - ldr r4, =gStringVar4 - ldr r1, =gUnknown_085ED5BE - adds r0, r4, 0 - bl StringExpandPlaceholders - ldr r0, [r5] - ldrb r0, [r0, 0x8] - movs r1, 0x1 - str r1, [sp] - adds r1, r4, 0 - movs r2, 0 - movs r3, 0x2 - bl sub_8072214 - ldr r1, [r5] - b _08071DC8 - .pool -_08071CE8: - ldr r0, [r5] - ldrb r0, [r0, 0x8] - bl IsTextPrinterActive - lsls r0, 16 - cmp r0, 0 - beq _08071CF8 - b _08071E06 -_08071CF8: - ldr r0, [r5] - ldrb r0, [r0, 0x8] - movs r4, 0xA0 - lsls r4, 1 - adds r1, r4, 0 - movs r2, 0xE0 - bl sub_809882C - ldr r0, =gUnknown_0832C07C - adds r1, r4, 0 - movs r2, 0xE - movs r3, 0 - bl CreateYesNoMenu - ldr r1, [r5] - b _08071DC8 - .pool -_08071D1C: - bl sub_8198C58 - lsls r0, 24 - asrs r1, r0, 24 - cmp r1, 0 - beq _08071D3C - cmp r1, 0 - bgt _08071D36 - movs r0, 0x1 - negs r0, r0 - cmp r1, r0 - beq _08071DC4 - b _08071E06 -_08071D36: - cmp r1, 0x1 - beq _08071DC4 - b _08071E06 -_08071D3C: - ldr r0, =gEggHatchData - mov r8, r0 - ldr r0, [r0] - ldrb r0, [r0, 0x4] - movs r6, 0x64 - muls r0, r6 - ldr r5, =gPlayerParty - adds r0, r5 - ldr r1, =gStringVar3 - mov r9, r1 - bl GetMonNick - mov r1, r8 - ldr r0, [r1] - ldrb r0, [r0, 0x4] - muls r0, r6 - adds r0, r5 - movs r1, 0xB - bl GetMonData - lsls r0, 16 - lsrs r7, r0, 16 - mov r1, r8 - ldr r0, [r1] - ldrb r0, [r0, 0x4] - muls r0, r6 - adds r0, r5 - bl GetMonGender - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - mov r1, r8 - ldr r0, [r1] - ldrb r0, [r0, 0x4] - muls r0, r6 - adds r0, r5 - movs r1, 0 - movs r2, 0 - bl GetMonData - str r0, [sp] - ldr r0, =EggHatchSetMonNickname - str r0, [sp, 0x4] - movs r0, 0x3 - mov r1, r9 - adds r2, r7, 0 - adds r3, r4, 0 - bl do_choose_name_or_words_screen - b _08071E06 - .pool -_08071DB4: - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade -_08071DC4: - ldr r0, =gEggHatchData - ldr r1, [r0] -_08071DC8: - ldrb r0, [r1, 0x2] - adds r0, 0x1 - strb r0, [r1, 0x2] - b _08071E06 - .pool -_08071DD4: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08071E06 - bl sub_805F094 - ldr r4, =gEggHatchData - ldr r0, [r4] - ldrb r0, [r0, 0x8] - bl RemoveWindow - movs r0, 0 - bl UnsetBgTilemapBuffer - movs r0, 0x1 - bl UnsetBgTilemapBuffer - ldr r0, [r4] - bl Free - ldr r0, =c2_exit_to_overworld_2_switch - bl SetMainCallback2 -_08071E06: - bl RunTasks - bl RunTextPrinters - bl AnimateSprites - bl BuildOamBuffer - bl UpdatePaletteFade - add sp, 0x8 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end CB2_EggHatch_1 - - thumb_func_start SpriteCB_Egg_0 -SpriteCB_Egg_0: @ 8071E34 - push {r4,lr} - adds r4, r0, 0 - ldrh r0, [r4, 0x2E] - adds r0, 0x1 - strh r0, [r4, 0x2E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x14 - ble _08071E54 - ldr r0, =SpriteCB_Egg_1 - str r0, [r4, 0x1C] - movs r0, 0 - strh r0, [r4, 0x2E] - b _08071E84 - .pool -_08071E54: - ldrh r0, [r4, 0x30] - adds r0, 0x14 - movs r1, 0xFF - ands r0, r1 - strh r0, [r4, 0x30] - movs r1, 0x30 - ldrsh r0, [r4, r1] - movs r1, 0x1 - bl Sin - strh r0, [r4, 0x24] - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0xF - bne _08071E84 - movs r0, 0x17 - bl PlaySE - adds r0, r4, 0 - movs r1, 0x1 - bl StartSpriteAnim - bl CreateRandomEggShardSprite -_08071E84: - pop {r4} - pop {r0} - bx r0 - thumb_func_end SpriteCB_Egg_0 - - thumb_func_start SpriteCB_Egg_1 -SpriteCB_Egg_1: @ 8071E8C - push {r4,lr} - adds r4, r0, 0 - ldrh r0, [r4, 0x32] - adds r0, 0x1 - movs r1, 0 - strh r0, [r4, 0x32] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x1E - ble _08071EE8 - ldrh r0, [r4, 0x2E] - adds r0, 0x1 - strh r0, [r4, 0x2E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x14 - ble _08071EBC - ldr r0, =SpriteCB_Egg_2 - str r0, [r4, 0x1C] - strh r1, [r4, 0x2E] - strh r1, [r4, 0x32] - b _08071EE8 - .pool -_08071EBC: - ldrh r0, [r4, 0x30] - adds r0, 0x14 - movs r1, 0xFF - ands r0, r1 - strh r0, [r4, 0x30] - movs r1, 0x30 - ldrsh r0, [r4, r1] - movs r1, 0x2 - bl Sin - strh r0, [r4, 0x24] - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0xF - bne _08071EE8 - movs r0, 0x17 - bl PlaySE - adds r0, r4, 0 - movs r1, 0x2 - bl StartSpriteAnim -_08071EE8: - pop {r4} - pop {r0} - bx r0 - thumb_func_end SpriteCB_Egg_1 - - thumb_func_start SpriteCB_Egg_2 -SpriteCB_Egg_2: @ 8071EF0 - push {r4,r5,lr} - adds r4, r0, 0 - ldrh r0, [r4, 0x32] - adds r0, 0x1 - movs r5, 0 - strh r0, [r4, 0x32] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x1E - ble _08071F9E - ldrh r0, [r4, 0x2E] - adds r0, 0x1 - strh r0, [r4, 0x2E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x26 - ble _08071F5C - ldr r0, =SpriteCB_Egg_3 - str r0, [r4, 0x1C] - strh r5, [r4, 0x2E] - ldr r4, =gEggHatchData - ldr r0, [r4] - ldrb r1, [r0, 0x4] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0xB - bl GetMonData - ldr r3, =gSprites - ldr r2, [r4] - ldrb r1, [r2, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r3 - strh r5, [r0, 0x24] - ldrb r1, [r2, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r3 - strh r5, [r0, 0x26] - b _08071F9E - .pool -_08071F5C: - ldrh r0, [r4, 0x30] - adds r0, 0x14 - movs r1, 0xFF - ands r0, r1 - strh r0, [r4, 0x30] - movs r1, 0x30 - ldrsh r0, [r4, r1] - movs r1, 0x2 - bl Sin - strh r0, [r4, 0x24] - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0xF - bne _08071F90 - movs r0, 0x17 - bl PlaySE - adds r0, r4, 0 - movs r1, 0x2 - bl StartSpriteAnim - bl CreateRandomEggShardSprite - bl CreateRandomEggShardSprite -_08071F90: - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0x1E - bne _08071F9E - movs r0, 0x17 - bl PlaySE -_08071F9E: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end SpriteCB_Egg_2 - - thumb_func_start SpriteCB_Egg_3 -SpriteCB_Egg_3: @ 8071FA4 - push {lr} - adds r1, r0, 0 - ldrh r0, [r1, 0x2E] - adds r0, 0x1 - strh r0, [r1, 0x2E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x32 - ble _08071FBE - ldr r0, =SpriteCB_Egg_4 - str r0, [r1, 0x1C] - movs r0, 0 - strh r0, [r1, 0x2E] -_08071FBE: - pop {r0} - bx r0 - .pool - thumb_func_end SpriteCB_Egg_3 - - thumb_func_start SpriteCB_Egg_4 -SpriteCB_Egg_4: @ 8071FC8 - push {r4,r5,lr} - sub sp, 0x4 - adds r5, r0, 0 - movs r1, 0x2E - ldrsh r0, [r5, r1] - cmp r0, 0 - bne _08071FE8 - movs r1, 0x1 - negs r1, r1 - ldr r0, =0x0000ffff - str r0, [sp] - adds r0, r1, 0 - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade -_08071FE8: - ldrh r0, [r5, 0x2E] - cmp r0, 0x3 - bhi _08072004 - movs r4, 0 -_08071FF0: - bl CreateRandomEggShardSprite - lsls r0, r4, 16 - movs r1, 0x80 - lsls r1, 9 - adds r0, r1 - lsrs r4, r0, 16 - asrs r0, 16 - cmp r0, 0x3 - ble _08071FF0 -_08072004: - ldrh r0, [r5, 0x2E] - adds r0, 0x1 - strh r0, [r5, 0x2E] - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - bne _08072032 - movs r0, 0x71 - bl PlaySE - adds r2, r5, 0 - adds r2, 0x3E - ldrb r0, [r2] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r2] - ldr r0, =SpriteCB_Egg_5 - str r0, [r5, 0x1C] - strh r4, [r5, 0x2E] -_08072032: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end SpriteCB_Egg_4 - - thumb_func_start SpriteCB_Egg_5 -SpriteCB_Egg_5: @ 8072048 - push {r4,r5,lr} - sub sp, 0x4 - adds r5, r0, 0 - movs r1, 0x2E - ldrsh r0, [r5, r1] - cmp r0, 0 - bne _08072084 - ldr r4, =gSprites - ldr r3, =gEggHatchData - ldr r0, [r3] - ldrb r1, [r0, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - adds r0, 0x3E - ldrb r2, [r0] - movs r1, 0x5 - negs r1, r1 - ands r1, r2 - strb r1, [r0] - ldr r0, [r3] - ldrb r1, [r0, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - movs r1, 0x1 - bl StartSpriteAffineAnim -_08072084: - movs r2, 0x2E - ldrsh r0, [r5, r2] - cmp r0, 0x8 - bne _0807209E - movs r1, 0x1 - negs r1, r1 - ldr r0, =0x0000ffff - str r0, [sp] - adds r0, r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade -_0807209E: - movs r1, 0x2E - ldrsh r0, [r5, r1] - cmp r0, 0x9 - bgt _080720BC - ldr r2, =gSprites - ldr r0, =gEggHatchData - ldr r0, [r0] - ldrb r1, [r0, 0x1] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrh r1, [r0, 0x22] - subs r1, 0x1 - strh r1, [r0, 0x22] -_080720BC: - ldrh r1, [r5, 0x2E] - movs r2, 0x2E - ldrsh r0, [r5, r2] - cmp r0, 0x28 - ble _080720CA - ldr r0, =SpriteCallbackDummy - str r0, [r5, 0x1C] -_080720CA: - adds r0, r1, 0x1 - strh r0, [r5, 0x2E] - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end SpriteCB_Egg_5 - - thumb_func_start SpriteCB_EggShard -SpriteCB_EggShard: @ 80720E8 - push {r4,lr} - adds r2, r0, 0 - ldrh r0, [r2, 0x30] - ldrh r1, [r2, 0x36] - adds r0, r1 - strh r0, [r2, 0x36] - ldrh r1, [r2, 0x32] - ldrh r3, [r2, 0x38] - adds r0, r1, r3 - strh r0, [r2, 0x38] - movs r4, 0x36 - ldrsh r0, [r2, r4] - cmp r0, 0 - bge _08072106 - adds r0, 0xFF -_08072106: - asrs r0, 8 - strh r0, [r2, 0x24] - movs r3, 0x38 - ldrsh r0, [r2, r3] - cmp r0, 0 - bge _08072114 - adds r0, 0xFF -_08072114: - asrs r0, 8 - strh r0, [r2, 0x26] - ldrh r0, [r2, 0x34] - adds r3, r1, r0 - strh r3, [r2, 0x32] - movs r4, 0x22 - ldrsh r1, [r2, r4] - movs r4, 0x26 - ldrsh r0, [r2, r4] - adds r0, r1, r0 - adds r1, 0x14 - cmp r0, r1 - ble _0807213A - lsls r0, r3, 16 - cmp r0, 0 - ble _0807213A - adds r0, r2, 0 - bl DestroySprite -_0807213A: - pop {r4} - pop {r0} - bx r0 - thumb_func_end SpriteCB_EggShard - - thumb_func_start CreateRandomEggShardSprite -CreateRandomEggShardSprite: @ 8072140 - push {r4-r6,lr} - sub sp, 0x8 - ldr r2, =gUnknown_0832C084 - ldr r0, =gEggHatchData - ldr r6, [r0] - ldrb r3, [r6, 0x7] - lsls r0, r3, 2 - adds r1, r0, r2 - ldrh r5, [r1] - adds r2, 0x2 - adds r0, r2 - ldrh r4, [r0] - adds r3, 0x1 - strb r3, [r6, 0x7] - bl Random - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - lsls r5, 16 - asrs r5, 16 - lsls r4, 16 - asrs r4, 16 - movs r0, 0x64 - str r0, [sp] - lsrs r1, 16 - str r1, [sp, 0x4] - movs r0, 0x78 - movs r1, 0x3C - adds r2, r5, 0 - adds r3, r4, 0 - bl CreateEggShardSprite - add sp, 0x8 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end CreateRandomEggShardSprite - - thumb_func_start CreateEggShardSprite -CreateEggShardSprite: @ 8072194 - push {r4-r6,lr} - mov r6, r10 - mov r5, r9 - mov r4, r8 - push {r4-r6} - adds r4, r0, 0 - adds r5, r1, 0 - adds r6, r2, 0 - mov r8, r3 - ldr r0, [sp, 0x1C] - mov r9, r0 - ldr r1, [sp, 0x20] - mov r10, r1 - lsls r4, 24 - lsrs r4, 24 - lsls r5, 24 - lsrs r5, 24 - lsls r6, 16 - lsrs r6, 16 - mov r0, r8 - lsls r0, 16 - lsrs r0, 16 - mov r8, r0 - mov r1, r9 - lsls r1, 16 - lsrs r1, 16 - mov r9, r1 - mov r0, r10 - lsls r0, 24 - lsrs r0, 24 - mov r10, r0 - ldr r0, =gUnknown_0832C04C - adds r1, r4, 0 - adds r2, r5, 0 - movs r3, 0x4 - bl CreateSprite - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - ldr r2, =gSprites - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - strh r6, [r0, 0x30] - mov r1, r8 - strh r1, [r0, 0x32] - mov r1, r9 - strh r1, [r0, 0x34] - mov r1, r10 - bl StartSpriteAnim - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end CreateEggShardSprite - - thumb_func_start sub_8072214 -sub_8072214: @ 8072214 - push {r4-r6,lr} - mov r6, r9 - mov r5, r8 - push {r5,r6} - sub sp, 0x14 - adds r5, r0, 0 - mov r9, r1 - adds r6, r2, 0 - mov r8, r3 - ldr r4, [sp, 0x2C] - lsls r5, 24 - lsrs r5, 24 - lsls r6, 24 - lsrs r6, 24 - mov r0, r8 - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - lsls r4, 24 - lsrs r4, 24 - adds r0, r5, 0 - movs r1, 0xFF - bl FillWindowPixelBuffer - ldr r3, =gEggHatchData - ldr r0, [r3] - movs r2, 0 - strb r2, [r0, 0xE] - ldr r1, [r3] - movs r0, 0x5 - strb r0, [r1, 0xF] - ldr r1, [r3] - movs r0, 0x6 - strb r0, [r1, 0x10] - str r2, [sp] - str r2, [sp, 0x4] - ldr r0, [r3] - adds r0, 0xE - str r0, [sp, 0x8] - lsls r4, 24 - asrs r4, 24 - str r4, [sp, 0xC] - mov r0, r9 - str r0, [sp, 0x10] - adds r0, r5, 0 - movs r1, 0x1 - adds r2, r6, 0 - mov r3, r8 - bl AddTextPrinterParametrized2 - add sp, 0x14 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8072214 - thumb_func_start sub_807228C sub_807228C: @ 807228C push {r4-r6,lr} diff --git a/asm/main_menu.s b/asm/main_menu.s index ed04ba6f3..273d5d3b0 100644 --- a/asm/main_menu.s +++ b/asm/main_menu.s @@ -2951,7 +2951,7 @@ task_new_game_prof_birch_speech_17: @ 8031090 str r0, [sp, 0x4] movs r0, 0 movs r3, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen _080310EC: add sp, 0x8 pop {r4,r5} diff --git a/asm/naming_screen.s b/asm/naming_screen.s index 2d79e464a..40ec65ff8 100644 --- a/asm/naming_screen.s +++ b/asm/naming_screen.s @@ -5,9 +5,9 @@ .text - thumb_func_start do_choose_name_or_words_screen -@ int do_choose_name_or_words_screen(u8 type, sav2 *sav2_ptr, s16 player_gender, s16 a4, int a5, void ( *after_finishing_callback)()) -do_choose_name_or_words_screen: @ 80E2D78 + thumb_func_start DoNamingScreen +@ int DoNamingScreen(u8 type, sav2 *sav2_ptr, s16 player_gender, s16 a4, int a5, void ( *after_finishing_callback)()) +DoNamingScreen: @ 80E2D78 push {r4-r7,lr} mov r7, r8 push {r7} @@ -65,7 +65,7 @@ _080E2DE2: pop {r0} bx r0 .pool - thumb_func_end do_choose_name_or_words_screen + thumb_func_end DoNamingScreen thumb_func_start c2_choose_name_or_words_screen c2_choose_name_or_words_screen: @ 80E2E04 @@ -4197,7 +4197,7 @@ sub_80E5074: @ 80E5074 str r0, [sp, 0x4] movs r0, 0 movs r3, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen add sp, 0x8 pop {r0} bx r0 @@ -4217,7 +4217,7 @@ sub_80E509C: @ 80E509C str r0, [sp, 0x4] movs r0, 0x1 movs r3, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen add sp, 0x8 pop {r0} bx r0 @@ -4237,7 +4237,7 @@ sub_80E50C4: @ 80E50C4 str r0, [sp, 0x4] movs r0, 0x2 movs r3, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen add sp, 0x8 pop {r0} bx r0 @@ -4257,7 +4257,7 @@ sub_80E50EC: @ 80E50EC str r0, [sp, 0x4] movs r0, 0x3 movs r3, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen add sp, 0x8 pop {r0} bx r0 diff --git a/asm/pokemon_storage_system.s b/asm/pokemon_storage_system.s index 3aca5c92d..af99e27e8 100755 --- a/asm/pokemon_storage_system.s +++ b/asm/pokemon_storage_system.s @@ -5433,7 +5433,7 @@ _080C9F1C: movs r0, 0x1 movs r2, 0 movs r3, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen b _080C9F56 .pool _080C9F48: diff --git a/asm/tv.s b/asm/tv.s index 2ebdfc0a1..357cd3735 100644 --- a/asm/tv.s +++ b/asm/tv.s @@ -7530,7 +7530,7 @@ sub_80EFDDC: @ 80EFDDC mov r1, r10 adds r2, r5, 0 adds r3, r4, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen add sp, 0x8 pop {r3-r5} mov r8, r3 @@ -7604,7 +7604,7 @@ sub_80EFEC4: @ 80EFEC4 mov r1, r8 adds r2, r5, 0 adds r3, r4, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen add sp, 0x8 pop {r3} mov r8, r3 diff --git a/asm/walda_phrase.s b/asm/walda_phrase.s index dd5f30049..f7a1be6c2 100755 --- a/asm/walda_phrase.s +++ b/asm/walda_phrase.s @@ -22,7 +22,7 @@ walda_maybe: @ 81D99E4 adds r1, r4, 0 movs r2, 0 movs r3, 0 - bl do_choose_name_or_words_screen + bl DoNamingScreen add sp, 0x8 pop {r4} pop {r0} diff --git a/data/data3.s b/data/data3.s index 7af7a70e8..2a20d3693 100644 --- a/data/data3.s +++ b/data/data3.s @@ -50,7 +50,7 @@ gUnknown_0832C06C:: @ 832C06C gUnknown_0832C07C:: @ 832C07C .incbin "baserom.gba", 0x32c07c, 0x8 -gUnknown_0832C084:: @ 832C084 +sEggShardVelocities:: @ 832C084 .incbin "baserom.gba", 0x32c084, 0x4c gUnknown_0832C0D0:: @ 832C0D0 diff --git a/data/strings.s b/data/strings.s index c8a1b7683..485b4b5c2 100644 --- a/data/strings.s +++ b/data/strings.s @@ -2277,10 +2277,10 @@ gUnknown_085ED44A:: @ 85ED44A .string "My POKéMON and I help$" .string "my father’s research.$" -gUnknown_085ED5A5:: @ 85ED5A5 +gOtherText_HatchedFromEgg:: @ 85ED5A5 .string "{STR_VAR_1} hatched from the EGG!$" -gUnknown_085ED5BE:: @ 85ED5BE +gOtherText_NickHatchPrompt:: @ 85ED5BE .string "Would you like to nickname the newly\nhatched {STR_VAR_1}?$" .align 2 diff --git a/include/bg.h b/include/bg.h index ca21070e0..24484dd86 100644 --- a/include/bg.h +++ b/include/bg.h @@ -39,5 +39,7 @@ void UnsetBgTilemapBuffer(u8 bg); void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset); void CopyBgTilemapBufferToVram(u8 bg); u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset); +void ShowBg(u8 bg); +void HideBg(u8 bg); #endif // GUARD_BG_H diff --git a/include/pokemon.h b/include/pokemon.h index fefe2bd28..3472da04b 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -614,4 +614,8 @@ bool8 IsPokeSpriteNotFlipped(u16 species); bool8 IsMonShiny(struct Pokemon *mon); bool8 IsShinyOtIdPersonality(u32 otId, u32 personality); +#include "sprite.h" + +void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3); + #endif // GUARD_POKEMON_H diff --git a/include/text.h b/include/text.h index 5aadaac32..f584b61ea 100644 --- a/include/text.h +++ b/include/text.h @@ -138,17 +138,26 @@ struct FontInfo u8 shadowColor:4; }; -struct GlyphWidthFunc{ +struct GlyphWidthFunc +{ u32 font_id; u32 (*func)(u16 glyphId, bool32 isJapanese); }; -struct KeypadIcon { +struct KeypadIcon +{ u16 tile_offset; u8 width; u8 height; }; +struct __attribute__((packed)) TextColor +{ + u8 fgColor; + u8 bgColor; + u8 shadowColor; +}; + extern u8 gStringVar1[]; extern u8 gStringVar2[]; extern u8 gStringVar3[]; @@ -159,7 +168,7 @@ void DeactivateAllTextPrinters(void); u16 PrintTextOnWindow(u8 windowId, u8 fontId, u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextSubPrinter *, u16)); bool16 AddTextPrinter(struct TextSubPrinter *textSubPrinter, u8 speed, void (*callback)(struct TextSubPrinter *, u16)); void RunTextPrinters(void); -bool8 IsTextPrinterActive(u8 id); +bool16 IsTextPrinterActive(u8 id); u32 RenderFont(struct TextPrinter *textPrinter); void GenerateFontHalfRowLookupTable(u8 fgColor, u8 bgColor, u8 shadowColor); void SaveTextColors(u8 *fgColor, u8 *bgColor, u8 *shadowColor); diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 0b924fced..fc079444c 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -31,20 +31,14 @@ struct EggHatchData u8 CB2_state; u8 CB2_PalCounter; u8 eggPartyID; - u8 field_5; - u8 field_6; + u8 unused_5; + u8 unused_6; u8 eggShardVelocityID; - u8 field_8; - u8 field_9; - u8 field_A; - u8 field_B; + u8 windowId; + u8 unused_9; + u8 unused_A; u16 species; - u8 field_E; - u8 field_F; - u8 field_10; - u8 field_11; - u8 field_12; - u8 field_13; + struct TextColor textColor; }; extern struct EggHatchData* gEggHatchData; @@ -68,31 +62,36 @@ extern const u32 gUnknown_08331F60[]; // tilemap gameboy circle extern u8* GetMonNick(struct Pokemon* mon, u8* dst); extern u8* GetBoxMonNick(struct BoxPokemon* boxMon, u8* dst); extern u8 sav1_map_get_name(void); +extern s8 sub_8198C58(void); extern void sub_81DB5E8(u8* str1, u8* str2, u8); extern void sub_806A068(u16, u8); extern void fade_screen(u8, u8); extern void overworld_free_bg_tilemaps(void); extern void sub_80AF168(void); extern void init_uns_table_pokemon_copy(void); +extern void sub_805F094(void); extern void remove_some_task(void); extern void reset_temp_tile_data_buffers(void); +extern void c2_exit_to_overworld_2_switch(void); +extern void play_some_sound(void); extern void copy_decompressed_tile_data_to_vram_autofree(u8 bg_id, const void* src, u16 size, u16 offset, u8 mode); +extern void CreateYesNoMenu(const u8*, u16, u8, u8); +extern void DoNamingScreen(u8, const u8*, u16, u8, u32, MainCallback); +extern void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor* colors, s8 speed, u8 *str); - void Task_EggHatch(u8 taskID); - void CB2_EggHatch_0(void); - void CB2_EggHatch_1(void); - void SpriteCB_Egg_0(struct Sprite* sprite); - void SpriteCB_Egg_1(struct Sprite* sprite); - void SpriteCB_Egg_2(struct Sprite* sprite); - void SpriteCB_Egg_3(struct Sprite* sprite); - void SpriteCB_Egg_4(struct Sprite* sprite); - void SpriteCB_Egg_5(struct Sprite* sprite); - void SpriteCB_EggShard(struct Sprite* sprite); - void EggHatchPrintMessage2(u8* src); - void EggHatchPrintMessage1(u8* src); - bool8 EggHatchUpdateWindowText(void); - void CreateRandomEggShardSprite(void); - void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex); +static void Task_EggHatch(u8 taskID); +static void CB2_EggHatch_0(void); +static void CB2_EggHatch_1(void); +static void SpriteCB_Egg_0(struct Sprite* sprite); +static void SpriteCB_Egg_1(struct Sprite* sprite); +static void SpriteCB_Egg_2(struct Sprite* sprite); +static void SpriteCB_Egg_3(struct Sprite* sprite); +static void SpriteCB_Egg_4(struct Sprite* sprite); +static void SpriteCB_Egg_5(struct Sprite* sprite); +static void SpriteCB_EggShard(struct Sprite* sprite); +static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed); +static void CreateRandomEggShardSprite(void); +static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex); static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp) { @@ -148,7 +147,7 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp) *egg = *temp; } -void AddHatchedMonToParty(u8 id) +static void AddHatchedMonToParty(u8 id) { u8 isEgg = 0x46; // ? u16 pokeNum; @@ -212,7 +211,7 @@ bool8 sub_8071614(void) return sub_807158C(&gSaveBlock1Ptr->daycare, gSpecialVar_0x8004); } -u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID, u16* speciesLoc) +static u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID, u16* speciesLoc) { u8 r5 = 0; u8 spriteID = 0; @@ -251,21 +250,21 @@ u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID, u16* speciesLoc) return spriteID; } -void VBlankCB_EggHatch(void) +static void VBlankCB_EggHatch(void) { LoadOam(); ProcessSpriteCopyRequests(); TransferPlttBuffer(); } -void EggHatch(void) +static void EggHatch(void) { ScriptContext2_Enable(); CreateTask(Task_EggHatch, 10); fade_screen(1, 0); } - void Task_EggHatch(u8 taskID) +static void Task_EggHatch(u8 taskID) { if (!gPaletteFade.active) { @@ -276,7 +275,7 @@ void EggHatch(void) } } - void CB2_EggHatch_0(void) +static void CB2_EggHatch_0(void) { switch (gMain.state) { @@ -315,7 +314,7 @@ void EggHatch(void) break; case 1: InitWindows(gUnknown_0832C06C); - gEggHatchData->field_8 = 0; + gEggHatchData->windowId = 0; gMain.state++; break; case 2: @@ -362,3 +361,315 @@ void EggHatch(void) BuildOamBuffer(); UpdatePaletteFade(); } + +static void EggHatchSetMonNickname(void) +{ + SetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar3); + sub_805F094(); + Free(gEggHatchData); + SetMainCallback2(c2_exit_to_overworld_2_switch); +} + +static void Task_EggHatchPlayBGM(u8 taskID) +{ + if (gTasks[taskID].data[0] == 0) + { + StopMapMusic(); + play_some_sound(); + } + if (gTasks[taskID].data[0] == 1) + PlayBGM(376); + if (gTasks[taskID].data[0] > 60) + { + PlayBGM(377); + DestroyTask(taskID); + // UB: task is destroyed, yet the value is incremented + } + gTasks[taskID].data[0]++; +} + +extern const struct SpriteTemplate gUnknown_0832BFFC; +extern const u8 gUnknown_0832C07C[]; +extern const u8 gOtherText_HatchedFromEgg[]; +extern const u8 gOtherText_NickHatchPrompt[]; + +static void CB2_EggHatch_1(void) +{ + u16 species; + u8 gender; + u32 personality; + + switch (gEggHatchData->CB2_state) + { + case 0: + BeginNormalPaletteFade(-1, 0, 0x10, 0, 0); + gEggHatchData->eggSpriteID = CreateSprite(&gUnknown_0832BFFC, 120, 75, 5); + ShowBg(0); + ShowBg(1); + gEggHatchData->CB2_state++; + CreateTask(Task_EggHatchPlayBGM, 5); + break; + case 1: + if (!gPaletteFade.active) + { + FillWindowPixelBuffer(gEggHatchData->windowId, 0); + gEggHatchData->CB2_PalCounter = 0; + gEggHatchData->CB2_state++; + } + break; + case 2: + if (++gEggHatchData->CB2_PalCounter > 30) + { + gEggHatchData->CB2_state++; + gSprites[gEggHatchData->eggSpriteID].callback = SpriteCB_Egg_0; + } + break; + case 3: + if (gSprites[gEggHatchData->eggSpriteID].callback == SpriteCallbackDummy) + { + species = GetMonData(&gPlayerParty[gEggHatchData->eggPartyID], MON_DATA_SPECIES); + DoMonFrontSpriteAnimation(&gSprites[gEggHatchData->pokeSpriteID], species, FALSE, 1); + gEggHatchData->CB2_state++; + } + break; + case 4: + if (gSprites[gEggHatchData->pokeSpriteID].callback == SpriteCallbackDummy) + { + gEggHatchData->CB2_state++; + } + break; + case 5: + GetMonNick(&gPlayerParty[gEggHatchData->eggPartyID], gStringVar1); + StringExpandPlaceholders(gStringVar4, gOtherText_HatchedFromEgg); + EggHatchPrintMessage(gEggHatchData->windowId, gStringVar4, 0, 3, 0xFF); + PlayFanfare(371); + gEggHatchData->CB2_state++; + PutWindowTilemap(gEggHatchData->windowId); + CopyWindowToVram(gEggHatchData->windowId, 3); + break; + case 6: + if (IsFanfareTaskInactive()) + gEggHatchData->CB2_state++; + break; + case 7: + if (IsFanfareTaskInactive()) + gEggHatchData->CB2_state++; + break; + case 8: + GetMonNick(&gPlayerParty[gEggHatchData->eggPartyID], gStringVar1); + StringExpandPlaceholders(gStringVar4, gOtherText_NickHatchPrompt); + EggHatchPrintMessage(gEggHatchData->windowId, gStringVar4, 0, 2, 1); + gEggHatchData->CB2_state++; + break; + case 9: + if (!IsTextPrinterActive(gEggHatchData->windowId)) + { + sub_809882C(gEggHatchData->windowId, 0x140, 0xE0); + CreateYesNoMenu(gUnknown_0832C07C, 0x140, 0xE, 0); + gEggHatchData->CB2_state++; + } + break; + case 10: + switch (sub_8198C58()) + { + case 0: + GetMonNick(&gPlayerParty[gEggHatchData->eggPartyID], gStringVar3); + species = GetMonData(&gPlayerParty[gEggHatchData->eggPartyID], MON_DATA_SPECIES); + gender = GetMonGender(&gPlayerParty[gEggHatchData->eggPartyID]); + personality = GetMonData(&gPlayerParty[gEggHatchData->eggPartyID], MON_DATA_PERSONALITY, 0); + DoNamingScreen(3, gStringVar3, species, gender, personality, EggHatchSetMonNickname); + break; + case 1: + case -1: + gEggHatchData->CB2_state++; + } + break; + case 11: + BeginNormalPaletteFade(-1, 0, 0, 0x10, 0); + gEggHatchData->CB2_state++; + break; + case 12: + if (!gPaletteFade.active) + { + sub_805F094(); + RemoveWindow(gEggHatchData->windowId); + UnsetBgTilemapBuffer(0); + UnsetBgTilemapBuffer(1); + Free(gEggHatchData); + SetMainCallback2(c2_exit_to_overworld_2_switch); + } + break; + } + + RunTasks(); + RunTextPrinters(); + AnimateSprites(); + BuildOamBuffer(); + UpdatePaletteFade(); +} + +static void SpriteCB_Egg_0(struct Sprite* sprite) +{ + if (++sprite->data0 > 20) + { + sprite->callback = SpriteCB_Egg_1; + sprite->data0 = 0; + } + else + { + sprite->data1 = (sprite->data1 + 20) & 0xFF; + sprite->pos2.x = Sin(sprite->data1, 1); + if (sprite->data0 == 15) + { + PlaySE(SE_BOWA); + StartSpriteAnim(sprite, 1); + CreateRandomEggShardSprite(); + } + } +} + +static void SpriteCB_Egg_1(struct Sprite* sprite) +{ + if (++sprite->data2 > 30) + { + if (++sprite->data0 > 20) + { + sprite->callback = SpriteCB_Egg_2; + sprite->data0 = 0; + sprite->data2 = 0; + } + else + { + sprite->data1 = (sprite->data1 + 20) & 0xFF; + sprite->pos2.x = Sin(sprite->data1, 2); + if (sprite->data0 == 15) + { + PlaySE(SE_BOWA); + StartSpriteAnim(sprite, 2); + } + } + } +} + +static void SpriteCB_Egg_2(struct Sprite* sprite) +{ + if (++sprite->data2 > 30) + { + if (++sprite->data0 > 38) + { + u16 species; + + sprite->callback = SpriteCB_Egg_3; + sprite->data0 = 0; + species = GetMonData(&gPlayerParty[gEggHatchData->eggPartyID], MON_DATA_SPECIES); + gSprites[gEggHatchData->pokeSpriteID].pos2.x = 0; + gSprites[gEggHatchData->pokeSpriteID].pos2.y = 0; + } + else + { + sprite->data1 = (sprite->data1 + 20) & 0xFF; + sprite->pos2.x = Sin(sprite->data1, 2); + if (sprite->data0 == 15) + { + PlaySE(SE_BOWA); + StartSpriteAnim(sprite, 2); + CreateRandomEggShardSprite(); + CreateRandomEggShardSprite(); + } + if (sprite->data0 == 30) + PlaySE(SE_BOWA); + } + } +} + +static void SpriteCB_Egg_3(struct Sprite* sprite) +{ + if (++sprite->data0 > 50) + { + sprite->callback = SpriteCB_Egg_4; + sprite->data0 = 0; + } +} + +static void SpriteCB_Egg_4(struct Sprite* sprite) +{ + s16 i; + if (sprite->data0 == 0) + BeginNormalPaletteFade(-1, -1, 0, 0x10, 0xFFFF); + if (sprite->data0 < 4u) + { + for (i = 0; i <= 3; i++) + CreateRandomEggShardSprite(); + } + sprite->data0++; + if (!gPaletteFade.active) + { + PlaySE(SE_TAMAGO); + sprite->invisible = 1; + sprite->callback = SpriteCB_Egg_5; + sprite->data0 = 0; + } +} + +static void SpriteCB_Egg_5(struct Sprite* sprite) +{ + if (sprite->data0 == 0) + { + gSprites[gEggHatchData->pokeSpriteID].invisible = 0; + StartSpriteAffineAnim(&gSprites[gEggHatchData->pokeSpriteID], 1); + } + if (sprite->data0 == 8) + BeginNormalPaletteFade(-1, -1, 0x10, 0, 0xFFFF); + if (sprite->data0 <= 9) + gSprites[gEggHatchData->pokeSpriteID].pos1.y -= 1; + if (sprite->data0 > 40) + sprite->callback = SpriteCallbackDummy; + sprite->data0++; +} + +static void SpriteCB_EggShard(struct Sprite* sprite) +{ + sprite->data4 += sprite->data1; + sprite->data5 += sprite->data2; + + sprite->pos2.x = sprite->data4 / 256; + sprite->pos2.y = sprite->data5 / 256; + + sprite->data2 += sprite->data3; + + if (sprite->pos1.y + sprite->pos2.y > sprite->pos1.y + 20 && sprite->data2 > 0) + DestroySprite(sprite); +} + +extern const s16 sEggShardVelocities[][2]; + +static void CreateRandomEggShardSprite(void) +{ + u16 spriteAnimIndex; + + s16 velocity1 = sEggShardVelocities[gEggHatchData->eggShardVelocityID][0]; + s16 velocity2 = sEggShardVelocities[gEggHatchData->eggShardVelocityID][1]; + gEggHatchData->eggShardVelocityID++; + spriteAnimIndex = Random() % 4; + CreateEggShardSprite(120, 60, velocity1, velocity2, 100, spriteAnimIndex); +} + +extern const struct SpriteTemplate gUnknown_0832C04C; + +static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex) +{ + u8 spriteID = CreateSprite(&gUnknown_0832C04C, x, y, 4); + gSprites[spriteID].data1 = data1; + gSprites[spriteID].data2 = data2; + gSprites[spriteID].data3 = data3; + StartSpriteAnim(&gSprites[spriteID], spriteAnimIndex); +} + +static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed) +{ + FillWindowPixelBuffer(windowId, 0xFF); + gEggHatchData->textColor.fgColor = 0; + gEggHatchData->textColor.bgColor = 5; + gEggHatchData->textColor.shadowColor = 6; + AddTextPrinterParametrized2(windowId, 1, x, y, 0, 0, &gEggHatchData->textColor, speed, string); +} diff --git a/src/pokemon_3.c b/src/pokemon_3.c index 2d1dfb8b7..a2282539e 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -1511,8 +1511,6 @@ static void Task_PokemonSummaryAnimateAfterDelay(u8 taskId) } } -void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3); - void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3) { if (gHitMarker & HITMARKER_NO_ANIMATIONS && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))) diff --git a/src/text.c b/src/text.c index cad8326e3..4b963d1a6 100644 --- a/src/text.c +++ b/src/text.c @@ -244,12 +244,11 @@ void RunTextPrinters(void) } } -bool8 IsTextPrinterActive(u8 id) +bool16 IsTextPrinterActive(u8 id) { return gTextPrinters[id].sub_union.sub.active; } - u32 RenderFont(struct TextPrinter *textPrinter) { u32 ret; From 8098a209da963bc1654d1139f3f0d885dfff7af3 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 18 Sep 2017 19:30:55 -0400 Subject: [PATCH 209/342] Remove warnings --- src/field_map_obj.c | 80 ++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 60e622f28..26bc513fb 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -127,52 +127,52 @@ static void npc_update_obj_anim_flag(struct MapObject *, struct Sprite *); // ROM data -void (*const gUnknown_08505438[NUM_FIELD_MAP_OBJECT_TEMPLATES])(struct Sprite *); -const u8 gUnknown_0850557C[NUM_FIELD_MAP_OBJECT_TEMPLATES]; -const u8 gUnknown_085055CD[NUM_FIELD_MAP_OBJECT_TEMPLATES]; -const struct MapObjectGraphicsInfo *const gMauvilleOldManGraphicsInfoPointers[7]; -const struct MapObjectGraphicsInfo *const gFieldObjectGraphicsInfoPointers[0xEF]; -u8 (*const gUnknown_0850D714[11])(s16, s16, s16, s16); +extern void (*const gUnknown_08505438[NUM_FIELD_MAP_OBJECT_TEMPLATES])(struct Sprite *); +extern const u8 gUnknown_0850557C[NUM_FIELD_MAP_OBJECT_TEMPLATES]; +extern const u8 gUnknown_085055CD[NUM_FIELD_MAP_OBJECT_TEMPLATES]; +extern const struct MapObjectGraphicsInfo *const gMauvilleOldManGraphicsInfoPointers[7]; +extern const struct MapObjectGraphicsInfo *const gFieldObjectGraphicsInfoPointers[0xEF]; +extern u8 (*const gUnknown_0850D714[11])(s16, s16, s16, s16); struct PairedPalettes { u16 tag; const u16 *data; }; -u8 gUnknown_084975C4[0x10]; -const struct SpriteTemplate gUnknown_084975D4; -void (*const gUnknown_084975EC[3])(struct Sprite *); -const struct SpritePalette gUnknown_0850BBC8[39]; -const struct PairedPalettes gUnknown_0850BD00[4]; -const struct PairedPalettes gUnknown_0850BD78[14]; -const u16 *const gUnknown_0850BE38[2]; -const s16 gUnknown_0850D6DC[4]; // {0x20, 0x40, 0x60, 0x80} -const s16 gUnknown_0850D6EC[4]; -const u8 gUnknown_0850D710[4]; // {DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST} -const u8 gUnknown_0850D770[2]; // {DIR_SOUTH, DIR_NORTH} -const u8 gUnknown_0850D790[2]; // {DIR_WEST, DIR_EAST} -const u8 gUnknown_0850D7F0[2]; // {DIR_NORTH, DIR_WEST} -const u8 gUnknown_0850D808[2]; // {DIR_NORTH, DIR_EAST} -const u8 gUnknown_0850D820[2]; // {DIR_SOUTH, DIR_WEST} -const u8 gUnknown_0850D838[2]; // {DIR_SOUTH, DIR_EAST} -const u8 gUnknown_0850D850[4]; -const u8 gUnknown_0850D868[4]; -const u8 gUnknown_0850D880[4]; -const u8 gUnknown_0850D898[4]; -const u8 gUnknown_0850D8AC[5]; -const u8 gUnknown_0850D8C4[5]; -const u8 gUnknown_0850D8E8[4]; -bool8 (*const gUnknown_0850DA64[11])(struct MapObject *, struct Sprite *, u8, bool8(u8)); -bool8 (*const gUnknown_0850DB5C[4])(u8); -bool8 (*const gUnknown_0850DB6C[4])(u8); -const struct Coords16 gUnknown_0850DB7C[4]; -const u8 gUnknown_0850DC2F[4][4]; -const u8 gUnknown_0850DC3F[4][4]; -const u8 gUnknown_0850DBA0[5]; -bool8 (*const *const gUnknown_0850DC50[166])(struct MapObject *, struct Sprite *); -u8 (*const gUnknown_0850DEE8[5])(u8); -const s16 gUnknown_0850DFBC[3]; -const s16 gUnknown_0850DFC2[3]; +extern const u8 gUnknown_084975C4[0x10]; +extern const struct SpriteTemplate gUnknown_084975D4; +extern void (*const gUnknown_084975EC[3])(struct Sprite *); +extern const struct SpritePalette gUnknown_0850BBC8[39]; +extern const struct PairedPalettes gUnknown_0850BD00[4]; +extern const struct PairedPalettes gUnknown_0850BD78[14]; +extern const u16 *const gUnknown_0850BE38[2]; +extern const s16 gUnknown_0850D6DC[4]; // {0x20, 0x40, 0x60, 0x80} +extern const s16 gUnknown_0850D6EC[4]; +extern const u8 gUnknown_0850D710[4]; // {DIR_SOUTH, DIR_NORTH, DIR_WEST, DIR_EAST} +extern const u8 gUnknown_0850D770[2]; // {DIR_SOUTH, DIR_NORTH} +extern const u8 gUnknown_0850D790[2]; // {DIR_WEST, DIR_EAST} +extern const u8 gUnknown_0850D7F0[2]; // {DIR_NORTH, DIR_WEST} +extern const u8 gUnknown_0850D808[2]; // {DIR_NORTH, DIR_EAST} +extern const u8 gUnknown_0850D820[2]; // {DIR_SOUTH, DIR_WEST} +extern const u8 gUnknown_0850D838[2]; // {DIR_SOUTH, DIR_EAST} +extern const u8 gUnknown_0850D850[4]; +extern const u8 gUnknown_0850D868[4]; +extern const u8 gUnknown_0850D880[4]; +extern const u8 gUnknown_0850D898[4]; +extern const u8 gUnknown_0850D8AC[5]; +extern const u8 gUnknown_0850D8C4[5]; +extern const u8 gUnknown_0850D8E8[4]; +extern bool8 (*const gUnknown_0850DA64[11])(struct MapObject *, struct Sprite *, u8, bool8(u8)); +extern bool8 (*const gUnknown_0850DB5C[4])(u8); +extern bool8 (*const gUnknown_0850DB6C[4])(u8); +extern const struct Coords16 gUnknown_0850DB7C[4]; +extern const u8 gUnknown_0850DC2F[4][4]; +extern const u8 gUnknown_0850DC3F[4][4]; +extern const u8 gUnknown_0850DBA0[5]; +extern bool8 (*const *const gUnknown_0850DC50[166])(struct MapObject *, struct Sprite *); +extern u8 (*const gUnknown_0850DEE8[5])(u8); +extern const s16 gUnknown_0850DFBC[3]; +extern const s16 gUnknown_0850DFC2[3]; // Code From 9e96bd540ad3ae258ce7b2e8184cd162caa63c48 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 18 Sep 2017 19:39:20 -0400 Subject: [PATCH 210/342] Battle Dome Cards BEGIN --- asm/battle_dome_cards.s | 27 --------------------------- ld_script.txt | 1 + src/battle_dome_cards.c | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 27 deletions(-) create mode 100644 src/battle_dome_cards.c diff --git a/asm/battle_dome_cards.s b/asm/battle_dome_cards.s index 8bb1971c4..525aa3d79 100644 --- a/asm/battle_dome_cards.s +++ b/asm/battle_dome_cards.s @@ -6,33 +6,6 @@ .text - thumb_func_start nullsub_122 -nullsub_122: @ 818CFC8 - bx lr - thumb_func_end nullsub_122 - - thumb_func_start dp13_810BB8C -dp13_810BB8C: @ 818CFCC - push {r4-r7,lr} - ldr r4, =gUnknown_0860B058 - ldr r3, =gUnknown_0203CD04 - movs r2, 0x7 -_0818CFD4: - adds r1, r3, 0 - adds r0, r4, 0 - ldm r0!, {r5-r7} - stm r1!, {r5-r7} - adds r3, 0xC - subs r2, 0x1 - cmp r2, 0 - bge _0818CFD4 - movs r0, 0 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end dp13_810BB8C - thumb_func_start load_pokemon_image_TODO @ int load_pokemon_image_TODO(int species_num, unsigned int a2, u8 a3, void *a4, int a5, u8 a6) load_pokemon_image_TODO: @ 818CFF4 diff --git a/ld_script.txt b/ld_script.txt index 8a3f3e139..9ba5755c9 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -239,6 +239,7 @@ SECTIONS { asm/recorded_battle.o(.text); asm/battle_controller_recorded_opponent.o(.text); asm/battle_controller_recorded_player.o(.text); + src/battle_dome_cards.o(.text); asm/battle_dome_cards.o(.text); asm/lilycove_lady.o(.text); asm/battle_frontier_1.o(.text); diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c new file mode 100644 index 000000000..0afad23f6 --- /dev/null +++ b/src/battle_dome_cards.c @@ -0,0 +1,37 @@ + +// Includes +#include "global.h" + +// Static type declarations + +struct BattleDomeCard { + u8 unk_00[12]; +}; + +// Static RAM declarations + +extern struct BattleDomeCard gUnknown_0203CD04[8]; + +// Static ROM declarations + +// .rodata + +extern const struct BattleDomeCard gUnknown_0860B058; + +// .text + +void nullsub_122(void) +{ + +} + +bool8 dp13_810BB8C(void) +{ + int i; + + for (i = 0; i < 8; i ++) + { + gUnknown_0203CD04[i] = gUnknown_0860B058; + } + return FALSE; +} From e033c721219f4412a0cb2cbbdcbec583ec60c87a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 18 Sep 2017 20:00:46 -0400 Subject: [PATCH 211/342] load_pokemon_image_TODO --- asm/battle_dome_cards.s | 86 ----------------------------------------- src/battle_dome_cards.c | 52 ++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 87 deletions(-) diff --git a/asm/battle_dome_cards.s b/asm/battle_dome_cards.s index 525aa3d79..923dc997d 100644 --- a/asm/battle_dome_cards.s +++ b/asm/battle_dome_cards.s @@ -6,92 +6,6 @@ .text - thumb_func_start load_pokemon_image_TODO -@ int load_pokemon_image_TODO(int species_num, unsigned int a2, u8 a3, void *a4, int a5, u8 a6) -load_pokemon_image_TODO: @ 818CFF4 - push {r4-r7,lr} - sub sp, 0x4 - adds r6, r1, 0 - adds r5, r3, 0 - ldr r3, [sp, 0x18] - ldr r1, [sp, 0x1C] - lsls r0, 16 - lsrs r4, r0, 16 - adds r7, r4, 0 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 24 - lsls r1, 24 - lsrs r1, 24 - adds r0, r1, 0 - cmp r3, 0 - bne _0818D068 - cmp r2, 0 - beq _0818D034 - cmp r1, 0 - bne _0818D028 - lsls r0, r4, 3 - ldr r1, =gMonFrontPicTable - b _0818D03C - .pool -_0818D028: - lsls r0, r4, 3 - ldr r1, =gMonFrontPicTable - b _0818D054 - .pool -_0818D034: - cmp r0, 0 - bne _0818D050 - lsls r0, r4, 3 - ldr r1, =gMonBackPicTable -_0818D03C: - adds r0, r1 - str r2, [sp] - adds r1, r5, 0 - adds r2, r4, 0 - adds r3, r6, 0 - bl LoadSpecialPokePic - b _0818D08E - .pool -_0818D050: - lsls r0, r4, 3 - ldr r1, =gMonBackPicTable -_0818D054: - adds r0, r1 - str r2, [sp] - adds r1, r5, 0 - adds r2, r4, 0 - adds r3, r6, 0 - bl LoadSpecialPokePic_DontHandleDeoxys - b _0818D08E - .pool -_0818D068: - cmp r2, 0 - beq _0818D080 - lsls r0, r4, 3 - ldr r1, =gTrainerFrontPicTable - adds r0, r1 - adds r1, r5, 0 - adds r2, r4, 0 - bl DecompressPicFromTable - b _0818D08E - .pool -_0818D080: - lsls r0, r7, 3 - ldr r1, =gTrainerBackPicTable - adds r0, r1 - adds r1, r5, 0 - adds r2, r7, 0 - bl DecompressPicFromTable -_0818D08E: - movs r0, 0 - add sp, 0x4 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end load_pokemon_image_TODO - thumb_func_start sub_818D09C sub_818D09C: @ 818D09C push {r4,lr} diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index 0afad23f6..6ceb929ad 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -1,6 +1,15 @@ // Includes #include "global.h" +#include "sprite.h" +#include "species.h" +#include "pokemon.h" +#include "decompress.h" + +extern const struct CompressedSpriteSheet gMonFrontPicTable[NUM_SPECIES]; +extern const struct CompressedSpriteSheet gMonBackPicTable[NUM_SPECIES]; +extern const struct CompressedSpriteSheet gTrainerFrontPicTable[]; +extern const struct CompressedSpriteSheet gTrainerBackPicTable[]; // Static type declarations @@ -20,7 +29,7 @@ extern const struct BattleDomeCard gUnknown_0860B058; // .text -void nullsub_122(void) +void nullsub_122(struct Sprite *sprite) { } @@ -35,3 +44,44 @@ bool8 dp13_810BB8C(void) } return FALSE; } + +bool8 load_pokemon_image_TODO(u16 species, u32 personality, bool8 isFrontPic, void *dest, bool8 isTrainer, bool8 ignoreDeoxys) +{ + if (!isTrainer) + { + if (isFrontPic) + { + if (!ignoreDeoxys) + { + LoadSpecialPokePic(&gMonFrontPicTable[species], dest, species, personality, isFrontPic); + } + else + { + LoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], dest, species, personality, isFrontPic); + } + } + else + { + if (!ignoreDeoxys) + { + LoadSpecialPokePic(&gMonBackPicTable[species], dest, species, personality, isFrontPic); + } + else + { + LoadSpecialPokePic_DontHandleDeoxys(&gMonBackPicTable[species], dest, species, personality, isFrontPic); + } + } + } + else + { + if (isFrontPic) + { + DecompressPicFromTable(&gTrainerFrontPicTable[species], dest, species); + } + else + { + DecompressPicFromTable(&gTrainerBackPicTable[species], dest, species); + } + } + return FALSE; +} From 7de2140b868a77ea99e4965b06602af9d7de2926 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 18 Sep 2017 21:26:11 -0400 Subject: [PATCH 212/342] sub_818D0C4 --- asm/battle_dome_cards.s | 109 ---------------------------------------- src/battle_dome_cards.c | 43 ++++++++++++++-- 2 files changed, 40 insertions(+), 112 deletions(-) diff --git a/asm/battle_dome_cards.s b/asm/battle_dome_cards.s index 923dc997d..1e0db8e71 100644 --- a/asm/battle_dome_cards.s +++ b/asm/battle_dome_cards.s @@ -6,115 +6,6 @@ .text - thumb_func_start sub_818D09C -sub_818D09C: @ 818D09C - push {r4,lr} - sub sp, 0x8 - ldr r4, [sp, 0x10] - lsls r0, 16 - lsrs r0, 16 - lsls r2, 24 - lsrs r2, 24 - lsls r4, 24 - lsrs r4, 24 - str r4, [sp] - movs r4, 0 - str r4, [sp, 0x4] - bl load_pokemon_image_TODO - lsls r0, 16 - lsrs r0, 16 - add sp, 0x8 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_818D09C - - thumb_func_start sub_818D0C4 -sub_818D0C4: @ 818D0C4 - push {r4-r7,lr} - mov r7, r8 - push {r7} - adds r7, r1, 0 - mov r8, r2 - ldr r1, [sp, 0x18] - ldr r2, [sp, 0x1C] - lsls r0, 16 - lsrs r4, r0, 16 - adds r6, r4, 0 - lsls r3, 24 - lsrs r5, r3, 24 - mov r12, r5 - lsls r1, 16 - lsrs r3, r1, 16 - adds r1, r3, 0 - lsls r2, 24 - cmp r2, 0 - bne _0818D128 - ldr r0, =0x0000ffff - cmp r3, r0 - bne _0818D110 - ldr r2, =gUnknown_0203CCEC - ldrh r1, [r2, 0x2] - adds r0, r3, 0 - orrs r0, r1 - strh r0, [r2, 0x2] - adds r0, r4, 0 - adds r1, r7, 0 - mov r2, r8 - bl species_and_otid_get_pal - lsls r1, r5, 20 - b _0818D144 - .pool -_0818D110: - ldr r0, =gUnknown_0203CCEC - strh r3, [r0, 0x2] - adds r0, r4, 0 - adds r1, r7, 0 - mov r2, r8 - bl sub_806E7CC - bl LoadCompressedObjectPalette - b _0818D16E - .pool -_0818D128: - ldr r0, =0x0000ffff - cmp r3, r0 - bne _0818D160 - ldr r2, =gUnknown_0203CCEC - ldrh r1, [r2, 0x2] - adds r0, r3, 0 - orrs r0, r1 - strh r0, [r2, 0x2] - ldr r1, =gTrainerFrontPicPaletteTable - lsls r0, r4, 3 - adds r0, r1 - ldr r0, [r0] - mov r2, r12 - lsls r1, r2, 20 -_0818D144: - movs r2, 0x80 - lsls r2, 17 - adds r1, r2 - lsrs r1, 16 - movs r2, 0x20 - bl LoadCompressedPalette - b _0818D16E - .pool -_0818D160: - ldr r0, =gUnknown_0203CCEC - strh r1, [r0, 0x2] - lsls r0, r6, 3 - ldr r1, =gTrainerFrontPicPaletteTable - adds r0, r1 - bl LoadCompressedObjectPalette -_0818D16E: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818D0C4 - thumb_func_start sub_818D180 sub_818D180: @ 818D180 push {r4,r5,lr} diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index 6ceb929ad..085afeb0c 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -3,13 +3,14 @@ #include "global.h" #include "sprite.h" #include "species.h" -#include "pokemon.h" +#include "palette.h" #include "decompress.h" extern const struct CompressedSpriteSheet gMonFrontPicTable[NUM_SPECIES]; extern const struct CompressedSpriteSheet gMonBackPicTable[NUM_SPECIES]; extern const struct CompressedSpriteSheet gTrainerFrontPicTable[]; extern const struct CompressedSpriteSheet gTrainerBackPicTable[]; +extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; // Static type declarations @@ -20,6 +21,7 @@ struct BattleDomeCard { // Static RAM declarations extern struct BattleDomeCard gUnknown_0203CD04[8]; +extern struct SpriteTemplate gUnknown_0203CCEC; // Static ROM declarations @@ -34,7 +36,7 @@ void nullsub_122(struct Sprite *sprite) } -bool8 dp13_810BB8C(void) +bool16 dp13_810BB8C(void) { int i; @@ -45,7 +47,7 @@ bool8 dp13_810BB8C(void) return FALSE; } -bool8 load_pokemon_image_TODO(u16 species, u32 personality, bool8 isFrontPic, void *dest, bool8 isTrainer, bool8 ignoreDeoxys) +bool16 load_pokemon_image_TODO(u16 species, u32 personality, bool8 isFrontPic, void *dest, bool8 isTrainer, bool8 ignoreDeoxys) { if (!isTrainer) { @@ -85,3 +87,38 @@ bool8 load_pokemon_image_TODO(u16 species, u32 personality, bool8 isFrontPic, vo } return FALSE; } + +bool16 sub_818D09C(u16 species, u32 personality, bool8 isFrontPic, void *dest, bool8 isTrainer) +{ + return load_pokemon_image_TODO(species, personality, isFrontPic, dest, isTrainer, FALSE); +} + +void sub_818D0C4(u16 species, u32 otId, u32 personality, u8 paletteSlot, u16 paletteTag, bool8 isTrainer) +{ + if (!isTrainer) + { + if (paletteTag == 0xFFFF) + { + gUnknown_0203CCEC.paletteTag |= 0xFFFF; + LoadCompressedPalette(species_and_otid_get_pal(species, otId, personality), 0x100 + paletteSlot * 0x10, 0x20); + } + else + { + gUnknown_0203CCEC.paletteTag = paletteTag; + LoadCompressedObjectPalette(sub_806E7CC(species, otId, personality)); + } + } + else + { + if (paletteTag == 0xFFFF) + { + gUnknown_0203CCEC.paletteTag |= 0xFFFF; + LoadCompressedPalette(gTrainerFrontPicPaletteTable[species].data, 0x100 + paletteSlot * 0x10, 0x20); + } + else + { + gUnknown_0203CCEC.paletteTag = paletteTag; + LoadCompressedObjectPalette(&gTrainerFrontPicPaletteTable[species]); + } + } +} From 16b0b386be02390ab847a68b279f51aea54c3a95 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 18 Sep 2017 21:28:28 -0400 Subject: [PATCH 213/342] sub_818D180 --- asm/battle_dome_cards.s | 33 --------------------------------- src/battle_dome_cards.c | 12 ++++++++++++ 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/asm/battle_dome_cards.s b/asm/battle_dome_cards.s index 1e0db8e71..774872c65 100644 --- a/asm/battle_dome_cards.s +++ b/asm/battle_dome_cards.s @@ -6,39 +6,6 @@ .text - thumb_func_start sub_818D180 -sub_818D180: @ 818D180 - push {r4,r5,lr} - adds r5, r1, 0 - ldr r1, [sp, 0xC] - lsls r0, 16 - lsrs r0, 16 - lsls r3, 24 - lsrs r4, r3, 24 - lsls r1, 24 - cmp r1, 0 - bne _0818D1A4 - adds r1, r5, 0 - bl species_and_otid_get_pal - lsls r1, r4, 4 - movs r2, 0x20 - bl LoadCompressedPalette - b _0818D1B4 -_0818D1A4: - ldr r1, =gTrainerFrontPicPaletteTable - lsls r0, 3 - adds r0, r1 - ldr r0, [r0] - lsls r1, r4, 4 - movs r2, 0x20 - bl LoadCompressedPalette -_0818D1B4: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818D180 - thumb_func_start uns_builder_assign_animtable1 uns_builder_assign_animtable1: @ 818D1C0 push {lr} diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index 085afeb0c..810ee82eb 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -122,3 +122,15 @@ void sub_818D0C4(u16 species, u32 otId, u32 personality, u8 paletteSlot, u16 pal } } } + +void sub_818D180(u16 species, u32 otId, u32 personality, u8 paletteSlot, bool8 isTrainer) +{ + if (!isTrainer) + { + LoadCompressedPalette(species_and_otid_get_pal(species, otId, personality), paletteSlot * 0x10, 0x20); + } + else + { + LoadCompressedPalette(gTrainerFrontPicPaletteTable[species].data, paletteSlot * 0x10, 0x20); + } +} From 8aeb5ea3017dfb7ea9fd8b8f1ef6bc9d4a0fbba9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 18 Sep 2017 21:31:28 -0400 Subject: [PATCH 214/342] uns_builder_assign_animtable1 --- asm/battle_dome_cards.s | 22 ---------------------- src/battle_dome_cards.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/asm/battle_dome_cards.s b/asm/battle_dome_cards.s index 774872c65..73948ea94 100644 --- a/asm/battle_dome_cards.s +++ b/asm/battle_dome_cards.s @@ -6,28 +6,6 @@ .text - thumb_func_start uns_builder_assign_animtable1 -uns_builder_assign_animtable1: @ 818D1C0 - push {lr} - lsls r0, 24 - cmp r0, 0 - bne _0818D1D8 - ldr r1, =gUnknown_0203CCEC - ldr r0, =gUnknown_082FF70C - str r0, [r1, 0x8] - b _0818D1E0 - .pool -_0818D1D8: - ldr r0, =gUnknown_0203CCEC - ldr r1, =gUnknown_0830536C - ldr r1, [r1] - str r1, [r0, 0x8] -_0818D1E0: - pop {r0} - bx r0 - .pool - thumb_func_end uns_builder_assign_animtable1 - thumb_func_start oamt_spawn_poke_or_trainer_picture oamt_spawn_poke_or_trainer_picture: @ 818D1EC push {r4-r7,lr} diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index 810ee82eb..e92773a1b 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -11,6 +11,8 @@ extern const struct CompressedSpriteSheet gMonBackPicTable[NUM_SPECIES]; extern const struct CompressedSpriteSheet gTrainerFrontPicTable[]; extern const struct CompressedSpriteSheet gTrainerBackPicTable[]; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; +extern const union AnimCmd *const gUnknown_082FF70C[]; +extern const union AnimCmd *const *const gUnknown_0830536C[]; // Static type declarations @@ -134,3 +136,15 @@ void sub_818D180(u16 species, u32 otId, u32 personality, u8 paletteSlot, bool8 i LoadCompressedPalette(gTrainerFrontPicPaletteTable[species].data, paletteSlot * 0x10, 0x20); } } + +void uns_builder_assign_animtable1(bool8 isTrainer) +{ + if (!isTrainer) + { + gUnknown_0203CCEC.anims = gUnknown_082FF70C; + } + else + { + gUnknown_0203CCEC.anims = gUnknown_0830536C[0]; + } +} From c593b51dc538961641d4f679a5b0366295179c5e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 18 Sep 2017 22:23:13 -0400 Subject: [PATCH 215/342] oamt_spawn_poke_or_trainer_picture --- asm/battle_dome_cards.s | 192 ---------------------------------------- src/battle_dome_cards.c | 68 +++++++++++++- 2 files changed, 67 insertions(+), 193 deletions(-) diff --git a/asm/battle_dome_cards.s b/asm/battle_dome_cards.s index 73948ea94..4de32086c 100644 --- a/asm/battle_dome_cards.s +++ b/asm/battle_dome_cards.s @@ -5,198 +5,6 @@ .text - - thumb_func_start oamt_spawn_poke_or_trainer_picture -oamt_spawn_poke_or_trainer_picture: @ 818D1EC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x30 - str r1, [sp, 0xC] - str r2, [sp, 0x10] - ldr r1, [sp, 0x50] - ldr r2, [sp, 0x54] - ldr r4, [sp, 0x58] - ldr r5, [sp, 0x5C] - ldr r6, [sp, 0x60] - ldr r7, [sp, 0x64] - mov r8, r7 - lsls r0, 16 - lsrs r0, 16 - str r0, [sp, 0x8] - lsls r3, 24 - lsrs r3, 24 - str r3, [sp, 0x14] - lsls r1, 16 - lsrs r1, 16 - str r1, [sp, 0x18] - lsls r2, 16 - lsrs r2, 16 - str r2, [sp, 0x1C] - lsls r4, 24 - lsrs r4, 24 - str r4, [sp, 0x20] - lsls r5, 16 - lsrs r5, 16 - mov r10, r5 - lsls r6, 24 - lsrs r6, 24 - mov r9, r6 - mov r0, r8 - lsls r0, 24 - lsrs r5, r0, 24 - movs r4, 0 - ldr r1, =gUnknown_0203CD04 - ldrb r0, [r1, 0xB] - cmp r0, 0 - beq _0818D25C -_0818D244: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x7 - bhi _0818D25C - lsls r0, r4, 1 - adds r0, r4 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0, 0xB] - cmp r0, 0 - bne _0818D244 -_0818D25C: - cmp r4, 0x8 - beq _0818D280 - movs r0, 0x80 - lsls r0, 6 - bl Alloc - adds r7, r0, 0 - cmp r7, 0 - beq _0818D280 - movs r0, 0x20 - bl Alloc - mov r8, r0 - cmp r0, 0 - bne _0818D28C - adds r0, r7, 0 - bl Free -_0818D280: - ldr r0, =0x0000ffff - b _0818D356 - .pool -_0818D28C: - mov r1, r9 - str r1, [sp] - str r5, [sp, 0x4] - ldr r0, [sp, 0x8] - ldr r1, [sp, 0x10] - ldr r2, [sp, 0x14] - adds r3, r7, 0 - bl load_pokemon_image_TODO - lsls r0, 16 - cmp r0, 0 - bne _0818D280 - lsls r2, r4, 1 - str r2, [sp, 0x2C] - ldr r5, =gUnknown_0203CCEC - ldr r0, =gUnknown_0860B064 - mov r12, r0 - ldr r1, [sp, 0x18] - lsls r1, 16 - str r1, [sp, 0x24] - ldr r2, [sp, 0x1C] - lsls r2, 16 - str r2, [sp, 0x28] - movs r3, 0x80 - lsls r3, 4 - mov r0, r8 - adds r1, r7, 0 - adds r6, r3, 0 - movs r2, 0x3 -_0818D2C6: - str r1, [r0] - strh r3, [r0, 0x4] - adds r0, 0x8 - adds r1, r6 - subs r2, 0x1 - cmp r2, 0 - bge _0818D2C6 - ldr r0, =0x0000ffff - strh r0, [r5] - mov r0, r12 - str r0, [r5, 0x4] - mov r0, r9 - bl uns_builder_assign_animtable1 - mov r1, r8 - str r1, [r5, 0xC] - ldr r0, =gDummySpriteAffineAnimTable - str r0, [r5, 0x10] - ldr r0, =nullsub_122 - str r0, [r5, 0x14] - mov r2, r10 - str r2, [sp] - mov r0, r9 - str r0, [sp, 0x4] - ldr r0, [sp, 0x8] - ldr r1, [sp, 0xC] - ldr r2, [sp, 0x10] - ldr r3, [sp, 0x20] - bl sub_818D0C4 - ldr r2, [sp, 0x24] - asrs r1, r2, 16 - ldr r0, [sp, 0x28] - asrs r2, r0, 16 - adds r0, r5, 0 - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r2, r0, 24 - adds r6, r2, 0 - ldr r0, =0x0000ffff - cmp r10, r0 - bne _0818D336 - ldr r0, =gSprites - lsls r1, r2, 4 - adds r1, r2 - lsls r1, 2 - adds r1, r0 - ldr r2, [sp, 0x20] - lsls r3, r2, 4 - ldrb r2, [r1, 0x5] - movs r0, 0xF - ands r0, r2 - orrs r0, r3 - strb r0, [r1, 0x5] -_0818D336: - ldr r1, =gUnknown_0203CD04 - ldr r2, [sp, 0x2C] - adds r0, r2, r4 - lsls r0, 2 - adds r2, r0, r1 - str r7, [r2] - adds r1, 0x4 - adds r0, r1 - mov r7, r8 - str r7, [r0] - mov r0, r10 - strh r0, [r2, 0x8] - strb r6, [r2, 0xA] - movs r0, 0x1 - strb r0, [r2, 0xB] - adds r0, r6, 0 -_0818D356: - add sp, 0x30 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end oamt_spawn_poke_or_trainer_picture - thumb_func_start sub_818D384 sub_818D384: @ 818D384 push {r4-r7,lr} diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index e92773a1b..764e3dfe4 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -2,6 +2,7 @@ // Includes #include "global.h" #include "sprite.h" +#include "malloc.h" #include "species.h" #include "palette.h" #include "decompress.h" @@ -13,11 +14,16 @@ extern const struct CompressedSpriteSheet gTrainerBackPicTable[]; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern const union AnimCmd *const gUnknown_082FF70C[]; extern const union AnimCmd *const *const gUnknown_0830536C[]; +extern const struct OamData gUnknown_0860B064; // Static type declarations struct BattleDomeCard { - u8 unk_00[12]; + u8 *frames; + const struct SpriteFrameImage *images; + u16 paletteTag; + u8 spriteId; + u8 active; }; // Static RAM declarations @@ -148,3 +154,63 @@ void uns_builder_assign_animtable1(bool8 isTrainer) gUnknown_0203CCEC.anims = gUnknown_0830536C[0]; } } + +u16 oamt_spawn_poke_or_trainer_picture(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 isTrainer, bool8 ignoreDeoxys) +{ + u8 i; + u8 *framePics; + struct SpriteFrameImage *images; + int j; + u8 spriteId; + + for (i = 0; i < 8; i ++) + { + if (!gUnknown_0203CD04[i].active) + { + break; + } + } + if (i == 8) + { + return 0xFFFF; + } + framePics = Alloc(4 * 0x800); + if (!framePics) + { + return 0xFFFF; + } + images = Alloc(4 * sizeof(struct SpriteFrameImage)); + if (!images) + { + Free(framePics); + return 0xFFFF; + } + if (load_pokemon_image_TODO(species, personality, isFrontPic, framePics, isTrainer, ignoreDeoxys)) + { + // debug trap? + return 0xFFFF; + } + for (j = 0; j < 4; j ++) + { + images[j].data = framePics + 0x800 * j; + images[j].size = 0x800; + } + gUnknown_0203CCEC.tileTag = 0xFFFF; + gUnknown_0203CCEC.oam = &gUnknown_0860B064; + uns_builder_assign_animtable1(isTrainer); + gUnknown_0203CCEC.images = images; + gUnknown_0203CCEC.affineAnims = gDummySpriteAffineAnimTable; + gUnknown_0203CCEC.callback = nullsub_122; + sub_818D0C4(species, otId, personality, paletteSlot, paletteTag, isTrainer); + spriteId = CreateSprite(&gUnknown_0203CCEC, x, y, 0); + if (paletteTag == 0xFFFF) + { + gSprites[spriteId].oam.paletteNum = paletteSlot; + } + gUnknown_0203CD04[i].frames = framePics; + gUnknown_0203CD04[i].images = images; + gUnknown_0203CD04[i].paletteTag = paletteTag; + gUnknown_0203CD04[i].spriteId = spriteId; + gUnknown_0203CD04[i].active = TRUE; + return spriteId; +} From 52dc68aa89a4e568673f1155542856504bd3da3f Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 18 Sep 2017 22:41:54 -0400 Subject: [PATCH 216/342] sub_818D3E4 --- asm/battle_dome_cards.s | 269 ---------------------------------------- src/battle_dome_cards.c | 92 ++++++++++++++ 2 files changed, 92 insertions(+), 269 deletions(-) diff --git a/asm/battle_dome_cards.s b/asm/battle_dome_cards.s index 4de32086c..397bfe88f 100644 --- a/asm/battle_dome_cards.s +++ b/asm/battle_dome_cards.s @@ -5,275 +5,6 @@ .text - thumb_func_start sub_818D384 -sub_818D384: @ 818D384 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x18 - ldr r4, [sp, 0x34] - ldr r5, [sp, 0x38] - ldr r6, [sp, 0x3C] - ldr r7, [sp, 0x40] - mov r8, r7 - ldr r7, [sp, 0x44] - mov r9, r7 - lsls r0, 16 - lsrs r0, 16 - lsls r3, 24 - lsrs r3, 24 - lsls r6, 24 - lsrs r6, 24 - mov r7, r8 - lsls r7, 16 - lsrs r7, 16 - mov r8, r7 - mov r7, r9 - lsls r7, 24 - lsrs r7, 24 - lsls r4, 16 - asrs r4, 16 - str r4, [sp] - lsls r5, 16 - asrs r5, 16 - str r5, [sp, 0x4] - str r6, [sp, 0x8] - mov r4, r8 - str r4, [sp, 0xC] - str r7, [sp, 0x10] - movs r4, 0 - str r4, [sp, 0x14] - bl oamt_spawn_poke_or_trainer_picture - lsls r0, 16 - lsrs r0, 16 - add sp, 0x18 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_818D384 - - thumb_func_start sub_818D3E4 -sub_818D3E4: @ 818D3E4 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x2C - str r1, [sp, 0x8] - str r2, [sp, 0xC] - ldr r1, [sp, 0x4C] - ldr r2, [sp, 0x50] - ldr r4, [sp, 0x54] - ldr r5, [sp, 0x58] - lsls r0, 16 - lsrs r0, 16 - mov r10, r0 - lsls r3, 24 - lsrs r6, r3, 24 - lsls r1, 16 - lsrs r1, 16 - str r1, [sp, 0x10] - lsls r2, 16 - lsrs r2, 16 - str r2, [sp, 0x14] - lsls r4, 24 - lsrs r4, 24 - str r4, [sp, 0x18] - lsls r5, 16 - lsrs r5, 16 - str r5, [sp, 0x1C] - movs r5, 0 - ldr r1, =gUnknown_0203CD04 - ldrb r0, [r1, 0xB] - cmp r0, 0 - beq _0818D440 -_0818D428: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0x7 - bhi _0818D440 - lsls r0, r5, 1 - adds r0, r5 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0, 0xB] - cmp r0, 0 - bne _0818D428 -_0818D440: - cmp r5, 0x8 - beq _0818D47C - movs r0, 0x80 - lsls r0, 6 - bl Alloc - adds r7, r0, 0 - cmp r7, 0 - beq _0818D47C - movs r0, 0x80 - ands r0, r6 - cmp r0, 0 - beq _0818D468 - movs r0, 0x7F - ands r6, r0 - movs r0, 0x3 - mov r9, r0 - b _0818D46A - .pool -_0818D468: - mov r9, r6 -_0818D46A: - movs r0, 0x20 - bl Alloc - mov r8, r0 - cmp r0, 0 - bne _0818D484 - adds r0, r7, 0 - bl Free -_0818D47C: - ldr r0, =0x0000ffff - b _0818D588 - .pool -_0818D484: - movs r0, 0 - str r0, [sp] - str r0, [sp, 0x4] - mov r0, r10 - ldr r1, [sp, 0xC] - adds r2, r6, 0 - adds r3, r7, 0 - bl load_pokemon_image_TODO - lsls r0, 16 - cmp r0, 0 - bne _0818D47C - lsls r1, r5, 1 - str r1, [sp, 0x28] - ldr r4, =gUnknown_0203CCEC - mov r2, r10 - lsls r2, 2 - mov r12, r2 - ldr r0, [sp, 0x10] - lsls r0, 16 - str r0, [sp, 0x20] - ldr r1, [sp, 0x14] - lsls r1, 16 - str r1, [sp, 0x24] - movs r3, 0x80 - lsls r3, 4 - mov r0, r8 - adds r1, r7, 0 - adds r6, r3, 0 - movs r2, 0x3 -_0818D4C0: - str r1, [r0] - strh r3, [r0, 0x4] - adds r0, 0x8 - adds r1, r6 - subs r2, 0x1 - cmp r2, 0 - bge _0818D4C0 - ldr r0, =0x0000ffff - strh r0, [r4] - ldr r0, =gUnknown_08309AAC - add r0, r12 - ldr r0, [r0] - str r0, [r4, 0x8] - mov r2, r8 - str r2, [r4, 0xC] - mov r0, r9 - cmp r0, 0x1 - bne _0818D4F8 - ldr r0, =gUnknown_082FF694 - b _0818D500 - .pool -_0818D4F8: - mov r1, r9 - cmp r1, 0 - bne _0818D510 - ldr r0, =gUnknown_082FF618 -_0818D500: - str r0, [r4, 0x10] - ldr r0, =gUnknown_0860B06C - str r0, [r4, 0x4] - b _0818D518 - .pool -_0818D510: - ldr r0, =gUnknown_0860B064 - str r0, [r4, 0x4] - ldr r0, =gDummySpriteAffineAnimTable - str r0, [r4, 0x10] -_0818D518: - ldr r2, =nullsub_122 - str r2, [r4, 0x14] - ldr r0, [sp, 0x1C] - str r0, [sp] - movs r0, 0 - str r0, [sp, 0x4] - mov r0, r10 - ldr r1, [sp, 0x8] - ldr r2, [sp, 0xC] - ldr r3, [sp, 0x18] - bl sub_818D0C4 - ldr r2, [sp, 0x20] - asrs r1, r2, 16 - ldr r0, [sp, 0x24] - asrs r2, r0, 16 - adds r0, r4, 0 - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r2, r0, 24 - adds r6, r2, 0 - ldr r0, =0x0000ffff - ldr r1, [sp, 0x1C] - cmp r1, r0 - bne _0818D566 - ldr r0, =gSprites - lsls r1, r2, 4 - adds r1, r2 - lsls r1, 2 - adds r1, r0 - ldr r2, [sp, 0x18] - lsls r3, r2, 4 - ldrb r2, [r1, 0x5] - movs r0, 0xF - ands r0, r2 - orrs r0, r3 - strb r0, [r1, 0x5] -_0818D566: - ldr r1, =gUnknown_0203CD04 - ldr r2, [sp, 0x28] - adds r0, r2, r5 - lsls r0, 2 - adds r2, r0, r1 - str r7, [r2] - adds r1, 0x4 - adds r0, r1 - mov r1, r8 - str r1, [r0] - mov r0, sp - ldrh r0, [r0, 0x1C] - strh r0, [r2, 0x8] - strb r6, [r2, 0xA] - movs r0, 0x1 - strb r0, [r2, 0xB] - adds r0, r6, 0 -_0818D588: - add sp, 0x2C - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_818D3E4 - thumb_func_start sub_818D5B0 sub_818D5B0: @ 818D5B0 push {r4-r7,lr} diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index 764e3dfe4..7eee245ee 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -15,6 +15,10 @@ extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; extern const union AnimCmd *const gUnknown_082FF70C[]; extern const union AnimCmd *const *const gUnknown_0830536C[]; extern const struct OamData gUnknown_0860B064; +extern const struct OamData gUnknown_0860B06C; +extern const union AnimCmd *const *const gUnknown_08309AAC[NUM_SPECIES]; +extern const union AffineAnimCmd *const gUnknown_082FF694[]; +extern const union AffineAnimCmd *const gUnknown_082FF618[]; // Static type declarations @@ -214,3 +218,91 @@ u16 oamt_spawn_poke_or_trainer_picture(u16 species, u32 otId, u32 personality, b gUnknown_0203CD04[i].active = TRUE; return spriteId; } + +u16 sub_818D384(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 isTrainer) +{ + return oamt_spawn_poke_or_trainer_picture(species, otId, personality, isFrontPic, x, y, paletteSlot, paletteTag, isTrainer, FALSE); +} + +u16 sub_818D3E4(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, u8 paletteSlot, u16 paletteTag) +{ + u8 *framePics; + struct SpriteFrameImage *images; + int j; + u8 i; + u8 spriteId; + u8 flags2; + + for (i = 0; i < 8; i ++) + { + if (!gUnknown_0203CD04[i].active) + { + break; + } + } + if (i == 8) + { + return 0xFFFF; + } + framePics = Alloc(4 * 0x800); + if (!framePics) + { + return 0xFFFF; + } + if (flags & 0x80) + { + flags &= 0x7F; + flags2 = 3; + } + else + { + flags2 = flags; + } + images = Alloc(4 * sizeof(struct SpriteFrameImage)); + if (!images) + { + Free(framePics); + return 0xFFFF; + } + if (load_pokemon_image_TODO(species, personality, flags, framePics, FALSE, FALSE)) + { + // debug trap? + return 0xFFFF; + } + for (j = 0; j < 4; j ++) + { + images[j].data = framePics + 0x800 * j; + images[j].size = 0x800; + } + gUnknown_0203CCEC.tileTag = 0xFFFF; + gUnknown_0203CCEC.anims = gUnknown_08309AAC[species]; + gUnknown_0203CCEC.images = images; + if (flags2 == 0x01) + { + gUnknown_0203CCEC.affineAnims = gUnknown_082FF694; + gUnknown_0203CCEC.oam = &gUnknown_0860B06C; + } + else if (flags2 == 0x00) + { + gUnknown_0203CCEC.affineAnims = gUnknown_082FF618; + gUnknown_0203CCEC.oam = &gUnknown_0860B06C; + } + else + { + gUnknown_0203CCEC.oam = &gUnknown_0860B064; + gUnknown_0203CCEC.affineAnims = gDummySpriteAffineAnimTable; + } + gUnknown_0203CCEC.callback = nullsub_122; + sub_818D0C4(species, otId, personality, paletteSlot, paletteTag, FALSE); + spriteId = CreateSprite(&gUnknown_0203CCEC, x, y, 0); + if (paletteTag == 0xFFFF) + { + gSprites[spriteId].oam.paletteNum = paletteSlot; + } + gUnknown_0203CD04[i].frames = framePics; + gUnknown_0203CD04[i].images = images; + gUnknown_0203CD04[i].paletteTag = paletteTag; + gUnknown_0203CD04[i].spriteId = spriteId; + gUnknown_0203CD04[i].active = TRUE; + return spriteId; +} From 7e157f202703f75933302d509f8b2bf26cf40655 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 18 Sep 2017 22:49:42 -0400 Subject: [PATCH 217/342] Decorate local EWRAM objects in battle_dome_cards.c as EWRAM --- src/battle_dome_cards.c | 10 +++++----- sym_ewram.txt | 6 +----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index 7eee245ee..f27e1e4fa 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -12,13 +12,13 @@ extern const struct CompressedSpriteSheet gMonBackPicTable[NUM_SPECIES]; extern const struct CompressedSpriteSheet gTrainerFrontPicTable[]; extern const struct CompressedSpriteSheet gTrainerBackPicTable[]; extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; +extern const union AffineAnimCmd *const gUnknown_082FF618[]; +extern const union AffineAnimCmd *const gUnknown_082FF694[]; extern const union AnimCmd *const gUnknown_082FF70C[]; +extern const union AnimCmd *const *const gUnknown_08309AAC[NUM_SPECIES]; extern const union AnimCmd *const *const gUnknown_0830536C[]; extern const struct OamData gUnknown_0860B064; extern const struct OamData gUnknown_0860B06C; -extern const union AnimCmd *const *const gUnknown_08309AAC[NUM_SPECIES]; -extern const union AffineAnimCmd *const gUnknown_082FF694[]; -extern const union AffineAnimCmd *const gUnknown_082FF618[]; // Static type declarations @@ -32,8 +32,8 @@ struct BattleDomeCard { // Static RAM declarations -extern struct BattleDomeCard gUnknown_0203CD04[8]; -extern struct SpriteTemplate gUnknown_0203CCEC; +static EWRAM_DATA struct SpriteTemplate gUnknown_0203CCEC = {}; +EWRAM_DATA struct BattleDomeCard gUnknown_0203CD04[8] = {}; // Static ROM declarations diff --git a/sym_ewram.txt b/sym_ewram.txt index a675fa4e2..cc63c342b 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -1762,11 +1762,7 @@ gUnknown_0203CCDC: @ 203CCDC gUnknown_0203CCE8: @ 203CCE8 .space 0x4 -gUnknown_0203CCEC: @ 203CCEC - .space 0x18 - -gUnknown_0203CD04: @ 203CD04 - .space 0x60 + .include "src/battle_dome_cards.o" gUnknown_0203CD64: @ 203CD64 .space 0x4 From 6ef3f9dd50a0cb2d8695401d3740407fa73cde9c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 08:13:53 -0400 Subject: [PATCH 218/342] sub_818D5B0 --- asm/battle_dome_cards.s | 82 ----------------------------------------- src/battle_dome_cards.c | 32 +++++++++++++++- 2 files changed, 31 insertions(+), 83 deletions(-) diff --git a/asm/battle_dome_cards.s b/asm/battle_dome_cards.s index 397bfe88f..775007e9f 100644 --- a/asm/battle_dome_cards.s +++ b/asm/battle_dome_cards.s @@ -5,88 +5,6 @@ .text - thumb_func_start sub_818D5B0 -sub_818D5B0: @ 818D5B0 - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 16 - lsrs r4, r0, 16 - movs r2, 0 - ldr r0, =gUnknown_0203CD04 - ldrb r1, [r0, 0xA] - adds r3, r0, 0 - cmp r1, r4 - beq _0818D5E0 - adds r1, r3, 0 -_0818D5C8: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0x7 - bhi _0818D5E0 - lsls r0, r2, 1 - adds r0, r2 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0, 0xA] - cmp r0, r4 - bne _0818D5C8 -_0818D5E0: - cmp r2, 0x8 - bne _0818D5F0 - ldr r0, =0x0000ffff - b _0818D646 - .pool -_0818D5F0: - lsls r0, r2, 1 - adds r0, r2 - lsls r0, 2 - adds r5, r0, r3 - ldr r1, [r5] - mov r8, r1 - adds r1, r3, 0x4 - adds r0, r1 - ldr r7, [r0] - ldrh r1, [r5, 0x8] - ldr r0, =0x0000ffff - lsls r6, r4, 4 - cmp r1, r0 - beq _0818D624 - ldr r1, =gSprites - adds r0, r6, r4 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0, 0x5] - lsrs r0, 4 - bl GetSpritePaletteTagByPaletteNum - lsls r0, 16 - lsrs r0, 16 - bl FreeSpritePaletteByTag -_0818D624: - adds r0, r6, r4 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - bl DestroySprite - mov r0, r8 - bl Free - adds r0, r7, 0 - bl Free - adds r1, r5, 0 - ldr r0, =gUnknown_0860B058 - ldm r0!, {r2-r4} - stm r1!, {r2-r4} - movs r0, 0 -_0818D646: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_818D5B0 - thumb_func_start sub_818D65C sub_818D65C: @ 818D65C push {r4-r7,lr} diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index f27e1e4fa..a01115a99 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -24,7 +24,7 @@ extern const struct OamData gUnknown_0860B06C; struct BattleDomeCard { u8 *frames; - const struct SpriteFrameImage *images; + struct SpriteFrameImage *images; u16 paletteTag; u8 spriteId; u8 active; @@ -306,3 +306,33 @@ u16 sub_818D3E4(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, gUnknown_0203CD04[i].active = TRUE; return spriteId; } + +u16 sub_818D5B0(u16 spriteId) +{ + u8 i; + u8 *framePics; + struct SpriteFrameImage *images; + + for (i = 0; i < 8; i ++) + { + if (gUnknown_0203CD04[i].spriteId == spriteId) + { + break; + } + } + if (i == 8) + { + return 0xFFFF; + } + framePics = gUnknown_0203CD04[i].frames; + images = gUnknown_0203CD04[i].images; + if (gUnknown_0203CD04[i].paletteTag != 0xFFFF) + { + FreeSpritePaletteByTag(GetSpritePaletteTagByPaletteNum(gSprites[spriteId].oam.paletteNum)); + } + DestroySprite(&gSprites[spriteId]); + Free(framePics); + Free(images); + gUnknown_0203CD04[i] = gUnknown_0860B058; + return 0; +} From ee47fe93778f938ac99be89e24761a46b44b1816 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 08:22:43 -0400 Subject: [PATCH 219/342] sub_818D65C --- asm/battle_dome_cards.s | 58 ----------------------------------------- src/battle_dome_cards.c | 11 ++++++++ 2 files changed, 11 insertions(+), 58 deletions(-) diff --git a/asm/battle_dome_cards.s b/asm/battle_dome_cards.s index 775007e9f..7d9dd4eab 100644 --- a/asm/battle_dome_cards.s +++ b/asm/battle_dome_cards.s @@ -5,64 +5,6 @@ .text - thumb_func_start sub_818D65C -sub_818D65C: @ 818D65C - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x4 - mov r9, r1 - adds r7, r2, 0 - adds r4, r3, 0 - ldr r1, [sp, 0x20] - ldr r2, [sp, 0x24] - ldr r3, [sp, 0x28] - lsls r0, 16 - lsrs r5, r0, 16 - lsls r4, 24 - lsrs r4, 24 - lsls r1, 24 - lsrs r1, 24 - mov r8, r1 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 24 - lsrs r6, r3, 24 - adds r0, r2, 0 - movs r1, 0x7 - bl GetWindowAttribute - adds r3, r0, 0 - movs r0, 0 - str r0, [sp] - adds r0, r5, 0 - adds r1, r7, 0 - adds r2, r4, 0 - bl sub_818D09C - lsls r0, 16 - cmp r0, 0 - bne _0818D6B8 - str r6, [sp] - adds r0, r5, 0 - mov r1, r9 - adds r2, r7, 0 - mov r3, r8 - bl sub_818D180 - movs r0, 0 - b _0818D6BA -_0818D6B8: - ldr r0, =0x0000ffff -_0818D6BA: - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_818D65C - thumb_func_start sub_818D6CC sub_818D6CC: @ 818D6CC push {r4-r7,lr} diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index a01115a99..b8f0c4ff8 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -2,6 +2,7 @@ // Includes #include "global.h" #include "sprite.h" +#include "window.h" #include "malloc.h" #include "species.h" #include "palette.h" @@ -336,3 +337,13 @@ u16 sub_818D5B0(u16 spriteId) gUnknown_0203CD04[i] = gUnknown_0860B058; return 0; } + +u16 sub_818D65C(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId, bool8 isTrainer) +{ + if (sub_818D09C(species, personality, isFrontPic, (void *)GetWindowAttribute(windowId, WINDOW_TILE_DATA), FALSE)) + { + return 0xFFFF; + } + sub_818D180(species, otId, personality, paletteSlot, isTrainer); + return 0; +} From 148b995189f72acdad967f1c4bce0b5e0216cc2c Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Tue, 19 Sep 2017 14:27:46 +0200 Subject: [PATCH 220/342] finish egg hatch, clean up headers --- asm/daycare.s | 2 +- asm/egg_hatch.s | 74 -- data/data3 | Bin 0 -> 548 bytes data/data3.s | 2872 -------------------------------------------- data/data3_a0.s | 2848 +++++++++++++++++++++++++++++++++++++++++++ include/bg.h | 48 +- include/dma3.h | 3 +- include/gpu_regs.h | 2 + include/trig.h | 3 + include/window.h | 11 + ld_script.txt | 3 +- src/bg.c | 297 +++-- src/dma3_manager.c | 4 +- src/egg_hatch.c | 382 ++++-- src/gpu_regs.c | 25 +- src/trig.c | 3 - sym_bss.txt | 5 +- 17 files changed, 3370 insertions(+), 3212 deletions(-) delete mode 100644 asm/egg_hatch.s create mode 100644 data/data3 create mode 100644 data/data3_a0.s diff --git a/asm/daycare.s b/asm/daycare.s index 282a7b22c..b84d6f852 100644 --- a/asm/daycare.s +++ b/asm/daycare.s @@ -2175,7 +2175,7 @@ _08070B34: lsrs r0, 24 cmp r0, 0xFF bne _08070BC0 - bl sub_807228C + bl GetEggStepsToSubtract lsls r0, 24 lsrs r6, r0, 24 movs r5, 0 diff --git a/asm/egg_hatch.s b/asm/egg_hatch.s deleted file mode 100644 index 194aedd7b..000000000 --- a/asm/egg_hatch.s +++ /dev/null @@ -1,74 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_807228C -sub_807228C: @ 807228C - push {r4-r6,lr} - bl CalculatePlayerPartyCount - lsls r0, 24 - lsrs r6, r0, 24 - movs r5, 0 - cmp r5, r6 - bcs _080722D6 -_0807229C: - movs r0, 0x64 - adds r1, r5, 0 - muls r1, r0 - ldr r0, =gPlayerParty - adds r4, r1, r0 - adds r0, r4, 0 - movs r1, 0x6 - bl GetMonData - cmp r0, 0 - bne _080722CC - adds r0, r4, 0 - bl GetMonAbility - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x28 - beq _080722C4 - cmp r0, 0x31 - bne _080722CC -_080722C4: - movs r0, 0x2 - b _080722D8 - .pool -_080722CC: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, r6 - bcc _0807229C -_080722D6: - movs r0, 0x1 -_080722D8: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_807228C - - thumb_func_start sub_80722E0 -sub_80722E0: @ 80722E0 - push {r4,lr} - bl sub_80D22D0 - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - movs r0, 0x6 - bl sub_80C7050 - lsls r0, 24 - lsrs r0, 24 - adds r4, r0 - lsls r4, 16 - lsrs r4, 16 - adds r0, r4, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80722E0 - - .align 2, 0 @ Don't pad with nop. diff --git a/data/data3 b/data/data3 new file mode 100644 index 0000000000000000000000000000000000000000..59f0231a8e687dcf313b489c80ae1ea239d1276c GIT binary patch literal 548 zcmb<-^>JflWMqH=Mg|QA1doB?2}FX`1Wao%a4@hlILZS#iK&T6nGB4gKqjkWkgs`& zi?1gG8xsd3C$e^kZX}W!#dHP+W(FoCSrDHYjn4w)>lIh#mLw(t>5?J{odIK&q*jzL z=%pl 0x3 + u32 charBaseIndex:2; // 0x4, 0x8 -> 0xC + u32 mapBaseIndex:5; // 0x10, 0x20, 0x40, 0x80, 0x100 -> 0x1F0 + u32 screenSize:2; // 0x200, 0x400 -> 0x600 + u32 paletteMode:1; // 0x800 + u32 priority:2; // 0x1000, 0x2000 > 0x3000 u32 baseTile:10; }; +void ResetBgs(void); +u8 GetBgMode(void); +void ResetBgControlStructs(void); +void Unused_ResetBgControlStruct(u8 bg); +void SetBgControlAttributes(u8 bg, u8 charBaseIndex, u8 mapBaseIndex, u8 screenSize, u8 paletteMode, u8 priority, u8 mosaic, u8 wraparound); +u16 GetBgControlAttribute(u8 bg, u8 attributeId); +u8 LoadBgVram(u8 bg, const void *src, u16 size, u16 destOffset, u8 mode); +void SetTextModeAndHideBgs(void); +bool8 IsInvalidBg(u8 bg); +int DummiedOutFireRedLeafGreenTileAllocFunc(int a1, int a2, int a3, int a4); void ResetBgsAndClearDma3BusyFlags(u32 leftoverFireRedLeafGreenVariable); void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numTemplates); +void InitBgFromTemplate(const struct BgTemplate *template); +void SetBgMode(u8 bgMode); +u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset); +u16 LoadBgTilemap(u8 bg, const void *src, u16 size, u16 destOffset); +u16 Unused_LoadBgPalette(u8 bg, const void *src, u16 size, u16 destOffset); +bool8 IsDma3ManagerBusyWithBgCopy(void); +void ShowBg(u8 bg); +void HideBg(u8 bg); void SetBgAttribute(u8 bg, u8 attributeId, u8 value); u16 GetBgAttribute(u8 bg, u8 attributeId); u32 ChangeBgX(u8 bg, u32 value, u8 op); @@ -34,12 +52,24 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op); u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op); u32 GetBgY(u8 bg); void SetBgAffine(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle); +u8 Unused_AdjustBgMosaic(u8 a1, u8 a2); void SetBgTilemapBuffer(u8 bg, void *tilemap); void UnsetBgTilemapBuffer(u8 bg); +void* GetBgTilemapBuffer(u8 bg); void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset); void CopyBgTilemapBufferToVram(u8 bg); -u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset); -void ShowBg(u8 bg); -void HideBg(u8 bg); +void CopyToBgTilemapBufferRect(u8 bg, void* src, u8 destX, u8 destY, u8 width, u8 height); +void CopyToBgTilemapBufferRect_ChangePalette(u8 bg, void *src, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette); +void CopyRectToBgTilemapBufferRect(u8 bg, void* src, u8 srcX, u8 srcY, u8 srcWidth, u8 srcHeight, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette1, u16 tileOffset, u16 palette2); +void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height); +void FillBgTilemapBufferRect(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height, u8 palette); +void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 width, u8 height, u8 paletteSlot, s16 tileNumDelta); +u16 GetBgMetricTextMode(u8 bg, u8 whichMetric); +u32 GetBgMetricAffineMode(u8 bg, u8 whichMetric); +u32 GetTileMapIndexFromCoords(s32 x, s32 y, s32 screenSize, u32 screenWidth, u32 screenHeight); +void CopyTileMapEntry(u16 *src, u16 *dest, s32 palette1, u32 tileOffset, u32 palette2); +u32 GetBgType(u8 bg); +bool32 IsInvalidBg32(u8 bg); +bool32 IsTileMapOutsideWram(u8 bg); #endif // GUARD_BG_H diff --git a/include/dma3.h b/include/dma3.h index ea3171662..db75ea9e3 100644 --- a/include/dma3.h +++ b/include/dma3.h @@ -19,5 +19,6 @@ void ClearDma3Requests(void); void ProcessDma3Requests(void); int RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode); int RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode); +int CheckForSpaceForDma3Request(s16 index); -#endif +#endif // GUARD_DMA3_H diff --git a/include/gpu_regs.h b/include/gpu_regs.h index 684578f43..2675571f4 100644 --- a/include/gpu_regs.h +++ b/include/gpu_regs.h @@ -1,6 +1,8 @@ #ifndef GUARD_GPU_REGS_H #define GUARD_GPU_REGS_H +void InitGpuRegManager(void); +void CopyBufferedValuesToGpuRegs(void); void SetGpuReg(u8 regOffset, u16 value); void SetGpuReg_ForcedBlank(u8 regOffset, u16 value); u16 GetGpuReg(u8 regOffset); diff --git a/include/trig.h b/include/trig.h index a2f98a3e6..477a0163f 100644 --- a/include/trig.h +++ b/include/trig.h @@ -1,6 +1,9 @@ #ifndef GUARD_TRIG_H #define GUARD_TRIG_H +// Converts a number to Q8.8 fixed-point format +#define Q_8_8(n) ((s16)((n) * 256)) + extern const s16 gSineTable[]; s16 Sin(s16 index, s16 amplitude); diff --git a/include/window.h b/include/window.h index 20e5fefa3..e8af82e81 100644 --- a/include/window.h +++ b/include/window.h @@ -24,6 +24,17 @@ struct WindowTemplate u16 baseBlock; }; +#define DUMMY_WIN_TEMPLATE \ +{ \ + 0xFF, \ + 0, \ + 0, \ + 0, \ + 0, \ + 0, \ + 0, \ +} + struct Window { struct WindowTemplate window; diff --git a/ld_script.txt b/ld_script.txt index 826e3d4b2..3269144da 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -81,7 +81,6 @@ SECTIONS { src/blend_palette.o(.text); asm/daycare.o(.text); src/egg_hatch.o(.text); - asm/egg_hatch.o(.text); asm/battle_interface.o(.text); asm/smokescreen.o(.text); asm/pokeball.o(.text); @@ -341,6 +340,8 @@ SECTIONS { src/trig.o(.rodata); src/util.o(.rodata); data/data3.o(.rodata); + src/egg_hatch.o(.rodata); + data/data3_a0.o(.rodata); src/berry.o(.rodata); data/data3_a1.o(.rodata); src/pokemon_size_record.o(.rodata) diff --git a/src/bg.c b/src/bg.c index 9f6d12062..74e3ea830 100644 --- a/src/bg.c +++ b/src/bg.c @@ -1,10 +1,12 @@ #include "global.h" #include "bg.h" #include "dma3.h" +#include "gpu_regs.h" -#define DISPCNT_ALL_BG_AND_MODE_BITS 0x0F07 +#define DISPCNT_ALL_BG_AND_MODE_BITS (DISPCNT_BG_ALL_ON | 0x7) -struct BgControl { +struct BgControl +{ struct BgConfig { u16 visible:1; u16 unknown_1:1; @@ -24,7 +26,8 @@ struct BgControl { u16 bgVisibilityAndMode; }; -struct BgConfig2 { +struct BgConfig2 +{ u32 baseTile:10; u32 basePalette:4; u32 unk_3:18; @@ -34,54 +37,36 @@ struct BgConfig2 { u32 bg_y; }; -static struct BgControl gGpuBgConfigs; -static struct BgConfig2 gGpuBgConfigs2[4]; -static u32 gDmaBusyBitfield[4]; +static IWRAM_DATA struct BgControl sGpuBgConfigs; +static IWRAM_DATA struct BgConfig2 sGpuBgConfigs2[4]; +static IWRAM_DATA u32 sDmaBusyBitfield[4]; u32 gUnneededFireRedVariable; -static const struct BgConfig gZeroedBgControlStruct = { 0 }; - -extern void SetGpuReg(u8 regOffset, u16 value); -extern void SetGpuReg_ForcedBlank(u8 regOffset, u16 value); -extern u16 GetGpuReg(u8 regOffset); -extern int CheckForSpaceForDma3Request(s16 index); - -bool32 IsInvalidBg32(u8); -void ResetBgControlStructs(); -u16 GetBgMetricTextMode(u8, u8); -u32 GetBgMetricAffineMode(u8, u8); -u32 GetBgType(u8); -void SetTextModeAndHideBgs(); -bool8 IsInvalidBg(u8); -bool32 IsTileMapOutsideWram(u8); -void CopyRectToBgTilemapBufferRect(u8, void*, u8, u8, u8, u8, u8, u8, u8, u8, u8, u16, u16); -void CopyTileMapEntry(u16*, u16*, s32, u32, u32); -u32 GetTileMapIndexFromCoords(s32, s32, s32, u32, u32); -void WriteSequenceToBgTilemapBuffer(u8, u16, u8, u8, u8, u8, u8, s16); +static const struct BgConfig sZeroedBgControlStruct = { 0 }; void ResetBgs(void) { ResetBgControlStructs(); - gGpuBgConfigs.bgVisibilityAndMode = 0; + sGpuBgConfigs.bgVisibilityAndMode = 0; SetTextModeAndHideBgs(); } -void SetBgModeInternal(u8 bgMode) +static void SetBgModeInternal(u8 bgMode) { - gGpuBgConfigs.bgVisibilityAndMode &= 0xFFF8; - gGpuBgConfigs.bgVisibilityAndMode |= bgMode; + sGpuBgConfigs.bgVisibilityAndMode &= 0xFFF8; + sGpuBgConfigs.bgVisibilityAndMode |= bgMode; } u8 GetBgMode(void) { - return gGpuBgConfigs.bgVisibilityAndMode & 0x7; + return sGpuBgConfigs.bgVisibilityAndMode & 0x7; } void ResetBgControlStructs(void) { - struct BgConfig* bgConfigs = &gGpuBgConfigs.configs[0]; - struct BgConfig zeroedConfig = gZeroedBgControlStruct; + struct BgConfig* bgConfigs = &sGpuBgConfigs.configs[0]; + struct BgConfig zeroedConfig = sZeroedBgControlStruct; int i; for (i = 0; i < 4; i++) @@ -94,7 +79,7 @@ void Unused_ResetBgControlStruct(u8 bg) { if (IsInvalidBg(bg) == FALSE) { - gGpuBgConfigs.configs[bg] = gZeroedBgControlStruct; + sGpuBgConfigs.configs[bg] = sZeroedBgControlStruct; } } @@ -104,68 +89,68 @@ void SetBgControlAttributes(u8 bg, u8 charBaseIndex, u8 mapBaseIndex, u8 screenS { if (charBaseIndex != 0xFF) { - gGpuBgConfigs.configs[bg].charBaseIndex = charBaseIndex & 0x3; + sGpuBgConfigs.configs[bg].charBaseIndex = charBaseIndex & 0x3; } if (mapBaseIndex != 0xFF) { - gGpuBgConfigs.configs[bg].mapBaseIndex = mapBaseIndex & 0x1F; + sGpuBgConfigs.configs[bg].mapBaseIndex = mapBaseIndex & 0x1F; } if (screenSize != 0xFF) { - gGpuBgConfigs.configs[bg].screenSize = screenSize & 0x3; + sGpuBgConfigs.configs[bg].screenSize = screenSize & 0x3; } if (paletteMode != 0xFF) { - gGpuBgConfigs.configs[bg].paletteMode = paletteMode; + sGpuBgConfigs.configs[bg].paletteMode = paletteMode; } if (priority != 0xFF) { - gGpuBgConfigs.configs[bg].priority = priority & 0x3; + sGpuBgConfigs.configs[bg].priority = priority & 0x3; } if (mosaic != 0xFF) { - gGpuBgConfigs.configs[bg].mosaic = mosaic & 0x1; + sGpuBgConfigs.configs[bg].mosaic = mosaic & 0x1; } if (wraparound != 0xFF) { - gGpuBgConfigs.configs[bg].wraparound = wraparound; + sGpuBgConfigs.configs[bg].wraparound = wraparound; } - gGpuBgConfigs.configs[bg].unknown_2 = 0; - gGpuBgConfigs.configs[bg].unknown_3 = 0; + sGpuBgConfigs.configs[bg].unknown_2 = 0; + sGpuBgConfigs.configs[bg].unknown_3 = 0; - gGpuBgConfigs.configs[bg].visible = 1; + sGpuBgConfigs.configs[bg].visible = 1; } } u16 GetBgControlAttribute(u8 bg, u8 attributeId) { - if (IsInvalidBg(bg) == FALSE && gGpuBgConfigs.configs[bg].visible != FALSE) + if (IsInvalidBg(bg) == FALSE && sGpuBgConfigs.configs[bg].visible != FALSE) { switch (attributeId) { case BG_CTRL_ATTR_VISIBLE: - return gGpuBgConfigs.configs[bg].visible; + return sGpuBgConfigs.configs[bg].visible; case BG_CTRL_ATTR_CHARBASEINDEX: - return gGpuBgConfigs.configs[bg].charBaseIndex; + return sGpuBgConfigs.configs[bg].charBaseIndex; case BG_CTRL_ATTR_MAPBASEINDEX: - return gGpuBgConfigs.configs[bg].mapBaseIndex; + return sGpuBgConfigs.configs[bg].mapBaseIndex; case BG_CTRL_ATTR_SCREENSIZE: - return gGpuBgConfigs.configs[bg].screenSize; + return sGpuBgConfigs.configs[bg].screenSize; case BG_CTRL_ATTR_PALETTEMODE: - return gGpuBgConfigs.configs[bg].paletteMode; + return sGpuBgConfigs.configs[bg].paletteMode; case BG_CTRL_ATTR_PRIORITY: - return gGpuBgConfigs.configs[bg].priority; + return sGpuBgConfigs.configs[bg].priority; case BG_CTRL_ATTR_MOSAIC: - return gGpuBgConfigs.configs[bg].mosaic; + return sGpuBgConfigs.configs[bg].mosaic; case BG_CTRL_ATTR_WRAPAROUND: - return gGpuBgConfigs.configs[bg].wraparound; + return sGpuBgConfigs.configs[bg].wraparound; } } @@ -177,15 +162,15 @@ u8 LoadBgVram(u8 bg, const void *src, u16 size, u16 destOffset, u8 mode) u16 offset; s8 cursor; - if (IsInvalidBg(bg) == FALSE && gGpuBgConfigs.configs[bg].visible != FALSE) + if (IsInvalidBg(bg) == FALSE && sGpuBgConfigs.configs[bg].visible != FALSE) { switch (mode) { case 0x1: - offset = gGpuBgConfigs.configs[bg].charBaseIndex * BG_CHAR_SIZE; + offset = sGpuBgConfigs.configs[bg].charBaseIndex * BG_CHAR_SIZE; break; case 0x2: - offset = gGpuBgConfigs.configs[bg].mapBaseIndex * BG_SCREEN_SIZE; + offset = sGpuBgConfigs.configs[bg].mapBaseIndex * BG_SCREEN_SIZE; break; default: cursor = -1; @@ -210,51 +195,51 @@ end: return cursor; } -void ShowBgInternal(u8 bg) +static void ShowBgInternal(u8 bg) { u16 value; - if (IsInvalidBg(bg) == FALSE && gGpuBgConfigs.configs[bg].visible != FALSE) + if (IsInvalidBg(bg) == FALSE && sGpuBgConfigs.configs[bg].visible != FALSE) { - value = gGpuBgConfigs.configs[bg].priority | - (gGpuBgConfigs.configs[bg].charBaseIndex << 2) | - (gGpuBgConfigs.configs[bg].mosaic << 6) | - (gGpuBgConfigs.configs[bg].paletteMode << 7) | - (gGpuBgConfigs.configs[bg].mapBaseIndex << 8) | - (gGpuBgConfigs.configs[bg].wraparound << 13) | - (gGpuBgConfigs.configs[bg].screenSize << 14); + value = sGpuBgConfigs.configs[bg].priority | + (sGpuBgConfigs.configs[bg].charBaseIndex << 2) | + (sGpuBgConfigs.configs[bg].mosaic << 6) | + (sGpuBgConfigs.configs[bg].paletteMode << 7) | + (sGpuBgConfigs.configs[bg].mapBaseIndex << 8) | + (sGpuBgConfigs.configs[bg].wraparound << 13) | + (sGpuBgConfigs.configs[bg].screenSize << 14); SetGpuReg((bg << 1) + 0x8, value); - gGpuBgConfigs.bgVisibilityAndMode |= 1 << (bg + 8); - gGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS; + sGpuBgConfigs.bgVisibilityAndMode |= 1 << (bg + 8); + sGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS; } } -void HideBgInternal(u8 bg) +static void HideBgInternal(u8 bg) { if (IsInvalidBg(bg) == FALSE) { - gGpuBgConfigs.bgVisibilityAndMode &= ~(1 << (bg + 8)); - gGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS; + sGpuBgConfigs.bgVisibilityAndMode &= ~(1 << (bg + 8)); + sGpuBgConfigs.bgVisibilityAndMode &= DISPCNT_ALL_BG_AND_MODE_BITS; } } -void SyncBgVisibilityAndMode() +static void SyncBgVisibilityAndMode(void) { - SetGpuReg(0, (GetGpuReg(0) & ~DISPCNT_ALL_BG_AND_MODE_BITS) | gGpuBgConfigs.bgVisibilityAndMode); + SetGpuReg(0, (GetGpuReg(0) & ~DISPCNT_ALL_BG_AND_MODE_BITS) | sGpuBgConfigs.bgVisibilityAndMode); } -void SetTextModeAndHideBgs() +void SetTextModeAndHideBgs(void) { SetGpuReg(0, GetGpuReg(0) & ~DISPCNT_ALL_BG_AND_MODE_BITS); } -void SetBgAffineInternal(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle) +static void SetBgAffineInternal(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle) { struct BgAffineSrcData src; struct BgAffineDstData dest; - switch (gGpuBgConfigs.bgVisibilityAndMode & 0x7) + switch (sGpuBgConfigs.bgVisibilityAndMode & 0x7) { case 1: if (bg != 2) @@ -309,7 +294,7 @@ void ResetBgsAndClearDma3BusyFlags(u32 leftoverFireRedLeafGreenVariable) for (i = 0; i < 4; i++) { - gDmaBusyBitfield[i] = 0; + sDmaBusyBitfield[i] = 0; } gUnneededFireRedVariable = leftoverFireRedLeafGreenVariable; @@ -336,18 +321,18 @@ void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numT 0, 0); - gGpuBgConfigs2[bg].baseTile = templates[i].baseTile; - gGpuBgConfigs2[bg].basePalette = 0; - gGpuBgConfigs2[bg].unk_3 = 0; + sGpuBgConfigs2[bg].baseTile = templates[i].baseTile; + sGpuBgConfigs2[bg].basePalette = 0; + sGpuBgConfigs2[bg].unk_3 = 0; - gGpuBgConfigs2[bg].tilemap = NULL; - gGpuBgConfigs2[bg].bg_x = 0; - gGpuBgConfigs2[bg].bg_y = 0; + sGpuBgConfigs2[bg].tilemap = NULL; + sGpuBgConfigs2[bg].bg_x = 0; + sGpuBgConfigs2[bg].bg_y = 0; } } } -void InitBgFromTemplate(struct BgTemplate *template) +void InitBgFromTemplate(const struct BgTemplate *template) { u8 bg = template->bg; @@ -362,13 +347,13 @@ void InitBgFromTemplate(struct BgTemplate *template) 0, 0); - gGpuBgConfigs2[bg].baseTile = template->baseTile; - gGpuBgConfigs2[bg].basePalette = 0; - gGpuBgConfigs2[bg].unk_3 = 0; + sGpuBgConfigs2[bg].baseTile = template->baseTile; + sGpuBgConfigs2[bg].basePalette = 0; + sGpuBgConfigs2[bg].unk_3 = 0; - gGpuBgConfigs2[bg].tilemap = NULL; - gGpuBgConfigs2[bg].bg_x = 0; - gGpuBgConfigs2[bg].bg_y = 0; + sGpuBgConfigs2[bg].tilemap = NULL; + sGpuBgConfigs2[bg].bg_x = 0; + sGpuBgConfigs2[bg].bg_y = 0; } } @@ -384,11 +369,11 @@ u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset) if (GetBgControlAttribute(bg, BG_CTRL_ATTR_PALETTEMODE) == 0) { - tileOffset = (gGpuBgConfigs2[bg].baseTile + destOffset) * 0x20; + tileOffset = (sGpuBgConfigs2[bg].baseTile + destOffset) * 0x20; } else { - tileOffset = (gGpuBgConfigs2[bg].baseTile + destOffset) * 0x40; + tileOffset = (sGpuBgConfigs2[bg].baseTile + destOffset) * 0x40; } cursor = LoadBgVram(bg, src, size, tileOffset, DISPCNT_MODE_1); @@ -398,7 +383,7 @@ u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset) return -1; } - gDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); + sDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); if (gUnneededFireRedVariable == 1) { @@ -408,7 +393,7 @@ u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset) return cursor; } -u16 LoadBgTilemap(u8 bg, void *src, u16 size, u16 destOffset) +u16 LoadBgTilemap(u8 bg, const void *src, u16 size, u16 destOffset) { u8 cursor; @@ -419,19 +404,19 @@ u16 LoadBgTilemap(u8 bg, void *src, u16 size, u16 destOffset) return -1; } - gDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); + sDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); return cursor; } -u16 Unused_LoadBgPalette(u8 bg, void *src, u16 size, u16 destOffset) +u16 Unused_LoadBgPalette(u8 bg, const void *src, u16 size, u16 destOffset) { u16 paletteOffset; s8 cursor; if (IsInvalidBg32(bg) == FALSE) { - paletteOffset = (gGpuBgConfigs2[bg].basePalette * 0x20) + (destOffset * 2); + paletteOffset = (sGpuBgConfigs2[bg].basePalette * 0x20) + (destOffset * 2); cursor = RequestDma3Copy(src, (void*)(paletteOffset + BG_PLTT), size, 0); if (cursor == -1) @@ -444,7 +429,7 @@ u16 Unused_LoadBgPalette(u8 bg, void *src, u16 size, u16 destOffset) return -1; } - gDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); + sDmaBusyBitfield[cursor / 0x20] |= (1 << (cursor % 0x20)); return (u8)cursor; } @@ -463,7 +448,7 @@ bool8 IsDma3ManagerBusyWithBgCopy(void) div = i / 0x20; mod = i % 0x20; - if ((gDmaBusyBitfield[div] & (1 << mod)) != FALSE) + if ((sDmaBusyBitfield[div] & (1 << mod)) != FALSE) { reqSpace = CheckForSpaceForDma3Request(i); if (reqSpace == -1) @@ -471,7 +456,7 @@ bool8 IsDma3ManagerBusyWithBgCopy(void) return TRUE; } - gDmaBusyBitfield[div] &= ~(1 << mod); + sDmaBusyBitfield[div] &= ~(1 << mod); } } @@ -497,7 +482,7 @@ _08001AE4:\n\ sub r0, r5, r0\n\ lsl r0, #24\n\ lsr r0, #24\n\ - ldr r1, =gDmaBusyBitfield\n\ + ldr r1, =sDmaBusyBitfield\n\ lsr r2, #22\n\ add r4, r2, r1\n\ mov r6, #0x1\n\ @@ -603,7 +588,7 @@ u16 GetBgAttribute(u8 bg, u8 attributeId) case 9: return GetBgType(bg); case 10: - return gGpuBgConfigs2[bg].baseTile; + return sGpuBgConfigs2[bg].baseTile; default: return -1; } @@ -624,13 +609,13 @@ u32 ChangeBgX(u8 bg, u32 value, u8 op) { case 0: default: - gGpuBgConfigs2[bg].bg_x = value; + sGpuBgConfigs2[bg].bg_x = value; break; case 1: - gGpuBgConfigs2[bg].bg_x += value; + sGpuBgConfigs2[bg].bg_x += value; break; case 2: - gGpuBgConfigs2[bg].bg_x -= value; + sGpuBgConfigs2[bg].bg_x -= value; break; } @@ -639,23 +624,23 @@ u32 ChangeBgX(u8 bg, u32 value, u8 op) switch (bg) { case 0: - temp1 = gGpuBgConfigs2[0].bg_x >> 0x8; + temp1 = sGpuBgConfigs2[0].bg_x >> 0x8; SetGpuReg(REG_OFFSET_BG0HOFS, temp1); break; case 1: - temp1 = gGpuBgConfigs2[1].bg_x >> 0x8; + temp1 = sGpuBgConfigs2[1].bg_x >> 0x8; SetGpuReg(REG_OFFSET_BG1HOFS, temp1); break; case 2: if (mode == 0) { - temp1 = gGpuBgConfigs2[2].bg_x >> 0x8; + temp1 = sGpuBgConfigs2[2].bg_x >> 0x8; SetGpuReg(REG_OFFSET_BG2HOFS, temp1); } else { - temp1 = gGpuBgConfigs2[2].bg_x >> 0x10; - temp2 = gGpuBgConfigs2[2].bg_x & 0xFFFF; + temp1 = sGpuBgConfigs2[2].bg_x >> 0x10; + temp2 = sGpuBgConfigs2[2].bg_x & 0xFFFF; SetGpuReg(REG_OFFSET_BG2X_H, temp1); SetGpuReg(REG_OFFSET_BG2X_L, temp2); } @@ -663,20 +648,20 @@ u32 ChangeBgX(u8 bg, u32 value, u8 op) case 3: if (mode == 0) { - temp1 = gGpuBgConfigs2[3].bg_x >> 0x8; + temp1 = sGpuBgConfigs2[3].bg_x >> 0x8; SetGpuReg(REG_OFFSET_BG3HOFS, temp1); } else if (mode == 2) { - temp1 = gGpuBgConfigs2[3].bg_x >> 0x10; - temp2 = gGpuBgConfigs2[3].bg_x & 0xFFFF; + temp1 = sGpuBgConfigs2[3].bg_x >> 0x10; + temp2 = sGpuBgConfigs2[3].bg_x & 0xFFFF; SetGpuReg(REG_OFFSET_BG3X_H, temp1); SetGpuReg(REG_OFFSET_BG3X_L, temp2); } break; } - return gGpuBgConfigs2[bg].bg_x; + return sGpuBgConfigs2[bg].bg_x; } u32 GetBgX(u8 bg) @@ -685,7 +670,7 @@ u32 GetBgX(u8 bg) return -1; if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) return -1; - return gGpuBgConfigs2[bg].bg_x; + return sGpuBgConfigs2[bg].bg_x; } u32 ChangeBgY(u8 bg, u32 value, u8 op) @@ -703,13 +688,13 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op) { case 0: default: - gGpuBgConfigs2[bg].bg_y = value; + sGpuBgConfigs2[bg].bg_y = value; break; case 1: - gGpuBgConfigs2[bg].bg_y += value; + sGpuBgConfigs2[bg].bg_y += value; break; case 2: - gGpuBgConfigs2[bg].bg_y -= value; + sGpuBgConfigs2[bg].bg_y -= value; break; } @@ -718,23 +703,23 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op) switch (bg) { case 0: - temp1 = gGpuBgConfigs2[0].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[0].bg_y >> 0x8; SetGpuReg(REG_OFFSET_BG0VOFS, temp1); break; case 1: - temp1 = gGpuBgConfigs2[1].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[1].bg_y >> 0x8; SetGpuReg(REG_OFFSET_BG1VOFS, temp1); break; case 2: if (mode == 0) { - temp1 = gGpuBgConfigs2[2].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[2].bg_y >> 0x8; SetGpuReg(REG_OFFSET_BG2VOFS, temp1); } else { - temp1 = gGpuBgConfigs2[2].bg_y >> 0x10; - temp2 = gGpuBgConfigs2[2].bg_y & 0xFFFF; + temp1 = sGpuBgConfigs2[2].bg_y >> 0x10; + temp2 = sGpuBgConfigs2[2].bg_y & 0xFFFF; SetGpuReg(REG_OFFSET_BG2Y_H, temp1); SetGpuReg(REG_OFFSET_BG2Y_L, temp2); } @@ -742,20 +727,20 @@ u32 ChangeBgY(u8 bg, u32 value, u8 op) case 3: if (mode == 0) { - temp1 = gGpuBgConfigs2[3].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[3].bg_y >> 0x8; SetGpuReg(REG_OFFSET_BG3VOFS, temp1); } else if (mode == 2) { - temp1 = gGpuBgConfigs2[3].bg_y >> 0x10; - temp2 = gGpuBgConfigs2[3].bg_y & 0xFFFF; + temp1 = sGpuBgConfigs2[3].bg_y >> 0x10; + temp2 = sGpuBgConfigs2[3].bg_y & 0xFFFF; SetGpuReg(REG_OFFSET_BG3Y_H, temp1); SetGpuReg(REG_OFFSET_BG3Y_L, temp2); } break; } - return gGpuBgConfigs2[bg].bg_y; + return sGpuBgConfigs2[bg].bg_y; } u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) @@ -773,13 +758,13 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) { case 0: default: - gGpuBgConfigs2[bg].bg_y = value; + sGpuBgConfigs2[bg].bg_y = value; break; case 1: - gGpuBgConfigs2[bg].bg_y += value; + sGpuBgConfigs2[bg].bg_y += value; break; case 2: - gGpuBgConfigs2[bg].bg_y -= value; + sGpuBgConfigs2[bg].bg_y -= value; break; } @@ -788,24 +773,24 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) switch (bg) { case 0: - temp1 = gGpuBgConfigs2[0].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[0].bg_y >> 0x8; SetGpuReg_ForcedBlank(REG_OFFSET_BG0VOFS, temp1); break; case 1: - temp1 = gGpuBgConfigs2[1].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[1].bg_y >> 0x8; SetGpuReg_ForcedBlank(REG_OFFSET_BG1VOFS, temp1); break; case 2: if (mode == 0) { - temp1 = gGpuBgConfigs2[2].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[2].bg_y >> 0x8; SetGpuReg_ForcedBlank(REG_OFFSET_BG2VOFS, temp1); } else { - temp1 = gGpuBgConfigs2[2].bg_y >> 0x10; - temp2 = gGpuBgConfigs2[2].bg_y & 0xFFFF; + temp1 = sGpuBgConfigs2[2].bg_y >> 0x10; + temp2 = sGpuBgConfigs2[2].bg_y & 0xFFFF; SetGpuReg_ForcedBlank(REG_OFFSET_BG2Y_H, temp1); SetGpuReg_ForcedBlank(REG_OFFSET_BG2Y_L, temp2); } @@ -813,20 +798,20 @@ u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op) case 3: if (mode == 0) { - temp1 = gGpuBgConfigs2[3].bg_y >> 0x8; + temp1 = sGpuBgConfigs2[3].bg_y >> 0x8; SetGpuReg_ForcedBlank(REG_OFFSET_BG3VOFS, temp1); } else if (mode == 2) { - temp1 = gGpuBgConfigs2[3].bg_y >> 0x10; - temp2 = gGpuBgConfigs2[3].bg_y & 0xFFFF; + temp1 = sGpuBgConfigs2[3].bg_y >> 0x10; + temp2 = sGpuBgConfigs2[3].bg_y & 0xFFFF; SetGpuReg_ForcedBlank(REG_OFFSET_BG3Y_H, temp1); SetGpuReg_ForcedBlank(REG_OFFSET_BG3Y_L, temp2); } break; } - return gGpuBgConfigs2[bg].bg_y; + return sGpuBgConfigs2[bg].bg_y; } u32 GetBgY(u8 bg) @@ -835,7 +820,7 @@ u32 GetBgY(u8 bg) return -1; if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) return -1; - return gGpuBgConfigs2[bg].bg_y; + return sGpuBgConfigs2[bg].bg_y; } void SetBgAffine(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle) @@ -922,7 +907,7 @@ void SetBgTilemapBuffer(u8 bg, void *tilemap) { if (IsInvalidBg32(bg) == FALSE && GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) != 0x0) { - gGpuBgConfigs2[bg].tilemap = tilemap; + sGpuBgConfigs2[bg].tilemap = tilemap; } } @@ -930,7 +915,7 @@ void UnsetBgTilemapBuffer(u8 bg) { if (IsInvalidBg32(bg) == FALSE && GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) != 0x0) { - gGpuBgConfigs2[bg].tilemap = NULL; + sGpuBgConfigs2[bg].tilemap = NULL; } } @@ -940,7 +925,7 @@ void* GetBgTilemapBuffer(u8 bg) return NULL; if (GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE) == 0) return NULL; - return gGpuBgConfigs2[bg].tilemap; + return sGpuBgConfigs2[bg].tilemap; } void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset) @@ -949,11 +934,11 @@ void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset) { if (mode != 0) { - CpuCopy16(src, (void *)(gGpuBgConfigs2[bg].tilemap + (destOffset * 2)), mode); + CpuCopy16(src, (void *)(sGpuBgConfigs2[bg].tilemap + (destOffset * 2)), mode); } else { - LZ77UnCompWram(src, (void *)(gGpuBgConfigs2[bg].tilemap + (destOffset * 2))); + LZ77UnCompWram(src, (void *)(sGpuBgConfigs2[bg].tilemap + (destOffset * 2))); } } } @@ -976,7 +961,7 @@ void CopyBgTilemapBufferToVram(u8 bg) sizeToLoad = 0; break; } - LoadBgVram(bg, gGpuBgConfigs2[bg].tilemap, sizeToLoad, 0, 2); + LoadBgVram(bg, sGpuBgConfigs2[bg].tilemap, sizeToLoad, 0, 2); } } @@ -997,7 +982,7 @@ void CopyToBgTilemapBufferRect(u8 bg, void* src, u8 destX, u8 destY, u8 width, u { for (destX16 = destX; destX16 < (destX + width); destX16++) { - ((u16*)gGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *((u16*)srcCopy)++; + ((u16*)sGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *((u16*)srcCopy)++; } } break; @@ -1008,7 +993,7 @@ void CopyToBgTilemapBufferRect(u8 bg, void* src, u8 destX, u8 destY, u8 width, u { for (destX16 = destX; destX16 < (destX + width); destX16++) { - ((u8*)gGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *((u8*)srcCopy)++; + ((u8*)sGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *((u8*)srcCopy)++; } } break; @@ -1045,7 +1030,7 @@ void CopyRectToBgTilemapBufferRect(u8 bg, void* src, u8 srcX, u8 srcY, u8 srcWid { for (destX16 = destX; destX16 < (destX + rectWidth); destX16++) { - CopyTileMapEntry(&((u16*)srcCopy)[(srcY * rectWidth) + srcX], &((u16*)gGpuBgConfigs2[bg].tilemap)[GetTileMapIndexFromCoords(destX16, destY16, attribute, mode, mode2)], palette1, tileOffset, palette2); + CopyTileMapEntry(&((u16*)srcCopy)[(srcY * rectWidth) + srcX], &((u16*)sGpuBgConfigs2[bg].tilemap)[GetTileMapIndexFromCoords(destX16, destY16, attribute, mode, mode2)], palette1, tileOffset, palette2); } } break; @@ -1056,7 +1041,7 @@ void CopyRectToBgTilemapBufferRect(u8 bg, void* src, u8 srcX, u8 srcY, u8 srcWid { for (destX16 = destX; destX16 < (destX + rectWidth); destX16++) { - CopyTileMapEntry(&((u16*)srcCopy)[(srcY * rectWidth) + srcX], &((u16*)gGpuBgConfigs2[bg].tilemap)[GetTileMapIndexFromCoords(destX16, destY16, attribute, mode, mode2)], palette1, tileOffset, palette2); + CopyTileMapEntry(&((u16*)srcCopy)[(srcY * rectWidth) + srcX], &((u16*)sGpuBgConfigs2[bg].tilemap)[GetTileMapIndexFromCoords(destX16, destY16, attribute, mode, mode2)], palette1, tileOffset, palette2); } } break; @@ -1184,7 +1169,7 @@ _080025F8:\n\ bge _0800265A\n\ ldr r2, [sp, #0x4]\n\ lsl r0, r2, #4\n\ - ldr r1, =gGpuBgConfigs2+4\n\ + ldr r1, =sGpuBgConfigs2+4\n\ add r0, r1\n\ mov r10, r0\n\ ldr r7, [sp, #0x20]\n\ @@ -1256,7 +1241,7 @@ _08002674:\n\ sub r2, r7, r2\n\ str r2, [sp, #0x34]\n\ str r0, [sp, #0x38]\n\ - ldr r7, =gGpuBgConfigs2+4\n\ + ldr r7, =sGpuBgConfigs2+4\n\ mov r10, r7\n\ ldr r0, [sp, #0x4]\n\ lsl r0, #4\n\ @@ -1326,7 +1311,7 @@ void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, { for (x16 = x; x16 < (x + width); x16++) { - ((u16*)gGpuBgConfigs2[bg].tilemap)[((y16 * 0x20) + x16)] = tileNum; + ((u16*)sGpuBgConfigs2[bg].tilemap)[((y16 * 0x20) + x16)] = tileNum; } } break; @@ -1336,7 +1321,7 @@ void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, { for (x16 = x; x16 < (x + width); x16++) { - ((u8*)gGpuBgConfigs2[bg].tilemap)[((y16 * mode) + x16)] = tileNum; + ((u8*)sGpuBgConfigs2[bg].tilemap)[((y16 * mode) + x16)] = tileNum; } } break; @@ -1371,7 +1356,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt { for (x16 = x; x16 < (x + width); x16++) { - CopyTileMapEntry(&firstTileNum, &((u16*)gGpuBgConfigs2[bg].tilemap)[(u16)GetTileMapIndexFromCoords(x16, y16, attribute, mode, mode2)], paletteSlot, 0, 0); + CopyTileMapEntry(&firstTileNum, &((u16*)sGpuBgConfigs2[bg].tilemap)[(u16)GetTileMapIndexFromCoords(x16, y16, attribute, mode, mode2)], paletteSlot, 0, 0); firstTileNum = (firstTileNum & 0xFC00) + ((firstTileNum + tileNumDelta) & 0x3FF); } } @@ -1382,7 +1367,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt { for (x16 = x; x16 < (x + width); x16++) { - ((u8*)gGpuBgConfigs2[bg].tilemap)[(y16 * mode3) + x16] = firstTileNum; + ((u8*)sGpuBgConfigs2[bg].tilemap)[(y16 * mode3) + x16] = firstTileNum; firstTileNum = (firstTileNum & 0xFC00) + ((firstTileNum + tileNumDelta) & 0x3FF); } } @@ -1614,9 +1599,9 @@ bool32 IsInvalidBg32(u8 bg) bool32 IsTileMapOutsideWram(u8 bg) { - if (gGpuBgConfigs2[bg].tilemap > (void*)IWRAM_END) + if (sGpuBgConfigs2[bg].tilemap > (void*)IWRAM_END) return TRUE; - if (gGpuBgConfigs2[bg].tilemap == 0x0) + if (sGpuBgConfigs2[bg].tilemap == 0x0) return TRUE; return FALSE; } diff --git a/src/dma3_manager.c b/src/dma3_manager.c index 0d3cf264b..7cce06c15 100644 --- a/src/dma3_manager.c +++ b/src/dma3_manager.c @@ -91,8 +91,8 @@ void ProcessDma3Requests(void) DmaFill16(3, gDma3Requests[gDma3RequestCursor].value, gDma3Requests[gDma3RequestCursor].dest, gDma3Requests[gDma3RequestCursor].size); break; } - gDma3Requests[gDma3RequestCursor].src = 0; - gDma3Requests[gDma3RequestCursor].dest = 0; + gDma3Requests[gDma3RequestCursor].src = NULL; + gDma3Requests[gDma3RequestCursor].dest = NULL; gDma3Requests[gDma3RequestCursor].size = 0; gDma3Requests[gDma3RequestCursor].mode = 0; gDma3Requests[gDma3RequestCursor].value = 0; diff --git a/src/egg_hatch.c b/src/egg_hatch.c index fc079444c..a84e71856 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -22,6 +22,7 @@ #include "bg.h" #include "m4a.h" #include "window.h" +#include "abilities.h" #include "battle.h" // to get rid of later struct EggHatchData @@ -41,23 +42,18 @@ struct EggHatchData struct TextColor textColor; }; -extern struct EggHatchData* gEggHatchData; - extern struct SpriteTemplate gUnknown_0202499C; extern void (*gFieldCallback)(void); extern const struct CompressedSpriteSheet gMonFrontPicTable[]; -extern const struct BgTemplate gUnknown_0832C064[2]; -extern const struct WindowTemplate gUnknown_0832C06C[2]; extern const u8 gUnknown_08C00000[]; extern const u8 gUnknown_08C00524[]; extern const u8 gUnknown_08C004E0[]; -extern const struct SpriteSheet gUnknown_0832BFE4; // hatching egg -extern const struct SpriteSheet gUnknown_0832BFEC; // egg shell -extern const struct SpritePalette gUnknown_0832BFF4; // hatching egg extern const u16 gUnknown_08DD7300[]; // palette, gameboy advance extern const u32 gUnknown_08DD7360[]; // tileset gameboy advance extern const u32 gUnknown_08331F60[]; // tilemap gameboy circle +extern const u8 gOtherText_HatchedFromEgg[]; +extern const u8 gOtherText_NickHatchPrompt[]; extern u8* GetMonNick(struct Pokemon* mon, u8* dst); extern u8* GetBoxMonNick(struct BoxPokemon* boxMon, u8* dst); @@ -75,9 +71,11 @@ extern void reset_temp_tile_data_buffers(void); extern void c2_exit_to_overworld_2_switch(void); extern void play_some_sound(void); extern void copy_decompressed_tile_data_to_vram_autofree(u8 bg_id, const void* src, u16 size, u16 offset, u8 mode); -extern void CreateYesNoMenu(const u8*, u16, u8, u8); +extern void CreateYesNoMenu(const struct WindowTemplate*, u16, u8, u8); extern void DoNamingScreen(u8, const u8*, u16, u8, u32, MainCallback); extern void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor* colors, s8 speed, u8 *str); +extern u16 sub_80D22D0(void); +extern u8 sub_80C7050(u8); static void Task_EggHatch(u8 taskID); static void CB2_EggHatch_0(void); @@ -93,6 +91,213 @@ static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed); static void CreateRandomEggShardSprite(void); static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex); +// IWRAM bss +static IWRAM_DATA struct EggHatchData* sEggHatchData; + +// rom data +static const u16 sEggPalette[] = INCBIN_U16("graphics/pokemon/palettes/egg_palette.gbapal"); +static const u8 sEggHatchTiles[] = INCBIN_U8("graphics/misc/egg_hatch.4bpp"); +static const u8 sEggShardTiles[] = INCBIN_U8("graphics/misc/egg_shard.4bpp"); + +static const struct OamData sOamData_EggHatch = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 0, + .x = 0, + .matrixNum = 0, + .size = 2, + .tileNum = 0, + .priority = 1, + .paletteNum = 0, + .affineParam = 0, +}; + +static const union AnimCmd sSpriteAnim_EggHatch0[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_EggHatch1[] = +{ + ANIMCMD_FRAME(16, 5), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_EggHatch2[] = +{ + ANIMCMD_FRAME(32, 5), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_EggHatch3[] = +{ + ANIMCMD_FRAME(48, 5), + ANIMCMD_END +}; + +static const union AnimCmd *const sSpriteAnimTable_EggHatch[] = +{ + sSpriteAnim_EggHatch0, + sSpriteAnim_EggHatch1, + sSpriteAnim_EggHatch2, + sSpriteAnim_EggHatch3, +}; + +static const struct SpriteSheet sEggHatch_Sheet = +{ + .data = sEggHatchTiles, + .size = 2048, + .tag = 12345, +}; + +static const struct SpriteSheet sEggShards_Sheet = +{ + .data = sEggShardTiles, + .size = 128, + .tag = 23456, +}; + +static const struct SpritePalette sEgg_SpritePalette = +{ + .data = sEggPalette, + .tag = 54321 +}; + +static const struct SpriteTemplate sSpriteTemplate_EggHatch = +{ + .tileTag = 12345, + .paletteTag = 54321, + .oam = &sOamData_EggHatch, + .anims = sSpriteAnimTable_EggHatch, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy +}; + +static const struct OamData sOamData_EggShard = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 0, + .x = 0, + .matrixNum = 0, + .size = 0, + .tileNum = 0, + .priority = 2, + .paletteNum = 0, + .affineParam = 0, +}; + +static const union AnimCmd sSpriteAnim_EggShard0[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_EggShard1[] = +{ + ANIMCMD_FRAME(1, 5), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_EggShard2[] = +{ + ANIMCMD_FRAME(2, 5), + ANIMCMD_END +}; + +static const union AnimCmd sSpriteAnim_EggShard3[] = +{ + ANIMCMD_FRAME(3, 5), + ANIMCMD_END +}; + +static const union AnimCmd *const sSpriteAnimTable_EggShard[] = +{ + sSpriteAnim_EggShard0, + sSpriteAnim_EggShard1, + sSpriteAnim_EggShard2, + sSpriteAnim_EggShard3, +}; + +static const struct SpriteTemplate sSpriteTemplate_EggShard = +{ + .tileTag = 23456, + .paletteTag = 54321, + .oam = &sOamData_EggShard, + .anims = sSpriteAnimTable_EggShard, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCB_EggShard +}; + +static const struct BgTemplate sBgTemplates_EggHatch[2] = +{ + { + .bg = 0, + .charBaseIndex = 2, + .mapBaseIndex = 24, + .screenSize = 3, + .paletteMode = 0, + .priority = 0, + .baseTile = 0 + }, + + { + .bg = 1, + .charBaseIndex = 0, + .mapBaseIndex = 8, + .screenSize = 1, + .paletteMode = 0, + .priority = 2, + .baseTile = 0 + }, +}; + +static const struct WindowTemplate sWinTemplates_EggHatch[2] = +{ + {0, 2, 0xF, 0x1A, 4, 0, 0x40}, + DUMMY_WIN_TEMPLATE +}; + +static const struct WindowTemplate sYesNoWinTemplate = +{ + 0, 0x15, 9, 5, 4, 0xF, 0x1A8 +}; + +static const s16 sEggShardVelocities[][2] = +{ + {Q_8_8(-1.5), Q_8_8(-3.75)}, + {Q_8_8(-5), Q_8_8(-3)}, + {Q_8_8(3.5), Q_8_8(-3)}, + {Q_8_8(-4), Q_8_8(-3.75)}, + {Q_8_8(2), Q_8_8(-1.5)}, + {Q_8_8(-0.5), Q_8_8(-6.75)}, + {Q_8_8(5), Q_8_8(-2.25)}, + {Q_8_8(-1.5), Q_8_8(-3.75)}, + {Q_8_8(4.5), Q_8_8(-1.5)}, + {Q_8_8(-1), Q_8_8(-6.75)}, + {Q_8_8(4), Q_8_8(-2.25)}, + {Q_8_8(-3.5), Q_8_8(-3.75)}, + {Q_8_8(1), Q_8_8(-1.5)}, + {Q_8_8(-3.515625), Q_8_8(-6.75)}, + {Q_8_8(4.5), Q_8_8(-2.25)}, + {Q_8_8(-0.5), Q_8_8(-7.5)}, + {Q_8_8(1), Q_8_8(-4.5)}, + {Q_8_8(-2.5), Q_8_8(-2.25)}, + {Q_8_8(2.5), Q_8_8(-7.5)}, +}; + +// code + static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp) { u16 species; @@ -282,17 +487,17 @@ static void CB2_EggHatch_0(void) case 0: SetGpuReg(REG_OFFSET_DISPCNT, 0); - gEggHatchData = Alloc(sizeof(struct EggHatchData)); + sEggHatchData = Alloc(sizeof(struct EggHatchData)); init_uns_table_pokemon_copy(); - gEggHatchData->eggPartyID = gSpecialVar_0x8004; - gEggHatchData->eggShardVelocityID = 0; + sEggHatchData->eggPartyID = gSpecialVar_0x8004; + sEggHatchData->eggShardVelocityID = 0; SetVBlankCallback(VBlankCB_EggHatch); gSpecialVar_0x8005 = GetCurrentMapMusic(); reset_temp_tile_data_buffers(); ResetBgsAndClearDma3BusyFlags(0); - InitBgsFromTemplates(0, gUnknown_0832C064, 2); + InitBgsFromTemplates(0, sBgTemplates_EggHatch, ARRAY_COUNT(sBgTemplates_EggHatch)); ChangeBgX(1, 0, 0); ChangeBgY(1, 0, 0); @@ -313,8 +518,8 @@ static void CB2_EggHatch_0(void) gMain.state++; break; case 1: - InitWindows(gUnknown_0832C06C); - gEggHatchData->windowId = 0; + InitWindows(sWinTemplates_EggHatch); + sEggHatchData->windowId = 0; gMain.state++; break; case 2: @@ -324,22 +529,22 @@ static void CB2_EggHatch_0(void) gMain.state++; break; case 3: - LoadSpriteSheet(&gUnknown_0832BFE4); - LoadSpriteSheet(&gUnknown_0832BFEC); - LoadSpritePalette(&gUnknown_0832BFF4); + LoadSpriteSheet(&sEggHatch_Sheet); + LoadSpriteSheet(&sEggShards_Sheet); + LoadSpritePalette(&sEgg_SpritePalette); gMain.state++; break; case 4: CopyBgTilemapBufferToVram(0); - AddHatchedMonToParty(gEggHatchData->eggPartyID); + AddHatchedMonToParty(sEggHatchData->eggPartyID); gMain.state++; break; case 5: - EggHatchCreateMonSprite(0, 0, gEggHatchData->eggPartyID, &gEggHatchData->species); + EggHatchCreateMonSprite(0, 0, sEggHatchData->eggPartyID, &sEggHatchData->species); gMain.state++; break; case 6: - gEggHatchData->pokeSpriteID = EggHatchCreateMonSprite(0, 1, gEggHatchData->eggPartyID, &gEggHatchData->species); + sEggHatchData->pokeSpriteID = EggHatchCreateMonSprite(0, 1, sEggHatchData->eggPartyID, &sEggHatchData->species); gMain.state++; break; case 7: @@ -352,7 +557,7 @@ static void CB2_EggHatch_0(void) break; case 8: SetMainCallback2(CB2_EggHatch_1); - gEggHatchData->CB2_state = 0; + sEggHatchData->CB2_state = 0; break; } RunTasks(); @@ -366,7 +571,7 @@ static void EggHatchSetMonNickname(void) { SetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar3); sub_805F094(); - Free(gEggHatchData); + Free(sEggHatchData); SetMainCallback2(c2_exit_to_overworld_2_switch); } @@ -388,114 +593,109 @@ static void Task_EggHatchPlayBGM(u8 taskID) gTasks[taskID].data[0]++; } -extern const struct SpriteTemplate gUnknown_0832BFFC; -extern const u8 gUnknown_0832C07C[]; -extern const u8 gOtherText_HatchedFromEgg[]; -extern const u8 gOtherText_NickHatchPrompt[]; - static void CB2_EggHatch_1(void) { u16 species; u8 gender; u32 personality; - switch (gEggHatchData->CB2_state) + switch (sEggHatchData->CB2_state) { case 0: BeginNormalPaletteFade(-1, 0, 0x10, 0, 0); - gEggHatchData->eggSpriteID = CreateSprite(&gUnknown_0832BFFC, 120, 75, 5); + sEggHatchData->eggSpriteID = CreateSprite(&sSpriteTemplate_EggHatch, 120, 75, 5); ShowBg(0); ShowBg(1); - gEggHatchData->CB2_state++; + sEggHatchData->CB2_state++; CreateTask(Task_EggHatchPlayBGM, 5); break; case 1: if (!gPaletteFade.active) { - FillWindowPixelBuffer(gEggHatchData->windowId, 0); - gEggHatchData->CB2_PalCounter = 0; - gEggHatchData->CB2_state++; + FillWindowPixelBuffer(sEggHatchData->windowId, 0); + sEggHatchData->CB2_PalCounter = 0; + sEggHatchData->CB2_state++; } break; case 2: - if (++gEggHatchData->CB2_PalCounter > 30) + if (++sEggHatchData->CB2_PalCounter > 30) { - gEggHatchData->CB2_state++; - gSprites[gEggHatchData->eggSpriteID].callback = SpriteCB_Egg_0; + sEggHatchData->CB2_state++; + gSprites[sEggHatchData->eggSpriteID].callback = SpriteCB_Egg_0; } break; case 3: - if (gSprites[gEggHatchData->eggSpriteID].callback == SpriteCallbackDummy) + if (gSprites[sEggHatchData->eggSpriteID].callback == SpriteCallbackDummy) { - species = GetMonData(&gPlayerParty[gEggHatchData->eggPartyID], MON_DATA_SPECIES); - DoMonFrontSpriteAnimation(&gSprites[gEggHatchData->pokeSpriteID], species, FALSE, 1); - gEggHatchData->CB2_state++; + species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_SPECIES); + DoMonFrontSpriteAnimation(&gSprites[sEggHatchData->pokeSpriteID], species, FALSE, 1); + sEggHatchData->CB2_state++; } break; case 4: - if (gSprites[gEggHatchData->pokeSpriteID].callback == SpriteCallbackDummy) + if (gSprites[sEggHatchData->pokeSpriteID].callback == SpriteCallbackDummy) { - gEggHatchData->CB2_state++; + sEggHatchData->CB2_state++; } break; case 5: - GetMonNick(&gPlayerParty[gEggHatchData->eggPartyID], gStringVar1); + GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1); StringExpandPlaceholders(gStringVar4, gOtherText_HatchedFromEgg); - EggHatchPrintMessage(gEggHatchData->windowId, gStringVar4, 0, 3, 0xFF); + EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 3, 0xFF); PlayFanfare(371); - gEggHatchData->CB2_state++; - PutWindowTilemap(gEggHatchData->windowId); - CopyWindowToVram(gEggHatchData->windowId, 3); + sEggHatchData->CB2_state++; + PutWindowTilemap(sEggHatchData->windowId); + CopyWindowToVram(sEggHatchData->windowId, 3); break; case 6: if (IsFanfareTaskInactive()) - gEggHatchData->CB2_state++; + sEggHatchData->CB2_state++; break; case 7: if (IsFanfareTaskInactive()) - gEggHatchData->CB2_state++; + sEggHatchData->CB2_state++; break; case 8: - GetMonNick(&gPlayerParty[gEggHatchData->eggPartyID], gStringVar1); + GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1); StringExpandPlaceholders(gStringVar4, gOtherText_NickHatchPrompt); - EggHatchPrintMessage(gEggHatchData->windowId, gStringVar4, 0, 2, 1); - gEggHatchData->CB2_state++; + EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 2, 1); + sEggHatchData->CB2_state++; break; case 9: - if (!IsTextPrinterActive(gEggHatchData->windowId)) + if (!IsTextPrinterActive(sEggHatchData->windowId)) { - sub_809882C(gEggHatchData->windowId, 0x140, 0xE0); - CreateYesNoMenu(gUnknown_0832C07C, 0x140, 0xE, 0); - gEggHatchData->CB2_state++; + sub_809882C(sEggHatchData->windowId, 0x140, 0xE0); + CreateYesNoMenu(&sYesNoWinTemplate, 0x140, 0xE, 0); + sEggHatchData->CB2_state++; } break; case 10: switch (sub_8198C58()) { case 0: - GetMonNick(&gPlayerParty[gEggHatchData->eggPartyID], gStringVar3); - species = GetMonData(&gPlayerParty[gEggHatchData->eggPartyID], MON_DATA_SPECIES); - gender = GetMonGender(&gPlayerParty[gEggHatchData->eggPartyID]); - personality = GetMonData(&gPlayerParty[gEggHatchData->eggPartyID], MON_DATA_PERSONALITY, 0); + GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar3); + species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_SPECIES); + gender = GetMonGender(&gPlayerParty[sEggHatchData->eggPartyID]); + personality = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_PERSONALITY, 0); DoNamingScreen(3, gStringVar3, species, gender, personality, EggHatchSetMonNickname); break; case 1: case -1: - gEggHatchData->CB2_state++; + sEggHatchData->CB2_state++; } break; case 11: BeginNormalPaletteFade(-1, 0, 0, 0x10, 0); - gEggHatchData->CB2_state++; + sEggHatchData->CB2_state++; break; case 12: if (!gPaletteFade.active) { sub_805F094(); - RemoveWindow(gEggHatchData->windowId); + RemoveWindow(sEggHatchData->windowId); UnsetBgTilemapBuffer(0); UnsetBgTilemapBuffer(1); - Free(gEggHatchData); + Free(sEggHatchData); SetMainCallback2(c2_exit_to_overworld_2_switch); } break; @@ -561,9 +761,9 @@ static void SpriteCB_Egg_2(struct Sprite* sprite) sprite->callback = SpriteCB_Egg_3; sprite->data0 = 0; - species = GetMonData(&gPlayerParty[gEggHatchData->eggPartyID], MON_DATA_SPECIES); - gSprites[gEggHatchData->pokeSpriteID].pos2.x = 0; - gSprites[gEggHatchData->pokeSpriteID].pos2.y = 0; + species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_SPECIES); + gSprites[sEggHatchData->pokeSpriteID].pos2.x = 0; + gSprites[sEggHatchData->pokeSpriteID].pos2.y = 0; } else { @@ -615,13 +815,13 @@ static void SpriteCB_Egg_5(struct Sprite* sprite) { if (sprite->data0 == 0) { - gSprites[gEggHatchData->pokeSpriteID].invisible = 0; - StartSpriteAffineAnim(&gSprites[gEggHatchData->pokeSpriteID], 1); + gSprites[sEggHatchData->pokeSpriteID].invisible = 0; + StartSpriteAffineAnim(&gSprites[sEggHatchData->pokeSpriteID], 1); } if (sprite->data0 == 8) BeginNormalPaletteFade(-1, -1, 0x10, 0, 0xFFFF); if (sprite->data0 <= 9) - gSprites[gEggHatchData->pokeSpriteID].pos1.y -= 1; + gSprites[sEggHatchData->pokeSpriteID].pos1.y -= 1; if (sprite->data0 > 40) sprite->callback = SpriteCallbackDummy; sprite->data0++; @@ -641,24 +841,20 @@ static void SpriteCB_EggShard(struct Sprite* sprite) DestroySprite(sprite); } -extern const s16 sEggShardVelocities[][2]; - static void CreateRandomEggShardSprite(void) { u16 spriteAnimIndex; - s16 velocity1 = sEggShardVelocities[gEggHatchData->eggShardVelocityID][0]; - s16 velocity2 = sEggShardVelocities[gEggHatchData->eggShardVelocityID][1]; - gEggHatchData->eggShardVelocityID++; + s16 velocity1 = sEggShardVelocities[sEggHatchData->eggShardVelocityID][0]; + s16 velocity2 = sEggShardVelocities[sEggHatchData->eggShardVelocityID][1]; + sEggHatchData->eggShardVelocityID++; spriteAnimIndex = Random() % 4; CreateEggShardSprite(120, 60, velocity1, velocity2, 100, spriteAnimIndex); } -extern const struct SpriteTemplate gUnknown_0832C04C; - static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 spriteAnimIndex) { - u8 spriteID = CreateSprite(&gUnknown_0832C04C, x, y, 4); + u8 spriteID = CreateSprite(&sSpriteTemplate_EggShard, x, y, 4); gSprites[spriteID].data1 = data1; gSprites[spriteID].data2 = data2; gSprites[spriteID].data3 = data3; @@ -668,8 +864,30 @@ static void CreateEggShardSprite(u8 x, u8 y, s16 data1, s16 data2, s16 data3, u8 static void EggHatchPrintMessage(u8 windowId, u8* string, u8 x, u8 y, u8 speed) { FillWindowPixelBuffer(windowId, 0xFF); - gEggHatchData->textColor.fgColor = 0; - gEggHatchData->textColor.bgColor = 5; - gEggHatchData->textColor.shadowColor = 6; - AddTextPrinterParametrized2(windowId, 1, x, y, 0, 0, &gEggHatchData->textColor, speed, string); + sEggHatchData->textColor.fgColor = 0; + sEggHatchData->textColor.bgColor = 5; + sEggHatchData->textColor.shadowColor = 6; + AddTextPrinterParametrized2(windowId, 1, x, y, 0, 0, &sEggHatchData->textColor, speed, string); +} + +u8 GetEggStepsToSubtract(void) +{ + u8 count, i; + for (count = CalculatePlayerPartyCount(), i = 0; i < count; i++) + { + if (!GetMonData(&gPlayerParty[i], MON_DATA_SANITY_BIT3)) + { + u8 ability = GetMonAbility(&gPlayerParty[i]); + if (ability == ABILITY_MAGMA_ARMOR || ability == ABILITY_FLAME_BODY) + return 2; + } + } + return 1; +} + +u16 sub_80722E0(void) +{ + u16 value = sub_80D22D0(); + value += sub_80C7050(6); + return value; } diff --git a/src/gpu_regs.c b/src/gpu_regs.c index be1f153d4..805f23b48 100644 --- a/src/gpu_regs.c +++ b/src/gpu_regs.c @@ -1,4 +1,5 @@ #include "global.h" +#include "gpu_regs.h" #define GPU_REG_BUF_SIZE 0x60 @@ -14,14 +15,15 @@ static bool8 sShouldSyncRegIE; static u16 sRegIE; static void CopyBufferedValueToGpuReg(u8 regOffset); -static void SyncRegIE(); +static void SyncRegIE(void); static void UpdateRegDispstatIntrBits(u16 regIE); -void InitGpuRegManager() +void InitGpuRegManager(void) { s32 i; - for (i = 0; i < GPU_REG_BUF_SIZE; i++) { + for (i = 0; i < GPU_REG_BUF_SIZE; i++) + { sGpuRegBuffer[i] = 0; sGpuRegWaitingList[i] = EMPTY_SLOT; } @@ -33,20 +35,25 @@ void InitGpuRegManager() static void CopyBufferedValueToGpuReg(u8 regOffset) { - if (regOffset == REG_OFFSET_DISPSTAT) { + if (regOffset == REG_OFFSET_DISPSTAT) + { REG_DISPSTAT &= ~(DISPSTAT_HBLANK_INTR | DISPSTAT_VBLANK_INTR); REG_DISPSTAT |= GPU_REG_BUF(REG_OFFSET_DISPSTAT); - } else { + } + else + { GPU_REG(regOffset) = GPU_REG_BUF(regOffset); } } -void CopyBufferedValuesToGpuRegs() +void CopyBufferedValuesToGpuRegs(void) { - if (!sGpuRegBufferLocked) { + if (!sGpuRegBufferLocked) + { s32 i; - for (i = 0; i < GPU_REG_BUF_SIZE; i++) { + for (i = 0; i < GPU_REG_BUF_SIZE; i++) + { u8 regOffset = sGpuRegWaitingList[i]; if (regOffset == EMPTY_SLOT) return; @@ -135,7 +142,7 @@ void ClearGpuRegBits(u8 regOffset, u16 mask) SetGpuReg(regOffset, regValue & ~mask); } -static void SyncRegIE() +static void SyncRegIE(void) { if (sShouldSyncRegIE) { u16 temp = REG_IME; diff --git a/src/trig.c b/src/trig.c index e16a69e63..93cf06893 100644 --- a/src/trig.c +++ b/src/trig.c @@ -1,9 +1,6 @@ #include "global.h" #include "trig.h" -// Converts a number to Q8.8 fixed-point format -#define Q_8_8(n) ((s16)((n) * 256)) - // Converts a number to Q4.12 fixed-point format #define Q_4_12(n) ((s16)((n) * 4096)) diff --git a/sym_bss.txt b/sym_bss.txt index c9128c7a4..1259b286b 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -113,8 +113,9 @@ gUnknown_03000DD8: @ 3000DD8 gUnknown_03000DDC: @ 3000DDC .space 0x4 -gEggHatchData: @ 3000DE0 - .space 0x8 + .include "src/egg_hatch.o" + +.space 0x4 @ why the gap? gUnknown_03000DE8: @ 3000DE8 .space 0x10 From b2b6774efc5d6cd1bf9ca7f9c1c925dfd237428c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 08:32:49 -0400 Subject: [PATCH 221/342] sub_818D6CC --- asm/battle_dome_cards.s | 86 ----------------------------------------- src/battle_dome_cards.c | 21 ++++++++-- 2 files changed, 18 insertions(+), 89 deletions(-) diff --git a/asm/battle_dome_cards.s b/asm/battle_dome_cards.s index 7d9dd4eab..b04a27d3f 100644 --- a/asm/battle_dome_cards.s +++ b/asm/battle_dome_cards.s @@ -5,92 +5,6 @@ .text - thumb_func_start sub_818D6CC -sub_818D6CC: @ 818D6CC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x24 - str r1, [sp, 0x18] - str r2, [sp, 0x1C] - ldr r1, [sp, 0x44] - ldr r2, [sp, 0x48] - ldr r4, [sp, 0x4C] - ldr r5, [sp, 0x50] - ldr r6, [sp, 0x54] - lsls r0, 16 - lsrs r0, 16 - mov r9, r0 - lsls r3, 24 - lsrs r7, r3, 24 - lsls r1, 16 - lsrs r1, 16 - mov r10, r1 - lsls r2, 16 - lsrs r2, 16 - mov r8, r2 - lsls r4, 24 - lsrs r4, 24 - str r4, [sp, 0x20] - lsls r5, 24 - lsrs r5, 24 - lsls r6, 24 - lsrs r6, 24 - movs r0, 0x80 - lsls r0, 6 - bl Alloc - adds r4, r0, 0 - cmp r4, 0 - beq _0818D762 - str r6, [sp] - mov r0, r9 - ldr r1, [sp, 0x1C] - adds r2, r7, 0 - adds r3, r4, 0 - bl sub_818D09C - lsls r0, 16 - cmp r0, 0 - bne _0818D762 - movs r0, 0x40 - str r0, [sp] - str r0, [sp, 0x4] - mov r1, r10 - str r1, [sp, 0x8] - mov r1, r8 - str r1, [sp, 0xC] - str r0, [sp, 0x10] - str r0, [sp, 0x14] - adds r0, r5, 0 - adds r1, r4, 0 - movs r2, 0 - movs r3, 0 - bl BlitBitmapRectToWindow - str r6, [sp] - mov r0, r9 - ldr r1, [sp, 0x18] - ldr r2, [sp, 0x1C] - ldr r3, [sp, 0x20] - bl sub_818D180 - adds r0, r4, 0 - bl Free - movs r0, 0 - b _0818D764 -_0818D762: - ldr r0, =0x0000ffff -_0818D764: - add sp, 0x24 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_818D6CC - thumb_func_start sub_818D778 sub_818D778: @ 818D778 push {r4-r7,lr} diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index b8f0c4ff8..4b2e9f41c 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -60,7 +60,7 @@ bool16 dp13_810BB8C(void) return FALSE; } -bool16 load_pokemon_image_TODO(u16 species, u32 personality, bool8 isFrontPic, void *dest, bool8 isTrainer, bool8 ignoreDeoxys) +bool16 load_pokemon_image_TODO(u16 species, u32 personality, bool8 isFrontPic, u8 *dest, bool8 isTrainer, bool8 ignoreDeoxys) { if (!isTrainer) { @@ -101,7 +101,7 @@ bool16 load_pokemon_image_TODO(u16 species, u32 personality, bool8 isFrontPic, v return FALSE; } -bool16 sub_818D09C(u16 species, u32 personality, bool8 isFrontPic, void *dest, bool8 isTrainer) +bool16 sub_818D09C(u16 species, u32 personality, bool8 isFrontPic, u8 *dest, bool8 isTrainer) { return load_pokemon_image_TODO(species, personality, isFrontPic, dest, isTrainer, FALSE); } @@ -340,10 +340,25 @@ u16 sub_818D5B0(u16 spriteId) u16 sub_818D65C(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId, bool8 isTrainer) { - if (sub_818D09C(species, personality, isFrontPic, (void *)GetWindowAttribute(windowId, WINDOW_TILE_DATA), FALSE)) + if (sub_818D09C(species, personality, isFrontPic, (u8 *)GetWindowAttribute(windowId, WINDOW_TILE_DATA), FALSE)) { return 0xFFFF; } sub_818D180(species, otId, personality, paletteSlot, isTrainer); return 0; } + +u16 sub_818D6CC(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId, bool8 isTrainer) +{ + u8 *framePics; + + framePics = Alloc(4 * 0x800); + if (framePics && !sub_818D09C(species, personality, isFrontPic, framePics, isTrainer)) + { + BlitBitmapRectToWindow(windowId, framePics, 0, 0, 0x40, 0x40, destX, destY, 0x40, 0x40); + sub_818D180(species, otId, personality, paletteSlot, isTrainer); + Free(framePics); + return 0; + } + return 0xFFFF; +} From 8634f722905247646305824afd62ebec60810212 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 08:35:27 -0400 Subject: [PATCH 222/342] sub_818D778 --- asm/battle_dome_cards.s | 51 ----------------------------------------- src/battle_dome_cards.c | 5 ++++ 2 files changed, 5 insertions(+), 51 deletions(-) diff --git a/asm/battle_dome_cards.s b/asm/battle_dome_cards.s index b04a27d3f..712da90ad 100644 --- a/asm/battle_dome_cards.s +++ b/asm/battle_dome_cards.s @@ -5,57 +5,6 @@ .text - thumb_func_start sub_818D778 -sub_818D778: @ 818D778 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x18 - ldr r4, [sp, 0x34] - ldr r5, [sp, 0x38] - ldr r6, [sp, 0x3C] - ldr r7, [sp, 0x40] - mov r8, r7 - ldr r7, [sp, 0x44] - mov r9, r7 - lsls r0, 16 - lsrs r0, 16 - lsls r3, 24 - lsrs r3, 24 - lsls r6, 24 - lsrs r6, 24 - mov r7, r8 - lsls r7, 16 - lsrs r7, 16 - mov r8, r7 - mov r7, r9 - lsls r7, 24 - lsrs r7, 24 - lsls r4, 16 - asrs r4, 16 - str r4, [sp] - lsls r5, 16 - asrs r5, 16 - str r5, [sp, 0x4] - str r6, [sp, 0x8] - mov r4, r8 - str r4, [sp, 0xC] - movs r4, 0 - str r4, [sp, 0x10] - str r7, [sp, 0x14] - bl oamt_spawn_poke_or_trainer_picture - lsls r0, 16 - lsrs r0, 16 - add sp, 0x18 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_818D778 - thumb_func_start sub_818D7D8 sub_818D7D8: @ 818D7D8 push {r4-r7,lr} diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index 4b2e9f41c..1e6a98810 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -362,3 +362,8 @@ u16 sub_818D6CC(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 de } return 0xFFFF; } + +u16 sub_818D778(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 ignoreDeoxys) +{ + return oamt_spawn_poke_or_trainer_picture(species, otId, personality, isFrontPic, x, y, paletteSlot, paletteTag, FALSE, ignoreDeoxys); +} From 057894f3c583f99b4c626181fc86cfc0744c2ea1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 08:36:45 -0400 Subject: [PATCH 223/342] sub_818D7D8 --- asm/battle_dome_cards.s | 39 --------------------------------------- src/battle_dome_cards.c | 5 +++++ 2 files changed, 5 insertions(+), 39 deletions(-) diff --git a/asm/battle_dome_cards.s b/asm/battle_dome_cards.s index 712da90ad..5819bc79c 100644 --- a/asm/battle_dome_cards.s +++ b/asm/battle_dome_cards.s @@ -5,45 +5,6 @@ .text - thumb_func_start sub_818D7D8 -sub_818D7D8: @ 818D7D8 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x14 - ldr r4, [sp, 0x2C] - ldr r5, [sp, 0x30] - ldr r6, [sp, 0x34] - ldr r7, [sp, 0x38] - lsls r0, 16 - lsrs r0, 16 - lsls r3, 24 - lsrs r3, 24 - lsls r6, 24 - lsrs r6, 24 - lsls r7, 16 - lsrs r7, 16 - lsls r4, 16 - asrs r4, 16 - str r4, [sp] - lsls r5, 16 - asrs r5, 16 - str r5, [sp, 0x4] - str r6, [sp, 0x8] - str r7, [sp, 0xC] - movs r4, 0 - str r4, [sp, 0x10] - bl sub_818D778 - lsls r0, 16 - lsrs r0, 16 - add sp, 0x14 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_818D7D8 - thumb_func_start sub_818D820 sub_818D820: @ 818D820 push {lr} diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index 1e6a98810..7df33e403 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -367,3 +367,8 @@ u16 sub_818D778(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, { return oamt_spawn_poke_or_trainer_picture(species, otId, personality, isFrontPic, x, y, paletteSlot, paletteTag, FALSE, ignoreDeoxys); } + +u16 sub_818D7D8(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag) +{ + return sub_818D778(species, otId, personality, isFrontPic, x, y, paletteSlot, paletteTag, FALSE); +} From 63ff09e806b2f8bd38e50fec7aa7d63367060df4 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 08:53:31 -0400 Subject: [PATCH 224/342] Nearly finished with battle_dome_cards --- asm/battle_dome_cards.s | 195 +--------------------------------------- src/battle_dome_cards.c | 50 +++++++++++ 2 files changed, 51 insertions(+), 194 deletions(-) diff --git a/asm/battle_dome_cards.s b/asm/battle_dome_cards.s index 5819bc79c..35657308a 100644 --- a/asm/battle_dome_cards.s +++ b/asm/battle_dome_cards.s @@ -5,199 +5,6 @@ .text - thumb_func_start sub_818D820 -sub_818D820: @ 818D820 - push {lr} - lsls r0, 16 - lsrs r0, 16 - bl sub_818D5B0 - lsls r0, 16 - lsrs r0, 16 - pop {r1} - bx r1 - thumb_func_end sub_818D820 - - thumb_func_start sub_818D834 -sub_818D834: @ 818D834 - push {r4,r5,lr} - sub sp, 0xC - ldr r4, [sp, 0x18] - ldr r5, [sp, 0x1C] - lsls r0, 16 - lsrs r0, 16 - lsls r3, 24 - lsrs r3, 24 - lsls r4, 24 - lsrs r4, 24 - lsls r5, 24 - lsrs r5, 24 - str r4, [sp] - str r5, [sp, 0x4] - movs r4, 0 - str r4, [sp, 0x8] - bl sub_818D65C - lsls r0, 16 - lsrs r0, 16 - add sp, 0xC - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_818D834 - - thumb_func_start sub_818D864 -sub_818D864: @ 818D864 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x14 - ldr r4, [sp, 0x2C] - ldr r5, [sp, 0x30] - ldr r6, [sp, 0x34] - ldr r7, [sp, 0x38] - lsls r0, 16 - lsrs r0, 16 - lsls r3, 24 - lsrs r3, 24 - lsls r4, 16 - lsrs r4, 16 - lsls r5, 16 - lsrs r5, 16 - lsls r6, 24 - lsrs r6, 24 - lsls r7, 24 - lsrs r7, 24 - str r4, [sp] - str r5, [sp, 0x4] - str r6, [sp, 0x8] - str r7, [sp, 0xC] - movs r4, 0 - str r4, [sp, 0x10] - bl sub_818D6CC - lsls r0, 16 - lsrs r0, 16 - add sp, 0x14 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_818D864 - - thumb_func_start sub_818D8AC -sub_818D8AC: @ 818D8AC - push {r4,r5,lr} - sub sp, 0x14 - adds r5, r1, 0 - ldr r1, [sp, 0x20] - ldr r4, [sp, 0x24] - lsls r0, 16 - lsrs r0, 16 - lsls r5, 24 - lsrs r5, 24 - lsls r1, 24 - lsrs r1, 24 - lsls r4, 16 - lsrs r4, 16 - lsls r2, 16 - asrs r2, 16 - str r2, [sp] - lsls r3, 16 - asrs r3, 16 - str r3, [sp, 0x4] - str r1, [sp, 0x8] - str r4, [sp, 0xC] - movs r1, 0x1 - str r1, [sp, 0x10] - movs r1, 0 - movs r2, 0 - adds r3, r5, 0 - bl sub_818D384 - lsls r0, 16 - lsrs r0, 16 - add sp, 0x14 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_818D8AC - - thumb_func_start sub_818D8F0 -sub_818D8F0: @ 818D8F0 - push {lr} - lsls r0, 16 - lsrs r0, 16 - bl sub_818D5B0 - lsls r0, 16 - lsrs r0, 16 - pop {r1} - bx r1 - thumb_func_end sub_818D8F0 - - thumb_func_start sub_818D904 -sub_818D904: @ 818D904 - push {r4,lr} - sub sp, 0xC - adds r4, r1, 0 - lsls r0, 16 - lsrs r0, 16 - lsls r4, 24 - lsrs r4, 24 - lsls r2, 24 - lsrs r2, 24 - lsls r3, 24 - lsrs r3, 24 - str r2, [sp] - str r3, [sp, 0x4] - movs r1, 0x1 - str r1, [sp, 0x8] - movs r1, 0 - movs r2, 0 - adds r3, r4, 0 - bl sub_818D65C - lsls r0, 16 - lsrs r0, 16 - add sp, 0xC - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_818D904 - - thumb_func_start sub_818D938 -sub_818D938: @ 818D938 - push {r4,r5,lr} - sub sp, 0x14 - adds r5, r1, 0 - ldr r1, [sp, 0x20] - ldr r4, [sp, 0x24] - lsls r0, 16 - lsrs r0, 16 - lsls r5, 24 - lsrs r5, 24 - lsls r2, 16 - lsrs r2, 16 - lsls r3, 16 - lsrs r3, 16 - lsls r1, 24 - lsrs r1, 24 - lsls r4, 24 - lsrs r4, 24 - str r2, [sp] - str r3, [sp, 0x4] - str r1, [sp, 0x8] - str r4, [sp, 0xC] - movs r1, 0x1 - str r1, [sp, 0x10] - movs r1, 0 - movs r2, 0 - adds r3, r5, 0 - bl sub_818D6CC - lsls r0, 16 - lsrs r0, 16 - add sp, 0x14 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_818D938 - thumb_func_start sub_818D97C sub_818D97C: @ 818D97C push {lr} @@ -223,5 +30,5 @@ _0818D9A2: bx r1 .pool thumb_func_end sub_818D97C - + .align 2, 0 @ Don't pad with nop. diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index 7df33e403..280eac163 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -20,6 +20,7 @@ extern const union AnimCmd *const *const gUnknown_08309AAC[NUM_SPECIES]; extern const union AnimCmd *const *const gUnknown_0830536C[]; extern const struct OamData gUnknown_0860B064; extern const struct OamData gUnknown_0860B06C; +extern const u8 gUnknown_0831F578[]; // Static type declarations @@ -372,3 +373,52 @@ u16 sub_818D7D8(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, { return sub_818D778(species, otId, personality, isFrontPic, x, y, paletteSlot, paletteTag, FALSE); } + +u16 sub_818D820(u16 spriteId) +{ + return sub_818D5B0(spriteId); +} + +u16 sub_818D834(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId) +{ + return sub_818D65C(species, otId, personality, isFrontPic, paletteSlot, windowId, FALSE); +} + +u16 sub_818D864(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId) +{ + return sub_818D6CC(species, otId, personality, isFrontPic, destX, destY, paletteSlot, windowId, FALSE); +} + +u16 sub_818D8AC(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag) +{ + return sub_818D384(species, 0, 0, isFrontPic, x, y, paletteSlot, paletteTag, TRUE); +} + +u16 sub_818D8F0(u16 spriteId) +{ + return sub_818D5B0(spriteId); +} + +u16 sub_818D904(u16 species, bool8 isFrontPic, u8 paletteSlot, u8 windowId) +{ + return sub_818D65C(species, 0, 0, isFrontPic, paletteSlot, windowId, TRUE); +} + +u16 sub_818D938(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId) +{ + return sub_818D6CC(species, 0, 0, isFrontPic, destX, destY, paletteSlot, windowId, TRUE); +} + +//u8 sub_818D97C(u8 a0, u8 a1) +//{ +// u8 id; +// if (a1 == 1 && a0) +// { +// id = gUnknown_0831F578[0x3F]; +// } +// else +// { +// id = gUnknown_0831F578[0x3C]; +// } +// return id; +//} From bff89725ec31f87c296ec45f107f81dfe3cd54d6 Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 19 Sep 2017 09:46:17 -0400 Subject: [PATCH 225/342] Add battle_dome_cards header to expose symbols as needed --- asm/battle_dome_cards.s | 34 -------------------- data/data_emerald.s | 9 ------ include/battle_dome_cards.h | 13 ++++++++ ld_script.txt | 2 +- src/battle_dome_cards.c | 64 ++++++++++++++++++++----------------- 5 files changed, 49 insertions(+), 73 deletions(-) delete mode 100644 asm/battle_dome_cards.s create mode 100644 include/battle_dome_cards.h diff --git a/asm/battle_dome_cards.s b/asm/battle_dome_cards.s deleted file mode 100644 index 35657308a..000000000 --- a/asm/battle_dome_cards.s +++ /dev/null @@ -1,34 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_818D97C -sub_818D97C: @ 818D97C - push {lr} - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - cmp r1, 0x1 - bne _0818D9A2 - cmp r0, 0 - beq _0818D99C - ldr r0, =gUnknown_0831F578 - adds r0, 0x3F - ldrb r0, [r0] - b _0818D9A2 - .pool -_0818D99C: - ldr r0, =gUnknown_0831F578 - adds r0, 0x3C - ldrb r0, [r0] -_0818D9A2: - pop {r1} - bx r1 - .pool - thumb_func_end sub_818D97C - - .align 2, 0 @ Don't pad with nop. diff --git a/data/data_emerald.s b/data/data_emerald.s index 54bda4a0e..88c57af8d 100644 --- a/data/data_emerald.s +++ b/data/data_emerald.s @@ -3,15 +3,6 @@ .section .rodata -gUnknown_0860B058:: @ 860B058 - .incbin "baserom.gba", 0x60b058, 0xc - -gUnknown_0860B064:: @ 860B064 - .incbin "baserom.gba", 0x60b064, 0x8 - -gUnknown_0860B06C:: @ 860B06C - .incbin "baserom.gba", 0x60b06c, 0x8 - gUnknown_0860B074:: @ 860B074 .incbin "baserom.gba", 0x60b074, 0xa diff --git a/include/battle_dome_cards.h b/include/battle_dome_cards.h new file mode 100644 index 000000000..a0696d156 --- /dev/null +++ b/include/battle_dome_cards.h @@ -0,0 +1,13 @@ +#ifndef GUARD_BATTLE_DOME_CARDS_H +#define GUARD_BATTLE_DOME_CARDS_H + +bool16 dp13_810BB8C(void); +u16 sub_818D3E4(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); +u16 sub_818D7D8(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); +u16 sub_818D820(u16 spriteId); +u16 sub_818D8AC(u16 species, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag); +u16 sub_818D8F0(u16 spriteId); +u16 sub_818D938(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId); +u8 sub_818D97C(u8 a0, u8 a1); + +#endif //GUARD_BATTLE_DOME_CARDS_H diff --git a/ld_script.txt b/ld_script.txt index 9ba5755c9..8326fe76a 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -240,7 +240,6 @@ SECTIONS { asm/battle_controller_recorded_opponent.o(.text); asm/battle_controller_recorded_player.o(.text); src/battle_dome_cards.o(.text); - asm/battle_dome_cards.o(.text); asm/lilycove_lady.o(.text); asm/battle_frontier_1.o(.text); asm/new_menu_helpers.o(.text); @@ -377,6 +376,7 @@ SECTIONS { data/data_860A4AC.o(.rodata); data/battle_controller_recorded_opponent.o(.rodata); data/battle_controller_recorded_player.o(.rodata); + src/battle_dome_cards.o(.rodata); data/data_emerald.o(.rodata); data/battle_controller_player_partner.o(.rodata); data/data_emerald2.o(.rodata); diff --git a/src/battle_dome_cards.c b/src/battle_dome_cards.c index 280eac163..c0557ac70 100644 --- a/src/battle_dome_cards.c +++ b/src/battle_dome_cards.c @@ -7,6 +7,7 @@ #include "species.h" #include "palette.h" #include "decompress.h" +#include "battle_dome_cards.h" extern const struct CompressedSpriteSheet gMonFrontPicTable[NUM_SPECIES]; extern const struct CompressedSpriteSheet gMonBackPicTable[NUM_SPECIES]; @@ -18,8 +19,6 @@ extern const union AffineAnimCmd *const gUnknown_082FF694[]; extern const union AnimCmd *const gUnknown_082FF70C[]; extern const union AnimCmd *const *const gUnknown_08309AAC[NUM_SPECIES]; extern const union AnimCmd *const *const gUnknown_0830536C[]; -extern const struct OamData gUnknown_0860B064; -extern const struct OamData gUnknown_0860B06C; extern const u8 gUnknown_0831F578[]; // Static type declarations @@ -35,17 +34,23 @@ struct BattleDomeCard { // Static RAM declarations static EWRAM_DATA struct SpriteTemplate gUnknown_0203CCEC = {}; -EWRAM_DATA struct BattleDomeCard gUnknown_0203CD04[8] = {}; +static EWRAM_DATA struct BattleDomeCard gUnknown_0203CD04[8] = {}; // Static ROM declarations // .rodata -extern const struct BattleDomeCard gUnknown_0860B058; +static const struct BattleDomeCard gUnknown_0860B058 = {}; +static const struct OamData gUnknown_0860B064 = { + .size = 3 +}; +static const struct OamData gUnknown_0860B06C = { + .affineMode = 1, .size = 3 +}; // .text -void nullsub_122(struct Sprite *sprite) +static void nullsub_122(struct Sprite *sprite) { } @@ -61,7 +66,7 @@ bool16 dp13_810BB8C(void) return FALSE; } -bool16 load_pokemon_image_TODO(u16 species, u32 personality, bool8 isFrontPic, u8 *dest, bool8 isTrainer, bool8 ignoreDeoxys) +static bool16 load_pokemon_image_TODO(u16 species, u32 personality, bool8 isFrontPic, u8 *dest, bool8 isTrainer, bool8 ignoreDeoxys) { if (!isTrainer) { @@ -102,12 +107,12 @@ bool16 load_pokemon_image_TODO(u16 species, u32 personality, bool8 isFrontPic, u return FALSE; } -bool16 sub_818D09C(u16 species, u32 personality, bool8 isFrontPic, u8 *dest, bool8 isTrainer) +static bool16 sub_818D09C(u16 species, u32 personality, bool8 isFrontPic, u8 *dest, bool8 isTrainer) { return load_pokemon_image_TODO(species, personality, isFrontPic, dest, isTrainer, FALSE); } -void sub_818D0C4(u16 species, u32 otId, u32 personality, u8 paletteSlot, u16 paletteTag, bool8 isTrainer) +static void sub_818D0C4(u16 species, u32 otId, u32 personality, u8 paletteSlot, u16 paletteTag, bool8 isTrainer) { if (!isTrainer) { @@ -137,7 +142,7 @@ void sub_818D0C4(u16 species, u32 otId, u32 personality, u8 paletteSlot, u16 pal } } -void sub_818D180(u16 species, u32 otId, u32 personality, u8 paletteSlot, bool8 isTrainer) +static void sub_818D180(u16 species, u32 otId, u32 personality, u8 paletteSlot, bool8 isTrainer) { if (!isTrainer) { @@ -149,7 +154,7 @@ void sub_818D180(u16 species, u32 otId, u32 personality, u8 paletteSlot, bool8 i } } -void uns_builder_assign_animtable1(bool8 isTrainer) +static void uns_builder_assign_animtable1(bool8 isTrainer) { if (!isTrainer) { @@ -161,7 +166,7 @@ void uns_builder_assign_animtable1(bool8 isTrainer) } } -u16 oamt_spawn_poke_or_trainer_picture(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 isTrainer, bool8 ignoreDeoxys) +static u16 oamt_spawn_poke_or_trainer_picture(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 isTrainer, bool8 ignoreDeoxys) { u8 i; u8 *framePics; @@ -221,7 +226,7 @@ u16 oamt_spawn_poke_or_trainer_picture(u16 species, u32 otId, u32 personality, b return spriteId; } -u16 sub_818D384(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 isTrainer) +static u16 sub_818D384(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 isTrainer) { return oamt_spawn_poke_or_trainer_picture(species, otId, personality, isFrontPic, x, y, paletteSlot, paletteTag, isTrainer, FALSE); } @@ -309,7 +314,7 @@ u16 sub_818D3E4(u16 species, u32 otId, u32 personality, u8 flags, s16 x, s16 y, return spriteId; } -u16 sub_818D5B0(u16 spriteId) +static u16 sub_818D5B0(u16 spriteId) { u8 i; u8 *framePics; @@ -339,7 +344,7 @@ u16 sub_818D5B0(u16 spriteId) return 0; } -u16 sub_818D65C(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId, bool8 isTrainer) +static u16 sub_818D65C(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId, bool8 isTrainer) { if (sub_818D09C(species, personality, isFrontPic, (u8 *)GetWindowAttribute(windowId, WINDOW_TILE_DATA), FALSE)) { @@ -349,7 +354,7 @@ u16 sub_818D65C(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 pal return 0; } -u16 sub_818D6CC(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId, bool8 isTrainer) +static u16 sub_818D6CC(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId, bool8 isTrainer) { u8 *framePics; @@ -364,7 +369,7 @@ u16 sub_818D6CC(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 de return 0xFFFF; } -u16 sub_818D778(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 ignoreDeoxys) +static u16 sub_818D778(u16 species, u32 otId, u32 personality, bool8 isFrontPic, s16 x, s16 y, u8 paletteSlot, u16 paletteTag, bool8 ignoreDeoxys) { return oamt_spawn_poke_or_trainer_picture(species, otId, personality, isFrontPic, x, y, paletteSlot, paletteTag, FALSE, ignoreDeoxys); } @@ -409,16 +414,17 @@ u16 sub_818D938(u16 species, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteS return sub_818D6CC(species, 0, 0, isFrontPic, destX, destY, paletteSlot, windowId, TRUE); } -//u8 sub_818D97C(u8 a0, u8 a1) -//{ -// u8 id; -// if (a1 == 1 && a0) -// { -// id = gUnknown_0831F578[0x3F]; -// } -// else -// { -// id = gUnknown_0831F578[0x3C]; -// } -// return id; -//} +u8 sub_818D97C(u8 a0, u8 a1) +{ + if (a1 == 1) + { + switch (a0) + { + default: + return gUnknown_0831F578[0x3F]; + case 0: + return gUnknown_0831F578[0x3C]; + } + } + return a0; +} From b3c788f2ca9e3d0ab6e43617ed7fedfe605bc249 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Tue, 19 Sep 2017 21:01:12 +0200 Subject: [PATCH 226/342] begin work on battle4, organize battle headers --- asm/battle_2.s | 20 +- asm/battle_4.s | 1177 +------------------------------ data/battle_scripts_1.s | 10 +- include/battle.h | 58 +- include/calculate_base_damage.h | 6 + src/battle_3.c | 27 +- src/battle_4.c | 423 ++++++++++- 7 files changed, 523 insertions(+), 1198 deletions(-) create mode 100644 include/calculate_base_damage.h diff --git a/asm/battle_2.s b/asm/battle_2.s index 502f2bab8..3e1d67f4c 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -8409,7 +8409,7 @@ bc_battle_begin_message: @ 803B120 strb r0, [r1] ldrb r1, [r1] movs r0, 0 - bl b_std_message + bl PrepareStringBattle ldr r1, =gBattleMainFunc ldr r0, =sub_803B180 str r0, [r1] @@ -8431,7 +8431,7 @@ bc_8013568: @ 803B158 str r0, [r1] movs r0, 0 movs r1, 0 - bl b_std_message + bl PrepareStringBattle _0803B170: pop {r0} bx r0 @@ -8473,7 +8473,7 @@ _0803B1BA: lsls r1, 24 lsrs r1, 24 movs r0, 0x1 - bl b_std_message + bl PrepareStringBattle ldr r1, =gBattleMainFunc ldr r0, =sub_803B25C str r0, [r1] @@ -8743,7 +8743,7 @@ _0803B3F6: lsls r1, 24 lsrs r1, 24 movs r0, 0x1 - bl b_std_message + bl PrepareStringBattle _0803B412: ldr r1, =gBattleMainFunc ldr r0, =sub_803B4C8 @@ -15698,8 +15698,8 @@ _0803F47A: bx r1 thumb_func_end get_battle_side_of_something - thumb_func_start sub_803F480 -sub_803F480: @ 803F480 + thumb_func_start PressurePPLose +PressurePPLose: @ 803F480 push {r4-r7,lr} sub sp, 0x4 lsls r0, 24 @@ -15795,7 +15795,7 @@ _0803F532: pop {r0} bx r0 .pool - thumb_func_end sub_803F480 + thumb_func_end PressurePPLose thumb_func_start sub_803F548 sub_803F548: @ 803F548 @@ -16300,8 +16300,8 @@ _0803F95E: bx r1 thumb_func_end sub_803F90C - thumb_func_start b_std_message -b_std_message: @ 803F964 + thumb_func_start PrepareStringBattle +PrepareStringBattle: @ 803F964 push {r4,lr} adds r2, r0, 0 lsls r2, 16 @@ -16317,7 +16317,7 @@ b_std_message: @ 803F964 pop {r0} bx r0 .pool - thumb_func_end b_std_message + thumb_func_end PrepareStringBattle thumb_func_start sub_803F988 sub_803F988: @ 803F988 diff --git a/asm/battle_4.s b/asm/battle_4.s index 075321c71..8300024e6 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -5,1149 +5,6 @@ .text - - thumb_func_start atk00_attackcanceler -atk00_attackcanceler: @ 8045FFC - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x4 - ldr r0, =gBattleOutcome - ldrb r0, [r0] - cmp r0, 0 - beq _08046020 - ldr r1, =gFightStateTracker - movs r0, 0xC - strb r0, [r1] - b _08046398 - .pool -_08046020: - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _08046064 - ldr r2, =gHitMarker - ldr r1, [r2] - movs r0, 0x80 - lsls r0, 2 - ands r0, r1 - cmp r0, 0 - bne _08046064 - movs r0, 0x80 - lsls r0, 12 - orrs r1, r0 - str r1, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082D8A4E - b _08046396 - .pool -_08046064: - bl AtkCanceller_UnableToUseMove - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0 - beq _08046072 - b _08046398 -_08046072: - ldr r0, =gBankTarget - ldrb r1, [r0] - str r2, [sp] - movs r0, 0x2 - movs r2, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _0804608A - b _08046398 -_0804608A: - ldr r4, =gBattleMons - ldr r0, =gCurrMovePos - ldrb r1, [r0] - ldr r3, =gBankAttacker - ldrb r2, [r3] - movs r0, 0x58 - muls r2, r0 - adds r1, r2 - adds r0, r4, 0 - adds r0, 0x24 - adds r1, r0 - ldrb r0, [r1] - ldr r5, =gHitMarker - cmp r0, 0 - bne _08046108 - ldr r0, =gCurrentMove - ldrh r0, [r0] - cmp r0, 0xA5 - beq _08046108 - ldr r0, [r5] - ldr r1, =0x00800200 - ands r0, r1 - cmp r0, 0 - bne _08046108 - adds r0, r4, 0 - adds r0, 0x50 - adds r0, r2, r0 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 5 - ands r0, r1 - cmp r0, 0 - bne _08046108 - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB07A - str r0, [r1] - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - b _08046398 - .pool -_08046108: - ldr r0, [r5] - ldr r1, =0xff7fffff - ands r0, r1 - str r0, [r5] - movs r6, 0x80 - lsls r6, 18 - ands r0, r6 - cmp r0, 0 - bne _08046160 - ldrb r1, [r3] - movs r0, 0x58 - muls r0, r1 - adds r1, r4, 0 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 5 - ands r0, r1 - cmp r0, 0 - bne _08046160 - bl IsPokeDisobedient - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0 - beq _08046160 - cmp r2, 0x2 - bne _08046150 - ldr r0, [r5] - orrs r0, r6 - str r0, [r5] - b _08046398 - .pool -_08046150: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r2, 0x1 - orrs r1, r2 - strb r1, [r0] - b _08046398 - .pool -_08046160: - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 18 - orrs r0, r1 - str r0, [r2] - ldr r2, =gProtectStructs - ldr r1, =gBankTarget - ldrb r3, [r1] - lsls r0, r3, 4 - adds r0, r2 - ldrb r0, [r0] - lsls r0, 27 - mov r8, r1 - mov r9, r2 - cmp r0, 0 - bge _080461E8 - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0, 0x8] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _080461E8 - ldr r0, =gBankAttacker - ldrb r0, [r0] - ldr r2, =0x00000115 - adds r1, r3, 0 - bl sub_803F480 - mov r0, r8 - ldrb r1, [r0] - lsls r1, 4 - add r1, r9 - ldrb r2, [r1] - movs r0, 0x11 - negs r0, r0 - ands r0, r2 - strb r0, [r1] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB194 - b _08046396 - .pool -_080461E8: - movs r2, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r2, r0 - bge _0804622A - ldr r6, =gProtectStructs - ldr r1, =gBattleMoves - mov r12, r1 - adds r5, r0, 0 - ldr r7, =gTurnOrder -_080461FC: - adds r4, r2, r7 - ldrb r3, [r4] - lsls r0, r3, 4 - adds r0, r6 - ldrb r0, [r0] - lsls r0, 26 - cmp r0, 0 - bge _08046224 - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - add r0, r12 - ldrb r1, [r0, 0x8] - movs r0, 0x8 - ands r0, r1 - cmp r0, 0 - beq _08046224 - b _08046350 -_08046224: - adds r2, 0x1 - cmp r2, r5 - blt _080461FC -_0804622A: - ldr r0, =gSpecialStatuses - mov r1, r8 - ldrb r2, [r1] - lsls r1, r2, 2 - adds r1, r2 - lsls r1, 2 - adds r1, r0 - ldrb r3, [r1] - lsls r0, r3, 30 - cmp r0, 0 - bge _08046288 - movs r0, 0x3 - negs r0, r0 - ands r0, r3 - strb r0, [r1] - ldr r4, =gLastUsedAbility - movs r0, 0x1F - strb r0, [r4] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB53E - str r0, [r1] - mov r1, r8 - ldrb r0, [r1] - ldrb r1, [r4] - bl RecordAbilityBattle - b _08046398 - .pool -_08046288: - lsls r0, r2, 4 - add r0, r9 - ldrb r0, [r0] - lsls r0, 31 - cmp r0, 0 - bne _08046296 - b _08046390 -_08046296: - ldr r1, =gBattleMoves - ldr r2, =gCurrentMove - ldrh r3, [r2] - lsls r0, r3, 1 - adds r0, r3 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x8] - movs r0, 0x2 - ands r0, r1 - adds r4, r2, 0 - cmp r0, 0 - beq _08046390 - cmp r3, 0xAE - bne _080462D4 - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r1, r0, r2 - adds r0, r1, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0x7 - beq _080462D4 - adds r0, r1, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0x7 - bne _08046390 -_080462D4: - ldrh r0, [r4] - bl sub_8052F48 - lsls r0, 24 - cmp r0, 0 - beq _080462FA - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 5 - ands r0, r1 - cmp r0, 0 - beq _08046390 -_080462FA: - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl CancelMultiTurnMoves - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gUnknown_02024250 - ldr r3, =gBankTarget - ldrb r0, [r3] - lsls r0, 1 - adds r0, r1 - movs r2, 0 - strh r2, [r0] - ldr r1, =gUnknown_02024258 - ldrb r0, [r3] - lsls r0, 1 - adds r0, r1 - strh r2, [r0] - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x6] - b _08046390 - .pool -_08046350: - ldr r0, =gBankAttacker - ldrb r0, [r0] - ldr r2, =0x00000121 - adds r1, r3, 0 - bl sub_803F480 - ldrb r1, [r4] - lsls r1, 4 - adds r1, r6 - ldrb r2, [r1] - movs r0, 0x21 - negs r0, r0 - ands r0, r2 - strb r0, [r1] - ldr r1, =gBattleScripting - ldrb r0, [r4] - strb r0, [r1, 0x17] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB1AC - b _08046396 - .pool -_08046390: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 -_08046396: - str r0, [r1] -_08046398: - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk00_attackcanceler - - thumb_func_start mcmd_jump_if_move_not_executed -mcmd_jump_if_move_not_executed: @ 80463AC - push {r4-r6,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 16 - lsrs r6, r1, 16 - ldr r1, =gBattlescriptCurrInstr - ldr r5, [r1] - adds r4, r5, r0 - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _0804640C - ldr r1, =gUnknown_02024250 - ldr r3, =gBankTarget - ldrb r0, [r3] - lsls r0, 1 - adds r0, r1 - movs r2, 0 - strh r2, [r0] - ldr r1, =gUnknown_02024258 - ldrb r0, [r3] - lsls r0, 1 - adds r0, r1 - strh r2, [r0] - ldrb r4, [r5, 0x1] - ldrb r0, [r5, 0x2] - lsls r0, 8 - orrs r4, r0 - ldrb r0, [r5, 0x3] - lsls r0, 16 - orrs r4, r0 - ldrb r0, [r5, 0x4] - lsls r0, 24 - orrs r4, r0 - b _08046426 - .pool -_0804640C: - bl b_feature_update_destiny_bond - ldr r0, =gBankTarget - ldrb r1, [r0] - str r6, [sp] - movs r0, 0x3 - movs r2, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _0804642A -_08046426: - ldr r0, =gBattlescriptCurrInstr - str r4, [r0] -_0804642A: - add sp, 0x4 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end mcmd_jump_if_move_not_executed - - thumb_func_start atk40_jump_if_move_affected_by_protect -atk40_jump_if_move_affected_by_protect: @ 804643C - push {lr} - ldr r1, =gProtectStructs - ldr r0, =gBankTarget - ldrb r0, [r0] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 31 - cmp r0, 0 - beq _0804649C - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0, 0x8] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _0804649C - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - movs r0, 0x5 - movs r1, 0 - bl mcmd_jump_if_move_not_executed - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x6] - b _080464A4 - .pool -_0804649C: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_080464A4: - pop {r0} - bx r0 - .pool - thumb_func_end atk40_jump_if_move_affected_by_protect - - thumb_func_start sub_80464AC -sub_80464AC: @ 80464AC - push {r4,lr} - lsls r0, 16 - lsrs r3, r0, 16 - movs r4, 0 - ldr r1, =gProtectStructs - ldr r0, =gBankTarget - ldrb r0, [r0] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 31 - cmp r0, 0 - beq _080464F8 - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0, 0x8] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _080464F8 - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - movs r0, 0x7 - adds r1, r3, 0 - bl mcmd_jump_if_move_not_executed - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x6] - movs r4, 0x1 -_080464F8: - adds r0, r4, 0 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80464AC - - thumb_func_start sub_8046518 -sub_8046518: @ 8046518 - push {r4-r6,lr} - sub sp, 0x4 - lsls r0, 16 - lsrs r5, r0, 16 - ldr r2, =gStatuses3 - ldr r3, =gBankTarget - ldrb r4, [r3] - lsls r0, r4, 2 - adds r0, r2 - ldr r1, [r0] - movs r0, 0x18 - ands r1, r0 - adds r6, r2, 0 - cmp r1, 0 - beq _0804654A - ldr r1, =gDisableStructs - lsls r0, r4, 3 - subs r0, r4 - lsls r0, 2 - adds r0, r1 - ldr r1, =gBankAttacker - ldrb r0, [r0, 0x15] - ldrb r1, [r1] - cmp r0, r1 - beq _08046634 -_0804654A: - ldr r0, =gHitMarker - ldr r1, [r0] - movs r2, 0x80 - lsls r2, 9 - ands r1, r2 - adds r2, r0, 0 - cmp r1, 0 - bne _08046590 - ldrb r0, [r3] - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - beq _08046590 -_0804656A: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r2, 0x1 - orrs r1, r2 - strb r1, [r0] - b _08046634 - .pool -_08046590: - ldr r0, [r2] - ldr r1, =0xfffeffff - ands r0, r1 - str r0, [r2] - movs r1, 0x80 - lsls r1, 10 - ands r0, r1 - cmp r0, 0 - bne _080465B2 - ldrb r0, [r3] - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - movs r1, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0804656A -_080465B2: - ldr r0, [r2] - ldr r1, =0xfffdffff - ands r0, r1 - str r0, [r2] - movs r1, 0x80 - lsls r1, 11 - ands r0, r1 - cmp r0, 0 - bne _080465D2 - ldrb r0, [r3] - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - ands r0, r1 - cmp r0, 0 - bne _0804656A -_080465D2: - ldr r0, [r2] - ldr r1, =0xfffbffff - ands r0, r1 - str r0, [r2] - movs r0, 0 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0xD - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r0, 24 - lsls r4, r5, 1 - cmp r0, 0 - bne _08046622 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0x4D - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _08046622 - ldr r0, =gBattleWeather - ldrh r1, [r0] - movs r0, 0x7 - ands r0, r1 - cmp r0, 0 - beq _08046622 - ldr r0, =gBattleMoves - adds r1, r4, r5 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1] - cmp r0, 0x98 - beq _08046634 -_08046622: - ldr r1, =gBattleMoves - adds r0, r4, r5 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0x11 - beq _08046634 - cmp r0, 0x4E - bne _08046654 -_08046634: - movs r0, 0x7 - adds r1, r5, 0 - bl mcmd_jump_if_move_not_executed - movs r0, 0x1 - b _08046656 - .pool -_08046654: - movs r0, 0 -_08046656: - add sp, 0x4 - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_8046518 - - thumb_func_start atk01_accuracycheck -atk01_accuracycheck: @ 8046660 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x8 - ldr r0, =gBattlescriptCurrInstr - ldr r5, [r0] - ldrb r6, [r5, 0x5] - ldrb r1, [r5, 0x6] - lsls r1, 8 - orrs r6, r1 - adds r1, r6, 0x2 - lsls r1, 16 - lsrs r1, 16 - adds r7, r0, 0 - cmp r1, 0x1 - bhi _0804671C - ldr r2, =gStatuses3 - ldr r3, =gBankTarget - ldrb r4, [r3] - lsls r0, r4, 2 - adds r0, r2 - ldr r1, [r0] - movs r0, 0x18 - ands r1, r0 - cmp r1, 0 - beq _080466D0 - ldr r0, =0x0000ffff - cmp r6, r0 - bne _080466D0 - ldr r1, =gDisableStructs - lsls r0, r4, 3 - subs r0, r4 - lsls r0, 2 - adds r0, r1 - ldr r1, =gBankAttacker - ldrb r0, [r0, 0x15] - ldrb r1, [r1] - cmp r0, r1 - bne _080466D0 - adds r0, r5, 0x7 - str r0, [r7] - b _080469D2 - .pool -_080466D0: - ldrb r0, [r3] - lsls r0, 2 - adds r0, r2 - ldr r0, [r0] - ldr r1, =0x000400c0 - ands r0, r1 - cmp r0, 0 - beq _08046700 - ldr r2, [r7] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r7] - b _080469D2 - .pool -_08046700: - movs r0, 0 - bl sub_80464AC - lsls r0, 24 - cmp r0, 0 - beq _0804670E - b _080469D2 -_0804670E: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x7 - str r0, [r1] - b _080469D2 - .pool -_0804671C: - cmp r6, 0 - bne _08046724 - ldr r0, =gCurrentMove - ldrh r6, [r0] -_08046724: - ldr r0, =gBattleStruct - ldr r0, [r0] - ldrb r0, [r0, 0x13] - cmp r0, 0 - beq _08046744 - movs r1, 0x3F - mov r10, r1 - mov r2, r10 - ands r2, r0 - mov r10, r2 - b _08046752 - .pool -_08046744: - ldr r1, =gBattleMoves - lsls r0, r6, 1 - adds r0, r6 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0, 0x2] - mov r10, r0 -_08046752: - adds r0, r6, 0 - bl sub_80464AC - lsls r0, 24 - cmp r0, 0 - beq _08046760 - b _080469D2 -_08046760: - adds r0, r6, 0 - bl sub_8046518 - lsls r0, 24 - cmp r0, 0 - beq _0804676E - b _080469D2 -_0804676E: - ldr r3, =gBattleMons - ldr r0, =gBankTarget - ldrb r0, [r0] - movs r2, 0x58 - adds r4, r0, 0 - muls r4, r2 - adds r0, r3, 0 - adds r0, 0x50 - adds r0, r4, r0 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 22 - ands r0, r1 - cmp r0, 0 - beq _080467A8 - ldr r0, =gBankAttacker - ldrb r0, [r0] - muls r0, r2 - adds r0, r3 - ldrb r5, [r0, 0x1E] - b _080467BE - .pool -_080467A8: - ldr r0, =gBankAttacker - ldrb r0, [r0] - muls r0, r2 - adds r0, r3 - ldrb r0, [r0, 0x1E] - adds r0, 0x6 - adds r1, r4, r3 - ldrb r1, [r1, 0x1F] - subs r0, r1 - lsls r0, 24 - lsrs r5, r0, 24 -_080467BE: - lsls r0, r5, 24 - cmp r0, 0 - bge _080467C6 - movs r5, 0 -_080467C6: - lsls r0, r5, 24 - asrs r0, 24 - cmp r0, 0xC - ble _080467D0 - movs r5, 0xC -_080467D0: - ldr r1, =gBattleMoves - lsls r4, r6, 1 - adds r0, r4, r6 - lsls r0, 2 - adds r7, r0, r1 - ldrb r3, [r7, 0x3] - mov r8, r3 - movs r0, 0 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0xD - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r0, 24 - str r4, [sp, 0x4] - cmp r0, 0 - bne _08046822 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0x4D - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _08046822 - ldr r0, =gBattleWeather - ldrh r1, [r0] - movs r0, 0x60 - ands r0, r1 - cmp r0, 0 - beq _08046822 - ldrb r0, [r7] - cmp r0, 0x98 - bne _08046822 - movs r0, 0x32 - mov r8, r0 -_08046822: - ldr r1, =gAccuracyStageRatios - lsls r0, r5, 24 - asrs r0, 22 - adds r0, r1 - ldrb r1, [r0] - mov r4, r8 - muls r4, r1 - ldrb r1, [r0, 0x1] - adds r0, r4, 0 - bl __divsi3 - lsls r0, 16 - lsrs r4, r0, 16 - ldr r7, =gBattleMons - ldr r0, =gBankAttacker - ldrb r0, [r0] - movs r5, 0x58 - muls r0, r5 - adds r0, r7 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0xE - bne _08046860 - lsls r0, r4, 6 - adds r0, r4 - lsls r0, 1 - movs r1, 0x64 - bl __divsi3 - lsls r0, 16 - lsrs r4, r0, 16 -_08046860: - movs r0, 0 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0xD - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - bne _080468B8 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0x4D - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _080468B8 - ldr r0, =gBankTarget - ldrb r0, [r0] - muls r0, r5 - adds r0, r7 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x8 - bne _080468B8 - ldr r0, =gBattleWeather - ldrh r1, [r0] - movs r0, 0x18 - ands r0, r1 - cmp r0, 0 - beq _080468B8 - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 4 - movs r1, 0x64 - bl __divsi3 - lsls r0, 16 - lsrs r4, r0, 16 -_080468B8: - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x20 - ldrb r0, [r0] - mov r9, r2 - cmp r0, 0x37 - bne _080468E4 - mov r1, r10 - cmp r1, 0x8 - bhi _080468E4 - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 4 - movs r1, 0x64 - bl __divsi3 - lsls r0, 16 - lsrs r4, r0, 16 -_080468E4: - ldr r2, =gBankTarget - mov r8, r2 - ldrb r2, [r2] - movs r7, 0x58 - adds r0, r2, 0 - muls r0, r7 - mov r3, r9 - adds r1, r0, r3 - ldrh r0, [r1, 0x2E] - cmp r0, 0xAF - bne _08046928 - ldr r1, =gEnigmaBerries - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r1 - ldrb r5, [r0, 0x7] - ldrb r2, [r0, 0x1A] - b _08046944 - .pool -_08046928: - ldrh r0, [r1, 0x2E] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r5, r0, 24 - mov r1, r8 - ldrb r0, [r1] - muls r0, r7 - add r0, r9 - ldrh r0, [r0, 0x2E] - bl ItemId_GetHoldEffectParam - lsls r0, 24 - lsrs r2, r0, 24 -_08046944: - ldr r0, =gStringBank - ldr r1, =gBankTarget - ldrb r1, [r1] - strb r1, [r0] - cmp r5, 0x16 - bne _08046960 - movs r0, 0x64 - subs r0, r2 - muls r0, r4 - movs r1, 0x64 - bl __divsi3 - lsls r0, 16 - lsrs r4, r0, 16 -_08046960: - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x64 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - adds r0, 0x1 - cmp r0, r4 - ble _080469CA - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _080469C0 - ldr r1, =gBattleMoves - ldr r2, [sp, 0x4] - adds r0, r2, r6 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0, 0x6] - cmp r0, 0x8 - beq _080469A2 - cmp r0, 0x20 - bne _080469C0 -_080469A2: - ldr r1, =gBattleCommunication - movs r0, 0x2 - b _080469C4 - .pool -_080469C0: - ldr r1, =gBattleCommunication - movs r0, 0 -_080469C4: - strb r0, [r1, 0x6] - bl b_wonderguard_and_levitate -_080469CA: - movs r0, 0x7 - adds r1, r6, 0 - bl mcmd_jump_if_move_not_executed -_080469D2: - add sp, 0x8 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk01_accuracycheck - - thumb_func_start atk02_attackstring -atk02_attackstring: @ 80469E8 - push {r4,r5,lr} - ldr r0, =gBattleExecBuffer - ldr r5, [r0] - cmp r5, 0 - bne _08046A20 - ldr r4, =gHitMarker - ldr r0, [r4] - movs r1, 0xC0 - lsls r1, 3 - ands r0, r1 - cmp r0, 0 - bne _08046A14 - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x4 - bl b_std_message - ldr r0, [r4] - movs r1, 0x80 - lsls r1, 3 - orrs r0, r1 - str r0, [r4] -_08046A14: - ldr r0, =gBattlescriptCurrInstr - ldr r1, [r0] - adds r1, 0x1 - str r1, [r0] - ldr r0, =gBattleCommunication - strb r5, [r0, 0x7] -_08046A20: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk02_attackstring thumb_func_start atk03_ppreduce atk03_ppreduce: @ 8046A3C @@ -3519,7 +2376,7 @@ atk0B_healthbarupdate: @ 8047DE8 bne _08047E68 movs r0, 0x80 adds r1, r2, 0 - bl b_std_message + bl PrepareStringBattle b _08047EA2 .pool _08047E68: @@ -4022,7 +2879,7 @@ atk0D_critmessage: @ 80482BC ldr r0, =gBankAttacker ldrb r1, [r0] movs r0, 0xD9 - bl b_std_message + bl PrepareStringBattle ldr r1, =gBattleCommunication movs r0, 0x1 strb r0, [r1, 0x7] @@ -4325,7 +3182,7 @@ _0804856E: adds r0, r3, 0 ldr r1, =gBankAttacker ldrb r1, [r1] - bl b_std_message + bl PrepareStringBattle _08048578: ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] @@ -4354,7 +3211,7 @@ atk10_printstring: @ 8048590 orrs r0, r1 ldr r1, =gBankAttacker ldrb r1, [r1] - bl b_std_message + bl PrepareStringBattle ldr r0, [r4] adds r0, 0x3 str r0, [r4] @@ -4467,7 +3324,7 @@ atk13_printfromtable: @ 8048670 ldrh r0, [r1] ldr r1, =gBankAttacker ldrb r1, [r1] - bl b_std_message + bl PrepareStringBattle ldr r0, [r4] adds r0, 0x5 str r0, [r4] @@ -8175,7 +7032,7 @@ _0804A78E: mov r2, r8 ldrb r1, [r2] movs r0, 0xD - bl b_std_message + bl PrepareStringBattle ldr r0, [r6] ldrb r1, [r0, 0x10] movs r0, 0x64 @@ -14979,7 +13836,7 @@ _0804E224: ldr r0, =0x0000013f ldr r1, =gActiveBank ldrb r1, [r1] - bl b_std_message + bl PrepareStringBattle ldr r1, =gBattleScripting movs r0, 0x6 strb r0, [r1, 0x1F] @@ -19656,7 +18513,7 @@ _08050B48: cmp r0, 0x1 beq _08050B78 movs r0, 0 - bl sub_80464AC + bl JumpIfMoveAffectedByProtect lsls r0, 24 cmp r0, 0 beq _08050B78 @@ -23356,7 +22213,7 @@ atkA6_settypetorandomresistance: @ 8052B34 cmp r1, r0 beq _08052B7E ldrh r0, [r2] - bl sub_8052F48 + bl IsTwoTurnsMove lsls r0, 24 cmp r0, 0 beq _08052C1C @@ -23825,8 +22682,8 @@ _08052F32: .pool thumb_func_end atkA8_copymovepermanently - thumb_func_start sub_8052F48 -sub_8052F48: @ 8052F48 + thumb_func_start IsTwoTurnsMove +IsTwoTurnsMove: @ 8052F48 push {lr} lsls r0, 16 lsrs r0, 16 @@ -23857,7 +22714,7 @@ _08052F7C: _08052F7E: pop {r1} bx r1 - thumb_func_end sub_8052F48 + thumb_func_end IsTwoTurnsMove thumb_func_start sub_8052F84 sub_8052F84: @ 8052F84 @@ -23986,7 +22843,7 @@ _08053036: cmp r1, 0xFD beq _08053076 adds r0, r1, 0 - bl sub_8052F48 + bl IsTwoTurnsMove lsls r0, 24 cmp r0, 0 beq _08053084 @@ -24100,8 +22957,8 @@ atkAA_set_destinybond: @ 8053150 .pool thumb_func_end atkAA_set_destinybond - thumb_func_start b_feature_update_destiny_bond -b_feature_update_destiny_bond: @ 8053180 + thumb_func_start DestinyBondFlagUpdate +DestinyBondFlagUpdate: @ 8053180 push {r4,r5,lr} ldr r0, =gBankAttacker ldrb r0, [r0] @@ -24142,12 +22999,12 @@ _080531CA: pop {r0} bx r0 .pool - thumb_func_end b_feature_update_destiny_bond + thumb_func_end DestinyBondFlagUpdate thumb_func_start atkAB_DestinyBondFlagUpdate atkAB_DestinyBondFlagUpdate: @ 80531E0 push {lr} - bl b_feature_update_destiny_bond + bl DestinyBondFlagUpdate ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] adds r0, 0x1 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index ca599631c..b3dafed16 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -9,7 +9,7 @@ gUnknown_082D86A8:: @ 82D86A8 gUnknown_082D8A30:: @ 82D8A30 .incbin "baserom.gba", 0x2d8a30, 0x1e -gUnknown_082D8A4E:: @ 82D8A4E +BattleScript_MoveEnd:: @ 82D8A4E .incbin "baserom.gba", 0x2d8a4e, 0x12 gUnknown_082D8A60:: @ 82D8A60 @@ -198,7 +198,7 @@ BattleScript_NoMovesLeft:: @ 82DB072 gUnknown_082DB076:: @ 82DB076 .incbin "baserom.gba", 0x2db076, 0x4 -gUnknown_082DB07A:: @ 82DB07A +BattleScript_NoPPForMove:: @ 82DB07A .incbin "baserom.gba", 0x2db07a, 0xf gUnknown_082DB089:: @ 82DB089 @@ -240,10 +240,10 @@ gUnknown_082DB185:: @ 82DB185 gUnknown_082DB18D:: @ 82DB18D .incbin "baserom.gba", 0x2db18d, 0x7 -gUnknown_082DB194:: @ 82DB194 +BattleScript_MagicCoatBounce:: @ 82DB194 .incbin "baserom.gba", 0x2db194, 0x18 -gUnknown_082DB1AC:: @ 82DB1AC +BattleScript_SnatchedMove:: @ 82DB1AC .incbin "baserom.gba", 0x2db1ac, 0x1b gUnknown_082DB1C7:: @ 82DB1C7 @@ -360,7 +360,7 @@ gUnknown_082DB4C1:: @ 82DB4C1 BattleScript_DroughtActivates:: @ 82DB52A .incbin "baserom.gba", 0x2db52a, 0x14 -gUnknown_082DB53E:: @ 82DB53E +BattleScript_TookAttack:: @ 82DB53E .incbin "baserom.gba", 0x2db53e, 0x14 gUnknown_082DB552:: @ 82DB552 diff --git a/include/battle.h b/include/battle.h index 4093f55d1..b04b8db8f 100644 --- a/include/battle.h +++ b/include/battle.h @@ -204,10 +204,14 @@ #define MULTISTRING_CHOOSER 0x5 #define MSG_DISPLAY 0x7 -// functions - -extern u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg); -extern u8 GetBankSide(u8 bank); +#define MOVE_TARGET_SELECTED 0x0 +#define MOVE_TARGET_DEPENDS 0x1 +#define MOVE_TARGET_USER 0x2 +#define MOVE_TARGET_RANDOM 0x4 +#define MOVE_TARGET_x10 0x10 +#define MOVE_TARGET_BOTH 0x8 +#define MOVE_TARGET_FOES_AND_ALLY 0x20 +#define MOVE_TARGET_OPPONENTS_FIELD 0x40 struct Trainer { @@ -636,6 +640,14 @@ extern struct BattleStruct* gBattleStruct; var2[offsetof(struct structName, offsetField)] = value; \ } +#define GET_MOVE_TYPE(move, type) \ +{ \ + if (gBattleStruct->dynamicMoveType) \ + type = gBattleStruct->dynamicMoveType & 0x3F; \ + else \ + type = gBattleMoves[move].type; \ +} + struct BattleScripting { u8 field_0; @@ -666,6 +678,44 @@ struct BattleScripting extern struct BattleScripting gBattleScripting; +// functions + +// battle_2 +void CancelMultiTurnMoves(u8 bank); +void PressurePPLose(u8 bankAtk, u8 bankDef, u16 move); +void PrepareStringBattle(u16 stringId, u8 bank); + +// battle_3 +void b_movescr_stack_push(const u8* bsPtr); +void b_movescr_stack_push_cursor(void); +u8 sub_803FB4C(void); // msg, can't select a move +u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check); +bool8 AreAllMovesUnusable(void); +u8 IsImprisoned(u8 bank, u16 move); +u8 UpdateTurnCounters(void); +u8 TurnBasedEffects(void); +bool8 sub_8041364(void); +bool8 sub_8041728(void); +void b_clear_atk_up_if_hit_flag_unless_enraged(void); +u8 AtkCanceller_UnableToUseMove(void); +bool8 sub_80423F4(u8 bank, u8 r1, u8 r2); +u8 CastformDataTypeChange(u8 bank); +u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg); +void b_call_bc_move_exec(const u8* BS_ptr); +void b_push_move_exec(const u8* BS_ptr); +u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn); +void sub_8045868(u8 bank); +void sub_80458B4(void); +u8 GetMoveTarget(u16 move, u8 useMoveTarget); +u8 IsPokeDisobedient(void); + +// rom_80A5C6C +u8 GetBankSide(u8 bank); +u8 GetBankIdentity(u8 bank); +u8 GetBankByPlayerAI(u8 bank); + +// Move this somewhere else + #include "sprite.h" struct BattleSpritesGfx diff --git a/include/calculate_base_damage.h b/include/calculate_base_damage.h new file mode 100644 index 000000000..e9146c188 --- /dev/null +++ b/include/calculate_base_damage.h @@ -0,0 +1,6 @@ +#ifndef GUARD_CALCULATE_BASE_DAMAGE_H +#define GUARD_CALCULATE_BASE_DAMAGE_H + +s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *defender, u32 move, u16 sideStatus, u16 powerOverride, u8 typeOverride, u8 bankAtk, u8 bankDef); + +#endif // GUARD_CALCULATE_BASE_DAMAGE_H diff --git a/src/battle_3.c b/src/battle_3.c index a2ddd1c2d..283305d6c 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -15,6 +15,7 @@ #include "battle_message.h" #include "battle_ai.h" #include "event_data.h" +#include "calculate_base_damage.h" extern const u8* gBattlescriptCurrInstr; extern const u8* gUnknown_02024220[BATTLE_BANKS_COUNT]; @@ -187,11 +188,8 @@ extern void SetMoveEffect(bool8 primary, u8 certainArg); extern bool8 UproarWakeUpCheck(u8 bank); extern void MarkBufferBankForExecution(u8 bank); extern u8 sub_803F90C(u8 bank); -extern u8 GetBankIdentity(u8); extern void sub_803F9EC(); extern bool8 sub_80423F4(u8 bank, u8, u8); -extern s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *defender, u32 move, u16 sideFlags, u16 powerOverride, u8 typeOverride, u8 bankAtk, u8 bankDef); -extern u8 GetBankByPlayerAI(u8); extern u8 sub_806D864(u8); extern u8 sub_806D82C(u8); extern u8 weather_get_current(void); @@ -199,11 +197,6 @@ extern void sub_803E08C(void); extern void bc_move_exec_returning(void); extern s8 GetFlavourRelationByPersonality(u32 personality, u8 flavor); -u8 IsImprisoned(u8 bank, u16 move); -u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn); -u8 GetMoveTarget(u16 move, u8 useMoveTarget); -void b_push_move_exec(const u8* BS_ptr); - void b_movescr_stack_push(const u8* bsPtr) { BATTLESCRIPTS_STACK->ptr[BATTLESCRIPTS_STACK->size++] = bsPtr; @@ -6237,7 +6230,7 @@ u8 GetMoveTarget(u16 move, u8 useMoveTarget) switch (moveTarget) { - case 0: + case MOVE_TARGET_SELECTED: side = GetBankSide(gBankAttacker) ^ 1; if (gSideTimers[side].followmeTimer && gBattleMons[gSideTimers[side].followmeTarget].hp) targetBank = gSideTimers[side].followmeTarget; @@ -6258,19 +6251,19 @@ u8 GetMoveTarget(u16 move, u8 useMoveTarget) } } break; - case 1: - case 8: - case 32: - case 64: + case MOVE_TARGET_DEPENDS: + case MOVE_TARGET_BOTH: + case MOVE_TARGET_FOES_AND_ALLY: + case MOVE_TARGET_OPPONENTS_FIELD: targetBank = GetBankByPlayerAI((GetBankIdentity(gBankAttacker) & 1) ^ 1); if (gAbsentBankFlags & gBitTable[targetBank]) targetBank ^= 2; break; - case 4: + case MOVE_TARGET_RANDOM: side = GetBankSide(gBankAttacker) ^ 1; if (gSideTimers[side].followmeTimer && gBattleMons[gSideTimers[side].followmeTarget].hp) targetBank = gSideTimers[side].followmeTarget; - else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && moveTarget & 4) + else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && moveTarget & MOVE_TARGET_RANDOM) { if (GetBankSide(gBankAttacker) == SIDE_PLAYER) { @@ -6292,8 +6285,8 @@ u8 GetMoveTarget(u16 move, u8 useMoveTarget) else targetBank = GetBankByPlayerAI((GetBankIdentity(gBankAttacker) & 1) ^ 1); break; - case 2: - case 16: + case MOVE_TARGET_USER: + case MOVE_TARGET_x10: targetBank = gBankAttacker; break; } diff --git a/src/battle_4.c b/src/battle_4.c index 92561251f..e693162cc 100644 --- a/src/battle_4.c +++ b/src/battle_4.c @@ -1,11 +1,141 @@ #include "global.h" #include "battle.h" #include "battle_move_effects.h" +#include "battle_message.h" +#include "battle_ai.h" #include "moves.h" #include "abilities.h" #include "item.h" #include "items.h" #include "hold_effects.h" +#include "util.h" +#include "pokemon.h" +#include "calculate_base_damage.h" +#include "rng.h" + +// variables + +extern u8 gCritMultiplier; +extern s32 gBattleMoveDamage; +extern u32 gStatuses3[BATTLE_BANKS_COUNT]; +extern u32 gBattleTypeFlags; +extern struct BattleEnigmaBerry gEnigmaBerries[BATTLE_BANKS_COUNT]; +extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT]; +extern u8 gActiveBank; +extern u32 gBattleExecBuffer; +extern u8 gNoOfAllBanks; +extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; +extern u8 gTurnOrder[BATTLE_BANKS_COUNT]; +extern u8 gUnknown_02024A76[BATTLE_BANKS_COUNT]; +extern u16 gCurrentMove; +extern u8 gLastUsedAbility; +extern u16 gBattleWeather; +extern u8 gStringBank; +extern u8 gEffectBank; +extern u8 gAbsentBankFlags; +extern u8 gMultiHitCounter; +extern u16 gChosenMovesByBanks[BATTLE_BANKS_COUNT]; +extern u16 gSideAffecting[2]; +extern u16 gPauseCounterBattle; +extern u16 gPaydayMoney; +extern u16 gRandomTurnNumber; +extern u8 gBattleOutcome; +extern u8 gBattleTerrain; +extern u16 gTrainerBattleOpponent; +extern u8 gBankAttacker; +extern u8 gBankTarget; +extern const u8* gBattlescriptCurrInstr; +extern u8 gCurrMovePos; +extern u8 gFightStateTracker; +extern u32 gHitMarker; +extern u8 gBattleMoveFlags; +extern u8 gBattleCommunication[]; +extern u16 gUnknown_02024250[4]; +extern u16 gUnknown_02024258[4]; +extern u8 gStringBank; +extern u16 gDynamicBasePower; +extern u16 gLastUsedItem; +extern u16 gBattleMovePower; +extern s32 gHP_dealt; +extern s32 gTakenDmg[BATTLE_BANKS_COUNT]; +extern u8 gTakenDmgBanks[BATTLE_BANKS_COUNT]; +extern u8 gSentPokesToOpponent[2]; +extern u8 gBank1; +extern u16 gExpShareExp; +extern u8 gLeveledUpInBattle; +extern void (*gBattleMainFunc)(void); +extern u8 gPlayerPartyCount; +extern u16 gMoveToLearn; +extern u16 gRandomMove; +extern u8 gBankInMenu; +extern u8 gActionForBanks[4]; +extern u8 gCurrentMoveTurn; +extern u8 gBattleBufferB[4][0x200]; + +extern const struct BattleMove gBattleMoves[]; +extern const u16 gMissStrings[]; +extern const u8 gTrainerMoney[]; +extern const u8 gTypeEffectiveness[]; +extern const struct BaseStats gBaseStats[]; + +// functions + + +// BattleScripts +extern const u8 BattleScript_MoveEnd[]; +extern const u8 BattleScript_NoPPForMove[]; +extern const u8 BattleScript_MagicCoatBounce[]; +extern const u8 BattleScript_TookAttack[]; +extern const u8 BattleScript_SnatchedMove[]; +extern const u8 BattleScript_Pausex20[]; +extern const u8 BattleScript_SubstituteFade[]; +extern const u8 BattleScript_HangedOnMsg[]; +extern const u8 BattleScript_OneHitKOMsg[]; +extern const u8 BattleScript_EnduredMsg[]; +extern const u8 BattleScript_PSNPrevention[]; +extern const u8 BattleScript_BRNPrevention[]; +extern const u8 BattleScript_PRLZPrevention[]; +extern const u8 BattleScript_FlinchPrevention[]; +extern const u8 BattleScript_StatUp[]; +extern const u8 BattleScript_StatDown[]; +extern const u8 BattleScript_NoItemSteal[]; +extern const u8 BattleScript_ItemSteal[]; +extern const u8 BattleScript_RapidSpinAway[]; +extern const u8 BattleScript_TargetPRLZHeal[]; +extern const u8 BattleScript_KnockedOff[]; +extern const u8 BattleScript_LevelUp[]; +extern const u8 BattleScript_WrapFree[]; +extern const u8 BattleScript_LeechSeedFree[]; +extern const u8 BattleScript_SpikesFree[]; +extern const u8 BattleScript_ButItFailed[]; +extern const u8 BattleScript_ObliviousPreventsAttraction[]; +extern const u8 BattleScript_MistProtected[]; +extern const u8 BattleScript_AbilityNoStatLoss[]; +extern const u8 BattleScript_AbilityNoSpecificStatLoss[]; +extern const u8 BattleScript_TrainerBallBlock[]; +extern const u8 BattleScript_WallyBallThrow[]; +extern const u8 BattleScript_SuccessBallThrow[]; +extern const u8 BattleScript_ShakeBallThrow[]; + +// read via orr +#define BSScriptRead32(ptr) ((ptr)[0] | (ptr)[1] << 8 | (ptr)[2] << 16 | (ptr)[3] << 24) +#define BSScriptRead8(ptr) (((u8)((ptr)[0]))) +#define BSScriptReadPtr(ptr) ((void *)BSScriptRead32(ptr)) + +// read via add +#define BS2ScriptRead32(ptr) ((ptr)[0] + ((ptr)[1] << 8) + ((ptr)[2] << 16) + ((ptr)[3] << 24)) +#define BS2ScriptRead16(ptr) ((ptr)[0] + ((ptr)[1] << 8)) +#define BS2ScriptReadPtr(ptr) ((void *)BS2ScriptRead32(ptr)) + +#define TARGET_PROTECT_AFFECTED ((gProtectStructs[gBankTarget].protected && gBattleMoves[gCurrentMove].flags & FLAG_PROTECT_AFFECTED)) + +#define TARGET_TURN_DAMAGED (((gSpecialStatuses[gBankTarget].moveturnLostHP_physical || gSpecialStatuses[gBankTarget].moveturnLostHP_physical.moveturnLostHP_special))) + +// this file's functions +bool8 IsTwoTurnsMove(u16 move); +void DestinyBondFlagUpdate(void); +u8 AttacksThisTurn(u8 bank, u16 move); // Note: returns 1 if it's a charging turn, otherwise 2. +void b_wonderguard_and_levitate(void); void atk00_attackcanceler(void); void atk01_accuracycheck(void); @@ -510,13 +640,13 @@ void (* const gBattleScriptingCommandsTable[])(void) = sub_8056EF8 }; -struct statFractions +struct StatFractions { u8 dividend; u8 divisor; }; -const struct statFractions gAccuracyStageRatios[] = +const struct StatFractions gAccuracyStageRatios[] = { { 33, 100}, // -6 { 36, 100}, // -5 @@ -599,3 +729,292 @@ const u32 gStatusFlagsForMoveEffects[] = 0x00000000, 0x00000000 }; + +void atk00_attackcanceler(void) +{ + s32 i; + + if (gBattleOutcome) + { + gFightStateTracker = 0xC; + return; + } + if (gBattleMons[gBankAttacker].hp == 0 && !(gHitMarker & HITMARKER_NO_ATTACKSTRING)) + { + gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; + gBattlescriptCurrInstr = BattleScript_MoveEnd; + return; + } + if (AtkCanceller_UnableToUseMove()) + return; + if (AbilityBattleEffects(ABILITYEFFECT_MOVES_BLOCK, gBankTarget, 0, 0, 0)) + return; + if (!gBattleMons[gBankAttacker].pp[gCurrMovePos] && gCurrentMove != MOVE_STRUGGLE && !(gHitMarker & 0x800200) + && !(gBattleMons[gBankAttacker].status2 & STATUS2_MULTIPLETURNS)) + { + gBattlescriptCurrInstr = BattleScript_NoPPForMove; + gBattleMoveFlags |= MOVESTATUS_MISSED; + return; + } + + gHitMarker &= ~(HITMARKER_x800000); + + if (!(gHitMarker & HITMARKER_OBEYS) && !(gBattleMons[gBankAttacker].status2 & STATUS2_MULTIPLETURNS)) + { + i = IsPokeDisobedient(); // why use the 'i' variable...? + switch (i) + { + case 0: + break; + case 2: + gHitMarker |= HITMARKER_OBEYS; + return; + default: + gBattleMoveFlags |= MOVESTATUS_MISSED; + return; + } + } + + gHitMarker |= HITMARKER_OBEYS; + + if (gProtectStructs[gBankTarget].bounceMove && gBattleMoves[gCurrentMove].flags & FLAG_MAGICCOAT_AFFECTED) + { + PressurePPLose(gBankAttacker, gBankTarget, MOVE_MAGIC_COAT); + gProtectStructs[gBankTarget].bounceMove = 0; + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_MagicCoatBounce; + return; + } + + for (i = 0; i < gNoOfAllBanks; i++) + { + if ((gProtectStructs[gTurnOrder[i]].stealMove) && gBattleMoves[gCurrentMove].flags & FLAG_SNATCH_AFFECTED) + { + PressurePPLose(gBankAttacker, gTurnOrder[i], MOVE_SNATCH); + gProtectStructs[gTurnOrder[i]].stealMove = 0; + gBattleScripting.bank = gTurnOrder[i]; + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_SnatchedMove; + return; + } + } + + if (gSpecialStatuses[gBankTarget].lightningRodRedirected) + { + gSpecialStatuses[gBankTarget].lightningRodRedirected = 0; + gLastUsedAbility = ABILITY_LIGHTNING_ROD; + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_TookAttack; + RecordAbilityBattle(gBankTarget, gLastUsedAbility); + } + else if (TARGET_PROTECT_AFFECTED + && (gCurrentMove != MOVE_CURSE || (gBattleMons[gBankAttacker].type1 == TYPE_GHOST || gBattleMons[gBankAttacker].type2 == TYPE_GHOST)) + && ((!IsTwoTurnsMove(gCurrentMove) || (gBattleMons[gBankAttacker].status2 & STATUS2_MULTIPLETURNS)))) + { + CancelMultiTurnMoves(gBankAttacker); + gBattleMoveFlags |= MOVESTATUS_MISSED; + gUnknown_02024250[gBankTarget] = 0; + gUnknown_02024258[gBankTarget] = 0; + gBattleCommunication[6] = 1; + gBattlescriptCurrInstr++; + } + else + { + gBattlescriptCurrInstr++; + } +} + +void JumpIfMoveFailed(u8 adder, u16 move) +{ + const void* BS_ptr = gBattlescriptCurrInstr + adder; + if (gBattleMoveFlags & MOVESTATUS_NOEFFECT) + { + gUnknown_02024250[gBankTarget] = 0; + gUnknown_02024258[gBankTarget] = 0; + BS_ptr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + DestinyBondFlagUpdate(); + if (AbilityBattleEffects(ABILITYEFFECT_ABSORBING, gBankTarget, 0, 0, move)) + return; + } + gBattlescriptCurrInstr = BS_ptr; +} + +void atk40_jump_if_move_affected_by_protect(void) +{ + if (TARGET_PROTECT_AFFECTED) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + JumpIfMoveFailed(5, 0); + gBattleCommunication[6] = 1; + } + else + { + gBattlescriptCurrInstr += 5; + } +} + +bool8 JumpIfMoveAffectedByProtect(u16 move) +{ + bool8 affected = FALSE; + if (TARGET_PROTECT_AFFECTED) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + JumpIfMoveFailed(7, move); + gBattleCommunication[6] = 1; + affected = TRUE; + } + return affected; +} + +bool8 AccuracyCalcHelper(u16 move) +{ + if (gStatuses3[gBankTarget] & STATUS3_ALWAYS_HITS && gDisableStructs[gBankTarget].bankWithSureHit == gBankAttacker) + { + JumpIfMoveFailed(7, move); + return TRUE; + } + + if (!(gHitMarker & HITMARKER_IGNORE_ON_AIR) && gStatuses3[gBankTarget] & STATUS3_ON_AIR) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + JumpIfMoveFailed(7, move); + return TRUE; + } + + gHitMarker &= ~HITMARKER_IGNORE_ON_AIR; + + if (!(gHitMarker & HITMARKER_IGNORE_UNDERGROUND) && gStatuses3[gBankTarget] & STATUS3_UNDERGROUND) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + JumpIfMoveFailed(7, move); + return TRUE; + } + + gHitMarker &= ~HITMARKER_IGNORE_UNDERGROUND; + + if (!(gHitMarker & HITMARKER_IGNORE_UNDERWATER) && gStatuses3[gBankTarget] & STATUS3_UNDERWATER) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + JumpIfMoveFailed(7, move); + return TRUE; + } + + gHitMarker &= ~HITMARKER_IGNORE_UNDERWATER; + + if ((WEATHER_HAS_EFFECT && (gBattleWeather & WEATHER_RAIN_ANY) && gBattleMoves[move].effect == EFFECT_THUNDER) + || (gBattleMoves[move].effect == EFFECT_ALWAYS_HIT || gBattleMoves[move].effect == EFFECT_VITAL_THROW)) + { + JumpIfMoveFailed(7, move); + return TRUE; + } + + return FALSE; +} + +void atk01_accuracycheck(void) +{ + u16 move = BS2ScriptRead16(gBattlescriptCurrInstr + 5); + + if (move == 0xFFFE || move == 0xFFFF) + { + if (gStatuses3[gBankTarget] & STATUS3_ALWAYS_HITS && move == 0xFFFF && gDisableStructs[gBankTarget].bankWithSureHit == gBankAttacker) + gBattlescriptCurrInstr += 7; + else if (gStatuses3[gBankTarget] & (STATUS3_ON_AIR | STATUS3_UNDERGROUND | STATUS3_UNDERWATER)) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + else if (!JumpIfMoveAffectedByProtect(0)) + gBattlescriptCurrInstr += 7; + } + else + { + u8 type, moveAcc, holdEffect, quality; + s8 buff; + u16 calc; + + if (move == 0) + move = gCurrentMove; + + GET_MOVE_TYPE(move, type); + + if (JumpIfMoveAffectedByProtect(move)) + return; + if (AccuracyCalcHelper(move)) + return; + + if (gBattleMons[gBankTarget].status2 & STATUS2_FORESIGHT) + { + u8 acc = gBattleMons[gBankAttacker].statStages[STAT_STAGE_ACC]; + buff = acc; + } + else + { + u8 acc = gBattleMons[gBankAttacker].statStages[STAT_STAGE_ACC]; + buff = acc + 6 - gBattleMons[gBankTarget].statStages[STAT_STAGE_EVASION]; + } + + if (buff < 0) + buff = 0; + if (buff > 0xC) + buff = 0xC; + + moveAcc = gBattleMoves[move].accuracy; + // check Thunder on sunny weather + if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SUN_ANY && gBattleMoves[move].effect == EFFECT_THUNDER) + moveAcc = 50; + + calc = gAccuracyStageRatios[buff].dividend * moveAcc; + calc /= gAccuracyStageRatios[buff].divisor; + + if (gBattleMons[gBankAttacker].ability == ABILITY_COMPOUND_EYES) + calc = (calc * 130) / 100; // 1.3 compound eyes boost + if (WEATHER_HAS_EFFECT && gBattleMons[gBankTarget].ability == ABILITY_SAND_VEIL && gBattleWeather & WEATHER_SANDSTORM_ANY) + calc = (calc * 80) / 100; // 1.2 sand veil loss + if (gBattleMons[gBankAttacker].ability == ABILITY_HUSTLE && type < 9) + calc = (calc * 80) / 100; // 1.2 hustle loss + + if (gBattleMons[gBankTarget].item == ITEM_ENIGMA_BERRY) + { + holdEffect = gEnigmaBerries[gBankTarget].holdEffect; + quality = gEnigmaBerries[gBankTarget].holdEffectParam; + } + else + { + holdEffect = ItemId_GetHoldEffect(gBattleMons[gBankTarget].item); + quality = ItemId_GetHoldEffectParam(gBattleMons[gBankTarget].item); + } + + gStringBank = gBankTarget; + + if (holdEffect == HOLD_EFFECT_EVASION_UP) + calc = (calc * (100 - quality)) / 100; + + // final calculation + if ((Random() % 100 + 1) > calc) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && + (gBattleMoves[move].target == MOVE_TARGET_BOTH || gBattleMoves[move].target == MOVE_TARGET_FOES_AND_ALLY)) + gBattleCommunication[6] = 2; + else + gBattleCommunication[6] = 0; + + b_wonderguard_and_levitate(); + } + JumpIfMoveFailed(7, move); + } +} + +void atk02_attackstring(void) +{ + if (gBattleExecBuffer) + return; + if (!(gHitMarker & (HITMARKER_NO_ATTACKSTRING | HITMARKER_ATTACKSTRING_PRINTED))) + { + PrepareStringBattle(4, gBankAttacker); + gHitMarker |= HITMARKER_ATTACKSTRING_PRINTED; + } + gBattlescriptCurrInstr++; + gBattleCommunication[MSG_DISPLAY] = 0; +} From 67a8ac72ec8629d2d737fcd976969303bcd056f5 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Tue, 19 Sep 2017 21:02:35 +0200 Subject: [PATCH 227/342] add egg graphics --- graphics/misc/egg_hatch.png | Bin 0 -> 469 bytes graphics/misc/egg_shard.png | Bin 0 -> 189 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 graphics/misc/egg_hatch.png create mode 100644 graphics/misc/egg_shard.png diff --git a/graphics/misc/egg_hatch.png b/graphics/misc/egg_hatch.png new file mode 100644 index 0000000000000000000000000000000000000000..abea3122f4282dbefa003e67b7c5783ea1bf9382 GIT binary patch literal 469 zcmeAS@N?(olHy`uVBq!ia0vp^3P9Yz!VDy5c$8@ZDT4r?5Z5LDr#O0fO_?+2+qbLl zo-H|hw7L4MSJsrEXABIOsQKA5MU!%21_s6iPZ!4!kIuJO?q)R`h#V-qE39+)Md{`} z4%zVz)o*Iq+}CqY`W-uE&p*FE9*;B^H|K6}WZr90FD&}=qR#J~OGRcgmd*YdBJX(Q zC+DkOY!!Tt^Os#X!Yk4zu>FPQjg6d)8FtaP*QhUZT{!#vlWd9U3!XEGSsAx7U283# zV6f>zbbYtrE>jEd=ojtYC+2RpQ+V|0#zD&?au;sYkw%-ePeEfK-MkeZ+vwU}Zf5gAZ z{j>k~@3zyZxqf^epNd^n2E!?%Ul;7=>K|l}&C_I)U-ZCEO77RB-#b?L*Kj<0Joons zA^H3jEgrQV@15P`pFMo6ZP)c+@r;_7Mg7nA@t>{TGMRtwj~klrnjdVvdyL(dZ887C zJ^V9&T)5ZnS>y5ku!?Q25q+1{hBap00i_ I>zopr0N!KQumAu6 literal 0 HcmV?d00001 diff --git a/graphics/misc/egg_shard.png b/graphics/misc/egg_shard.png new file mode 100644 index 0000000000000000000000000000000000000000..d404445b8f4223f973064b793af9d58cab783cc3 GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^3P8-k!VDy{RzH{nqznRlLR^>ppW^7{HD%76Z{M!I zd$#24(dO#2URhIuo-r_BqULAM6iv#7fqFeWT^vI=W+o>j1SK#eTLcsaB?J{FC5VV5 zFbMnT>Gdh;>2WPu*vP}9z;uFBgq3?2mqFVO3!?)P2Apg&f@XxZBnBK7WXQ5*ka@}9 UEvTzA4`?QXr>mdKI;Vst0Fi$>761SM literal 0 HcmV?d00001 From 3d32be86fcd40bf5979fff62a87d6390dd4171fe Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Tue, 19 Sep 2017 14:12:51 -0500 Subject: [PATCH 228/342] Continue baserom extraction --- asm/battle_2.s | 4 +- asm/battle_message.s | 6 +- data/battle_anim_8170478.s | 227 ++- data/battle_controller_link_opponent.s | 60 +- data/battle_controller_link_partner.s | 60 +- data/battle_controller_opponent.s | 62 +- data/battle_controller_player.s | 63 +- data/battle_controller_player_partner.s | 69 +- data/battle_controller_recorded_opponent.s | 63 +- data/battle_controller_recorded_player.s | 62 +- data/battle_controller_safari.s | 318 ++- data/battle_controller_wally.s | 63 +- data/battle_message.s | 2086 +++++++++++++++----- data/event_scripts.s | 144 +- data/graphics.s | 8 +- src/pokemon_3.c | 20 +- 16 files changed, 2788 insertions(+), 527 deletions(-) diff --git a/asm/battle_2.s b/asm/battle_2.s index dd3e6d38c..1df081959 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -9235,7 +9235,7 @@ _0803B7EA: ldr r1, =gAbsentBankFlags ldrb r1, [r1] strb r1, [r0] - ldr r0, =gUnknown_085CC23E + ldr r0, =gText_EmptyString3 movs r1, 0 bl battle_show_message_maybe ldr r1, =gBattleMainFunc @@ -9506,7 +9506,7 @@ _0803BAB2: ldr r4, =gNoOfAllBanks ldr r0, =gAbsentBankFlags mov r12, r0 - ldr r1, =gUnknown_085CC23E + ldr r1, =gText_EmptyString3 mov r9, r1 ldrb r0, [r4] cmp r2, r0 diff --git a/asm/battle_message.s b/asm/battle_message.s index dec210b25..954be7e89 100644 --- a/asm/battle_message.s +++ b/asm/battle_message.s @@ -539,7 +539,7 @@ _0814E58A: lsrs r0, 24 cmp r0, 0x1 bhi _0814E5A4 - ldr r7, =gUnknown_085CB4CA + ldr r7, =gText_GotAwaySafely b _0814E6D8 .pool _0814E5A4: @@ -597,7 +597,7 @@ _0814E60E: ldr r7, =gUnknown_085CB538 cmp r1, 0 beq _0814E6D8 - ldr r7, =gUnknown_085CCE53 + ldr r7, =gText_TwoEnemiesDefeated b _0814E6D8 .pool _0814E628: @@ -630,7 +630,7 @@ _0814E660: beq _0814E678 b _0814E6D8 _0814E666: - ldr r7, =gUnknown_085CBA2E + ldr r7, =gText_PlayerDefeatedXY b _0814E6D8 .pool _0814E670: diff --git a/data/battle_anim_8170478.s b/data/battle_anim_8170478.s index ef23d2e7b..dc50c99aa 100644 --- a/data/battle_anim_8170478.s +++ b/data/battle_anim_8170478.s @@ -3,26 +3,237 @@ .section .rodata + .align 2 gUnknown_085E5088:: @ 85E5088 - .incbin "baserom.gba", 0x5e5088, 0xc + .byte 0x0a, 0x02, 0xfd, 0x00, 0x0f, 0x00, 0xfc, 0x00 + .byte 0xf6, 0x02, 0xfc, 0x00 + .align 2 gUnknown_085E5094:: @ 85E5094 - .incbin "baserom.gba", 0x5e5094, 0x60 + .4byte gUnknown_08C1A490, 0xd6ec0100 + .4byte gUnknown_08C1A490, 0xd6ed0100 + .4byte gUnknown_08C1A490, 0xd6ee0100 + .4byte gUnknown_08C1A490, 0xd6ef0100 + .4byte gUnknown_08C1A490, 0xd6f00100 + .4byte gUnknown_08C1A490, 0xd6f10100 + .4byte gUnknown_08C1A490, 0xd6f20100 + .4byte gUnknown_08C1A490, 0xd6f30100 + .4byte gUnknown_08C1A490, 0xd6f40100 + .4byte gUnknown_08C1A490, 0xd6f50100 + .4byte gUnknown_08C1A490, 0xd6f60100 + .4byte gUnknown_08C1A490, 0xd6f70100 + .align 2 gUnknown_085E50F4:: @ 85E50F4 - .incbin "baserom.gba", 0x5e50f4, 0xc0 + .4byte gUnknown_08C1A564, 0x0000d6ec + .4byte gUnknown_08C1A564, 0x0000d6ed + .4byte gUnknown_08C1A564, 0x0000d6ee + .4byte gUnknown_08C1A564, 0x0000d6ef + .4byte gUnknown_08C1A564, 0x0000d6f0 + .4byte gUnknown_08C1A564, 0x0000d6f1 + .4byte gUnknown_08C1A564, 0x0000d6f2 + .4byte gUnknown_08C1A564, 0x0000d6f3 + .4byte gUnknown_08C1A564, 0x0000d6f4 + .4byte gUnknown_08C1A564, 0x0000d6f5 + .4byte gUnknown_08C1A564, 0x0000d6f6 + .4byte gUnknown_08C1A564, 0x0000d6f7 + .align 2 +gUnknown_085E5154:: @ 85E5154 + .2byte 0x0000, 0x0001, 0x0001, 0x0001 + .2byte 0x0002, 0x0001, 0x0000, 0x0041 + .2byte 0x0002, 0x0001, 0x0001, 0x0001 + .2byte 0xfffe, 0x0000 + + .align 2 +gUnknown_085E5170:: @ 85E5170 + .2byte 0x0003, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_085E5178:: @ 85E5178 + .2byte 0x0004, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_085E5180:: @ 85E5180 + .2byte 0x0005, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_085E5188:: @ 85E5188 + .2byte 0x0006, 0x0004, 0x0007, 0x0004 + .2byte 0xfffe, 0x0000 + + .align 2 +gUnknown_085E5194:: @ 85E5194 + .2byte 0x0007, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_085E519C:: @ 85E519C + .4byte gUnknown_085E5154 + .4byte gUnknown_085E5170 + .4byte gUnknown_085E5178 + .4byte gUnknown_085E5180 + .4byte gUnknown_085E5188 + .4byte gUnknown_085E5194 + + .align 2 gUnknown_085E51B4:: @ 85E51B4 - .incbin "baserom.gba", 0x5e51b4, 0xc + .byte 0x00, 0x00, 0x00, 0x05, 0x01, 0x02, 0x02, 0x03 + .byte 0x05, 0x05, 0x04, 0x04 + .align 2 gUnknown_085E51C0:: @ 85E51C0 - .incbin "baserom.gba", 0x5e51c0, 0x30 + .4byte sub_8171E50 + .4byte sub_81723D4 + .4byte sub_81721CC + .4byte sub_81722CC + .4byte sub_81726BC + .4byte sub_81721CC + .4byte sub_81720C8 + .4byte sub_81722CC + .4byte sub_8172560 + .4byte sub_8171FC4 + .4byte sub_81723D4 + .4byte sub_81727E8 + .align 2 gUnknown_085E51F0:: @ 85E51F0 - .incbin "baserom.gba", 0x5e51f0, 0x60 + .2byte 0xd6ec @ tileTag + .2byte 0xd6ec @ paletteTag + .4byte gUnknown_08524904 + .4byte gUnknown_085E519C + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte SpriteCallbackDummy + .align 2 + .2byte 0xd6ed @ tileTag + .2byte 0xd6ed @ paletteTag + .4byte gUnknown_08524904 + .4byte gUnknown_085E519C + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte SpriteCallbackDummy + + .align 2 + .2byte 0xd6ee @ tileTag + .2byte 0xd6ee @ paletteTag + .4byte gUnknown_08524904 + .4byte gUnknown_085E519C + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte SpriteCallbackDummy + + .align 2 + .2byte 0xd6ef @ tileTag + .2byte 0xd6ef @ paletteTag + .4byte gUnknown_08524904 + .4byte gUnknown_085E519C + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte SpriteCallbackDummy + + .align 2 gUnknown_085E5250:: @ 85E5250 - .incbin "baserom.gba", 0x5e5250, 0xc0 + .2byte 0xd6f0 @ tileTag + .2byte 0xd6f0 @ paletteTag + .4byte gUnknown_08524904 + .4byte gUnknown_085E519C + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte SpriteCallbackDummy + .align 2 + .2byte 0xd6f1 @ tileTag + .2byte 0xd6f1 @ paletteTag + .4byte gUnknown_08524904 + .4byte gUnknown_085E519C + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte SpriteCallbackDummy + + .align 2 + .2byte 0xd6f2 @ tileTag + .2byte 0xd6f2 @ paletteTag + .4byte gUnknown_08524904 + .4byte gUnknown_085E519C + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte SpriteCallbackDummy + + .align 2 + .2byte 0xd6f3 @ tileTag + .2byte 0xd6f3 @ paletteTag + .4byte gUnknown_08524904 + .4byte gUnknown_085E519C + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte SpriteCallbackDummy + + .align 2 + .2byte 0xd6f4 @ tileTag + .2byte 0xd6f4 @ paletteTag + .4byte gUnknown_08524904 + .4byte gUnknown_085E519C + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte SpriteCallbackDummy + + .align 2 + .2byte 0xd6f5 @ tileTag + .2byte 0xd6f5 @ paletteTag + .4byte gUnknown_08524904 + .4byte gUnknown_085E519C + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte SpriteCallbackDummy + + .align 2 + .2byte 0xd6f6 @ tileTag + .2byte 0xd6f6 @ paletteTag + .4byte gUnknown_08524904 + .4byte gUnknown_085E519C + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte SpriteCallbackDummy + + .align 2 + .2byte 0xd6f7 @ tileTag + .2byte 0xd6f7 @ paletteTag + .4byte gUnknown_08524904 + .4byte gUnknown_085E519C + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte SpriteCallbackDummy + + .align 2 gUnknown_085E5310:: @ 85E5310 - .incbin "baserom.gba", 0x5e5310, 0x64 + .2byte 0x7adf, 0x7af0, 0x53d7, 0x3fff, 0x7297, 0x67f5, 0x7b2c, 0x2b7e + .2byte 0x431f, 0x7bdd, 0x2a3f, 0x293f, 0x0000, 0x0201, 0x0403, 0x0101 + .2byte 0x0100, 0x0503, 0x0506, 0x0004 + + .align 2 + .2byte 0x281d @ tileTag + .2byte 0x281d @ paletteTag + .4byte gUnknown_0852490C + .4byte gDummySpriteAnimTable + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte sub_817330C + + .align 2 +gUnknown_085E5350:: @ 8535350 + .2byte 0x0040, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_085E5358:: @ 8535358 + .4byte gUnknown_085E5350 + + .align 2 + .2byte 0x274a @ tileTag + .2byte 0x274a @ paletteTag + .4byte gUnknown_08524914 + .4byte gUnknown_085E5358 + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte sub_817330C + diff --git a/data/battle_controller_link_opponent.s b/data/battle_controller_link_opponent.s index 71b1f5438..ff6c7023b 100644 --- a/data/battle_controller_link_opponent.s +++ b/data/battle_controller_link_opponent.s @@ -3,6 +3,62 @@ .section .rodata - + .align 2 gLinkOpponentBufferCommands:: @ 831C7B4 - .incbin "baserom.gba", 0x31c7b4, 0xe4 + .4byte dp01t_00_2_getattr + .4byte sub_8065900 + .4byte sub_806590C + .4byte sub_8066284 + .4byte sub_80662F8 + .4byte sub_8066448 + .4byte sub_8066624 + .4byte sub_8066748 + .4byte sub_8066A58 + .4byte sub_8066B94 + .4byte sub_8066C40 + .4byte sub_8066CEC + .4byte sub_8066CF8 + .4byte sub_8066D04 + .4byte sub_8066D10 + .4byte sub_8066D1C + .4byte sub_8066FF4 + .4byte sub_806704C + .4byte sub_8067058 + .4byte sub_8067064 + .4byte sub_8067070 + .4byte sub_806707C + .4byte sub_8067088 + .4byte sub_8067094 + .4byte sub_80670A0 + .4byte sub_8067190 + .4byte sub_806719C + .4byte sub_8067214 + .4byte sub_806727C + .4byte sub_8067288 + .4byte sub_8067294 + .4byte sub_80672A0 + .4byte sub_80672AC + .4byte sub_80672B8 + .4byte sub_80672C4 + .4byte sub_80672D0 + .4byte sub_80672DC + .4byte sub_80672E8 + .4byte sub_8067304 + .4byte sub_806733C + .4byte sub_8067354 + .4byte sub_806737C + .4byte sub_80673EC + .4byte sub_80673F8 + .4byte sub_806743C + .4byte sub_8067498 + .4byte sub_80674D4 + .4byte sub_8067508 + .4byte sub_8067718 + .4byte sub_8067874 + .4byte sub_80678C4 + .4byte sub_80678D0 + .4byte sub_8067930 + .4byte sub_80679A4 + .4byte sub_80679C4 + .4byte sub_80679D0 + .4byte nullsub_92 diff --git a/data/battle_controller_link_partner.s b/data/battle_controller_link_partner.s index 25bcb970b..1990ad870 100644 --- a/data/battle_controller_link_partner.s +++ b/data/battle_controller_link_partner.s @@ -3,7 +3,63 @@ .section .rodata - + .align 2 gLinkPartnerBufferCommands:: @ 85C9A94 - .incbin "baserom.gba", 0x5c9a94, 0xe4 + .4byte dp01t_00_4_getattr + .4byte sub_814C038 + .4byte sub_814C044 + .4byte sub_814CA98 + .4byte sub_814CB0C + .4byte sub_814CC28 + .4byte sub_814CE14 + .4byte sub_814CF30 + .4byte sub_814D0E4 + .4byte sub_814D0F0 + .4byte sub_814D19C + .4byte sub_814D288 + .4byte sub_814D294 + .4byte sub_814D2A0 + .4byte sub_814D2AC + .4byte sub_814D2B8 + .4byte sub_814D590 + .4byte sub_814D5E8 + .4byte sub_814D5F4 + .4byte sub_814D600 + .4byte sub_814D60C + .4byte sub_814D618 + .4byte sub_814D624 + .4byte sub_814D630 + .4byte sub_814D63C + .4byte sub_814D72C + .4byte sub_814D738 + .4byte sub_814D7B0 + .4byte sub_814D818 + .4byte sub_814D824 + .4byte sub_814D830 + .4byte sub_814D83C + .4byte sub_814D848 + .4byte sub_814D854 + .4byte sub_814D860 + .4byte sub_814D86C + .4byte sub_814D878 + .4byte sub_814D884 + .4byte sub_814D8A0 + .4byte sub_814D8D8 + .4byte sub_814D8F0 + .4byte dp01t_29_4_blink + .4byte sub_814D988 + .4byte sub_814D994 + .4byte sub_814D9D8 + .4byte sub_814DA34 + .4byte dp01t_2E_4_battle_intro + .4byte sub_814DAA8 + .4byte sub_814DDD8 + .4byte sub_814DEE4 + .4byte sub_814DF34 + .4byte sub_814DF40 + .4byte sub_814DFA0 + .4byte sub_814E014 + .4byte sub_814E034 + .4byte sub_814E040 + .4byte nullsub_113 diff --git a/data/battle_controller_opponent.s b/data/battle_controller_opponent.s index 7f159fb54..3b7acd003 100644 --- a/data/battle_controller_opponent.s +++ b/data/battle_controller_opponent.s @@ -3,7 +3,65 @@ .section .rodata - + .align 2 gOpponentBufferCommands:: @ 831C6C8 - .incbin "baserom.gba", 0x31c6c8, 0xec + .4byte dp01t_00_7_getattr + .4byte dp01t_01_2_read_pokmon_data_slice + .4byte dp01t_02_7_setattr + .4byte sub_80611B0 + .4byte sub_8061224 + .4byte sub_806137C + .4byte sub_806156C + .4byte sub_8061690 + .4byte sub_80618D8 + .4byte sub_8061AF0 + .4byte sub_8061B9C + .4byte sub_8061C48 + .4byte sub_8061C54 + .4byte sub_8061C60 + .4byte sub_8061C6C + .4byte sub_8061C78 + .4byte sub_8061F34 + .4byte sub_8061F90 + .4byte sub_8061F9C + .4byte sub_8061FAC + .4byte sub_8061FB8 + .4byte sub_806215C + .4byte sub_8062188 + .4byte sub_8062288 + .4byte sub_8062294 + .4byte sub_8062384 + .4byte sub_8062390 + .4byte sub_8062408 + .4byte sub_8062470 + .4byte sub_806247C + .4byte sub_8062488 + .4byte sub_8062494 + .4byte sub_80624A0 + .4byte sub_80624AC + .4byte sub_80624B8 + .4byte sub_80624C4 + .4byte sub_80624D0 + .4byte sub_80624DC + .4byte sub_80624F8 + .4byte sub_8062530 + .4byte sub_8062548 + .4byte dp01t_29_7_blink + .4byte sub_80625E0 + .4byte sub_80625EC + .4byte sub_8062630 + .4byte sub_806268C + .4byte dp01t_2E_7_battle_intro + .4byte sub_80626FC + .4byte dp01t_30_7_0803D67C + .4byte sub_8062A74 + .4byte sub_8062AC4 + .4byte sub_8062AD0 + .4byte dp01t_34_7_move_anim_start_t3 + .4byte sub_8062B98 + .4byte sub_8062BA4 + .4byte sub_8062BB0 + .4byte nullsub_91 + .align 2 + .byte 0xB0, 0xB0, 0xC8, 0x98, 0x28, 0x28, 0x28, 0x20 diff --git a/data/battle_controller_player.s b/data/battle_controller_player.s index 1c7ff56fe..37c877dfd 100644 --- a/data/battle_controller_player.s +++ b/data/battle_controller_player.s @@ -2,7 +2,64 @@ .include "constants/constants.inc" .section .rodata - - + + .align 2 gPlayerBufferCommands:: @ 831C514 - .incbin "baserom.gba", 0x31c514, 0xe4 + .4byte dp01t_00_1_getattr + .4byte sub_805A614 + .4byte dp01t_02_1_setattr + .4byte sub_805B0F0 + .4byte sub_805B164 + .4byte sub_805B1CC + .4byte sub_805B3D4 + .4byte sub_805B4F0 + .4byte dp01t_08_1_8032428 + .4byte sub_805B9F8 + .4byte sub_805BAB8 + .4byte sub_805BBA4 + .4byte sub_805BBC4 + .4byte sub_805BC18 + .4byte sub_805BC78 + .4byte dp01t_0F_1_move_anim + .4byte sub_805BF80 + .4byte dp01t_11_1_message_for_player_only + .4byte dp01t_12_6_battle_menu + .4byte sub_805C0B0 + .4byte dp01t_14_5_move_menu_pokedude + .4byte sub_805C248 + .4byte sub_805C2AC + .4byte sub_805C3EC + .4byte sub_805C410 + .4byte sub_805C528 + .4byte sub_805C5C4 + .4byte sub_805C63C + .4byte sub_805C6A4 + .4byte sub_805C710 + .4byte sub_805C71C + .4byte sub_805C7D0 + .4byte sub_805C800 + .4byte sub_805C80C + .4byte sub_805C820 + .4byte sub_805C834 + .4byte sub_805C848 + .4byte sub_805C85C + .4byte sub_805C878 + .4byte sub_805C8B0 + .4byte sub_805C8C8 + .4byte dp01t_29_1_blink + .4byte sub_805C960 + .4byte sub_805C96C + .4byte sub_805C9B0 + .4byte sub_805CA0C + .4byte dp01t_2E_1_battle_intro + .4byte dp01t_2F_1_pokemon_enter + .4byte sub_805CD74 + .4byte sub_805CE80 + .4byte sub_805CED0 + .4byte dp01t_33_1_enemy_move + .4byte sub_805CF54 + .4byte dp01t_35_1_link_standby_message_and_free_vram + .4byte sub_805D02C + .4byte sub_805D094 + .4byte nullsub_22 + diff --git a/data/battle_controller_player_partner.s b/data/battle_controller_player_partner.s index bc00258ae..35d78ebe0 100644 --- a/data/battle_controller_player_partner.s +++ b/data/battle_controller_player_partner.s @@ -2,9 +2,70 @@ .include "constants/constants.inc" .section .rodata - + + .align 2 gPlayerPartnerBufferCommands:: @ 8617170 - .incbin "baserom.gba", 0x617170, 0xE4 - + .4byte dp01t_00_3_getattr + .4byte sub_81BC484 + .4byte sub_81BC490 + .4byte sub_81BCEE4 + .4byte sub_81BCF58 + .4byte sub_81BD074 + .4byte sub_81BD260 + .4byte sub_81BD37C + .4byte sub_81BD5BC + .4byte sub_81BD5C8 + .4byte sub_81BD674 + .4byte sub_81BD760 + .4byte sub_81BD76C + .4byte sub_81BD778 + .4byte sub_81BD784 + .4byte sub_81BD790 + .4byte sub_81BDA4C + .4byte sub_81BDAA0 + .4byte sub_81BDAAC + .4byte sub_81BDABC + .4byte sub_81BDAC8 + .4byte sub_81BDB70 + .4byte sub_81BDB7C + .4byte sub_81BDC04 + .4byte sub_81BDC10 + .4byte sub_81BDD00 + .4byte sub_81BDD9C + .4byte sub_81BDE14 + .4byte sub_81BDE7C + .4byte sub_81BDE88 + .4byte sub_81BDE94 + .4byte sub_81BDEA0 + .4byte sub_81BDEAC + .4byte sub_81BDEB8 + .4byte sub_81BDEC4 + .4byte sub_81BDED0 + .4byte sub_81BDEDC + .4byte sub_81BDEE8 + .4byte sub_81BDF04 + .4byte sub_81BDF3C + .4byte sub_81BDF54 + .4byte dp01t_29_3_blink + .4byte sub_81BDFEC + .4byte sub_81BDFF8 + .4byte sub_81BE03C + .4byte sub_81BE098 + .4byte dp01t_2E_3_battle_intro + .4byte sub_81BE10C + .4byte dp01t_30_3_80EB11C + .4byte sub_81BE4E0 + .4byte sub_81BE530 + .4byte sub_81BE53C + .4byte sub_81BE59C + .4byte sub_81BE604 + .4byte sub_81BE610 + .4byte sub_81BE61C + .4byte nullsub_128 + + .align 2 @ apparently unused data - .incbin "baserom.gba", 0x617254, 32 + .byte 0x83, 0x4d, 0xf3, 0x5f, 0x6f, 0x4f, 0xeb, 0x3e + .byte 0x67, 0x2e, 0x10, 0x46, 0x8c, 0x3d, 0x28, 0x35 + .byte 0xc5, 0x2c, 0x15, 0x7f, 0xb5, 0x56, 0x9d, 0x53 + .byte 0x3b, 0x43, 0xda, 0x36, 0x79, 0x2a, 0x0e, 0x53 diff --git a/data/battle_controller_recorded_opponent.s b/data/battle_controller_recorded_opponent.s index 72544fdab..8baa57022 100644 --- a/data/battle_controller_recorded_opponent.s +++ b/data/battle_controller_recorded_opponent.s @@ -2,7 +2,64 @@ .include "constants/constants.inc" .section .rodata - -gRecordedOpponentBufferCommands:: @ 860AE90 - .incbin "baserom.gba", 0x60ae90, 0xe4 + + .align 2 +gRecordedOpponentBufferCommands:: @ 860AE90 + .4byte sub_8187224 + .4byte sub_8187A44 + .4byte sub_8187A50 + .4byte sub_81883C8 + .4byte sub_818843C + .4byte sub_818858C + .4byte sub_8188768 + .4byte sub_818888C + .4byte sub_8188A40 + .4byte sub_8188A4C + .4byte sub_8188AF8 + .4byte sub_8188BA4 + .4byte sub_8188BB0 + .4byte sub_8188BBC + .4byte sub_8188BC8 + .4byte sub_8188BD4 + .4byte sub_8188E90 + .4byte sub_8188EE4 + .4byte sub_8188EF0 + .4byte sub_8188F14 + .4byte sub_8188F20 + .4byte sub_8188F7C + .4byte sub_8188F88 + .4byte sub_8188FC4 + .4byte sub_8188FD0 + .4byte sub_81890C0 + .4byte sub_81890CC + .4byte sub_8189144 + .4byte sub_81891AC + .4byte sub_81891B8 + .4byte sub_81891C4 + .4byte sub_81891D0 + .4byte sub_81891DC + .4byte sub_81891E8 + .4byte sub_81891F4 + .4byte sub_8189200 + .4byte sub_818920C + .4byte sub_8189218 + .4byte sub_8189234 + .4byte sub_818926C + .4byte sub_8189284 + .4byte sub_81892AC + .4byte sub_818931C + .4byte sub_8189328 + .4byte sub_818936C + .4byte sub_81893C8 + .4byte sub_8189404 + .4byte sub_8189438 + .4byte sub_8189648 + .4byte sub_81897A4 + .4byte sub_81897F4 + .4byte sub_8189800 + .4byte sub_8189860 + .4byte sub_81898C8 + .4byte sub_81898D4 + .4byte sub_81898E0 + .4byte nullsub_119 diff --git a/data/battle_controller_recorded_player.s b/data/battle_controller_recorded_player.s index 2710a869b..089e4dcbf 100644 --- a/data/battle_controller_recorded_player.s +++ b/data/battle_controller_recorded_player.s @@ -2,7 +2,63 @@ .include "constants/constants.inc" .section .rodata - - + + .align 2 gRecordedPlayerBufferCommands:: @ 860AF74 - .incbin "baserom.gba", 0x60af74, 0xe4 + .4byte sub_818A5EC + .4byte sub_818AE0C + .4byte sub_818AE18 + .4byte sub_818B86C + .4byte sub_818B8E0 + .4byte sub_818B9FC + .4byte sub_818BBE8 + .4byte sub_818BD04 + .4byte sub_818BFAC + .4byte sub_818BFB8 + .4byte sub_818C064 + .4byte sub_818C150 + .4byte sub_818C15C + .4byte sub_818C168 + .4byte sub_818C174 + .4byte sub_818C180 + .4byte sub_818C43C + .4byte sub_818C490 + .4byte sub_818C4D8 + .4byte sub_818C52C + .4byte sub_818C538 + .4byte sub_818C594 + .4byte sub_818C5A0 + .4byte sub_818C5DC + .4byte sub_818C5E8 + .4byte sub_818C6E8 + .4byte sub_818C6F4 + .4byte sub_818C76C + .4byte sub_818C7D4 + .4byte sub_818C7E0 + .4byte sub_818C7EC + .4byte sub_818C7F8 + .4byte sub_818C804 + .4byte sub_818C810 + .4byte sub_818C81C + .4byte sub_818C828 + .4byte sub_818C834 + .4byte sub_818C840 + .4byte sub_818C85C + .4byte sub_818C894 + .4byte sub_818C8AC + .4byte sub_818C8D4 + .4byte sub_818C944 + .4byte sub_818C950 + .4byte sub_818C994 + .4byte sub_818C9F0 + .4byte dp01t_2E_2_battle_intro + .4byte sub_818CA64 + .4byte sub_818CD30 + .4byte sub_818CE3C + .4byte sub_818CE8C + .4byte sub_818CE98 + .4byte sub_818CEF8 + .4byte sub_818CF60 + .4byte sub_818CF6C + .4byte sub_818CF78 + .4byte nullsub_121 diff --git a/data/battle_controller_safari.s b/data/battle_controller_safari.s index 7c6e251c7..8f8c0b70b 100644 --- a/data/battle_controller_safari.s +++ b/data/battle_controller_safari.s @@ -2,7 +2,317 @@ .include "constants/constants.inc" .section .rodata - - - gSafariBufferCommands:: @ 85CDF20 - .incbin "baserom.gba", 0x5cdf20, 0x380 + + .align 2 +gSafariBufferCommands:: @ 85CDF20 + .4byte sub_81597AC + .4byte sub_81597B8 + .4byte sub_81597C4 + .4byte sub_81597D0 + .4byte sub_81597DC + .4byte sub_81597E8 + .4byte sub_81597F4 + .4byte sub_8159800 + .4byte sub_81598E0 + .4byte sub_81598EC + .4byte sub_81598F8 + .4byte sub_8159904 + .4byte sub_8159910 + .4byte sub_8159964 + .4byte sub_81599C4 + .4byte sub_81599D0 + .4byte dp01t_10_6_message + .4byte dp01t_11_6_message_for_player_only + .4byte sub_8159A94 + .4byte sub_8159AFC + .4byte sub_8159B08 + .4byte sub_8159B14 + .4byte sub_8159B54 + .4byte sub_8159B60 + .4byte sub_8159B6C + .4byte sub_8159B78 + .4byte sub_8159B84 + .4byte sub_8159BC0 + .4byte sub_8159BCC + .4byte sub_8159BD8 + .4byte sub_8159BE4 + .4byte sub_8159BF0 + .4byte sub_8159BFC + .4byte sub_8159C08 + .4byte sub_8159C14 + .4byte sub_8159C20 + .4byte sub_8159C2C + .4byte sub_8159C38 + .4byte sub_8159C44 + .4byte sub_8159C50 + .4byte sub_8159C5C + .4byte sub_8159C68 + .4byte sub_8159C74 + .4byte sub_8159C80 + .4byte dp01t_34_6_move_anim_start_t3 + .4byte sub_8159D20 + .4byte dp01t_2E_6_battle_intro + .4byte sub_8159D90 + .4byte sub_8159DEC + .4byte sub_8159DF8 + .4byte sub_8159E04 + .4byte sub_8159E10 + .4byte sub_8159E1C + .4byte sub_8159E78 + .4byte sub_8159E84 + .4byte sub_8159E90 + .4byte nullsub_115 + + .align 2 +gUnknown_085CE004:: @ 85CE004 + .2byte 0x0000, 0x0004, 0x0010, 0x0004 + .2byte 0x0020, 0x0004, 0x0030, 0x0004 + .2byte 0x0040, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_085CE01C:: @ 85CE01C + .4byte gUnknown_085CE004 + + .align 2 +gUnknown_085CE020:: @ 85CE020 + .2byte 0x2799 @ tileTag + .2byte 0x2799 @ paletteTag + .4byte gUnknown_08524A34 + .4byte gUnknown_085CE01C + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte sub_80A77C8 + + .align 2 + .2byte 0x2720 @ tileTag + .2byte 0x2720 @ paletteTag + .4byte gUnknown_08524934 + .4byte gDummySpriteAnimTable + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte sub_815A0D4 + + .align 2 + .2byte 0x2721 @ tileTag + .2byte 0x2721 @ paletteTag + .4byte gUnknown_08524904 + .4byte gDummySpriteAnimTable + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte sub_80A78AC + + .align 2 +gUnknown_085CE068:: @ 85CE068 + .2byte 0x0000, 0x0028, 0x0010, 0x0008 + .2byte 0x0020, 0x0028, 0xffff, 0x0000 + + .align 2 +gUnknown_085CE078:: @ 85CE078 + .4byte gUnknown_085CE068 + + .align 2 +gUnknown_085CE07C:: @ 85CE07C + .2byte 0x27ce @ tileTag + .2byte 0x27ce @ paletteTag + .4byte gUnknown_08524914 + .4byte gUnknown_085CE078 + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte sub_80A77C8 + + .align 2 + .2byte 0x27cf @ tileTag + .2byte 0x27cf @ paletteTag + .4byte gUnknown_08524A3C + .4byte gDummySpriteAnimTable + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte sub_815A1B0 + + .align 2 + .2byte 0x27cd @ tileTag + .2byte 0x27cd @ paletteTag + .4byte gUnknown_08524974 + .4byte gDummySpriteAnimTable + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte sub_815A254 + + .align 2 +gUnknown_085CE0C4:: @ 85CE0C4 + .2byte 0x0180, 0x0180, 0x0000, 0x0000 + .2byte 0xffe0, 0x0018, 0x0500, 0x0000 + .2byte 0x0018, 0xffe0, 0x0500, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_085CE0E4:: @ 85CE0E4 + .2byte 0x0030, 0x0030, 0x0000, 0x0000 + .2byte 0x0020, 0x0020, 0x0600, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085CE0FC:: @ 85CE0FC + .4byte gUnknown_085CE0C4 + .4byte gUnknown_085CE0E4 + + .align 2 +gUnknown_085CE104:: @ 85CE104 + .2byte 0x27cb @ tileTag + .2byte 0x27cb @ paletteTag + .4byte gUnknown_08524AFC + .4byte gDummySpriteAnimTable + .4byte NULL + .4byte gUnknown_085CE0FC + .4byte sub_815A2F0 + + .align 2 + .2byte 0x27a8 @ tileTag + .2byte 0x27a8 @ paletteTag + .4byte gUnknown_0852490C + .4byte gDummySpriteAnimTable + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte sub_815A6C4 + + .align 2 +gUnknown_085CE134:: @ 85CE134 + .2byte 0x0000, 0x0003, 0x0010, 0x0003 + .2byte 0x0020, 0x0003, 0x0030, 0x0003 + .2byte 0x0040, 0x0003, 0xffff, 0x0000 + + .align 2 +gUnknown_085CE14C:: @ 85CE14C + .4byte gUnknown_085CE134 + + .align 2 +gUnknown_085CE150:: @ 85CE150 + .2byte 0x272b @ tileTag + .2byte 0x272b @ paletteTag + .4byte gUnknown_08524914 + .4byte gUnknown_085CE14C + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte sub_815A7B0 + + .align 2 +gUnknown_085CE168:: @ 85CE168 + .2byte 0x0000, 0x0003, 0xffff, 0x0000 + + .align 2 +gUnknown_085CE170:: @ 85CE170 + .4byte gUnknown_085CE168 + + .align 2 +gUnknown_085CE174:: @ 85CE174 + .2byte 0xfff9, 0xfff9, 0x10fd, 0x0000 + .2byte 0x0007, 0x0007, 0x1003, 0x0000 + .2byte 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085CE18C:: @ 85CE18C + .4byte gUnknown_085CE174 + + .align 2 +gUnknown_085CE190:: @ 85CE190 + .2byte 0x27f4 @ tileTag + .2byte 0x27f4 @ paletteTag + .4byte gUnknown_08524974 + .4byte gUnknown_085CE170 + .4byte NULL + .4byte gUnknown_085CE18C + .4byte sub_815A7EC + + .align 2 +gUnknown_085CE1A8:: @ 85CE1A8 + .2byte 0x0000, 0x0008, 0x0010, 0x0010, 0x0020, 0x0004, 0x0030, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_085CE1BC:: @ 85CE1BC + .4byte gUnknown_085CE1A8 + + .align 2 +gUnknown_085CE1C0:: @ 85CE1C0 + .2byte 0x0200, 0x0200, 0x0000, 0x0000 + .2byte 0xffe0, 0xffe0, 0x0800, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085CE1D8:: @ 85CE1D8 + .4byte gUnknown_085CE1C0 + + .align 2 +gUnknown_085CE1DC:: @ 85CE1DC + .2byte 0x27d0 @ tileTag + .2byte 0x27d0 @ paletteTag + .4byte gUnknown_085249D4 + .4byte gUnknown_085CE1BC + .4byte NULL + .4byte gUnknown_085CE1D8 + .4byte sub_815A8AC + + .align 2 +gUnknown_085CE1F4:: @ 85CE1F4 + .2byte 0x0000, 0x0180, 0x0000, 0x0000 + .2byte 0x0010, 0x0000, 0x1400, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085CE20C:: @ 85CE20C + .2byte 0x0140, 0x0180, 0x0000, 0x0000 + .2byte 0xfff0, 0x0000, 0x1300, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085CE224:: @ 85CE224 + .4byte gUnknown_085CE1F4 + .4byte gUnknown_085CE20C + + .align 2 +gUnknown_085CE22C:: @ 85CE22C + .2byte 0x27f3 @ tileTag + .2byte 0x27f3 @ paletteTag + .4byte gUnknown_085249DC + .4byte gDummySpriteAnimTable + .4byte NULL + .4byte gUnknown_085CE224 + .4byte sub_815A934 + + .align 2 + .2byte 0x2807 @ tileTag + .2byte 0x2807 @ paletteTag + .4byte gUnknown_08524914 + .4byte gDummySpriteAnimTable + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte sub_815AAA4 + + .align 2 + .2byte 0x2807 @ tileTag + .2byte 0x2807 @ paletteTag + .4byte gUnknown_08524914 + .4byte gDummySpriteAnimTable + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte sub_815ABD0 + + .align 2 +gUnknown_085CE274:: @ 85CE274 + .2byte 0x0000, 0x0002, 0x0008, 0x0002 + .2byte 0x0010, 0x0002, 0xfffe, 0x0000 + + .align 2 +gUnknown_085CE284:: @ 85CE284 + .4byte gUnknown_085CE274 + + .align 2 +gUnknown_085CE288:: @ 85CE288 + .2byte 0x27f5 @ tileTag + .2byte 0x27f5 @ paletteTag + .4byte gUnknown_08524934 + .4byte gUnknown_085CE284 + .4byte NULL + .4byte gDummySpriteAffineAnimTable + .4byte sub_815ACD0 + + diff --git a/data/battle_controller_wally.s b/data/battle_controller_wally.s index 41c40f9eb..96d34d4a5 100644 --- a/data/battle_controller_wally.s +++ b/data/battle_controller_wally.s @@ -2,8 +2,63 @@ .include "constants/constants.inc" .section .rodata - - -gWallyBufferCommands:: @ 85DFDC0 - .incbin "baserom.gba", 0x5dfdc0, 0xe4 + .align 2 +gWallyBufferCommands:: @ 85DFDC0 + .4byte dp01t_00_5_getattr + .4byte sub_81693C0 + .4byte sub_81693CC + .4byte sub_8169E20 + .4byte sub_8169E2C + .4byte sub_8169E38 + .4byte sub_8169E44 + .4byte sub_8169EC8 + .4byte dp01t_07_6_ + .4byte sub_816A060 + .4byte sub_816A06C + .4byte sub_816A078 + .4byte sub_816A084 + .4byte sub_816A0D8 + .4byte sub_816A138 + .4byte sub_816A144 + .4byte sub_816A3B8 + .4byte dp01t_11_5_message_for_player_only + .4byte dp01t_12_1_battle_menu + .4byte sub_816A4D8 + .4byte sub_816A4E4 + .4byte sub_816A57C + .4byte sub_816A5BC + .4byte sub_816A5C8 + .4byte sub_816A5D4 + .4byte sub_816A6D4 + .4byte sub_816A6E0 + .4byte sub_816A6EC + .4byte sub_816A6F8 + .4byte sub_816A704 + .4byte sub_816A710 + .4byte sub_816A71C + .4byte sub_816A728 + .4byte sub_816A734 + .4byte sub_816A740 + .4byte sub_816A74C + .4byte sub_816A758 + .4byte sub_816A764 + .4byte sub_816A770 + .4byte sub_816A77C + .4byte sub_816A788 + .4byte sub_816A794 + .4byte sub_816A804 + .4byte sub_816A810 + .4byte sub_816A840 + .4byte sub_816A89C + .4byte dp01t_2E_5_battle_intro + .4byte sub_816A90C + .4byte sub_816AC78 + .4byte sub_816ACFC + .4byte sub_816AD08 + .4byte sub_816AD14 + .4byte sub_816AD20 + .4byte sub_816AD7C + .4byte sub_816AD88 + .4byte sub_816AD94 + .4byte nullsub_118 diff --git a/data/battle_message.s b/data/battle_message.s index 93a921b5e..40040d9c2 100644 --- a/data/battle_message.s +++ b/data/battle_message.s @@ -3,599 +3,1662 @@ .section .rodata +gText_Buffer36:: @ 85C9B78 + .string "{STRING 36}$" -.string "{STRING 36}$" -.string "{STRING 0} gained{PLAYER}\n{STRING 52} EXP. Points!\p$" -.string "$" -.string " a boosted$" -.string "{STRING 0} grew to\nLV. {PLAYER}!{UNKNOWN_A}\p$" -.string "{STRING 0} learned\n{PLAYER}!{UNKNOWN_A}\p$" -.string "{STRING 0} is trying to\nlearn {PLAYER}.\p$" -.string "But, {STRING 0} can’t learn\nmore than four moves.\p$" -.string "Delete a move to make\nroom for {PLAYER}?$" -.string "{STRING 0} forgot\n{PLAYER}.\p$" -.string "{PAUSE 32}Stop learning\n{PLAYER}?$" -.string "{STRING 0} did not learn\n{PLAYER}.\p$" -.string "Use next POKéMON?$" -.string "{STRING 15}’s\nattack missed!$" -.string "{STRING 16}\nprotected itself!$" -.string "{STRING 16} avoided\ndamage with {STRING 25}!$" -.string "{STRING 16} makes GROUND\nmoves miss with {STRING 25}!$" -.string "{STRING 16} avoided\nthe attack!$" -.string "It doesn’t affect\n{STRING 16}‥$" -.string "{STRING 15}\nfainted!\p$" -.string "{STRING 16}\nfainted!\p$" -.string "{STRING 35} got Â¥{STRING 0}\nfor winning!\p$" -.string "{STRING 35} is out of\nusable POKéMON!\p$" -.string "{STRING 35} whited out!{PAUSE_UNTIL_PRESS}$" -.string "{STRING 19} prevents\nescape with {STRING 26}!\p$" -.string "Can’t escape!\p$" -.string "{STRING 15} can’t escape!$" -.string "Hit {STRING 0} time(s)!$" -.string "{STRING 17}\nfell asleep!$" -.string "{STRING 19}’s {STRING 26}\nmade {STRING 17} sleep!$" -.string "{STRING 16} is\nalready asleep!$" -.string "{STRING 15} is\nalready asleep!$" -.string "{STRING 16}\nwasn’t affected!$" -.string "{STRING 17}\nwas poisoned!$" -.string "{STRING 19}’s {STRING 26}\npoisoned {STRING 17}!$" -.string "{STRING 15} is hurt\nby poison!$" -.string "{STRING 16} is already\npoisoned.$" -.string "{STRING 17} is badly\npoisoned!$" -.string "{STRING 16} had its\nenergy drained!$" -.string "{STRING 17} was burned!$" -.string "{STRING 19}’s {STRING 26}\nburned {STRING 17}!$" -.string "{STRING 15} is hurt\nby its burn!$" -.string "{STRING 16} already\nhas a burn.$" -.string "{STRING 17} was\nfrozen solid!$" -.string "{STRING 19}’s {STRING 26}\nfroze {STRING 17} solid!$" -.string "{STRING 15} is\nfrozen solid!$" -.string "{STRING 16} was\ndefrosted!$" -.string "{STRING 15} was\ndefrosted!$" -.string "{STRING 15} was\ndefrosted by {STRING 20}!$" -.string "{STRING 17} is paralyzed!\nIt may be unable to move!$" -.string "{STRING 19}’s {STRING 26}\nparalyzed {STRING 17}!\lIt may be unable to move!$" -.string "{STRING 15} is paralyzed!\nIt can’t move!$" -.string "{STRING 16} is\nalready paralyzed!$" -.string "{STRING 16} was\nhealed of paralysis!$" -.string "{STRING 16}’s\ndream was eaten!$" -.string "{STRING 15}’s {STRING 0}\nwon’t go higher!$" -.string "{STRING 16}’s {STRING 0}\nwon’t go lower!$" -.string "Your team’s {STRING 0}\nstopped working!$" -.string "The foe’s {STRING 0}\nstopped working!$" -.string "{STRING 15} is\nconfused!$" -.string "{STRING 15} snapped\nout of confusion!$" -.string "{STRING 17} became\nconfused!$" -.string "{STRING 16} is\nalready confused!$" -.string "{STRING 16}\nfell in love!$" -.string "{STRING 15} is in love\nwith {STRING 19}!$" -.string "{STRING 15} is\nimmobilized by love!$" -.string "{STRING 16} was\nblown away!$" -.string "{STRING 15} transformed\ninto the {STRING 0} type!$" -.string "{STRING 15} flinched!$" -.string "{STRING 16} regained\nhealth!$" -.string "{STRING 16}’s\nHP is full!$" -.string "{STRING 42}’s {STRING 20}\nraised SP. DEF!$" -.string "{STRING 42}’s {STRING 20}\nraised SP. DEF a little!$" -.string "{STRING 42}’s {STRING 20}\nraised DEFENSE!$" -.string "{STRING 42}’s {STRING 20}\nraised DEFENSE a little!$" -.string "{STRING 42}’s party is covered\nby a veil!$" -.string "{STRING 16}’s party is protected\nby SAFEGUARD!$" -.string "{STRING 44}’s party is no longer\nprotected by SAFEGUARD!$" -.string "{STRING 15} went\nto sleep!$" -.string "{STRING 15} slept and\nbecame healthy!$" -.string "{STRING 15} whipped\nup a whirlwind!$" -.string "{STRING 15} took\nin sunlight!$" -.string "{STRING 15} lowered\nits head!$" -.string "{STRING 15} is glowing!$" -.string "{STRING 15} flew\nup high!$" -.string "{STRING 15} dug a hole!$" -.string "{STRING 15} hid\nunderwater!$" -.string "{STRING 15} sprang up!$" -.string "{STRING 16} was squeezed by\n{STRING 15}’s BIND!$" -.string "{STRING 16} was trapped\nin the vortex!$" -.string "{STRING 16} was trapped\nby SAND TOMB!$" -.string "{STRING 16} was WRAPPED by\n{STRING 15}!$" -.string "{STRING 15} CLAMPED\n{STRING 16}!$" -.string "{STRING 15} is hurt\nby {STRING 0}!$" -.string "{STRING 15} was freed\nfrom {STRING 0}!$" -.string "{STRING 15} kept going\nand crashed!$" +gText_PkmnGainedEXP:: @ 85C9B7B + .string "{STRING 0} gained{PLAYER}\n{STRING 52} EXP. Points!\p$" -gUnknown_085CA424:: @ 85CA424 +gText_EmptyString4:: @ 85C9B98 + .string "$" -.string "{STRING 42} became\nshrouded in MIST!$" -.string "{STRING 19} is protected\nby MIST!$" +gText_ABoosted:: @ 85C9B99 + .string " a boosted$" -gUnknown_085CA459:: @ 85CA459 +gText_PkmnGrewToLv:: @ 85C9BA4 + .string "{STRING 0} grew to\nLV. {PLAYER}!{UNKNOWN_A}\p$" -.string "{STRING 15} is getting\npumped!$" -.string "{STRING 15} is hit\nwith recoil!$" -.string "{STRING 15} protected\nitself!$" -.string "{STRING 15} is buffeted\nby the sandstorm!$" -.string "{STRING 15} is pelted\nby HAIL!$" -.string "{STRING 40}’s {STRING 0}\nwore off!$" -.string "{STRING 16} was seeded!$" -.string "{STRING 16} evaded\nthe attack!$" -.string "{STRING 15}’s health is\nsapped by LEECH SEED!$" -.string "{STRING 15} is fast\nasleep.$" -.string "{STRING 15} woke up!$" -.string "But {STRING 19}’s UPROAR\nkept it awake!$" -.string "{STRING 15} woke up\nin the UPROAR!$" -.string "{STRING 15} caused\nan UPROAR!$" -.string "{STRING 15} is making\nan UPROAR!$" -.string "{STRING 15} calmed down.$" -.string "But {STRING 16} can’t\nsleep in an UPROAR!$" -.string "{STRING 15} STOCKPILED\n{STRING 0}!$" -.string "{STRING 15} can’t\nSTOCKPILE any more!$" -.string "But {STRING 16} can’t\nsleep in an UPROAR!$" -.string "But the UPROAR kept\n{STRING 16} awake!$" -.string "{STRING 16} stayed awake\nusing its {STRING 25}!$" -.string "{STRING 15} is storing\nenergy!$" -.string "{STRING 15} unleashed\nenergy!$" -.string "{STRING 15} became\nconfused due to fatigue!$" -.string "{STRING 35} picked up\nÂ¥{STRING 0}!\p$" -.string "{STRING 16} is\nunaffected!$" -.string "{STRING 15} transformed\ninto {STRING 0}!$" -.string "{STRING 15} made\na SUBSTITUTE!$" -.string "{STRING 15} already\nhas a SUBSTITUTE!$" -.string "The SUBSTITUTE took damage\nfor {STRING 16}!\p$" -.string "{STRING 16}’s\nSUBSTITUTE faded!\p$" -.string "{STRING 15} must\nrecharge!$" -.string "{STRING 16}’s RAGE\nis building!$" -.string "{STRING 16}’s {STRING 0}\nwas disabled!$" -.string "{STRING 15} is disabled\nno more!$" -.string "{STRING 16} got\nan ENCORE!$" -.string "{STRING 15}’s ENCORE\nended!$" -.string "{STRING 15} took aim\nat {STRING 16}!$" -.string "{STRING 15} SKETCHED\n{STRING 0}!$" -.string "{STRING 15} is trying\nto take its foe with it!$" -.string "{STRING 16} took\n{STRING 15} with it!$" -.string "Reduced {STRING 16}’s\n{STRING 0} by {PLAYER}!$" -.string "{STRING 15} stole\n{STRING 16}’s {STRING 22}!$" -.string "{STRING 16} can’t\nescape now!$" -.string "{STRING 16} fell into\na NIGHTMARE!$" -.string "{STRING 15} is locked\nin a NIGHTMARE!$" -.string "{STRING 15} cut its own HP and\nlaid a CURSE on {STRING 16}!$" -.string "{STRING 15} is afflicted\nby the CURSE!$" -.string "SPIKES were scattered all around\nthe opponent’s side!$" -.string "{STRING 19} is hurt\nby SPIKES!$" -.string "{STRING 15} identified\n{STRING 16}!$" -.string "{STRING 15}’s PERISH count\nfell to {STRING 0}!$" -.string "{STRING 15} braced\nitself!$" -.string "{STRING 16} ENDURED\nthe hit!$" -.string "MAGNITUDE {STRING 0}!$" -.string "{STRING 15} cut its own HP\nand maximized ATTACK!$" -.string "{STRING 15} copied\n{STRING 16}’s stat changes!$" -.string "{STRING 15} got free of\n{STRING 16}’s {STRING 0}!$" -.string "{STRING 15} shed\nLEECH SEED!$" -.string "{STRING 15} blew away\nSPIKES!$" -.string "{STRING 15} fled from\nbattle!$" -.string "{STRING 15} foresaw\nan attack!$" -.string "{STRING 16} took the\n{STRING 0} attack!$" -.string "{STRING 15} chose\n{STRING 20} as its destiny!$" -.string "{STRING 0}’s attack!$" -.string "{STRING 15} became the\ncenter of attention!$" -.string "{STRING 15} began\ncharging power!$" -.string "NATURE POWER turned into\n{STRING 20}!$" -.string "{STRING 15}’s status\nreturned to normal!$" -.string "{STRING 16} was subjected\nto TORMENT!$" -.string "{STRING 15} is tightening\nits focus!$" -.string "{STRING 16} fell for\nthe TAUNT!$" -.string "{STRING 15} is ready to\nhelp {STRING 16}!$" -.string "{STRING 15} switched\nitems with its opponent!$" -.string "{STRING 15} obtained\n{STRING 0}.$" -.string "{STRING 16} obtained\n{PLAYER}.$" -.string "{STRING 15} obtained\n{STRING 0}.\p{STRING 16} obtained\n{PLAYER}.$" -.string "{STRING 15} copied\n{STRING 16}’s {STRING 25}!$" -.string "{STRING 15} made a WISH!$" -.string "{STRING 0}’s WISH\ncame true!$" -.string "{STRING 15} planted its roots!$" -.string "{STRING 15} absorbed\nnutrients with its roots!$" -.string "{STRING 16} anchored\nitself with its roots!$" -.string "{STRING 15} made\n{STRING 16} drowsy!$" -.string "{STRING 15} knocked off\n{STRING 16}’s {STRING 22}!$" -.string "{STRING 15} swapped abilities\nwith its opponent!$" -.string "{STRING 15} sealed the\nopponent’s move(s)!$" -.string "{STRING 15} wants the\nopponent to bear a GRUDGE!$" -.string "{STRING 15}’s {STRING 0} lost\nall its PP due to the GRUDGE!$" -.string "{STRING 15} shrouded\nitself in {STRING 20}!$" -.string "{STRING 15}’s {STRING 20}\nwas bounced back by MAGIC COAT!$" -.string "{STRING 15} waits for a target\nto make a move!$" -.string "{STRING 16} SNATCHED\n{STRING 19}’s move!$" -.string "Electricity’s power was\nweakened!$" -.string "Fire’s power was\nweakened!$" -.string "{STRING 15} found\none {STRING 22}!$" -.string "A soothing aroma wafted\nthrough the area!$" -.string "Items can’t be used now.{PAUSE 64}$" -.string "For {STRING 19},\n{STRING 22} {STRING 0}$" -.string "{STRING 19} used\n{STRING 22} to get pumped!$" -.string "{STRING 15} lost its\nfocus and couldn’t move!$" -.string "{STRING 16} was\ndragged out!\p$" -.string "The wall shattered!$" -.string "But it had no effect!$" -.string "{STRING 18} has no\nmoves left!\p$" -.string "{STRING 18}’s {STRING 20}\nis disabled!\p$" -.string "{STRING 18} can’t use the same\nmove in a row due to the TORMENT!\p$" -.string "{STRING 18} can’t use\n{STRING 20} after the TAUNT!\p$" -.string "{STRING 18} can’t use the\nsealed {STRING 20}!\p$" -.string "{STRING 19}’s {STRING 26}\nmade it rain!$" -.string "{STRING 19}’s {STRING 26}\nraised its SPEED!$" -.string "{STRING 16} was protected\nby {STRING 25}!$" -.string "{STRING 16}’s {STRING 25}\nprevents {STRING 15}\lfrom using {STRING 20}!$" -.string "{STRING 16} restored HP\nusing its {STRING 25}!$" -.string "{STRING 16}’s {STRING 25}\nmade {STRING 20} useless!$" -.string "{STRING 16}’s {STRING 25}\nmade it the {STRING 0} type!$" -.string "{STRING 17}’s {STRING 25}\nprevents paralysis!$" -.string "{STRING 16}’s {STRING 25}\nprevents romance!$" -.string "{STRING 17}’s {STRING 25}\nprevents poisoning!$" -.string "{STRING 16}’s {STRING 25}\nprevents confusion!$" -.string "{STRING 16}’s {STRING 25}\nraised its FIRE power!$" -.string "{STRING 16} anchors\nitself with {STRING 25}!$" -.string "{STRING 19}’s {STRING 26}\ncuts {STRING 16}’s ATTACK!$" -.string "{STRING 19}’s {STRING 26}\nprevents stat loss!$" -.string "{STRING 16}’s {STRING 25}\nhurt {STRING 15}!$" -.string "{STRING 19} TRACED\n{STRING 0}’s {PLAYER}!$" -.string "{STRING 17}’s {STRING 27}\nprevents burns!$" -.string "{STRING 16}’s {STRING 25}\nblocks {STRING 20}!$" -.string "{STRING 19}’s {STRING 26}\nblocks {STRING 20}!$" -.string "{STRING 15}’s {STRING 24}\nrestored its HP a little!$" -.string "{STRING 19}’s {STRING 26}\nwhipped up a sandstorm!$" -.string "{STRING 19}’s {STRING 26}\nintensified the sun’s rays!$" -.string "{STRING 19}’s {STRING 26}\nprevents {STRING 0} loss!$" -.string "{STRING 16}’s {STRING 25}\ninfatuated {STRING 15}!$" -.string "{STRING 16}’s {STRING 25}\nmade {STRING 20} ineffective!$" -.string "{STRING 19}’s {STRING 26}\ncured its {STRING 0} problem!$" -.string "It sucked up the\nLIQUID OOZE!$" -.string "{STRING 19} transformed!$" -.string "{STRING 16}’s {STRING 25}\ntook the attack!$" +gText_PkmnLearnedMove:: @ 85C9BBA + .string "{STRING 0} learned\n{PLAYER}!{UNKNOWN_A}\p$" -BattleText_PreventedSwitch:: @ 85CB2A1 +gText_TryToLearnMove1:: @ 85C9BCC + .string "{STRING 0} is trying to\nlearn {PLAYER}.\p$" -.string "{STRING 0}’s {STRING 23}\nprevents switching!\p$" -.string "{STRING 16}’s {STRING 25}\nprevented {STRING 19}’s\l{STRING 0} from working!$" -.string "{STRING 19}’s {STRING 26}\nmade it ineffective!$" -.string "{STRING 17}’s {STRING 27}\nprevents flinching!$" -.string "{STRING 15}’s {STRING 24}\nprevents {STRING 16}’s\l{STRING 25} from working!$" -.string "{STRING 19}’s {STRING 26}\ncured its {STRING 0} problem!$" -.string "{STRING 19}’s {STRING 26}\nhad no effect on {STRING 17}!$" -.string "sharply $" +gText_TryToLearnMove2:: @ 85C9BE7 + .string "But, {STRING 0} can’t learn\nmore than four moves.\p$" -gUnknown_085CB38A:: @ 85CB38A +gText_TryToLearnMove3:: @ 85C9C12 + .string "Delete a move to make\nroom for {PLAYER}?$" -.string "rose!$" -.string "harshly $" -.string "fell!$" -.string "{STRING 15}’s {STRING 0}\n{PLAYER}$" +gText_PkmnForgotMove:: @ 85C9C35 + .string "{STRING 0} forgot\n{PLAYER}.\p$" -gUnknown_085CB3AA:: @ 85CB3AA +gText_StopLearningMove:: @ 85C9C44 + .string "{PAUSE 32}Stop learning\n{PLAYER}?$" -.string "{STRING 16}’s {STRING 0}\n{PLAYER}$" -.string "Using {STRING 22}, the {STRING 0}\nof {STRING 19} {PLAYER}$" -.string "{STRING 15}’s {STRING 0}\n{PLAYER}$" -.string "{STRING 16}’s {STRING 0}\n{PLAYER}$" -.string "{STRING 15}’s stats won’t\ngo any higher!$" -.string "{STRING 16}’s stats won’t\ngo any lower!$" -.string "A critical hit!$" -.string "It’s a one-hit KO!$" -.string "{PAUSE 32}1, {PAUSE 15}2, and{PAUSE 15}‥ {PAUSE 15}‥ {PAUSE 15}‥ {PAUSE 15}{PLAY_SE 0x0038}Poof!\p$" -.string "And‥\p$" -.string "HM moves can’t be\nforgotten now.\p$" -.string "It’s not very effective‥$" -.string "It’s super effective!$" +gText_DidNotLearnMove:: @ 85C9C59 + .string "{STRING 0} did not learn\n{PLAYER}.\p$" -gUnknown_085CB4CA:: @ 85CB4CA +gText_UseNextPkmn:: @ 85C9C6F + .string "Use next POKéMON?$" -.string "{PLAY_SE 0x0011}Got away safely!\p$" -.string "{PLAY_SE 0x0011}{STRING 15} fled\nusing its {STRING 22}!\p$" -.string "{PLAY_SE 0x0011}{STRING 15} fled\nusing {STRING 24}!\p$" -.string "{PLAY_SE 0x0011}Wild {STRING 0} fled!$" +gText_AttackMissed:: @ 85C9C81 + .string "{STRING 15}’s\nattack missed!$" + +gText_PkmnProtectedItself:: @ 85C9C95 + .string "{STRING 16}\nprotected itself!$" + +gText_AvoidedDamage:: @ 85C9CAA + .string "{STRING 16} avoided\ndamage with {STRING 25}!$" + +gText_PkmnMakesGroundMiss:: @ 85C9CC5 + .string "{STRING 16} makes GROUND\nmoves miss with {STRING 25}!$" + +gText_PkmnAvoidedAttack:: @ 85C9CE9 + .string "{STRING 16} avoided\nthe attack!$" + +gText_ItDoesntAffect:: @ 85C9D00 + .string "It doesn’t affect\n{STRING 16}…$" + +gText_PkmnFainted:: @ 85C9D16 + .string "{STRING 15}\nfainted!\p$" + +gText_PkmnFainted2:: @ 85C9D23 + .string "{STRING 16}\nfainted!\p$" + +gText_PlayerGotMoney:: @ 85C9D30 + .string "{STRING 35} got Â¥{STRING 0}\nfor winning!\p$" + +gText_PlayerWhiteout:: @ 85C9D49 + .string "{STRING 35} is out of\nusable POKéMON!\p$" + +gText_PlayerWhiteout2:: @ 85C9D67 + .string "{STRING 35} whited out!{PAUSE_UNTIL_PRESS}$" + +gText_PreventsEscape:: @ 85C9D78 + .string "{STRING 19} prevents\nescape with {STRING 26}!\p$" + +gText_CantEscape2:: @ 85C9D95 + .string "Can’t escape!\p$" + +gText_PkmnCantEscape2:: @ 85C9DA4 + .string "{STRING 15} can’t escape!$" + +gText_HitXTimes:: @ 85C9DB5 + .string "Hit {STRING 0} time(s)!$" + +gText_PkmnFellAsleep:: @ 85C9DC5 + .string "{STRING 17}\nfell asleep!$" + +gText_PkmnMadeSleep:: @ 85C9DD5 + .string "{STRING 19}’s {STRING 26}\nmade {STRING 17} sleep!$" + +gText_PkmnAlreadyAsleep:: @ 85C9DEC + .string "{STRING 16} is\nalready asleep!$" + +gText_PkmnAlreadyAsleep2:: @ 85C9E02 + .string "{STRING 15} is\nalready asleep!$" + +gText_PkmnWasntAffected:: @ 85C9E18 + .string "{STRING 16}\nwasn’t affected!$" + +gText_PkmnWasPoisoned:: @ 85C9E2C + .string "{STRING 17}\nwas poisoned!$" + +gText_PkmnPoisonedBy:: @ 85C9E3D + .string "{STRING 19}’s {STRING 26}\npoisoned {STRING 17}!$" + +gText_PkmnHurtByPoison:: @ 85C9E52 + .string "{STRING 15} is hurt\nby poison!$" + +gText_PkmnAlreadyPoisoned:: @ 85C9E68 + .string "{STRING 16} is already\npoisoned.$" + +gText_PkmnBadlyPoisoned:: @ 85C9E80 + .string "{STRING 17} is badly\npoisoned!$" + +gText_PkmnEnergyDrained:: @ 85C9E96 + .string "{STRING 16} had its\nenergy drained!$" + +gText_PkmnWasBurned:: @ 85C9EB1 + .string "{STRING 17} was burned!$" + +gText_PkmnBurnedBy:: @ 85C9EC0 + .string "{STRING 19}’s {STRING 26}\nburned {STRING 17}!$" + +gText_PkmnHurtByBurn:: @ 85C9ED3 + .string "{STRING 15} is hurt\nby its burn!$" + +gText_PkmnAlreadyHasBurn:: @ 85C9EEB + .string "{STRING 16} already\nhas a burn.$" + +gText_PkmnWasFrozen:: @ 85C9F02 + .string "{STRING 17} was\nfrozen solid!$" + +gText_PkmnFrozenBy:: @ 85C9F17 + .string "{STRING 19}’s {STRING 26}\nfroze {STRING 17} solid!$" + +gText_PkmnIsFrozen:: @ 85C9F2F + .string "{STRING 15} is\nfrozen solid!$" + +gText_PkmnWasDefrosted:: @ 85C9F43 + .string "{STRING 16} was\ndefrosted!$" + +gText_PkmnWasDefrosted2:: @ 85C9F55 + .string "{STRING 15} was\ndefrosted!$" + +gText_PkmnWasDefrostedBy:: @ 85C9F67 + .string "{STRING 15} was\ndefrosted by {STRING 20}!$" + +gText_PkmnWasParalyzed:: @ 85C9F7F + .string "{STRING 17} is paralyzed!\nIt may be unable to move!$" + +gText_PkmnWasParalyzedBy:: @ 85C9FAA + .string "{STRING 19}’s {STRING 26}\nparalyzed {STRING 17}!\lIt may be unable to move!$" + +gText_PkmnIsParalyzed:: @ 85C9FDA + .string "{STRING 15} is paralyzed!\nIt can’t move!$" + +gText_PkmnIsAlreadyParalyzed:: @ 85C9FFA + .string "{STRING 16} is\nalready paralyzed!$" + +gText_PkmnHealedParalysis:: @ 85CA013 + .string "{STRING 16} was\nhealed of paralysis!$" + +gText_PkmnDreamEaten:: @ 85CA02F + .string "{STRING 16}’s\ndream was eaten!$" + +gText_StatsWontIncrease:: @ 85CA045 + .string "{STRING 15}’s {STRING 0}\nwon’t go higher!$" + +gText_StatsWontDecrease:: @ 85CA05E + .string "{STRING 16}’s {STRING 0}\nwon’t go lower!$" + +gText_TeamStoppedWorking:: @ 85CA076 + .string "Your team’s {STRING 0}\nstopped working!$" + +gText_FoeStoppedWorking:: @ 85CA096 + .string "The foe’s {STRING 0}\nstopped working!$" + +gText_PkmnIsConfused:: @ 85CA0B4 + .string "{STRING 15} is\nconfused!$" + +gText_PkmnHealedConfusion:: @ 85CA0C4 + .string "{STRING 15} snapped\nout of confusion!$" + +gText_PkmnWasConfused:: @ 85CA0E1 + .string "{STRING 17} became\nconfused!$" + +gText_PkmnAlreadyConfused:: @ 85CA0F5 + .string "{STRING 16} is\nalready confused!$" + +gText_PkmnFellInLove:: @ 85CA10D + .string "{STRING 16}\nfell in love!$" + +gText_PkmnInLove:: @ 85CA11E + .string "{STRING 15} is in love\nwith {STRING 19}!$" + +gText_PkmnImmobilizedByLove:: @ 85CA135 + .string "{STRING 15} is\nimmobilized by love!$" + +gText_PkmnBlownAway:: @ 85CA150 + .string "{STRING 16} was\nblown away!$" + +gText_PkmnChangedType:: @ 85CA163 + .string "{STRING 15} transformed\ninto the {STRING 0} type!$" + +gText_PkmnFlinched:: @ 85CA184 + .string "{STRING 15} flinched!$" + +gText_PkmnRegainedHealth:: @ 85CA191 + .string "{STRING 16} regained\nhealth!$" + +gText_PkmnHPFull:: @ 85CA1A5 + .string "{STRING 16}’s\nHP is full!$" + +gText_PkmnRaisedSpDef:: @ 85CA1B6 + .string "{STRING 42}’s {STRING 20}\nraised SP. DEF!$" + +gText_PkmnRaisedSpDefALittle:: @ 85CA1CE + .string "{STRING 42}’s {STRING 20}\nraised SP. DEF a little!$" + +gText_PkmnRaisedDef:: @ 85CA1EF + .string "{STRING 42}’s {STRING 20}\nraised DEFENSE!$" + +gText_PkmnRaisedDefALittle:: @ 85CA207 + .string "{STRING 42}’s {STRING 20}\nraised DEFENSE a little!$" + +gText_PkmnCoveredByVeil:: @ 85CA228 + .string "{STRING 42}’s party is covered\nby a veil!$" + +gText_PkmnUsedSafeguard:: @ 85CA249 + .string "{STRING 16}’s party is protected\nby SAFEGUARD!$" + +gText_PkmnSafeguardExpired:: @ 85CA26F + .string "{STRING 44}’s party is no longer\nprotected by SAFEGUARD!$" + +gText_PkmnWentToSleep:: @ 85CA29F + .string "{STRING 15} went\nto sleep!$" + +gText_PkmnSleptHealthy:: @ 85CA2B1 + .string "{STRING 15} slept and\nbecame healthy!$" + +gText_PkmnWhippedWhirlwind:: @ 85CA2CE + .string "{STRING 15} whipped\nup a whirlwind!$" + +gText_PkmnTookSunlight:: @ 85CA2E9 + .string "{STRING 15} took\nin sunlight!$" + +gText_PkmnLoweredHead:: @ 85CA2FE + .string "{STRING 15} lowered\nits head!$" + +gText_PkmnIsGlowing:: @ 85CA313 + .string "{STRING 15} is glowing!$" + +gText_PkmnFlewHigh:: @ 85CA322 + .string "{STRING 15} flew\nup high!$" + +gText_PkmnDugHole:: @ 85CA333 + .string "{STRING 15} dug a hole!$" + +gText_PkmnHidUnderwater:: @ 85CA342 + .string "{STRING 15} hid\nunderwater!$" + +gText_PkmnSprangUp:: @ 85CA355 + .string "{STRING 15} sprang up!$" + +gText_PkmnSqueezedByBind:: @ 85CA363 + .string "{STRING 16} was squeezed by\n{STRING 15}’s BIND!$" + +gText_PkmnTrappedInVortex:: @ 85CA381 + .string "{STRING 16} was trapped\nin the vortex!$" + +gText_PkmnTrappedBySandTomb:: @ 85CA39F + .string "{STRING 16} was trapped\nby SAND TOMB!$" + +gText_PkmnWrappedBy:: @ 85CA3BC + .string "{STRING 16} was WRAPPED by\n{STRING 15}!$" + +gText_PkmnClamped:: @ 85CA3D2 + .string "{STRING 15} CLAMPED\n{STRING 16}!$" + +gText_PkmnHurtBy:: @ 85CA3E1 + .string "{STRING 15} is hurt\nby {STRING 0}!$" + +gText_PkmnFreedFrom:: @ 85CA3F3 + .string "{STRING 15} was freed\nfrom {STRING 0}!$" + +gText_PkmnCrashed:: @ 85CA409 + .string "{STRING 15} kept going\nand crashed!$" + +gText_PkmnShroudedInMist:: @ 85CA424 + .string "{STRING 42} became\nshrouded in MIST!$" + +gText_PkmnProtectedByMist:: @ 85CA440 + .string "{STRING 19} is protected\nby MIST!$" + +gText_PkmnGettingPumped:: @ 85CA459 + .string "{STRING 15} is getting\npumped!$" + +gText_PkmnHitWithRecoil:: @ 85CA46F + .string "{STRING 15} is hit\nwith recoil!$" + +gText_PkmnProtectedItself2:: @ 85CA486 + .string "{STRING 15} protected\nitself!$" + +gText_PkmnBuffetedBySandstorm:: @ 85CA49B + .string "{STRING 15} is buffeted\nby the sandstorm!$" + +gText_PkmnPeltedByHail:: @ 85CA4BC + .string "{STRING 15} is pelted\nby HAIL!$" + +gText_PkmnsXWoreOff:: @ 85CA4D2 + .string "{STRING 40}’s {STRING 0}\nwore off!$" + +gText_PkmnSeeded:: @ 85CA4E4 + .string "{STRING 16} was seeded!$" + +gText_PkmnEvadedAttack:: @ 85CA4F3 + .string "{STRING 16} evaded\nthe attack!$" + +gText_PkmnSappedByLeechSeed:: @ 85CA509 + .string "{STRING 15}’s health is\nsapped by LEECH SEED!$" + +gText_PkmnFastAsleep:: @ 85CA52E + .string "{STRING 15} is fast\nasleep.$" + +gText_PkmnWokeUp:: @ 85CA541 + .string "{STRING 15} woke up!$" + +gText_PkmnUproarKeptAwake:: @ 85CA54D + .string "But {STRING 19}’s UPROAR\nkept it awake!$" + +gText_PkmnWokeUpInUproar:: @ 85CA56C + .string "{STRING 15} woke up\nin the UPROAR!$" + +gText_PkmnCausedUproar:: @ 85CA586 + .string "{STRING 15} caused\nan UPROAR!$" + +gText_PkmnMakingUproar:: @ 85CA59B + .string "{STRING 15} is making\nan UPROAR!$" + +gText_PkmnCalmedDown:: @ 85CA5B3 + .string "{STRING 15} calmed down.$" + +gText_PkmnCantSleepInUproar:: @ 85CA5C3 + .string "But {STRING 16} can’t\nsleep in an UPROAR!$" + +gText_PkmnStockpiled:: @ 85CA5E4 + .string "{STRING 15} STOCKPILED\n{STRING 0}!$" + +gText_PkmnCantStockpile:: @ 85CA5F6 + .string "{STRING 15} can’t\nSTOCKPILE any more!$" + +gText_PkmnCantSleepInUproar2:: @ 85CA613 + .string "But {STRING 16} can’t\nsleep in an UPROAR!$" + +gText_UproarKeptPkmnAwake:: @ 85CA634 + .string "But the UPROAR kept\n{STRING 16} awake!$" + +gText_PkmnStayedAwakeUsing:: @ 85CA652 + .string "{STRING 16} stayed awake\nusing its {STRING 25}!$" + +gText_PkmnStoringEnergy:: @ 85CA670 + .string "{STRING 15} is storing\nenergy!$" + +gText_PkmnUnleashedEnergy:: @ 85CA686 + .string "{STRING 15} unleashed\nenergy!$" + +gText_PkmnFatigueConfusion:: @ 85CA69B + .string "{STRING 15} became\nconfused due to fatigue!$" + +gText_PkmnPickedUpItem:: @ 85CA6BE + .string "{STRING 35} picked up\nÂ¥{STRING 0}!\p$" + +gText_PkmnUnaffected:: @ 85CA6D1 + .string "{STRING 16} is\nunaffected!$" + +gText_PkmnTransformedInto:: @ 85CA6E3 + .string "{STRING 15} transformed\ninto {STRING 0}!$" + +gText_PkmnMadeSubstitute:: @ 85CA6FB + .string "{STRING 15} made\na SUBSTITUTE!$" + +gText_PkmnHasSubstitute:: @ 85CA711 + .string "{STRING 15} already\nhas a SUBSTITUTE!$" + +gText_SubstituteDamaged:: @ 85CA72E + .string "The SUBSTITUTE took damage\nfor {STRING 16}!\p$" + +gText_PkmnSubstituteFaded:: @ 85CA752 + .string "{STRING 16}’s\nSUBSTITUTE faded!\p$" + +gText_PkmnMustRecharge:: @ 85CA76A + .string "{STRING 15} must\nrecharge!$" + +gText_PkmnRageBuilding:: @ 85CA76C + .string "{STRING 16}’s RAGE\nis building!$" + +gText_PkmnMoveWasDisabled:: @ 85CA793 + .string "{STRING 16}’s {STRING 0}\nwas disabled!$" + +gText_PkmnMoveDisabledNoMore:: @ 85CA7A9 + .string "{STRING 15} is disabled\nno more!$" + +gText_PkmnGotEncore:: @ 85CA7C1 + .string "{STRING 16} got\nan ENCORE!$" + +gText_PkmnEncoreEnded:: @ 85CA7D3 + .string "{STRING 15}’s ENCORE\nended!$" + +gText_PkmnTookAim:: @ 85CA7E6 + .string "{STRING 15} took aim\nat {STRING 16}!$" + +gText_PkmnSketchedMove:: @ 85CA7F9 + .string "{STRING 15} SKETCHED\n{STRING 0}!$" + +gText_PkmnTryingToTakeFoe:: @ 85CA809 + .string "{STRING 15} is trying\nto take its foe with it!$" + +gText_PkmnTookFoe:: @ 85CA82F + .string "{STRING 16} took\n{STRING 15} with it!$" + +gText_PkmnReducedPP:: @ 85CA843 + .string "Reduced {STRING 16}’s\n{STRING 0} by {PLAYER}!$" + +gText_PkmnStoleItem:: @ 85CA85A + .string "{STRING 15} stole\n{STRING 16}’s {STRING 22}!$" + +gText_PkmnCantEscape:: @ 85CA86C + .string "{STRING 16} can’t\nescape now!$" + +gText_PkmnFellIntoNightmare:: @ 85CA881 + .string "{STRING 16} fell into\na NIGHTMARE!$" + +gText_PkmnLockedInNightmare:: @ 85CA89B + .string "{STRING 15} is locked\nin a NIGHTMARE!$" + +gText_PkmnLaidCurse:: @ 85CA8B8 + .string "{STRING 15} cut its own HP and\nlaid a CURSE on {STRING 16}!$" + +gText_PkmnAfflictedByCurse:: @ 85CA8E2 + .string "{STRING 15} is afflicted\nby the CURSE!$" + +gText_SpikesScattered:: @ 85CA900 + .string "SPIKES were scattered all around\nthe opponent’s side!$" + +gText_PkmnHurtBySpikes:: @ 85CA936 + .string "{STRING 19} is hurt\nby SPIKES!$" + +gText_PkmnIdentified:: @ 85CA94C + .string "{STRING 15} identified\n{STRING 16}!$" + +gText_PkmnPerishCountFell:: @ 85CA95E + .string "{STRING 15}’s PERISH count\nfell to {STRING 0}!$" + +gText_PkmnBracedItself:: @ 85CA97C + .string "{STRING 15} braced\nitself!$" + +gText_PkmnEnduredHit:: @ 85CA98E + .string "{STRING 16} ENDURED\nthe hit!$" + +gText_MagnitudeStrength:: @ 85CA9A2 + .string "MAGNITUDE {STRING 0}!$" + +gText_PkmnCutHPMaxedAttack:: @ 85CA9B0 + .string "{STRING 15} cut its own HP\nand maximized ATTACK!$" + +gText_PkmnCopiedStatChanges:: @ 85CA9D8 + .string "{STRING 15} copied\n{STRING 16}’s stat changes!$" + +gText_PkmnGotFree:: @ 85CA9F5 + .string "{STRING 15} got free of\n{STRING 16}’s {STRING 0}!$" + +gText_PkmnShedLeechSeed:: @ 85CAA0D + .string "{STRING 15} shed\nLEECH SEED!$" + +gText_PkmnBlewAwaySpikes:: @ 85CAA21 + .string "{STRING 15} blew away\nSPIKES!$" + +gText_PkmnFledFromBattle:: @ 85CAA36 + .string "{STRING 15} fled from\nbattle!$" + +gText_PkmnForesawAttack:: @ 85CAA4B + .string "{STRING 15} foresaw\nan attack!$" + +gText_PkmnTookAttack:: @ 85CAA61 + .string "{STRING 16} took the\n{STRING 0} attack!$" + +gText_PkmnChoseXAsDestiny:: @ 85CAA78 + .string "{STRING 15} chose\n{STRING 20} as its destiny!$" + +gText_PkmnAttack:: @ 85CAA94 + .string "{STRING 0}’s attack!$" + +gText_PkmnCenterAttention:: @ 85CAAA1 + .string "{STRING 15} became the\ncenter of attention!$" + +gText_PkmnChargingPower:: @ 85CAAC4 + .string "{STRING 15} began\ncharging power!$" + +gText_NaturePowerTurnedInto:: @ 85CAADD + .string "NATURE POWER turned into\n{STRING 20}!$" + +gText_PkmnStatusNormal:: @ 85CAAFA + .string "{STRING 15}’s status\nreturned to normal!$" + +gText_PkmnSubjectedToTorment:: @ 85CAB1A + .string "{STRING 16} was subjected\nto TORMENT!$" + +gText_PkmnTighteningFocus:: @ 85CAB37 + .string "{STRING 15} is tightening\nits focus!$" + +gText_PkmnFellForTaunt:: @ 85CAB53 + .string "{STRING 16} fell for\nthe TAUNT!$" + +gText_PkmnReadyToHelp:: @ 85CAB6A + .string "{STRING 15} is ready to\nhelp {STRING 16}!$" + +gText_PkmnSwitchedItems:: @ 85CAB82 + .string "{STRING 15} switched\nitems with its opponent!$" + +gText_PkmnObtainedX:: @ 85CABA7 + .string "{STRING 15} obtained\n{STRING 0}.$" + +gText_PkmnObtainedX2:: @ 85CABB7 + .string "{STRING 16} obtained\n{PLAYER}.$" + +gText_PkmnObtainedXYObtainedZ:: @ 85CABC7 + .string "{STRING 15} obtained\n{STRING 0}.\p{STRING 16} obtained\n{PLAYER}.$" + +gText_PkmnCopiedFoe:: @ 85CAB82 + .string "{STRING 15} copied\n{STRING 16}’s {STRING 25}!$" + +gText_PkmnMadeWish:: @ 85CABFA + .string "{STRING 15} made a WISH!$" + +gText_PkmnWishCameTrue:: @ 85CAC0A + .string "{STRING 0}’s WISH\ncame true!$" + +gText_PkmnPlantedRoots:: @ 85CAC1F + .string "{STRING 15} planted its roots!$" + +gText_PkmnAbsorbedNutrients:: @ 85CAC35 + .string "{STRING 15} absorbed\nnutrients with its roots!$" + +gText_PkmnAnchoredItself:: @ 85CAC5B + .string "{STRING 16} anchored\nitself with its roots!$" + +gText_PkmnWasMadeDrowsy:: @ 85CAC7E + .string "{STRING 15} made\n{STRING 16} drowsy!$" + +gText_PkmnKnockedOff:: @ 85CAC91 + .string "{STRING 15} knocked off\n{STRING 16}’s {STRING 22}!$" + +gText_PkmnSwappedAbilities:: @ 85CACA9 + .string "{STRING 15} swapped abilities\nwith its opponent!$" + +gText_PkmnSealedOpponentMove:: @ 85CACD1 + .string "{STRING 15} sealed the\nopponent’s move(s)!$" + +gText_PkmnWantsGrudge:: @ 85CACF3 + .string "{STRING 15} wants the\nopponent to bear a GRUDGE!$" + +gText_PkmnLostPPGrudge:: @ 85CAD1B + .string "{STRING 15}’s {STRING 0} lost\nall its PP due to the GRUDGE!$" + +gText_PkmnShroudedItself:: @ 85CAD46 + .string "{STRING 15} shrouded\nitself in {STRING 20}!$" + +gText_PkmnMoveBounced:: @ 85CAD60 + .string "{STRING 15}’s {STRING 20}\nwas bounced back by MAGIC COAT!$" + +gText_PkmnWaitsForTarget:: @ 85CAD88 + .string "{STRING 15} waits for a target\nto make a move!$" + +gText_PkmnSnatchedMove:: @ 85CADAE + .string "{STRING 16} SNATCHED\n{STRING 19}’s move!$" + +gText_ElectricityWeakened:: @ 85CADC5 + .string "Electricity’s power was\nweakened!$" + +gText_FireWeakened:: @ 85CADE7 + .string "Fire’s power was\nweakened!$" + +gText_XFoundOneY:: @ 85CAE02 + .string "{STRING 15} found\none {STRING 22}!$" + +gText_SoothingAroma:: @ 85CAE13 + .string "A soothing aroma wafted\nthrough the area!$" + +gText_ItemsCantBeUsedNow:: @ 85CAE3D + .string "Items can’t be used now.{PAUSE 64}$" + +gText_ForXCommaYZ:: @ 85CAE59 + .string "For {STRING 19},\n{STRING 22} {STRING 0}$" + +gText_PkmnUsedXToGetPumped:: @ 85CAE67 + .string "{STRING 19} used\n{STRING 22} to get pumped!$" + +gText_PkmnLostFocus:: @ 85CAE81 + .string "{STRING 15} lost its\nfocus and couldn’t move!$" + +gText_PkmnWasDraggedOut:: @ 85CAEA6 + .string "{STRING 16} was\ndragged out!\p$" + +gText_TheWallShattered:: @ 85CAEBB + .string "The wall shattered!$" + +gText_ButNoEffect:: @ 85CAECF + .string "But it had no effect!$" + +gText_PkmnHasNoMovesLeft:: @ 85CAEE5 + .string "{STRING 18} has no\nmoves left!\p$" + +gText_PkmnMoveIsDisabled:: @ 85CAEFC + .string "{STRING 18}’s {STRING 20}\nis disabled!\p$" + +gText_PkmnCantUseMoveTorment:: @ 85CAF12 + .string "{STRING 18} can’t use the same\nmove in a row due to the TORMENT!\p$" + +gText_PkmnCantUseMoveTaunt:: @ 85CAF4B + .string "{STRING 18} can’t use\n{STRING 20} after the TAUNT!\p$" + +gText_PkmnCantUseMoveSealed:: @ 85CAF6D + .string "{STRING 18} can’t use the\nsealed {STRING 20}!\p$" + +gText_PkmnMadeItRain:: @ 85CAF8A + .string "{STRING 19}’s {STRING 26}\nmade it rain!$" + +gText_PkmnRaisedSpeed:: @ 85CAFA0 + .string "{STRING 19}’s {STRING 26}\nraised its SPEED!$" + +gText_PkmnProtectedBy:: @ 85CAFBA + .string "{STRING 16} was protected\nby {STRING 25}!$" + +gText_PkmnPreventsUsage:: @ 85CAFD2 + .string "{STRING 16}’s {STRING 25}\nprevents {STRING 15}\lfrom using {STRING 20}!$" + +gText_PkmnRestoredHPUsing:: @ 85CAFF5 + .string "{STRING 16} restored HP\nusing its {STRING 25}!$" + +gText_PkmnsXMadeYUseless:: @ 85CB012 + .string "{STRING 16}’s {STRING 25}\nmade {STRING 20} useless!$" + +gText_PkmnChangedTypeWith:: @ 85CB02B + .string "{STRING 16}’s {STRING 25}\nmade it the {STRING 0} type!$" + +gText_PkmnPreventsParalysisWith:: @ 85CB048 + .string "{STRING 17}’s {STRING 25}\nprevents paralysis!$" + +gText_PkmnPreventsRomanceWith:: @ 85CB064 + .string "{STRING 16}’s {STRING 25}\nprevents romance!$" + +gText_PkmnPreventsPoisoningWith:: @ 85CB07E + .string "{STRING 17}’s {STRING 25}\nprevents poisoning!$" + +gText_PkmnPreventsConfusionWith:: @ 85CB09A + .string "{STRING 16}’s {STRING 25}\nprevents confusion!$" + +gText_PkmnRaisedFirePowerWith:: @ 85CB0B6 + .string "{STRING 16}’s {STRING 25}\nraised its FIRE power!$" + +gText_PkmnAnchorsItselfWith:: @ 85CB0D5 + .string "{STRING 16} anchors\nitself with {STRING 25}!$" + +gText_PkmnCutsAttackWith:: @ 85CB0F0 + .string "{STRING 19}’s {STRING 26}\ncuts {STRING 16}’s ATTACK!$" + +gText_PkmnPreventsStatLossWith:: @ 85CB10A + .string "{STRING 19}’s {STRING 26}\nprevents stat loss!$" + +gText_PkmnHurtsWith:: @ 85CB126 + .string "{STRING 16}’s {STRING 25}\nhurt {STRING 15}!$" + +gText_PkmnTraced:: @ 85CB137 + .string "{STRING 19} TRACED\n{STRING 0}’s {PLAYER}!$" + +gText_PkmnsXPreventsBurns:: @ 85CB14A + .string "{STRING 17}’s {STRING 27}\nprevents burns!$" + +gText_PkmnsXBlocksY:: @ 85CB162 + .string "{STRING 16}’s {STRING 25}\nblocks {STRING 20}!$" + +gText_PkmnsXBlocksY2:: @ 85CB175 + .string "{STRING 19}’s {STRING 26}\nblocks {STRING 20}!$" + +gText_PkmnsXRestoredHPALittle2:: @ 85CB188 + .string "{STRING 15}’s {STRING 24}\nrestored its HP a little!$" + +gText_PkmnsXWhippedUpSandstorm:: @ 85CB1AA + .string "{STRING 19}’s {STRING 26}\nwhipped up a sandstorm!$" + +gText_PkmnsXIntensifiedSun:: @ 85CB1CA + .string "{STRING 19}’s {STRING 26}\nintensified the sun’s rays!$" + +gText_PkmnsXPreventsYLoss:: @ 85CB1EE + .string "{STRING 19}’s {STRING 26}\nprevents {STRING 0} loss!$" + +gText_PkmnsXInfatuatedY:: @ 85CB208 + .string "{STRING 16}’s {STRING 25}\ninfatuated {STRING 15}!$" + +gText_PkmnsXMadeYIneffective:: @ 85CB21F + .string "{STRING 16}’s {STRING 25}\nmade {STRING 20} ineffective!$" + +gText_PkmnsXCuredYProblem:: @ 85CB23C + .string "{STRING 19}’s {STRING 26}\ncured its {STRING 0} problem!$" + +gText_ItSuckedLiquidOoze:: @ 85CB25A + .string "It sucked up the\nLIQUID OOZE!$" + +gText_PkmnTransformed:: @ 85CB278 + .string "{STRING 19} transformed!$" + +gText_PkmnsXTookAttack:: @ 85CB288 + .string "{STRING 16}’s {STRING 25}\ntook the attack!$" + +gText_PkmnsXPreventsSwitching:: @ 85CB2A1 + .string "{STRING 0}’s {STRING 23}\nprevents switching!\p$" + +gText_PreventedFromWorking:: @ 85CB2BE + .string "{STRING 16}’s {STRING 25}\nprevented {STRING 19}’s\l{STRING 0} from working!$" + +gText_PkmnsXMadeItIneffective:: @ 85CB2E6 + .string "{STRING 19}’s {STRING 26}\nmade it ineffective!$" + +gText_PkmnsXPreventsFlinching:: @ 85CB303 + .string "{STRING 17}’s {STRING 27}\nprevents flinching!$" + +gText_PkmnsXPreventsYsZ:: @ 85CB31F + .string "{STRING 15}’s {STRING 24}\nprevents {STRING 16}’s\l{STRING 25} from working!$" + +gText_PkmnsXCuredItsYProblem:: @ 85CB346 + .string "{STRING 19}’s {STRING 26}\ncured its {STRING 0} problem!$" + +gText_PkmnsXHadNoEffectOnY:: @ 85CB364 + .string "{STRING 19}’s {STRING 26}\nhad no effect on {STRING 17}!$" + +gText_StatSharply:: @ 85CB381 + .string "sharply $" + +gText_StatRose:: @ 85CB38A + .string "rose!$" + +gText_StatHarshly:: @ 85CB390 + .string "harshly $" + +gText_StatFell:: @ 85CB399 + .string "fell!$" + +gText_PkmnsStatChanged:: @ 85CB39F + .string "{STRING 15}’s {STRING 0}\n{PLAYER}$" + +gText_PkmnsStatChanged2:: @ 85CB3AA + .string "{STRING 16}’s {STRING 0}\n{PLAYER}$" + +gText_UsingXTheYOfZN:: @ 85CB3B5 + .string "Using {STRING 22}, the {STRING 0}\nof {STRING 19} {PLAYER}$" + +gText_PkmnsStatChanged3:: @ 85CB3CF + .string "{STRING 15}’s {STRING 0}\n{PLAYER}$" + +gText_PkmnsStatChanged4:: @ 85CB3DA + .string "{STRING 16}’s {STRING 0}\n{PLAYER}$" + +gText_StatsWontIncrease2:: @ 85CB3E5 + .string "{STRING 15}’s stats won’t\ngo any higher!$" + +gText_StatsWontDecrease2:: @ 85CB405 + .string "{STRING 16}’s stats won’t\ngo any lower!$" + +gText_CriticalHit:: @ 85CB424 + .string "A critical hit!$" + +gText_OneHitKO:: @ 85CB434 + .string "It’s a one-hit KO!$" + +gText_123Poof:: @ 85CB447 + .string "{PAUSE 32}1, {PAUSE 15}2, and{PAUSE 15}… {PAUSE 15}… {PAUSE 15}… {PAUSE 15}{PLAY_SE 0x0038}Poof!\p$" + +gText_AndEllipsis:: @ 85CB473 + .string "And…\p$" + +gText_HMMovesCantBeForgotten:: @ 85CB479 + .string "HM moves can’t be\nforgotten now.\p$" + +gText_NotVeryEffective:: @ 85CB49B + .string "It’s not very effective…$" + +gText_SuperEffective:: @ 85CB4B4 + .string "It’s super effective!$" + +gText_GotAwaySafely:: @ 85CB4CA + .string "{PLAY_SE 0x0011}Got away safely!\p$" + +gText_PkmnFledUsingIts:: @ 85CB4E0 + .string "{PLAY_SE 0x0011}{STRING 15} fled\nusing its {STRING 22}!\p$" + +gText_PkmnFledUsing:: @ 85CB4FB + .string "{PLAY_SE 0x0011}{STRING 15} fled\nusing {STRING 24}!\p$" + +gText_WildPkmnFled:: @ 85CB512 + .string "{PLAY_SE 0x0011}Wild {STRING 0} fled!$" gUnknown_085CB524:: @ 85CB524 - -.string "Player defeated\n{STRING 32}!$" + .string "Player defeated\n{STRING 32}!$" gUnknown_085CB538:: @ 85CB538 - -.string "Player beat {STRING 32}\nand {STRING 33}!$" + .string "Player beat {STRING 32}\nand {STRING 33}!$" gUnknown_085CB54F:: @ 85CB54F - -.string "Player lost against\n{STRING 32}!$" + .string "Player lost against\n{STRING 32}!$" gUnknown_085CB567:: @ 85CB567 - -.string "Player lost to {STRING 32}\nand {STRING 33}!$" + .string "Player lost to {STRING 32}\nand {STRING 33}!$" gUnknown_085CB581:: @ 85CB581 - -.string "Player battled to a draw against\n{STRING 32}!$" + .string "Player battled to a draw against\n{STRING 32}!$" gUnknown_085CB5A6:: @ 85CB5A6 - -.string "Player battled to a draw against\n{STRING 32} and {STRING 33}!$" + .string "Player battled to a draw against\n{STRING 32} and {STRING 33}!$" gUnknown_085CB5D2:: @ 85CB5D2 - -.string "{PLAY_SE 0x0011}{STRING 32} fled!$" + .string "{PLAY_SE 0x0011}{STRING 32} fled!$" gUnknown_085CB5DF:: @ 85CB5DF + .string "{PLAY_SE 0x0011}{STRING 32} and\n{STRING 33} fled!$" -.string "{PLAY_SE 0x0011}{STRING 32} and\n{STRING 33} fled!$" -.string "No! There’s no running\nfrom a TRAINER battle!\p$" -.string "Can’t escape!\p$" -.string "PROF. BIRCH: Don’t leave me like this!\p$" -.string "But nothing happened!$" -.string "But it failed!$" -.string "It hurt itself in its\nconfusion!$" -.string "The MIRROR MOVE failed!$" -.string "It started to rain!$" -.string "A downpour started!$" -.string "Rain continues to fall.$" -.string "The downpour continues.$" -.string "The rain stopped.$" -.string "A sandstorm brewed!$" -.string "The sandstorm rages.$" -.string "The sandstorm subsided.$" -.string "The sunlight got bright!$" -.string "The sunlight is strong.$" -.string "The sunlight faded.$" -.string "It started to hail!$" -.string "Hail continues to fall.$" -.string "The hail stopped.$" -.string "But it failed to SPIT UP\na thing!$" -.string "But it failed to SWALLOW\na thing!$" -.string "The wind turned into a\nHEAT WAVE!$" -.string "All stat changes were\neliminated!$" -.string "Coins scattered everywhere!$" -.string "It was too weak to make\na SUBSTITUTE!$" -.string "The battlers shared\ntheir pain!$" -.string "A bell chimed!$" -.string "All affected POKéMON will\nfaint in three turns!$" -.string "There’s no PP left for\nthis move!\p$" -.string "But there was no PP left\nfor the move!$" -.string "{STRING 15} ignored\norders while asleep!$" -.string "{STRING 15} ignored\norders!$" -.string "{STRING 15} began to nap!$" -.string "{STRING 15} is\nloafing around!$" -.string "{STRING 15} won’t\nobey!$" -.string "{STRING 15} turned away!$" -.string "{STRING 15} pretended\nnot to notice!$" -.string "{STRING 28} {STRING 29} is\nabout to use {PLAYER}.\pWill {STRING 35} change\nPOKéMON?$" -.string "{STRING 15} learned\n{STRING 0}!$" +gText_NoRunningFromTrainers:: @ 85CB5F3 + .string "No! There’s no running\nfrom a TRAINER battle!\p$" -gUnknown_085CBA2E:: @ 85CBA2E +gText_CantEscape:: @ 85CB622 + .string "Can’t escape!\p$" -.string "Player defeated\n{STRING 28} {STRING 29}!\p$" -.string "{STRING 35} crept closer to\n{RIVAL}!$" -.string "{STRING 35} can’t get any closer!$" -.string "{RIVAL} is watching\ncarefully!$" -.string "{RIVAL} is curious about\nthe {STRING 0}!$" -.string "{RIVAL} is enthralled by\nthe {STRING 0}!$" -.string "{RIVAL} completely ignored\nthe {STRING 0}!$" -.string "{STRING 35} threw a {POKEBLOCK}\nat the {RIVAL}!$" -.string "{PLAY_SE 0x0049}ANNOUNCER: You’re out of\nSAFARI BALLS! Game over!\p$" -.string "{RIVAL} appeared!\p$" +gText_DontLeaveBirch:: @ 85CB631 + .string "PROF. BIRCH: Don’t leave me like this!\p$" + +gText_ButNothingHappened:: @ 85CB659 + .string "But nothing happened!$" + +gText_ButItFailed:: @ 85CB66F + .string "But it failed!$" + +gText_ItHurtConfusion:: @ 85CB67E + .string "It hurt itself in its\nconfusion!$" + +gText_MirrorMoveFailed:: @ 85CB69F + .string "The MIRROR MOVE failed!$" + +gText_StartedToRain:: @ 85CB6B7 + .string "It started to rain!$" + +gText_DownpourStarted:: @ 85CB6CB + .string "A downpour started!$" + +gText_RainContinues:: @ 85CB6DF + .string "Rain continues to fall.$" + +gText_DownpourContinues:: @ 85CB6F7 + .string "The downpour continues.$" + +gText_RainStopped:: @ 85CB70F + .string "The rain stopped.$" + +gText_SandstormBrewed:: @ 85CB721 + .string "A sandstorm brewed!$" + +gText_SandstormRages:: @ 85CB735 + .string "The sandstorm rages.$" + +gText_SandstormSubsided:: @ 85CB74A + .string "The sandstorm subsided.$" + +gText_SunlightGotBright:: @ 85CB762 + .string "The sunlight got bright!$" + +gText_SunlightStrong:: @ 85CB77B + .string "The sunlight is strong.$" + +gText_SunlightFaded:: @ 85CB793 + .string "The sunlight faded.$" + +gText_StartedHail:: @ 85CB7A7 + .string "It started to hail!$" + +gText_HailContinues:: @ 85CB7BB + .string "Hail continues to fall.$" + +gText_HailStopped:: @ 85CB7D3 + .string "The hail stopped.$" + +gText_FailedToSpitUp:: @ 85CB7E5 + .string "But it failed to SPIT UP\na thing!$" + +gText_FailedToSwallow:: @ 85CB807 + .string "But it failed to SWALLOW\na thing!$" + +gText_WindBecameHeatWave:: @ 85CB829 + .string "The wind turned into a\nHEAT WAVE!$" + +gText_StatChangesGone:: @ 85CB84B + .string "All stat changes were\neliminated!$" + +gText_CoinsScattered:: @ 85CB86D + .string "Coins scattered everywhere!$" + +gText_TooWeakForSubstitute:: @ 85CB889 + .string "It was too weak to make\na SUBSTITUTE!$" + +gText_SharedPain:: @ 85CB8AF + .string "The battlers shared\ntheir pain!$" + +gText_BellChimed:: @ 85CB8CF + .string "A bell chimed!$" + +gText_FaintInThree:: @ 85CB8DE + .string "All affected POKéMON will\nfaint in three turns!$" + +gText_NoPPLeft:: @ 85CB90E + .string "There’s no PP left for\nthis move!\p$" + +gText_ButNoPPLeft:: @ 85CB931 + .string "But there was no PP left\nfor the move!$" + +gText_PkmnIgnoresAsleep:: @ 85CB958 + .string "{STRING 15} ignored\norders while asleep!$" + +gText_PkmnIgnoredOrders:: @ 85CB978 + .string "{STRING 15} ignored\norders!$" + +gText_PkmnBeganToNap:: @ 85CB98B + .string "{STRING 15} began to nap!$" + +gText_PkmnLoafing:: @ 85CB99C + .string "{STRING 15} is\nloafing around!$" + +gText_PkmnWontObey:: @ 85CB9B2 + .string "{STRING 15} won’t\nobey!$" + +gText_PkmnTurnedAway:: @ 85CB9C1 + .string "{STRING 15} turned away!$" + +gText_PkmnPretendNotNotice:: @ 85CB9D1 + .string "{STRING 15} pretended\nnot to notice!$" + +gText_EnemyAboutToSwitchPkmn:: @ 85CB9ED + .string "{STRING 28} {STRING 29} is\nabout to use {PLAYER}.\pWill {STRING 35} change\nPOKéMON?$" + +gText_PkmnLearnedMove2:: @ 85CBA1F + .string "{STRING 15} learned\n{STRING 0}!$" + +gText_PlayerDefeatedXY:: @ 85CBA2E + .string "Player defeated\n{STRING 28} {STRING 29}!\p$" + +gText_CreptCloser:: @ 85CBA46 + .string "{STRING 35} crept closer to\n{RIVAL}!$" + +gText_CantGetCloser:: @ 85CBA5D + .string "{STRING 35} can’t get any closer!$" + +gText_PkmnWatchingCarefully:: @ 85CBA76 + .string "{RIVAL} is watching\ncarefully!$" + +gText_PkmnCuriousAboutX:: @ 85CBA90 + .string "{RIVAL} is curious about\nthe {STRING 0}!$" + +gText_PkmnEnthralledByX:: @ 85CBAAC + .string "{RIVAL} is enthralled by\nthe {STRING 0}!$" + +gText_PkmnIgnoredX:: @ 85CBAC8 + .string "{RIVAL} completely ignored\nthe {STRING 0}!$" + +gText_ThrewPokeblockAtPkmn:: @ 85CBAE6 + .string "{STRING 35} threw a {POKEBLOCK}\nat the {RIVAL}!$" + +gText_OutOfSafariBalls:: @ 85CBB02 + .string "{PLAY_SE 0x0049}ANNOUNCER: You’re out of\nSAFARI BALLS! Game over!\p$" + + .string "{RIVAL} appeared!\p$" gUnknown_085CBB47:: @ 85CBB47 - -.string "Wild {RIVAL} appeared!\p$" + .string "Wild {RIVAL} appeared!\p$" gUnknown_085CBB5A:: @ 85CBB5A - -.string "Wild {RIVAL} appeared!\p$" + .string "Wild {RIVAL} appeared!\p$" gUnknown_085CBB6D:: @ 85CBB6D - -.string "Wild {RIVAL} appeared!{PAUSE 127}$" + .string "Wild {RIVAL} appeared!{PAUSE 127}$" gUnknown_085CBB82:: @ 85CBB82 - -.string "Wild {RIVAL} and\n{AQUA} appeared!\p$" + .string "Wild {RIVAL} and\n{AQUA} appeared!\p$" gUnknown_085CBB9C:: @ 85CBB9C - -.string "{STRING 28} {STRING 29}\nwould like to battle!\p$" + .string "{STRING 28} {STRING 29}\nwould like to battle!\p$" gUnknown_085CBBB9:: @ 85CBBB9 - -.string "{STRING 32}\nwants to battle!$" + .string "{STRING 32}\nwants to battle!$" gUnknown_085CBBCD:: @ 85CBBCD - -.string "{STRING 32} and {STRING 33}\nwant to battle!$" + .string "{STRING 32} and {STRING 33}\nwant to battle!$" gUnknown_085CBBE7:: @ 85CBBE7 - -.string "{STRING 28} {STRING 29} sent\nout {RIVAL}!$" + .string "{STRING 28} {STRING 29} sent\nout {RIVAL}!$" gUnknown_085CBBFA:: @ 85CBBFA - -.string "{STRING 28} {STRING 29} sent\nout {RIVAL} and {AQUA}!$" + .string "{STRING 28} {STRING 29} sent\nout {RIVAL} and {AQUA}!$" gUnknown_085CBC14:: @ 85CBC14 - -.string "{STRING 28} {STRING 29} sent\nout {STRING 0}!$" + .string "{STRING 28} {STRING 29} sent\nout {STRING 0}!$" gUnknown_085CBC27:: @ 85CBC27 - -.string "{STRING 32} sent out\n{RIVAL}!$" + .string "{STRING 32} sent out\n{RIVAL}!$" gUnknown_085CBC37:: @ 85CBC37 - -.string "{STRING 32} sent out\n{RIVAL} and {AQUA}!$" + .string "{STRING 32} sent out\n{RIVAL} and {AQUA}!$" gUnknown_085CBC4E:: @ 85CBC4E - -.string "{STRING 32} sent out {STRING 10}!\n{STRING 33} sent out {STRING 12}!$" + .string "{STRING 32} sent out {STRING 10}!\n{STRING 33} sent out {STRING 12}!$" gUnknown_085CBC6E:: @ 85CBC6E - -.string "{STRING 32} sent out\n{STRING 0}!$" + .string "{STRING 32} sent out\n{STRING 0}!$" gUnknown_085CBC7E:: @ 85CBC7E - -.string "{STRING 34} sent out\n{STRING 0}!$" + .string "{STRING 34} sent out\n{STRING 0}!$" gUnknown_085CBC8E:: @ 85CBC8E - -.string "Go! {STRING 5}!$" + .string "Go! {STRING 5}!$" gUnknown_085CBC96:: @ 85CBC96 - -.string "Go! {STRING 5} and\n{VERSION}!$" + .string "Go! {STRING 5} and\n{VERSION}!$" gUnknown_085CBCA5:: @ 85CBCA5 - -.string "Go! {STRING 0}!$" + .string "Go! {STRING 0}!$" gUnknown_085CBCAD:: @ 85CBCAD - -.string "Do it! {STRING 0}!$" + .string "Do it! {STRING 0}!$" gUnknown_085CBCB8:: @ 85CBCB8 - -.string "Go for it, {STRING 0}!$" + .string "Go for it, {STRING 0}!$" gUnknown_085CBCC7:: @ 85CBCC7 - -.string "Your foe’s weak!\nGet ’em, {STRING 0}!$" + .string "Your foe’s weak!\nGet ’em, {STRING 0}!$" gUnknown_085CBCE5:: @ 85CBCE5 - -.string "{STRING 31} sent out {STRING 11}!\nGo! {STRING 9}!$" + .string "{STRING 31} sent out {STRING 11}!\nGo! {STRING 9}!$" gUnknown_085CBCFD:: @ 85CBCFD - -.string "{STRING 0}, that’s enough!\nCome back!$" + .string "{STRING 0}, that’s enough!\nCome back!$" gUnknown_085CBD1B:: @ 85CBD1B - -.string "{STRING 0}, come back!$" + .string "{STRING 0}, come back!$" gUnknown_085CBD2A:: @ 85CBD2A - -.string "{STRING 0}, OK!\nCome back!$" + .string "{STRING 0}, OK!\nCome back!$" gUnknown_085CBD3D:: @ 85CBD3D - -.string "{STRING 0}, good!\nCome back!$" + .string "{STRING 0}, good!\nCome back!$" gUnknown_085CBD52:: @ 85CBD52 - -.string "{STRING 28} {STRING 29}\nwithdrew {STRING 0}!$" + .string "{STRING 28} {STRING 29}\nwithdrew {STRING 0}!$" gUnknown_085CBD65:: @ 85CBD65 - -.string "{STRING 32} withdrew\n{STRING 0}!$" + .string "{STRING 32} withdrew\n{STRING 0}!$" gUnknown_085CBD75:: @ 85CBD75 - -.string "{STRING 34} withdrew\n{STRING 0}!$" + .string "{STRING 34} withdrew\n{STRING 0}!$" gUnknown_085CBD85:: @ 85CBD85 - -.string "Wild $" + .string "Wild $" gUnknown_085CBD8B:: @ 85CBD8B + .string "Foe $" -.string "Foe $" -.string "$" + .string "$" gUnknown_085CBD91:: @ 85CBD91 - -.string "Foe$" + .string "Foe$" gUnknown_085CBD95:: @ 85CBD95 - -.string "Ally$" + .string "Ally$" gUnknown_085CBD9A:: @ 85CBD9A - -.string "Foe$" + .string "Foe$" gUnknown_085CBD9E:: @ 85CBD9E - -.string "Ally$" + .string "Ally$" gUnknown_085CBDA3:: @ 85CBDA3 - -.string "Foe$" + .string "Foe$" gUnknown_085CBDA7:: @ 85CBDA7 - -.string "Ally$" + .string "Ally$" gUnknown_085CBDAC:: @ 85CBDAC - -.string "{STRING 15} used\n{PLAYER}$" + .string "{STRING 15} used\n{PLAYER}$" gUnknown_085CBDB7:: @ 85CBDB7 - -.string "!$" + .string "!$" gUnknown_085CBDB9:: @ 85CBDB9 - -.string "!$" + .string "!$" gUnknown_085CBDBB:: @ 85CBDBB - -.string "!$" + .string "!$" gUnknown_085CBDBD:: @ 85CBDBD - -.string "!$" + .string "!$" gUnknown_085CBDBF:: @ 85CBDBF - .incbin "baserom.gba", 0x5cbdbf, 0x41 + .string "!$" +gUnknown_085CBDC1:: @ 85CBDC1 + .string "HP$" + +gUnknown_085CBDC4:: @ 85CBDC4 + .string "ATTACK$" + +gUnknown_085CBDCB:: @ 85CBDCB + .string "DEFENSE$" + +gUnknown_085CBDD3:: @ 85CBDD3 + .string "SPEED$" + +gUnknown_085CBDD9:: @ 85CBDD9 + .string "SP. ATK$" + +gUnknown_085CBDE1:: @ 85CBDE1 + .string "SP. DEF$" + +gUnknown_085CBDE9:: @ 85CBDE9 + .string "accuracy$" + +gUnknown_085CBDF2:: @ 85CBDF2 + .string "evasiveness$" + + .align 2 gStatNamesTable:: @ 85CBE00 - .incbin "baserom.gba", 0x5cbe00, 0x6c + .4byte gUnknown_085CBDC1 + .4byte gUnknown_085CBDC4 + .4byte gUnknown_085CBDCB + .4byte gUnknown_085CBDD3 + .4byte gUnknown_085CBDD9 + .4byte gUnknown_085CBDE1 + .4byte gUnknown_085CBDE9 + .4byte gUnknown_085CBDF2 +gUnknown_085CBE20:: @ 85CBE20 + .string "was too spicy!$" + +gUnknown_085CBE2F:: @ 85CBE2F + .string "was too dry!$" + +gUnknown_085CBE3C:: @ 85CBE3C + .string "was too sweet!$" + +gUnknown_085CBE4B:: @ 85CBE4B + .string "was too bitter!$" + +gUnknown_085CBE5B:: @ 85CBE5B + .string "was too sour!$" + + .align 2 gUnknown_085CBE6C:: @ 85CBE6C - .incbin "baserom.gba", 0x5cbe6c, 0x1a9 - -gUnknown_085CC015:: @ 85CC015 + .4byte gUnknown_085CBE20 + .4byte gUnknown_085CBE2F + .4byte gUnknown_085CBE3C + .4byte gUnknown_085CBE4B + .4byte gUnknown_085CBE5B -.string "someone’s$" +gText_XUsedY:: @ 85CBE80 + .string "{STRING 35} used\n{STRING 22}!$" + +gText_WallyUsedY:: @ 85CBE8C + .string "WALLY used\n{STRING 22}!$" + +gText_XYUsedZ:: @ 85CBE9B + .string "{STRING 28} {STRING 29}\nused {STRING 22}!$" + +gText_TrainerBlockedBall:: @ 85CBEAA + .string "The TRAINER blocked the BALL!$" + +gText_DontBeAThief:: @ 85CBEC8 + .string "Don’t be a thief!$" + +gText_ItDodgedBall:: @ 85CBEDA + .string "It dodged the thrown BALL!\nThis POKéMON can’t be caught!$" + +gText_YouMissedPkmn:: @ 85CBF13 + .string "You missed the POKéMON!$" + +gText_PkmnBrokeFree:: @ 85CBF2B + .string "Oh, no!\nThe POKéMON broke free!$" + +gText_ItAppearedCaught:: @ 85CBF4B + .string "Aww!\nIt appeared to be caught!$" + +gText_AarghAlmostHadIt:: @ 85CBF6A + .string "Aargh!\nAlmost had it!$" + +gText_ShootSoClose:: @ 85CBF80 + .string "Shoot!\nIt was so close, too!$" + +gText_GotchaPkmnCaught:: @ 85CBF9D + .string "Gotcha!\n{RIVAL} was caught!{UNKNOWN_A}{PLAY_BGM BGM_KACHI22}\p$" + +gText_GotchaPkmnCaught2:: @ 85CBFBB + .string "Gotcha!\n{RIVAL} was caught!{UNKNOWN_A}{PLAY_BGM BGM_KACHI22}{PAUSE 127}$" + +gText_GiveNicknameCaptured:: @ 85CBFDB + .string "Give a nickname to the\ncaptured {RIVAL}?$" + +gText_PkmnSentToPC:: @ 85CBFFF + .string "{RIVAL} was sent to\n{STRING 39} PC.$" + +gUnknown_085CC015:: @ 85CC015 + .string "someone’s$" gUnknown_085CC01F:: @ 85CC01F + .string "LANETTE’s$" -.string "LANETTE’s$" -.string "{RIVAL}’s data was\nadded to the POKéDEX.\p$" -.string "It is raining.$" -.string "A sandstorm is raging.$" -.string "The BOX is full!\nYou can’t catch any more!\p$" +gText_PkmnDataAddedToDex:: @ 85CC029 + .string "{RIVAL}’s data was\nadded to the POKéDEX.\p$" + +gText_ItIsRaining:: @ 85CC04E + .string "It is raining.$" + +gText_SandstormIsRaging:: @ 85CC05D + .string "A sandstorm is raging.$" + +gText_BoxIsFull:: @ 85CC074 + .string "The BOX is full!\nYou can’t catch any more!\p$" gUnknown_085CC0A0:: @ 85CC0A0 - -.string "ENIGMA BERRY$" + .string "ENIGMA BERRY$" gUnknown_085CC0AD:: @ 85CC0AD + .string " BERRY$" -.string " BERRY$" -.string "{STRING 19}’s {STRING 22}\ncured paralysis!$" -.string "{STRING 19}’s {STRING 22}\ncured poison!$" -.string "{STRING 19}’s {STRING 22}\nhealed its burn!$" -.string "{STRING 19}’s {STRING 22}\ndefrosted it!$" -.string "{STRING 19}’s {STRING 22}\nwoke it from its sleep!$" -.string "{STRING 19}’s {STRING 22}\nsnapped it out of confusion!$" -.string "{STRING 19}’s {STRING 22}\ncured its {STRING 0} problem!$" -.string "{STRING 19}’s {STRING 22}\nnormalized its status!$" -.string "{STRING 19}’s {STRING 22}\nrestored health!$" -.string "{STRING 19}’s {STRING 22}\nrestored {STRING 0}’s PP!$" -.string "{STRING 19}’s {STRING 22}\nrestored its status!$" -.string "{STRING 19}’s {STRING 22}\nrestored its HP a little!$" -.string "{STRING 22} allows the\nuse of only {STRING 20}!\p$" -.string "{STRING 16} hung on\nusing its {STRING 22}!$" +gText_PkmnsXCuredParalysis:: @ 85CC0B4 + .string "{STRING 19}’s {STRING 22}\ncured paralysis!$" -gUnknown_085CC23E:: @ 85CC23E +gText_PkmnsXCuredPoison:: @ 85CC0CD + .string "{STRING 19}’s {STRING 22}\ncured poison!$" -.string "$" -.string "You throw a BALL now, right?\nI‥ I’ll do my best!$" +gText_PkmnsXHealedBurn:: @ 85CC0E3 + .string "{STRING 19}’s {STRING 22}\nhealed its burn!$" +gText_PkmnsXDefrostedIt:: @ 85CC0FC + .string "{STRING 19}’s {STRING 22}\ndefrosted it!$" + +gText_PkmnsXWokeIt:: @ 85CC112 + .string "{STRING 19}’s {STRING 22}\nwoke it from its sleep!$" + +gText_PkmnsXSnappedOut:: @ 85CC132 + .string "{STRING 19}’s {STRING 22}\nsnapped it out of confusion!$" + +gText_PkmnsXCuredProblem:: @ 85CC157 + .string "{STRING 19}’s {STRING 22}\ncured its {STRING 0} problem!$" + +gText_PkmnsXNormalizedStatus:: @ 85CC175 + .string "{STRING 19}’s {STRING 22}\nnormalized its status!$" + +gText_PkmnsXRestoredHealth:: @ 85CC194 + .string "{STRING 19}’s {STRING 22}\nrestored health!$" + +gText_PkmnsXRestoredPP:: @ 85CC1AD + .string "{STRING 19}’s {STRING 22}\nrestored {STRING 0}’s PP!$" + +gText_PkmnsXRestoredStatus:: @ 85CC1C7 + .string "{STRING 19}’s {STRING 22}\nrestored its status!$" + +gText_PkmnsXRestoredHPALittle:: @ 85CC1E4 + .string "{STRING 19}’s {STRING 22}\nrestored its HP a little!$" + +gText_XAllowsOnlyY:: @ 85CC206 + .string "{STRING 22} allows the\nuse of only {STRING 20}!\p$" + +gText_PkmnHungOnWithX:: @ 85CC225 + .string "{STRING 16} hung on\nusing its {STRING 22}!$" + +gText_EmptyString3:: @ 85CC23E + .string "$" + +gText_YouThrowABallNowRight:: @ 85CC23F + .string "You throw a BALL now, right?\nI… I’ll do my best!$" + + .align 2 gUnknown_085CC270:: @ 85CC270 - .incbin "baserom.gba", 0x5cc270, 0x5c4 + .4byte gText_Buffer36 + .4byte gText_PkmnGainedEXP + .4byte gText_PkmnGrewToLv + .4byte gText_PkmnLearnedMove + .4byte gText_TryToLearnMove1 + .4byte gText_TryToLearnMove2 + .4byte gText_TryToLearnMove3 + .4byte gText_PkmnForgotMove + .4byte gText_StopLearningMove + .4byte gText_DidNotLearnMove + .4byte gText_PkmnLearnedMove2 + .4byte gText_AttackMissed + .4byte gText_PkmnProtectedItself + .4byte gText_StatsWontIncrease2 + .4byte gText_AvoidedDamage + .4byte gText_ItDoesntAffect + .4byte gText_PkmnFainted + .4byte gText_PkmnFainted2 + .4byte gText_PlayerGotMoney + .4byte gText_PlayerWhiteout + .4byte gText_PlayerWhiteout2 + .4byte gText_PreventsEscape + .4byte gText_HitXTimes + .4byte gText_PkmnFellAsleep + .4byte gText_PkmnMadeSleep + .4byte gText_PkmnAlreadyAsleep + .4byte gText_PkmnAlreadyAsleep2 + .4byte gText_PkmnWasntAffected + .4byte gText_PkmnWasPoisoned + .4byte gText_PkmnPoisonedBy + .4byte gText_PkmnHurtByPoison + .4byte gText_PkmnAlreadyPoisoned + .4byte gText_PkmnBadlyPoisoned + .4byte gText_PkmnEnergyDrained + .4byte gText_PkmnWasBurned + .4byte gText_PkmnBurnedBy + .4byte gText_PkmnHurtByBurn + .4byte gText_PkmnWasFrozen + .4byte gText_PkmnFrozenBy + .4byte gText_PkmnIsFrozen + .4byte gText_PkmnWasDefrosted + .4byte gText_PkmnWasDefrosted2 + .4byte gText_PkmnWasDefrostedBy + .4byte gText_PkmnWasParalyzed + .4byte gText_PkmnWasParalyzedBy + .4byte gText_PkmnIsParalyzed + .4byte gText_PkmnIsAlreadyParalyzed + .4byte gText_PkmnHealedParalysis + .4byte gText_PkmnDreamEaten + .4byte gText_StatsWontIncrease + .4byte gText_StatsWontDecrease + .4byte gText_TeamStoppedWorking + .4byte gText_FoeStoppedWorking + .4byte gText_PkmnIsConfused + .4byte gText_PkmnHealedConfusion + .4byte gText_PkmnWasConfused + .4byte gText_PkmnAlreadyConfused + .4byte gText_PkmnFellInLove + .4byte gText_PkmnInLove + .4byte gText_PkmnImmobilizedByLove + .4byte gText_PkmnBlownAway + .4byte gText_PkmnChangedType + .4byte gText_PkmnFlinched + .4byte gText_PkmnRegainedHealth + .4byte gText_PkmnHPFull + .4byte gText_PkmnRaisedSpDef + .4byte gText_PkmnRaisedDef + .4byte gText_PkmnCoveredByVeil + .4byte gText_PkmnUsedSafeguard + .4byte gText_PkmnSafeguardExpired + .4byte gText_PkmnWentToSleep + .4byte gText_PkmnSleptHealthy + .4byte gText_PkmnWhippedWhirlwind + .4byte gText_PkmnTookSunlight + .4byte gText_PkmnLoweredHead + .4byte gText_PkmnIsGlowing + .4byte gText_PkmnFlewHigh + .4byte gText_PkmnDugHole + .4byte gText_PkmnSqueezedByBind + .4byte gText_PkmnTrappedInVortex + .4byte gText_PkmnWrappedBy + .4byte gText_PkmnClamped + .4byte gText_PkmnHurtBy + .4byte gText_PkmnFreedFrom + .4byte gText_PkmnCrashed + .4byte gText_PkmnShroudedInMist + .4byte gText_PkmnProtectedByMist + .4byte gText_PkmnGettingPumped + .4byte gText_PkmnHitWithRecoil + .4byte gText_PkmnProtectedItself2 + .4byte gText_PkmnBuffetedBySandstorm + .4byte gText_PkmnPeltedByHail + .4byte gText_PkmnSeeded + .4byte gText_PkmnEvadedAttack + .4byte gText_PkmnSappedByLeechSeed + .4byte gText_PkmnFastAsleep + .4byte gText_PkmnWokeUp + .4byte gText_PkmnUproarKeptAwake + .4byte gText_PkmnWokeUpInUproar + .4byte gText_PkmnCausedUproar + .4byte gText_PkmnMakingUproar + .4byte gText_PkmnCalmedDown + .4byte gText_PkmnCantSleepInUproar + .4byte gText_PkmnStockpiled + .4byte gText_PkmnCantStockpile + .4byte gText_PkmnCantSleepInUproar2 + .4byte gText_UproarKeptPkmnAwake + .4byte gText_PkmnStayedAwakeUsing + .4byte gText_PkmnStoringEnergy + .4byte gText_PkmnUnleashedEnergy + .4byte gText_PkmnFatigueConfusion + .4byte gText_PkmnPickedUpItem + .4byte gText_PkmnUnaffected + .4byte gText_PkmnTransformedInto + .4byte gText_PkmnMadeSubstitute + .4byte gText_PkmnHasSubstitute + .4byte gText_SubstituteDamaged + .4byte gText_PkmnSubstituteFaded + .4byte gText_PkmnMustRecharge + .4byte gText_PkmnRageBuilding + .4byte gText_PkmnMoveWasDisabled + .4byte gText_PkmnMoveIsDisabled + .4byte gText_PkmnMoveDisabledNoMore + .4byte gText_PkmnGotEncore + .4byte gText_PkmnEncoreEnded + .4byte gText_PkmnTookAim + .4byte gText_PkmnSketchedMove + .4byte gText_PkmnTryingToTakeFoe + .4byte gText_PkmnTookFoe + .4byte gText_PkmnReducedPP + .4byte gText_PkmnStoleItem + .4byte gText_PkmnCantEscape + .4byte gText_PkmnFellIntoNightmare + .4byte gText_PkmnLockedInNightmare + .4byte gText_PkmnLaidCurse + .4byte gText_PkmnAfflictedByCurse + .4byte gText_SpikesScattered + .4byte gText_PkmnHurtBySpikes + .4byte gText_PkmnIdentified + .4byte gText_PkmnPerishCountFell + .4byte gText_PkmnBracedItself + .4byte gText_PkmnEnduredHit + .4byte gText_MagnitudeStrength + .4byte gText_PkmnCutHPMaxedAttack + .4byte gText_PkmnCopiedStatChanges + .4byte gText_PkmnGotFree + .4byte gText_PkmnShedLeechSeed + .4byte gText_PkmnBlewAwaySpikes + .4byte gText_PkmnFledFromBattle + .4byte gText_PkmnForesawAttack + .4byte gText_PkmnTookAttack + .4byte gText_PkmnAttack + .4byte gText_PkmnCenterAttention + .4byte gText_PkmnChargingPower + .4byte gText_NaturePowerTurnedInto + .4byte gText_PkmnStatusNormal + .4byte gText_PkmnHasNoMovesLeft + .4byte gText_PkmnSubjectedToTorment + .4byte gText_PkmnCantUseMoveTorment + .4byte gText_PkmnTighteningFocus + .4byte gText_PkmnFellForTaunt + .4byte gText_PkmnCantUseMoveTaunt + .4byte gText_PkmnReadyToHelp + .4byte gText_PkmnSwitchedItems + .4byte gText_PkmnCopiedFoe + .4byte gText_PkmnMadeWish + .4byte gText_PkmnWishCameTrue + .4byte gText_PkmnPlantedRoots + .4byte gText_PkmnAbsorbedNutrients + .4byte gText_PkmnAnchoredItself + .4byte gText_PkmnWasMadeDrowsy + .4byte gText_PkmnKnockedOff + .4byte gText_PkmnSwappedAbilities + .4byte gText_PkmnSealedOpponentMove + .4byte gText_PkmnCantUseMoveSealed + .4byte gText_PkmnWantsGrudge + .4byte gText_PkmnLostPPGrudge + .4byte gText_PkmnShroudedItself + .4byte gText_PkmnMoveBounced + .4byte gText_PkmnWaitsForTarget + .4byte gText_PkmnSnatchedMove + .4byte gText_PkmnMadeItRain + .4byte gText_PkmnRaisedSpeed + .4byte gText_PkmnProtectedBy + .4byte gText_PkmnPreventsUsage + .4byte gText_PkmnRestoredHPUsing + .4byte gText_PkmnChangedTypeWith + .4byte gText_PkmnPreventsParalysisWith + .4byte gText_PkmnPreventsRomanceWith + .4byte gText_PkmnPreventsPoisoningWith + .4byte gText_PkmnPreventsConfusionWith + .4byte gText_PkmnRaisedFirePowerWith + .4byte gText_PkmnAnchorsItselfWith + .4byte gText_PkmnCutsAttackWith + .4byte gText_PkmnPreventsStatLossWith + .4byte gText_PkmnHurtsWith + .4byte gText_PkmnTraced + .4byte gText_StatSharply + .4byte gText_StatRose + .4byte gText_StatHarshly + .4byte gText_StatFell + .4byte gText_PkmnsStatChanged + .4byte gText_PkmnsStatChanged2 + .4byte gText_PkmnsStatChanged3 + .4byte gText_PkmnsStatChanged4 + .4byte gText_CriticalHit + .4byte gText_OneHitKO + .4byte gText_123Poof + .4byte gText_AndEllipsis + .4byte gText_NotVeryEffective + .4byte gText_SuperEffective + .4byte gText_GotAwaySafely + .4byte gText_WildPkmnFled + .4byte gText_NoRunningFromTrainers + .4byte gText_CantEscape + .4byte gText_DontLeaveBirch + .4byte gText_ButNothingHappened + .4byte gText_ButItFailed + .4byte gText_ItHurtConfusion + .4byte gText_MirrorMoveFailed + .4byte gText_StartedToRain + .4byte gText_DownpourStarted + .4byte gText_RainContinues + .4byte gText_DownpourContinues + .4byte gText_RainStopped + .4byte gText_SandstormBrewed + .4byte gText_SandstormRages + .4byte gText_SandstormSubsided + .4byte gText_SunlightGotBright + .4byte gText_SunlightStrong + .4byte gText_SunlightFaded + .4byte gText_StartedHail + .4byte gText_HailContinues + .4byte gText_HailStopped + .4byte gText_FailedToSpitUp + .4byte gText_FailedToSwallow + .4byte gText_WindBecameHeatWave + .4byte gText_StatChangesGone + .4byte gText_CoinsScattered + .4byte gText_TooWeakForSubstitute + .4byte gText_SharedPain + .4byte gText_BellChimed + .4byte gText_FaintInThree + .4byte gText_NoPPLeft + .4byte gText_ButNoPPLeft + .4byte gText_XUsedY + .4byte gText_WallyUsedY + .4byte gText_TrainerBlockedBall + .4byte gText_DontBeAThief + .4byte gText_ItDodgedBall + .4byte gText_YouMissedPkmn + .4byte gText_PkmnBrokeFree + .4byte gText_ItAppearedCaught + .4byte gText_AarghAlmostHadIt + .4byte gText_ShootSoClose + .4byte gText_GotchaPkmnCaught + .4byte gText_GotchaPkmnCaught2 + .4byte gText_GiveNicknameCaptured + .4byte gText_PkmnSentToPC + .4byte gText_PkmnDataAddedToDex + .4byte gText_ItIsRaining + .4byte gText_SandstormIsRaging + .4byte gText_CantEscape2 + .4byte gText_PkmnIgnoresAsleep + .4byte gText_PkmnIgnoredOrders + .4byte gText_PkmnBeganToNap + .4byte gText_PkmnLoafing + .4byte gText_PkmnWontObey + .4byte gText_PkmnTurnedAway + .4byte gText_PkmnPretendNotNotice + .4byte gText_EnemyAboutToSwitchPkmn + .4byte gText_CreptCloser + .4byte gText_CantGetCloser + .4byte gText_PkmnWatchingCarefully + .4byte gText_PkmnCuriousAboutX + .4byte gText_PkmnEnthralledByX + .4byte gText_PkmnIgnoredX + .4byte gText_ThrewPokeblockAtPkmn + .4byte gText_OutOfSafariBalls + .4byte gText_PkmnsXCuredParalysis + .4byte gText_PkmnsXCuredPoison + .4byte gText_PkmnsXHealedBurn + .4byte gText_PkmnsXDefrostedIt + .4byte gText_PkmnsXWokeIt + .4byte gText_PkmnsXSnappedOut + .4byte gText_PkmnsXCuredProblem + .4byte gText_PkmnsXRestoredHealth + .4byte gText_PkmnsXRestoredPP + .4byte gText_PkmnsXRestoredStatus + .4byte gText_PkmnsXRestoredHPALittle + .4byte gText_XAllowsOnlyY + .4byte gText_PkmnHungOnWithX + .4byte gText_EmptyString3 + .4byte gText_PkmnsXPreventsBurns + .4byte gText_PkmnsXBlocksY + .4byte gText_PkmnsXRestoredHPALittle2 + .4byte gText_PkmnsXWhippedUpSandstorm + .4byte gText_PkmnsXPreventsYLoss + .4byte gText_PkmnsXInfatuatedY + .4byte gText_PkmnsXMadeYIneffective + .4byte gText_PkmnsXCuredYProblem + .4byte gText_ItSuckedLiquidOoze + .4byte gText_PkmnTransformed + .4byte gText_ElectricityWeakened + .4byte gText_FireWeakened + .4byte gText_PkmnHidUnderwater + .4byte gText_PkmnSprangUp + .4byte gText_HMMovesCantBeForgotten + .4byte gText_XFoundOneY + .4byte gText_PlayerDefeatedXY + .4byte gText_SoothingAroma + .4byte gText_ItemsCantBeUsedNow + .4byte gText_ForXCommaYZ + .4byte gText_UsingXTheYOfZN + .4byte gText_PkmnUsedXToGetPumped + .4byte gText_PkmnsXMadeYUseless + .4byte gText_PkmnTrappedBySandTomb + .4byte gText_EmptyString4 + .4byte gText_ABoosted + .4byte gText_PkmnsXIntensifiedSun + .4byte gText_PkmnMakesGroundMiss + .4byte gText_YouThrowABallNowRight + .4byte gText_PkmnsXTookAttack + .4byte gText_PkmnChoseXAsDestiny + .4byte gText_PkmnLostFocus + .4byte gText_UseNextPkmn + .4byte gText_PkmnFledUsingIts + .4byte gText_PkmnFledUsing + .4byte gText_PkmnWasDraggedOut + .4byte gText_PreventedFromWorking + .4byte gText_PkmnsXNormalizedStatus + .4byte gText_XYUsedZ + .4byte gText_BoxIsFull + .4byte gText_PkmnAvoidedAttack + .4byte gText_PkmnsXMadeItIneffective + .4byte gText_PkmnsXPreventsFlinching + .4byte gText_PkmnAlreadyHasBurn + .4byte gText_StatsWontDecrease2 + .4byte gText_PkmnsXBlocksY2 + .4byte gText_PkmnsXWoreOff + .4byte gText_PkmnRaisedDefALittle + .4byte gText_PkmnRaisedSpDefALittle + .4byte gText_TheWallShattered + .4byte gText_PkmnsXPreventsYsZ + .4byte gText_PkmnsXCuredItsYProblem + .4byte gText_PkmnCantEscape2 + .4byte gText_PkmnObtainedX + .4byte gText_PkmnObtainedX2 + .4byte gText_PkmnObtainedXYObtainedZ + .4byte gText_ButNoEffect + .4byte gText_PkmnsXHadNoEffectOnY + .4byte gText_TwoEnemiesDefeated + .4byte gText_String48 + .4byte gText_PkmnIncapableOfPower + .4byte gText_GlintAppearsInEye + .4byte gText_PkmnGettingIntoPosition + .4byte gText_PkmnBeganGrowlingDeeply + .4byte gText_PkmnEagerForMore + .4byte gText_DefeatedOpponentByReferee + .4byte gText_LostToOpponentByReferee + .4byte gText_TiedOpponentByReferee + .4byte gText_QuestionForfeitMatch + .4byte gText_ForfeitedMatch + .4byte gText_PkmnTransferredSomeonesPC + .4byte gText_PkmnTransferredLanettesPC + .4byte gText_PkmnBoxSomeonesPCFull + .4byte gText_PkmnBoxLanettesPCFull + .4byte gText_String37 + .4byte gText_String49 + .align 2 gUnknown_085CC834:: @ 85CC834 .incbin "baserom.gba", 0x5cc834, 0x14e @@ -603,36 +1666,28 @@ gUnknown_085CC982:: @ 85CC982 .incbin "baserom.gba", 0x5cc982, 0xe gUnknown_085CC990:: @ 85CC990 - -.string "What?\n{STR_VAR_1} is evolving!$" + .string "What?\n{STR_VAR_1} is evolving!$" gUnknown_085CC9A6:: @ 85CC9A6 - -.string "Congratulations! Your {STR_VAR_1}\nevolved into {STR_VAR_2}!{UNKNOWN_A}\p$" + .string "Congratulations! Your {STR_VAR_1}\nevolved into {STR_VAR_2}!{UNKNOWN_A}\p$" gUnknown_085CC9D3:: @ 85CC9D3 - -.string "Huh? {STR_VAR_1}\nstopped evolving!\p$" + .string "Huh? {STR_VAR_1}\nstopped evolving!\p$" gUnknown_085CC9EE:: @ 85CC9EE - -.string "‥‥?\p$" + .string "……?\p$" gUnknown_085CC9F3:: @ 85CC9F3 - -.string "What will\n{STRING 18} do?$" + .string "What will\n{STRING 18} do?$" gUnknown_085CCA04:: @ 85CCA04 - -.string "What will\n{STRING 35} do?$" + .string "What will\n{STRING 35} do?$" gUnknown_085CCA15:: @ 85CCA15 - -.string "What will\nWALLY do?$" + .string "What will\nWALLY do?$" gUnknown_085CCA29:: @ 85CCA29 - -.string "{PAUSE 16}Link standby‥$" + .string "{PAUSE 16}Link standby…$" gUnknown_085CCA3A:: @ 85CCA3A .incbin "baserom.gba", 0x5cca3a, 0x1a @@ -742,12 +1797,93 @@ gUnknown_085CCE17:: @ 85CCE17 gUnknown_085CCE38:: @ 85CCE38 .incbin "baserom.gba", 0x5cce38, 0x1b -gUnknown_085CCE53:: @ 85CCE53 - .incbin "baserom.gba", 0x5cce53, 0x375 +gText_TwoEnemiesDefeated:: @ 85CCE53 + .string "{STRING 28} {STRING 29} and\n{STRING 46} {STRING 47}\lwere defeated!\p$" +gText_String48:: @ 85CCE73 + .string "{STRING 48}$" + +gText_PkmnIncapableOfPower:: @ 85CCE76 + .string "{STRING 15} appears incapable\nof using its power!$" + +gText_GlintAppearsInEye:: @ 85CCE9F + .string "A glint appears in\n{STRING 19}’s eyes!$" + +gText_PkmnGettingIntoPosition:: @ 85CCEBD + .string "{STRING 19} is getting into\nposition!$" + +gText_PkmnBeganGrowlingDeeply:: @ 85CCEDA + .string "{STRING 19} began growling deeply!$" + +gText_PkmnEagerForMore:: @ 85CCEF4 + .string "{STRING 19} is eager for more!$" + +gUnknown_085CCF0A:: @ 85CCF0A + .2byte 0x016E, 0x016F, 0x0170, 0x0171 + +gText_RefIfNothingIsDecided:: @ 85CCF12 + .string "REFEREE: If nothing is decided in\n3 turns, we will go to judging!$" + +gText_RefThatsIt:: @ 85CCF54 + .string "REFEREE: That’s it! We will now go to\njudging to determine the winner!$" + +gText_RefJudgeMind:: @ 85CCF9B + .string "REFEREE: Judging category 1, Mind!\nThe POKéMON showing the most guts!\p$" + +gText_RefJudgeSkill:: @ 85CCFE2 + .string "REFEREE: Judging category 2, Skill!\nThe POKéMON using moves the best!\p$" + +gText_RefJudgeBody:: @ 85CD029 + .string "REFEREE: Judging category 3, Body!\nThe POKéMON with the most vitality!\p$" + +gText_RefJudgement1:: @ 85CD071 + .string "REFEREE: Judgment: {STRING 0} to {PLAYER}!\nThe winner is {STRING 35}’s {STRING 5}!\p$" + +gText_RefJudgement2:: @ 85CD0A6 + .string "REFEREE: Judgment: {STRING 0} to {PLAYER}!\nThe winner is {STRING 29}’s {RIVAL}!\p$" + +gText_RefJudgement3:: @ 85CD0DB + .string "REFEREE: Judgment: 3 to 3!\nWe have a draw!\p$" + +gText_DefeatedOpponentByReferee:: @ 85CD107 + .string "{STRING 5} defeated the opponent\n{RIVAL} in a REFEREE’s decision!$" + +gText_LostToOpponentByReferee:: @ 85CD13C + .string "{STRING 5} lost to the opponent\n{RIVAL} in a REFEREE’s decision!$" + +gText_TiedOpponentByReferee:: @ 85CD170 + .string "{STRING 5} tied the opponent\n{RIVAL} in a REFEREE’s decision!$" + +gText_RefCommenceBattle:: @ 85CD1A1 + .string "REFEREE: {STRING 5} VS {RIVAL}!\nCommence battling!$" + + .align 2 gUnknown_085CD1C8:: @ 85CD1C8 - .incbin "baserom.gba", 0x5cd1c8, 0x84 + .4byte gText_RefIfNothingIsDecided + .4byte gText_RefThatsIt + .4byte gText_RefJudgeMind + .4byte gText_RefJudgeSkill + .4byte gText_RefJudgeBody + .4byte gText_RefJudgement1 + .4byte gText_RefJudgement2 + .4byte gText_RefJudgement3 + .4byte gText_RefCommenceBattle +gText_QuestionForfeitMatch:: @ 85CD1EC + .string "Would you like to forfeit the match\nand quit now?$" + +gText_ForfeitedMatch:: @ 85CD21E + .string "{STRING 35} forfeited the match!$" + +gText_String37:: @ 85CD236 + .string "{STRING 37}$" + +gText_String49:: @ 85CD239 + .string "{STRING 49}$" + + .string "{PLAY_SE 0x0011}{STRING 28} {STRING 29} fled!$" + + .align 2 gUnknown_085CD24C:: @ 85CD24C .incbin "baserom.gba", 0x5cd24c, 0x1b diff --git a/data/event_scripts.s b/data/event_scripts.s index f058d75db..3303bedae 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -181,7 +181,149 @@ gUnknown_08272604:: @ 8272604 .incbin "baserom.gba", 0x272604, 0x6b gUnknown_0827266F:: @ 827266F - .incbin "baserom.gba", 0x27266f, 0x1044 + .string "Which PC should be accessed?$" + + .string "Accessed SOMEONE’S PC.$" + + .string "POKéMON Storage System opened.$" + + .string "Accessed {PLAYER}’s PC.$" + + .string "Accessed LANETTE’s PC.$" + + .string "Hello, and welcome to\nthe POKéMON CENTER.\pWe restore your tired POKéMON\nto full health.\pWould you like to rest your POKéMON?$" + + .string "Okay, I’ll take your POKéMON\nfor a few seconds.$" + + .string "Thank you for waiting.\pWe’ve restored your POKéMON\nto full health.$" + + .string "We hope to see you again!$" + + .string "Hello, and welcome to\nthe POKéMON CENTER.\pWe restore your tired POKéMON\nto full health.\pWould you like to…$" + + .string "Th-that card…\nCould it be… The GOLD CARD?!\pOh, the gold color is brilliant!\nThe four stars seem to sparkle!\pI’ve seen several TRAINERS with\na SILVER CARD before, but, {PLAYER},\lyou’re the first TRAINER I’ve ever\lseen with a GOLD CARD!\pOkay, {PLAYER}, please allow me\nthe honor of resting your POKéMON!$" + + .string "I’m delighted to see you, {PLAYER}!\nYou want the usual, am I right?$" + + .string "Okay, I’ll take your POKéMON\nfor a few seconds.$" + + .string "Thank you for waiting.$" + + .string "We hope to see you again!$" + + .string "Welcome!\pHow may I serve you?$" + + .string "Please come again!$" + + .string "{PLAYER}{STRING 5}, welcome!\pWhat can I do for you?$" + + .string "Obtained the {STR_VAR_2}!$" + + .string "The BAG is full…$" + + .string "{PLAYER} put away the {STR_VAR_2}\nin the {STR_VAR_3} POCKET.$" + + .string "{PLAYER} found one {STR_VAR_2}!$" + + .string "Too bad!\nThe BAG is full…$" + + .string "{PLAYER} put away the {STR_VAR_2}\nin the BAG.$" + + .string "Obtained the {STR_VAR_2}!$" + + .string "Too bad! There’s no room left for\nanother {STR_VAR_2}…$" + + .string "The {STR_VAR_2} was transferred\nto the PC.$" + + .string "“Selected items for your convenience!â€\nPOKéMON MART$" + + .string "“Rejuvenate your tired partners!â€\nPOKéMON CENTER$" + + .string "{STR_VAR_1} might like this program.\n… … … … … … … … … … … … … … … …\pBetter get going!$" + + .string "Welcome to LILYCOVE DEPARTMENT STORE.\pWhich floor would you like?$" + + .string "The sandstorm is vicious.\nIt’s impossible to keep going.$" + + .string "An item in the BAG can be\nregistered to SELECT for easy use.$" + + .string "There’s an e-mail from POKéMON TRAINER\nSCHOOL.\p… … … … … …\pA POKéMON may learn up to four moves.\pA TRAINER’s expertise is tested on the\nmove sets chosen for POKéMON.\p… … … … … …$" + + .string "{PLAYER} booted up the PC.$" + + .string "The link was canceled.$" + + .string "Want to give a nickname to\nthe {STR_VAR_2} you received?$" + + .string "{PLAYER} is out of usable\nPOKéMON!\p{PLAYER} whited out!$" + + .string "Registered {STR_VAR_1} {STR_VAR_2}\nin the POKéNAV.$" + + .string "Do you know the TM SECRET POWER?\pOur group, we love the TM SECRET\nPOWER.\pOne of our members will give it to you.\nCome back and show me if you get it.\pWe’ll accept you as a member and sell\nyou good stuff in secrecy.$" + + .string "Your POKéMON may be infected with\nPOKéRUS.\pLittle is known about the POKéRUS\nexcept that they are microscopic life-\lforms that attach to POKéMON.\pWhile infected, POKéMON are said to\ngrow exceptionally well.$" + + .string "The water is dyed a deep blue…\nWould you like to SURF?$" + + .string "{STR_VAR_1} used SURF!$" + + .string "It sounded as if a door opened\nsomewhere far away.$" + + .string "There is a big hole in the wall.$" + + .string "I’m terribly sorry.\nThe POKéMON WIRELESS CLUB is\lundergoing adjustments now.$" + + .string "It appears to be undergoing\nadjustments…$" + + .string "I’m terribly sorry. The TRADE CENTER\nis undergoing inspections.$" + + .string "I’m terribly sorry. The RECORD CORNER\nis under preparation.$" + + .string "{PLAYER} handed over the\n{STR_VAR_1}.$" + + .string "Thank you for accessing the\nMYSTERY GIFT System.$" + + .string "{PLAYER} found one {STR_VAR_1}\n{STR_VAR_2}!$" + + .string "The weird tree doesn’t like the\nWAILMER PAIL!\pThe weird tree attacked!$" + + .string "The {STR_VAR_1} flew away!$" + +gText_PkmnTransferredSomeonesPC:: @ 8273216 + .string "{STR_VAR_2} was transferred to\nSOMEONE’S PC.\pIt was placed in \nBOX “{STR_VAR_1}.â€$" + +gText_PkmnTransferredLanettesPC:: @ 8273256 + .string "{STR_VAR_2} was transferred to\nLANETTE’S PC.\pIt was placed in \nBOX “{STR_VAR_1}.â€$" + +gText_PkmnBoxSomeonesPCFull:: @ 8273296 + .string "BOX “{STR_VAR_3}†on\nSOMEONE’S PC was full.\p{STR_VAR_2} was transferred to\nBOX “{STR_VAR_1}.â€$" + +gText_PkmnBoxLanettesPCFull:: @ 82732D9 + .string "BOX “{STR_VAR_3}†on\nLANETTE’S PC was full.\p{STR_VAR_2} was transferred to\nBOX “{STR_VAR_1}.â€$" + + .string "There’s no more room for POKéMON!\pThe POKéMON BOXES are full and\ncan’t accept any more!$" + + .string "Do you want to give a nickname to\nthis {STR_VAR_1}?$" + + .string "There is a questionnaire.\nWould you like to fill it out?$" + + .string "Thank you for taking the time to\nfill out our questionnaire.\pYour feedback will be used for\nfuture reference.$" + + .string "Oh, hello!\nYou know those words?\pThat means you must know about\nthe MYSTERY GIFT.\pFrom now on, you should be\nreceiving MYSTERY GIFTS!$" + + .string "Once you save your game, you can\naccess the MYSTERY GIFT.$" + + .string "Oh, hello!\nYou know those words?\pThat means you must know about\nthe MYSTERY EVENT.$" + + .string "Once you save your game, you can\naccess the MYSTERY EVENT.$" + + .string "Thank you for using the MYSTERY\nEVENT System.\pYou must be {PLAYER}.\nThere is a ticket here for you.$" + + .string "It appears to be for use at\nthe LILYCOVE CITY port.\pWhy not give it a try and see what\nit is about?$" + + .string "The massive downpour appears to\nhave stopped…$" + + .string "The intense sunshine appears to\nhave subsided…$" gUnknown_082736B3:: @ 82736B3 .incbin "baserom.gba", 0x2736b3, 0x9 diff --git a/data/graphics.s b/data/graphics.s index bf080fd95..98365f5e8 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -55,7 +55,13 @@ gUnknown_08C1A12C:: @ 8C1A12C .incbin "baserom.gba", 0xc1a12c, 0x188 gUnknown_08C1A2B4:: @ 8C1A2B4 - .incbin "baserom.gba", 0xc1a2b4, 0x2404 + .incbin "baserom.gba", 0xc1a2b4, 0x1DC + +gUnknown_08C1A490:: @ 8C1A490 + .incbin "baserom.gba", 0xc1a490, 0xD4 + +gUnknown_08C1A564:: @ 8C1A564 + .incbin "baserom.gba", 0xc1a564, 0x2154 gUnknown_08C1C6B8:: @ 8C1C6B8 .incbin "baserom.gba", 0xc1c6b8, 0x9f4 diff --git a/src/pokemon_3.c b/src/pokemon_3.c index 2d1dfb8b7..2c3e84de9 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -46,16 +46,16 @@ extern const struct SpindaSpot gSpindaSpotGraphics[]; extern const u8* const gStatNamesTable[]; extern const u8 gSpeciesNames[][11]; extern const u8 gUnknown_08329EC8[]; -extern const u8 gUnknown_085CB38A[]; -extern const u8 gUnknown_085CB3AA[]; -extern const u8 gUnknown_085CA459[]; -extern const u8 gUnknown_085CA424[]; +extern const u8 gText_StatRose[]; +extern const u8 gText_PkmnsStatChanged2[]; +extern const u8 gText_PkmnGettingPumped[]; +extern const u8 gText_PkmnShroudedInMist[]; extern const s8 gNatureStatTable[][5]; extern const s8 gUnknown_08329ECE[][3]; extern const u32 gBitTable[]; extern const u32 gTMHMLearnsets[][2]; extern const u8 BattleText_Wally[]; -extern const u8 BattleText_PreventedSwitch[]; +extern const u8 gText_PkmnsXPreventsSwitching[]; extern const struct CompressedSpritePalette gMonPaletteTable[]; extern const struct CompressedSpritePalette gMonShinyPaletteTable[]; extern const u16 gHMMoves[]; @@ -215,8 +215,8 @@ void sub_806CF24(s32 stat) { gBankTarget = gBankInMenu; StringCopy(gBattleTextBuff1, gStatNamesTable[gUnknown_08329EC8[stat]]); - StringCopy(gBattleTextBuff2, gUnknown_085CB38A); - StrCpyDecodeToDisplayedStringBattle(gUnknown_085CB3AA); + StringCopy(gBattleTextBuff2, gText_StatRose); + StrCpyDecodeToDisplayedStringBattle(gText_PkmnsStatChanged2); } u8 *sub_806CF78(u16 itemId) @@ -251,7 +251,7 @@ u8 *sub_806CF78(u16 itemId) else { gBankAttacker = gBankInMenu; - StrCpyDecodeToDisplayedStringBattle(gUnknown_085CA459); + StrCpyDecodeToDisplayedStringBattle(gText_PkmnGettingPumped); } } } @@ -259,7 +259,7 @@ u8 *sub_806CF78(u16 itemId) if (itemEffect[3] & 0x80) { gBankAttacker = gBankInMenu; - StrCpyDecodeToDisplayedStringBattle(gUnknown_085CA424); + StrCpyDecodeToDisplayedStringBattle(gText_PkmnShroudedInMist); } return gDisplayedStringBattle; @@ -1374,7 +1374,7 @@ void sub_806E994(void) gBattleTextBuff2[2] = gBankInMenu; gBattleTextBuff2[3] = pokemon_order_func(gBattlePartyID[gBankInMenu]); gBattleTextBuff2[4] = EOS; - StrCpyDecodeBattle(BattleText_PreventedSwitch, gStringVar4); + StrCpyDecodeBattle(gText_PkmnsXPreventsSwitching, gStringVar4); } struct PokeItem From e7e1938094081ba2e20232caca0239cb2290251f Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 19 Sep 2017 16:17:23 -0400 Subject: [PATCH 229/342] Start decompilation of lilycove_lady --- asm/lilycove_lady.s | 95 +-------------------------------------------- include/global.h | 35 ++++++++++++++++- include/vars.h | 2 + ld_script.txt | 1 + src/lilycove_lady.c | 57 +++++++++++++++++++++++++++ 5 files changed, 95 insertions(+), 95 deletions(-) create mode 100644 src/lilycove_lady.c diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index fca8cb29b..76ba3e423 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -4,99 +4,6 @@ .syntax unified .text - - thumb_func_start GetLilycoveLadyId -GetLilycoveLadyId: @ 818D9AC - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end GetLilycoveLadyId - - thumb_func_start sub_818D9C0 -sub_818D9C0: @ 818D9C0 - push {r4,r5,lr} - ldr r5, =0x00004010 - ldr r4, =gUnknown_0860B07E - bl GetLilycoveLadyId - lsls r0, 24 - lsrs r0, 23 - adds r0, r4 - ldrh r1, [r0] - adds r0, r5, 0 - bl VarSet - bl GetLilycoveLadyId - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - bne _0818DA20 - ldr r0, =gSaveBlock1Ptr - ldr r1, [r0] - ldr r0, =0x00003b58 - adds r1, r0 - ldr r0, =0x00004011 - ldr r2, =gUnknown_0860B074 - ldrb r1, [r1, 0xD] - lsls r1, 1 - adds r1, r2 - ldrh r1, [r1] - bl VarSet - ldr r1, =gScriptResult - movs r0, 0x1 - b _0818DA24 - .pool -_0818DA20: - ldr r1, =gScriptResult - movs r0, 0 -_0818DA24: - strh r0, [r1] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818D9C0 - - thumb_func_start SetLilycoveLady -SetLilycoveLady: @ 818DA30 - push {lr} - ldr r0, =gSaveBlock2Ptr - ldr r0, [r0] - ldrb r1, [r0, 0xB] - lsls r1, 8 - ldrb r0, [r0, 0xA] - orrs r0, r1 - movs r1, 0x6 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 17 - adds r1, r0, 0 - cmp r0, 0x1 - beq _0818DA68 - cmp r0, 0x1 - bgt _0818DA5C - cmp r0, 0 - beq _0818DA62 - b _0818DA72 - .pool -_0818DA5C: - cmp r1, 0x2 - beq _0818DA6E - b _0818DA72 -_0818DA62: - bl SetLilycoveQuizLady - b _0818DA72 -_0818DA68: - bl SetLilycoveFavourLady - b _0818DA72 -_0818DA6E: - bl SetLilycoveContestLady -_0818DA72: - pop {r0} - bx r0 - thumb_func_end SetLilycoveLady thumb_func_start sub_818DA78 sub_818DA78: @ 818DA78 @@ -1927,5 +1834,5 @@ sub_818E990: @ 818E990 .pool thumb_func_end sub_818E990 - + .align 2, 0 @ Don't pad with nop. diff --git a/include/global.h b/include/global.h index e694a5974..764eff563 100644 --- a/include/global.h +++ b/include/global.h @@ -655,6 +655,39 @@ struct DaycareData #define FLAGS_COUNT 300 #define VARS_COUNT 256 +enum { + LILYCOVE_LADY_QUIZ, + LILYCOVE_LADY_FAVOUR, + LILYCOVE_LADY_CONTEST +}; + +typedef union // TODO +{ + struct + { + /*0x000*/ u8 id; + /*0x001*/ u8 language; + } quiz; + + struct + { + /*0x000*/ u8 id; + } flavor; + + struct + { + /*0x000*/ u8 id; + /*0x001*/ u8 filler_001[12]; + /*0x00d*/ u8 category; // maybe? + } contest; + + struct + { + /*0x000*/ u8 id; + /*0x001*/ u8 filler_001[535]; + } common; +} LilycoveLady; + struct SaveBlock1 { /*0x00*/ struct Coords16 pos; @@ -738,7 +771,7 @@ struct SaveBlock1 /*0x3728*/ struct RamScript ramScript; /*0x3B14*/ struct RecordMixingGift recordMixingGift; /*0x3B24*/ u8 seen2[52]; - /*0x3B58*/ u8 lilycoveLady[536]; // TODO: convert to a union + /*0x3B58*/ LilycoveLady lilycoveLady; // TODO: convert to a union /*0x3D70*/ u8 babyPhrase[24]; // TODO: convert to a struct // sizeof: 0x3D88 }; diff --git a/include/vars.h b/include/vars.h index 5da960640..7c0edeb77 100644 --- a/include/vars.h +++ b/include/vars.h @@ -12,6 +12,8 @@ #define VAR_0x4008 0x4008 #define VAR_0x4009 0x4009 #define VAR_0x400A 0x400A +#define VAR_0x4010 0x4010 +#define VAR_0x4011 0x4011 #define VAR_0x401F 0x401F #define VAR_RECYCLE_GOODS 0x4020 #define VAR_REPEL_STEP_COUNT 0x4021 diff --git a/ld_script.txt b/ld_script.txt index 8a3f3e139..cc43127e8 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -240,6 +240,7 @@ SECTIONS { asm/battle_controller_recorded_opponent.o(.text); asm/battle_controller_recorded_player.o(.text); asm/battle_dome_cards.o(.text); + src/lilycove_lady.o(.text); asm/lilycove_lady.o(.text); asm/battle_frontier_1.o(.text); asm/new_menu_helpers.o(.text); diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c new file mode 100644 index 000000000..7f4c4824a --- /dev/null +++ b/src/lilycove_lady.c @@ -0,0 +1,57 @@ +// +// Created by Scott Norton on 9/19/17. +// + +#include "global.h" +#include "event_data.h" +#include "lilycove_lady.h" + +void SetLilycoveQuizLady(void); +void SetLilycoveFavourLady(void); +void SetLilycoveContestLady(void); + +extern const u16 gUnknown_0860B074[]; +extern const u16 gUnknown_0860B07E[]; + +u8 GetLilycoveLadyId(void) +{ + return gSaveBlock1Ptr->lilycoveLady.common.id; +} + +void sub_818D9C0(void) +{ + LilycoveLady *lilycoveLady; + + VarSet(VAR_0x4010, gUnknown_0860B07E[GetLilycoveLadyId()]); + if (GetLilycoveLadyId() == LILYCOVE_LADY_CONTEST) + { + lilycoveLady = &gSaveBlock1Ptr->lilycoveLady; + VarSet(VAR_0x4011, gUnknown_0860B074[lilycoveLady->contest.category]); + gScriptResult = TRUE; + } + else + { + gScriptResult = FALSE; + } +} + +void SetLilycoveLady(void) +{ + u16 id; + + id = ((gSaveBlock2Ptr->playerTrainerId[1] << 8) | gSaveBlock2Ptr->playerTrainerId[0]); + id %= 6; + id >>= 1; + switch (id) + { + case LILYCOVE_LADY_QUIZ: + SetLilycoveQuizLady(); + break; + case LILYCOVE_LADY_FAVOUR: + SetLilycoveFavourLady(); + break; + case LILYCOVE_LADY_CONTEST: + SetLilycoveContestLady(); + break; + } +} From 99a7fcfdfa723390ecb25ec6819359b3521c8f34 Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 19 Sep 2017 16:21:50 -0400 Subject: [PATCH 230/342] sub_818DA78, SetLilycoveLadyRandomly --- asm/lilycove_lady.s | 66 --------------------------------------------- src/lilycove_lady.c | 39 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 66 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 76ba3e423..51e288331 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,72 +5,6 @@ .text - thumb_func_start sub_818DA78 -sub_818DA78: @ 818DA78 - push {lr} - bl GetLilycoveLadyId - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _0818DA9C - cmp r0, 0x1 - bgt _0818DA90 - cmp r0, 0 - beq _0818DA96 - b _0818DAA6 -_0818DA90: - cmp r0, 0x2 - beq _0818DAA2 - b _0818DAA6 -_0818DA96: - bl sub_818E004 - b _0818DAA6 -_0818DA9C: - bl sub_818DBC4 - b _0818DAA6 -_0818DAA2: - bl sub_818E674 -_0818DAA6: - pop {r0} - bx r0 - thumb_func_end sub_818DA78 - -@ unused - thumb_func_start SetLilycoveLadyRandomly -SetLilycoveLadyRandomly: @ 818DAAC - push {lr} - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - bl __umodsi3 - lsls r0, 24 - lsrs r0, 24 - adds r1, r0, 0 - cmp r0, 0x1 - beq _0818DADC - cmp r0, 0x1 - bgt _0818DAD0 - cmp r0, 0 - beq _0818DAD6 - b _0818DAE6 -_0818DAD0: - cmp r1, 0x2 - beq _0818DAE2 - b _0818DAE6 -_0818DAD6: - bl SetLilycoveQuizLady - b _0818DAE6 -_0818DADC: - bl SetLilycoveFavourLady - b _0818DAE6 -_0818DAE2: - bl SetLilycoveContestLady -_0818DAE6: - pop {r0} - bx r0 - thumb_func_end SetLilycoveLadyRandomly - thumb_func_start sub_818DAEC sub_818DAEC: @ 818DAEC push {r4,lr} diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 7f4c4824a..ab1c24914 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -4,11 +4,15 @@ #include "global.h" #include "event_data.h" +#include "rng.h" #include "lilycove_lady.h" void SetLilycoveQuizLady(void); void SetLilycoveFavourLady(void); void SetLilycoveContestLady(void); +void sub_818E004(void); +void sub_818DBC4(void); +void sub_818E674(void); extern const u16 gUnknown_0860B074[]; extern const u16 gUnknown_0860B07E[]; @@ -55,3 +59,38 @@ void SetLilycoveLady(void) break; } } + +void sub_818DA78(void) +{ + switch (GetLilycoveLadyId()) + { + case LILYCOVE_LADY_QUIZ: + sub_818E004(); + break; + case LILYCOVE_LADY_FAVOUR: + sub_818DBC4(); + break; + case LILYCOVE_LADY_CONTEST: + sub_818E674(); + break; + } +} + +void SetLilycoveLadyRandomly(void) +{ + u8 id; + + id = Random() % 3; + switch (id) + { + case LILYCOVE_LADY_QUIZ: + SetLilycoveQuizLady(); + break; + case LILYCOVE_LADY_FAVOUR: + SetLilycoveFavourLady(); + break; + case LILYCOVE_LADY_CONTEST: + SetLilycoveContestLady(); + break; + } +} From 0d0532731f99036d09d6bb2788de0221b6886105 Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 19 Sep 2017 16:24:42 -0400 Subject: [PATCH 231/342] sub_818DAEC, sub_818DB04 --- asm/lilycove_lady.s | 34 ---------------------------------- src/lilycove_lady.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 34 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 51e288331..fbdcc10dd 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,40 +5,6 @@ .text - thumb_func_start sub_818DAEC -sub_818DAEC: @ 818DAEC - push {r4,lr} - ldr r4, =gScriptResult - bl GetLilycoveLadyId - lsls r0, 24 - lsrs r0, 24 - strh r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818DAEC - - thumb_func_start sub_818DB04 -sub_818DB04: @ 818DB04 - push {lr} - adds r1, r0, 0 - movs r2, 0 - b _0818DB14 -_0818DB0C: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - adds r1, 0x2 -_0818DB14: - ldrh r0, [r1] - cmp r0, 0 - bne _0818DB0C - adds r0, r2, 0 - pop {r1} - bx r1 - thumb_func_end sub_818DB04 - thumb_func_start sub_818DB20 sub_818DB20: @ 818DB20 push {r4-r6,lr} diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index ab1c24914..579eca5cb 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -94,3 +94,16 @@ void SetLilycoveLadyRandomly(void) break; } } + +void sub_818DAEC(void) +{ + gScriptResult = GetLilycoveLadyId(); +} + +u8 sub_818DB04(u16 *data) +{ + u8 len; + + for (len = 0; *data != 0; len ++, data ++); + return len; +} From b26eb6713bb866f1173b4c7192ce231d894d19ea Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 19 Sep 2017 16:32:33 -0400 Subject: [PATCH 232/342] sub_818DB20 --- asm/lilycove_lady.s | 42 ------------------------------------------ include/global.h | 6 +++++- src/lilycove_lady.c | 20 +++++++++++++++++--- 3 files changed, 22 insertions(+), 46 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index fbdcc10dd..83c6df670 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,48 +5,6 @@ .text - thumb_func_start sub_818DB20 -sub_818DB20: @ 818DB20 - push {r4-r6,lr} - bl Random - ldr r5, =gUnknown_0203CD64 - ldr r4, [r5] - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x6 - bl __umodsi3 - strb r0, [r4, 0xC] - ldr r6, =gUnknown_0860B2EC - ldr r0, [r5] - ldrb r0, [r0, 0xC] - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - bl sub_818DB04 - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - bl Random - lsls r0, 16 - lsrs r0, 16 - adds r1, r4, 0 - bl __modsi3 - lsls r0, 24 - ldr r2, [r5] - ldrb r1, [r2, 0xC] - lsls r1, 2 - adds r1, r6 - ldr r1, [r1] - lsrs r0, 23 - adds r0, r1 - ldrh r0, [r0] - strh r0, [r2, 0x10] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818DB20 - thumb_func_start SetLilycoveFavourLady SetLilycoveFavourLady: @ 818DB7C push {lr} diff --git a/include/global.h b/include/global.h index 764eff563..92435ce28 100644 --- a/include/global.h +++ b/include/global.h @@ -672,7 +672,11 @@ typedef union // TODO struct { /*0x000*/ u8 id; - } flavor; + /*0x001*/ u8 filler_001[11]; + /*0x00c*/ u8 unk_00c; + /*0x00d*/ u8 filler_00d[3]; + /*0x010*/ u16 unk_010; + } favour; struct { diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 579eca5cb..2e0d336dd 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -14,8 +14,11 @@ void sub_818E004(void); void sub_818DBC4(void); void sub_818E674(void); -extern const u16 gUnknown_0860B074[]; -extern const u16 gUnknown_0860B07E[]; +extern const u16 gUnknown_0860B074[5]; +extern const u16 gUnknown_0860B07E[3]; +extern const u16 *const gUnknown_0860B2EC[6]; + +EWRAM_DATA LilycoveLady *gUnknown_0203CD64 = NULL; u8 GetLilycoveLadyId(void) { @@ -100,10 +103,21 @@ void sub_818DAEC(void) gScriptResult = GetLilycoveLadyId(); } -u8 sub_818DB04(u16 *data) +u8 sub_818DB04(const u16 *data) { u8 len; for (len = 0; *data != 0; len ++, data ++); return len; } + +void sub_818DB20(void) +{ + u8 size; + u8 idx; + + gUnknown_0203CD64->favour.unk_00c = Random() % 6; + size = sub_818DB04(gUnknown_0860B2EC[gUnknown_0203CD64->favour.unk_00c]); + idx = Random() % size; + gUnknown_0203CD64->favour.unk_010 = gUnknown_0860B2EC[gUnknown_0203CD64->favour.unk_00c][idx]; +} From 4e8a2c6934c4f8a44ed8d350fe96996beda21d0e Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 19 Sep 2017 16:55:53 -0400 Subject: [PATCH 233/342] SetLilycoveFavourLady --- asm/lilycove_lady.s | 49 --------------------------------------------- include/global.h | 10 +++++++-- src/lilycove_lady.c | 21 +++++++++++++++++++ 3 files changed, 29 insertions(+), 51 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 83c6df670..36a5401e9 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,55 +5,6 @@ .text - thumb_func_start SetLilycoveFavourLady -SetLilycoveFavourLady: @ 818DB7C - push {lr} - ldr r2, =gUnknown_0203CD64 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - str r0, [r2] - movs r3, 0 - movs r1, 0x1 - strb r1, [r0] - ldr r0, [r2] - strb r3, [r0, 0x1] - ldr r1, [r2] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r0, [r2] - strb r3, [r0, 0x2] - ldr r0, [r2] - strb r3, [r0, 0x3] - ldr r1, [r2] - strh r3, [r1, 0xE] - ldr r0, =gGameLanguage - ldrb r0, [r0] - strb r0, [r1, 0x12] - bl sub_818DB20 - pop {r0} - bx r0 - .pool - thumb_func_end SetLilycoveFavourLady - - thumb_func_start sub_818DBC4 -sub_818DBC4: @ 818DBC4 - ldr r3, =gUnknown_0203CD64 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - str r0, [r3] - movs r2, 0 - movs r1, 0x1 - strb r1, [r0] - ldr r0, [r3] - strb r2, [r0, 0x1] - bx lr - .pool - thumb_func_end sub_818DBC4 - thumb_func_start sub_818DBE8 sub_818DBE8: @ 818DBE8 push {lr} diff --git a/include/global.h b/include/global.h index 92435ce28..0fc860e68 100644 --- a/include/global.h +++ b/include/global.h @@ -672,10 +672,16 @@ typedef union // TODO struct { /*0x000*/ u8 id; - /*0x001*/ u8 filler_001[11]; + /*0x001*/ u8 unk_001; + /*0x002*/ u8 unk_002; + /*0x003*/ u8 unk_003; + /*0x004*/ u8 unk_004; + /*0x005*/ u8 filler_005[7]; /*0x00c*/ u8 unk_00c; - /*0x00d*/ u8 filler_00d[3]; + /*0x00d*/ u8 filler_00d; + /*0x00e*/ u16 unk_00e; /*0x010*/ u16 unk_010; + /*0x012*/ u8 language; } favour; struct diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 2e0d336dd..aec55a574 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -3,6 +3,7 @@ // #include "global.h" +#include "main.h" #include "event_data.h" #include "rng.h" #include "lilycove_lady.h" @@ -121,3 +122,23 @@ void sub_818DB20(void) idx = Random() % size; gUnknown_0203CD64->favour.unk_010 = gUnknown_0860B2EC[gUnknown_0203CD64->favour.unk_00c][idx]; } + +void SetLilycoveFavourLady(void) +{ + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; + gUnknown_0203CD64->favour.id = LILYCOVE_LADY_FAVOUR; + gUnknown_0203CD64->favour.unk_001 = 0; + gUnknown_0203CD64->favour.unk_004 = 0xFF; + gUnknown_0203CD64->favour.unk_002 = 0; + gUnknown_0203CD64->favour.unk_003= 0; + gUnknown_0203CD64->favour.unk_00e = 0; + gUnknown_0203CD64->favour.language = gGameLanguage; + sub_818DB20(); +} + +void sub_818DBC4(void) +{ + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; + gUnknown_0203CD64->favour.id = LILYCOVE_LADY_FAVOUR; + gUnknown_0203CD64->favour.unk_001 = 0; +} From b8e733283e31c4863f774c6cf2bbb17ba369681f Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 19 Sep 2017 17:04:17 -0400 Subject: [PATCH 234/342] Another handful of favour lady functions --- asm/lilycove_lady.s | 59 --------------------------------------------- src/lilycove_lady.c | 30 +++++++++++++++++++++++ 2 files changed, 30 insertions(+), 59 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 36a5401e9..c905b3e2a 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,65 +5,6 @@ .text - thumb_func_start sub_818DBE8 -sub_818DBE8: @ 818DBE8 - push {lr} - ldr r1, =gUnknown_0203CD64 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - ldrb r0, [r0, 0x1] - cmp r0, 0x2 - bne _0818DC0C - movs r0, 0x2 - b _0818DC16 - .pool -_0818DC0C: - cmp r0, 0x1 - beq _0818DC14 - movs r0, 0 - b _0818DC16 -_0818DC14: - movs r0, 0x1 -_0818DC16: - pop {r1} - bx r1 - thumb_func_end sub_818DBE8 - - thumb_func_start sub_818DC1C -sub_818DC1C: @ 818DC1C - lsls r0, 24 - ldr r1, =gUnknown_0860B224 - lsrs r0, 22 - adds r0, r1 - ldr r0, [r0] - bx lr - .pool - thumb_func_end sub_818DC1C - - thumb_func_start sub_818DC2C -sub_818DC2C: @ 818DC2C - push {r4,lr} - ldr r1, =gUnknown_0203CD64 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - ldr r4, =gStringVar1 - ldrb r0, [r0, 0xC] - bl sub_818DC1C - adds r1, r0, 0 - adds r0, r4, 0 - bl StringCopy - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818DC2C - thumb_func_start sub_818DC60 sub_818DC60: @ 818DC60 push {r4,r5,lr} diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index aec55a574..16461728c 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -6,6 +6,7 @@ #include "main.h" #include "event_data.h" #include "rng.h" +#include "string_util.h" #include "lilycove_lady.h" void SetLilycoveQuizLady(void); @@ -17,6 +18,7 @@ void sub_818E674(void); extern const u16 gUnknown_0860B074[5]; extern const u16 gUnknown_0860B07E[3]; +extern const u8 *const gUnknown_0860B224[]; extern const u16 *const gUnknown_0860B2EC[6]; EWRAM_DATA LilycoveLady *gUnknown_0203CD64 = NULL; @@ -142,3 +144,31 @@ void sub_818DBC4(void) gUnknown_0203CD64->favour.id = LILYCOVE_LADY_FAVOUR; gUnknown_0203CD64->favour.unk_001 = 0; } + +u8 sub_818DBE8(void) +{ + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; + if (gUnknown_0203CD64->favour.unk_001 == 2) + { + return 2; + } + else if (gUnknown_0203CD64->favour.unk_001 == 1) + { + return 1; + } + else + { + return 0; + } +} + +const u8 *sub_818DC1C(u8 idx) +{ + return gUnknown_0860B224[idx]; +} + +void sub_818DC2C(void) +{ + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; + StringCopy(gStringVar1, sub_818DC1C(gUnknown_0203CD64->favour.unk_00c)); +} From 3b3423d1a751134ff7941b41bad72e0e75314647 Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 19 Sep 2017 17:07:36 -0400 Subject: [PATCH 235/342] sub_818DC60 --- asm/lilycove_lady.s | 33 --------------------------------- include/global.h | 3 +-- src/lilycove_lady.c | 15 ++++++++++++++- 3 files changed, 15 insertions(+), 36 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index c905b3e2a..75f9458a3 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,39 +5,6 @@ .text - thumb_func_start sub_818DC60 -sub_818DC60: @ 818DC60 - push {r4,r5,lr} - ldr r5, =gUnknown_0203CD64 - ldr r0, =gSaveBlock1Ptr - ldr r1, [r0] - ldr r2, =0x00003b58 - adds r0, r1, r2 - str r0, [r5] - ldrb r0, [r0, 0x4] - cmp r0, 0xFF - bne _0818DC84 - movs r0, 0 - b _0818DC9C - .pool -_0818DC84: - ldr r4, =gStringVar3 - ldr r0, =0x00003b5c - adds r1, r0 - adds r0, r4, 0 - bl StringCopy7 - ldr r0, [r5] - ldrb r1, [r0, 0x12] - adds r0, r4, 0 - bl ConvertInternationalString - movs r0, 0x1 -_0818DC9C: - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_818DC60 - thumb_func_start sub_818DCAC sub_818DCAC: @ 818DCAC push {r4,lr} diff --git a/include/global.h b/include/global.h index 0fc860e68..42629cf48 100644 --- a/include/global.h +++ b/include/global.h @@ -675,8 +675,7 @@ typedef union // TODO /*0x001*/ u8 unk_001; /*0x002*/ u8 unk_002; /*0x003*/ u8 unk_003; - /*0x004*/ u8 unk_004; - /*0x005*/ u8 filler_005[7]; + /*0x004*/ u8 unk_004[8]; /*0x00c*/ u8 unk_00c; /*0x00d*/ u8 filler_00d; /*0x00e*/ u16 unk_00e; diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 16461728c..578280115 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -7,6 +7,7 @@ #include "event_data.h" #include "rng.h" #include "string_util.h" +#include "text.h" #include "lilycove_lady.h" void SetLilycoveQuizLady(void); @@ -130,7 +131,7 @@ void SetLilycoveFavourLady(void) gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; gUnknown_0203CD64->favour.id = LILYCOVE_LADY_FAVOUR; gUnknown_0203CD64->favour.unk_001 = 0; - gUnknown_0203CD64->favour.unk_004 = 0xFF; + gUnknown_0203CD64->favour.unk_004[0] = EOS; gUnknown_0203CD64->favour.unk_002 = 0; gUnknown_0203CD64->favour.unk_003= 0; gUnknown_0203CD64->favour.unk_00e = 0; @@ -172,3 +173,15 @@ void sub_818DC2C(void) gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; StringCopy(gStringVar1, sub_818DC1C(gUnknown_0203CD64->favour.unk_00c)); } + +bool8 sub_818DC60(void) +{ + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; + if (gUnknown_0203CD64->favour.unk_004[0] != EOS) + { + StringCopy7(gStringVar3, gSaveBlock1Ptr->lilycoveLady.favour.unk_004); + ConvertInternationalString(gStringVar3, gUnknown_0203CD64->favour.language); + return TRUE; + } + return FALSE; +} From b4875d82d50b0649c2289b9e470ca0a9ae23782d Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 20 Sep 2017 00:28:00 +0200 Subject: [PATCH 236/342] more battle 4 --- asm/battle_2.s | 10 +- asm/battle_4.s | 2530 +--------------------------------- asm/battle_9.s | 14 +- asm/battle_frontier_1.s | 8 +- asm/rom3.s | 12 +- data/battle_scripts_1.s | 2 +- data/data2b.s | 2 +- include/battle.h | 31 +- include/battle_controllers.h | 11 + src/battle_3.c | 3 +- src/battle_4.c | 644 ++++++++- src/battle_ai.c | 3 - sym_ewram.txt | 2 +- 13 files changed, 763 insertions(+), 2509 deletions(-) create mode 100644 include/battle_controllers.h diff --git a/asm/battle_2.s b/asm/battle_2.s index 3e1d67f4c..debf0eb03 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -6492,7 +6492,7 @@ _0803A0AE: lsrs r0, 31 movs r1, 0 strb r0, [r3, 0x1D] - ldr r0, =gUnknown_02024212 + ldr r0, =gMultiHitCounter strb r1, [r0] ldr r0, =gBattleOutcome strb r1, [r0] @@ -13676,7 +13676,7 @@ _0803E110: strb r2, [r0] ldr r0, =gBattleMoveFlags strb r2, [r0] - ldr r0, =gUnknown_02024212 + ldr r0, =gMultiHitCounter strb r2, [r0] ldr r0, =gBattleCommunication strb r2, [r0, 0x6] @@ -15619,8 +15619,8 @@ bsC_8016D70: @ 803F300 .pool thumb_func_end bsC_8016D70 - thumb_func_start get_battle_side_of_something -get_battle_side_of_something: @ 803F3CC + thumb_func_start GetBattleBank +GetBattleBank: @ 803F3CC push {lr} lsls r0, 24 lsrs r1, r0, 24 @@ -15696,7 +15696,7 @@ _0803F472: _0803F47A: pop {r1} bx r1 - thumb_func_end get_battle_side_of_something + thumb_func_end GetBattleBank thumb_func_start PressurePPLose PressurePPLose: @ 803F480 diff --git a/asm/battle_4.s b/asm/battle_4.s index 8300024e6..e1c02a2fb 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -4,2420 +4,6 @@ .syntax unified .text - - - thumb_func_start atk03_ppreduce -atk03_ppreduce: @ 8046A3C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - movs r6, 0x1 - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - beq _08046A54 - b _08046BEE -_08046A54: - ldr r1, =gSpecialStatuses - ldr r2, =gBankAttacker - ldrb r3, [r2] - lsls r0, r3, 2 - adds r0, r3 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 26 - lsrs r4, r0, 31 - mov r9, r2 - cmp r4, 0 - bne _08046AF6 - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x6] - cmp r0, 0x20 - beq _08046AA6 - cmp r0, 0x20 - bgt _08046AA0 - cmp r0, 0x8 - beq _08046ABC - b _08046AD6 - .pool -_08046AA0: - cmp r0, 0x40 - beq _08046ABC - b _08046AD6 -_08046AA6: - str r4, [sp] - movs r0, 0x12 - adds r1, r3, 0 - movs r2, 0x2E - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r0, 24 - adds r6, r0, 0x1 - b _08046AF6 -_08046ABC: - mov r0, r9 - ldrb r1, [r0] - movs r0, 0 - str r0, [sp] - movs r0, 0x10 - movs r2, 0x2E - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r0, 24 - adds r6, r0 - b _08046AF6 -_08046AD6: - ldr r1, =gBankTarget - mov r2, r9 - ldrb r0, [r2] - ldrb r7, [r1] - cmp r0, r7 - beq _08046AF6 - ldr r2, =gBattleMons - ldrb r1, [r1] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x2E - bne _08046AF6 - adds r6, 0x1 -_08046AF6: - ldr r0, =gHitMarker - ldr r4, [r0] - movs r0, 0xA0 - lsls r0, 4 - ands r4, r0 - cmp r4, 0 - bne _08046BDC - ldr r2, =gBattleMons - ldr r3, =gCurrMovePos - ldr r1, =gBankAttacker - ldrb r5, [r1] - movs r0, 0x58 - mov r8, r0 - mov r0, r8 - muls r0, r5 - ldrb r7, [r3] - adds r0, r7 - movs r7, 0x24 - adds r7, r2 - mov r12, r7 - add r0, r12 - ldrb r0, [r0] - mov r9, r1 - mov r10, r2 - adds r7, r3, 0 - cmp r0, 0 - beq _08046BDC - ldr r0, =gProtectStructs - lsls r1, r5, 4 - adds r1, r0 - ldrb r0, [r1, 0x2] - movs r2, 0x8 - orrs r0, r2 - strb r0, [r1, 0x2] - mov r1, r9 - ldrb r0, [r1] - mov r2, r8 - muls r2, r0 - adds r0, r2, 0 - ldrb r1, [r7] - adds r0, r1 - mov r1, r12 - adds r2, r0, r1 - ldrb r0, [r2] - cmp r0, r6 - ble _08046B70 - subs r0, r6 - strb r0, [r2] - b _08046B72 - .pool -_08046B70: - strb r4, [r2] -_08046B72: - mov r2, r9 - ldrb r3, [r2] - movs r4, 0x58 - adds r0, r3, 0 - muls r0, r4 - mov r1, r10 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 14 - ands r0, r1 - cmp r0, 0 - bne _08046BDC - ldr r1, =gDisableStructs - lsls r0, r3, 3 - subs r0, r3 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x18] - lsrs r1, 4 - ldr r2, =gBitTable - ldrb r0, [r7] - lsls r0, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _08046BDC - ldr r0, =gActiveBank - strb r3, [r0] - ldrb r1, [r7] - adds r1, 0x9 - lsls r1, 24 - lsrs r1, 24 - mov r2, r9 - ldrb r0, [r2] - muls r0, r4 - mov r2, r10 - adds r2, 0x24 - adds r0, r2 - ldrb r7, [r7] - adds r0, r7 - str r0, [sp] - movs r0, 0 - movs r2, 0 - movs r3, 0x1 - bl EmitSetAttributes - mov r7, r9 - ldrb r0, [r7] - bl MarkBufferBankForExecution -_08046BDC: - ldr r2, =gHitMarker - ldr r0, [r2] - ldr r1, =0xfffff7ff - ands r0, r1 - str r0, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] -_08046BEE: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk03_ppreduce - - thumb_func_start atk04_critcalc -atk04_critcalc: @ 8046C18 - push {r4-r7,lr} - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - ldrh r0, [r0, 0x2E] - cmp r0, 0xAF - bne _08046C48 - ldr r1, =gEnigmaBerries - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r1 - ldrb r6, [r0, 0x7] - b _08046C50 - .pool -_08046C48: - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r6, r0, 24 -_08046C50: - ldr r1, =gStringBank - ldr r3, =gBankAttacker - ldrb r0, [r3] - strb r0, [r1] - ldr r4, =gBattleMons - ldrb r1, [r3] - movs r0, 0x58 - adds r7, r1, 0 - muls r7, r0 - adds r0, r4, 0 - adds r0, 0x50 - adds r0, r7, r0 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 13 - ands r0, r1 - negs r0, r0 - asrs r5, r0, 31 - movs r0, 0x2 - ands r5, r0 - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0] - mov r12, r3 - cmp r1, 0x2B - bne _08046C90 - adds r5, 0x1 -_08046C90: - adds r0, r5, 0 - cmp r1, 0x4B - bne _08046C98 - adds r0, 0x1 -_08046C98: - cmp r1, 0xC8 - bne _08046C9E - adds r0, 0x1 -_08046C9E: - adds r2, r0, 0 - cmp r1, 0xD1 - bne _08046CA6 - adds r2, 0x1 -_08046CA6: - movs r1, 0 - cmp r6, 0x3F - bne _08046CB6 - adds r0, r7, r4 - ldrh r0, [r0] - cmp r0, 0x71 - bne _08046CB6 - movs r1, 0x1 -_08046CB6: - lsls r5, r1, 1 - movs r3, 0 - cmp r6, 0x42 - bne _08046CD0 - mov r0, r12 - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r4 - ldrh r0, [r0] - cmp r0, 0x53 - bne _08046CD0 - movs r3, 0x1 -_08046CD0: - lsls r1, r3, 1 - cmp r6, 0x29 - bne _08046CF0 - adds r0, r5, 0x1 - adds r0, r2, r0 - b _08046CF2 - .pool -_08046CF0: - adds r0, r2, r5 -_08046CF2: - adds r0, r1 - lsls r0, 16 - lsrs r0, 16 - adds r5, r0, 0 - cmp r5, 0x4 - bls _08046D00 - movs r5, 0x4 -_08046D00: - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r4 - adds r0, 0x20 - ldrb r4, [r0] - cmp r4, 0x4 - beq _08046D70 - cmp r4, 0x4B - beq _08046D70 - ldr r1, =gStatuses3 - mov r2, r12 - ldrb r0, [r2] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 8 - ands r0, r1 - cmp r0, 0 - bne _08046D70 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x84 - lsls r1, 2 - ands r0, r1 - cmp r0, 0 - bne _08046D70 - bl Random - ldr r2, =gCriticalHitChance - lsls r1, r5, 1 - adds r1, r2 - lsls r0, 16 - lsrs r0, 16 - ldrh r1, [r1] - bl __umodsi3 - lsls r0, 16 - cmp r0, 0 - bne _08046D70 - ldr r1, =gCritMultiplier - movs r0, 0x2 - b _08046D74 - .pool -_08046D70: - ldr r1, =gCritMultiplier - movs r0, 0x1 -_08046D74: - strb r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk04_critcalc - - thumb_func_start atk05_damagecalc1 -atk05_damagecalc1: @ 8046D8C - push {r4-r7,lr} - sub sp, 0x10 - ldr r4, =gSideAffecting - ldr r5, =gBankTarget - ldrb r0, [r5] - bl GetBankIdentity - movs r1, 0x1 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - ldrh r3, [r1] - ldr r6, =gBankAttacker - ldrb r0, [r6] - movs r4, 0x58 - muls r0, r4 - ldr r2, =gBattleMons - adds r0, r2 - ldrb r1, [r5] - muls r1, r4 - adds r1, r2 - ldr r7, =gCurrentMove - ldrh r2, [r7] - ldr r4, =gDynamicBasePower - ldrh r4, [r4] - str r4, [sp] - ldr r4, =gBattleStruct - ldr r4, [r4] - ldrb r4, [r4, 0x13] - str r4, [sp, 0x4] - ldrb r4, [r6] - str r4, [sp, 0x8] - ldrb r4, [r5] - str r4, [sp, 0xC] - bl CalculateBaseDamage - ldr r4, =gBattleMoveDamage - ldr r1, =gCritMultiplier - ldrb r1, [r1] - muls r1, r0 - ldr r0, =gBattleScripting - ldrb r0, [r0, 0xE] - adds r3, r1, 0 - muls r3, r0 - str r3, [r4] - ldr r1, =gStatuses3 - ldrb r0, [r6] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 2 - ands r0, r1 - cmp r0, 0 - beq _08046E10 - ldr r2, =gBattleMoves - ldrh r1, [r7] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x2] - cmp r0, 0xD - bne _08046E10 - lsls r0, r3, 1 - str r0, [r4] -_08046E10: - ldr r1, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 28 - cmp r0, 0 - bge _08046E32 - ldr r4, =gBattleMoveDamage - ldr r1, [r4] - lsls r0, r1, 4 - subs r0, r1 - movs r1, 0xA - bl __divsi3 - str r0, [r4] -_08046E32: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - add sp, 0x10 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk05_damagecalc1 - - thumb_func_start AI_CalcDmg -AI_CalcDmg: @ 8046E7C - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x10 - adds r5, r1, 0 - lsls r0, 24 - lsrs r7, r0, 24 - lsls r5, 24 - lsrs r5, 24 - ldr r4, =gSideAffecting - adds r0, r5, 0 - bl GetBankIdentity - movs r1, 0x1 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - ldrh r3, [r1] - movs r1, 0x58 - adds r0, r7, 0 - muls r0, r1 - ldr r2, =gBattleMons - adds r0, r2 - muls r1, r5 - adds r1, r2 - ldr r2, =gCurrentMove - mov r8, r2 - ldrh r2, [r2] - ldr r6, =gDynamicBasePower - ldrh r4, [r6] - str r4, [sp] - ldr r4, =gBattleStruct - ldr r4, [r4] - ldrb r4, [r4, 0x13] - str r4, [sp, 0x4] - str r7, [sp, 0x8] - str r5, [sp, 0xC] - bl CalculateBaseDamage - ldr r4, =gBattleMoveDamage - movs r1, 0 - strh r1, [r6] - ldr r1, =gCritMultiplier - ldrb r1, [r1] - muls r1, r0 - ldr r0, =gBattleScripting - ldrb r0, [r0, 0xE] - adds r3, r1, 0 - muls r3, r0 - str r3, [r4] - ldr r1, =gStatuses3 - lsls r0, r7, 2 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 2 - ands r0, r1 - cmp r0, 0 - beq _08046F0A - ldr r2, =gBattleMoves - mov r0, r8 - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x2] - cmp r0, 0xD - bne _08046F0A - lsls r0, r3, 1 - str r0, [r4] -_08046F0A: - ldr r0, =gProtectStructs - lsls r1, r7, 4 - adds r1, r0 - ldrb r0, [r1] - lsls r0, 28 - cmp r0, 0 - bge _08046F28 - ldr r4, =gBattleMoveDamage - ldr r1, [r4] - lsls r0, r1, 4 - subs r0, r1 - movs r1, 0xA - bl __divsi3 - str r0, [r4] -_08046F28: - add sp, 0x10 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end AI_CalcDmg - - thumb_func_start battle_attack_damage_modulate_by_effectivity -battle_attack_damage_modulate_by_effectivity: @ 8046F60 - push {r4,r5,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r5, =gBattleMoveDamage - ldr r0, [r5] - muls r0, r4 - movs r1, 0xA - bl __divsi3 - str r0, [r5] - cmp r0, 0 - bne _08046F80 - cmp r4, 0 - beq _08046F80 - movs r0, 0x1 - str r0, [r5] -_08046F80: - cmp r4, 0x5 - beq _08046FB0 - cmp r4, 0x5 - bgt _08046F94 - cmp r4, 0 - beq _08046F9A - b _08047032 - .pool -_08046F94: - cmp r4, 0x14 - beq _08046FF0 - b _08047032 -_08046F9A: - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x8 - orrs r0, r1 - movs r1, 0xFB - ands r0, r1 - movs r1, 0xFD - ands r0, r1 - b _08047030 - .pool -_08046FB0: - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - cmp r0, 0 - beq _08047032 - ldr r2, =gBattleMoveFlags - ldrb r1, [r2] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - bne _08047032 - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _08046FEC - movs r0, 0xFD - ands r0, r1 - b _08047030 - .pool -_08046FEC: - movs r0, 0x4 - b _0804702E -_08046FF0: - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - cmp r0, 0 - beq _08047032 - ldr r2, =gBattleMoveFlags - ldrb r1, [r2] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - bne _08047032 - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _0804702C - movs r0, 0xFB - ands r0, r1 - b _08047030 - .pool -_0804702C: - movs r0, 0x2 -_0804702E: - orrs r0, r1 -_08047030: - strb r0, [r2] -_08047032: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end battle_attack_damage_modulate_by_effectivity - - thumb_func_start atk06_typecalc -atk06_typecalc: @ 8047038 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x8 - movs r3, 0 - ldr r1, =gCurrentMove - ldrh r0, [r1] - cmp r0, 0xA5 - bne _0804704C - b _08047260 -_0804704C: - ldr r0, =gBattleStruct - ldr r0, [r0] - ldrb r0, [r0, 0x13] - cmp r0, 0 - beq _08047068 - movs r1, 0x3F - mov r8, r1 - ands r1, r0 - mov r8, r1 - b _08047078 - .pool -_08047068: - ldr r2, =gBattleMoves - ldrh r1, [r1] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x2] - mov r8, r0 -_08047078: - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r1, r0, r2 - adds r0, r1, 0 - adds r0, 0x21 - ldrb r0, [r0] - adds r5, r2, 0 - cmp r0, r8 - beq _0804709A - adds r0, r1, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, r8 - bne _080470B0 -_0804709A: - ldr r4, =gBattleMoveDamage - ldr r1, [r4] - lsls r0, r1, 4 - subs r0, r1 - str r0, [r4] - movs r1, 0xA - str r3, [sp, 0x4] - bl __divsi3 - str r0, [r4] - ldr r3, [sp, 0x4] -_080470B0: - ldr r2, =gBankTarget - ldrb r1, [r2] - movs r0, 0x58 - muls r0, r1 - adds r0, r5 - adds r0, 0x20 - ldrb r0, [r0] - adds r4, r2, 0 - cmp r0, 0x1A - bne _08047128 - mov r1, r8 - cmp r1, 0x4 - bne _08047128 - ldr r3, =gLastUsedAbility - strb r0, [r3] - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x9 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gUnknown_02024250 - ldrb r0, [r4] - lsls r0, 1 - adds r0, r1 - movs r2, 0 - strh r2, [r0] - ldr r1, =gUnknown_02024258 - ldrb r0, [r4] - lsls r0, 1 - adds r0, r1 - strh r2, [r0] - ldr r0, =gBattleCommunication - mov r1, r8 - strb r1, [r0, 0x6] - ldrb r0, [r4] - ldrb r1, [r3] - bl RecordAbilityBattle - b _080471C4 - .pool -_08047128: - ldr r1, =gUnknown_0831ACE8 - adds r0, r3, r1 - ldrb r0, [r0] - adds r2, r1, 0 - b _080471A4 - .pool -_08047138: - adds r3, 0x3 - b _080471A0 -_0804713C: - ldr r5, =gUnknown_0831ACE8 - adds r0, r3, r5 - ldrb r0, [r0] - cmp r0, r8 - bne _08047198 - adds r1, r3, 0x1 - adds r1, r5 - ldr r2, =gBattleMons - ldr r7, =gBankTarget - ldrb r0, [r7] - movs r6, 0x58 - muls r0, r6 - adds r0, r2 - adds r0, 0x21 - ldrb r4, [r1] - ldrb r0, [r0] - cmp r4, r0 - bne _08047172 - adds r0, r3, 0x2 - adds r0, r5 - ldrb r0, [r0] - str r2, [sp] - str r3, [sp, 0x4] - bl battle_attack_damage_modulate_by_effectivity - ldr r3, [sp, 0x4] - ldr r2, [sp] -_08047172: - ldrb r0, [r7] - muls r0, r6 - adds r0, r2 - adds r1, r0, 0 - adds r1, 0x22 - ldrb r1, [r1] - cmp r4, r1 - bne _08047198 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, r4 - beq _08047198 - adds r0, r3, 0x2 - adds r0, r5 - ldrb r0, [r0] - str r3, [sp, 0x4] - bl battle_attack_damage_modulate_by_effectivity - ldr r3, [sp, 0x4] -_08047198: - adds r3, 0x3 - ldr r5, =gBattleMons - ldr r4, =gBankTarget - ldr r2, =gUnknown_0831ACE8 -_080471A0: - adds r0, r3, r2 - ldrb r0, [r0] -_080471A4: - cmp r0, 0xFF - beq _080471C4 - cmp r0, 0xFE - bne _0804713C - ldrb r1, [r4] - movs r0, 0x58 - muls r0, r1 - adds r1, r5, 0 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 22 - ands r0, r1 - cmp r0, 0 - beq _08047138 -_080471C4: - ldr r2, =gBattleMons - ldr r5, =gBankTarget - ldrb r1, [r5] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x20 - ldrb r6, [r0] - cmp r6, 0x19 - bne _08047242 - ldr r0, =gBankAttacker - ldrb r0, [r0] - ldr r7, =gCurrentMove - ldrh r1, [r7] - bl move_weather_interaction - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - bne _08047242 - ldr r1, =gBattleMoveFlags - mov r8, r1 - ldrb r4, [r1] - ands r0, r4 - cmp r0, 0 - beq _08047200 - movs r0, 0x6 - ands r0, r4 - cmp r0, 0x6 - bne _08047242 -_08047200: - ldr r2, =gBattleMoves - ldrh r1, [r7] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - cmp r0, 0 - beq _08047242 - ldr r3, =gLastUsedAbility - strb r6, [r3] - movs r0, 0x1 - orrs r0, r4 - mov r1, r8 - strb r0, [r1] - ldr r1, =gUnknown_02024250 - ldrb r0, [r5] - lsls r0, 1 - adds r0, r1 - movs r2, 0 - strh r2, [r0] - ldr r1, =gUnknown_02024258 - ldrb r0, [r5] - lsls r0, 1 - adds r0, r1 - strh r2, [r0] - ldr r1, =gBattleCommunication - movs r0, 0x3 - strb r0, [r1, 0x6] - ldrb r0, [r5] - ldrb r1, [r3] - bl RecordAbilityBattle -_08047242: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x8 - ands r0, r1 - cmp r0, 0 - beq _08047260 - ldr r2, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r1, 4 - adds r1, r2 - ldrb r0, [r1, 0x1] - movs r2, 0x2 - orrs r0, r2 - strb r0, [r1, 0x1] -_08047260: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - add sp, 0x8 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk06_typecalc - - thumb_func_start b_wonderguard_and_levitate -b_wonderguard_and_levitate: @ 80472A8 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - movs r6, 0 - movs r5, 0 - ldr r0, =gCurrentMove - ldrh r1, [r0] - mov r9, r0 - cmp r1, 0xA5 - bne _080472C0 - b _08047508 -_080472C0: - ldr r2, =gBattleMoves - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r1, r0, r2 - ldrb r0, [r1, 0x1] - cmp r0, 0 - bne _080472D2 - b _08047508 -_080472D2: - ldr r0, =gBattleStruct - ldr r0, [r0] - ldrb r0, [r0, 0x13] - cmp r0, 0 - beq _080472F4 - movs r1, 0x3F - mov r12, r1 - mov r2, r12 - ands r2, r0 - mov r12, r2 - b _080472F8 - .pool -_080472F4: - ldrb r1, [r1, 0x2] - mov r12, r1 -_080472F8: - ldr r2, =gBattleMons - ldr r3, =gBankTarget - ldrb r1, [r3] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x20 - ldrb r1, [r0] - adds r7, r2, 0 - mov r8, r3 - cmp r1, 0x1A - bne _0804733C - mov r0, r12 - cmp r0, 0x4 - bne _0804733C - ldr r0, =gLastUsedAbility - strb r1, [r0] - ldr r0, =gBattleCommunication - mov r1, r12 - strb r1, [r0, 0x6] - ldrb r0, [r3] - movs r1, 0x1A - bl RecordAbilityBattle - b _08047508 - .pool -_0804733C: - ldr r1, =gUnknown_0831ACE8 - adds r0, r5, r1 - ldrb r0, [r0] - adds r4, r1, 0 - b _0804748E - .pool -_0804734C: - adds r0, r5, r4 - ldrb r0, [r0] - cmp r0, r12 - beq _08047356 - b _08047488 -_08047356: - adds r2, r5, 0x1 - adds r3, r2, r4 - mov r0, r8 - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r7 - adds r0, 0x21 - ldrb r1, [r3] - adds r3, r2, 0 - ldrb r0, [r0] - cmp r1, r0 - bne _08047396 - adds r0, r5, 0x2 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0 - bne _08047396 - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x8 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r2, [r0] - lsls r2, 4 - adds r2, r1 - ldrb r0, [r2, 0x1] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r2, 0x1] -_08047396: - adds r2, r3, r4 - mov r0, r8 - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r7 - adds r1, r0, 0 - adds r1, 0x22 - ldrb r2, [r2] - ldrb r1, [r1] - cmp r2, r1 - bne _080473DC - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, r2 - beq _080473DC - adds r0, r5, 0x2 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0 - bne _080473DC - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x8 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r2, [r0] - lsls r2, 4 - adds r2, r1 - ldrb r0, [r2, 0x1] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r2, 0x1] -_080473DC: - adds r2, r3, r4 - mov r0, r8 - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r7 - adds r0, 0x21 - ldrb r1, [r2] - ldrb r0, [r0] - cmp r1, r0 - bne _08047400 - adds r0, r5, 0x2 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0x14 - bne _08047400 - movs r0, 0x1 - orrs r6, r0 -_08047400: - adds r2, r3, r4 - mov r0, r8 - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r7 - adds r1, r0, 0 - adds r1, 0x22 - ldrb r2, [r2] - ldrb r1, [r1] - cmp r2, r1 - bne _0804742E - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, r2 - beq _0804742E - adds r0, r5, 0x2 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0x14 - bne _0804742E - movs r0, 0x1 - orrs r6, r0 -_0804742E: - adds r2, r3, r4 - mov r0, r8 - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r7 - adds r0, 0x21 - ldrb r1, [r2] - ldrb r0, [r0] - cmp r1, r0 - bne _08047456 - adds r0, r5, 0x2 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0x5 - bne _08047456 - movs r0, 0x2 - orrs r6, r0 - lsls r0, r6, 24 - lsrs r6, r0, 24 -_08047456: - adds r2, r3, r4 - mov r0, r8 - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r7 - adds r1, r0, 0 - adds r1, 0x22 - ldrb r2, [r2] - ldrb r1, [r1] - cmp r2, r1 - bne _08047488 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, r2 - beq _08047488 - adds r0, r5, 0x2 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0x5 - bne _08047488 - movs r0, 0x2 - orrs r6, r0 - lsls r0, r6, 24 - lsrs r6, r0, 24 -_08047488: - adds r5, 0x3 - adds r0, r5, r4 - ldrb r0, [r0] -_0804748E: - cmp r0, 0xFF - beq _080474B2 - cmp r0, 0xFE - beq _08047498 - b _0804734C -_08047498: - mov r2, r8 - ldrb r1, [r2] - movs r0, 0x58 - muls r0, r1 - adds r1, r7, 0 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 22 - ands r0, r1 - cmp r0, 0 - beq _08047488 -_080474B2: - mov r0, r8 - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r7 - adds r0, 0x20 - ldrb r4, [r0] - cmp r4, 0x19 - bne _08047508 - ldr r0, =gBankAttacker - ldrb r0, [r0] - mov r2, r9 - ldrh r1, [r2] - bl move_weather_interaction - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - bne _08047508 - movs r0, 0x3 - ands r6, r0 - cmp r6, 0x1 - beq _08047508 - ldr r2, =gBattleMoves - mov r0, r9 - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - cmp r0, 0 - beq _08047508 - ldr r0, =gLastUsedAbility - strb r4, [r0] - ldr r1, =gBattleCommunication - movs r0, 0x3 - strb r0, [r1, 0x6] - mov r1, r8 - ldrb r0, [r1] - movs r1, 0x19 - bl RecordAbilityBattle -_08047508: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end b_wonderguard_and_levitate - - thumb_func_start b_attack_effectivity_adapt -b_attack_effectivity_adapt: @ 804752C - push {r4-r7,lr} - adds r6, r2, 0 - lsls r0, 24 - lsrs r4, r0, 24 - lsls r1, 16 - lsrs r5, r1, 16 - ldr r7, =gBattleMoveDamage - ldr r0, [r7] - muls r0, r4 - movs r1, 0xA - bl __divsi3 - str r0, [r7] - cmp r0, 0 - bne _08047552 - cmp r4, 0 - beq _08047552 - movs r0, 0x1 - str r0, [r7] -_08047552: - cmp r4, 0x5 - beq _0804757A - cmp r4, 0x5 - bgt _08047564 - cmp r4, 0 - beq _0804756A - b _080475DE - .pool -_08047564: - cmp r4, 0x14 - beq _080475AC - b _080475DE -_0804756A: - ldrb r0, [r6] - movs r1, 0x8 - orrs r0, r1 - movs r1, 0xFB - ands r0, r1 - movs r1, 0xFD - ands r0, r1 - b _080475DC -_0804757A: - ldr r0, =gBattleMoves - lsls r1, r5, 1 - adds r1, r5 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x1] - cmp r0, 0 - beq _080475DE - ldrb r1, [r6] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - bne _080475DE - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _080475A8 - movs r0, 0xFD - ands r0, r1 - b _080475DC - .pool -_080475A8: - movs r0, 0x4 - b _080475DA -_080475AC: - ldr r0, =gBattleMoves - lsls r1, r5, 1 - adds r1, r5 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x1] - cmp r0, 0 - beq _080475DE - ldrb r1, [r6] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - bne _080475DE - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _080475D8 - movs r0, 0xFB - ands r0, r1 - b _080475DC - .pool -_080475D8: - movs r0, 0x2 -_080475DA: - orrs r0, r1 -_080475DC: - strb r0, [r6] -_080475DE: - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end b_attack_effectivity_adapt - - thumb_func_start TypeCalc -TypeCalc: @ 80475E4 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x10 - lsls r0, 16 - lsrs r0, 16 - mov r10, r0 - lsls r1, 24 - lsrs r1, 24 - str r1, [sp, 0x4] - lsls r2, 24 - lsrs r2, 24 - mov r9, r2 - movs r0, 0 - mov r8, r0 - mov r0, sp - mov r1, r8 - strb r1, [r0] - mov r2, r10 - cmp r2, 0xA5 - bne _08047616 - movs r0, 0 - b _0804779E -_08047616: - ldr r1, =gBattleMoves - mov r3, r10 - lsls r2, r3, 1 - adds r0, r2, r3 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0, 0x2] - str r0, [sp, 0x8] - ldr r1, =gBattleMons - movs r0, 0x58 - ldr r3, [sp, 0x4] - muls r0, r3 - adds r3, r0, r1 - adds r0, r3, 0 - adds r0, 0x21 - ldrb r0, [r0] - str r2, [sp, 0xC] - adds r5, r1, 0 - ldr r1, [sp, 0x8] - cmp r0, r1 - beq _0804764A - adds r0, r3, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, r1 - bne _0804765C -_0804764A: - ldr r4, =gBattleMoveDamage - ldr r1, [r4] - lsls r0, r1, 4 - subs r0, r1 - str r0, [r4] - movs r1, 0xA - bl __divsi3 - str r0, [r4] -_0804765C: - movs r0, 0x58 - mov r2, r9 - muls r2, r0 - adds r0, r2, 0 - adds r0, r5 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x1A - bne _08047690 - ldr r3, [sp, 0x8] - cmp r3, 0x4 - bne _08047690 - movs r1, 0x9 - mov r0, sp - ldrb r0, [r0] - orrs r0, r1 - mov r1, sp - strb r0, [r1] - b _08047740 - .pool -_08047690: - ldr r1, =gUnknown_0831ACE8 - mov r2, r8 - adds r0, r2, r1 - ldrb r0, [r0] - adds r2, r1, 0 - cmp r0, 0xFF - beq _08047740 - cmp r0, 0xFE - bne _080476B6 - movs r0, 0x58 - mov r3, r9 - muls r3, r0 - adds r0, r3, 0 - b _0804772E - .pool -_080476B0: - movs r0, 0x3 - add r8, r0 - b _08047718 -_080476B6: - ldr r7, =gUnknown_0831ACE8 - mov r1, r8 - adds r0, r1, r7 - ldrb r0, [r0] - ldr r2, [sp, 0x8] - cmp r0, r2 - bne _08047710 - adds r1, 0x1 - adds r1, r7 - ldr r2, =gBattleMons - movs r0, 0x58 - mov r3, r9 - muls r3, r0 - adds r0, r3, 0 - adds r5, r0, r2 - adds r6, r5, 0 - adds r6, 0x21 - ldrb r4, [r1] - ldrb r0, [r6] - cmp r4, r0 - bne _080476F0 - mov r0, r8 - adds r0, 0x2 - adds r0, r7 - ldrb r0, [r0] - mov r1, r10 - mov r2, sp - bl b_attack_effectivity_adapt -_080476F0: - adds r0, r5, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r4, r0 - bne _08047710 - ldrb r0, [r6] - cmp r0, r4 - beq _08047710 - mov r0, r8 - adds r0, 0x2 - adds r0, r7 - ldrb r0, [r0] - mov r1, r10 - mov r2, sp - bl b_attack_effectivity_adapt -_08047710: - movs r1, 0x3 - add r8, r1 - ldr r5, =gBattleMons - ldr r2, =gUnknown_0831ACE8 -_08047718: - mov r3, r8 - adds r0, r3, r2 - ldrb r0, [r0] - cmp r0, 0xFF - beq _08047740 - cmp r0, 0xFE - bne _080476B6 - movs r0, 0x58 - mov r1, r9 - muls r1, r0 - adds r0, r1, 0 -_0804772E: - adds r1, r5, 0 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 22 - ands r0, r1 - cmp r0, 0 - beq _080476B0 -_08047740: - movs r0, 0x58 - mov r2, r9 - muls r2, r0 - adds r0, r2, 0 - adds r0, r5 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x19 - bne _0804779A - mov r0, sp - ldrb r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _0804779A - ldr r0, [sp, 0x4] - mov r1, r10 - bl move_weather_interaction - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0x2 - bne _0804779A - mov r0, sp - ldrb r3, [r0] - adds r0, r1, 0 - ands r0, r3 - cmp r0, 0 - beq _08047782 - movs r0, 0x6 - ands r0, r3 - cmp r0, 0x6 - bne _0804779A -_08047782: - ldr r0, =gBattleMoves - ldr r1, [sp, 0xC] - add r1, r10 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x1] - cmp r0, 0 - beq _0804779A - mov r0, sp - movs r1, 0x1 - orrs r1, r3 - strb r1, [r0] -_0804779A: - mov r0, sp - ldrb r0, [r0] -_0804779E: - add sp, 0x10 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end TypeCalc - - thumb_func_start ai_rate_move -ai_rate_move: @ 80477BC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0xC - lsls r0, 16 - lsrs r6, r0, 16 - lsls r1, 16 - lsrs r1, 16 - lsls r2, 24 - lsrs r2, 24 - str r2, [sp, 0x4] - movs r7, 0 - mov r0, sp - strb r7, [r0] - ldr r2, =gBaseStats - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0, 0x6] - mov r9, r1 - ldrb r0, [r0, 0x7] - mov r8, r0 - cmp r6, 0xA5 - bne _080477FC - movs r0, 0 - b _080478A0 - .pool -_080477FC: - ldr r2, =gBattleMoves - lsls r1, r6, 1 - adds r0, r1, r6 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x2] - mov r10, r0 - str r1, [sp, 0x8] - ldr r3, [sp, 0x4] - cmp r3, 0x1A - bne _08047824 - cmp r0, 0x4 - bne _08047824 - movs r1, 0x9 - mov r0, sp - strb r1, [r0] - b _0804786A - .pool -_08047824: - ldr r0, =gUnknown_0831ACE8 - adds r1, r7, r0 - ldrb r0, [r1] - cmp r0, 0xFF - beq _0804786A - adds r4, r1, 0 -_08047830: - ldrb r0, [r4] - cmp r0, 0xFE - beq _0804785C - cmp r0, r10 - bne _0804785C - ldrb r5, [r4, 0x1] - cmp r5, r9 - bne _0804784A - ldrb r0, [r4, 0x2] - adds r1, r6, 0 - mov r2, sp - bl b_attack_effectivity_adapt -_0804784A: - cmp r5, r8 - bne _0804785C - cmp r9, r8 - beq _0804785C - ldrb r0, [r4, 0x2] - adds r1, r6, 0 - mov r2, sp - bl b_attack_effectivity_adapt -_0804785C: - adds r4, 0x3 - adds r7, 0x3 - ldr r1, =gUnknown_0831ACE8 - adds r0, r7, r1 - ldrb r0, [r0] - cmp r0, 0xFF - bne _08047830 -_0804786A: - ldr r3, [sp, 0x4] - cmp r3, 0x19 - bne _0804789C - mov r0, sp - ldrb r2, [r0] - movs r0, 0x2 - ands r0, r2 - cmp r0, 0 - beq _08047884 - movs r0, 0x6 - ands r0, r2 - cmp r0, 0x6 - bne _0804789C -_08047884: - ldr r0, =gBattleMoves - ldr r3, [sp, 0x8] - adds r1, r3, r6 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x1] - cmp r0, 0 - beq _0804789C - mov r0, sp - movs r1, 0x8 - orrs r1, r2 - strb r1, [r0] -_0804789C: - mov r0, sp - ldrb r0, [r0] -_080478A0: - add sp, 0xC - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end ai_rate_move - - thumb_func_start sub_80478B8 -sub_80478B8: @ 80478B8 - push {r4,lr} - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0xF - ands r0, r1 - movs r1, 0x64 - subs r1, r0 - lsls r1, 16 - lsrs r1, 16 - ldr r4, =gBattleMoveDamage - ldr r0, [r4] - cmp r0, 0 - beq _080478EA - muls r0, r1 - str r0, [r4] - movs r1, 0x64 - bl __divsi3 - str r0, [r4] - cmp r0, 0 - bne _080478EA - movs r0, 0x1 - str r0, [r4] -_080478EA: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80478B8 - - thumb_func_start atk07_dmg_adjustment -atk07_dmg_adjustment: @ 80478F4 - push {r4-r7,lr} - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0xF - ands r0, r1 - movs r1, 0x64 - subs r1, r0 - lsls r1, 16 - lsrs r1, 16 - ldr r4, =gBattleMoveDamage - ldr r0, [r4] - cmp r0, 0 - beq _08047926 - muls r0, r1 - str r0, [r4] - movs r1, 0x64 - bl __divsi3 - str r0, [r4] - cmp r0, 0 - bne _08047926 - movs r0, 0x1 - str r0, [r4] -_08047926: - ldr r7, =gBattleMons - ldr r6, =gBankTarget - ldrb r2, [r6] - movs r5, 0x58 - adds r0, r2, 0 - muls r0, r5 - adds r1, r0, r7 - ldrh r0, [r1, 0x2E] - cmp r0, 0xAF - bne _0804795C - ldr r1, =gEnigmaBerries - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r1 - ldrb r4, [r0, 0x7] - ldrb r6, [r0, 0x1A] - b _08047976 - .pool -_0804795C: - ldrh r0, [r1, 0x2E] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r4, r0, 24 - ldrb r0, [r6] - muls r0, r5 - adds r0, r7 - ldrh r0, [r0, 0x2E] - bl ItemId_GetHoldEffectParam - lsls r0, 24 - lsrs r6, r0, 24 -_08047976: - ldr r1, =gStringBank - ldr r5, =gBankTarget - ldrb r0, [r5] - strb r0, [r1] - cmp r4, 0x27 - bne _080479B4 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x64 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - cmp r0, r6 - bcs _080479B4 - ldrb r0, [r5] - movs r1, 0x27 - bl RecordItemEffectBattle - ldr r2, =gSpecialStatuses - ldrb r1, [r5] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0] - movs r2, 0x80 - orrs r1, r2 - strb r1, [r0] -_080479B4: - ldr r2, =gBattleMons - ldr r3, =gBankTarget - ldrb r4, [r3] - movs r0, 0x58 - muls r0, r4 - adds r1, r2, 0 - adds r1, 0x50 - adds r0, r1 - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 17 - ands r1, r0 - adds r5, r2, 0 - cmp r1, 0 - bne _08047A84 - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - cmp r0, 0x65 - beq _08047A06 - ldr r0, =gProtectStructs - lsls r1, r4, 4 - adds r1, r0 - ldrb r0, [r1] - lsls r0, 30 - cmp r0, 0 - blt _08047A06 - ldr r0, =gSpecialStatuses - lsls r1, r4, 2 - adds r1, r4 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1] - lsrs r0, 7 - cmp r0, 0 - beq _08047A84 -_08047A06: - ldrb r0, [r3] - movs r4, 0x58 - muls r0, r4 - adds r0, r5 - ldrh r1, [r0, 0x28] - ldr r2, =gBattleMoveDamage - ldr r0, [r2] - cmp r1, r0 - bgt _08047A84 - subs r0, r1, 0x1 - str r0, [r2] - ldr r1, =gProtectStructs - ldrb r3, [r3] - lsls r0, r3, 4 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 30 - cmp r0, 0 - bge _08047A5C - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r2, 0x40 - orrs r1, r2 - strb r1, [r0] - b _08047A84 - .pool -_08047A5C: - ldr r0, =gSpecialStatuses - lsls r1, r3, 2 - adds r1, r3 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1] - lsrs r0, 7 - cmp r0, 0 - beq _08047A84 - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gLastUsedItem - adds r0, r3, 0 - muls r0, r4 - adds r0, r5 - ldrh r0, [r0, 0x2E] - strh r0, [r1] -_08047A84: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk07_dmg_adjustment - - thumb_func_start atk08_dmg_adjustment2 -atk08_dmg_adjustment2: @ 8047AA4 - push {r4-r7,lr} - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0xF - ands r0, r1 - movs r1, 0x64 - subs r1, r0 - lsls r1, 16 - lsrs r1, 16 - ldr r4, =gBattleMoveDamage - ldr r0, [r4] - cmp r0, 0 - beq _08047AD6 - muls r0, r1 - str r0, [r4] - movs r1, 0x64 - bl __divsi3 - str r0, [r4] - cmp r0, 0 - bne _08047AD6 - movs r0, 0x1 - str r0, [r4] -_08047AD6: - ldr r7, =gBattleMons - ldr r6, =gBankTarget - ldrb r2, [r6] - movs r5, 0x58 - adds r0, r2, 0 - muls r0, r5 - adds r1, r0, r7 - ldrh r0, [r1, 0x2E] - cmp r0, 0xAF - bne _08047B0C - ldr r1, =gEnigmaBerries - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r1 - ldrb r4, [r0, 0x7] - ldrb r6, [r0, 0x1A] - b _08047B26 - .pool -_08047B0C: - ldrh r0, [r1, 0x2E] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r4, r0, 24 - ldrb r0, [r6] - muls r0, r5 - adds r0, r7 - ldrh r0, [r0, 0x2E] - bl ItemId_GetHoldEffectParam - lsls r0, 24 - lsrs r6, r0, 24 -_08047B26: - ldr r1, =gStringBank - ldr r5, =gBankTarget - ldrb r0, [r5] - strb r0, [r1] - cmp r4, 0x27 - bne _08047B64 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x64 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - cmp r0, r6 - bcs _08047B64 - ldrb r0, [r5] - movs r1, 0x27 - bl RecordItemEffectBattle - ldr r2, =gSpecialStatuses - ldrb r1, [r5] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0] - movs r2, 0x80 - orrs r1, r2 - strb r1, [r0] -_08047B64: - ldr r4, =gBattleMons - ldr r6, =gBankTarget - ldrb r2, [r6] - movs r7, 0x58 - adds r3, r2, 0 - muls r3, r7 - adds r0, r4, 0 - adds r0, 0x50 - adds r0, r3, r0 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 17 - ands r0, r1 - cmp r0, 0 - bne _08047C10 - ldr r5, =gProtectStructs - lsls r0, r2, 4 - adds r0, r5 - ldrb r0, [r0] - lsls r0, 30 - cmp r0, 0 - blt _08047BA2 - ldr r0, =gSpecialStatuses - lsls r1, r2, 2 - adds r1, r2 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1] - lsrs r0, 7 - cmp r0, 0 - beq _08047C10 -_08047BA2: - adds r0, r3, r4 - ldrh r1, [r0, 0x28] - ldr r2, =gBattleMoveDamage - ldr r0, [r2] - cmp r1, r0 - bgt _08047C10 - subs r0, r1, 0x1 - str r0, [r2] - ldrb r3, [r6] - lsls r0, r3, 4 - adds r0, r5 - ldrb r0, [r0] - lsls r0, 30 - cmp r0, 0 - bge _08047BE8 - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r2, 0x40 - orrs r1, r2 - strb r1, [r0] - b _08047C10 - .pool -_08047BE8: - ldr r0, =gSpecialStatuses - lsls r1, r3, 2 - adds r1, r3 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1] - lsrs r0, 7 - cmp r0, 0 - beq _08047C10 - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gLastUsedItem - adds r0, r3, 0 - muls r0, r7 - adds r0, r4 - ldrh r0, [r0, 0x2E] - strh r0, [r1] -_08047C10: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk08_dmg_adjustment2 - - thumb_func_start atk09_attackanimation -atk09_attackanimation: @ 8047C30 - push {r4-r7,lr} - sub sp, 0x10 - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - beq _08047C3E - b _08047DB6 -_08047C3E: - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - ands r0, r1 - ldr r5, =gCurrentMove - cmp r0, 0 - beq _08047C8C - ldrh r0, [r5] - cmp r0, 0x90 - beq _08047C8C - cmp r0, 0xA4 - beq _08047C8C - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =gUnknown_082DABB9 - str r0, [r4] - ldr r1, =gBattleScripting - ldrb r0, [r1, 0x18] - adds r0, 0x1 - strb r0, [r1, 0x18] - ldrb r0, [r1, 0x19] - adds r0, 0x1 - strb r0, [r1, 0x19] - b _08047DB6 - .pool -_08047C8C: - ldr r2, =gBattleMoves - ldrh r1, [r5] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0, 0x6] - movs r0, 0x8 - ands r0, r1 - cmp r0, 0 - bne _08047CB2 - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - bne _08047CB2 - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08047CBA -_08047CB2: - ldr r0, =gBattleScripting - ldrb r0, [r0, 0x19] - cmp r0, 0 - bne _08047D88 -_08047CBA: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - bne _08047DA8 - ldr r1, =gActiveBank - ldr r3, =gBankAttacker - ldrb r0, [r3] - strb r0, [r1] - ldr r2, =gBattleMons - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - adds r4, r1, 0 - muls r4, r0 - adds r0, r2, 0 - adds r0, 0x50 - adds r0, r4, r0 - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 17 - ands r1, r0 - adds r7, r3, 0 - mov r12, r2 - cmp r1, 0 - beq _08047D18 - ldr r0, =gUnknown_02024212 - ldrb r6, [r0] - b _08047D42 - .pool -_08047D18: - ldr r3, =gUnknown_02024212 - ldrb r0, [r3] - cmp r0, 0x1 - bls _08047D40 - mov r1, r12 - adds r0, r4, r1 - ldrh r2, [r0, 0x28] - ldr r0, =gBattleMoveDamage - ldr r1, [r0] - movs r6, 0x1 - adds r4, r0, 0 - cmp r2, r1 - ble _08047D44 - ldrb r6, [r3] - b _08047D44 - .pool -_08047D40: - ldrb r6, [r3] -_08047D42: - ldr r4, =gBattleMoveDamage -_08047D44: - ldrh r1, [r5] - ldr r5, =gBattleScripting - ldrb r2, [r5, 0x18] - ldr r0, =gBattleMovePower - ldrh r3, [r0] - ldr r0, [r4] - str r0, [sp] - ldrb r4, [r7] - movs r0, 0x58 - muls r0, r4 - add r0, r12 - adds r0, 0x2B - ldrb r0, [r0] - str r0, [sp, 0x4] - ldrb r4, [r7] - lsls r0, r4, 3 - subs r0, r4 - lsls r0, 2 - ldr r4, =gDisableStructs - adds r0, r4 - str r0, [sp, 0x8] - str r6, [sp, 0xC] - movs r0, 0 - bl dp01_build_cmdbuf_x0F_aa_b_cc_dddd_e_mlc_weather_00_x1Cbytes - ldrb r0, [r5, 0x18] - adds r0, 0x1 - strb r0, [r5, 0x18] - ldrb r0, [r5, 0x19] - adds r0, 0x1 - strb r0, [r5, 0x19] - ldrb r0, [r7] - bl MarkBufferBankForExecution -_08047D88: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - b _08047DB6 - .pool -_08047DA8: - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =gUnknown_082DABB9 - str r0, [r4] -_08047DB6: - add sp, 0x10 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk09_attackanimation - - thumb_func_start atk0A_waitanimation -atk0A_waitanimation: @ 8047DC8 - push {lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _08047DDA - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] -_08047DDA: - pop {r0} - bx r0 - .pool - thumb_func_end atk0A_waitanimation - - thumb_func_start atk0B_healthbarupdate -atk0B_healthbarupdate: @ 8047DE8 - push {r4,lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _08047EAA - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - bne _08047EA2 - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl get_battle_side_of_something - ldr r2, =gActiveBank - strb r0, [r2] - ldr r1, =gBattleMons - ldrb r2, [r2] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 17 - ands r0, r1 - cmp r0, 0 - beq _08047E68 - ldr r0, =gDisableStructs - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0xA] - cmp r0, 0 - beq _08047E68 - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 1 - ands r0, r1 - cmp r0, 0 - bne _08047E68 - movs r0, 0x80 - adds r1, r2, 0 - bl PrepareStringBattle - b _08047EA2 - .pool -_08047E68: - ldr r0, =gBattleMoveDamage - ldr r0, [r0] - ldr r1, =0x00002710 - cmp r0, r1 - bgt _08047E76 - lsls r0, 16 - lsrs r1, r0, 16 -_08047E76: - movs r0, 0 - bl dp01_build_cmdbuf_x18_0_aa_health_bar_update - ldr r4, =gActiveBank - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _08047EA2 - ldr r0, =gBattleMoveDamage - ldr r0, [r0] - cmp r0, 0 - ble _08047EA2 - ldr r0, =gBattleResults - ldrb r1, [r0, 0x5] - movs r2, 0x1 - orrs r1, r2 - strb r1, [r0, 0x5] -_08047EA2: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] -_08047EAA: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk0B_healthbarupdate thumb_func_start atk0C_datahpupdate atk0C_datahpupdate: @ 8047EC4 @@ -2463,7 +49,7 @@ _08047F12: ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r7, =gActiveBank strb r0, [r7] ldr r1, =gBattleMons @@ -2831,7 +417,7 @@ _08048274: ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r1, =gActiveBank strb r0, [r1] ldr r2, =gSpecialStatuses @@ -5554,7 +3140,7 @@ atk18_status_effect_clear: @ 8049AE0 ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r2, =gActiveBank strb r0, [r2] ldr r3, =gBattleCommunication @@ -5612,7 +3198,7 @@ atk19_faint_pokemon: @ 8049B5C cmp r1, 0 beq _08049BE0 ldrb r0, [r2, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r5, =gActiveBank strb r0, [r5] ldr r2, =gHitMarker @@ -5917,7 +3503,7 @@ atk1A_faint_animation: @ 8049E40 ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r4, =gActiveBank strb r0, [r4] movs r0, 0 @@ -5945,7 +3531,7 @@ atk1B_faint_effects_clear: @ 8049E7C ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r4, =gActiveBank strb r0, [r4] ldr r0, =gBattleTypeFlags @@ -6002,7 +3588,7 @@ atk1C_jumpifstatus: @ 8049F04 ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank lsls r0, 24 lsrs r0, 24 ldr r2, [r5] @@ -6061,7 +3647,7 @@ atk1D_jumpifstatus2: @ 8049F7C ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank lsls r0, 24 lsrs r0, 24 ldr r2, [r5] @@ -6184,7 +3770,7 @@ _0804A054: .pool _0804A08C: ldrb r0, [r2, 0x1] - bl get_battle_side_of_something + bl GetBattleBank lsls r0, 24 lsrs r4, r0, 24 ldr r1, =gBattleMons @@ -6282,7 +3868,7 @@ atk20_jumpifstat: @ 804A154 ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank lsls r0, 24 lsrs r0, 24 ldr r2, =gBattleMons @@ -6399,7 +3985,7 @@ atk21_jumpifstatus3: @ 804A24C ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r5, =gActiveBank strb r0, [r5] ldr r2, [r4] @@ -6465,7 +4051,7 @@ atk22_jumpiftype: @ 804A2D0 ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank lsls r0, 24 lsrs r0, 24 ldr r3, [r4] @@ -6521,7 +4107,7 @@ atk23_getexp: @ 804A32C ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r1, =gBank1 strb r0, [r1] ldr r2, =gUnknown_020243FE @@ -7884,7 +5470,7 @@ atk25_move_values_cleanup: @ 804AF70 thumb_func_start atk26_set_multihit atk26_set_multihit: @ 804AF88 - ldr r3, =gUnknown_02024212 + ldr r3, =gMultiHitCounter ldr r2, =gBattlescriptCurrInstr ldr r0, [r2] ldrb r1, [r0, 0x1] @@ -7898,7 +5484,7 @@ atk26_set_multihit: @ 804AF88 thumb_func_start atk27_decrement_multihit atk27_decrement_multihit: @ 804AFA0 push {lr} - ldr r1, =gUnknown_02024212 + ldr r1, =gMultiHitCounter ldrb r0, [r1] subs r0, 0x1 strb r0, [r1] @@ -8795,7 +6381,7 @@ _0804B624: ldr r0, =gBattleMoveDamage ldrh r1, [r0] movs r0, 0 - bl dp01_build_cmdbuf_x18_0_aa_health_bar_update + bl EmitHealthBarUpdate ldr r0, =gActiveBank ldrb r0, [r0] bl MarkBufferBankForExecution @@ -8916,7 +6502,7 @@ atk42_jumpiftype2: @ 804B728 ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank lsls r0, 24 lsrs r0, 24 ldr r3, [r4] @@ -9018,7 +6604,7 @@ atk45_playanimation: @ 804B7EC ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r6, =gActiveBank strb r0, [r6] ldr r2, [r5] @@ -9064,7 +6650,7 @@ _0804B848: beq _0804B868 adds r0, r2, 0x7 bl b_movescr_stack_push - ldr r0, =gUnknown_082DABB9 + ldr r0, =BattleScript_Pausex20 b _0804B8A8 .pool _0804B868: @@ -9109,7 +6695,7 @@ atk46_playanimation2: @ 804B8B0 ldr r6, =gBattlescriptCurrInstr ldr r0, [r6] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r7, =gActiveBank strb r0, [r7] ldr r2, [r6] @@ -9270,7 +6856,7 @@ atk48_playstatchangeanimation: @ 804B9D8 ldr r0, [r5] ldrb r0, [r0, 0x1] str r3, [sp] - bl get_battle_side_of_something + bl GetBattleBank ldr r2, =gActiveBank strb r0, [r2] ldr r0, [r5] @@ -10687,7 +8273,7 @@ _0804C678: b _0804C76A .pool _0804C688: - ldr r1, =gUnknown_0831ACE8 + ldr r1, =gTypeEffectiveness adds r0, r5, r1 ldrb r0, [r0] adds r6, r1, 0 @@ -10825,7 +8411,7 @@ _0804C76A: ldrb r0, [r0] ldr r7, =gCurrentMove ldrh r1, [r7] - bl move_weather_interaction + bl AttacksThisTurn lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0x2 @@ -10940,7 +8526,7 @@ atk4C_copy_poke_data: @ 804C894 ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r4, =gActiveBank strb r0, [r4] ldr r3, =gBattlePartyID @@ -10989,7 +8575,7 @@ _0804C912: ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r4, =gActiveBank strb r0, [r4] ldr r6, =gBattleMons @@ -11205,7 +8791,7 @@ atk4E_switchin_anim: @ 804CAE8 ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r6, =gActiveBank strb r0, [r6] ldrb r0, [r6] @@ -11287,7 +8873,7 @@ atk4F_jump_if_cannot_switch: @ 804CBB0 ldrb r1, [r0, 0x1] movs r0, 0x7F ands r0, r1 - bl get_battle_side_of_something + bl GetBattleBank ldr r3, =gActiveBank strb r0, [r3] ldr r2, [r4] @@ -12492,7 +10078,7 @@ _0804D658: _0804D664: movs r0, 0x7F ands r0, r1 - bl get_battle_side_of_something + bl GetBattleBank lsls r0, 24 lsrs r7, r0, 24 ldr r1, =gSpecialStatuses @@ -12693,7 +10279,7 @@ _0804D82C: ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r5, =gActiveBank strb r0, [r5] ldr r0, [r4] @@ -12993,7 +10579,7 @@ atk52_switch_in_effects: @ 804DAAC mov r9, r0 ldr r0, [r0] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r4, =gActiveBank strb r0, [r4] ldrb r0, [r4] @@ -13397,7 +10983,7 @@ atk56_fainting_cry: @ 804DE50 ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r4, =gActiveBank strb r0, [r4] movs r0, 0 @@ -13442,7 +11028,7 @@ atk58_return_to_ball: @ 804DEB8 ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r4, =gActiveBank strb r0, [r4] movs r0, 0 @@ -14143,7 +11729,7 @@ atk5C_hitanimation: @ 804E508 ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r2, =gActiveBank strb r0, [r2] ldr r0, =gBattleMoveFlags @@ -14435,7 +12021,7 @@ atk5E_8025A70: @ 804E764 ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r6, =gActiveBank strb r0, [r6] ldr r5, =gBattleCommunication @@ -14583,7 +12169,7 @@ atk61_8025BA4: @ 804E898 ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r1, =gActiveBank strb r0, [r1] ldrb r0, [r1] @@ -14664,7 +12250,7 @@ atk62_08025C6C: @ 804E960 ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r4, =gActiveBank strb r0, [r4] movs r0, 0 @@ -14732,7 +12318,7 @@ atk64_statusanimation: @ 804E9F4 ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r4, =gActiveBank strb r0, [r4] ldr r1, =gStatuses3 @@ -14791,7 +12377,7 @@ atk65_status2animation: @ 804EA84 ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r5, =gActiveBank strb r0, [r5] ldr r1, [r4] @@ -14862,7 +12448,7 @@ atk66_chosenstatusanimation: @ 804EB2C ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r5, =gActiveBank strb r0, [r5] ldr r4, [r4] @@ -15219,7 +12805,7 @@ atk6A_removeitem: @ 804EE58 ldr r6, =gBattlescriptCurrInstr ldr r0, [r6] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r5, =gActiveBank strb r0, [r5] ldr r1, =gBattleStruct @@ -15989,7 +13575,7 @@ atk6F_set_visible: @ 804F50C ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r4, =gActiveBank strb r0, [r4] movs r0, 0 @@ -16012,7 +13598,7 @@ atk70_record_ability: @ 804F540 ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r1, =gActiveBank strb r0, [r1] ldrb r0, [r1] @@ -16109,7 +13695,7 @@ atk73_hp_thresholds: @ 804F5F8 ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r1, =gActiveBank strb r0, [r1] movs r1, 0x1 @@ -16191,7 +13777,7 @@ atk74_hp_thresholds2: @ 804F6A4 ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank adds r4, r0, 0 ldr r0, =gActiveBank strb r4, [r0] @@ -16303,7 +13889,7 @@ atk76_various: @ 804F7AC ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r1, =gActiveBank strb r0, [r1] ldr r0, [r4] @@ -17108,7 +14694,7 @@ _0804FF14: str r0, [r2] ldr r1, =0x00007fff movs r0, 0 - bl dp01_build_cmdbuf_x18_0_aa_health_bar_update + bl EmitHealthBarUpdate ldrb r0, [r4] bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr @@ -19051,12 +16637,12 @@ atk8D_setmultihit_counter: @ 8050FF0 ldrb r1, [r0, 0x1] cmp r1, 0 beq _0805100C - ldr r0, =gUnknown_02024212 + ldr r0, =gMultiHitCounter strb r1, [r0] b _08051026 .pool _0805100C: - ldr r4, =gUnknown_02024212 + ldr r4, =gMultiHitCounter bl Random movs r5, 0x3 ands r0, r5 @@ -20717,7 +18303,7 @@ atk98_status_icon_update: @ 8051E48 ldrb r0, [r1, 0x1] cmp r0, 0x4 beq _08051EA0 - bl get_battle_side_of_something + bl GetBattleBank ldr r4, =gActiveBank strb r0, [r4] ldr r3, =gBattleMons @@ -22309,7 +19895,7 @@ _08052C24: bhi _08052C24 lsls r0, r4, 1 adds r4, r0, r4 - ldr r6, =gUnknown_0831ACE8 + ldr r6, =gTypeEffectiveness adds r3, r4, r6 ldr r1, =gUnknown_02024258 ldr r2, =gBankAttacker @@ -22357,7 +19943,7 @@ _08052C80: mov r8, r0 ldr r1, =gBattlescriptCurrInstr mov r12, r1 - ldr r3, =gUnknown_0831ACE8 + ldr r3, =gTypeEffectiveness adds r0, r4, 0x1 adds r0, r3 mov r9, r0 @@ -22743,8 +20329,8 @@ _08052FA8: bx r1 thumb_func_end sub_8052F84 - thumb_func_start move_weather_interaction -move_weather_interaction: @ 8052FAC + thumb_func_start AttacksThisTurn +AttacksThisTurn: @ 8052FAC push {lr} lsls r1, 16 lsrs r2, r1, 16 @@ -22797,7 +20383,7 @@ _08053010: _08053012: pop {r1} bx r1 - thumb_func_end move_weather_interaction + thumb_func_end AttacksThisTurn thumb_func_start atkA9_sleeptalk_choose_move atkA9_sleeptalk_choose_move: @ 8053018 @@ -24489,7 +22075,7 @@ atkBA_jumpifnopursuitswitchdmg: @ 8053EC8 mov r6, r9 mov r5, r8 push {r5-r7} - ldr r0, =gUnknown_02024212 + ldr r0, =gMultiHitCounter ldrb r0, [r0] cmp r0, 0x1 bne _08053EF8 @@ -25886,7 +23472,7 @@ _08054AF4: str r0, [r2] ldr r1, =0x00007fff movs r0, 0 - bl dp01_build_cmdbuf_x18_0_aa_health_bar_update + bl EmitHealthBarUpdate ldrb r0, [r4] bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr @@ -27698,7 +25284,7 @@ atkE2_switchout_abilities: @ 8055A78 ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r4, =gActiveBank strb r0, [r4] ldr r3, =gBattleMons @@ -27752,7 +25338,7 @@ atkE3_jumpiffainted: @ 8055AF4 ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] ldrb r0, [r0, 0x1] - bl get_battle_side_of_something + bl GetBattleBank ldr r1, =gActiveBank strb r0, [r1] ldr r2, =gBattleMons diff --git a/asm/battle_9.s b/asm/battle_9.s index f1811e1af..401584bce 100644 --- a/asm/battle_9.s +++ b/asm/battle_9.s @@ -114,7 +114,7 @@ _08062CBA: ldrh r1, [r4] mov r3, r9 ldrb r2, [r3] - bl ai_rate_move + bl AI_TypeCalc lsls r0, 24 lsrs r1, r0, 24 movs r0, 0x2 @@ -246,7 +246,7 @@ _08062DE0: beq _08062E1E ldrh r1, [r5] ldrb r2, [r7] - bl ai_rate_move + bl AI_TypeCalc lsls r0, 24 lsrs r1, r0, 24 movs r0, 0x2 @@ -741,7 +741,7 @@ _0806320A: ldrh r1, [r5] mov r3, r8 ldrb r2, [r3] - bl ai_rate_move + bl AI_TypeCalc lsls r0, 24 lsrs r1, r0, 24 movs r0, 0x2 @@ -815,7 +815,7 @@ _080632AE: ldrh r1, [r5] mov r3, r8 ldrb r2, [r3] - bl ai_rate_move + bl AI_TypeCalc lsls r0, 24 lsrs r1, r0, 24 movs r0, 0x2 @@ -1126,7 +1126,7 @@ _08063564: adds r0, r1 ldrh r0, [r0] adds r1, r4, 0 - bl ai_rate_move + bl AI_TypeCalc ldr r1, [sp] ands r1, r0 cmp r1, 0 @@ -1161,7 +1161,7 @@ _080635A2: beq _080635DE ldrh r1, [r5] ldrb r2, [r7] - bl ai_rate_move + bl AI_TypeCalc lsls r0, 24 lsrs r1, r0, 24 movs r0, 0x2 @@ -1688,7 +1688,7 @@ sub_8063A08: @ 8063A08 lsrs r2, 24 mov r8, r2 movs r7, 0 - ldr r0, =gUnknown_0831ACE8 + ldr r0, =gTypeEffectiveness mov r10, r0 ldrb r0, [r0] cmp r0, 0xFF diff --git a/asm/battle_frontier_1.s b/asm/battle_frontier_1.s index 135918627..e2b6469a0 100755 --- a/asm/battle_frontier_1.s +++ b/asm/battle_frontier_1.s @@ -2599,10 +2599,10 @@ _0818FFFC: b _081900A4 .pool _0819002C: - ldr r0, =gUnknown_0831ACE8 + ldr r0, =gTypeEffectiveness adds r1, r6, r0 ldrb r0, [r1] - ldr r7, =gUnknown_0831ACE8 + ldr r7, =gTypeEffectiveness cmp r0, 0xFF beq _081900A4 adds r4, r1, 0 @@ -2657,7 +2657,7 @@ _08190088: _08190096: adds r4, 0x3 adds r6, 0x3 - ldr r1, =gUnknown_0831ACE8 + ldr r1, =gTypeEffectiveness adds r0, r6, r1 ldrb r0, [r0] cmp r0, 0xFF @@ -10109,7 +10109,7 @@ _08194074: lsls r0, r4, 1 add r0, r10 ldrh r0, [r0] - bl ai_rate_move + bl AI_TypeCalc lsls r0, 24 lsrs r5, r0, 24 movs r0, 0x6 diff --git a/asm/rom3.s b/asm/rom3.s index c3a730836..d039db7f2 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -2465,8 +2465,8 @@ _08033AF2: .pool thumb_func_end sub_8033AC4 - thumb_func_start dp01_build_cmdbuf_x0F_aa_b_cc_dddd_e_mlc_weather_00_x1Cbytes -dp01_build_cmdbuf_x0F_aa_b_cc_dddd_e_mlc_weather_00_x1Cbytes: @ 8033B0C + thumb_func_start EmitMoveAnimation +EmitMoveAnimation: @ 8033B0C push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -2568,7 +2568,7 @@ _08033BB6: pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x0F_aa_b_cc_dddd_e_mlc_weather_00_x1Cbytes + thumb_func_end EmitMoveAnimation thumb_func_start dp01_build_cmdbuf_x10_TODO dp01_build_cmdbuf_x10_TODO: @ 8033BE4 @@ -2938,8 +2938,8 @@ dp01_build_cmdbuf_x17_17_17_17: @ 8033EDC .pool thumb_func_end dp01_build_cmdbuf_x17_17_17_17 - thumb_func_start dp01_build_cmdbuf_x18_0_aa_health_bar_update -dp01_build_cmdbuf_x18_0_aa_health_bar_update: @ 8033EFC + thumb_func_start EmitHealthBarUpdate +EmitHealthBarUpdate: @ 8033EFC push {r4,lr} lsls r0, 24 lsrs r0, 24 @@ -2965,7 +2965,7 @@ dp01_build_cmdbuf_x18_0_aa_health_bar_update: @ 8033EFC pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x18_0_aa_health_bar_update + thumb_func_end EmitHealthBarUpdate thumb_func_start dp01_build_cmdbuf_x19_a_bb dp01_build_cmdbuf_x19_a_bb: @ 8033F34 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index b3dafed16..aab0de4e3 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -90,7 +90,7 @@ gUnknown_082DAB11:: @ 82DAB11 gUnknown_082DAB15:: @ 82DAB15 .incbin "baserom.gba", 0x2dab15, 0xa4 -gUnknown_082DABB9:: @ 82DABB9 +BattleScript_Pausex20:: @ 82DABB9 .incbin "baserom.gba", 0x2dabb9, 0x4 gUnknown_082DABBD:: @ 82DABBD diff --git a/data/data2b.s b/data/data2b.s index 1499c51fe..5df0bdf54 100644 --- a/data/data2b.s +++ b/data/data2b.s @@ -202,7 +202,7 @@ gUnknown_0831ACA0:: @ 831ACA0 gUnknown_0831ACE0:: @ 831ACE0 .incbin "baserom.gba", 0x31ace0, 0x8 -gUnknown_0831ACE8:: @ 831ACE8 +gTypeEffectiveness:: @ 831ACE8 .incbin "baserom.gba", 0x31ace8, 0x150 @ 831AE38 diff --git a/include/battle.h b/include/battle.h index b04b8db8f..f9615b889 100644 --- a/include/battle.h +++ b/include/battle.h @@ -213,6 +213,19 @@ #define MOVE_TARGET_FOES_AND_ALLY 0x20 #define MOVE_TARGET_OPPONENTS_FIELD 0x40 +#define TYPE_MUL_NO_EFFECT 0 +#define TYPE_MUL_NOT_EFFECTIVE 5 +#define TYPE_MUL_NORMAL 10 +#define TYPE_MUL_SUPER_EFFECTIVE 20 + +#define BS_GET_TARGET 0 +#define BS_GET_ATTACKER 1 +#define BS_GET_EFFECT_BANK 2 +#define BS_GET_SCRIPTING_BANK 10 +#define BS_GET_OPPONENT1 12 +#define BS_GET_PLAYER2 13 +#define BS_GET_OPPONENT2 14 + struct Trainer { /*0x00*/ u8 partyFlags; @@ -640,14 +653,16 @@ extern struct BattleStruct* gBattleStruct; var2[offsetof(struct structName, offsetField)] = value; \ } -#define GET_MOVE_TYPE(move, type) \ +#define GET_MOVE_TYPE(move, typeArg) \ { \ if (gBattleStruct->dynamicMoveType) \ - type = gBattleStruct->dynamicMoveType & 0x3F; \ + typeArg = gBattleStruct->dynamicMoveType & 0x3F; \ else \ - type = gBattleMoves[move].type; \ + typeArg = gBattleMoves[move].type; \ } +#define GET_BANK_SIDE(bank)((GetBankIdentity(bank) & 1)) + struct BattleScripting { u8 field_0; @@ -671,8 +686,8 @@ struct BattleScripting u8 field_15; u8 field_16; u8 bank; - u8 field_18; - u8 field_19; + u8 animTurn; + u8 animTargetsHit; u8 statChanger; }; @@ -684,6 +699,7 @@ extern struct BattleScripting gBattleScripting; void CancelMultiTurnMoves(u8 bank); void PressurePPLose(u8 bankAtk, u8 bankDef, u16 move); void PrepareStringBattle(u16 stringId, u8 bank); +u8 GetBattleBank(u8 caseId); // battle_3 void b_movescr_stack_push(const u8* bsPtr); @@ -709,6 +725,11 @@ void sub_80458B4(void); u8 GetMoveTarget(u16 move, u8 useMoveTarget); u8 IsPokeDisobedient(void); +// battle_4 +void AI_CalcDmg(u8 bankAtk, u8 bankDef); +u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef); +u8 AI_TypeCalc(u16 move, u16 species, u8 ability); + // rom_80A5C6C u8 GetBankSide(u8 bank); u8 GetBankIdentity(u8 bank); diff --git a/include/battle_controllers.h b/include/battle_controllers.h new file mode 100644 index 000000000..5723cf9da --- /dev/null +++ b/include/battle_controllers.h @@ -0,0 +1,11 @@ +#ifndef GUARD_BATTLE_CONTROLLERS_H +#define GUARD_BATTLE_CONTROLLERS_H + +// rom3.s, emitters +void EmitSetAttributes(u8 bufferId, u8 request, u8 c, u8 bytes, void *data); +void EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 movePower, s32 dmg, u8 friendship, struct DisableStruct* disableStructPtr, u8 multihit); +void EmitHealthBarUpdate(u8 bufferId, u16 hpValue); + +void MarkBufferBankForExecution(u8 bank); + +#endif // GUARD_BATTLE_CONTROLLERS_H diff --git a/src/battle_3.c b/src/battle_3.c index 283305d6c..4f0997aa0 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -14,6 +14,7 @@ #include "string_util.h" #include "battle_message.h" #include "battle_ai.h" +#include "battle_controllers.h" #include "event_data.h" #include "calculate_base_damage.h" @@ -183,10 +184,8 @@ extern u8 b_first_side(u8, u8, u8); extern void sub_803CEDC(u8, u8); extern void b_call_bc_move_exec(const u8 *); extern void BattleTurnPassed(void); -extern void EmitSetAttributes(u8 a, u8 request, u8 c, u8 bytes, void *data); extern void SetMoveEffect(bool8 primary, u8 certainArg); extern bool8 UproarWakeUpCheck(u8 bank); -extern void MarkBufferBankForExecution(u8 bank); extern u8 sub_803F90C(u8 bank); extern void sub_803F9EC(); extern bool8 sub_80423F4(u8 bank, u8, u8); diff --git a/src/battle_4.c b/src/battle_4.c index e693162cc..be7f712c6 100644 --- a/src/battle_4.c +++ b/src/battle_4.c @@ -12,6 +12,8 @@ #include "pokemon.h" #include "calculate_base_damage.h" #include "rng.h" +#include "battle_controllers.h" +#include "species.h" // variables @@ -135,7 +137,7 @@ extern const u8 BattleScript_ShakeBallThrow[]; bool8 IsTwoTurnsMove(u16 move); void DestinyBondFlagUpdate(void); u8 AttacksThisTurn(u8 bank, u16 move); // Note: returns 1 if it's a charging turn, otherwise 2. -void b_wonderguard_and_levitate(void); +static void CheckWonderGuardAndLevitate(void); void atk00_attackcanceler(void); void atk01_accuracycheck(void); @@ -1000,7 +1002,7 @@ void atk01_accuracycheck(void) else gBattleCommunication[6] = 0; - b_wonderguard_and_levitate(); + CheckWonderGuardAndLevitate(); } JumpIfMoveFailed(7, move); } @@ -1018,3 +1020,641 @@ void atk02_attackstring(void) gBattlescriptCurrInstr++; gBattleCommunication[MSG_DISPLAY] = 0; } + +void atk03_ppreduce(void) +{ + s32 to_deduct = 1; + + if (gBattleExecBuffer) + return; + + if (!gSpecialStatuses[gBankAttacker].flag20) + { + switch (gBattleMoves[gCurrentMove].target) + { + case MOVE_TARGET_FOES_AND_ALLY: + to_deduct += AbilityBattleEffects(ABILITYEFFECT_COUNT_ON_FIELD, gBankAttacker, ABILITY_PRESSURE, 0, 0); + break; + case MOVE_TARGET_BOTH: + case MOVE_TARGET_OPPONENTS_FIELD: + to_deduct += AbilityBattleEffects(ABILITYEFFECT_COUNT_OTHER_SIZE, gBankAttacker, ABILITY_PRESSURE, 0, 0); + break; + default: + if (gBankAttacker != gBankTarget && gBattleMons[gBankTarget].ability == ABILITY_PRESSURE) + to_deduct++; + break; + } + } + + if (!(gHitMarker & (HITMARKER_NO_PPDEDUCT | HITMARKER_NO_ATTACKSTRING)) && gBattleMons[gBankAttacker].pp[gCurrMovePos]) + { + gProtectStructs[gBankAttacker].notFirstStrike = 1; + + if (gBattleMons[gBankAttacker].pp[gCurrMovePos] > to_deduct) + gBattleMons[gBankAttacker].pp[gCurrMovePos] -= to_deduct; + else + gBattleMons[gBankAttacker].pp[gCurrMovePos] = 0; + + if (!(gBattleMons[gBankAttacker].status2 & STATUS2_TRANSFORMED) + && !((gDisableStructs[gBankAttacker].unk18_b) & gBitTable[gCurrMovePos])) + { + gActiveBank = gBankAttacker; + EmitSetAttributes(0, REQUEST_PPMOVE1_BATTLE + gCurrMovePos, 0, 1, &gBattleMons[gBankAttacker].pp[gCurrMovePos]); + MarkBufferBankForExecution(gBankAttacker); + } + } + + gHitMarker &= ~(HITMARKER_NO_PPDEDUCT); + gBattlescriptCurrInstr++; +} + +void atk04_critcalc(void) +{ + u8 holdEffect; + u16 item, critChance; + + item = gBattleMons[gBankAttacker].item; + + if (item == ITEM_ENIGMA_BERRY) + holdEffect = gEnigmaBerries[gBankAttacker].holdEffect; + else + holdEffect = ItemId_GetHoldEffect(item); + + gStringBank = gBankAttacker; + + critChance = 2 * ((gBattleMons[gBankAttacker].status2 & STATUS2_FOCUS_ENERGY) != 0) + + (gBattleMoves[gCurrentMove].effect == EFFECT_HIGH_CRITICAL) + + (gBattleMoves[gCurrentMove].effect == EFFECT_SKY_ATTACK) + + (gBattleMoves[gCurrentMove].effect == EFFECT_BLAZE_KICK) + + (gBattleMoves[gCurrentMove].effect == EFFECT_POISON_TAIL) + + (holdEffect == HOLD_EFFECT_SCOPE_LENS) + + 2 * (holdEffect == HOLD_EFFECT_LUCKY_PUNCH && gBattleMons[gBankAttacker].species == SPECIES_CHANSEY) + + 2 * (holdEffect == HOLD_EFFECT_STICK && gBattleMons[gBankAttacker].species == SPECIES_FARFETCHD); + + if (critChance > 4) + critChance = 4; + + if ((gBattleMons[gBankTarget].ability != ABILITY_BATTLE_ARMOR && gBattleMons[gBankTarget].ability != ABILITY_SHELL_ARMOR) + && !(gStatuses3[gBankAttacker] & STATUS3_CANT_SCORE_A_CRIT) + && !(gBattleTypeFlags & (BATTLE_TYPE_WALLY_TUTORIAL | BATTLE_TYPE_FIRST_BATTLE)) + && !(Random() % gCriticalHitChance[critChance])) + gCritMultiplier = 2; + else + gCritMultiplier = 1; + + gBattlescriptCurrInstr++; +} + +void atk05_damagecalc1(void) +{ + u16 sideStatus = gSideAffecting[GET_BANK_SIDE(gBankTarget)]; + gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[gBankAttacker], &gBattleMons[gBankTarget], gCurrentMove, + sideStatus, gDynamicBasePower, + gBattleStruct->dynamicMoveType, gBankAttacker, gBankTarget); + gBattleMoveDamage = gBattleMoveDamage * gCritMultiplier * gBattleScripting.dmgMultiplier; + + if (gStatuses3[gBankAttacker] & STATUS3_CHARGED_UP && gBattleMoves[gCurrentMove].type == TYPE_ELECTRIC) + gBattleMoveDamage *= 2; + if (gProtectStructs[gBankAttacker].helpingHand) + gBattleMoveDamage = gBattleMoveDamage * 15 / 10; + + gBattlescriptCurrInstr++; +} + +void AI_CalcDmg(u8 bankAtk, u8 bankDef) +{ + u16 sideStatus = gSideAffecting[GET_BANK_SIDE(bankDef)]; + gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[bankAtk], &gBattleMons[bankDef], gCurrentMove, + sideStatus, gDynamicBasePower, + gBattleStruct->dynamicMoveType, bankAtk, bankDef); + gDynamicBasePower = 0; + gBattleMoveDamage = gBattleMoveDamage * gCritMultiplier * gBattleScripting.dmgMultiplier; + + if (gStatuses3[bankAtk] & STATUS3_CHARGED_UP && gBattleMoves[gCurrentMove].type == TYPE_ELECTRIC) + gBattleMoveDamage *= 2; + if (gProtectStructs[bankAtk].helpingHand) + gBattleMoveDamage = gBattleMoveDamage * 15 / 10; +} + +void ModulateDmgByType(u8 multiplier) +{ + gBattleMoveDamage = gBattleMoveDamage * multiplier / 10; + if (gBattleMoveDamage == 0 && multiplier != 0) + gBattleMoveDamage = 1; + + switch (multiplier) + { + case TYPE_MUL_NO_EFFECT: + gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED; + gBattleMoveFlags &= ~MOVESTATUS_NOTVERYEFFECTIVE; + gBattleMoveFlags &= ~MOVESTATUS_SUPEREFFECTIVE; + break; + case TYPE_MUL_NOT_EFFECTIVE: + if (gBattleMoves[gCurrentMove].power && !(gBattleMoveFlags & MOVESTATUS_NOEFFECT)) + { + if (gBattleMoveFlags & MOVESTATUS_SUPEREFFECTIVE) + gBattleMoveFlags &= ~MOVESTATUS_SUPEREFFECTIVE; + else + gBattleMoveFlags |= MOVESTATUS_NOTVERYEFFECTIVE; + } + break; + case TYPE_MUL_SUPER_EFFECTIVE: + if (gBattleMoves[gCurrentMove].power && !(gBattleMoveFlags & MOVESTATUS_NOEFFECT)) + { + if (gBattleMoveFlags & MOVESTATUS_NOTVERYEFFECTIVE) + gBattleMoveFlags &= ~MOVESTATUS_NOTVERYEFFECTIVE; + else + gBattleMoveFlags |= MOVESTATUS_SUPEREFFECTIVE; + } + break; + } +} + +#define TYPE_FORESIGHT 0xFE +#define TYPE_ENDTABLE 0xFF + +void atk06_typecalc(void) +{ + s32 i = 0; + u8 moveType; + + if (gCurrentMove == MOVE_STRUGGLE) + { + gBattlescriptCurrInstr++; + return; + } + + GET_MOVE_TYPE(gCurrentMove, moveType); + + // check stab + if (gBattleMons[gBankAttacker].type1 == moveType || gBattleMons[gBankAttacker].type2 == moveType) + { + gBattleMoveDamage = gBattleMoveDamage * 15; + gBattleMoveDamage = gBattleMoveDamage / 10; + } + + if (gBattleMons[gBankTarget].ability == ABILITY_LEVITATE && moveType == TYPE_GROUND) + { + gLastUsedAbility = gBattleMons[gBankTarget].ability; + gBattleMoveFlags |= (MOVESTATUS_MISSED | MOVESTATUS_NOTAFFECTED); + gUnknown_02024250[gBankTarget] = 0; + gUnknown_02024258[gBankTarget] = 0; + gBattleCommunication[6] = moveType; + RecordAbilityBattle(gBankTarget, gLastUsedAbility); + } + else + { + while (gTypeEffectiveness[i] != TYPE_ENDTABLE) + { + if (gTypeEffectiveness[i] == TYPE_FORESIGHT) + { + if (gBattleMons[gBankTarget].status2 & STATUS2_FORESIGHT) + break; + i += 3; + continue; + } + else if (gTypeEffectiveness[i] == moveType) + { + // check type1 + if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type1) + ModulateDmgByType(gTypeEffectiveness[i + 2]); + // check type2 + if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2 && + gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2) + ModulateDmgByType(gTypeEffectiveness[i + 2]); + } + i += 3; + } + } + + if (gBattleMons[gBankTarget].ability == ABILITY_WONDER_GUARD && AttacksThisTurn(gBankAttacker, gCurrentMove) == 2 + && (!(gBattleMoveFlags & MOVESTATUS_SUPEREFFECTIVE) || ((gBattleMoveFlags & (MOVESTATUS_SUPEREFFECTIVE | MOVESTATUS_NOTVERYEFFECTIVE)) == (MOVESTATUS_SUPEREFFECTIVE | MOVESTATUS_NOTVERYEFFECTIVE))) + && gBattleMoves[gCurrentMove].power) + { + gLastUsedAbility = ABILITY_WONDER_GUARD; + gBattleMoveFlags |= MOVESTATUS_MISSED; + gUnknown_02024250[gBankTarget] = 0; + gUnknown_02024258[gBankTarget] = 0; + gBattleCommunication[6] = 3; + RecordAbilityBattle(gBankTarget, gLastUsedAbility); + } + if (gBattleMoveFlags & MOVESTATUS_NOTAFFECTED) + gProtectStructs[gBankAttacker].notEffective = 1; + + gBattlescriptCurrInstr++; +} + +static void CheckWonderGuardAndLevitate(void) +{ + u8 flags = 0; + s32 i = 0; + u8 moveType; + + if (gCurrentMove == MOVE_STRUGGLE || !gBattleMoves[gCurrentMove].power) + return; + + GET_MOVE_TYPE(gCurrentMove, moveType); + + if (gBattleMons[gBankTarget].ability == ABILITY_LEVITATE && moveType == TYPE_GROUND) + { + gLastUsedAbility = ABILITY_LEVITATE; + gBattleCommunication[6] = moveType; + RecordAbilityBattle(gBankTarget, ABILITY_LEVITATE); + return; + } + + while (gTypeEffectiveness[i] != TYPE_ENDTABLE) + { + if (gTypeEffectiveness[i] == TYPE_FORESIGHT) + { + if (gBattleMons[gBankTarget].status2 & STATUS2_FORESIGHT) + break; + i += 3; + continue; + } + if (gTypeEffectiveness[i] == moveType) + { + // check no effect + if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type1 && gTypeEffectiveness[i + 2] == 0) + { + gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED; + gProtectStructs[gBankAttacker].notEffective = 1; + } + if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2 && + gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2 && + gTypeEffectiveness[i + 2] == TYPE_MUL_NO_EFFECT) + { + gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED; + gProtectStructs[gBankAttacker].notEffective = 1; + } + + // check super effective + if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type1 && gTypeEffectiveness[i + 2] == 20) + flags |= 1; + if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2 + && gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2 + && gTypeEffectiveness[i + 2] == TYPE_MUL_SUPER_EFFECTIVE) + flags |= 1; + + // check not very effective + if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type1 && gTypeEffectiveness[i + 2] == 5) + flags |= 2; + if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2 + && gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2 + && gTypeEffectiveness[i + 2] == TYPE_MUL_NOT_EFFECTIVE) + flags |= 2; + } + i += 3; + } + + if (gBattleMons[gBankTarget].ability == ABILITY_WONDER_GUARD && AttacksThisTurn(gBankAttacker, gCurrentMove) == 2) + { + if (((flags & 2) || !(flags & 1)) && gBattleMoves[gCurrentMove].power) + { + gLastUsedAbility = ABILITY_WONDER_GUARD; + gBattleCommunication[6] = 3; + RecordAbilityBattle(gBankTarget, ABILITY_WONDER_GUARD); + } + } +} + +void ModulateDmgByType2(u8 multiplier, u16 move, u8* flags) // same as ModulateDmgByType except different arguments +{ + gBattleMoveDamage = gBattleMoveDamage * multiplier / 10; + if (gBattleMoveDamage == 0 && multiplier != 0) + gBattleMoveDamage = 1; + + switch (multiplier) + { + case TYPE_MUL_NO_EFFECT: + *flags |= MOVESTATUS_NOTAFFECTED; + *flags &= ~MOVESTATUS_NOTVERYEFFECTIVE; + *flags &= ~MOVESTATUS_SUPEREFFECTIVE; + break; + case TYPE_MUL_NOT_EFFECTIVE: + if (gBattleMoves[move].power && !(*flags & MOVESTATUS_NOEFFECT)) + { + if (*flags & MOVESTATUS_SUPEREFFECTIVE) + *flags &= ~MOVESTATUS_SUPEREFFECTIVE; + else + *flags |= MOVESTATUS_NOTVERYEFFECTIVE; + } + break; + case TYPE_MUL_SUPER_EFFECTIVE: + if (gBattleMoves[move].power && !(*flags & MOVESTATUS_NOEFFECT)) + { + if (*flags & MOVESTATUS_NOTVERYEFFECTIVE) + *flags &= ~MOVESTATUS_NOTVERYEFFECTIVE; + else + *flags |= MOVESTATUS_SUPEREFFECTIVE; + } + break; + } +} + +u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef) +{ + s32 i = 0; + u8 flags = 0; + u8 moveType; + + if (move == MOVE_STRUGGLE) + return 0; + + moveType = gBattleMoves[move].type; + + // check stab + if (gBattleMons[bankAtk].type1 == moveType || gBattleMons[bankAtk].type2 == moveType) + { + gBattleMoveDamage = gBattleMoveDamage * 15; + gBattleMoveDamage = gBattleMoveDamage / 10; + } + + if (gBattleMons[bankDef].ability == ABILITY_LEVITATE && moveType == TYPE_GROUND) + { + flags |= (MOVESTATUS_MISSED | MOVESTATUS_NOTAFFECTED); + } + else + { + while (gTypeEffectiveness[i]!= TYPE_ENDTABLE) + { + if (gTypeEffectiveness[i] == TYPE_FORESIGHT) + { + if (gBattleMons[bankDef].status2 & STATUS2_FORESIGHT) + break; + i += 3; + continue; + } + + else if (gTypeEffectiveness[i] == moveType) + { + // check type1 + if (gTypeEffectiveness[i + 1] == gBattleMons[bankDef].type1) + ModulateDmgByType2(gTypeEffectiveness[i + 2], move, &flags); + // check type2 + if (gTypeEffectiveness[i + 1] == gBattleMons[bankDef].type2 && + gBattleMons[bankDef].type1 != gBattleMons[bankDef].type2) + ModulateDmgByType2(gTypeEffectiveness[i + 2], move, &flags); + } + i += 3; + } + } + + if (gBattleMons[bankDef].ability == ABILITY_WONDER_GUARD && !(flags & MOVESTATUS_MISSED) + && AttacksThisTurn(bankAtk, move) == 2 + && (!(flags & MOVESTATUS_SUPEREFFECTIVE) || ((flags & (MOVESTATUS_SUPEREFFECTIVE | MOVESTATUS_NOTVERYEFFECTIVE)) == (MOVESTATUS_SUPEREFFECTIVE | MOVESTATUS_NOTVERYEFFECTIVE))) + && gBattleMoves[move].power) + { + flags |= MOVESTATUS_MISSED; + } + return flags; +} + +u8 AI_TypeCalc(u16 move, u16 species, u8 ability) +{ + s32 i = 0; + u8 flags = 0; + u8 type1 = gBaseStats[species].type1, type2 = gBaseStats[species].type2; + u8 moveType; + + if (move == MOVE_STRUGGLE) + return 0; + + moveType = gBattleMoves[move].type; + + if (ability == ABILITY_LEVITATE && moveType == TYPE_GROUND) + { + flags = MOVESTATUS_MISSED | MOVESTATUS_NOTAFFECTED; + } + else + { + while (gTypeEffectiveness[i] != TYPE_ENDTABLE) + { + if (gTypeEffectiveness[i] == TYPE_FORESIGHT) + { + i += 3; + continue; + } + if (gTypeEffectiveness[i] == moveType) + { + // check type1 + if (gTypeEffectiveness[i + 1] == type1) + ModulateDmgByType2(gTypeEffectiveness[i + 2], move, &flags); + // check type2 + if (gTypeEffectiveness[i + 1] == type2 && type1 != type2) + ModulateDmgByType2(gTypeEffectiveness[i + 2], move, &flags); + } + i += 3; + } + } + if (ability == ABILITY_WONDER_GUARD + && (!(flags & MOVESTATUS_SUPEREFFECTIVE) || ((flags & (MOVESTATUS_SUPEREFFECTIVE | MOVESTATUS_NOTVERYEFFECTIVE)) == (MOVESTATUS_SUPEREFFECTIVE | MOVESTATUS_NOTVERYEFFECTIVE))) + && gBattleMoves[move].power) + flags |= MOVESTATUS_NOTAFFECTED; + return flags; +} + +// Multiplies the damage by a random factor between 85% to 100% inclusive +static inline void ApplyRandomDmgMultiplier(void) +{ + u16 rand = Random(); + u16 randPercent = 100 - (rand % 16); + + if (gBattleMoveDamage != 0) + { + gBattleMoveDamage *= randPercent; + gBattleMoveDamage /= 100; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + } +} + +void Unused_ApplyRandomDmgMultiplier(void) +{ + ApplyRandomDmgMultiplier(); +} + +void atk07_dmg_adjustment(void) +{ + u8 holdEffect, quality; + + ApplyRandomDmgMultiplier(); + + if (gBattleMons[gBankTarget].item == ITEM_ENIGMA_BERRY) + { + holdEffect = gEnigmaBerries[gBankTarget].holdEffect, quality = gEnigmaBerries[gBankTarget].holdEffectParam; + } + else + { + holdEffect = ItemId_GetHoldEffect(gBattleMons[gBankTarget].item); + quality = ItemId_GetHoldEffectParam(gBattleMons[gBankTarget].item); + } + + gStringBank = gBankTarget; + + if (holdEffect == HOLD_EFFECT_FOCUS_BAND && (Random() % 100) < quality) + { + RecordItemEffectBattle(gBankTarget, holdEffect); + gSpecialStatuses[gBankTarget].focusBanded = 1; + } + if (gBattleMons[gBankTarget].status2 & STATUS2_SUBSTITUTE) + goto END; + if (gBattleMoves[gCurrentMove].effect != EFFECT_FALSE_SWIPE && !gProtectStructs[gBankTarget].endured + && !gSpecialStatuses[gBankTarget].focusBanded) + goto END; + + if (gBattleMons[gBankTarget].hp > gBattleMoveDamage) + goto END; + + gBattleMoveDamage = gBattleMons[gBankTarget].hp - 1; + + if (gProtectStructs[gBankTarget].endured) + { + gBattleMoveFlags |= MOVESTATUS_ENDURED; + } + else if (gSpecialStatuses[gBankTarget].focusBanded) + { + gBattleMoveFlags |= MOVESTATUS_HUNGON; + gLastUsedItem = gBattleMons[gBankTarget].item; + } + + END: + gBattlescriptCurrInstr++; +} + +void atk08_dmg_adjustment2(void) // The same as 0x7 except it doesn't check for false swipe move effect. +{ + u8 holdEffect, quality; + + ApplyRandomDmgMultiplier(); + + if (gBattleMons[gBankTarget].item == ITEM_ENIGMA_BERRY) + { + holdEffect = gEnigmaBerries[gBankTarget].holdEffect, quality = gEnigmaBerries[gBankTarget].holdEffectParam; + } + else + { + holdEffect = ItemId_GetHoldEffect(gBattleMons[gBankTarget].item); + quality = ItemId_GetHoldEffectParam(gBattleMons[gBankTarget].item); + } + + gStringBank = gBankTarget; + + if (holdEffect == HOLD_EFFECT_FOCUS_BAND && (Random() % 100) < quality) + { + RecordItemEffectBattle(gBankTarget, holdEffect); + gSpecialStatuses[gBankTarget].focusBanded = 1; + } + if (gBattleMons[gBankTarget].status2 & STATUS2_SUBSTITUTE) + goto END; + if (!gProtectStructs[gBankTarget].endured && !gSpecialStatuses[gBankTarget].focusBanded) + goto END; + if (gBattleMons[gBankTarget].hp > gBattleMoveDamage) + goto END; + + gBattleMoveDamage = gBattleMons[gBankTarget].hp - 1; + + if (gProtectStructs[gBankTarget].endured) + { + gBattleMoveFlags |= MOVESTATUS_ENDURED; + } + else if (gSpecialStatuses[gBankTarget].focusBanded) + { + gBattleMoveFlags |= MOVESTATUS_HUNGON; + gLastUsedItem = gBattleMons[gBankTarget].item; + } + + END: + gBattlescriptCurrInstr++; +} + +void atk09_attackanimation(void) +{ + if (gBattleExecBuffer) + return; + + if ((gHitMarker & HITMARKER_NO_ANIMATIONS) && (gCurrentMove != MOVE_TRANSFORM && gCurrentMove != MOVE_SUBSTITUTE)) + { + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_Pausex20; + gBattleScripting.animTurn++; + gBattleScripting.animTargetsHit++; + } + else + { + if ((gBattleMoves[gCurrentMove].target & MOVE_TARGET_BOTH + || gBattleMoves[gCurrentMove].target & MOVE_TARGET_FOES_AND_ALLY + || gBattleMoves[gCurrentMove].target & MOVE_TARGET_DEPENDS) + && gBattleScripting.animTargetsHit) + { + gBattlescriptCurrInstr++; + return; + } + if (!(gBattleMoveFlags & MOVESTATUS_NOEFFECT)) + { + u8 multihit; + + gActiveBank = gBankAttacker; + + if (gBattleMons[gBankTarget].status2 & STATUS2_SUBSTITUTE) + multihit = gMultiHitCounter; + else if (gMultiHitCounter != 0 && gMultiHitCounter != 1) + { + if (gBattleMons[gBankTarget].hp <= gBattleMoveDamage) + multihit = 1; + else + multihit = gMultiHitCounter; + } + else + multihit = gMultiHitCounter; + + EmitMoveAnimation(0, gCurrentMove, gBattleScripting.animTurn, gBattleMovePower, gBattleMoveDamage, gBattleMons[gBankAttacker].friendship, &gDisableStructs[gBankAttacker], multihit); + gBattleScripting.animTurn += 1; + gBattleScripting.animTargetsHit += 1; + MarkBufferBankForExecution(gBankAttacker); + gBattlescriptCurrInstr++; + } + else + { + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_Pausex20; + } + } +} + +void atk0A_waitanimation(void) +{ + if (gBattleExecBuffer == 0) + gBattlescriptCurrInstr++; +} + +void atk0B_healthbarupdate(void) +{ + register s16 healthValue asm("r1"); + + if (gBattleExecBuffer) + return; + if (gBattleMoveFlags & MOVESTATUS_NOEFFECT) + goto END; + + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + if (gBattleMons[gActiveBank].status2 & STATUS2_SUBSTITUTE && gDisableStructs[gActiveBank].substituteHP && !(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE)) + { + PrepareStringBattle(0x80, gActiveBank); + goto END; + } + + healthValue = 10000; + if (healthValue <= gBattleMoveDamage) + healthValue = gBattleMoveDamage; + + EmitHealthBarUpdate(0, healthValue); + MarkBufferBankForExecution(gActiveBank); + + if (GetBankSide(gActiveBank) == SIDE_PLAYER && gBattleMoveDamage > 0) + gBattleResults.unk5_0 = 1; + + END: + gBattlescriptCurrInstr += 2; +} diff --git a/src/battle_ai.c b/src/battle_ai.c index 3b696b84e..75b5eb2ed 100644 --- a/src/battle_ai.c +++ b/src/battle_ai.c @@ -73,10 +73,7 @@ extern const struct BaseStats gBaseStats[]; extern const u32 gBitTable[]; extern u8 * const gBattleAI_ScriptsTable[]; -extern u8 GetBankIdentity(u8); extern u8 b_first_side(u8, u8, u8); -extern u8 GetBankByPlayerAI(u8); -extern void TypeCalc(u16 move, u8 bankAtk, u8 bankDef); extern void AI_CalcDmg(u8, u8); extern u8 CheckMoveLimitations(); diff --git a/sym_ewram.txt b/sym_ewram.txt index a675fa4e2..8eb395b0f 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -376,7 +376,7 @@ gAbsentBankFlags: @ 2024210 gCritMultiplier: @ 2024211 .space 0x1 -gUnknown_02024212: @ 2024212 +gMultiHitCounter: @ 2024212 .space 0x2 gBattlescriptCurrInstr: @ 2024214 From fcc94f9722609ffa67c045cf8a7539690a68b080 Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Tue, 19 Sep 2017 19:31:53 -0500 Subject: [PATCH 237/342] Extract baseroms from battle_message and rename strings --- asm/battle_1.s | 14 +- asm/battle_2.s | 6 +- asm/battle_4.s | 10 +- asm/battle_controller_player.s | 14 +- asm/battle_controller_safari.s | 4 +- asm/battle_controller_wally.s | 4 +- asm/battle_frontier_1.s | 6 +- asm/battle_frontier_2.s | 42 +-- asm/battle_interface.s | 4 +- asm/battle_message.s | 178 +++++------ asm/evolution_scene.s | 60 ++-- charmap.txt | 14 +- data/battle_message.s | 525 +++++++++++++++++++++------------ src/pokemon_2.c | 6 +- src/pokemon_3.c | 4 +- 15 files changed, 525 insertions(+), 366 deletions(-) diff --git a/asm/battle_1.s b/asm/battle_1.s index 8b0c99138..d1a4e6ea0 100644 --- a/asm/battle_1.s +++ b/asm/battle_1.s @@ -1886,7 +1886,7 @@ sub_8035C4C: @ 8035C4C ldrb r2, [r0] cmp r2, 0x3 bne _08035C68 - ldr r0, =gUnknown_085CCBAD + ldr r0, =gText_Draw movs r1, 0x15 bl battle_show_message_maybe b _08035D68 @@ -1962,10 +1962,10 @@ _08035CE2: cmp r0, 0 beq _08035D36 _08035CFC: - ldr r0, =gUnknown_085CCB9E + ldr r0, =gText_Win movs r1, 0x17 bl battle_show_message_maybe - ldr r0, =gUnknown_085CCBA5 + ldr r0, =gText_Loss movs r1, 0x16 bl battle_show_message_maybe b _08035D68 @@ -1983,19 +1983,19 @@ _08035D20: cmp r0, 0 beq _08035D58 _08035D36: - ldr r0, =gUnknown_085CCB9E + ldr r0, =gText_Win movs r1, 0x16 bl battle_show_message_maybe - ldr r0, =gUnknown_085CCBA5 + ldr r0, =gText_Loss movs r1, 0x17 bl battle_show_message_maybe b _08035D68 .pool _08035D58: - ldr r0, =gUnknown_085CCB9E + ldr r0, =gText_Win movs r1, 0x17 bl battle_show_message_maybe - ldr r0, =gUnknown_085CCBA5 + ldr r0, =gText_Loss movs r1, 0x16 bl battle_show_message_maybe _08035D68: diff --git a/asm/battle_2.s b/asm/battle_2.s index 1df081959..cc9af9b3f 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -4995,7 +4995,7 @@ _08039470: beq _0803947E b _0803975E _0803947E: - ldr r0, =gUnknown_085CD28F + ldr r0, =gText_RecordBattleToPass movs r1, 0 bl battle_show_message_maybe ldr r1, =gBattleCommunication @@ -5018,7 +5018,7 @@ _080394AC: movs r2, 0x1D movs r3, 0xD bl sub_8056A3C - ldr r0, =gUnknown_085CCABB + ldr r0, =gText_BattleYesNoChoice movs r1, 0xC bl battle_show_message_maybe ldr r4, =gBattleCommunication @@ -5213,7 +5213,7 @@ _08039678: bne _080396A0 movs r0, 0x37 bl PlaySE - ldr r0, =gUnknown_085CD2CB + ldr r0, =gText_BattleRecordedOnPass _08039686: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle diff --git a/asm/battle_4.s b/asm/battle_4.s index 8651b9724..9106fa174 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -14790,7 +14790,7 @@ _0804E084: movs r2, 0x1D movs r3, 0xD bl sub_8056A3C - ldr r0, =gUnknown_085CCABB + ldr r0, =gText_BattleYesNoChoice movs r1, 0xC bl battle_show_message_maybe ldr r1, =gBattleScripting @@ -15154,7 +15154,7 @@ _0804E3E0: movs r2, 0x1D movs r3, 0xD bl sub_8056A3C - ldr r0, =gUnknown_085CCABB + ldr r0, =gText_BattleYesNoChoice movs r1, 0xC bl battle_show_message_maybe ldrb r0, [r5, 0x1F] @@ -16078,7 +16078,7 @@ _0804EBD8: movs r2, 0x1D movs r3, 0xD bl sub_8056A3C - ldr r0, =gUnknown_085CCABB + ldr r0, =gText_BattleYesNoChoice movs r1, 0xC bl battle_show_message_maybe ldrb r0, [r5] @@ -17915,7 +17915,7 @@ _0804FC32: bl sub_81A5D44 b _0804FD70 _0804FC38: - ldr r1, =gUnknown_085CD1C8 + ldr r1, =gRefereeStringsTable ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0, 0x1] @@ -30831,7 +30831,7 @@ _08056C2C: movs r2, 0x1D movs r3, 0xD bl sub_8056A3C - ldr r0, =gUnknown_085CCABB + ldr r0, =gText_BattleYesNoChoice movs r1, 0xC bl battle_show_message_maybe ldr r1, =gBattleCommunication diff --git a/asm/battle_controller_player.s b/asm/battle_controller_player.s index 0e9318dc9..eb4caa013 100644 --- a/asm/battle_controller_player.s +++ b/asm/battle_controller_player.s @@ -1245,7 +1245,7 @@ _08057F80: ldrb r0, [r0] movs r1, 0x1B bl battle_menu_cursor_related_2 - ldr r0, =gUnknown_085CCACA + ldr r0, =gText_BattleSwitchWhich movs r1, 0xB bl battle_show_message_maybe ldr r1, =gBattleBankFunc @@ -4377,7 +4377,7 @@ _08059AF4: sub_8059B18: @ 8059B18 push {r4,lr} ldr r4, =gDisplayedStringBattle - ldr r1, =gUnknown_085CCA6F + ldr r1, =gText_MoveInterfacePP adds r0, r4, 0 bl StringCopy adds r0, r4, 0 @@ -4449,7 +4449,7 @@ sub_8059BB0: @ 8059BB0 ldr r0, =gBattleBufferA + 4 adds r4, r0 ldr r6, =gDisplayedStringBattle - ldr r1, =gUnknown_085CCA73 + ldr r1, =gText_MoveInterfaceType adds r0, r6, 0 bl StringCopy movs r1, 0xFC @@ -4716,7 +4716,7 @@ b_link_standby_message: @ 8059DC0 strh r1, [r0] ldr r0, =gUnknown_02022E16 strh r1, [r0] - ldr r0, =gUnknown_085CCA29 + ldr r0, =gText_LinkStandby movs r1, 0 bl battle_show_message_maybe _08059DE0: @@ -8532,7 +8532,7 @@ dp01t_12_6_battle_menu: @ 805C044 ldr r1, =sub_805C004 str r1, [r0] bl sub_817F2A8 - ldr r0, =gUnknown_085CCA3A + ldr r0, =gText_BattleMenu movs r1, 0x2 bl battle_show_message_maybe movs r4, 0 @@ -8550,7 +8550,7 @@ _0805C062: ldrb r0, [r0] movs r1, 0 bl sub_8059CB4 - ldr r0, =gUnknown_085CC9F3 + ldr r0, =gText_WhatWillPkmnDo bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0x1 @@ -8578,7 +8578,7 @@ sub_805C0B0: @ 805C0B0 movs r2, 0x1D movs r3, 0xD bl sub_8056A3C - ldr r0, =gUnknown_085CCABB + ldr r0, =gText_BattleYesNoChoice movs r1, 0xC bl battle_show_message_maybe ldr r1, =gUnknown_03005D74 diff --git a/asm/battle_controller_safari.s b/asm/battle_controller_safari.s index 1aff72176..6ca6e9d4e 100644 --- a/asm/battle_controller_safari.s +++ b/asm/battle_controller_safari.s @@ -860,7 +860,7 @@ sub_8159A94: @ 8159A94 adds r0, r1 ldr r1, =sub_8159A54 str r1, [r0] - ldr r0, =gUnknown_085CCA54 + ldr r0, =gText_SafariZoneMenu movs r1, 0x2 bl battle_show_message_maybe movs r4, 0 @@ -878,7 +878,7 @@ _08159AAE: ldrb r0, [r0] movs r1, 0 bl sub_8059CB4 - ldr r0, =gUnknown_085CCA04 + ldr r0, =gText_WhatWillPkmnDo2 bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0x1 diff --git a/asm/battle_controller_wally.s b/asm/battle_controller_wally.s index ddb97f927..98d3e7c68 100644 --- a/asm/battle_controller_wally.s +++ b/asm/battle_controller_wally.s @@ -3674,7 +3674,7 @@ dp01t_12_1_battle_menu: @ 816A470 adds r0, r1 ldr r1, =sub_816A430 str r1, [r0] - ldr r0, =gUnknown_085CCA3A + ldr r0, =gText_BattleMenu movs r1, 0x2 bl battle_show_message_maybe movs r4, 0 @@ -3692,7 +3692,7 @@ _0816A48A: ldrb r0, [r0] movs r1, 0 bl sub_8059CB4 - ldr r0, =gUnknown_085CCA15 + ldr r0, =gText_WhatWillWallyDo bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0x1 diff --git a/asm/battle_frontier_1.s b/asm/battle_frontier_1.s index 135918627..5fb146afc 100755 --- a/asm/battle_frontier_1.s +++ b/asm/battle_frontier_1.s @@ -1802,7 +1802,7 @@ _0818F974: sub_818F9B0: @ 818F9B0 push {lr} ldr r0, =gStringVar1 - ldr r2, =gUnknown_085CCD20 + ldr r2, =gRoundsStringTable ldr r1, =gSaveBlock2Ptr ldr r1, [r1] ldr r3, =0x00000cb2 @@ -1821,7 +1821,7 @@ sub_818F9B0: @ 818F9B0 sub_818F9E0: @ 818F9E0 push {lr} ldr r0, =gStringVar1 - ldr r2, =gUnknown_085CCD20 + ldr r2, =gRoundsStringTable ldr r1, =gSaveBlock2Ptr ldr r1, [r1] ldr r3, =0x00000cb2 @@ -10605,7 +10605,7 @@ _081944FC: movs r2, 0 movs r1, 0x2 strb r1, [r0, 0x5] - ldr r0, =gUnknown_085CCCEE + ldr r0, =gText_BattleTourney str r0, [sp, 0x4] add r0, sp, 0x4 strb r1, [r0, 0x4] diff --git a/asm/battle_frontier_2.s b/asm/battle_frontier_2.s index a8494efe6..40f084a0f 100755 --- a/asm/battle_frontier_2.s +++ b/asm/battle_frontier_2.s @@ -18104,7 +18104,7 @@ _081A3E38: cmp r5, r4 bne _081A3E50 ldr r0, =gStringVar1 - ldr r1, =gUnknown_085CCB79 + ldr r1, =gText_SpaceAndSpace bl StringAppend b _081A3EC8 .pool @@ -18112,7 +18112,7 @@ _081A3E50: cmp r5, r4 ble _081A3EC8 ldr r0, =gStringVar1 - ldr r1, =gUnknown_085CCB7F + ldr r1, =gText_CommaSpace bl StringAppend b _081A3EC8 .pool @@ -18120,17 +18120,17 @@ _081A3E68: cmp r4, r5 bne _081A3E80 ldr r0, =gStringVar1 - ldr r1, =gUnknown_085CCB79 + ldr r1, =gText_SpaceAndSpace bl StringAppend b _081A3E88 .pool _081A3E80: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085CCB7F + ldr r1, =gText_CommaSpace bl StringAppend _081A3E88: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085CCB86 + ldr r1, =gText_NewLine bl StringAppend b _081A3EC8 .pool @@ -18138,17 +18138,17 @@ _081A3EA0: cmp r4, r5 bne _081A3EB8 ldr r0, =gStringVar1 - ldr r1, =gUnknown_085CCB79 + ldr r1, =gText_SpaceAndSpace bl StringAppend b _081A3EC0 .pool _081A3EB8: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085CCB7F + ldr r1, =gText_CommaSpace bl StringAppend _081A3EC0: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085CCB84 + ldr r1, =gText_ScrollTextUp bl StringAppend _081A3EC8: ldr r0, =gStringVar1 @@ -18495,10 +18495,10 @@ _081A416A: cmp r4, 0 bne _081A41A4 ldr r4, =gStringVar1 - ldr r1, =gUnknown_085CCB82 + ldr r1, =gText_Space2 adds r0, r4, 0 bl StringAppend - ldr r1, =gUnknown_085CCB88 + ldr r1, =gText_Are adds r0, r4, 0 bl StringAppend b _081A4202 @@ -18509,17 +18509,17 @@ _081A41A4: cmp r0, 0 beq _081A41C0 ldr r0, =gStringVar1 - ldr r1, =gUnknown_085CCB84 + ldr r1, =gText_ScrollTextUp bl StringAppend b _081A41C8 .pool _081A41C0: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085CCB82 + ldr r1, =gText_Space2 bl StringAppend _081A41C8: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085CCB8C + ldr r1, =gText_Are2 bl StringAppend b _081A4202 .pool @@ -20577,30 +20577,30 @@ _081A5328: movs r0, 0x1 negs r0, r0 strb r0, [r1, 0x1] - ldr r0, =gUnknown_085CCDB2 + ldr r0, =gText_JapaneseHonorific bl StrCpyDecodeToDisplayedStringBattle ldr r4, =gDisplayedStringBattle adds r0, r4, 0 movs r1, 0xF bl battle_show_message_maybe - ldr r0, =gUnknown_085CCDB5 + ldr r0, =gText_Vs movs r1, 0x10 bl battle_show_message_maybe - ldr r0, =gUnknown_085CCDB8 + ldr r0, =gText_RivalBuffer bl StrCpyDecodeToDisplayedStringBattle adds r0, r4, 0 movs r1, 0x11 bl battle_show_message_maybe - ldr r0, =gUnknown_085CCDBB + ldr r0, =gText_Mind movs r1, 0x12 bl battle_show_message_maybe - ldr r0, =gUnknown_085CCDC0 + ldr r0, =gText_Skill movs r1, 0x13 bl battle_show_message_maybe - ldr r0, =gUnknown_085CCDC6 + ldr r0, =gText_Body movs r1, 0x14 bl battle_show_message_maybe - ldr r0, =gUnknown_085CCDCB + ldr r0, =gText_Judgement bl StrCpyDecodeToDisplayedStringBattle adds r0, r4, 0 movs r1, 0x15 @@ -20684,7 +20684,7 @@ _081A544C: _081A5464: movs r3, 0x1 bl sub_81A5558 - ldr r0, =gUnknown_085CCDCB + ldr r0, =gText_Judgement bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0x15 diff --git a/asm/battle_interface.s b/asm/battle_interface.s index fb6a48194..e5f031962 100755 --- a/asm/battle_interface.s +++ b/asm/battle_interface.s @@ -4375,7 +4375,7 @@ sub_8074770: @ 8074770 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r0, =gUnknown_085CCB2C + ldr r0, =gText_SafariBalls add r1, sp, 0x4 str r1, [sp] movs r1, 0 @@ -4419,7 +4419,7 @@ sub_80747D8: @ 80747D8 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r1, =gUnknown_085CCB3C + ldr r1, =gText_SafariBallLeft add r0, sp, 0x4 bl StringCopy ldr r1, =gNumSafariBalls diff --git a/asm/battle_message.s b/asm/battle_message.s index 954be7e89..60051a8f5 100644 --- a/asm/battle_message.s +++ b/asm/battle_message.s @@ -136,12 +136,12 @@ _0814E1CC: movs r0, 0x80 lsls r0, 17 ands r2, r0 - ldr r7, =gUnknown_085CBBCD + ldr r7, =gText_TwoTrainersWantToBattle cmp r2, 0 bne _0814E200 b _0814E6D8 _0814E200: - ldr r7, =gUnknown_085CD318 + ldr r7, =gText_TwoTrainersWantToBattle3 b _0814E6D8 .pool _0814E214: @@ -151,19 +151,19 @@ _0814E214: lsls r0, 4 cmp r1, r0 bne _0814E22C - ldr r7, =gUnknown_085CBB9C + ldr r7, =gText_TrainerXYWantsToBattle b _0814E6D8 .pool _0814E22C: movs r0, 0x80 lsls r0, 17 ands r2, r0 - ldr r7, =gUnknown_085CBBB9 + ldr r7, =gText_TrainerXWantsToBattle cmp r2, 0 bne _0814E23A b _0814E6D8 _0814E23A: - ldr r7, =gUnknown_085CD301 + ldr r7, =gText_TrainerWantsToBattle b _0814E6D8 .pool _0814E248: @@ -175,12 +175,12 @@ _0814E248: movs r0, 0x80 lsls r0, 8 ands r2, r0 - ldr r7, =gUnknown_085CBB9C + ldr r7, =gText_TrainerXYWantsToBattle cmp r2, 0 bne _0814E260 b _0814E6D8 _0814E260: - ldr r7, =gUnknown_085CCE17 + ldr r7, =gText_TwoTrainersWantToBattle2 b _0814E6D8 .pool _0814E26C: @@ -189,7 +189,7 @@ _0814E26C: ands r0, r2 cmp r0, 0 beq _0814E280 - ldr r7, =gUnknown_085CBB5A + ldr r7, =gText_WildPkmnAppeared2 b _0814E6D8 .pool _0814E280: @@ -197,19 +197,19 @@ _0814E280: ands r0, r2 cmp r0, 0 beq _0814E290 - ldr r7, =gUnknown_085CBB82 + ldr r7, =gText_TwoWildPkmnAppeared b _0814E6D8 .pool _0814E290: movs r0, 0x80 lsls r0, 2 ands r2, r0 - ldr r7, =gUnknown_085CBB47 + ldr r7, =gText_WildPkmnAppeared cmp r2, 0 bne _0814E29E b _0814E6D8 _0814E29E: - ldr r7, =gUnknown_085CBB6D + ldr r7, =gText_WildPkmnAppearedPause b _0814E6D8 .pool _0814E2AC: @@ -230,7 +230,7 @@ _0814E2AC: ands r0, r1 cmp r0, 0 beq _0814E2DC - ldr r7, =gUnknown_085CCE38 + ldr r7, =gText_TrainerXYSentOutZGoN b _0814E6D8 .pool _0814E2DC: @@ -239,22 +239,22 @@ _0814E2DC: ands r0, r1 cmp r0, 0 beq _0814E2F0 - ldr r7, =gUnknown_085CBC96 + ldr r7, =gText_GoTwoPkmn b _0814E6D8 .pool _0814E2F0: movs r0, 0x40 ands r1, r0 - ldr r7, =gUnknown_085CBC96 + ldr r7, =gText_GoTwoPkmn cmp r1, 0 bne _0814E2FC b _0814E6D8 _0814E2FC: - ldr r7, =gUnknown_085CBCE5 + ldr r7, =gText_EnemySentOutPkmnGoPkmn b _0814E6D8 .pool _0814E308: - ldr r7, =gUnknown_085CBC8E + ldr r7, =gText_GoPkmn b _0814E6D8 .pool _0814E310: @@ -275,7 +275,7 @@ _0814E310: cmp r0, 0 beq _0814E33C _0814E330: - ldr r7, =gUnknown_085CCDDE + ldr r7, =gText_TwoTrainersSentPkmn b _0814E6D8 .pool _0814E33C: @@ -283,18 +283,18 @@ _0814E33C: ands r0, r1 cmp r0, 0 beq _0814E34C - ldr r7, =gUnknown_085CBC4E + ldr r7, =gText_TwoTrainersSentOutPkmn b _0814E6D8 .pool _0814E34C: ldr r0, =0x02000002 ands r1, r0 - ldr r7, =gUnknown_085CBBFA + ldr r7, =gText_TrainerXYSentOutTwoPkmn cmp r1, 0 bne _0814E358 b _0814E6D8 _0814E358: - ldr r7, =gUnknown_085CBC37 + ldr r7, =gText_TrainerXSentOutTwoPkmn b _0814E6D8 .pool _0814E368: @@ -306,12 +306,12 @@ _0814E368: ldrh r1, [r0] movs r0, 0xC0 lsls r0, 4 - ldr r7, =gUnknown_085CBC27 + ldr r7, =gText_TrainerXSentOutPkmn cmp r1, r0 beq _0814E380 b _0814E6D8 _0814E380: - ldr r7, =gUnknown_085CBBE7 + ldr r7, =gText_TrainerXYSentOutPkmn b _0814E6D8 .pool _0814E394: @@ -327,7 +327,7 @@ _0814E394: ldrb r2, [r0] cmp r2, 0 bne _0814E3BC - ldr r7, =gUnknown_085CBCFD + ldr r7, =gText_PkmnThatsEnough b _0814E6D8 .pool _0814E3BC: @@ -340,16 +340,16 @@ _0814E3BC: cmp r0, 0 beq _0814E3D8 _0814E3CC: - ldr r7, =gUnknown_085CBD1B + ldr r7, =gText_PkmnComeBack b _0814E6D8 .pool _0814E3D8: - ldr r7, =gUnknown_085CBD3D + ldr r7, =gText_PkmnGoodComeBack cmp r2, 0x2 beq _0814E3E0 b _0814E6D8 _0814E3E0: - ldr r7, =gUnknown_085CBD2A + ldr r7, =gText_PkmnOkComeBack b _0814E6D8 .pool _0814E3EC: @@ -370,16 +370,16 @@ _0814E406: ldr r0, [r2] movs r1, 0x40 ands r0, r1 - ldr r7, =gUnknown_085CBD65 + ldr r7, =gText_TrainerXWithdrewPkmn cmp r0, 0 bne _0814E414 b _0814E6D8 _0814E414: - ldr r7, =gUnknown_085CBD75 + ldr r7, =gText_TrainerXWithdrewPkmn2 b _0814E6D8 .pool _0814E428: - ldr r7, =gUnknown_085CBD52 + ldr r7, =gText_TrainerXYWithdrewPkmn b _0814E6D8 .pool _0814E430: @@ -402,22 +402,22 @@ _0814E430: cmp r0, 0 beq _0814E468 _0814E456: - ldr r7, =gUnknown_085CBCA5 + ldr r7, =gText_GoPkmn2 b _0814E6D8 .pool _0814E468: cmp r2, 0x1 bne _0814E474 - ldr r7, =gUnknown_085CBCAD + ldr r7, =gText_DoItPkmn b _0814E6D8 .pool _0814E474: - ldr r7, =gUnknown_085CBCC7 + ldr r7, =gText_YourFoesWeakGetEmPkmn cmp r2, 0x2 beq _0814E47C b _0814E6D8 _0814E47C: - ldr r7, =gUnknown_085CBCB8 + ldr r7, =gText_GoForItPkmn b _0814E6D8 .pool _0814E488: @@ -440,7 +440,7 @@ _0814E4AC: ands r1, r0 cmp r1, 0 beq _0814E4BC - ldr r7, =gUnknown_085CBC7E + ldr r7, =gText_TrainerXSentOutPkmn3 b _0814E6D8 .pool _0814E4BC: @@ -448,12 +448,12 @@ _0814E4BC: ldrh r1, [r0] movs r0, 0xC0 lsls r0, 4 - ldr r7, =gUnknown_085CBC6E + ldr r7, =gText_TrainerXSentOutPkmn2 cmp r1, r0 beq _0814E4CC b _0814E6D8 _0814E4CC: - ldr r7, =gUnknown_085CBC14 + ldr r7, =gText_TrainerXYSentOutPkmn2 b _0814E6D8 .pool _0814E4DC: @@ -465,7 +465,7 @@ _0814E4DC: mov r1, r9 ldrb r0, [r1, 0x17] _0814E4EA: - ldr r7, =gUnknown_085CCE04 + ldr r7, =gText_TrainerXYSentOutPkmn3 cmp r0, 0x1 beq _0814E4F2 b _0814E6D8 @@ -489,7 +489,7 @@ _0814E4F8: ldrb r2, [r1] lsls r1, r2, 4 adds r1, r2 - ldr r2, =gUnknown_085CCBBC + ldr r2, =gText_UnknownMoveTypes adds r1, r2 bl StringCopy b _0814E544 @@ -505,7 +505,7 @@ _0814E534: _0814E544: ldr r0, =gBattleTextBuff2 bl sub_814F950 - ldr r7, =gUnknown_085CBDAC + ldr r7, =gText_XUsedY2 b _0814E6D8 .pool _0814E55C: @@ -547,12 +547,12 @@ _0814E5A4: ldr r0, [r0] movs r1, 0x40 ands r0, r1 - ldr r7, =gUnknown_085CB5D2 + ldr r7, =gText_WildFled cmp r0, 0 bne _0814E5B4 b _0814E6D8 _0814E5B4: - ldr r7, =gUnknown_085CB5DF + ldr r7, =gText_TwoWildFled b _0814E6D8 .pool _0814E5C4: @@ -594,18 +594,18 @@ _0814E60E: movs r0, 0x80 lsls r0, 16 ands r1, r0 - ldr r7, =gUnknown_085CB538 + ldr r7, =gText_PlayerBeatTwo cmp r1, 0 beq _0814E6D8 ldr r7, =gText_TwoEnemiesDefeated b _0814E6D8 .pool _0814E628: - ldr r7, =gUnknown_085CB567 + ldr r7, =gText_PlayerLostToTwo b _0814E6D8 .pool _0814E630: - ldr r7, =gUnknown_085CB5A6 + ldr r7, =gText_PlayerBattledToDrawVsTwo b _0814E6D8 .pool _0814E638: @@ -634,11 +634,11 @@ _0814E666: b _0814E6D8 .pool _0814E670: - ldr r7, =gUnknown_085CD24C + ldr r7, =gText_PlayerLostAgainst2 b _0814E6D8 .pool _0814E678: - ldr r7, =gUnknown_085CD267 + ldr r7, =gText_PlayerBattledToDraw2 b _0814E6D8 .pool _0814E680: @@ -657,15 +657,15 @@ _0814E698: beq _0814E6B0 b _0814E6D8 _0814E69E: - ldr r7, =gUnknown_085CB524 + ldr r7, =gText_PlayerDefeated b _0814E6D8 .pool _0814E6A8: - ldr r7, =gUnknown_085CB54F + ldr r7, =gText_PlayerLostAgainst b _0814E6D8 .pool _0814E6B0: - ldr r7, =gUnknown_085CB581 + ldr r7, =gText_PlayerBattledToDraw b _0814E6D8 .pool _0814E6B8: @@ -679,7 +679,7 @@ _0814E6B8: b _0814E6DE .pool _0814E6CC: - ldr r1, =gUnknown_085CC270 + ldr r1, =gBattleStringsTable adds r0, r6, 0 subs r0, 0xC lsls r0, 2 @@ -1104,10 +1104,10 @@ _0814EAF8: ldr r1, [r0] movs r0, 0x8 ands r1, r0 - ldr r4, =gUnknown_085CBD85 + ldr r4, =gText_WildPkmnPrefix cmp r1, 0 beq _0814EB36 - ldr r4, =gUnknown_085CBD8B + ldr r4, =gText_FoePkmnPrefix b _0814EB36 .pool _0814EB2C: @@ -1229,10 +1229,10 @@ _0814EC38: ldr r1, [r0] movs r0, 0x8 ands r1, r0 - ldr r4, =gUnknown_085CBD85 + ldr r4, =gText_WildPkmnPrefix cmp r1, 0 beq _0814EC56 - ldr r4, =gUnknown_085CBD8B + ldr r4, =gText_FoePkmnPrefix _0814EC56: ldrb r1, [r4] adds r0, r1, 0 @@ -1294,10 +1294,10 @@ _0814ECD4: ldr r1, [r0] movs r0, 0x8 ands r1, r0 - ldr r4, =gUnknown_085CBD85 + ldr r4, =gText_WildPkmnPrefix cmp r1, 0 beq _0814ECF2 - ldr r4, =gUnknown_085CBD8B + ldr r4, =gText_FoePkmnPrefix _0814ECF2: ldrb r1, [r4] adds r0, r1, 0 @@ -1359,10 +1359,10 @@ _0814ED70: ldr r1, [r0] movs r0, 0x8 ands r1, r0 - ldr r4, =gUnknown_085CBD85 + ldr r4, =gText_WildPkmnPrefix cmp r1, 0 beq _0814ED8E - ldr r4, =gUnknown_085CBD8B + ldr r4, =gText_FoePkmnPrefix _0814ED8E: ldrb r1, [r4] adds r0, r1, 0 @@ -1424,10 +1424,10 @@ _0814EE0C: ldr r1, [r0] movs r0, 0x8 ands r1, r0 - ldr r4, =gUnknown_085CBD85 + ldr r4, =gText_WildPkmnPrefix cmp r1, 0 beq _0814EE2A - ldr r4, =gUnknown_085CBD8B + ldr r4, =gText_FoePkmnPrefix _0814EE2A: ldrb r1, [r4] adds r0, r1, 0 @@ -1489,10 +1489,10 @@ _0814EEA8: ldr r1, [r0] movs r0, 0x8 ands r1, r0 - ldr r4, =gUnknown_085CBD85 + ldr r4, =gText_WildPkmnPrefix cmp r1, 0 beq _0814EEC6 - ldr r4, =gUnknown_085CBD8B + ldr r4, =gText_FoePkmnPrefix _0814EEC6: ldrb r1, [r4] adds r0, r1, 0 @@ -1569,7 +1569,7 @@ _0814EF6A: ldrb r1, [r0] lsls r0, r1, 4 adds r0, r1 - ldr r1, =gUnknown_085CCBBC + ldr r1, =gText_UnknownMoveTypes adds r4, r0, r1 b _0814F5C0 .pool @@ -1626,7 +1626,7 @@ _0814EFEC: adds r1, r0 mov r0, sp bl StringCopy - ldr r1, =gUnknown_085CC0AD + ldr r1, =gText_BerrySuffix mov r0, sp bl StringAppend b _0814F5BE @@ -1652,13 +1652,13 @@ _0814F014: adds r1, r0 mov r0, sp bl StringCopy - ldr r1, =gUnknown_085CC0AD + ldr r1, =gText_BerrySuffix mov r0, sp bl StringAppend b _0814F5BE .pool _0814F05C: - ldr r4, =gUnknown_085CC0A0 + ldr r4, =gText_EnigmaBerry b _0814F5C0 .pool _0814F064: @@ -1996,10 +1996,10 @@ _0814F330: ldr r1, [r0] movs r0, 0x8 ands r1, r0 - ldr r4, =gUnknown_085CBD85 + ldr r4, =gText_WildPkmnPrefix cmp r1, 0 beq _0814F34E - ldr r4, =gUnknown_085CBD8B + ldr r4, =gText_FoePkmnPrefix _0814F34E: ldrb r1, [r4] adds r0, r1, 0 @@ -2051,12 +2051,12 @@ _0814F3C4: ldr r0, =0x000008ab bl FlagGet lsls r0, 24 - ldr r4, =gUnknown_085CC015 + ldr r4, =gText_SomeonesPC cmp r0, 0 bne _0814F3D4 b _0814F5C0 _0814F3D4: - ldr r4, =gUnknown_085CC01F + ldr r4, =gText_LanettesPC b _0814F5C0 .pool _0814F3E4: @@ -2069,12 +2069,12 @@ _0814F3EE: ldrb r0, [r0] bl GetBankSide lsls r0, 24 - ldr r4, =gUnknown_085CBD9A + ldr r4, =gText_FoePkmnPrefix3 cmp r0, 0 beq _0814F3FE b _0814F5C0 _0814F3FE: - ldr r4, =gUnknown_085CBD9E + ldr r4, =gText_AllyPkmnPrefix2 b _0814F5C0 .pool _0814F410: @@ -2087,12 +2087,12 @@ _0814F41A: ldrb r0, [r0] bl GetBankSide lsls r0, 24 - ldr r4, =gUnknown_085CBD91 + ldr r4, =gText_FoePkmnPrefix2 cmp r0, 0 beq _0814F42A b _0814F5C0 _0814F42A: - ldr r4, =gUnknown_085CBD95 + ldr r4, =gText_AllyPkmnPrefix b _0814F5C0 .pool _0814F43C: @@ -2105,12 +2105,12 @@ _0814F446: ldrb r0, [r0] bl GetBankSide lsls r0, 24 - ldr r4, =gUnknown_085CBDA3 + ldr r4, =gText_FoePkmnPrefix4 cmp r0, 0 beq _0814F456 b _0814F5C0 _0814F456: - ldr r4, =gUnknown_085CBDA7 + ldr r4, =gText_AllyPkmnPrefix3 b _0814F5C0 .pool _0814F468: @@ -2387,7 +2387,7 @@ _0814F6AC: ldrb r0, [r0, 0x2] lsls r0, 8 orrs r1, r0 - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable subs r1, 0xC lsls r1, 2 adds r1, r0 @@ -2485,13 +2485,13 @@ _0814F768: ands r0, r1 cmp r0, 0 beq _0814F788 - ldr r1, =gUnknown_085CBD8B + ldr r1, =gText_FoePkmnPrefix adds r0, r6, 0 bl StringAppend b _0814F790 .pool _0814F788: - ldr r1, =gUnknown_085CBD85 + ldr r1, =gText_WildPkmnPrefix adds r0, r6, 0 bl StringAppend _0814F790: @@ -2562,7 +2562,7 @@ _0814F81A: b _0814F8DE .pool _0814F828: - ldr r1, =gUnknown_085CBE6C + ldr r1, =gPokeblockWasTooXStringTable adds r0, r5, r7 ldrb r0, [r0, 0x1] lsls r0, 2 @@ -2618,11 +2618,11 @@ _0814F858: adds r1, r0 adds r0, r6, 0 bl StringCopy - ldr r1, =gUnknown_085CC0AD + ldr r1, =gText_BerrySuffix b _0814F8BE .pool _0814F8BC: - ldr r1, =gUnknown_085CC0A0 + ldr r1, =gText_EnigmaBerry _0814F8BE: adds r0, r6, 0 bl StringAppend @@ -2679,7 +2679,7 @@ _0814F918: blt _0814F944 cmp r2, 0x2 bgt _0814F938 - ldr r1, =gUnknown_085CCBB5 + ldr r1, =gText_SpaceIs adds r0, r4, 0 bl StringCopy b _0814F944 @@ -2687,7 +2687,7 @@ _0814F918: _0814F938: cmp r2, 0x4 bgt _0814F944 - ldr r1, =gUnknown_085CCBB9 + ldr r1, =gText_ApostropheS adds r0, r4, 0 bl StringCopy _0814F944: @@ -2744,26 +2744,26 @@ _0814F99C: .4byte _0814F9C8 .4byte _0814F9D8 _0814F9B0: - ldr r1, =gUnknown_085CBDB7 + ldr r1, =gText_ExclamationMark b _0814F9CA .pool _0814F9B8: - ldr r1, =gUnknown_085CBDB9 + ldr r1, =gText_ExclamationMark2 b _0814F9CA .pool _0814F9C0: - ldr r1, =gUnknown_085CBDBB + ldr r1, =gText_ExclamationMark3 b _0814F9CA .pool _0814F9C8: - ldr r1, =gUnknown_085CBDBD + ldr r1, =gText_ExclamationMark4 _0814F9CA: adds r0, r3, 0 bl StringCopy b _0814F9E0 .pool _0814F9D8: - ldr r1, =gUnknown_085CBDBF + ldr r1, =gText_ExclamationMark5 adds r0, r3, 0 bl StringCopy _0814F9E0: diff --git a/asm/evolution_scene.s b/asm/evolution_scene.s index b8710acd4..f66ec736c 100644 --- a/asm/evolution_scene.s +++ b/asm/evolution_scene.s @@ -1333,7 +1333,7 @@ _0813E6D4: bl _0813F1A4 _0813E6E4: ldr r4, =gStringVar4 - ldr r1, =gUnknown_085CC990 + ldr r1, =gText_PkmnIsEvolving adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -1621,7 +1621,7 @@ _0813E990: bl _0813F1A4 _0813E99E: ldr r4, =gStringVar4 - ldr r1, =gUnknown_085CC9A6 + ldr r1, =gText_CongratsPkmnEvolved adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -1857,13 +1857,13 @@ _0813EBB8: cmp r0, 0 beq _0813EBE4 ldr r0, =gStringVar4 - ldr r1, =gUnknown_085CC9EE + ldr r1, =gText_EllipsisQuestionMark bl StringExpandPlaceholders b _0813EBEC .pool _0813EBE4: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085CC9D3 + ldr r1, =gText_PkmnStoppedEvolving bl StringExpandPlaceholders _0813EBEC: ldr r0, =gStringVar4 @@ -1895,7 +1895,7 @@ _0813EC2A: bl sub_804F574 ldr r0, =0x0000016f bl PlayFanfare - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r0, [r0, 0xC] bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle @@ -1992,7 +1992,7 @@ _0813ED0A: b _0813F1A4 _0813ED16: bl sub_804F574 - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r0, [r0, 0x10] bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle @@ -2021,7 +2021,7 @@ _0813ED56: beq _0813ED62 b _0813F1A4 _0813ED62: - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r0, [r0, 0x14] bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle @@ -2046,7 +2046,7 @@ _0813ED90: lsls r0, 24 cmp r0, 0 bne _0813EDCE - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r0, [r0, 0x18] bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle @@ -2085,7 +2085,7 @@ _0813EDEA: movs r2, 0x1D movs r3, 0xD bl sub_8056A3C - ldr r0, =gUnknown_085CCABB + ldr r0, =gText_BattleYesNoChoice movs r1, 0xC bl battle_show_message_maybe ldr r0, =gTasks @@ -2285,7 +2285,7 @@ _0813EFC8: bl IsHMMove2 cmp r0, 0 beq _0813F014 - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r3, =0x000004cc adds r0, r3 ldr r0, [r0] @@ -2333,7 +2333,7 @@ _0813F014: b _0813F1A2 .pool _0813F05C: - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable movs r1, 0xCF lsls r1, 2 adds r0, r1 @@ -2365,7 +2365,7 @@ _0813F09E: beq _0813F0AA b _0813F1A4 _0813F0AA: - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r0, [r0, 0x1C] bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle @@ -2390,7 +2390,7 @@ _0813F0D8: lsls r0, 24 cmp r0, 0 bne _0813F1A4 - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable movs r1, 0xD0 lsls r1, 2 adds r0, r1 @@ -2409,7 +2409,7 @@ _0813F0D8: b _0813F1A4 .pool _0813F120: - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r0, [r0, 0x20] bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle @@ -2429,7 +2429,7 @@ _0813F120: b _0813F1A4 .pool _0813F154: - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r0, [r0, 0x24] bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle @@ -2533,7 +2533,7 @@ _0813F204: .4byte _0813F7E4 _0813F258: ldr r4, =gStringVar4 - ldr r1, =gUnknown_085CC990 + ldr r1, =gText_PkmnIsEvolving adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0 @@ -2804,7 +2804,7 @@ _0813F4E4: bl _0813FCC4 _0813F4F2: ldr r4, =gStringVar4 - ldr r1, =gUnknown_085CC9A6 + ldr r1, =gText_CongratsPkmnEvolved adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0 @@ -3029,7 +3029,7 @@ _0813F704: b _0813FCC4 _0813F714: ldr r4, =gStringVar4 - ldr r1, =gUnknown_085CC9EE + ldr r1, =gText_EllipsisQuestionMark adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0 @@ -3062,7 +3062,7 @@ _0813F762: bl sub_804F574 ldr r0, =0x0000016f bl PlayFanfare - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r0, [r0, 0xC] bl StrCpyDecodeToDisplayedStringBattle ldr r1, =gDisplayedStringBattle @@ -3161,7 +3161,7 @@ _0813F846: b _0813FCC4 _0813F852: bl sub_804F574 - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r0, [r0, 0x10] bl StrCpyDecodeToDisplayedStringBattle ldr r1, =gDisplayedStringBattle @@ -3191,7 +3191,7 @@ _0813F892: beq _0813F89E b _0813FCC4 _0813F89E: - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r0, [r0, 0x14] bl StrCpyDecodeToDisplayedStringBattle ldr r1, =gDisplayedStringBattle @@ -3217,7 +3217,7 @@ _0813F8CC: lsls r0, 24 cmp r0, 0 bne _0813F90C - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r0, [r0, 0x18] bl StrCpyDecodeToDisplayedStringBattle ldr r1, =gDisplayedStringBattle @@ -3294,7 +3294,7 @@ _0813F986: _0813F98C: ldr r0, =gBattleCommunication strb r6, [r0, 0x1] - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable movs r1, 0x92 lsls r1, 3 adds r0, r1 @@ -3331,7 +3331,7 @@ _0813F9E4: ldr r1, =gBattleCommunication movs r0, 0x1 strb r0, [r1, 0x1] - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable movs r1, 0x92 lsls r1, 3 adds r0, r1 @@ -3437,7 +3437,7 @@ _0813FAEC: bl IsHMMove2 cmp r0, 0 beq _0813FB3C - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r1, =0x000004cc adds r0, r1 ldr r0, [r0] @@ -3476,7 +3476,7 @@ _0813FB3C: mov r0, r9 adds r2, r4, 0 bl SetMonMoveSlot - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable movs r1, 0xCF lsls r1, 2 adds r0, r1 @@ -3509,7 +3509,7 @@ _0813FBB2: beq _0813FBBE b _0813FCC4 _0813FBBE: - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r0, [r0, 0x1C] bl StrCpyDecodeToDisplayedStringBattle ldr r1, =gDisplayedStringBattle @@ -3535,7 +3535,7 @@ _0813FBEC: lsls r0, 24 cmp r0, 0 bne _0813FCC4 - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable movs r1, 0xD0 lsls r1, 2 adds r0, r1 @@ -3555,7 +3555,7 @@ _0813FBEC: b _0813FCC4 .pool _0813FC38: - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r0, [r0, 0x20] bl StrCpyDecodeToDisplayedStringBattle ldr r1, =gDisplayedStringBattle @@ -3576,7 +3576,7 @@ _0813FC38: b _0813FCC4 .pool _0813FC70: - ldr r0, =gUnknown_085CC270 + ldr r0, =gBattleStringsTable ldr r0, [r0, 0x24] bl StrCpyDecodeToDisplayedStringBattle ldr r1, =gDisplayedStringBattle diff --git a/charmap.txt b/charmap.txt index 4f2f10e0b..8fe4147cc 100644 --- a/charmap.txt +++ b/charmap.txt @@ -440,12 +440,14 @@ GREEN = 06 LIGHT_GREEN = 07 BLUE = 08 LIGHT_BLUE = 09 -BORDER_COLOR1 = 0A @ white -BORDER_COLOR2 = 0B @ white with a tinge of green -BORDER_COLOR3 = 0C @ white 2 -BORDER_COLOR4 = 0D @ aquamarine -BORDER_COLOR5 = 0E @ blue-green -BORDER_COLOR6 = 0F @ cerulean +@ these next colors can be set to anything arbitrary at runtime +@ usually though they'll have the textbox border colors as described below +DYNAMIC_COLOR1 = 0A @ white +DYNAMIC_COLOR2 = 0B @ white with a tinge of green +DYNAMIC_COLOR3 = 0C @ white 2 +DYNAMIC_COLOR4 = 0D @ aquamarine +DYNAMIC_COLOR5 = 0E @ blue-green +DYNAMIC_COLOR6 = 0F @ cerulean @ sound and music diff --git a/data/battle_message.s b/data/battle_message.s index 40040d9c2..03e1baa12 100644 --- a/data/battle_message.s +++ b/data/battle_message.s @@ -804,28 +804,28 @@ gText_PkmnFledUsing:: @ 85CB4FB gText_WildPkmnFled:: @ 85CB512 .string "{PLAY_SE 0x0011}Wild {STRING 0} fled!$" -gUnknown_085CB524:: @ 85CB524 +gText_PlayerDefeated:: @ 85CB524 .string "Player defeated\n{STRING 32}!$" -gUnknown_085CB538:: @ 85CB538 +gText_PlayerBeatTwo:: @ 85CB538 .string "Player beat {STRING 32}\nand {STRING 33}!$" -gUnknown_085CB54F:: @ 85CB54F +gText_PlayerLostAgainst:: @ 85CB54F .string "Player lost against\n{STRING 32}!$" -gUnknown_085CB567:: @ 85CB567 +gText_PlayerLostToTwo:: @ 85CB567 .string "Player lost to {STRING 32}\nand {STRING 33}!$" -gUnknown_085CB581:: @ 85CB581 +gText_PlayerBattledToDraw:: @ 85CB581 .string "Player battled to a draw against\n{STRING 32}!$" -gUnknown_085CB5A6:: @ 85CB5A6 +gText_PlayerBattledToDrawVsTwo:: @ 85CB5A6 .string "Player battled to a draw against\n{STRING 32} and {STRING 33}!$" -gUnknown_085CB5D2:: @ 85CB5D2 +gText_WildFled:: @ 85CB5D2 .string "{PLAY_SE 0x0011}{STRING 32} fled!$" -gUnknown_085CB5DF:: @ 85CB5DF +gText_TwoWildFled:: @ 85CB5DF .string "{PLAY_SE 0x0011}{STRING 32} and\n{STRING 33} fled!$" gText_NoRunningFromTrainers:: @ 85CB5F3 @@ -980,194 +980,194 @@ gText_OutOfSafariBalls:: @ 85CBB02 .string "{RIVAL} appeared!\p$" -gUnknown_085CBB47:: @ 85CBB47 +gText_WildPkmnAppeared:: @ 85CBB47 .string "Wild {RIVAL} appeared!\p$" -gUnknown_085CBB5A:: @ 85CBB5A +gText_WildPkmnAppeared2:: @ 85CBB5A .string "Wild {RIVAL} appeared!\p$" -gUnknown_085CBB6D:: @ 85CBB6D +gText_WildPkmnAppearedPause:: @ 85CBB6D .string "Wild {RIVAL} appeared!{PAUSE 127}$" -gUnknown_085CBB82:: @ 85CBB82 +gText_TwoWildPkmnAppeared:: @ 85CBB82 .string "Wild {RIVAL} and\n{AQUA} appeared!\p$" -gUnknown_085CBB9C:: @ 85CBB9C +gText_TrainerXYWantsToBattle:: @ 85CBB9C .string "{STRING 28} {STRING 29}\nwould like to battle!\p$" -gUnknown_085CBBB9:: @ 85CBBB9 +gText_TrainerXWantsToBattle:: @ 85CBBB9 .string "{STRING 32}\nwants to battle!$" -gUnknown_085CBBCD:: @ 85CBBCD +gText_TwoTrainersWantToBattle:: @ 85CBBCD .string "{STRING 32} and {STRING 33}\nwant to battle!$" -gUnknown_085CBBE7:: @ 85CBBE7 +gText_TrainerXYSentOutPkmn:: @ 85CBBE7 .string "{STRING 28} {STRING 29} sent\nout {RIVAL}!$" -gUnknown_085CBBFA:: @ 85CBBFA +gText_TrainerXYSentOutTwoPkmn:: @ 85CBBFA .string "{STRING 28} {STRING 29} sent\nout {RIVAL} and {AQUA}!$" -gUnknown_085CBC14:: @ 85CBC14 +gText_TrainerXYSentOutPkmn2:: @ 85CBC14 .string "{STRING 28} {STRING 29} sent\nout {STRING 0}!$" -gUnknown_085CBC27:: @ 85CBC27 +gText_TrainerXSentOutPkmn:: @ 85CBC27 .string "{STRING 32} sent out\n{RIVAL}!$" -gUnknown_085CBC37:: @ 85CBC37 +gText_TrainerXSentOutTwoPkmn:: @ 85CBC37 .string "{STRING 32} sent out\n{RIVAL} and {AQUA}!$" -gUnknown_085CBC4E:: @ 85CBC4E +gText_TwoTrainersSentOutPkmn:: @ 85CBC4E .string "{STRING 32} sent out {STRING 10}!\n{STRING 33} sent out {STRING 12}!$" -gUnknown_085CBC6E:: @ 85CBC6E +gText_TrainerXSentOutPkmn2:: @ 85CBC6E .string "{STRING 32} sent out\n{STRING 0}!$" -gUnknown_085CBC7E:: @ 85CBC7E +gText_TrainerXSentOutPkmn3:: @ 85CBC7E .string "{STRING 34} sent out\n{STRING 0}!$" -gUnknown_085CBC8E:: @ 85CBC8E +gText_GoPkmn:: @ 85CBC8E .string "Go! {STRING 5}!$" -gUnknown_085CBC96:: @ 85CBC96 +gText_GoTwoPkmn:: @ 85CBC96 .string "Go! {STRING 5} and\n{VERSION}!$" -gUnknown_085CBCA5:: @ 85CBCA5 +gText_GoPkmn2:: @ 85CBCA5 .string "Go! {STRING 0}!$" -gUnknown_085CBCAD:: @ 85CBCAD +gText_DoItPkmn:: @ 85CBCAD .string "Do it! {STRING 0}!$" -gUnknown_085CBCB8:: @ 85CBCB8 +gText_GoForItPkmn:: @ 85CBCB8 .string "Go for it, {STRING 0}!$" -gUnknown_085CBCC7:: @ 85CBCC7 +gText_YourFoesWeakGetEmPkmn:: @ 85CBCC7 .string "Your foe’s weak!\nGet ’em, {STRING 0}!$" -gUnknown_085CBCE5:: @ 85CBCE5 +gText_EnemySentOutPkmnGoPkmn:: @ 85CBCE5 .string "{STRING 31} sent out {STRING 11}!\nGo! {STRING 9}!$" -gUnknown_085CBCFD:: @ 85CBCFD +gText_PkmnThatsEnough:: @ 85CBCFD .string "{STRING 0}, that’s enough!\nCome back!$" -gUnknown_085CBD1B:: @ 85CBD1B +gText_PkmnComeBack:: @ 85CBD1B .string "{STRING 0}, come back!$" -gUnknown_085CBD2A:: @ 85CBD2A +gText_PkmnOkComeBack:: @ 85CBD2A .string "{STRING 0}, OK!\nCome back!$" -gUnknown_085CBD3D:: @ 85CBD3D +gText_PkmnGoodComeBack:: @ 85CBD3D .string "{STRING 0}, good!\nCome back!$" -gUnknown_085CBD52:: @ 85CBD52 +gText_TrainerXYWithdrewPkmn:: @ 85CBD52 .string "{STRING 28} {STRING 29}\nwithdrew {STRING 0}!$" -gUnknown_085CBD65:: @ 85CBD65 +gText_TrainerXWithdrewPkmn:: @ 85CBD65 .string "{STRING 32} withdrew\n{STRING 0}!$" -gUnknown_085CBD75:: @ 85CBD75 +gText_TrainerXWithdrewPkmn2:: @ 85CBD75 .string "{STRING 34} withdrew\n{STRING 0}!$" -gUnknown_085CBD85:: @ 85CBD85 +gText_WildPkmnPrefix:: @ 85CBD85 .string "Wild $" -gUnknown_085CBD8B:: @ 85CBD8B +gText_FoePkmnPrefix:: @ 85CBD8B .string "Foe $" .string "$" -gUnknown_085CBD91:: @ 85CBD91 +gText_FoePkmnPrefix2:: @ 85CBD91 .string "Foe$" -gUnknown_085CBD95:: @ 85CBD95 +gText_AllyPkmnPrefix:: @ 85CBD95 .string "Ally$" -gUnknown_085CBD9A:: @ 85CBD9A +gText_FoePkmnPrefix3:: @ 85CBD9A .string "Foe$" -gUnknown_085CBD9E:: @ 85CBD9E +gText_AllyPkmnPrefix2:: @ 85CBD9E .string "Ally$" -gUnknown_085CBDA3:: @ 85CBDA3 +gText_FoePkmnPrefix4:: @ 85CBDA3 .string "Foe$" -gUnknown_085CBDA7:: @ 85CBDA7 +gText_AllyPkmnPrefix3:: @ 85CBDA7 .string "Ally$" -gUnknown_085CBDAC:: @ 85CBDAC +gText_XUsedY2:: @ 85CBDAC .string "{STRING 15} used\n{PLAYER}$" -gUnknown_085CBDB7:: @ 85CBDB7 +gText_ExclamationMark:: @ 85CBDB7 .string "!$" -gUnknown_085CBDB9:: @ 85CBDB9 +gText_ExclamationMark2:: @ 85CBDB9 .string "!$" -gUnknown_085CBDBB:: @ 85CBDBB +gText_ExclamationMark3:: @ 85CBDBB .string "!$" -gUnknown_085CBDBD:: @ 85CBDBD +gText_ExclamationMark4:: @ 85CBDBD .string "!$" -gUnknown_085CBDBF:: @ 85CBDBF +gText_ExclamationMark5:: @ 85CBDBF .string "!$" -gUnknown_085CBDC1:: @ 85CBDC1 +gText_HP2:: @ 85CBDC1 .string "HP$" -gUnknown_085CBDC4:: @ 85CBDC4 +gText_Attack2:: @ 85CBDC4 .string "ATTACK$" -gUnknown_085CBDCB:: @ 85CBDCB +gText_Defense2:: @ 85CBDCB .string "DEFENSE$" -gUnknown_085CBDD3:: @ 85CBDD3 +gText_Speed:: @ 85CBDD3 .string "SPEED$" -gUnknown_085CBDD9:: @ 85CBDD9 +gText_SpAtk2:: @ 85CBDD9 .string "SP. ATK$" -gUnknown_085CBDE1:: @ 85CBDE1 +gText_SpDef2:: @ 85CBDE1 .string "SP. DEF$" -gUnknown_085CBDE9:: @ 85CBDE9 +gText_Accuracy:: @ 85CBDE9 .string "accuracy$" -gUnknown_085CBDF2:: @ 85CBDF2 +gText_Evasiveness:: @ 85CBDF2 .string "evasiveness$" .align 2 gStatNamesTable:: @ 85CBE00 - .4byte gUnknown_085CBDC1 - .4byte gUnknown_085CBDC4 - .4byte gUnknown_085CBDCB - .4byte gUnknown_085CBDD3 - .4byte gUnknown_085CBDD9 - .4byte gUnknown_085CBDE1 - .4byte gUnknown_085CBDE9 - .4byte gUnknown_085CBDF2 + .4byte gText_HP2 + .4byte gText_Attack2 + .4byte gText_Defense2 + .4byte gText_Speed + .4byte gText_SpAtk2 + .4byte gText_SpDef2 + .4byte gText_Accuracy + .4byte gText_Evasiveness -gUnknown_085CBE20:: @ 85CBE20 +gText_PokeblockWasTooSpicy:: @ 85CBE20 .string "was too spicy!$" -gUnknown_085CBE2F:: @ 85CBE2F +gText_PokeblockWasTooDry:: @ 85CBE2F .string "was too dry!$" -gUnknown_085CBE3C:: @ 85CBE3C +gText_PokeblockWasTooSweet:: @ 85CBE3C .string "was too sweet!$" -gUnknown_085CBE4B:: @ 85CBE4B +gText_PokeblockWasTooBitter:: @ 85CBE4B .string "was too bitter!$" -gUnknown_085CBE5B:: @ 85CBE5B +gText_PokeblockWasTooSour:: @ 85CBE5B .string "was too sour!$" .align 2 -gUnknown_085CBE6C:: @ 85CBE6C - .4byte gUnknown_085CBE20 - .4byte gUnknown_085CBE2F - .4byte gUnknown_085CBE3C - .4byte gUnknown_085CBE4B - .4byte gUnknown_085CBE5B +gPokeblockWasTooXStringTable:: @ 85CBE6C + .4byte gText_PokeblockWasTooSpicy + .4byte gText_PokeblockWasTooDry + .4byte gText_PokeblockWasTooSweet + .4byte gText_PokeblockWasTooBitter + .4byte gText_PokeblockWasTooSour gText_XUsedY:: @ 85CBE80 .string "{STRING 35} used\n{STRING 22}!$" @@ -1214,10 +1214,10 @@ gText_GiveNicknameCaptured:: @ 85CBFDB gText_PkmnSentToPC:: @ 85CBFFF .string "{RIVAL} was sent to\n{STRING 39} PC.$" -gUnknown_085CC015:: @ 85CC015 +gText_SomeonesPC:: @ 85CC015 .string "someone’s$" -gUnknown_085CC01F:: @ 85CC01F +gText_LanettesPC:: @ 85CC01F .string "LANETTE’s$" gText_PkmnDataAddedToDex:: @ 85CC029 @@ -1232,10 +1232,10 @@ gText_SandstormIsRaging:: @ 85CC05D gText_BoxIsFull:: @ 85CC074 .string "The BOX is full!\nYou can’t catch any more!\p$" -gUnknown_085CC0A0:: @ 85CC0A0 +gText_EnigmaBerry:: @ 85CC0A0 .string "ENIGMA BERRY$" -gUnknown_085CC0AD:: @ 85CC0AD +gText_BerrySuffix:: @ 85CC0AD .string " BERRY$" gText_PkmnsXCuredParalysis:: @ 85CC0B4 @@ -1287,7 +1287,7 @@ gText_YouThrowABallNowRight:: @ 85CC23F .string "You throw a BALL now, right?\nI… I’ll do my best!$" .align 2 -gUnknown_085CC270:: @ 85CC270 +gBattleStringsTable:: @ 85CC270 .4byte gText_Buffer36 .4byte gText_PkmnGainedEXP .4byte gText_PkmnGrewToLv @@ -1660,142 +1660,241 @@ gUnknown_085CC270:: @ 85CC270 .align 2 gUnknown_085CC834:: @ 85CC834 - .incbin "baserom.gba", 0x5cc834, 0x14e + .2byte 0x0017, 0x0018, 0x0159, 0x001a, 0x014c, 0x00e2, 0x00e3, 0x0021 + .2byte 0x0112, 0x0165, 0x00e8, 0x00e9, 0x00e5, 0x00ed, 0x00f0, 0x00f3 + .2byte 0x00ee, 0x00f4, 0x0066, 0x0067, 0x00ef, 0x00f5, 0x00ea, 0x00eb + .2byte 0x00ec, 0x0065, 0x0098, 0x00e5, 0x00e5, 0x004e, 0x0160, 0x004d + .2byte 0x0161, 0x004f, 0x0068, 0x0069, 0x001b, 0x006a, 0x0139, 0x0052 + .2byte 0x0053, 0x0070, 0x0071, 0x0073, 0x0074, 0x006c, 0x006e, 0x00f7 + .2byte 0x004c, 0x0075, 0x0076, 0x0077, 0x00d5, 0x00d6, 0x003d, 0x0130 + .2byte 0x0145, 0x0146, 0x00d7, 0x00d8, 0x003e, 0x0130, 0x0054, 0x0055 + .2byte 0x0056, 0x0057, 0x0058, 0x0059, 0x013d, 0x013e, 0x005a, 0x005c + .2byte 0x005b, 0x005d, 0x005b, 0x0148, 0x0061, 0x00e5, 0x0063, 0x00e5 + .2byte 0x007d, 0x00e5, 0x007e, 0x00fb, 0x0028, 0x0029, 0x0037, 0x0038 + .2byte 0x0023, 0x0024, 0x002e, 0x002f, 0x0031, 0x0032, 0x0035, 0x0036 + .2byte 0x0017, 0x007c, 0x0045, 0x0136, 0x002d, 0x0139, 0x013b, 0x013c + .2byte 0x00fd, 0x00fd, 0x00fd, 0x00fd, 0x0142, 0x00a1, 0x014f, 0x0107 + .2byte 0x0108, 0x0109, 0x010a, 0x0110, 0x0110, 0x0110, 0x0110, 0x0110 + .2byte 0x0110, 0x0110, 0x0110, 0x0111, 0x0110, 0x0110, 0x0110, 0x00f1 + .2byte 0x0110, 0x0110, 0x0110, 0x0116, 0x0117, 0x0118, 0x0119, 0x016d + .2byte 0x011b, 0x011c, 0x011e, 0x011f, 0x0120, 0x0128, 0x0123, 0x0126 + .2byte 0x0125, 0x0124, 0x0127, 0x0129, 0x0156, 0x0131, 0x0163, 0x016a + .2byte 0x00c7, 0x0163, 0x016a, 0x00c9, 0x0163, 0x016a, 0x0166, 0x0167 + .2byte 0x0168, 0x00cb, 0x0137, 0x0177, 0x0178, 0x0179, 0x017a gUnknown_085CC982:: @ 85CC982 - .incbin "baserom.gba", 0x5cc982, 0xe + .2byte 0x0014, 0x0023, 0x0053, 0x0080, 0x00fa, 0x0148, 0xffff -gUnknown_085CC990:: @ 85CC990 +gText_PkmnIsEvolving:: @ 85CC990 .string "What?\n{STR_VAR_1} is evolving!$" -gUnknown_085CC9A6:: @ 85CC9A6 +gText_CongratsPkmnEvolved:: @ 85CC9A6 .string "Congratulations! Your {STR_VAR_1}\nevolved into {STR_VAR_2}!{UNKNOWN_A}\p$" -gUnknown_085CC9D3:: @ 85CC9D3 +gText_PkmnStoppedEvolving:: @ 85CC9D3 .string "Huh? {STR_VAR_1}\nstopped evolving!\p$" -gUnknown_085CC9EE:: @ 85CC9EE +gText_EllipsisQuestionMark:: @ 85CC9EE .string "……?\p$" -gUnknown_085CC9F3:: @ 85CC9F3 +gText_WhatWillPkmnDo:: @ 85CC9F3 .string "What will\n{STRING 18} do?$" -gUnknown_085CCA04:: @ 85CCA04 +gText_WhatWillPkmnDo2:: @ 85CCA04 .string "What will\n{STRING 35} do?$" -gUnknown_085CCA15:: @ 85CCA15 +gText_WhatWillWallyDo:: @ 85CCA15 .string "What will\nWALLY do?$" -gUnknown_085CCA29:: @ 85CCA29 +gText_LinkStandby:: @ 85CCA29 .string "{PAUSE 16}Link standby…$" -gUnknown_085CCA3A:: @ 85CCA3A - .incbin "baserom.gba", 0x5cca3a, 0x1a +gText_BattleMenu:: @ 85CCA3A + .string "FIGHT{CLEAR_TO 56}BAG\nPOKéMON{CLEAR_TO 56}RUN$" -gUnknown_085CCA54:: @ 85CCA54 - .incbin "baserom.gba", 0x5cca54, 0x1b +gText_SafariZoneMenu:: @ 85CCA54 + .string "BALL{CLEAR_TO 56}{POKEBLOCK}\nGO NEAR{CLEAR_TO 56}RUN$" -gUnknown_085CCA6F:: @ 85CCA6F - .incbin "baserom.gba", 0x5cca6f, 0x4 +gText_MoveInterfacePP:: @ 85CCA6F + .string "PP $" -gUnknown_085CCA73:: @ 85CCA73 - .incbin "baserom.gba", 0x5cca73, 0x48 +gText_MoveInterfaceType:: @ 85CCA73 + .string "TYPE/$" -gUnknown_085CCABB:: @ 85CCABB - .incbin "baserom.gba", 0x5ccabb, 0xf + .string "{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}PP\nTYPE/$" + .string "{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}$" + .string "{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}Which move should\nbe forgotten?$" -gUnknown_085CCACA:: @ 85CCACA - .incbin "baserom.gba", 0x5ccaca, 0x62 +gText_BattleYesNoChoice:: @ 85CCABB + .string "{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}Yes\nNo$" -gUnknown_085CCB2C:: @ 85CCB2C - .incbin "baserom.gba", 0x5ccb2c, 0x10 +gText_BattleSwitchWhich:: @ 85CCACA + .string "{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}Switch\nwhich?$" -gUnknown_085CCB3C:: @ 85CCB3C - .incbin "baserom.gba", 0x5ccb3c, 0x3d + .string "{PALETTE 5}{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR4 DYNAMIC_COLOR5 DYNAMIC_COLOR6}$" + .string "{UP_ARROW}$" + .string "{ESCAPE 4}$" + .string "-$" -gUnknown_085CCB79:: @ 85CCB79 - .incbin "baserom.gba", 0x5ccb79, 0x6 +gText_HP:: @ 85CCAF1 + .string "HP$" -gUnknown_085CCB7F:: @ 85CCB7F - .incbin "baserom.gba", 0x5ccb7f, 0x3 +gText_Attack:: @ 85CCAF4 + .string "ATTACK$" -gUnknown_085CCB82:: @ 85CCB82 - .incbin "baserom.gba", 0x5ccb82, 0x2 +gText_Defense:: @ 85CCAFB + .string "DEFENSE$" -gUnknown_085CCB84:: @ 85CCB84 - .incbin "baserom.gba", 0x5ccb84, 0x2 +gText_SpAtk:: @ 85CCB03 + .string "SP. ATK$" -gUnknown_085CCB86:: @ 85CCB86 - .incbin "baserom.gba", 0x5ccb86, 0x2 +gText_SpDef:: @ 85CCB0B + .string "SP. DEF$" -gUnknown_085CCB88:: @ 85CCB88 - .incbin "baserom.gba", 0x5ccb88, 0x4 + .align 2 + .4byte gText_HP + .4byte gText_SpAtk + .4byte gText_Attack + .4byte gText_SpDef + .4byte gText_Defense + .4byte gText_Speed -gUnknown_085CCB8C:: @ 85CCB8C - .incbin "baserom.gba", 0x5ccb8c, 0x4 +gText_SafariBalls:: @ 85CCB2C + .string "{HIGHLIGHT DARK_GREY}SAFARI BALLS$" -gBadEggNickname:: @ 85CCB90 - .incbin "baserom.gba", 0x5ccb90, 0x8 +gText_SafariBallLeft:: @ 85CCB3C + .string "{HIGHLIGHT DARK_GREY}Left: $" + .string "{HIGHLIGHT DARK_GREY}$" + .string "sleep$" + .string "poison$" + .string "burn$" + .string "paralysis$" + .string "ice$" + .string "confusion$" + .string "love$" -BattleText_Wally:: @ 85CCB98 - .incbin "baserom.gba", 0x5ccb98, 0x6 +gText_SpaceAndSpace:: @ 85CCB79 + .string " and $" -gUnknown_085CCB9E:: @ 85CCB9E - .incbin "baserom.gba", 0x5ccb9e, 0x7 +gText_CommaSpace:: @ 85CCB7F + .string ", $" -gUnknown_085CCBA5:: @ 85CCBA5 - .incbin "baserom.gba", 0x5ccba5, 0x8 +gText_Space2:: @ 85CCB82 + .string " $" -gUnknown_085CCBAD:: @ 85CCBAD - .incbin "baserom.gba", 0x5ccbad, 0x8 +gText_ScrollTextUp:: @ 85CCB84 + .string "\l$" -gUnknown_085CCBB5:: @ 85CCBB5 - .incbin "baserom.gba", 0x5ccbb5, 0x4 +gText_NewLine:: @ 85CCB86 + .string "\n$" -gUnknown_085CCBB9:: @ 85CCBB9 - .incbin "baserom.gba", 0x5ccbb9, 0x3 +gText_Are:: @ 85CCB88 + .string "are$" -gUnknown_085CCBBC:: @ 85CCBBC - .incbin "baserom.gba", 0x5ccbbc, 0x132 +gText_Are2:: @ 85CCB8C + .string "are$" -gUnknown_085CCCEE:: @ 85CCCEE - .incbin "baserom.gba", 0x5cccee, 0x32 +gText_BadEgg:: @ 85CCB90 + .string "Bad EGG$" -gUnknown_085CCD20:: @ 85CCD20 - .incbin "baserom.gba", 0x5ccd20, 0x92 +gText_BattleWallyName:: @ 85CCB98 + .string "WALLY$" -gUnknown_085CCDB2:: @ 85CCDB2 - .incbin "baserom.gba", 0x5ccdb2, 0x3 +gText_Win:: @ 85CCB9E + .string "{HIGHLIGHT TRANSPARENT}Win$" -gUnknown_085CCDB5:: @ 85CCDB5 - .incbin "baserom.gba", 0x5ccdb5, 0x3 +gText_Loss:: @ 85CCBA5 + .string "{HIGHLIGHT TRANSPARENT}Loss$" -gUnknown_085CCDB8:: @ 85CCDB8 - .incbin "baserom.gba", 0x5ccdb8, 0x3 +gText_Draw:: @ 85CCBAD + .string "{HIGHLIGHT TRANSPARENT}Draw$" -gUnknown_085CCDBB:: @ 85CCDBB - .incbin "baserom.gba", 0x5ccdbb, 0x5 +gText_SpaceIs:: @ 85CCBB5 + .string " is$" -gUnknown_085CCDC0:: @ 85CCDC0 - .incbin "baserom.gba", 0x5ccdc0, 0x6 +gText_ApostropheS:: @ 85CCBB9 + .string "’s$" -gUnknown_085CCDC6:: @ 85CCDC6 - .incbin "baserom.gba", 0x5ccdc6, 0x5 +gText_UnknownMoveTypes:: @ 85CCBBC + .string "a NORMAL move$ " + .string "a FIGHTING move$ " + .string "a FLYING move$ " + .string "a POISON move$ " + .string "a GROUND move$ " + .string "a ROCK move$ " + .string "a BUG move$ " + .string "a GHOST move$ " + .string "a STEEL move$ " + .string "a ??? move$ " + .string "a FIRE move$ " + .string "a WATER move$ " + .string "a GRASS move$ " + .string "an ELECTRIC move$" + .string "a PSYCHIC move$ " + .string "an ICE move$ " + .string "a DRAGON move$ " + .string "a DARK move$ " -gUnknown_085CCDCB:: @ 85CCDCB - .incbin "baserom.gba", 0x5ccdcb, 0x13 +gText_BattleTourney:: @ 85CCCEE + .string "BATTLE TOURNEY$" -gUnknown_085CCDDE:: @ 85CCDDE - .incbin "baserom.gba", 0x5ccdde, 0x26 +gText_Round1:: @ 85CCCFD + .string "Round 1$" -gUnknown_085CCE04:: @ 85CCE04 - .incbin "baserom.gba", 0x5cce04, 0x13 +gText_Round2:: @ 85CCD05 + .string "Round 2$" -gUnknown_085CCE17:: @ 85CCE17 - .incbin "baserom.gba", 0x5cce17, 0x21 +gText_Semifinal:: @ 85CCC0D + .string "Semifinal$" -gUnknown_085CCE38:: @ 85CCE38 - .incbin "baserom.gba", 0x5cce38, 0x1b +gText_Final:: @ 85CCD17 + .string "Final$" + + .align 2 +gRoundsStringTable:: @ 85CCD20 + .4byte gText_Round1 + .4byte gText_Round2 + .4byte gText_Semifinal + .4byte gText_Final + + .string "The great new hope!\p$" + .string "Will the championship dream come true?!\p$" + .string "A former CHAMPION!\p$" + .string "The previous CHAMPION!\p$" + .string "The unbeaten CHAMPION!\p$" + +gText_JapaneseHonorific:: @ 85CCDB2 + .string "{KUN}$" + +gText_Vs:: @ 85CCDB5 + .string "VS$" + +gText_RivalBuffer:: @ 85CCDB8 + .string "{RIVAL}$" + +gText_Mind:: @ 85CCDBB + .string "Mind$" + +gText_Skill:: @ 85CCDC0 + .string "Skill$" + +gText_Body:: @ 85CCDC6 + .string "Body$" + +gText_Judgement:: @ 85CCDCB + .string "{STRING 0}{CLEAR 13}Judgment{CLEAR 13}{PLAYER}$" + +gText_TwoTrainersSentPkmn:: @ 85CCDDE + .string "{STRING 28} {STRING 29} sent\nout {RIVAL}!\p{STRING 46} {STRING 47} sent\nout {AQUA}!$" + +gText_TrainerXYSentOutPkmn3:: @ 85CCE04 + .string "{STRING 46} {STRING 47} sent\nout {STRING 0}!$" + +gText_TwoTrainersWantToBattle2:: @ 85CCE17 + .string "{STRING 28} {STRING 29} and\n{STRING 46} {STRING 47}\lwant to battle!\p$" + +gText_TrainerXYSentOutZGoN:: @ 85CCE38 + .string "{STRING 50} {STRING 51} sent\nout {VERSION}!\lGo, {STRING 5}!$" gText_TwoEnemiesDefeated:: @ 85CCE53 .string "{STRING 28} {STRING 29} and\n{STRING 46} {STRING 47}\lwere defeated!\p$" @@ -1858,7 +1957,7 @@ gText_RefCommenceBattle:: @ 85CD1A1 .string "REFEREE: {STRING 5} VS {RIVAL}!\nCommence battling!$" .align 2 -gUnknown_085CD1C8:: @ 85CD1C8 +gRefereeStringsTable:: @ 85CD1C8 .4byte gText_RefIfNothingIsDecided .4byte gText_RefThatsIt .4byte gText_RefJudgeMind @@ -1883,34 +1982,92 @@ gText_String49:: @ 85CD239 .string "{PLAY_SE 0x0011}{STRING 28} {STRING 29} fled!$" - .align 2 -gUnknown_085CD24C:: @ 85CD24C - .incbin "baserom.gba", 0x5cd24c, 0x1b +gText_PlayerLostAgainst2:: @ 85CD24C + .string "Player lost against\n{STRING 28} {STRING 29}!$" -gUnknown_085CD267:: @ 85CD267 - .incbin "baserom.gba", 0x5cd267, 0x28 +gText_PlayerBattledToDraw2:: @ 85CD267 + .string "Player battled to a draw against\n{STRING 28} {STRING 29}!$" -gUnknown_085CD28F:: @ 85CD28F - .incbin "baserom.gba", 0x5cd28f, 0x3c +gText_RecordBattleToPass:: @ 85CD28F + .string "Would you like to record your battle\non your FRONTIER PASS?$" -gUnknown_085CD2CB:: @ 85CD2CB - .incbin "baserom.gba", 0x5cd2cb, 0x36 +gText_BattleRecordedOnPass:: @ 85CD2CB + .string "{STRING 35}’s battle result was recorded\non the FRONTIER PASS.$" -gUnknown_085CD301:: @ 85CD301 - .incbin "baserom.gba", 0x5cd301, 0x17 +gText_TrainerWantsToBattle:: @ 85CD301 + .string "{STRING 32}\nwants to battle!{PAUSE 49}$" -gUnknown_085CD318:: @ 85CD318 - .incbin "baserom.gba", 0x5cd318, 0x1e +gText_TwoTrainersWantToBattle3:: @ 85CD318 + .string "{STRING 32} and {STRING 33}\nwant to battle!{PAUSE 49}$" + .align 1 gUnknown_085CD336:: @ 85CD336 - .incbin "baserom.gba", 0x5cd336, 0xec + .2byte 0x000e, 0x0046, 0x004a, 0x006a, 0x006b, 0x006c, 0x006e, 0x006f + .2byte 0x0079, 0x007b, 0x007d, 0x0094, 0x0096, 0x0097, 0x009b, 0x009c + .2byte 0x009f, 0x00a4, 0x00aa, 0x00ad, 0x00b6, 0x00bf, 0x00cb, 0x00cd + .2byte 0x00cf, 0x00d6, 0x00ed, 0x00f4, 0x00f5, 0x010a, 0x010f, 0x0112 + .2byte 0x0113, 0x011a, 0x0125, 0x0136, 0x013c, 0x0140, 0x0149, 0x014a + .2byte 0x014e, 0x0154, 0x0000, 0x0064, 0x0069, 0x0075, 0x0085, 0x00af + .2byte 0x010d, 0x0153, 0x0000, 0x0060, 0x0061, 0x0066, 0x0068, 0x008c + .2byte 0x0090, 0x00a5, 0x00b8, 0x010c, 0x0111, 0x0118, 0x0119, 0x0129 + .2byte 0x012a, 0x012c, 0x0139, 0x015a, 0x015b, 0x0000, 0x0001, 0x000a + .2byte 0x000b, 0x0011, 0x0013, 0x0014, 0x0015, 0x001e, 0x0023, 0x0025 + .2byte 0x0027, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, 0x0040, 0x0047 + .2byte 0x0051, 0x0059, 0x005a, 0x005b, 0x005c, 0x0067, 0x0076, 0x007a + .2byte 0x0080, 0x0084, 0x008b, 0x0091, 0x00a3, 0x00a9, 0x00ab, 0x00ae + .2byte 0x00c1, 0x00cc, 0x00d5, 0x00f9, 0x00fd, 0x00ff, 0x0100, 0x0103 + .2byte 0x0104, 0x0110, 0x011b, 0x0141, 0x0157, 0x0000 gUnknown_085CD422:: @ 85CD422 - .incbin "baserom.gba", 0x5cd422, 0x23e + .byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + .align 2 +gUnknown_085CD42C:: @ 85CD42C + .2byte 0x01ff, 0x0100, 0x0000, 0x0101, 0x060f, 0x0000, 0x01ff, 0x0101 + .2byte 0x0000, 0x0100, 0x060f, 0x0000, 0x01ee, 0x0100, 0x0000, 0x0d00 + .2byte 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000 + .2byte 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100 + .2byte 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00 + .2byte 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0c00, 0x0b0e, 0x0000 + .2byte 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0102 + .2byte 0x0000, 0x0c00, 0x0b0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00 + .2byte 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000 + .2byte 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0100 + .2byte 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0100, 0x0120, 0x0000, 0x0100 + .2byte 0x0200, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000 + .2byte 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff + .2byte 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00 + .2byte 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000 + .2byte 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0100, 0x01ff + .2byte 0x0000, 0x0100, 0x0600, 0x0000, 0x0100, 0x01ff, 0x0000, 0x0100 + .2byte 0x0600, 0x0000, 0x0100, 0x01ff, 0x0000, 0x0100, 0x0600, 0x0000 + + .align 2 +gUnknown_085CD54C:: @ 85C54C + .2byte 0x01ff, 0x0100, 0x0000, 0x0101, 0x060f, 0x0000, 0x01ff, 0x0101 + .2byte 0x0000, 0x0100, 0x060f, 0x0000, 0x01ee, 0x0100, 0x0000, 0x0d00 + .2byte 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000 + .2byte 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100 + .2byte 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00 + .2byte 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0c00, 0x0b0e, 0x0000 + .2byte 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0102 + .2byte 0x0000, 0x0c00, 0x0b0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00 + .2byte 0x0f0e, 0x0000, 0x07ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000 + .2byte 0x01ee, 0x0100, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x0100 + .2byte 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0100, 0x0120, 0x0000, 0x0100 + .2byte 0x0200, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0100, 0x0f0e, 0x0000 + .2byte 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff + .2byte 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00 + .2byte 0x0f0e, 0x0000, 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000 + .2byte 0x01ee, 0x01ff, 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x01ee, 0x01ff + .2byte 0x0000, 0x0d00, 0x0f0e, 0x0000, 0x0111, 0x0100, 0x0000, 0x0201 + .2byte 0x0301, 0x0000 + + .align 2 gUnknown_085CD660:: @ 85CD660 - .incbin "baserom.gba", 0x5cd660, 0x8 + .4byte gUnknown_085CD42C + .4byte gUnknown_085CD54C + .align 2 gUnknown_085CD668:: @ 85CD668 - .incbin "baserom.gba", 0x5cd668, 0x4 - + .byte 0x08, 0x04, 0x01, 0x00 diff --git a/src/pokemon_2.c b/src/pokemon_2.c index 30e788874..cf073570d 100644 --- a/src/pokemon_2.c +++ b/src/pokemon_2.c @@ -31,7 +31,7 @@ extern const union AnimCmd* gUnknown_082FF70C[]; extern const union AnimCmd* const * const gUnknown_08309AAC[]; extern const union AnimCmd* const * const gUnknown_08305D0C[]; extern const union AnimCmd* const * const gUnknown_0830536C[]; -extern const u8 gBadEggNickname[]; +extern const u8 gText_BadEgg[]; extern const u8 gText_EggNickname[]; extern u8 GetBankSide(u8 bank); @@ -409,8 +409,8 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) if (boxMon->isBadEgg) { for (retVal = 0; - retVal < POKEMON_NAME_LENGTH && gBadEggNickname[retVal] != EOS; - data[retVal] = gBadEggNickname[retVal], retVal++) {} + retVal < POKEMON_NAME_LENGTH && gText_BadEgg[retVal] != EOS; + data[retVal] = gText_BadEgg[retVal], retVal++) {} data[retVal] = EOS; } diff --git a/src/pokemon_3.c b/src/pokemon_3.c index 2c3e84de9..569222e33 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -54,7 +54,7 @@ extern const s8 gNatureStatTable[][5]; extern const s8 gUnknown_08329ECE[][3]; extern const u32 gBitTable[]; extern const u32 gTMHMLearnsets[][2]; -extern const u8 BattleText_Wally[]; +extern const u8 gText_BattleWallyName[]; extern const u8 gText_PkmnsXPreventsSwitching[]; extern const struct CompressedSpritePalette gMonPaletteTable[]; extern const struct CompressedSpritePalette gMonShinyPaletteTable[]; @@ -1177,7 +1177,7 @@ u16 GetBattleBGM(void) case CLASS_PKMN_TRAINER_RIVAL: if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) return 0x1E1; - if (!StringCompare(gTrainers[gTrainerBattleOpponent_A].trainerName, BattleText_Wally)) + if (!StringCompare(gTrainers[gTrainerBattleOpponent_A].trainerName, gText_BattleWallyName)) return 0x1DC; return 0x1E1; case CLASS_ELITE_FOUR: From 54bd2c17812bd399fa6e857332c3bdacc1df71b3 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 21:10:30 -0400 Subject: [PATCH 238/342] Address review by diego --- data/data_emerald2.s | 33 ----------------------------- data/data_emerald2pre1.s | 35 +++++++++++++++++++++++++++++++ data/multiboot_berry_glitch_fix.s | 1 - get_diffs.py | 24 --------------------- ld_script.txt | 4 ++-- src/berry_fix_program.c | 3 +-- 6 files changed, 38 insertions(+), 62 deletions(-) create mode 100644 data/data_emerald2pre1.s delete mode 100644 get_diffs.py diff --git a/data/data_emerald2.s b/data/data_emerald2.s index ce7e2a6e3..e363e7365 100644 --- a/data/data_emerald2.s +++ b/data/data_emerald2.s @@ -2,39 +2,6 @@ .include "constants/constants.inc" .section .rodata - - -gUnknown_08617274:: @ 8617274 - .incbin "baserom.gba", 0x617274, 0x920 - -gUnknown_08617B94:: @ 8617B94 - .incbin "baserom.gba", 0x617b94, 0xb0 - -gUnknown_08617C44:: @ 8617C44 - .incbin "baserom.gba", 0x617c44, 0x120 - -gUnknown_08617D64:: @ 8617D64 - .incbin "baserom.gba", 0x617d64, 0x30 - -gUnknown_08617D94:: @ 8617D94 - .incbin "baserom.gba", 0x617d94, 0x10 - -gUnknown_08617DA4:: @ 8617DA4 - .incbin "baserom.gba", 0x617da4, 0x5c - -gUnknown_08617E00:: @ 8617E00 - .incbin "baserom.gba", 0x617e00, 0x18 - -gUnknown_08617E18:: @ 8617E18 - .incbin "baserom.gba", 0x617e18, 0x1c - -gUnknown_08617E34:: @ 8617E34 - .incbin "baserom.gba", 0x617e34, 0x2c - -gUnknown_08617E60:: @ 8617E60 - .incbin "baserom.gba", 0x617e60, 0x18 - - .section .rodata.2 @ 86181C1 .include "data/text/move_descriptions.inc" diff --git a/data/data_emerald2pre1.s b/data/data_emerald2pre1.s new file mode 100644 index 000000000..f6238dd06 --- /dev/null +++ b/data/data_emerald2pre1.s @@ -0,0 +1,35 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + +gUnknown_08617274:: @ 8617274 + .incbin "baserom.gba", 0x617274, 0x920 + +gUnknown_08617B94:: @ 8617B94 + .incbin "baserom.gba", 0x617b94, 0xb0 + +gUnknown_08617C44:: @ 8617C44 + .incbin "baserom.gba", 0x617c44, 0x120 + +gUnknown_08617D64:: @ 8617D64 + .incbin "baserom.gba", 0x617d64, 0x30 + +gUnknown_08617D94:: @ 8617D94 + .incbin "baserom.gba", 0x617d94, 0x10 + +gUnknown_08617DA4:: @ 8617DA4 + .incbin "baserom.gba", 0x617da4, 0x5c + +gUnknown_08617E00:: @ 8617E00 + .incbin "baserom.gba", 0x617e00, 0x18 + +gUnknown_08617E18:: @ 8617E18 + .incbin "baserom.gba", 0x617e18, 0x1c + +gUnknown_08617E34:: @ 8617E34 + .incbin "baserom.gba", 0x617e34, 0x2c + +gUnknown_08617E60:: @ 8617E60 + .incbin "baserom.gba", 0x617e60, 0x18 diff --git a/data/multiboot_berry_glitch_fix.s b/data/multiboot_berry_glitch_fix.s index e6a26c619..bc97eb553 100644 --- a/data/multiboot_berry_glitch_fix.s +++ b/data/multiboot_berry_glitch_fix.s @@ -3,7 +3,6 @@ gUnknown_089A6550:: @ 89A6550 .incbin "baserom.gba", 0x9a6550, 0xc0 -gMultiBootProgram_BerryGlitchFix_Script:: @ 89A6610 gMultiBootProgram_BerryGlitchFix_Start:: @ 89A6610 .incbin "baserom.gba", 0x9a6610, 0x3b34 gMultiBootProgram_BerryGlitchFix_End:: diff --git a/get_diffs.py b/get_diffs.py deleted file mode 100644 index d42ce7827..000000000 --- a/get_diffs.py +++ /dev/null @@ -1,24 +0,0 @@ -addrs = sorted([0xdd7360, - 0xdd87c0, - 0xdd8ee0, - 0xdd8780, - 0xdd90e0, - 0xdd9718, - 0xdd9080, - 0xdd98b4, - 0xdd9e58, - 0xdd9874, - 0xdda02c, - 0xdda63c, - 0xdd9fec, - 0xdda840, - 0xddae40, - 0xdda800, - 0xddb020, - 0xddb2c4, - 0xddafe0, - 0xddb3e4]) -for i, addr in enumerate(addrs[:-1]): - print 'gUnknown_08{0:06X}:: @ 8{0:06X}'.format(addr) - print '\t.incbin "baserom.gba", 0x{:06x}, 0x{:x}'.format(addr, addrs[i + 1] - addr) - print '' diff --git a/ld_script.txt b/ld_script.txt index 7a8ef29a1..2dd2de8d8 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -380,9 +380,9 @@ SECTIONS { data/battle_controller_recorded_player.o(.rodata); data/data_emerald.o(.rodata); data/battle_controller_player_partner.o(.rodata); - data/data_emerald2.o(.rodata); + data/data_emerald2pre1.o(.rodata); src/berry_fix_program.o(.rodata); - data/data_emerald2.o(.rodata.2); + data/data_emerald2.o(.rodata); data/fonts.o(.rodata); data/mystery_event_msg.o(.rodata); src/m4a_tables.o(.rodata); diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index 931e92746..f04308ae8 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -130,8 +130,7 @@ static const u8 *const gUnknown_08618178[][3] = { }; extern const u8 gUnknown_089A6550[0xC0]; -extern const u8 gMultiBootProgram_BerryGlitchFix_Script[0x3b34]; -extern const u8 gMultiBootProgram_BerryGlitchFix_Start[]; +extern const u8 gMultiBootProgram_BerryGlitchFix_Start[0x3b34]; extern const u8 gMultiBootProgram_BerryGlitchFix_End[]; // .text From 316f9f4d83d118437c266526cc0e6da1dfc90461 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 21:28:01 -0400 Subject: [PATCH 239/342] through sub_818DD14 --- asm/lilycove_lady.s | 73 --------------------------------------------- include/global.h | 2 +- src/lilycove_lady.c | 28 ++++++++++++++++- 3 files changed, 28 insertions(+), 75 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 75f9458a3..c2a6167a6 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,79 +5,6 @@ .text - thumb_func_start sub_818DCAC -sub_818DCAC: @ 818DCAC - push {r4,lr} - adds r4, r0, 0 - lsls r0, r1, 16 - lsrs r0, 16 - bl ItemId_GetItem - adds r1, r0, 0 - adds r0, r4, 0 - bl StringCopy - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_818DCAC - - thumb_func_start sub_818DCC8 -sub_818DCC8: @ 818DCC8 - push {lr} - ldr r2, =gUnknown_0203CD64 - ldr r0, =gSaveBlock1Ptr - ldr r1, [r0] - ldr r0, =0x00003b58 - adds r1, r0 - str r1, [r2] - ldr r0, =gStringVar2 - ldrh r1, [r1, 0xE] - bl sub_818DCAC - pop {r0} - bx r0 - .pool - thumb_func_end sub_818DCC8 - - thumb_func_start sub_818DCF4 -sub_818DCF4: @ 818DCF4 - push {r4,r5,lr} - adds r5, r0, 0 - adds r4, r1, 0 - adds r0, r4, 0 - movs r1, 0xFF - movs r2, 0x8 - bl memset - adds r0, r4, 0 - adds r1, r5, 0 - bl StringCopy7 - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_818DCF4 - - thumb_func_start sub_818DD14 -sub_818DD14: @ 818DD14 - push {r4,r5,lr} - ldr r5, =gUnknown_0203CD64 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r1, r0, r2 - str r1, [r5] - ldr r1, =0x00003b5c - adds r0, r1 - ldr r4, =gStringVar3 - adds r1, r4, 0 - bl sub_818DCF4 - ldr r0, [r5] - ldrb r1, [r0, 0x12] - adds r0, r4, 0 - bl ConvertInternationalString - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818DD14 - thumb_func_start sub_818DD54 sub_818DD54: @ 818DD54 ldr r1, =gUnknown_0203CD64 diff --git a/include/global.h b/include/global.h index 64ed869ef..8c2122b39 100644 --- a/include/global.h +++ b/include/global.h @@ -684,7 +684,7 @@ typedef union // TODO /*0x004*/ u8 unk_004[8]; /*0x00c*/ u8 unk_00c; /*0x00d*/ u8 filler_00d; - /*0x00e*/ u16 unk_00e; + /*0x00e*/ u16 itemId; /*0x010*/ u16 unk_010; /*0x012*/ u8 language; } favour; diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 578280115..c6b49e36f 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -7,6 +7,8 @@ #include "event_data.h" #include "rng.h" #include "string_util.h" +#include "item.h" +#include "items.h" #include "text.h" #include "lilycove_lady.h" @@ -134,7 +136,7 @@ void SetLilycoveFavourLady(void) gUnknown_0203CD64->favour.unk_004[0] = EOS; gUnknown_0203CD64->favour.unk_002 = 0; gUnknown_0203CD64->favour.unk_003= 0; - gUnknown_0203CD64->favour.unk_00e = 0; + gUnknown_0203CD64->favour.itemId = ITEM_NONE; gUnknown_0203CD64->favour.language = gGameLanguage; sub_818DB20(); } @@ -185,3 +187,27 @@ bool8 sub_818DC60(void) } return FALSE; } + +void sub_818DCAC(u8 *dest, u16 itemId) +{ + StringCopy(dest, ItemId_GetItem(itemId)->name); +} + +void sub_818DCC8(void) +{ + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; + sub_818DCAC(gStringVar2, gUnknown_0203CD64->favour.itemId); +} + +void sub_818DCF4(const u8 *src, u8 *dest) +{ + memset(dest, 0xFF, 8); + StringCopy7(dest, src); +} + +void sub_818DD14(void) +{ + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; + sub_818DCF4(gSaveBlock1Ptr->lilycoveLady.favour.unk_004, gStringVar3); + ConvertInternationalString(gStringVar3, gUnknown_0203CD64->favour.language); +} From 534dd2c4b0259f87657b2e8795d96217e8bf12cc Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 21:47:15 -0400 Subject: [PATCH 240/342] sub_818DD84 --- asm/lilycove_lady.s | 109 -------------------------------------------- include/item_menu.h | 11 +++++ src/lilycove_lady.c | 44 ++++++++++++++++++ 3 files changed, 55 insertions(+), 109 deletions(-) create mode 100644 include/item_menu.h diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index c2a6167a6..c4cc3d21a 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,115 +5,6 @@ .text - thumb_func_start sub_818DD54 -sub_818DD54: @ 818DD54 - ldr r1, =gUnknown_0203CD64 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - ldrb r1, [r0, 0x2] - negs r0, r1 - orrs r0, r1 - lsrs r0, 31 - bx lr - .pool - thumb_func_end sub_818DD54 - - thumb_func_start sub_818DD78 -sub_818DD78: @ 818DD78 - push {lr} - bl sub_81AAC50 - pop {r0} - bx r0 - thumb_func_end sub_818DD78 - - thumb_func_start sub_818DD84 -sub_818DD84: @ 818DD84 - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 16 - lsrs r5, r0, 16 - ldr r4, =gUnknown_0203CD64 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - str r0, [r4] - ldr r1, =gUnknown_0860B2EC - mov r8, r1 - ldrb r0, [r0, 0xC] - lsls r0, 2 - add r0, r8 - ldr r0, [r0] - bl sub_818DB04 - lsls r0, 24 - lsrs r6, r0, 24 - ldr r1, [r4] - movs r0, 0x1 - strb r0, [r1, 0x1] - ldr r0, =gStringVar2 - adds r1, r5, 0 - bl sub_818DCAC - ldr r1, [r4] - strh r5, [r1, 0xE] - ldr r0, =gSaveBlock2Ptr - ldr r0, [r0] - adds r1, 0x4 - bl sub_818DCF4 - ldr r1, [r4] - ldr r0, =gGameLanguage - ldrb r0, [r0] - strb r0, [r1, 0x12] - movs r7, 0 - movs r3, 0 - cmp r7, r6 - bcs _0818DE36 - mov r12, r8 -_0818DDDC: - ldr r2, [r4] - ldrb r0, [r2, 0xC] - lsls r0, 2 - add r0, r12 - ldr r1, [r0] - lsls r0, r3, 1 - adds r0, r1 - ldrh r0, [r0] - cmp r0, r5 - bne _0818DE28 - movs r7, 0x1 - ldrb r0, [r2, 0x3] - adds r0, 0x1 - strb r0, [r2, 0x3] - ldr r0, [r4] - strb r7, [r0, 0x2] - ldr r1, [r4] - ldrh r0, [r1, 0x10] - cmp r0, r5 - bne _0818DE36 - movs r0, 0x5 - strb r0, [r1, 0x3] - b _0818DE36 - .pool -_0818DE28: - movs r0, 0 - strb r0, [r2, 0x2] - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, r6 - bcc _0818DDDC -_0818DE36: - adds r0, r7, 0 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_818DD84 - thumb_func_start sub_818DE44 sub_818DE44: @ 818DE44 push {lr} diff --git a/include/item_menu.h b/include/item_menu.h new file mode 100644 index 000000000..f402f5cdd --- /dev/null +++ b/include/item_menu.h @@ -0,0 +1,11 @@ +#ifndef GUARD_item_menu_H +#define GUARD_item_menu_H + +// Exported type declarations + +// Exported RAM declarations + +// Exported ROM declarations +void sub_81AAC50(void); + +#endif //GUARD_item_menu_H diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index c6b49e36f..8a0851110 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -9,6 +9,7 @@ #include "string_util.h" #include "item.h" #include "items.h" +#include "item_menu.h" #include "text.h" #include "lilycove_lady.h" @@ -211,3 +212,46 @@ void sub_818DD14(void) sub_818DCF4(gSaveBlock1Ptr->lilycoveLady.favour.unk_004, gStringVar3); ConvertInternationalString(gStringVar3, gUnknown_0203CD64->favour.language); } + +bool8 sub_818DD54(void) +{ + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; + return gUnknown_0203CD64->favour.unk_002 ? TRUE : FALSE; +} + +void sub_818DD78(void) +{ + sub_81AAC50(); +} + +bool8 sub_818DD84(u16 itemId) +{ + u8 len; + u8 i; + bool8 response; + + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; + len = sub_818DB04(gUnknown_0860B2EC[gUnknown_0203CD64->favour.unk_00c]); + gUnknown_0203CD64->favour.unk_001 = 1; + sub_818DCAC(gStringVar2, itemId); + gUnknown_0203CD64->favour.itemId = itemId; + sub_818DCF4(gSaveBlock2Ptr->playerName, gUnknown_0203CD64->favour.unk_004); + gUnknown_0203CD64->favour.language = gGameLanguage; + response = FALSE; + for (i = 0; i < len; i ++) + { + if (gUnknown_0860B2EC[gUnknown_0203CD64->favour.unk_00c][i] == itemId) + { + response = TRUE; + gUnknown_0203CD64->favour.unk_003 ++; + gUnknown_0203CD64->favour.unk_002 = 1; + if (gUnknown_0203CD64->favour.unk_010 == itemId) + { + gUnknown_0203CD64->favour.unk_003 = 5; + } + break; + } + gUnknown_0203CD64->favour.unk_002 = 0; + } + return response; +} From 83a420400c302d4c59eb204f8fa18943d69fc6d0 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 21:58:32 -0400 Subject: [PATCH 241/342] through sub_818DEF4 --- asm/lilycove_lady.s | 94 --------------------------------------------- src/lilycove_lady.c | 44 +++++++++++++++++++++ 2 files changed, 44 insertions(+), 94 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index c4cc3d21a..b3588f8a8 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,100 +5,6 @@ .text - thumb_func_start sub_818DE44 -sub_818DE44: @ 818DE44 - push {lr} - ldr r0, =gScriptItemId - ldrh r0, [r0] - bl sub_818DD84 - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - .pool - thumb_func_end sub_818DE44 - - thumb_func_start sub_818DE5C -sub_818DE5C: @ 818DE5C - push {lr} - ldr r1, =gUnknown_0203CD64 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - ldrb r0, [r0, 0x3] - movs r1, 0 - cmp r0, 0x4 - bls _0818DE74 - movs r1, 0x1 -_0818DE74: - adds r0, r1, 0 - pop {r1} - bx r1 - .pool - thumb_func_end sub_818DE5C - - thumb_func_start sub_818DE88 -sub_818DE88: @ 818DE88 - push {lr} - adds r1, r0, 0 - lsls r1, 16 - lsrs r1, 16 - ldr r0, =gStringVar2 - bl sub_818DCAC - pop {r0} - bx r0 - .pool - thumb_func_end sub_818DE88 - - thumb_func_start sub_818DEA0 -sub_818DEA0: @ 818DEA0 - push {r4,r5,lr} - ldr r5, =gUnknown_0203CD64 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - str r0, [r5] - ldr r1, =gUnknown_0860B304 - ldrb r0, [r0, 0xC] - lsls r0, 1 - adds r0, r1 - ldrh r4, [r0] - adds r0, r4, 0 - bl sub_818DE88 - ldr r1, [r5] - movs r0, 0x2 - strb r0, [r1, 0x1] - adds r0, r4, 0 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_818DEA0 - - thumb_func_start sub_818DEDC -sub_818DEDC: @ 818DEDC - push {lr} - bl SetLilycoveFavourLady - ldr r0, =gUnknown_0203CD64 - ldr r1, [r0] - movs r0, 0x1 - strb r0, [r1, 0x1] - pop {r0} - bx r0 - .pool - thumb_func_end sub_818DEDC - - thumb_func_start sub_818DEF4 -sub_818DEF4: @ 818DEF4 - push {lr} - bl EnableBothScriptContexts - pop {r0} - bx r0 - thumb_func_end sub_818DEF4 - thumb_func_start sub_818DF00 sub_818DF00: @ 818DF00 push {r4-r7,lr} diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 8a0851110..10a0e7f45 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -5,6 +5,7 @@ #include "global.h" #include "main.h" #include "event_data.h" +#include "script.h" #include "rng.h" #include "string_util.h" #include "item.h" @@ -24,8 +25,10 @@ extern const u16 gUnknown_0860B074[5]; extern const u16 gUnknown_0860B07E[3]; extern const u8 *const gUnknown_0860B224[]; extern const u16 *const gUnknown_0860B2EC[6]; +extern const u16 gUnknown_0860B304[6]; EWRAM_DATA LilycoveLady *gUnknown_0203CD64 = NULL; +extern EWRAM_DATA u16 gScriptItemId; u8 GetLilycoveLadyId(void) { @@ -255,3 +258,44 @@ bool8 sub_818DD84(u16 itemId) } return response; } + +bool8 sub_818DE44(void) +{ + return sub_818DD84(gScriptItemId); +} + +bool8 sub_818DE5C(void) +{ + u8 checkval; + + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; + checkval = gUnknown_0203CD64->favour.unk_003; + return checkval < 5 ? FALSE : TRUE; +} + +void sub_818DE88(u16 itemId) +{ + sub_818DCAC(gStringVar2, itemId); +} + +u16 sub_818DEA0(void) +{ + u16 itemId; + + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; + itemId = gUnknown_0860B304[gUnknown_0203CD64->favour.unk_00c]; + sub_818DE88(itemId); + gUnknown_0203CD64->favour.unk_001 = 2; + return itemId; +} + +void sub_818DEDC(void) +{ + SetLilycoveFavourLady(); + gUnknown_0203CD64->favour.unk_001 = 1; +} + +void sub_818DEF4(void) +{ + EnableBothScriptContexts(); +} From 73ee165ef6b05417dc42be721e625712c6538ed6 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 22:25:31 -0400 Subject: [PATCH 242/342] sub_818DF00 --- asm/lilycove_lady.s | 49 ------------------- include/global.h | 68 +++++++++++++++----------- src/lilycove_lady.c | 114 ++++++++++++++++++++++++++------------------ 3 files changed, 107 insertions(+), 124 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index b3588f8a8..e0f578eca 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,55 +5,6 @@ .text - thumb_func_start sub_818DF00 -sub_818DF00: @ 818DF00 - push {r4-r7,lr} - bl Random - lsls r0, 16 - lsrs r4, r0, 16 - movs r0, 0xF - ands r4, r0 - movs r3, 0 - ldr r5, =gUnknown_0203CD68 - ldr r1, =gUnknown_0860B1A4 - lsls r0, r4, 2 - adds r6, r0, r1 - adds r7, r5, 0 -_0818DF1A: - ldr r2, [r5] - lsls r1, r3, 1 - adds r2, 0x2 - adds r2, r1 - ldr r0, [r6] - adds r1, r0 - ldrh r0, [r1] - strh r0, [r2] - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x8 - bls _0818DF1A - ldr r2, [r7] - ldr r0, =gUnknown_0860B1E4 - lsls r1, r4, 1 - adds r0, r1, r0 - ldrh r0, [r0] - strh r0, [r2, 0x14] - ldr r0, =gUnknown_0860B204 - adds r1, r0 - ldrh r0, [r1] - strh r0, [r2, 0x28] - adds r2, 0x2B - strb r4, [r2] - ldr r1, [r7] - movs r0, 0xFF - strb r0, [r1, 0x18] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818DF00 - thumb_func_start SetLilycoveQuizLady SetLilycoveQuizLady: @ 818DF68 push {r4-r6,lr} diff --git a/include/global.h b/include/global.h index 8c2122b39..42fe0cfbb 100644 --- a/include/global.h +++ b/include/global.h @@ -667,39 +667,51 @@ enum { LILYCOVE_LADY_CONTEST }; +struct LilycoveLadyQuiz +{ + /*0x000*/ u8 id; + /*0x001*/ u8 language; + /*0x002*/ u16 unk_002[9]; + /*0x014*/ u16 unk_014; + /*0x016*/ u8 filler_016[2]; + /*0x018*/ u8 unk_018; + /*0x019*/ u8 filler_019[15]; + /*0x028*/ u16 unk_028; + /*0x02a*/ u8 filler_02a; + /*0x02b*/ u8 unk_02b; +}; + +struct LilycoveLadyFavour +{ + /*0x000*/ u8 id; + /*0x001*/ u8 unk_001; + /*0x002*/ u8 unk_002; + /*0x003*/ u8 unk_003; + /*0x004*/ u8 unk_004[8]; + /*0x00c*/ u8 unk_00c; + /*0x00d*/ u8 filler_00d; + /*0x00e*/ u16 itemId; + /*0x010*/ u16 unk_010; + /*0x012*/ u8 language; +}; + +struct LilycoveLadyContest +{ + /*0x000*/ u8 id; + /*0x001*/ u8 filler_001[12]; + /*0x00d*/ u8 category; // maybe? +}; + typedef union // TODO { - struct - { - /*0x000*/ u8 id; - /*0x001*/ u8 language; - } quiz; + struct LilycoveLadyQuiz quiz; + struct LilycoveLadyFavour favour; + struct LilycoveLadyContest contest; struct { /*0x000*/ u8 id; - /*0x001*/ u8 unk_001; - /*0x002*/ u8 unk_002; - /*0x003*/ u8 unk_003; - /*0x004*/ u8 unk_004[8]; - /*0x00c*/ u8 unk_00c; - /*0x00d*/ u8 filler_00d; - /*0x00e*/ u16 itemId; - /*0x010*/ u16 unk_010; - /*0x012*/ u8 language; - } favour; - - struct - { - /*0x000*/ u8 id; - /*0x001*/ u8 filler_001[12]; - /*0x00d*/ u8 category; // maybe? - } contest; - - struct - { - /*0x000*/ u8 id; - /*0x001*/ u8 filler_001[535]; + /*0x001*/ u8 filler_001[0x207]; } common; } LilycoveLady; @@ -786,7 +798,7 @@ struct SaveBlock1 /*0x3728*/ struct RamScript ramScript; /*0x3B14*/ struct RecordMixingGift recordMixingGift; /*0x3B24*/ u8 seen2[52]; - /*0x3B58*/ LilycoveLady lilycoveLady; // TODO: convert to a union + /*0x3B58*/ LilycoveLady lilycoveLady; /*0x3D70*/ u8 babyPhrase[24]; // TODO: convert to a struct // sizeof: 0x3D88 }; diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 10a0e7f45..d64b0d3b3 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -26,8 +26,12 @@ extern const u16 gUnknown_0860B07E[3]; extern const u8 *const gUnknown_0860B224[]; extern const u16 *const gUnknown_0860B2EC[6]; extern const u16 gUnknown_0860B304[6]; +extern const u16 *const gUnknown_0860B1A4[16]; +extern const u16 gUnknown_0860B1E4[16]; +extern const u16 gUnknown_0860B204[16]; -EWRAM_DATA LilycoveLady *gUnknown_0203CD64 = NULL; +EWRAM_DATA struct LilycoveLadyFavour *gUnknown_0203CD64 = NULL; +EWRAM_DATA struct LilycoveLadyQuiz *gUnknown_0203CD68 = NULL; extern EWRAM_DATA u16 gScriptItemId; u8 GetLilycoveLadyId(void) @@ -126,40 +130,40 @@ void sub_818DB20(void) u8 size; u8 idx; - gUnknown_0203CD64->favour.unk_00c = Random() % 6; - size = sub_818DB04(gUnknown_0860B2EC[gUnknown_0203CD64->favour.unk_00c]); + gUnknown_0203CD64->unk_00c = Random() % 6; + size = sub_818DB04(gUnknown_0860B2EC[gUnknown_0203CD64->unk_00c]); idx = Random() % size; - gUnknown_0203CD64->favour.unk_010 = gUnknown_0860B2EC[gUnknown_0203CD64->favour.unk_00c][idx]; + gUnknown_0203CD64->unk_010 = gUnknown_0860B2EC[gUnknown_0203CD64->unk_00c][idx]; } void SetLilycoveFavourLady(void) { - gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; - gUnknown_0203CD64->favour.id = LILYCOVE_LADY_FAVOUR; - gUnknown_0203CD64->favour.unk_001 = 0; - gUnknown_0203CD64->favour.unk_004[0] = EOS; - gUnknown_0203CD64->favour.unk_002 = 0; - gUnknown_0203CD64->favour.unk_003= 0; - gUnknown_0203CD64->favour.itemId = ITEM_NONE; - gUnknown_0203CD64->favour.language = gGameLanguage; + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; + gUnknown_0203CD64->id = LILYCOVE_LADY_FAVOUR; + gUnknown_0203CD64->unk_001 = 0; + gUnknown_0203CD64->unk_004[0] = EOS; + gUnknown_0203CD64->unk_002 = 0; + gUnknown_0203CD64->unk_003= 0; + gUnknown_0203CD64->itemId = ITEM_NONE; + gUnknown_0203CD64->language = gGameLanguage; sub_818DB20(); } void sub_818DBC4(void) { - gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; - gUnknown_0203CD64->favour.id = LILYCOVE_LADY_FAVOUR; - gUnknown_0203CD64->favour.unk_001 = 0; + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; + gUnknown_0203CD64->id = LILYCOVE_LADY_FAVOUR; + gUnknown_0203CD64->unk_001 = 0; } u8 sub_818DBE8(void) { - gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; - if (gUnknown_0203CD64->favour.unk_001 == 2) + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; + if (gUnknown_0203CD64->unk_001 == 2) { return 2; } - else if (gUnknown_0203CD64->favour.unk_001 == 1) + else if (gUnknown_0203CD64->unk_001 == 1) { return 1; } @@ -176,17 +180,17 @@ const u8 *sub_818DC1C(u8 idx) void sub_818DC2C(void) { - gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; - StringCopy(gStringVar1, sub_818DC1C(gUnknown_0203CD64->favour.unk_00c)); + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; + StringCopy(gStringVar1, sub_818DC1C(gUnknown_0203CD64->unk_00c)); } bool8 sub_818DC60(void) { - gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; - if (gUnknown_0203CD64->favour.unk_004[0] != EOS) + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; + if (gUnknown_0203CD64->unk_004[0] != EOS) { StringCopy7(gStringVar3, gSaveBlock1Ptr->lilycoveLady.favour.unk_004); - ConvertInternationalString(gStringVar3, gUnknown_0203CD64->favour.language); + ConvertInternationalString(gStringVar3, gUnknown_0203CD64->language); return TRUE; } return FALSE; @@ -199,8 +203,8 @@ void sub_818DCAC(u8 *dest, u16 itemId) void sub_818DCC8(void) { - gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; - sub_818DCAC(gStringVar2, gUnknown_0203CD64->favour.itemId); + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; + sub_818DCAC(gStringVar2, gUnknown_0203CD64->itemId); } void sub_818DCF4(const u8 *src, u8 *dest) @@ -211,15 +215,15 @@ void sub_818DCF4(const u8 *src, u8 *dest) void sub_818DD14(void) { - gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; sub_818DCF4(gSaveBlock1Ptr->lilycoveLady.favour.unk_004, gStringVar3); - ConvertInternationalString(gStringVar3, gUnknown_0203CD64->favour.language); + ConvertInternationalString(gStringVar3, gUnknown_0203CD64->language); } bool8 sub_818DD54(void) { - gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; - return gUnknown_0203CD64->favour.unk_002 ? TRUE : FALSE; + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; + return gUnknown_0203CD64->unk_002 ? TRUE : FALSE; } void sub_818DD78(void) @@ -233,28 +237,28 @@ bool8 sub_818DD84(u16 itemId) u8 i; bool8 response; - gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; - len = sub_818DB04(gUnknown_0860B2EC[gUnknown_0203CD64->favour.unk_00c]); - gUnknown_0203CD64->favour.unk_001 = 1; + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; + len = sub_818DB04(gUnknown_0860B2EC[gUnknown_0203CD64->unk_00c]); + gUnknown_0203CD64->unk_001 = 1; sub_818DCAC(gStringVar2, itemId); - gUnknown_0203CD64->favour.itemId = itemId; - sub_818DCF4(gSaveBlock2Ptr->playerName, gUnknown_0203CD64->favour.unk_004); - gUnknown_0203CD64->favour.language = gGameLanguage; + gUnknown_0203CD64->itemId = itemId; + sub_818DCF4(gSaveBlock2Ptr->playerName, gUnknown_0203CD64->unk_004); + gUnknown_0203CD64->language = gGameLanguage; response = FALSE; for (i = 0; i < len; i ++) { - if (gUnknown_0860B2EC[gUnknown_0203CD64->favour.unk_00c][i] == itemId) + if (gUnknown_0860B2EC[gUnknown_0203CD64->unk_00c][i] == itemId) { response = TRUE; - gUnknown_0203CD64->favour.unk_003 ++; - gUnknown_0203CD64->favour.unk_002 = 1; - if (gUnknown_0203CD64->favour.unk_010 == itemId) + gUnknown_0203CD64->unk_003 ++; + gUnknown_0203CD64->unk_002 = 1; + if (gUnknown_0203CD64->unk_010 == itemId) { - gUnknown_0203CD64->favour.unk_003 = 5; + gUnknown_0203CD64->unk_003 = 5; } break; } - gUnknown_0203CD64->favour.unk_002 = 0; + gUnknown_0203CD64->unk_002 = 0; } return response; } @@ -268,8 +272,8 @@ bool8 sub_818DE5C(void) { u8 checkval; - gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; - checkval = gUnknown_0203CD64->favour.unk_003; + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; + checkval = gUnknown_0203CD64->unk_003; return checkval < 5 ? FALSE : TRUE; } @@ -282,20 +286,36 @@ u16 sub_818DEA0(void) { u16 itemId; - gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady; - itemId = gUnknown_0860B304[gUnknown_0203CD64->favour.unk_00c]; + gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; + itemId = gUnknown_0860B304[gUnknown_0203CD64->unk_00c]; sub_818DE88(itemId); - gUnknown_0203CD64->favour.unk_001 = 2; + gUnknown_0203CD64->unk_001 = 2; return itemId; } void sub_818DEDC(void) { SetLilycoveFavourLady(); - gUnknown_0203CD64->favour.unk_001 = 1; + gUnknown_0203CD64->unk_001 = 1; } void sub_818DEF4(void) { EnableBothScriptContexts(); } + +void sub_818DF00(void) +{ + u8 v0; + u8 i; + + v0 = Random() % 16; + for (i = 0; i < 9; i ++) + { + gUnknown_0203CD68->unk_002[i] = gUnknown_0860B1A4[v0][i]; + } + gUnknown_0203CD68->unk_014 = gUnknown_0860B1E4[v0]; + gUnknown_0203CD68->unk_028 = gUnknown_0860B204[v0]; + gUnknown_0203CD68->unk_02b = v0; + gUnknown_0203CD68->unk_018 = 0xFF; +} From 28d0fa33fef825dcb22d45db966ef814c461dd08 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 22:35:40 -0400 Subject: [PATCH 243/342] SetLilicoveQuizLady --- asm/lilycove_lady.s | 73 --------------------------------------------- include/global.h | 11 ++++--- src/lilycove_lady.c | 24 +++++++++++++++ 3 files changed, 31 insertions(+), 77 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index e0f578eca..c3e72fab1 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,79 +5,6 @@ .text - thumb_func_start SetLilycoveQuizLady -SetLilycoveQuizLady: @ 818DF68 - push {r4-r6,lr} - ldr r2, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - str r0, [r2] - movs r1, 0 - strb r1, [r0] - ldr r0, [r2] - strb r1, [r0, 0x1] - movs r3, 0 - adds r4, r2, 0 - ldr r6, =gGameLanguage - adds r5, r4, 0 - ldr r0, =0x0000ffff - adds r2, r0, 0 -_0818DF8A: - ldr r1, [r5] - lsls r0, r3, 1 - adds r1, 0x2 - adds r1, r0 - ldrh r0, [r1] - orrs r0, r2 - strh r0, [r1] - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x8 - bls _0818DF8A - ldr r0, [r4] - ldr r1, =0x0000ffff - strh r1, [r0, 0x14] - movs r1, 0x1 - negs r1, r1 - strh r1, [r0, 0x16] - movs r3, 0 - adds r5, r4, 0 - movs r2, 0 -_0818DFB4: - ldr r0, [r5] - lsls r1, r3, 1 - adds r0, 0x20 - adds r0, r1 - strh r2, [r0] - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x3 - bls _0818DFB4 - ldr r0, [r4] - movs r2, 0 - movs r1, 0 - strh r1, [r0, 0x28] - adds r0, 0x2A - strb r2, [r0] - ldr r0, [r4] - adds r0, 0x2C - movs r1, 0x10 - strb r1, [r0] - ldr r0, [r4] - ldrb r1, [r6] - adds r0, 0x2D - strb r1, [r0] - bl sub_818DF00 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end SetLilycoveQuizLady - thumb_func_start sub_818E004 sub_818E004: @ 818E004 ldr r2, =gUnknown_0203CD68 diff --git a/include/global.h b/include/global.h index 42fe0cfbb..84c70a16e 100644 --- a/include/global.h +++ b/include/global.h @@ -670,15 +670,18 @@ enum { struct LilycoveLadyQuiz { /*0x000*/ u8 id; - /*0x001*/ u8 language; + /*0x001*/ u8 unk_001; /*0x002*/ u16 unk_002[9]; /*0x014*/ u16 unk_014; - /*0x016*/ u8 filler_016[2]; + /*0x016*/ u16 unk_016; /*0x018*/ u8 unk_018; - /*0x019*/ u8 filler_019[15]; + /*0x019*/ u8 filler_019[7]; + /*0x020*/ u16 unk_020[4]; /*0x028*/ u16 unk_028; - /*0x02a*/ u8 filler_02a; + /*0x02a*/ u8 unk_02a; /*0x02b*/ u8 unk_02b; + /*0x02c*/ u8 unk_02c; + /*0x02d*/ u8 language; }; struct LilycoveLadyFavour diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index d64b0d3b3..901812ed6 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -319,3 +319,27 @@ void sub_818DF00(void) gUnknown_0203CD68->unk_02b = v0; gUnknown_0203CD68->unk_018 = 0xFF; } + +void SetLilycoveQuizLady(void) +{ + u8 i; + + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + gUnknown_0203CD68->id = LILYCOVE_LADY_QUIZ; + gUnknown_0203CD68->unk_001 = 0; + for (i = 0; i < 9; i ++) + { + gUnknown_0203CD68->unk_002[i] = -1; + } + gUnknown_0203CD68->unk_014 = -1; + gUnknown_0203CD68->unk_016 = -1; + for (i = 0; i < 4; i ++) + { + gUnknown_0203CD68->unk_020[i] = 0; + } + gUnknown_0203CD68->unk_028 = 0; + gUnknown_0203CD68->unk_02a = 0; + gUnknown_0203CD68->unk_02c = 0x10; + gUnknown_0203CD68->language = gGameLanguage; + sub_818DF00(); +} From 9b00767b55b70627aad81b67b87c06db9dca5742 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 22:57:22 -0400 Subject: [PATCH 244/342] sub_818E004; sanity --- asm/lilycove_lady.s | 22 ---------------------- src/lilycove_lady.c | 13 +++++++++++-- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index c3e72fab1..bf3313a97 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,28 +5,6 @@ .text - thumb_func_start sub_818E004 -sub_818E004: @ 818E004 - ldr r2, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - str r0, [r2] - movs r1, 0 - strb r1, [r0] - ldr r0, [r2] - strb r1, [r0, 0x1] - ldr r0, [r2] - adds r0, 0x2A - strb r1, [r0] - ldr r1, [r2] - ldr r0, =0x0000ffff - strh r0, [r1, 0x16] - bx lr - .pool - thumb_func_end sub_818E004 - thumb_func_start sub_818E038 sub_818E038: @ 818E038 push {lr} diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 901812ed6..c7a5ef68d 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -189,7 +189,7 @@ bool8 sub_818DC60(void) gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; if (gUnknown_0203CD64->unk_004[0] != EOS) { - StringCopy7(gStringVar3, gSaveBlock1Ptr->lilycoveLady.favour.unk_004); + StringCopy7(gStringVar3, gUnknown_0203CD64->unk_004); ConvertInternationalString(gStringVar3, gUnknown_0203CD64->language); return TRUE; } @@ -216,7 +216,7 @@ void sub_818DCF4(const u8 *src, u8 *dest) void sub_818DD14(void) { gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; - sub_818DCF4(gSaveBlock1Ptr->lilycoveLady.favour.unk_004, gStringVar3); + sub_818DCF4(gUnknown_0203CD64->unk_004, gStringVar3); ConvertInternationalString(gStringVar3, gUnknown_0203CD64->language); } @@ -343,3 +343,12 @@ void SetLilycoveQuizLady(void) gUnknown_0203CD68->language = gGameLanguage; sub_818DF00(); } + +void sub_818E004(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + gUnknown_0203CD68->id = LILYCOVE_LADY_QUIZ; + gUnknown_0203CD68->unk_001 = 0; + gUnknown_0203CD68->unk_02a = 0; + gUnknown_0203CD68->unk_016 = -1; +} From 4ec2fe8f370845ff1bd579df4de8a8aaeba92d3a Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Tue, 19 Sep 2017 22:00:02 -0500 Subject: [PATCH 245/342] Replace data with move constants --- data/battle_4.s | 10 +++++----- data/link.s | 36 ++++++------------------------------ 2 files changed, 11 insertions(+), 35 deletions(-) diff --git a/data/battle_4.s b/data/battle_4.s index 0f799eac8..3300b25ee 100644 --- a/data/battle_4.s +++ b/data/battle_4.s @@ -81,11 +81,11 @@ sProtectSuccessRates:: @ 831C3D8 .align 2 gUnknown_0831C3E0:: @ 831C3E0 - .2byte 0x0076, 0x00a5, 0x00a6, 0x0066 - .2byte 0xfffe, 0x0044, 0x00f3, 0x00b6 - .2byte 0x00c5, 0x00cb, 0x00c2, 0x00d6 - .2byte 0x00a8, 0x010a, 0x0121, 0x010e - .2byte 0x0157, 0x010f, 0x0108, 0xffff + .2byte MOVE_METRONOME, MOVE_STRUGGLE, MOVE_SKETCH, MOVE_MIMIC + .2byte 0xfffe, MOVE_COUNTER, MOVE_MIRROR_COAT, MOVE_PROTECT + .2byte MOVE_DETECT, MOVE_ENDURE, MOVE_DESTINY_BOND, MOVE_SLEEP_TALK + .2byte MOVE_THIEF, MOVE_FOLLOW_ME, MOVE_SNATCH, MOVE_HELPING_HAND + .2byte MOVE_COVET, MOVE_TRICK, MOVE_FOCUS_PUNCH, 0xffff .align 2 gUnknown_0831C408:: @ 831C408 diff --git a/data/link.s b/data/link.s index a7424cc1a..3aa87ef67 100644 --- a/data/link.s +++ b/data/link.s @@ -54,38 +54,14 @@ gUnknown_082ED1FC:: @ 82ED1FC BgTemplate .4byte 0x000001F8 .4byte 0x00001081 -gUnknown_082ED204:: @ 82ED204 WindowTemplate - .byte 0x00 - .byte 0x00 - .byte 0x00 - .byte 0x1E - .byte 0x05 - .byte 0x0F - .2byte 0x0002 +gUnknown_082ED204:: @ 82ED204 + window_template 0x00, 0x00, 0x00, 0x1E, 0x05, 0x0F, 0x0002 - .byte 0x00 - .byte 0x00 - .byte 0x06 - .byte 0x1E - .byte 0x07 - .byte 0x0F - .2byte 0x0098 + window_template 0x00, 0x00, 0x06, 0x1E, 0x07, 0x0F, 0x0098 - .byte 0x00 - .byte 0x00 - .byte 0x0D - .byte 0x1E - .byte 0x07 - .byte 0x0F - .2byte 0x016A + window_template 0x00, 0x00, 0x0D, 0x1E, 0x07, 0x0F, 0x016A - .byte 0xFF - .byte 0x00 - .byte 0x00 - .byte 0x00 - .byte 0x00 - .byte 0x00 - .2byte 0x0000 + window_template 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 gUnknown_082ED224:: @ 82ED224 .byte 0x00, 0x01, 0x02, 0x00, 0xff, 0xfe, 0xff, 0x00 @@ -3041,7 +3017,7 @@ gUnknown_082F32C8:: @ 82F32C8 struct BgTemplate .4byte 0x000000F8 .align 2 -gUnknown_082F32CC:: @ 82F32CC struct WindowTemplate? not sure +gUnknown_082F32CC:: @ 82F32CC struct BgTemplate? not sure .byte 0xd1, 0x14, 0x00, 0x00, 0xc2, 0x20, 0x00, 0x00 .byte 0xb3, 0x30, 0x00, 0x00 From c05f2d44732020ed43f5500a26130ec94e34d657 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 19 Sep 2017 23:31:05 -0400 Subject: [PATCH 246/342] sub_818E06C --- asm/lilycove_lady.s | 125 -------------------------------------------- src/lilycove_lady.c | 62 ++++++++++++++++++++++ 2 files changed, 62 insertions(+), 125 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index bf3313a97..0f66eae84 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,131 +5,6 @@ .text - thumb_func_start sub_818E038 -sub_818E038: @ 818E038 - push {lr} - ldr r1, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - ldrb r0, [r0, 0x1] - cmp r0, 0x2 - bne _0818E05C - movs r0, 0x2 - b _0818E066 - .pool -_0818E05C: - cmp r0, 0x1 - beq _0818E064 - movs r0, 0 - b _0818E066 -_0818E064: - movs r0, 0x1 -_0818E066: - pop {r1} - bx r1 - thumb_func_end sub_818E038 - - thumb_func_start sub_818E06C -sub_818E06C: @ 818E06C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r0, =gSaveBlock1Ptr - ldr r4, [r0] - ldr r0, =0x00003b58 - adds r7, r4, r0 - ldrh r0, [r7, 0x14] - bl sub_811F8D8 - cmp r0, 0 - bne _0818E0EC - ldr r1, =0x00003b83 - adds r0, r4, r1 - ldrb r5, [r0] - ldr r0, =0x00003b5a - adds r0, r4 - mov r8, r0 - adds r1, r4 - mov r10, r1 - ldr r6, =gUnknown_0860B1E4 -_0818E09A: - adds r5, 0x1 - cmp r5, 0xF - ble _0818E0A2 - movs r5, 0 -_0818E0A2: - lsls r4, r5, 1 - adds r0, r4, r6 - ldrh r0, [r0] - bl sub_811F8D8 - cmp r0, 0 - beq _0818E09A - movs r3, 0 - ldr r0, =gUnknown_0860B1E4 - mov r12, r0 - lsls r1, r5, 2 - ldr r0, =gUnknown_0860B204 - mov r9, r0 - ldr r0, =gUnknown_0860B1A4 - adds r6, r1, r0 - mov r2, r8 -_0818E0C2: - lsls r0, r3, 1 - ldr r1, [r6] - adds r0, r1 - ldrh r0, [r0] - strh r0, [r2] - adds r2, 0x2 - adds r3, 0x1 - cmp r3, 0x8 - ble _0818E0C2 - mov r1, r12 - adds r0, r4, r1 - ldrh r0, [r0] - strh r0, [r7, 0x14] - mov r1, r9 - adds r0, r4, r1 - ldrh r0, [r0] - strh r0, [r7, 0x28] - mov r0, r10 - strb r5, [r0] - movs r0, 0xFF - strb r0, [r7, 0x18] -_0818E0EC: - bl sub_818E13C - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - bne _0818E118 - movs r0, 0x2 - b _0818E12C - .pool -_0818E118: - cmp r0, 0x2 - beq _0818E126 - bl sub_818E1F4 - lsls r0, 24 - cmp r0, 0 - beq _0818E12A -_0818E126: - movs r0, 0x1 - b _0818E12C -_0818E12A: - movs r0, 0 -_0818E12C: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_818E06C - thumb_func_start sub_818E13C sub_818E13C: @ 818E13C push {r4-r7,lr} diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index c7a5ef68d..93c3cce67 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -20,6 +20,9 @@ void SetLilycoveContestLady(void); void sub_818E004(void); void sub_818DBC4(void); void sub_818E674(void); +bool32 sub_811F8D8(u16); +u8 sub_818E13C(void); +bool8 sub_818E1F4(void); extern const u16 gUnknown_0860B074[5]; extern const u16 gUnknown_0860B07E[3]; @@ -352,3 +355,62 @@ void sub_818E004(void) gUnknown_0203CD68->unk_02a = 0; gUnknown_0203CD68->unk_016 = -1; } + +u8 sub_818E038(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + if (gUnknown_0203CD68->unk_001 == 2) + { + return 2; + } + else if (gUnknown_0203CD68->unk_001 == 1) + { + return 1; + } + else + { + return 0; + } +} + +u8 sub_818E06C(void) +{ + int i; + int j; + u8 rv; + struct LilycoveLadyQuiz *quiz; + + quiz = &gSaveBlock1Ptr->lilycoveLady.quiz; + if (sub_811F8D8(quiz->unk_014) == 0) + { + i = quiz->unk_02b; + do + { + if (++ i >= 16) + { + i = 0; + } + } while (sub_811F8D8(gUnknown_0860B1E4[i]) == 0); + for (j = 0; j < 9; j ++) + { + quiz->unk_002[j] = gUnknown_0860B1A4[i][j]; + } + quiz->unk_014 = gUnknown_0860B1E4[i]; + quiz->unk_028 = gUnknown_0860B204[i]; + quiz->unk_02b = i; + quiz->unk_018 = 0xFF; + } + rv = sub_818E13C(); + if (rv == 0) + { + return 2; + } + else if (rv == 2 || sub_818E1F4()) + { + return 1; + } + else + { + return 0; + } +} From 28da80e19af3270b827e98c2e7c69c0199d14d05 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 20 Sep 2017 12:56:45 +0200 Subject: [PATCH 247/342] battle 4 up to SetMoveEffect --- asm/battle_2.s | 6 +- asm/battle_4.s | 1004 +--------------------------------- asm/rom3.s | 12 +- data/battle_message.s | 2 +- data/battle_scripts_1.s | 8 +- include/battle.h | 1 + include/battle_controllers.h | 2 + include/songs.h | 4 +- src/battle_4.c | 401 +++++++++++++- sym_ewram.txt | 4 +- 10 files changed, 410 insertions(+), 1034 deletions(-) diff --git a/asm/battle_2.s b/asm/battle_2.s index debf0eb03..7567daa4b 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -6510,7 +6510,7 @@ _0803A0AE: ldr r0, [r0, 0xC] adds r0, 0x20 strb r2, [r0] - ldr r5, =gUnknown_0202432C + ldr r5, =gPauseCounterBattle ldr r6, =gBattleMoveDamage ldr r7, =gUnknown_020243FC ldr r0, =gUnknown_03005D54 @@ -14058,14 +14058,14 @@ _0803E480: cmp r0, 0x1F bne _0803E4CE adds r0, r2, 0 - bl sub_8048728 + bl BankGetTurnOrder lsls r0, 24 lsrs r0, 24 ldr r3, [sp] cmp r0, r3 bcs _0803E4CE ldrb r0, [r4] - bl sub_8048728 + bl BankGetTurnOrder lsls r0, 24 lsrs r0, 24 str r0, [sp] diff --git a/asm/battle_4.s b/asm/battle_4.s index e1c02a2fb..149462091 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -5,998 +5,6 @@ .text - thumb_func_start atk0C_datahpupdate -atk0C_datahpupdate: @ 8047EC4 - push {r4-r7,lr} - sub sp, 0x4 - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - beq _08047ED2 - b _080482A2 -_08047ED2: - ldr r0, =gBattleStruct - ldr r0, [r0] - ldrb r1, [r0, 0x13] - cmp r1, 0 - beq _08047EF4 - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - bne _08047EF4 - movs r6, 0x3F - ands r6, r1 - b _08047F04 - .pool -_08047EF4: - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r6, [r0, 0x2] -_08047F04: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _08047F12 - b _08048274 -_08047F12: - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r7, =gActiveBank - strb r0, [r7] - ldr r1, =gBattleMons - ldrb r2, [r7] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 17 - ands r0, r1 - cmp r0, 0 - beq _08048028 - ldr r0, =gDisableStructs - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - adds r4, r1, r0 - ldrb r1, [r4, 0xA] - mov r12, r0 - cmp r1, 0 - beq _08048028 - ldr r0, =gHitMarker - ldr r3, [r0] - movs r0, 0x80 - lsls r0, 1 - ands r3, r0 - cmp r3, 0 - bne _08048028 - adds r5, r1, 0 - ldr r6, =gBattleMoveDamage - ldr r4, [r6] - cmp r5, r4 - blt _08047FBC - ldr r0, =gSpecialStatuses - lsls r1, r2, 2 - adds r1, r2 - lsls r1, 2 - adds r0, 0x4 - adds r1, r0 - ldr r0, [r1] - cmp r0, 0 - bne _08047F76 - str r4, [r1] -_08047F76: - ldrb r0, [r7] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - add r1, r12 - ldr r2, [r6] - ldrb r0, [r1, 0xA] - subs r0, r2 - strb r0, [r1, 0xA] - ldr r1, =gUnknown_020241F4 - ldr r0, [r6] - str r0, [r1] - b _08047FEC - .pool -_08047FBC: - ldr r0, =gSpecialStatuses - lsls r1, r2, 2 - adds r1, r2 - lsls r1, 2 - adds r0, 0x4 - adds r1, r0 - ldr r0, [r1] - cmp r0, 0 - bne _08047FD0 - str r5, [r1] -_08047FD0: - ldr r2, =gUnknown_020241F4 - ldrb r1, [r7] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r12 - ldrb r0, [r0, 0xA] - str r0, [r2] - ldrb r1, [r7] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r12 - strb r3, [r0, 0xA] -_08047FEC: - ldr r0, =gActiveBank - ldrb r1, [r0] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r12 - ldrb r0, [r0, 0xA] - cmp r0, 0 - beq _08048000 - b _0804829A -_08048000: - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x2 - str r0, [r4] - bl b_movescr_stack_push_cursor - ldr r0, =gUnknown_082DB6FB - str r0, [r4] - b _080482A2 - .pool -_08048028: - ldr r0, =gHitMarker - ldr r2, [r0] - ldr r1, =0xfffffeff - ands r2, r1 - str r2, [r0] - ldr r1, =gBattleMoveDamage - ldr r5, [r1] - mov r12, r0 - adds r7, r1, 0 - cmp r5, 0 - bge _0804807C - ldr r4, =gBattleMons - ldr r2, =gActiveBank - ldrb r0, [r2] - movs r3, 0x58 - adds r1, r0, 0 - muls r1, r3 - adds r1, r4 - ldrh r0, [r1, 0x28] - subs r0, r5 - strh r0, [r1, 0x28] - ldrb r0, [r2] - muls r0, r3 - adds r1, r0, r4 - ldrh r3, [r1, 0x2C] - ldrh r0, [r1, 0x28] - adds r5, r2, 0 - cmp r0, r3 - bhi _08048064 - b _0804823A -_08048064: - strh r3, [r1, 0x28] - b _0804823A - .pool -_0804807C: - movs r0, 0x20 - ands r0, r2 - cmp r0, 0 - beq _08048098 - movs r0, 0x21 - negs r0, r0 - ands r2, r0 - mov r0, r12 - str r2, [r0] - ldr r5, =gActiveBank - b _080480E0 - .pool -_08048098: - ldr r0, =gTakenDmg - ldr r2, =gActiveBank - ldrb r1, [r2] - lsls r1, 2 - adds r1, r0 - ldr r0, [r1] - adds r0, r5 - str r0, [r1] - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - adds r5, r2, 0 - cmp r0, 0 - bne _080480D4 - ldr r1, =gTakenDmgBanks - ldrb r0, [r5] - adds r0, r1 - ldr r1, =gBankAttacker - b _080480DC - .pool -_080480D4: - ldr r1, =gTakenDmgBanks - ldrb r0, [r5] - adds r0, r1 - ldr r1, =gBankTarget -_080480DC: - ldrb r1, [r1] - strb r1, [r0] -_080480E0: - ldr r4, =gBattleMons - ldrb r0, [r5] - movs r3, 0x58 - muls r0, r3 - adds r2, r0, r4 - ldrh r0, [r2, 0x28] - ldr r1, [r7] - cmp r0, r1 - ble _08048110 - subs r0, r1 - strh r0, [r2, 0x28] - ldr r0, =gUnknown_020241F4 - str r1, [r0] - adds r7, r0, 0 - b _08048120 - .pool -_08048110: - ldr r2, =gUnknown_020241F4 - str r0, [r2] - ldrb r0, [r5] - muls r0, r3 - adds r0, r4 - movs r1, 0 - strh r1, [r0, 0x28] - adds r7, r2, 0 -_08048120: - ldr r2, =gSpecialStatuses - ldrb r1, [r5] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r1, r2, 0x4 - adds r3, r0, r1 - ldr r0, [r3] - adds r4, r2, 0 - cmp r0, 0 - bne _08048148 - mov r1, r12 - ldr r0, [r1] - movs r1, 0x80 - lsls r1, 13 - ands r0, r1 - cmp r0, 0 - bne _08048148 - ldr r0, [r7] - str r0, [r3] -_08048148: - cmp r6, 0x8 - bhi _080481D0 - mov r1, r12 - ldr r0, [r1] - movs r1, 0x80 - lsls r1, 13 - ands r0, r1 - cmp r0, 0 - bne _080481CC - ldr r0, =gCurrentMove - ldrh r0, [r0] - cmp r0, 0xDC - beq _080481CC - ldr r3, =gProtectStructs - ldrb r0, [r5] - lsls r0, 4 - adds r1, r3, 0x4 - adds r0, r1 - ldr r2, [r7] - str r2, [r0] - ldrb r1, [r5] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r1, r4, 0 - adds r1, 0x8 - adds r0, r1 - str r2, [r0] - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - cmp r0, 0 - bne _080481AC - ldrb r0, [r5] - lsls r0, 4 - adds r0, r3 - ldr r2, =gBankAttacker - b _080481B4 - .pool -_080481AC: - ldrb r0, [r5] - lsls r0, 4 - adds r0, r3 - ldr r2, =gBankTarget -_080481B4: - ldrb r1, [r2] - strb r1, [r0, 0xC] - ldrb r1, [r5] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r1, [r2] - strb r1, [r0, 0x10] - b _0804823A - .pool -_080481CC: - cmp r6, 0x8 - bls _0804823A -_080481D0: - mov r1, r12 - ldr r0, [r1] - movs r1, 0x80 - lsls r1, 13 - ands r0, r1 - cmp r0, 0 - bne _0804823A - ldr r3, =gProtectStructs - ldrb r0, [r5] - lsls r0, 4 - adds r1, r3, 0 - adds r1, 0x8 - adds r0, r1 - ldr r2, [r7] - str r2, [r0] - ldrb r1, [r5] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r1, r4, 0 - adds r1, 0xC - adds r0, r1 - str r2, [r0] - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - cmp r0, 0 - bne _08048220 - ldrb r0, [r5] - lsls r0, 4 - adds r0, r3 - ldr r2, =gBankAttacker - b _08048228 - .pool -_08048220: - ldrb r0, [r5] - lsls r0, 4 - adds r0, r3 - ldr r2, =gBankTarget -_08048228: - ldrb r1, [r2] - strb r1, [r0, 0xD] - ldrb r1, [r5] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r1, [r2] - strb r1, [r0, 0x11] -_0804823A: - mov r1, r12 - ldr r0, [r1] - ldr r1, =0xffefffff - ands r0, r1 - mov r1, r12 - str r0, [r1] - ldrb r1, [r5] - movs r0, 0x58 - muls r0, r1 - ldr r1, =gBattleMons + 0x28 - adds r0, r1 - str r0, [sp] - movs r0, 0 - movs r1, 0x2A - movs r2, 0 - movs r3, 0x2 - bl EmitSetAttributes - ldrb r0, [r5] - bl MarkBufferBankForExecution - b _0804829A - .pool -_08048274: - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r1, =gActiveBank - strb r0, [r1] - ldr r2, =gSpecialStatuses - ldrb r1, [r1] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r2, 0x4 - adds r1, r0, r2 - ldr r0, [r1] - cmp r0, 0 - bne _0804829A - ldr r0, =0x0000ffff - str r0, [r1] -_0804829A: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] -_080482A2: - add sp, 0x4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk0C_datahpupdate - - thumb_func_start atk0D_critmessage -atk0D_critmessage: @ 80482BC - push {lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _080482F2 - ldr r0, =gCritMultiplier - ldrb r0, [r0] - cmp r0, 0x2 - bne _080482EA - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - bne _080482EA - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0xD9 - bl PrepareStringBattle - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x7] -_080482EA: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] -_080482F2: - pop {r0} - bx r0 - .pool - thumb_func_end atk0D_critmessage - - thumb_func_start atk0E_effectiveness_sound -atk0E_effectiveness_sound: @ 8048310 - push {r4,lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _080483D0 - ldr r4, =gActiveBank - ldr r0, =gBankTarget - ldrb r0, [r0] - strb r0, [r4] - ldr r1, =gBattleMoveFlags - ldrb r2, [r1] - movs r0, 0x1 - ands r0, r2 - cmp r0, 0 - bne _080483C8 - movs r0, 0xFE - ands r0, r2 - cmp r0, 0x10 - beq _08048382 - cmp r0, 0x10 - bgt _0804835E - cmp r0, 0x4 - beq _08048372 - cmp r0, 0x4 - bgt _08048358 - cmp r0, 0x2 - beq _0804836C - b _08048382 - .pool -_08048358: - cmp r0, 0x8 - beq _080483C8 - b _08048382 -_0804835E: - cmp r0, 0x40 - beq _08048382 - cmp r0, 0x40 - bgt _08048382 - cmp r0, 0x20 - beq _080483C8 - b _08048382 -_0804836C: - movs r0, 0 - movs r1, 0xE - b _08048376 -_08048372: - movs r0, 0 - movs r1, 0xC -_08048376: - bl dp01_build_cmdbuf_x2B_aa_0 - ldrb r0, [r4] - bl MarkBufferBankForExecution - b _080483C8 -_08048382: - ldrb r1, [r1] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _08048392 - movs r0, 0 - movs r1, 0xE - b _0804839E -_08048392: - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _080483B0 - movs r0, 0 - movs r1, 0xC -_0804839E: - bl dp01_build_cmdbuf_x2B_aa_0 - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution - b _080483C8 - .pool -_080483B0: - movs r0, 0x28 - ands r0, r1 - cmp r0, 0 - bne _080483C8 - movs r0, 0 - movs r1, 0xD - bl dp01_build_cmdbuf_x2B_aa_0 - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution -_080483C8: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] -_080483D0: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk0E_effectiveness_sound - - thumb_func_start atk0F_resultmessage -atk0F_resultmessage: @ 80483E0 - push {r4-r7,lr} - movs r3, 0 - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - beq _080483EE - b _08048580 -_080483EE: - ldr r1, =gBattleMoveFlags - ldrb r2, [r1] - movs r4, 0x1 - adds r0, r4, 0 - ands r0, r2 - adds r6, r1, 0 - ldr r7, =gBattleCommunication - cmp r0, 0 - beq _0804842C - movs r0, 0x8 - ands r0, r2 - cmp r0, 0 - beq _0804840E - ldrb r0, [r7, 0x6] - cmp r0, 0x2 - bls _0804842C -_0804840E: - ldr r1, =gUnknown_085CC834 - ldrb r0, [r7, 0x6] - lsls r0, 1 - adds r0, r1 - ldrh r3, [r0] - strb r4, [r7, 0x7] - b _0804856A - .pool -_0804842C: - movs r0, 0x1 - strb r0, [r7, 0x7] - ldrb r5, [r6] - movs r0, 0xFE - ands r0, r5 - cmp r0, 0x10 - beq _08048470 - cmp r0, 0x10 - bgt _08048452 - cmp r0, 0x4 - beq _0804846C - cmp r0, 0x4 - bgt _0804844C - cmp r0, 0x2 - beq _08048468 - b _080484B8 -_0804844C: - cmp r0, 0x8 - beq _080484C4 - b _080484B8 -_08048452: - cmp r0, 0x40 - beq _08048474 - cmp r0, 0x40 - bgt _08048462 - cmp r0, 0x20 - bne _08048460 - b _08048564 -_08048460: - b _080484B8 -_08048462: - cmp r0, 0x80 - beq _08048478 - b _080484B8 -_08048468: - movs r3, 0xDE - b _0804856E -_0804846C: - movs r3, 0xDD - b _0804856E -_08048470: - movs r3, 0xDA - b _0804856E -_08048474: - movs r3, 0x99 - b _0804856E -_08048478: - ldr r4, =gLastUsedItem - ldr r2, =gBattleMons - ldr r3, =gBankTarget - ldrb r1, [r3] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r0, [r0, 0x2E] - strh r0, [r4] - ldr r1, =gStringBank - ldrb r0, [r3] - strb r0, [r1] - movs r0, 0x3F - ands r0, r5 - strb r0, [r6] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB816 - b _0804857E - .pool -_080484B8: - adds r2, r6, 0 - ldrb r5, [r2] - movs r0, 0x8 - ands r0, r5 - cmp r0, 0 - beq _080484C8 -_080484C4: - movs r3, 0x1B - b _0804856E -_080484C8: - movs r0, 0x10 - ands r0, r5 - cmp r0, 0 - beq _080484F0 - movs r0, 0xEF - ands r0, r5 - movs r1, 0xFD - ands r0, r1 - movs r1, 0xFB - ands r0, r1 - strb r0, [r2] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB1CE - b _0804857E - .pool -_080484F0: - movs r0, 0x40 - ands r0, r5 - cmp r0, 0 - beq _08048510 - movs r0, 0x3F - ands r0, r5 - strb r0, [r2] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB1C7 - b _0804857E - .pool -_08048510: - movs r0, 0x80 - ands r0, r5 - cmp r0, 0 - beq _08048558 - ldr r4, =gLastUsedItem - ldr r2, =gBattleMons - ldr r3, =gBankTarget - ldrb r1, [r3] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r0, [r0, 0x2E] - strh r0, [r4] - ldr r1, =gStringBank - ldrb r0, [r3] - strb r0, [r1] - movs r0, 0x3F - ands r0, r5 - strb r0, [r6] - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB816 - b _0804857E - .pool -_08048558: - movs r0, 0x20 - ands r0, r5 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - beq _08048568 -_08048564: - movs r3, 0xE5 - b _0804856E -_08048568: - strb r0, [r7, 0x7] -_0804856A: - cmp r3, 0 - beq _08048578 -_0804856E: - adds r0, r3, 0 - ldr r1, =gBankAttacker - ldrb r1, [r1] - bl PrepareStringBattle -_08048578: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 -_0804857E: - str r0, [r1] -_08048580: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk0F_resultmessage - - thumb_func_start atk10_printstring -atk10_printstring: @ 8048590 - push {r4,lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _080485BA - ldr r4, =gBattlescriptCurrInstr - ldr r1, [r4] - ldrb r0, [r1, 0x1] - ldrb r1, [r1, 0x2] - lsls r1, 8 - orrs r0, r1 - ldr r1, =gBankAttacker - ldrb r1, [r1] - bl PrepareStringBattle - ldr r0, [r4] - adds r0, 0x3 - str r0, [r4] - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x7] -_080485BA: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk10_printstring - - thumb_func_start atk11_printstring_playeronly -atk11_printstring_playeronly: @ 80485D0 - push {r4,r5,lr} - ldr r5, =gActiveBank - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r5] - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r1, [r0, 0x1] - ldrb r0, [r0, 0x2] - lsls r0, 8 - orrs r1, r0 - movs r0, 0 - bl dp01_build_cmdbuf_x11_TODO - ldrb r0, [r5] - bl MarkBufferBankForExecution - ldr r0, [r4] - adds r0, 0x3 - str r0, [r4] - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x7] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk11_printstring_playeronly - - thumb_func_start atk12_waitmessage -atk12_waitmessage: @ 8048614 - push {r4-r6,lr} - ldr r0, =gBattleExecBuffer - ldr r4, [r0] - cmp r4, 0 - bne _08048662 - ldr r6, =gBattleCommunication - ldrb r0, [r6, 0x7] - cmp r0, 0 - bne _0804863C - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x3 - str r0, [r1] - b _08048662 - .pool -_0804863C: - ldr r5, =gBattlescriptCurrInstr - ldr r2, [r5] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldr r3, =gUnknown_0202432C - ldrh r0, [r3] - adds r0, 0x1 - strh r0, [r3] - lsls r0, 16 - lsrs r0, 16 - cmp r0, r1 - bcc _08048662 - movs r1, 0 - strh r4, [r3] - adds r0, r2, 0x3 - str r0, [r5] - strb r1, [r6, 0x7] -_08048662: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atk12_waitmessage - - thumb_func_start atk13_printfromtable -atk13_printfromtable: @ 8048670 - push {r4,r5,lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _080486AE - ldr r4, =gBattlescriptCurrInstr - ldr r2, [r4] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - ldr r5, =gBattleCommunication - ldrb r0, [r5, 0x5] - lsls r0, 1 - adds r1, r0 - ldrh r0, [r1] - ldr r1, =gBankAttacker - ldrb r1, [r1] - bl PrepareStringBattle - ldr r0, [r4] - adds r0, 0x5 - str r0, [r4] - movs r0, 0x1 - strb r0, [r5, 0x7] -_080486AE: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk13_printfromtable - - thumb_func_start atk14_printfromtable_playeronly -atk14_printfromtable_playeronly: @ 80486C4 - push {r4-r6,lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0804870E - ldr r5, =gBattlescriptCurrInstr - ldr r2, [r5] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - ldr r6, =gBattleCommunication - ldrb r0, [r6, 0x5] - lsls r0, 1 - adds r1, r0 - ldr r4, =gActiveBank - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r4] - ldrh r1, [r1] - movs r0, 0 - bl dp01_build_cmdbuf_x11_TODO - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r0, [r5] - adds r0, 0x5 - str r0, [r5] - movs r0, 0x1 - strb r0, [r6, 0x7] -_0804870E: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atk14_printfromtable_playeronly - - thumb_func_start sub_8048728 -sub_8048728: @ 8048728 - push {r4,lr} - lsls r0, 24 - lsrs r2, r0, 24 - movs r1, 0 - ldr r0, =gNoOfAllBanks - ldrb r3, [r0] - cmp r1, r3 - bge _0804874E - ldr r4, =gTurnOrder - ldrb r0, [r4] - cmp r0, r2 - beq _0804874E -_08048740: - adds r1, 0x1 - cmp r1, r3 - bge _0804874E - adds r0, r1, r4 - ldrb r0, [r0] - cmp r0, r2 - bne _08048740 -_0804874E: - lsls r0, r1, 24 - lsrs r0, 24 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8048728 thumb_func_start SetMoveEffect SetMoveEffect: @ 8048760 @@ -2078,7 +1086,7 @@ _080490F0: .pool _08049114: adds r0, r2, 0 - bl sub_8048728 + bl BankGetTurnOrder ldr r1, =gUnknown_02024082 lsls r0, 24 lsrs r0, 24 @@ -2348,7 +1356,7 @@ _08049362: .pool _08049390: ldr r1, =gBattleMoveDamage - ldr r0, =gUnknown_020241F4 + ldr r0, =gHpDealt ldr r0, [r0] cmp r0, 0 bge _0804939C @@ -2831,7 +1839,7 @@ _08049808: .pool _08049820: ldr r4, =gBattleMoveDamage - ldr r0, =gUnknown_020241F4 + ldr r0, =gHpDealt ldr r0, [r0] movs r1, 0x3 bl __divsi3 @@ -6325,7 +5333,7 @@ atk39_pause: @ 804B5A0 ldrb r0, [r2, 0x2] lsls r0, 8 orrs r1, r0 - ldr r3, =gUnknown_0202432C + ldr r3, =gPauseCounterBattle ldrh r0, [r3] adds r0, 0x1 strh r0, [r3] @@ -10938,7 +9946,7 @@ atk54_effectiveness_sound: @ 804DDD8 lsls r0, 8 orrs r1, r0 movs r0, 0 - bl dp01_build_cmdbuf_x2B_aa_0 + bl EmitEffectivenessSound ldrb r0, [r5] bl MarkBufferBankForExecution ldr r0, [r4] @@ -15935,7 +14943,7 @@ _080509D0: atk88_negativedamage: @ 80509E8 push {lr} ldr r2, =gBattleMoveDamage - ldr r0, =gUnknown_020241F4 + ldr r0, =gHpDealt ldr r0, [r0] lsrs r1, r0, 31 adds r0, r1 diff --git a/asm/rom3.s b/asm/rom3.s index d039db7f2..f6b6f2d03 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -2687,8 +2687,8 @@ _08033C88: .pool thumb_func_end dp01_build_cmdbuf_x10_TODO - thumb_func_start dp01_build_cmdbuf_x11_TODO -dp01_build_cmdbuf_x11_TODO: @ 8033CFC + thumb_func_start EmitPrintStringPlayerOnly +EmitPrintStringPlayerOnly: @ 8033CFC push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -2784,7 +2784,7 @@ _08033D7C: pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x11_TODO + thumb_func_end EmitPrintStringPlayerOnly thumb_func_start dp01_build_cmdbuf_x12_a_bb dp01_build_cmdbuf_x12_a_bb: @ 8033DE4 @@ -3467,8 +3467,8 @@ dp01_build_cmdbuf_x2A_2A_2A_2A: @ 80342B4 .pool thumb_func_end dp01_build_cmdbuf_x2A_2A_2A_2A - thumb_func_start dp01_build_cmdbuf_x2B_aa_0 -dp01_build_cmdbuf_x2B_aa_0: @ 80342D4 + thumb_func_start EmitEffectivenessSound +EmitEffectivenessSound: @ 80342D4 push {r4,lr} lsls r0, 24 lsrs r0, 24 @@ -3489,7 +3489,7 @@ dp01_build_cmdbuf_x2B_aa_0: @ 80342D4 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x2B_aa_0 + thumb_func_end EmitEffectivenessSound thumb_func_start sub_8034300 sub_8034300: @ 8034300 diff --git a/data/battle_message.s b/data/battle_message.s index 93a921b5e..df6380640 100644 --- a/data/battle_message.s +++ b/data/battle_message.s @@ -596,7 +596,7 @@ gUnknown_085CC23E:: @ 85CC23E gUnknown_085CC270:: @ 85CC270 .incbin "baserom.gba", 0x5cc270, 0x5c4 -gUnknown_085CC834:: @ 85CC834 +gMissStringIds:: @ 85CC834 .incbin "baserom.gba", 0x5cc834, 0x14e gUnknown_085CC982:: @ 85CC982 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index aab0de4e3..23ef731d1 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -246,10 +246,10 @@ BattleScript_MagicCoatBounce:: @ 82DB194 BattleScript_SnatchedMove:: @ 82DB1AC .incbin "baserom.gba", 0x2db1ac, 0x1b -gUnknown_082DB1C7:: @ 82DB1C7 +BattleScript_EnduredMsg:: @ 82DB1C7 .incbin "baserom.gba", 0x2db1c7, 0x7 -gUnknown_082DB1CE:: @ 82DB1CE +BattleScript_OneHitKOMsg:: @ 82DB1CE .incbin "baserom.gba", 0x2db1ce, 0x7 gUnknown_082DB1D5:: @ 82DB1D5 @@ -450,7 +450,7 @@ gUnknown_082DB6D9:: @ 82DB6D9 gUnknown_082DB6F0:: @ 82DB6F0 .incbin "baserom.gba", 0x2db6f0, 0xb -gUnknown_082DB6FB:: @ 82DB6FB +BattleScript_SubstituteFade:: @ 82DB6FB .incbin "baserom.gba", 0x2db6fb, 0xb BattleScript_BerryCurePrlzEnd2:: @ 82DB706 @@ -516,7 +516,7 @@ BattleScript_ItemHealHP_Ret:: @ 82DB7F7 gUnknown_082DB812:: @ 82DB812 .incbin "baserom.gba", 0x2db812, 0x4 -gUnknown_082DB816:: @ 82DB816 +BattleScript_HangedOnMsg:: @ 82DB816 .incbin "baserom.gba", 0x2db816, 0xe BattleScript_BerryConfuseHealEnd2:: @ 82DB824 diff --git a/include/battle.h b/include/battle.h index f9615b889..6550a66d3 100644 --- a/include/battle.h +++ b/include/battle.h @@ -729,6 +729,7 @@ u8 IsPokeDisobedient(void); void AI_CalcDmg(u8 bankAtk, u8 bankDef); u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef); u8 AI_TypeCalc(u16 move, u16 species, u8 ability); +u8 BankGetTurnOrder(u8 bank); // rom_80A5C6C u8 GetBankSide(u8 bank); diff --git a/include/battle_controllers.h b/include/battle_controllers.h index 5723cf9da..b23649192 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -5,6 +5,8 @@ void EmitSetAttributes(u8 bufferId, u8 request, u8 c, u8 bytes, void *data); void EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 movePower, s32 dmg, u8 friendship, struct DisableStruct* disableStructPtr, u8 multihit); void EmitHealthBarUpdate(u8 bufferId, u16 hpValue); +void EmitEffectivenessSound(u8 bufferId, u16 songId); +void EmitPrintStringPlayerOnly(u8 bufferId, u16 stringId); void MarkBufferBankForExecution(u8 bank); diff --git a/include/songs.h b/include/songs.h index afd26d683..028c163d6 100644 --- a/include/songs.h +++ b/include/songs.h @@ -15,8 +15,8 @@ enum /*0x09*/ SE_KAIDAN, /*0x0A*/ SE_DANSA, /*0x0B*/ SE_JITENSYA, - /*0x0C*/ SE_KOUKA_L, - /*0x0D*/ SE_KOUKA_M, + /*0x0C*/ SE_KOUKA_L, // Goggle told me Kouka means 'effectiveness' which makes sense, because + /*0x0D*/ SE_KOUKA_M, // those three sounds play whenever you use a move /*0x0E*/ SE_KOUKA_H, /*0x0F*/ SE_BOWA2, /*0x10*/ SE_POKE_DEAD, diff --git a/src/battle_4.c b/src/battle_4.c index be7f712c6..5d867289b 100644 --- a/src/battle_4.c +++ b/src/battle_4.c @@ -14,6 +14,7 @@ #include "rng.h" #include "battle_controllers.h" #include "species.h" +#include "songs.h" // variables @@ -58,7 +59,7 @@ extern u8 gStringBank; extern u16 gDynamicBasePower; extern u16 gLastUsedItem; extern u16 gBattleMovePower; -extern s32 gHP_dealt; +extern s32 gHpDealt; extern s32 gTakenDmg[BATTLE_BANKS_COUNT]; extern u8 gTakenDmgBanks[BATTLE_BANKS_COUNT]; extern u8 gSentPokesToOpponent[2]; @@ -75,7 +76,7 @@ extern u8 gCurrentMoveTurn; extern u8 gBattleBufferB[4][0x200]; extern const struct BattleMove gBattleMoves[]; -extern const u16 gMissStrings[]; +extern const u16 gMissStringIds[]; extern const u8 gTrainerMoney[]; extern const u8 gTypeEffectiveness[]; extern const struct BaseStats gBaseStats[]; @@ -1630,31 +1631,395 @@ void atk0A_waitanimation(void) void atk0B_healthbarupdate(void) { - register s16 healthValue asm("r1"); + if (gBattleExecBuffer) + return; + + if (!(gBattleMoveFlags & MOVESTATUS_NOEFFECT)) + { + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + if (gBattleMons[gActiveBank].status2 & STATUS2_SUBSTITUTE && gDisableStructs[gActiveBank].substituteHP && !(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE)) + { + PrepareStringBattle(0x80, gActiveBank); + } + else + { + s16 healthValue; + + s32 currDmg = gBattleMoveDamage; + s32 maxPossibleDmgValue = 10000; // not present in R/S, ensures that huge damage values don't change sign + + if (currDmg <= maxPossibleDmgValue) + healthValue = currDmg; + else + healthValue = maxPossibleDmgValue; + + EmitHealthBarUpdate(0, healthValue); + MarkBufferBankForExecution(gActiveBank); + + if (GetBankSide(gActiveBank) == SIDE_PLAYER && gBattleMoveDamage > 0) + gBattleResults.unk5_0 = 1; + } + } + + gBattlescriptCurrInstr += 2; +} + +void atk0C_datahpupdate(void) +{ + u32 moveType; if (gBattleExecBuffer) return; - if (gBattleMoveFlags & MOVESTATUS_NOEFFECT) - goto END; - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + if (gBattleStruct->dynamicMoveType == 0) + moveType = gBattleMoves[gCurrentMove].type; + else if (!(gBattleStruct->dynamicMoveType & 0x40)) + moveType = gBattleStruct->dynamicMoveType & 0x3F; + else + moveType = gBattleMoves[gCurrentMove].type; - if (gBattleMons[gActiveBank].status2 & STATUS2_SUBSTITUTE && gDisableStructs[gActiveBank].substituteHP && !(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE)) + if (!(gBattleMoveFlags & MOVESTATUS_NOEFFECT)) { - PrepareStringBattle(0x80, gActiveBank); - goto END; + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + if (gBattleMons[gActiveBank].status2 & STATUS2_SUBSTITUTE && gDisableStructs[gActiveBank].substituteHP && !(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE)) + { + if (gDisableStructs[gActiveBank].substituteHP >= gBattleMoveDamage) + { + if (gSpecialStatuses[gActiveBank].moveturnLostHP == 0) + gSpecialStatuses[gActiveBank].moveturnLostHP = gBattleMoveDamage; + gDisableStructs[gActiveBank].substituteHP -= gBattleMoveDamage; + gHpDealt = gBattleMoveDamage; + } + else + { + if (gSpecialStatuses[gActiveBank].moveturnLostHP == 0) + gSpecialStatuses[gActiveBank].moveturnLostHP = gDisableStructs[gActiveBank].substituteHP; + gHpDealt = gDisableStructs[gActiveBank].substituteHP; + gDisableStructs[gActiveBank].substituteHP = 0; + } + // check substitute fading + if (gDisableStructs[gActiveBank].substituteHP == 0) + { + gBattlescriptCurrInstr += 2; + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_SubstituteFade; + return; + } + } + else + { + gHitMarker &= ~(HITMARKER_IGNORE_SUBSTITUTE); + if (gBattleMoveDamage < 0) // hp goes up + { + gBattleMons[gActiveBank].hp -= gBattleMoveDamage; + if (gBattleMons[gActiveBank].hp > gBattleMons[gActiveBank].maxHP) + gBattleMons[gActiveBank].hp = gBattleMons[gActiveBank].maxHP; + + } + else // hp goes down + { + if (gHitMarker & HITMARKER_x20) + { + gHitMarker &= ~(HITMARKER_x20); + } + else + { + gTakenDmg[gActiveBank] += gBattleMoveDamage; + if (BSScriptRead8(gBattlescriptCurrInstr + 1) == BS_GET_TARGET) + gTakenDmgBanks[gActiveBank] = gBankAttacker; + else + gTakenDmgBanks[gActiveBank] = gBankTarget; + } + + if (gBattleMons[gActiveBank].hp > gBattleMoveDamage) + { + gBattleMons[gActiveBank].hp -= gBattleMoveDamage; + gHpDealt = gBattleMoveDamage; + } + else + { + gHpDealt = gBattleMons[gActiveBank].hp; + gBattleMons[gActiveBank].hp = 0; + } + + if (!gSpecialStatuses[gActiveBank].moveturnLostHP && !(gHitMarker & HITMARKER_x100000)) + gSpecialStatuses[gActiveBank].moveturnLostHP = gHpDealt; + + if (moveType <= 8 && !(gHitMarker & HITMARKER_x100000) && gCurrentMove != MOVE_PAIN_SPLIT) + { + gProtectStructs[gActiveBank].physicalDmg = gHpDealt; + gSpecialStatuses[gActiveBank].moveturnLostHP_physical = gHpDealt; + if (BSScriptRead8(gBattlescriptCurrInstr + 1) == BS_GET_TARGET) + { + gProtectStructs[gActiveBank].physicalBank = gBankAttacker; + gSpecialStatuses[gActiveBank].moveturnPhysicalBank = gBankAttacker; + } + else + { + gProtectStructs[gActiveBank].physicalBank = gBankTarget; + gSpecialStatuses[gActiveBank].moveturnPhysicalBank = gBankTarget; + } + } + else if (moveType > 8 && !(gHitMarker & HITMARKER_x100000)) + { + gProtectStructs[gActiveBank].specialDmg = gHpDealt; + gSpecialStatuses[gActiveBank].moveturnLostHP_special = gHpDealt; + if (BSScriptRead8(gBattlescriptCurrInstr + 1) == BS_GET_TARGET) + { + gProtectStructs[gActiveBank].specialBank = gBankAttacker; + gSpecialStatuses[gActiveBank].moveturnSpecialBank = gBankAttacker; + } + else + { + gProtectStructs[gActiveBank].specialBank = gBankTarget; + gSpecialStatuses[gActiveBank].moveturnSpecialBank = gBankTarget; + } + } + } + gHitMarker &= ~(HITMARKER_x100000); + EmitSetAttributes(0, REQUEST_HP_BATTLE, 0, 2, &gBattleMons[gActiveBank].hp); + MarkBufferBankForExecution(gActiveBank); + } + } + else + { + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + if (gSpecialStatuses[gActiveBank].moveturnLostHP == 0) + gSpecialStatuses[gActiveBank].moveturnLostHP = 0xFFFF; + } + gBattlescriptCurrInstr += 2; +} + +void atk0D_critmessage(void) +{ + if (gBattleExecBuffer == 0) + { + if (gCritMultiplier == 2 && !(gBattleMoveFlags & MOVESTATUS_NOEFFECT)) + { + PrepareStringBattle(0xD9, gBankAttacker); + gBattleCommunication[MSG_DISPLAY] = 1; + } + gBattlescriptCurrInstr++; + } +} + +void atk0E_effectiveness_sound(void) +{ + if (gBattleExecBuffer) + return; + + gActiveBank = gBankTarget; + if (!(gBattleMoveFlags & MOVESTATUS_MISSED)) + { + switch (gBattleMoveFlags & (u8)(~(MOVESTATUS_MISSED))) + { + case MOVESTATUS_SUPEREFFECTIVE: + EmitEffectivenessSound(0, SE_KOUKA_H); + MarkBufferBankForExecution(gActiveBank); + break; + case MOVESTATUS_NOTVERYEFFECTIVE: + EmitEffectivenessSound(0, SE_KOUKA_L); + MarkBufferBankForExecution(gActiveBank); + break; + case MOVESTATUS_NOTAFFECTED: + case MOVESTATUS_FAILED: + // no sound + break; + case MOVESTATUS_ENDURED: + case MOVESTATUS_ONEHITKO: + case MOVESTATUS_HUNGON: + default: + if (gBattleMoveFlags & MOVESTATUS_SUPEREFFECTIVE) + { + EmitEffectivenessSound(0, SE_KOUKA_H); + MarkBufferBankForExecution(gActiveBank); + } + else if (gBattleMoveFlags & MOVESTATUS_NOTVERYEFFECTIVE) + { + EmitEffectivenessSound(0, SE_KOUKA_L); + MarkBufferBankForExecution(gActiveBank); + } + else if (!(gBattleMoveFlags & (MOVESTATUS_NOTAFFECTED | MOVESTATUS_FAILED))) + { + EmitEffectivenessSound(0, SE_KOUKA_M); + MarkBufferBankForExecution(gActiveBank); + } + break; + } + } + gBattlescriptCurrInstr++; +} + +void atk0F_resultmessage(void) +{ + u32 stringId = 0; + + if (gBattleExecBuffer) + return; + + if (gBattleMoveFlags & MOVESTATUS_MISSED && (!(gBattleMoveFlags & MOVESTATUS_NOTAFFECTED) || gBattleCommunication[6] > 2)) + { + stringId = gMissStringIds[gBattleCommunication[6]]; + gBattleCommunication[MSG_DISPLAY] = 1; + } + else + { + gBattleCommunication[MSG_DISPLAY] = 1; + switch (gBattleMoveFlags & (u8)(~(MOVESTATUS_MISSED))) + { + case MOVESTATUS_SUPEREFFECTIVE: + stringId = 0xDE; + break; + case MOVESTATUS_NOTVERYEFFECTIVE: + stringId = 0xDD; + break; + case MOVESTATUS_ONEHITKO: + stringId = 0xDA; + break; + case MOVESTATUS_ENDURED: + stringId = 0x99; + break; + case MOVESTATUS_FAILED: + stringId = 0xE5; + break; + case MOVESTATUS_NOTAFFECTED: + stringId = 0x1B; + break; + case MOVESTATUS_HUNGON: + gLastUsedItem = gBattleMons[gBankTarget].item; + gStringBank = gBankTarget; + gBattleMoveFlags &= ~(MOVESTATUS_ENDURED | MOVESTATUS_HUNGON); + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_HangedOnMsg; + return; + default: + if (gBattleMoveFlags & MOVESTATUS_NOTAFFECTED) + { + stringId = 0x1B; + } + else if (gBattleMoveFlags & MOVESTATUS_ONEHITKO) + { + gBattleMoveFlags &= ~(MOVESTATUS_ONEHITKO); + gBattleMoveFlags &= ~(MOVESTATUS_SUPEREFFECTIVE); + gBattleMoveFlags &= ~(MOVESTATUS_NOTVERYEFFECTIVE); + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_OneHitKOMsg; + return; + } + else if (gBattleMoveFlags & MOVESTATUS_ENDURED) + { + gBattleMoveFlags &= ~(MOVESTATUS_ENDURED | MOVESTATUS_HUNGON); + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_EnduredMsg; + return; + } + else if (gBattleMoveFlags & MOVESTATUS_HUNGON) + { + gLastUsedItem = gBattleMons[gBankTarget].item; + gStringBank = gBankTarget; + gBattleMoveFlags &= ~(MOVESTATUS_ENDURED | MOVESTATUS_HUNGON); + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_HangedOnMsg; + return; + } + else if (gBattleMoveFlags & MOVESTATUS_FAILED) + { + stringId = 0xE5; + } + else + { + gBattleCommunication[MSG_DISPLAY] = 0; + } + } } - healthValue = 10000; - if (healthValue <= gBattleMoveDamage) - healthValue = gBattleMoveDamage; + if (stringId) + PrepareStringBattle(stringId, gBankAttacker); - EmitHealthBarUpdate(0, healthValue); + gBattlescriptCurrInstr++; +} + +void atk10_printstring(void) +{ + if (gBattleExecBuffer == 0) + { + u16 var = BS2ScriptRead16(gBattlescriptCurrInstr + 1); + PrepareStringBattle(var, gBankAttacker); + gBattlescriptCurrInstr += 3; + gBattleCommunication[MSG_DISPLAY] = 1; + } +} + +void atk11_printstring_playeronly(void) +{ + gActiveBank = gBankAttacker; + + EmitPrintStringPlayerOnly(0, BS2ScriptRead16(gBattlescriptCurrInstr + 1)); MarkBufferBankForExecution(gActiveBank); - if (GetBankSide(gActiveBank) == SIDE_PLAYER && gBattleMoveDamage > 0) - gBattleResults.unk5_0 = 1; - - END: - gBattlescriptCurrInstr += 2; + gBattlescriptCurrInstr += 3; + gBattleCommunication[MSG_DISPLAY] = 1; +} + +void atk12_waitmessage(void) +{ + if (gBattleExecBuffer == 0) + { + if (!gBattleCommunication[MSG_DISPLAY]) + { + gBattlescriptCurrInstr += 3; + } + else + { + u16 toWait = BS2ScriptRead16(gBattlescriptCurrInstr + 1); + if (++gPauseCounterBattle >= toWait) + { + gPauseCounterBattle = 0; + gBattlescriptCurrInstr += 3; + gBattleCommunication[MSG_DISPLAY] = 0; + } + } + } +} + +void atk13_printfromtable(void) +{ + if (gBattleExecBuffer == 0) + { + u16 *ptr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + ptr += gBattleCommunication[MULTISTRING_CHOOSER]; + + PrepareStringBattle(*(u16*)ptr, gBankAttacker); + + gBattlescriptCurrInstr += 5; + gBattleCommunication[MSG_DISPLAY] = 1; + } +} + +void atk14_printfromtable_playeronly(void) +{ + if (gBattleExecBuffer == 0) + { + u16 *ptr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + ptr += gBattleCommunication[MULTISTRING_CHOOSER]; + + gActiveBank = gBankAttacker; + EmitPrintStringPlayerOnly(0, *(u16*)ptr); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 5; + gBattleCommunication[MSG_DISPLAY] = 1; + } +} + +u8 BankGetTurnOrder(u8 bank) +{ + s32 i; + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gTurnOrder[i] == bank) + break; + } + return i; } diff --git a/sym_ewram.txt b/sym_ewram.txt index 8eb395b0f..fe6ccdcbd 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -343,7 +343,7 @@ gRandomMove: @ 20241EE gBattleMoveDamage: @ 20241F0 .space 0x4 -gUnknown_020241F4: @ 20241F4 +gHpDealt: @ 20241F4 .space 0x4 gTakenDmg: @ 20241F8 @@ -442,7 +442,7 @@ gStatuses3: @ 20242AC gDisableStructs: @ 20242BC .space 0x70 -gUnknown_0202432C: @ 202432C +gPauseCounterBattle: @ 202432C .space 0x2 gUnknown_0202432E: @ 202432E From 0b81c2920aa87aae3403efdf60e40b58445efbbf Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 20 Sep 2017 10:45:00 -0400 Subject: [PATCH 248/342] sub_818E1F4 --- asm/lilycove_lady.s | 126 ------------------------------------ include/global.h | 8 +-- src/lilycove_lady.c | 152 +++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 146 insertions(+), 140 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 0f66eae84..bb044a01e 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,132 +5,6 @@ .text - thumb_func_start sub_818E13C -sub_818E13C: @ 818E13C - push {r4-r7,lr} - movs r7, 0x1 - ldr r5, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r1, [r0] - ldr r2, =0x00003b58 - adds r0, r1, r2 - str r0, [r5] - ldrb r0, [r0, 0x18] - cmp r0, 0xFF - bne _0818E174 - ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EEB7E - bl StringCopy7 - movs r7, 0 - b _0818E1DC - .pool -_0818E174: - ldr r4, =gStringVar1 - ldr r0, =0x00003b70 - adds r1, r0 - adds r0, r4, 0 - bl StringCopy7 - ldr r0, [r5] - adds r0, 0x2D - ldrb r1, [r0] - adds r0, r4, 0 - bl ConvertInternationalString - ldr r0, [r5] - adds r0, 0x18 - bl sub_818E258 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r6, =gSaveBlock2Ptr - ldr r0, [r6] - bl sub_818E258 - lsls r0, 24 - lsrs r0, 24 - cmp r4, r0 - bne _0818E1DC - ldr r0, [r5] - movs r2, 0 - cmp r2, r4 - bcs _0818E1DC - ldr r1, [r6] - ldrb r0, [r0, 0x18] - ldrb r1, [r1] - cmp r0, r1 - bne _0818E1DA -_0818E1BA: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, r4 - bcs _0818E1DC - ldr r0, =gUnknown_0203CD68 - ldr r1, [r0] - adds r1, 0x18 - adds r1, r2 - ldr r0, =gSaveBlock2Ptr - ldr r0, [r0] - adds r0, r2 - ldrb r1, [r1] - ldrb r0, [r0] - cmp r1, r0 - beq _0818E1BA -_0818E1DA: - movs r7, 0x2 -_0818E1DC: - adds r0, r7, 0 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_818E13C - - thumb_func_start sub_818E1F4 -sub_818E1F4: @ 818E1F4 - push {r4-r6,lr} - ldr r3, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r1, [r0] - ldr r2, =0x00003b58 - adds r0, r1, r2 - str r0, [r3] - movs r5, 0 - movs r4, 0 - ldr r0, =0x00003b78 - adds r1, r0 - ldr r0, =gSaveBlock2Ptr - ldr r2, [r0] - ldrh r1, [r1] - adds r6, r3, 0 - adds r3, r0, 0 - ldrb r2, [r2, 0xA] - cmp r1, r2 - bne _0818E23A -_0818E21A: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x3 - bhi _0818E23C - ldr r1, [r6] - lsls r0, r4, 1 - adds r1, 0x20 - adds r1, r0 - ldr r0, [r3] - adds r0, 0xA - adds r0, r4 - ldrh r1, [r1] - ldrb r0, [r0] - cmp r1, r0 - beq _0818E21A -_0818E23A: - movs r5, 0x1 -_0818E23C: - adds r0, r5, 0 - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end sub_818E1F4 - thumb_func_start sub_818E258 sub_818E258: @ 818E258 push {lr} diff --git a/include/global.h b/include/global.h index 84c70a16e..569345355 100644 --- a/include/global.h +++ b/include/global.h @@ -674,9 +674,8 @@ struct LilycoveLadyQuiz /*0x002*/ u16 unk_002[9]; /*0x014*/ u16 unk_014; /*0x016*/ u16 unk_016; - /*0x018*/ u8 unk_018; - /*0x019*/ u8 filler_019[7]; - /*0x020*/ u16 unk_020[4]; + /*0x018*/ u8 playerName[8]; + /*0x020*/ u16 playerTrainerId[4]; /*0x028*/ u16 unk_028; /*0x02a*/ u8 unk_02a; /*0x02b*/ u8 unk_02b; @@ -690,9 +689,8 @@ struct LilycoveLadyFavour /*0x001*/ u8 unk_001; /*0x002*/ u8 unk_002; /*0x003*/ u8 unk_003; - /*0x004*/ u8 unk_004[8]; + /*0x004*/ u8 playerName[8]; /*0x00c*/ u8 unk_00c; - /*0x00d*/ u8 filler_00d; /*0x00e*/ u16 itemId; /*0x010*/ u16 unk_010; /*0x012*/ u8 language; diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 93c3cce67..196867369 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -23,6 +23,7 @@ void sub_818E674(void); bool32 sub_811F8D8(u16); u8 sub_818E13C(void); bool8 sub_818E1F4(void); +u8 sub_818E258(const u8 *); extern const u16 gUnknown_0860B074[5]; extern const u16 gUnknown_0860B07E[3]; @@ -32,6 +33,7 @@ extern const u16 gUnknown_0860B304[6]; extern const u16 *const gUnknown_0860B1A4[16]; extern const u16 gUnknown_0860B1E4[16]; extern const u16 gUnknown_0860B204[16]; +extern const u8 gUnknown_085EEB7E[8]; EWRAM_DATA struct LilycoveLadyFavour *gUnknown_0203CD64 = NULL; EWRAM_DATA struct LilycoveLadyQuiz *gUnknown_0203CD68 = NULL; @@ -144,7 +146,7 @@ void SetLilycoveFavourLady(void) gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; gUnknown_0203CD64->id = LILYCOVE_LADY_FAVOUR; gUnknown_0203CD64->unk_001 = 0; - gUnknown_0203CD64->unk_004[0] = EOS; + gUnknown_0203CD64->playerName[0] = EOS; gUnknown_0203CD64->unk_002 = 0; gUnknown_0203CD64->unk_003= 0; gUnknown_0203CD64->itemId = ITEM_NONE; @@ -190,9 +192,9 @@ void sub_818DC2C(void) bool8 sub_818DC60(void) { gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; - if (gUnknown_0203CD64->unk_004[0] != EOS) + if (gUnknown_0203CD64->playerName[0] != EOS) { - StringCopy7(gStringVar3, gUnknown_0203CD64->unk_004); + StringCopy7(gStringVar3, gUnknown_0203CD64->playerName); ConvertInternationalString(gStringVar3, gUnknown_0203CD64->language); return TRUE; } @@ -219,7 +221,7 @@ void sub_818DCF4(const u8 *src, u8 *dest) void sub_818DD14(void) { gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; - sub_818DCF4(gUnknown_0203CD64->unk_004, gStringVar3); + sub_818DCF4(gUnknown_0203CD64->playerName, gStringVar3); ConvertInternationalString(gStringVar3, gUnknown_0203CD64->language); } @@ -245,7 +247,7 @@ bool8 sub_818DD84(u16 itemId) gUnknown_0203CD64->unk_001 = 1; sub_818DCAC(gStringVar2, itemId); gUnknown_0203CD64->itemId = itemId; - sub_818DCF4(gSaveBlock2Ptr->playerName, gUnknown_0203CD64->unk_004); + sub_818DCF4(gSaveBlock2Ptr->playerName, gUnknown_0203CD64->playerName); gUnknown_0203CD64->language = gGameLanguage; response = FALSE; for (i = 0; i < len; i ++) @@ -311,7 +313,7 @@ void sub_818DF00(void) { u8 v0; u8 i; - + v0 = Random() % 16; for (i = 0; i < 9; i ++) { @@ -320,7 +322,7 @@ void sub_818DF00(void) gUnknown_0203CD68->unk_014 = gUnknown_0860B1E4[v0]; gUnknown_0203CD68->unk_028 = gUnknown_0860B204[v0]; gUnknown_0203CD68->unk_02b = v0; - gUnknown_0203CD68->unk_018 = 0xFF; + gUnknown_0203CD68->playerName[0] = EOS; } void SetLilycoveQuizLady(void) @@ -338,7 +340,7 @@ void SetLilycoveQuizLady(void) gUnknown_0203CD68->unk_016 = -1; for (i = 0; i < 4; i ++) { - gUnknown_0203CD68->unk_020[i] = 0; + gUnknown_0203CD68->playerTrainerId[i] = 0; } gUnknown_0203CD68->unk_028 = 0; gUnknown_0203CD68->unk_02a = 0; @@ -398,7 +400,7 @@ u8 sub_818E06C(void) quiz->unk_014 = gUnknown_0860B1E4[i]; quiz->unk_028 = gUnknown_0860B204[i]; quiz->unk_02b = i; - quiz->unk_018 = 0xFF; + quiz->playerName[0] = EOS; } rv = sub_818E13C(); if (rv == 0) @@ -414,3 +416,135 @@ u8 sub_818E06C(void) return 0; } } + +#ifdef NONMATCHING +u8 sub_818E13C(void) +{ + u8 retval; + u8 len; + u8 i; + + retval = 1; + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + if (gUnknown_0203CD68->playerName[0] == EOS) + { + StringCopy7(gStringVar1, gUnknown_085EEB7E); + retval = 0; + } + else + { + StringCopy7(gStringVar1, gUnknown_0203CD68->playerName); + ConvertInternationalString(gStringVar1, gUnknown_0203CD68->language); + len = sub_818E258(gUnknown_0203CD68->playerName); + if (len == sub_818E258(gSaveBlock2Ptr->playerName)) + { + for (i = 0; i < len; i ++) + { + if (gUnknown_0203CD68->playerName[i] != gSaveBlock2Ptr->playerName[i]) + { + retval = 2; + break; + } + } + } + + } + return retval; +} +#else +__attribute__((naked)) u8 sub_818E13C(void) +{ + asm_unified("\tpush {r4-r7,lr}\n" + "\tmovs r7, 0x1\n" + "\tldr r5, =gUnknown_0203CD68\n" + "\tldr r0, =gSaveBlock1Ptr\n" + "\tldr r1, [r0]\n" + "\tldr r2, =0x00003b58\n" + "\tadds r0, r1, r2\n" + "\tstr r0, [r5]\n" + "\tldrb r0, [r0, 0x18]\n" + "\tcmp r0, 0xFF\n" + "\tbne _0818E174\n" + "\tldr r0, =gStringVar1\n" + "\tldr r1, =gUnknown_085EEB7E\n" + "\tbl StringCopy7\n" + "\tmovs r7, 0\n" + "\tb _0818E1DC\n" + "\t.pool\n" + "_0818E174:\n" + "\tldr r4, =gStringVar1\n" + "\tldr r0, =0x00003b70\n" + "\tadds r1, r0\n" + "\tadds r0, r4, 0\n" + "\tbl StringCopy7\n" + "\tldr r0, [r5]\n" + "\tadds r0, 0x2D\n" + "\tldrb r1, [r0]\n" + "\tadds r0, r4, 0\n" + "\tbl ConvertInternationalString\n" + "\tldr r0, [r5]\n" + "\tadds r0, 0x18\n" + "\tbl sub_818E258\n" + "\tlsls r0, 24\n" + "\tlsrs r4, r0, 24\n" + "\tldr r6, =gSaveBlock2Ptr\n" + "\tldr r0, [r6]\n" + "\tbl sub_818E258\n" + "\tlsls r0, 24\n" + "\tlsrs r0, 24\n" + "\tcmp r4, r0\n" + "\tbne _0818E1DC\n" + "\tldr r0, [r5]\n" + "\tmovs r2, 0\n" + "\tcmp r2, r4\n" + "\tbcs _0818E1DC\n" + "\tldr r1, [r6]\n" + "\tldrb r0, [r0, 0x18]\n" + "\tldrb r1, [r1]\n" + "\tcmp r0, r1\n" + "\tbne _0818E1DA\n" + "_0818E1BA:\n" + "\tadds r0, r2, 0x1\n" + "\tlsls r0, 24\n" + "\tlsrs r2, r0, 24\n" + "\tcmp r2, r4\n" + "\tbcs _0818E1DC\n" + "\tldr r0, =gUnknown_0203CD68\n" + "\tldr r1, [r0]\n" + "\tadds r1, 0x18\n" + "\tadds r1, r2\n" + "\tldr r0, =gSaveBlock2Ptr\n" + "\tldr r0, [r0]\n" + "\tadds r0, r2\n" + "\tldrb r1, [r1]\n" + "\tldrb r0, [r0]\n" + "\tcmp r1, r0\n" + "\tbeq _0818E1BA\n" + "_0818E1DA:\n" + "\tmovs r7, 0x2\n" + "_0818E1DC:\n" + "\tadds r0, r7, 0\n" + "\tpop {r4-r7}\n" + "\tpop {r1}\n" + "\tbx r1\n" + "\t.pool"); +} +#endif + +u8 sub_818E1F4(void) +{ + u8 response; + u8 i; + + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + response = 0; + for (i = 0; i < 4; i ++) + { + if (gUnknown_0203CD68->playerTrainerId[i] != gSaveBlock2Ptr->playerTrainerId[i]) + { + response = 1; + break; + } + } + return response; +} From 0895d8d861ca7db6d8fa2910f6275eb6b615340e Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 20 Sep 2017 11:25:46 -0400 Subject: [PATCH 249/342] sub_818E258 --- asm/lilycove_lady.s | 20 -------------------- src/lilycove_lady.c | 9 +++++++++ 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index bb044a01e..1580d9595 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,26 +5,6 @@ .text - thumb_func_start sub_818E258 -sub_818E258: @ 818E258 - push {lr} - movs r2, 0 - adds r1, r0, 0 - b _0818E268 -_0818E260: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - adds r1, 0x1 -_0818E268: - ldrb r0, [r1] - cmp r0, 0xFF - bne _0818E260 - adds r0, r2, 0 - pop {r1} - bx r1 - thumb_func_end sub_818E258 - thumb_func_start sub_818E274 sub_818E274: @ 818E274 push {r4,lr} diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 196867369..564b089a6 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -548,3 +548,12 @@ u8 sub_818E1F4(void) } return response; } + +u8 sub_818E258(const u8 *str) +{ + u8 len; + const u8 *ptr; + + for (len = 0, ptr = str; *ptr != EOS; len ++, ptr ++); + return len; +} From 8a31e58689af6e62c8c272c24397310c2a44f6f5 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 20 Sep 2017 11:30:09 -0400 Subject: [PATCH 250/342] sub_818E298 --- asm/lilycove_lady.s | 47 --------------------------------------------- include/global.h | 2 +- src/lilycove_lady.c | 28 +++++++++++++++++++++------ 3 files changed, 23 insertions(+), 54 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 1580d9595..65cc3b41a 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,53 +5,6 @@ .text - thumb_func_start sub_818E274 -sub_818E274: @ 818E274 - push {r4,lr} - ldr r4, =gStringVar1 - ldr r0, =gUnknown_0203CD68 - ldr r0, [r0] - ldrh r0, [r0, 0x28] - bl ItemId_GetItem - adds r1, r0, 0 - adds r0, r4, 0 - bl StringCopy - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E274 - - thumb_func_start sub_818E298 -sub_818E298: @ 818E298 - push {r4,lr} - ldr r4, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - str r0, [r4] - bl sub_818E13C - lsls r0, 24 - cmp r0, 0 - beq _0818E2C0 - movs r0, 0 - b _0818E2CC - .pool -_0818E2C0: - ldr r0, [r4] - ldr r1, =gGameLanguage - ldrb r1, [r1] - adds r0, 0x2D - strb r1, [r0] - movs r0, 0x1 -_0818E2CC: - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_818E298 - thumb_func_start sub_818E2D8 sub_818E2D8: @ 818E2D8 ldr r2, =gUnknown_0203CD68 diff --git a/include/global.h b/include/global.h index 569345355..09dabf822 100644 --- a/include/global.h +++ b/include/global.h @@ -676,7 +676,7 @@ struct LilycoveLadyQuiz /*0x016*/ u16 unk_016; /*0x018*/ u8 playerName[8]; /*0x020*/ u16 playerTrainerId[4]; - /*0x028*/ u16 unk_028; + /*0x028*/ u16 itemId; /*0x02a*/ u8 unk_02a; /*0x02b*/ u8 unk_02b; /*0x02c*/ u8 unk_02c; diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 564b089a6..976ed4d88 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -320,7 +320,7 @@ void sub_818DF00(void) gUnknown_0203CD68->unk_002[i] = gUnknown_0860B1A4[v0][i]; } gUnknown_0203CD68->unk_014 = gUnknown_0860B1E4[v0]; - gUnknown_0203CD68->unk_028 = gUnknown_0860B204[v0]; + gUnknown_0203CD68->itemId = gUnknown_0860B204[v0]; gUnknown_0203CD68->unk_02b = v0; gUnknown_0203CD68->playerName[0] = EOS; } @@ -342,7 +342,7 @@ void SetLilycoveQuizLady(void) { gUnknown_0203CD68->playerTrainerId[i] = 0; } - gUnknown_0203CD68->unk_028 = 0; + gUnknown_0203CD68->itemId = ITEM_NONE; gUnknown_0203CD68->unk_02a = 0; gUnknown_0203CD68->unk_02c = 0x10; gUnknown_0203CD68->language = gGameLanguage; @@ -398,7 +398,7 @@ u8 sub_818E06C(void) quiz->unk_002[j] = gUnknown_0860B1A4[i][j]; } quiz->unk_014 = gUnknown_0860B1E4[i]; - quiz->unk_028 = gUnknown_0860B204[i]; + quiz->itemId = gUnknown_0860B204[i]; quiz->unk_02b = i; quiz->playerName[0] = EOS; } @@ -533,16 +533,16 @@ __attribute__((naked)) u8 sub_818E13C(void) u8 sub_818E1F4(void) { - u8 response; + bool8 response; u8 i; gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; - response = 0; + response = FALSE; for (i = 0; i < 4; i ++) { if (gUnknown_0203CD68->playerTrainerId[i] != gSaveBlock2Ptr->playerTrainerId[i]) { - response = 1; + response = TRUE; break; } } @@ -557,3 +557,19 @@ u8 sub_818E258(const u8 *str) for (len = 0, ptr = str; *ptr != EOS; len ++, ptr ++); return len; } + +void sub_818E274(void) +{ + StringCopy(gStringVar1, ItemId_GetItem(gUnknown_0203CD68->itemId)->name); +} + +bool8 sub_818E298(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + if (!sub_818E13C()) + { + gUnknown_0203CD68->language = gGameLanguage; + return TRUE; + } + return FALSE; +} From 213fef604247d31f6981bd83c703bb1d3e1bbd31 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 20 Sep 2017 11:44:20 -0400 Subject: [PATCH 251/342] through sub_818E308 --- asm/lilycove_lady.s | 56 --------------------------------------------- include/easy_chat.h | 2 ++ src/lilycove_lady.c | 20 ++++++++++++++++ 3 files changed, 22 insertions(+), 56 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 65cc3b41a..0c46932cf 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,62 +5,6 @@ .text - thumb_func_start sub_818E2D8 -sub_818E2D8: @ 818E2D8 - ldr r2, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r3, =0x00003b58 - adds r1, r0, r3 - str r1, [r2] - ldr r1, =0x00003b82 - adds r0, r1 - ldrb r0, [r0] - bx lr - .pool - thumb_func_end sub_818E2D8 - - thumb_func_start sub_818E2FC -sub_818E2FC: @ 818E2FC - push {lr} - bl easy_chat_input_maybe - pop {r0} - bx r0 - thumb_func_end sub_818E2FC - - thumb_func_start sub_818E308 -sub_818E308: @ 818E308 - push {r4-r6,lr} - ldr r5, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - str r0, [r5] - ldr r6, =gStringVar1 - ldrh r1, [r0, 0x14] - adds r0, r6, 0 - bl CopyEasyChatWord - ldr r4, =gStringVar2 - ldr r0, [r5] - ldrh r1, [r0, 0x16] - adds r0, r4, 0 - bl CopyEasyChatWord - adds r0, r6, 0 - adds r1, r4, 0 - bl StringCompare - movs r1, 0 - cmp r0, 0 - bne _0818E33C - movs r1, 0x1 -_0818E33C: - adds r0, r1, 0 - pop {r4-r6} - pop {r1} - bx r1 - .pool - thumb_func_end sub_818E308 - thumb_func_start sub_818E358 sub_818E358: @ 818E358 ldr r1, =gUnknown_0203CD68 diff --git a/include/easy_chat.h b/include/easy_chat.h index 5143aa39c..d7dc72410 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -29,5 +29,7 @@ enum }; void InitEasyChatPhrases(void); +void easy_chat_input_maybe(void); +void CopyEasyChatWord(u8 *, u16); #endif // GUARD_EASYCHAT_H diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 976ed4d88..485a0c9d4 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -12,6 +12,7 @@ #include "items.h" #include "item_menu.h" #include "text.h" +#include "easy_chat.h" #include "lilycove_lady.h" void SetLilycoveQuizLady(void); @@ -573,3 +574,22 @@ bool8 sub_818E298(void) } return FALSE; } + +u8 sub_818E2D8(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + return gUnknown_0203CD68->unk_02a; +} + +void sub_818E2FC(void) +{ + easy_chat_input_maybe(); +} + +bool8 sub_818E308(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + CopyEasyChatWord(gStringVar1, gUnknown_0203CD68->unk_014); + CopyEasyChatWord(gStringVar2, gUnknown_0203CD68->unk_016); + return StringCompare(gStringVar1, gStringVar2) ? FALSE : TRUE; +} From fdea92edffb4360db50cb0e7dcc044dc7242defe Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 20 Sep 2017 11:48:11 -0400 Subject: [PATCH 252/342] through sub_818E3E0 --- asm/lilycove_lady.s | 65 --------------------------------------------- include/item_menu.h | 1 + src/lilycove_lady.c | 29 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 65 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 0c46932cf..72b321ef8 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,71 +5,6 @@ .text - thumb_func_start sub_818E358 -sub_818E358: @ 818E358 - ldr r1, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - ldr r1, =gSpecialVar_0x8005 - ldrh r0, [r0, 0x28] - strh r0, [r1] - bx lr - .pool - thumb_func_end sub_818E358 - - thumb_func_start sub_818E37C -sub_818E37C: @ 818E37C - ldr r1, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - movs r1, 0x1 - strb r1, [r0, 0x1] - bx lr - .pool - thumb_func_end sub_818E37C - - thumb_func_start sub_818E39C -sub_818E39C: @ 818E39C - ldr r1, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - movs r1, 0x2 - strb r1, [r0, 0x1] - bx lr - .pool - thumb_func_end sub_818E39C - - thumb_func_start sub_818E3BC -sub_818E3BC: @ 818E3BC - ldr r1, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - ldr r1, =0x0000ffff - strh r1, [r0, 0x16] - bx lr - .pool - thumb_func_end sub_818E3BC - - thumb_func_start sub_818E3E0 -sub_818E3E0: @ 818E3E0 - push {lr} - bl sub_81AAC70 - pop {r0} - bx r0 - thumb_func_end sub_818E3E0 - thumb_func_start sub_818E3EC sub_818E3EC: @ 818E3EC push {r4,lr} diff --git a/include/item_menu.h b/include/item_menu.h index f402f5cdd..85655e9d5 100644 --- a/include/item_menu.h +++ b/include/item_menu.h @@ -7,5 +7,6 @@ // Exported ROM declarations void sub_81AAC50(void); +void sub_81AAC70(void); #endif //GUARD_item_menu_H diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 485a0c9d4..c4a0b9c11 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -593,3 +593,32 @@ bool8 sub_818E308(void) CopyEasyChatWord(gStringVar2, gUnknown_0203CD68->unk_016); return StringCompare(gStringVar1, gStringVar2) ? FALSE : TRUE; } + +void sub_818E358(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + gSpecialVar_0x8005 = gUnknown_0203CD68->itemId; +} + +void sub_818E37C(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + gUnknown_0203CD68->unk_001 = 1; +} + +void sub_818E39C(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + gUnknown_0203CD68->unk_001 = 2; +} + +void sub_818E3BC(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + gUnknown_0203CD68->unk_016 = -1; +} + +void sub_818E3E0(void) +{ + sub_81AAC70(); +} From 5fb39d5ef9f7c19ecff2b347cf7785ea8fc63ad9 Mon Sep 17 00:00:00 2001 From: scnorton Date: Wed, 20 Sep 2017 12:56:45 -0400 Subject: [PATCH 253/342] sub_818E3EC --- asm/lilycove_lady.s | 32 -------------------------------- src/lilycove_lady.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 32 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 72b321ef8..34b479c8a 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,38 +5,6 @@ .text - thumb_func_start sub_818E3EC -sub_818E3EC: @ 818E3EC - push {r4,lr} - ldr r4, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - str r0, [r4] - bl sub_818E298 - lsls r0, 24 - cmp r0, 0 - beq _0818E41C - ldr r0, [r4] - adds r1, r0, 0 - adds r1, 0x2B - ldrb r1, [r1] - adds r0, 0x2C - b _0818E422 - .pool -_0818E41C: - ldr r0, [r4] - adds r0, 0x2C - movs r1, 0x10 -_0818E422: - strb r1, [r0] - bl sub_818DF00 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_818E3EC - thumb_func_start sub_818E430 sub_818E430: @ 818E430 push {r4,r5,lr} diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index c4a0b9c11..65f6e2e10 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -622,3 +622,17 @@ void sub_818E3E0(void) { sub_81AAC70(); } + +void sub_818E3EC(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + if (sub_818E298()) + { + gUnknown_0203CD68->unk_02c = gUnknown_0203CD68->unk_02b; + } + else + { + gUnknown_0203CD68->unk_02c = 0x10; + } + sub_818DF00(); +} From d22a9acc63b9f7c72e0d7ec81396b799af94e270 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 20 Sep 2017 16:12:18 -0400 Subject: [PATCH 254/342] through sub_818E490 --- asm/lilycove_lady.s | 60 --------------------------------------------- include/global.h | 2 +- src/lilycove_lady.c | 23 +++++++++++++++++ 3 files changed, 24 insertions(+), 61 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 34b479c8a..b50218e48 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,66 +5,6 @@ .text - thumb_func_start sub_818E430 -sub_818E430: @ 818E430 - push {r4,r5,lr} - ldr r1, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - movs r2, 0 - adds r5, r1, 0 - adds r4, r5, 0 - ldr r0, =0x0000ffff - adds r3, r0, 0 -_0818E448: - ldr r1, [r4] - lsls r0, r2, 1 - adds r1, 0x2 - adds r1, r0 - ldrh r0, [r1] - orrs r0, r3 - strh r0, [r1] - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0x8 - bls _0818E448 - ldr r1, [r5] - ldr r0, =0x0000ffff - strh r0, [r1, 0x14] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E430 - - thumb_func_start sub_818E47C -sub_818E47C: @ 818E47C - push {lr} - ldr r1, =gSpecialVar_0x8004 - movs r0, 0x11 - strh r0, [r1] - bl easy_chat_input_maybe - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E47C - - thumb_func_start sub_818E490 -sub_818E490: @ 818E490 - push {lr} - ldr r0, =gScriptItemId - ldrh r0, [r0] - movs r1, 0x1 - bl RemoveBagItem - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E490 - thumb_func_start sub_818E4A4 sub_818E4A4: @ 818E4A4 push {r4-r6,lr} diff --git a/include/global.h b/include/global.h index 09dabf822..6fa8cb92d 100644 --- a/include/global.h +++ b/include/global.h @@ -712,7 +712,7 @@ typedef union // TODO struct { /*0x000*/ u8 id; - /*0x001*/ u8 filler_001[0x207]; + /*0x001*/ u8 filler_001[0x217]; } common; } LilycoveLady; diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 65f6e2e10..a0482a28f 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -636,3 +636,26 @@ void sub_818E3EC(void) } sub_818DF00(); } + +void sub_818E430(void) +{ + u8 i; + + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + for (i = 0; i < 9; i ++) + { + gUnknown_0203CD68->unk_002[i] = -1; + } + gUnknown_0203CD68->unk_014 = -1; +} + +void sub_818E47C(void) +{ + gSpecialVar_0x8004 = 0x11; + easy_chat_input_maybe(); +} + +void sub_818E490(void) +{ + RemoveBagItem(gScriptItemId, 1); +} From 44e75e1f0303248638d3ab4b7115a1c7db24dbf0 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 20 Sep 2017 16:32:37 -0400 Subject: [PATCH 255/342] through sub_818E570 --- asm/lilycove_lady.s | 161 -------------------------------------------- src/lilycove_lady.c | 56 +++++++++++++++ 2 files changed, 56 insertions(+), 161 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index b50218e48..0acc81935 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,167 +5,6 @@ .text - thumb_func_start sub_818E4A4 -sub_818E4A4: @ 818E4A4 - push {r4-r6,lr} - ldr r2, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - str r0, [r2] - ldr r1, =gScriptItemId - ldrh r1, [r1] - strh r1, [r0, 0x28] - movs r3, 0 - adds r4, r2, 0 - ldr r6, =gSaveBlock2Ptr - adds r5, r4, 0 - adds r2, r6, 0 -_0818E4C2: - ldr r1, [r5] - lsls r0, r3, 1 - adds r1, 0x20 - adds r1, r0 - ldr r0, [r2] - adds r0, 0xA - adds r0, r3 - ldrb r0, [r0] - strh r0, [r1] - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0x3 - bls _0818E4C2 - ldr r0, [r4] - adds r0, 0x18 - ldr r1, [r6] - bl StringCopy7 - ldr r0, [r4] - ldr r1, =gGameLanguage - ldrb r1, [r1] - adds r0, 0x2D - strb r1, [r0] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E4A4 - - thumb_func_start sub_818E510 -sub_818E510: @ 818E510 - ldr r2, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r3, =0x00003b58 - adds r1, r0, r3 - str r1, [r2] - ldr r1, =0x00003b82 - adds r0, r1 - movs r1, 0x1 - strb r1, [r0] - bx lr - .pool - thumb_func_end sub_818E510 - - thumb_func_start sub_818E538 -sub_818E538: @ 818E538 - push {lr} - ldr r2, =gUnknown_0203CD68 - ldr r0, =gSaveBlock1Ptr - ldr r1, [r0] - ldr r0, =0x00003b58 - adds r1, r0 - str r1, [r2] - ldr r0, =gStringVar3 - ldrh r1, [r1, 0x14] - bl CopyEasyChatWord - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E538 - - thumb_func_start sub_818E564 -sub_818E564: @ 818E564 - push {lr} - bl EnableBothScriptContexts - pop {r0} - bx r0 - thumb_func_end sub_818E564 - - thumb_func_start sub_818E570 -sub_818E570: @ 818E570 - push {r4-r7,lr} - ldr r2, =gUnknown_0203CD68 - ldr r1, =gSaveBlock1Ptr - ldr r1, [r1] - ldr r4, =0x00003b58 - adds r3, r1, r4 - str r3, [r2] - adds r6, r0, 0 - adds r6, 0x2C - ldrb r4, [r6] - adds r7, r2, 0 - cmp r4, 0xF - bhi _0818E5EC - ldrb r0, [r3] - cmp r0, 0 - bne _0818E5EC - movs r5, 0 - ldr r2, =0x00003b83 - adds r0, r1, r2 - ldrb r0, [r0] - cmp r4, r0 - bne _0818E5E4 - adds r4, r7, 0 -_0818E59E: - bl Random - ldr r2, [r4] - lsls r0, 16 - lsrs r0, 16 - movs r1, 0xF - ands r0, r1 - adds r2, 0x2B - strb r0, [r2] - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0x3 - bhi _0818E5C6 - ldr r0, [r4] - adds r0, 0x2B - ldrb r1, [r6] - ldrb r0, [r0] - cmp r1, r0 - beq _0818E59E -_0818E5C6: - ldr r0, [r4] - adds r2, r0, 0 - adds r2, 0x2B - ldrb r0, [r6] - ldr r7, =gUnknown_0203CD68 - ldrb r4, [r2] - cmp r0, r4 - bne _0818E5E4 - ldrb r1, [r2] - adds r3, r1, 0x1 - adds r0, r3, 0 - asrs r0, 4 - lsls r0, 4 - subs r0, r3, r0 - strb r0, [r2] -_0818E5E4: - ldr r0, [r7] - ldrb r1, [r6] - adds r0, 0x2C - strb r1, [r0] -_0818E5EC: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E570 - thumb_func_start sub_818E604 sub_818E604: @ 818E604 push {r4,lr} diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index a0482a28f..61b5488a1 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -38,6 +38,8 @@ extern const u8 gUnknown_085EEB7E[8]; EWRAM_DATA struct LilycoveLadyFavour *gUnknown_0203CD64 = NULL; EWRAM_DATA struct LilycoveLadyQuiz *gUnknown_0203CD68 = NULL; +EWRAM_DATA struct LilycoveLadyContest *gUnknown_0203CD6C = NULL; + extern EWRAM_DATA u16 gScriptItemId; u8 GetLilycoveLadyId(void) @@ -659,3 +661,57 @@ void sub_818E490(void) { RemoveBagItem(gScriptItemId, 1); } + +void sub_818E4A4(void) +{ + u8 i; + + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + gUnknown_0203CD68->itemId = gScriptItemId; + for (i = 0; i < 4; i ++) + { + gUnknown_0203CD68->playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i]; + } + StringCopy7(gUnknown_0203CD68->playerName, gSaveBlock2Ptr->playerName); + gUnknown_0203CD68->language = gGameLanguage; +} + +void sub_818E510(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + gUnknown_0203CD68->unk_02a = 1; +} + +void sub_818E538(void) +{ + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + CopyEasyChatWord(gStringVar3, gUnknown_0203CD68->unk_014); +} + +void sub_818E564(void) +{ + EnableBothScriptContexts(); +} + +void sub_818E570(const struct LilycoveLadyQuiz *quiz) +{ + u8 i; + + gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; + if (quiz->unk_02c < 16 && gUnknown_0203CD68->id == LILYCOVE_LADY_QUIZ) + { + for (i = 0; i < 4; i ++) + { + if (quiz->unk_02c != gUnknown_0203CD68->unk_02b) + { + break; + } + gUnknown_0203CD68->unk_02b = Random() % 16; + } + if (quiz->unk_02c == gUnknown_0203CD68->unk_02b) + { + gUnknown_0203CD68->unk_02b = (gUnknown_0203CD68->unk_02b + 1) % 16; + } + gUnknown_0203CD68->unk_02c = quiz->unk_02c; + } +} From 7c8cbc6b88d745da215fc45730f84b598869438f Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 20 Sep 2017 16:49:22 -0400 Subject: [PATCH 256/342] SetLilycoveContestLady --- asm/lilycove_lady.s | 52 --------------------------------------------- include/global.h | 21 +++++++++--------- src/lilycove_lady.c | 46 +++++++++++++++++++++++++++------------ 3 files changed, 43 insertions(+), 76 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 0acc81935..7a844c2fb 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,58 +5,6 @@ .text - thumb_func_start sub_818E604 -sub_818E604: @ 818E604 - push {r4,lr} - ldr r4, =gUnknown_0203CD6C - ldr r1, [r4] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r0, [r4] - movs r1, 0 - strb r1, [r0, 0x2] - ldr r0, [r4] - strb r1, [r0, 0x3] - ldr r0, [r4] - strb r1, [r0, 0xC] - bl Random - ldr r4, [r4] - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x5 - bl __umodsi3 - strb r0, [r4, 0xD] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E604 - - thumb_func_start SetLilycoveContestLady -SetLilycoveContestLady: @ 818E638 - push {r4,lr} - ldr r4, =gUnknown_0203CD6C - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - str r0, [r4] - movs r2, 0 - movs r1, 0x2 - strb r1, [r0] - ldr r0, [r4] - strb r2, [r0, 0x1] - bl sub_818E604 - ldr r1, [r4] - ldr r0, =gGameLanguage - ldrb r0, [r0] - strb r0, [r1, 0xE] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end SetLilycoveContestLady - thumb_func_start sub_818E674 sub_818E674: @ 818E674 push {lr} diff --git a/include/global.h b/include/global.h index 6fa8cb92d..fa7856786 100644 --- a/include/global.h +++ b/include/global.h @@ -670,7 +670,7 @@ enum { struct LilycoveLadyQuiz { /*0x000*/ u8 id; - /*0x001*/ u8 unk_001; + /*0x001*/ u8 phase; /*0x002*/ u16 unk_002[9]; /*0x014*/ u16 unk_014; /*0x016*/ u16 unk_016; @@ -686,7 +686,7 @@ struct LilycoveLadyQuiz struct LilycoveLadyFavour { /*0x000*/ u8 id; - /*0x001*/ u8 unk_001; + /*0x001*/ u8 phase; /*0x002*/ u8 unk_002; /*0x003*/ u8 unk_003; /*0x004*/ u8 playerName[8]; @@ -699,8 +699,13 @@ struct LilycoveLadyFavour struct LilycoveLadyContest { /*0x000*/ u8 id; - /*0x001*/ u8 filler_001[12]; - /*0x00d*/ u8 category; // maybe? + /*0x001*/ u8 phase; + /*0x002*/ u8 fave_pkblk; + /*0x003*/ u8 other_pkblk; + /*0x004*/ u8 playerName[8]; + /*0x00c*/ u8 max_sheen; + /*0x00d*/ u8 category; + /*0x00e*/ u8 language; }; typedef union // TODO @@ -708,12 +713,7 @@ typedef union // TODO struct LilycoveLadyQuiz quiz; struct LilycoveLadyFavour favour; struct LilycoveLadyContest contest; - - struct - { - /*0x000*/ u8 id; - /*0x001*/ u8 filler_001[0x217]; - } common; + u8 id; } LilycoveLady; struct SaveBlock1 @@ -800,6 +800,7 @@ struct SaveBlock1 /*0x3B14*/ struct RecordMixingGift recordMixingGift; /*0x3B24*/ u8 seen2[52]; /*0x3B58*/ LilycoveLady lilycoveLady; + /*0x3B88*/ u8 filler_3B88[0x1E8]; /*0x3D70*/ u8 babyPhrase[24]; // TODO: convert to a struct // sizeof: 0x3D88 }; diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 61b5488a1..f6471828b 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -44,7 +44,7 @@ extern EWRAM_DATA u16 gScriptItemId; u8 GetLilycoveLadyId(void) { - return gSaveBlock1Ptr->lilycoveLady.common.id; + return gSaveBlock1Ptr->lilycoveLady.id; } void sub_818D9C0(void) @@ -148,7 +148,7 @@ void SetLilycoveFavourLady(void) { gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; gUnknown_0203CD64->id = LILYCOVE_LADY_FAVOUR; - gUnknown_0203CD64->unk_001 = 0; + gUnknown_0203CD64->phase = 0; gUnknown_0203CD64->playerName[0] = EOS; gUnknown_0203CD64->unk_002 = 0; gUnknown_0203CD64->unk_003= 0; @@ -161,17 +161,17 @@ void sub_818DBC4(void) { gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; gUnknown_0203CD64->id = LILYCOVE_LADY_FAVOUR; - gUnknown_0203CD64->unk_001 = 0; + gUnknown_0203CD64->phase = 0; } u8 sub_818DBE8(void) { gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; - if (gUnknown_0203CD64->unk_001 == 2) + if (gUnknown_0203CD64->phase == 2) { return 2; } - else if (gUnknown_0203CD64->unk_001 == 1) + else if (gUnknown_0203CD64->phase == 1) { return 1; } @@ -247,7 +247,7 @@ bool8 sub_818DD84(u16 itemId) gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; len = sub_818DB04(gUnknown_0860B2EC[gUnknown_0203CD64->unk_00c]); - gUnknown_0203CD64->unk_001 = 1; + gUnknown_0203CD64->phase = 1; sub_818DCAC(gStringVar2, itemId); gUnknown_0203CD64->itemId = itemId; sub_818DCF4(gSaveBlock2Ptr->playerName, gUnknown_0203CD64->playerName); @@ -297,14 +297,14 @@ u16 sub_818DEA0(void) gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; itemId = gUnknown_0860B304[gUnknown_0203CD64->unk_00c]; sub_818DE88(itemId); - gUnknown_0203CD64->unk_001 = 2; + gUnknown_0203CD64->phase = 2; return itemId; } void sub_818DEDC(void) { SetLilycoveFavourLady(); - gUnknown_0203CD64->unk_001 = 1; + gUnknown_0203CD64->phase = 1; } void sub_818DEF4(void) @@ -334,7 +334,7 @@ void SetLilycoveQuizLady(void) gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; gUnknown_0203CD68->id = LILYCOVE_LADY_QUIZ; - gUnknown_0203CD68->unk_001 = 0; + gUnknown_0203CD68->phase = 0; for (i = 0; i < 9; i ++) { gUnknown_0203CD68->unk_002[i] = -1; @@ -356,7 +356,7 @@ void sub_818E004(void) { gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; gUnknown_0203CD68->id = LILYCOVE_LADY_QUIZ; - gUnknown_0203CD68->unk_001 = 0; + gUnknown_0203CD68->phase = 0; gUnknown_0203CD68->unk_02a = 0; gUnknown_0203CD68->unk_016 = -1; } @@ -364,11 +364,11 @@ void sub_818E004(void) u8 sub_818E038(void) { gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; - if (gUnknown_0203CD68->unk_001 == 2) + if (gUnknown_0203CD68->phase == 2) { return 2; } - else if (gUnknown_0203CD68->unk_001 == 1) + else if (gUnknown_0203CD68->phase == 1) { return 1; } @@ -605,13 +605,13 @@ void sub_818E358(void) void sub_818E37C(void) { gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; - gUnknown_0203CD68->unk_001 = 1; + gUnknown_0203CD68->phase = 1; } void sub_818E39C(void) { gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; - gUnknown_0203CD68->unk_001 = 2; + gUnknown_0203CD68->phase = 2; } void sub_818E3BC(void) @@ -715,3 +715,21 @@ void sub_818E570(const struct LilycoveLadyQuiz *quiz) gUnknown_0203CD68->unk_02c = quiz->unk_02c; } } + +void sub_818E604(void) +{ + gUnknown_0203CD6C->playerName[0] = EOS; + gUnknown_0203CD6C->fave_pkblk = 0; + gUnknown_0203CD6C->other_pkblk = 0; + gUnknown_0203CD6C->max_sheen = 0; + gUnknown_0203CD6C->category = Random() % 5; +} + +void SetLilycoveContestLady(void) +{ + gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; + gUnknown_0203CD6C->id = LILYCOVE_LADY_CONTEST; + gUnknown_0203CD6C->phase = 0; + sub_818E604(); + gUnknown_0203CD6C->language = gGameLanguage; +} From 0c7555e237e44e0c0056946822e861ec022fcefe Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 20 Sep 2017 22:54:26 +0200 Subject: [PATCH 257/342] SetMoveEffect functionally equivalent and close --- asm/battle_2.s | 36 +- asm/battle_4.s | 80 ++--- data/battle_message.s | 2 +- data/battle_scripts_1.s | 28 +- include/battle.h | 37 ++- src/battle_4.c | 717 +++++++++++++++++++++++++++++++++++++++- sym_ewram.txt | 6 +- 7 files changed, 813 insertions(+), 93 deletions(-) diff --git a/asm/battle_2.s b/asm/battle_2.s index 7567daa4b..ad449bfdf 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -6358,7 +6358,7 @@ sub_8039F40: @ 8039F40 ldr r5, =gDisableStructs movs r4, 0 ldr r7, =gUnknown_02024240 - ldr r6, =gUnknown_02024268 + ldr r6, =gLockedMoves _08039F70: ldr r0, =gStatuses3 adds r0, r4, r0 @@ -6498,7 +6498,7 @@ _0803A0AE: strb r1, [r0] ldr r0, =gBattleExecBuffer str r1, [r0] - ldr r0, =gUnknown_0202432E + ldr r0, =gPaydayMoney movs r2, 0 strh r1, [r0] ldr r1, =gBattleResources @@ -12752,7 +12752,7 @@ _0803D7A0: bcc _0803D71C _0803D7AE: bl b_clear_atk_up_if_hit_flag_unless_enraged - ldr r1, =gUnknown_02024082 + ldr r1, =gCurrentMoveTurn movs r0, 0 strb r0, [r1] ldr r1, =gFightStateTracker @@ -12800,7 +12800,7 @@ _0803D828: ldr r5, =gBattleStruct ldr r0, [r5] adds r0, 0x4B - ldr r4, =gUnknown_02024082 + ldr r4, =gCurrentMoveTurn ldrb r1, [r4] strb r1, [r0] ldr r1, =gUnknown_0831BC0C @@ -13642,7 +13642,7 @@ sub_803E0B8: @ 803E0B8 str r0, [sp] ldr r6, =gBankAttacker ldr r1, =gTurnOrder - ldr r0, =gUnknown_02024082 + ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] @@ -13747,7 +13747,7 @@ _0803E1BC: _0803E1E2: ldr r3, =gCurrentMove ldr r2, =gUnknown_020241EC - ldr r1, =gUnknown_02024268 + ldr r1, =gLockedMoves lsls r0, r4, 1 adds r0, r1 ldrh r0, [r0] @@ -14450,7 +14450,7 @@ bs2_8016374: @ 803E868 push {r4,lr} ldr r3, =gBankAttacker ldr r1, =gTurnOrder - ldr r0, =gUnknown_02024082 + ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] @@ -14515,7 +14515,7 @@ sub_803E90C: @ 803E90C ldr r4, =gBankAttacker ldr r2, =gBankTarget ldr r1, =gTurnOrder - ldr r0, =gUnknown_02024082 + ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] @@ -15052,7 +15052,7 @@ _0803EE06: _0803EE12: cmp r7, 0 beq _0803EE24 - ldr r1, =gUnknown_02024082 + ldr r1, =gCurrentMoveTurn ldr r0, =gNoOfAllBanks ldrb r0, [r0] strb r0, [r1] @@ -15076,7 +15076,7 @@ sub_803EE48: @ 803EE48 push {r4-r6,lr} ldr r4, =gBankAttacker ldr r1, =gTurnOrder - ldr r5, =gUnknown_02024082 + ldr r5, =gCurrentMoveTurn ldrb r0, [r5] adds r0, r1 ldrb r0, [r0] @@ -15214,7 +15214,7 @@ _0803EF98: sub_803EFA8: @ 803EFA8 ldr r2, =gBankAttacker ldr r1, =gTurnOrder - ldr r0, =gUnknown_02024082 + ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] @@ -15239,7 +15239,7 @@ sub_803EFA8: @ 803EFA8 bs5_8016AC0: @ 803EFF0 ldr r2, =gBankAttacker ldr r1, =gTurnOrder - ldr r0, =gUnknown_02024082 + ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] @@ -15272,7 +15272,7 @@ sub_803F050: @ 803F050 push {r4-r6,lr} ldr r3, =gBankAttacker ldr r1, =gTurnOrder - ldr r0, =gUnknown_02024082 + ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] @@ -15359,7 +15359,7 @@ sub_803F120: @ 803F120 push {r4,lr} ldr r2, =gBankAttacker ldr r1, =gTurnOrder - ldr r0, =gUnknown_02024082 + ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] @@ -15445,7 +15445,7 @@ bs8_exit_by_flight: @ 803F1F0 push {r4,lr} ldr r2, =gBankAttacker ldr r1, =gTurnOrder - ldr r4, =gUnknown_02024082 + ldr r4, =gCurrentMoveTurn ldrb r0, [r4] adds r0, r1 ldrb r0, [r0] @@ -15468,7 +15468,7 @@ bs8_exit_by_flight: @ 803F1F0 bs9_8016C9C: @ 803F22C ldr r3, =gBankAttacker ldr r1, =gTurnOrder - ldr r0, =gUnknown_02024082 + ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 ldrb r2, [r0] @@ -15529,7 +15529,7 @@ _0803F2C0: thumb_func_start bsD_proceed bsD_proceed: @ 803F2CC - ldr r1, =gUnknown_02024082 + ldr r1, =gCurrentMoveTurn ldrb r0, [r1] adds r0, 0x1 strb r0, [r1] @@ -15552,7 +15552,7 @@ bsD_proceed: @ 803F2CC bsC_8016D70: @ 803F300 push {r4-r6,lr} ldr r1, =gTurnOrder - ldr r2, =gUnknown_02024082 + ldr r2, =gCurrentMoveTurn ldrb r0, [r2] adds r0, r1 ldrb r0, [r0] diff --git a/asm/battle_4.s b/asm/battle_4.s index 149462091..667b93ec8 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -329,7 +329,7 @@ _08048A1A: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082DB5E9 + ldr r0, =BattleScript_PSNPrevention str r0, [r4] ldr r2, =gHitMarker ldr r1, [r2] @@ -453,7 +453,7 @@ _08048B16: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082DB5D1 + ldr r0, =BattleScript_BRNPrevention str r0, [r4] ldr r2, =gHitMarker ldr r1, [r2] @@ -500,7 +500,7 @@ _08048B8A: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082DB5D1 + ldr r0, =BattleScript_BRNPrevention b _08048D72 .pool _08048BA4: @@ -645,7 +645,7 @@ _08048CA2: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082DB5DD + ldr r0, =BattleScript_PRLZPrevention str r0, [r4] ldr r2, =gHitMarker ldr r1, [r2] @@ -730,7 +730,7 @@ _08048D66: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082DB5E9 + ldr r0, =BattleScript_PSNPrevention _08048D72: str r0, [r4] ldr r1, =gBattleCommunication @@ -1080,14 +1080,14 @@ _080490F0: movs r1, 0x27 bl RecordAbilityBattle ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB603 + ldr r0, =BattleScript_FlinchPrevention str r0, [r1] bl _080499B2 .pool _08049114: adds r0, r2, 0 bl BankGetTurnOrder - ldr r1, =gUnknown_02024082 + ldr r1, =gCurrentMoveTurn lsls r0, 24 lsrs r0, 24 ldrb r1, [r1] @@ -1132,7 +1132,7 @@ _08049178: lsls r0, 5 orrs r1, r0 str r1, [r2] - ldr r1, =gUnknown_02024268 + ldr r1, =gLockedMoves ldrb r0, [r3] lsls r0, 1 adds r0, r1 @@ -1172,7 +1172,7 @@ _080491D8: ands r1, r0 cmp r1, 0 bne _08049210 - ldr r4, =gUnknown_0202432E + ldr r4, =gPaydayMoney ldrh r3, [r4] ldr r2, =gBattleMons ldrb r1, [r5] @@ -1245,7 +1245,7 @@ _0804927C: lsls r1, 5 orrs r0, r1 str r0, [r2] - ldr r1, =gUnknown_02024268 + ldr r1, =gLockedMoves mov r2, r9 ldrb r0, [r2] lsls r0, 1 @@ -1326,7 +1326,7 @@ _080492E0: ldr r0, [r0] str r0, [r4] strb r5, [r2, 0x5] - ldr r3, =gUnknown_085CC982 + ldr r3, =gTrappingMoves ldrh r0, [r3] ldrh r4, [r6] cmp r0, r4 @@ -1390,7 +1390,7 @@ _080493D4: movs r0, 0x10 adds r2, r7, 0 movs r3, 0 - bl sub_8050A1C + bl ChangeStatBuffs lsls r0, 24 lsrs r3, r0, 24 cmp r3, 0 @@ -1407,7 +1407,7 @@ _080493F2: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082D8CD4 + ldr r0, =BattleScript_StatUp b _080499B0 .pool _0804941C: @@ -1420,7 +1420,7 @@ _0804941C: lsrs r1, 24 adds r2, r7, 0 movs r3, 0 - bl sub_8050A1C + bl ChangeStatBuffs lsls r0, 24 lsrs r3, r0, 24 cmp r3, 0 @@ -1437,7 +1437,7 @@ _0804943C: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082D8D65 + ldr r0, =BattleScript_StatDown b _080499B0 .pool _08049468: @@ -1449,7 +1449,7 @@ _08049468: movs r0, 0x20 adds r2, r7, 0 movs r3, 0 - bl sub_8050A1C + bl ChangeStatBuffs lsls r0, 24 lsrs r3, r0, 24 cmp r3, 0 @@ -1466,7 +1466,7 @@ _08049486: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082D8CD4 + ldr r0, =BattleScript_StatUp b _080499B0 .pool _080494B0: @@ -1479,7 +1479,7 @@ _080494B0: lsrs r1, 24 adds r2, r7, 0 movs r3, 0 - bl sub_8050A1C + bl ChangeStatBuffs lsls r0, 24 lsrs r3, r0, 24 cmp r3, 0 @@ -1496,7 +1496,7 @@ _080494D0: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082D8D65 + ldr r0, =BattleScript_StatDown b _080499B0 .pool _080494FC: @@ -1522,7 +1522,7 @@ _080494FC: adds r0, r2 movs r1, 0x2 strb r1, [r0, 0x19] - ldr r1, =gUnknown_02024268 + ldr r1, =gLockedMoves ldrb r0, [r3] lsls r0, 1 adds r0, r1 @@ -1618,7 +1618,7 @@ _080495D4: bne _0804963C bl b_movescr_stack_push_cursor ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB682 + ldr r0, =BattleScript_NoItemSteal str r0, [r1] ldr r1, =gLastUsedAbility ldrb r0, [r7] @@ -1718,7 +1718,7 @@ _0804967C: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082DB422 + ldr r0, =BattleScript_ItemSteal str r0, [r4] ldrb r0, [r7] ldr r1, [r5] @@ -1778,7 +1778,7 @@ _08049778: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082DAF27 + ldr r0, =BattleScript_AllStatsUp b _080499B0 .pool _08049790: @@ -1786,7 +1786,7 @@ _08049790: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082DAFC3 + ldr r0, =BattleScript_RapidSpinAway b _080499B0 .pool _080497A8: @@ -1826,7 +1826,7 @@ _080497C2: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082DB361 + ldr r0, =BattleScript_TargetPRLZHeal b _080499B0 .pool _08049808: @@ -1834,7 +1834,7 @@ _08049808: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082DB117 + ldr r0, =BattleScript_AtkDefDown b _080499B0 .pool _08049820: @@ -1881,7 +1881,7 @@ _08049880: lsls r0, 5 orrs r1, r0 str r1, [r2] - ldr r1, =gUnknown_02024268 + ldr r1, =gLockedMoves mov r2, r9 ldrb r0, [r2] lsls r0, 1 @@ -1971,7 +1971,7 @@ _08049900: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082DB168 + ldr r0, =BattleScript_KnockedOff str r0, [r4] mov r1, r9 ldrb r0, [r1] @@ -2002,7 +2002,7 @@ _080499A4: ldr r0, [r4] adds r0, 0x1 bl b_movescr_stack_push - ldr r0, =gUnknown_082DB1D5 + ldr r0, =BattleScript_SAtkDown2 _080499B0: str r0, [r4] _080499B2: @@ -13531,7 +13531,7 @@ atk77_setprotect: @ 804FD8C movs r1, 0 strb r1, [r0, 0x8] _0804FDBC: - ldr r0, =gUnknown_02024082 + ldr r0, =gCurrentMoveTurn ldrb r1, [r0] ldr r0, =gNoOfAllBanks ldrb r0, [r0] @@ -14965,8 +14965,8 @@ _08050A04: .pool thumb_func_end atk88_negativedamage - thumb_func_start sub_8050A1C -sub_8050A1C: @ 8050A1C + thumb_func_start ChangeStatBuffs +ChangeStatBuffs: @ 8050A1C push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -15477,7 +15477,7 @@ _08050E80: pop {r1} bx r1 .pool - thumb_func_end sub_8050A1C + thumb_func_end ChangeStatBuffs thumb_func_start atk89_statbuffchange atk89_statbuffchange: @ 8050EA0 @@ -15503,7 +15503,7 @@ atk89_statbuffchange: @ 8050EA0 movs r1, 0xF ands r1, r4 ldrb r2, [r2, 0x1] - bl sub_8050A1C + bl ChangeStatBuffs lsls r0, 24 cmp r0, 0 bne _08050EDC @@ -15576,7 +15576,7 @@ atk8B_setbide: @ 8050F40 lsls r1, 5 orrs r0, r1 str r0, [r2] - ldr r1, =gUnknown_02024268 + ldr r1, =gLockedMoves ldrb r0, [r3] lsls r0, 1 adds r0, r1 @@ -16365,7 +16365,7 @@ atk91_givepaydaymoney: @ 80515C8 ands r0, r1 cmp r0, 0 bne _08051650 - ldr r1, =gUnknown_0202432E + ldr r1, =gPaydayMoney ldrh r0, [r1] cmp r0, 0 beq _08051650 @@ -20500,7 +20500,7 @@ _08053948: ldr r0, [r1] orrs r0, r7 str r0, [r1] - ldr r1, =gUnknown_02024268 + ldr r1, =gLockedMoves ldrb r0, [r6] lsls r0, 1 adds r0, r1 @@ -24092,7 +24092,7 @@ atkDF_setmagiccoat: @ 805589C movs r2, 0x20 orrs r1, r2 strb r1, [r0] - ldr r0, =gUnknown_02024082 + ldr r0, =gCurrentMoveTurn ldrb r1, [r0] ldr r0, =gNoOfAllBanks ldrb r0, [r0] @@ -24147,7 +24147,7 @@ atkE0_setstealstatchange: @ 8055920 movs r2, 0x20 orrs r1, r2 strb r1, [r0] - ldr r0, =gUnknown_02024082 + ldr r0, =gCurrentMoveTurn ldrb r1, [r0] ldr r0, =gNoOfAllBanks ldrb r0, [r0] @@ -26577,7 +26577,7 @@ atkF7_802BF54: @ 8056EDC ldr r1, =gFightStateTracker movs r0, 0xC strb r0, [r1] - ldr r1, =gUnknown_02024082 + ldr r1, =gCurrentMoveTurn ldr r0, =gNoOfAllBanks ldrb r0, [r0] strb r0, [r1] diff --git a/data/battle_message.s b/data/battle_message.s index df6380640..c48b40b73 100644 --- a/data/battle_message.s +++ b/data/battle_message.s @@ -599,7 +599,7 @@ gUnknown_085CC270:: @ 85CC270 gMissStringIds:: @ 85CC834 .incbin "baserom.gba", 0x5cc834, 0x14e -gUnknown_085CC982:: @ 85CC982 +gTrappingMoves:: @ 85CC982 .incbin "baserom.gba", 0x5cc982, 0xe gUnknown_085CC990:: @ 85CC990 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 23ef731d1..7a013c51c 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -15,10 +15,10 @@ BattleScript_MoveEnd:: @ 82D8A4E gUnknown_082D8A60:: @ 82D8A60 .incbin "baserom.gba", 0x2d8a60, 0x274 -gUnknown_082D8CD4:: @ 82D8CD4 +BattleScript_StatUp:: @ 82D8CD4 .incbin "baserom.gba", 0x2d8cd4, 0x91 -gUnknown_082D8D65:: @ 82D8D65 +BattleScript_StatDown:: @ 82D8D65 .incbin "baserom.gba", 0x2d8d65, 0x6fd BattleScript_MoveUsedMustRecharge:: @ 82D9462 @@ -174,10 +174,10 @@ gUnknown_082DAF05:: @ 82DAF05 gUnknown_082DAF20:: @ 82DAF20 .incbin "baserom.gba", 0x2daf20, 0x7 -gUnknown_082DAF27:: @ 82DAF27 +BattleScript_AllStatsUp:: @ 82DAF27 .incbin "baserom.gba", 0x2daf27, 0x9c -gUnknown_082DAFC3:: @ 82DAFC3 +BattleScript_RapidSpinAway:: @ 82DAFC3 .incbin "baserom.gba", 0x2dafc3, 0x2 gUnknown_082DAFC5:: @ 82DAFC5 @@ -222,10 +222,10 @@ BattleScript_WishComesTrue:: @ 82DB0B7 BattleScript_IngrainTurnHeal:: @ 82DB0EE .incbin "baserom.gba", 0x2db0ee, 0x29 -gUnknown_082DB117:: @ 82DB117 +BattleScript_AtkDefDown:: @ 82DB117 .incbin "baserom.gba", 0x2db117, 0x51 -gUnknown_082DB168:: @ 82DB168 +BattleScript_KnockedOff:: @ 82DB168 .incbin "baserom.gba", 0x2db168, 0xe BattleScript_MoveUsedIsImprisoned:: @ 82DB176 @@ -252,7 +252,7 @@ BattleScript_EnduredMsg:: @ 82DB1C7 BattleScript_OneHitKOMsg:: @ 82DB1CE .incbin "baserom.gba", 0x2db1ce, 0x7 -gUnknown_082DB1D5:: @ 82DB1D5 +BattleScript_SAtkDown2:: @ 82DB1D5 .incbin "baserom.gba", 0x2db1d5, 0x2a gUnknown_082DB1FF:: @ 82DB1FF @@ -321,13 +321,13 @@ BattleScript_NightmareTurnDmg:: @ 82DB33F BattleScript_CurseTurnDmg:: @ 82DB350 .incbin "baserom.gba", 0x2db350, 0x11 -gUnknown_082DB361:: @ 82DB361 +BattleScript_TargetPRLZHeal:: @ 82DB361 .incbin "baserom.gba", 0x2db361, 0x17 BattleScript_YawnMakesAsleep:: @ 82DB378 .incbin "baserom.gba", 0x2db378, 0xaa -gUnknown_082DB422:: @ 82DB422 +BattleScript_ItemSteal:: @ 82DB422 .incbin "baserom.gba", 0x2db422, 0xe BattleScript_DrizzleActivates:: @ 82DB430 @@ -390,19 +390,19 @@ BattleScript_FlashFireBoost:: @ 82DB5A8 gUnknown_082DB5C7:: @ 82DB5C7 .incbin "baserom.gba", 0x2db5c7, 0xa -gUnknown_082DB5D1:: @ 82DB5D1 +BattleScript_BRNPrevention:: @ 82DB5D1 .incbin "baserom.gba", 0x2db5d1, 0xc -gUnknown_082DB5DD:: @ 82DB5DD +BattleScript_PRLZPrevention:: @ 82DB5DD .incbin "baserom.gba", 0x2db5dd, 0xc -gUnknown_082DB5E9:: @ 82DB5E9 +BattleScript_PSNPrevention:: @ 82DB5E9 .incbin "baserom.gba", 0x2db5e9, 0xc gUnknown_082DB5F5:: @ 82DB5F5 .incbin "baserom.gba", 0x2db5f5, 0xe -gUnknown_082DB603:: @ 82DB603 +BattleScript_FlinchPrevention:: @ 82DB603 .incbin "baserom.gba", 0x2db603, 0x1c BattleScript_SoundproofProtected:: @ 82DB61F @@ -429,7 +429,7 @@ BattleScript_ApplySecondaryEffect:: @ 82DB67C BattleScript_SynchronizeActivates:: @ 82DB67F .incbin "baserom.gba", 0x2db67f, 0x3 -gUnknown_082DB682:: @ 82DB682 +BattleScript_NoItemSteal:: @ 82DB682 .incbin "baserom.gba", 0x2db682, 0xa gUnknown_082DB68C:: @ 82DB68C diff --git a/include/battle.h b/include/battle.h index 6550a66d3..56b74aa62 100644 --- a/include/battle.h +++ b/include/battle.h @@ -376,7 +376,7 @@ struct WishFutureKnock u8 wishCounter[BATTLE_BANKS_COUNT]; u8 wishUserID[BATTLE_BANKS_COUNT]; u8 weatherDuration; - u16 knockedOffPokes; + u8 knockedOffPokes[2]; }; extern struct WishFutureKnock gWishFutureKnock; @@ -627,10 +627,10 @@ struct BattleStruct u8 field_B5; u8 field_B6; u8 field_B7; - u16 usedHeldItems[4]; + u16 usedHeldItems[BATTLE_BANKS_COUNT]; u8 field_C0[8]; - u16 choicedMove[4]; - u8 field_D0[8]; + u16 choicedMove[BATTLE_BANKS_COUNT]; + u16 field_D0[BATTLE_BANKS_COUNT]; u8 intimidateBank; u8 fillerD9[0xDA-0xD9]; u8 field_DA; @@ -663,6 +663,35 @@ extern struct BattleStruct* gBattleStruct; #define GET_BANK_SIDE(bank)((GetBankIdentity(bank) & 1)) +#define MOVE_EFFECT_SLEEP 0x1 +#define MOVE_EFFECT_POISON 0x2 +#define MOVE_EFFECT_BURN 0x3 +#define MOVE_EFFECT_FREEZE 0x4 +#define MOVE_EFFECT_PARALYSIS 0x5 +#define MOVE_EFFECT_TOXIC 0x6 +#define MOVE_EFFECT_CONFUSION 0x7 +#define MOVE_EFFECT_FLINCH 0x8 +#define MOVE_EFFECT_TRI_ATTACK 0x9 +#define MOVE_EFFECT_UPROAR 0xA +#define MOVE_EFFECT_PAYDAY 0xB +#define MOVE_EFFECT_CHARGING 0xC +#define MOVE_EFFECT_WRAP 0xD +#define MOVE_EFFECT_RECOIL_25 0xE +#define MOVE_EFFECT_RECHARGE 0x1D +#define MOVE_EFFECT_RAGE 0x1E +#define MOVE_EFFECT_STEAL_ITEM 0x1F +#define MOVE_EFFECT_PREVENT_ESCAPE 0x20 +#define MOVE_EFFECT_NIGHTMARE 0x21 +#define MOVE_EFFECT_ALL_STATS_UP 0x22 +#define MOVE_EFFECT_RAPIDSPIN 0x23 +#define MOVE_EFFECT_REMOVE_PARALYSIS 0x24 +#define MOVE_EFFECT_ATK_DEF_DOWN 0x25 +#define MOVE_EFFECT_RECOIL_33_PARALYSIS 0x26 +#define MOVE_EFFECT_THRASH 0x35 +#define MOVE_EFFECT_KNOCK_OFF 0x36 +#define MOVE_EFFECT_SP_ATK_TWO_DOWN 0x3B +#define MOVE_EFFECT_AFFECTS_USER 0x40 + struct BattleScripting { u8 field_0; diff --git a/src/battle_4.c b/src/battle_4.c index 5d867289b..a51da55bf 100644 --- a/src/battle_4.c +++ b/src/battle_4.c @@ -71,15 +71,17 @@ extern u8 gPlayerPartyCount; extern u16 gMoveToLearn; extern u16 gRandomMove; extern u8 gBankInMenu; -extern u8 gActionForBanks[4]; +extern u8 gActionForBanks[BATTLE_BANKS_COUNT]; extern u8 gCurrentMoveTurn; -extern u8 gBattleBufferB[4][0x200]; +extern u8 gBattleBufferB[BATTLE_BANKS_COUNT][0x200]; +extern u16 gLockedMoves[BATTLE_BANKS_COUNT]; extern const struct BattleMove gBattleMoves[]; -extern const u16 gMissStringIds[]; -extern const u8 gTrainerMoney[]; -extern const u8 gTypeEffectiveness[]; extern const struct BaseStats gBaseStats[]; +extern const u8 gTypeEffectiveness[]; +extern const u16 gMissStringIds[]; +extern const u16 gTrappingMoves[]; +extern const u8 gTrainerMoney[]; // functions @@ -106,6 +108,9 @@ extern const u8 BattleScript_ItemSteal[]; extern const u8 BattleScript_RapidSpinAway[]; extern const u8 BattleScript_TargetPRLZHeal[]; extern const u8 BattleScript_KnockedOff[]; +extern const u8 BattleScript_AllStatsUp[]; +extern const u8 BattleScript_AtkDefDown[]; +extern const u8 BattleScript_SAtkDown2[]; extern const u8 BattleScript_LevelUp[]; extern const u8 BattleScript_WrapFree[]; extern const u8 BattleScript_LeechSeedFree[]; @@ -139,6 +144,7 @@ bool8 IsTwoTurnsMove(u16 move); void DestinyBondFlagUpdate(void); u8 AttacksThisTurn(u8 bank, u16 move); // Note: returns 1 if it's a charging turn, otherwise 2. static void CheckWonderGuardAndLevitate(void); +u8 ChangeStatBuffs(s8, u8 statId, u8, const u8* BS_ptr); void atk00_attackcanceler(void); void atk01_accuracycheck(void); @@ -672,14 +678,14 @@ const u16 gCriticalHitChance[] = {16, 8, 4, 3, 2}; const u32 gStatusFlagsForMoveEffects[] = { 0x00000000, - 0x00000007, - 0x00000008, - 0x00000010, - 0x00000020, - 0x00000040, - 0x00000080, - 0x00000007, - 0x00000008, + STATUS_SLEEP, + STATUS_POISON, + STATUS_BURN, + STATUS_FREEZE, + STATUS_PARALYSIS, + STATUS_TOXIC_POISON, + STATUS2_CONFUSION, + STATUS2_FLINCHED, 0x00000000, 0x00000070, 0x00000000, @@ -733,6 +739,8 @@ const u32 gStatusFlagsForMoveEffects[] = 0x00000000 }; +extern const u8* gMoveEffectBS_Ptrs[]; + void atk00_attackcanceler(void) { s32 i; @@ -2023,3 +2031,686 @@ u8 BankGetTurnOrder(u8 bank) } return i; } + +#define INCREMENT_RESET_RETURN \ +{ \ + gBattlescriptCurrInstr++; \ + gBattleCommunication[MOVE_EFFECT_BYTE] = 0; \ + return; \ +} + +#define RESET_RETURN \ +{ \ + gBattleCommunication[MOVE_EFFECT_BYTE] = 0; \ + return; \ +} + +void SetMoveEffect(bool8 primary, u8 certain) +{ + bool32 statusChanged = FALSE; + u8 affectsUser = 0; // 0x40 otherwise + bool32 noSunCanFreeze = TRUE; + + if (gBattleCommunication[MOVE_EFFECT_BYTE] & MOVE_EFFECT_AFFECTS_USER) + { + gEffectBank = gBankAttacker; // bank that effects get applied on + gBattleCommunication[MOVE_EFFECT_BYTE] &= ~(MOVE_EFFECT_AFFECTS_USER); + affectsUser = MOVE_EFFECT_AFFECTS_USER; + gBattleScripting.bank = gBankTarget; // theoretically the attacker + } + else + { + gEffectBank = gBankTarget; + gBattleScripting.bank = gBankAttacker; + } + + if (gBattleMons[gEffectBank].ability == ABILITY_SHIELD_DUST && !(gHitMarker & HITMARKER_IGNORE_SAFEGUARD) + && !primary && gBattleCommunication[MOVE_EFFECT_BYTE] <= 9) + INCREMENT_RESET_RETURN + + if (gSideAffecting[GET_BANK_SIDE(gEffectBank)] & SIDE_STATUS_SAFEGUARD && !(gHitMarker & HITMARKER_IGNORE_SAFEGUARD) + && !primary && gBattleCommunication[MOVE_EFFECT_BYTE] <= 7) + INCREMENT_RESET_RETURN + + if (gBattleMons[gEffectBank].hp == 0 + && gBattleCommunication[MOVE_EFFECT_BYTE] != MOVE_EFFECT_PAYDAY + && gBattleCommunication[MOVE_EFFECT_BYTE] != MOVE_EFFECT_STEAL_ITEM) + INCREMENT_RESET_RETURN + + if (gBattleMons[gEffectBank].status2 & STATUS2_SUBSTITUTE && affectsUser != MOVE_EFFECT_AFFECTS_USER) + INCREMENT_RESET_RETURN + + if (gBattleCommunication[MOVE_EFFECT_BYTE] <= 6) // status change + { + switch (gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]) + { + case STATUS_SLEEP: + // check active uproar + if (gBattleMons[gEffectBank].ability != ABILITY_SOUNDPROOF) + { + for (gActiveBank = 0; + gActiveBank < gNoOfAllBanks && !(gBattleMons[gActiveBank].status2 & STATUS2_UPROAR); + gActiveBank++) + {} + } + else + gActiveBank = gNoOfAllBanks; + + if (gBattleMons[gEffectBank].status1) + break; + if (gActiveBank != gNoOfAllBanks) + break; + if (gBattleMons[gEffectBank].ability == ABILITY_VITAL_SPIRIT) + break; + if (gBattleMons[gEffectBank].ability == ABILITY_INSOMNIA) + break; + + CancelMultiTurnMoves(gEffectBank); + statusChanged = TRUE; + break; + case STATUS_POISON: + if (gBattleMons[gEffectBank].ability == ABILITY_IMMUNITY + && (primary == TRUE || certain == 0x80)) + { + gLastUsedAbility = ABILITY_IMMUNITY; + RecordAbilityBattle(gEffectBank, ABILITY_IMMUNITY); + + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_PSNPrevention; + + if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + RESET_RETURN + } + if ((gBattleMons[gEffectBank].type1 == TYPE_POISON || gBattleMons[gEffectBank].type2 == TYPE_POISON + || gBattleMons[gEffectBank].type1 == TYPE_STEEL || gBattleMons[gEffectBank].type2 == TYPE_STEEL) + && (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) + && (primary == 1 || certain == 0x80)) + { + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_PSNPrevention; + + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + RESET_RETURN + } + if (gBattleMons[gEffectBank].type1 == TYPE_POISON) + break; + if (gBattleMons[gEffectBank].type2 == TYPE_POISON) + break; + if (gBattleMons[gEffectBank].type1 == TYPE_STEEL) + break; + if (gBattleMons[gEffectBank].type2 == TYPE_STEEL) + break; + if (gBattleMons[gEffectBank].status1) + break; + if (gBattleMons[gEffectBank].ability == ABILITY_IMMUNITY) + break; + + statusChanged = TRUE; + break; + case STATUS_BURN: + if (gBattleMons[gEffectBank].ability == ABILITY_WATER_VEIL + && (primary == 1 || certain == 0x80)) + { + gLastUsedAbility = ABILITY_WATER_VEIL; + RecordAbilityBattle(gEffectBank, ABILITY_WATER_VEIL); + + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_BRNPrevention; + if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + RESET_RETURN + } + if ((gBattleMons[gEffectBank].type1 == TYPE_FIRE + || gBattleMons[gEffectBank].type2 == TYPE_FIRE) + && (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) + && (primary == 1 || certain == 0x80)) + { + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_BRNPrevention; + + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + RESET_RETURN + } + if (gBattleMons[gEffectBank].type1 == TYPE_FIRE) + break; + if (gBattleMons[gEffectBank].type2 == TYPE_FIRE) + break; + if (gBattleMons[gEffectBank].ability == ABILITY_WATER_VEIL) + break; + if (gBattleMons[gEffectBank].status1) + break; + + statusChanged = TRUE; + break; + case STATUS_FREEZE: + if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SUN_ANY) + noSunCanFreeze = FALSE; + if (gBattleMons[gEffectBank].type1 == TYPE_ICE) + break; + if (gBattleMons[gEffectBank].type2 == TYPE_ICE) + break; + if (gBattleMons[gEffectBank].status1) + break; + if (noSunCanFreeze == 0) + break; + if (gBattleMons[gEffectBank].ability == ABILITY_MAGMA_ARMOR) + break; + + CancelMultiTurnMoves(gEffectBank); + statusChanged = TRUE; + break; + case STATUS_PARALYSIS: + if (gBattleMons[gEffectBank].ability == ABILITY_LIMBER) + { + if (primary == TRUE || certain == 0x80) + { + gLastUsedAbility = ABILITY_LIMBER; + RecordAbilityBattle(gEffectBank, ABILITY_LIMBER); + + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_PRLZPrevention; + + if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + RESET_RETURN + } + else + break; + } + if (gBattleMons[gEffectBank].status1) + break; + + statusChanged = TRUE; + break; + case STATUS_TOXIC_POISON: + if (gBattleMons[gEffectBank].ability == ABILITY_IMMUNITY && (primary == 1 || certain == 0x80)) + { + gLastUsedAbility = ABILITY_IMMUNITY; + RecordAbilityBattle(gEffectBank, ABILITY_IMMUNITY); + + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_PSNPrevention; + + if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + RESET_RETURN + } + if ((gBattleMons[gEffectBank].type1 == TYPE_POISON || gBattleMons[gEffectBank].type2 == TYPE_POISON + || gBattleMons[gEffectBank].type1 == TYPE_STEEL || gBattleMons[gEffectBank].type2 == TYPE_STEEL) + && (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) + && (primary == TRUE || certain == 0x80)) + { + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_PSNPrevention; + + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + RESET_RETURN + } + if (gBattleMons[gEffectBank].status1) + break; + if (gBattleMons[gEffectBank].type1 != TYPE_POISON + && gBattleMons[gEffectBank].type2 != TYPE_POISON + && gBattleMons[gEffectBank].type1 != TYPE_STEEL + && gBattleMons[gEffectBank].type2 != TYPE_STEEL) + { + if (gBattleMons[gEffectBank].ability == ABILITY_IMMUNITY) + break; + + // It's redundant, because at this point we know the status1 value is 0. + gBattleMons[gEffectBank].status1 &= ~(STATUS_TOXIC_POISON); + gBattleMons[gEffectBank].status1 &= ~(STATUS_POISON); + statusChanged = TRUE; + break; + } + else + { + gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED; + } + break; + } + if (statusChanged == TRUE) + { + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + + if (gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]] == STATUS_SLEEP) + gBattleMons[gEffectBank].status1 |= ((Random() & 3) + 2); + else + gBattleMons[gEffectBank].status1 |= gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]; + + gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + + gActiveBank = gEffectBank; + EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gEffectBank].status1); + MarkBufferBankForExecution(gActiveBank); + + if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + + // for synchronize + + if (gBattleCommunication[MOVE_EFFECT_BYTE] == MOVE_EFFECT_POISON + || gBattleCommunication[MOVE_EFFECT_BYTE] == MOVE_EFFECT_TOXIC + || gBattleCommunication[MOVE_EFFECT_BYTE] == MOVE_EFFECT_PARALYSIS + || gBattleCommunication[MOVE_EFFECT_BYTE] == MOVE_EFFECT_BURN) + { + u8* synchronizeEffect = &gBattleStruct->synchronizeMoveEffect; + *synchronizeEffect = gBattleCommunication[MOVE_EFFECT_BYTE]; + gHitMarker |= HITMARKER_SYNCHRONISE_EFFECT; + } + return; + } + else if (statusChanged == FALSE) + { + gBattleCommunication[MOVE_EFFECT_BYTE] = 0; + gBattlescriptCurrInstr++; + return; + } + } + else + { + if (gBattleMons[gEffectBank].status2 & gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]) + { + gBattlescriptCurrInstr++; + } + else + { + u8 side; + u32 statusFlag = + switch (gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]) + { + case MOVE_EFFECT_CONFUSION: + if (gBattleMons[gEffectBank].ability == ABILITY_OWN_TEMPO + || gBattleMons[gEffectBank].status2 & STATUS2_CONFUSION) + { + gBattlescriptCurrInstr++; + } + else + { + gBattleMons[gEffectBank].status2 |= (((Random()) % 0x4)) + 2; + + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + } + break; + case MOVE_EFFECT_FLINCH: + if (gBattleMons[gEffectBank].ability == ABILITY_INNER_FOCUS) + { + if (primary == 1 || certain == 0x80) + { + gLastUsedAbility = ABILITY_INNER_FOCUS; + RecordAbilityBattle(gEffectBank, ABILITY_INNER_FOCUS); + gBattlescriptCurrInstr = BattleScript_FlinchPrevention; + RESET_RETURN + } + else + { + gBattlescriptCurrInstr++; + break; + } + } + else + { + if (BankGetTurnOrder(gEffectBank) > gCurrentMoveTurn) + gBattleMons[gEffectBank].status2 |= gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]; + INCREMENT_RESET_RETURN + } + break; + case MOVE_EFFECT_UPROAR: + if (gBattleMons[gEffectBank].status2 & STATUS2_UPROAR) + { + gBattlescriptCurrInstr++; + } + else + { + gBattleMons[gEffectBank].status2 |= STATUS2_MULTIPLETURNS; + gLockedMoves[gEffectBank] = gCurrentMove; + gBattleMons[gEffectBank].status2 |= ((Random() & 3) + 2) << 4; + + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + } + break; + case MOVE_EFFECT_PAYDAY: + if (GET_BANK_SIDE(gBankAttacker) == SIDE_PLAYER) + { + u16 PayDay = gPaydayMoney; + gPaydayMoney += (gBattleMons[gBankAttacker].level * 5); + if (PayDay > gPaydayMoney) + gPaydayMoney = 0xFFFF; + } + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + break; + case MOVE_EFFECT_TRI_ATTACK: + if (gBattleMons[gEffectBank].status1) + { + gBattlescriptCurrInstr++; + } + else + { + gBattleCommunication[MOVE_EFFECT_BYTE] = Random() % 3 + 3; + SetMoveEffect(FALSE, 0); + } + break; + case MOVE_EFFECT_CHARGING: + gBattleMons[gEffectBank].status2 |= STATUS2_MULTIPLETURNS; + gLockedMoves[gEffectBank] = gCurrentMove; + gProtectStructs[gEffectBank].chargingTurn = 1; + gBattlescriptCurrInstr++; + break; + case MOVE_EFFECT_WRAP: + if (gBattleMons[gEffectBank].status2 & STATUS2_WRAPPED) + { + gBattlescriptCurrInstr++; + } + else + { + gBattleMons[gEffectBank].status2 |= ((Random() & 3) + 2) << 0xD; + + *(gBattleStruct->wrappedMove + gEffectBank * 2 + 0) = gCurrentMove; + *(gBattleStruct->wrappedMove + gEffectBank * 2 + 1) = gCurrentMove >> 8; + *(gBattleStruct->wrappedBy + gEffectBank) = gBankAttacker; + + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + + for (gBattleCommunication[MULTISTRING_CHOOSER] = 0; gBattleCommunication[MULTISTRING_CHOOSER] <= 4; gBattleCommunication[MULTISTRING_CHOOSER]++) + { + if (gCurrentMove == gTrappingMoves[gBattleCommunication[MULTISTRING_CHOOSER]]) + break; + } + } + break; + case MOVE_EFFECT_RECOIL_25: // 25% recoil + gBattleMoveDamage = (gHpDealt) / 4; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + break; + case 15 ... 21: // stat + 1 + if (ChangeStatBuffs(0x10, gBattleCommunication[MOVE_EFFECT_BYTE] + 0xF2, affectsUser, 0)) + { + gBattlescriptCurrInstr++; + } + else + { + gBattleScripting.animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & 0x3F; + gBattleScripting.animArg2 = 0; + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_StatUp; + } + break; + case 22 ... 28: // stat - 1 + if (ChangeStatBuffs(~(0x6f), gBattleCommunication[MOVE_EFFECT_BYTE] + 0xEB, affectsUser, 0)) + { + gBattlescriptCurrInstr++; + } + else + { + gBattleScripting.animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & 0x3F; + gBattleScripting.animArg2 = 0; + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_StatDown; + } + break; + case 39 ... 45: // stat + 2 + if (ChangeStatBuffs(0x20, gBattleCommunication[MOVE_EFFECT_BYTE] + 0xDA, affectsUser, 0)) + { + gBattlescriptCurrInstr++; + } + else + { + gBattleScripting.animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & 0x3F; + gBattleScripting.animArg2 = 0; + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_StatUp; + } + break; + case 46 ... 52: // stat - 2 + if (ChangeStatBuffs(~(0x5f), gBattleCommunication[MOVE_EFFECT_BYTE] + 0xD3, affectsUser, 0)) + { + gBattlescriptCurrInstr++; + } + else + { + gBattleScripting.animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & 0x3F; + gBattleScripting.animArg2 = 0; + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_StatDown; + } + break; + case MOVE_EFFECT_RECHARGE: + gBattleMons[gEffectBank].status2 |= STATUS2_RECHARGE; + gDisableStructs[gEffectBank].rechargeCounter = 2; + gLockedMoves[gEffectBank] = gCurrentMove; + gBattlescriptCurrInstr++; + break; + case MOVE_EFFECT_RAGE: + gBattleMons[gBankAttacker].status2 |= STATUS2_RAGE; + gBattlescriptCurrInstr++; + break; + case MOVE_EFFECT_STEAL_ITEM: + { + if (gBattleTypeFlags & BATTLE_TYPE_x4000000) + { + gBattlescriptCurrInstr++; + break; + } + + side = GetBankSide(gBankAttacker); + if (GetBankSide(gBankAttacker) == SIDE_OPPONENT + && !(gBattleTypeFlags & + (BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_FRONTIER + | BATTLE_TYPE_LINK + | BATTLE_TYPE_x2000000 + | BATTLE_TYPE_SECRET_BASE))) + { + gBattlescriptCurrInstr++; + break; + } + if (!(gBattleTypeFlags & + (BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_FRONTIER + | BATTLE_TYPE_LINK + | BATTLE_TYPE_x2000000 + | BATTLE_TYPE_SECRET_BASE)) + && (gWishFutureKnock.knockedOffPokes[side] & gBitTable[gBattlePartyID[gBankAttacker]])) + { + gBattlescriptCurrInstr++; + break; + } + if (gBattleMons[gBankTarget].item + && gBattleMons[gBankTarget].ability == ABILITY_STICKY_HOLD) + { + b_movescr_stack_push_cursor(); + gBattlescriptCurrInstr = BattleScript_NoItemSteal; + + gLastUsedAbility = gBattleMons[gBankTarget].ability; + RecordAbilityBattle(gBankTarget, gLastUsedAbility); + + break; + } + if (gBattleMons[gBankAttacker].item) + { + gBattlescriptCurrInstr++; + break; + } + if (gBattleMons[gBankTarget].item == ITEM_ENIGMA_BERRY) + { + gBattlescriptCurrInstr++; + break; + } + if (gBattleMons[gBankTarget].item > 0x78 + && gBattleMons[gBankTarget].item < (0x79 + 12)) + { + gBattlescriptCurrInstr++; + break; + } + if (gBattleMons[gBankTarget].item == 0) + { + gBattlescriptCurrInstr++; + break; + } + + *(u16*)((u8*)((gBattleStruct->field_D0) + gBankAttacker * 2)) = gLastUsedItem = gBattleMons[gBankTarget].item; + gBattleMons[gBankTarget].item = 0; + + gActiveBank = gBankAttacker; + EmitSetAttributes(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gLastUsedItem); + MarkBufferBankForExecution(gBankAttacker); + + gActiveBank = gBankTarget; + EmitSetAttributes(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gBankTarget].item); + MarkBufferBankForExecution(gBankTarget); + + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_ItemSteal; + + *(u8*)((u8*)(&gBattleStruct->choicedMove[gBankTarget]) + 0) = 0; + *(u8*)((u8*)(&gBattleStruct->choicedMove[gBankTarget]) + 1) = 0; + } + break; + case MOVE_EFFECT_PREVENT_ESCAPE: + gBattleMons[gBankTarget].status2 |= STATUS2_ESCAPE_PREVENTION; + gDisableStructs[gBankTarget].bankPreventingEscape = gBankAttacker; + gBattlescriptCurrInstr++; + break; + case MOVE_EFFECT_NIGHTMARE: + gBattleMons[gBankTarget].status2 |= STATUS2_NIGHTMARE; + gBattlescriptCurrInstr++; + break; + case MOVE_EFFECT_ALL_STATS_UP: + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_AllStatsUp; + break; + case MOVE_EFFECT_RAPIDSPIN: + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_RapidSpinAway; + break; + case MOVE_EFFECT_REMOVE_PARALYSIS: // Smelling salts + if (!(gBattleMons[gBankTarget].status1 & STATUS_PARALYSIS)) + { + gBattlescriptCurrInstr++; + } + else + { + gBattleMons[gBankTarget].status1 &= ~(STATUS_PARALYSIS); + + gActiveBank = gBankTarget; + EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gBankTarget].status1); + MarkBufferBankForExecution(gActiveBank); + + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_TargetPRLZHeal; + } + break; + case MOVE_EFFECT_ATK_DEF_DOWN: // SuperPower + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_AtkDefDown; + break; + case MOVE_EFFECT_RECOIL_33_PARALYSIS: // Volt Tackle + gBattleMoveDamage = gHpDealt / 3; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + break; + case MOVE_EFFECT_THRASH: + if (gBattleMons[gEffectBank].status2 & STATUS2_LOCK_CONFUSE) + { + gBattlescriptCurrInstr++; + } + else + { + gBattleMons[gEffectBank].status2 |= STATUS2_MULTIPLETURNS; + gLockedMoves[gEffectBank] = gCurrentMove; + gBattleMons[gEffectBank].status2 |= (((Random() & 1) + 2) << 0xA); + } + break; + case MOVE_EFFECT_KNOCK_OFF: + if (gBattleMons[gEffectBank].ability == ABILITY_STICKY_HOLD) + { + if (gBattleMons[gEffectBank].item == 0) + { + gBattlescriptCurrInstr++; + } + else + { + gLastUsedAbility = ABILITY_STICKY_HOLD; + gBattlescriptCurrInstr = BattleScript_NoItemSteal; + RecordAbilityBattle(gEffectBank, ABILITY_STICKY_HOLD); + } + break; + } + if (gBattleMons[gEffectBank].item == 0) + { + gBattlescriptCurrInstr++; + } + else + { + side = GetBankSide(gEffectBank); + + gLastUsedItem = gBattleMons[gEffectBank].item; + gBattleMons[gEffectBank].item = 0; + gWishFutureKnock.knockedOffPokes[side] |= gBitTable[gBattlePartyID[gEffectBank]]; + + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_KnockedOff; + + *(u8*)((u8*)(&gBattleStruct->choicedMove[gEffectBank]) + 0) = 0; + *(u8*)((u8*)(&gBattleStruct->choicedMove[gEffectBank]) + 1) = 0; + } + break; + default: + gBattlescriptCurrInstr++; + break; + case MOVE_EFFECT_SP_ATK_TWO_DOWN: // Overheat + b_movescr_stack_push(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_SAtkDown2; + break; + } + } + } + + gBattleCommunication[MOVE_EFFECT_BYTE] = 0; +} diff --git a/sym_ewram.txt b/sym_ewram.txt index fe6ccdcbd..e1238a0cf 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -313,7 +313,7 @@ gUnknown_0202407A: @ 202407A gTurnOrder: @ 202407E .space 0x4 -gUnknown_02024082: @ 2024082 +gCurrentMoveTurn: @ 2024082 .space 0x1 gFightStateTracker: @ 2024083 @@ -406,7 +406,7 @@ gUnknown_02024258: @ 2024258 gUnknown_02024260: @ 2024260 .space 0x8 -gUnknown_02024268: @ 2024268 +gLockedMoves: @ 2024268 .space 0x8 gUnknown_02024270: @ 2024270 @@ -445,7 +445,7 @@ gDisableStructs: @ 20242BC gPauseCounterBattle: @ 202432C .space 0x2 -gUnknown_0202432E: @ 202432E +gPaydayMoney: @ 202432E .space 0x2 gUnknown_02024330: @ 2024330 From cf26b0e125aef07052b333139c33a6bbe1088f96 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 20 Sep 2017 22:55:37 +0200 Subject: [PATCH 258/342] forgot save lol --- src/battle_4.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/battle_4.c b/src/battle_4.c index a51da55bf..6e71a6a57 100644 --- a/src/battle_4.c +++ b/src/battle_4.c @@ -2351,7 +2351,6 @@ void SetMoveEffect(bool8 primary, u8 certain) else { u8 side; - u32 statusFlag = switch (gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]) { case MOVE_EFFECT_CONFUSION: From 9ed9f7de941d5b89a1c6d6241b3bbb5726aa99e8 Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Wed, 20 Sep 2017 14:38:05 -0500 Subject: [PATCH 259/342] Finish renaming strings in strings.s --- asm/battle_frontier_2.s | 236 +++--- asm/battle_interface.s | 8 +- asm/battle_message.s | 4 +- asm/battle_records.s | 6 +- asm/berry_blender.s | 6 +- asm/berry_tag_screen.s | 10 +- asm/cable_club.s | 2 +- asm/clear_save_data_screen.s | 4 +- asm/contest.s | 10 +- asm/contest_link_80F57C4.s | 14 +- asm/daycare.s | 10 +- asm/decoration.s | 42 +- asm/diploma.s | 6 +- asm/easy_chat.s | 36 +- asm/egg_hatch.s | 4 +- asm/evolution_scene.s | 2 +- asm/field_player_avatar.s | 8 +- asm/field_poison.s | 2 +- asm/field_region_map.s | 2 +- asm/fldeff_80F9BCC.s | 4 +- asm/fldeff_softboiled.s | 4 +- asm/item_menu.s | 20 +- asm/item_use.s | 4 +- asm/learn_move.s | 20 +- asm/lilycove_lady.s | 2 +- asm/link.s | 250 +++--- asm/mail.s | 4 +- asm/main_menu.s | 8 +- asm/mauville_old_man.s | 6 +- asm/menu.s | 8 +- asm/money.s | 2 +- asm/mystery_event_menu.s | 12 +- asm/mystery_event_script.s | 2 +- asm/naming_screen.s | 2 +- asm/option_menu.s | 30 +- asm/party_menu.s | 186 ++--- asm/player_pc.s | 28 +- asm/pokeblock_feed.s | 6 +- asm/pokemon_storage_system.s | 6 +- asm/pokemon_summary_screen.s | 92 +-- asm/pokenav.s | 50 +- asm/record_mixing.s | 4 +- asm/region_map.s | 6 +- asm/reset_rtc_screen.s | 22 +- asm/rom6.s | 50 +- asm/save_failed_screen.s | 16 +- asm/script_menu.s | 28 +- asm/secret_base.s | 8 +- asm/shop.s | 34 +- asm/slot_machine.s | 10 +- asm/start_menu.s | 8 +- asm/trade.s | 20 +- asm/trader.s | 4 +- asm/trainer_card.s | 58 +- asm/tv.s | 86 +- asm/use_pokeblock.s | 10 +- asm/walda_phrase.s | 2 +- asm/wallclock.s | 6 +- data/battle_message.s | 4 +- data/link.s | 130 +-- data/strings.s | 1436 ++++++++++++++++++---------------- src/item.c | 12 +- src/pokemon_size_record.c | 8 +- src/start_menu.c | 8 +- 64 files changed, 1600 insertions(+), 1528 deletions(-) diff --git a/asm/battle_frontier_2.s b/asm/battle_frontier_2.s index 40f084a0f..8a9b0ba24 100755 --- a/asm/battle_frontier_2.s +++ b/asm/battle_frontier_2.s @@ -2398,7 +2398,7 @@ sub_819B9B4: @ 819B9B4 movs r0, 0 movs r1, 0 bl FillWindowPixelBuffer - ldr r2, =gUnknown_085EEBB2 + ldr r2, =gText_RentalPkmn2 movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -2481,20 +2481,20 @@ sub_819BA64: @ 819BA64 ldrb r0, [r0, 0x5] cmp r0, 0x1 bne _0819BA88 - ldr r2, =gUnknown_085EEBC1 + ldr r2, =gText_SelectFirstPkmn b _0819BA9C .pool _0819BA88: cmp r0, 0x2 bne _0819BA94 - ldr r2, =gUnknown_085EEBDB + ldr r2, =gText_SelectSecondPkmn b _0819BA9C .pool _0819BA94: - ldr r2, =gUnknown_085EEC2D + ldr r2, =gText_TheseThreePkmnOkay cmp r0, 0x3 bne _0819BA9C - ldr r2, =gUnknown_085EEBF6 + ldr r2, =gText_SelectThirdPkmn _0819BA9C: movs r0, 0x5 str r0, [sp] @@ -2521,7 +2521,7 @@ sub_819BAC8: @ 819BAC8 movs r0, 0x2 movs r1, 0 bl FillWindowPixelBuffer - ldr r2, =gUnknown_085EEC50 + ldr r2, =gText_CantSelectSamePkmn movs r0, 0x5 str r0, [sp] movs r0, 0 @@ -2560,7 +2560,7 @@ sub_819BAFC: @ 819BAFC str r4, [sp] movs r6, 0 str r6, [sp, 0x4] - ldr r0, =gUnknown_085EEC15 + ldr r0, =gText_Summary str r0, [sp, 0x8] movs r0, 0x3 movs r1, 0x1 @@ -2571,7 +2571,7 @@ sub_819BAFC: @ 819BAFC beq _0819BB60 str r4, [sp] str r6, [sp, 0x4] - ldr r0, =gUnknown_085EEC24 + ldr r0, =gText_Deselect str r0, [sp, 0x8] movs r0, 0x3 movs r1, 0x1 @@ -2583,7 +2583,7 @@ sub_819BAFC: @ 819BAFC _0819BB60: str r4, [sp] str r5, [sp, 0x4] - ldr r0, =gUnknown_085EEC10 + ldr r0, =gText_Rent str r0, [sp, 0x8] movs r0, 0x3 movs r1, 0x1 @@ -2595,7 +2595,7 @@ _0819BB74: str r0, [sp] movs r0, 0 str r0, [sp, 0x4] - ldr r0, =gUnknown_085EEC1D + ldr r0, =gText_Others2 str r0, [sp, 0x8] movs r0, 0x3 movs r1, 0x1 @@ -2625,7 +2625,7 @@ sub_819BBA8: @ 819BBA8 str r5, [sp] movs r4, 0 str r4, [sp, 0x4] - ldr r0, =gUnknown_085EEC49 + ldr r0, =gText_Yes2 str r0, [sp, 0x8] movs r0, 0x4 movs r1, 0x1 @@ -2634,7 +2634,7 @@ sub_819BBA8: @ 819BBA8 bl box_print str r5, [sp] str r4, [sp, 0x4] - ldr r0, =gUnknown_085EEC4D + ldr r0, =gText_No2 str r0, [sp, 0x8] movs r0, 0x4 movs r1, 0x1 @@ -4584,7 +4584,7 @@ sub_819CC24: @ 819CC24 ldrsh r5, [r4, r0] cmp r5, 0 bne _0819CC5A - ldr r0, =gUnknown_085EECBB + ldr r0, =gText_QuitSwapping bl sub_819EBEC ldr r0, =gUnknown_03001284 ldr r0, [r0] @@ -4670,7 +4670,7 @@ sub_819CCD4: @ 819CCD4 adds r1, 0x30 movs r2, 0x1 bl sub_819F2B4 - ldr r0, =gUnknown_085EECF0 + ldr r0, =gText_AcceptThisPkmn bl sub_819EBEC ldr r0, [r4] adds r0, 0x20 @@ -6176,12 +6176,12 @@ _0819D948: ldrb r0, [r0, 0x14] cmp r0, 0 bne _0819D964 - ldr r0, =gUnknown_085EEC73 + ldr r0, =gText_SelectPkmnToSwap bl sub_819EBEC b _0819D96A .pool _0819D964: - ldr r0, =gUnknown_085EEC8B + ldr r0, =gText_SelectPkmnToAccept bl sub_819EBEC _0819D96A: ldr r0, =gUnknown_03001284 @@ -6765,7 +6765,7 @@ _0819DF02: b _0819E006 .pool _0819DF10: - ldr r0, =gUnknown_085EEC73 + ldr r0, =gText_SelectPkmnToSwap bl sub_819EBEC movs r0, 0x2 bl PutWindowTilemap @@ -8272,7 +8272,7 @@ sub_819EB18: @ 819EB18 movs r0, 0 movs r1, 0x11 bl FillWindowPixelBuffer - ldr r2, =gUnknown_085EEC66 + ldr r2, =gText_PkmnSwap movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -8402,7 +8402,7 @@ sub_819EC20: @ 819EC20 str r5, [sp] movs r4, 0 str r4, [sp, 0x4] - ldr r0, =gUnknown_085EECAA + ldr r0, =gText_Summary2 str r0, [sp, 0x8] movs r0, 0x3 movs r1, 0x1 @@ -8411,7 +8411,7 @@ sub_819EC20: @ 819EC20 bl box_print str r5, [sp] str r4, [sp, 0x4] - ldr r0, =gUnknown_085EECA5 + ldr r0, =gText_Swap str r0, [sp, 0x8] movs r0, 0x3 movs r1, 0x1 @@ -8420,7 +8420,7 @@ sub_819EC20: @ 819EC20 bl box_print str r5, [sp] str r4, [sp, 0x4] - ldr r0, =gUnknown_085EECB2 + ldr r0, =gText_Rechoose str r0, [sp, 0x8] movs r0, 0x3 movs r1, 0x1 @@ -8450,7 +8450,7 @@ sub_819EC94: @ 819EC94 str r5, [sp] movs r4, 0 str r4, [sp, 0x4] - ldr r0, =gUnknown_085EECCA + ldr r0, =gText_Yes3 str r0, [sp, 0x8] movs r0, 0x4 movs r1, 0x1 @@ -8459,7 +8459,7 @@ sub_819EC94: @ 819EC94 bl box_print str r5, [sp] str r4, [sp, 0x4] - ldr r0, =gUnknown_085EECCE + ldr r0, =gText_No3 str r0, [sp, 0x8] movs r0, 0x4 movs r1, 0x1 @@ -8523,12 +8523,12 @@ sub_819ED34: @ 819ED34 beq _0819ED56 cmp r0, 0x1 bne _0819ED60 - ldr r0, =gUnknown_085EECD1 + ldr r0, =gText_PkmnForSwap movs r1, 0 movs r2, 0x5 bl sub_819ECF0 _0819ED56: - ldr r0, =gUnknown_085EECDD + ldr r0, =gText_Cancel3 movs r1, 0x18 movs r2, 0x5 bl sub_819ECF0 @@ -8554,12 +8554,12 @@ sub_819ED78: @ 819ED78 beq _0819ED9A cmp r0, 0x1 bne _0819EDA4 - ldr r0, =gUnknown_085EECD1 + ldr r0, =gText_PkmnForSwap movs r1, 0x8 movs r2, 0x3 bl sub_819ECF0 _0819ED9A: - ldr r0, =gUnknown_085EECDD + ldr r0, =gText_Cancel3 movs r1, 0x20 movs r2, 0x3 bl sub_819ECF0 @@ -8588,14 +8588,14 @@ _0819EDCC: ldrb r0, [r0, 0x14] cmp r0, 0x1 bne _0819EDF6 - ldr r0, =gUnknown_085EECD1 + ldr r0, =gText_PkmnForSwap movs r1, 0x8 movs r2, 0x3 bl sub_819ECF0 b _0819EDF6 .pool _0819EDEC: - ldr r0, =gUnknown_085EECDD + ldr r0, =gText_Cancel3 movs r1, 0x20 movs r2, 0x3 bl sub_819ECF0 @@ -9401,7 +9401,7 @@ _0819F4C8: .4byte _0819F548 .4byte _0819F568 _0819F4DC: - ldr r0, =gUnknown_085EED0A + ldr r0, =gText_SamePkmnInPartyAlready bl sub_819EBEC ldr r0, =gUnknown_03001284 ldr r0, [r0] @@ -9446,7 +9446,7 @@ _0819F52C: bl CopyWindowToVram b _0819F54E _0819F548: - ldr r0, =gUnknown_085EEC8B + ldr r0, =gText_SelectPkmnToAccept bl sub_819EBEC _0819F54E: ldr r0, =gTasks @@ -11469,9 +11469,9 @@ _081A0528: movs r0, 0x12 mov r10, r0 movs r6, 0x8 - ldr r0, =gUnknown_085EAEB1 + ldr r0, =gText_Lv50 str r0, [sp, 0xC] - ldr r0, =gUnknown_085EAEB8 + ldr r0, =gText_OpenLevel str r0, [sp, 0x10] b _081A0652 .pool @@ -11580,9 +11580,9 @@ _081A061C: movs r0, 0x12 mov r10, r0 movs r6, 0x8 - ldr r0, =gUnknown_085ED193 + ldr r0, =gText_Give str r0, [sp, 0xC] - ldr r0, =gUnknown_085ED198 + ldr r0, =gText_NoNeed str r0, [sp, 0x10] b _081A0652 .pool @@ -11590,9 +11590,9 @@ _081A0634: movs r1, 0x14 mov r10, r1 movs r6, 0x8 - ldr r0, =gUnknown_085EAE62 + ldr r0, =gText_Yes str r0, [sp, 0xC] - ldr r0, =gUnknown_085EAE66 + ldr r0, =gText_No str r0, [sp, 0x10] b _081A0652 .pool @@ -12950,11 +12950,11 @@ _081A1140: ands r0, r1 cmp r0, 0x1 bne _081A115C - ldr r1, =gUnknown_085EAEB1 + ldr r1, =gText_Lv50 b _081A1174 .pool _081A115C: - ldr r1, =gUnknown_085EAEB8 + ldr r1, =gText_OpenLevel b _081A1174 .pool _081A1164: @@ -14386,7 +14386,7 @@ _081A1D24: movs r3, 0x4 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE302 + ldr r1, =gText_WinStreak adds r0, r4, 0 bl StringExpandPlaceholders mov r1, r10 @@ -14434,7 +14434,7 @@ sub_81A1D78: @ 81A1D78 adds r4, r0 adds r4, r1 ldrh r1, [r4] - ldr r0, =gUnknown_085EE319 + ldr r0, =gText_Record str r5, [sp] bl sub_81A1CD8 add sp, 0x4 @@ -14545,7 +14545,7 @@ _081A1E66: lsrs r0, 24 cmp r0, 0x1 bne _081A1E88 - ldr r0, =gUnknown_085EE311 + ldr r0, =gText_Current str r7, [sp] adds r1, r4, 0 mov r2, r8 @@ -14554,7 +14554,7 @@ _081A1E66: b _081A1E96 .pool _081A1E88: - ldr r0, =gUnknown_085EE320 + ldr r0, =gText_Prev str r7, [sp] adds r1, r4, 0 mov r2, r8 @@ -14593,7 +14593,7 @@ sub_81A1EA8: @ 81A1EA8 cmp r7, 0 bne _081A1EF0 ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EE158 + ldr r1, =gText_SingleBattleRoomResults bl StringExpandPlaceholders b _081A1F28 .pool @@ -14601,7 +14601,7 @@ _081A1EF0: cmp r7, 0x1 bne _081A1F08 ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EE178 + ldr r1, =gText_DoubleBattleRoomResults bl StringExpandPlaceholders b _081A1F28 .pool @@ -14609,13 +14609,13 @@ _081A1F08: cmp r7, 0x2 bne _081A1F20 ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EE198 + ldr r1, =gText_MultiBattleRoomResults bl StringExpandPlaceholders b _081A1F28 .pool _081A1F20: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EE1B7 + ldr r1, =gText_LinkMultiBattleRoomResults bl StringExpandPlaceholders _081A1F28: ldr r0, =gStringVar4 @@ -14623,7 +14623,7 @@ _081A1F28: bl sub_81A1C4C ldr r6, =gUnknown_0203AB74 ldrb r0, [r6] - ldr r2, =gUnknown_085EE2F2 + ldr r2, =gText_Lv502 movs r1, 0x31 mov r8, r1 str r1, [sp] @@ -14635,7 +14635,7 @@ _081A1F28: movs r3, 0x10 bl PrintTextOnWindow ldrb r0, [r6] - ldr r2, =gUnknown_085EE2F9 + ldr r2, =gText_OpenLv movs r1, 0x61 mov r9, r1 str r1, [sp] @@ -14830,8 +14830,8 @@ _081A20E6: lsrs r0, 24 cmp r0, 0x1 bne _081A210C - ldr r0, =gUnknown_085EE311 - ldr r1, =gUnknown_085EE338 + ldr r0, =gText_Current + ldr r1, =gText_ClearStreak str r7, [sp] str r4, [sp, 0x4] mov r2, r8 @@ -14840,8 +14840,8 @@ _081A20E6: b _081A211C .pool _081A210C: - ldr r0, =gUnknown_085EE320 - ldr r1, =gUnknown_085EE338 + ldr r0, =gText_Prev + ldr r1, =gText_ClearStreak str r7, [sp] str r4, [sp, 0x4] mov r2, r8 @@ -14881,13 +14881,13 @@ sub_81A2134: @ 81A2134 cmp r7, 0 bne _081A217C ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EE1DB + ldr r1, =gText_SingleBattleTourneyResults bl StringExpandPlaceholders b _081A2184 .pool _081A217C: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EE1FE + ldr r1, =gText_DoubleBattleTourneyResults bl StringExpandPlaceholders _081A2184: ldr r0, =gStringVar4 @@ -14895,7 +14895,7 @@ _081A2184: bl sub_81A1C4C ldr r1, =gUnknown_0203AB74 ldrb r0, [r1] - ldr r2, =gUnknown_085EE2F2 + ldr r2, =gText_Lv502 movs r6, 0x21 str r6, [sp] movs r5, 0xFF @@ -14907,7 +14907,7 @@ _081A2184: bl PrintTextOnWindow ldr r1, =gUnknown_0203AB74 ldrb r0, [r1] - ldr r2, =gUnknown_085EE2F9 + ldr r2, =gText_OpenLv movs r1, 0x61 str r1, [sp] str r5, [sp, 0x4] @@ -14935,13 +14935,13 @@ _081A2184: str r0, [sp] movs r0, 0x31 str r0, [sp, 0x4] - ldr r0, =gUnknown_085EE319 - ldr r1, =gUnknown_085EE338 + ldr r0, =gText_Record + ldr r1, =gText_ClearStreak movs r3, 0x40 bl sub_81A2008 - ldr r1, =gUnknown_085EE332 + ldr r1, =gText_Total mov r10, r1 - ldr r0, =gUnknown_085EE349 + ldr r0, =gText_Championships mov r8, r0 ldr r0, [r4] ldr r1, =0x00000d1c @@ -14972,8 +14972,8 @@ _081A2184: str r0, [sp] movs r0, 0x71 str r0, [sp, 0x4] - ldr r0, =gUnknown_085EE319 - ldr r1, =gUnknown_085EE338 + ldr r0, =gText_Record + ldr r1, =gText_ClearStreak movs r3, 0x40 bl sub_81A2008 ldr r0, [r4] @@ -15052,7 +15052,7 @@ _081A2304: movs r3, 0x4 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE302 + ldr r1, =gText_WinStreak adds r0, r4, 0 bl StringExpandPlaceholders mov r1, r10 @@ -15100,7 +15100,7 @@ sub_81A2358: @ 81A2358 adds r4, r0 adds r4, r1 ldrh r1, [r4] - ldr r0, =gUnknown_085EE319 + ldr r0, =gText_Record str r5, [sp] bl sub_81A22B8 add sp, 0x4 @@ -15186,7 +15186,7 @@ _081A241E: lsrs r0, 24 cmp r0, 0x1 bne _081A2440 - ldr r0, =gUnknown_085EE311 + ldr r0, =gText_Current str r7, [sp] adds r1, r4, 0 mov r2, r8 @@ -15195,7 +15195,7 @@ _081A241E: b _081A244E .pool _081A2440: - ldr r0, =gUnknown_085EE320 + ldr r0, =gText_Prev str r7, [sp] adds r1, r4, 0 mov r2, r8 @@ -15234,13 +15234,13 @@ sub_81A2460: @ 81A2460 cmp r7, 0 bne _081A24A8 ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EE221 + ldr r1, =gText_SingleBattleHallResults bl StringExpandPlaceholders b _081A24B0 .pool _081A24A8: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EE241 + ldr r1, =gText_DoubleBattleHallResults bl StringExpandPlaceholders _081A24B0: ldr r0, =gStringVar4 @@ -15248,7 +15248,7 @@ _081A24B0: bl sub_81A1C4C ldr r6, =gUnknown_0203AB74 ldrb r0, [r6] - ldr r2, =gUnknown_085EE2F2 + ldr r2, =gText_Lv502 movs r1, 0x31 mov r8, r1 str r1, [sp] @@ -15260,7 +15260,7 @@ _081A24B0: movs r3, 0x10 bl PrintTextOnWindow ldrb r0, [r6] - ldr r2, =gUnknown_085EE2F9 + ldr r2, =gText_OpenLv movs r1, 0x61 mov r9, r1 str r1, [sp] @@ -15434,8 +15434,8 @@ _081A264C: lsrs r0, 24 cmp r0, 0x1 bne _081A2674 - ldr r0, =gUnknown_085EE311 - ldr r1, =gUnknown_085EE35B + ldr r0, =gText_Current + ldr r1, =gText_RoomsCleared str r5, [sp] str r6, [sp, 0x4] adds r2, r7, 0 @@ -15444,8 +15444,8 @@ _081A264C: b _081A2684 .pool _081A2674: - ldr r0, =gUnknown_085EE320 - ldr r1, =gUnknown_085EE35B + ldr r0, =gText_Prev + ldr r1, =gText_RoomsCleared str r5, [sp] str r6, [sp, 0x4] adds r2, r7, 0 @@ -15480,14 +15480,14 @@ sub_81A2698: @ 81A2698 movs r1, 0x11 bl FillWindowPixelBuffer ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE261 + ldr r1, =gText_BattleChoiceResults adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0 bl sub_81A1C4C ldrb r0, [r6] - ldr r2, =gUnknown_085EE2F2 + ldr r2, =gText_Lv502 movs r1, 0x21 str r1, [sp] movs r5, 0xFF @@ -15498,7 +15498,7 @@ sub_81A2698: @ 81A2698 movs r3, 0x8 bl PrintTextOnWindow ldrb r0, [r6] - ldr r2, =gUnknown_085EE2F9 + ldr r2, =gText_OpenLv movs r1, 0x61 str r1, [sp] str r5, [sp, 0x4] @@ -15513,9 +15513,9 @@ sub_81A2698: @ 81A2698 movs r2, 0x72 movs r3, 0x21 bl sub_81A2618 - ldr r0, =gUnknown_085EE319 + ldr r0, =gText_Record mov r10, r0 - ldr r7, =gUnknown_085EE35B + ldr r7, =gText_RoomsCleared ldr r5, =gSaveBlock2Ptr ldr r0, [r5] ldr r1, =0x00000e08 @@ -15529,9 +15529,9 @@ sub_81A2698: @ 81A2698 adds r1, r7, 0 movs r3, 0x40 bl sub_81A258C - ldr r0, =gUnknown_085EE332 + ldr r0, =gText_Total mov r8, r0 - ldr r1, =gUnknown_085EE36D + ldr r1, =gText_TimesCleared mov r9, r1 ldr r0, [r5] ldr r1, =0x00000e0c @@ -15633,7 +15633,7 @@ _081A2834: movs r3, 0x4 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE381 + ldr r1, =gText_KOsInARow adds r0, r4, 0 bl StringExpandPlaceholders mov r1, r10 @@ -15678,7 +15678,7 @@ sub_81A2888: @ 81A2888 adds r1, r2 adds r1, r0 ldrh r1, [r1] - ldr r0, =gUnknown_085EE319 + ldr r0, =gText_Record str r3, [sp] adds r2, r4, 0 adds r3, r5, 0 @@ -15743,7 +15743,7 @@ _081A2928: lsrs r0, 24 cmp r0, 0x1 bne _081A2948 - ldr r0, =gUnknown_085EE311 + ldr r0, =gText_Current str r6, [sp] adds r1, r5, 0 adds r2, r7, 0 @@ -15752,7 +15752,7 @@ _081A2928: b _081A2956 .pool _081A2948: - ldr r0, =gUnknown_085EE320 + ldr r0, =gText_Prev str r6, [sp] adds r1, r5, 0 adds r2, r7, 0 @@ -15785,14 +15785,14 @@ sub_81A2968: @ 81A2968 movs r0, 0xA bl sub_81A1C90 ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE27C + ldr r1, =gText_SetKOTourneyResults adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x2 bl sub_81A1C4C ldrb r0, [r5] - ldr r2, =gUnknown_085EE2F2 + ldr r2, =gText_Lv502 movs r1, 0x31 str r1, [sp] movs r6, 0xFF @@ -15803,7 +15803,7 @@ sub_81A2968: @ 81A2968 movs r3, 0x10 bl PrintTextOnWindow ldrb r0, [r5] - ldr r2, =gUnknown_085EE2F9 + ldr r2, =gText_OpenLv movs r1, 0x61 str r1, [sp] str r6, [sp, 0x4] @@ -15896,7 +15896,7 @@ _081A2A80: movs r3, 0x4 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE302 + ldr r1, =gText_WinStreak adds r0, r4, 0 bl StringExpandPlaceholders mov r1, r10 @@ -15915,7 +15915,7 @@ _081A2A80: movs r2, 0x1 movs r3, 0x4 bl ConvertIntToDecimalStringN - ldr r1, =gUnknown_085EE392 + ldr r1, =gText_TimesVar1 adds r0, r4, 0 bl StringExpandPlaceholders mov r1, r10 @@ -15973,7 +15973,7 @@ sub_81A2B04: @ 81A2B04 adds r2, r0 adds r2, r1 ldrh r2, [r2] - ldr r0, =gUnknown_085EE319 + ldr r0, =gText_Record str r3, [sp] str r4, [sp, 0x4] str r5, [sp, 0x8] @@ -16102,7 +16102,7 @@ _081A2C3E: lsrs r0, 24 cmp r0, 0x1 bne _081A2C68 - ldr r0, =gUnknown_085EE311 + ldr r0, =gText_Current mov r1, r8 str r1, [sp] mov r1, r9 @@ -16116,7 +16116,7 @@ _081A2C3E: b _081A2C80 .pool _081A2C68: - ldr r0, =gUnknown_085EE320 + ldr r0, =gText_Prev mov r1, r8 str r1, [sp] mov r1, r9 @@ -16160,13 +16160,13 @@ sub_81A2C94: @ 81A2C94 cmp r7, 0 bne _081A2CD8 ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EE298 + ldr r1, =gText_BattleSwapSingleResults bl StringExpandPlaceholders b _081A2CE0 .pool _081A2CD8: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EE2B8 + ldr r1, =gText_BattleSwapDoubleResults bl StringExpandPlaceholders _081A2CE0: ldr r0, =gStringVar4 @@ -16175,7 +16175,7 @@ _081A2CE0: ldr r0, =gUnknown_0203AB74 mov r8, r0 ldrb r0, [r0] - ldr r2, =gUnknown_085EE2F2 + ldr r2, =gText_Lv502 movs r6, 0x21 str r6, [sp] movs r5, 0xFF @@ -16187,7 +16187,7 @@ _081A2CE0: bl PrintTextOnWindow mov r1, r8 ldrb r0, [r1] - ldr r2, =gUnknown_085EE326 + ldr r2, =gText_RentalSwap str r6, [sp] str r5, [sp, 0x4] str r4, [sp, 0x8] @@ -16196,7 +16196,7 @@ _081A2CE0: bl PrintTextOnWindow mov r1, r8 ldrb r0, [r1] - ldr r2, =gUnknown_085EE2F9 + ldr r2, =gText_OpenLv movs r1, 0x61 str r1, [sp] str r5, [sp, 0x4] @@ -16301,7 +16301,7 @@ _081A2E00: movs r3, 0x4 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE39C + ldr r1, =gText_FloorsCleared adds r0, r4, 0 bl StringExpandPlaceholders mov r1, r10 @@ -16346,7 +16346,7 @@ sub_81A2E54: @ 81A2E54 adds r1, r2 adds r1, r0 ldrh r1, [r1] - ldr r0, =gUnknown_085EE319 + ldr r0, =gText_Record str r3, [sp] adds r2, r4, 0 adds r3, r5, 0 @@ -16413,7 +16413,7 @@ _081A2EF8: lsrs r0, 24 cmp r0, 0x1 bne _081A2F18 - ldr r0, =gUnknown_085EE311 + ldr r0, =gText_Current str r6, [sp] adds r1, r5, 0 adds r2, r7, 0 @@ -16422,7 +16422,7 @@ _081A2EF8: b _081A2F26 .pool _081A2F18: - ldr r0, =gUnknown_085EE320 + ldr r0, =gText_Prev str r6, [sp] adds r1, r5, 0 adds r2, r7, 0 @@ -16453,14 +16453,14 @@ sub_81A2F38: @ 81A2F38 movs r1, 0x11 bl FillWindowPixelBuffer ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE2D8 + ldr r1, =gText_BattleQuestResults adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0x2 bl sub_81A1C4C ldrb r0, [r5] - ldr r2, =gUnknown_085EE2F2 + ldr r2, =gText_Lv502 movs r1, 0x31 str r1, [sp] movs r6, 0xFF @@ -16471,7 +16471,7 @@ sub_81A2F38: @ 81A2F38 movs r3, 0x8 bl PrintTextOnWindow ldrb r0, [r5] - ldr r2, =gUnknown_085EE2F9 + ldr r2, =gText_OpenLv movs r1, 0x61 str r1, [sp] str r6, [sp, 0x4] @@ -16532,7 +16532,7 @@ sub_81A2FF8: @ 81A2FF8 bl FillWindowPixelBuffer ldr r0, =gStringVar4 mov r9, r0 - ldr r1, =gUnknown_085EDF86 + ldr r1, =gText_LinkContestResults bl StringExpandPlaceholders movs r0, 0x1 mov r1, r9 @@ -16550,7 +16550,7 @@ sub_81A2FF8: @ 81A2FF8 str r5, [sp, 0x8] mov r2, r9 bl PrintTextOnWindow - ldr r7, =gUnknown_085EDFA0 + ldr r7, =gText_1st movs r0, 0x1 adds r1, r7, 0 movs r2, 0x26 @@ -16568,7 +16568,7 @@ sub_81A2FF8: @ 81A2FF8 movs r1, 0x1 adds r2, r7, 0 bl PrintTextOnWindow - ldr r7, =gUnknown_085EDFA4 + ldr r7, =gText_2nd movs r0, 0x1 adds r1, r7, 0 movs r2, 0x26 @@ -16585,7 +16585,7 @@ sub_81A2FF8: @ 81A2FF8 movs r1, 0x1 adds r2, r7, 0 bl PrintTextOnWindow - ldr r7, =gUnknown_085EDFA8 + ldr r7, =gText_3rd movs r0, 0x1 adds r1, r7, 0 movs r2, 0x26 @@ -16602,7 +16602,7 @@ sub_81A2FF8: @ 81A2FF8 movs r1, 0x1 adds r2, r7, 0 bl PrintTextOnWindow - ldr r7, =gUnknown_085EDFAC + ldr r7, =gText_4th movs r0, 0x1 adds r1, r7, 0 movs r2, 0x26 @@ -16620,7 +16620,7 @@ sub_81A2FF8: @ 81A2FF8 adds r2, r7, 0 bl PrintTextOnWindow ldrb r0, [r4] - ldr r2, =gUnknown_085EB0E8 + ldr r2, =gText_Cool movs r1, 0x29 str r1, [sp] str r6, [sp, 0x4] @@ -16629,7 +16629,7 @@ sub_81A2FF8: @ 81A2FF8 movs r3, 0x6 bl PrintTextOnWindow ldrb r0, [r4] - ldr r2, =gUnknown_085EB0ED + ldr r2, =gText_Beauty movs r1, 0x39 str r1, [sp] str r6, [sp, 0x4] @@ -16638,7 +16638,7 @@ sub_81A2FF8: @ 81A2FF8 movs r3, 0x6 bl PrintTextOnWindow ldrb r0, [r4] - ldr r2, =gUnknown_085EB0F4 + ldr r2, =gText_Cute movs r1, 0x49 str r1, [sp] str r6, [sp, 0x4] @@ -16647,7 +16647,7 @@ sub_81A2FF8: @ 81A2FF8 movs r3, 0x6 bl PrintTextOnWindow ldrb r0, [r4] - ldr r2, =gUnknown_085EB0F9 + ldr r2, =gText_Smart movs r1, 0x59 str r1, [sp] str r6, [sp, 0x4] @@ -16656,7 +16656,7 @@ sub_81A2FF8: @ 81A2FF8 movs r3, 0x6 bl PrintTextOnWindow ldrb r0, [r4] - ldr r2, =gUnknown_085EB0FF + ldr r2, =gText_Tough movs r1, 0x69 str r1, [sp] str r6, [sp, 0x4] @@ -18966,7 +18966,7 @@ sub_81A4594: @ 81A4594 ldrb r5, [r1] lsls r4, r0, 1 adds r4, r0 - ldr r1, =gUnknown_085EE424 + ldr r1, =gText_1Dot adds r4, r1 mov r1, r8 lsls r3, r1, 27 @@ -19076,7 +19076,7 @@ sub_81A4684: @ 81A4684 ldrb r0, [r1] lsls r2, r6, 1 adds r2, r6 - ldr r1, =gUnknown_085EE424 + ldr r1, =gText_1Dot adds r2, r1 lsls r3, r7, 27 lsrs r3, 24 diff --git a/asm/battle_interface.s b/asm/battle_interface.s index e5f031962..489366fe8 100755 --- a/asm/battle_interface.s +++ b/asm/battle_interface.s @@ -3760,7 +3760,7 @@ sub_80741E8: @ 80741E8 lsls r0, 24 lsrs r7, r0, 24 ldr r5, =gDisplayedStringBattle - ldr r1, =gUnknown_085ED228 + ldr r1, =gText_HighlightDarkGrey adds r0, r5, 0 bl StringCopy adds r0, r4, 0 @@ -3802,15 +3802,15 @@ _0807424A: beq _08074268 cmp r6, 0xFE beq _08074270 - ldr r1, =gUnknown_085ED238 + ldr r1, =gText_DynColor2 b _08074272 .pool _08074268: - ldr r1, =gUnknown_085ED22E + ldr r1, =gText_DynColor2Male b _08074272 .pool _08074270: - ldr r1, =gUnknown_085ED233 + ldr r1, =gText_DynColor1Female _08074272: adds r0, r5, 0 bl StringCopy diff --git a/asm/battle_message.s b/asm/battle_message.s index ef5ecbf9c..dfbf069b3 100644 --- a/asm/battle_message.s +++ b/asm/battle_message.s @@ -2051,12 +2051,12 @@ _0814F3C4: ldr r0, =0x000008ab bl FlagGet lsls r0, 24 - ldr r4, =gText_SomeonesPC + ldr r4, =gText_Someones cmp r0, 0 bne _0814F3D4 b _0814F5C0 _0814F3D4: - ldr r4, =gText_LanettesPC + ldr r4, =gText_Lanettes b _0814F5C0 .pool _0814F3E4: diff --git a/asm/battle_records.s b/asm/battle_records.s index 2c7b1d830..c961aefe3 100644 --- a/asm/battle_records.s +++ b/asm/battle_records.s @@ -488,7 +488,7 @@ sub_813C2F4: @ 813C2F4 movs r3, 0x4 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EF6A1 + ldr r1, =gText_TotalRecordWLD adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0x1 @@ -672,7 +672,7 @@ sub_813C4BC: @ 813C4BC movs r1, 0x11 bl FillWindowPixelBuffer ldr r5, =gStringVar4 - ldr r1, =gUnknown_085EF68D + ldr r1, =gText_PlayersBattleResults adds r0, r5, 0 bl StringExpandPlaceholders movs r0, 0x1 @@ -697,7 +697,7 @@ sub_813C4BC: @ 813C4BC mov r9, r1 add r0, r9 bl sub_813C2F4 - ldr r1, =gUnknown_085EF6BD + ldr r1, =gText_WinLoseDraw adds r0, r5, 0 bl StringExpandPlaceholders ldrb r0, [r6] diff --git a/asm/berry_blender.s b/asm/berry_blender.s index 73ff40796..0599fa153 100644 --- a/asm/berry_blender.s +++ b/asm/berry_blender.s @@ -5627,7 +5627,7 @@ _080827AA: ldr r0, [r6] ldr r1, =0x000011b8 adds r0, r1 - ldr r1, =gUnknown_085EE42D + ldr r1, =gText_SavingDontTurnOff2 movs r2, 0 bl sub_808417C bl sub_800ADF8 @@ -8350,7 +8350,7 @@ ShowBerryBlenderRecordWindow: @ 8083E24 ldrb r0, [r5] movs r1, 0x11 bl FillWindowPixelBuffer - ldr r6, =gUnknown_085EE44F + ldr r6, =gText_BlenderMaxSpeedRecord movs r0, 0x1 adds r1, r6, 0 movs r2, 0x90 @@ -8367,7 +8367,7 @@ ShowBerryBlenderRecordWindow: @ 8083E24 adds r2, r6, 0 bl PrintTextOnWindow ldrb r0, [r5] - ldr r2, =gUnknown_085EE473 + ldr r2, =gText_234Players movs r1, 0x29 str r1, [sp] str r4, [sp, 0x4] diff --git a/asm/berry_tag_screen.s b/asm/berry_tag_screen.s index b21a249bd..9622f0508 100644 --- a/asm/berry_tag_screen.s +++ b/asm/berry_tag_screen.s @@ -511,7 +511,7 @@ sub_8178090: @ 8178090 movs r0, 0x3 movs r1, 0xFF bl FillWindowPixelBuffer - ldr r4, =gUnknown_085E926B + ldr r4, =gText_BerryTag movs r0, 0x1 adds r1, r4, 0 movs r2, 0x40 @@ -573,7 +573,7 @@ sub_8178110: @ 8178110 adds r1, r6, 0 bl StringCopy ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9263 + ldr r1, =gText_UnkF908Var1Var2 adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0 @@ -602,7 +602,7 @@ sub_8178174: @ 8178174 ldrb r0, [r0] bl GetBerryInfo adds r4, r0, 0 - ldr r2, =gUnknown_085E9225 + ldr r2, =gText_SizeSlash movs r7, 0x1 str r7, [sp] movs r0, 0xFF @@ -652,7 +652,7 @@ _081781C8: movs r3, 0x2 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9233 + ldr r1, =gText_Var1DotVar2 adds r0, r4, 0 bl StringExpandPlaceholders str r7, [sp] @@ -694,7 +694,7 @@ itemid_copy_name: @ 8178250 ldrb r0, [r0] bl GetBerryInfo adds r6, r0, 0 - ldr r2, =gUnknown_085E922C + ldr r2, =gText_FirmSlash movs r5, 0x11 str r5, [sp] movs r0, 0xFF diff --git a/asm/cable_club.s b/asm/cable_club.s index 76d1dca06..80d9a0916 100644 --- a/asm/cable_club.s +++ b/asm/cable_club.s @@ -55,7 +55,7 @@ sub_80B23B0: @ 80B23B0 movs r1, 0 bl SetStandardWindowBorderStyle ldr r5, =gStringVar4 - ldr r1, =gUnknown_085EE667 + ldr r1, =gText_XPLink adds r0, r5, 0 bl StringExpandPlaceholders movs r0, 0x1 diff --git a/asm/clear_save_data_screen.s b/asm/clear_save_data_screen.s index 27c32feb5..5efff250c 100644 --- a/asm/clear_save_data_screen.s +++ b/asm/clear_save_data_screen.s @@ -33,7 +33,7 @@ sub_817ACE4: @ 817ACE4 movs r2, 0x2 movs r3, 0xE bl SetWindowBorderStyle - ldr r2, =gUnknown_085EFA8F + ldr r2, =gText_ClearAllSaveData movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -87,7 +87,7 @@ _0817AD68: movs r0, 0 movs r1, 0x11 bl FillWindowPixelBuffer - ldr r2, =gUnknown_085EFAAA + ldr r2, =gText_ClearingData movs r0, 0x1 str r0, [sp] str r4, [sp, 0x4] diff --git a/asm/contest.s b/asm/contest.s index 76effb4e7..493cc3733 100644 --- a/asm/contest.s +++ b/asm/contest.s @@ -1579,7 +1579,7 @@ _080D84B8: cmp r0, 0 beq _080D853C add r0, sp, 0x4 - ldr r1, =gUnknown_085ED1A0 + ldr r1, =gText_ColorLightShadowDarkGrey b _080D8566 .pool _080D853C: @@ -1603,7 +1603,7 @@ _080D853C: cmp r0, 0x3 beq _080D856C add r0, sp, 0x4 - ldr r1, =gUnknown_085ED1A7 + ldr r1, =gText_ColorBlue _080D8566: bl StringCopy adds r5, r0, 0 @@ -6407,7 +6407,7 @@ sub_80DAED4: @ 80DAED4 lsls r4, r1, 24 lsrs r4, 24 ldr r0, =gDisplayedStringBattle - ldr r1, =gUnknown_085ED1AB + ldr r1, =gText_ColorTransparent bl StringCopy adds r1, r0, 0 subs r0, r1, 0x1 @@ -15507,7 +15507,7 @@ _080DF784: mov r9, r0 _080DF7AE: add r0, sp, 0x4 - ldr r1, =gUnknown_085ED1B2 + ldr r1, =gText_CDot bl StringCopy adds r5, r0, 0 ldr r0, =gUnknown_02039F26 @@ -15604,7 +15604,7 @@ _080DF874: mov r10, r1 _080DF884: add r0, sp, 0x4 - ldr r1, =gUnknown_085ED1B5 + ldr r1, =gText_BDot bl StringCopy ldr r0, =gUnknown_02039F34 ldr r0, [r0] diff --git a/asm/contest_link_80F57C4.s b/asm/contest_link_80F57C4.s index bf7a88eb8..864f16c5e 100644 --- a/asm/contest_link_80F57C4.s +++ b/asm/contest_link_80F57C4.s @@ -283,7 +283,7 @@ sub_80F5A74: @ 80F5A74 ldrb r0, [r0] cmp r5, r0 bne _080F5A96 - ldr r1, =gUnknown_085ED21E + ldr r1, =gText_ColorDarkGrey adds r0, r6, 0 bl StringCopy adds r6, r0, 0 @@ -655,7 +655,7 @@ _080F5E2E: ands r0, r1 cmp r0, 0 beq _080F5E78 - ldr r0, =gUnknown_085ED207 + ldr r0, =gText_CommunicationStandby bl sub_80F707C ldr r0, =sub_80F5ED8 b _080F5EB8 @@ -784,7 +784,7 @@ sub_80F5F74: @ 80F5F74 ldr r0, =sub_80F68F0 movs r1, 0x14 bl CreateTask - ldr r0, =gUnknown_085ED1B8 + ldr r0, =gText_AnnouncingResults ldr r1, =gUnknown_0203A034 ldr r1, [r1] ldr r1, [r1] @@ -828,7 +828,7 @@ _080F5FF0: _080F5FF8: cmp r0, 0x3 bne _080F6030 - ldr r0, =gUnknown_085ED1D0 + ldr r0, =gText_PreliminaryResults ldr r1, =gUnknown_0203A034 ldr r1, [r1] ldr r1, [r1] @@ -970,7 +970,7 @@ sub_80F60F0: @ 80F60F0 cmp r0, 0x15 bne _080F615E strh r3, [r1, 0xA] - ldr r0, =gUnknown_085ED1E9 + ldr r0, =gText_Round2Results ldr r1, [r5] ldrb r1, [r1] bl sub_80F6B78 @@ -1265,7 +1265,7 @@ _080F636E: adds r4, r1 adds r1, r4, 0 bl StringCopy - ldr r1, =gUnknown_085ED1FA + ldr r1, =gText_Var1sVar2Won mov r0, sp bl StringExpandPlaceholders ldr r0, =gUnknown_0203A034 @@ -1679,7 +1679,7 @@ sub_80F671C: @ 80F671C ldrsh r0, [r4, r1] cmp r0, 0 bne _080F676E - ldr r0, =gUnknown_085ED207 + ldr r0, =gText_CommunicationStandby bl sub_80F707C bl sub_800AC34 ldr r0, =sub_80F677C diff --git a/asm/daycare.s b/asm/daycare.s index 711d63e42..792ab66ff 100644 --- a/asm/daycare.s +++ b/asm/daycare.s @@ -2800,7 +2800,7 @@ _08070FCC: adds r0, r7, 0 mov r1, sp bl StringCopy - ldr r4, =gUnknown_085EF881 + ldr r4, =gText_NewLine2 adds r0, r7, 0 adds r1, r4, 0 bl StringAppend @@ -2810,7 +2810,7 @@ _08070FCC: adds r0, r7, 0 adds r1, r4, 0 bl StringAppend - ldr r1, =gUnknown_085EF883 + ldr r1, =gText_Exit4 adds r0, r7, 0 bl StringAppend add sp, 0x28 @@ -2834,7 +2834,7 @@ sub_8071038: @ 8071038 movs r5, 0 _08071046: adds r0, r4, 0 - ldr r1, =gUnknown_085EF888 + ldr r1, =gText_Lv bl StringAppend movs r0, 0x8C adds r2, r5, 0 @@ -2856,7 +2856,7 @@ _08071046: mov r1, sp bl StringAppend adds r0, r4, 0 - ldr r1, =gUnknown_085EF881 + ldr r1, =gText_NewLine2 bl StringAppend adds r0, r5, 0x1 lsls r0, 24 @@ -2971,7 +2971,7 @@ sub_8071148: @ 8071148 mov r8, r3 lsls r5, 24 lsrs r5, 24 - ldr r1, =gUnknown_085EF888 + ldr r1, =gText_Lv mov r0, sp bl StringCopy movs r0, 0x8C diff --git a/asm/decoration.s b/asm/decoration.s index 4efc70e04..3aa7a0784 100644 --- a/asm/decoration.s +++ b/asm/decoration.s @@ -336,7 +336,7 @@ sub_8126C48: @ 8126C48 cmp r0, 0 bne _08126C7C ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EA83D + ldr r1, =gText_NoDecorations adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_8126DA4 @@ -376,7 +376,7 @@ sub_8126CA4: @ 8126CA4 cmp r0, 0 bne _08126CD8 ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EAAEC + ldr r1, =gText_NoDecorationsInUse adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_8126DA4 @@ -420,7 +420,7 @@ sub_8126D10: @ 8126D10 cmp r0, 0 bne _08126D44 ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EA83D + ldr r1, =gText_NoDecorations adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_8126DA4 @@ -656,7 +656,7 @@ _08126F0C: ldr r2, =gText_Cancel cmp r0, 0x2 bne _08126F2C - ldr r2, =gUnknown_085EB7EA + ldr r2, =gText_Exit _08126F2C: lsls r0, r4, 4 adds r0, 0x1 @@ -798,7 +798,7 @@ sub_8127058: @ 8127058 adds r5, r0, 0 lsls r4, r1, 24 lsrs r4, 24 - ldr r1, =gUnknown_085EA7C8 + ldr r1, =gText_Color161Shadow161 bl StringCopy cmp r4, 0x1 bne _08127078 @@ -909,7 +909,7 @@ _08127154: movs r0, 0x1 bl sub_8126A58 ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EA83D + ldr r1, =gText_NoDecorations adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_8127180 @@ -2637,7 +2637,7 @@ sub_8127F68: @ 8127F68 cmp r0, 0x7 beq _08127FAC ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EA9AE + ldr r1, =gText_CantPlaceInRoom adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_8127A5C @@ -2682,13 +2682,13 @@ _08127FE8: cmp r0, 0 bne _08128018 ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EA8EA + ldr r1, =gText_NoMoreDecorations bl StringExpandPlaceholders b _08128020 .pool _08128018: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EA931 + ldr r1, =gText_NoMoreDecorations2 bl StringExpandPlaceholders _08128020: ldr r1, =gStringVar4 @@ -2699,7 +2699,7 @@ _08128020: .pool _08128038: ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EA8D2 + ldr r1, =gText_InUseAlready adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_8127A5C @@ -3169,7 +3169,7 @@ sub_8128414: @ 8128414 strh r2, [r0, 0x3C] bl sub_8128DE0 ldr r5, =gStringVar4 - ldr r1, =gUnknown_085EA8BF + ldr r1, =gText_CancelDecorating adds r0, r5, 0 bl StringExpandPlaceholders ldr r2, =sub_8128B80 @@ -3835,7 +3835,7 @@ sub_8128950: @ 8128950 cmp r0, 0x1 bne _081289A4 ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EA897 + ldr r1, =gText_PlaceItHere adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_81289D0 @@ -3848,7 +3848,7 @@ _081289A4: movs r0, 0x20 bl PlaySE ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EA8A6 + ldr r1, =gText_CantBePlacedHere adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_8129020 @@ -5810,7 +5810,7 @@ _08129968: cmp r0, 0x1 bne _08129994 ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EAAC5 + ldr r1, =gText_DecorationReturnedToPC adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_8129D64 @@ -6137,7 +6137,7 @@ sub_8129BF8: @ 8129BF8 ldr r1, =SpriteCallbackDummy str r1, [r0] ldr r5, =gStringVar4 - ldr r1, =gUnknown_085EAA62 + ldr r1, =gText_StopPuttingAwayDecorations adds r0, r5, 0 bl StringExpandPlaceholders ldr r2, =sub_812A1F0 @@ -6162,7 +6162,7 @@ sub_8129C74: @ 8129C74 cmp r0, 0 beq _08129CA8 ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EAAA3 + ldr r1, =gText_ReturnDecorationToPC adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_812A1A0 @@ -6216,7 +6216,7 @@ _08129CDE: ldr r1, =SpriteCallbackDummy str r1, [r0] ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EAA62 + ldr r1, =gText_StopPuttingAwayDecorations adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_812A1F0 @@ -6228,7 +6228,7 @@ _08129D14: .pool _08129D3C: ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EAA81 + ldr r1, =gText_NoDecorationHere adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_8129D64 @@ -7087,7 +7087,7 @@ sub_812A3D4: @ 812A3D4 adds r1, r2 bl StringCopy ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EAA14 + ldr r1, =gText_DecorationWillBeDiscarded adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_812A458 @@ -7098,7 +7098,7 @@ sub_812A3D4: @ 812A3D4 .pool _0812A430: ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EA9E0 + ldr r1, =gText_CantThrowAwayInUse adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_8127A5C @@ -7151,7 +7151,7 @@ sub_812A478: @ 812A478 adds r0, r4, 0 bl sub_8127814 ldr r5, =gStringVar4 - ldr r1, =gUnknown_085EAA3D + ldr r1, =gText_DecorationThrownAway adds r0, r5, 0 bl StringExpandPlaceholders ldr r2, =sub_8127A5C diff --git a/asm/diploma.s b/asm/diploma.s index 6d303d860..4f21fe39d 100644 --- a/asm/diploma.s +++ b/asm/diploma.s @@ -262,7 +262,7 @@ pokedex_diploma_something: @ 8177AD4 movs r0, 0x14 bl SetGpuReg ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EE855 + ldr r1, =gText_DexNational bl StringCopy b _08177B0C .pool @@ -271,11 +271,11 @@ _08177AFC: movs r1, 0 bl SetGpuReg ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EE84F + ldr r1, =gText_DexHoenn bl StringCopy _08177B0C: ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE85E + ldr r1, =gText_PokedexDiploma adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 diff --git a/asm/easy_chat.s b/asm/easy_chat.s index 565d9fcc6..20bf327ac 100644 --- a/asm/easy_chat.s +++ b/asm/easy_chat.s @@ -3296,7 +3296,7 @@ sub_811BB40: @ 811BB40 ldrb r0, [r0] cmp r0, 0x4 bne _0811BB5C - ldr r0, =gUnknown_085EC3B4 + ldr r0, =gText_StopGivingPkmnMail b _0811BB7A .pool _0811BB5C: @@ -3306,13 +3306,13 @@ _0811BB5C: bgt _0811BB78 cmp r0, 0xF blt _0811BB78 - ldr r0, =gUnknown_085EC706 + ldr r0, =gText_LikeToQuitQuiz str r0, [r2] - ldr r0, =gUnknown_085EC727 + ldr r0, =gText_ChallengeQuestionMark b _0811BB7E .pool _0811BB78: - ldr r0, =gUnknown_085EC3A6 + ldr r0, =gText_QuitEditing _0811BB7A: str r0, [r2] movs r0, 0 @@ -3325,9 +3325,9 @@ _0811BB7E: thumb_func_start sub_811BB88 sub_811BB88: @ 811BB88 - ldr r2, =gUnknown_085EC410 + ldr r2, =gText_AllTextBeingEditedWill str r2, [r0] - ldr r0, =gUnknown_085EC42F + ldr r0, =gText_BeDeletedThatOkay str r0, [r1] bx lr .pool @@ -3711,11 +3711,11 @@ sub_811BDF0: @ 811BDF0 b _0811BE3C .pool _0811BE34: - ldr r1, =gUnknown_085EC6B2 + ldr r1, =gText_Lady movs r0, 0 bl sub_81AFC0C _0811BE3C: - ldr r1, =gUnknown_085EC6A8 + ldr r1, =gText_F700sQuiz adds r0, r6, 0 bl sub_81AFC28 add sp, 0x20 @@ -6054,35 +6054,35 @@ _0811D16A: bl sub_811BB88 b _0811D1BC _0811D174: - ldr r0, =gUnknown_085EC743 + ldr r0, =gText_CreateAQuiz str r0, [sp, 0xC] b _0811D1BC .pool _0811D180: - ldr r0, =gUnknown_085EC752 + ldr r0, =gText_SelectTheAnswer str r0, [sp, 0xC] b _0811D1BC .pool _0811D18C: - ldr r0, =gUnknown_085EC4C9 + ldr r0, =gText_OnlyOnePhrase str r0, [sp, 0xC] - ldr r0, =gUnknown_085EC4E9 + ldr r0, =gText_OriginalSongWillBeUsed b _0811D1BA .pool _0811D19C: - ldr r0, =gUnknown_085EC765 + ldr r0, =gText_LyricsCantBeDeleted str r0, [sp, 0xC] b _0811D1BC .pool _0811D1A8: - ldr r0, =gUnknown_085EC520 + ldr r0, =gText_CombineTwoWordsOrPhrases str r0, [sp, 0xC] b _0811D1BC .pool _0811D1B4: - ldr r0, =gUnknown_085EC672 + ldr r0, =gText_YouCannotQuitHere str r0, [sp, 0xC] - ldr r0, =gUnknown_085EC688 + ldr r0, =gText_SectionMustBeCompleted _0811D1BA: str r0, [sp, 0x10] _0811D1BC: @@ -9442,7 +9442,7 @@ CopyEasyChatWord: @ 811EBBC lsls r0, 24 cmp r0, 0 beq _0811EBD8 - ldr r1, =gUnknown_085EEA42 + ldr r1, =gText_ThreeQuestionMarks b _0811EBEA .pool _0811EBD8: @@ -9693,7 +9693,7 @@ _0811ED94: b _0811EDB2 .pool _0811EDB0: - ldr r0, =gUnknown_085EEA42 + ldr r0, =gText_ThreeQuestionMarks _0811EDB2: bl StringLength lsls r0, 16 diff --git a/asm/egg_hatch.s b/asm/egg_hatch.s index d646dbb73..54695cdd2 100644 --- a/asm/egg_hatch.s +++ b/asm/egg_hatch.s @@ -971,7 +971,7 @@ _08071C24: ldr r1, =gStringVar1 bl pokemon_get_nick ldr r4, =gStringVar4 - ldr r1, =gUnknown_085ED5A5 + ldr r1, =gText_PkmnHatchedFromEgg adds r0, r4, 0 bl StringExpandPlaceholders ldr r0, [r5] @@ -1023,7 +1023,7 @@ _08071CA4: ldr r1, =gStringVar1 bl pokemon_get_nick ldr r4, =gStringVar4 - ldr r1, =gUnknown_085ED5BE + ldr r1, =gText_NameHatchedPkmn adds r0, r4, 0 bl StringExpandPlaceholders ldr r0, [r5] diff --git a/asm/evolution_scene.s b/asm/evolution_scene.s index f66ec736c..efae2f07c 100644 --- a/asm/evolution_scene.s +++ b/asm/evolution_scene.s @@ -2913,7 +2913,7 @@ _0813F5F0: _0813F5FC: ldr r0, =0x00000179 bl PlayBGM - ldr r1, =gUnknown_085EF6D2 + ldr r1, =gText_CommunicationStandby5 movs r0, 0 movs r2, 0x1 bl sub_807F1A8 diff --git a/asm/field_player_avatar.s b/asm/field_player_avatar.s index 3cf5a70da..aaca9b2ba 100644 --- a/asm/field_player_avatar.s +++ b/asm/field_player_avatar.s @@ -4396,7 +4396,7 @@ fish6: @ 808CB6C sub sp, 0xC adds r5, r0, 0 bl sub_808CF78 - ldr r2, =gUnknown_085EE8F7 + ldr r2, =gText_OhABite movs r0, 0x11 str r0, [sp] movs r4, 0 @@ -4526,7 +4526,7 @@ fish9: @ 808CC64 movs r0, 0 movs r1, 0x11 bl FillWindowPixelBuffer - ldr r2, =gUnknown_085EE903 + ldr r2, =gText_PokemonOnHook movs r5, 0 str r5, [sp] movs r0, 0x2 @@ -4683,7 +4683,7 @@ fishB: @ 808CD94 movs r0, 0 movs r1, 0x11 bl FillWindowPixelBuffer - ldr r2, =gUnknown_085EE91E + ldr r2, =gText_NotEvenANibble movs r0, 0 str r0, [sp] movs r0, 0x2 @@ -4731,7 +4731,7 @@ fishC: @ 808CE04 movs r0, 0 movs r1, 0x11 bl FillWindowPixelBuffer - ldr r2, =gUnknown_085EE933 + ldr r2, =gText_ItGotAway movs r0, 0 str r0, [sp] movs r0, 0x2 diff --git a/asm/field_poison.s b/asm/field_poison.s index 8948b2762..5b1e24719 100644 --- a/asm/field_poison.s +++ b/asm/field_poison.s @@ -216,7 +216,7 @@ _080F96F0: _080F96FC: ldrb r0, [r4, 0x2] bl sub_80F95C0 - ldr r0, =gUnknown_085ECF5D + ldr r0, =gText_PkmnFainted3 bl box_related_two__2 ldrh r0, [r4] adds r0, 0x1 diff --git a/asm/field_region_map.s b/asm/field_region_map.s index fc0a38de6..512dfb151 100644 --- a/asm/field_region_map.s +++ b/asm/field_region_map.s @@ -157,7 +157,7 @@ _08170300: movs r2, 0x27 movs r3, 0xD bl SetWindowBorderStyle - ldr r5, =gUnknown_085EE8F1 + ldr r5, =gText_Hoenn movs r0, 0x1 adds r1, r5, 0 movs r2, 0x38 diff --git a/asm/fldeff_80F9BCC.s b/asm/fldeff_80F9BCC.s index 784da5b1f..3bc667754 100644 --- a/asm/fldeff_80F9BCC.s +++ b/asm/fldeff_80F9BCC.s @@ -2061,7 +2061,7 @@ _080FACC2: movs r3, 0x3 bl ConvertIntToDecimalStringN ldr r0, =gStringVar2 - ldr r1, =gUnknown_085EA88B + ldr r1, =gText_Gold bl StringCopy ldr r1, =gScriptResult movs r0, 0 @@ -2085,7 +2085,7 @@ _080FAD14: movs r3, 0x2 bl ConvertIntToDecimalStringN ldr r0, =gStringVar2 - ldr r1, =gUnknown_085EA890 + ldr r1, =gText_Silver bl StringCopy ldr r1, =gScriptResult movs r0, 0 diff --git a/asm/fldeff_softboiled.s b/asm/fldeff_softboiled.s index 2de098970..48d968d20 100755 --- a/asm/fldeff_softboiled.s +++ b/asm/fldeff_softboiled.s @@ -221,7 +221,7 @@ sub_81616C0: @ 81616C0 ldr r1, =gStringVar1 bl GetMonNickname ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9C17 + ldr r1, =gText_PkmnHPRestoredByVar2 adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -318,7 +318,7 @@ sub_81617B8: @ 81617B8 lsrs r4, 24 movs r0, 0x5 bl PlaySE - ldr r0, =gUnknown_085E9712 + ldr r0, =gText_CantBeUsedOnPkmn movs r1, 0 bl sub_81B1B5C movs r0, 0x2 diff --git a/asm/item_menu.s b/asm/item_menu.s index 914fdf2b3..fbb84bf03 100755 --- a/asm/item_menu.s +++ b/asm/item_menu.s @@ -437,7 +437,7 @@ _081AAF0C: b _081AB012 .pool _081AAF1C: - ldr r1, =gPocketNames + ldr r1, =gPocketNamesStringsTable ldr r4, =gUnknown_0203CE58 ldrb r0, [r4, 0x5] lsls r0, 2 @@ -972,7 +972,7 @@ _081AB3C0: movs r2, 0x2 movs r3, 0x1 bl ConvertIntToDecimalStringN - ldr r1, =gUnknown_085E921A + ldr r1, =gText_ClearTo11Var1Clear5Var2 b _081AB438 .pool _081AB408: @@ -995,7 +995,7 @@ _081AB420: adds r0, r5, 0 bl CopyItemName _081AB436: - ldr r1, =gUnknown_085E9210 + ldr r1, =gText_UnkF908Var1Clear7Var2 _081AB438: adds r0, r6, 0 bl StringExpandPlaceholders @@ -1297,7 +1297,7 @@ bag_menu_print_description_box_text: @ 81AB6B0 .pool _081AB6E0: ldr r0, =gStringVar1 - ldr r2, =gUnknown_085E9180 + ldr r2, =gReturnToXStringsTable ldr r1, =gUnknown_0203CE58 ldrb r1, [r1, 0x4] lsls r1, 2 @@ -2423,7 +2423,7 @@ _081AC026: adds r5, r0, 0 cmp r1, 0x1 bne _081AC07C - ldr r2, =gPocketNames + ldr r2, =gPocketNamesStringsTable ldrb r0, [r4, 0x5] lsls r0, 2 adds r0, r2 @@ -2439,7 +2439,7 @@ _081AC026: b _081AC09A .pool _081AC07C: - ldr r2, =gPocketNames + ldr r2, =gPocketNamesStringsTable add r0, sp, 0x8 ldrb r0, [r0] lsls r0, 2 @@ -4808,7 +4808,7 @@ display_sell_item_ask_str: @ 81AD5DC ldr r1, =gStringVar2 bl CopyItemName ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E960F + ldr r1, =gText_CantBuyKeyItem adds r0, r4, 0 bl StringExpandPlaceholders ldr r3, =bag_menu_inits_lists_menu @@ -4834,7 +4834,7 @@ _081AD64C: ldr r1, =gStringVar2 bl CopyItemName ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E962F + ldr r1, =gText_HowManyToSell adds r0, r4, 0 bl StringExpandPlaceholders ldr r3, =sub_81AD730 @@ -4874,7 +4874,7 @@ sub_81AD680: @ 81AD680 movs r3, 0x6 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9654 + ldr r1, =gText_ICanPayVar1 adds r0, r4, 0 bl StringExpandPlaceholders ldr r3, =sub_81AD6E4 @@ -5079,7 +5079,7 @@ sub_81AD84C: @ 81AD84C movs r3, 0x6 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9677 + ldr r1, =gText_TurnedOverVar1ForVar2 adds r0, r4, 0 bl StringExpandPlaceholders ldr r3, =sub_81AD8C8 diff --git a/asm/item_use.s b/asm/item_use.s index a2488b6df..b8eb1d1c4 100644 --- a/asm/item_use.s +++ b/asm/item_use.s @@ -2510,7 +2510,7 @@ ItemUseInBattle_StatIncrease: @ 80FE4B8 lsls r0, 24 cmp r0, 0 bne _080FE518 - ldr r2, =gUnknown_085E96F6 + ldr r2, =gText_WontHaveEffect ldr r3, =bag_menu_inits_lists_menu adds r0, r4, 0 movs r1, 0x1 @@ -2518,7 +2518,7 @@ ItemUseInBattle_StatIncrease: @ 80FE4B8 b _080FE53C .pool _080FE518: - ldr r1, =gUnknown_085E96F6 + ldr r1, =gText_WontHaveEffect ldr r2, =sub_81C6714 adds r0, r4, 0 bl DisplayItemMessageInBattlePyramid diff --git a/asm/learn_move.s b/asm/learn_move.s index c2ef76350..d8a52ba39 100755 --- a/asm/learn_move.s +++ b/asm/learn_move.s @@ -377,7 +377,7 @@ _081609A8: ldr r1, =0xffff0000 cmp r0, r1 beq _08160A04 - ldr r0, =gUnknown_085EF8E4 + ldr r0, =gText_PkmnLearnedMove4 bl sub_816084C ldr r1, =gSpecialVar_0x8004 movs r0, 0x1 @@ -471,7 +471,7 @@ _08160AAA: b _08160E88 .pool _08160AB8: - ldr r0, =gUnknown_085EF8F3 + ldr r0, =gText_PkmnTryingToLearnMove bl sub_816084C ldr r0, =gUnknown_0203BC34 ldr r1, [r0] @@ -498,7 +498,7 @@ _08160AEC: asrs r1, r0, 24 cmp r1, 0 bne _08160B10 - ldr r0, =gUnknown_085EFA10 + ldr r0, =gText_WhichMoveToForget2 bl sub_816084C ldr r0, =gUnknown_0203BC34 ldr r1, [r0] @@ -528,7 +528,7 @@ _08160B2C: adds r1, r0 adds r0, r4, 0 bl StringCopy - ldr r0, =gUnknown_085EF960 + ldr r0, =gText_StopTryingToTeachMove bl sub_816084C ldr r0, =gUnknown_0203BC34 ldr r1, [r0] @@ -819,7 +819,7 @@ _08160D6C: adds r1, r6 adds r0, r4, 0 bl StringCopy - ldr r0, =gUnknown_085EF979 + ldr r0, =gText_12AndPoof bl sub_816084C ldr r1, [r7] movs r0, 0x1E @@ -834,7 +834,7 @@ _08160E0C: lsls r0, 16 cmp r0, 0 bne _08160E8A - ldr r0, =gUnknown_085EF9A6 + ldr r0, =gText_PkmnForgotMoveAndLearnedNew bl sub_816084C ldr r0, =gUnknown_0203BC34 ldr r1, [r0] @@ -946,7 +946,7 @@ _08160EF0: cmp r5, 0 bne _08160F38 ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EF8C2 + ldr r1, =gText_TeachWhichMoveToPkmn adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0x3 @@ -1042,7 +1042,7 @@ _08160FE4: movs r0, 0xC strb r0, [r1] ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EF9E6 + ldr r1, =gText_GiveUpTeachingNewMove adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -1063,7 +1063,7 @@ _08161010: adds r1, r2 bl StringCopy ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EF8DA + ldr r1, =gText_TeachX adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -1100,7 +1100,7 @@ sub_8161074: @ 8161074 cmp r5, 0 bne _081610A6 ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EF8C2 + ldr r1, =gText_TeachWhichMoveToPkmn adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0x3 diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index fca8cb29b..5845ea8fb 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -940,7 +940,7 @@ sub_818E13C: @ 818E13C cmp r0, 0xFF bne _0818E174 ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EEB7E + ldr r1, =gText_Lady2 bl StringCopy7 movs r7, 0 b _0818E1DC diff --git a/asm/link.s b/asm/link.s index b6eddf2b4..0278c7445 100644 --- a/asm/link.s +++ b/asm/link.s @@ -3482,7 +3482,7 @@ sub_800B080: @ 800B080 ldr r4, =gUnknown_082ED224 str r4, [sp] str r5, [sp, 0x4] - ldr r0, =gUnknown_085EE4F7 + ldr r0, =gText_CommErrorEllipsis str r0, [sp, 0x8] movs r0, 0 movs r1, 0x3 @@ -3491,7 +3491,7 @@ sub_800B080: @ 800B080 bl box_print str r4, [sp] str r5, [sp, 0x4] - ldr r0, =gUnknown_085EE50C + ldr r0, =gText_MoveCloserToLinkPartner str r0, [sp, 0x8] movs r0, 0x2 movs r1, 0x3 @@ -3534,7 +3534,7 @@ sub_800B138: @ 800B138 str r0, [sp] movs r0, 0 str r0, [sp, 0x4] - ldr r0, =gUnknown_085EE4A4 + ldr r0, =gText_CommErrorCheckConnections str r0, [sp, 0x8] movs r0, 0x1 movs r1, 0x3 @@ -3623,7 +3623,7 @@ _0800B214: str r0, [sp] movs r0, 0 str r0, [sp, 0x4] - ldr r0, =gUnknown_085EE572 + ldr r0, =gText_ABtnTitleScreen str r0, [sp, 0x8] movs r0, 0 movs r1, 0x3 @@ -3639,7 +3639,7 @@ _0800B244: str r0, [sp] movs r0, 0 str r0, [sp, 0x4] - ldr r0, =gUnknown_085EE553 + ldr r0, =gText_ABtnRegistrationCounter str r0, [sp, 0x8] movs r0, 0 movs r1, 0x3 @@ -28887,16 +28887,16 @@ sub_80186EC: @ 80186EC bl FillWindowPixelBuffer cmp r4, 0 bne _0801871C - ldr r0, =gUnknown_085EF654 - ldr r7, =gUnknown_085EF678 + ldr r0, =gText_MysteryGift + ldr r7, =gText_PickOKCancel cmp r5, 0 bne _08018720 - ldr r7, =gUnknown_085EF664 + ldr r7, =gText_PickOKExit b _08018720 .pool _0801871C: - ldr r0, =gUnknown_085EDFBF - ldr r7, =gUnknown_085EDFC9 + ldr r0, =gJPText_MysteryGift + ldr r7, =gJPText_DecideStop _08018720: movs r4, 0 str r4, [sp] @@ -29571,13 +29571,13 @@ _08018C6C: cmp r2, 0 bne _08018C84 ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EF2FC + ldr r1, =gText_WhatToDoWithCards bl StringExpandPlaceholders b _08018C8C .pool _08018C84: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EF330 + ldr r1, =gText_WhatToDoWithNews bl StringExpandPlaceholders _08018C8C: ldr r0, =gUnknown_082F05D8 @@ -29801,11 +29801,11 @@ sub_8018E50: @ 8018E50 push {lr} cmp r2, 0 beq _08018E60 - ldr r3, =gUnknown_085EF55C + ldr r3, =gText_OkayToDiscardNews b _08018E62 .pool _08018E60: - ldr r3, =gUnknown_085EF520 + ldr r3, =gText_IfThrowAwayCardEventWontHappen _08018E62: movs r2, 0x1 bl sub_8018B08 @@ -29821,11 +29821,11 @@ mevent_message_was_thrown_away: @ 8018E74 push {lr} cmp r1, 0 beq _08018E84 - ldr r1, =gUnknown_085EF630 + ldr r1, =gText_WonderNewsThrownAway b _08018E86 .pool _08018E84: - ldr r1, =gUnknown_085EF60C + ldr r1, =gText_WonderCardThrownAway _08018E86: bl mevent_0814257C pop {r1} @@ -29854,7 +29854,7 @@ _08018EAC: .4byte _08018EE0 .4byte _08018EF8 _08018EC0: - ldr r0, =gUnknown_085EF5BC + ldr r0, =gText_DataWillBeSaved bl sub_8018884 b _08018EEC .pool @@ -29863,7 +29863,7 @@ _08018ECC: bl TrySavingData b _08018EEC _08018ED4: - ldr r0, =gUnknown_085EF5E0 + ldr r0, =gText_SaveCompletedPressA bl sub_8018884 b _08018EEC .pool @@ -29934,88 +29934,88 @@ _08018F30: _08018F6C: movs r0, 0 str r0, [r4] - ldr r2, =gUnknown_085EF2E4 + ldr r2, =gText_NothingSentOver b _08019034 .pool _08018F78: movs r0, 0 str r0, [r4] - ldr r2, =gUnknown_085EF244 + ldr r2, =gText_RecordUploadedViaWireless b _08019034 .pool _08018F84: movs r0, 0x1 str r0, [r4] - ldr r2, =gUnknown_085EF0C8 + ldr r2, =gText_WonderCardReceivedFrom cmp r5, 0 bne _08019034 - ldr r2, =gUnknown_085EF124 + ldr r2, =gText_WonderCardReceived b _08019034 .pool _08018F9C: movs r0, 0x1 str r0, [r4] - ldr r2, =gUnknown_085EF0F4 + ldr r2, =gText_WonderNewsReceivedFrom cmp r5, 0 bne _08019034 - ldr r2, =gUnknown_085EF14C + ldr r2, =gText_WonderNewsReceived b _08019034 .pool _08018FB4: movs r0, 0x1 str r0, [r4] - ldr r2, =gUnknown_085EF178 + ldr r2, =gText_NewStampReceived b _08019034 .pool _08018FC0: movs r0, 0 str r0, [r4] - ldr r2, =gUnknown_085EF1B4 + ldr r2, =gText_AlreadyHadCard b _08019034 .pool _08018FCC: movs r0, 0 str r0, [r4] - ldr r2, =gUnknown_085EF200 + ldr r2, =gText_AlreadyHadStamp b _08019034 .pool _08018FD8: movs r0, 0 str r0, [r4] - ldr r2, =gUnknown_085EF1D8 + ldr r2, =gText_AlreadyHadNews b _08019034 .pool _08018FE4: movs r0, 0 str r0, [r4] - ldr r2, =gUnknown_085EF21C + ldr r2, =gText_NoMoreRoomForStamps b _08019034 .pool _08018FF0: movs r0, 0 str r0, [r4] - ldr r2, =gUnknown_085EF02C + ldr r2, =gText_CommunicationCanceled b _08019034 .pool _08018FFC: movs r0, 0 str r0, [r4] - ldr r2, =gUnknown_085EF2B4 + ldr r2, =gText_CantAcceptNewsFromTrainer cmp r6, 0 bne _08019034 - ldr r2, =gUnknown_085EF280 + ldr r2, =gText_CantAcceptCardFromTrainer b _08019034 .pool _08019014: movs r0, 0 str r0, [r4] - ldr r2, =gUnknown_085EF014 + ldr r2, =gText_CommunicationError b _08019034 .pool _08019020: movs r0, 0x1 str r0, [r4] - ldr r2, =gUnknown_085EF198 + ldr r2, =gText_NewTrainerReceived b _08019034 .pool _0801902C: @@ -30095,7 +30095,7 @@ _0801909C: mevent_message_stamp_card_etc_send_status: @ 80190A4 push {r4,lr} adds r3, r0, 0 - ldr r1, =gUnknown_085EF014 + ldr r1, =gText_CommunicationError movs r0, 0 str r0, [r3] adds r4, r1, 0 @@ -30125,57 +30125,57 @@ _080190C8: .4byte _0801915C .4byte _08019164 _08019104: - ldr r1, =gUnknown_085EF2E4 + ldr r1, =gText_NothingSentOver b _08019166 .pool _0801910C: - ldr r1, =gUnknown_085EF244 + ldr r1, =gText_RecordUploadedViaWireless b _08019166 .pool _08019114: - ldr r1, =gUnknown_085EF39C + ldr r1, =gText_WonderCardSentTo b _0801911E .pool _0801911C: - ldr r1, =gUnknown_085EF3C4 + ldr r1, =gText_WonderNewsSentTo _0801911E: movs r0, 0x1 str r0, [r3] b _08019166 .pool _08019128: - ldr r1, =gUnknown_085EF3F0 + ldr r1, =gText_StampSentTo b _08019166 .pool _08019130: - ldr r1, =gUnknown_085EF42C + ldr r1, =gText_OtherTrainerHasCard b _08019166 .pool _08019138: - ldr r1, =gUnknown_085EF494 + ldr r1, =gText_OtherTrainerHasStamp b _08019166 .pool _08019140: - ldr r1, =gUnknown_085EF460 + ldr r1, =gText_OtherTrainerHasNews b _08019166 .pool _08019148: - ldr r1, =gUnknown_085EF21C + ldr r1, =gText_NoMoreRoomForStamps b _08019166 .pool _08019150: - ldr r1, =gUnknown_085EF4C4 + ldr r1, =gText_OtherTrainerCanceled b _08019166 .pool _08019158: adds r1, r4, 0 b _08019166 _0801915C: - ldr r1, =gUnknown_085EF410 + ldr r1, =gText_GiftSentTo b _08019166 .pool _08019164: - ldr r1, =gUnknown_085EF4F0 + ldr r1, =gText_CantSendGiftToTrainer _08019166: adds r0, r1, 0 pop {r4} @@ -30357,13 +30357,13 @@ _08019300: bne _08019314 adds r0, r5, 0 adds r0, 0x9 - ldr r1, =gUnknown_085EEEF0 + ldr r1, =gText_DontHaveCardNewOneInput b _0801931A .pool _08019314: adds r0, r5, 0 adds r0, 0x9 - ldr r1, =gUnknown_085EEF2C + ldr r1, =gText_DontHaveNewsNewOneInput _0801931A: bl mevent_0814257C cmp r0, 0 @@ -30381,12 +30381,12 @@ _08019338: ldrb r0, [r5, 0xC] cmp r0, 0 bne _0801934C - ldr r0, =gUnknown_085EEF68 + ldr r0, =gText_WhereShouldCardBeAccessed bl sub_8018884 b _08019352 .pool _0801934C: - ldr r0, =gUnknown_085EEF94 + ldr r0, =gText_WhereShouldNewsBeAccessed bl sub_8018884 _08019352: movs r0, 0x4 @@ -30502,7 +30502,7 @@ _08019436: b _080197C0 .pool _08019444: - ldr r0, =gUnknown_085EEFE8 + ldr r0, =gText_Communicating bl sub_8018884 movs r0, 0x8 strb r0, [r5, 0x8] @@ -30593,7 +30593,7 @@ _08019506: _08019508: adds r0, r5, 0 adds r0, 0x9 - ldr r3, =gUnknown_085EF050 + ldr r3, =gText_ThrowAwayWonderCard adds r1, r5, 0 movs r2, 0 bl sub_8018B08 @@ -30616,7 +30616,7 @@ _08019534: _08019538: adds r0, r5, 0 adds r0, 0x9 - ldr r3, =gUnknown_085EF084 + ldr r3, =gText_HaventReceivedCardsGift adds r1, r5, 0 movs r2, 0 bl sub_8018B08 @@ -30660,7 +30660,7 @@ _0801957E: _0801958C: adds r0, r5, 0 adds r0, 0x9 - ldr r1, =gUnknown_085EEFF8 + ldr r1, =gText_CommunicationCompleted bl sub_8018A1C cmp r0, 0 bne _0801959C @@ -30876,7 +30876,7 @@ _0801971A: _0801972E: adds r0, r5, 0 adds r0, 0x9 - ldr r3, =gUnknown_085EF584 + ldr r3, =gText_HaventReceivedGiftOkayToDiscard adds r1, r5, 0 movs r2, 0x1 bl sub_8018B08 @@ -31016,13 +31016,13 @@ _0801982C: ldrb r0, [r5, 0xC] cmp r0, 0 bne _0801985C - ldr r0, =gUnknown_085EF360 + ldr r0, =gText_SendingWonderCard bl sub_8018884 bl mevent_srv_new_wcard b _08019866 .pool _0801985C: - ldr r0, =gUnknown_085EF37C + ldr r0, =gText_SendingWonderNews bl sub_8018884 bl mevent_srv_init_wnews _08019866: @@ -31084,7 +31084,7 @@ _080198DC: _080198EC: adds r0, r5, 0 adds r0, 0x9 - ldr r1, =gUnknown_085EF014 + ldr r1, =gText_CommunicationError bl mevent_0814257C _080198F6: cmp r0, 0 @@ -33685,7 +33685,7 @@ _0801AD8C: _0801ADFC: ldr r0, =gUnknown_02022C6C ldr r0, [r0] - ldr r1, =gUnknown_085EFBD2 + ldr r1, =gText_CommStandbyAwaitingOtherPlayer movs r2, 0 bl sub_801ABDC cmp r0, 0 @@ -33832,7 +33832,7 @@ _0801AF40: _0801AF58: ldr r0, =gUnknown_02022C6C ldr r0, [r0] - ldr r1, =gUnknown_085EFC27 + ldr r1, =gText_RefusedBattle movs r2, 0x1 bl sub_801ABDC cmp r0, 0 @@ -33858,7 +33858,7 @@ _0801AF8A: _0801AF98: ldr r0, =gUnknown_02022C6C ldr r0, [r0] - ldr r1, =gUnknown_085EFC0C + ldr r1, =gText_BattleWasRefused movs r2, 0x1 bl sub_801ABDC cmp r0, 0 @@ -41940,7 +41940,7 @@ _0801F020: movs r0, 0 adds r1, r4, 0 bl sub_81AFC0C - ldr r1, =gUnknown_085ED2A9 + ldr r1, =gText_F700JoinedChat b _0801F094 .pool _0801F044: @@ -41980,7 +41980,7 @@ _0801F07A: movs r0, 0 adds r1, r4, 0 bl sub_81AFC0C - ldr r1, =gUnknown_085ED2BD + ldr r1, =gText_F700LeftChat _0801F094: adds r0, r6, 0 bl sub_81AFC28 @@ -42190,52 +42190,52 @@ copy_strings_to_sav1: @ 801F1DC ldr r0, [r4] ldr r1, =0x00003c88 adds r0, r1 - ldr r1, =gUnknown_085ED40F + ldr r1, =gText_Hello bl StringCopy ldr r0, [r4] ldr r1, =0x00003c9d adds r0, r1 - ldr r1, =gUnknown_085ED415 + ldr r1, =gText_Pokemon2 bl StringCopy ldr r0, [r4] ldr r1, =0x00003cb2 adds r0, r1 - ldr r1, =gUnknown_085ED41D + ldr r1, =gText_Trade bl StringCopy ldr r0, [r4] ldr r1, =0x00003cc7 adds r0, r1 - ldr r1, =gUnknown_085ED423 + ldr r1, =gText_Battle bl StringCopy ldr r0, [r4] ldr r1, =0x00003cdc adds r0, r1 - ldr r1, =gUnknown_085ED42A + ldr r1, =gText_Lets bl StringCopy ldr r0, [r4] ldr r1, =0x00003cf1 adds r0, r1 - ldr r1, =gUnknown_085ED430 + ldr r1, =gText_Ok bl StringCopy ldr r0, [r4] ldr r1, =0x00003d06 adds r0, r1 - ldr r1, =gUnknown_085ED434 + ldr r1, =gText_Sorry bl StringCopy ldr r0, [r4] ldr r1, =0x00003d1b adds r0, r1 - ldr r1, =gUnknown_085ED43A + ldr r1, =gText_YayUnkF9F9 bl StringCopy ldr r0, [r4] ldr r1, =0x00003d30 adds r0, r1 - ldr r1, =gUnknown_085ED440 + ldr r1, =gText_ThankYou bl StringCopy ldr r0, [r4] ldr r1, =0x00003d45 adds r0, r1 - ldr r1, =gUnknown_085ED44A + ldr r1, =gText_ByeBye bl StringCopy pop {r4} pop {r0} @@ -43754,7 +43754,7 @@ sub_801FDDC: @ 801FDDC bl PutWindowTilemap ldr r0, [r5] ldrb r0, [r0, 0x18] - ldr r2, =gUnknown_085EAE62 + ldr r2, =gText_Yes movs r1, 0x1 str r1, [sp] movs r4, 0xFF @@ -43764,7 +43764,7 @@ sub_801FDDC: @ 801FDDC bl PrintTextOnWindow ldr r0, [r5] ldrb r0, [r0, 0x18] - ldr r2, =gUnknown_085EAE66 + ldr r2, =gText_No movs r1, 0x11 str r1, [sp] str r4, [sp, 0x4] @@ -47446,13 +47446,13 @@ _08021C5E: cmp r3, r2 bne _08021CC0 ldr r0, =gStringVar3 - ldr r1, =gUnknown_085ED7D4 + ldr r1, =gText_1DotBlueF700 bl StringCopy b _08021CC8 .pool _08021CC0: ldr r0, =gStringVar3 - ldr r1, =gUnknown_085ED7E0 + ldr r1, =gText_1DotF700 bl StringCopy _08021CC8: ldr r4, =gStringVar3 @@ -47541,13 +47541,13 @@ sub_8021D34: @ 8021D34 ldr r4, =gUnknown_082F32D8 str r4, [sp] str r6, [sp, 0x4] - ldr r1, =gUnknown_085ED808 + ldr r1, =gText_TimeColon str r1, [sp, 0x8] movs r1, 0x2 movs r2, 0 adds r3, r7, 0 bl box_print - ldr r4, =gUnknown_085ED840 + ldr r4, =gText_SpaceSec movs r0, 0x2 adds r1, r4, 0 movs r2, 0x1 @@ -47587,7 +47587,7 @@ sub_8021D34: @ 8021D34 movs r3, 0x2 bl ConvertIntToDecimalStringN ldr r5, =gStringVar4 - ldr r1, =gUnknown_085ED838 + ldr r1, =gText_XDotY2 adds r0, r5, 0 bl StringExpandPlaceholders movs r0, 0x2 @@ -47609,7 +47609,7 @@ sub_8021D34: @ 8021D34 adds r2, r6, 0 adds r3, r7, 0 bl box_print - ldr r4, =gUnknown_085ED830 + ldr r4, =gText_SpaceMin movs r0, 0x2 adds r1, r4, 0 movs r2, 0x1 @@ -47638,7 +47638,7 @@ sub_8021D34: @ 8021D34 movs r2, 0x2 movs r3, 0x1 bl ConvertIntToDecimalStringN - ldr r1, =gUnknown_085ED82C + ldr r1, =gText_StrVar1 adds r0, r5, 0 bl StringExpandPlaceholders movs r0, 0x2 @@ -47669,13 +47669,13 @@ sub_8021D34: @ 8021D34 str r4, [sp] mov r1, r10 str r1, [sp, 0x4] - ldr r1, =gUnknown_085ED810 + ldr r1, =gText_PressingSpeed str r1, [sp, 0x8] movs r1, 0x2 movs r2, 0 adds r3, r7, 0 bl box_print - ldr r4, =gUnknown_085ED850 + ldr r4, =gText_TimesPerSec movs r0, 0x2 adds r1, r4, 0 movs r2, 0x1 @@ -47745,7 +47745,7 @@ _08021F0A: movs r3, 0x2 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085ED848 + ldr r1, =gText_XDotY3 adds r0, r4, 0 bl StringExpandPlaceholders movs r2, 0x1 @@ -47808,7 +47808,7 @@ _08021FDE: str r2, [sp] movs r5, 0 str r5, [sp, 0x4] - ldr r1, =gUnknown_085ED820 + ldr r1, =gText_Silkiness str r1, [sp, 0x8] movs r1, 0x2 movs r2, 0 @@ -47821,7 +47821,7 @@ _08021FDE: movs r3, 0x3 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085ED85C + ldr r1, =gText_Var1Percent adds r0, r4, 0 bl StringExpandPlaceholders movs r2, 0x1 @@ -47961,7 +47961,7 @@ _0802214E: adds r0, r6, 0 adds r0, 0x82 ldrb r0, [r0] - ldr r3, =gUnknown_085ED860 + ldr r3, =gText_PressesRankings movs r1, 0x14 movs r2, 0x3 bl sub_80219C8 @@ -48012,7 +48012,7 @@ _080221C8: adds r0, r6, 0 adds r0, 0x82 ldrb r0, [r0] - ldr r3, =gUnknown_085ED878 + ldr r3, =gText_CrushingResults movs r1, 0x16 movs r2, 0x3 bl sub_80219C8 @@ -48140,7 +48140,7 @@ _08022296: b _080224BA .pool _080222D0: - ldr r0, =gUnknown_085ED8D0 + ldr r0, =gText_BerryCrush2 mov r10, r0 movs r1, 0x1 negs r1, r1 @@ -48165,7 +48165,7 @@ _080222D0: adds r2, r7, 0 movs r3, 0x1 bl box_print - ldr r0, =gUnknown_085ED8DC + ldr r0, =gText_PressingSpeedRankings mov r10, r0 movs r0, 0x1 mov r1, r10 @@ -48195,7 +48195,7 @@ _08022336: movs r3, 0x1 bl ConvertIntToDecimalStringN ldr r0, =gStringVar4 - ldr r1, =gUnknown_085ED8F4 + ldr r1, =gText_Var1Players bl StringExpandPlaceholders ldrb r0, [r6, 0x2] ldr r1, =gUnknown_082F32D8 @@ -48209,7 +48209,7 @@ _08022336: mov r3, r10 bl box_print movs r0, 0x1 - ldr r1, =gUnknown_085ED850 + ldr r1, =gText_TimesPerSec movs r2, 0x1 negs r2, r2 bl GetStringWidth @@ -48222,7 +48222,7 @@ _08022336: str r1, [sp] movs r1, 0 str r1, [sp, 0x4] - ldr r1, =gUnknown_085ED850 + ldr r1, =gText_TimesPerSec str r1, [sp, 0x8] movs r1, 0x1 adds r2, r7, 0 @@ -48280,7 +48280,7 @@ _080223CA: movs r3, 0x2 bl ConvertIntToDecimalStringN ldr r0, =gStringVar4 - ldr r1, =gUnknown_085ED848 + ldr r1, =gText_XDotY3 bl StringExpandPlaceholders movs r0, 0x1 ldr r1, =gStringVar4 @@ -52907,7 +52907,7 @@ sub_802482C: @ 802482C adds r2, r4, 0 adds r3, r5, 0 bl SetWindowBorderStyle - ldr r2, =gUnknown_085EDCDE + ldr r2, =gText_Powder movs r0, 0x1 str r0, [sp] movs r0, 0xFF @@ -59274,7 +59274,7 @@ _08027AFE: ldr r0, [r0] str r0, [sp] str r1, [sp, 0x4] - ldr r1, =gUnknown_085EDCE5 + ldr r1, =gText_BerryPickingRecords movs r0, 0x1 movs r2, 0 bl GetStringWidth @@ -59414,7 +59414,7 @@ sub_8027BEC: @ 8027BEC adds r0, r7, 0 movs r1, 0x11 bl FillWindowPixelBuffer - ldr r4, =gUnknown_085EDCE5 + ldr r4, =gText_BerryPickingRecords ldr r0, [sp, 0x18] lsls r2, r0, 3 movs r0, 0x1 @@ -62799,7 +62799,7 @@ _08029728: bcc _08029700 _0802972E: movs r5, 0 - ldr r4, =gUnknown_085EDE5D + ldr r4, =gText_SpacePoints cmp r5, r7 bcs _08029754 add r1, sp, 0x34 @@ -62939,7 +62939,7 @@ _080297CC: movs r1, 0 str r1, [sp, 0x8] movs r1, 0x1 - ldr r2, =gUnknown_085EDE5D + ldr r2, =gText_SpacePoints lsrs r3, 24 bl PrintTextOnWindow adds r0, r5, 0x1 @@ -63057,7 +63057,7 @@ _0802996C: ldrb r0, [r0] movs r1, 0x11 bl FillWindowPixelBuffer - ldr r2, =gUnknown_085EDD49 + ldr r2, =gText_BerryPickingResults mov r8, r2 movs r2, 0x1 negs r2, r2 @@ -63084,7 +63084,7 @@ _0802996C: ldr r0, [r4] add r0, r9 ldrb r0, [r0] - ldr r2, =gUnknown_085EDD6B + ldr r2, =gText_10P30P50P50P movs r1, 0x11 str r1, [sp] str r6, [sp, 0x4] @@ -63324,7 +63324,7 @@ _08029BFC: ldrb r0, [r0] movs r1, 0x11 bl FillWindowPixelBuffer - ldr r6, =gUnknown_085EDD86 + ldr r6, =gText_AnnouncingRankings movs r2, 0x1 negs r2, r2 movs r0, 0x1 @@ -63488,7 +63488,7 @@ _08029DA0: ldrb r0, [r0] movs r1, 0x11 bl FillWindowPixelBuffer - ldr r5, =gUnknown_085EDD9B + ldr r5, =gText_AnnouncingPrizes movs r2, 0x1 negs r2, r2 movs r0, 0x1 @@ -63525,7 +63525,7 @@ _08029DA0: adds r1, r5, 0 bl sub_81AFC0C ldr r7, =gStringVar4 - ldr r1, =gUnknown_085EDDBD + ldr r1, =gText_FirstPlacePrize adds r0, r7, 0 bl sub_81AFC28 ldr r0, [r4] @@ -63559,7 +63559,7 @@ _08029DA0: bl sub_81AFC0C cmp r4, 0x2 bne _08029E9C - ldr r1, =gUnknown_085EDDE2 + ldr r1, =gText_CantHoldAnyMore adds r0, r7, 0 bl sub_81AFC28 b _08029EA8 @@ -63567,7 +63567,7 @@ _08029DA0: _08029E9C: cmp r6, 0x1 bne _08029EA8 - ldr r1, =gUnknown_085EDDFB + ldr r1, =gText_FilledStorageSpace adds r0, r7, 0 bl sub_81AFC28 _08029EA8: @@ -63809,7 +63809,7 @@ _0802A0CC: ldr r0, [r7] add r0, r8 ldrb r0, [r0] - ldr r2, =gUnknown_085EDE18 + ldr r2, =gText_WantToPlayAgain movs r1, 0x5 str r1, [sp] movs r3, 0xFF @@ -63823,7 +63823,7 @@ _0802A0CC: ldr r0, [r7] add r0, r10 ldrb r0, [r0] - ldr r2, =gUnknown_085EAE62 + ldr r2, =gText_Yes str r6, [sp] mov r3, r9 str r3, [sp, 0x4] @@ -63835,7 +63835,7 @@ _0802A0CC: ldr r0, [r7] add r0, r10 ldrb r0, [r0] - ldr r2, =gUnknown_085EAE66 + ldr r2, =gText_No movs r1, 0x11 str r1, [sp] mov r3, r9 @@ -63912,7 +63912,7 @@ _0802A1DC: ldr r0, [r7] add r0, r8 ldrb r0, [r0] - ldr r2, =gUnknown_085EAE62 + ldr r2, =gText_Yes movs r1, 0x1 str r1, [sp] movs r3, 0xFF @@ -63927,7 +63927,7 @@ _0802A1DC: ldr r0, [r7] add r0, r8 ldrb r0, [r0] - ldr r2, =gUnknown_085EAE66 + ldr r2, =gText_No movs r1, 0x11 str r1, [sp] mov r3, r10 @@ -64234,7 +64234,7 @@ _0802A4AC: ldr r0, [r5] adds r0, r4 ldrb r0, [r0] - ldr r2, =gUnknown_085EDE65 + ldr r2, =gText_CommunicationStandby3 movs r1, 0x5 str r1, [sp] movs r1, 0xFF @@ -64394,7 +64394,7 @@ _0802A610: ldr r0, [r6] adds r0, r4 ldrb r0, [r0] - ldr r2, =gUnknown_085EDE2C + ldr r2, =gText_SomeoneDroppedOut movs r1, 0x5 str r1, [sp] movs r1, 0xFF @@ -70271,7 +70271,7 @@ _0802D46A: strh r0, [r1, 0x12] lsls r0, 24 lsrs r0, 24 - ldr r2, =gUnknown_085EDF2A + ldr r2, =gText_WantToPlayAgain2 movs r1, 0x1 str r1, [sp] movs r1, 0xFF @@ -70473,7 +70473,7 @@ _0802D606: strh r0, [r1, 0x12] lsls r0, 24 lsrs r0, 24 - ldr r2, =gUnknown_085EDF3E + ldr r2, =gText_SomeoneDroppedOut2 movs r1, 0x1 str r1, [sp] movs r1, 0xFF @@ -70553,7 +70553,7 @@ _0802D6AA: strh r0, [r1, 0x12] lsls r0, 24 lsrs r0, 24 - ldr r2, =gUnknown_085EDF6F + ldr r2, =gText_CommunicationStandby4 movs r1, 0x1 str r1, [sp] movs r1, 0xFF @@ -70740,7 +70740,7 @@ sub_802D7E8: @ 802D7E8 bl sub_81AFC0C ldr r0, [r5] adds r0, 0xA6 - ldr r1, =gUnknown_085EDED3 + ldr r1, =gText_AwesomeWonF701F700 bl sub_81AFC28 movs r0, 0x4 movs r1, 0x8 @@ -70793,7 +70793,7 @@ sub_802D884: @ 802D884 bl sub_81AFC0C ldr r0, [r4] adds r0, 0xA6 - ldr r1, =gUnknown_085EDEF4 + ldr r1, =gText_FilledStorageSpace2 bl sub_81AFC28 movs r0, 0x4 movs r1, 0x8 @@ -70846,7 +70846,7 @@ sub_802D8FC: @ 802D8FC bl sub_81AFC0C ldr r0, [r4] adds r0, 0xA6 - ldr r1, =gUnknown_085EDF11 + ldr r1, =gText_CantHoldMore bl sub_81AFC28 movs r0, 0x4 movs r1, 0x9 @@ -71167,7 +71167,7 @@ sub_802DB8C: @ 802DB8C str r0, [sp] movs r4, 0 str r4, [sp, 0x4] - ldr r0, =gUnknown_085EDE7C + ldr r0, =gText_SpacePoints2 str r0, [sp, 0x8] movs r0, 0 movs r1, 0 @@ -71177,7 +71177,7 @@ sub_802DB8C: @ 802DB8C add r0, sp, 0xC str r0, [sp] str r4, [sp, 0x4] - ldr r0, =gUnknown_085EDE84 + ldr r0, =gText_SpaceTimes3 str r0, [sp, 0x8] movs r0, 0x1 movs r1, 0 @@ -72272,7 +72272,7 @@ _0802E416: ldr r0, [r0] str r0, [sp] str r1, [sp, 0x4] - ldr r1, =gUnknown_085EDE8D + ldr r1, =gText_PkmnJumpRecords movs r0, 0x1 movs r2, 0 bl GetStringWidth @@ -72407,7 +72407,7 @@ sub_802E500: @ 802E500 adds r0, r4, 0 movs r1, 0x11 bl FillWindowPixelBuffer - ldr r5, =gUnknown_085EDE8D + ldr r5, =gText_PkmnJumpRecords ldr r1, [sp, 0x1C] lsls r2, r1, 3 movs r0, 0x1 diff --git a/asm/mail.s b/asm/mail.s index 77cbc4e83..5f76a5ef0 100644 --- a/asm/mail.s +++ b/asm/mail.s @@ -691,7 +691,7 @@ _08121A8A: ldrb r0, [r0] cmp r0, 0 bne _08121AF0 - ldr r1, =gUnknown_085EEA78 + ldr r1, =gText_FromSpace adds r0, r2, 0 bl StringCopy ldr r0, [r4] @@ -825,7 +825,7 @@ _08121BB8: cmp r6, r0 bcc _08121B60 _08121BCC: - ldr r1, =gUnknown_085EEA78 + ldr r1, =gText_FromSpace add r0, sp, 0xC bl StringCopy ldr r4, =gUnknown_0203A134 diff --git a/asm/main_menu.s b/asm/main_menu.s index ed04ba6f3..883bd0cb4 100644 --- a/asm/main_menu.s +++ b/asm/main_menu.s @@ -4547,7 +4547,7 @@ fmt_time: @ 8031E94 push {r4-r6,lr} sub sp, 0xC ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EDCC3 + ldr r1, =gText_ContinueMenuPlayer adds r0, r4, 0 bl StringExpandPlaceholders ldr r6, =gUnknown_082FF0E3 @@ -4589,7 +4589,7 @@ fmt_player: @ 8031EF8 push {r4-r6,lr} sub sp, 0x2C ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EDCCA + ldr r1, =gText_ContinueMenuTime adds r0, r4, 0 bl StringExpandPlaceholders ldr r6, =gUnknown_082FF0E3 @@ -4664,7 +4664,7 @@ _08031FAA: lsls r0, 16 lsrs r7, r0, 16 ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EDCCF + ldr r1, =gText_ContinueMenuPokedex adds r0, r4, 0 bl StringExpandPlaceholders ldr r6, =gUnknown_082FF0E3 @@ -4728,7 +4728,7 @@ _08032030: cmp r4, r0 bls _0803201C ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EDCD7 + ldr r1, =gText_ContinueMenuBadges adds r0, r4, 0 bl StringExpandPlaceholders ldr r6, =gUnknown_082FF0E3 diff --git a/asm/mauville_old_man.s b/asm/mauville_old_man.s index 05d15601c..7b21e19e7 100644 --- a/asm/mauville_old_man.s +++ b/asm/mauville_old_man.s @@ -1400,7 +1400,7 @@ _08120BB0: movs r2, 0x8 bl memset mov r0, sp - ldr r1, =gUnknown_085EDFB0 + ldr r1, =gText_Friend bl StringCopy adds r0, r5, 0 mov r1, sp @@ -2218,7 +2218,7 @@ sub_8121178: @ 8121178 sub_81211EC: @ 81211EC push {r4,r5,lr} sub sp, 0xC - ldr r1, =gUnknown_085EB7EA + ldr r1, =gText_Exit movs r0, 0x1 movs r2, 0 bl GetStringWidth @@ -2309,7 +2309,7 @@ _08121272: _081212AA: ldr r5, =gUnknown_0203A130 ldrb r0, [r5] - ldr r2, =gUnknown_085EB7EA + ldr r2, =gText_Exit lsls r1, r4, 4 adds r1, 0x1 lsls r1, 24 diff --git a/asm/menu.s b/asm/menu.s index 553161d40..8bb9dc436 100755 --- a/asm/menu.s +++ b/asm/menu.s @@ -1250,7 +1250,7 @@ RedrawMenuCursor: @ 8198448 bl FillWindowPixelRect ldrb r0, [r5, 0x5] ldrb r1, [r5, 0x6] - ldr r2, =gUnknown_085EE498 + ldr r2, =gText_SelectorArrow3 ldrb r3, [r5] ldrb r4, [r5, 0x8] mov r6, r8 @@ -2139,7 +2139,7 @@ sub_8198AF8: @ 8198AF8 adds r2, r4, 0 adds r3, r5, 0 bl SetWindowBorderStyle - ldr r0, =gUnknown_085EE491 + ldr r0, =gText_YesNo str r0, [sp, 0xC] add r1, sp, 0xC ldrb r0, [r7] @@ -2877,7 +2877,7 @@ sub_8199060: @ 8199060 lsrs r3, 24 ldrb r0, [r5, 0x5] ldrb r1, [r5, 0x6] - ldr r2, =gUnknown_085EE498 + ldr r2, =gText_SelectorArrow3 str r3, [sp] movs r3, 0 str r3, [sp, 0x4] @@ -3668,7 +3668,7 @@ CreateYesNoMenu: @ 81996C0 adds r2, r4, 0 adds r3, r5, 0 bl SetWindowBorderStyle - ldr r0, =gUnknown_085EE491 + ldr r0, =gText_YesNo str r0, [sp] mov r1, sp mov r2, r8 diff --git a/asm/money.s b/asm/money.s index 0d7cf569f..53e795714 100644 --- a/asm/money.s +++ b/asm/money.s @@ -105,7 +105,7 @@ _080E5258: cmp r0, 0 bgt _080E5258 _080E5264: - ldr r1, =gUnknown_085E969C + ldr r1, =gText_PokedollarVar1 adds r0, r2, 0 bl StringExpandPlaceholders ldr r2, =gStringVar4 diff --git a/asm/mystery_event_menu.s b/asm/mystery_event_menu.s index 27ab158ad..49de57848 100644 --- a/asm/mystery_event_menu.s +++ b/asm/mystery_event_menu.s @@ -115,7 +115,7 @@ sub_8178A40: @ 8178A40 movs r5, 0x1 cmp r4, 0 bne _08178A54 - ldr r1, =gUnknown_085EE80A + ldr r1, =gText_EventSafelyLoaded bl StringCopy movs r5, 0 _08178A54: @@ -125,7 +125,7 @@ _08178A54: _08178A5A: cmp r4, 0x1 bne _08178A66 - ldr r1, =gUnknown_085EE827 + ldr r1, =gText_LoadErrorEndingSession adds r0, r6, 0 bl StringCopy _08178A66: @@ -204,7 +204,7 @@ _08178B12: beq _08178B20 b _08178E58 _08178B20: - ldr r1, =gUnknown_085EE765 + ldr r1, =gText_LinkStandby2 movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -256,7 +256,7 @@ _08178B8E: _08178B98: movs r0, 0x15 bl PlaySE - ldr r1, =gUnknown_085EE788 + ldr r1, =gText_PressAToLoadEvent movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -301,7 +301,7 @@ _08178BDC: movs r2, 0x1 movs r3, 0xD bl SetWindowBorderStyle - ldr r1, =gUnknown_085EE7BF + ldr r1, =gText_LoadingEvent movs r0, 0 str r0, [sp] movs r0, 0x1 @@ -373,7 +373,7 @@ _08178CAC: lsls r0, 24 cmp r0, 0 beq _08178CCC - ldr r1, =gUnknown_085EE7CE + ldr r1, =gText_DontRemoveCableTurnOff movs r0, 0x1 str r0, [sp] movs r0, 0 diff --git a/asm/mystery_event_script.s b/asm/mystery_event_script.s index d481c2a3b..d544f689f 100644 --- a/asm/mystery_event_script.s +++ b/asm/mystery_event_script.s @@ -782,7 +782,7 @@ sub_8153E1C: @ 8153E1C adds r4, r0, 0 bl EnableResetRTC ldr r0, =gStringVar4 - ldr r1, =gUnknown_085ECAD8 + ldr r1, =gText_InGameClockUsable bl StringExpandPlaceholders movs r0, 0x2 str r0, [r4, 0x6C] diff --git a/asm/naming_screen.s b/asm/naming_screen.s index 2d79e464a..b241d3009 100644 --- a/asm/naming_screen.s +++ b/asm/naming_screen.s @@ -4033,7 +4033,7 @@ sub_80E4EF0: @ 80E4EF0 str r1, [sp] movs r1, 0 str r1, [sp, 0x4] - ldr r1, =gUnknown_085EEAF6 + ldr r1, =gText_MoveOkBack str r1, [sp, 0x8] movs r1, 0 movs r2, 0x2 diff --git a/asm/option_menu.s b/asm/option_menu.s index 214e23094..1c554e26f 100644 --- a/asm/option_menu.s +++ b/asm/option_menu.s @@ -906,7 +906,7 @@ sub_80BAC38: @ 80BAC38 adds r1, r0 movs r0, 0x1 strb r0, [r1] - ldr r4, =gUnknown_085EE5D4 + ldr r4, =gText_TextSpeedSlow mov r0, sp ldrb r3, [r0] adds r0, r4, 0 @@ -917,14 +917,14 @@ sub_80BAC38: @ 80BAC38 movs r2, 0 bl GetStringWidth adds r4, r0, 0 - ldr r0, =gUnknown_085EE5DF + ldr r0, =gText_TextSpeedMid mov r8, r0 movs r0, 0x1 mov r1, r8 movs r2, 0 bl GetStringWidth adds r5, r0, 0 - ldr r6, =gUnknown_085EE5E9 + ldr r6, =gText_TextSpeedFast movs r0, 0x1 adds r1, r6, 0 movs r2, 0 @@ -1000,13 +1000,13 @@ sub_80BAD08: @ 80BAD08 adds r1, r0 movs r0, 0x1 strb r0, [r1] - ldr r0, =gUnknown_085EE5F4 + ldr r0, =gText_BattleSceneOn mov r1, sp ldrb r3, [r1] movs r1, 0x68 movs r2, 0x10 bl sub_80BAB68 - ldr r4, =gUnknown_085EE5FD + ldr r4, =gText_BattleSceneOff movs r0, 0x1 adds r1, r4, 0 movs r2, 0xC6 @@ -1061,13 +1061,13 @@ sub_80BAD84: @ 80BAD84 adds r1, r0 movs r0, 0x1 strb r0, [r1] - ldr r0, =gUnknown_085EE607 + ldr r0, =gText_BattleStyleShift mov r1, sp ldrb r3, [r1] movs r1, 0x68 movs r2, 0x20 bl sub_80BAB68 - ldr r4, =gUnknown_085EE613 + ldr r4, =gText_BattleStyleSet movs r0, 0x1 adds r1, r4, 0 movs r2, 0xC6 @@ -1125,13 +1125,13 @@ sub_80BAE08: @ 80BAE08 adds r1, r0 movs r0, 0x1 strb r0, [r1] - ldr r0, =gUnknown_085EE61D + ldr r0, =gText_SoundMono mov r1, sp ldrb r3, [r1] movs r1, 0x68 movs r2, 0x30 bl sub_80BAB68 - ldr r4, =gUnknown_085EE628 + ldr r4, =gText_SoundStereo movs r0, 0x1 adds r1, r4, 0 movs r2, 0xC6 @@ -1243,9 +1243,9 @@ sub_80BAF0C: @ 80BAF0C adds r0, r1 lsrs r6, r0, 24 movs r5, 0 - ldr r1, =gUnknown_085EE640 + ldr r1, =gText_FrameTypeNumber ldrb r0, [r1] - ldr r7, =gUnknown_085EE635 + ldr r7, =gText_FrameType cmp r0, 0xFF beq _080BAF44 adds r2, r1, 0 @@ -1394,7 +1394,7 @@ sub_80BB028: @ 80BB028 adds r1, r0 movs r0, 0x1 strb r0, [r1] - ldr r4, =gUnknown_085EE647 + ldr r4, =gText_ButtonTypeNormal mov r0, sp ldrb r3, [r0] adds r0, r4, 0 @@ -1406,14 +1406,14 @@ sub_80BB028: @ 80BB028 movs r2, 0 bl GetStringWidth adds r4, r0, 0 - ldr r0, =gUnknown_085EE654 + ldr r0, =gText_ButtonTypeLR mov r8, r0 movs r0, 0x1 mov r1, r8 movs r2, 0 bl GetStringWidth adds r5, r0, 0 - ldr r6, =gUnknown_085EE65D + ldr r6, =gText_ButtonTypeLEqualsA movs r0, 0x1 adds r1, r6, 0 movs r2, 0 @@ -1461,7 +1461,7 @@ sub_80BB0D0: @ 80BB0D0 movs r0, 0 movs r1, 0x11 bl FillWindowPixelBuffer - ldr r2, =gUnknown_085EE589 + ldr r2, =gText_Option movs r0, 0x1 str r0, [sp] movs r0, 0xFF diff --git a/asm/party_menu.s b/asm/party_menu.s index bb4ad4e31..3621dd0ee 100755 --- a/asm/party_menu.s +++ b/asm/party_menu.s @@ -2484,7 +2484,7 @@ sub_81B1660: @ 81B1660 ands r1, r0 cmp r1, 0x2 bne _081B1680 - ldr r5, =gUnknown_085EA110 + ldr r5, =gText_CancelParticipation b _081B168A .pool _081B1680: @@ -3290,7 +3290,7 @@ sub_81B1C84: @ 81B1C84 adds r0, r4, 0 bl CopyItemName ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E991B + ldr r1, =gText_PkmnWasGivenItem adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -3319,7 +3319,7 @@ sub_81B1CD0: @ 81B1CD0 adds r0, r4, 0 bl CopyItemName ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E999D + ldr r1, =gText_RecievedItemFromPkmn adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -3348,7 +3348,7 @@ sub_81B1D1C: @ 81B1D1C adds r0, r4, 0 bl CopyItemName ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E993A + ldr r1, =gText_SwitchPkmnItem adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -3379,7 +3379,7 @@ sub_81B1D68: @ 81B1D68 adds r0, r4, 0 bl CopyItemName ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E99DB + ldr r1, =gText_SwitchedPkmnItem adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -3474,7 +3474,7 @@ _081B1E3E: pokemon_item_not_removed: @ 81B1E48 push {lr} ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9A69 + ldr r1, =gText_BagFullCouldNotRemoveItem bl StringExpandPlaceholders pop {r0} bx r0 @@ -3937,7 +3937,7 @@ sub_81B21AC: @ 81B21AC _081B21DC: movs r0, 0x20 bl PlaySE - ldr r0, =gUnknown_085EA0EE + ldr r0, =gText_PkmnCantParticipate movs r1, 0 bl sub_81B1B5C movs r0, 0x2 @@ -3962,7 +3962,7 @@ sub_81B2210: @ 81B2210 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r0, =gUnknown_085EA110 + ldr r0, =gText_CancelParticipation movs r1, 0x1 bl sub_81B1B5C movs r0, 0x2 @@ -6407,7 +6407,7 @@ _081B3674: cmp r6, 0 bne _081B36C0 ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9980 + ldr r1, =gText_PkmnNotHolding adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -8348,7 +8348,7 @@ _081B4788: adds r0, r5, 0 bl GetMonNickname ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9980 + ldr r1, =gText_PkmnNotHolding adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -8409,7 +8409,7 @@ sub_81B47E0: @ 81B47E0 adds r0, r7, 0 bl GetMonNickname ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9980 + ldr r1, =gText_PkmnNotHolding adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -8428,7 +8428,7 @@ _081B4864: adds r0, r5, 0 bl CopyItemName ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9E00 + ldr r1, =gText_ThrowAwayItem adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -8511,7 +8511,7 @@ _081B491A: ldr r1, =gStringVar1 bl CopyItemName ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9E14 + ldr r1, =gText_ItemThrownAway adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -8731,7 +8731,7 @@ brm_take_2: @ 81B4B20 ldr r0, [r5] adds r0, 0xC bl sub_81B302C - ldr r0, =gUnknown_085E9855 + ldr r0, =gText_SendMailToPC movs r1, 0x1 bl sub_81B1B5C ldr r1, =gTasks @@ -8806,7 +8806,7 @@ _081B4BC6: lsrs r0, 24 cmp r0, 0xFF beq _081B4C0C - ldr r0, =gUnknown_085E9877 + ldr r0, =gText_MailSentToPC movs r1, 0 bl sub_81B1B5C ldr r1, =gTasks @@ -8818,7 +8818,7 @@ _081B4BC6: b _081B4C4A .pool _081B4C0C: - ldr r0, =gUnknown_085E9897 + ldr r0, =gText_PCMailboxFull movs r1, 0 bl sub_81B1B5C ldr r1, =gTasks @@ -8833,7 +8833,7 @@ _081B4C30: movs r0, 0x5 bl PlaySE _081B4C36: - ldr r0, =gUnknown_085E98B4 + ldr r0, =gText_MailMessageWillBeLost movs r1, 0x1 bl sub_81B1B5C ldr r1, =gTasks @@ -8926,7 +8926,7 @@ _081B4CBE: muls r0, r7 adds r0, r6 bl sub_80D4680 - ldr r0, =gUnknown_085E99B8 + ldr r0, =gText_MailTakenFromPkmn movs r1, 0 bl sub_81B1B5C ldr r1, =gTasks @@ -9167,7 +9167,7 @@ _081B4F36: movs r3, 0x1 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9830 + ldr r1, =gText_NoMoreThanVar1Pkmn adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0x20 @@ -9411,13 +9411,13 @@ sub_81B50C8: @ 81B50C8 .pool _081B515C: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EA210 + ldr r1, =gText_PkmnCantBeTradedNow bl StringExpandPlaceholders b _081B5178 .pool _081B5170: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EA234 + ldr r1, =gText_EggCantBeTradedNow bl StringExpandPlaceholders _081B5178: movs r0, 0x20 @@ -9430,7 +9430,7 @@ _081B5178: adds r0, 0xD bl sub_81B302C ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EA1CA + ldr r1, =gText_PauseUntilPress adds r0, r4, 0 bl StringAppend adds r0, r4, 0 @@ -9530,7 +9530,7 @@ brm_trade_1: @ 81B51D4 ldr r0, [r4] adds r0, 0xD bl sub_81B302C - ldr r1, =gUnknown_085EA1CA + ldr r1, =gText_PauseUntilPress adds r0, r5, 0 bl StringAppend adds r0, r5, 0 @@ -9594,19 +9594,19 @@ _081B5328: b _081B5368 _081B532E: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EA1E8 + ldr r1, =gText_OnlyPkmnForBattle bl StringExpandPlaceholders b _081B53C0 .pool _081B5340: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EA210 + ldr r1, =gText_PkmnCantBeTradedNow bl StringExpandPlaceholders b _081B53C0 .pool _081B5354: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EA234 + ldr r1, =gText_EggCantBeTradedNow bl StringExpandPlaceholders b _081B53C0 .pool @@ -9623,7 +9623,7 @@ _081B5368: ldr r1, =gStringVar1 bl GetMonNickname ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EA1CD + ldr r1, =gJPText_PutVar1IntoSpinner adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -9641,7 +9641,7 @@ _081B53C0: movs r0, 0x20 bl PlaySE ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EA1CA + ldr r1, =gText_PauseUntilPress adds r0, r4, 0 bl StringAppend adds r0, r4, 0 @@ -9787,7 +9787,7 @@ _081B54E8: lsrs r0, 24 cmp r0, 0x1 beq _081B5524 - ldr r0, =gUnknown_085E97FC + ldr r0, =gText_CantUseUntilNewBadge movs r1, 0x1 bl sub_81B1B5C ldr r1, =gTasks @@ -9852,7 +9852,7 @@ _081B557C: ldrb r1, [r1, 0x14] bl sub_81245DC ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EA196 + ldr r1, =gText_ReturnToHealingSpot b _081B55E8 .pool _081B55B8: @@ -9877,7 +9877,7 @@ _081B55B8: ldrb r1, [r1, 0x14] bl sub_81245DC ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EA16B + ldr r1, =gText_EscapeFromHere _081B55E8: bl StringExpandPlaceholders adds r0, r6, 0 @@ -11562,102 +11562,102 @@ _081B6334: .4byte _081B64A8 _081B6380: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9C3E + ldr r1, =gText_PkmnCuredOfPoison bl StringExpandPlaceholders b _081B64C4 .pool _081B6394: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9C7C + ldr r1, =gText_PkmnWokeUp2 bl StringExpandPlaceholders b _081B64C4 .pool _081B63A8: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9C8A + ldr r1, =gText_PkmnBurnHealed bl StringExpandPlaceholders b _081B64C4 .pool _081B63BC: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9CA2 + ldr r1, =gText_PkmnThawedOut bl StringExpandPlaceholders b _081B64C4 .pool _081B63D0: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9C5F + ldr r1, =gText_PkmnCuredOfParalysis bl StringExpandPlaceholders b _081B64C4 .pool _081B63E4: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9DBE + ldr r1, =gText_PkmnSnappedOutOfConfusion bl StringExpandPlaceholders b _081B64C4 .pool _081B63F8: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9DE1 + ldr r1, =gText_PkmnGotOverInfatuation bl StringExpandPlaceholders b _081B64C4 .pool _081B640C: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9CE0 + ldr r1, =gText_PkmnBecameHealthy bl StringExpandPlaceholders b _081B64C4 .pool _081B6420: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085E96E3 + ldr r1, =gText_HP3 b _081B6474 .pool _081B6430: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085EA33C + ldr r1, =gText_Attack3 b _081B6474 .pool _081B6440: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085EA343 + ldr r1, =gText_Defense3 b _081B6474 .pool _081B6450: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085EA35B + ldr r1, =gText_Speed2 b _081B6474 .pool _081B6460: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085E96E6 + ldr r1, =gText_SpAtk3 b _081B6474 .pool _081B6470: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085E96EE + ldr r1, =gText_SpDef3 _081B6474: bl StringCopy ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9D25 + ldr r1, =gText_PkmnBaseVar2StatIncreased bl StringExpandPlaceholders b _081B64C4 .pool _081B6494: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9CF5 + ldr r1, =gText_MovesPPIncreased bl StringExpandPlaceholders b _081B64C4 .pool _081B64A8: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9CB7 + ldr r1, =gText_PPWasRestored bl StringExpandPlaceholders b _081B64C4 .pool _081B64BC: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E96F6 + ldr r1, =gText_WontHaveEffect bl StringExpandPlaceholders _081B64C4: pop {r0} @@ -11830,7 +11830,7 @@ _081B6600: strb r0, [r1] movs r0, 0x5 bl PlaySE - ldr r0, =gUnknown_085E96F6 + ldr r0, =gText_WontHaveEffect b _081B66F4 .pool _081B6624: @@ -11964,7 +11964,7 @@ sub_81B672C: @ 81B672C ldr r1, =gStringVar1 bl GetMonNickname ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9C17 + ldr r1, =gText_PkmnHPRestoredByVar2 adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -12083,7 +12083,7 @@ _081B6850: strb r0, [r1] movs r0, 0x5 bl PlaySE - ldr r0, =gUnknown_085E96F6 + ldr r0, =gText_WontHaveEffect b _081B68E2 .pool _081B6874: @@ -12108,19 +12108,19 @@ _081B6874: cmp r0, r8 beq _081B68C4 ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9D45 + ldr r1, =gText_PkmnFriendlyBaseVar2Fell bl StringExpandPlaceholders b _081B68E0 .pool _081B68C4: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9D90 + ldr r1, =gText_PkmnFriendlyBaseVar2CantFall bl StringExpandPlaceholders b _081B68E0 .pool _081B68D8: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9D6D + ldr r1, =gText_PkmnAdoresBaseVar2Fell bl StringExpandPlaceholders _081B68E0: ldr r0, =gStringVar4 @@ -12239,30 +12239,30 @@ _081B69B8: .4byte _081B69E8 .4byte _081B69E0 _081B69D0: - ldr r1, =gUnknown_085E96E3 + ldr r1, =gText_HP3 b _081B69F2 .pool _081B69D8: - ldr r1, =gUnknown_085EA33C + ldr r1, =gText_Attack3 b _081B69F2 .pool _081B69E0: - ldr r1, =gUnknown_085EA343 + ldr r1, =gText_Defense3 b _081B69F2 .pool _081B69E8: - ldr r1, =gUnknown_085EA35B + ldr r1, =gText_Speed2 b _081B69F2 .pool _081B69F0: - ldr r1, =gUnknown_085E96E6 + ldr r1, =gText_SpAtk3 _081B69F2: adds r0, r2, 0 bl StringCopy b _081B6A08 .pool _081B6A00: - ldr r1, =gUnknown_085E96EE + ldr r1, =gText_SpDef3 adds r0, r2, 0 bl StringCopy _081B6A08: @@ -12517,7 +12517,7 @@ ether_effect_related: @ 81B6BEC strb r4, [r0] movs r0, 0x5 bl PlaySE - ldr r0, =gUnknown_085E96F6 + ldr r0, =gText_WontHaveEffect b _081B6C7E .pool _081B6C34: @@ -12775,18 +12775,18 @@ sub_81B6DC4: @ 81B6DC4 b _081B6E9C .pool _081B6E70: - ldr r1, =gUnknown_085E9AB4 + ldr r1, =gText_PkmnCantLearnMove b _081B6E7A .pool _081B6E78: - ldr r1, =gUnknown_085E9C00 + ldr r1, =gText_PkmnAlreadyKnows _081B6E7A: adds r0, r6, 0 bl sub_81B6D98 b _081B6E9C .pool _081B6E88: - ldr r0, =gUnknown_085E9AE9 + ldr r0, =gText_PkmnNeedsToReplaceMove bl sub_81B6D74 ldr r1, =gTasks lsls r0, r6, 2 @@ -12847,7 +12847,7 @@ _081B6EF0: adds r1, r2 bl StringCopy ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9AA5 + ldr r1, =gText_PkmnLearnedMove3 adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -12987,7 +12987,7 @@ _081B7048: beq _081B707A b _081B7080 _081B704E: - ldr r0, =gUnknown_085E9B96 + ldr r0, =gText_WhichMoveToForget movs r1, 0x1 bl sub_81B1B5C ldr r1, =gTasks @@ -13142,7 +13142,7 @@ sub_81B7154: @ 81B7154 ldr r2, =gMoveNames adds r1, r2 bl StringCopy - ldr r0, =gUnknown_085E9BB8 + ldr r0, =gText_12PoofForgotMove bl sub_81B6D74 ldr r1, =gTasks lsls r0, r6, 2 @@ -13214,7 +13214,7 @@ sub_81B7230: @ 81B7230 adds r1, r2 bl StringCopy ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9B5D + ldr r1, =gText_StopLearningMove2 adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -13302,7 +13302,7 @@ _081B7306: adds r1, r2 bl StringCopy ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9B76 + ldr r1, =gText_MoveNotLearned adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -13352,7 +13352,7 @@ _081B7392: ldr r2, =gMoveNames adds r1, r2 bl StringCopy - ldr r0, =gUnknown_085E9AE9 + ldr r0, =gText_PkmnNeedsToReplaceMove bl sub_81B6D74 ldr r1, =gTasks lsls r0, r6, 2 @@ -13444,7 +13444,7 @@ _081B747A: ldr r1, =gUnknown_0203CEE8 movs r0, 0 strb r0, [r1] - ldr r0, =gUnknown_085E96F6 + ldr r0, =gText_WontHaveEffect movs r1, 0x1 bl sub_81B1B5C movs r0, 0x2 @@ -13484,7 +13484,7 @@ _081B74B4: movs r3, 0x3 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9D0A + ldr r1, =gText_PkmnElevatedToLvVar2 adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -13915,7 +13915,7 @@ sub_81B787C: @ 81B787C adds r1, r2 bl StringCopy ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9AE9 + ldr r1, =gText_PkmnNeedsToReplaceMove adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -13969,7 +13969,7 @@ sub_81B7910: @ 81B7910 adds r1, r2 bl StringCopy ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9AA5 + ldr r1, =gText_PkmnLearnedMove3 adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -14225,7 +14225,7 @@ _081B7B82: bne _081B7BC8 ldr r0, =gUnknown_0203CEE8 strb r1, [r0] - ldr r0, =gUnknown_085E96F6 + ldr r0, =gText_WontHaveEffect movs r1, 0x1 bl sub_81B1B5C movs r0, 0x2 @@ -14278,7 +14278,7 @@ sub_81B7C10: @ 81B7C10 ldr r1, =gStringVar1 bl GetMonNickname ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E9C17 + ldr r1, =gText_PkmnHPRestoredByVar2 adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r4, 0 @@ -14322,7 +14322,7 @@ sub_81B7C74: @ 81B7C74 ldr r1, =gUnknown_0203CEE8 movs r0, 0 strb r0, [r1] - ldr r0, =gUnknown_085E96F6 + ldr r0, =gText_WontHaveEffect movs r1, 0x1 bl sub_81B1B5C movs r0, 0x2 @@ -14613,18 +14613,18 @@ sub_81B7E4C: @ 81B7E4C b _081B7F1C .pool _081B7EF0: - ldr r1, =gUnknown_085E9AB4 + ldr r1, =gText_PkmnCantLearnMove b _081B7EFA .pool _081B7EF8: - ldr r1, =gUnknown_085E9C00 + ldr r1, =gText_PkmnAlreadyKnows _081B7EFA: adds r0, r6, 0 bl sub_81B6D98 b _081B7F1C .pool _081B7F08: - ldr r0, =gUnknown_085E9AE9 + ldr r0, =gText_PkmnNeedsToReplaceMove bl sub_81B6D74 ldr r1, =gTasks lsls r0, r6, 2 @@ -15152,7 +15152,7 @@ sub_81B83B8: @ 81B83B8 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r0, =gUnknown_085E98EC + ldr r0, =gText_RemoveMailBeforeItem movs r1, 0x1 bl sub_81B1B5C movs r0, 0x2 @@ -15273,7 +15273,7 @@ sub_81B8474: @ 81B8474 bl GetMonData cmp r0, 0 beq _081B84DC - ldr r0, =gUnknown_085E9A08 + ldr r0, =gText_PkmnHoldingItemCantHoldMail movs r1, 0x1 bl sub_81B1B5C b _081B84F2 @@ -15284,7 +15284,7 @@ _081B84DC: bl sub_80D460C adds r0, r4, 0 bl sub_80D439C - ldr r0, =gUnknown_085E9A40 + ldr r0, =gText_MailTransferredFromMailbox movs r1, 0x1 bl sub_81B1B5C _081B84F2: @@ -15785,7 +15785,7 @@ sub_81B88BC: @ 81B88BC lsrs r0, 24 cmp r0, 0x1 bhi _081B88E0 - ldr r0, =gUnknown_085EA126 + ldr r0, =gText_CancelBattle b _081B88FA .pool _081B88E0: @@ -15795,11 +15795,11 @@ _081B88E0: ldrh r0, [r0] cmp r0, 0x2 bne _081B88F8 - ldr r0, =gUnknown_085EA139 + ldr r0, =gText_ReturnToWaitingRoom b _081B88FA .pool _081B88F8: - ldr r0, =gUnknown_085EA155 + ldr r0, =gText_CancelChallenge _081B88FA: pop {r1} bx r1 @@ -16015,7 +16015,7 @@ _081B8AA2: adds r0, r4, 0 bl StringCopy ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E97B2 + ldr r1, =gText_CantSwitchWithAlly b _081B8C42 .pool _081B8AC4: @@ -16033,7 +16033,7 @@ _081B8AC4: adds r0, r4, 0 bl GetMonNickname ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E978F + ldr r1, =gText_PkmnHasNoEnergy b _081B8C42 .pool _081B8AF8: @@ -16076,7 +16076,7 @@ _081B8B24: cmp r0, 0 beq _081B8B60 ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E97E5 + ldr r1, =gText_EggCantBattle b _081B8C42 .pool _081B8B60: @@ -16094,7 +16094,7 @@ _081B8B60: adds r0, r6, 0 bl GetMonNickname ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E976F + ldr r1, =gText_PkmnAlreadySelected b _081B8C42 .pool _081B8B94: @@ -16144,7 +16144,7 @@ _081B8BFC: ldr r1, =gStringVar1 bl GetMonNickname ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9754 + ldr r1, =gText_PkmnAlreadyInBattle b _081B8C42 .pool _081B8C20: @@ -16162,7 +16162,7 @@ _081B8C20: ldr r1, =gStringVar1 bl GetMonNickname ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9738 + ldr r1, =gText_PkmnCantSwitchOut _081B8C42: bl StringExpandPlaceholders _081B8C46: diff --git a/asm/player_pc.s b/asm/player_pc.s index 7f4ab354c..8d74f118c 100644 --- a/asm/player_pc.s +++ b/asm/player_pc.s @@ -309,7 +309,7 @@ sub_816B0A8: @ 816B0A8 lsls r0, 24 cmp r0, 0 bne _0816B0D8 - ldr r1, =gUnknown_085EAC4B + ldr r1, =gText_NoMailHere ldr r2, =sub_816B060 adds r0, r4, 0 bl DisplayItemMessageOnField @@ -344,7 +344,7 @@ _0816B0D8: b _0816B12A .pool _0816B120: - ldr r1, =gUnknown_085EAC4B + ldr r1, =gText_NoMailHere ldr r2, =sub_816B060 adds r0, r6, 0 bl DisplayItemMessageOnField @@ -661,7 +661,7 @@ sub_816B398: @ 816B398 _0816B3C4: adds r0, r5, 0 bl sub_816B4DC - ldr r1, =gUnknown_085EABD1 + ldr r1, =gText_NoItems ldr r2, =task_pc_itemstorage adds r0, r5, 0 bl DisplayItemMessageOnField @@ -696,7 +696,7 @@ sub_816B3E4: @ 816B3E4 _0816B410: adds r0, r5, 0 bl sub_816B4DC - ldr r1, =gUnknown_085EABD1 + ldr r1, =gText_NoItems ldr r2, =task_pc_itemstorage adds r0, r5, 0 bl DisplayItemMessageOnField @@ -950,7 +950,7 @@ sub_816B5F8: @ 816B5F8 lsrs r4, 24 movs r0, 0x1 bl sub_81D1C84 - ldr r6, =gUnknown_085EAB4E + ldr r6, =gText_Mailbox movs r0, 0x1 adds r1, r6, 0 movs r2, 0x40 @@ -1098,7 +1098,7 @@ sub_816B730: @ 816B730 movs r1, 0 bl sub_81DB554 ldr r5, =gStringVar4 - ldr r1, =gUnknown_085EAC63 + ldr r1, =gText_WhatToDoWithVar1sMail adds r0, r5, 0 bl StringExpandPlaceholders ldr r2, =sub_816B7DC @@ -1345,7 +1345,7 @@ sub_816B994: @ 816B994 push {lr} lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_085EAC8D + ldr r1, =gText_MessageWillBeLost ldr r2, =sub_816B9B0 bl DisplayItemMessageOnField pop {r0} @@ -1432,14 +1432,14 @@ sub_816BA18: @ 816BA18 lsls r0, 24 cmp r0, 0 bne _0816BA68 - ldr r1, =gUnknown_085EACB5 + ldr r1, =gText_BagIsFull ldr r2, =sub_816BBD4 adds r0, r6, 0 bl DisplayItemMessageOnField b _0816BA9C .pool _0816BA68: - ldr r1, =gUnknown_085EACC8 + ldr r1, =gText_MailToBagMessageErased ldr r2, =sub_816BBD4 adds r0, r6, 0 bl DisplayItemMessageOnField @@ -2293,10 +2293,10 @@ _0816C16C: bls _0816C16C movs r1, 0x6 ldrsh r0, [r7, r1] - ldr r5, =gUnknown_085EAB71 + ldr r5, =gText_TossItem cmp r0, 0 bne _0816C186 - ldr r5, =gUnknown_085EAB63 + ldr r5, =gText_WithdrawItem _0816C186: movs r0, 0x1 adds r1, r5, 0 @@ -2383,11 +2383,11 @@ _0816C26C: b _0816C2BA .pool _0816C274: - ldr r0, =gUnknown_085EAC09 + ldr r0, =gText_WithdrawHowManyItems b _0816C2BA .pool _0816C27C: - ldr r0, =gUnknown_085EAC22 + ldr r0, =gText_WithdrawXItems b _0816C2BA .pool _0816C284: @@ -2399,7 +2399,7 @@ _0816C28C: b _0816C2BA .pool _0816C294: - ldr r0, =gUnknown_085EABE7 + ldr r0, =gText_NoRoomInBag b _0816C2BA .pool _0816C29C: diff --git a/asm/pokeblock_feed.s b/asm/pokeblock_feed.s index bd348ec34..d82c5df07 100644 --- a/asm/pokeblock_feed.s +++ b/asm/pokeblock_feed.s @@ -718,7 +718,7 @@ sub_817A1C4: @ 817A1C4 cmp r0, 0 bne _0817A248 ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E937F + ldr r1, =gText_Var1AteTheVar2 bl StringExpandPlaceholders b _0817A268 .pool @@ -726,13 +726,13 @@ _0817A248: cmp r0, 0 ble _0817A260 ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9390 + ldr r1, =gText_Var1HappilyAteVar2 bl StringExpandPlaceholders b _0817A268 .pool _0817A260: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E93A9 + ldr r1, =gText_Var1DisdainfullyAteVar2 bl StringExpandPlaceholders _0817A268: ldr r2, =gTextFlags diff --git a/asm/pokemon_storage_system.s b/asm/pokemon_storage_system.s index df90540e8..83332e538 100755 --- a/asm/pokemon_storage_system.s +++ b/asm/pokemon_storage_system.s @@ -586,7 +586,7 @@ _080C73F6: movs r0, 0 movs r1, 0x11 bl FillWindowPixelBuffer - ldr r2, =gUnknown_085EBCAD + ldr r2, =gText_PartyFull str r4, [sp] movs r0, 0x2 str r0, [sp, 0x4] @@ -609,7 +609,7 @@ _080C7428: movs r0, 0 movs r1, 0x11 bl FillWindowPixelBuffer - ldr r2, =gUnknown_085EBC89 + ldr r2, =gText_JustOnePkmn movs r0, 0 str r0, [sp] movs r0, 0x2 @@ -1020,7 +1020,7 @@ _080C779E: lsls r0, r5, 24 lsrs r0, 24 bl sav3_get_box_name - ldr r1, =gUnknown_085EBCC1 + ldr r1, =gText_Box bl StringCopy adds r4, r5, 0x1 adds r1, r4, 0 diff --git a/asm/pokemon_summary_screen.s b/asm/pokemon_summary_screen.s index 3fb412477..2ad67ba5a 100755 --- a/asm/pokemon_summary_screen.s +++ b/asm/pokemon_summary_screen.s @@ -5413,7 +5413,7 @@ _081C284A: sub_81C286C: @ 81C286C push {r4-r7,lr} sub sp, 0x8 - ldr r1, =gUnknown_085EA3CF + ldr r1, =gText_PkmnInfo movs r5, 0 str r5, [sp] movs r6, 0x1 @@ -5422,21 +5422,21 @@ sub_81C286C: @ 81C286C movs r2, 0x2 movs r3, 0x1 bl sub_81C25A4 - ldr r1, =gUnknown_085EA3DC + ldr r1, =gText_PkmnSkills str r5, [sp] str r6, [sp, 0x4] movs r0, 0x1 movs r2, 0x2 movs r3, 0x1 bl sub_81C25A4 - ldr r1, =gUnknown_085EA3EB + ldr r1, =gText_BattleMoves str r5, [sp] str r6, [sp, 0x4] movs r0, 0x2 movs r2, 0x2 movs r3, 0x1 bl sub_81C25A4 - ldr r1, =gUnknown_085EA3F8 + ldr r1, =gText_ContestMoves str r5, [sp] str r6, [sp, 0x4] movs r0, 0x3 @@ -5466,7 +5466,7 @@ _081C28CC: adds r1, r7, 0 movs r3, 0x1 bl sub_81C25A4 - ldr r7, =gUnknown_085EA406 + ldr r7, =gText_Info movs r0, 0x1 adds r1, r7, 0 movs r2, 0x3E @@ -5489,7 +5489,7 @@ _081C28FE: adds r1, r7, 0 movs r3, 0x1 bl sub_81C25A4 - ldr r7, =gUnknown_085EA3C8 + ldr r7, =gText_Switch movs r0, 0x1 adds r1, r7, 0 movs r2, 0x3E @@ -5512,21 +5512,21 @@ _081C2930: adds r1, r7, 0 movs r3, 0x1 bl sub_81C25A4 - ldr r1, =gUnknown_085EA369 + ldr r1, =gText_RentalPkmn str r5, [sp] str r6, [sp, 0x4] movs r0, 0x8 movs r2, 0 movs r3, 0x1 bl sub_81C25A4 - ldr r1, =gUnknown_085EA378 + ldr r1, =gText_TypeSlash str r5, [sp] str r5, [sp, 0x4] movs r0, 0x9 movs r2, 0 movs r3, 0x1 bl sub_81C25A4 - ldr r4, =gUnknown_085EA361 + ldr r4, =gText_HP4 movs r0, 0x1 adds r1, r4, 0 movs r2, 0x2A @@ -5540,7 +5540,7 @@ _081C2930: adds r1, r4, 0 movs r3, 0x1 bl sub_81C25A4 - ldr r4, =gUnknown_085EA33C + ldr r4, =gText_Attack3 movs r0, 0x1 adds r1, r4, 0 movs r2, 0x2A @@ -5554,7 +5554,7 @@ _081C2930: adds r1, r4, 0 movs r3, 0x11 bl sub_81C25A4 - ldr r4, =gUnknown_085EA343 + ldr r4, =gText_Defense3 movs r0, 0x1 adds r1, r4, 0 movs r2, 0x2A @@ -5568,7 +5568,7 @@ _081C2930: adds r1, r4, 0 movs r3, 0x21 bl sub_81C25A4 - ldr r4, =gUnknown_085EA34B + ldr r4, =gText_SpAtk4 movs r0, 0x1 adds r1, r4, 0 movs r2, 0x24 @@ -5582,7 +5582,7 @@ _081C2930: adds r1, r4, 0 movs r3, 0x1 bl sub_81C25A4 - ldr r4, =gUnknown_085EA353 + ldr r4, =gText_SpDef4 movs r0, 0x1 adds r1, r4, 0 movs r2, 0x24 @@ -5596,7 +5596,7 @@ _081C2930: adds r1, r4, 0 movs r3, 0x11 bl sub_81C25A4 - ldr r4, =gUnknown_085EA35B + ldr r4, =gText_Speed2 movs r0, 0x1 adds r1, r4, 0 movs r2, 0x24 @@ -5610,49 +5610,49 @@ _081C2930: adds r1, r4, 0 movs r3, 0x21 bl sub_81C25A4 - ldr r1, =gUnknown_085EA39F + ldr r1, =gText_ExpPoints str r5, [sp] str r6, [sp, 0x4] movs r0, 0xC movs r2, 0x6 movs r3, 0x1 bl sub_81C25A4 - ldr r1, =gUnknown_085EA3AB + ldr r1, =gText_NextLv str r5, [sp] str r6, [sp, 0x4] movs r0, 0xC movs r2, 0x6 movs r3, 0x11 bl sub_81C25A4 - ldr r1, =gUnknown_085EA398 + ldr r1, =gText_Status str r5, [sp] str r6, [sp, 0x4] movs r0, 0xD movs r2, 0x2 movs r3, 0x1 bl sub_81C25A4 - ldr r1, =gUnknown_085EA37E + ldr r1, =gText_Power str r5, [sp] str r6, [sp, 0x4] movs r0, 0xE movs r2, 0 movs r3, 0x1 bl sub_81C25A4 - ldr r1, =gUnknown_085EA384 + ldr r1, =gText_Accuracy2 str r5, [sp] str r6, [sp, 0x4] movs r0, 0xE movs r2, 0 movs r3, 0x11 bl sub_81C25A4 - ldr r1, =gUnknown_085EA38D + ldr r1, =gText_Appeal str r5, [sp] str r6, [sp, 0x4] movs r0, 0xF movs r2, 0 movs r3, 0x1 bl sub_81C25A4 - ldr r1, =gUnknown_085EA394 + ldr r1, =gText_Jam str r5, [sp] str r6, [sp, 0x4] movs r0, 0xF @@ -6126,7 +6126,7 @@ sub_81C2EC4: @ 81C2EC4 bl sub_81C2D2C lsls r0, 24 lsrs r5, r0, 24 - ldr r4, =gUnknown_085EA365 + ldr r4, =gText_OTSlash movs r6, 0 str r6, [sp] movs r0, 0x1 @@ -6335,7 +6335,7 @@ sub_81C307C: @ 81C307C bne _081C30E0 _081C30C2: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085EA5DB + ldr r1, =gText_XNature bl sub_81AFC28 b _081C3182 .pool @@ -6367,25 +6367,25 @@ _081C310C: cmp r0, 0 bne _081C3134 ldrb r0, [r4, 0x9] - ldr r1, =gUnknown_085EA516 + ldr r1, =gText_XNatureHatchedAtYZ cmp r0, 0xD4 bls _081C3170 - ldr r1, =gUnknown_085EA617 + ldr r1, =gText_XNatureHatchedSomewhereAt b _081C3170 .pool _081C3134: ldrb r0, [r4, 0x9] - ldr r1, =gUnknown_085EA4EC + ldr r1, =gText_XNatureMetAtYZ cmp r0, 0xD4 bls _081C3170 - ldr r1, =gUnknown_085EA5EB + ldr r1, =gText_XNatureMetSomewhereAt b _081C3170 .pool _081C3148: ldrb r0, [r4, 0x9] cmp r0, 0xFF bne _081C3158 - ldr r1, =gUnknown_085EA56A + ldr r1, =gText_XNatureFatefulEncounter b _081C3170 .pool _081C3158: @@ -6396,11 +6396,11 @@ _081C3158: cmp r0, 0 beq _081C316E ldrb r0, [r4, 0x9] - ldr r1, =gUnknown_085EA5A8 + ldr r1, =gText_XNatureProbablyMetAt cmp r0, 0xD4 bls _081C3170 _081C316E: - ldr r1, =gUnknown_085EA544 + ldr r1, =gText_XNatureObtainedInTrade _081C3170: ldr r0, =gStringVar4 bl sub_81AFC28 @@ -6449,7 +6449,7 @@ sub_81C31C0: @ 81C31C0 ldr r1, [r0] movs r0, 0x2 bl sub_81AFC0C - ldr r1, =gUnknown_085EA3C0 + ldr r1, =gText_EmptyString5 movs r0, 0x5 bl sub_81AFC0C pop {r0} @@ -6649,7 +6649,7 @@ sub_81C335C: @ 81C335C adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r0, =gUnknown_085EA365 + ldr r0, =gText_OTSlash mov r8, r0 movs r0, 0x1 mov r1, r8 @@ -6736,27 +6736,27 @@ sub_81C3428: @ 81C3428 ldrb r0, [r0] cmp r0, 0x1 bne _081C3448 - ldr r4, =gUnknown_085EA40B + ldr r4, =gText_EggWillTakeALongTime b _081C346C .pool _081C3448: ldrh r0, [r1, 0x30] cmp r0, 0x5 bhi _081C3458 - ldr r4, =gUnknown_085EA4A2 + ldr r4, =gText_EggAboutToHatch b _081C346C .pool _081C3458: cmp r0, 0xA bhi _081C3464 - ldr r4, =gUnknown_085EA475 + ldr r4, =gText_EggWillHatchSoon b _081C346C .pool _081C3464: - ldr r4, =gUnknown_085EA40B + ldr r4, =gText_EggWillTakeALongTime cmp r0, 0x28 bhi _081C346C - ldr r4, =gUnknown_085EA442 + ldr r4, =gText_EggWillTakeSomeTime _081C346C: ldr r0, =gUnknown_0861CCCC movs r1, 0x2 @@ -6792,7 +6792,7 @@ sub_81C349C: @ 81C349C ldrb r0, [r4, 0x9] cmp r0, 0xFF bne _081C34C4 - ldr r4, =gUnknown_085EA678 + ldr r4, =gText_PeculiarEggNicePlace b _081C3502 .pool _081C34C4: @@ -6805,7 +6805,7 @@ _081C34C4: cmp r0, 0 bne _081C34E0 _081C34D8: - ldr r4, =gUnknown_085EA6AB + ldr r4, =gText_PeculiarEggTrade b _081C3502 .pool _081C34E0: @@ -6815,14 +6815,14 @@ _081C34E0: bl sub_81C32E0 lsls r0, 24 lsrs r0, 24 - ldr r4, =gUnknown_085EA702 + ldr r4, =gText_EggFromTraveler cmp r0, 0x1 bne _081C3502 - ldr r4, =gUnknown_085EA6D7 + ldr r4, =gText_EggFromHotSprings b _081C3502 .pool _081C3500: - ldr r4, =gUnknown_085EA647 + ldr r4, =gText_OddEggFoundByCouple _081C3502: ldr r0, =gUnknown_0861CCCC movs r1, 0x3 @@ -7021,7 +7021,7 @@ _081C36B0: movs r3, 0x2 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EA3B4 + ldr r1, =gText_RibbonsVar1 adds r0, r4, 0 bl StringExpandPlaceholders adds r5, r4, 0 @@ -8201,7 +8201,7 @@ sub_81C4154: @ 81C4154 adds r0, r4, 0 movs r1, 0 bl FillWindowPixelBuffer - ldr r1, =gUnknown_085EA4CB + ldr r1, =gText_HMMovesCantBeForgotten2 movs r0, 0 str r0, [sp] str r0, [sp, 0x4] @@ -10430,7 +10430,7 @@ sub_81C540C: @ 81C540C ldr r1, =gStringVar2 adds r0, r4, 0 bl CopyItemName - ldr r1, =gUnknown_085E9210 + ldr r1, =gText_UnkF908Var1Clear7Var2 adds r0, r5, 0 bl StringExpandPlaceholders b _081C5458 @@ -10635,7 +10635,7 @@ sub_81C55D8: @ 81C55D8 .pool _081C561C: ldr r0, =gStringVar1 - ldr r2, =gUnknown_085E91B0 + ldr r2, =gReturnToXStringsTable2 ldr r1, =gUnknown_0203CF30 ldrb r1, [r1, 0x4] lsls r1, 2 diff --git a/asm/pokenav.s b/asm/pokenav.s index eee6e2f6a..6ae25b362 100755 --- a/asm/pokenav.s +++ b/asm/pokenav.s @@ -6860,7 +6860,7 @@ sub_81CA770: @ 81CA770 movs r0, 0x2 bl sub_81C763C adds r5, r0, 0 - ldr r6, =gUnknown_085EBD4A + ldr r6, =gText_NoRibbonWinners movs r2, 0x1 negs r2, r2 movs r0, 0x1 @@ -7928,7 +7928,7 @@ sub_81CAF78: @ 81CAF78 lsls r0, 24 cmp r0, 0 bne _081CAFA4 - ldr r0, =gUnknown_085EEB0B + ldr r0, =gText_CallCantBeMadeHere b _081CAFCE .pool _081CAFA4: @@ -9748,7 +9748,7 @@ sub_81CBDF4: @ 81CBDF4 push {lr} lsls r0, 16 lsrs r0, 16 - ldr r1, =gUnknown_085EBE5F + ldr r1, =gText_NumberRegistered movs r2, 0 bl sub_81CBE88 pop {r0} @@ -9784,7 +9784,7 @@ sub_81CBE38: @ 81CBE38 push {lr} lsls r0, 16 lsrs r0, 16 - ldr r1, =gUnknown_085EBE6E + ldr r1, =gText_NumberOfBattles movs r2, 0x2 bl sub_81CBE88 pop {r0} @@ -9900,7 +9900,7 @@ sub_81CBEF8: @ 81CBEF8 bl GetMapName b _081CBF24 _081CBF1C: - ldr r1, =gUnknown_085EC00F + ldr r1, =gText_Unknown add r0, sp, 0xC bl StringCopy _081CBF24: @@ -10168,7 +10168,7 @@ sub_81CC11C: @ 81CC11C push {lr} sub sp, 0xC ldrb r0, [r0, 0x14] - ldr r2, =gUnknown_085EBF95 + ldr r2, =gText_TrainerCloseBy movs r1, 0x1 str r1, [sp] str r1, [sp, 0x4] @@ -13128,7 +13128,7 @@ _081CD862: adds r0, r4, r5 ldr r1, =0x00006325 adds r0, r1 - ldr r1, =gUnknown_085EBFCE + ldr r1, =gText_InParty b _081CD8F4 .pool _081CD8E4: @@ -14829,7 +14829,7 @@ sub_81CE738: @ 81CE738 movs r2, 0x1 movs r3, 0x4 bl ConvertIntToDecimalStringN - ldr r1, =gUnknown_085EBFD7 + ldr r1, =gText_Number2 bl StringCopy pop {r1} bx r1 @@ -14957,7 +14957,7 @@ _081CE80C: strb r0, [r1, 0x4] mov r5, sp adds r5, 0x11 - ldr r1, =gUnknown_085EBFD7 + ldr r1, =gText_Number2 adds r0, r5, 0 bl StringCopy ldr r0, =0x00001821 @@ -16949,7 +16949,7 @@ sub_81CF7F4: @ 81CF7F4 movs r0, 0xFF strb r0, [r4] ldr r5, =gStringVar2 - ldr r1, =gUnknown_085EC029 + ldr r1, =gText_NumberF700 adds r0, r5, 0 bl sub_81AFC28 mov r1, r8 @@ -19859,7 +19859,7 @@ sub_81D0E84: @ 81D0E84 adds r1, r4, 0 bl sub_81AFC0C ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EC030 + ldr r1, =gText_RibbonsF700 adds r0, r4, 0 bl sub_81AFC28 ldrb r0, [r5, 0xA] @@ -23412,7 +23412,7 @@ sub_81D28FC: @ 81D28FC movs r0, 0 movs r1, 0x11 bl FillWindowPixelBuffer - ldr r5, =gUnknown_085EFA31 + ldr r5, =gText_BattleMoves2 movs r0, 0x1 adds r1, r5, 0 movs r2, 0x80 @@ -23431,7 +23431,7 @@ sub_81D28FC: @ 81D28FC movs r1, 0x1 adds r2, r5, 0 bl PrintTextOnWindow - ldr r5, =gUnknown_085EFA52 + ldr r5, =gText_PPSlash movs r1, 0x29 mov r10, r1 str r1, [sp] @@ -23443,7 +23443,7 @@ sub_81D28FC: @ 81D28FC adds r2, r5, 0 movs r3, 0x4 bl PrintTextOnWindow - ldr r5, =gUnknown_085EFA56 + ldr r5, =gText_PowerSlash movs r0, 0x1 adds r1, r5, 0 movs r2, 0x6A @@ -23460,7 +23460,7 @@ sub_81D28FC: @ 81D28FC movs r1, 0x1 adds r2, r5, 0 bl PrintTextOnWindow - ldr r5, =gUnknown_085EFA5D + ldr r5, =gText_AccuracySlash movs r0, 0x1 adds r1, r5, 0 movs r2, 0x6A @@ -23508,7 +23508,7 @@ _081D29C4: adds r2, r5, 0 movs r3, 0x4 bl PrintTextOnWindow - ldr r1, =gUnknown_085EFA52 + ldr r1, =gText_PPSlash movs r0, 0x1 movs r2, 0 bl GetStringWidth @@ -23616,7 +23616,7 @@ sub_81D2ACC: @ 81D2ACC movs r0, 0x1 movs r1, 0x11 bl FillWindowPixelBuffer - ldr r5, =gUnknown_085EFA3E + ldr r5, =gText_ContestMoves2 movs r0, 0x1 adds r1, r5, 0 movs r2, 0x80 @@ -23632,7 +23632,7 @@ sub_81D2ACC: @ 81D2ACC movs r1, 0x1 adds r2, r5, 0 bl PrintTextOnWindow - ldr r5, =gUnknown_085EFA67 + ldr r5, =gText_Appeal2 movs r0, 0x1 adds r1, r5, 0 movs r2, 0x5C @@ -23648,7 +23648,7 @@ sub_81D2ACC: @ 81D2ACC movs r1, 0x1 adds r2, r5, 0 bl PrintTextOnWindow - ldr r5, =gUnknown_085EFA6E + ldr r5, =gText_Jam2 movs r0, 0x1 adds r1, r5, 0 movs r2, 0x5C @@ -24157,7 +24157,7 @@ _081D2EFC: cmp r7, 0xE bne _081D2F2C adds r0, r5, 0x5 - ldr r1, =gUnknown_085EBFCE + ldr r1, =gText_InParty b _081D2F3A .pool _081D2F2C: @@ -25214,10 +25214,10 @@ _081D36CA: adds r4, 0xC movs r1, 0 ldrsh r0, [r4, r1] - ldr r1, =gUnknown_085EEA76 + ldr r1, =gText_Dash cmp r0, 0 blt _081D3704 - ldr r1, =gUnknown_085EEA73 + ldr r1, =gText_UnkCtrlF904 _081D3704: adds r0, r6, 0 bl StringCopy @@ -29757,7 +29757,7 @@ sub_81D5C8C: @ 81D5C8C movs r0, 0 movs r1, 0 bl FillWindowPixelBuffer - ldr r5, =gUnknown_085EF88A + ldr r5, =gText_TimeBoard movs r0, 0x1 adds r1, r5, 0 movs r2, 0xD0 @@ -29842,9 +29842,9 @@ _081D5CD6: movs r3, 0x2 bl ConvertIntToDecimalStringN mov r0, r9 - ldr r1, =gUnknown_085EF895 + ldr r1, =gText_TimeCleared bl StringCopy - ldr r1, =gUnknown_085EF8A3 + ldr r1, =gText_XMinYDotZSec bl StringExpandPlaceholders movs r0, 0x1 mov r1, r9 diff --git a/asm/record_mixing.s b/asm/record_mixing.s index a28af9a9a..a62022cc7 100644 --- a/asm/record_mixing.s +++ b/asm/record_mixing.s @@ -630,7 +630,7 @@ _080E726C: lsrs r0, 24 strh r0, [r5, 0x14] _080E7296: - ldr r0, =gUnknown_085EEA8E + ldr r0, =gText_RecordMixingComplete bl sub_80E70F4 strh r4, [r5, 0x10] b _080E730A @@ -739,7 +739,7 @@ _080E7370: b _080E7566 .pool _080E7384: - ldr r0, =gUnknown_085EEA7E + ldr r0, =gText_MixingRecords bl sub_80E70F4 movs r0, 0xE1 lsls r0, 3 diff --git a/asm/region_map.s b/asm/region_map.s index 1b1dfb4bd..150b4893e 100644 --- a/asm/region_map.s +++ b/asm/region_map.s @@ -3212,12 +3212,12 @@ sub_81245DC: @ 81245DC beq _081245F8 cmp r1, 0x57 bne _08124604 - ldr r1, =gUnknown_085EC9D2 + ldr r1, =gText_Ferry bl StringCopy b _0812460A .pool _081245F8: - ldr r1, =gUnknown_085EC9D8 + ldr r1, =gText_SecretBase bl StringCopy b _0812460A .pool @@ -3239,7 +3239,7 @@ sub_8124610: @ 8124610 bl sub_81245DC b _08124626 _08124620: - ldr r1, =gUnknown_085EC9E4 + ldr r1, =gText_Hideout bl StringCopy _08124626: pop {r1} diff --git a/asm/reset_rtc_screen.s b/asm/reset_rtc_screen.s index 076ddbf0b..ac2c1181c 100644 --- a/asm/reset_rtc_screen.s +++ b/asm/reset_rtc_screen.s @@ -414,7 +414,7 @@ sub_809EBC4: @ 809EBC4 adds r1, r4, 0 bl StringCopy adds r7, r0, 0 - ldr r1, =gUnknown_085EE68A + ldr r1, =gText_Day bl StringCopy adds r7, r0, 0 adds r0, r4, 0 @@ -426,7 +426,7 @@ sub_809EBC4: @ 809EBC4 adds r1, r4, 0 bl StringCopy adds r7, r0, 0 - ldr r5, =gUnknown_085EE68E + ldr r5, =gText_Colon3 adds r1, r5, 0 bl StringCopy adds r7, r0, 0 @@ -514,7 +514,7 @@ sub_809ECB4: @ 809ECB4 movs r2, 0x1 mov r3, r9 bl sub_809EBC4 - ldr r2, =gUnknown_085EE690 + ldr r2, =gText_Confirm2 movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -1011,7 +1011,7 @@ _0809F11C: movs r1, 0 movs r3, 0xE bl SetWindowBorderStyle - ldr r2, =gUnknown_085ECA0D + ldr r2, =gText_PresentTime movs r0, 0x1 str r0, [sp] movs r4, 0xFF @@ -1033,7 +1033,7 @@ _0809F11C: movs r1, 0 movs r2, 0x11 bl sub_809EBC4 - ldr r2, =gUnknown_085ECA22 + ldr r2, =gText_PreviousTime movs r0, 0x21 str r0, [sp] str r4, [sp, 0x4] @@ -1062,7 +1062,7 @@ _0809F11C: movs r1, 0 movs r2, 0x31 bl sub_809EBC4 - ldr r0, =gUnknown_085EC9EC + ldr r0, =gText_ResetRTCConfirmCancel bl sub_809F0C0 movs r0, 0 movs r1, 0x2 @@ -1161,7 +1161,7 @@ _0809F276: cmp r0, 0x2 bne _0809F29C _0809F282: - ldr r0, =gUnknown_085ECAA7 + ldr r0, =gText_NoSaveFileCantSetTime bl sub_809F0C0 movs r0, 0x5 strh r0, [r5] @@ -1193,7 +1193,7 @@ _0809F2CA: movs r0, 0 movs r1, 0 bl sub_8198070 - ldr r0, =gUnknown_085ECA38 + ldr r0, =gText_PleaseResetTime bl sub_809F0C0 ldr r2, =gLocalTime ldr r0, =gSaveBlock2Ptr @@ -1261,7 +1261,7 @@ _0809F340: ldrh r1, [r4] bl VarSet bl DisableResetRTC - ldr r0, =gUnknown_085ECA4F + ldr r0, =gText_ClockHasBeenReset bl sub_809F0C0 movs r0, 0x4 strh r0, [r5] @@ -1274,14 +1274,14 @@ _0809F398: lsrs r0, 24 cmp r0, 0x1 bne _0809F3B8 - ldr r0, =gUnknown_085ECA8A + ldr r0, =gText_SaveCompleted bl sub_809F0C0 movs r0, 0x49 bl PlaySE b _0809F3C4 .pool _0809F3B8: - ldr r0, =gUnknown_085ECA9A + ldr r0, =gText_SaveFailed bl sub_809F0C0 movs r0, 0x16 bl PlaySE diff --git a/asm/rom6.s b/asm/rom6.s index bfa19101a..4bad6e35d 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -1064,23 +1064,23 @@ sub_8135DAC: @ 8135DAC movs r0, 0 adds r1, r4, 0 bl sub_8135D7C - ldr r1, =gUnknown_085E931D + ldr r1, =gText_Spicy movs r0, 0x2 movs r2, 0 bl sub_8135D7C - ldr r1, =gUnknown_085E9323 + ldr r1, =gText_Dry movs r0, 0x3 movs r2, 0 bl sub_8135D7C - ldr r1, =gUnknown_085E9327 + ldr r1, =gText_Sweet movs r0, 0x4 movs r2, 0 bl sub_8135D7C - ldr r1, =gUnknown_085E932D + ldr r1, =gText_Bitter movs r0, 0x5 movs r2, 0 bl sub_8135D7C - ldr r1, =gUnknown_085E9334 + ldr r1, =gText_Sour movs r0, 0x6 movs r2, 0 bl sub_8135D7C @@ -1148,7 +1148,7 @@ _08135E7C: adds r4, r7 ldr r0, [r5] adds r0, r4 - ldr r1, =gUnknown_085E9344 + ldr r1, =gText_StowCase bl StringCopy ldr r1, [r5] lsls r2, r6, 3 @@ -1231,7 +1231,7 @@ sub_8135F04: @ 8135F04 movs r2, 0 movs r3, 0x3 bl ConvertIntToDecimalStringN - ldr r1, =gUnknown_085E934F + ldr r1, =gText_LvVar1 adds r0, r4, 0 bl StringExpandPlaceholders pop {r4-r6} @@ -2598,7 +2598,7 @@ sub_8136AB4: @ 8136AB4 ldr r1, [r1] bl StringCopy ldr r5, =gStringVar4 - ldr r1, =gUnknown_085E9353 + ldr r1, =gText_ThrowAwayVar1 adds r0, r5, 0 bl StringExpandPlaceholders bl sav2_get_text_speed @@ -2654,7 +2654,7 @@ sub_8136B78: @ 8136B78 lsls r4, 24 lsrs r4, 24 ldr r5, =gStringVar4 - ldr r1, =gUnknown_085E9367 + ldr r1, =gText_Var1ThrownAway adds r0, r5, 0 bl StringExpandPlaceholders bl sav2_get_text_speed @@ -4796,14 +4796,14 @@ sub_8137D5C: @ 8137D5C movs r2, 0 movs r3, 0x2 bl ConvertIntToDecimalStringN - ldr r1, =gUnknown_085EB5EE + ldr r1, =gText_SpaceTimes adds r0, r4, 0 bl StringAppend b _08137D90 .pool _08137D88: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EB5CF + ldr r1, =gText_99TimesPlus bl StringCopy _08137D90: ldr r0, =0x00000e0f @@ -4833,14 +4833,14 @@ _08137D90: movs r2, 0x2 movs r3, 0x2 bl ConvertIntToDecimalStringN - ldr r1, =gUnknown_085EB5E5 + ldr r1, =gText_SpaceSeconds adds r0, r4, 0 bl StringAppend b _08137DF8 .pool _08137DF0: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085EB5DA + ldr r1, =gText_1MinutePlus bl StringCopy _08137DF8: movs r4, 0 @@ -6425,13 +6425,13 @@ sub_8138B10: @ 8138B10 cmp r0, 0 bne _08138B34 ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EB5F9 + ldr r1, =gText_BigGuy bl StringCopy b _08138B3C .pool _08138B34: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EB601 + ldr r1, =gText_BigGirl bl StringCopy _08138B3C: pop {r0} @@ -6448,13 +6448,13 @@ sub_8138B48: @ 8138B48 cmp r0, 0 bne _08138B6C ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EB60E + ldr r1, =gText_Daughter bl StringCopy b _08138B74 .pool _08138B6C: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EB60A + ldr r1, =gText_Son bl StringCopy _08138B74: pop {r0} @@ -8511,7 +8511,7 @@ sub_8139B60: @ 8139B60 ldrb r0, [r5] movs r1, 0 bl SetStandardWindowBorderStyle - ldr r4, =gUnknown_085EB6A5 + ldr r4, =gText_ElevatorNowOn movs r0, 0x1 adds r1, r4, 0 movs r2, 0x40 @@ -10131,7 +10131,7 @@ sub_813A8FC: @ 813A8FC movs r2, 0x1 movs r3, 0x4 bl ConvertIntToDecimalStringN - ldr r1, =gUnknown_085EB6AD + ldr r1, =gText_BP bl StringCopy movs r0, 0x1 add r1, sp, 0xC @@ -12650,37 +12650,37 @@ _0813BE58: .4byte _0813BEC0 _0813BE70: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EAD14 + ldr r1, =gText_Steven bl StringCopy b _0813BF04 .pool _0813BE84: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EAD1B + ldr r1, =gText_Brawly bl StringCopy b _0813BF04 .pool _0813BE98: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EAD22 + ldr r1, =gText_Winona bl StringCopy b _0813BF04 .pool _0813BEAC: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EAD29 + ldr r1, =gText_Phoebe bl StringCopy b _0813BF04 .pool _0813BEC0: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EAD30 + ldr r1, =gText_Glacia bl StringCopy b _0813BF04 .pool _0813BED4: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EAD0C + ldr r1, =gText_Wallace bl StringCopy b _0813BF04 .pool diff --git a/asm/save_failed_screen.s b/asm/save_failed_screen.s index 247c765b6..182ff8954 100644 --- a/asm/save_failed_screen.s +++ b/asm/save_failed_screen.s @@ -268,7 +268,7 @@ _08178FF8: ldrb r0, [r4] movs r1, 0x1 bl CopyWindowToVram - ldr r0, =gUnknown_085EC816 + ldr r0, =gText_SaveFailedCheckingBackup movs r1, 0x1 movs r2, 0 bl sub_8178F44 @@ -340,7 +340,7 @@ _0817929C: ldrb r0, [r4] movs r1, 0x11 bl FillWindowPixelBuffer - ldr r0, =gUnknown_085EC917 + ldr r0, =gText_CheckCompleted movs r1, 0x1 movs r2, 0 bl sub_8178F44 @@ -353,7 +353,7 @@ _0817929C: ldrb r0, [r4] movs r1, 0x11 bl FillWindowPixelBuffer - ldr r0, =gUnknown_085EC816 + ldr r0, =gText_SaveFailedCheckingBackup movs r1, 0x1 movs r2, 0 bl sub_8178F44 @@ -373,7 +373,7 @@ _081792EC: ldrb r0, [r0] movs r1, 0x11 bl FillWindowPixelBuffer - ldr r0, =gUnknown_085EC86F + ldr r0, =gText_BackupMemoryDamaged b _08179330 .pool _0817931C: @@ -385,7 +385,7 @@ _0817931C: ldr r0, [r0] cmp r0, 0 bne _08179370 - ldr r0, =gUnknown_085EC94F + ldr r0, =gText_SaveCompleteGameCannotContinue _08179330: movs r1, 0x1 movs r2, 0 @@ -397,7 +397,7 @@ _08179348: ldrb r0, [r0] movs r1, 0x11 bl FillWindowPixelBuffer - ldr r0, =gUnknown_085EC86F + ldr r0, =gText_BackupMemoryDamaged movs r1, 0x1 movs r2, 0 bl sub_8178F44 @@ -406,7 +406,7 @@ _08179348: b _08179380 .pool _08179370: - ldr r0, =gUnknown_085EC9A2 + ldr r0, =gText_SaveCompletePressA movs r1, 0x1 movs r2, 0 bl sub_8178F44 @@ -436,7 +436,7 @@ sub_8179390: @ 8179390 ldrb r0, [r0] movs r1, 0x11 bl FillWindowPixelBuffer - ldr r0, =gUnknown_085EC8D4 + ldr r0, =gText_GamePlayCannotBeContinued movs r1, 0x1 movs r2, 0 bl sub_8178F44 diff --git a/asm/script_menu.s b/asm/script_menu.s index 6c5e6d2bd..8aecbf696 100644 --- a/asm/script_menu.s +++ b/asm/script_menu.s @@ -724,7 +724,7 @@ _080E23AC: lsls r0, 24 cmp r0, 0 beq _080E23D4 - ldr r0, =gUnknown_085EB18B + ldr r0, =gText_HallOfFame adds r1, r5, 0 bl display_text_and_get_width adds r5, r0, 0 @@ -751,7 +751,7 @@ _080E23D4: adds r0, r6, 0 movs r1, 0 bl SetStandardWindowBorderStyle - ldr r2, =gUnknown_085EB18B + ldr r2, =gText_HallOfFame movs r0, 0x21 str r0, [sp] movs r5, 0xFF @@ -762,7 +762,7 @@ _080E23D4: movs r1, 0x1 adds r3, r7, 0 bl PrintTextOnWindow - ldr r2, =gUnknown_085EB198 + ldr r2, =gText_LogOff movs r0, 0x31 str r0, [sp] str r5, [sp, 0x4] @@ -786,7 +786,7 @@ _080E2448: adds r0, r6, 0 movs r1, 0 bl SetStandardWindowBorderStyle - ldr r2, =gUnknown_085EB198 + ldr r2, =gText_LogOff movs r0, 0x21 str r0, [sp] movs r0, 0xFF @@ -803,7 +803,7 @@ _080E247A: lsrs r1, r0, 24 cmp r1, 0 beq _080E24B0 - ldr r2, =gUnknown_085EB176 + ldr r2, =gText_LanettesPC movs r0, 0x1 str r0, [sp] movs r0, 0xFF @@ -817,7 +817,7 @@ _080E247A: b _080E24C6 .pool _080E24B0: - ldr r2, =gUnknown_085EB169 + ldr r2, =gText_SomeonesPC movs r0, 0x1 str r0, [sp] movs r0, 0xFF @@ -829,7 +829,7 @@ _080E24B0: bl PrintTextOnWindow _080E24C6: ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EB183 + ldr r1, =gText_PlayersPC adds r0, r4, 0 bl StringExpandPlaceholders adds r0, r6, 0 @@ -1677,7 +1677,7 @@ CreateStartMenu: @ 80E2BAC adds r0, r4, 0 movs r1, 0 bl SetStandardWindowBorderStyle - ldr r2, =gUnknown_085EB25C + ldr r2, =gText_MenuOptionPokedex movs r0, 0x9 str r0, [sp] movs r5, 0xFF @@ -1688,7 +1688,7 @@ CreateStartMenu: @ 80E2BAC movs r1, 0x1 movs r3, 0x8 bl PrintTextOnWindow - ldr r2, =gUnknown_085EB264 + ldr r2, =gText_MenuOptionPokemon movs r0, 0x19 str r0, [sp] str r5, [sp, 0x4] @@ -1697,7 +1697,7 @@ CreateStartMenu: @ 80E2BAC movs r1, 0x1 movs r3, 0x8 bl PrintTextOnWindow - ldr r2, =gUnknown_085EB26C + ldr r2, =gText_MenuOptionBag movs r0, 0x29 str r0, [sp] str r5, [sp, 0x4] @@ -1706,7 +1706,7 @@ CreateStartMenu: @ 80E2BAC movs r1, 0x1 movs r3, 0x8 bl PrintTextOnWindow - ldr r2, =gUnknown_085EB270 + ldr r2, =gText_MenuOptionPokenav movs r0, 0x39 str r0, [sp] str r5, [sp, 0x4] @@ -1725,7 +1725,7 @@ CreateStartMenu: @ 80E2BAC movs r1, 0x1 movs r3, 0x8 bl PrintTextOnWindow - ldr r2, =gUnknown_085EB279 + ldr r2, =gText_MenuOptionSave movs r0, 0x59 str r0, [sp] str r5, [sp, 0x4] @@ -1734,7 +1734,7 @@ CreateStartMenu: @ 80E2BAC movs r1, 0x1 movs r3, 0x8 bl PrintTextOnWindow - ldr r2, =gUnknown_085EB27E + ldr r2, =gText_MenuOptionOption movs r0, 0x69 str r0, [sp] str r5, [sp, 0x4] @@ -1743,7 +1743,7 @@ CreateStartMenu: @ 80E2BAC movs r1, 0x1 movs r3, 0x8 bl PrintTextOnWindow - ldr r2, =gUnknown_085EB285 + ldr r2, =gText_MenuOptionExit movs r0, 0x79 str r0, [sp] str r5, [sp, 0x4] diff --git a/asm/secret_base.s b/asm/secret_base.s index 5cf0f3697..fd4fe6701 100644 --- a/asm/secret_base.s +++ b/asm/secret_base.s @@ -1576,7 +1576,7 @@ sub_80E9780: @ 80E9780 ldrb r1, [r0] adds r0, r6, 0 bl ConvertInternationalString - ldr r1, =gUnknown_085EA72F + ldr r1, =gText_ApostropheSBase adds r0, r6, 0 bl StringAppend pop {r3} @@ -2204,7 +2204,7 @@ sub_80E9C9C: @ 80E9C9C b _080E9D1A .pool _080E9D10: - ldr r1, =gUnknown_085EA785 + ldr r1, =gText_NoRegistry ldr r2, =task_pc_turn_off adds r0, r6, 0 bl DisplayItemMessageOnField @@ -2583,7 +2583,7 @@ sub_80E9FFC: @ 80E9FFC ldrb r1, [r4, 0x8] bl sub_80E9780 ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EA737 + ldr r1, =gText_OkayToDeleteFromRegistry adds r0, r4, 0 bl StringExpandPlaceholders ldr r2, =sub_80EA06C @@ -2683,7 +2683,7 @@ sub_80EA120: @ 80EA120 push {lr} lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_085EA762 + ldr r1, =gText_RegisteredDataDeleted ldr r2, =sub_80EA08C bl DisplayItemMessageOnField pop {r0} diff --git a/asm/shop.s b/asm/shop.s index 9e03399fc..646390732 100644 --- a/asm/shop.s +++ b/asm/shop.s @@ -325,14 +325,14 @@ Task_ExitSellMenu: @ 80DFCF8 ldrb r0, [r0, 0xF] cmp r0, 0x2 bne _080DFD2C - ldr r1, =gUnknown_085E95C7 + ldr r1, =gText_CanIHelpWithAnythingElse ldr r2, =ReturnToShopMenuAfterExitingSellMenu adds r0, r4, 0 bl DisplayItemMessageOnField b _080DFD36 .pool _080DFD2C: - ldr r1, =gUnknown_085E959B + ldr r1, =gText_AnythingElseICanHelp ldr r2, =ReturnToShopMenuAfterExitingSellMenu adds r0, r5, 0 bl DisplayItemMessageOnField @@ -748,7 +748,7 @@ _080E00D8: b _080E00EA .pool _080E00E8: - ldr r4, =gUnknown_085E93E0 + ldr r4, =gText_QuitShopping _080E00EA: movs r0, 0x2 movs r1, 0 @@ -817,7 +817,7 @@ _080E0164: bl ConvertIntToDecimalStringN _080E0176: ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E969C + ldr r1, =gText_PokedollarVar1 adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0x7 @@ -2060,7 +2060,7 @@ _080E0B92: lsls r0, 24 cmp r0, 0 bne _080E0BD0 - ldr r1, =gUnknown_085E9539 + ldr r1, =gText_YouDontHaveMoney ldr r2, =BuyMenuReturnToItemList b _080E0C28 .pool @@ -2091,11 +2091,11 @@ _080E0BD0: adds r1, r0 adds r0, r4, 0 bl StringCopy - ldr r1, =gUnknown_085E9417 + ldr r1, =gText_Var1CertainlyHowMany2 b _080E0C26 .pool _080E0C24: - ldr r1, =gUnknown_085E93EF + ldr r1, =gText_Var1CertainlyHowMany _080E0C26: ldr r2, =Task_BuyHowManyDialogueInit _080E0C28: @@ -2121,13 +2121,13 @@ _080E0C38: cmp r0, 0x1 bne _080E0C7C ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9468 + ldr r1, =gText_Var1IsItThatllBeVar2 bl StringExpandPlaceholders b _080E0C84 .pool _080E0C7C: ldr r0, =gStringVar4 - ldr r1, =gUnknown_085E9493 + ldr r1, =gText_YouWantedVar1ThatllBeVar2 bl StringExpandPlaceholders _080E0C84: ldr r1, =gStringVar4 @@ -2171,7 +2171,7 @@ Task_BuyHowManyDialogueInit: @ 80E0CA4 movs r3, 0x4 bl ConvertIntToDecimalStringN ldr r4, =gStringVar4 - ldr r1, =gUnknown_085E93D5 + ldr r1, =gText_InBagVar1 adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0 @@ -2319,7 +2319,7 @@ _080E0DF0: movs r2, 0 movs r3, 0x6 bl ConvertIntToDecimalStringN - ldr r1, =gUnknown_085E943F + ldr r1, =gText_Var1AndYouWantedVar2 ldr r2, =BuyMenuConfirmPurchase adds r0, r6, 0 bl BuyMenuDisplayMessage @@ -2400,7 +2400,7 @@ BuyMenuTryMakePurchase: @ 80E0EDC lsrs r0, 24 cmp r0, 0x1 bne _080E0F30 - ldr r1, =gUnknown_085E94C5 + ldr r1, =gText_HereYouGoThankYou ldr r2, =BuyMenuSubtractMoney adds r0, r5, 0 bl BuyMenuDisplayMessage @@ -2409,7 +2409,7 @@ BuyMenuTryMakePurchase: @ 80E0EDC b _080E0F7A .pool _080E0F30: - ldr r1, =gUnknown_085E9558 + ldr r1, =gText_NoMoreRoomForThis ldr r2, =BuyMenuReturnToItemList b _080E0F60 .pool @@ -2422,11 +2422,11 @@ _080E0F40: ldrb r0, [r6, 0xF] cmp r0, 0x1 bne _080E0F5C - ldr r1, =gUnknown_085E94E7 + ldr r1, =gText_ThankYouIllSendItHome b _080E0F5E .pool _080E0F5C: - ldr r1, =gUnknown_085E9510 + ldr r1, =gText_ThanksIllSendItHome _080E0F5E: ldr r2, =BuyMenuSubtractMoney _080E0F60: @@ -2435,7 +2435,7 @@ _080E0F60: b _080E0F7A .pool _080E0F70: - ldr r1, =gUnknown_085E957F + ldr r1, =gText_SpaceForVar1Full ldr r2, =BuyMenuReturnToItemList adds r0, r7, 0 bl BuyMenuDisplayMessage @@ -2536,7 +2536,7 @@ Task_ReturnToItemListAfterItemPurchase: @ 80E100C lsrs r0, 24 cmp r0, 0x1 bne _080E106C - ldr r1, =gUnknown_085E95EA + ldr r1, =gText_ThrowInPremierBall ldr r2, =BuyMenuReturnToItemList adds r0, r4, 0 bl BuyMenuDisplayMessage diff --git a/asm/slot_machine.s b/asm/slot_machine.s index 6fdd1a214..6bd62ed9f 100644 --- a/asm/slot_machine.s +++ b/asm/slot_machine.s @@ -976,7 +976,7 @@ sub_812ACF4: @ 812ACF4 movs r0, 0 movs r1, 0 bl sub_81973C4 - ldr r2, =gUnknown_085EF734 + ldr r2, =gText_YouDontHaveThreeCoins movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -1544,7 +1544,7 @@ sub_812B158: @ 812B158 movs r0, 0 movs r1, 0 bl sub_81973C4 - ldr r2, =gUnknown_085EF6E9 + ldr r2, =gText_QuitTheGame movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -1634,7 +1634,7 @@ sub_812B214: @ 812B214 movs r0, 0 movs r1, 0 bl sub_81973C4 - ldr r2, =gUnknown_085EF6F8 + ldr r2, =gText_YouveGot9999Coins movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -1687,7 +1687,7 @@ sub_812B280: @ 812B280 movs r0, 0 movs r1, 0 bl sub_81973C4 - ldr r2, =gUnknown_085EF710 + ldr r2, =gText_YouveRunOutOfCoins movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -7209,7 +7209,7 @@ sub_812DD78: @ 812DD78 str r0, [sp] movs r4, 0 str r4, [sp, 0x4] - ldr r0, =gUnknown_085EF750 + ldr r0, =gText_ReelTimeHelp str r0, [sp, 0x8] movs r0, 0x1 movs r1, 0x1 diff --git a/asm/start_menu.s b/asm/start_menu.s index f71df1046..4f8544eea 100644 --- a/asm/start_menu.s +++ b/asm/start_menu.s @@ -1862,7 +1862,7 @@ _080A0710: bl PrintTextOnWindow movs r4, 0x11 ldrb r0, [r6] - ldr r2, =gUnknown_085EED26 + ldr r2, =gText_SavingPlayer str r4, [sp] mov r1, r8 str r1, [sp, 0x4] @@ -1887,7 +1887,7 @@ _080A0710: bl sub_819A024 movs r4, 0x21 ldrb r0, [r6] - ldr r2, =gUnknown_085EED2D + ldr r2, =gText_SavingBadges str r4, [sp] mov r1, r8 str r1, [sp, 0x4] @@ -1922,7 +1922,7 @@ _080A0710: bne _080A0802 movs r4, 0x31 ldrb r0, [r6] - ldr r2, =gUnknown_085EED34 + ldr r2, =gText_SavingPokedex str r4, [sp] mov r1, r8 str r1, [sp, 0x4] @@ -1952,7 +1952,7 @@ _080A0710: _080A0802: adds r4, 0x10 ldrb r0, [r6] - ldr r2, =gUnknown_085EED3C + ldr r2, =gText_SavingTime lsls r4, 24 lsrs r4, 24 str r4, [sp] diff --git a/asm/trade.s b/asm/trade.s index 3f9323971..77eaac095 100644 --- a/asm/trade.s +++ b/asm/trade.s @@ -9004,7 +9004,7 @@ _0807C0F8: .pool _0807C120: ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE942 + ldr r1, =gText_XWillBeSentToY adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0 @@ -9070,7 +9070,7 @@ _0807C178: adds r0, 0x1 strh r0, [r1] ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE959 + ldr r1, =gText_ByeByeVar1 adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0 @@ -10471,7 +10471,7 @@ _0807CDDC: movs r0, 0 bl SetGpuReg ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE966 + ldr r1, =gText_XSentOverY adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0 @@ -10542,7 +10542,7 @@ _0807CE70: movs r5, 0 strh r0, [r1] ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE977 + ldr r1, =gText_TakeGoodCareOfX adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0 @@ -11066,7 +11066,7 @@ _0807D4D4: .pool _0807D4FC: ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE942 + ldr r1, =gText_XWillBeSentToY adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0 @@ -11132,7 +11132,7 @@ _0807D554: adds r0, 0x1 strh r0, [r1] ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE959 + ldr r1, =gText_ByeByeVar1 adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0 @@ -12576,7 +12576,7 @@ _0807E228: movs r0, 0 bl SetGpuReg ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE966 + ldr r1, =gText_XSentOverY adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0 @@ -12647,7 +12647,7 @@ _0807E2BC: movs r5, 0 strh r0, [r1] ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EE977 + ldr r1, =gText_TakeGoodCareOfX adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0 @@ -13751,7 +13751,7 @@ _0807ED10: adds r0, 0x1 strb r0, [r1] ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EF6D2 + ldr r1, =gText_CommunicationStandby5 b _0807EDA6 .pool _0807ED2C: @@ -14634,7 +14634,7 @@ _0807F4C0: movs r0, 0x1 strb r0, [r1] ldr r4, =gStringVar4 - ldr r1, =gUnknown_085EF6D2 + ldr r1, =gText_CommunicationStandby5 adds r0, r4, 0 bl StringExpandPlaceholders movs r0, 0 diff --git a/asm/trader.s b/asm/trader.s index e93bceccb..877d17382 100644 --- a/asm/trader.s +++ b/asm/trader.s @@ -87,7 +87,7 @@ sub_8133A78: @ 8133A78 ldr r0, [r0] str r0, [sp, 0xC] str r1, [sp, 0x10] - ldr r1, =gUnknown_085EB7EA + ldr r1, =gText_Exit movs r0, 0x1 movs r2, 0 bl GetStringWidth @@ -193,7 +193,7 @@ _08133B94: cmp r5, 0x3 bls _08133B3C ldrb r0, [r7, 0x6] - ldr r2, =gUnknown_085EB7EA + ldr r2, =gText_Exit lsls r1, r5, 4 adds r1, 0x1 lsls r1, 24 diff --git a/asm/trainer_card.s b/asm/trainer_card.s index ec0b58653..7552d7ace 100644 --- a/asm/trainer_card.s +++ b/asm/trainer_card.s @@ -410,7 +410,7 @@ _080C2A2C: movs r0, 0 movs r1, 0x1 bl sub_81973C4 - ldr r2, =gUnknown_085ED042 + ldr r2, =gText_WaitingTrainerFinishReading movs r0, 0x1 str r0, [sp] movs r0, 0xFF @@ -1714,7 +1714,7 @@ sub_80C3548: @ 80C3548 sub_80C3574: @ 80C3574 push {r4,r5,lr} sub sp, 0x2C - ldr r1, =gUnknown_085ECF71 + ldr r1, =gText_TrainerCardName add r0, sp, 0xC bl StringCopy adds r5, r0, 0 @@ -1775,7 +1775,7 @@ _080C35FA: sub_80C3608: @ 80C3608 push {r4,lr} sub sp, 0x2C - ldr r1, =gUnknown_085ECF78 + ldr r1, =gText_TrainerCardIDNo add r0, sp, 0xC bl StringCopy ldr r4, =gUnknown_02039CE8 @@ -1842,7 +1842,7 @@ sub_80C3684: @ 80C3684 movs r0, 0x1 negs r0, r0 str r0, [sp, 0x4] - ldr r0, =gUnknown_085ECF7E + ldr r0, =gText_TrainerCardMoney str r0, [sp, 0x8] movs r0, 0x1 movs r1, 0x1 @@ -1857,7 +1857,7 @@ _080C36C4: movs r0, 0x1 negs r0, r0 str r0, [sp, 0x4] - ldr r0, =gUnknown_085ECF7E + ldr r0, =gText_TrainerCardMoney str r0, [sp, 0x8] movs r0, 0x1 movs r1, 0x1 @@ -1876,7 +1876,7 @@ _080C36DE: movs r3, 0x6 bl ConvertIntToDecimalStringN ldr r5, =gStringVar4 - ldr r1, =gUnknown_085E969C + ldr r1, =gText_PokedollarVar1 adds r0, r5, 0 bl StringExpandPlaceholders ldr r0, [r4] @@ -1958,7 +1958,7 @@ sub_80C378C: @ 80C378C movs r0, 0x1 negs r0, r0 str r0, [sp, 0x4] - ldr r0, =gUnknown_085ECF86 + ldr r0, =gText_TrainerCardPokedex str r0, [sp, 0x8] movs r0, 0x1 movs r1, 0x1 @@ -1973,7 +1973,7 @@ _080C37DC: movs r0, 0x1 negs r0, r0 str r0, [sp, 0x4] - ldr r0, =gUnknown_085ECF86 + ldr r0, =gText_TrainerCardPokedex str r0, [sp, 0x8] movs r0, 0x1 movs r1, 0x1 @@ -1992,7 +1992,7 @@ _080C37F6: movs r2, 0 movs r3, 0x3 bl ConvertIntToDecimalStringN - ldr r1, =gUnknown_085ECF8E + ldr r1, =gText_EmptyString6 bl StringCopy ldr r0, [r4] ldr r1, =0x0000052b @@ -2054,7 +2054,7 @@ sub_80C3880: @ 80C3880 movs r0, 0x1 negs r0, r0 str r0, [sp, 0x4] - ldr r0, =gUnknown_085ECF99 + ldr r0, =gText_TrainerCardTime str r0, [sp, 0x8] movs r0, 0x1 movs r1, 0x1 @@ -2069,7 +2069,7 @@ _080C38C8: movs r0, 0x1 negs r0, r0 str r0, [sp, 0x4] - ldr r0, =gUnknown_085ECF99 + ldr r0, =gText_TrainerCardTime str r0, [sp, 0x8] movs r0, 0x1 movs r1, 0x1 @@ -2105,7 +2105,7 @@ _080C391C: bls _080C3922 movs r6, 0x3B _080C3922: - ldr r1, =gUnknown_085ECF8F + ldr r1, =gText_Colon2 movs r0, 0x1 movs r2, 0 bl GetStringWidth @@ -2172,7 +2172,7 @@ _080C395C: ldr r0, [r0] str r0, [sp] str r5, [sp, 0x4] - ldr r0, =gUnknown_085ECF8F + ldr r0, =gText_Colon2 str r0, [sp, 0x8] movs r0, 0x1 movs r1, 0x1 @@ -2331,7 +2331,7 @@ sub_80C3AF0: @ 80C3AF0 bl StringCopy ldr r0, [r4] adds r0, 0x4D - ldr r1, =gUnknown_085ECFA6 + ldr r1, =gText_Var1sTrainerCard bl StringExpandPlaceholders _080C3B30: pop {r4} @@ -2512,7 +2512,7 @@ sub_80C3CCC: @ 80C3CCC ldrb r0, [r2, 0xB] cmp r0, 0 beq _080C3CE4 - ldr r1, =gUnknown_085ECFB8 + ldr r1, =gText_HallOfFameDebut adds r2, 0x93 ldr r3, =gUnknown_0856FB0F movs r0, 0 @@ -2585,7 +2585,7 @@ sub_80C3D60: @ 80C3D60 adds r1, r2 bl StringCopy ldr r4, =gStringVar4 - ldr r1, =gUnknown_085ECFED + ldr r1, =gText_WinsLosses adds r0, r4, 0 bl StringExpandPlaceholders ldr r1, [r5] @@ -2631,7 +2631,7 @@ sub_80C3DF0: @ 80C3DF0 ldrb r0, [r2, 0x10] cmp r0, 0 beq _080C3E0A - ldr r1, =gUnknown_085ED010 + ldr r1, =gText_PokemonTrades ldr r0, =0x00000237 adds r2, r0 ldr r3, =gUnknown_0856FB0F @@ -2685,7 +2685,7 @@ sub_80C3E58: @ 80C3E58 ldr r0, [r0] cmp r0, 0 beq _080C3E80 - ldr r1, =gUnknown_085ED036 + ldr r1, =gText_BerryCrush ldr r0, =0x000002c3 adds r2, r0 ldr r3, =gUnknown_0856FB0F @@ -2738,7 +2738,7 @@ sub_80C3ED4: @ 80C3ED4 ldr r0, [r0] cmp r0, 0 beq _080C3EFC - ldr r1, =gUnknown_085ED01F + ldr r1, =gText_UnionTradesAndBattles ldr r0, =0x0000034f adds r2, r0 ldr r3, =gUnknown_0856FB0F @@ -2773,7 +2773,7 @@ sub_80C3F14: @ 80C3F14 ldr r0, [r4] ldr r1, =0x00000395 adds r0, r1 - ldr r1, =gUnknown_085ED096 + ldr r1, =gText_Var1DarkGreyShadowLightGrey bl StringExpandPlaceholders _080C3F46: pop {r4} @@ -2797,7 +2797,7 @@ sub_80C3F64: @ 80C3F64 ldrh r0, [r0] cmp r0, 0 beq _080C3F8C - ldr r1, =gUnknown_085ED085 + ldr r1, =gText_PokeblocksWithFriends ldr r0, =0x00000395 adds r2, r0 ldr r3, =gUnknown_0856FB0F @@ -2852,7 +2852,7 @@ sub_80C3FE0: @ 80C3FE0 ldrh r0, [r0] cmp r0, 0 beq _080C4008 - ldr r1, =gUnknown_085ED09F + ldr r1, =gText_WonContestsWFriends ldr r0, =0x000003db adds r2, r0 ldr r3, =gUnknown_0856FB0F @@ -2902,7 +2902,7 @@ _080C4044: ldr r0, [r4] ldr r1, =0x00000421 adds r0, r1 - ldr r1, =gUnknown_085ED0E0 + ldr r1, =gText_WSlashStraightSlash bl StringExpandPlaceholders b _080C40B6 .pool @@ -2920,7 +2920,7 @@ _080C4094: ldr r0, [r4] ldr r1, =0x00000421 adds r0, r1 - ldr r1, =gUnknown_085ED0C8 + ldr r1, =gText_Var1DarkLightGreyBP bl StringExpandPlaceholders _080C40B6: pop {r4} @@ -2949,7 +2949,7 @@ _080C40F0: ldrb r0, [r2, 0xD] cmp r0, 0 beq _080C412C - ldr r1, =gUnknown_085ED0D3 + ldr r1, =gText_BattleTower ldr r0, =0x00000421 adds r2, r0 ldr r3, =gUnknown_0856FB0C @@ -2963,7 +2963,7 @@ _080C4114: ldrh r0, [r0] cmp r0, 0 beq _080C412C - ldr r1, =gUnknown_085ED0B6 + ldr r1, =gText_BattlePtsWon ldr r0, =0x00000421 adds r2, r0 ldr r3, =gUnknown_0856FB0F @@ -6346,7 +6346,7 @@ _080C5DC2: lsrs r4, r0, 24 cmp r4, 0x4 bls _080C5DC2 - ldr r4, =gUnknown_085ED8FF + ldr r4, =gText_SymbolsEarned movs r0, 0x1 adds r1, r4, 0 movs r2, 0x60 @@ -6362,7 +6362,7 @@ _080C5DC2: movs r1, 0x1 movs r3, 0x5 bl box_print - ldr r4, =gUnknown_085ED90E + ldr r4, =gText_BattleRecord movs r0, 0x1 adds r1, r4, 0 movs r2, 0x60 @@ -6380,7 +6380,7 @@ _080C5DC2: str r6, [sp] mov r0, r8 str r0, [sp, 0x4] - ldr r0, =gUnknown_085ED91C + ldr r0, =gText_BattlePoints str r0, [sp, 0x8] movs r0, 0x2 movs r1, 0x8 diff --git a/asm/tv.s b/asm/tv.s index 2ebdfc0a1..3d57b3dba 100644 --- a/asm/tv.s +++ b/asm/tv.s @@ -7811,7 +7811,7 @@ GetMomOrDadStringForTVMessage: @ 80F00A4 cmp r0, 0 bne _080F0104 ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EAD08 + ldr r1, =gText_Mom bl StringCopy ldr r0, =0x00004003 movs r1, 0x1 @@ -7824,7 +7824,7 @@ _080F00EC: cmp r0, 0x2 bne _080F0104 ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EAD08 + ldr r1, =gText_Mom bl StringCopy ldr r0, =0x00004003 movs r1, 0x1 @@ -7859,13 +7859,13 @@ _080F0104: bne _080F0158 _080F0142: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EAD08 + ldr r1, =gText_Mom bl StringCopy b _080F01A8 .pool _080F0158: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EAD04 + ldr r1, =gText_Dad bl StringCopy b _080F01A8 .pool @@ -7878,7 +7878,7 @@ _080F016C: cmp r0, 0 beq _080F0198 ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EAD08 + ldr r1, =gText_Mom bl StringCopy adds r0, r4, 0 movs r1, 0x1 @@ -7887,7 +7887,7 @@ _080F016C: .pool _080F0198: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EAD04 + ldr r1, =gText_Dad bl StringCopy adds r0, r4, 0 movs r1, 0x2 @@ -10790,13 +10790,13 @@ _080F1A40: cmp r0, 0x32 bne _080F1A58 ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EAEB1 + ldr r1, =gText_Lv50 bl StringCopy b _080F1A60 .pool _080F1A58: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EAEB8 + ldr r1, =gText_OpenLevel bl StringCopy _080F1A60: ldrh r1, [r4, 0x16] @@ -12536,31 +12536,31 @@ _080F2C08: .4byte _080F2C6C _080F2C1C: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EB0E8 + ldr r1, =gText_Cool bl StringCopy b _080F2C74 .pool _080F2C30: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EB0ED + ldr r1, =gText_Beauty bl StringCopy b _080F2C74 .pool _080F2C44: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EB0F4 + ldr r1, =gText_Cute bl StringCopy b _080F2C74 .pool _080F2C58: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EB0F9 + ldr r1, =gText_Smart bl StringCopy b _080F2C74 .pool _080F2C6C: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085EB0FF + ldr r1, =gText_Tough bl StringCopy _080F2C74: ldr r0, =gStringVar2 @@ -13154,13 +13154,13 @@ _080F31CA: cmp r0, 0 bne _080F3200 ldr r0, =gStringVar3 - ldr r1, =gUnknown_085ECB64 + ldr r1, =gText_Single bl StringCopy b _080F3208 .pool _080F3200: ldr r0, =gStringVar3 - ldr r1, =gUnknown_085ECB6B + ldr r1, =gText_Double bl StringCopy _080F3208: ldr r1, =gUnknown_0203A030 @@ -13369,38 +13369,38 @@ _080F3430: .4byte _080F3494 _080F3444: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085ECB48 + ldr r1, =gText_Spicy2 bl StringCopy b _080F349C .pool _080F3458: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085ECB4E + ldr r1, =gText_Dry2 bl StringCopy b _080F349C .pool _080F346C: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085ECB52 + ldr r1, =gText_Sweet2 bl StringCopy b _080F349C .pool _080F3480: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085ECB58 + ldr r1, =gText_Bitter2 bl StringCopy b _080F349C .pool _080F3494: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085ECB5F + ldr r1, =gText_Sour2 bl StringCopy _080F349C: ldrb r0, [r4, 0x2] cmp r0, 0x18 bls _080F34BC ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB2A + ldr r1, =gText_Excellent bl StringCopy b _080F34DC .pool @@ -13408,13 +13408,13 @@ _080F34BC: cmp r0, 0x16 bls _080F34D4 ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB20 + ldr r1, =gText_VeryGood bl StringCopy b _080F34DC .pool _080F34D4: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB1B + ldr r1, =gText_Good bl StringCopy _080F34DC: ldr r0, =gStringVar3 @@ -13454,38 +13454,38 @@ _080F3524: .4byte _080F3588 _080F3538: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085ECB48 + ldr r1, =gText_Spicy2 bl StringCopy b _080F3590 .pool _080F354C: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085ECB4E + ldr r1, =gText_Dry2 bl StringCopy b _080F3590 .pool _080F3560: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085ECB52 + ldr r1, =gText_Sweet2 bl StringCopy b _080F3590 .pool _080F3574: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085ECB58 + ldr r1, =gText_Bitter2 bl StringCopy b _080F3590 .pool _080F3588: ldr r0, =gStringVar1 - ldr r1, =gUnknown_085ECB5F + ldr r1, =gText_Sour2 bl StringCopy _080F3590: ldrb r0, [r4, 0x2] cmp r0, 0x10 bls _080F35B0 ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB34 + ldr r1, =gText_SoSo bl StringCopy b _080F35D0 .pool @@ -13493,13 +13493,13 @@ _080F35B0: cmp r0, 0xD bls _080F35C8 ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB3A + ldr r1, =gText_Bad bl StringCopy b _080F35D0 .pool _080F35C8: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB3E + ldr r1, =gText_TheWorst bl StringCopy _080F35D0: ldr r0, =gStringVar3 @@ -14418,13 +14418,13 @@ _080F3ECC: .pool _080F3EE8: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB0C + ldr r1, =gText_Slots bl StringCopy b _080F3F04 .pool _080F3EFC: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB12 + ldr r1, =gText_Roulette bl StringCopy _080F3F04: ldrb r1, [r4, 0x2] @@ -14455,13 +14455,13 @@ _080F3F28: .pool _080F3F44: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB0C + ldr r1, =gText_Slots bl StringCopy b _080F3F60 .pool _080F3F58: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB12 + ldr r1, =gText_Roulette bl StringCopy _080F3F60: ldrh r1, [r4, 0x4] @@ -14485,13 +14485,13 @@ _080F3F78: .pool _080F3F94: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB0C + ldr r1, =gText_Slots bl StringCopy b _080F3FB0 .pool _080F3FA8: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB12 + ldr r1, =gText_Roulette bl StringCopy _080F3FB0: ldrh r1, [r4, 0x4] @@ -14517,13 +14517,13 @@ _080F3FCC: .pool _080F3FE8: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB12 + ldr r1, =gText_Roulette bl StringCopy b _080F4004 .pool _080F3FFC: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB0C + ldr r1, =gText_Slots bl StringCopy _080F4004: bl TVShowDone @@ -15097,7 +15097,7 @@ DoTVShowPokemonLotterWinnerFlashReport: @ 80F45A0 cmp r0, 0 bne _080F45FC ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB72 + ldr r1, =gText_Jackpot bl StringCopy b _080F4634 .pool @@ -15105,7 +15105,7 @@ _080F45FC: cmp r0, 0x1 bne _080F4614 ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB7A + ldr r1, =gText_First bl StringCopy b _080F4634 .pool @@ -15113,13 +15113,13 @@ _080F4614: cmp r0, 0x2 bne _080F462C ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB80 + ldr r1, =gText_Second bl StringCopy b _080F4634 .pool _080F462C: ldr r0, =gStringVar2 - ldr r1, =gUnknown_085ECB87 + ldr r1, =gText_Third bl StringCopy _080F4634: ldr r4, =gStringVar3 diff --git a/asm/use_pokeblock.s b/asm/use_pokeblock.s index 67441ee8b..20d23a878 100755 --- a/asm/use_pokeblock.s +++ b/asm/use_pokeblock.s @@ -1196,7 +1196,7 @@ sub_8166D44: @ 8166D44 bl GetMonData add r0, sp, 0xC bl StringGetEnd10 - ldr r1, =gUnknown_085EC7A0 + ldr r1, =gText_GetsAPokeBlockQuestion add r0, sp, 0xC bl StringAppend ldr r4, =gStringVar4 @@ -1426,7 +1426,7 @@ sub_8166F50: @ 8166F50 movs r1, 0x97 movs r2, 0xE bl sub_8098858 - ldr r2, =gUnknown_085EC800 + ldr r2, =gText_WontEatAnymore movs r0, 0x1 str r0, [sp] movs r0, 0 @@ -1503,13 +1503,13 @@ _08166FEC: ldr r1, [r0] adds r0, r4, 0 bl StringCopy - ldr r1, =gUnknown_085EC7E1 + ldr r1, =gText_WasEnhanced adds r0, r4, 0 bl StringAppend b _08167018 .pool _08167010: - ldr r1, =gUnknown_085EC7EF + ldr r1, =gText_NothingChanged adds r0, r4, 0 bl StringCopy _08167018: @@ -2895,7 +2895,7 @@ sub_8167BA0: @ 8167BA0 ldr r0, [r7] ldr r6, =0x0000804a adds r0, r6 - ldr r1, =gUnknown_085EBF8D + ldr r1, =gText_NatureSlash bl StringCopy ldr r1, =gNatureNamePointers lsls r4, 2 diff --git a/asm/walda_phrase.s b/asm/walda_phrase.s index 2f1f7da60..9b27b99cb 100755 --- a/asm/walda_phrase.s +++ b/asm/walda_phrase.s @@ -53,7 +53,7 @@ _081D9A44: bl sub_80D2578 cmp r0, 0 beq _081D9A5C - ldr r0, =gUnknown_085EE49A + ldr r0, =gText_Peekaboo bl sub_80D255C b _081D9A68 .pool diff --git a/asm/wallclock.s b/asm/wallclock.s index 0d6f05a23..f8cc87fe8 100644 --- a/asm/wallclock.s +++ b/asm/wallclock.s @@ -353,7 +353,7 @@ Cb2_StartWallClock: @ 81349F4 movs r0, 0x5A strh r0, [r1, 0x30] bl sub_813498C - ldr r2, =gUnknown_085EFAE0 + ldr r2, =gText_Confirm3 movs r0, 0x1 str r0, [sp] mov r1, r8 @@ -500,7 +500,7 @@ _08134BA4: ldrh r0, [r0, 0xC] strh r0, [r1, 0x30] bl sub_813498C - ldr r2, =gUnknown_085EFAE8 + ldr r2, =gText_Cancel4 movs r0, 0x1 str r0, [sp] mov r1, r9 @@ -683,7 +683,7 @@ sub_8134DC4: @ 8134DC4 adds r2, r5, 0 movs r3, 0xD bl SetWindowBorderStyle - ldr r2, =gUnknown_085EFAC6 + ldr r2, =gText_IsThisTheCorrectTime movs r0, 0x1 str r0, [sp] movs r0, 0 diff --git a/data/battle_message.s b/data/battle_message.s index 03e1baa12..9addf0879 100644 --- a/data/battle_message.s +++ b/data/battle_message.s @@ -1214,10 +1214,10 @@ gText_GiveNicknameCaptured:: @ 85CBFDB gText_PkmnSentToPC:: @ 85CBFFF .string "{RIVAL} was sent to\n{STRING 39} PC.$" -gText_SomeonesPC:: @ 85CC015 +gText_Someones:: @ 85CC015 .string "someone’s$" -gText_LanettesPC:: @ 85CC01F +gText_Lanettes:: @ 85CC01F .string "LANETTE’s$" gText_PkmnDataAddedToDex:: @ 85CC029 diff --git a/data/link.s b/data/link.s index 3aa87ef67..38be746d9 100644 --- a/data/link.s +++ b/data/link.s @@ -1633,7 +1633,7 @@ gUnknown_082F025C:: @ 82F025C window_template 0x00, 0x12, 0x07, 0x10, 0x06, 0x0f, 0x0001 gUnknown_082F0264:: @ 82F0264 - .4byte gUnknown_085EA333, 0x00000001 + .4byte gText_Register, 0x00000001 .4byte gUnknown_082EFD8C, 0x00000002 .4byte gUnknown_082EFD7C, 0x00000003 @@ -1913,14 +1913,14 @@ gUnknown_082F0600:: @ 82F0600 .align 2 gUnknown_082F0608:: @ 82F0608 - .4byte gUnknown_085EEDEC, 0x00000000 - .4byte gUnknown_085EEDFC, 0x00000001 - .4byte gUnknown_085EEE28, 0xfffffffe + .4byte gText_WonderCards, 0x00000000 + .4byte gText_WonderNews, 0x00000001 + .4byte gText_Exit3, 0xfffffffe .align 2 gUnknown_082F0620:: @ 82F0620 - .4byte gUnknown_085EEE08, 0x00000000 - .4byte gUnknown_085EEE20, 0x00000001 + .4byte gText_WirelessCommunication, 0x00000000 + .4byte gText_Friend2, 0x00000001 .4byte gText_Cancel2, 0xfffffffe .align 2 @@ -1933,26 +1933,26 @@ gUnknown_082F0638:: @ 82F0638 struct ListMenuTemplate .align 2 gUnknown_082F0650:: @ 82F0650 - .4byte gUnknown_085EEE30, 0x00000000 - .4byte gUnknown_085EEE38, 0x00000001 - .4byte gUnknown_085EEE40, 0x00000002 + .4byte gText_Receive, 0x00000000 + .4byte gText_Send, 0x00000001 + .4byte gText_Toss, 0x00000002 .4byte gText_Cancel2, 0xfffffffe .align 2 gUnknown_082F0670:: @ 82F0670 - .4byte gUnknown_085EEE30, 0x00000000 - .4byte gUnknown_085EEE40, 0x00000002 + .4byte gText_Receive, 0x00000000 + .4byte gText_Toss, 0x00000002 .4byte gText_Cancel2, 0xfffffffe .align 2 gUnknown_082F0688:: @ 82F0688 - .4byte gUnknown_085EEE30, 0x00000000 - .4byte gUnknown_085EEE38, 0x00000001 + .4byte gText_Receive, 0x00000000 + .4byte gText_Send, 0x00000001 .4byte gText_Cancel2, 0xfffffffe .align 2 gUnknown_082F06A0:: @ 82F06A0 - .4byte gUnknown_085EEE30, 0x00000000 + .4byte gText_Receive, 0x00000000 .4byte gText_Cancel2, 0xfffffffe .align 2 @@ -1988,10 +1988,10 @@ gUnknown_082F06F8:: @ 82F06F8 .byte 0x21, 0x31, 0x00, 0x01 .align 2 - .4byte gUnknown_085EEE48 - .4byte gUnknown_085EEE8C - .4byte gUnknown_085EEEB8 - .4byte gUnknown_085EEED4 + .4byte gText_VarietyOfEventsImportedWireless + .4byte gText_WonderCardsInPossession + .4byte gText_ReadNewsThatArrived + .4byte gText_ReturnToTitle .align 2 gUnknown_082F0720:: @ 82F0720 struct TextColor @@ -2065,11 +2065,11 @@ gUnknown_082F0D3C:: @ 82F0D3C .align 2 gUnknown_082F0D5C:: @ 82F0D5C - .4byte gUnknown_085EED41 - .4byte gUnknown_085EED5F - .4byte gUnknown_085EED6F - .4byte gUnknown_085EED80 - .4byte gUnknown_085EED9A + .4byte gText_WirelessCommStatus + .4byte gText_PeopleTrading + .4byte gText_PeopleBattling + .4byte gText_PeopleInUnionRoom + .4byte gText_PeopleCommunicating .align 2 gUnknown_082F0D70:: @ 82F0D70 @@ -2780,37 +2780,37 @@ gUnknown_082F2C98:: @ 82F2C98 .align 2 gUnknown_082F2D40:: @ 82F2D40 - .4byte gUnknown_085ED265 + .4byte gText_QuitChatting .byte 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 - .4byte gUnknown_085ED274 + .4byte gText_RegisterTextWhere .byte 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 - .4byte gUnknown_085ED289 + .4byte gText_RegisterTextHere .byte 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 - .4byte gUnknown_085ED29D + .4byte gText_InputText .byte 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 - .4byte gUnknown_085ED2E8 + .4byte gText_ExitingChat .byte 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 - .4byte gUnknown_085ED2FA + .4byte gText_LeaderLeftEndingChat .byte 0x02, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00 - .4byte gUnknown_085ED325 + .4byte gText_RegisteredTextChanged .byte 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00 - .4byte gUnknown_085ED368 + .4byte gText_AlreadySavedFile .byte 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00 - .4byte gUnknown_085ED3A3 + .4byte gText_SavingDontTurnOff .byte 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00 - .4byte gUnknown_085ED3C5 + .4byte gText_PlayerSavedGame .byte 0x02, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00 - .4byte gUnknown_085ED3D8 + .4byte gText_IfLeaderLeavesChatEnds .byte 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00 .align 2 @@ -2819,11 +2819,11 @@ gText_Ellipsis:: @ 82F2DC4 .align 2 gUnknown_082F2DC8:: @ 82F2DC8 - .4byte gUnknown_085ED23C, 0x00000000 - .4byte gUnknown_085ED242, 0x00000000 - .4byte gUnknown_085ED24F, 0x00000000 - .4byte gUnknown_085ED257, 0x00000000 - .4byte gUnknown_085ED260, 0x00000000 + .4byte gText_Upper, 0x00000000 + .4byte gText_Lower, 0x00000000 + .4byte gText_Symbols, 0x00000000 + .4byte gText_Register2, 0x00000000 + .4byte gText_Exit2, 0x00000000 .align 2 gUnknown_082F2DF0:: @ 82F2DF0 @@ -3002,15 +3002,15 @@ gUnknown_082F3290:: @ 82F3290 .align 2 gUnknown_082F32A4:: @ 82F32A4 - .4byte gUnknown_085ED5F0 - .4byte gUnknown_085ED62C - .4byte gUnknown_085ED65C - .4byte gUnknown_085ED6C8 - .4byte gUnknown_085ED704 - .4byte gUnknown_085ED724 - .4byte gUnknown_085ED754 - .4byte gUnknown_085ED788 - .4byte gUnknown_085ED7BC + .4byte gText_ReadyToBerryCrush + .4byte gText_WaitForAllChooseBerry + .4byte gText_EndedWithXUnitsPowder + .4byte gText_RecordingGameResults + .4byte gText_PlayBerryCrushAgain + .4byte gText_YouHaveNoBerries + .4byte gText_MemberDroppedOut + .4byte gText_TimesUpNoGoodPowder + .4byte gText_CommunicationStandby2 .align 2 gUnknown_082F32C8:: @ 82F32C8 struct BgTemplate @@ -3307,12 +3307,12 @@ gUnknown_082F4384:: @ 82F4384 .align 2 gUnknown_082F43B4:: @ 82F43B4 - .4byte gUnknown_085ED7E8 - .4byte gUnknown_085ED7F4 - .4byte gUnknown_085ED7FC - .4byte gUnknown_085ED88C - .4byte gUnknown_085ED8A0 - .4byte gUnknown_085ED8B8 + .4byte gText_SpaceTimes2 + .4byte gText_XDotY + .4byte gText_Var1Berry + .4byte gText_NeatnessRankings + .4byte gText_CoopRankings + .4byte gText_PressingPowerRankings .align 2 gUnknown_082F43CC:: @ 82F43CC @@ -3575,9 +3575,9 @@ gUnknown_082F7B2C:: @ 82F7B2C .align 2 gUnknown_082F7B34:: @ 82F7B34 - .4byte gUnknown_085EDD02 - .4byte gUnknown_085EDD12 - .4byte gUnknown_085EDD1E + .4byte gText_BerriesPicked + .4byte gText_BestScore + .4byte gText_BerriesInRowFivePlayers .align 2 gUnknown_082F7B40:: @ 82F7B40 @@ -4040,11 +4040,11 @@ gUnknown_082FB3C8:: @ 82FB3C8 .align 2 gUnknown_082FB3DC:: @ 82FB3DC - .4byte gUnknown_085EDDAE - .4byte gUnknown_085EDDB1 - .4byte gUnknown_085EDDB4 - .4byte gUnknown_085EDDB7 - .4byte gUnknown_085EDDBA + .4byte gText_1Colon + .4byte gText_2Colon + .4byte gText_3Colon + .4byte gText_4Colon + .4byte gText_5Colon .align 2 gUnknown_082FB3F0:: @ 82FB3F0 @@ -4632,9 +4632,9 @@ gUnknown_082FE270:: @ 82FE270 .align 2 gUnknown_082FE278:: @ 82FE278 - .4byte gUnknown_085EDEA2 - .4byte gUnknown_085EDEB2 - .4byte gUnknown_085EDEBE + .4byte gText_JumpsInARow + .4byte gText_BestScore2 + .4byte gText_ExcellentsInARow .align 2 gPkmnJump321StartPal1:: @ 82FE284 diff --git a/data/strings.s b/data/strings.s index 30143a91b..4d0183a4c 100644 --- a/data/strings.s +++ b/data/strings.s @@ -490,7 +490,7 @@ gText_ThePC:: @ 85E9178 .string "the PC$" .align 2 -gUnknown_085E9180:: @ 85E9180 +gReturnToXStringsTable:: @ 85E9180 .4byte gText_TheField .4byte gText_TheBattle .4byte gText_ThePokemonList @@ -505,7 +505,7 @@ gUnknown_085E9180:: @ 85E9180 .4byte gText_ThePC .align 2 -gUnknown_085E91B0:: @ 85E91B0 +gReturnToXStringsTable2:: @ 85E91B0 .4byte gText_TheField .4byte gText_TheBattle .4byte gText_ThePokemonList @@ -531,7 +531,7 @@ gText_KeyItemsPocket:: @ 85E91F1 .string "KEY ITEMS$" .align 2 -gPocketNames:: @ 85E91FC +gPocketNamesStringsTable:: @ 85E91FC .4byte gText_ItemsPocket .4byte gText_PokeBallsPocket .4byte gText_TMHMPocket @@ -539,29 +539,30 @@ gPocketNames:: @ 85E91FC .4byte gText_KeyItemsPocket .align 2 -gUnknown_085E9210:: @ 85E9210 +gText_UnkF908Var1Clear7Var2:: @ 85E9210 .string "{UNK_CTRL_F908}{STR_VAR_1}{CLEAR 0x07}{STR_VAR_2}$" -gUnknown_085E921A:: @ 85E921A +gText_ClearTo11Var1Clear5Var2:: @ 85E921A .string "{CLEAR_TO 0x11}{STR_VAR_1}{CLEAR 0x05}{STR_VAR_2}$" -gUnknown_085E9225:: @ 85E9225 +gText_SizeSlash:: @ 85E9225 .string "SIZE /$" -gUnknown_085E922C:: @ 85E922C +gText_FirmSlash:: @ 85E922C .string "FIRM /$" -gUnknown_085E9233:: @ 85E9233 +gText_Var1DotVar2:: @ 85E9233 .string "{STR_VAR_1}.{STR_VAR_2}â€$" .include "data/text/berry_firmness_strings.inc" -gUnknown_085E9263:: @ 85E9263 +gText_UnkF908Var1Var2:: @ 85E9263 .string "{UNK_CTRL_F908}{STR_VAR_1} {STR_VAR_2}$" -gUnknown_085E926B:: @ 85E926B +gText_BerryTag:: @ 85E926B .string "BERRY TAG$" + .string "RED {POKEBLOCK}$" .string "BLUE {POKEBLOCK}$" .string "PINK {POKEBLOCK}$" @@ -577,109 +578,112 @@ gUnknown_085E926B:: @ 85E926B .string "WHITE {POKEBLOCK}$" .string "GOLD {POKEBLOCK}$" -gUnknown_085E931D:: @ 85E931D +gText_Spicy:: @ 85E931D .string "SPICY$" -gUnknown_085E9323:: @ 85E9323 +gText_Dry:: @ 85E9323 .string "DRY$" -gUnknown_085E9327:: @ 85E9327 +gText_Sweet:: @ 85E9327 .string "SWEET$" -gUnknown_085E932D:: @ 85E932D +gText_Bitter:: @ 85E932D .string "BITTER$" -gUnknown_085E9334:: @ 85E9334 +gText_Sour:: @ 85E9334 .string "SOUR$" + .string "TASTY$" .string "FEEL$" -gUnknown_085E9344:: @ 85E9344 +gText_StowCase:: @ 85E9344 .string "Stow CASE.$" -gUnknown_085E934F:: @ 85E934F +gText_LvVar1:: @ 85E934F .string "{LV}{STR_VAR_1}$" -gUnknown_085E9353:: @ 85E9353 +gText_ThrowAwayVar1:: @ 85E9353 .string "Throw away this\n{STR_VAR_1}?$" -gUnknown_085E9367:: @ 85E9367 +gText_Var1ThrownAway:: @ 85E9367 .string "The {STR_VAR_1}\nwas thrown away.$" -gUnknown_085E937F:: @ 85E937F +gText_Var1AteTheVar2:: @ 85E937F .string "{STR_VAR_1} ate the\n{STR_VAR_2}.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9390:: @ 85E9390 +gText_Var1HappilyAteVar2:: @ 85E9390 .string "{STR_VAR_1} happily ate the\n{STR_VAR_2}.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E93A9:: @ 85E93A9 +gText_Var1DisdainfullyAteVar2:: @ 85E93A9 .string "{STR_VAR_1} disdainfully ate the\n{STR_VAR_2}.{PAUSE_UNTIL_PRESS}$" + .string "BUY$" .string "SELL$" .string "QUIT$" -gUnknown_085E93D5:: @ 85E93D5 +gText_InBagVar1:: @ 85E93D5 .string "IN BAG: {STR_VAR_1}$" -gUnknown_085E93E0:: @ 85E93E0 +gText_QuitShopping:: @ 85E93E0 .string "Quit shopping.$" -gUnknown_085E93EF:: @ 85E93EF +gText_Var1CertainlyHowMany:: @ 85E93EF .string "{STR_VAR_1}? Certainly.\nHow many would you like?$" -gUnknown_085E9417:: @ 85E9417 +gText_Var1CertainlyHowMany2:: @ 85E9417 .string "{STR_VAR_1}? Certainly.\nHow many would you like?$" -gUnknown_085E943F:: @ 85E943F +gText_Var1AndYouWantedVar2:: @ 85E943F .string "{STR_VAR_1}? And you wanted {STR_VAR_2}?\nThat will be Â¥{STR_VAR_3}.$" -gUnknown_085E9468:: @ 85E9468 +gText_Var1IsItThatllBeVar2:: @ 85E9468 .string "{STR_VAR_1}, is it?\nThat’ll be Â¥{STR_VAR_2}. Do you want it?$" -gUnknown_085E9493:: @ 85E9493 +gText_YouWantedVar1ThatllBeVar2:: @ 85E9493 .string "You wanted {STR_VAR_1}?\nThat’ll be Â¥{STR_VAR_2}. Will that be okay?$" -gUnknown_085E94C5:: @ 85E94C5 +gText_HereYouGoThankYou:: @ 85E94C5 .string "Here you go!\nThank you very much.$" -gUnknown_085E94E7:: @ 85E94E7 +gText_ThankYouIllSendItHome:: @ 85E94E7 .string "Thank you!\nI’ll send it to your home PC.$" -gUnknown_085E9510:: @ 85E9510 +gText_ThanksIllSendItHome:: @ 85E9510 .string "Thanks!\nI’ll send it to your PC at home.$" -gUnknown_085E9539:: @ 85E9539 +gText_YouDontHaveMoney:: @ 85E9539 .string "You don’t have enough money.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9558:: @ 85E9558 +gText_NoMoreRoomForThis:: @ 85E9558 .string "You have no more room for this\nitem.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E957F:: @ 85E957F +gText_SpaceForVar1Full:: @ 85E957F .string "The space for {STR_VAR_1} is full.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E959B:: @ 85E959B +gText_AnythingElseICanHelp:: @ 85E959B .string "Is there anything else I can help\nyou with?$" -gUnknown_085E95C7:: @ 85E95C7 +gText_CanIHelpWithAnythingElse:: @ 85E95C7 .string "Can I help you with anything else?$" -gUnknown_085E95EA:: @ 85E95EA +gText_ThrowInPremierBall:: @ 85E95EA .string "I’ll throw in a PREMIER BALL, too.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E960F:: @ 85E960F +gText_CantBuyKeyItem:: @ 85E960F .string "{STR_VAR_2}? Oh, no.\nI can’t buy that.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E962F:: @ 85E962F +gText_HowManyToSell:: @ 85E962F .string "{STR_VAR_2}?\nHow many would you like to sell?$" -gUnknown_085E9654:: @ 85E9654 +gText_ICanPayVar1:: @ 85E9654 .string "I can pay Â¥{STR_VAR_1}.\nWould that be okay?$" -gUnknown_085E9677:: @ 85E9677 +gText_TurnedOverVar1ForVar2:: @ 85E9677 .string "Turned over the {STR_VAR_2}\nand received Â¥{STR_VAR_1}.$" -gUnknown_085E969C:: @ 85E969C +gText_PokedollarVar1:: @ 85E969C .string "Â¥{STR_VAR_1}$" + .string "SHIFT$" .string "SEND OUT$" .string "SWITCH$" @@ -691,165 +695,167 @@ gUnknown_085E969C:: @ 85E969C .string "READ$" .string "TRADE$" -gUnknown_085E96E3:: @ 85E96E3 +gText_HP3:: @ 85E96E3 .string "HP$" -gUnknown_085E96E6:: @ 85E96E6 +gText_SpAtk3:: @ 85E96E6 .string "SP. ATK$" -gUnknown_085E96EE:: @ 85E96EE +gText_SpDef3:: @ 85E96EE .string "SP. DEF$" -gUnknown_085E96F6:: @ 85E96F6 +gText_WontHaveEffect:: @ 85E96F6 .string "It won’t have any effect.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9712:: @ 85E9712 +gText_CantBeUsedOnPkmn:: @ 85E9712 .string "This can’t be used on\nthat POKéMON.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9738:: @ 85E9738 +gText_PkmnCantSwitchOut:: @ 85E9738 .string "{STR_VAR_1} can’t be switched\nout!{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9754:: @ 85E9754 +gText_PkmnAlreadyInBattle:: @ 85E9754 .string "{STR_VAR_1} is already\nin battle!{PAUSE_UNTIL_PRESS}$" -gUnknown_085E976F:: @ 85E976F +gText_PkmnAlreadySelected:: @ 85E976F .string "{STR_VAR_1} has already been\nselected.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E978F:: @ 85E978F +gText_PkmnHasNoEnergy:: @ 85E978F .string "{STR_VAR_1} has no energy\nleft to battle!{PAUSE_UNTIL_PRESS}$" -gUnknown_085E97B2:: @ 85E97B2 +gText_CantSwitchWithAlly:: @ 85E97B2 .string "You can’t switch {STR_VAR_1}’s\nPOKéMON with one of yours!{PAUSE_UNTIL_PRESS}$" -gUnknown_085E97E5:: @ 85E97E5 +gText_EggCantBattle:: @ 85E97E5 .string "An EGG can’t battle!{PAUSE_UNTIL_PRESS}$" -gUnknown_085E97FC:: @ 85E97FC +gText_CantUseUntilNewBadge:: @ 85E97FC .string "This can’t be used until a new\nBADGE is obtained.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9830:: @ 85E9830 +gText_NoMoreThanVar1Pkmn:: @ 85E9830 .string "No more than {STR_VAR_1} POKéMON\nmay enter.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9855:: @ 85E9855 +gText_SendMailToPC:: @ 85E9855 .string "Send the removed MAIL to\nyour PC?$" -gUnknown_085E9877:: @ 85E9877 +gText_MailSentToPC:: @ 85E9877 .string "The MAIL was sent to your PC.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9897:: @ 85E9897 +gText_PCMailboxFull:: @ 85E9897 .string "Your PC’s MAILBOX is full.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E98B4:: @ 85E98B4 +gText_MailMessageWillBeLost:: @ 85E98B4 .string "If the MAIL is removed, the\nmessage will be lost. Okay?$" -gUnknown_085E98EC:: @ 85E98EC +gText_RemoveMailBeforeItem:: @ 85E98EC .string "MAIL must be removed before\nholding an item.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E991B:: @ 85E991B +gText_PkmnWasGivenItem:: @ 85E991B .string "{STR_VAR_1} was given the\n{STR_VAR_2} to hold.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E993A:: @ 85E993A +gText_SwitchPkmnItem:: @ 85E993A .string "{STR_VAR_1} is already holding\none {STR_VAR_2}.\pWould you like to switch the\ntwo items?$" -gUnknown_085E9980:: @ 85E9980 +gText_PkmnNotHolding:: @ 85E9980 .string "{STR_VAR_1} isn’t holding\nanything.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E999D:: @ 85E999D +gText_RecievedItemFromPkmn:: @ 85E999D .string "Received the {STR_VAR_2}\nfrom {STR_VAR_1}.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E99B8:: @ 85E99B8 +gText_MailTakenFromPkmn:: @ 85E99B8 .string "MAIL was taken from the\nPOKéMON.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E99DB:: @ 85E99DB +gText_SwitchedPkmnItem:: @ 85E99DB .string "The {STR_VAR_2} was taken and\nreplaced with the {STR_VAR_1}.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9A08:: @ 85E9A08 +gText_PkmnHoldingItemCantHoldMail:: @ 85E9A08 .string "This POKéMON is holding an\nitem. It cannot hold MAIL.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9A40:: @ 85E9A40 +gText_MailTransferredFromMailbox:: @ 85E9A40 .string "MAIL was transferred from\nthe MAILBOX.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9A69:: @ 85E9A69 +gText_BagFullCouldNotRemoveItem:: @ 85E9A69 .string "The BAG is full. The POKéMON’s\nitem could not be removed.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9AA5:: @ 85E9AA5 +gText_PkmnLearnedMove3:: @ 85E9AA5 .string "{STR_VAR_1} learned\n{STR_VAR_2}!$" -gUnknown_085E9AB4:: @ 85E9AB4 +gText_PkmnCantLearnMove:: @ 85E9AB4 .string "{STR_VAR_1} and {STR_VAR_2}\nare not compatible.\p{STR_VAR_2} can’t be\nlearned.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9AE9:: @ 85E9AE9 +gText_PkmnNeedsToReplaceMove:: @ 85E9AE9 .string "{STR_VAR_1} wants to learn the\nmove {STR_VAR_2}.\pHowever, {STR_VAR_1} already\nknows four moves.\pShould a move be deleted and\nreplaced with {STR_VAR_2}?$" -gUnknown_085E9B5D:: @ 85E9B5D +gText_StopLearningMove2:: @ 85E9B5D .string "Stop trying to teach\n{STR_VAR_2}?$" -gUnknown_085E9B76:: @ 85E9B76 +gText_MoveNotLearned:: @ 85E9B76 .string "{STR_VAR_1} did not learn the\nmove {STR_VAR_2}.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9B96:: @ 85E9B96 +gText_WhichMoveToForget:: @ 85E9B96 .string "Which move should be forgotten?{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9BB8:: @ 85E9BB8 +gText_12PoofForgotMove:: @ 85E9BB8 .string "1, {PAUSE 15}2, and{PAUSE 15}… {PAUSE 15}… {PAUSE 15}… {PAUSE 15}{PLAY_SE 0x0038}Poof!\p{STR_VAR_1} forgot how to\nuse {STR_VAR_2}.\pAnd…{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9C00:: @ 85E9C00 +gText_PkmnAlreadyKnows:: @ 85E9C00 .string "{STR_VAR_1} already knows\n{STR_VAR_2}.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9C17:: @ 85E9C17 +gText_PkmnHPRestoredByVar2:: @ 85E9C17 .string "{STR_VAR_1}’s HP was restored\nby {STR_VAR_2} point(s).{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9C3E:: @ 85E9C3E +gText_PkmnCuredOfPoison:: @ 85E9C3E .string "{STR_VAR_1} was cured of its\npoisoning.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9C5F:: @ 85E9C5F +gText_PkmnCuredOfParalysis:: @ 85E9C5F .string "{STR_VAR_1} was cured of\nparalysis.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9C7C:: @ 85E9C7C +gText_PkmnWokeUp2:: @ 85E9C7C .string "{STR_VAR_1} woke up.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9C8A:: @ 85E9C8A +gText_PkmnBurnHealed:: @ 85E9C8A .string "{STR_VAR_1}’s burn was healed.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9CA2:: @ 85E9CA2 +gText_PkmnThawedOut:: @ 85E9CA2 .string "{STR_VAR_1} was thawed out.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9CB7:: @ 85E9CB7 +gText_PPWasRestored:: @ 85E9CB7 .string "PP was restored.{PAUSE_UNTIL_PRESS}$" + .string "{STR_VAR_1} regained health.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9CE0:: @ 85E9CE0 +gText_PkmnBecameHealthy:: @ 85E9CE0 .string "{STR_VAR_1} became healthy.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9CF5:: @ 85E9CF5 +gText_MovesPPIncreased:: @ 85E9CF5 .string "{STR_VAR_1}’s PP increased.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9D0A:: @ 85E9D0A +gText_PkmnElevatedToLvVar2:: @ 85E9D0A .string "{STR_VAR_1} was elevated to\nLv. {STR_VAR_2}.$" -gUnknown_085E9D25:: @ 85E9D25 +gText_PkmnBaseVar2StatIncreased:: @ 85E9D25 .string "{STR_VAR_1}’s base {STR_VAR_2}\nstat was raised.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9D45:: @ 85E9D45 +gText_PkmnFriendlyBaseVar2Fell:: @ 85E9D45 .string "{STR_VAR_1} turned friendly.\nThe base {STR_VAR_2} fell!{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9D6D:: @ 85E9D6D +gText_PkmnAdoresBaseVar2Fell:: @ 85E9D6D .string "{STR_VAR_1} adores you!\nThe base {STR_VAR_2} fell!{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9D90:: @ 85E9D90 +gText_PkmnFriendlyBaseVar2CantFall:: @ 85E9D90 .string "{STR_VAR_1} turned friendly.\nThe base {STR_VAR_2} can’t fall!{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9DBE:: @ 85E9DBE +gText_PkmnSnappedOutOfConfusion:: @ 85E9DBE .string "{STR_VAR_1} snapped out of its\nconfusion.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9DE1:: @ 85E9DE1 +gText_PkmnGotOverInfatuation:: @ 85E9DE1 .string "{STR_VAR_1} got over its\ninfatuation.{PAUSE_UNTIL_PRESS}$" -gUnknown_085E9E00:: @ 85E9E00 +gText_ThrowAwayItem:: @ 85E9E00 .string "Throw away this\n{STR_VAR_1}?$" -gUnknown_085E9E14:: @ 85E9E14 +gText_ItemThrownAway:: @ 85E9E14 .string "The {STR_VAR_1}\nwas thrown away.{PAUSE_UNTIL_PRESS}$" + .string "Teach which POKéMON?$" .string "Choose a POKéMON.$" .string "Move to where?$" @@ -891,43 +897,43 @@ gUnknown_085E9E14:: @ 85E9E14 .string "DON’T HAVE$" .string "FOURTH$" -gUnknown_085EA0EE:: @ 85EA0EE +gText_PkmnCantParticipate:: @ 85EA0EE .string "That POKéMON can’t participate.{PAUSE_UNTIL_PRESS}$" -gUnknown_085EA110:: @ 85EA110 +gText_CancelParticipation:: @ 85EA110 .string "Cancel participation?$" -gUnknown_085EA126:: @ 85EA126 +gText_CancelBattle:: @ 85EA126 .string "Cancel the battle?$" -gUnknown_085EA139:: @ 85EA139 +gText_ReturnToWaitingRoom:: @ 85EA139 .string "Return to the WAITING ROOM?$" -gUnknown_085EA155:: @ 85EA155 +gText_CancelChallenge:: @ 85EA155 .string "Cancel the challenge?$" -gUnknown_085EA16B:: @ 85EA16B +gText_EscapeFromHere:: @ 85EA16B .string "Want to escape from here and return\nto {STR_VAR_1}?$" -gUnknown_085EA196:: @ 85EA196 +gText_ReturnToHealingSpot:: @ 85EA196 .string "Want to return to the healing spot\nused last in {STR_VAR_1}?$" -gUnknown_085EA1CA:: @ 85EA1CA +gText_PauseUntilPress:: @ 85EA1CA .string "{PAUSE_UNTIL_PRESS}$" -gUnknown_085EA1CD:: @ 85EA1CD +gJPText_PutVar1IntoSpinner:: @ 85EA1CD .string "{STR_VAR_1}ã‚’ ãã‚‹ãã‚‹ã“ã†ã‹ã‚“ã«\nã ã—㦠よã‚ã—ã„ã§ã™ã‹ï¼Ÿ$" @ "{STR_VAR_1}wo gurugurukoukanni\ndashite yoroshiidesuka?" ("do you want to put {STR_VAR_1} into the spinner?" in Japanese) .align 2 -gUnknown_085EA1E8:: @ 85EA1E8 +gText_OnlyPkmnForBattle:: @ 85EA1E8 .string "That’s your only\nPOKéMON for battle.$" .align 2 -gUnknown_085EA210:: @ 85EA210 +gText_PkmnCantBeTradedNow:: @ 85EA210 .string "That POKéMON can’t be traded\nnow.$" .align 2 -gUnknown_085EA234:: @ 85EA234 +gText_EggCantBeTradedNow:: @ 85EA234 .string "An EGG can’t be traded now.$" .align 2 @@ -945,162 +951,167 @@ gUnknown_085EA234:: @ 85EA234 .align 2 .string "That isn’t an EGG.$" -gUnknown_085EA333:: @ 85EA333 +gText_Register:: @ 85EA333 .string "REGISTER$" -gUnknown_085EA33C:: @ 85EA33C +gText_Attack3:: @ 85EA33C .string "ATTACK$" -gUnknown_085EA343:: @ 85EA343 +gText_Defense3:: @ 85EA343 .string "DEFENSE$" -gUnknown_085EA34B:: @ 85EA34B +gText_SpAtk4:: @ 85EA34B .string "SP. ATK$" -gUnknown_085EA353:: @ 85EA353 +gText_SpDef4:: @ 85EA353 .string "SP. DEF$" -gUnknown_085EA35B:: @ 85EA35B +gText_Speed2:: @ 85EA35B .string "SPEED$" -gUnknown_085EA361:: @ 85EA361 +gText_HP4:: @ 85EA361 .string "HP$" + .string "$" -gUnknown_085EA365:: @ 85EA365 +gText_OTSlash:: @ 85EA365 .string "OT/$" -gUnknown_085EA369:: @ 85EA369 +gText_RentalPkmn:: @ 85EA369 .string "RENTAL POKéMON$" -gUnknown_085EA378:: @ 85EA378 +gText_TypeSlash:: @ 85EA378 .string "TYPE/$" -gUnknown_085EA37E:: @ 85EA37E +gText_Power:: @ 85EA37E .string "POWER$" -gUnknown_085EA384:: @ 85EA384 +gText_Accuracy2:: @ 85EA384 .string "ACCURACY$" -gUnknown_085EA38D:: @ 85EA38D +gText_Appeal:: @ 85EA38D .string "APPEAL$" -gUnknown_085EA394:: @ 85EA394 +gText_Jam:: @ 85EA394 .string "JAM$" -gUnknown_085EA398:: @ 85EA398 +gText_Status:: @ 85EA398 .string "STATUS$" -gUnknown_085EA39F:: @ 85EA39F +gText_ExpPoints:: @ 85EA39F .string "EXP. POINTS$" -gUnknown_085EA3AB:: @ 85EA3AB +gText_NextLv:: @ 85EA3AB .string "NEXT LV.$" -gUnknown_085EA3B4:: @ 85EA3B4 +gText_RibbonsVar1:: @ 85EA3B4 .string "RIBBONS: {STR_VAR_1}$" -gUnknown_085EA3C0:: @ 85EA3C0 +gText_EmptyString5:: @ 85EA3C0 .string "$" + .string "EVENTS$" -gUnknown_085EA3C8:: @ 85EA3C8 +gText_Switch:: @ 85EA3C8 .string "SWITCH$" -gUnknown_085EA3CF:: @ 85EA3CF +gText_PkmnInfo:: @ 85EA3CF .string "POKéMON INFO$" -gUnknown_085EA3DC:: @ 85EA3DC +gText_PkmnSkills:: @ 85EA3DC .string "POKéMON SKILLS$" -gUnknown_085EA3EB:: @ 85EA3EB +gText_BattleMoves:: @ 85EA3EB .string "BATTLE MOVES$" -gUnknown_085EA3F8:: @ 85EA3F8 +gText_ContestMoves:: @ 85EA3F8 .string "C0NTEST MOVES$" -gUnknown_085EA406:: @ 85EA406 +gText_Info:: @ 85EA406 .string "INFO$" -gUnknown_085EA40B:: @ 85EA40B +gText_EggWillTakeALongTime:: @ 85EA40B .string "It looks like this EGG will\ntake a long time to hatch.$" -gUnknown_085EA442:: @ 85EA442 +gText_EggWillTakeSomeTime:: @ 85EA442 .string "What will hatch from this?\nIt will take some time.$" -gUnknown_085EA475:: @ 85EA475 +gText_EggWillHatchSoon:: @ 85EA475 .string "It moves occasionally.\nIt should hatch soon.$" -gUnknown_085EA4A2:: @ 85EA4A2 +gText_EggAboutToHatch:: @ 85EA4A2 .string "It’s making sounds.\nIt’s about to hatch!$" -gUnknown_085EA4CB:: @ 85EA4CB +gText_HMMovesCantBeForgotten2:: @ 85EA4CB .string "HM moves can’t be\nforgotten now.$" -gUnknown_085EA4EC:: @ 85EA4EC +gText_XNatureMetAtYZ:: @ 85EA4EC .string "{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nmet at {UNK_CTRL_F905}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01},\n{SPECIAL_F7 0x00}{SPECIAL_F7 0x04}{SPECIAL_F7 0x01}.$" -gUnknown_085EA516:: @ 85EA516 +gText_XNatureHatchedAtYZ:: @ 85EA516 .string "{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nhatched at {UNK_CTRL_F905}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01},\n{SPECIAL_F7 0x00}{SPECIAL_F7 0x04}{SPECIAL_F7 0x01}.$" -gUnknown_085EA544:: @ 85EA544 +gText_XNatureObtainedInTrade:: @ 85EA544 .string "{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nobtained in a trade.$" -gUnknown_085EA56A:: @ 85EA56A +gText_XNatureFatefulEncounter:: @ 85EA56A .string "{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nobtained in a fateful\nencounter at {UNK_CTRL_F905}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01}.$" -gUnknown_085EA5A8:: @ 85EA5A8 +gText_XNatureProbablyMetAt:: @ 85EA5A8 .string "{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nprobably met at {UNK_CTRL_F905}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01},\n{SPECIAL_F7 0x00}{SPECIAL_F7 0x04}{SPECIAL_F7 0x01}.$" -gUnknown_085EA5DB:: @ 85EA5DB +gText_XNature:: @ 85EA5DB .string "{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature$" -gUnknown_085EA5EB:: @ 85EA5EB +gText_XNatureMetSomewhereAt:: @ 85EA5EB .string "{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nmet somewhere at {UNK_CTRL_F905}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01}.$" -gUnknown_085EA617:: @ 85EA617 +gText_XNatureHatchedSomewhereAt:: @ 85EA617 .string "{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nhatched somewhere at {UNK_CTRL_F905}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01}.$" -gUnknown_085EA647:: @ 85EA647 +gText_OddEggFoundByCouple:: @ 85EA647 .string "An odd POKéMON EGG found\nby the DAY CARE couple.$" -gUnknown_085EA678:: @ 85EA678 +gText_PeculiarEggNicePlace:: @ 85EA678 .string "A peculiar POKéMON EGG\nobtained at the nice place.$" -gUnknown_085EA6AB:: @ 85EA6AB +gText_PeculiarEggTrade:: @ 85EA6AB .string "A peculiar POKéMON EGG\nobtained in a trade.$" -gUnknown_085EA6D7:: @ 85EA6D7 +gText_EggFromHotSprings:: @ 85EA6D7 .string "A POKéMON EGG obtained\nat the hot springs.$" -gUnknown_085EA702:: @ 85EA702 +gText_EggFromTraveler:: @ 85EA702 .string "An odd POKéMON EGG\nobtained from a traveler.$" -gUnknown_085EA72F:: @ 85EA72F +gText_ApostropheSBase:: @ 85EA72F .string "’s BASE$" -gUnknown_085EA737:: @ 85EA737 +gText_OkayToDeleteFromRegistry:: @ 85EA737 .string "Is it okay to delete {STR_VAR_1}\nfrom the REGISTRY?$" -gUnknown_085EA762:: @ 85EA762 +gText_RegisteredDataDeleted:: @ 85EA762 .string "The registered data was deleted.{PAUSE_UNTIL_PRESS}$" -gUnknown_085EA785:: @ 85EA785 +gText_NoRegistry:: @ 85EA785 .string "There is no REGISTRY.{PAUSE_UNTIL_PRESS}$" + .string "DEL REGIST.$" .string "{STR_VAR_3}{STR_VAR_1}/{STR_VAR_2}$" .string "DECORATE$" .string "PUT AWAY$" .string "TOSS$" -gUnknown_085EA7C8:: @ 85EA7C8 +gText_Color161Shadow161:: @ 85EA7C8 .string "{COLOR 161}{SHADOW 161}$" + .string "Put out the selected decoration item.$" .string "Store the chosen decoration in the PC.$" .string "Throw away unwanted decorations.$" -gUnknown_085EA83D:: @ 85EA83D +gText_NoDecorations:: @ 85EA83D .string "There are no decorations.{PAUSE_UNTIL_PRESS}$" + .string "DESK$" .string "CHAIR$" .string "PLANT$" @@ -1110,57 +1121,59 @@ gUnknown_085EA83D:: @ 85EA83D .string "DOLL$" .string "CUSHION$" -gUnknown_085EA88B:: @ 85EA88B +gText_Gold:: @ 85EA88B .string "GOLD$" -gUnknown_085EA890:: @ 85EA890 +gText_Silver:: @ 85EA890 .string "SILVER$" -gUnknown_085EA897:: @ 85EA897 +gText_PlaceItHere:: @ 85EA897 .string "Place it here?$" -gUnknown_085EA8A6:: @ 85EA8A6 +gText_CantBePlacedHere:: @ 85EA8A6 .string "It can’t be placed here.$" -gUnknown_085EA8BF:: @ 85EA8BF +gText_CancelDecorating:: @ 85EA8BF .string "Cancel decorating?$" -gUnknown_085EA8D2:: @ 85EA8D2 +gText_InUseAlready:: @ 85EA8D2 .string "This is in use already.$" -gUnknown_085EA8EA:: @ 85EA8EA +gText_NoMoreDecorations:: @ 85EA8EA .string "No more decorations can be placed.\nThe most that can be placed are {STR_VAR_1}.$" -gUnknown_085EA931:: @ 85EA931 +gText_NoMoreDecorations2:: @ 85EA931 .string "No more decorations can be placed.\nThe most that can be placed are {STR_VAR_1}.$" + .string "This can’t be placed here.\nIt must be on a DESK, etc.$" -gUnknown_085EA9AE:: @ 85EA9AE +gText_CantPlaceInRoom:: @ 85EA9AE .string "This decoration can’t be placed in\nyour own room.$" -gUnknown_085EA9E0:: @ 85EA9E0 +gText_CantThrowAwayInUse:: @ 85EA9E0 .string "This decoration is in use.\nIt can’t be thrown away.$" -gUnknown_085EAA14:: @ 85EAA14 +gText_DecorationWillBeDiscarded:: @ 85EAA14 .string "This {STR_VAR_1} will be discarded.\nIs that okay?$" -gUnknown_085EAA3D:: @ 85EAA3D +gText_DecorationThrownAway:: @ 85EAA3D .string "The decoration item was thrown away.$" -gUnknown_085EAA62:: @ 85EAA62 +gText_StopPuttingAwayDecorations:: @ 85EAA62 .string "Stop putting away decorations?$" -gUnknown_085EAA81:: @ 85EAA81 +gText_NoDecorationHere:: @ 85EAA81 .string "There is no decoration item here.$" -gUnknown_085EAAA3:: @ 85EAAA3 +gText_ReturnDecorationToPC:: @ 85EAAA3 .string "Return this decoration to the PC?$" -gUnknown_085EAAC5:: @ 85EAAC5 +gText_DecorationReturnedToPC:: @ 85EAAC5 .string "The decoration was returned to the PC.$" -gUnknown_085EAAEC:: @ 85EAAEC +gText_NoDecorationsInUse:: @ 85EAAEC .string "There are no decorations in use.{PAUSE_UNTIL_PRESS}$" + .string "TRISTAN$" .string "PHILIP$" .string "DENNIS$" @@ -1169,72 +1182,76 @@ gUnknown_085EAAEC:: @ 85EAAEC .string "DECORATION$" .string "ITEM STORAGE$" -gUnknown_085EAB4E:: @ 85EAB4E +gText_Mailbox:: @ 85EAB4E .string "MAILBOX$" + .string "DEPOSIT ITEM$" -gUnknown_085EAB63:: @ 85EAB63 +gText_WithdrawItem:: @ 85EAB63 .string "WITHDRAW ITEM$" -gUnknown_085EAB71:: @ 85EAB71 +gText_TossItem:: @ 85EAB71 .string "TOSS ITEM$" + .string "Store items in the PC.$" .string "Take out items from the PC.$" .string "Throw away items stored in the PC.$" -gUnknown_085EABD1:: @ 85EABD1 +gText_NoItems:: @ 85EABD1 .string "There are no items.{PAUSE_UNTIL_PRESS}$" -gUnknown_085EABE7:: @ 85EABE7 +gText_NoRoomInBag:: @ 85EABE7 .string "There is no more\nroom in the BAG.$" -gUnknown_085EAC09:: @ 85EAC09 +gText_WithdrawHowManyItems:: @ 85EAC09 .string "Withdraw how many\n{STR_VAR_1}(s)?$" -gUnknown_085EAC22:: @ 85EAC22 +gText_WithdrawXItems:: @ 85EAC22 .string "Withdrew {STR_VAR_2}\n{STR_VAR_1}(s).$" + .string "READ$" .string "MOVE TO BAG$" .string "GIVE$" -gUnknown_085EAC4B:: @ 85EAC4B +gText_NoMailHere:: @ 85EAC4B .string "There’s no MAIL here.{PAUSE_UNTIL_PRESS}$" -gUnknown_085EAC63:: @ 85EAC63 +gText_WhatToDoWithVar1sMail:: @ 85EAC63 .string "What would you like to do with\n{STR_VAR_1}’s MAIL?$" -gUnknown_085EAC8D:: @ 85EAC8D +gText_MessageWillBeLost:: @ 85EAC8D .string "The message will be lost.\nIs that okay?$" -gUnknown_085EACB5:: @ 85EACB5 +gText_BagIsFull:: @ 85EACB5 .string "The BAG is full.{PAUSE_UNTIL_PRESS}$" -gUnknown_085EACC8:: @ 85EACC8 +gText_MailToBagMessageErased:: @ 85EACC8 .string "The MAIL was returned to the BAG\nwith its message erased.{PAUSE_UNTIL_PRESS}$" -gUnknown_085EAD04:: @ 85EAD04 +gText_Dad:: @ 85EAD04 .string "DAD$" -gUnknown_085EAD08:: @ 85EAD08 +gText_Mom:: @ 85EAD08 .string "MOM$" -gUnknown_085EAD0C:: @ 85EAD0C +gText_Wallace:: @ 85EAD0C .string "WALLACE$" -gUnknown_085EAD14:: @ 85EAD14 +gText_Steven:: @ 85EAD14 .string "STEVEN$" -gUnknown_085EAD1B:: @ 85EAD1B +gText_Brawly:: @ 85EAD1B .string "BRAWLY$" -gUnknown_085EAD22:: @ 85EAD22 +gText_Winona:: @ 85EAD22 .string "WINONA$" -gUnknown_085EAD29:: @ 85EAD29 +gText_Phoebe:: @ 85EAD29 .string "PHOEBE$" -gUnknown_085EAD30:: @ 85EAD30 +gText_Glacia:: @ 85EAD30 .string "GLACIA$" + .string "PETALBURG$" .string "SLATEPORT$" .string "LITTLEROOT$" @@ -1269,11 +1286,12 @@ gUnknown_085EAD30:: @ 85EAD30 .string "Saw it$" .string "Not yet$" -gUnknown_085EAE62:: @ 85EAE62 +gText_Yes:: @ 85EAE62 .string "YES$" -gUnknown_085EAE66:: @ 85EAE66 +gText_No:: @ 85EAE66 .string "NO$" + .string "INFO$" .string "SINGLE BATTLE$" .string "DOUBLE BATTLE$" @@ -1282,11 +1300,12 @@ gUnknown_085EAE66:: @ 85EAE66 .string "CHALLENGE$" .string "INFO$" -gUnknown_085EAEB1:: @ 85EAEB1 +gText_Lv50:: @ 85EAEB1 .string "LV. 50$" -gUnknown_085EAEB8:: @ 85EAEB8 +gText_OpenLevel:: @ 85EAEB8 .string "OPEN LEVEL$" + .string "FRESH WATER{CLEAR_TO 0x48}Â¥200$" .string "SODA POP{CLEAR_TO 0x48}Â¥300$" .string "LEMONADE{CLEAR_TO 0x48}Â¥350$" @@ -1327,20 +1346,21 @@ gUnknown_085EAEB8:: @ 85EAEB8 .string "TM24{CLEAR_TO 0x48}4,000 COINS$" .string "TM13{CLEAR_TO 0x48}4,000 COINS$" -gUnknown_085EB0E8:: @ 85EB0E8 +gText_Cool:: @ 85EB0E8 .string "COOL$" -gUnknown_085EB0ED:: @ 85EB0ED +gText_Beauty:: @ 85EB0ED .string "BEAUTY$" -gUnknown_085EB0F4:: @ 85EB0F4 +gText_Cute:: @ 85EB0F4 .string "CUTE$" -gUnknown_085EB0F9:: @ 85EB0F9 +gText_Smart:: @ 85EB0F9 .string "SMART$" -gUnknown_085EB0FF:: @ 85EB0FF +gText_Tough:: @ 85EB0FF .string "TOUGH$" + .string "NORMAL$" .string "SUPER$" .string "HYPER$" @@ -1356,20 +1376,21 @@ gUnknown_085EB0FF:: @ 85EB0FF .string "TMs & HMs$" .string "BERRIES$" -gUnknown_085EB169:: @ 85EB169 +gText_SomeonesPC:: @ 85EB169 .string "SOMEONE’S PC$" -gUnknown_085EB176:: @ 85EB176 +gText_LanettesPC:: @ 85EB176 .string "LANETTE’S PC$" -gUnknown_085EB183:: @ 85EB183 +gText_PlayersPC:: @ 85EB183 .string "{PLAYER}’s PC$" -gUnknown_085EB18B:: @ 85EB18B +gText_HallOfFame:: @ 85EB18B .string "HALL OF FAME$" -gUnknown_085EB198:: @ 85EB198 +gText_LogOff:: @ 85EB198 .string "LOG OFF$" + .string "OPPONENT$" .string "TOURNEY TREE$" .string "READY TO START$" @@ -1389,28 +1410,31 @@ gUnknown_085EB198:: @ 85EB198 .string "E-MODE$" .string "G-MODE$" -gUnknown_085EB25C:: @ 85EB25C +gText_MenuOptionPokedex:: @ 85EB25C .string "POKéDEX$" -gUnknown_085EB264:: @ 85EB264 +gText_MenuOptionPokemon:: @ 85EB264 .string "POKéMON$" -gUnknown_085EB26C:: @ 85EB26C +gText_MenuOptionBag:: @ 85EB26C .string "BAG$" -gUnknown_085EB270:: @ 85EB270 +gText_MenuOptionPokenav:: @ 85EB270 .string "POKéNAV$" + .string "$" -gUnknown_085EB279:: @ 85EB279 +gText_MenuOptionSave:: @ 85EB279 .string "SAVE$" -gUnknown_085EB27E:: @ 85EB27E +gText_MenuOptionOption:: @ 85EB27E .string "OPTION$" -gUnknown_085EB285:: @ 85EB285 +gText_MenuOptionExit:: @ 85EB285 .string "EXIT$" - .string " 5BP$" + + .align 2 + .string "5BP$" .string "10BP$" .string "15BP$" .string "RED TENT$" @@ -1482,30 +1506,32 @@ gUnknown_085EB285:: @ 85EB285 .string "REST$" .string "RETIRE$" -gUnknown_085EB5CF:: @ 85EB5CF +gText_99TimesPlus:: @ 85EB5CF .string "99 times +$" -gUnknown_085EB5DA:: @ 85EB5DA +gText_1MinutePlus:: @ 85EB5DA .string "1 minute +$" -gUnknown_085EB5E5:: @ 85EB5E5 +gText_SpaceSeconds:: @ 85EB5E5 .string " seconds$" -gUnknown_085EB5EE:: @ 85EB5EE +gText_SpaceTimes:: @ 85EB5EE .string " time(s)$" + .string ".$" -gUnknown_085EB5F9:: @ 85EB5F9 +gText_BigGuy:: @ 85EB5F9 .string "Big guy$" -gUnknown_085EB601:: @ 85EB601 +gText_BigGirl:: @ 85EB601 .string "Big girl$" -gUnknown_085EB60A:: @ 85EB60A +gText_Son:: @ 85EB60A .string "son$" -gUnknown_085EB60E:: @ 85EB60E +gText_Daughter:: @ 85EB60E .string "daughter$" + .string "BLUE FLUTE$" .string "YELLOW FLUTE$" .string "RED FLUTE$" @@ -1530,11 +1556,12 @@ gUnknown_085EB60E:: @ 85EB60E .string "B4F$" .string "ROOFTOP$" -gUnknown_085EB6A5:: @ 85EB6A5 +gText_ElevatorNowOn:: @ 85EB6A5 .string "Now on:$" -gUnknown_085EB6AD:: @ 85EB6AD +gText_BP:: @ 85EB6AD .string "BP$" + .string "ENERGYPOWDER{CLEAR_TO 0x72}{SIZE 0}50$" .string "ENERGY ROOT{CLEAR_TO 0x72}{SIZE 0}80$" .string "HEAL POWDER{CLEAR_TO 0x72}{SIZE 0}50$" @@ -1555,8 +1582,9 @@ gUnknown_085EB6AD:: @ 85EB6AD .string "SKY PILLAR$" .string "Don’t remember$" -gUnknown_085EB7EA:: @ 85EB7EA +gText_Exit:: @ 85EB7EA .string "EXIT$" + .string "Exit from the BOX?$" .string "What do you want to do?$" .string "Please pick a theme.$" @@ -1637,22 +1665,24 @@ gUnknown_085EB7EA:: @ 85EB7EA .string "Move items held by any POKéMON\nin a BOX or your party.$" .string "Return to the previous menu.$" -gUnknown_085EBC89:: @ 85EBC89 +gText_JustOnePkmn:: @ 85EBC89 .string "There is just one POKéMON with you.$" -gUnknown_085EBCAD:: @ 85EBCAD +gText_PartyFull:: @ 85EBCAD .string "Your party is full!$" -gUnknown_085EBCC1:: @ 85EBCC1 +gText_Box:: @ 85EBCC1 .string "BOX$" + .string "Check the map of the HOENN region.$" .string "Check POKéMON in detail.$" .string "Call a registered TRAINER.$" .string "Check obtained RIBBONS.$" .string "Put away the POKéNAV.$" -gUnknown_085EBD4A:: @ 85EBD4A +gText_NoRibbonWinners:: @ 85EBD4A .string "There are no RIBBON winners.$" + .string "No TRAINERS are registered.$" .string "Check party POKéMON in detail.$" .string "Check all POKéMON in detail.$" @@ -1664,11 +1694,12 @@ gUnknown_085EBD4A:: @ 85EBD4A .string "Find tough POKéMON.$" .string "Return to the CONDITION menu.$" -gUnknown_085EBE5F:: @ 85EBE5F +gText_NumberRegistered:: @ 85EBE5F .string "No. registered$" -gUnknown_085EBE6E:: @ 85EBE6E +gText_NumberOfBattles:: @ 85EBE6E .string "No. of battles$" + .string "DETAIL$" .string "CALL$" .string "EXIT$" @@ -1689,33 +1720,36 @@ gUnknown_085EBE6E:: @ 85EBE6E .string "{UNK_CTRL_F800}CHECK {UNK_CTRL_F801}CANCEL$" .string "{UNK_CTRL_F801}CANCEL$" -gUnknown_085EBF8D:: @ 85EBF8D +gText_NatureSlash:: @ 85EBF8D .string "NATURE/$" -gUnknown_085EBF95:: @ 85EBF95 +gText_TrainerCloseBy:: @ 85EBF95 .string "That TRAINER is close by.\nTalk to the TRAINER in person!$" -gUnknown_085EBFCE:: @ 85EBFCE +gText_InParty:: @ 85EBFCE .string "IN PARTY$" -gUnknown_085EBFD7:: @ 85EBFD7 +gText_Number2:: @ 85EBFD7 .string "No. $" + .string "RIBBONS$" .string "{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}$" .string "{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}$" .string "{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}$" -gUnknown_085EC00F:: @ 85EC00F +gText_Unknown:: @ 85EC00F .string "UNKNOWN$" + .string "CALL$" .string "CHECK$" .string "CANCEL$" -gUnknown_085EC029:: @ 85EC029 +gText_NumberF700:: @ 85EC029 .string "No. {SPECIAL_F7 0x00}$" -gUnknown_085EC030:: @ 85EC030 +gText_RibbonsF700:: @ 85EC030 .string "RIBBONS {SPECIAL_F7 0x00}$" + .string "{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}$" .string "{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}$" .string "{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}$" @@ -1756,34 +1790,38 @@ gUnknown_085EC030:: @ 85EC030 .string "The quiz:$" .string "Apprentice’s phrase:$" -gUnknown_085EC3A6:: @ 85EC3A6 +gText_QuitEditing:: @ 85EC3A6 .string "Quit editing?$" -gUnknown_085EC3B4:: @ 85EC3B4 +gText_StopGivingPkmnMail:: @ 85EC3B4 .string "Stop giving the POKéMON MAIL?$" + .string "and fill out the questionnaire.$" .string "Let’s reply to the interview!$" -gUnknown_085EC410:: @ 85EC410 +gText_AllTextBeingEditedWill:: @ 85EC410 .string "All the text being edited will$" -gUnknown_085EC42F:: @ 85EC42F +gText_BeDeletedThatOkay:: @ 85EC42F .string "be deleted. Is that okay?$" + .string "Quit editing?$" .string "The edited text will not be saved.$" .string "Is that okay?$" .string "Please enter a phrase or word.$" .string "The entire text can’t be deleted.$" -gUnknown_085EC4C9:: @ 85EC4C9 +gText_OnlyOnePhrase:: @ 85EC4C9 .string "Only one phrase may be changed.$" -gUnknown_085EC4E9:: @ 85EC4E9 +gText_OriginalSongWillBeUsed:: @ 85EC4E9 .string "The original song will be used.$" + .string "That’s trendy already!$" -gUnknown_085EC520:: @ 85EC520 +gText_CombineTwoWordsOrPhrases:: @ 85EC520 .string "Combine two words or phrases.$" + .string "Quit giving information?$" .string "Stop giving the POKéMON MAIL?$" .string "Create a quiz!$" @@ -1802,166 +1840,171 @@ gUnknown_085EC520:: @ 85EC520 .string "Apprentice’s phrase$" .string "QUESTIONNAIRE$" -gUnknown_085EC672:: @ 85EC672 +gText_YouCannotQuitHere:: @ 85EC672 .string "You cannot quit here.$" -gUnknown_085EC688:: @ 85EC688 +gText_SectionMustBeCompleted:: @ 85EC688 .string "This section must be completed.$" -gUnknown_085EC6A8:: @ 85EC6A8 +gText_F700sQuiz:: @ 85EC6A8 .string "{SPECIAL_F7 0x00}’s quiz$" -gUnknown_085EC6B2:: @ 85EC6B2 +gText_Lady:: @ 85EC6B2 .string "Lady$" + .string "After you have read the quiz$" .string "question, press the A Button.$" .string "The quiz answer is?$" -gUnknown_085EC706:: @ 85EC706 +gText_LikeToQuitQuiz:: @ 85EC706 .string "Would you like to quit this quiz$" -gUnknown_085EC727:: @ 85EC727 +gText_ChallengeQuestionMark:: @ 85EC727 .string "challenge?$" + .string "Is this quiz OK?$" -gUnknown_085EC743:: @ 85EC743 +gText_CreateAQuiz:: @ 85EC743 .string "Create a quiz!$" -gUnknown_085EC752:: @ 85EC752 +gText_SelectTheAnswer:: @ 85EC752 .string "Select the answer!$" -gUnknown_085EC765:: @ 85EC765 +gText_LyricsCantBeDeleted:: @ 85EC765 .string "The lyrics can’t be deleted.$" + .string "POKéMON LEAGUE$" .string "POKéMON CENTER$" -gUnknown_085EC7A0:: @ 85EC7A0 +gText_GetsAPokeBlockQuestion:: @ 85EC7A0 .string " gets a {POKEBLOCK}?$" + .string "Coolness $" .string "Beauty $" .string "Cuteness $" .string "Smartness $" .string "Toughness $" -gUnknown_085EC7E1:: @ 85EC7E1 +gText_WasEnhanced:: @ 85EC7E1 .string "was enhanced!$" -gUnknown_085EC7EF:: @ 85EC7EF +gText_NothingChanged:: @ 85EC7EF .string "Nothing changed!$" -gUnknown_085EC800:: @ 85EC800 +gText_WontEatAnymore:: @ 85EC800 .string "It won’t eat anymore…$" -gUnknown_085EC816:: @ 85EC816 +gText_SaveFailedCheckingBackup:: @ 85EC816 .string "Save failed. Checking the backup\nmemory… Please wait.\n{COLOR RED}“Time required: about 1 minuteâ€$" -gUnknown_085EC86F:: @ 85EC86F +gText_BackupMemoryDamaged:: @ 85EC86F .string "The backup memory is damaged, or\nthe internal battery has run dry.\nYou can still play, but not save.$" -gUnknown_085EC8D4:: @ 85EC8D4 +gText_GamePlayCannotBeContinued:: @ 85EC8D4 .string "{COLOR RED}“Game play cannot be continued.\nReturning to the title screen…â€$" -gUnknown_085EC917:: @ 85EC917 +gText_CheckCompleted:: @ 85EC917 .string "Check completed.\nAttempting to save again.\nPlease wait.$" -gUnknown_085EC94F:: @ 85EC94F +gText_SaveCompleteGameCannotContinue:: @ 85EC94F .string "Save completed.\n{COLOR RED}“Game play cannot be continued.\nReturning to the title screen.â€$" -gUnknown_085EC9A2:: @ 85EC9A2 +gText_SaveCompletePressA:: @ 85EC9A2 .string "Save completed.\n{COLOR RED}“Please press the A Button.â€$" -gUnknown_085EC9D2:: @ 85EC9D2 +gText_Ferry:: @ 85EC9D2 .string "FERRY$" -gUnknown_085EC9D8:: @ 85EC9D8 +gText_SecretBase:: @ 85EC9D8 .string "SECRET BASE$" -gUnknown_085EC9E4:: @ 85EC9E4 +gText_Hideout:: @ 85EC9E4 .string "HIDEOUT$" -gUnknown_085EC9EC:: @ 85EC9EC +gText_ResetRTCConfirmCancel:: @ 85EC9EC .string "Reset RTC?\nA: Confirm, B: Cancel$" -gUnknown_085ECA0D:: @ 85ECA0D +gText_PresentTime:: @ 85ECA0D .string "Present time in game$" -gUnknown_085ECA22:: @ 85ECA22 +gText_PreviousTime:: @ 85ECA22 .string "Previous time in game$" -gUnknown_085ECA38:: @ 85ECA38 +gText_PleaseResetTime:: @ 85ECA38 .string "Please reset the time.$" -gUnknown_085ECA4F:: @ 85ECA4F +gText_ClockHasBeenReset:: @ 85ECA4F .string "The clock has been reset.\nData will be saved. Please wait.$" -gUnknown_085ECA8A:: @ 85ECA8A +gText_SaveCompleted:: @ 85ECA8A .string "Save completed.$" -gUnknown_085ECA9A:: @ 85ECA9A +gText_SaveFailed:: @ 85ECA9A .string "Save failed…$" -gUnknown_085ECAA7:: @ 85ECAA7 +gText_NoSaveFileCantSetTime:: @ 85ECAA7 .string "There is no save file, so the time\ncan’t be set.$" -gUnknown_085ECAD8:: @ 85ECAD8 +gText_InGameClockUsable:: @ 85ECAD8 .string "The in-game clock adjustment system\nis now useable.$" -gUnknown_085ECB0C:: @ 85ECB0C +gText_Slots:: @ 85ECB0C .string "SLOTS$" -gUnknown_085ECB12:: @ 85ECB12 +gText_Roulette:: @ 85ECB12 .string "ROULETTE$" -gUnknown_085ECB1B:: @ 85ECB1B +gText_Good:: @ 85ECB1B .string "Good$" -gUnknown_085ECB20:: @ 85ECB20 +gText_VeryGood:: @ 85ECB20 .string "Very good$" -gUnknown_085ECB2A:: @ 85ECB2A +gText_Excellent:: @ 85ECB2A .string "Excellent$" -gUnknown_085ECB34:: @ 85ECB34 +gText_SoSo:: @ 85ECB34 .string "So-so$" -gUnknown_085ECB3A:: @ 85ECB3A +gText_Bad:: @ 85ECB3A .string "Bad$" -gUnknown_085ECB3E:: @ 85ECB3E +gText_TheWorst:: @ 85ECB3E .string "The worst$" -gUnknown_085ECB48:: @ 85ECB48 +gText_Spicy2:: @ 85ECB48 .string "spicy$" -gUnknown_085ECB4E:: @ 85ECB4E +gText_Dry2:: @ 85ECB4E .string "dry$" -gUnknown_085ECB52:: @ 85ECB52 +gText_Sweet2:: @ 85ECB52 .string "sweet$" -gUnknown_085ECB58:: @ 85ECB58 +gText_Bitter2:: @ 85ECB58 .string "bitter$" -gUnknown_085ECB5F:: @ 85ECB5F +gText_Sour2:: @ 85ECB5F .string "sour$" -gUnknown_085ECB64:: @ 85ECB64 +gText_Single:: @ 85ECB64 .string "SINGLE$" -gUnknown_085ECB6B:: @ 85ECB6B +gText_Double:: @ 85ECB6B .string "DOUBLE$" -gUnknown_085ECB72:: @ 85ECB72 +gText_Jackpot:: @ 85ECB72 .string "jackpot$" -gUnknown_085ECB7A:: @ 85ECB7A +gText_First:: @ 85ECB7A .string "first$" -gUnknown_085ECB80:: @ 85ECB80 +gText_Second:: @ 85ECB80 .string "second$" -gUnknown_085ECB87:: @ 85ECB87 +gText_Third:: @ 85ECB87 .string "third$" + .string "0 pts$" .string "10 pts$" .string "20 pts$" @@ -2025,79 +2068,84 @@ gUnknown_085ECB87:: @ 85ECB87 .string "THUNDERPUNCH{CLEAR_TO 0x4E}48BP$" .string "FIRE PUNCH{CLEAR_TO 0x4E}48BP$" -gUnknown_085ECF5D:: @ 85ECF5D +gText_PkmnFainted3:: @ 85ECF5D .string "{STR_VAR_1} fainted…\p\n$" -gOtherText_Marco:: @ 85ECF6B +gText_Marco:: @ 85ECF6B .string "MARCO$" -gUnknown_085ECF71:: @ 85ECF71 +gText_TrainerCardName:: @ 85ECF71 .string "NAME: $" -gUnknown_085ECF78:: @ 85ECF78 +gText_TrainerCardIDNo:: @ 85ECF78 .string "IDNo.$" -gUnknown_085ECF7E:: @ 85ECF7E +gText_TrainerCardMoney:: @ 85ECF7E .string "MONEY$" + .string "Â¥$" -gUnknown_085ECF86:: @ 85ECF86 +gText_TrainerCardPokedex:: @ 85ECF86 .string "POKéDEX$" -gUnknown_085ECF8E:: @ 85ECF8E +gText_EmptyString6:: @ 85ECF8E .string "$" -gUnknown_085ECF8F:: @ 85ECF8F +gText_Colon2:: @ 85ECF8F .string ":$" + .string " points$" -gUnknown_085ECF99:: @ 85ECF99 +gText_TrainerCardTime:: @ 85ECF99 .string "TIME$" + .string "ゲ-ムãƒã‚¤ãƒ³ãƒˆ$" @ "geemupointo" ("game point" in Japanese) -gUnknown_085ECFA6:: @ 85ECFA6 +gText_Var1sTrainerCard:: @ 85ECFA6 .string "{STR_VAR_1}’s TRAINER CARD$" -gUnknown_085ECFB8:: @ 85ECFB8 +gText_HallOfFameDebut:: @ 85ECFB8 .string "HALL OF FAME DEBUT $" + .string "LINK BATTLES$" .string "LINK CABLE BATTLES$" -gUnknown_085ECFED:: @ 85ECFED +gText_WinsLosses:: @ 85ECFED .string "W:{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY} L:{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_2}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}$" -gUnknown_085ED010:: @ 85ED010 +gText_PokemonTrades:: @ 85ED010 .string "POKéMON TRADES$" -gUnknown_085ED01F:: @ 85ED01F +gText_UnionTradesAndBattles:: @ 85ED01F .string "UNION TRADES & BATTLES$" -gUnknown_085ED036:: @ 85ED036 +gText_BerryCrush:: @ 85ED036 .string "BERRY CRUSH$" -gUnknown_085ED042:: @ 85ED042 +gText_WaitingTrainerFinishReading:: @ 85ED042 .string "Waiting for the other TRAINER to\nfinish reading your TRAINER CARD.$" -gUnknown_085ED085:: @ 85ED085 +gText_PokeblocksWithFriends:: @ 85ED085 .string "{POKEBLOCK}S W/FRIENDS$" -gUnknown_085ED096:: @ 85ED096 +gText_Var1DarkGreyShadowLightGrey:: @ 85ED096 .string "{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}$" -gUnknown_085ED09F:: @ 85ED09F +gText_WonContestsWFriends:: @ 85ED09F .string "WON CONTESTS W/FRIENDS$" -gUnknown_085ED0B6:: @ 85ED0B6 +gText_BattlePtsWon:: @ 85ED0B6 .string "BATTLE POINTS WON$" -gUnknown_085ED0C8:: @ 85ED0C8 +gText_Var1DarkLightGreyBP:: @ 85ED0C8 .string "{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}BP$" -gUnknown_085ED0D3:: @ 85ED0D3 +gText_BattleTower:: @ 85ED0D3 .string "BATTLE TOWER$" -gUnknown_085ED0E0:: @ 85ED0E0 +gText_WSlashStraightSlash:: @ 85ED0E0 .string "W/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY} STRAIGHT/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_2}$" + .string "BATTLE TOWER$" .string "BATTLE DOME$" .string "BATTLE PALACE$" @@ -2121,147 +2169,151 @@ gUnknown_085ED0E0:: @ 85ED0E0 .align 2 .string "{STR_VAR_1}$" -gUnknown_085ED193:: @ 85ED193 +gText_Give:: @ 85ED193 .string "Give$" -gUnknown_085ED198:: @ 85ED198 +gText_NoNeed:: @ 85ED198 .string "No need$" -gUnknown_085ED1A0:: @ 85ED1A0 +gText_ColorLightShadowDarkGrey:: @ 85ED1A0 .string "{COLOR LIGHT_GREY}{SHADOW DARK_GREY}$" -gUnknown_085ED1A7:: @ 85ED1A7 +gText_ColorBlue:: @ 85ED1A7 .string "{COLOR BLUE}$" -gUnknown_085ED1AB:: @ 85ED1AB +gText_ColorTransparent:: @ 85ED1AB .string "{HIGHLIGHT TRANSPARENT}{COLOR TRANSPARENT}$" -gUnknown_085ED1B2:: @ 85ED1B2 +gText_CDot:: @ 85ED1B2 .string "C.$" -gUnknown_085ED1B5:: @ 85ED1B5 +gText_BDot:: @ 85ED1B5 .string "B.$" -gUnknown_085ED1B8:: @ 85ED1B8 +gText_AnnouncingResults:: @ 85ED1B8 .string "Announcing the results!$" -gUnknown_085ED1D0:: @ 85ED1D0 +gText_PreliminaryResults:: @ 85ED1D0 .string "The preliminary results!$" -gUnknown_085ED1E9:: @ 85ED1E9 +gText_Round2Results:: @ 85ED1E9 .string "Round 2 results!$" -gUnknown_085ED1FA:: @ 85ED1FA +gText_Var1sVar2Won:: @ 85ED1FA .string "{STR_VAR_1}’s {STR_VAR_2} won!$" -gUnknown_085ED207:: @ 85ED207 +gText_CommunicationStandby:: @ 85ED207 .string "Communication standby…$" -gUnknown_085ED21E:: @ 85ED21E +gText_ColorDarkGrey:: @ 85ED21E .string "{COLOR DARK_GREY}$" + .string "{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR6 WHITE DYNAMIC_COLOR5}$" -gUnknown_085ED228:: @ 85ED228 +gText_HighlightDarkGrey:: @ 85ED228 .string "{HIGHLIGHT DARK_GREY}$" + .string " $" -gUnknown_085ED22E:: @ 85ED22E +gText_DynColor2Male:: @ 85ED22E .string "{COLOR DYNAMIC_COLOR2}♂$" -gUnknown_085ED233:: @ 85ED233 +gText_DynColor1Female:: @ 85ED233 .string "{COLOR DYNAMIC_COLOR1}♀$" -gUnknown_085ED238:: @ 85ED238 +gText_DynColor2:: @ 85ED238 .string "{COLOR DYNAMIC_COLOR2}$" -gUnknown_085ED23C:: @ 85ED23C +gText_Upper:: @ 85ED23C .string "UPPER$" -gUnknown_085ED242:: @ 85ED242 +gText_Lower:: @ 85ED242 .string "lower$" -gUnknown_085ED248:: @ 85ED248 +gText_Others:: @ 85ED248 .string "OTHERS$" -gUnknown_085ED24F:: @ 85ED24F +gText_Symbols:: @ 85ED24F .string "SYMBOLS$" -gUnknown_085ED257:: @ 85ED257 +gText_Register2:: @ 85ED257 .string "REGISTER$" -gUnknown_085ED260:: @ 85ED260 +gText_Exit2:: @ 85ED260 .string "EXIT$" -gUnknown_085ED265:: @ 85ED265 +gText_QuitChatting:: @ 85ED265 .string "Quit chatting?$" -gUnknown_085ED274:: @ 85ED274 +gText_RegisterTextWhere:: @ 85ED274 .string "Register text where?$" -gUnknown_085ED289:: @ 85ED289 +gText_RegisterTextHere:: @ 85ED289 .string "Register text here?$" -gUnknown_085ED29D:: @ 85ED29D +gText_InputText:: @ 85ED29D .string "Input text.$" -gUnknown_085ED2A9:: @ 85ED2A9 +gText_F700JoinedChat:: @ 85ED2A9 .string "{SPECIAL_F7 0x00} joined the chat!$" -gUnknown_085ED2BD:: @ 85ED2BD +gText_F700LeftChat:: @ 85ED2BD .string "{SPECIAL_F7 0x00} left the chat.$" + .string "{SPECIAL_F7 0x00}ã®{SPECIAL_F7 0x01}ã²ãã‚:$" @ "{SPECIAL_F7 0x00}'s {SPECIAL_F7 0x01}hikime" .string "{SPECIAL_F7 0x00}ã®{SPECIAL_F7 0x01}ã²ãã‚㯠ã„ã¾ã›ã‚“$" @ "{SPECIAL_F7 0x00}'s {SPECIAL_F7 0x01}hikimeha imasen" -gUnknown_085ED2E8:: @ 85ED2E8 +gText_ExitingChat:: @ 85ED2E8 .string "Exiting the chat…$" -gUnknown_085ED2FA:: @ 85ED2FA +gText_LeaderLeftEndingChat:: @ 85ED2FA .string "The LEADER, {SPECIAL_F7 0x00}, has\nleft, ending the chat.$" -gUnknown_085ED325:: @ 85ED325 +gText_RegisteredTextChanged:: @ 85ED325 .string "The registered text has been changed.\nIs it okay to save the game?$" -gUnknown_085ED368:: @ 85ED368 +gText_AlreadySavedFile:: @ 85ED368 .string "There is already a saved file.\nIs it okay to overwrite it?$" -gUnknown_085ED3A3:: @ 85ED3A3 +gText_SavingDontTurnOff:: @ 85ED3A3 .string "SAVING…\nDON’T TURN OFF THE POWER.$" -gUnknown_085ED3C5:: @ 85ED3C5 +gText_PlayerSavedGame:: @ 85ED3C5 .string "{SPECIAL_F7 0x00} saved the game.$" -gUnknown_085ED3D8:: @ 85ED3D8 +gText_IfLeaderLeavesChatEnds:: @ 85ED3D8 .string "If the LEADER leaves, the chat\nwill end. Is that okay?$" -gUnknown_085ED40F:: @ 85ED40F +gText_Hello:: @ 85ED40F .string "HELLO$" -gUnknown_085ED415:: @ 85ED415 +gText_Pokemon2:: @ 85ED415 .string "POKéMON$" -gUnknown_085ED41D:: @ 85ED41D +gText_Trade:: @ 85ED41D .string "TRADE$" -gUnknown_085ED423:: @ 85ED423 +gText_Battle:: @ 85ED423 .string "BATTLE$" -gUnknown_085ED42A:: @ 85ED42A +gText_Lets:: @ 85ED42A .string "LET’S$" -gUnknown_085ED430:: @ 85ED430 +gText_Ok:: @ 85ED430 .string "OK!$" -gUnknown_085ED434:: @ 85ED434 +gText_Sorry:: @ 85ED434 .string "SORRY$" -gUnknown_085ED43A:: @ 85ED43A +gText_YayUnkF9F9:: @ 85ED43A .string "YAY{UNK_CTRL_F9F9}$" -gUnknown_085ED440:: @ 85ED440 +gText_ThankYou:: @ 85ED440 .string "THANK YOU$" -gUnknown_085ED44A:: @ 85ED44A +gText_ByeBye:: @ 85ED44A .string "BYE-BYE!$" + .string "Attack the weak points!$" .string "Ultimate STEEL POKéMON.$" .string "I’d climb even waterfalls$" @@ -2277,145 +2329,146 @@ gUnknown_085ED44A:: @ 85ED44A .string "My POKéMON and I help$" .string "my father’s research.$" -gUnknown_085ED5A5:: @ 85ED5A5 +gText_PkmnHatchedFromEgg:: @ 85ED5A5 .string "{STR_VAR_1} hatched from the EGG!$" -gUnknown_085ED5BE:: @ 85ED5BE +gText_NameHatchedPkmn:: @ 85ED5BE .string "Would you like to nickname the newly\nhatched {STR_VAR_1}?$" .align 2 -gUnknown_085ED5F0:: @ 85ED5F0 +gText_ReadyToBerryCrush:: @ 85ED5F0 .string "Are you ready to BERRY-CRUSH?\nPlease pick a BERRY for use.\p$" .align 2 -gUnknown_085ED62C:: @ 85ED62C +gText_WaitForAllChooseBerry:: @ 85ED62C .string "Please wait while each member\nchooses a BERRY.$" .align 2 -gUnknown_085ED65C:: @ 85ED65C +gText_EndedWithXUnitsPowder:: @ 85ED65C .string "{PAUSE_MUSIC}{PLAY_BGM BGM_FANFA1}You ended up with {STR_VAR_1} units of\nsilky-smooth BERRY POWDER.{RESUME_MUSIC}\pYour total amount of BERRY POWDER\nis {STR_VAR_2}.\p$" .align 2 -gUnknown_085ED6C8:: @ 85ED6C8 +gText_RecordingGameResults:: @ 85ED6C8 .string "Recording your game results in the\nsave file.\lPlease wait.$" .align 2 -gUnknown_085ED704:: @ 85ED704 +gText_PlayBerryCrushAgain:: @ 85ED704 .string "Want to play BERRY CRUSH again?$" .align 2 -gUnknown_085ED724:: @ 85ED724 +gText_YouHaveNoBerries:: @ 85ED724 .string "You have no BERRIES.\nThe game will be canceled.$" .align 2 -gUnknown_085ED754:: @ 85ED754 +gText_MemberDroppedOut:: @ 85ED754 .string "A member dropped out.\nThe game will be canceled.$" .align 2 -gUnknown_085ED788:: @ 85ED788 +gText_TimesUpNoGoodPowder:: @ 85ED788 .string "Time’s up.\pGood BERRY POWDER could not be\nmade…\p$" .align 2 -gUnknown_085ED7BC:: @ 85ED7BC +gText_CommunicationStandby2:: @ 85ED7BC .string "Communication standby…$" .align 2 -gUnknown_085ED7D4:: @ 85ED7D4 +gText_1DotBlueF700:: @ 85ED7D4 .string "1. {COLOR BLUE}{SHADOW LIGHT_BLUE}{SPECIAL_F7 0x00}$" .align 2 -gUnknown_085ED7E0:: @ 85ED7E0 +gText_1DotF700:: @ 85ED7E0 .string "1. {SPECIAL_F7 0x00}$" .align 2 -gUnknown_085ED7E8:: @ 85ED7E8 +gText_SpaceTimes2:: @ 85ED7E8 .string " time(s)$" .align 2 -gUnknown_085ED7F4:: @ 85ED7F4 +gText_XDotY:: @ 85ED7F4 .string "{STR_VAR_1}.{STR_VAR_2}$" .align 2 -gUnknown_085ED7FC:: @ 85ED7FC +gText_Var1Berry:: @ 85ED7FC .string "{STR_VAR_1} BERRY$" .align 2 -gUnknown_085ED808:: @ 85ED808 +gText_TimeColon:: @ 85ED808 .string "Time:$" .align 2 -gUnknown_085ED810:: @ 85ED810 +gText_PressingSpeed:: @ 85ED810 .string "Pressing Speed:$" .align 2 -gUnknown_085ED820:: @ 85ED820 +gText_Silkiness:: @ 85ED820 .string "Silkiness:$" .align 2 -gUnknown_085ED82C:: @ 85ED82C +gText_StrVar1:: @ 85ED82C .string "{STR_VAR_1}$" .align 2 -gUnknown_085ED830:: @ 85ED830 +gText_SpaceMin:: @ 85ED830 .string " min. $" .align 2 -gUnknown_085ED838:: @ 85ED838 +gText_XDotY2:: @ 85ED838 .string "{STR_VAR_1}.{STR_VAR_2}$" .align 2 -gUnknown_085ED840:: @ 85ED840 +gText_SpaceSec:: @ 85ED840 .string " sec.$" .align 2 -gUnknown_085ED848:: @ 85ED848 +gText_XDotY3:: @ 85ED848 .string "{STR_VAR_1}.{STR_VAR_2}$" .align 2 -gUnknown_085ED850:: @ 85ED850 +gText_TimesPerSec:: @ 85ED850 .string " Times/sec.$" .align 2 -gUnknown_085ED85C:: @ 85ED85C +gText_Var1Percent:: @ 85ED85C .string "{STR_VAR_1}%$" .align 2 -gUnknown_085ED860:: @ 85ED860 +gText_PressesRankings:: @ 85ED860 .string "No. of Presses Rankings$" .align 2 -gUnknown_085ED878:: @ 85ED878 +gText_CrushingResults:: @ 85ED878 .string "Crushing Results$" .align 2 -gUnknown_085ED88C:: @ 85ED88C +gText_NeatnessRankings:: @ 85ED88C .string "Neatness Rankings$" .align 2 -gUnknown_085ED8A0:: @ 85ED8A0 +gText_CoopRankings:: @ 85ED8A0 .string "Cooperative Rankings$" .align 2 -gUnknown_085ED8B8:: @ 85ED8B8 +gText_PressingPowerRankings:: @ 85ED8B8 .string "Pressing-Power Rankings$" -gUnknown_085ED8D0:: @ 85ED8D0 +gText_BerryCrush2:: @ 85ED8D0 .string "BERRY CRUSH$" -gUnknown_085ED8DC:: @ 85ED8DC +gText_PressingSpeedRankings:: @ 85ED8DC .string "Pressing-Speed Rankings$" -gUnknown_085ED8F4:: @ 85ED8F4 +gText_Var1Players:: @ 85ED8F4 .string "{STR_VAR_1} PLAYERS$" -gUnknown_085ED8FF:: @ 85ED8FF +gText_SymbolsEarned:: @ 85ED8FF .string "Symbols Earned$" -gUnknown_085ED90E:: @ 85ED90E +gText_BattleRecord:: @ 85ED90E .string "Battle Record$" -gUnknown_085ED91C:: @ 85ED91C +gText_BattlePoints:: @ 85ED91C .string "Battle Points$" + .string "CANCEL$" .string "$" .string "Check BATTLE FRONTIER MAP.$" @@ -2447,140 +2500,141 @@ gUnknown_085ED91C:: @ 85ED91C .string "Select one of three paths to battle!\nYour luck will be tested.$" .string "Aim for the top with exploration!\nYour bravery will be tested.$" -gUnknown_085EDCC3:: @ 85EDCC3 +gText_ContinueMenuPlayer:: @ 85EDCC3 .string "PLAYER$" -gUnknown_085EDCCA:: @ 85EDCCA +gText_ContinueMenuTime:: @ 85EDCCA .string "TIME$" -gUnknown_085EDCCF:: @ 85EDCCF +gText_ContinueMenuPokedex:: @ 85EDCCF .string "POKéDEX$" -gUnknown_085EDCD7:: @ 85EDCD7 +gText_ContinueMenuBadges:: @ 85EDCD7 .string "BADGES$" -gUnknown_085EDCDE:: @ 85EDCDE +gText_Powder:: @ 85EDCDE .string "POWDER$" -gUnknown_085EDCE5:: @ 85EDCE5 +gText_BerryPickingRecords:: @ 85EDCE5 .string "DODRIO BERRY-PICKING RECORDS$" -gUnknown_085EDD02:: @ 85EDD02 +gText_BerriesPicked:: @ 85EDD02 .string "BERRIES picked:$" -gUnknown_085EDD12:: @ 85EDD12 +gText_BestScore:: @ 85EDD12 .string "Best score:$" -gUnknown_085EDD1E:: @ 85EDD1E +gText_BerriesInRowFivePlayers:: @ 85EDD1E .string "BERRIES picked in a row with\nfive players:$" -gUnknown_085EDD49:: @ 85EDD49 +gText_BerryPickingResults:: @ 85EDD49 .string "Announcing BERRY-PICKING results!$" -gUnknown_085EDD6B:: @ 85EDD6B +gText_10P30P50P50P:: @ 85EDD6B .string "{CLEAR_TO 0x03}10P{CLEAR_TO 0x2B}30P{CLEAR_TO 0x53}50P{CLEAR_TO 0x77}{UNK_CTRL_F9DD}50P$" -gUnknown_085EDD86:: @ 85EDD86 +gText_AnnouncingRankings:: @ 85EDD86 .string "Announcing rankings!$" -gUnknown_085EDD9B:: @ 85EDD9B +gText_AnnouncingPrizes:: @ 85EDD9B .string "Announcing prizes!$" -gUnknown_085EDDAE:: @ 85EDDAE +gText_1Colon:: @ 85EDDAE .string "1:$" -gUnknown_085EDDB1:: @ 85EDDB1 +gText_2Colon:: @ 85EDDB1 .string "2:$" -gUnknown_085EDDB4:: @ 85EDDB4 +gText_3Colon:: @ 85EDDB4 .string "3:$" -gUnknown_085EDDB7:: @ 85EDDB7 +gText_4Colon:: @ 85EDDB7 .string "4:$" -gUnknown_085EDDBA:: @ 85EDDBA +gText_5Colon:: @ 85EDDBA .string "5:$" -gUnknown_085EDDBD:: @ 85EDDBD +gText_FirstPlacePrize:: @ 85EDDBD .string "The first-place winner gets\nthis {SPECIAL_F7 0x00}!$" -gUnknown_085EDDE2:: @ 85EDDE2 +gText_CantHoldAnyMore:: @ 85EDDE2 .string "You can’t hold any more!$" -gUnknown_085EDDFB:: @ 85EDDFB +gText_FilledStorageSpace:: @ 85EDDFB .string "It filled its storage space.$" -gUnknown_085EDE18:: @ 85EDE18 +gText_WantToPlayAgain:: @ 85EDE18 .string "Want to play again?$" -gUnknown_085EDE2C:: @ 85EDE2C +gText_SomeoneDroppedOut:: @ 85EDE2C .string "Somebody dropped out.\nThe link will be canceled.$" -gUnknown_085EDE5D:: @ 85EDE5D +gText_SpacePoints:: @ 85EDE5D .string " points$" -gUnknown_085EDE65:: @ 85EDE65 +gText_CommunicationStandby3:: @ 85EDE65 .string "Communication standby…$" -gUnknown_085EDE7C:: @ 85EDE7C +gText_SpacePoints2:: @ 85EDE7C .string " points$" -gUnknown_085EDE84:: @ 85EDE84 +gText_SpaceTimes3:: @ 85EDE84 .string " time(s)$" -gUnknown_085EDE8D:: @ 85EDE8D +gText_PkmnJumpRecords:: @ 85EDE8D .string "POKéMON JUMP RECORDS$" -gUnknown_085EDEA2:: @ 85EDEA2 +gText_JumpsInARow:: @ 85EDEA2 .string "Jumps in a row:$" -gUnknown_085EDEB2:: @ 85EDEB2 +gText_BestScore2:: @ 85EDEB2 .string "Best score:$" -gUnknown_085EDEBE:: @ 85EDEBE +gText_ExcellentsInARow:: @ 85EDEBE .string "EXCELLENTS in a row:$" -gUnknown_085EDED3:: @ 85EDED3 +gText_AwesomeWonF701F700:: @ 85EDED3 .string "Awesome score! You’ve\nwon {SPECIAL_F7 0x01} {SPECIAL_F7 0x00}!$" -gUnknown_085EDEF4:: @ 85EDEF4 +gText_FilledStorageSpace2:: @ 85EDEF4 .string "It filled its storage space.$" -gUnknown_085EDF11:: @ 85EDF11 +gText_CantHoldMore:: @ 85EDF11 .string "You can’t hold any more!$" -gUnknown_085EDF2A:: @ 85EDF2A +gText_WantToPlayAgain2:: @ 85EDF2A .string "Want to play again?$" -gUnknown_085EDF3E:: @ 85EDF3E +gText_SomeoneDroppedOut2:: @ 85EDF3E .string "Somebody dropped out.\nThe link will be canceled.$" -gUnknown_085EDF6F:: @ 85EDF6F +gText_CommunicationStandby4:: @ 85EDF6F .string "Communication standby…$" -gUnknown_085EDF86:: @ 85EDF86 +gText_LinkContestResults:: @ 85EDF86 .string "{PLAYER}’s Link Contest Results$" -gUnknown_085EDFA0:: @ 85EDFA0 +gText_1st:: @ 85EDFA0 .string "1st$" -gUnknown_085EDFA4:: @ 85EDFA4 +gText_2nd:: @ 85EDFA4 .string "2nd$" -gUnknown_085EDFA8:: @ 85EDFA8 +gText_3rd:: @ 85EDFA8 .string "3rd$" -gUnknown_085EDFAC:: @ 85EDFAC +gText_4th:: @ 85EDFAC .string "4th$" -gUnknown_085EDFB0:: @ 85EDFB0 +gText_Friend:: @ 85EDFB0 .string "Friend$" + .string "POKeMON$" -gUnknown_085EDFBF:: @ 85EDFBF +gJPText_MysteryGift:: @ 85EDFBF .string "ãµã—ãŽãªã‚‚らã„ã‚‚ã®$" @ "fushiginamoraimono" ("Mystery Gift" in Japanese) -gUnknown_085EDFC9:: @ 85EDFC9 +gJPText_DecideStop:: @ 85EDFC9 .string "{UNK_CTRL_F800}ã‘ã£ã¦ã„ {UNK_CTRL_F801}ã‚„ã‚ã‚‹$" @ "{UNK_CTRL_F800}kettei {UNK_CTRL_F801}yameru" ("{UNK_CTRL_F800}decide {UNK_CTRL_F801}stop" in Japanese) @ A bunch of Japanese strings here, waiting for updated datadump to dump properly @@ -2630,89 +2684,88 @@ gUnknown_085EE12D:: @ 85EE12D .string "BLUE$" .string "---$" -gUnknown_085EE158:: @ 85EE158 +gText_SingleBattleRoomResults:: @ 85EE158 .string "{PLAYER}’s Single Battle Room Results$" -gUnknown_085EE178:: @ 85EE178 +gText_DoubleBattleRoomResults:: @ 85EE178 .string "{PLAYER}’s Double Battle Room Results$" -gUnknown_085EE198:: @ 85EE198 +gText_MultiBattleRoomResults:: @ 85EE198 .string "{PLAYER}’s Multi Battle Room Results$" -gUnknown_085EE1B7:: @ 85EE1B7 +gText_LinkMultiBattleRoomResults:: @ 85EE1B7 .string "{PLAYER}’s Link Multi Battle Room Results$" -gUnknown_085EE1DB:: @ 85EE1DB +gText_SingleBattleTourneyResults:: @ 85EE1DB .string "{PLAYER}’s Single Battle Tourney Results$" -gUnknown_085EE1FE:: @ 85EE1FE +gText_DoubleBattleTourneyResults:: @ 85EE1FE .string "{PLAYER}’s Double Battle Tourney Results$" -gUnknown_085EE221:: @ 85EE221 +gText_SingleBattleHallResults:: @ 85EE221 .string "{PLAYER}’s Single Battle Hall Results$" -gUnknown_085EE241:: @ 85EE241 +gText_DoubleBattleHallResults:: @ 85EE241 .string "{PLAYER}’s Double Battle Hall Results$" -gUnknown_085EE261:: @ 85EE261 +gText_BattleChoiceResults:: @ 85EE261 .string "{PLAYER}’s Battle Choice Results$" -gUnknown_085EE27C:: @ 85EE27C +gText_SetKOTourneyResults:: @ 85EE27C .string "{PLAYER}’s Set KO Tourney Results$" -gUnknown_085EE298:: @ 85EE298 +gText_BattleSwapSingleResults:: @ 85EE298 .string "{PLAYER}’s Battle Swap Single Results$" -gUnknown_085EE2B8:: @ 85EE2B8 +gText_BattleSwapDoubleResults:: @ 85EE2B8 .string "{PLAYER}’s Battle Swap Double Results$" -gUnknown_085EE2D8:: @ 85EE2D8 +gText_BattleQuestResults:: @ 85EE2D8 .string "{PLAYER}’s Battle Quest Results$" -gUnknown_085EE2F2:: @ 85EE2F2 +gText_Lv502:: @ 85EE2F2 .string "LV. 50$" -gUnknown_085EE2F9:: @ 85EE2F9 +gText_OpenLv:: @ 85EE2F9 .string "OPEN LV.$" -gUnknown_085EE302:: @ 85EE302 +gText_WinStreak:: @ 85EE302 .string "Win streak: {STR_VAR_1}$" -gUnknown_085EE311:: @ 85EE311 +gText_Current:: @ 85EE311 .string "CURRENT$" -gUnknown_085EE319:: @ 85EE319 +gText_Record:: @ 85EE319 .string "RECORD$" -gUnknown_085EE320:: @ 85EE320 +gText_Prev:: @ 85EE320 .string "PREV.$" -gUnknown_085EE326:: @ 85EE326 +gText_RentalSwap:: @ 85EE326 .string "Rental/Swap$" -gUnknown_085EE332:: @ 85EE332 +gText_Total:: @ 85EE332 .string "Total$" -gUnknown_085EE338:: @ 85EE338 +gText_ClearStreak:: @ 85EE338 .string "Clear streak: {STR_VAR_1}$" -gUnknown_085EE349:: @ 85EE349 +gText_Championships:: @ 85EE349 .string "Championships: {STR_VAR_1}$" -gUnknown_085EE35B:: @ 85EE35B +gText_RoomsCleared:: @ 85EE35B .string "Rooms cleared: {STR_VAR_1}$" -gUnknown_085EE36D:: @ 85EE36D +gText_TimesCleared:: @ 85EE36D .string "Times cleared:{CLEAR 0x05}{STR_VAR_1}$" -gUnknown_085EE381:: @ 85EE381 +gText_KOsInARow:: @ 85EE381 .string "KOs in a row: {STR_VAR_1}$" -gUnknown_085EE392:: @ 85EE392 +gText_TimesVar1:: @ 85EE392 .string "Times: {STR_VAR_1}$" - - .align 2 -gUnknown_085EE39C:: @ 85EE39C + +gText_FloorsCleared:: @ 85EE39C .string "Floors cleared: {STR_VAR_1}$" .align 2 @@ -2737,46 +2790,48 @@ gUnknown_085EE39C:: @ 85EE39C .string "Floors cleared: {STR_VAR_2}$" .align 2 -gUnknown_085EE424:: @ 85EE424 +gText_1Dot:: @ 85EE424 .string "1.$" + .string "2.$" .string "3.$" -gUnknown_085EE42D:: @ 85EE42D +gText_SavingDontTurnOff2:: @ 85EE42D .string "SAVING…\nDON’T TURN OFF THE POWER.$" -gUnknown_085EE44F:: @ 85EE44F +gText_BlenderMaxSpeedRecord:: @ 85EE44F .string "BERRY BLENDER\nMAXIMUM SPEED RECORD!$" -gUnknown_085EE473:: @ 85EE473 +gText_234Players:: @ 85EE473 .string "2 PLAYERS\n3 PLAYERS\n4 PLAYERS$" -gUnknown_085EE491:: @ 85EE491 +gText_YesNo:: @ 85EE491 .string "YES\nNO$" -gUnknown_085EE498:: @ 85EE498 +gText_SelectorArrow3:: @ 85EE498 .string "â–¶$" -gUnknown_085EE49A:: @ 85EE49A +gText_Peekaboo:: @ 85EE49A .string "PEEKABOO!$" -gUnknown_085EE4A4:: @ 85EE4A4 +gText_CommErrorCheckConnections:: @ 85EE4A4 .string "Communication error…\nPlease check all connections,\nthen turn the power OFF and ON.$" -gUnknown_085EE4F7:: @ 85EE4F7 +gText_CommErrorEllipsis:: @ 85EE4F7 .string "Communication error…$" -gUnknown_085EE50C:: @ 85EE50C +gText_MoveCloserToLinkPartner:: @ 85EE50C .string "Move closer to your link partner(s).\nAvoid obstacles between partners.$" -gUnknown_085EE553:: @ 85EE553 +gText_ABtnRegistrationCounter:: @ 85EE553 .string "A Button: Registration Counter$" -gUnknown_085EE572:: @ 85EE572 +gText_ABtnTitleScreen:: @ 85EE572 .string "A Button: Title Screen$" -gUnknown_085EE589:: @ 85EE589 +gText_Option:: @ 85EE589 .string "OPTION$" + .string "TEXT SPEED$" .string "BATTLE SCENE$" .string "BATTLE STYLE$" @@ -2785,63 +2840,65 @@ gUnknown_085EE589:: @ 85EE589 .string "CANCEL$" .string "BUTTON MODE$" -gUnknown_085EE5D4:: @ 85EE5D4 +gText_TextSpeedSlow:: @ 85EE5D4 .string "{COLOR GREEN}{SHADOW LIGHT_GREEN}SLOW$" -gUnknown_085EE5DF:: @ 85EE5DF +gText_TextSpeedMid:: @ 85EE5DF .string "{COLOR GREEN}{SHADOW LIGHT_GREEN}MID$" -gUnknown_085EE5E9:: @ 85EE5E9 +gText_TextSpeedFast:: @ 85EE5E9 .string "{COLOR GREEN}{SHADOW LIGHT_GREEN}FAST$" -gUnknown_085EE5F4:: @ 85EE5F4 +gText_BattleSceneOn:: @ 85EE5F4 .string "{COLOR GREEN}{SHADOW LIGHT_GREEN}ON$" -gUnknown_085EE5FD:: @ 85EE5FD +gText_BattleSceneOff:: @ 85EE5FD .string "{COLOR GREEN}{SHADOW LIGHT_GREEN}OFF$" -gUnknown_085EE607:: @ 85EE607 +gText_BattleStyleShift:: @ 85EE607 .string "{COLOR GREEN}{SHADOW LIGHT_GREEN}SHIFT$" -gUnknown_085EE613:: @ 85EE613 +gText_BattleStyleSet:: @ 85EE613 .string "{COLOR GREEN}{SHADOW LIGHT_GREEN}SET$" -gUnknown_085EE61D:: @ 85EE61D +gText_SoundMono:: @ 85EE61D .string "{COLOR GREEN}{SHADOW LIGHT_GREEN}MONO$" -gUnknown_085EE628:: @ 85EE628 +gText_SoundStereo:: @ 85EE628 .string "{COLOR GREEN}{SHADOW LIGHT_GREEN}STEREO$" -gUnknown_085EE635:: @ 85EE635 +gText_FrameType:: @ 85EE635 .string "{COLOR GREEN}{SHADOW LIGHT_GREEN}TYPE$" -gUnknown_085EE640:: @ 85EE640 +gText_FrameTypeNumber:: @ 85EE640 .string "{COLOR GREEN}{SHADOW LIGHT_GREEN}$" -gUnknown_085EE647:: @ 85EE647 +gText_ButtonTypeNormal:: @ 85EE647 .string "{COLOR GREEN}{SHADOW LIGHT_GREEN}NORMAL$" -gUnknown_085EE654:: @ 85EE654 +gText_ButtonTypeLR:: @ 85EE654 .string "{COLOR GREEN}{SHADOW LIGHT_GREEN}LR$" -gUnknown_085EE65D:: @ 85EE65D +gText_ButtonTypeLEqualsA:: @ 85EE65D .string "{COLOR GREEN}{SHADOW LIGHT_GREEN}L=A$" -gUnknown_085EE667:: @ 85EE667 +gText_XPLink:: @ 85EE667 .string "{STR_VAR_1}P LINK$" + .string "BRONZE$" .string "COPPER$" .string "SILVER$" .string "GOLD$" -gUnknown_085EE68A:: @ 85EE68A +gText_Day:: @ 85EE68A .string "DAY$" -gUnknown_085EE68E:: @ 85EE68E +gText_Colon3:: @ 85EE68E .string ":$" -gUnknown_085EE690:: @ 85EE690 +gText_Confirm2:: @ 85EE690 .string "CONFIRM$" + .string "Days$" .string "Time:$" .string "Game time$" @@ -2858,11 +2915,12 @@ gUnknown_085EE690:: @ 85EE690 .string "RETIRE$" .string "REST$" -gOtherText_SafariStock:: @ 85EE6FF +gText_SafariBallStock:: @ 85EE6FF .string "SAFARI BALLS\nStock: {STR_VAR_1}$" -gOtherText_BattlePyramid_X:: @ 85EE716 +gText_BattlePyramidFloor:: @ 85EE716 .string "Battle Pyramid\n{STR_VAR_1}$" + .string "Floor 1$" .string "Floor 2$" .string "Floor 3$" @@ -2872,70 +2930,72 @@ gOtherText_BattlePyramid_X:: @ 85EE716 .string "Floor 7$" .string "Peak$" -gUnknown_085EE765:: @ 85EE765 +gText_LinkStandby2:: @ 85EE765 .string "Link standby…\n… … B Button: Cancel$" -gUnknown_085EE788:: @ 85EE788 +gText_PressAToLoadEvent:: @ 85EE788 .string "Press the A Button to load event.\n… … B Button: Cancel$" -gUnknown_085EE7BF:: @ 85EE7BF +gText_LoadingEvent:: @ 85EE7BF .string "Loading event…$" -gUnknown_085EE7CE:: @ 85EE7CE +gText_DontRemoveCableTurnOff:: @ 85EE7CE .string "Don’t remove the Game Link cable.\nDon’t turn off the power.$" -gUnknown_085EE80A:: @ 85EE80A +gText_EventSafelyLoaded:: @ 85EE80A .string "The event was safely loaded.$" -gUnknown_085EE827:: @ 85EE827 +gText_LoadErrorEndingSession:: @ 85EE827 .string "Loading error.\nEnding session.$" + .string "プレイヤー$" @ "pureiyaa" ("player" in Japanese) .string "ã•ã¾$" @ "sama" (a very high honorific) -gUnknown_085EE84F:: @ 85EE84F +gText_DexHoenn:: @ 85EE84F .string "HOENN$" -gUnknown_085EE855:: @ 85EE855 +gText_DexNational:: @ 85EE855 .string "NATIONAL$" -gUnknown_085EE85E:: @ 85EE85E +gText_PokedexDiploma:: @ 85EE85E .string "PLAYER: {CLEAR 0x10}{COLOR RED}{SHADOW LIGHT_RED}{PLAYER}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}\n\nThis document certifies\nthat you have successfully\ncompleted your\n{STR_VAR_1} POKéDEX.\n\n{CLEAR_TO 0x42}{COLOR RED}{SHADOW LIGHT_RED}GAME FREAK$" .string "{COLOR RED}{SHADOW LIGHT_RED}ゲ-ムフリ-ク$" @ geemufuriku ("Game Freak" in Japanese) .string "{COLOR RED}{SHADOW LIGHT_RED}$" -gUnknown_085EE8F1:: @ 85EE8F1 +gText_Hoenn:: @ 85EE8F1 .string "HOENN$" -gUnknown_085EE8F7:: @ 85EE8F7 +gText_OhABite:: @ 85EE8F7 .string "Oh! A bite!$" -gUnknown_085EE903:: @ 85EE903 +gText_PokemonOnHook:: @ 85EE903 .string "A POKéMON’s on the hook!{PAUSE_UNTIL_PRESS}$" -gUnknown_085EE91E:: @ 85EE91E +gText_NotEvenANibble:: @ 85EE91E .string "Not even a nibble…{PAUSE_UNTIL_PRESS}$" -gUnknown_085EE933:: @ 85EE933 +gText_ItGotAway:: @ 85EE933 .string "It got away…{PAUSE_UNTIL_PRESS}$" -gUnknown_085EE942:: @ 85EE942 +gText_XWillBeSentToY:: @ 85EE942 .string "{STR_VAR_2} will be\nsent to {STR_VAR_1}.$" -gUnknown_085EE959:: @ 85EE959 +gText_ByeByeVar1:: @ 85EE959 .string "Bye-bye, {STR_VAR_2}!$" -gUnknown_085EE966:: @ 85EE966 +gText_XSentOverY:: @ 85EE966 .string "{STR_VAR_1} sent over {STR_VAR_3}.$" -gUnknown_085EE977:: @ 85EE977 +gText_TakeGoodCareOfX:: @ 85EE977 .string "Take good care of {STR_VAR_3}!$" .include "data/text/easy_chat/easy_chat_group_names.inc" -gUnknown_085EEA42:: @ 85EEA42 +gText_ThreeQuestionMarks:: @ 85EEA42 .string "???$" + .string "MAX. HP$" .string "ATTACK$" .string "DEFENSE$" @@ -2943,30 +3003,32 @@ gUnknown_085EEA42:: @ 85EEA42 .string "SP. ATK$" .string "SP. DEF$" -gUnknown_085EEA73:: @ 85EEA73 +gText_UnkCtrlF904:: @ 85EEA73 .string "{UNK_CTRL_F904}$" -gUnknown_085EEA76:: @ 85EEA76 +gText_Dash:: @ 85EEA76 .string "-$" -gUnknown_085EEA78:: @ 85EEA78 +gText_FromSpace:: @ 85EEA78 .string "From $" -gUnknown_085EEA7E:: @ 85EEA7E +gText_MixingRecords:: @ 85EEA7E .string "Mixing records…$" -gUnknown_085EEA8E:: @ 85EEA8E +gText_RecordMixingComplete:: @ 85EEA8E .string "Record mixing completed.\nThank you for waiting.$" + .string "YOUR NAME?$" .string "BOX NAME?$" .string "{STR_VAR_1}’s nickname?$" .string "Tell him the words.$" -gUnknown_085EEAF6:: @ 85EEAF6 +gText_MoveOkBack:: @ 85EEAF6 .string "{UNK_CTRL_F80C}MOVE {UNK_CTRL_F800}OK {UNK_CTRL_F801}BACK$" -gUnknown_085EEB0B:: @ 85EEB0B +gText_CallCantBeMadeHere:: @ 85EEB0B .string "A call can’t be made from here.$" + .string "HANDSOME$" .string "VINNY$" .string "MOREME$" @@ -2978,8 +3040,9 @@ gUnknown_085EEB0B:: @ 85EEB0B .string "smartness$" .string "toughness$" -gUnknown_085EEB7E:: @ 85EEB7E +gText_Lady2:: @ 85EEB7E .string "Lady$" + .string "slippery$" .string "roundish$" .string "wham-ish$" @@ -2987,473 +3050,480 @@ gUnknown_085EEB7E:: @ 85EEB7E .string "sticky$" .string "pointy$" -gUnknown_085EEBB2:: @ 85EEBB2 +gText_RentalPkmn2:: @ 85EEBB2 .string "RENTAL POKéMON$" -gUnknown_085EEBC1:: @ 85EEBC1 +gText_SelectFirstPkmn:: @ 85EEBC1 .string "Select the first POKéMON.$" -gUnknown_085EEBDB:: @ 85EEBDB +gText_SelectSecondPkmn:: @ 85EEBDB .string "Select the second POKéMON.$" -gUnknown_085EEBF6:: @ 85EEBF6 +gText_SelectThirdPkmn:: @ 85EEBF6 .string "Select the third POKéMON.$" -gUnknown_085EEC10:: @ 85EEC10 +gText_Rent:: @ 85EEC10 .string "RENT$" -gUnknown_085EEC15:: @ 85EEC15 +gText_Summary:: @ 85EEC15 .string "SUMMARY$" -gUnknown_085EEC1D:: @ 85EEC1D +gText_Others2:: @ 85EEC1D .string "OTHERS$" -gUnknown_085EEC24:: @ 85EEC24 +gText_Deselect:: @ 85EEC24 .string "DESELECT$" -gUnknown_085EEC2D:: @ 85EEC2D +gText_TheseThreePkmnOkay:: @ 85EEC2D .string "Are these three POKéMON OK?$" -gUnknown_085EEC49:: @ 85EEC49 +gText_Yes2:: @ 85EEC49 .string "YES$" -gUnknown_085EEC4D:: @ 85EEC4D +gText_No2:: @ 85EEC4D .string "NO$" -gUnknown_085EEC50:: @ 85EEC50 +gText_CantSelectSamePkmn:: @ 85EEC50 .string "Can’t select same {PKMN}.$" -gUnknown_085EEC66:: @ 85EEC66 +gText_PkmnSwap:: @ 85EEC66 .string "POKéMON SWAP$" -gUnknown_085EEC73:: @ 85EEC73 +gText_SelectPkmnToSwap:: @ 85EEC73 .string "Select POKéMON to swap.$" -gUnknown_085EEC8B:: @ 85EEC8B +gText_SelectPkmnToAccept:: @ 85EEC8B .string "Select POKéMON to accept.$" -gUnknown_085EECA5:: @ 85EECA5 +gText_Swap:: @ 85EECA5 .string "SWAP$" -gUnknown_085EECAA:: @ 85EECAA +gText_Summary2:: @ 85EECAA .string "SUMMARY$" -gUnknown_085EECB2:: @ 85EECB2 +gText_Rechoose:: @ 85EECB2 .string "RECHOOSE$" -gUnknown_085EECBB:: @ 85EECBB +gText_QuitSwapping:: @ 85EECBB .string "Quit swapping?$" -gUnknown_085EECCA:: @ 85EECCA +gText_Yes3:: @ 85EECCA .string "YES$" -gUnknown_085EECCE:: @ 85EECCE +gText_No3:: @ 85EECCE .string "NO$" -gUnknown_085EECD1:: @ 85EECD1 +gText_PkmnForSwap:: @ 85EECD1 .string "{PKMN} FOR SWAP$" -gUnknown_085EECDD:: @ 85EECDD +gText_Cancel3:: @ 85EECDD .string "CANCEL$" + .string "SWAP$" .string "ACCEPT$" -gUnknown_085EECF0:: @ 85EECF0 +gText_AcceptThisPkmn:: @ 85EECF0 .string "Accept this POKéMON?$" + .string " $" -gUnknown_085EED0A:: @ 85EED0A +gText_SamePkmnInPartyAlready:: @ 85EED0A .string "Same {PKMN} in party already.$" -gOtherText_DecimalPoint:: @ 85EED24 +gText_DecimalPoint:: @ 85EED24 .string ".$" -gUnknown_085EED26:: @ 85EED26 +gText_SavingPlayer:: @ 85EED26 .string "PLAYER$" -gUnknown_085EED2D:: @ 85EED2D +gText_SavingBadges:: @ 85EED2D .string "BADGES$" -gUnknown_085EED34:: @ 85EED34 +gText_SavingPokedex:: @ 85EED34 .string "POKéDEX$" -gUnknown_085EED3C:: @ 85EED3C +gText_SavingTime:: @ 85EED3C .string "TIME$" -gUnknown_085EED41:: @ 85EED41 +gText_WirelessCommStatus:: @ 85EED41 .string "Wireless Communication Status$" -gUnknown_085EED5F:: @ 85EED5F +gText_PeopleTrading:: @ 85EED5F .string "People trading:$" -gUnknown_085EED6F:: @ 85EED6F +gText_PeopleBattling:: @ 85EED6F .string "People battling:$" -gUnknown_085EED80:: @ 85EED80 +gText_PeopleInUnionRoom:: @ 85EED80 .string "People in the UNION ROOM:$" -gUnknown_085EED9A:: @ 85EED9A +gText_PeopleCommunicating:: @ 85EED9A .string "People communicating:$" -gUnknown_085EEDB0:: @ 85EEDB0 +gText_F700Players:: @ 85EEDB0 .string "{SPECIAL_F7 0} players$" -gUnknown_085EEDBB:: @ 85EEDBB +gText_F701Players:: @ 85EEDBB .string "{SPECIAL_F7 1} players$" -gUnknown_085EEDC6:: @ 85EEDC6 +gText_F702Players:: @ 85EEDC6 .string "{SPECIAL_F7 2} players$" -gUnknown_085EEDD1:: @ 85EEDD1 +gText_F703Players:: @ 85EEDD1 .string "{SPECIAL_F7 3} players$" .align 2 - .4byte gUnknown_085EEDB0 - .4byte gUnknown_085EEDBB - .4byte gUnknown_085EEDC6 - .4byte gUnknown_085EEDD1 + .4byte gText_F700Players + .4byte gText_F701Players + .4byte gText_F702Players + .4byte gText_F703Players .align 2 -gUnknown_085EEDEC:: @ 85EEDEC +gText_WonderCards:: @ 85EEDEC .string "WONDER CARDS$" .align 2 -gUnknown_085EEDFC:: @ 85EEDFC +gText_WonderNews:: @ 85EEDFC .string "WONDER NEWS$" .align 2 -gUnknown_085EEE08:: @ 85EEE08 +gText_WirelessCommunication:: @ 85EEE08 .string "WIRELESS COMMUNICATION$" .align 2 -gUnknown_085EEE20:: @ 85EEE20 +gText_Friend2:: @ 85EEE20 .string "FRIEND$" .align 2 -gUnknown_085EEE28:: @ 85EEE28 +gText_Exit3:: @ 85EEE28 .string "EXIT$" .align 2 -gUnknown_085EEE30:: @ 85EEE30 +gText_Receive:: @ 85EEE30 .string "RECEIVE$" .align 2 -gUnknown_085EEE38:: @ 85EEE38 +gText_Send:: @ 85EEE38 .string "SEND$" .align 2 -gUnknown_085EEE40:: @ 85EEE40 +gText_Toss:: @ 85EEE40 .string "TOSS$" .align 2 -gUnknown_085EEE48:: @ 85EEE48 +gText_VarietyOfEventsImportedWireless:: @ 85EEE48 .string "A variety of events will be imported\nover Wireless Communication.$" .align 2 -gUnknown_085EEE8C:: @ 85EEE40 +gText_WonderCardsInPossession:: @ 85EEE40 .string "Read the WONDER CARDS in your\npossession.$" .align 2 -gUnknown_085EEEB8:: @ 85EEEB8 +gText_ReadNewsThatArrived:: @ 85EEEB8 .string "Read the NEWS that arrived.$" .align 2 -gUnknown_085EEED4:: @ 85EEED4 +gText_ReturnToTitle:: @ 85EEED4 .string "Return to the title screen.$" .align 2 -gUnknown_085EEEF0:: @ 85EEEF0 +gText_DontHaveCardNewOneInput:: @ 85EEEF0 .string "You don’t have a WONDER CARD,\nso a new CARD will be input.$" .align 2 -gUnknown_085EEF2C:: @ 85EEF2C +gText_DontHaveNewsNewOneInput:: @ 85EEF2C .string "You don’t have any WONDER NEWS,\nso new NEWS will be input.$" .align 2 -gUnknown_085EEF68:: @ 85EEF68 +gText_WhereShouldCardBeAccessed:: @ 85EEF68 .string "Where should the WONDER CARD\nbe accessed?$" .align 2 -gUnknown_085EEF94:: @ 85EEF94 +gText_WhereShouldNewsBeAccessed:: @ 85EEF94 .string "Where should the WONDER NEWS\nbe accessed?$" .align 2 .string "Communication standby…\nB Button: Cancel$" .align 2 -gUnknown_085EEFE8:: @ 85EEFE8 +gText_Communicating:: @ 85EEFE8 .string "Communicating…$" .align 2 -gUnknown_085EEFF8:: @ 85EEFF8 +gText_CommunicationCompleted:: @ 85EEFF8 .string "Communication completed.$" .align 2 -gUnknown_085EF014:: @ 85EF014 +gText_CommunicationError:: @ 85EF014 .string "Communication error.$" .align 2 -gUnknown_085EF02C:: @ 85EF02C +gText_CommunicationCanceled:: @ 85EF02C .string "Communication has been canceled.$" .align 2 -gUnknown_085EF050:: @ 85EF050 +gText_ThrowAwayWonderCard:: @ 85EF050 .string "Throw away the WONDER CARD\nand input a new CARD?$" .align 2 -gUnknown_085EF084:: @ 85EF084 +gText_HaventReceivedCardsGift:: @ 85EF084 .string "You haven’t received the CARD’s gift\nyet. Input a new CARD anyway?$" .align 2 -gUnknown_085EF0C8:: @ 85EF0C8 +gText_WonderCardReceivedFrom:: @ 85EF0C8 .string "A WONDER CARD has been received\nfrom {STR_VAR_1}.$" .align 2 -gUnknown_085EF0F4:: @ 85EF0F4 +gText_WonderNewsReceivedFrom:: @ 85EF0F4 .string "A WONDER NEWS item has been\nreceived from {STR_VAR_1}.$" .align 2 -gUnknown_085EF124:: @ 85EF124 +gText_WonderCardReceived:: @ 85EF124 .string "A new WONDER CARD has been\nreceived.$" .align 2 -gUnknown_085EF14C:: @ 85EF14C +gText_WonderNewsReceived:: @ 85EF14C .string "A new WONDER NEWS item has been\nreceived.$" .align 2 -gUnknown_085EF178:: @ 85EF178 +gText_NewStampReceived:: @ 85EF178 .string "A new STAMP has been received.$" .align 2 -gUnknown_085EF198:: @ 85EF198 +gText_NewTrainerReceived:: @ 85EF198 .string "A new TRAINER has arrived.$" .align 2 -gUnknown_085EF1B4:: @ 85EF1B4 +gText_AlreadyHadCard:: @ 85EF1B4 .string "You already had that\nWONDER CARD.$" .align 2 -gUnknown_085EF1D8:: @ 85EF1D8 +gText_AlreadyHadNews:: @ 85EF1D8 .string "You already had that\nWONDER NEWS item.$" .align 2 -gUnknown_085EF200:: @ 85EF200 +gText_AlreadyHadStamp:: @ 85EF200 .string "You already had that\nSTAMP.$" .align 2 -gUnknown_085EF21C:: @ 85EF21C +gText_NoMoreRoomForStamps:: @ 85EF21C .string "There’s no more room for adding\nSTAMPS.$" .align 2 -gUnknown_085EF244:: @ 85EF244 +gText_RecordUploadedViaWireless:: @ 85EF244 .string "Your record has been uploaded via\nWIRELESS COMMUNICATION.$" .align 2 -gUnknown_085EF280:: @ 85EF280 +gText_CantAcceptCardFromTrainer:: @ 85EF280 .string "You can’t accept a WONDER CARD\nfrom this TRAINER.$" .align 2 -gUnknown_085EF2B4:: @ 85EF2B4 +gText_CantAcceptNewsFromTrainer:: @ 85EF2B4 .string "You can’t accept WONDER NEWS\nfrom this TRAINER.$" .align 2 -gUnknown_085EF2E4:: @ 85EF2E4 +gText_NothingSentOver:: @ 85EF2E4 .string "Nothing was sent over…$" .align 2 -gUnknown_085EF2FC:: @ 85EF2FC +gText_WhatToDoWithCards:: @ 85EF2FC .string "What would you like to do\nwith the WONDER CARDS?$" .align 2 -gUnknown_085EF330:: @ 85EF330 +gText_WhatToDoWithNews:: @ 85EF330 .string "What would you like to do\nwith the WONDER NEWS?$" .align 2 -gUnknown_085EF360:: @ 85EF360 +gText_SendingWonderCard:: @ 85EF360 .string "Sending your WONDER CARD…$" .align 2 -gUnknown_085EF37C:: @ 85EF37C +gText_SendingWonderNews:: @ 85EF37C .string "Sending your WONDER NEWS item…$" .align 2 -gUnknown_085EF39C:: @ 85EF39C +gText_WonderCardSentTo:: @ 85EF39C .string "Your WONDER CARD has been sent\nto {STR_VAR_1}.$" .align 2 -gUnknown_085EF3C4:: @ 85EF3C4 +gText_WonderNewsSentTo:: @ 85EF3C4 .string "Your WONDER NEWS item has been\nsent to {STR_VAR_1}.$" .align 2 -gUnknown_085EF3F0:: @ 85EF3F0 +gText_StampSentTo:: @ 85EF3F0 .string "A STAMP has been sent to {STR_VAR_1}.$" .align 2 -gUnknown_085EF410:: @ 85EF410 +gText_GiftSentTo:: @ 85EF410 .string "A GIFT has been sent to {STR_VAR_1}.$" .align 2 -gUnknown_085EF42C:: @ 85EF42C +gText_OtherTrainerHasCard:: @ 85EF42C .string "The other TRAINER has the same\nWONDER CARD already.$" .align 2 -gUnknown_085EF460:: @ 85EF460 +gText_OtherTrainerHasNews:: @ 85EF460 .string "The other TRAINER has the same\nWONDER NEWS already.$" .align 2 -gUnknown_085EF494:: @ 85EF494 +gText_OtherTrainerHasStamp:: @ 85EF494 .string "The other TRAINER has the same\nSTAMP already.$" .align 2 -gUnknown_085EF4C4:: @ 85EF4C4 +gText_OtherTrainerCanceled:: @ 85EF4C4 .string "The other TRAINER canceled\ncommunication.$" .align 2 -gUnknown_085EF4F0:: @ 85EF4F0 +gText_CantSendGiftToTrainer:: @ 85EF4F0 .string "You can’t send a MYSTERY GIFT to\nthis TRAINER.$" .align 2 -gUnknown_085EF520:: @ 85EF520 +gText_IfThrowAwayCardEventWontHappen:: @ 85EF520 .string "If you throw away the CARD,\nits event won’t happen. Okay?$" .align 2 -gUnknown_085EF55C:: @ 85EF55C +gText_OkayToDiscardNews:: @ 85EF55C .string "Is it okay to discard this\nNEWS item?$" .align 2 -gUnknown_085EF584:: @ 85EF584 +gText_HaventReceivedGiftOkayToDiscard:: @ 85EF584 .string "You haven’t received the\nGIFT. Is it okay to discard?$" .align 2 -gUnknown_085EF5BC:: @ 85EF5BC +gText_DataWillBeSaved:: @ 85EF5BC .string "Data will be saved.\nPlease wait.$" .align 2 -gUnknown_085EF5E0:: @ 85EF5E0 +gText_SaveCompletedPressA:: @ 85EF5E0 .string "Save completed.\nPlease press the A Button.$" .align 2 -gUnknown_085EF60C:: @ 85EF60C +gText_WonderCardThrownAway:: @ 85EF60C .string "The WONDER CARD was thrown away.$" .align 2 -gUnknown_085EF630:: @ 85EF630 +gText_WonderNewsThrownAway:: @ 85EF630 .string "The WONDER NEWS was thrown away.$" .align 2 -gUnknown_085EF654:: @ 85EF654 +gText_MysteryGift:: @ 85EF654 .string "MYSTERY GIFT$" .align 2 -gUnknown_085EF664:: @ 85EF664 +gText_PickOKExit:: @ 85EF664 .string "{UNK_CTRL_F80A}PICK {UNK_CTRL_F800}OK {UNK_CTRL_F801}EXIT$" .align 2 -gUnknown_085EF678:: @ 85EF678 +gText_PickOKCancel:: @ 85EF678 .string "{UNK_CTRL_F80A}PICK {UNK_CTRL_F800}OK {UNK_CTRL_F801}CANCEL$" -gUnknown_085EF68D:: @ 85EF68D +gText_PlayersBattleResults:: @ 85EF68D .string "{PLAYER}’s BATTLE RESULTS$" -gUnknown_085EF6A1:: @ 85EF6A1 +gText_TotalRecordWLD:: @ 85EF6A1 .string "TOTAL RECORD W:{STR_VAR_1} L:{STR_VAR_2} D:{STR_VAR_3}$" -gUnknown_085EF6BD:: @ 85EF6BD +gText_WinLoseDraw:: @ 85EF6BD .string "{CLEAR_TO 0x53}WIN{CLEAR_TO 0x80}LOSE{CLEAR_TO 0xB0}DRAW$" -gUnknown_085EF6D2:: @ 85EF6D2 +gText_CommunicationStandby5:: @ 85EF6D2 .string "Communication standby…$" -gUnknown_085EF6E9:: @ 85EF6E9 +gText_QuitTheGame:: @ 85EF6E9 .string "Quit the game?$" -gUnknown_085EF6F8:: @ 85EF6F8 +gText_YouveGot9999Coins:: @ 85EF6F8 .string "You’ve got 9,999 COINS.$" -gUnknown_085EF710:: @ 85EF710 +gText_YouveRunOutOfCoins:: @ 85EF710 .string "You’ve run out of COINS.\nGame over!$" -gUnknown_085EF734:: @ 85EF734 +gText_YouDontHaveThreeCoins:: @ 85EF734 .string "You don’t have three COINS.$" -gUnknown_085EF750:: @ 85EF750 +gText_ReelTimeHelp:: @ 85EF750 .string "REEL TIME\nHere’s your chance to take\naim and nail marks!\nReel Time continues for the\nawarded number of spins.\nIt all ends on a Big Bonus.$" + .string "The two seem to get along\nvery well.$" .string "The two seem to get along.$" .string "The two don’t seem to like\neach other much.$" .string "The two prefer to play with other\nPOKéMON than each other.$" -gUnknown_085EF881:: @ 85EF881 +gText_NewLine2:: @ 85EF881 .string "\n$" -gUnknown_085EF883:: @ 85EF883 +gText_Exit4:: @ 85EF883 .string "EXIT$" -gUnknown_085EF888:: @ 85EF888 +gText_Lv:: @ 85EF888 .string "{LV}$" -gUnknown_085EF88A:: @ 85EF88A +gText_TimeBoard:: @ 85EF88A .string "TIME BOARD$" -gUnknown_085EF895:: @ 85EF895 +gText_TimeCleared:: @ 85EF895 .string "TIME CLEARED $" -gUnknown_085EF8A3:: @ 85EF8A3 +gText_XMinYDotZSec:: @ 85EF8A3 .string "{STR_VAR_1} min. {STR_VAR_2}.{STR_VAR_3} sec.$" + .string "1F$" .string "2F$" .string "3F$" .string "4F$" -gUnknown_085EF8C2:: @ 85EF8C2 +gText_TeachWhichMoveToPkmn:: @ 85EF8C2 .string "Teach which move to {STR_VAR_1}?$" -gUnknown_085EF8DA:: @ 85EF8DA +gText_TeachX:: @ 85EF8DA .string "Teach {STR_VAR_2}?$" -gUnknown_085EF8E4:: @ 85EF8E4 +gText_PkmnLearnedMove4:: @ 85EF8E4 .string "{STR_VAR_1} learned\n{STR_VAR_2}!$" -gUnknown_085EF8F3:: @ 85EF8F3 +gText_PkmnTryingToLearnMove:: @ 85EF8F3 .string "{STR_VAR_1} is trying to learn\n{STR_VAR_2}.\pBut {STR_VAR_1} can’t learn more\nthan four moves.\pDelete an older move to make\nroom for {STR_VAR_2}?$" -gUnknown_085EF960:: @ 85EF960 +gText_StopTryingToTeachMove:: @ 85EF960 .string "Stop trying to teach\n{STR_VAR_2}?$" -gUnknown_085EF979:: @ 85EF979 +gText_12AndPoof:: @ 85EF979 .string "{PAUSE 32}1, {PAUSE 15}2, and {PAUSE 15}… {PAUSE 15}… {PAUSE 15}… {PAUSE 15}{PLAY_SE 0x0038}Poof!\p$" -gUnknown_085EF9A6:: @ 85EF9A6 +gText_PkmnForgotMoveAndLearnedNew:: @ 85EF9A6 .string "{STR_VAR_1} forgot {STR_VAR_3}.\pAnd…\p{STR_VAR_1} learned {STR_VAR_2}.$" + .string "{STR_VAR_1} did not learn the\nmove {STR_VAR_2}.$" -gUnknown_085EF9E6:: @ 85EF9E6 +gText_GiveUpTeachingNewMove:: @ 85EF9E6 .string "Give up trying to teach a new\nmove to {STR_VAR_1}?$" -gUnknown_085EFA10:: @ 85EFA10 +gText_WhichMoveToForget2:: @ 85EFA10 .string "Which move should be\nforgotten?\p$" -gUnknown_085EFA31:: @ 85EFA31 +gText_BattleMoves2:: @ 85EFA31 .string "BATTLE MOVES$" -gUnknown_085EFA3E:: @ 85EFA3E +gText_ContestMoves2:: @ 85EFA3E .string "CONTEST MOVES$" + .string "TYPE/$" -gUnknown_085EFA52:: @ 85EFA52 +gText_PPSlash:: @ 85EFA52 .string "PP/$" -gUnknown_085EFA56:: @ 85EFA56 +gText_PowerSlash:: @ 85EFA56 .string "POWER/$" -gUnknown_085EFA5D:: @ 85EFA5D +gText_AccuracySlash:: @ 85EFA5D .string "ACCURACY/$" -gUnknown_085EFA67:: @ 85EFA67 +gText_Appeal2:: @ 85EFA67 .string "APPEAL$" -gUnknown_085EFA6E:: @ 85EFA6E +gText_Jam2:: @ 85EFA6E .string "JAM$" + .string "KIRA$" .string "AMY$" .string "JOHN$" @@ -3461,20 +3531,21 @@ gUnknown_085EFA6E:: @ 85EFA6E .string "GABBY$" .string "ANNA$" -gUnknown_085EFA8F:: @ 85EFA8F +gText_ClearAllSaveData:: @ 85EFA8F .string "Clear all save data areas?$" -gUnknown_085EFAAA:: @ 85EFAAA +gText_ClearingData:: @ 85EFAAA .string "Clearing data…\nPlease wait.$" -gUnknown_085EFAC6:: @ 85EFAC6 +gText_IsThisTheCorrectTime:: @ 85EFAC6 .string "Is this the correct time?$" -gUnknown_085EFAE0:: @ 85EFAE0 +gText_Confirm3:: @ 85EFAE0 .string "CONFIRM$" -gUnknown_085EFAE8:: @ 85EFAE8 +gText_Cancel4:: @ 85EFAE8 .string "CANCEL$" + .string "DEVON PRES$" .string "MR. STONE$" .string "HARD AS ROCK$" @@ -3498,14 +3569,15 @@ gUnknown_085EFAE8:: @ 85EFAE8 .string "CHAMPION$" .string "{PKMN} PROF.$" -gUnknown_085EFBD2:: @ 85EFBD2 +gText_CommStandbyAwaitingOtherPlayer:: @ 85EFBD2 .string "Communication standby…\nAwaiting another player to choose.$" -gUnknown_085EFC0C:: @ 85EFC0C +gText_BattleWasRefused:: @ 85EFC0C .string "The battle was refused.{PAUSE 60}$" -gUnknown_085EFC27:: @ 85EFC27 +gText_RefusedBattle:: @ 85EFC27 .string "Refused the battle.{PAUSE 60}$" + .string "NO WEATHER$" .string "SUNNY$" .string "SUNNY2$" @@ -3527,12 +3599,12 @@ gUnknown_085EFC27:: @ 85EFC27 .string "QUIZ$" .string "ANSWER$" -gOtherText_PokeBalls:: @ 85EFCD4 +gText_PokeBalls:: @ 85EFCD4 .string "POKé BALLS$" -gOtherText_Berry:: @ 85EFCDF +gText_Berry:: @ 85EFCDF .string "BERRY$" -gOtherText_Berries:: @ 85EFCE5 +gText_Berries:: @ 85EFCE5 .string "BERRIES$" diff --git a/src/item.c b/src/item.c index c85e2fe1f..0114676b6 100644 --- a/src/item.c +++ b/src/item.c @@ -8,9 +8,9 @@ extern void ApplyNewEncyprtionKeyToHword(u16* hword, u32 newKey); extern bool8 InBattlePyramid(void); -extern const u8 gOtherText_PokeBalls[]; -extern const u8 gOtherText_Berries[]; -extern const u8 gOtherText_Berry[]; +extern const u8 gText_PokeBalls[]; +extern const u8 gText_Berries[]; +extern const u8 gText_Berry[]; extern const u8 gUnknown_085897E4[][28]; // not sure what this one is bool8 CheckPyramidBagHasItem(u16 itemId, u16 count); @@ -92,7 +92,7 @@ void CopyItemNameHandlePlural(u16 itemId, u8 *string, u32 quantity) if (quantity < 2) StringCopy(string, ItemId_GetItem(ITEM_POKE_BALL)->name); else - StringCopy(string, gOtherText_PokeBalls); + StringCopy(string, gText_PokeBalls); } else { @@ -109,9 +109,9 @@ void GetBerryCountString(u8* dst, const u8* berryName, u32 quantity) u8* txtPtr; if (quantity < 2) - berryString = gOtherText_Berry; + berryString = gText_Berry; else - berryString = gOtherText_Berries; + berryString = gText_Berries; txtPtr = StringCopy(dst, berryName); *txtPtr = CHAR_SPACE; StringCopy(txtPtr + 1, berryString); diff --git a/src/pokemon_size_record.c b/src/pokemon_size_record.c index 804dbda74..12d98bfd8 100644 --- a/src/pokemon_size_record.c +++ b/src/pokemon_size_record.c @@ -45,8 +45,8 @@ static const u8 sGiftRibbonsMonDataIds[] = MON_DATA_GIFT_RIBBON_7 }; -extern const u8 gOtherText_DecimalPoint[]; -extern const u8 gOtherText_Marco[]; +extern const u8 gText_DecimalPoint[]; +extern const u8 gText_Marco[]; extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1]; #define CM_PER_INCH 2.54 @@ -103,7 +103,7 @@ static void FormatMonSizeRecord(u8 *string, u32 size) #endif string = ConvertIntToDecimalStringN(string, size / 10, 0, 8); - string = StringAppend(string, gOtherText_DecimalPoint); + string = StringAppend(string, gText_DecimalPoint); ConvertIntToDecimalStringN(string, size % 10, 0, 1); } @@ -152,7 +152,7 @@ static void GetMonSizeRecordInfo(u16 species, u16 *sizeRecord) FormatMonSizeRecord(gStringVar3, size); StringCopy(gStringVar1, gSpeciesNames[species]); if (*sizeRecord == DEFAULT_MAX_SIZE) - StringCopy(gStringVar2, gOtherText_Marco); + StringCopy(gStringVar2, gText_Marco); else StringCopy(gStringVar2, gSaveBlock2Ptr->playerName); } diff --git a/src/start_menu.c b/src/start_menu.c index ffcab5220..ac393ce2e 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -151,7 +151,7 @@ static void BuildStartMenuActions_MultiBattleRoom(void) extern const struct WindowTemplate gSafariBallsWindowTemplate; extern const struct WindowTemplate gPyramidFloorWindowTemplate_1; extern const struct WindowTemplate gPyramidFloorWindowTemplate_2; -extern const u8 gOtherText_SafariStock[]; +extern const u8 gText_SafariBallStock[]; void DisplaySafariBallsWindow(void) { @@ -159,13 +159,13 @@ void DisplaySafariBallsWindow(void) PutWindowTilemap(sSafariBallsWindowId); sub_81973FC(sSafariBallsWindowId, 0); ConvertIntToDecimalStringN(gStringVar1, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2); - StringExpandPlaceholders(gStringVar4, gOtherText_SafariStock); + StringExpandPlaceholders(gStringVar4, gText_SafariBallStock); PrintTextOnWindow(sSafariBallsWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL); CopyWindowToVram(sSafariBallsWindowId, 2); } extern const u8* const gUnknown_08510510[]; -extern const u8 gOtherText_BattlePyramid_X[]; +extern const u8 gText_BattlePyramidFloor[]; void DisplayPyramidFloorWindow(void) { @@ -177,7 +177,7 @@ void DisplayPyramidFloorWindow(void) PutWindowTilemap(sBattlePyramidFloorWindowId); sub_81973FC(sBattlePyramidFloorWindowId, 0); StringCopy(gStringVar1, gUnknown_08510510[*(u16*)(&gSaveBlock2Ptr->field_CAA[8])]); - StringExpandPlaceholders(gStringVar4, gOtherText_BattlePyramid_X); + StringExpandPlaceholders(gStringVar4, gText_BattlePyramidFloor); PrintTextOnWindow(sBattlePyramidFloorWindowId, 1, gStringVar4, 0, 1, 0xFF, NULL); CopyWindowToVram(sBattlePyramidFloorWindowId, 2); } From bf4319f25e52be0d77038de9fda8cc3a83930902 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 20 Sep 2017 20:08:05 -0400 Subject: [PATCH 260/342] sub_818E6B0 --- asm/lilycove_lady.s | 66 --------------------------------------------- src/lilycove_lady.c | 23 ++++++++++++++++ 2 files changed, 23 insertions(+), 66 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 7a844c2fb..0610064f4 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,72 +5,6 @@ .text - thumb_func_start sub_818E674 -sub_818E674: @ 818E674 - push {lr} - ldr r2, =gUnknown_0203CD6C - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003b58 - adds r0, r1 - str r0, [r2] - movs r3, 0 - movs r1, 0x2 - strb r1, [r0] - ldr r0, [r2] - strb r3, [r0, 0x1] - ldr r2, [r2] - ldrb r0, [r2, 0x2] - cmp r0, 0x5 - beq _0818E69A - ldrb r0, [r2, 0x3] - cmp r0, 0x5 - bne _0818E69E -_0818E69A: - bl sub_818E604 -_0818E69E: - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E674 - - thumb_func_start sub_818E6B0 -sub_818E6B0: @ 818E6B0 - push {r4,lr} - lsls r0, 24 - lsrs r2, r0, 24 - ldr r4, =gUnknown_0203CD6C - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r3, =0x00003b58 - adds r1, r0, r3 - str r1, [r4] - ldrb r0, [r1, 0xC] - cmp r0, r2 - bhi _0818E6EA - strb r2, [r1, 0xC] - ldr r0, [r4] - adds r0, 0x4 - movs r1, 0xFF - movs r2, 0x8 - bl memset - ldr r1, [r4] - ldr r0, =gSaveBlock2Ptr - adds r1, 0x4 - ldr r0, [r0] - ldm r0!, {r2,r3} - stm r1!, {r2,r3} - ldr r1, [r4] - ldr r0, =gGameLanguage - ldrb r0, [r0] - strb r0, [r1, 0xE] -_0818E6EA: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E6B0 - thumb_func_start sub_818E704 sub_818E704: @ 818E704 push {r4,r5,lr} diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index f6471828b..52f910598 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -733,3 +733,26 @@ void SetLilycoveContestLady(void) sub_818E604(); gUnknown_0203CD6C->language = gGameLanguage; } + +void sub_818E674(void) +{ + gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; + gUnknown_0203CD6C->id = LILYCOVE_LADY_CONTEST; + gUnknown_0203CD6C->phase = 0; + if (gUnknown_0203CD6C->fave_pkblk == 5 || gUnknown_0203CD6C->other_pkblk == 5) + { + sub_818E604(); + } +} + +void sub_818E6B0(u8 sheen) +{ + gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; + if (gUnknown_0203CD6C->max_sheen <= sheen) + { + gUnknown_0203CD6C->max_sheen = sheen; + memset(gUnknown_0203CD6C->playerName, EOS, sizeof(gUnknown_0203CD6C->playerName)); + memcpy(gUnknown_0203CD6C->playerName, gSaveBlock2Ptr->playerName, sizeof(gUnknown_0203CD6C->playerName)); + gUnknown_0203CD6C->language = gGameLanguage; + } +} \ No newline at end of file From 25ffdf734284db4bd418d6f2ff74a9d895cb4498 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 20 Sep 2017 20:16:11 -0400 Subject: [PATCH 261/342] sub_818E704 --- asm/lilycove_lady.s | 72 --------------------------------------------- src/lilycove_lady.c | 60 ++++++++++++++++++++++++++++++++++++- 2 files changed, 59 insertions(+), 73 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 0610064f4..f3eca44e7 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,78 +5,6 @@ .text - thumb_func_start sub_818E704 -sub_818E704: @ 818E704 - push {r4,r5,lr} - adds r2, r0, 0 - movs r3, 0 - movs r4, 0 - ldr r1, =gUnknown_0203CD6C - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r5, =0x00003b58 - adds r0, r5 - str r0, [r1] - ldrb r0, [r0, 0xD] - adds r5, r1, 0 - cmp r0, 0x4 - bhi _0818E76A - lsls r0, 2 - ldr r1, =_0818E73C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0818E73C: - .4byte _0818E750 - .4byte _0818E754 - .4byte _0818E758 - .4byte _0818E75C - .4byte _0818E760 -_0818E750: - ldrb r0, [r2, 0x1] - b _0818E762 -_0818E754: - ldrb r0, [r2, 0x2] - b _0818E762 -_0818E758: - ldrb r0, [r2, 0x3] - b _0818E762 -_0818E75C: - ldrb r0, [r2, 0x4] - b _0818E762 -_0818E760: - ldrb r0, [r2, 0x5] -_0818E762: - cmp r0, 0 - beq _0818E76A - adds r3, r0, 0 - movs r4, 0x1 -_0818E76A: - cmp r4, 0x1 - bne _0818E784 - adds r0, r3, 0 - bl sub_818E6B0 - ldr r0, =gUnknown_0203CD6C - ldr r1, [r0] - ldrb r0, [r1, 0x2] - adds r0, 0x1 - strb r0, [r1, 0x2] - b _0818E78C - .pool -_0818E784: - ldr r1, [r5] - ldrb r0, [r1, 0x3] - adds r0, 0x1 - strb r0, [r1, 0x3] -_0818E78C: - adds r0, r4, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_818E704 - thumb_func_start sub_818E794 sub_818E794: @ 818E794 push {r4,r5,lr} diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 52f910598..30b5d6b21 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -755,4 +755,62 @@ void sub_818E6B0(u8 sheen) memcpy(gUnknown_0203CD6C->playerName, gSaveBlock2Ptr->playerName, sizeof(gUnknown_0203CD6C->playerName)); gUnknown_0203CD6C->language = gGameLanguage; } -} \ No newline at end of file +} + +bool8 sub_818E704(struct Pokeblock *pokeblock) +{ + u8 sheen; + bool8 response; + + sheen = 0; + response = FALSE; + gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; + switch (gUnknown_0203CD6C->category) + { + case 0: + if (pokeblock->spicy != 0) + { + sheen = pokeblock->spicy; + response = TRUE; + } + break; + case 1: + if (pokeblock->dry != 0) + { + sheen = pokeblock->dry; + response = TRUE; + } + break; + case 2: + if (pokeblock->sweet != 0) + { + sheen = pokeblock->sweet; + response = TRUE; + } + break; + case 3: + if (pokeblock->bitter != 0) + { + sheen = pokeblock->bitter; + response = TRUE; + } + break; + case 4: + if (pokeblock->sour != 0) + { + sheen = pokeblock->sour; + response = TRUE; + } + break; + } + if (response == TRUE) + { + sub_818E6B0(sheen); + gUnknown_0203CD6C->fave_pkblk ++; + } + else + { + gUnknown_0203CD6C->other_pkblk ++; + } + return response; +} From c56b6fc9a46d92824b8eb6b61bc2dc1f525c0757 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 20 Sep 2017 20:24:22 -0400 Subject: [PATCH 262/342] sub_818E794 --- asm/lilycove_lady.s | 30 ------------------------------ src/lilycove_lady.c | 9 +++++++++ 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index f3eca44e7..a3f455065 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,36 +5,6 @@ .text - thumb_func_start sub_818E794 -sub_818E794: @ 818E794 - push {r4,r5,lr} - adds r5, r1, 0 - ldr r4, =gUnknown_0203CD6C - ldr r1, =gSaveBlock1Ptr - ldr r1, [r1] - ldr r2, =0x00003b58 - adds r1, r2 - str r1, [r4] - ldr r2, =gUnknown_0860B324 - ldrb r1, [r1, 0xD] - lsls r1, 2 - adds r1, r2 - ldr r1, [r1] - bl StringCopy - ldr r1, =gUnknown_0860B310 - ldr r0, [r4] - ldrb r0, [r0, 0xD] - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - adds r0, r5, 0 - bl StringCopy10 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E794 - thumb_func_start sub_818E7E0 sub_818E7E0: @ 818E7E0 push {r4,lr} diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 30b5d6b21..efbc791e8 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -35,6 +35,8 @@ extern const u16 *const gUnknown_0860B1A4[16]; extern const u16 gUnknown_0860B1E4[16]; extern const u16 gUnknown_0860B204[16]; extern const u8 gUnknown_085EEB7E[8]; +extern const u8 *const gUnknown_0860B324[5]; +extern const u8 *const gUnknown_0860B310[5]; EWRAM_DATA struct LilycoveLadyFavour *gUnknown_0203CD64 = NULL; EWRAM_DATA struct LilycoveLadyQuiz *gUnknown_0203CD68 = NULL; @@ -814,3 +816,10 @@ bool8 sub_818E704(struct Pokeblock *pokeblock) } return response; } + +void sub_818E794(u8 *dest1, u8 *dest2) +{ + gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; + StringCopy(dest1, gUnknown_0860B324[gUnknown_0203CD6C->category]); + StringCopy10(dest2, gUnknown_0860B310[gUnknown_0203CD6C->category]); +} From faf844f332e95d39660db3f76f78ed480d4845bf Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 20 Sep 2017 20:32:22 -0400 Subject: [PATCH 263/342] through sub_818E880 --- asm/lilycove_lady.s | 98 --------------------------------------------- src/lilycove_lady.c | 52 +++++++++++++++++++++--- 2 files changed, 47 insertions(+), 103 deletions(-) diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index a3f455065..835d2959c 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,104 +5,6 @@ .text - thumb_func_start sub_818E7E0 -sub_818E7E0: @ 818E7E0 - push {r4,lr} - adds r3, r1, 0 - ldr r2, =gUnknown_0203CD6C - ldr r1, =gSaveBlock1Ptr - ldr r1, [r1] - ldr r4, =0x00003b58 - adds r1, r4 - str r1, [r2] - ldrb r2, [r1, 0xD] - strb r2, [r0] - ldr r2, =gUnknown_0860B310 - ldrb r0, [r1, 0xD] - lsls r0, 2 - adds r0, r2 - ldr r1, [r0] - adds r0, r3, 0 - bl StringCopy - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E7E0 - - thumb_func_start sub_818E81C -sub_818E81C: @ 818E81C - push {r4,lr} - ldr r3, =gUnknown_0203CD6C - ldr r1, =gSaveBlock1Ptr - ldr r1, [r1] - ldr r4, =0x00003b58 - adds r2, r1, r4 - str r2, [r3] - ldr r2, =0x00003b5c - adds r1, r2 - bl StringCopy - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E81C - - thumb_func_start sub_818E848 -sub_818E848: @ 818E848 - ldr r2, =gUnknown_0203CD6C - ldr r1, =gSaveBlock1Ptr - ldr r1, [r1] - ldr r3, =0x00003b58 - adds r1, r3 - str r1, [r2] - ldrb r1, [r1, 0xE] - strb r1, [r0] - bx lr - .pool - thumb_func_end sub_818E848 - - thumb_func_start sub_818E868 -sub_818E868: @ 818E868 - push {lr} - lsls r1, 24 - ldr r2, =gUnknown_0860B338 - lsrs r1, 22 - adds r1, r2 - ldr r1, [r1] - bl StringCopy - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E868 - - thumb_func_start sub_818E880 -sub_818E880: @ 818E880 - push {lr} - ldr r1, =gUnknown_0203CD6C - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - ldrb r0, [r0, 0x2] - cmp r0, 0x4 - bls _0818E8A4 - movs r0, 0x1 - b _0818E8AE - .pool -_0818E8A4: - cmp r0, 0 - beq _0818E8AC - movs r0, 0 - b _0818E8AE -_0818E8AC: - movs r0, 0x2 -_0818E8AE: - pop {r1} - bx r1 - thumb_func_end sub_818E880 - thumb_func_start sub_818E8B4 sub_818E8B4: @ 818E8B4 push {lr} diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index efbc791e8..d142323c4 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -26,17 +26,18 @@ u8 sub_818E13C(void); bool8 sub_818E1F4(void); u8 sub_818E258(const u8 *); +extern const u8 gUnknown_085EEB7E[8]; extern const u16 gUnknown_0860B074[5]; extern const u16 gUnknown_0860B07E[3]; -extern const u8 *const gUnknown_0860B224[]; -extern const u16 *const gUnknown_0860B2EC[6]; -extern const u16 gUnknown_0860B304[6]; extern const u16 *const gUnknown_0860B1A4[16]; extern const u16 gUnknown_0860B1E4[16]; extern const u16 gUnknown_0860B204[16]; -extern const u8 gUnknown_085EEB7E[8]; -extern const u8 *const gUnknown_0860B324[5]; +extern const u8 *const gUnknown_0860B224[]; +extern const u16 *const gUnknown_0860B2EC[6]; +extern const u16 gUnknown_0860B304[6]; extern const u8 *const gUnknown_0860B310[5]; +extern const u8 *const gUnknown_0860B324[5]; +extern const u8 *const gUnknown_0860B338[5]; EWRAM_DATA struct LilycoveLadyFavour *gUnknown_0203CD64 = NULL; EWRAM_DATA struct LilycoveLadyQuiz *gUnknown_0203CD68 = NULL; @@ -823,3 +824,44 @@ void sub_818E794(u8 *dest1, u8 *dest2) StringCopy(dest1, gUnknown_0860B324[gUnknown_0203CD6C->category]); StringCopy10(dest2, gUnknown_0860B310[gUnknown_0203CD6C->category]); } + +void sub_818E7E0(u8 *dest1, u8 *dest2) +{ + gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; + *dest1 = gUnknown_0203CD6C->category; + StringCopy(dest2, gUnknown_0860B310[gUnknown_0203CD6C->category]); +} + +void sub_818E81C(u8 *dest) +{ + gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; + StringCopy(dest, gUnknown_0203CD6C->playerName); +} + +void sub_818E848(u8 *dest) +{ + gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; + *dest = gUnknown_0203CD6C->language; +} + +void sub_818E868(u8 *dest, u8 category) +{ + StringCopy(dest, gUnknown_0860B338[category]); +} + +u8 sub_818E880(void) +{ + gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; + if (gUnknown_0203CD6C->fave_pkblk >= 5) + { + return 1; + } + else if (gUnknown_0203CD6C->fave_pkblk == 0) + { + return 2; + } + else + { + return 0; + } +} From d263750f1903a89fc61b2496453ff1c5b4b9a58b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 20 Sep 2017 20:48:32 -0400 Subject: [PATCH 264/342] remaining lilycove lady functions --- asm/lilycove_lady.s | 116 -------------------------------------------- include/rom4.h | 1 + include/rom6.h | 6 +++ src/lilycove_lady.c | 54 +++++++++++++++++++++ 4 files changed, 61 insertions(+), 116 deletions(-) create mode 100644 include/rom6.h diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s index 835d2959c..1fb697d08 100644 --- a/asm/lilycove_lady.s +++ b/asm/lilycove_lady.s @@ -5,121 +5,5 @@ .text - thumb_func_start sub_818E8B4 -sub_818E8B4: @ 818E8B4 - push {lr} - ldr r1, =gUnknown_0203CD6C - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - ldrb r0, [r0, 0x1] - cmp r0, 0x1 - beq _0818E8D8 - movs r0, 0 - b _0818E8DA - .pool -_0818E8D8: - movs r0, 0x1 -_0818E8DA: - pop {r1} - bx r1 - thumb_func_end sub_818E8B4 - - thumb_func_start sub_818E8E0 -sub_818E8E0: @ 818E8E0 - push {r4,lr} - movs r3, 0 - ldr r1, =gUnknown_0203CD6C - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r4, =0x00003b58 - adds r2, r0, r4 - str r2, [r1] - ldrb r0, [r2, 0x2] - cmp r0, 0x4 - bhi _0818E8FC - ldrb r0, [r2, 0x3] - cmp r0, 0x4 - bls _0818E8FE -_0818E8FC: - movs r3, 0x1 -_0818E8FE: - adds r0, r3, 0 - pop {r4} - pop {r1} - bx r1 - .pool - thumb_func_end sub_818E8E0 - - thumb_func_start sub_818E914 -sub_818E914: @ 818E914 - push {lr} - ldr r0, =gStringVar2 - ldr r1, =gStringVar1 - bl sub_818E794 - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E914 - - thumb_func_start sub_818E92C -sub_818E92C: @ 818E92C - push {lr} - ldr r1, =c2_exit_to_overworld_2_switch - movs r0, 0x3 - bl sub_81357FC - pop {r0} - bx r0 - .pool - thumb_func_end sub_818E92C - - thumb_func_start sub_818E940 -sub_818E940: @ 818E940 - ldr r1, =gUnknown_0203CD6C - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - movs r1, 0x1 - strb r1, [r0, 0x1] - bx lr - .pool - thumb_func_end sub_818E940 - - thumb_func_start sub_818E960 -sub_818E960: @ 818E960 - ldr r1, =gUnknown_0203CD6C - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - ldr r2, =gSpecialVar_0x8005 - ldr r1, =gUnknown_0860B34C - ldrb r0, [r0, 0xD] - lsls r0, 1 - adds r0, r1 - ldrh r0, [r0] - strh r0, [r2] - bx lr - .pool - thumb_func_end sub_818E960 - - thumb_func_start sub_818E990 -sub_818E990: @ 818E990 - ldr r1, =gUnknown_0203CD6C - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003b58 - adds r0, r2 - str r0, [r1] - ldrb r0, [r0, 0xD] - bx lr - .pool - thumb_func_end sub_818E990 - .align 2, 0 @ Don't pad with nop. diff --git a/include/rom4.h b/include/rom4.h index a1c4281e9..e19d277a6 100644 --- a/include/rom4.h +++ b/include/rom4.h @@ -28,5 +28,6 @@ void strange_npc_table_clear(void); const struct MapHeader *get_mapheader_by_bank_and_number(u8, u8); void FieldObjectMoveDestCoords(struct MapObject *, u32, s16 *, s16 *); void sub_8086230(void); +void c2_exit_to_overworld_2_switch(void); #endif //GUARD_ROM4_H diff --git a/include/rom6.h b/include/rom6.h new file mode 100644 index 000000000..15070616d --- /dev/null +++ b/include/rom6.h @@ -0,0 +1,6 @@ +#ifndef GUARD_ROM6_H +#define GUARD_ROM6_H + +void sub_81357FC(u8, void(void)); + +#endif //GUARD_ROM6_H diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index d142323c4..41112e40b 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -4,6 +4,8 @@ #include "global.h" #include "main.h" +#include "rom4.h" +#include "rom6.h" #include "event_data.h" #include "script.h" #include "rng.h" @@ -38,6 +40,7 @@ extern const u16 gUnknown_0860B304[6]; extern const u8 *const gUnknown_0860B310[5]; extern const u8 *const gUnknown_0860B324[5]; extern const u8 *const gUnknown_0860B338[5]; +extern const u16 gUnknown_0860B34C[5]; EWRAM_DATA struct LilycoveLadyFavour *gUnknown_0203CD64 = NULL; EWRAM_DATA struct LilycoveLadyQuiz *gUnknown_0203CD68 = NULL; @@ -865,3 +868,54 @@ u8 sub_818E880(void) return 0; } } + +bool8 sub_818E8B4(void) +{ + gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; + if (gUnknown_0203CD6C->phase == 1) + { + return TRUE; + } + return FALSE; +} + +bool8 sub_818E8E0(void) +{ + bool8 response; + + response = FALSE; + gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; + if (gUnknown_0203CD6C->fave_pkblk >= 5 || gUnknown_0203CD6C->other_pkblk >= 5) + { + response = TRUE; + } + return response; +} + +void sub_818E914(void) +{ + sub_818E794(gStringVar2, gStringVar1); +} + +void sub_818E92C(void) +{ + sub_81357FC(3, c2_exit_to_overworld_2_switch); +} + +void sub_818E940(void) +{ + gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; + gUnknown_0203CD6C->phase = 1; +} + +void sub_818E960(void) +{ + gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; + gSpecialVar_0x8005 = gUnknown_0860B34C[gUnknown_0203CD6C->category]; +} + +u8 sub_818E990(void) +{ + gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; + return gUnknown_0203CD6C->category; +} From 942fbe87d42ed1208217deac3cfa4f21908d446a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 20 Sep 2017 21:03:57 -0400 Subject: [PATCH 265/342] Populate header, label as static whatever won't break things --- asm/lilycove_lady.s | 9 ------ include/easy_chat.h | 1 + include/lilycove_lady.h | 11 +++++++ src/lilycove_lady.c | 67 ++++++++++++++++++++--------------------- sym_ewram.txt | 9 +----- 5 files changed, 46 insertions(+), 51 deletions(-) delete mode 100644 asm/lilycove_lady.s diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s deleted file mode 100644 index 1fb697d08..000000000 --- a/asm/lilycove_lady.s +++ /dev/null @@ -1,9 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - -.align 2, 0 @ Don't pad with nop. diff --git a/include/easy_chat.h b/include/easy_chat.h index d7dc72410..fc44b6a8a 100644 --- a/include/easy_chat.h +++ b/include/easy_chat.h @@ -31,5 +31,6 @@ enum void InitEasyChatPhrases(void); void easy_chat_input_maybe(void); void CopyEasyChatWord(u8 *, u16); +bool32 sub_811F8D8(u16); #endif // GUARD_EASYCHAT_H diff --git a/include/lilycove_lady.h b/include/lilycove_lady.h index 81825d8ac..c7776131b 100644 --- a/include/lilycove_lady.h +++ b/include/lilycove_lady.h @@ -1,6 +1,17 @@ #ifndef GUARD_LILYCOVE_LADY_H #define GUARD_LILYCOVE_LADY_H +u8 GetLilycoveLadyId(void); void SetLilycoveLady(void); +void sub_818DA78(void); +void sub_818DEF4(void); +void sub_818E564(void); +void sub_818E570(const struct LilycoveLadyQuiz *quiz); +bool8 sub_818E704(struct Pokeblock *pokeblock); +void sub_818E7E0(u8 *dest1, u8 *dest2); +void sub_818E81C(u8 *dest); +void sub_818E848(u8 *dest); +void sub_818E868(u8 *dest, u8 category); +u8 sub_818E880(void); #endif //GUARD_LILYCOVE_LADY_H diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 41112e40b..4839571ae 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -17,16 +17,15 @@ #include "easy_chat.h" #include "lilycove_lady.h" -void SetLilycoveQuizLady(void); -void SetLilycoveFavourLady(void); -void SetLilycoveContestLady(void); -void sub_818E004(void); -void sub_818DBC4(void); -void sub_818E674(void); -bool32 sub_811F8D8(u16); -u8 sub_818E13C(void); -bool8 sub_818E1F4(void); -u8 sub_818E258(const u8 *); +static void SetLilycoveQuizLady(void); +static void SetLilycoveFavourLady(void); +static void SetLilycoveContestLady(void); +static void sub_818E004(void); +static void sub_818DBC4(void); +static void sub_818E674(void); +static u8 sub_818E13C(void); +static bool8 sub_818E1F4(void); +static u8 sub_818E258(const u8 *); extern const u8 gUnknown_085EEB7E[8]; extern const u16 gUnknown_0860B074[5]; @@ -42,9 +41,9 @@ extern const u8 *const gUnknown_0860B324[5]; extern const u8 *const gUnknown_0860B338[5]; extern const u16 gUnknown_0860B34C[5]; -EWRAM_DATA struct LilycoveLadyFavour *gUnknown_0203CD64 = NULL; -EWRAM_DATA struct LilycoveLadyQuiz *gUnknown_0203CD68 = NULL; -EWRAM_DATA struct LilycoveLadyContest *gUnknown_0203CD6C = NULL; +static EWRAM_DATA struct LilycoveLadyFavour *gUnknown_0203CD64 = NULL; +static EWRAM_DATA struct LilycoveLadyQuiz *gUnknown_0203CD68 = NULL; +static EWRAM_DATA struct LilycoveLadyContest *gUnknown_0203CD6C = NULL; extern EWRAM_DATA u16 gScriptItemId; @@ -131,7 +130,7 @@ void sub_818DAEC(void) gScriptResult = GetLilycoveLadyId(); } -u8 sub_818DB04(const u16 *data) +static u8 sub_818DB04(const u16 *data) { u8 len; @@ -139,7 +138,7 @@ u8 sub_818DB04(const u16 *data) return len; } -void sub_818DB20(void) +static void sub_818DB20(void) { u8 size; u8 idx; @@ -150,7 +149,7 @@ void sub_818DB20(void) gUnknown_0203CD64->unk_010 = gUnknown_0860B2EC[gUnknown_0203CD64->unk_00c][idx]; } -void SetLilycoveFavourLady(void) +static void SetLilycoveFavourLady(void) { gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; gUnknown_0203CD64->id = LILYCOVE_LADY_FAVOUR; @@ -163,7 +162,7 @@ void SetLilycoveFavourLady(void) sub_818DB20(); } -void sub_818DBC4(void) +static void sub_818DBC4(void) { gUnknown_0203CD64 = &gSaveBlock1Ptr->lilycoveLady.favour; gUnknown_0203CD64->id = LILYCOVE_LADY_FAVOUR; @@ -187,7 +186,7 @@ u8 sub_818DBE8(void) } } -const u8 *sub_818DC1C(u8 idx) +static const u8 *sub_818DC1C(u8 idx) { return gUnknown_0860B224[idx]; } @@ -210,7 +209,7 @@ bool8 sub_818DC60(void) return FALSE; } -void sub_818DCAC(u8 *dest, u16 itemId) +static void sub_818DCAC(u8 *dest, u16 itemId) { StringCopy(dest, ItemId_GetItem(itemId)->name); } @@ -221,7 +220,7 @@ void sub_818DCC8(void) sub_818DCAC(gStringVar2, gUnknown_0203CD64->itemId); } -void sub_818DCF4(const u8 *src, u8 *dest) +static void sub_818DCF4(const u8 *src, u8 *dest) { memset(dest, 0xFF, 8); StringCopy7(dest, src); @@ -245,7 +244,7 @@ void sub_818DD78(void) sub_81AAC50(); } -bool8 sub_818DD84(u16 itemId) +static bool8 sub_818DD84(u16 itemId) { u8 len; u8 i; @@ -291,7 +290,7 @@ bool8 sub_818DE5C(void) return checkval < 5 ? FALSE : TRUE; } -void sub_818DE88(u16 itemId) +static void sub_818DE88(u16 itemId) { sub_818DCAC(gStringVar2, itemId); } @@ -318,7 +317,7 @@ void sub_818DEF4(void) EnableBothScriptContexts(); } -void sub_818DF00(void) +static void sub_818DF00(void) { u8 v0; u8 i; @@ -334,7 +333,7 @@ void sub_818DF00(void) gUnknown_0203CD68->playerName[0] = EOS; } -void SetLilycoveQuizLady(void) +static void SetLilycoveQuizLady(void) { u8 i; @@ -358,7 +357,7 @@ void SetLilycoveQuizLady(void) sub_818DF00(); } -void sub_818E004(void) +static void sub_818E004(void) { gUnknown_0203CD68 = &gSaveBlock1Ptr->lilycoveLady.quiz; gUnknown_0203CD68->id = LILYCOVE_LADY_QUIZ; @@ -427,7 +426,7 @@ u8 sub_818E06C(void) } #ifdef NONMATCHING -u8 sub_818E13C(void) +static u8 sub_818E13C(void) { u8 retval; u8 len; @@ -461,7 +460,7 @@ u8 sub_818E13C(void) return retval; } #else -__attribute__((naked)) u8 sub_818E13C(void) +__attribute__((naked)) static u8 sub_818E13C(void) { asm_unified("\tpush {r4-r7,lr}\n" "\tmovs r7, 0x1\n" @@ -540,7 +539,7 @@ __attribute__((naked)) u8 sub_818E13C(void) } #endif -u8 sub_818E1F4(void) +static u8 sub_818E1F4(void) { bool8 response; u8 i; @@ -558,7 +557,7 @@ u8 sub_818E1F4(void) return response; } -u8 sub_818E258(const u8 *str) +static u8 sub_818E258(const u8 *str) { u8 len; const u8 *ptr; @@ -722,7 +721,7 @@ void sub_818E570(const struct LilycoveLadyQuiz *quiz) } } -void sub_818E604(void) +static void sub_818E604(void) { gUnknown_0203CD6C->playerName[0] = EOS; gUnknown_0203CD6C->fave_pkblk = 0; @@ -731,7 +730,7 @@ void sub_818E604(void) gUnknown_0203CD6C->category = Random() % 5; } -void SetLilycoveContestLady(void) +static void SetLilycoveContestLady(void) { gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; gUnknown_0203CD6C->id = LILYCOVE_LADY_CONTEST; @@ -740,7 +739,7 @@ void SetLilycoveContestLady(void) gUnknown_0203CD6C->language = gGameLanguage; } -void sub_818E674(void) +static void sub_818E674(void) { gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; gUnknown_0203CD6C->id = LILYCOVE_LADY_CONTEST; @@ -751,7 +750,7 @@ void sub_818E674(void) } } -void sub_818E6B0(u8 sheen) +static void sub_818E6B0(u8 sheen) { gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; if (gUnknown_0203CD6C->max_sheen <= sheen) @@ -821,7 +820,7 @@ bool8 sub_818E704(struct Pokeblock *pokeblock) return response; } -void sub_818E794(u8 *dest1, u8 *dest2) +static void sub_818E794(u8 *dest1, u8 *dest2) { gUnknown_0203CD6C = &gSaveBlock1Ptr->lilycoveLady.contest; StringCopy(dest1, gUnknown_0860B324[gUnknown_0203CD6C->category]); diff --git a/sym_ewram.txt b/sym_ewram.txt index 1995bf7bf..a4e61fd05 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -1768,14 +1768,7 @@ gUnknown_0203CCEC: @ 203CCEC gUnknown_0203CD04: @ 203CD04 .space 0x60 -gUnknown_0203CD64: @ 203CD64 - .space 0x4 - -gUnknown_0203CD68: @ 203CD68 - .space 0x4 - -gUnknown_0203CD6C: @ 203CD6C - .space 0x4 + .include "src/lilycove_lady.o" gUnknown_0203CD70: @ 203CD70 .space 0x4 From 63a25a34a77a9e42901ccd13ae691b30130f9925 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 20 Sep 2017 21:42:14 -0400 Subject: [PATCH 266/342] Disassemble lilycove lady data --- data/data_emerald.s | 42 ++--------- data/lilycove_lady.s | 163 +++++++++++++++++++++++++++++++++++++++++++ data/strings.s | 42 +++++++++++ ld_script.txt | 2 + src/lilycove_lady.c | 3 +- 5 files changed, 215 insertions(+), 37 deletions(-) create mode 100644 data/lilycove_lady.s diff --git a/data/data_emerald.s b/data/data_emerald.s index 54bda4a0e..38c50a6c8 100644 --- a/data/data_emerald.s +++ b/data/data_emerald.s @@ -1,7 +1,11 @@ .include "asm/macros.inc" .include "constants/constants.inc" - .section .rodata + @ This section was decompiled in battle_dome_cards. + @ On its merge, this section should be deleted. + @ This section contains three objects and accounts for 28 bytes. + + .section .rodata.deleteme gUnknown_0860B058:: @ 860B058 .incbin "baserom.gba", 0x60b058, 0xc @@ -12,41 +16,7 @@ gUnknown_0860B064:: @ 860B064 gUnknown_0860B06C:: @ 860B06C .incbin "baserom.gba", 0x60b06c, 0x8 -gUnknown_0860B074:: @ 860B074 - .incbin "baserom.gba", 0x60b074, 0xa - -gUnknown_0860B07E:: @ 860B07E - .incbin "baserom.gba", 0x60b07e, 0x126 - -gUnknown_0860B1A4:: @ 860B1A4 - .incbin "baserom.gba", 0x60b1a4, 0x40 - -gUnknown_0860B1E4:: @ 860B1E4 - .incbin "baserom.gba", 0x60b1e4, 0x20 - -gUnknown_0860B204:: @ 860B204 - .incbin "baserom.gba", 0x60b204, 0x20 - -gUnknown_0860B224:: @ 860B224 - .incbin "baserom.gba", 0x60b224, 0xc8 - -gUnknown_0860B2EC:: @ 860B2EC - .incbin "baserom.gba", 0x60b2ec, 0x18 - -gUnknown_0860B304:: @ 860B304 - .incbin "baserom.gba", 0x60b304, 0xc - -gUnknown_0860B310:: @ 860B310 - .incbin "baserom.gba", 0x60b310, 0x14 - -gUnknown_0860B324:: @ 860B324 - .incbin "baserom.gba", 0x60b324, 0x14 - -gUnknown_0860B338:: @ 860B338 - .incbin "baserom.gba", 0x60b338, 0x14 - -gUnknown_0860B34C:: @ 860B34C - .incbin "baserom.gba", 0x60b34c, 0xc + .section .rodata gUnknown_0860B358:: @ 860B358 .incbin "baserom.gba", 0x60b358, 0x1630 diff --git a/data/lilycove_lady.s b/data/lilycove_lady.s new file mode 100644 index 000000000..9d076213c --- /dev/null +++ b/data/lilycove_lady.s @@ -0,0 +1,163 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0860B074:: @ 860B074 +@ replacing .incbin "baserom.gba", 0x0060b074, 0xa + .2byte 0x0062, 0x00cb, 0x00dc, 0x00cc, 0x00d1 + +gUnknown_0860B07E:: @ 860B07E +@ replacing .incbin "baserom.gba", 0x0060b07e, 0x6 + .2byte 0x001a, 0x0014, 0x000a + +Unknown_0860B084:: + .2byte 0x101b, 0x1623, 0x1812, 0x102c, 0x020e, 0x0c03, 0x1a0b, 0x0210, 0x020d + +Unknown_0860B096:: + .2byte 0x101b, 0x1013, 0x1020, 0x1a0f, 0x020c, 0x0c03, 0x0211, 0x0203, 0x0400 + +Unknown_0860B0A8:: + .2byte 0x0e0f, 0x1018, 0x020e, 0x0204, 0x0c03, 0xffff, 0x0212, 0x0451, 0x0463 + +Unknown_0860B0BA:: + .2byte 0x101b, 0x100b, 0x0e0d, 0x141a, 0x181d, 0x0c03, 0x141e, 0x1a26, 0x1823 + +Unknown_0860B0CC:: + .2byte 0x101b, 0x181d, 0x1018, 0x0a02, 0x2014, 0x0c03, 0x0208, 0x1824, 0x181c + +Unknown_0860B0DE:: + .2byte 0x101b, 0x1000, 0x1c19, 0x265d, 0x0c03, 0xffff, 0x0447, 0x045d, 0x042c + +Unknown_0860B0F0:: + .2byte 0x101b, 0x1034, 0x1e11, 0x100b, 0x1a08, 0x0c03, 0x044b, 0x0446, 0x040a + +Unknown_0860B102:: + .2byte 0x101b, 0x1000, 0x274f, 0x0626, 0x0c03, 0xffff, 0x0442, 0x0411, 0x0450 + +Unknown_0860B114:: + .2byte 0x101b, 0x1000, 0x1c19, 0x043c, 0x0c03, 0xffff, 0x0421, 0x0464, 0x0435 + +Unknown_0860B126:: + .2byte 0x101b, 0x1203, 0x1030, 0x0207, 0x0c03, 0xffff, 0x0210, 0x020e, 0x020d + +Unknown_0860B138:: + .2byte 0x101b, 0x1623, 0x0a05, 0x020e, 0x0c03, 0xffff, 0x1a25, 0x181a, 0x181b + +Unknown_0860B14A:: + .2byte 0x101b, 0x1823, 0x1603, 0x0a02, 0x1812, 0x0c03, 0x1a15, 0x1a23, 0x181b + +Unknown_0860B15C:: + .2byte 0x1020, 0x020e, 0x1010, 0x1043, 0x1e0f, 0x0c03, 0x181c, 0x1a24, 0x1816 + +Unknown_0860B16E:: + .2byte 0x0446, 0x100b, 0x0620, 0x061c, 0x101b, 0x0c03, 0x0420, 0x0426, 0xffff + +Unknown_0860B180:: + .2byte 0x0400, 0x100b, 0x0639, 0x061c, 0x101b, 0x0c03, 0x040e, 0x0410, 0xffff + +Unknown_0860B192:: + .2byte 0x041f, 0x100b, 0x0639, 0x061c, 0x101b, 0x0c03, 0x0445, 0x0400, 0xffff + +gUnknown_0860B1A4:: @ 860B1A4 +@ replacing .incbin "baserom.gba", 0x0060b1a4, 0x40 + .4byte Unknown_0860B084 + .4byte Unknown_0860B096 + .4byte Unknown_0860B0A8 + .4byte Unknown_0860B0BA + .4byte Unknown_0860B0CC + .4byte Unknown_0860B0DE + .4byte Unknown_0860B0F0 + .4byte Unknown_0860B102 + .4byte Unknown_0860B114 + .4byte Unknown_0860B126 + .4byte Unknown_0860B138 + .4byte Unknown_0860B14A + .4byte Unknown_0860B15C + .4byte Unknown_0860B16E + .4byte Unknown_0860B180 + .4byte Unknown_0860B192 + +gUnknown_0860B1E4:: @ 860B1E4 +@ replacing .incbin "baserom.gba", 0x0060b1e4, 0x20 + .2byte 0x0210, 0x0400, 0x0212, 0x1a26, 0x0208, 0x045d, 0x040a, 0x0411, 0x0464, 0x020e, 0x1a25, 0x181b, 0x1a24, 0x0420, 0x0410, 0x0400 + +gUnknown_0860B204:: @ 860B204 +@ replacing .incbin "baserom.gba", 0x0060b204, 0x20 + .2byte 0x007b, 0x007f, 0x0081, 0x0023, 0x0023, 0x0023, 0x00a5, 0x00a7, 0x00a6, 0x000b, 0x012f, 0x006b, 0x006d, 0x0044, 0x0044, 0x000c + +gUnknown_0860B224:: @ 860B224 +@ replacing .incbin "baserom.gba", 0x0060b224, 0xc8 + .4byte gUnknown_085EEB83 + .4byte gUnknown_085EEB8C + .4byte gUnknown_085EEB95 + .4byte gUnknown_085EEB9E + .4byte gUnknown_085EEBA4 + .4byte gUnknown_085EEBAB + +Unknown_0860B23C:: +@ replacing .incbin "baserom.gba", 0x0060b23c, 0x1a +.2byte 0x0056, 0x0053, 0x0054, 0x000e, 0x0012, 0x000f, 0x00a7, 0x0011, 0x0010, 0x0018, 0x0019, 0x001e, 0x0000 + +Unknown_0860B256:: +@ replacing .incbin "baserom.gba", 0x0060b256, 0x22 +.2byte 0x0051, 0x006a, 0x006b, 0x00cc, 0x00c2, 0x002f, 0x0067, 0x0068, 0x0087, 0x0089, 0x008b, 0x009d, 0x00a0, 0x00a5, 0x0004, 0x0002 +.2byte 0x0000 + +Unknown_0860B278:: +@ replacing .incbin "baserom.gba", 0x0060b278, 0x1e +.2byte 0x0021, 0x000d, 0x001a, 0x001b, 0x001c, 0x00cc, 0x00ca, 0x0026, 0x0086, 0x0096, 0x0097, 0x009a, 0x00a2, 0x00a6, 0x0000 + +Unknown_0860B296:: +@ replacing .incbin "baserom.gba", 0x0060b296, 0x2a +.2byte 0x0020, 0x004d, 0x004b, 0x004c, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x006e, 0x005d, 0x006c, 0x006d, 0x006a, 0x006b, 0x00d6 +.2byte 0x00bc, 0x00b3, 0x000b, 0x000c, 0x0000 + +Unknown_0860B2C0:: +@ replacing .incbin "baserom.gba", 0x0060b2c0, 0x16 +.2byte 0x001f, 0x0013, 0x0014, 0x004a, 0x004e, 0x0049, 0x00a5, 0x00c8, 0x0067, 0x006f, 0x0000 + +Unknown_0860B2D6:: +@ replacing .incbin "baserom.gba", 0x0060b2d6, 0x16 +.2byte 0x00b7, 0x00d3, 0x00d2, 0x00d8, 0x009e, 0x00a6, 0x00ab, 0x00aa, 0x006c, 0x006d, 0x0000 + +gUnknown_0860B2EC:: @ 860B2EC +@ replacing .incbin "baserom.gba", 0x0060b2ec, 0x18 + .4byte Unknown_0860B23C + .4byte Unknown_0860B256 + .4byte Unknown_0860B278 + .4byte Unknown_0860B296 + .4byte Unknown_0860B2C0 + .4byte Unknown_0860B2D6 + +gUnknown_0860B304:: @ 860B304 +@ replacing .incbin "baserom.gba", 0x0060b304, 0xc +.2byte 0x000b, 0x006e, 0x0040, 0x006f, 0x0044, 0x0047 + +gUnknown_0860B310:: @ 860B310 +@ replacing .incbin "baserom.gba", 0x0060b310, 0x14 + .4byte gUnknown_085EEB2B + .4byte gUnknown_085EEB34 + .4byte gUnknown_085EEB3A + .4byte gUnknown_085EEB41 + .4byte gUnknown_085EEB4A + +gUnknown_0860B324:: @ 860B324 +@ replacing .incbin "baserom.gba", 0x0060b324, 0x14 + .4byte gUnknown_085EEB51 + .4byte gUnknown_085EEB5A + .4byte gUnknown_085EEB61 + .4byte gUnknown_085EEB6A + .4byte gUnknown_085EEB74 + +gUnknown_0860B338:: @ 860B338 +@ replacing .incbin "baserom.gba", 0x0060b338, 0x14 + .4byte gUnknown_085EADA4 + .4byte gUnknown_085EADB5 + .4byte gUnknown_085EADC4 + .4byte gUnknown_085EADD5 + .4byte gUnknown_085EADE7 + +gUnknown_0860B34C:: @ 860B34C +@ replacing .incbin "baserom.gba", 0x0060b34c, 0xc + .2byte 0x0120, 0x013b, 0x011e, 0x013d, 0x0019 diff --git a/data/strings.s b/data/strings.s index c8a1b7683..afdda0b29 100644 --- a/data/strings.s +++ b/data/strings.s @@ -1246,10 +1246,20 @@ gUnknown_085EAD30:: @ 85EAD30 .string "Types of CONTESTS$" .string "Ranks$" .string "Judging$" + +gUnknown_085EADA4:: .string "COOLNESS CONTEST$" + +gUnknown_085EADB5:: .string "BEAUTY CONTEST$" + +gUnknown_085EADC4:: .string "CUTENESS CONTEST$" + +gUnknown_085EADD5:: .string "SMARTNESS CONTEST$" + +gUnknown_085EADE7:: .string "TOUGHNESS CONTEST$" .string "DECORATION$" .string "PACK UP$" @@ -2967,24 +2977,56 @@ gUnknown_085EEAF6:: @ 85EEAF6 gUnknown_085EEB0B:: @ 85EEB0B .string "A call can’t be made from here.$" + +gUnknown_085EEB2B:: .string "HANDSOME$" + +gUnknown_085EEB34:: .string "VINNY$" + +gUnknown_085EEB3A:: .string "MOREME$" + +gUnknown_085EEB41:: .string "IRONHARD$" + +gUnknown_085EEB4A:: .string "MUSCLE$" + +gUnknown_085EEB51:: .string "coolness$" + +gUnknown_085EEB5A:: .string "beauty$" + +gUnknown_085EEB61:: .string "cuteness$" + +gUnknown_085EEB6A:: .string "smartness$" + +gUnknown_085EEB74:: .string "toughness$" gUnknown_085EEB7E:: @ 85EEB7E .string "Lady$" + +gUnknown_085EEB83:: .string "slippery$" + +gUnknown_085EEB8C:: .string "roundish$" + +gUnknown_085EEB95:: .string "wham-ish$" + +gUnknown_085EEB9E:: .string "shiny$" + +gUnknown_085EEBA4:: .string "sticky$" + +gUnknown_085EEBAB:: .string "pointy$" gUnknown_085EEBB2:: @ 85EEBB2 diff --git a/ld_script.txt b/ld_script.txt index e8e44b718..51b7364cb 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -379,6 +379,8 @@ SECTIONS { data/data_860A4AC.o(.rodata); data/battle_controller_recorded_opponent.o(.rodata); data/battle_controller_recorded_player.o(.rodata); + data/data_emerald.o(.rodata.deleteme); + data/lilycove_lady.o(.rodata); data/data_emerald.o(.rodata); data/battle_controller_player_partner.o(.rodata); data/data_emerald2.o(.rodata); diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 4839571ae..6a0e0c2b9 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -27,7 +27,8 @@ static u8 sub_818E13C(void); static bool8 sub_818E1F4(void); static u8 sub_818E258(const u8 *); -extern const u8 gUnknown_085EEB7E[8]; +extern const u8 gUnknown_085EEB7E[]; // Lady$ + extern const u16 gUnknown_0860B074[5]; extern const u16 gUnknown_0860B07E[3]; extern const u16 *const gUnknown_0860B1A4[16]; From 6f481cceb1b56c5d63ba045f7ca7f1ac7151332b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 20 Sep 2017 22:01:28 -0400 Subject: [PATCH 267/342] Decompile lilycove lady data --- data/lilycove_lady.s | 163 ---------------------------------- ld_script.txt | 2 +- src/lilycove_lady.c | 204 ++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 193 insertions(+), 176 deletions(-) delete mode 100644 data/lilycove_lady.s diff --git a/data/lilycove_lady.s b/data/lilycove_lady.s deleted file mode 100644 index 9d076213c..000000000 --- a/data/lilycove_lady.s +++ /dev/null @@ -1,163 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -gUnknown_0860B074:: @ 860B074 -@ replacing .incbin "baserom.gba", 0x0060b074, 0xa - .2byte 0x0062, 0x00cb, 0x00dc, 0x00cc, 0x00d1 - -gUnknown_0860B07E:: @ 860B07E -@ replacing .incbin "baserom.gba", 0x0060b07e, 0x6 - .2byte 0x001a, 0x0014, 0x000a - -Unknown_0860B084:: - .2byte 0x101b, 0x1623, 0x1812, 0x102c, 0x020e, 0x0c03, 0x1a0b, 0x0210, 0x020d - -Unknown_0860B096:: - .2byte 0x101b, 0x1013, 0x1020, 0x1a0f, 0x020c, 0x0c03, 0x0211, 0x0203, 0x0400 - -Unknown_0860B0A8:: - .2byte 0x0e0f, 0x1018, 0x020e, 0x0204, 0x0c03, 0xffff, 0x0212, 0x0451, 0x0463 - -Unknown_0860B0BA:: - .2byte 0x101b, 0x100b, 0x0e0d, 0x141a, 0x181d, 0x0c03, 0x141e, 0x1a26, 0x1823 - -Unknown_0860B0CC:: - .2byte 0x101b, 0x181d, 0x1018, 0x0a02, 0x2014, 0x0c03, 0x0208, 0x1824, 0x181c - -Unknown_0860B0DE:: - .2byte 0x101b, 0x1000, 0x1c19, 0x265d, 0x0c03, 0xffff, 0x0447, 0x045d, 0x042c - -Unknown_0860B0F0:: - .2byte 0x101b, 0x1034, 0x1e11, 0x100b, 0x1a08, 0x0c03, 0x044b, 0x0446, 0x040a - -Unknown_0860B102:: - .2byte 0x101b, 0x1000, 0x274f, 0x0626, 0x0c03, 0xffff, 0x0442, 0x0411, 0x0450 - -Unknown_0860B114:: - .2byte 0x101b, 0x1000, 0x1c19, 0x043c, 0x0c03, 0xffff, 0x0421, 0x0464, 0x0435 - -Unknown_0860B126:: - .2byte 0x101b, 0x1203, 0x1030, 0x0207, 0x0c03, 0xffff, 0x0210, 0x020e, 0x020d - -Unknown_0860B138:: - .2byte 0x101b, 0x1623, 0x0a05, 0x020e, 0x0c03, 0xffff, 0x1a25, 0x181a, 0x181b - -Unknown_0860B14A:: - .2byte 0x101b, 0x1823, 0x1603, 0x0a02, 0x1812, 0x0c03, 0x1a15, 0x1a23, 0x181b - -Unknown_0860B15C:: - .2byte 0x1020, 0x020e, 0x1010, 0x1043, 0x1e0f, 0x0c03, 0x181c, 0x1a24, 0x1816 - -Unknown_0860B16E:: - .2byte 0x0446, 0x100b, 0x0620, 0x061c, 0x101b, 0x0c03, 0x0420, 0x0426, 0xffff - -Unknown_0860B180:: - .2byte 0x0400, 0x100b, 0x0639, 0x061c, 0x101b, 0x0c03, 0x040e, 0x0410, 0xffff - -Unknown_0860B192:: - .2byte 0x041f, 0x100b, 0x0639, 0x061c, 0x101b, 0x0c03, 0x0445, 0x0400, 0xffff - -gUnknown_0860B1A4:: @ 860B1A4 -@ replacing .incbin "baserom.gba", 0x0060b1a4, 0x40 - .4byte Unknown_0860B084 - .4byte Unknown_0860B096 - .4byte Unknown_0860B0A8 - .4byte Unknown_0860B0BA - .4byte Unknown_0860B0CC - .4byte Unknown_0860B0DE - .4byte Unknown_0860B0F0 - .4byte Unknown_0860B102 - .4byte Unknown_0860B114 - .4byte Unknown_0860B126 - .4byte Unknown_0860B138 - .4byte Unknown_0860B14A - .4byte Unknown_0860B15C - .4byte Unknown_0860B16E - .4byte Unknown_0860B180 - .4byte Unknown_0860B192 - -gUnknown_0860B1E4:: @ 860B1E4 -@ replacing .incbin "baserom.gba", 0x0060b1e4, 0x20 - .2byte 0x0210, 0x0400, 0x0212, 0x1a26, 0x0208, 0x045d, 0x040a, 0x0411, 0x0464, 0x020e, 0x1a25, 0x181b, 0x1a24, 0x0420, 0x0410, 0x0400 - -gUnknown_0860B204:: @ 860B204 -@ replacing .incbin "baserom.gba", 0x0060b204, 0x20 - .2byte 0x007b, 0x007f, 0x0081, 0x0023, 0x0023, 0x0023, 0x00a5, 0x00a7, 0x00a6, 0x000b, 0x012f, 0x006b, 0x006d, 0x0044, 0x0044, 0x000c - -gUnknown_0860B224:: @ 860B224 -@ replacing .incbin "baserom.gba", 0x0060b224, 0xc8 - .4byte gUnknown_085EEB83 - .4byte gUnknown_085EEB8C - .4byte gUnknown_085EEB95 - .4byte gUnknown_085EEB9E - .4byte gUnknown_085EEBA4 - .4byte gUnknown_085EEBAB - -Unknown_0860B23C:: -@ replacing .incbin "baserom.gba", 0x0060b23c, 0x1a -.2byte 0x0056, 0x0053, 0x0054, 0x000e, 0x0012, 0x000f, 0x00a7, 0x0011, 0x0010, 0x0018, 0x0019, 0x001e, 0x0000 - -Unknown_0860B256:: -@ replacing .incbin "baserom.gba", 0x0060b256, 0x22 -.2byte 0x0051, 0x006a, 0x006b, 0x00cc, 0x00c2, 0x002f, 0x0067, 0x0068, 0x0087, 0x0089, 0x008b, 0x009d, 0x00a0, 0x00a5, 0x0004, 0x0002 -.2byte 0x0000 - -Unknown_0860B278:: -@ replacing .incbin "baserom.gba", 0x0060b278, 0x1e -.2byte 0x0021, 0x000d, 0x001a, 0x001b, 0x001c, 0x00cc, 0x00ca, 0x0026, 0x0086, 0x0096, 0x0097, 0x009a, 0x00a2, 0x00a6, 0x0000 - -Unknown_0860B296:: -@ replacing .incbin "baserom.gba", 0x0060b296, 0x2a -.2byte 0x0020, 0x004d, 0x004b, 0x004c, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x006e, 0x005d, 0x006c, 0x006d, 0x006a, 0x006b, 0x00d6 -.2byte 0x00bc, 0x00b3, 0x000b, 0x000c, 0x0000 - -Unknown_0860B2C0:: -@ replacing .incbin "baserom.gba", 0x0060b2c0, 0x16 -.2byte 0x001f, 0x0013, 0x0014, 0x004a, 0x004e, 0x0049, 0x00a5, 0x00c8, 0x0067, 0x006f, 0x0000 - -Unknown_0860B2D6:: -@ replacing .incbin "baserom.gba", 0x0060b2d6, 0x16 -.2byte 0x00b7, 0x00d3, 0x00d2, 0x00d8, 0x009e, 0x00a6, 0x00ab, 0x00aa, 0x006c, 0x006d, 0x0000 - -gUnknown_0860B2EC:: @ 860B2EC -@ replacing .incbin "baserom.gba", 0x0060b2ec, 0x18 - .4byte Unknown_0860B23C - .4byte Unknown_0860B256 - .4byte Unknown_0860B278 - .4byte Unknown_0860B296 - .4byte Unknown_0860B2C0 - .4byte Unknown_0860B2D6 - -gUnknown_0860B304:: @ 860B304 -@ replacing .incbin "baserom.gba", 0x0060b304, 0xc -.2byte 0x000b, 0x006e, 0x0040, 0x006f, 0x0044, 0x0047 - -gUnknown_0860B310:: @ 860B310 -@ replacing .incbin "baserom.gba", 0x0060b310, 0x14 - .4byte gUnknown_085EEB2B - .4byte gUnknown_085EEB34 - .4byte gUnknown_085EEB3A - .4byte gUnknown_085EEB41 - .4byte gUnknown_085EEB4A - -gUnknown_0860B324:: @ 860B324 -@ replacing .incbin "baserom.gba", 0x0060b324, 0x14 - .4byte gUnknown_085EEB51 - .4byte gUnknown_085EEB5A - .4byte gUnknown_085EEB61 - .4byte gUnknown_085EEB6A - .4byte gUnknown_085EEB74 - -gUnknown_0860B338:: @ 860B338 -@ replacing .incbin "baserom.gba", 0x0060b338, 0x14 - .4byte gUnknown_085EADA4 - .4byte gUnknown_085EADB5 - .4byte gUnknown_085EADC4 - .4byte gUnknown_085EADD5 - .4byte gUnknown_085EADE7 - -gUnknown_0860B34C:: @ 860B34C -@ replacing .incbin "baserom.gba", 0x0060b34c, 0xc - .2byte 0x0120, 0x013b, 0x011e, 0x013d, 0x0019 diff --git a/ld_script.txt b/ld_script.txt index 51b7364cb..4a07cf85e 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -380,7 +380,7 @@ SECTIONS { data/battle_controller_recorded_opponent.o(.rodata); data/battle_controller_recorded_player.o(.rodata); data/data_emerald.o(.rodata.deleteme); - data/lilycove_lady.o(.rodata); + src/lilycove_lady.o(.rodata); data/data_emerald.o(.rodata); data/battle_controller_player_partner.o(.rodata); data/data_emerald2.o(.rodata); diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c index 6a0e0c2b9..b476c6b2b 100644 --- a/src/lilycove_lady.c +++ b/src/lilycove_lady.c @@ -29,18 +29,198 @@ static u8 sub_818E258(const u8 *); extern const u8 gUnknown_085EEB7E[]; // Lady$ -extern const u16 gUnknown_0860B074[5]; -extern const u16 gUnknown_0860B07E[3]; -extern const u16 *const gUnknown_0860B1A4[16]; -extern const u16 gUnknown_0860B1E4[16]; -extern const u16 gUnknown_0860B204[16]; -extern const u8 *const gUnknown_0860B224[]; -extern const u16 *const gUnknown_0860B2EC[6]; -extern const u16 gUnknown_0860B304[6]; -extern const u8 *const gUnknown_0860B310[5]; -extern const u8 *const gUnknown_0860B324[5]; -extern const u8 *const gUnknown_0860B338[5]; -extern const u16 gUnknown_0860B34C[5]; +static const u16 gUnknown_0860B074[] = { + 0x62, 0xcb, 0xdc, 0xcc, 0xd1 +}; +static const u16 gUnknown_0860B07E[] = { + 0x1a, 0x14, 0x0a +}; + +static const u16 Unknown_0860B084[] = { + 0x101b, 0x1623, 0x1812, 0x102c, 0x020e, 0x0c03, 0x1a0b, 0x0210, 0x020d +}; + +static const u16 Unknown_0860B096[] = { + 0x101b, 0x1013, 0x1020, 0x1a0f, 0x020c, 0x0c03, 0x0211, 0x0203, 0x0400 +}; + +static const u16 Unknown_0860B0A8[] = { + 0x0e0f, 0x1018, 0x020e, 0x0204, 0x0c03, 0xffff, 0x0212, 0x0451, 0x0463 +}; + +static const u16 Unknown_0860B0BA[] = { + 0x101b, 0x100b, 0x0e0d, 0x141a, 0x181d, 0x0c03, 0x141e, 0x1a26, 0x1823 +}; + +static const u16 Unknown_0860B0CC[] = { + 0x101b, 0x181d, 0x1018, 0x0a02, 0x2014, 0x0c03, 0x0208, 0x1824, 0x181c +}; + +static const u16 Unknown_0860B0DE[] = { + 0x101b, 0x1000, 0x1c19, 0x265d, 0x0c03, 0xffff, 0x0447, 0x045d, 0x042c +}; + +static const u16 Unknown_0860B0F0[] = { + 0x101b, 0x1034, 0x1e11, 0x100b, 0x1a08, 0x0c03, 0x044b, 0x0446, 0x040a +}; + +static const u16 Unknown_0860B102[] = { + 0x101b, 0x1000, 0x274f, 0x0626, 0x0c03, 0xffff, 0x0442, 0x0411, 0x0450 +}; + +static const u16 Unknown_0860B114[] = { + 0x101b, 0x1000, 0x1c19, 0x043c, 0x0c03, 0xffff, 0x0421, 0x0464, 0x0435 +}; + +static const u16 Unknown_0860B126[] = { + 0x101b, 0x1203, 0x1030, 0x0207, 0x0c03, 0xffff, 0x0210, 0x020e, 0x020d +}; + +static const u16 Unknown_0860B138[] = { + 0x101b, 0x1623, 0x0a05, 0x020e, 0x0c03, 0xffff, 0x1a25, 0x181a, 0x181b +}; + +static const u16 Unknown_0860B14A[] = { + 0x101b, 0x1823, 0x1603, 0x0a02, 0x1812, 0x0c03, 0x1a15, 0x1a23, 0x181b +}; + +static const u16 Unknown_0860B15C[] = { + 0x1020, 0x020e, 0x1010, 0x1043, 0x1e0f, 0x0c03, 0x181c, 0x1a24, 0x1816 +}; + +static const u16 Unknown_0860B16E[] = { + 0x0446, 0x100b, 0x0620, 0x061c, 0x101b, 0x0c03, 0x0420, 0x0426, 0xffff +}; + +static const u16 Unknown_0860B180[] = { + 0x0400, 0x100b, 0x0639, 0x061c, 0x101b, 0x0c03, 0x040e, 0x0410, 0xffff +}; + +static const u16 Unknown_0860B192[] = { + 0x041f, 0x100b, 0x0639, 0x061c, 0x101b, 0x0c03, 0x0445, 0x0400, 0xffff +}; + +static const u16 *const gUnknown_0860B1A4[] = { + Unknown_0860B084, + Unknown_0860B096, + Unknown_0860B0A8, + Unknown_0860B0BA, + Unknown_0860B0CC, + Unknown_0860B0DE, + Unknown_0860B0F0, + Unknown_0860B102, + Unknown_0860B114, + Unknown_0860B126, + Unknown_0860B138, + Unknown_0860B14A, + Unknown_0860B15C, + Unknown_0860B16E, + Unknown_0860B180, + Unknown_0860B192 +}; + +static const u16 gUnknown_0860B1E4[] = { + 0x0210, 0x0400, 0x0212, 0x1a26, 0x0208, 0x045d, 0x040a, 0x0411, 0x0464, 0x020e, 0x1a25, 0x181b, 0x1a24, 0x0420, 0x0410, 0x0400 +}; + +static const u16 gUnknown_0860B204[] = { + 0x007b, 0x007f, 0x0081, 0x0023, 0x0023, 0x0023, 0x00a5, 0x00a7, 0x00a6, 0x000b, 0x012f, 0x006b, 0x006d, 0x0044, 0x0044, 0x000c +}; + +extern const u8 gUnknown_085EEB83[]; +extern const u8 gUnknown_085EEB8C[]; +extern const u8 gUnknown_085EEB95[]; +extern const u8 gUnknown_085EEB9E[]; +extern const u8 gUnknown_085EEBA4[]; +extern const u8 gUnknown_085EEBAB[]; + +static const u8 *const gUnknown_0860B224[] = { + gUnknown_085EEB83, + gUnknown_085EEB8C, + gUnknown_085EEB95, + gUnknown_085EEB9E, + gUnknown_085EEBA4, + gUnknown_085EEBAB +}; + +static const u16 Unknown_0860B23C[] = { + 0x0056, 0x0053, 0x0054, 0x000e, 0x0012, 0x000f, 0x00a7, 0x0011, 0x0010, 0x0018, 0x0019, 0x001e, 0x0000 +}; + +static const u16 Unknown_0860B256[] = { + 0x0051, 0x006a, 0x006b, 0x00cc, 0x00c2, 0x002f, 0x0067, 0x0068, 0x0087, 0x0089, 0x008b, 0x009d, 0x00a0, 0x00a5, 0x0004, 0x0002, 0x0000 +}; + +static const u16 Unknown_0860B278[] = { + 0x0021, 0x000d, 0x001a, 0x001b, 0x001c, 0x00cc, 0x00ca, 0x0026, 0x0086, 0x0096, 0x0097, 0x009a, 0x00a2, 0x00a6, 0x0000 +}; + +static const u16 Unknown_0860B296[] = { + 0x0020, 0x004d, 0x004b, 0x004c, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x006e, 0x005d, 0x006c, 0x006d, 0x006a, 0x006b, 0x00d6, 0x00bc, 0x00b3, 0x000b, 0x000c, 0x0000 +}; + +static const u16 Unknown_0860B2C0[] = { + 0x001f, 0x0013, 0x0014, 0x004a, 0x004e, 0x0049, 0x00a5, 0x00c8, 0x0067, 0x006f, 0x0000 +}; + +static const u16 Unknown_0860B2D6[] = { + 0x00b7, 0x00d3, 0x00d2, 0x00d8, 0x009e, 0x00a6, 0x00ab, 0x00aa, 0x006c, 0x006d, 0x0000 +}; + +static const u16 *const gUnknown_0860B2EC[] = { + Unknown_0860B23C, + Unknown_0860B256, + Unknown_0860B278, + Unknown_0860B296, + Unknown_0860B2C0, + Unknown_0860B2D6 +}; + +static const u16 gUnknown_0860B304[] = { + 0x0b, 0x6e, 0x40, 0x6f, 0x44, 0x47 +}; + +extern const u8 gUnknown_085EEB2B[]; +extern const u8 gUnknown_085EEB34[]; +extern const u8 gUnknown_085EEB3A[]; +extern const u8 gUnknown_085EEB41[]; +extern const u8 gUnknown_085EEB4A[]; +extern const u8 gUnknown_085EEB51[]; +extern const u8 gUnknown_085EEB5A[]; +extern const u8 gUnknown_085EEB61[]; +extern const u8 gUnknown_085EEB6A[]; +extern const u8 gUnknown_085EEB74[]; +extern const u8 gUnknown_085EADA4[]; +extern const u8 gUnknown_085EADB5[]; +extern const u8 gUnknown_085EADC4[]; +extern const u8 gUnknown_085EADD5[]; +extern const u8 gUnknown_085EADE7[]; + +static const u8 *const gUnknown_0860B310[] = { + gUnknown_085EEB2B, + gUnknown_085EEB34, + gUnknown_085EEB3A, + gUnknown_085EEB41, + gUnknown_085EEB4A +}; +static const u8 *const gUnknown_0860B324[] = { + gUnknown_085EEB51, + gUnknown_085EEB5A, + gUnknown_085EEB61, + gUnknown_085EEB6A, + gUnknown_085EEB74 +}; +static const u8 *const gUnknown_0860B338[] = { + gUnknown_085EADA4, + gUnknown_085EADB5, + gUnknown_085EADC4, + gUnknown_085EADD5, + gUnknown_085EADE7 +}; + +static const u16 gUnknown_0860B34C[] = { + 0x0120, 0x013b, 0x011e, 0x013d, 0x0019 +}; static EWRAM_DATA struct LilycoveLadyFavour *gUnknown_0203CD64 = NULL; static EWRAM_DATA struct LilycoveLadyQuiz *gUnknown_0203CD68 = NULL; From ab6a7d2d8c5851462cf768010405cb1dbdfbaf03 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 21 Sep 2017 13:28:02 -0400 Subject: [PATCH 268/342] Split data/data_emerald.s --- data/battle_frontier_1.s | 206 +++++++++ data/battle_frontier_2.s | 347 ++++++++++++++ data/battle_tent.s | 22 + data/data_emerald.s | 958 --------------------------------------- data/item_icon.s | 13 + data/item_menu.s | 73 +++ data/menu_indicators.s | 49 ++ data/new_menu_helpers.s | 27 ++ data/party_menu.s | 229 ++++++++++ data/save_location.s | 13 + data/unk_81BAD84.s | 7 + data/unk_text_util_2.s | 11 + ld_script.txt | 12 +- 13 files changed, 1008 insertions(+), 959 deletions(-) create mode 100644 data/battle_frontier_1.s create mode 100644 data/battle_frontier_2.s create mode 100644 data/battle_tent.s delete mode 100644 data/data_emerald.s create mode 100644 data/item_icon.s create mode 100644 data/item_menu.s create mode 100644 data/menu_indicators.s create mode 100644 data/new_menu_helpers.s create mode 100644 data/party_menu.s create mode 100644 data/save_location.s create mode 100644 data/unk_81BAD84.s create mode 100644 data/unk_text_util_2.s diff --git a/data/battle_frontier_1.s b/data/battle_frontier_1.s new file mode 100644 index 000000000..5d82c25f2 --- /dev/null +++ b/data/battle_frontier_1.s @@ -0,0 +1,206 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + .align 2, 0 +gUnknown_0860B358:: @ 860B358 + .incbin "baserom.gba", 0x60b358, 0x1630 + +gUnknown_0860C988:: @ 860C988 + .incbin "baserom.gba", 0x60c988, 0x269 + +gUnknown_0860CBF1:: @ 860CBF1 + .incbin "baserom.gba", 0x60cbf1, 0x283 + +gUnknown_0860CE74:: @ 860CE74 + .incbin "baserom.gba", 0x60ce74, 0x10 + +gUnknown_0860CE84:: @ 860CE84 + .incbin "baserom.gba", 0x60ce84, 0x10 + +gUnknown_0860CE94:: @ 860CE94 + .incbin "baserom.gba", 0x60ce94, 0x20 + +gUnknown_0860CEB4:: @ 860CEB4 + .incbin "baserom.gba", 0x60ceb4, 0x90 + +gUnknown_0860CF44:: @ 860CF44 + .incbin "baserom.gba", 0x60cf44, 0xc + +gUnknown_0860CF50:: @ 860CF50 + .incbin "baserom.gba", 0x60cf50, 0x58 + +gUnknown_0860CFA8:: @ 860CFA8 + .incbin "baserom.gba", 0x60cfa8, 0x30 + +gUnknown_0860CFD8:: @ 860CFD8 + .incbin "baserom.gba", 0x60cfd8, 0x30 + +gUnknown_0860D008:: @ 860D008 + .incbin "baserom.gba", 0x60d008, 0x48 + +gUnknown_0860D050:: @ 860D050 + .incbin "baserom.gba", 0x60d050, 0x18 + +gUnknown_0860D068:: @ 860D068 + .incbin "baserom.gba", 0x60d068, 0x18 + +gUnknown_0860D080:: @ 860D080 + .incbin "baserom.gba", 0x60d080, 0x10 + +gUnknown_0860D090:: @ 860D090 + .incbin "baserom.gba", 0x60d090, 0x5c + +gUnknown_0860D0EC:: @ 860D0EC + .incbin "baserom.gba", 0x60d0ec, 0x10 + +gUnknown_0860D0FC:: @ 860D0FC + .incbin "baserom.gba", 0x60d0fc, 0x10 + +gUnknown_0860D10C:: @ 860D10C + .incbin "baserom.gba", 0x60d10c, 0x40 + +gUnknown_0860D14C:: @ 860D14C + .incbin "baserom.gba", 0x60d14c, 0x10 + +gUnknown_0860D15C:: @ 860D15C + .incbin "baserom.gba", 0x60d15c, 0x40 + +gUnknown_0860D19C:: @ 860D19C + .incbin "baserom.gba", 0x60d19c, 0x4 + +gUnknown_0860D1A0:: @ 860D1A0 + .incbin "baserom.gba", 0x60d1a0, 0x20 + +gUnknown_0860D1C0:: @ 860D1C0 + .incbin "baserom.gba", 0x60d1c0, 0x10 + +gUnknown_0860D1D0:: @ 860D1D0 + .incbin "baserom.gba", 0x60d1d0, 0x44 + +gUnknown_0860D214:: @ 860D214 + .incbin "baserom.gba", 0x60d214, 0x80 + +gUnknown_0860D294:: @ 860D294 + .incbin "baserom.gba", 0x60d294, 0xac + +gUnknown_0860D340:: @ 860D340 + .incbin "baserom.gba", 0x60d340, 0x3 + +gUnknown_0860D343:: @ 860D343 + .incbin "baserom.gba", 0x60d343, 0x3 + +gUnknown_0860D346:: @ 860D346 + .incbin "baserom.gba", 0x60d346, 0x3 + +gUnknown_0860D349:: @ 860D349 + .incbin "baserom.gba", 0x60d349, 0x7 + +gUnknown_0860D350:: @ 860D350 + .incbin "baserom.gba", 0x60d350, 0x3c + +gUnknown_0860D38C:: @ 860D38C + .incbin "baserom.gba", 0x60d38c, 0x1c + +gUnknown_0860D3A8:: @ 860D3A8 + .incbin "baserom.gba", 0x60d3a8, 0x3 + +gUnknown_0860D3AB:: @ 860D3AB + .incbin "baserom.gba", 0x60d3ab, 0x3 + +gUnknown_0860D3AE:: @ 860D3AE + .incbin "baserom.gba", 0x60d3ae, 0x3 + +gUnknown_0860D3B1:: @ 860D3B1 + .incbin "baserom.gba", 0x60d3b1, 0x3 + +gUnknown_0860D3B4:: @ 860D3B4 + .incbin "baserom.gba", 0x60d3b4, 0x10 + +gUnknown_0860D3C4:: @ 860D3C4 + .incbin "baserom.gba", 0x60d3c4, 0x2 + +gUnknown_0860D3C6:: @ 860D3C6 + .incbin "baserom.gba", 0x60d3c6, 0x2b + +gUnknown_0860D3F1:: @ 860D3F1 + .incbin "baserom.gba", 0x60d3f1, 0x1 + +gUnknown_0860D3F2:: @ 860D3F2 + .incbin "baserom.gba", 0x60d3f2, 0x1f + +gUnknown_0860D411:: @ 860D411 + .incbin "baserom.gba", 0x60d411, 0x8ff + +gUnknown_0860DD10:: @ 860DD10 + .incbin "baserom.gba", 0x60dd10, 0x100 + +gUnknown_0860DE10:: @ 860DE10 + .incbin "baserom.gba", 0x60de10, 0x40 + +gUnknown_0860DE50:: @ 860DE50 + .incbin "baserom.gba", 0x60de50, 0x28 + +gUnknown_0860DE78:: @ 860DE78 + .incbin "baserom.gba", 0x60de78, 0xc + +gUnknown_0860DE84:: @ 860DE84 + .incbin "baserom.gba", 0x60de84, 0x14 + +gUnknown_0860DE98:: @ 860DE98 + .incbin "baserom.gba", 0x60de98, 0x10 + +gUnknown_0860DEA8:: @ 860DEA8 + .incbin "baserom.gba", 0x60dea8, 0x10 + +gUnknown_0860DEB8:: @ 860DEB8 + .incbin "baserom.gba", 0x60deb8, 0xb68 + +gUnknown_0860EA20:: @ 860EA20 + .incbin "baserom.gba", 0x60ea20, 0xc + +gUnknown_0860EA2C:: @ 860EA2C + .incbin "baserom.gba", 0x60ea2c, 0x8 + +gUnknown_0860EA34:: @ 860EA34 + .incbin "baserom.gba", 0x60ea34, 0x18 + +gUnknown_0860EA4C:: @ 860EA4C + .incbin "baserom.gba", 0x60ea4c, 0x20 + +gUnknown_0860EA6C:: @ 860EA6C + .incbin "baserom.gba", 0x60ea6c, 0x100 + +gUnknown_0860EB6C:: @ 860EB6C + .incbin "baserom.gba", 0x60eb6c, 0x20 + +gUnknown_0860EB8C:: @ 860EB8C + .incbin "baserom.gba", 0x60eb8c, 0x3e4 + +gUnknown_0860EF70:: @ 860EF70 + .incbin "baserom.gba", 0x60ef70, 0x8 + +gUnknown_0860EF78:: @ 860EF78 + .incbin "baserom.gba", 0x60ef78, 0x20 + +gUnknown_0860EF98:: @ 860EF98 + .incbin "baserom.gba", 0x60ef98, 0x8 + +gUnknown_0860EFA0:: @ 860EFA0 + .incbin "baserom.gba", 0x60efa0, 0xc + +gUnknown_0860EFAC:: @ 860EFAC + .incbin "baserom.gba", 0x60efac, 0x18 + +gUnknown_0860EFC4:: @ 860EFC4 + .incbin "baserom.gba", 0x60efc4, 0x30 + +gUnknown_0860EFF4:: @ 860EFF4 + .incbin "baserom.gba", 0x60eff4, 0x1c + +gUnknown_0860F010:: @ 860F010 + .incbin "baserom.gba", 0x60f010, 0x10 + +gUnknown_0860F020:: @ 860F020 + .incbin "baserom.gba", 0x60f020, 0x54 diff --git a/data/battle_frontier_2.s b/data/battle_frontier_2.s new file mode 100644 index 000000000..44c14f520 --- /dev/null +++ b/data/battle_frontier_2.s @@ -0,0 +1,347 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0860F13C:: @ 860F13C + .incbin "baserom.gba", 0x60f13c, 0x1100 + +gUnknown_0861023C:: @ 861023C + .incbin "baserom.gba", 0x61023c, 0x100 + +gUnknown_0861033C:: @ 861033C + .incbin "baserom.gba", 0x61033c, 0x60 + +gUnknown_0861039C:: @ 861039C + .incbin "baserom.gba", 0x61039c, 0x20 + +gUnknown_086103BC:: @ 86103BC + .incbin "baserom.gba", 0x6103bc, 0x28 + +gUnknown_086103E4:: @ 86103E4 + .incbin "baserom.gba", 0x6103e4, 0x10 + +gUnknown_086103F4:: @ 86103F4 + .incbin "baserom.gba", 0x6103f4, 0x28 + +gUnknown_0861041C:: @ 861041C + .incbin "baserom.gba", 0x61041c, 0xc + +gUnknown_08610428:: @ 8610428 + .incbin "baserom.gba", 0x610428, 0xc + +gUnknown_08610434:: @ 8610434 + .incbin "baserom.gba", 0x610434, 0x38 + +gUnknown_0861046C:: @ 861046C + .incbin "baserom.gba", 0x61046c, 0xa + +gUnknown_08610476:: @ 8610476 + .incbin "baserom.gba", 0x610476, 0x3 + +gUnknown_08610479:: @ 8610479 + .incbin "baserom.gba", 0x610479, 0x15f + +gUnknown_086105D8:: @ 86105D8 + .incbin "baserom.gba", 0x6105d8, 0x18 + +gUnknown_086105F0:: @ 86105F0 + .incbin "baserom.gba", 0x6105f0, 0x18 + +gUnknown_08610608:: @ 8610608 + .incbin "baserom.gba", 0x610608, 0x18 + +gUnknown_08610620:: @ 8610620 + .incbin "baserom.gba", 0x610620, 0x18 + +gUnknown_08610638:: @ 8610638 + .incbin "baserom.gba", 0x610638, 0x18 + +gUnknown_08610650:: @ 8610650 + .incbin "baserom.gba", 0x610650, 0x50 + +gUnknown_086106A0:: @ 86106A0 + .incbin "baserom.gba", 0x6106a0, 0x10 + +gUnknown_086106B0:: @ 86106B0 + .incbin "baserom.gba", 0x6106b0, 0x184 + +gUnknown_08610834:: @ 8610834 + .incbin "baserom.gba", 0x610834, 0x18 + +gUnknown_0861084C:: @ 861084C + .incbin "baserom.gba", 0x61084c, 0x18 + +gUnknown_08610864:: @ 8610864 + .incbin "baserom.gba", 0x610864, 0x18 + +gUnknown_0861087C:: @ 861087C + .incbin "baserom.gba", 0x61087c, 0x18 + +gUnknown_08610894:: @ 8610894 + .incbin "baserom.gba", 0x610894, 0x18 + +gUnknown_086108AC:: @ 86108AC + .incbin "baserom.gba", 0x6108ac, 0xc + +gUnknown_086108B8:: @ 86108B8 + .incbin "baserom.gba", 0x6108b8, 0x10 + +gUnknown_086108C8:: @ 86108C8 + .incbin "baserom.gba", 0x6108c8, 0x50 + +gUnknown_08610918:: @ 8610918 + .incbin "baserom.gba", 0x610918, 0xa + +gUnknown_08610922:: @ 8610922 + .incbin "baserom.gba", 0x610922, 0x3 + +gUnknown_08610925:: @ 8610925 + .incbin "baserom.gba", 0x610925, 0x3 + +gUnknown_08610928:: @ 8610928 + .incbin "baserom.gba", 0x610928, 0x20 + +gUnknown_08610948:: @ 8610948 + .incbin "baserom.gba", 0x610948, 0x28 + +gUnknown_08610970:: @ 8610970 + .incbin "baserom.gba", 0x610970, 0x34 + +gUnknown_086109A4:: @ 86109A4 + .incbin "baserom.gba", 0x6109a4, 0x16 + +gUnknown_086109BA:: @ 86109BA + .incbin "baserom.gba", 0x6109ba, 0x536 + +gUnknown_08610EF0:: @ 8610EF0 + .incbin "baserom.gba", 0x610ef0, 0x100 + +gUnknown_08610FF0:: @ 8610FF0 + .incbin "baserom.gba", 0x610ff0, 0x80 + +gUnknown_08611070:: @ 8611070 + .incbin "baserom.gba", 0x611070, 0x140 + +gUnknown_086111B0:: @ 86111B0 + .incbin "baserom.gba", 0x6111b0, 0x80 + +gUnknown_08611230:: @ 8611230 + .incbin "baserom.gba", 0x611230, 0x80 + +gUnknown_086112B0:: @ 86112B0 + .incbin "baserom.gba", 0x6112b0, 0x80 + +gUnknown_08611330:: @ 8611330 + .incbin "baserom.gba", 0x611330, 0x40 + +gUnknown_08611370:: @ 8611370 + .incbin "baserom.gba", 0x611370, 0x163 + +gUnknown_086114D3:: @ 86114D3 + .incbin "baserom.gba", 0x6114d3, 0xd + +gUnknown_086114E0:: @ 86114E0 + .incbin "baserom.gba", 0x6114e0, 0x68 + +gUnknown_08611548:: @ 8611548 + .incbin "baserom.gba", 0x611548, 0x8 + +gUnknown_08611550:: @ 8611550 + .incbin "baserom.gba", 0x611550, 0x1c + +gUnknown_0861156C:: @ 861156C + .incbin "baserom.gba", 0x61156c, 0xc + +gUnknown_08611578:: @ 8611578 + .incbin "baserom.gba", 0x611578, 0x33c + +gUnknown_086118B4:: @ 86118B4 + .incbin "baserom.gba", 0x6118b4, 0x348 + +gUnknown_08611BFC:: @ 8611BFC + .incbin "baserom.gba", 0x611bfc, 0x1c + +gUnknown_08611C18:: @ 8611C18 + .incbin "baserom.gba", 0x611c18, 0x5c + +gUnknown_08611C74:: @ 8611C74 + .incbin "baserom.gba", 0x611c74, 0x8 + +gUnknown_08611C7C:: @ 8611C7C + .incbin "baserom.gba", 0x611c7c, 0x8 + +gUnknown_08611C84:: @ 8611C84 + .incbin "baserom.gba", 0x611c84, 0x8 + +gUnknown_08611C8C:: @ 8611C8C + .incbin "baserom.gba", 0x611c8c, 0xe + +gUnknown_08611C9A:: @ 8611C9A + .incbin "baserom.gba", 0x611c9a, 0x16 + +gUnknown_08611CB0:: @ 8611CB0 + .incbin "baserom.gba", 0x611cb0, 0x50 + +gUnknown_08611D00:: @ 8611D00 + .incbin "baserom.gba", 0x611d00, 0x8 + +gUnknown_08611D08:: @ 8611D08 + .incbin "baserom.gba", 0x611d08, 0x28 + +gUnknown_08611D30:: @ 8611D30 + .incbin "baserom.gba", 0x611d30, 0x80 + +gUnknown_08611DB0:: @ 8611DB0 + .incbin "baserom.gba", 0x611db0, 0x8 + +gUnknown_08611DB8:: @ 8611DB8 + .incbin "baserom.gba", 0x611db8, 0x8 + +@ 8611DC0 + .include "data/battle_frontier/battle_arena_move_mind_ratings.inc" + + .align 2 +@ 8611F24 + .incbin "baserom.gba", 0x611f24, 0x38 + +gUnknown_08611F5C:: @ 8611F5C + .incbin "baserom.gba", 0x611f5c, 0x18 + +gUnknown_08611F74:: @ 8611F74 + .incbin "baserom.gba", 0x611f74, 0x10 + +gUnknown_08611F84:: @ 8611F84 + .incbin "baserom.gba", 0x611f84, 0x1c + +gUnknown_08611FA0:: @ 8611FA0 + .incbin "baserom.gba", 0x611fa0, 0xc + +gUnknown_08611FAC:: @ 8611FAC + .incbin "baserom.gba", 0x611fac, 0x14 + +@ 8611FC0 + .include "data/battle_frontier/battle_factory_style_move_lists.inc" + +gUnknown_08612120:: @ 8612120 + .incbin "baserom.gba", 0x612120, 0x44 + +gUnknown_08612164:: @ 8612164 + .incbin "baserom.gba", 0x612164, 0x10 + +gUnknown_08612174:: @ 8612174 + .incbin "baserom.gba", 0x612174, 0x10 + +gUnknown_08612184:: @ 8612184 + .incbin "baserom.gba", 0x612184, 0x10 + +gUnknown_08612194:: @ 8612194 + .incbin "baserom.gba", 0x612194, 0x180 + +gUnknown_08612314:: @ 8612314 + .incbin "baserom.gba", 0x612314, 0x8 + +gUnknown_0861231C:: @ 861231C + .incbin "baserom.gba", 0x61231c, 0xc8 + +gUnknown_086123E4:: @ 86123E4 + .incbin "baserom.gba", 0x6123e4, 0x1f8 + +gUnknown_086125DC:: @ 86125DC + .incbin "baserom.gba", 0x6125dc, 0x1c + +gUnknown_086125F8:: @ 86125F8 + .incbin "baserom.gba", 0x6125f8, 0x74 + +gUnknown_0861266C:: @ 861266C + .incbin "baserom.gba", 0x61266c, 0x9 + +gUnknown_08612675:: @ 8612675 + .incbin "baserom.gba", 0x612675, 0x13 + +gUnknown_08612688:: @ 8612688 + .incbin "baserom.gba", 0x612688, 0x8 + +gUnknown_08612690:: @ 8612690 + .incbin "baserom.gba", 0x612690, 0x8 + +gUnknown_08612698:: @ 8612698 + .incbin "baserom.gba", 0x612698, 0x4 + +gUnknown_0861269C:: @ 861269C + .incbin "baserom.gba", 0x61269c, 0x4 + +gUnknown_086126A0:: @ 86126A0 + .incbin "baserom.gba", 0x6126a0, 0x4 + +gUnknown_086126A4:: @ 86126A4 + .incbin "baserom.gba", 0x6126a4, 0x4 + +gUnknown_086126A8:: @ 86126A8 + .incbin "baserom.gba", 0x6126a8, 0x2 + +gUnknown_086126AA:: @ 86126AA + .incbin "baserom.gba", 0x6126aa, 0x2 + +gUnknown_086126AC:: @ 86126AC + .incbin "baserom.gba", 0x6126ac, 0x2 + +gUnknown_086126AE:: @ 86126AE + .incbin "baserom.gba", 0x6126ae, 0x2 + +@ 86126B0 + .include "data/battle_frontier/battle_pyramid_level_50_wild_mons.inc" + +@ 8612E80 + .include "data/battle_frontier/battle_pyramid_open_level_wild_mons.inc" + +gUnknown_08613650:: @ 8613650 + .incbin "baserom.gba", 0x613650, 0x5 + +gUnknown_08613655:: @ 8613655 + .incbin "baserom.gba", 0x613655, 0xfb + +gUnknown_08613750:: @ 8613750 + .incbin "baserom.gba", 0x613750, 0x44 + +gUnknown_08613794:: @ 8613794 + .incbin "baserom.gba", 0x613794, 0x8 + +gUnknown_0861379C:: @ 861379C + .incbin "baserom.gba", 0x61379c, 0x190 + +gUnknown_0861392C:: @ 861392C + .incbin "baserom.gba", 0x61392c, 0x190 + +gUnknown_08613ABC:: @ 8613ABC + .incbin "baserom.gba", 0x613abc, 0x7e + +gUnknown_08613B3A:: @ 8613B3A + .incbin "baserom.gba", 0x613b3a, 0xa + +gUnknown_08613B44:: @ 8613B44 + .incbin "baserom.gba", 0x613b44, 0xd8 + +gUnknown_08613C1C:: @ 8613C1C + .incbin "baserom.gba", 0x613c1c, 0x2a4 + +gUnknown_08613EC0:: @ 8613EC0 + .incbin "baserom.gba", 0x613ec0, 0x18 + +gUnknown_08613ED8:: @ 8613ED8 + .incbin "baserom.gba", 0x613ed8, 0x8 + +gUnknown_08613EE0:: @ 8613EE0 + .incbin "baserom.gba", 0x613ee0, 0x48 + +gUnknown_08613F28:: @ 8613F28 + .incbin "baserom.gba", 0x613f28, 0xc + +gUnknown_08613F34:: @ 8613F34 + .incbin "baserom.gba", 0x613f34, 0x12 + +gUnknown_08613F46:: @ 8613F46 + .incbin "baserom.gba", 0x613f46, 0x40 + +gUnknown_08613F86:: @ 8613F86 + .incbin "baserom.gba", 0x613f86, 0xa diff --git a/data/battle_tent.s b/data/battle_tent.s new file mode 100644 index 000000000..0fd1f28ea --- /dev/null +++ b/data/battle_tent.s @@ -0,0 +1,22 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_086160B4:: @ 86160B4 + .incbin "baserom.gba", 0x6160b4, 0x20 + +gUnknown_086160D4:: @ 86160D4 + .incbin "baserom.gba", 0x6160d4, 0x4 + +gUnknown_086160D8:: @ 86160D8 + .incbin "baserom.gba", 0x6160d8, 0x1c + +gUnknown_086160F4:: @ 86160F4 + .incbin "baserom.gba", 0x6160f4, 0x4 + +gUnknown_086160F8:: @ 86160F8 + .incbin "baserom.gba", 0x6160f8, 0x28 + +gUnknown_08616120:: @ 8616120 + .incbin "baserom.gba", 0x616120, 0x4 diff --git a/data/data_emerald.s b/data/data_emerald.s deleted file mode 100644 index f27668217..000000000 --- a/data/data_emerald.s +++ /dev/null @@ -1,958 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - @ This section was decompiled in battle_dome_cards. - @ On its merge, this section should be deleted. - @ This section contains three objects and accounts for 28 bytes. - - .section .rodata - -gUnknown_0860B358:: @ 860B358 - .incbin "baserom.gba", 0x60b358, 0x1630 - -gUnknown_0860C988:: @ 860C988 - .incbin "baserom.gba", 0x60c988, 0x269 - -gUnknown_0860CBF1:: @ 860CBF1 - .incbin "baserom.gba", 0x60cbf1, 0x283 - -gUnknown_0860CE74:: @ 860CE74 - .incbin "baserom.gba", 0x60ce74, 0x10 - -gUnknown_0860CE84:: @ 860CE84 - .incbin "baserom.gba", 0x60ce84, 0x10 - -gUnknown_0860CE94:: @ 860CE94 - .incbin "baserom.gba", 0x60ce94, 0x20 - -gUnknown_0860CEB4:: @ 860CEB4 - .incbin "baserom.gba", 0x60ceb4, 0x90 - -gUnknown_0860CF44:: @ 860CF44 - .incbin "baserom.gba", 0x60cf44, 0xc - -gUnknown_0860CF50:: @ 860CF50 - .incbin "baserom.gba", 0x60cf50, 0x58 - -gUnknown_0860CFA8:: @ 860CFA8 - .incbin "baserom.gba", 0x60cfa8, 0x30 - -gUnknown_0860CFD8:: @ 860CFD8 - .incbin "baserom.gba", 0x60cfd8, 0x30 - -gUnknown_0860D008:: @ 860D008 - .incbin "baserom.gba", 0x60d008, 0x48 - -gUnknown_0860D050:: @ 860D050 - .incbin "baserom.gba", 0x60d050, 0x18 - -gUnknown_0860D068:: @ 860D068 - .incbin "baserom.gba", 0x60d068, 0x18 - -gUnknown_0860D080:: @ 860D080 - .incbin "baserom.gba", 0x60d080, 0x10 - -gUnknown_0860D090:: @ 860D090 - .incbin "baserom.gba", 0x60d090, 0x5c - -gUnknown_0860D0EC:: @ 860D0EC - .incbin "baserom.gba", 0x60d0ec, 0x10 - -gUnknown_0860D0FC:: @ 860D0FC - .incbin "baserom.gba", 0x60d0fc, 0x10 - -gUnknown_0860D10C:: @ 860D10C - .incbin "baserom.gba", 0x60d10c, 0x40 - -gUnknown_0860D14C:: @ 860D14C - .incbin "baserom.gba", 0x60d14c, 0x10 - -gUnknown_0860D15C:: @ 860D15C - .incbin "baserom.gba", 0x60d15c, 0x40 - -gUnknown_0860D19C:: @ 860D19C - .incbin "baserom.gba", 0x60d19c, 0x4 - -gUnknown_0860D1A0:: @ 860D1A0 - .incbin "baserom.gba", 0x60d1a0, 0x20 - -gUnknown_0860D1C0:: @ 860D1C0 - .incbin "baserom.gba", 0x60d1c0, 0x10 - -gUnknown_0860D1D0:: @ 860D1D0 - .incbin "baserom.gba", 0x60d1d0, 0x44 - -gUnknown_0860D214:: @ 860D214 - .incbin "baserom.gba", 0x60d214, 0x80 - -gUnknown_0860D294:: @ 860D294 - .incbin "baserom.gba", 0x60d294, 0xac - -gUnknown_0860D340:: @ 860D340 - .incbin "baserom.gba", 0x60d340, 0x3 - -gUnknown_0860D343:: @ 860D343 - .incbin "baserom.gba", 0x60d343, 0x3 - -gUnknown_0860D346:: @ 860D346 - .incbin "baserom.gba", 0x60d346, 0x3 - -gUnknown_0860D349:: @ 860D349 - .incbin "baserom.gba", 0x60d349, 0x7 - -gUnknown_0860D350:: @ 860D350 - .incbin "baserom.gba", 0x60d350, 0x3c - -gUnknown_0860D38C:: @ 860D38C - .incbin "baserom.gba", 0x60d38c, 0x1c - -gUnknown_0860D3A8:: @ 860D3A8 - .incbin "baserom.gba", 0x60d3a8, 0x3 - -gUnknown_0860D3AB:: @ 860D3AB - .incbin "baserom.gba", 0x60d3ab, 0x3 - -gUnknown_0860D3AE:: @ 860D3AE - .incbin "baserom.gba", 0x60d3ae, 0x3 - -gUnknown_0860D3B1:: @ 860D3B1 - .incbin "baserom.gba", 0x60d3b1, 0x3 - -gUnknown_0860D3B4:: @ 860D3B4 - .incbin "baserom.gba", 0x60d3b4, 0x10 - -gUnknown_0860D3C4:: @ 860D3C4 - .incbin "baserom.gba", 0x60d3c4, 0x2 - -gUnknown_0860D3C6:: @ 860D3C6 - .incbin "baserom.gba", 0x60d3c6, 0x2b - -gUnknown_0860D3F1:: @ 860D3F1 - .incbin "baserom.gba", 0x60d3f1, 0x1 - -gUnknown_0860D3F2:: @ 860D3F2 - .incbin "baserom.gba", 0x60d3f2, 0x1f - -gUnknown_0860D411:: @ 860D411 - .incbin "baserom.gba", 0x60d411, 0x8ff - -gUnknown_0860DD10:: @ 860DD10 - .incbin "baserom.gba", 0x60dd10, 0x100 - -gUnknown_0860DE10:: @ 860DE10 - .incbin "baserom.gba", 0x60de10, 0x40 - -gUnknown_0860DE50:: @ 860DE50 - .incbin "baserom.gba", 0x60de50, 0x28 - -gUnknown_0860DE78:: @ 860DE78 - .incbin "baserom.gba", 0x60de78, 0xc - -gUnknown_0860DE84:: @ 860DE84 - .incbin "baserom.gba", 0x60de84, 0x14 - -gUnknown_0860DE98:: @ 860DE98 - .incbin "baserom.gba", 0x60de98, 0x10 - -gUnknown_0860DEA8:: @ 860DEA8 - .incbin "baserom.gba", 0x60dea8, 0x10 - -gUnknown_0860DEB8:: @ 860DEB8 - .incbin "baserom.gba", 0x60deb8, 0xb68 - -gUnknown_0860EA20:: @ 860EA20 - .incbin "baserom.gba", 0x60ea20, 0xc - -gUnknown_0860EA2C:: @ 860EA2C - .incbin "baserom.gba", 0x60ea2c, 0x8 - -gUnknown_0860EA34:: @ 860EA34 - .incbin "baserom.gba", 0x60ea34, 0x18 - -gUnknown_0860EA4C:: @ 860EA4C - .incbin "baserom.gba", 0x60ea4c, 0x20 - -gUnknown_0860EA6C:: @ 860EA6C - .incbin "baserom.gba", 0x60ea6c, 0x100 - -gUnknown_0860EB6C:: @ 860EB6C - .incbin "baserom.gba", 0x60eb6c, 0x20 - -gUnknown_0860EB8C:: @ 860EB8C - .incbin "baserom.gba", 0x60eb8c, 0x3e4 - -gUnknown_0860EF70:: @ 860EF70 - .incbin "baserom.gba", 0x60ef70, 0x8 - -gUnknown_0860EF78:: @ 860EF78 - .incbin "baserom.gba", 0x60ef78, 0x20 - -gUnknown_0860EF98:: @ 860EF98 - .incbin "baserom.gba", 0x60ef98, 0x8 - -gUnknown_0860EFA0:: @ 860EFA0 - .incbin "baserom.gba", 0x60efa0, 0xc - -gUnknown_0860EFAC:: @ 860EFAC - .incbin "baserom.gba", 0x60efac, 0x18 - -gUnknown_0860EFC4:: @ 860EFC4 - .incbin "baserom.gba", 0x60efc4, 0x30 - -gUnknown_0860EFF4:: @ 860EFF4 - .incbin "baserom.gba", 0x60eff4, 0x1c - -gUnknown_0860F010:: @ 860F010 - .incbin "baserom.gba", 0x60f010, 0x10 - -gUnknown_0860F020:: @ 860F020 - .incbin "baserom.gba", 0x60f020, 0x54 - -gUnknown_0860F074:: @ 860F074 - .incbin "baserom.gba", 0x60f074, 0x20 - -gUnknown_0860F094:: @ 860F094 - .incbin "baserom.gba", 0x60f094, 0x4 - -gUnknown_0860F098:: @ 860F098 - .incbin "baserom.gba", 0x60f098, 0x10 - -gUnknown_0860F0A8:: @ 860F0A8 - .incbin "baserom.gba", 0x60f0a8, 0x8 - -gUnknown_0860F0B0:: @ 860F0B0 - .incbin "baserom.gba", 0x60f0b0, 0x20 - -gUnknown_0860F0D0:: @ 860F0D0 - .incbin "baserom.gba", 0x60f0d0, 0x4 - -gUnknown_0860F0D4:: @ 860F0D4 - .incbin "baserom.gba", 0x60f0d4, 0x68 - -gUnknown_0860F13C:: @ 860F13C - .incbin "baserom.gba", 0x60f13c, 0x1100 - -gUnknown_0861023C:: @ 861023C - .incbin "baserom.gba", 0x61023c, 0x100 - -gUnknown_0861033C:: @ 861033C - .incbin "baserom.gba", 0x61033c, 0x60 - -gUnknown_0861039C:: @ 861039C - .incbin "baserom.gba", 0x61039c, 0x20 - -gUnknown_086103BC:: @ 86103BC - .incbin "baserom.gba", 0x6103bc, 0x28 - -gUnknown_086103E4:: @ 86103E4 - .incbin "baserom.gba", 0x6103e4, 0x10 - -gUnknown_086103F4:: @ 86103F4 - .incbin "baserom.gba", 0x6103f4, 0x28 - -gUnknown_0861041C:: @ 861041C - .incbin "baserom.gba", 0x61041c, 0xc - -gUnknown_08610428:: @ 8610428 - .incbin "baserom.gba", 0x610428, 0xc - -gUnknown_08610434:: @ 8610434 - .incbin "baserom.gba", 0x610434, 0x38 - -gUnknown_0861046C:: @ 861046C - .incbin "baserom.gba", 0x61046c, 0xa - -gUnknown_08610476:: @ 8610476 - .incbin "baserom.gba", 0x610476, 0x3 - -gUnknown_08610479:: @ 8610479 - .incbin "baserom.gba", 0x610479, 0x15f - -gUnknown_086105D8:: @ 86105D8 - .incbin "baserom.gba", 0x6105d8, 0x18 - -gUnknown_086105F0:: @ 86105F0 - .incbin "baserom.gba", 0x6105f0, 0x18 - -gUnknown_08610608:: @ 8610608 - .incbin "baserom.gba", 0x610608, 0x18 - -gUnknown_08610620:: @ 8610620 - .incbin "baserom.gba", 0x610620, 0x18 - -gUnknown_08610638:: @ 8610638 - .incbin "baserom.gba", 0x610638, 0x18 - -gUnknown_08610650:: @ 8610650 - .incbin "baserom.gba", 0x610650, 0x50 - -gUnknown_086106A0:: @ 86106A0 - .incbin "baserom.gba", 0x6106a0, 0x10 - -gUnknown_086106B0:: @ 86106B0 - .incbin "baserom.gba", 0x6106b0, 0x184 - -gUnknown_08610834:: @ 8610834 - .incbin "baserom.gba", 0x610834, 0x18 - -gUnknown_0861084C:: @ 861084C - .incbin "baserom.gba", 0x61084c, 0x18 - -gUnknown_08610864:: @ 8610864 - .incbin "baserom.gba", 0x610864, 0x18 - -gUnknown_0861087C:: @ 861087C - .incbin "baserom.gba", 0x61087c, 0x18 - -gUnknown_08610894:: @ 8610894 - .incbin "baserom.gba", 0x610894, 0x18 - -gUnknown_086108AC:: @ 86108AC - .incbin "baserom.gba", 0x6108ac, 0xc - -gUnknown_086108B8:: @ 86108B8 - .incbin "baserom.gba", 0x6108b8, 0x10 - -gUnknown_086108C8:: @ 86108C8 - .incbin "baserom.gba", 0x6108c8, 0x50 - -gUnknown_08610918:: @ 8610918 - .incbin "baserom.gba", 0x610918, 0xa - -gUnknown_08610922:: @ 8610922 - .incbin "baserom.gba", 0x610922, 0x3 - -gUnknown_08610925:: @ 8610925 - .incbin "baserom.gba", 0x610925, 0x3 - -gUnknown_08610928:: @ 8610928 - .incbin "baserom.gba", 0x610928, 0x20 - -gUnknown_08610948:: @ 8610948 - .incbin "baserom.gba", 0x610948, 0x28 - -gUnknown_08610970:: @ 8610970 - .incbin "baserom.gba", 0x610970, 0x34 - -gUnknown_086109A4:: @ 86109A4 - .incbin "baserom.gba", 0x6109a4, 0x16 - -gUnknown_086109BA:: @ 86109BA - .incbin "baserom.gba", 0x6109ba, 0x536 - -gUnknown_08610EF0:: @ 8610EF0 - .incbin "baserom.gba", 0x610ef0, 0x100 - -gUnknown_08610FF0:: @ 8610FF0 - .incbin "baserom.gba", 0x610ff0, 0x80 - -gUnknown_08611070:: @ 8611070 - .incbin "baserom.gba", 0x611070, 0x140 - -gUnknown_086111B0:: @ 86111B0 - .incbin "baserom.gba", 0x6111b0, 0x80 - -gUnknown_08611230:: @ 8611230 - .incbin "baserom.gba", 0x611230, 0x80 - -gUnknown_086112B0:: @ 86112B0 - .incbin "baserom.gba", 0x6112b0, 0x80 - -gUnknown_08611330:: @ 8611330 - .incbin "baserom.gba", 0x611330, 0x40 - -gUnknown_08611370:: @ 8611370 - .incbin "baserom.gba", 0x611370, 0x163 - -gUnknown_086114D3:: @ 86114D3 - .incbin "baserom.gba", 0x6114d3, 0xd - -gUnknown_086114E0:: @ 86114E0 - .incbin "baserom.gba", 0x6114e0, 0x68 - -gUnknown_08611548:: @ 8611548 - .incbin "baserom.gba", 0x611548, 0x8 - -gUnknown_08611550:: @ 8611550 - .incbin "baserom.gba", 0x611550, 0x1c - -gUnknown_0861156C:: @ 861156C - .incbin "baserom.gba", 0x61156c, 0xc - -gUnknown_08611578:: @ 8611578 - .incbin "baserom.gba", 0x611578, 0x33c - -gUnknown_086118B4:: @ 86118B4 - .incbin "baserom.gba", 0x6118b4, 0x348 - -gUnknown_08611BFC:: @ 8611BFC - .incbin "baserom.gba", 0x611bfc, 0x1c - -gUnknown_08611C18:: @ 8611C18 - .incbin "baserom.gba", 0x611c18, 0x5c - -gUnknown_08611C74:: @ 8611C74 - .incbin "baserom.gba", 0x611c74, 0x8 - -gUnknown_08611C7C:: @ 8611C7C - .incbin "baserom.gba", 0x611c7c, 0x8 - -gUnknown_08611C84:: @ 8611C84 - .incbin "baserom.gba", 0x611c84, 0x8 - -gUnknown_08611C8C:: @ 8611C8C - .incbin "baserom.gba", 0x611c8c, 0xe - -gUnknown_08611C9A:: @ 8611C9A - .incbin "baserom.gba", 0x611c9a, 0x16 - -gUnknown_08611CB0:: @ 8611CB0 - .incbin "baserom.gba", 0x611cb0, 0x50 - -gUnknown_08611D00:: @ 8611D00 - .incbin "baserom.gba", 0x611d00, 0x8 - -gUnknown_08611D08:: @ 8611D08 - .incbin "baserom.gba", 0x611d08, 0x28 - -gUnknown_08611D30:: @ 8611D30 - .incbin "baserom.gba", 0x611d30, 0x80 - -gUnknown_08611DB0:: @ 8611DB0 - .incbin "baserom.gba", 0x611db0, 0x8 - -gUnknown_08611DB8:: @ 8611DB8 - .incbin "baserom.gba", 0x611db8, 0x8 - -@ 8611DC0 - .include "data/battle_frontier/battle_arena_move_mind_ratings.inc" - - .align 2 -@ 8611F24 - .incbin "baserom.gba", 0x611f24, 0x38 - -gUnknown_08611F5C:: @ 8611F5C - .incbin "baserom.gba", 0x611f5c, 0x18 - -gUnknown_08611F74:: @ 8611F74 - .incbin "baserom.gba", 0x611f74, 0x10 - -gUnknown_08611F84:: @ 8611F84 - .incbin "baserom.gba", 0x611f84, 0x1c - -gUnknown_08611FA0:: @ 8611FA0 - .incbin "baserom.gba", 0x611fa0, 0xc - -gUnknown_08611FAC:: @ 8611FAC - .incbin "baserom.gba", 0x611fac, 0x14 - -@ 8611FC0 - .include "data/battle_frontier/battle_factory_style_move_lists.inc" - -gUnknown_08612120:: @ 8612120 - .incbin "baserom.gba", 0x612120, 0x44 - -gUnknown_08612164:: @ 8612164 - .incbin "baserom.gba", 0x612164, 0x10 - -gUnknown_08612174:: @ 8612174 - .incbin "baserom.gba", 0x612174, 0x10 - -gUnknown_08612184:: @ 8612184 - .incbin "baserom.gba", 0x612184, 0x10 - -gUnknown_08612194:: @ 8612194 - .incbin "baserom.gba", 0x612194, 0x180 - -gUnknown_08612314:: @ 8612314 - .incbin "baserom.gba", 0x612314, 0x8 - -gUnknown_0861231C:: @ 861231C - .incbin "baserom.gba", 0x61231c, 0xc8 - -gUnknown_086123E4:: @ 86123E4 - .incbin "baserom.gba", 0x6123e4, 0x1f8 - -gUnknown_086125DC:: @ 86125DC - .incbin "baserom.gba", 0x6125dc, 0x1c - -gUnknown_086125F8:: @ 86125F8 - .incbin "baserom.gba", 0x6125f8, 0x74 - -gUnknown_0861266C:: @ 861266C - .incbin "baserom.gba", 0x61266c, 0x9 - -gUnknown_08612675:: @ 8612675 - .incbin "baserom.gba", 0x612675, 0x13 - -gUnknown_08612688:: @ 8612688 - .incbin "baserom.gba", 0x612688, 0x8 - -gUnknown_08612690:: @ 8612690 - .incbin "baserom.gba", 0x612690, 0x8 - -gUnknown_08612698:: @ 8612698 - .incbin "baserom.gba", 0x612698, 0x4 - -gUnknown_0861269C:: @ 861269C - .incbin "baserom.gba", 0x61269c, 0x4 - -gUnknown_086126A0:: @ 86126A0 - .incbin "baserom.gba", 0x6126a0, 0x4 - -gUnknown_086126A4:: @ 86126A4 - .incbin "baserom.gba", 0x6126a4, 0x4 - -gUnknown_086126A8:: @ 86126A8 - .incbin "baserom.gba", 0x6126a8, 0x2 - -gUnknown_086126AA:: @ 86126AA - .incbin "baserom.gba", 0x6126aa, 0x2 - -gUnknown_086126AC:: @ 86126AC - .incbin "baserom.gba", 0x6126ac, 0x2 - -gUnknown_086126AE:: @ 86126AE - .incbin "baserom.gba", 0x6126ae, 0x2 - -@ 86126B0 - .include "data/battle_frontier/battle_pyramid_level_50_wild_mons.inc" - -@ 8612E80 - .include "data/battle_frontier/battle_pyramid_open_level_wild_mons.inc" - -gUnknown_08613650:: @ 8613650 - .incbin "baserom.gba", 0x613650, 0x5 - -gUnknown_08613655:: @ 8613655 - .incbin "baserom.gba", 0x613655, 0xfb - -gUnknown_08613750:: @ 8613750 - .incbin "baserom.gba", 0x613750, 0x44 - -gUnknown_08613794:: @ 8613794 - .incbin "baserom.gba", 0x613794, 0x8 - -gUnknown_0861379C:: @ 861379C - .incbin "baserom.gba", 0x61379c, 0x190 - -gUnknown_0861392C:: @ 861392C - .incbin "baserom.gba", 0x61392c, 0x190 - -gUnknown_08613ABC:: @ 8613ABC - .incbin "baserom.gba", 0x613abc, 0x7e - -gUnknown_08613B3A:: @ 8613B3A - .incbin "baserom.gba", 0x613b3a, 0xa - -gUnknown_08613B44:: @ 8613B44 - .incbin "baserom.gba", 0x613b44, 0xd8 - -gUnknown_08613C1C:: @ 8613C1C - .incbin "baserom.gba", 0x613c1c, 0x2a4 - -gUnknown_08613EC0:: @ 8613EC0 - .incbin "baserom.gba", 0x613ec0, 0x18 - -gUnknown_08613ED8:: @ 8613ED8 - .incbin "baserom.gba", 0x613ed8, 0x8 - -gUnknown_08613EE0:: @ 8613EE0 - .incbin "baserom.gba", 0x613ee0, 0x48 - -gUnknown_08613F28:: @ 8613F28 - .incbin "baserom.gba", 0x613f28, 0xc - -gUnknown_08613F34:: @ 8613F34 - .incbin "baserom.gba", 0x613f34, 0x12 - -gUnknown_08613F46:: @ 8613F46 - .incbin "baserom.gba", 0x613f46, 0x40 - -gUnknown_08613F86:: @ 8613F86 - .incbin "baserom.gba", 0x613f86, 0xa - -gUnknown_08613F90:: @ 8613F90 - .incbin "baserom.gba", 0x613f90, 0xc - -gUnknown_08613F9C:: @ 8613F9C - .incbin "baserom.gba", 0x613f9c, 0x18 - -gUnknown_08613FB4:: @ 8613FB4 - .incbin "baserom.gba", 0x613fb4, 0x78 - -gUnknown_0861402C:: @ 861402C - .incbin "baserom.gba", 0x61402c, 0x4 - -gUnknown_08614030:: @ 8614030 - .incbin "baserom.gba", 0x614030, 0x4 - -gUnknown_08614034:: @ 8614034 - .incbin "baserom.gba", 0x614034, 0x4 - -gUnknown_08614038:: @ 8614038 - .incbin "baserom.gba", 0x614038, 0x4 - -gUnknown_0861403C:: @ 861403C - .incbin "baserom.gba", 0x61403c, 0x6 - -gUnknown_08614042:: @ 8614042 - .incbin "baserom.gba", 0x614042, 0x2 - -gUnknown_08614044:: @ 8614044 - .incbin "baserom.gba", 0x614044, 0x2 - -gUnknown_08614046:: @ 8614046 - .incbin "baserom.gba", 0x614046, 0x1 - -gUnknown_08614047:: @ 8614047 - .incbin "baserom.gba", 0x614047, 0x4 - -gUnknown_0861404B:: @ 861404B - .incbin "baserom.gba", 0x61404b, 0x2 - -gUnknown_0861404D:: @ 861404D - .incbin "baserom.gba", 0x61404d, 0x2 - -gUnknown_0861404F:: @ 861404F - .incbin "baserom.gba", 0x61404f, 0x5 - -gUnknown_08614054:: @ 8614054 - .incbin "baserom.gba", 0x614054, 0x30 - -gUnknown_08614084:: @ 8614084 - .incbin "baserom.gba", 0x614084, 0x8 - -gUnknown_0861408C:: @ 861408C - .incbin "baserom.gba", 0x61408c, 0x8 - -gUnknown_08614094:: @ 8614094 - .incbin "baserom.gba", 0x614094, 0x10 - -gUnknown_086140A4:: @ 86140A4 - .incbin "baserom.gba", 0x6140a4, 0xc0 - -gUnknown_08614164:: @ 8614164 - .incbin "baserom.gba", 0x614164, 0x10 - -gUnknown_08614174:: @ 8614174 - .incbin "baserom.gba", 0x614174, 0x38 - -gUnknown_086141AC:: @ 86141AC - .incbin "baserom.gba", 0x6141ac, 0x50 - -gUnknown_086141FC:: @ 86141FC - .incbin "baserom.gba", 0x6141fc, 0x48 - -gUnknown_08614244:: @ 8614244 - .incbin "baserom.gba", 0x614244, 0x18 - -gUnknown_0861425C:: @ 861425C - .incbin "baserom.gba", 0x61425c, 0x4 - -gUnknown_08614260:: @ 8614260 - .incbin "baserom.gba", 0x614260, 0x4 - -gUnknown_08614264:: @ 8614264 - .incbin "baserom.gba", 0x614264, 0x4 - -gUnknown_08614268:: @ 8614268 - .incbin "baserom.gba", 0x614268, 0x4 - -gUnknown_0861426C:: @ 861426C - .incbin "baserom.gba", 0x61426c, 0x4 - -gUnknown_08614270:: @ 8614270 - .incbin "baserom.gba", 0x614270, 0x4 - -gUnknown_08614274:: @ 8614274 - .incbin "baserom.gba", 0x614274, 0x4 - -gUnknown_08614278:: @ 8614278 - .incbin "baserom.gba", 0x614278, 0x18 - -gUnknown_08614290:: @ 8614290 - .incbin "baserom.gba", 0x614290, 0x18 - -gUnknown_086142A8:: @ 86142A8 - .incbin "baserom.gba", 0x6142a8, 0x20 - -gUnknown_086142C8:: @ 86142C8 - .incbin "baserom.gba", 0x6142c8, 0x70 - -gUnknown_08614338:: @ 8614338 - .incbin "baserom.gba", 0x614338, 0x40 - -gUnknown_08614378:: @ 8614378 - .incbin "baserom.gba", 0x614378, 0x44 - -gUnknown_086143BC:: @ 86143BC - .incbin "baserom.gba", 0x6143bc, 0x4e - -gUnknown_0861440A:: @ 861440A - .incbin "baserom.gba", 0x61440a, 0x4 - -gUnknown_0861440E:: @ 861440E - .incbin "baserom.gba", 0x61440e, 0x2 - -@ 8614410 - .include "data/graphics/items/item_icon_table.inc" - -@ 8614FE0 - .incbin "baserom.gba", 0x614fe0, 0x14 - -gUnknown_08614FF4:: @ 8614FF4 - .incbin "baserom.gba", 0x614ff4, 0x18 - -gUnknown_0861500C:: @ 861500C - .incbin "baserom.gba", 0x61500c, 0x3c - -gUnknown_08615048:: @ 8615048 - .incbin "baserom.gba", 0x615048, 0x670 - -gUnknown_086156B8:: @ 86156B8 - .incbin "baserom.gba", 0x6156b8, 0x2c - -gUnknown_086156E4:: @ 86156E4 - .incbin "baserom.gba", 0x6156e4, 0x20 - -gUnknown_08615704:: @ 8615704 - .incbin "baserom.gba", 0x615704, 0xc0 - -gUnknown_086157C4:: @ 86157C4 - .incbin "baserom.gba", 0x6157c4, 0x1c - -gUnknown_086157E0:: @ 86157E0 - .incbin "baserom.gba", 0x6157e0, 0x1c - -gUnknown_086157FC:: @ 86157FC - .incbin "baserom.gba", 0x6157fc, 0x14 - -gUnknown_08615810:: @ 8615810 - .incbin "baserom.gba", 0x615810, 0x40 - -gUnknown_08615850:: @ 8615850 - .incbin "baserom.gba", 0x615850, 0x40 - -gUnknown_08615890:: @ 8615890 - .incbin "baserom.gba", 0x615890, 0x40 - -gUnknown_086158D0:: @ 86158D0 - .incbin "baserom.gba", 0x6158d0, 0x38 - -gUnknown_08615908:: @ 8615908 - .incbin "baserom.gba", 0x615908, 0x8 - -gUnknown_08615910:: @ 8615910 - .incbin "baserom.gba", 0x615910, 0x8 - -gUnknown_08615918:: @ 8615918 - .incbin "baserom.gba", 0x615918, 0x8 - -gUnknown_08615920:: @ 8615920 - .incbin "baserom.gba", 0x615920, 0x8 - -gUnknown_08615928:: @ 8615928 - .incbin "baserom.gba", 0x615928, 0x8 - -gUnknown_08615930:: @ 8615930 - .incbin "baserom.gba", 0x615930, 0x8 - -gUnknown_08615938:: @ 8615938 - .incbin "baserom.gba", 0x615938, 0x8 - -gUnknown_08615940:: @ 8615940 - .incbin "baserom.gba", 0x615940, 0x8 - -gUnknown_08615948:: @ 8615948 - .incbin "baserom.gba", 0x615948, 0x8 - -gUnknown_08615950:: @ 8615950 - .incbin "baserom.gba", 0x615950, 0x8 - -gUnknown_08615958:: @ 8615958 - .incbin "baserom.gba", 0x615958, 0x8 - -gUnknown_08615960:: @ 8615960 - .incbin "baserom.gba", 0x615960, 0x8 - -gUnknown_08615968:: @ 8615968 - .incbin "baserom.gba", 0x615968, 0x8 - -gUnknown_08615970:: @ 8615970 - .incbin "baserom.gba", 0x615970, 0x18 - -gUnknown_08615988:: @ 8615988 - .incbin "baserom.gba", 0x615988, 0x46 - -gUnknown_086159CE:: @ 86159CE - .incbin "baserom.gba", 0x6159ce, 0x46 - -gUnknown_08615A14:: @ 8615A14 - .incbin "baserom.gba", 0x615a14, 0x36 - -gUnknown_08615A4A:: @ 8615A4A - .incbin "baserom.gba", 0x615a4a, 0x36 - -gUnknown_08615A80:: @ 8615A80 - .incbin "baserom.gba", 0x615a80, 0x36 - -gUnknown_08615AB6:: @ 8615AB6 - .incbin "baserom.gba", 0x615ab6, 0x2 - -gUnknown_08615AB8:: @ 8615AB8 - .incbin "baserom.gba", 0x615ab8, 0x2 - -gUnknown_08615ABA:: @ 8615ABA - .incbin "baserom.gba", 0x615aba, 0x3 - -gUnknown_08615ABD:: @ 8615ABD - .incbin "baserom.gba", 0x615abd, 0x3 - -gUnknown_08615AC0:: @ 8615AC0 - .incbin "baserom.gba", 0x615ac0, 0x3 - -gUnknown_08615AC3:: @ 8615AC3 - .incbin "baserom.gba", 0x615ac3, 0x2 - -gUnknown_08615AC5:: @ 8615AC5 - .incbin "baserom.gba", 0x615ac5, 0x2 - -gUnknown_08615AC7:: @ 8615AC7 - .incbin "baserom.gba", 0x615ac7, 0x2 - -gUnknown_08615AC9:: @ 8615AC9 - .incbin "baserom.gba", 0x615ac9, 0x2 - -gUnknown_08615ACB:: @ 8615ACB - .incbin "baserom.gba", 0x615acb, 0x2 - -gUnknown_08615ACD:: @ 8615ACD - .incbin "baserom.gba", 0x615acd, 0x3 - -gUnknown_08615AD0:: @ 8615AD0 - .incbin "baserom.gba", 0x615ad0, 0x3 - -gUnknown_08615AD3:: @ 8615AD3 - .incbin "baserom.gba", 0x615ad3, 0x3 - -gUnknown_08615AD6:: @ 8615AD6 - .incbin "baserom.gba", 0x615ad6, 0x3 - -gUnknown_08615AD9:: @ 8615AD9 - .incbin "baserom.gba", 0x615ad9, 0x3 - -gUnknown_08615ADC:: @ 8615ADC - .incbin "baserom.gba", 0x615adc, 0x3 - -gUnknown_08615ADF:: @ 8615ADF - .incbin "baserom.gba", 0x615adf, 0x3 - -gUnknown_08615AE2:: @ 8615AE2 - .incbin "baserom.gba", 0x615ae2, 0x3 - -gUnknown_08615AE5:: @ 8615AE5 - .incbin "baserom.gba", 0x615ae5, 0x3 - -gUnknown_08615AE8:: @ 8615AE8 - .incbin "baserom.gba", 0x615ae8, 0x3 - -gUnknown_08615AEB:: @ 8615AEB - .incbin "baserom.gba", 0x615aeb, 0x3 - -gUnknown_08615AEE:: @ 8615AEE - .incbin "baserom.gba", 0x615aee, 0x3 - -gUnknown_08615AF1:: @ 8615AF1 - .incbin "baserom.gba", 0x615af1, 0x3 - -gUnknown_08615AF4:: @ 8615AF4 - .incbin "baserom.gba", 0x615af4, 0x6c - -gUnknown_08615B60:: @ 8615B60 - .incbin "baserom.gba", 0x615b60, 0xa8 - -gUnknown_08615C08:: @ 8615C08 - .incbin "baserom.gba", 0x615c08, 0x130 - -gUnknown_08615D38:: @ 8615D38 - .incbin "baserom.gba", 0x615d38, 0x38 - -gUnknown_08615D70:: @ 8615D70 - .incbin "baserom.gba", 0x615d70, 0xe - -gUnknown_08615D7E:: @ 8615D7E - .incbin "baserom.gba", 0x615d7e, 0x1e - -gUnknown_08615D9C:: @ 8615D9C - .incbin "baserom.gba", 0x615d9c, 0x70 - -gUnknown_08615E0C:: @ 8615E0C - .incbin "baserom.gba", 0x615e0c, 0xa4 - -gUnknown_08615EB0:: @ 8615EB0 - .incbin "baserom.gba", 0x615eb0, 0x8 - -gUnknown_08615EB8:: @ 8615EB8 - .incbin "baserom.gba", 0x615eb8, 0x8 - -gUnknown_08615EC0:: @ 8615EC0 - .incbin "baserom.gba", 0x615ec0, 0x38 - -gUnknown_08615EF8:: @ 8615EF8 - .incbin "baserom.gba", 0x615ef8, 0x8 - -gUnknown_08615F00:: @ 8615F00 - .incbin "baserom.gba", 0x615f00, 0x8 - -gUnknown_08615F08:: @ 8615F08 - .incbin "baserom.gba", 0x615f08, 0x68 - -gUnknown_08615F70:: @ 8615F70 - .incbin "baserom.gba", 0x615f70, 0x8 - -gUnknown_08615F78:: @ 8615F78 - .incbin "baserom.gba", 0x615f78, 0x80 - -gUnknown_08615FF8:: @ 8615FF8 - .incbin "baserom.gba", 0x615ff8, 0x8 - -gUnknown_08616000:: @ 8616000 - .incbin "baserom.gba", 0x616000, 0x8 - -gUnknown_08616008:: @ 8616008 - .incbin "baserom.gba", 0x616008, 0x18 - -gUnknown_08616020:: @ 8616020 - .incbin "baserom.gba", 0x616020, 0x20 - -gUnknown_08616040:: @ 8616040 - .incbin "baserom.gba", 0x616040, 0x74 - -gUnknown_086160B4:: @ 86160B4 - .incbin "baserom.gba", 0x6160b4, 0x20 - -gUnknown_086160D4:: @ 86160D4 - .incbin "baserom.gba", 0x6160d4, 0x4 - -gUnknown_086160D8:: @ 86160D8 - .incbin "baserom.gba", 0x6160d8, 0x1c - -gUnknown_086160F4:: @ 86160F4 - .incbin "baserom.gba", 0x6160f4, 0x4 - -gUnknown_086160F8:: @ 86160F8 - .incbin "baserom.gba", 0x6160f8, 0x28 - -gUnknown_08616120:: @ 8616120 - .incbin "baserom.gba", 0x616120, 0x4 - -gUnknown_08616124:: @ 8616124 - .incbin "baserom.gba", 0x616124, 0x4 - - .align 2 -gFont6BrailleGlyphs:: @ 8616128 - .incbin "data/graphics/fonts/font6.fwjpnfont" - -gUnknown_08617128:: @ 8617128 - .incbin "baserom.gba", 0x617128, 0x48 diff --git a/data/item_icon.s b/data/item_icon.s new file mode 100644 index 000000000..dac00dc6c --- /dev/null +++ b/data/item_icon.s @@ -0,0 +1,13 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +@ 8614410 + .include "data/graphics/items/item_icon_table.inc" + +@ 8614FE0 + .incbin "baserom.gba", 0x614fe0, 0x14 + +gUnknown_08614FF4:: @ 8614FF4 + .incbin "baserom.gba", 0x614ff4, 0x18 diff --git a/data/item_menu.s b/data/item_menu.s new file mode 100644 index 000000000..762f10ca4 --- /dev/null +++ b/data/item_menu.s @@ -0,0 +1,73 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_08613F90:: @ 8613F90 + .incbin "baserom.gba", 0x613f90, 0xc + +gUnknown_08613F9C:: @ 8613F9C + .incbin "baserom.gba", 0x613f9c, 0x18 + +gUnknown_08613FB4:: @ 8613FB4 + .incbin "baserom.gba", 0x613fb4, 0x78 + +gUnknown_0861402C:: @ 861402C + .incbin "baserom.gba", 0x61402c, 0x4 + +gUnknown_08614030:: @ 8614030 + .incbin "baserom.gba", 0x614030, 0x4 + +gUnknown_08614034:: @ 8614034 + .incbin "baserom.gba", 0x614034, 0x4 + +gUnknown_08614038:: @ 8614038 + .incbin "baserom.gba", 0x614038, 0x4 + +gUnknown_0861403C:: @ 861403C + .incbin "baserom.gba", 0x61403c, 0x6 + +gUnknown_08614042:: @ 8614042 + .incbin "baserom.gba", 0x614042, 0x2 + +gUnknown_08614044:: @ 8614044 + .incbin "baserom.gba", 0x614044, 0x2 + +gUnknown_08614046:: @ 8614046 + .incbin "baserom.gba", 0x614046, 0x1 + +gUnknown_08614047:: @ 8614047 + .incbin "baserom.gba", 0x614047, 0x4 + +gUnknown_0861404B:: @ 861404B + .incbin "baserom.gba", 0x61404b, 0x2 + +gUnknown_0861404D:: @ 861404D + .incbin "baserom.gba", 0x61404d, 0x2 + +gUnknown_0861404F:: @ 861404F + .incbin "baserom.gba", 0x61404f, 0x5 + +gUnknown_08614054:: @ 8614054 + .incbin "baserom.gba", 0x614054, 0x30 + +gUnknown_08614084:: @ 8614084 + .incbin "baserom.gba", 0x614084, 0x8 + +gUnknown_0861408C:: @ 861408C + .incbin "baserom.gba", 0x61408c, 0x8 + +gUnknown_08614094:: @ 8614094 + .incbin "baserom.gba", 0x614094, 0x10 + +gUnknown_086140A4:: @ 86140A4 + .incbin "baserom.gba", 0x6140a4, 0xc0 + +gUnknown_08614164:: @ 8614164 + .incbin "baserom.gba", 0x614164, 0x10 + +gUnknown_08614174:: @ 8614174 + .incbin "baserom.gba", 0x614174, 0x38 + +gUnknown_086141AC:: @ 86141AC + .incbin "baserom.gba", 0x6141ac, 0x50 diff --git a/data/menu_indicators.s b/data/menu_indicators.s new file mode 100644 index 000000000..ee97261cd --- /dev/null +++ b/data/menu_indicators.s @@ -0,0 +1,49 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_086141FC:: @ 86141FC + .incbin "baserom.gba", 0x6141fc, 0x48 + +gUnknown_08614244:: @ 8614244 + .incbin "baserom.gba", 0x614244, 0x18 + +gUnknown_0861425C:: @ 861425C + .incbin "baserom.gba", 0x61425c, 0x4 + +gUnknown_08614260:: @ 8614260 + .incbin "baserom.gba", 0x614260, 0x4 + +gUnknown_08614264:: @ 8614264 + .incbin "baserom.gba", 0x614264, 0x4 + +gUnknown_08614268:: @ 8614268 + .incbin "baserom.gba", 0x614268, 0x4 + +gUnknown_0861426C:: @ 861426C + .incbin "baserom.gba", 0x61426c, 0x4 + +gUnknown_08614270:: @ 8614270 + .incbin "baserom.gba", 0x614270, 0x4 + +gUnknown_08614274:: @ 8614274 + .incbin "baserom.gba", 0x614274, 0x4 + +gUnknown_08614278:: @ 8614278 + .incbin "baserom.gba", 0x614278, 0x18 + +gUnknown_08614290:: @ 8614290 + .incbin "baserom.gba", 0x614290, 0x18 + +gUnknown_086142A8:: @ 86142A8 + .incbin "baserom.gba", 0x6142a8, 0x20 + +gUnknown_086142C8:: @ 86142C8 + .incbin "baserom.gba", 0x6142c8, 0x70 + +gUnknown_08614338:: @ 8614338 + .incbin "baserom.gba", 0x614338, 0x40 + +gUnknown_08614378:: @ 8614378 + .incbin "baserom.gba", 0x614378, 0x44 diff --git a/data/new_menu_helpers.s b/data/new_menu_helpers.s new file mode 100644 index 000000000..8d4e43b15 --- /dev/null +++ b/data/new_menu_helpers.s @@ -0,0 +1,27 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0860F074:: @ 860F074 + .incbin "baserom.gba", 0x60f074, 0x20 + +gUnknown_0860F094:: @ 860F094 + .incbin "baserom.gba", 0x60f094, 0x4 + +gUnknown_0860F098:: @ 860F098 + .incbin "baserom.gba", 0x60f098, 0x10 + +gUnknown_0860F0A8:: @ 860F0A8 + .incbin "baserom.gba", 0x60f0a8, 0x8 + + @ These are not referenced in src/new_menu_helpers.c; rather, they are in src/menu.c. Regardless, they were plopped here. + +gUnknown_0860F0B0:: @ 860F0B0 + .incbin "baserom.gba", 0x60f0b0, 0x20 + +gUnknown_0860F0D0:: @ 860F0D0 + .incbin "baserom.gba", 0x60f0d0, 0x4 + +gUnknown_0860F0D4:: @ 860F0D4 + .incbin "baserom.gba", 0x60f0d4, 0x68 diff --git a/data/party_menu.s b/data/party_menu.s new file mode 100644 index 000000000..36ee4f960 --- /dev/null +++ b/data/party_menu.s @@ -0,0 +1,229 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0861500C:: @ 861500C + .incbin "baserom.gba", 0x61500c, 0x3c + +gUnknown_08615048:: @ 8615048 + .incbin "baserom.gba", 0x615048, 0x670 + +gUnknown_086156B8:: @ 86156B8 + .incbin "baserom.gba", 0x6156b8, 0x2c + +gUnknown_086156E4:: @ 86156E4 + .incbin "baserom.gba", 0x6156e4, 0x20 + +gUnknown_08615704:: @ 8615704 + .incbin "baserom.gba", 0x615704, 0xc0 + +gUnknown_086157C4:: @ 86157C4 + .incbin "baserom.gba", 0x6157c4, 0x1c + +gUnknown_086157E0:: @ 86157E0 + .incbin "baserom.gba", 0x6157e0, 0x1c + +gUnknown_086157FC:: @ 86157FC + .incbin "baserom.gba", 0x6157fc, 0x14 + +gUnknown_08615810:: @ 8615810 + .incbin "baserom.gba", 0x615810, 0x40 + +gUnknown_08615850:: @ 8615850 + .incbin "baserom.gba", 0x615850, 0x40 + +gUnknown_08615890:: @ 8615890 + .incbin "baserom.gba", 0x615890, 0x40 + +gUnknown_086158D0:: @ 86158D0 + .incbin "baserom.gba", 0x6158d0, 0x38 + +gUnknown_08615908:: @ 8615908 + .incbin "baserom.gba", 0x615908, 0x8 + +gUnknown_08615910:: @ 8615910 + .incbin "baserom.gba", 0x615910, 0x8 + +gUnknown_08615918:: @ 8615918 + .incbin "baserom.gba", 0x615918, 0x8 + +gUnknown_08615920:: @ 8615920 + .incbin "baserom.gba", 0x615920, 0x8 + +gUnknown_08615928:: @ 8615928 + .incbin "baserom.gba", 0x615928, 0x8 + +gUnknown_08615930:: @ 8615930 + .incbin "baserom.gba", 0x615930, 0x8 + +gUnknown_08615938:: @ 8615938 + .incbin "baserom.gba", 0x615938, 0x8 + +gUnknown_08615940:: @ 8615940 + .incbin "baserom.gba", 0x615940, 0x8 + +gUnknown_08615948:: @ 8615948 + .incbin "baserom.gba", 0x615948, 0x8 + +gUnknown_08615950:: @ 8615950 + .incbin "baserom.gba", 0x615950, 0x8 + +gUnknown_08615958:: @ 8615958 + .incbin "baserom.gba", 0x615958, 0x8 + +gUnknown_08615960:: @ 8615960 + .incbin "baserom.gba", 0x615960, 0x8 + +gUnknown_08615968:: @ 8615968 + .incbin "baserom.gba", 0x615968, 0x8 + +gUnknown_08615970:: @ 8615970 + .incbin "baserom.gba", 0x615970, 0x18 + +gUnknown_08615988:: @ 8615988 + .incbin "baserom.gba", 0x615988, 0x46 + +gUnknown_086159CE:: @ 86159CE + .incbin "baserom.gba", 0x6159ce, 0x46 + +gUnknown_08615A14:: @ 8615A14 + .incbin "baserom.gba", 0x615a14, 0x36 + +gUnknown_08615A4A:: @ 8615A4A + .incbin "baserom.gba", 0x615a4a, 0x36 + +gUnknown_08615A80:: @ 8615A80 + .incbin "baserom.gba", 0x615a80, 0x36 + +gUnknown_08615AB6:: @ 8615AB6 + .incbin "baserom.gba", 0x615ab6, 0x2 + +gUnknown_08615AB8:: @ 8615AB8 + .incbin "baserom.gba", 0x615ab8, 0x2 + +gUnknown_08615ABA:: @ 8615ABA + .incbin "baserom.gba", 0x615aba, 0x3 + +gUnknown_08615ABD:: @ 8615ABD + .incbin "baserom.gba", 0x615abd, 0x3 + +gUnknown_08615AC0:: @ 8615AC0 + .incbin "baserom.gba", 0x615ac0, 0x3 + +gUnknown_08615AC3:: @ 8615AC3 + .incbin "baserom.gba", 0x615ac3, 0x2 + +gUnknown_08615AC5:: @ 8615AC5 + .incbin "baserom.gba", 0x615ac5, 0x2 + +gUnknown_08615AC7:: @ 8615AC7 + .incbin "baserom.gba", 0x615ac7, 0x2 + +gUnknown_08615AC9:: @ 8615AC9 + .incbin "baserom.gba", 0x615ac9, 0x2 + +gUnknown_08615ACB:: @ 8615ACB + .incbin "baserom.gba", 0x615acb, 0x2 + +gUnknown_08615ACD:: @ 8615ACD + .incbin "baserom.gba", 0x615acd, 0x3 + +gUnknown_08615AD0:: @ 8615AD0 + .incbin "baserom.gba", 0x615ad0, 0x3 + +gUnknown_08615AD3:: @ 8615AD3 + .incbin "baserom.gba", 0x615ad3, 0x3 + +gUnknown_08615AD6:: @ 8615AD6 + .incbin "baserom.gba", 0x615ad6, 0x3 + +gUnknown_08615AD9:: @ 8615AD9 + .incbin "baserom.gba", 0x615ad9, 0x3 + +gUnknown_08615ADC:: @ 8615ADC + .incbin "baserom.gba", 0x615adc, 0x3 + +gUnknown_08615ADF:: @ 8615ADF + .incbin "baserom.gba", 0x615adf, 0x3 + +gUnknown_08615AE2:: @ 8615AE2 + .incbin "baserom.gba", 0x615ae2, 0x3 + +gUnknown_08615AE5:: @ 8615AE5 + .incbin "baserom.gba", 0x615ae5, 0x3 + +gUnknown_08615AE8:: @ 8615AE8 + .incbin "baserom.gba", 0x615ae8, 0x3 + +gUnknown_08615AEB:: @ 8615AEB + .incbin "baserom.gba", 0x615aeb, 0x3 + +gUnknown_08615AEE:: @ 8615AEE + .incbin "baserom.gba", 0x615aee, 0x3 + +gUnknown_08615AF1:: @ 8615AF1 + .incbin "baserom.gba", 0x615af1, 0x3 + +gUnknown_08615AF4:: @ 8615AF4 + .incbin "baserom.gba", 0x615af4, 0x6c + +gUnknown_08615B60:: @ 8615B60 + .incbin "baserom.gba", 0x615b60, 0xa8 + +gUnknown_08615C08:: @ 8615C08 + .incbin "baserom.gba", 0x615c08, 0x130 + +gUnknown_08615D38:: @ 8615D38 + .incbin "baserom.gba", 0x615d38, 0x38 + +gUnknown_08615D70:: @ 8615D70 + .incbin "baserom.gba", 0x615d70, 0xe + +gUnknown_08615D7E:: @ 8615D7E + .incbin "baserom.gba", 0x615d7e, 0x1e + +gUnknown_08615D9C:: @ 8615D9C + .incbin "baserom.gba", 0x615d9c, 0x70 + +gUnknown_08615E0C:: @ 8615E0C + .incbin "baserom.gba", 0x615e0c, 0xa4 + +gUnknown_08615EB0:: @ 8615EB0 + .incbin "baserom.gba", 0x615eb0, 0x8 + +gUnknown_08615EB8:: @ 8615EB8 + .incbin "baserom.gba", 0x615eb8, 0x8 + +gUnknown_08615EC0:: @ 8615EC0 + .incbin "baserom.gba", 0x615ec0, 0x38 + +gUnknown_08615EF8:: @ 8615EF8 + .incbin "baserom.gba", 0x615ef8, 0x8 + +gUnknown_08615F00:: @ 8615F00 + .incbin "baserom.gba", 0x615f00, 0x8 + +gUnknown_08615F08:: @ 8615F08 + .incbin "baserom.gba", 0x615f08, 0x68 + +gUnknown_08615F70:: @ 8615F70 + .incbin "baserom.gba", 0x615f70, 0x8 + +gUnknown_08615F78:: @ 8615F78 + .incbin "baserom.gba", 0x615f78, 0x80 + +gUnknown_08615FF8:: @ 8615FF8 + .incbin "baserom.gba", 0x615ff8, 0x8 + +gUnknown_08616000:: @ 8616000 + .incbin "baserom.gba", 0x616000, 0x8 + +gUnknown_08616008:: @ 8616008 + .incbin "baserom.gba", 0x616008, 0x18 + +gUnknown_08616020:: @ 8616020 + .incbin "baserom.gba", 0x616020, 0x20 + +gUnknown_08616040:: @ 8616040 + .incbin "baserom.gba", 0x616040, 0x74 diff --git a/data/save_location.s b/data/save_location.s new file mode 100644 index 000000000..eabed7d86 --- /dev/null +++ b/data/save_location.s @@ -0,0 +1,13 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_086143BC:: @ 86143BC + .incbin "baserom.gba", 0x6143bc, 0x4e + +gUnknown_0861440A:: @ 861440A + .incbin "baserom.gba", 0x61440a, 0x4 + +gUnknown_0861440E:: @ 861440E + .incbin "baserom.gba", 0x61440e, 0x2 diff --git a/data/unk_81BAD84.s b/data/unk_81BAD84.s new file mode 100644 index 000000000..de88365ac --- /dev/null +++ b/data/unk_81BAD84.s @@ -0,0 +1,7 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_08617128:: @ 8617128 + .incbin "baserom.gba", 0x617128, 0x48 diff --git a/data/unk_text_util_2.s b/data/unk_text_util_2.s new file mode 100644 index 000000000..69f227ea2 --- /dev/null +++ b/data/unk_text_util_2.s @@ -0,0 +1,11 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_08616124:: @ 8616124 + .incbin "baserom.gba", 0x616124, 0x4 + + .align 2 +gFont6BrailleGlyphs:: @ 8616128 + .incbin "data/graphics/fonts/font6.fwjpnfont" diff --git a/ld_script.txt b/ld_script.txt index 177f36888..e5c5475f7 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -380,7 +380,17 @@ SECTIONS { data/battle_controller_recorded_player.o(.rodata); src/battle_dome_cards.o(.rodata); src/lilycove_lady.o(.rodata); - data/data_emerald.o(.rodata); + data/battle_frontier_1.o(.rodata); + data/new_menu_helpers.o(.rodata); + data/battle_frontier_2.o(.rodata); + data/item_menu.o(.rodata); + data/menu_indicators.o(.rodata); + data/save_location.o(.rodata); + data/item_icon.o(.rodata); + data/party_menu.o(.rodata); + data/battle_tent.o(.rodata); + data/unk_text_util_2.o(.rodata); + data/unk_81BAD84.o(.rodata); data/battle_controller_player_partner.o(.rodata); data/data_emerald2pre1.o(.rodata); src/berry_fix_program.o(.rodata); From 4e1c9920b2431459f12ceaa787c59654034e60ad Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 21 Sep 2017 13:51:32 -0400 Subject: [PATCH 269/342] Split data/data_emerald2.s --- data/data_emerald2.s | 983 ------------------ ....s => fossil_special_fldeff_groundshake.s} | 1 - data/link_strings.s | 114 ++ data/pokemon_summary_screen.s | 154 +++ data/pokenav.s | 517 +++++++++ data/rayquaza_scene.s | 160 +++ data/trainer_rematch.s | 10 + data/unk_sprite_file.s | 22 + data/unk_transition.s | 28 + data/walda_phrase.s | 7 + ld_script.txt | 11 +- 11 files changed, 1021 insertions(+), 986 deletions(-) delete mode 100644 data/data_emerald2.s rename data/{data_emerald2pre1.s => fossil_special_fldeff_groundshake.s} (99%) create mode 100644 data/link_strings.s create mode 100644 data/pokemon_summary_screen.s create mode 100644 data/pokenav.s create mode 100644 data/rayquaza_scene.s create mode 100644 data/trainer_rematch.s create mode 100644 data/unk_sprite_file.s create mode 100644 data/unk_transition.s create mode 100644 data/walda_phrase.s diff --git a/data/data_emerald2.s b/data/data_emerald2.s deleted file mode 100644 index e363e7365..000000000 --- a/data/data_emerald2.s +++ /dev/null @@ -1,983 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata -@ 86181C1 - .include "data/text/move_descriptions.inc" - -@ 861CAAC - .include "data/text/nature_names.inc" - -gUnknown_0861CBB4:: @ 861CBB4 - .incbin "baserom.gba", 0x61cbb4, 0x38 - -gUnknown_0861CBEC:: @ 861CBEC - .incbin "baserom.gba", 0x61cbec, 0xc - -gUnknown_0861CBF8:: @ 861CBF8 - .incbin "baserom.gba", 0x61cbf8, 0xc - -gUnknown_0861CC04:: @ 861CC04 - .incbin "baserom.gba", 0x61cc04, 0xc - -gUnknown_0861CC10:: @ 861CC10 - .incbin "baserom.gba", 0x61cc10, 0xc - -gUnknown_0861CC1C:: @ 861CC1C - .incbin "baserom.gba", 0x61cc1c, 0x8 - -gUnknown_0861CC24:: @ 861CC24 - .incbin "baserom.gba", 0x61cc24, 0xa8 - -gUnknown_0861CCCC:: @ 861CCCC - .incbin "baserom.gba", 0x61cccc, 0x20 - -gUnknown_0861CCEC:: @ 861CCEC - .incbin "baserom.gba", 0x61ccec, 0x28 - -gUnknown_0861CD14:: @ 861CD14 - .incbin "baserom.gba", 0x61cd14, 0x18 - -gUnknown_0861CD2C:: @ 861CD2C - .incbin "baserom.gba", 0x61cd2c, 0xa7 - -gUnknown_0861CDD3:: @ 861CDD3 - .incbin "baserom.gba", 0x61cdd3, 0x81 - -gUnknown_0861CE54:: @ 861CE54 - .incbin "baserom.gba", 0x61ce54, 0x10 - -gUnknown_0861CE64:: @ 861CE64 - .incbin "baserom.gba", 0x61ce64, 0x10 - -gUnknown_0861CE74:: @ 861CE74 - .incbin "baserom.gba", 0x61ce74, 0x7 - -gUnknown_0861CE7B:: @ 861CE7B - .incbin "baserom.gba", 0x61ce7b, 0x7 - -gUnknown_0861CE82:: @ 861CE82 - .incbin "baserom.gba", 0x61ce82, 0xc - -gUnknown_0861CE8E:: @ 861CE8E - .incbin "baserom.gba", 0x61ce8e, 0x9 - -gUnknown_0861CE97:: @ 861CE97 - .incbin "baserom.gba", 0x61ce97, 0x125 - -gUnknown_0861CFBC:: @ 861CFBC - .incbin "baserom.gba", 0x61cfbc, 0x8 - -gUnknown_0861CFC4:: @ 861CFC4 - .incbin "baserom.gba", 0x61cfc4, 0x18 - -gUnknown_0861CFDC:: @ 861CFDC - .incbin "baserom.gba", 0x61cfdc, 0x98 - -gUnknown_0861D074:: @ 861D074 - .incbin "baserom.gba", 0x61d074, 0x8 - -gUnknown_0861D07C:: @ 861D07C - .incbin "baserom.gba", 0x61d07c, 0x8 - -gUnknown_0861D084:: @ 861D084 - .incbin "baserom.gba", 0x61d084, 0x74 - -gUnknown_0861D0F8:: @ 861D0F8 - .incbin "baserom.gba", 0x61d0f8, 0x8 - -gUnknown_0861D100:: @ 861D100 - .incbin "baserom.gba", 0x61d100, 0x8 - -gUnknown_0861D108:: @ 861D108 - .incbin "baserom.gba", 0x61d108, 0x18 - -gUnknown_0861D120:: @ 861D120 - .incbin "baserom.gba", 0x61d120, 0x20 - -gUnknown_0861D140:: @ 861D140 - .incbin "baserom.gba", 0x61d140, 0x60 - -gUnknown_0861D1A0:: @ 861D1A0 - .incbin "baserom.gba", 0x61d1a0, 0xd54 - -gUnknown_0861DEF4:: @ 861DEF4 - .incbin "baserom.gba", 0x61def4, 0x314 - -gUnknown_0861E208:: @ 861E208 - .incbin "baserom.gba", 0x61e208, 0xd5c - -gUnknown_0861EF64:: @ 861EF64 - .incbin "baserom.gba", 0x61ef64, 0x350 - -gUnknown_0861F2B4:: @ 861F2B4 - .incbin "baserom.gba", 0x61f2b4, 0xc - -gUnknown_0861F2C0:: @ 861F2C0 - .incbin "baserom.gba", 0x61f2c0, 0x18 - -gUnknown_0861F2D8:: @ 861F2D8 - .incbin "baserom.gba", 0x61f2d8, 0x30 - -gUnknown_0861F308:: @ 861F308 - .incbin "baserom.gba", 0x61f308, 0x4 - -gUnknown_0861F30C:: @ 861F30C - .incbin "baserom.gba", 0x61f30c, 0x2 - -gUnknown_0861F30E:: @ 861F30E - .incbin "baserom.gba", 0x61f30e, 0x2 - -gUnknown_0861F310:: @ 861F310 - .incbin "baserom.gba", 0x61f310, 0x4 - -gUnknown_0861F314:: @ 861F314 - .incbin "baserom.gba", 0x61f314, 0x8 - -gUnknown_0861F31C:: @ 861F31C - .incbin "baserom.gba", 0x61f31c, 0xc - -gUnknown_0861F328:: @ 861F328 - .incbin "baserom.gba", 0x61f328, 0x28 - -gUnknown_0861F350:: @ 861F350 - .incbin "baserom.gba", 0x61f350, 0x20 - -gUnknown_0861F370:: @ 861F370 - .incbin "baserom.gba", 0x61f370, 0x5c - -gUnknown_0861F3CC:: @ 861F3CC - .incbin "baserom.gba", 0x61f3cc, 0x8 - -gUnknown_0861F3D4:: @ 861F3D4 - .incbin "baserom.gba", 0x61f3d4, 0x18 - -gUnknown_0861F3EC:: @ 861F3EC - .incbin "baserom.gba", 0x61f3ec, 0x618 - -gUnknown_0861FA04:: @ 861FA04 - .incbin "baserom.gba", 0x61fa04, 0x4 - -gUnknown_0861FA08:: @ 861FA08 - .incbin "baserom.gba", 0x61fa08, 0x10 - -gUnknown_0861FA18:: @ 861FA18 - .incbin "baserom.gba", 0x61fa18, 0x30 - -gUnknown_0861FA48:: @ 861FA48 - .incbin "baserom.gba", 0x61fa48, 0x4 - -gUnknown_0861FA4C:: @ 861FA4C - .incbin "baserom.gba", 0x61fa4c, 0x8 - -gUnknown_0861FA54:: @ 861FA54 - .incbin "baserom.gba", 0x61fa54, 0x10 - -gUnknown_0861FA64:: @ 861FA64 - .incbin "baserom.gba", 0x61fa64, 0x8 - -gUnknown_0861FA6C:: @ 861FA6C - .incbin "baserom.gba", 0x61fa6c, 0x30 - -gUnknown_0861FA9C:: @ 861FA9C - .incbin "baserom.gba", 0x61fa9c, 0x68 - -gUnknown_0861FB04:: @ 861FB04 - .incbin "baserom.gba", 0x61fb04, 0x28 - -gUnknown_0861FB2C:: @ 861FB2C - .incbin "baserom.gba", 0x61fb2c, 0x18 - -gUnknown_0861FB44:: @ 861FB44 - .incbin "baserom.gba", 0x61fb44, 0xa0 - -gUnknown_0861FBE4:: @ 861FBE4 - .incbin "baserom.gba", 0x61fbe4, 0x4 - -gUnknown_0861FBE8:: @ 861FBE8 - .incbin "baserom.gba", 0x61fbe8, 0xc - -gUnknown_0861FBF4:: @ 861FBF4 - .incbin "baserom.gba", 0x61fbf4, 0x3 - -gUnknown_0861FBF7:: @ 861FBF7 - .incbin "baserom.gba", 0x61fbf7, 0x5 - -gUnknown_0861FBFC:: @ 861FBFC - .incbin "baserom.gba", 0x61fbfc, 0x8 - -gUnknown_0861FC04:: @ 861FC04 - .incbin "baserom.gba", 0x61fc04, 0x18 - -gUnknown_0861FC1C:: @ 861FC1C - .incbin "baserom.gba", 0x61fc1c, 0x20 - -gUnknown_0861FC3C:: @ 861FC3C - .incbin "baserom.gba", 0x61fc3c, 0x18 - -gUnknown_0861FC54:: @ 861FC54 - .incbin "baserom.gba", 0x61fc54, 0x5 - -gUnknown_0861FC59:: @ 861FC59 - .incbin "baserom.gba", 0x61fc59, 0x1f - -gUnknown_0861FC78:: @ 861FC78 - .incbin "baserom.gba", 0x61fc78, 0x2 - -gUnknown_0861FC7A:: @ 861FC7A - .incbin "baserom.gba", 0x61fc7a, 0xc - -gUnknown_0861FC86:: @ 861FC86 - .incbin "baserom.gba", 0x61fc86, 0x12 - -gUnknown_0861FC98:: @ 861FC98 - .incbin "baserom.gba", 0x61fc98, 0x14 - -gUnknown_0861FCAC:: @ 861FCAC - .incbin "baserom.gba", 0x61fcac, 0xa0 - -gUnknown_0861FD4C:: @ 861FD4C - .incbin "baserom.gba", 0x61fd4c, 0x20 - -gUnknown_0861FD6C:: @ 861FD6C - .incbin "baserom.gba", 0x61fd6c, 0x288 - -gUnknown_0861FFF4:: @ 861FFF4 - .incbin "baserom.gba", 0x61fff4, 0x1a0 - -gUnknown_08620194:: @ 8620194 - .incbin "baserom.gba", 0x620194, 0xc - -gUnknown_086201A0:: @ 86201A0 - .incbin "baserom.gba", 0x6201a0, 0x24 - -gUnknown_086201C4:: @ 86201C4 - .incbin "baserom.gba", 0x6201c4, 0x10 - -gUnknown_086201D4:: @ 86201D4 - .incbin "baserom.gba", 0x6201d4, 0x6c - -gUnknown_08620240:: @ 8620240 - .incbin "baserom.gba", 0x620240, 0x4 - -gUnknown_08620244:: @ 8620244 - .incbin "baserom.gba", 0x620244, 0x88 - -gUnknown_086202CC:: @ 86202CC - .incbin "baserom.gba", 0x6202cc, 0x8 - -gUnknown_086202D4:: @ 86202D4 - .incbin "baserom.gba", 0x6202d4, 0x38 - -gUnknown_0862030C:: @ 862030C - .incbin "baserom.gba", 0x62030c, 0x3 - -gUnknown_0862030F:: @ 862030F - .incbin "baserom.gba", 0x62030f, 0x3d - -gUnknown_0862034C:: @ 862034C - .incbin "baserom.gba", 0x62034c, 0x20 - -gUnknown_0862036C:: @ 862036C - .incbin "baserom.gba", 0x62036c, 0x18 - -gUnknown_08620384:: @ 8620384 - .incbin "baserom.gba", 0x620384, 0x1ca4 - -gUnknown_08622028:: @ 8622028 - .incbin "baserom.gba", 0x622028, 0x4e0 - -gUnknown_08622508:: @ 8622508 - .incbin "baserom.gba", 0x622508, 0x2 - -gUnknown_0862250A:: @ 862250A - .incbin "baserom.gba", 0x62250a, 0x6 - -gUnknown_08622510:: @ 8622510 - .incbin "baserom.gba", 0x622510, 0x20 - -gUnknown_08622530:: @ 8622530 - .incbin "baserom.gba", 0x622530, 0xa4 - -gUnknown_086225D4:: @ 86225D4 - .incbin "baserom.gba", 0x6225d4, 0x10c - -gUnknown_086226E0:: @ 86226E0 - .incbin "baserom.gba", 0x6226e0, 0x20 - -gUnknown_08622700:: @ 8622700 - .incbin "baserom.gba", 0x622700, 0x20 - -gUnknown_08622720:: @ 8622720 - .incbin "baserom.gba", 0x622720, 0x40 - -gUnknown_08622760:: @ 8622760 - .incbin "baserom.gba", 0x622760, 0x2c - -gUnknown_0862278C:: @ 862278C - .incbin "baserom.gba", 0x62278c, 0x8 - -gUnknown_08622794:: @ 8622794 - .incbin "baserom.gba", 0x622794, 0x4 - -gUnknown_08622798:: @ 8622798 - .incbin "baserom.gba", 0x622798, 0x40 - -gUnknown_086227D8:: @ 86227D8 - .incbin "baserom.gba", 0x6227d8, 0x8 - -gUnknown_086227E0:: @ 86227E0 - .incbin "baserom.gba", 0x6227e0, 0x8 - -gUnknown_086227E8:: @ 86227E8 - .incbin "baserom.gba", 0x6227e8, 0xc - -gUnknown_086227F4:: @ 86227F4 - .incbin "baserom.gba", 0x6227f4, 0x14 - -gUnknown_08622808:: @ 8622808 - .incbin "baserom.gba", 0x622808, 0x8 - -gUnknown_08622810:: @ 8622810 - .incbin "baserom.gba", 0x622810, 0x8 - -gUnknown_08622818:: @ 8622818 - .incbin "baserom.gba", 0x622818, 0x18 - -gUnknown_08622830:: @ 8622830 - .incbin "baserom.gba", 0x622830, 0x20 - -gUnknown_08622850:: @ 8622850 - .incbin "baserom.gba", 0x622850, 0x18 - -gUnknown_08622868:: @ 8622868 - .incbin "baserom.gba", 0x622868, 0x20 - -gUnknown_08622888:: @ 8622888 - .incbin "baserom.gba", 0x622888, 0x850 - -gUnknown_086230D8:: @ 86230D8 - .incbin "baserom.gba", 0x6230d8, 0xc - -gUnknown_086230E4:: @ 86230E4 - .incbin "baserom.gba", 0x6230e4, 0x14 - -gUnknown_086230F8:: @ 86230F8 - .incbin "baserom.gba", 0x6230f8, 0x8 - -gUnknown_08623100:: @ 8623100 - .incbin "baserom.gba", 0x623100, 0x10 - -gUnknown_08623110:: @ 8623110 - .incbin "baserom.gba", 0x623110, 0x8 - -gUnknown_08623118:: @ 8623118 - .incbin "baserom.gba", 0x623118, 0xb8 - -gUnknown_086231D0:: @ 86231D0 - .incbin "baserom.gba", 0x6231d0, 0x18 - -gUnknown_086231E8:: @ 86231E8 - .incbin "baserom.gba", 0x6231e8, 0x20 - -gUnknown_08623208:: @ 8623208 - .incbin "baserom.gba", 0x623208, 0x20 - -gUnknown_08623228:: @ 8623228 - .incbin "baserom.gba", 0x623228, 0x14 - -gUnknown_0862323C:: @ 862323C - .incbin "baserom.gba", 0x62323c, 0xfc - -gUnknown_08623338:: @ 8623338 - .incbin "baserom.gba", 0x623338, 0x20 - -gUnknown_08623358:: @ 8623358 - .incbin "baserom.gba", 0x623358, 0xc - -gUnknown_08623364:: @ 8623364 - .incbin "baserom.gba", 0x623364, 0x8 - -gUnknown_0862336C:: @ 862336C - .incbin "baserom.gba", 0x62336c, 0x8 - -gUnknown_08623374:: @ 8623374 - .incbin "baserom.gba", 0x623374, 0x8 - -gUnknown_0862337C:: @ 862337C - .incbin "baserom.gba", 0x62337c, 0x8 - -gUnknown_08623384:: @ 8623384 - .incbin "baserom.gba", 0x623384, 0x1c - -gUnknown_086233A0:: @ 86233A0 - .incbin "baserom.gba", 0x6233a0, 0x14 - -gUnknown_086233B4:: @ 86233B4 - .incbin "baserom.gba", 0x6233b4, 0x10 - -gUnknown_086233C4:: @ 86233C4 - .incbin "baserom.gba", 0x6233c4, 0x20 - -gUnknown_086233E4:: @ 86233E4 - .incbin "baserom.gba", 0x6233e4, 0xc8 - -gUnknown_086234AC:: @ 86234AC - .incbin "baserom.gba", 0x6234ac, 0xc4 - -gUnknown_08623570:: @ 8623570 - .incbin "baserom.gba", 0x623570, 0x20 - -gUnknown_08623590:: @ 8623590 - .incbin "baserom.gba", 0x623590, 0x4 - -gUnknown_08623594:: @ 8623594 - .incbin "baserom.gba", 0x623594, 0x4 - -gUnknown_08623598:: @ 8623598 - .incbin "baserom.gba", 0x623598, 0x1c - -gUnknown_086235B4:: @ 86235B4 - .incbin "baserom.gba", 0x6235b4, 0x8 - -gUnknown_086235BC:: @ 86235BC - .incbin "baserom.gba", 0x6235bc, 0xc - -gUnknown_086235C8:: @ 86235C8 - .incbin "baserom.gba", 0x6235c8, 0xc - -gUnknown_086235D4:: @ 86235D4 - .incbin "baserom.gba", 0x6235d4, 0x4 - -gUnknown_086235D8:: @ 86235D8 - .incbin "baserom.gba", 0x6235d8, 0xc - -gUnknown_086235E4:: @ 86235E4 - .incbin "baserom.gba", 0x6235e4, 0x20 - -gUnknown_08623604:: @ 8623604 - .incbin "baserom.gba", 0x623604, 0xc8 - -gUnknown_086236CC:: @ 86236CC - .incbin "baserom.gba", 0x6236cc, 0xc4 - -gUnknown_08623790:: @ 8623790 - .incbin "baserom.gba", 0x623790, 0x20 - -gUnknown_086237B0:: @ 86237B0 - .incbin "baserom.gba", 0x6237b0, 0x4 - -gUnknown_086237B4:: @ 86237B4 - .incbin "baserom.gba", 0x6237b4, 0x4 - -gUnknown_086237B8:: @ 86237B8 - .incbin "baserom.gba", 0x6237b8, 0x1c - -gUnknown_086237D4:: @ 86237D4 - .incbin "baserom.gba", 0x6237d4, 0x8 - -gUnknown_086237DC:: @ 86237DC - .incbin "baserom.gba", 0x6237dc, 0xc - -gUnknown_086237E8:: @ 86237E8 - .incbin "baserom.gba", 0x6237e8, 0xc - -gUnknown_086237F4:: @ 86237F4 - .incbin "baserom.gba", 0x6237f4, 0x4 - -gUnknown_086237F8:: @ 86237F8 - .incbin "baserom.gba", 0x6237f8, 0x44 - -@ 862383C - .include "data/text/ribbon_descriptions.inc" - -@ 8623A74 - .include "data/text/gift_ribbon_descriptions.inc" - -gUnknown_08623FF8:: @ 8623FF8 - .incbin "baserom.gba", 0x623ff8, 0xa0 - -gUnknown_08624098:: @ 8624098 - .incbin "baserom.gba", 0x624098, 0x20 - -gUnknown_086240B8:: @ 86240B8 - .incbin "baserom.gba", 0x6240b8, 0xae0 - -gUnknown_08624B98:: @ 8624B98 - .incbin "baserom.gba", 0x624b98, 0x8 - -gUnknown_08624BA0:: @ 8624BA0 - .incbin "baserom.gba", 0x624ba0, 0x18 - -gUnknown_08624BB8:: @ 8624BB8 - .incbin "baserom.gba", 0x624bb8, 0x8 - -gUnknown_08624BC0:: @ 8624BC0 - .incbin "baserom.gba", 0x624bc0, 0x4 - -gUnknown_08624BC4:: @ 8624BC4 - .incbin "baserom.gba", 0x624bc4, 0x8 - -gUnknown_08624BCC:: @ 8624BCC - .incbin "baserom.gba", 0x624bcc, 0xc - -gUnknown_08624BD8:: @ 8624BD8 - .incbin "baserom.gba", 0x624bd8, 0xc - -gUnknown_08624BE4:: @ 8624BE4 - .incbin "baserom.gba", 0x624be4, 0x4 - -gUnknown_08624BE8:: @ 8624BE8 - .incbin "baserom.gba", 0x624be8, 0x10 - -gUnknown_08624BF8:: @ 8624BF8 - .incbin "baserom.gba", 0x624bf8, 0x80 - -gUnknown_08624C78:: @ 8624C78 - .incbin "baserom.gba", 0x624c78, 0x8 - -gUnknown_08624C80:: @ 8624C80 - .incbin "baserom.gba", 0x624c80, 0x84 - -gUnknown_08624D04:: @ 8624D04 - .incbin "baserom.gba", 0x624d04, 0x5a4 - -gUnknown_086252A8:: @ 86252A8 - .incbin "baserom.gba", 0x6252a8, 0x54 - -gUnknown_086252FC:: @ 86252FC - .incbin "baserom.gba", 0x6252fc, 0x14 - -gUnknown_08625310:: @ 8625310 - .incbin "baserom.gba", 0x625310, 0x14 - -gUnknown_08625324:: @ 8625324 - .incbin "baserom.gba", 0x625324, 0x14 - -gUnknown_08625338:: @ 8625338 - .incbin "baserom.gba", 0x625338, 0x14 - -gUnknown_0862534C:: @ 862534C - .incbin "baserom.gba", 0x62534c, 0x14 - -gUnknown_08625360:: @ 8625360 - .incbin "baserom.gba", 0x625360, 0x14 - -gUnknown_08625374:: @ 8625374 - .incbin "baserom.gba", 0x625374, 0x14 - -gUnknown_08625388:: @ 8625388 - .incbin "baserom.gba", 0x625388, 0x60 - -gUnknown_086253E8:: @ 86253E8 - .incbin "baserom.gba", 0x6253e8, 0x18 - -gUnknown_08625400:: @ 8625400 - .incbin "baserom.gba", 0x625400, 0x3 - -gUnknown_08625403:: @ 8625403 - .incbin "baserom.gba", 0x625403, 0x1 - -gUnknown_08625404:: @ 8625404 - .incbin "baserom.gba", 0x625404, 0xc - -gUnknown_08625410:: @ 8625410 - .incbin "baserom.gba", 0x625410, 0x100 - -gUnknown_08625510:: @ 8625510 - .incbin "baserom.gba", 0x625510, 0x30 - -gUnknown_08625540:: @ 8625540 - .incbin "baserom.gba", 0x625540, 0x8 - -gUnknown_08625548:: @ 8625548 - .incbin "baserom.gba", 0x625548, 0x500 - -gUnknown_08625A48:: @ 8625A48 - .incbin "baserom.gba", 0x625a48, 0x8 - -gUnknown_08625A50:: @ 8625A50 - .incbin "baserom.gba", 0x625a50, 0x18 - -gUnknown_08625A68:: @ 8625A68 - .incbin "baserom.gba", 0x625a68, 0x8 - -gUnknown_08625A70:: @ 8625A70 - .incbin "baserom.gba", 0x625a70, 0x20 - -gUnknown_08625A90:: @ 8625A90 - .incbin "baserom.gba", 0x625a90, 0x18 - -gUnknown_08625AA8:: @ 8625AA8 - .incbin "baserom.gba", 0x625aa8, 0x18 - -gUnknown_08625AC0:: @ 8625AC0 - .incbin "baserom.gba", 0x625ac0, 0x8 - -gUnknown_08625AC8:: @ 8625AC8 - .incbin "baserom.gba", 0x625ac8, 0x4c - -gUnknown_08625B14:: @ 8625B14 - .incbin "baserom.gba", 0x625b14, 0x18 - -gUnknown_08625B2C:: @ 8625B2C - .incbin "baserom.gba", 0x625b2c, 0x28 - -gUnknown_08625B54:: @ 8625B54 - .incbin "baserom.gba", 0x625b54, 0x18 - -gUnknown_08625B6C:: @ 8625B6C - .incbin "baserom.gba", 0x625b6c, 0x520 - -gUnknown_0862608C:: @ 862608C - .incbin "baserom.gba", 0x62608c, 0x2 - -gUnknown_0862608E:: @ 862608E - .incbin "baserom.gba", 0x62608e, 0x4326 - -gUnknown_0862A3B4:: @ 862A3B4 - .incbin "baserom.gba", 0x62a3b4, 0x218 - -gUnknown_0862A5CC:: @ 862A5CC - .incbin "baserom.gba", 0x62a5cc, 0x8 - -gUnknown_0862A5D4:: @ 862A5D4 - .incbin "baserom.gba", 0x62a5d4, 0x20 - -gUnknown_0862A5F4:: @ 862A5F4 - .incbin "baserom.gba", 0x62a5f4, 0x4 - -gUnknown_0862A5F8:: @ 862A5F8 - .incbin "baserom.gba", 0x62a5f8, 0x20 - -gUnknown_0862A618:: @ 862A618 - .incbin "baserom.gba", 0x62a618, 0x48 - -gUnknown_0862A660:: @ 862A660 - .incbin "baserom.gba", 0x62a660, 0x10 - -gUnknown_0862A670:: @ 862A670 - .incbin "baserom.gba", 0x62a670, 0x18 - -gUnknown_0862A688:: @ 862A688 - .incbin "baserom.gba", 0x62a688, 0x10 - -gUnknown_0862A698:: @ 862A698 - .incbin "baserom.gba", 0x62a698, 0x8 - -gUnknown_0862A6A0:: @ 862A6A0 - .incbin "baserom.gba", 0x62a6a0, 0x8c - -gUnknown_0862A72C:: @ 862A72C - .incbin "baserom.gba", 0x62a72c, 0x24 - -gUnknown_0862A750:: @ 862A750 - .incbin "baserom.gba", 0x62a750, 0x24 - -gUnknown_0862A774:: @ 862A774 - .incbin "baserom.gba", 0x62a774, 0xa8 - -gUnknown_0862A81C:: @ 862A81C - .incbin "baserom.gba", 0x62a81c, 0x30 - -gUnknown_0862A84C:: @ 862A84C - .incbin "baserom.gba", 0x62a84c, 0x18 - -gUnknown_0862A864:: @ 862A864 - .incbin "baserom.gba", 0x62a864, 0x18 - -gUnknown_0862A87C:: @ 862A87C - .incbin "baserom.gba", 0x62a87c, 0xc - -gUnknown_0862A888:: @ 862A888 - .incbin "baserom.gba", 0x62a888, 0x3c - -gUnknown_0862A8C4:: @ 862A8C4 - .incbin "baserom.gba", 0x62a8c4, 0x8 - -gUnknown_0862A8CC:: @ 862A8CC - .incbin "baserom.gba", 0x62a8cc, 0x8 - -gUnknown_0862A8D4:: @ 862A8D4 - .incbin "baserom.gba", 0x62a8d4, 0x24 - -gUnknown_0862A8F8:: @ 862A8F8 - .incbin "baserom.gba", 0x62a8f8, 0x8 - -gUnknown_0862A900:: @ 862A900 - .incbin "baserom.gba", 0x62a900, 0x24 - -gUnknown_0862A924:: @ 862A924 - .incbin "baserom.gba", 0x62a924, 0x8 - -gUnknown_0862A92C:: @ 862A92C - .incbin "baserom.gba", 0x62a92c, 0xa8 - -gUnknown_0862A9D4:: @ 862A9D4 - .incbin "baserom.gba", 0x62a9d4, 0x8 - -gUnknown_0862A9DC:: @ 862A9DC - .incbin "baserom.gba", 0x62a9dc, 0x8 - -gUnknown_0862A9E4:: @ 862A9E4 - .incbin "baserom.gba", 0x62a9e4, 0x30 - -gUnknown_0862AA14:: @ 862AA14 - .incbin "baserom.gba", 0x62aa14, 0x8 - -gUnknown_0862AA1C:: @ 862AA1C - .incbin "baserom.gba", 0x62aa1c, 0x18 - -gUnknown_0862AA34:: @ 862AA34 - .incbin "baserom.gba", 0x62aa34, 0x8 - -gUnknown_0862AA3C:: @ 862AA3C - .incbin "baserom.gba", 0x62aa3c, 0x18 - -gUnknown_0862AA54:: @ 862AA54 - .incbin "baserom.gba", 0x62aa54, 0x3c - -gUnknown_0862AA90:: @ 862AA90 - .incbin "baserom.gba", 0x62aa90, 0x8 - -gUnknown_0862AA98:: @ 862AA98 - .incbin "baserom.gba", 0x62aa98, 0x8 - -gUnknown_0862AAA0:: @ 862AAA0 - .incbin "baserom.gba", 0x62aaa0, 0x18 - -gUnknown_0862AAB8:: @ 862AAB8 - .incbin "baserom.gba", 0x62aab8, 0x14 - -gUnknown_0862AACC:: @ 862AACC - .incbin "baserom.gba", 0x62aacc, 0x30 - -gUnknown_0862AAFC:: @ 862AAFC - .incbin "baserom.gba", 0x62aafc, 0x8 - -gUnknown_0862AB04:: @ 862AB04 - .incbin "baserom.gba", 0x62ab04, 0x8 - -gUnknown_0862AB0C:: @ 862AB0C - .incbin "baserom.gba", 0x62ab0c, 0x8 - -gUnknown_0862AB14:: @ 862AB14 - .incbin "baserom.gba", 0x62ab14, 0x18 - -gUnknown_0862AB2C:: @ 862AB2C - .incbin "baserom.gba", 0x62ab2c, 0x18 - -gUnknown_0862AB44:: @ 862AB44 - .incbin "baserom.gba", 0x62ab44, 0xe4 - -gUnknown_0862AC28:: @ 862AC28 - .incbin "baserom.gba", 0x62ac28, 0x8 - -gUnknown_0862AC30:: @ 862AC30 - .incbin "baserom.gba", 0x62ac30, 0x8 - -gUnknown_0862AC38:: @ 862AC38 - .incbin "baserom.gba", 0x62ac38, 0x8 - -gUnknown_0862AC40:: @ 862AC40 - .incbin "baserom.gba", 0x62ac40, 0x8 - -gUnknown_0862AC48:: @ 862AC48 - .incbin "baserom.gba", 0x62ac48, 0x8 - -gUnknown_0862AC50:: @ 862AC50 - .incbin "baserom.gba", 0x62ac50, 0x8 - -gUnknown_0862AC58:: @ 862AC58 - .incbin "baserom.gba", 0x62ac58, 0x8 - -gUnknown_0862AC60:: @ 862AC60 - .incbin "baserom.gba", 0x62ac60, 0x8 - -gUnknown_0862AC68:: @ 862AC68 - .incbin "baserom.gba", 0x62ac68, 0x8 - -gUnknown_0862AC70:: @ 862AC70 - .incbin "baserom.gba", 0x62ac70, 0x8 - -gUnknown_0862AC78:: @ 862AC78 - .incbin "baserom.gba", 0x62ac78, 0x18 - -gUnknown_0862AC90:: @ 862AC90 - .incbin "baserom.gba", 0x62ac90, 0x18 - -gUnknown_0862ACA8:: @ 862ACA8 - .incbin "baserom.gba", 0x62aca8, 0x18 - -gUnknown_0862ACC0:: @ 862ACC0 - .incbin "baserom.gba", 0x62acc0, 0x18 - -gUnknown_0862ACD8:: @ 862ACD8 - .incbin "baserom.gba", 0x62acd8, 0x18 - -gUnknown_0862ACF0:: @ 862ACF0 - .incbin "baserom.gba", 0x62acf0, 0x18 - -gUnknown_0862AD08:: @ 862AD08 - .incbin "baserom.gba", 0x62ad08, 0xc - -gUnknown_0862AD14:: @ 862AD14 - .incbin "baserom.gba", 0x62ad14, 0x20 - -gUnknown_0862AD34:: @ 862AD34 - .incbin "baserom.gba", 0x62ad34, 0x10 - -gUnknown_0862AD44:: @ 862AD44 - .incbin "baserom.gba", 0x62ad44, 0x10 - -gUnknown_0862AD54:: @ 862AD54 - .incbin "baserom.gba", 0x62ad54, 0x1dc - -gUnknown_0862AF30:: @ 862AF30 - .incbin "baserom.gba", 0x62af30, 0x60c - -gUnknown_0862B53C:: @ 862B53C - .incbin "baserom.gba", 0x62b53c, 0x1e8 - -gUnknown_0862B724:: @ 862B724 - .incbin "baserom.gba", 0x62b724, 0x8 - -gUnknown_0862B72C:: @ 862B72C - .incbin "baserom.gba", 0x62b72c, 0x2c - -gUnknown_0862B758:: @ 862B758 - .incbin "baserom.gba", 0x62b758, 0x18 - -gUnknown_0862B770:: @ 862B770 - .incbin "baserom.gba", 0x62b770, 0x14 - -gUnknown_0862B784:: @ 862B784 - .incbin "baserom.gba", 0x62b784, 0x14 - -gUnknown_0862B798:: @ 862B798 - .incbin "baserom.gba", 0x62b798, 0x14 - -gUnknown_0862B7AC:: @ 862B7AC - .incbin "baserom.gba", 0x62b7ac, 0x14 - -gUnknown_0862B7C0:: @ 862B7C0 - .incbin "baserom.gba", 0x62b7c0, 0x14 - -gUnknown_0862B7D4:: @ 862B7D4 - .incbin "baserom.gba", 0x62b7d4, 0x14 - -gUnknown_0862B7E8:: @ 862B7E8 - .incbin "baserom.gba", 0x62b7e8, 0x14 - -gUnknown_0862B7FC:: @ 862B7FC - .incbin "baserom.gba", 0x62b7fc, 0x14 - - .align 2 - .string "{CLEAR 11}A{CLEAR 6}B{CLEAR 6}C{CLEAR 26}D{CLEAR 6}E{CLEAR 6}F{CLEAR 26}others$" - .string "{CLEAR 11}G{CLEAR 6}H{CLEAR 6}I{CLEAR 26}J{CLEAR 6}K{CLEAR 6}L$" - .string "{CLEAR 11}M{CLEAR 6}N{CLEAR 6}O{CLEAR 26}P{CLEAR 6}Q{CLEAR 6}R{CLEAR 6}S{CLEAR 26} $" - .string "{CLEAR 11}T{CLEAR 6}U{CLEAR 6}V{CLEAR 26}W{CLEAR 6}X{CLEAR 6}Y{CLEAR 6}Z{CLEAR 26} $" - .string "{CLEAR 11}a{CLEAR 6}b{CLEAR 6}c{CLEAR 26}d{CLEAR 6}e{CLEAR 6}f{CLEAR 6} {CLEAR 30}.$" - .string "{CLEAR 11}g{CLEAR 6}h{CLEAR 7}i{CLEAR 27}j{CLEAR 7}k{CLEAR 7}l{CLEAR 7} {CLEAR 30},$" - .string "{CLEAR 11}m{CLEAR 6}n{CLEAR 6}o{CLEAR 26}p{CLEAR 6}q{CLEAR 7}r{CLEAR 6}s{CLEAR 27} $" - .string "{CLEAR 11}t{CLEAR 6}u{CLEAR 6}v{CLEAR 26}w{CLEAR 6}x{CLEAR 6}y{CLEAR 6}z{CLEAR 26} $" - .string "{CLEAR 11}A{CLEAR 6}B{CLEAR 6}C{CLEAR 26}D{CLEAR 6}E{CLEAR 6}F{CLEAR 6} {CLEAR 30}.$" - .string "{CLEAR 11}G{CLEAR 6}H{CLEAR 6}I{CLEAR 26}J{CLEAR 6}K{CLEAR 6}L{CLEAR 6} {CLEAR 30},$" - .string "{CLEAR 11}M{CLEAR 6}N{CLEAR 6}O{CLEAR 26}P{CLEAR 6}Q{CLEAR 6}R{CLEAR 6}S{CLEAR 26} $" - .string "{CLEAR 11}T{CLEAR 6}U{CLEAR 6}V{CLEAR 26}W{CLEAR 6}X{CLEAR 6}Y{CLEAR 6}Z{CLEAR 26} $" - .string "{CLEAR 11}0{CLEAR 16}1{CLEAR 16}2{CLEAR 16}3{CLEAR 16}4{CLEAR 16} $" - .string "{CLEAR 11}5{CLEAR 16}6{CLEAR 16}7{CLEAR 16}8{CLEAR 16}9{CLEAR 16} $" - .string "{CLEAR 12}!{CLEAR 17}?{CLEAR 16}♂{CLEAR 16}♀{CLEAR 16}/{CLEAR 17}-$" - .string "{CLEAR 11}…{CLEAR 16}“{CLEAR 16}â€{CLEAR 18}‘{CLEAR 19}’{CLEAR 18} $" - -gUnknown_0862B9F9:: @ 862B9F9 - .string "ABCDE$" - -gUnknown_0862B9FF:: @ 862B9FF - .string "FGHIJ$" - -gUnknown_0862BA05:: @ 862BA05 - .string "KLMNO$" - -gUnknown_0862BA0B:: @ 862BA0B - .string "PQRST$" - -gUnknown_0862BA11:: @ 862BA11 - .string "UVWXY$" - -gUnknown_0862BA17:: @ 862BA17 - .string "Z $" - -gUnknown_0862BA1D:: @ 862BA1D - .string "01234$" - -gUnknown_0862BA23:: @ 862BA23 - .string "56789$" - -gUnknown_0862BA29:: @ 862BA29 - .string ".,!? $" - -gUnknown_0862BA2F:: @ 862BA2F - .string "-/&… $" - -gUnknown_0862BA35:: @ 862BA35 - .string "abcde$" - -gUnknown_0862BA3B:: @ 862BA3B - .string "fghij$" - -gUnknown_0862BA41:: @ 862BA41 - .string "klmno$" - -gUnknown_0862BA47:: @ 862BA47 - .string "pqrst$" - -gUnknown_0862BA4D:: @ 862BA4D - .string "uvwxy$" - -gUnknown_0862BA53:: @ 862BA53 - .string "z $" - -gUnknown_0862BA59:: @ 862BA59 - .string "01234$" - -gUnknown_0862BA5F:: @ 862BA5F - .string "56789$" - -gUnknown_0862BA65:: @ 862BA65 - .string ".,!? $" - -gUnknown_0862BA6B:: @ 862BA6B - .string "-/&… $" - - .string "$$$$$$$$" - -gUnknown_0862BA79:: @ 862BA79 - .string "{UNK_CTRL_F9 245}{UNK_CTRL_F9 246}{UNK_CTRL_F9 247}{UNK_CTRL_F9 248}{UNK_CTRL_F9 254}$" - -gUnknown_0862BA84:: @ 862BA84 - .string "{UNK_CTRL_F9 249}{UNK_CTRL_F9 250}{UNK_CTRL_F9 252}{UNK_CTRL_F9 251}{UNK_CTRL_F9 253}$" - -gUnknown_0862BA8F:: @ 862BA8F - .string "{UNK_CTRL_F9 236}{UNK_CTRL_F9 237}{UNK_CTRL_F9 238}{UNK_CTRL_F9 235}{UNK_CTRL_F9 234}$" - -gUnknown_0862BA9A:: @ 862BA9A - .string "♂♀{UNK_CTRL_F9 212}{UNK_CTRL_F9 213}{UNK_CTRL_F9 211}$" - -gUnknown_0862BAA3:: @ 862BAA3 - .string "{UNK_CTRL_F9 216}{UNK_CTRL_F9 217}{UNK_CTRL_F9 242}{UNK_CTRL_F9 243}{UNK_CTRL_F9 244}$" - -gUnknown_0862BAAE:: @ 862BAAE - .string "{UNK_CTRL_F9 218}{UNK_CTRL_F9 241}{UNK_CTRL_F9 224}{UNK_CTRL_F9 226}{UNK_CTRL_F9 227}$" - -gUnknown_0862BAB9:: @ 862BAB9 - .string "{UNK_CTRL_F9 240}{UNK_CTRL_F9 239}{UNK_CTRL_F9 225}{UNK_CTRL_F9 214}{UNK_CTRL_F9 215}$" - -gUnknown_0862BAC4:: @ 862BAC4 - .string "{UNK_CTRL_F9 228}{UNK_CTRL_F9 229}{UNK_CTRL_F9 230}{UNK_CTRL_F9 231}{UNK_CTRL_F9 232}$" - -gUnknown_0862BACF:: @ 862BACF - .string "{UNK_CTRL_F9 233}{UNK_CTRL_F9 220}{UNK_CTRL_F9 221}{UNK_CTRL_F9 222}{UNK_CTRL_F9 209}$" - -gUnknown_0862BADA:: @ 862BADA - .string "{UNK_CTRL_F9 210}{UNK_CTRL_F9 208}ょ: $" diff --git a/data/data_emerald2pre1.s b/data/fossil_special_fldeff_groundshake.s similarity index 99% rename from data/data_emerald2pre1.s rename to data/fossil_special_fldeff_groundshake.s index f6238dd06..8f968d409 100644 --- a/data/data_emerald2pre1.s +++ b/data/fossil_special_fldeff_groundshake.s @@ -3,7 +3,6 @@ .section .rodata - gUnknown_08617274:: @ 8617274 .incbin "baserom.gba", 0x617274, 0x920 diff --git a/data/link_strings.s b/data/link_strings.s new file mode 100644 index 000000000..6836863e0 --- /dev/null +++ b/data/link_strings.s @@ -0,0 +1,114 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + .align 2 + .string "{CLEAR 11}A{CLEAR 6}B{CLEAR 6}C{CLEAR 26}D{CLEAR 6}E{CLEAR 6}F{CLEAR 26}others$" + .string "{CLEAR 11}G{CLEAR 6}H{CLEAR 6}I{CLEAR 26}J{CLEAR 6}K{CLEAR 6}L$" + .string "{CLEAR 11}M{CLEAR 6}N{CLEAR 6}O{CLEAR 26}P{CLEAR 6}Q{CLEAR 6}R{CLEAR 6}S{CLEAR 26} $" + .string "{CLEAR 11}T{CLEAR 6}U{CLEAR 6}V{CLEAR 26}W{CLEAR 6}X{CLEAR 6}Y{CLEAR 6}Z{CLEAR 26} $" + .string "{CLEAR 11}a{CLEAR 6}b{CLEAR 6}c{CLEAR 26}d{CLEAR 6}e{CLEAR 6}f{CLEAR 6} {CLEAR 30}.$" + .string "{CLEAR 11}g{CLEAR 6}h{CLEAR 7}i{CLEAR 27}j{CLEAR 7}k{CLEAR 7}l{CLEAR 7} {CLEAR 30},$" + .string "{CLEAR 11}m{CLEAR 6}n{CLEAR 6}o{CLEAR 26}p{CLEAR 6}q{CLEAR 7}r{CLEAR 6}s{CLEAR 27} $" + .string "{CLEAR 11}t{CLEAR 6}u{CLEAR 6}v{CLEAR 26}w{CLEAR 6}x{CLEAR 6}y{CLEAR 6}z{CLEAR 26} $" + .string "{CLEAR 11}A{CLEAR 6}B{CLEAR 6}C{CLEAR 26}D{CLEAR 6}E{CLEAR 6}F{CLEAR 6} {CLEAR 30}.$" + .string "{CLEAR 11}G{CLEAR 6}H{CLEAR 6}I{CLEAR 26}J{CLEAR 6}K{CLEAR 6}L{CLEAR 6} {CLEAR 30},$" + .string "{CLEAR 11}M{CLEAR 6}N{CLEAR 6}O{CLEAR 26}P{CLEAR 6}Q{CLEAR 6}R{CLEAR 6}S{CLEAR 26} $" + .string "{CLEAR 11}T{CLEAR 6}U{CLEAR 6}V{CLEAR 26}W{CLEAR 6}X{CLEAR 6}Y{CLEAR 6}Z{CLEAR 26} $" + .string "{CLEAR 11}0{CLEAR 16}1{CLEAR 16}2{CLEAR 16}3{CLEAR 16}4{CLEAR 16} $" + .string "{CLEAR 11}5{CLEAR 16}6{CLEAR 16}7{CLEAR 16}8{CLEAR 16}9{CLEAR 16} $" + .string "{CLEAR 12}!{CLEAR 17}?{CLEAR 16}♂{CLEAR 16}♀{CLEAR 16}/{CLEAR 17}-$" + .string "{CLEAR 11}…{CLEAR 16}“{CLEAR 16}â€{CLEAR 18}‘{CLEAR 19}’{CLEAR 18} $" + +gUnknown_0862B9F9:: @ 862B9F9 + .string "ABCDE$" + +gUnknown_0862B9FF:: @ 862B9FF + .string "FGHIJ$" + +gUnknown_0862BA05:: @ 862BA05 + .string "KLMNO$" + +gUnknown_0862BA0B:: @ 862BA0B + .string "PQRST$" + +gUnknown_0862BA11:: @ 862BA11 + .string "UVWXY$" + +gUnknown_0862BA17:: @ 862BA17 + .string "Z $" + +gUnknown_0862BA1D:: @ 862BA1D + .string "01234$" + +gUnknown_0862BA23:: @ 862BA23 + .string "56789$" + +gUnknown_0862BA29:: @ 862BA29 + .string ".,!? $" + +gUnknown_0862BA2F:: @ 862BA2F + .string "-/&… $" + +gUnknown_0862BA35:: @ 862BA35 + .string "abcde$" + +gUnknown_0862BA3B:: @ 862BA3B + .string "fghij$" + +gUnknown_0862BA41:: @ 862BA41 + .string "klmno$" + +gUnknown_0862BA47:: @ 862BA47 + .string "pqrst$" + +gUnknown_0862BA4D:: @ 862BA4D + .string "uvwxy$" + +gUnknown_0862BA53:: @ 862BA53 + .string "z $" + +gUnknown_0862BA59:: @ 862BA59 + .string "01234$" + +gUnknown_0862BA5F:: @ 862BA5F + .string "56789$" + +gUnknown_0862BA65:: @ 862BA65 + .string ".,!? $" + +gUnknown_0862BA6B:: @ 862BA6B + .string "-/&… $" + + .string "$$$$$$$$" + +gUnknown_0862BA79:: @ 862BA79 + .string "{UNK_CTRL_F9 245}{UNK_CTRL_F9 246}{UNK_CTRL_F9 247}{UNK_CTRL_F9 248}{UNK_CTRL_F9 254}$" + +gUnknown_0862BA84:: @ 862BA84 + .string "{UNK_CTRL_F9 249}{UNK_CTRL_F9 250}{UNK_CTRL_F9 252}{UNK_CTRL_F9 251}{UNK_CTRL_F9 253}$" + +gUnknown_0862BA8F:: @ 862BA8F + .string "{UNK_CTRL_F9 236}{UNK_CTRL_F9 237}{UNK_CTRL_F9 238}{UNK_CTRL_F9 235}{UNK_CTRL_F9 234}$" + +gUnknown_0862BA9A:: @ 862BA9A + .string "♂♀{UNK_CTRL_F9 212}{UNK_CTRL_F9 213}{UNK_CTRL_F9 211}$" + +gUnknown_0862BAA3:: @ 862BAA3 + .string "{UNK_CTRL_F9 216}{UNK_CTRL_F9 217}{UNK_CTRL_F9 242}{UNK_CTRL_F9 243}{UNK_CTRL_F9 244}$" + +gUnknown_0862BAAE:: @ 862BAAE + .string "{UNK_CTRL_F9 218}{UNK_CTRL_F9 241}{UNK_CTRL_F9 224}{UNK_CTRL_F9 226}{UNK_CTRL_F9 227}$" + +gUnknown_0862BAB9:: @ 862BAB9 + .string "{UNK_CTRL_F9 240}{UNK_CTRL_F9 239}{UNK_CTRL_F9 225}{UNK_CTRL_F9 214}{UNK_CTRL_F9 215}$" + +gUnknown_0862BAC4:: @ 862BAC4 + .string "{UNK_CTRL_F9 228}{UNK_CTRL_F9 229}{UNK_CTRL_F9 230}{UNK_CTRL_F9 231}{UNK_CTRL_F9 232}$" + +gUnknown_0862BACF:: @ 862BACF + .string "{UNK_CTRL_F9 233}{UNK_CTRL_F9 220}{UNK_CTRL_F9 221}{UNK_CTRL_F9 222}{UNK_CTRL_F9 209}$" + +gUnknown_0862BADA:: @ 862BADA + .string "{UNK_CTRL_F9 210}{UNK_CTRL_F9 208}ょ: $" diff --git a/data/pokemon_summary_screen.s b/data/pokemon_summary_screen.s new file mode 100644 index 000000000..ac28d47c5 --- /dev/null +++ b/data/pokemon_summary_screen.s @@ -0,0 +1,154 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +@ 86181C1 + .include "data/text/move_descriptions.inc" + +@ 861CAAC + .include "data/text/nature_names.inc" + +gUnknown_0861CBB4:: @ 861CBB4 + .incbin "baserom.gba", 0x61cbb4, 0x38 + +gUnknown_0861CBEC:: @ 861CBEC + .incbin "baserom.gba", 0x61cbec, 0xc + +gUnknown_0861CBF8:: @ 861CBF8 + .incbin "baserom.gba", 0x61cbf8, 0xc + +gUnknown_0861CC04:: @ 861CC04 + .incbin "baserom.gba", 0x61cc04, 0xc + +gUnknown_0861CC10:: @ 861CC10 + .incbin "baserom.gba", 0x61cc10, 0xc + +gUnknown_0861CC1C:: @ 861CC1C + .incbin "baserom.gba", 0x61cc1c, 0x8 + +gUnknown_0861CC24:: @ 861CC24 + .incbin "baserom.gba", 0x61cc24, 0xa8 + +gUnknown_0861CCCC:: @ 861CCCC + .incbin "baserom.gba", 0x61cccc, 0x20 + +gUnknown_0861CCEC:: @ 861CCEC + .incbin "baserom.gba", 0x61ccec, 0x28 + +gUnknown_0861CD14:: @ 861CD14 + .incbin "baserom.gba", 0x61cd14, 0x18 + +gUnknown_0861CD2C:: @ 861CD2C + .incbin "baserom.gba", 0x61cd2c, 0xa7 + +gUnknown_0861CDD3:: @ 861CDD3 + .incbin "baserom.gba", 0x61cdd3, 0x81 + +gUnknown_0861CE54:: @ 861CE54 + .incbin "baserom.gba", 0x61ce54, 0x10 + +gUnknown_0861CE64:: @ 861CE64 + .incbin "baserom.gba", 0x61ce64, 0x10 + +gUnknown_0861CE74:: @ 861CE74 + .incbin "baserom.gba", 0x61ce74, 0x7 + +gUnknown_0861CE7B:: @ 861CE7B + .incbin "baserom.gba", 0x61ce7b, 0x7 + +gUnknown_0861CE82:: @ 861CE82 + .incbin "baserom.gba", 0x61ce82, 0xc + +gUnknown_0861CE8E:: @ 861CE8E + .incbin "baserom.gba", 0x61ce8e, 0x9 + +gUnknown_0861CE97:: @ 861CE97 + .incbin "baserom.gba", 0x61ce97, 0x125 + +gUnknown_0861CFBC:: @ 861CFBC + .incbin "baserom.gba", 0x61cfbc, 0x8 + +gUnknown_0861CFC4:: @ 861CFC4 + .incbin "baserom.gba", 0x61cfc4, 0x18 + +gUnknown_0861CFDC:: @ 861CFDC + .incbin "baserom.gba", 0x61cfdc, 0x98 + +gUnknown_0861D074:: @ 861D074 + .incbin "baserom.gba", 0x61d074, 0x8 + +gUnknown_0861D07C:: @ 861D07C + .incbin "baserom.gba", 0x61d07c, 0x8 + +gUnknown_0861D084:: @ 861D084 + .incbin "baserom.gba", 0x61d084, 0x74 + +gUnknown_0861D0F8:: @ 861D0F8 + .incbin "baserom.gba", 0x61d0f8, 0x8 + +gUnknown_0861D100:: @ 861D100 + .incbin "baserom.gba", 0x61d100, 0x8 + +gUnknown_0861D108:: @ 861D108 + .incbin "baserom.gba", 0x61d108, 0x18 + +gUnknown_0861D120:: @ 861D120 + .incbin "baserom.gba", 0x61d120, 0x20 + +gUnknown_0861D140:: @ 861D140 + .incbin "baserom.gba", 0x61d140, 0x60 + +gUnknown_0861D1A0:: @ 861D1A0 + .incbin "baserom.gba", 0x61d1a0, 0xd54 + +gUnknown_0861DEF4:: @ 861DEF4 + .incbin "baserom.gba", 0x61def4, 0x314 + +gUnknown_0861E208:: @ 861E208 + .incbin "baserom.gba", 0x61e208, 0xd5c + +gUnknown_0861EF64:: @ 861EF64 + .incbin "baserom.gba", 0x61ef64, 0x350 + +gUnknown_0861F2B4:: @ 861F2B4 + .incbin "baserom.gba", 0x61f2b4, 0xc + +gUnknown_0861F2C0:: @ 861F2C0 + .incbin "baserom.gba", 0x61f2c0, 0x18 + +gUnknown_0861F2D8:: @ 861F2D8 + .incbin "baserom.gba", 0x61f2d8, 0x30 + +gUnknown_0861F308:: @ 861F308 + .incbin "baserom.gba", 0x61f308, 0x4 + +gUnknown_0861F30C:: @ 861F30C + .incbin "baserom.gba", 0x61f30c, 0x2 + +gUnknown_0861F30E:: @ 861F30E + .incbin "baserom.gba", 0x61f30e, 0x2 + +gUnknown_0861F310:: @ 861F310 + .incbin "baserom.gba", 0x61f310, 0x4 + +gUnknown_0861F314:: @ 861F314 + .incbin "baserom.gba", 0x61f314, 0x8 + +gUnknown_0861F31C:: @ 861F31C + .incbin "baserom.gba", 0x61f31c, 0xc + +gUnknown_0861F328:: @ 861F328 + .incbin "baserom.gba", 0x61f328, 0x28 + +gUnknown_0861F350:: @ 861F350 + .incbin "baserom.gba", 0x61f350, 0x20 + +gUnknown_0861F370:: @ 861F370 + .incbin "baserom.gba", 0x61f370, 0x5c + +gUnknown_0861F3CC:: @ 861F3CC + .incbin "baserom.gba", 0x61f3cc, 0x8 + +gUnknown_0861F3D4:: @ 861F3D4 + .incbin "baserom.gba", 0x61f3d4, 0x18 diff --git a/data/pokenav.s b/data/pokenav.s new file mode 100644 index 000000000..8e8e24b65 --- /dev/null +++ b/data/pokenav.s @@ -0,0 +1,517 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0861F3EC:: @ 861F3EC + .incbin "baserom.gba", 0x61f3ec, 0x618 + +gUnknown_0861FA04:: @ 861FA04 + .incbin "baserom.gba", 0x61fa04, 0x4 + +gUnknown_0861FA08:: @ 861FA08 + .incbin "baserom.gba", 0x61fa08, 0x10 + +gUnknown_0861FA18:: @ 861FA18 + .incbin "baserom.gba", 0x61fa18, 0x30 + +gUnknown_0861FA48:: @ 861FA48 + .incbin "baserom.gba", 0x61fa48, 0x4 + +gUnknown_0861FA4C:: @ 861FA4C + .incbin "baserom.gba", 0x61fa4c, 0x8 + +gUnknown_0861FA54:: @ 861FA54 + .incbin "baserom.gba", 0x61fa54, 0x10 + +gUnknown_0861FA64:: @ 861FA64 + .incbin "baserom.gba", 0x61fa64, 0x8 + +gUnknown_0861FA6C:: @ 861FA6C + .incbin "baserom.gba", 0x61fa6c, 0x30 + +gUnknown_0861FA9C:: @ 861FA9C + .incbin "baserom.gba", 0x61fa9c, 0x68 + +gUnknown_0861FB04:: @ 861FB04 + .incbin "baserom.gba", 0x61fb04, 0x28 + +gUnknown_0861FB2C:: @ 861FB2C + .incbin "baserom.gba", 0x61fb2c, 0x18 + +gUnknown_0861FB44:: @ 861FB44 + .incbin "baserom.gba", 0x61fb44, 0xa0 + +gUnknown_0861FBE4:: @ 861FBE4 + .incbin "baserom.gba", 0x61fbe4, 0x4 + +gUnknown_0861FBE8:: @ 861FBE8 + .incbin "baserom.gba", 0x61fbe8, 0xc + +gUnknown_0861FBF4:: @ 861FBF4 + .incbin "baserom.gba", 0x61fbf4, 0x3 + +gUnknown_0861FBF7:: @ 861FBF7 + .incbin "baserom.gba", 0x61fbf7, 0x5 + +gUnknown_0861FBFC:: @ 861FBFC + .incbin "baserom.gba", 0x61fbfc, 0x8 + +gUnknown_0861FC04:: @ 861FC04 + .incbin "baserom.gba", 0x61fc04, 0x18 + +gUnknown_0861FC1C:: @ 861FC1C + .incbin "baserom.gba", 0x61fc1c, 0x20 + +gUnknown_0861FC3C:: @ 861FC3C + .incbin "baserom.gba", 0x61fc3c, 0x18 + +gUnknown_0861FC54:: @ 861FC54 + .incbin "baserom.gba", 0x61fc54, 0x5 + +gUnknown_0861FC59:: @ 861FC59 + .incbin "baserom.gba", 0x61fc59, 0x1f + +gUnknown_0861FC78:: @ 861FC78 + .incbin "baserom.gba", 0x61fc78, 0x2 + +gUnknown_0861FC7A:: @ 861FC7A + .incbin "baserom.gba", 0x61fc7a, 0xc + +gUnknown_0861FC86:: @ 861FC86 + .incbin "baserom.gba", 0x61fc86, 0x12 + +gUnknown_0861FC98:: @ 861FC98 + .incbin "baserom.gba", 0x61fc98, 0x14 + +gUnknown_0861FCAC:: @ 861FCAC + .incbin "baserom.gba", 0x61fcac, 0xa0 + +gUnknown_0861FD4C:: @ 861FD4C + .incbin "baserom.gba", 0x61fd4c, 0x20 + +gUnknown_0861FD6C:: @ 861FD6C + .incbin "baserom.gba", 0x61fd6c, 0x288 + +gUnknown_0861FFF4:: @ 861FFF4 + .incbin "baserom.gba", 0x61fff4, 0x1a0 + +gUnknown_08620194:: @ 8620194 + .incbin "baserom.gba", 0x620194, 0xc + +gUnknown_086201A0:: @ 86201A0 + .incbin "baserom.gba", 0x6201a0, 0x24 + +gUnknown_086201C4:: @ 86201C4 + .incbin "baserom.gba", 0x6201c4, 0x10 + +gUnknown_086201D4:: @ 86201D4 + .incbin "baserom.gba", 0x6201d4, 0x6c + +gUnknown_08620240:: @ 8620240 + .incbin "baserom.gba", 0x620240, 0x4 + +gUnknown_08620244:: @ 8620244 + .incbin "baserom.gba", 0x620244, 0x88 + +gUnknown_086202CC:: @ 86202CC + .incbin "baserom.gba", 0x6202cc, 0x8 + +gUnknown_086202D4:: @ 86202D4 + .incbin "baserom.gba", 0x6202d4, 0x38 + +gUnknown_0862030C:: @ 862030C + .incbin "baserom.gba", 0x62030c, 0x3 + +gUnknown_0862030F:: @ 862030F + .incbin "baserom.gba", 0x62030f, 0x3d + +gUnknown_0862034C:: @ 862034C + .incbin "baserom.gba", 0x62034c, 0x20 + +gUnknown_0862036C:: @ 862036C + .incbin "baserom.gba", 0x62036c, 0x18 + +gUnknown_08620384:: @ 8620384 + .incbin "baserom.gba", 0x620384, 0x1ca4 + +gUnknown_08622028:: @ 8622028 + .incbin "baserom.gba", 0x622028, 0x4e0 + +gUnknown_08622508:: @ 8622508 + .incbin "baserom.gba", 0x622508, 0x2 + +gUnknown_0862250A:: @ 862250A + .incbin "baserom.gba", 0x62250a, 0x6 + +gUnknown_08622510:: @ 8622510 + .incbin "baserom.gba", 0x622510, 0x20 + +gUnknown_08622530:: @ 8622530 + .incbin "baserom.gba", 0x622530, 0xa4 + +gUnknown_086225D4:: @ 86225D4 + .incbin "baserom.gba", 0x6225d4, 0x10c + +gUnknown_086226E0:: @ 86226E0 + .incbin "baserom.gba", 0x6226e0, 0x20 + +gUnknown_08622700:: @ 8622700 + .incbin "baserom.gba", 0x622700, 0x20 + +gUnknown_08622720:: @ 8622720 + .incbin "baserom.gba", 0x622720, 0x40 + +gUnknown_08622760:: @ 8622760 + .incbin "baserom.gba", 0x622760, 0x2c + +gUnknown_0862278C:: @ 862278C + .incbin "baserom.gba", 0x62278c, 0x8 + +gUnknown_08622794:: @ 8622794 + .incbin "baserom.gba", 0x622794, 0x4 + +gUnknown_08622798:: @ 8622798 + .incbin "baserom.gba", 0x622798, 0x40 + +gUnknown_086227D8:: @ 86227D8 + .incbin "baserom.gba", 0x6227d8, 0x8 + +gUnknown_086227E0:: @ 86227E0 + .incbin "baserom.gba", 0x6227e0, 0x8 + +gUnknown_086227E8:: @ 86227E8 + .incbin "baserom.gba", 0x6227e8, 0xc + +gUnknown_086227F4:: @ 86227F4 + .incbin "baserom.gba", 0x6227f4, 0x14 + +gUnknown_08622808:: @ 8622808 + .incbin "baserom.gba", 0x622808, 0x8 + +gUnknown_08622810:: @ 8622810 + .incbin "baserom.gba", 0x622810, 0x8 + +gUnknown_08622818:: @ 8622818 + .incbin "baserom.gba", 0x622818, 0x18 + +gUnknown_08622830:: @ 8622830 + .incbin "baserom.gba", 0x622830, 0x20 + +gUnknown_08622850:: @ 8622850 + .incbin "baserom.gba", 0x622850, 0x18 + +gUnknown_08622868:: @ 8622868 + .incbin "baserom.gba", 0x622868, 0x20 + +gUnknown_08622888:: @ 8622888 + .incbin "baserom.gba", 0x622888, 0x850 + +gUnknown_086230D8:: @ 86230D8 + .incbin "baserom.gba", 0x6230d8, 0xc + +gUnknown_086230E4:: @ 86230E4 + .incbin "baserom.gba", 0x6230e4, 0x14 + +gUnknown_086230F8:: @ 86230F8 + .incbin "baserom.gba", 0x6230f8, 0x8 + +gUnknown_08623100:: @ 8623100 + .incbin "baserom.gba", 0x623100, 0x10 + +gUnknown_08623110:: @ 8623110 + .incbin "baserom.gba", 0x623110, 0x8 + +gUnknown_08623118:: @ 8623118 + .incbin "baserom.gba", 0x623118, 0xb8 + +gUnknown_086231D0:: @ 86231D0 + .incbin "baserom.gba", 0x6231d0, 0x18 + +gUnknown_086231E8:: @ 86231E8 + .incbin "baserom.gba", 0x6231e8, 0x20 + +gUnknown_08623208:: @ 8623208 + .incbin "baserom.gba", 0x623208, 0x20 + +gUnknown_08623228:: @ 8623228 + .incbin "baserom.gba", 0x623228, 0x14 + +gUnknown_0862323C:: @ 862323C + .incbin "baserom.gba", 0x62323c, 0xfc + +gUnknown_08623338:: @ 8623338 + .incbin "baserom.gba", 0x623338, 0x20 + +gUnknown_08623358:: @ 8623358 + .incbin "baserom.gba", 0x623358, 0xc + +gUnknown_08623364:: @ 8623364 + .incbin "baserom.gba", 0x623364, 0x8 + +gUnknown_0862336C:: @ 862336C + .incbin "baserom.gba", 0x62336c, 0x8 + +gUnknown_08623374:: @ 8623374 + .incbin "baserom.gba", 0x623374, 0x8 + +gUnknown_0862337C:: @ 862337C + .incbin "baserom.gba", 0x62337c, 0x8 + +gUnknown_08623384:: @ 8623384 + .incbin "baserom.gba", 0x623384, 0x1c + +gUnknown_086233A0:: @ 86233A0 + .incbin "baserom.gba", 0x6233a0, 0x14 + +gUnknown_086233B4:: @ 86233B4 + .incbin "baserom.gba", 0x6233b4, 0x10 + +gUnknown_086233C4:: @ 86233C4 + .incbin "baserom.gba", 0x6233c4, 0x20 + +gUnknown_086233E4:: @ 86233E4 + .incbin "baserom.gba", 0x6233e4, 0xc8 + +gUnknown_086234AC:: @ 86234AC + .incbin "baserom.gba", 0x6234ac, 0xc4 + +gUnknown_08623570:: @ 8623570 + .incbin "baserom.gba", 0x623570, 0x20 + +gUnknown_08623590:: @ 8623590 + .incbin "baserom.gba", 0x623590, 0x4 + +gUnknown_08623594:: @ 8623594 + .incbin "baserom.gba", 0x623594, 0x4 + +gUnknown_08623598:: @ 8623598 + .incbin "baserom.gba", 0x623598, 0x1c + +gUnknown_086235B4:: @ 86235B4 + .incbin "baserom.gba", 0x6235b4, 0x8 + +gUnknown_086235BC:: @ 86235BC + .incbin "baserom.gba", 0x6235bc, 0xc + +gUnknown_086235C8:: @ 86235C8 + .incbin "baserom.gba", 0x6235c8, 0xc + +gUnknown_086235D4:: @ 86235D4 + .incbin "baserom.gba", 0x6235d4, 0x4 + +gUnknown_086235D8:: @ 86235D8 + .incbin "baserom.gba", 0x6235d8, 0xc + +gUnknown_086235E4:: @ 86235E4 + .incbin "baserom.gba", 0x6235e4, 0x20 + +gUnknown_08623604:: @ 8623604 + .incbin "baserom.gba", 0x623604, 0xc8 + +gUnknown_086236CC:: @ 86236CC + .incbin "baserom.gba", 0x6236cc, 0xc4 + +gUnknown_08623790:: @ 8623790 + .incbin "baserom.gba", 0x623790, 0x20 + +gUnknown_086237B0:: @ 86237B0 + .incbin "baserom.gba", 0x6237b0, 0x4 + +gUnknown_086237B4:: @ 86237B4 + .incbin "baserom.gba", 0x6237b4, 0x4 + +gUnknown_086237B8:: @ 86237B8 + .incbin "baserom.gba", 0x6237b8, 0x1c + +gUnknown_086237D4:: @ 86237D4 + .incbin "baserom.gba", 0x6237d4, 0x8 + +gUnknown_086237DC:: @ 86237DC + .incbin "baserom.gba", 0x6237dc, 0xc + +gUnknown_086237E8:: @ 86237E8 + .incbin "baserom.gba", 0x6237e8, 0xc + +gUnknown_086237F4:: @ 86237F4 + .incbin "baserom.gba", 0x6237f4, 0x4 + +gUnknown_086237F8:: @ 86237F8 + .incbin "baserom.gba", 0x6237f8, 0x44 + +@ 862383C + .include "data/text/ribbon_descriptions.inc" + +@ 8623A74 + .include "data/text/gift_ribbon_descriptions.inc" + +gUnknown_08623FF8:: @ 8623FF8 + .incbin "baserom.gba", 0x623ff8, 0xa0 + +gUnknown_08624098:: @ 8624098 + .incbin "baserom.gba", 0x624098, 0x20 + +gUnknown_086240B8:: @ 86240B8 + .incbin "baserom.gba", 0x6240b8, 0xae0 + +gUnknown_08624B98:: @ 8624B98 + .incbin "baserom.gba", 0x624b98, 0x8 + +gUnknown_08624BA0:: @ 8624BA0 + .incbin "baserom.gba", 0x624ba0, 0x18 + +gUnknown_08624BB8:: @ 8624BB8 + .incbin "baserom.gba", 0x624bb8, 0x8 + +gUnknown_08624BC0:: @ 8624BC0 + .incbin "baserom.gba", 0x624bc0, 0x4 + +gUnknown_08624BC4:: @ 8624BC4 + .incbin "baserom.gba", 0x624bc4, 0x8 + +gUnknown_08624BCC:: @ 8624BCC + .incbin "baserom.gba", 0x624bcc, 0xc + +gUnknown_08624BD8:: @ 8624BD8 + .incbin "baserom.gba", 0x624bd8, 0xc + +gUnknown_08624BE4:: @ 8624BE4 + .incbin "baserom.gba", 0x624be4, 0x4 + +gUnknown_08624BE8:: @ 8624BE8 + .incbin "baserom.gba", 0x624be8, 0x10 + +gUnknown_08624BF8:: @ 8624BF8 + .incbin "baserom.gba", 0x624bf8, 0x80 + +gUnknown_08624C78:: @ 8624C78 + .incbin "baserom.gba", 0x624c78, 0x8 + +gUnknown_08624C80:: @ 8624C80 + .incbin "baserom.gba", 0x624c80, 0x84 + +gUnknown_08624D04:: @ 8624D04 + .incbin "baserom.gba", 0x624d04, 0x5a4 + +gUnknown_086252A8:: @ 86252A8 + .incbin "baserom.gba", 0x6252a8, 0x54 + +gUnknown_086252FC:: @ 86252FC + .incbin "baserom.gba", 0x6252fc, 0x14 + +gUnknown_08625310:: @ 8625310 + .incbin "baserom.gba", 0x625310, 0x14 + +gUnknown_08625324:: @ 8625324 + .incbin "baserom.gba", 0x625324, 0x14 + +gUnknown_08625338:: @ 8625338 + .incbin "baserom.gba", 0x625338, 0x14 + +gUnknown_0862534C:: @ 862534C + .incbin "baserom.gba", 0x62534c, 0x14 + +gUnknown_08625360:: @ 8625360 + .incbin "baserom.gba", 0x625360, 0x14 + +gUnknown_08625374:: @ 8625374 + .incbin "baserom.gba", 0x625374, 0x14 + +gUnknown_08625388:: @ 8625388 + .incbin "baserom.gba", 0x625388, 0x60 + +gUnknown_086253E8:: @ 86253E8 + .incbin "baserom.gba", 0x6253e8, 0x18 + +gUnknown_08625400:: @ 8625400 + .incbin "baserom.gba", 0x625400, 0x3 + +gUnknown_08625403:: @ 8625403 + .incbin "baserom.gba", 0x625403, 0x1 + +gUnknown_08625404:: @ 8625404 + .incbin "baserom.gba", 0x625404, 0xc + +gUnknown_08625410:: @ 8625410 + .incbin "baserom.gba", 0x625410, 0x100 + +gUnknown_08625510:: @ 8625510 + .incbin "baserom.gba", 0x625510, 0x30 + +gUnknown_08625540:: @ 8625540 + .incbin "baserom.gba", 0x625540, 0x8 + +gUnknown_08625548:: @ 8625548 + .incbin "baserom.gba", 0x625548, 0x500 + +gUnknown_08625A48:: @ 8625A48 + .incbin "baserom.gba", 0x625a48, 0x8 + +gUnknown_08625A50:: @ 8625A50 + .incbin "baserom.gba", 0x625a50, 0x18 + +gUnknown_08625A68:: @ 8625A68 + .incbin "baserom.gba", 0x625a68, 0x8 + +gUnknown_08625A70:: @ 8625A70 + .incbin "baserom.gba", 0x625a70, 0x20 + +gUnknown_08625A90:: @ 8625A90 + .incbin "baserom.gba", 0x625a90, 0x18 + +gUnknown_08625AA8:: @ 8625AA8 + .incbin "baserom.gba", 0x625aa8, 0x18 + +gUnknown_08625AC0:: @ 8625AC0 + .incbin "baserom.gba", 0x625ac0, 0x8 + +gUnknown_08625AC8:: @ 8625AC8 + .incbin "baserom.gba", 0x625ac8, 0x4c + +gUnknown_08625B14:: @ 8625B14 + .incbin "baserom.gba", 0x625b14, 0x18 + +gUnknown_08625B2C:: @ 8625B2C + .incbin "baserom.gba", 0x625b2c, 0x28 + +gUnknown_08625B54:: @ 8625B54 + .incbin "baserom.gba", 0x625b54, 0x18 + +gUnknown_08625B6C:: @ 8625B6C + .incbin "baserom.gba", 0x625b6c, 0x520 + +gUnknown_0862608C:: @ 862608C + .incbin "baserom.gba", 0x62608c, 0x2 + +gUnknown_0862608E:: @ 862608E + .incbin "baserom.gba", 0x62608e, 0x4326 + +gUnknown_0862A3B4:: @ 862A3B4 + .incbin "baserom.gba", 0x62a3b4, 0x218 + +gUnknown_0862A5CC:: @ 862A5CC + .incbin "baserom.gba", 0x62a5cc, 0x8 + +gUnknown_0862A5D4:: @ 862A5D4 + .incbin "baserom.gba", 0x62a5d4, 0x20 + +gUnknown_0862A5F4:: @ 862A5F4 + .incbin "baserom.gba", 0x62a5f4, 0x4 + +gUnknown_0862A5F8:: @ 862A5F8 + .incbin "baserom.gba", 0x62a5f8, 0x20 + +gUnknown_0862A618:: @ 862A618 + .incbin "baserom.gba", 0x62a618, 0x48 + +gUnknown_0862A660:: @ 862A660 + .incbin "baserom.gba", 0x62a660, 0x10 + +gUnknown_0862A670:: @ 862A670 + .incbin "baserom.gba", 0x62a670, 0x18 + +gUnknown_0862A688:: @ 862A688 + .incbin "baserom.gba", 0x62a688, 0x10 + +gUnknown_0862A698:: @ 862A698 + .incbin "baserom.gba", 0x62a698, 0x8 diff --git a/data/rayquaza_scene.s b/data/rayquaza_scene.s new file mode 100644 index 000000000..51a285285 --- /dev/null +++ b/data/rayquaza_scene.s @@ -0,0 +1,160 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0862A6A0:: @ 862A6A0 + .incbin "baserom.gba", 0x62a6a0, 0x8c + +gUnknown_0862A72C:: @ 862A72C + .incbin "baserom.gba", 0x62a72c, 0x24 + +gUnknown_0862A750:: @ 862A750 + .incbin "baserom.gba", 0x62a750, 0x24 + +gUnknown_0862A774:: @ 862A774 + .incbin "baserom.gba", 0x62a774, 0xa8 + +gUnknown_0862A81C:: @ 862A81C + .incbin "baserom.gba", 0x62a81c, 0x30 + +gUnknown_0862A84C:: @ 862A84C + .incbin "baserom.gba", 0x62a84c, 0x18 + +gUnknown_0862A864:: @ 862A864 + .incbin "baserom.gba", 0x62a864, 0x18 + +gUnknown_0862A87C:: @ 862A87C + .incbin "baserom.gba", 0x62a87c, 0xc + +gUnknown_0862A888:: @ 862A888 + .incbin "baserom.gba", 0x62a888, 0x3c + +gUnknown_0862A8C4:: @ 862A8C4 + .incbin "baserom.gba", 0x62a8c4, 0x8 + +gUnknown_0862A8CC:: @ 862A8CC + .incbin "baserom.gba", 0x62a8cc, 0x8 + +gUnknown_0862A8D4:: @ 862A8D4 + .incbin "baserom.gba", 0x62a8d4, 0x24 + +gUnknown_0862A8F8:: @ 862A8F8 + .incbin "baserom.gba", 0x62a8f8, 0x8 + +gUnknown_0862A900:: @ 862A900 + .incbin "baserom.gba", 0x62a900, 0x24 + +gUnknown_0862A924:: @ 862A924 + .incbin "baserom.gba", 0x62a924, 0x8 + +gUnknown_0862A92C:: @ 862A92C + .incbin "baserom.gba", 0x62a92c, 0xa8 + +gUnknown_0862A9D4:: @ 862A9D4 + .incbin "baserom.gba", 0x62a9d4, 0x8 + +gUnknown_0862A9DC:: @ 862A9DC + .incbin "baserom.gba", 0x62a9dc, 0x8 + +gUnknown_0862A9E4:: @ 862A9E4 + .incbin "baserom.gba", 0x62a9e4, 0x30 + +gUnknown_0862AA14:: @ 862AA14 + .incbin "baserom.gba", 0x62aa14, 0x8 + +gUnknown_0862AA1C:: @ 862AA1C + .incbin "baserom.gba", 0x62aa1c, 0x18 + +gUnknown_0862AA34:: @ 862AA34 + .incbin "baserom.gba", 0x62aa34, 0x8 + +gUnknown_0862AA3C:: @ 862AA3C + .incbin "baserom.gba", 0x62aa3c, 0x18 + +gUnknown_0862AA54:: @ 862AA54 + .incbin "baserom.gba", 0x62aa54, 0x3c + +gUnknown_0862AA90:: @ 862AA90 + .incbin "baserom.gba", 0x62aa90, 0x8 + +gUnknown_0862AA98:: @ 862AA98 + .incbin "baserom.gba", 0x62aa98, 0x8 + +gUnknown_0862AAA0:: @ 862AAA0 + .incbin "baserom.gba", 0x62aaa0, 0x18 + +gUnknown_0862AAB8:: @ 862AAB8 + .incbin "baserom.gba", 0x62aab8, 0x14 + +gUnknown_0862AACC:: @ 862AACC + .incbin "baserom.gba", 0x62aacc, 0x30 + +gUnknown_0862AAFC:: @ 862AAFC + .incbin "baserom.gba", 0x62aafc, 0x8 + +gUnknown_0862AB04:: @ 862AB04 + .incbin "baserom.gba", 0x62ab04, 0x8 + +gUnknown_0862AB0C:: @ 862AB0C + .incbin "baserom.gba", 0x62ab0c, 0x8 + +gUnknown_0862AB14:: @ 862AB14 + .incbin "baserom.gba", 0x62ab14, 0x18 + +gUnknown_0862AB2C:: @ 862AB2C + .incbin "baserom.gba", 0x62ab2c, 0x18 + +gUnknown_0862AB44:: @ 862AB44 + .incbin "baserom.gba", 0x62ab44, 0xe4 + +gUnknown_0862AC28:: @ 862AC28 + .incbin "baserom.gba", 0x62ac28, 0x8 + +gUnknown_0862AC30:: @ 862AC30 + .incbin "baserom.gba", 0x62ac30, 0x8 + +gUnknown_0862AC38:: @ 862AC38 + .incbin "baserom.gba", 0x62ac38, 0x8 + +gUnknown_0862AC40:: @ 862AC40 + .incbin "baserom.gba", 0x62ac40, 0x8 + +gUnknown_0862AC48:: @ 862AC48 + .incbin "baserom.gba", 0x62ac48, 0x8 + +gUnknown_0862AC50:: @ 862AC50 + .incbin "baserom.gba", 0x62ac50, 0x8 + +gUnknown_0862AC58:: @ 862AC58 + .incbin "baserom.gba", 0x62ac58, 0x8 + +gUnknown_0862AC60:: @ 862AC60 + .incbin "baserom.gba", 0x62ac60, 0x8 + +gUnknown_0862AC68:: @ 862AC68 + .incbin "baserom.gba", 0x62ac68, 0x8 + +gUnknown_0862AC70:: @ 862AC70 + .incbin "baserom.gba", 0x62ac70, 0x8 + +gUnknown_0862AC78:: @ 862AC78 + .incbin "baserom.gba", 0x62ac78, 0x18 + +gUnknown_0862AC90:: @ 862AC90 + .incbin "baserom.gba", 0x62ac90, 0x18 + +gUnknown_0862ACA8:: @ 862ACA8 + .incbin "baserom.gba", 0x62aca8, 0x18 + +gUnknown_0862ACC0:: @ 862ACC0 + .incbin "baserom.gba", 0x62acc0, 0x18 + +gUnknown_0862ACD8:: @ 862ACD8 + .incbin "baserom.gba", 0x62acd8, 0x18 + +gUnknown_0862ACF0:: @ 862ACF0 + .incbin "baserom.gba", 0x62acf0, 0x18 + +gUnknown_0862AD08:: @ 862AD08 + .incbin "baserom.gba", 0x62ad08, 0xc diff --git a/data/trainer_rematch.s b/data/trainer_rematch.s new file mode 100644 index 000000000..9d6fc7717 --- /dev/null +++ b/data/trainer_rematch.s @@ -0,0 +1,10 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0862AD34:: @ 862AD34 + .incbin "baserom.gba", 0x62ad34, 0x10 + +gUnknown_0862AD44:: @ 862AD44 + .incbin "baserom.gba", 0x62ad44, 0x10 diff --git a/data/unk_sprite_file.s b/data/unk_sprite_file.s new file mode 100644 index 000000000..837e87c3f --- /dev/null +++ b/data/unk_sprite_file.s @@ -0,0 +1,22 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0862AD54:: @ 862AD54 + .incbin "baserom.gba", 0x62ad54, 0x1dc + +gUnknown_0862AF30:: @ 862AF30 + .incbin "baserom.gba", 0x62af30, 0x60c + +gUnknown_0862B53C:: @ 862B53C + .incbin "baserom.gba", 0x62b53c, 0x1e8 + +gUnknown_0862B724:: @ 862B724 + .incbin "baserom.gba", 0x62b724, 0x8 + +gUnknown_0862B72C:: @ 862B72C + .incbin "baserom.gba", 0x62b72c, 0x2c + +gUnknown_0862B758:: @ 862B758 + .incbin "baserom.gba", 0x62b758, 0x18 diff --git a/data/unk_transition.s b/data/unk_transition.s new file mode 100644 index 000000000..5ed120d85 --- /dev/null +++ b/data/unk_transition.s @@ -0,0 +1,28 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0862B770:: @ 862B770 + .incbin "baserom.gba", 0x62b770, 0x14 + +gUnknown_0862B784:: @ 862B784 + .incbin "baserom.gba", 0x62b784, 0x14 + +gUnknown_0862B798:: @ 862B798 + .incbin "baserom.gba", 0x62b798, 0x14 + +gUnknown_0862B7AC:: @ 862B7AC + .incbin "baserom.gba", 0x62b7ac, 0x14 + +gUnknown_0862B7C0:: @ 862B7C0 + .incbin "baserom.gba", 0x62b7c0, 0x14 + +gUnknown_0862B7D4:: @ 862B7D4 + .incbin "baserom.gba", 0x62b7d4, 0x14 + +gUnknown_0862B7E8:: @ 862B7E8 + .incbin "baserom.gba", 0x62b7e8, 0x14 + +gUnknown_0862B7FC:: @ 862B7FC + .incbin "baserom.gba", 0x62b7fc, 0x14 diff --git a/data/walda_phrase.s b/data/walda_phrase.s new file mode 100644 index 000000000..c168353b4 --- /dev/null +++ b/data/walda_phrase.s @@ -0,0 +1,7 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0862AD14:: @ 862AD14 + .incbin "baserom.gba", 0x62ad14, 0x20 diff --git a/ld_script.txt b/ld_script.txt index e5c5475f7..048f12336 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -392,9 +392,16 @@ SECTIONS { data/unk_text_util_2.o(.rodata); data/unk_81BAD84.o(.rodata); data/battle_controller_player_partner.o(.rodata); - data/data_emerald2pre1.o(.rodata); + data/fossil_special_fldeff_groundshake.o(.rodata); src/berry_fix_program.o(.rodata); - data/data_emerald2.o(.rodata); + data/pokemon_summary_screen.o(.rodata); + data/pokenav.o(.rodata); + data/rayquaza_scene.o(.rodata); + data/walda_phrase.o(.rodata); + data/trainer_rematch.o(.rodata); + data/unk_sprite_file.o(.rodata); + data/unk_transition.o(.rodata); + data/link_strings.o(.rodata); data/fonts.o(.rodata); data/mystery_event_msg.o(.rodata); src/m4a_tables.o(.rodata); From 15212c4f8d80b4e15b20d0594d890fe1e803bc0e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 21 Sep 2017 23:43:13 -0400 Subject: [PATCH 270/342] Font6Func --- asm/unk_text_util_2.s | 523 ------------------------------------------ include/text.h | 52 +++-- ld_script.txt | 1 + src/text.c | 12 +- src/unk_text_util_2.c | 200 ++++++++++++++++ 5 files changed, 241 insertions(+), 547 deletions(-) create mode 100644 src/unk_text_util_2.c diff --git a/asm/unk_text_util_2.s b/asm/unk_text_util_2.s index 7f1a5ef70..c1ab25594 100755 --- a/asm/unk_text_util_2.s +++ b/asm/unk_text_util_2.s @@ -5,529 +5,6 @@ .text - thumb_func_start Font6Func -@ int Font6Func(struct TextPrinter *x) -Font6Func: @ 81BA250 - push {r4-r6,lr} - adds r6, r0, 0 - adds r4, r6, 0 - adds r4, 0x14 - ldrb r0, [r6, 0x1C] - cmp r0, 0x6 - bls _081BA260 - b _081BA660 -_081BA260: - lsls r0, 2 - ldr r1, =_081BA270 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081BA270: - .4byte _081BA28C - .4byte _081BA554 - .4byte _081BA566 - .4byte _081BA590 - .4byte _081BA5C8 - .4byte _081BA63C - .4byte _081BA64E -_081BA28C: - ldr r2, =gMain - ldrh r1, [r2, 0x2C] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0 - beq _081BA2A6 - ldrb r1, [r4] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _081BA2A6 - movs r0, 0 - strb r0, [r6, 0x1E] -_081BA2A6: - ldrb r1, [r6, 0x1E] - cmp r1, 0 - beq _081BA2E8 - ldrb r0, [r6, 0x1D] - cmp r0, 0 - beq _081BA2E8 - subs r0, r1, 0x1 - strb r0, [r6, 0x1E] - ldr r0, =gTextFlags - ldrb r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _081BA2C4 - b _081BA50E -_081BA2C4: - ldrh r1, [r2, 0x2E] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0 - bne _081BA2D0 - b _081BA50E -_081BA2D0: - ldrb r0, [r4] - movs r1, 0x10 - orrs r0, r1 - strb r0, [r4] - movs r0, 0 - strb r0, [r6, 0x1E] - b _081BA50E - .pool -_081BA2E8: - ldr r2, =gTextFlags - ldrb r1, [r2] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _081BA2FC - movs r0, 0x3 - b _081BA2FE - .pool -_081BA2FC: - ldrb r0, [r6, 0x1D] -_081BA2FE: - strb r0, [r6, 0x1E] - ldr r0, [r6] - ldrb r3, [r0] - adds r0, 0x1 - str r0, [r6] - adds r0, r3, 0 - subs r0, 0xF8 - cmp r0, 0x7 - bls _081BA312 - b _081BA52E -_081BA312: - lsls r0, 2 - ldr r1, =_081BA320 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081BA320: - .4byte _081BA524 - .4byte _081BA512 - .4byte _081BA504 - .4byte _081BA500 - .4byte _081BA36E - .4byte _081BA368 - .4byte _081BA340 - .4byte _081BA660 -_081BA340: - ldrb r0, [r6, 0x6] - strb r0, [r6, 0x8] - ldrb r1, [r6, 0x5] - ldr r0, =gFonts - ldr r2, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r6, 0xB] - ldrb r0, [r0, 0x5] - adds r1, r0 - ldrb r0, [r6, 0x9] - adds r0, r1 - strb r0, [r6, 0x9] -_081BA35E: - movs r0, 0x2 - b _081BA662 - .pool -_081BA368: - ldr r0, [r6] - adds r0, 0x1 - b _081BA4C4 -_081BA36E: - ldr r0, [r6] - ldrb r3, [r0] - adds r0, 0x1 - str r0, [r6] - subs r0, r3, 0x1 - cmp r0, 0xF - bls _081BA37E - b _081BA52E -_081BA37E: - lsls r0, 2 - ldr r1, =_081BA38C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081BA38C: - .4byte _081BA3CC - .4byte _081BA3EE - .4byte _081BA412 - .4byte _081BA42C - .4byte _081BA478 - .4byte _081BA47E - .4byte _081BA35E - .4byte _081BA498 - .4byte _081BA4A8 - .4byte _081BA4BC - .4byte _081BA4C0 - .4byte _081BA4C8 - .4byte _081BA4D2 - .4byte _081BA4DE - .4byte _081BA4EE - .4byte _081BA4C0 -_081BA3CC: - ldr r2, [r6] - ldrb r1, [r2] - lsls r1, 4 - ldrb r3, [r6, 0xC] - movs r0, 0xF - ands r0, r3 - orrs r0, r1 - strb r0, [r6, 0xC] - adds r2, 0x1 - str r2, [r6] - lsls r0, 24 - lsrs r0, 28 - ldrb r2, [r6, 0xD] - lsls r1, r2, 28 - lsrs r1, 28 - lsrs r2, 4 - b _081BA472 -_081BA3EE: - ldr r1, [r6] - ldrb r2, [r1] - movs r0, 0xF - ands r0, r2 - ldrb r3, [r6, 0xD] - movs r2, 0x10 - negs r2, r2 - ands r2, r3 - orrs r2, r0 - strb r2, [r6, 0xD] - adds r1, 0x1 - str r1, [r6] - ldrb r0, [r6, 0xC] - lsrs r0, 4 - lsls r1, r2, 28 - lsrs r1, 28 - lsrs r2, 4 - b _081BA472 -_081BA412: - ldr r1, [r6] - ldrb r0, [r1] - lsls r0, 4 - ldrb r3, [r6, 0xD] - movs r2, 0xF - ands r2, r3 - orrs r2, r0 - strb r2, [r6, 0xD] - adds r1, 0x1 - str r1, [r6] - ldrb r0, [r6, 0xC] - lsrs r0, 4 - b _081BA46A -_081BA42C: - ldr r3, [r6] - ldrb r1, [r3] - lsls r1, 4 - ldrb r4, [r6, 0xC] - movs r2, 0xF - adds r0, r2, 0 - ands r0, r4 - orrs r0, r1 - strb r0, [r6, 0xC] - adds r5, r3, 0x1 - str r5, [r6] - ldrb r3, [r3, 0x1] - adds r1, r2, 0 - ands r1, r3 - ldrb r4, [r6, 0xD] - movs r3, 0x10 - negs r3, r3 - ands r3, r4 - orrs r3, r1 - strb r3, [r6, 0xD] - adds r4, r5, 0x1 - str r4, [r6] - ldrb r1, [r5, 0x1] - lsls r1, 4 - ands r2, r3 - orrs r2, r1 - strb r2, [r6, 0xD] - adds r4, 0x1 - str r4, [r6] - lsls r0, 24 - lsrs r0, 28 -_081BA46A: - lsls r1, r2, 28 - lsrs r1, 28 - lsls r2, 24 - lsrs r2, 28 -_081BA472: - bl GenerateFontHalfRowLookupTable - b _081BA35E -_081BA478: - ldr r0, [r6] - adds r0, 0x1 - b _081BA4C4 -_081BA47E: - ldr r0, [r6] - ldrb r0, [r0] - movs r1, 0xF - ands r1, r0 - ldrb r2, [r4] - movs r0, 0x10 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r4] - ldr r0, [r6] - adds r0, 0x1 - b _081BA4C4 -_081BA498: - ldr r0, [r6] - ldrb r1, [r0] - strb r1, [r6, 0x1E] - adds r0, 0x1 - str r0, [r6] - movs r0, 0x6 - strb r0, [r6, 0x1C] - b _081BA35E -_081BA4A8: - movs r0, 0x1 - strb r0, [r6, 0x1C] - ldrb r1, [r2] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _081BA50E - movs r0, 0 - strb r0, [r4, 0x2] - b _081BA50E -_081BA4BC: - movs r0, 0x5 - b _081BA64A -_081BA4C0: - ldr r0, [r6] - adds r0, 0x2 -_081BA4C4: - str r0, [r6] - b _081BA35E -_081BA4C8: - ldr r1, [r6] - adds r0, r1, 0x1 - str r0, [r6] - ldrb r3, [r1, 0x1] - b _081BA52E -_081BA4D2: - ldr r1, [r6] - ldrb r0, [r1] - ldrb r2, [r6, 0x6] - adds r0, r2 - strb r0, [r6, 0x8] - b _081BA4E8 -_081BA4DE: - ldr r1, [r6] - ldrb r0, [r1] - ldrb r2, [r6, 0x7] - adds r0, r2 - strb r0, [r6, 0x9] -_081BA4E8: - adds r1, 0x1 - str r1, [r6] - b _081BA35E -_081BA4EE: - ldrb r0, [r6, 0x4] - ldrb r2, [r6, 0xD] - lsls r2, 28 - lsrs r1, r2, 4 - orrs r1, r2 - lsrs r1, 24 - bl FillWindowPixelBuffer - b _081BA35E -_081BA500: - movs r0, 0x2 - b _081BA506 -_081BA504: - movs r0, 0x3 -_081BA506: - strb r0, [r6, 0x1C] - adds r0, r6, 0 - bl TextPrinterInitDownArrowCounters -_081BA50E: - movs r0, 0x3 - b _081BA662 -_081BA512: - ldr r0, [r6] - ldrb r3, [r0] - movs r2, 0x80 - lsls r2, 1 - adds r1, r2, 0 - orrs r3, r1 - adds r0, 0x1 - str r0, [r6] - b _081BA52E -_081BA524: - ldr r0, [r6] - adds r0, 0x1 - str r0, [r6] - movs r0, 0 - b _081BA662 -_081BA52E: - adds r0, r3, 0 - bl DecompressGlyphFont6 - adds r0, r6, 0 - bl CopyGlyphToWindow - ldr r0, =gUnknown_03002F90 - adds r0, 0x80 - ldrb r1, [r6, 0xA] - ldrb r0, [r0] - adds r1, r0 - ldrb r0, [r6, 0x8] - adds r0, r1 - strb r0, [r6, 0x8] - movs r0, 0 - b _081BA662 - .pool -_081BA554: - adds r0, r6, 0 - bl TextPrinterWait - lsls r0, 16 - cmp r0, 0 - beq _081BA50E - movs r0, 0 - strb r0, [r6, 0x1C] - b _081BA50E -_081BA566: - adds r0, r6, 0 - bl TextPrinterWaitWithDownArrow - lsls r0, 16 - cmp r0, 0 - beq _081BA50E - ldrb r0, [r6, 0x4] - ldrb r2, [r6, 0xD] - lsls r2, 28 - lsrs r1, r2, 4 - orrs r1, r2 - lsrs r1, 24 - bl FillWindowPixelBuffer - ldrb r0, [r6, 0x6] - movs r1, 0 - strb r0, [r6, 0x8] - ldrb r0, [r6, 0x7] - strb r0, [r6, 0x9] - strb r1, [r6, 0x1C] - b _081BA50E -_081BA590: - adds r0, r6, 0 - bl TextPrinterWaitWithDownArrow - lsls r0, 16 - cmp r0, 0 - beq _081BA50E - adds r0, r6, 0 - bl TextPrinterClearDownArrow - ldrb r1, [r6, 0x5] - ldr r0, =gFonts - ldr r2, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r6, 0xB] - ldrb r0, [r0, 0x5] - adds r1, r0 - strb r1, [r6, 0x1F] - ldrb r0, [r6, 0x6] - strb r0, [r6, 0x8] - movs r0, 0x4 - strb r0, [r6, 0x1C] - b _081BA50E - .pool -_081BA5C8: - ldrb r2, [r6, 0x1F] - cmp r2, 0 - beq _081BA638 - ldr r4, =gUnknown_08616124 - ldr r5, =gSaveBlock2Ptr - ldr r0, [r5] - ldrb r0, [r0, 0x14] - lsls r1, r0, 29 - lsrs r0, r1, 29 - adds r0, r4 - ldrb r0, [r0] - cmp r2, r0 - bcs _081BA604 - ldrb r0, [r6, 0x4] - ldrb r1, [r6, 0xD] - lsls r1, 28 - lsrs r3, r1, 4 - orrs r3, r1 - lsrs r3, 24 - movs r1, 0 - bl ScrollWindow - movs r0, 0 - strb r0, [r6, 0x1F] - b _081BA62E - .pool -_081BA604: - ldrb r0, [r6, 0x4] - lsrs r1, 29 - adds r1, r4 - ldrb r2, [r1] - ldrb r1, [r6, 0xD] - lsls r1, 28 - lsrs r3, r1, 4 - orrs r3, r1 - lsrs r3, 24 - movs r1, 0 - bl ScrollWindow - ldr r0, [r5] - ldrb r0, [r0, 0x14] - lsls r0, 29 - lsrs r0, 29 - adds r0, r4 - ldrb r1, [r6, 0x1F] - ldrb r0, [r0] - subs r1, r0 - strb r1, [r6, 0x1F] -_081BA62E: - ldrb r0, [r6, 0x4] - movs r1, 0x2 - bl CopyWindowToVram - b _081BA50E -_081BA638: - strb r2, [r6, 0x1C] - b _081BA50E -_081BA63C: - bl IsSEPlaying - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - beq _081BA64A - b _081BA50E -_081BA64A: - strb r0, [r6, 0x1C] - b _081BA50E -_081BA64E: - ldrb r0, [r6, 0x1E] - adds r1, r0, 0 - cmp r1, 0 - beq _081BA65C - subs r0, 0x1 - strb r0, [r6, 0x1E] - b _081BA50E -_081BA65C: - strb r1, [r6, 0x1C] - b _081BA50E -_081BA660: - movs r0, 0x1 -_081BA662: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end Font6Func - thumb_func_start DecompressGlyphFont6 DecompressGlyphFont6: @ 81BA668 push {r4,r5,lr} diff --git a/include/text.h b/include/text.h index c61f6cc98..a7a79da7a 100644 --- a/include/text.h +++ b/include/text.h @@ -78,6 +78,22 @@ #define NUM_TEXT_PRINTERS 32 +struct TextPrinterSubStruct +{ + u8 font_type:4; // 0x14 + u8 font_type_upper:1; + u8 font_type_5:3; + u8 field_1:5; + u8 field_1_upmid:2; + u8 field_1_top:1; + u8 frames_visible_counter; + u8 field_3; + u8 field_4; // 0x18 + u8 field_5; + u8 field_6; + u8 active; +}; + struct TextPrinter { struct TextSubPrinter { // TODO: Better name @@ -99,20 +115,7 @@ struct TextPrinter void (*callback)(struct TextSubPrinter *, u16); // 0x10 union { - struct TextPrinterSubStruct - { - u8 font_type:4; // 0x14 - u8 font_type_upper:4; - u8 field_1:5; - u8 field_1_upmid:2; - u8 field_1_top:1; - u8 frames_visible_counter; - u8 field_3; - u8 field_4; // 0x18 - u8 field_5; - u8 field_6; - u8 active; - } sub; + struct TextPrinterSubStruct sub; u8 sub_fields[8]; } sub_union; @@ -138,6 +141,8 @@ struct FontInfo u8 shadowColor:4; }; +extern const struct FontInfo *gFonts; + struct GlyphWidthFunc{ u32 font_id; u32 (*func)(u16 glyphId, bool32 isJapanese); @@ -149,11 +154,26 @@ struct KeypadIcon { u8 height; }; +typedef struct { + u8 flag_0:1; + u8 flag_1:1; + u8 flag_2:1; +} TextFlags; + +extern TextFlags gTextFlags; + extern u8 gStringVar1[]; extern u8 gStringVar2[]; extern u8 gStringVar3[]; extern u8 gStringVar4[]; +u8 gUnknown_03002F84; +u8 gUnknown_03002F90[0x20]; +u8 gUnknown_03002FB0[0x20]; +u8 gUnknown_03002FD0[0x20]; +u8 gUnknown_03002FF0[0x20]; +u8 gGlyphDimensions[0x2]; + void SetFontsPointer(const struct FontInfo *fonts); void DeactivateAllTextPrinters (void); u16 PrintTextOnWindow(u8 windowId, u8 fontId, u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextSubPrinter *, u16)); @@ -182,8 +202,8 @@ void TextPrinterInitDownArrowCounters(struct TextPrinter *textPrinter); void TextPrinterDrawDownArrow(struct TextPrinter *textPrinter); void TextPrinterClearDownArrow(struct TextPrinter *textPrinter); bool8 TextPrinterWaitAutoMode(struct TextPrinter *textPrinter); -bool8 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter); -bool8 TextPrinterWait(struct TextPrinter *textPrinter); +bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter); +bool16 TextPrinterWait(struct TextPrinter *textPrinter); void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex); u16 RenderText(struct TextPrinter *textPrinter); u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing); diff --git a/ld_script.txt b/ld_script.txt index 177f36888..bafc67285 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -253,6 +253,7 @@ SECTIONS { asm/item_icon.o(.text); asm/party_menu.o(.text); asm/battle_tent.o(.text); + src/unk_text_util_2.o(.text); asm/unk_text_util_2.o(.text); src/multiboot.o(.text); asm/unk_81BAD84.o(.text); diff --git a/src/text.c b/src/text.c index aa4e201c0..fe1c5df24 100644 --- a/src/text.c +++ b/src/text.c @@ -32,11 +32,7 @@ u8 gUnknown_03002FB0[0x20]; u8 gUnknown_03002FD0[0x20]; u8 gUnknown_03002FF0[0x20]; u8 gGlyphDimensions[0x2]; -struct { - u8 flag_0:1; - u8 flag_1:1; - u8 flag_2:1; -} gTextFlags; +TextFlags gTextFlags; const u8 gFontHalfRowOffsets[] = { 0x00, 0x01, 0x02, 0x00, 0x03, 0x04, 0x05, 0x03, 0x06, 0x07, 0x08, 0x06, 0x00, 0x01, 0x02, 0x00, @@ -1973,7 +1969,7 @@ bool8 TextPrinterWaitAutoMode(struct TextPrinter *textPrinter) } } -bool8 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter) +bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter) { bool8 result = FALSE; if (gTextFlags.flag_2 != 0) @@ -1992,9 +1988,9 @@ bool8 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter) return result; } -bool8 TextPrinterWait(struct TextPrinter *textPrinter) +bool16 TextPrinterWait(struct TextPrinter *textPrinter) { - bool8 result = FALSE; + bool16 result = FALSE; if (gTextFlags.flag_2 != 0) { result = TextPrinterWaitAutoMode(textPrinter); diff --git a/src/unk_text_util_2.c b/src/unk_text_util_2.c new file mode 100644 index 000000000..23f3ca1b6 --- /dev/null +++ b/src/unk_text_util_2.c @@ -0,0 +1,200 @@ +#include "global.h" +#include "main.h" +#include "window.h" +#include "text.h" +#include "sound.h" + +extern const u8 gUnknown_08616124[]; + +void DecompressGlyphFont6(u16); + +u16 Font6Func(struct TextPrinter *textPrinter) +{ + u16 char_; + struct TextPrinterSubStruct *sub; + + sub = &textPrinter->sub_union.sub; + switch (textPrinter->state) + { + case 0: + if (gMain.heldKeys & (A_BUTTON | B_BUTTON) && sub->font_type_upper) + { + textPrinter->delayCounter = 0; + } + if (textPrinter->delayCounter && textPrinter->text_speed) + { + textPrinter->delayCounter --; + if (gTextFlags.flag_0 && gMain.newKeys & (A_BUTTON | B_BUTTON)) + { + sub->font_type_upper = TRUE; + textPrinter->delayCounter = 0; + } + return 3; + } + if (gTextFlags.flag_2) + { + textPrinter->delayCounter = 3; + } + else + { + textPrinter->delayCounter = textPrinter->text_speed; + } + char_ = *textPrinter->subPrinter.current_text_offset ++; + switch (char_) + { + case EOS: + return 1; + case CHAR_NEWLINE: + textPrinter->subPrinter.currentX = textPrinter->subPrinter.x; + textPrinter->subPrinter.currentY += gFonts[textPrinter->subPrinter.fontId].maxLetterHeight + textPrinter->subPrinter.lineSpacing; + return 2; + case PLACEHOLDER_BEGIN: + textPrinter->subPrinter.current_text_offset ++; + return 2; + case EXT_CTRL_CODE_BEGIN: + char_ = *textPrinter->subPrinter.current_text_offset ++; + switch (char_) + { + case 1: + textPrinter->subPrinter.fontColor_h = *textPrinter->subPrinter.current_text_offset ++; + GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); + return 2; + case 2: + textPrinter->subPrinter.bgColor = *textPrinter->subPrinter.current_text_offset ++; + GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); + return 2; + case 3: + textPrinter->subPrinter.shadowColor = *textPrinter->subPrinter.current_text_offset ++; + GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); + return 2; + case 4: + textPrinter->subPrinter.fontColor_h = *textPrinter->subPrinter.current_text_offset; + textPrinter->subPrinter.bgColor = *++ textPrinter->subPrinter.current_text_offset; + textPrinter->subPrinter.shadowColor = *++ textPrinter->subPrinter.current_text_offset; + textPrinter->subPrinter.current_text_offset ++; + + GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); + return 2; + case 5: + textPrinter->subPrinter.current_text_offset ++; + return 2; + case 6: + sub->font_type = *textPrinter->subPrinter.current_text_offset; + textPrinter->subPrinter.current_text_offset ++; + return 2; + case 7: + return 2; + case 8: + textPrinter->delayCounter = *textPrinter->subPrinter.current_text_offset ++; + textPrinter->state = 6; + return 2; + case 9: + textPrinter->state = 1; + if (gTextFlags.flag_2) + { + sub->frames_visible_counter = 0; + } + return 3; + case 10: + textPrinter->state = 5; + return 3; + case 11: + case 16: + textPrinter->subPrinter.current_text_offset += 2; + return 2; + case 12: + char_ = *++textPrinter->subPrinter.current_text_offset; + break; + case 13: + textPrinter->subPrinter.currentX = textPrinter->subPrinter.x + *textPrinter->subPrinter.current_text_offset ++; + return 2; + case 14: + textPrinter->subPrinter.currentY = textPrinter->subPrinter.y + *textPrinter->subPrinter.current_text_offset ++; + return 2; + case 15: + FillWindowPixelBuffer(textPrinter->subPrinter.windowId, textPrinter->subPrinter.bgColor | (textPrinter->subPrinter.bgColor << 4)); + return 2; + } + break; + case CHAR_PROMPT_CLEAR: + textPrinter->state = 2; + TextPrinterInitDownArrowCounters(textPrinter); + return 3; + case CHAR_PROMPT_SCROLL: + textPrinter->state = 3; + TextPrinterInitDownArrowCounters(textPrinter); + return 3; + case 0xF9: + char_ = *textPrinter->subPrinter.current_text_offset ++ | 0x100; + break; + case 0xF8: + textPrinter->subPrinter.current_text_offset ++; + return 0; + } + DecompressGlyphFont6(char_); + CopyGlyphToWindow(textPrinter); + textPrinter->subPrinter.currentX += gUnknown_03002F90[0x80] + textPrinter->subPrinter.letterSpacing; + return 0; + case 1: + if (TextPrinterWait(textPrinter)) + { + textPrinter->state = 0; + } + return 3; + case 2: + if (TextPrinterWaitWithDownArrow(textPrinter)) + { + FillWindowPixelBuffer(textPrinter->subPrinter.windowId, textPrinter->subPrinter.bgColor | (textPrinter->subPrinter.bgColor << 4)); + textPrinter->subPrinter.currentX = textPrinter->subPrinter.x; + textPrinter->subPrinter.currentY = textPrinter->subPrinter.y; + textPrinter->state = 0; + } + return 3; + case 3: + if (TextPrinterWaitWithDownArrow(textPrinter)) + { + TextPrinterClearDownArrow(textPrinter); + textPrinter->scrollDistance = gFonts[textPrinter->subPrinter.fontId].maxLetterHeight + textPrinter->subPrinter.lineSpacing; + textPrinter->subPrinter.currentX = textPrinter->subPrinter.x; + textPrinter->state = 4; + } + return 3; + case 4: + if (textPrinter->scrollDistance) + { + if (textPrinter->scrollDistance < gUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed]) + { + ScrollWindow(textPrinter->subPrinter.windowId, 0, textPrinter->scrollDistance, textPrinter->subPrinter.bgColor | (textPrinter->subPrinter.bgColor << 4)); + textPrinter->scrollDistance = 0; + } + else + { + ScrollWindow(textPrinter->subPrinter.windowId, 0, gUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed], textPrinter->subPrinter.bgColor | (textPrinter->subPrinter.bgColor << 4)); + textPrinter->scrollDistance -= gUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed]; + } + CopyWindowToVram(textPrinter->subPrinter.windowId, 2); + } + else + { + textPrinter->state = 0; + } + return 3; + case 5: + if (!IsSEPlaying()) + { + textPrinter->state = 0; + } + return 3; + case 6: + if (textPrinter->delayCounter) + { + textPrinter->delayCounter --; + } + else + { + textPrinter->state = 0; + } + return 3; + } + return 1; +} From aa64f61b84d6b52f4073cf9acef1a927cd9010e6 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 22 Sep 2017 00:01:07 -0400 Subject: [PATCH 271/342] Finish decomp of unk_text_util_2 --- asm/unk_text_util_2.s | 60 ------------------------------------------- ld_script.txt | 1 - src/unk_text_util_2.c | 21 ++++++++++++++- 3 files changed, 20 insertions(+), 62 deletions(-) delete mode 100755 asm/unk_text_util_2.s diff --git a/asm/unk_text_util_2.s b/asm/unk_text_util_2.s deleted file mode 100755 index c1ab25594..000000000 --- a/asm/unk_text_util_2.s +++ /dev/null @@ -1,60 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start DecompressGlyphFont6 -DecompressGlyphFont6: @ 81BA668 - push {r4,r5,lr} - lsls r0, 16 - lsrs r2, r0, 19 - lsls r2, 9 - movs r1, 0xE0 - lsls r1, 11 - ands r1, r0 - lsrs r1, 11 - ldr r0, =gFont6BrailleGlyphs - adds r1, r0 - adds r5, r2, r1 - ldr r4, =gUnknown_03002F90 - adds r0, r5, 0 - adds r1, r4, 0 - bl DecompressGlyphTile - adds r0, r5, 0 - adds r0, 0x10 - adds r1, r4, 0 - adds r1, 0x20 - bl DecompressGlyphTile - movs r1, 0x80 - lsls r1, 1 - adds r0, r5, r1 - adds r1, r4, 0 - adds r1, 0x40 - bl DecompressGlyphTile - movs r1, 0x88 - lsls r1, 1 - adds r0, r5, r1 - adds r1, r4, 0 - adds r1, 0x60 - bl DecompressGlyphTile - adds r0, r4, 0 - adds r0, 0x80 - movs r1, 0x10 - strb r1, [r0] - adds r0, 0x1 - strb r1, [r0] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end DecompressGlyphFont6 - - thumb_func_start GetGlyphWidthFont6 -GetGlyphWidthFont6: @ 81BA6CC - movs r0, 0x10 - bx lr - thumb_func_end GetGlyphWidthFont6 - - .align 2, 0 @ Don't pad with nop. diff --git a/ld_script.txt b/ld_script.txt index bafc67285..aee6ae59a 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -254,7 +254,6 @@ SECTIONS { asm/party_menu.o(.text); asm/battle_tent.o(.text); src/unk_text_util_2.o(.text); - asm/unk_text_util_2.o(.text); src/multiboot.o(.text); asm/unk_81BAD84.o(.text); asm/battle_controller_player_partner.o(.text); diff --git a/src/unk_text_util_2.c b/src/unk_text_util_2.c index 23f3ca1b6..d9bd9d98d 100644 --- a/src/unk_text_util_2.c +++ b/src/unk_text_util_2.c @@ -5,8 +5,9 @@ #include "sound.h" extern const u8 gUnknown_08616124[]; +extern const u16 gFont6BrailleGlyphs[]; -void DecompressGlyphFont6(u16); +static void DecompressGlyphFont6(u16); u16 Font6Func(struct TextPrinter *textPrinter) { @@ -198,3 +199,21 @@ u16 Font6Func(struct TextPrinter *textPrinter) } return 1; } + +static void DecompressGlyphFont6(u16 glyph) +{ + const u16 *glyphs; + + glyphs = gFont6BrailleGlyphs + 0x100 * (glyph / 8) + 0x10 * (glyph % 8); + DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90); + DecompressGlyphTile(glyphs + 0x8, (u16 *)(gUnknown_03002F90 + 0x20)); + DecompressGlyphTile(glyphs + 0x80, (u16 *)(gUnknown_03002F90 + 0x40)); + DecompressGlyphTile(glyphs + 0x88, (u16 *)(gUnknown_03002F90 + 0x60)); + gUnknown_03002F90[0x80] = 0x10; + gUnknown_03002F90[0x81] = 0x10; +} + +u8 GetGlyphWidthFont6(void) +{ + return 0x10; +} From d5afb0c6e9566a62ca6d597aeabc173b2c3e7fa5 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Fri, 22 Sep 2017 21:33:49 +0200 Subject: [PATCH 272/342] up to x48 and troubles --- asm/battle_2.s | 26 +- asm/battle_4.s | 5876 +-------------------- asm/battle_5.s | 12 +- asm/battle_7.s | 6 +- asm/battle_controller_linkopponent.s | 2 +- asm/battle_controller_linkpartner.s | 2 +- asm/battle_controller_opponent.s | 2 +- asm/battle_controller_player.s | 4 +- asm/battle_controller_player_partner.s | 2 +- asm/battle_controller_recorded_opponent.s | 2 +- asm/battle_controller_recorded_player.s | 2 +- asm/battle_controller_safari.s | 2 +- asm/battle_controller_wally.s | 2 +- asm/rom3.s | 18 +- data/battle_scripts_1.s | 12 +- include/battle.h | 144 +- include/battle_controllers.h | 3 + include/pokemon.h | 3 + src/battle_3.c | 92 +- src/battle_4.c | 1890 ++++++- sym_common.txt | 2 +- sym_ewram.txt | 4 +- 22 files changed, 2013 insertions(+), 6095 deletions(-) diff --git a/asm/battle_2.s b/asm/battle_2.s index ad449bfdf..47db7e082 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -6513,7 +6513,7 @@ _0803A0AE: ldr r5, =gPauseCounterBattle ldr r6, =gBattleMoveDamage ldr r7, =gUnknown_020243FC - ldr r0, =gUnknown_03005D54 + ldr r0, =gLeveledUpInBattle mov r8, r0 ldr r1, =gAbsentBankFlags mov r9, r1 @@ -7256,8 +7256,8 @@ _0803A6B4: .pool thumb_func_end sub_803A284 - thumb_func_start sub_803A75C -sub_803A75C: @ 803A75C + thumb_func_start UndoEffectsAfterFainting +UndoEffectsAfterFainting: @ 803A75C push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -7786,7 +7786,7 @@ _0803AB6C: pop {r0} bx r0 .pool - thumb_func_end sub_803A75C + thumb_func_end UndoEffectsAfterFainting thumb_func_start bc_8012FAC bc_8012FAC: @ 803ABC0 @@ -12891,7 +12891,7 @@ _0803D920: ands r2, r0 cmp r2, 0 beq _0803D95C - bl sub_805EA60 + bl BattleMusicStop ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DAA87 str r0, [r1] @@ -12912,7 +12912,7 @@ _0803D95C: beq _0803D968 b _0803DA9E _0803D968: - bl sub_805EA60 + bl BattleMusicStop ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DA92D str r0, [r1] @@ -13371,7 +13371,7 @@ sub_803DE40: @ 803DE40 cmp r0, 0 bne _0803DE86 bl ResetSpriteData - ldr r0, =gUnknown_03005D54 + ldr r0, =gLeveledUpInBattle ldrb r0, [r0] cmp r0, 0 beq _0803DE62 @@ -13409,7 +13409,7 @@ _0803DEA2: thumb_func_start bc_evolution_cutscene bc_evolution_cutscene: @ 803DEB4 push {r4-r6,lr} - ldr r0, =gUnknown_03005D54 + ldr r0, =gLeveledUpInBattle ldrb r1, [r0] adds r3, r0, 0 cmp r1, 0 @@ -13454,7 +13454,7 @@ _0803DEC2: .pool _0803DF20: adds r6, 0x1 - ldr r3, =gUnknown_03005D54 + ldr r3, =gLeveledUpInBattle cmp r6, 0x5 ble _0803DEC2 ldrb r0, [r3] @@ -16323,7 +16323,7 @@ PrepareStringBattle: @ 803F964 sub_803F988: @ 803F988 push {r4-r6,lr} movs r3, 0 - ldr r0, =gUnknown_020243FE + ldr r0, =gSentPokesToOpponent strb r3, [r0] strb r3, [r0, 0x1] movs r1, 0 @@ -16351,7 +16351,7 @@ _0803F9B6: ldrb r0, [r2] cmp r1, r0 bge _0803F9D6 - ldr r5, =gUnknown_020243FE + ldr r5, =gSentPokesToOpponent movs r4, 0x2 _0803F9C4: adds r0, r1, 0 @@ -16389,7 +16389,7 @@ sub_803F9EC: @ 803F9EC lsls r0, 24 lsrs r0, 25 mov r12, r0 - ldr r1, =gUnknown_020243FE + ldr r1, =gSentPokesToOpponent adds r0, r1 strb r4, [r0] adds r5, r4, 0 @@ -16453,7 +16453,7 @@ _0803FA8C: ldrb r0, [r5] cmp r3, r0 bge _0803FAC2 - ldr r0, =gUnknown_020243FE + ldr r0, =gSentPokesToOpponent mov r12, r0 movs r7, 0x2 ldr r6, =gBitTable diff --git a/asm/battle_4.s b/asm/battle_4.s index 667b93ec8..ddde05c1d 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -6,5848 +6,6 @@ .text - thumb_func_start SetMoveEffect -SetMoveEffect: @ 8048760 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x8 - lsls r0, 24 - lsrs r5, r0, 24 - lsls r1, 24 - lsrs r6, r1, 24 - movs r0, 0 - mov r10, r0 - movs r7, 0 - movs r1, 0x1 - str r1, [sp, 0x4] - ldr r1, =gBattleCommunication - ldrb r3, [r1, 0x3] - movs r0, 0x40 - ands r0, r3 - cmp r0, 0 - beq _080487B8 - ldr r2, =gEffectBank - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r2] - movs r0, 0xBF - ands r0, r3 - adds r3, r1, 0 - strb r0, [r3, 0x3] - movs r7, 0x40 - ldr r1, =gBattleScripting - ldr r0, =gBankTarget - b _080487C4 - .pool -_080487B8: - ldr r2, =gEffectBank - ldr r0, =gBankTarget - ldrb r0, [r0] - strb r0, [r2] - ldr r1, =gBattleScripting - ldr r0, =gBankAttacker -_080487C4: - ldrb r0, [r0] - strb r0, [r1, 0x17] - mov r9, r2 - ldr r2, =gBattleMons - mov r4, r9 - ldrb r1, [r4] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x13 - bne _08048828 - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 6 - ands r0, r1 - cmp r0, 0 - bne _08048828 - cmp r5, 0 - bne _08048828 - ldr r1, =gBattleCommunication - ldrb r0, [r1, 0x3] - cmp r0, 0x9 - bhi _08048828 - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - ldr r2, =gBattleCommunication - strb r5, [r2, 0x3] - bl _080499B8 - .pool -_08048828: - mov r3, r9 - ldrb r0, [r3] - bl GetBankIdentity - ldr r2, =gSideAffecting - movs r1, 0x1 - ands r1, r0 - lsls r1, 1 - adds r1, r2 - ldrh r1, [r1] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _08048880 - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 6 - ands r0, r1 - cmp r0, 0 - bne _08048880 - cmp r5, 0 - bne _08048880 - ldr r0, =gBattleCommunication - ldrb r1, [r0, 0x3] - cmp r1, 0x7 - bhi _08048880 - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - ldr r4, =gBattleCommunication - strb r5, [r4, 0x3] - bl _080499B8 - .pool -_08048880: - ldr r3, =gBattleMons - ldr r2, =gEffectBank - ldrb r1, [r2] - movs r0, 0x58 - muls r0, r1 - adds r0, r3 - ldrh r4, [r0, 0x28] - mov r9, r2 - mov r8, r3 - cmp r4, 0 - bne _080488C4 - ldr r1, =gBattleCommunication - ldrb r0, [r1, 0x3] - cmp r0, 0xB - beq _080488C4 - cmp r0, 0x1F - beq _080488C4 - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - ldr r2, =gBattleCommunication - strb r4, [r2, 0x3] - bl _080499B8 - .pool -_080488C4: - mov r3, r9 - ldrb r1, [r3] - movs r0, 0x58 - muls r0, r1 - mov r1, r8 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 17 - ands r0, r1 - cmp r0, 0 - beq _080488FC - cmp r7, 0x40 - beq _080488FC - ldr r0, =gBattlescriptCurrInstr - ldr r1, [r0] - adds r1, 0x1 - str r1, [r0] - movs r0, 0 - ldr r4, =gBattleCommunication - strb r0, [r4, 0x3] - bl _080499B8 - .pool -_080488FC: - ldr r1, =gBattleCommunication - ldrb r0, [r1, 0x3] - cmp r0, 0x6 - bls _08048906 - b _08048F40 -_08048906: - ldr r1, =gStatusFlagsForMoveEffects - ldr r2, =gBattleCommunication - ldrb r0, [r2, 0x3] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - cmp r0, 0x10 - bne _08048918 - b _08048AFC -_08048918: - cmp r0, 0x10 - bhi _08048930 - cmp r0, 0x7 - beq _0804894A - cmp r0, 0x8 - beq _08048A00 - b _08048DF4 - .pool -_08048930: - cmp r0, 0x40 - bne _08048936 - b _08048C84 -_08048936: - cmp r0, 0x40 - bhi _08048942 - cmp r0, 0x20 - bne _08048940 - b _08048BEA -_08048940: - b _08048DF4 -_08048942: - cmp r0, 0x80 - bne _08048948 - b _08048D02 -_08048948: - b _08048DF4 -_0804894A: - mov r3, r9 - ldrb r1, [r3] - movs r0, 0x58 - muls r0, r1 - add r0, r8 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x2B - beq _080489AC - ldr r0, =gActiveBank - movs r1, 0 - strb r1, [r0] - ldr r1, =gNoOfAllBanks - ldrb r3, [r1] - adds r7, r0, 0 - mov r12, r1 - cmp r3, 0 - beq _080489B8 - mov r4, r8 - ldr r0, [r4, 0x50] - movs r1, 0x70 - ands r0, r1 - cmp r0, 0 - bne _080489B8 - adds r1, r7, 0 - mov r6, r8 - adds r6, 0x50 - movs r5, 0x58 - movs r4, 0x70 -_08048984: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - lsls r0, 24 - lsrs r0, 24 - cmp r0, r3 - bcs _080489B8 - ldrb r0, [r7] - muls r0, r5 - adds r0, r6 - ldr r0, [r0] - ands r0, r4 - cmp r0, 0 - beq _08048984 - b _080489B8 - .pool -_080489AC: - ldr r0, =gActiveBank - ldr r2, =gNoOfAllBanks - ldrb r1, [r2] - strb r1, [r0] - adds r7, r0, 0 - mov r12, r2 -_080489B8: - mov r0, r9 - ldrb r2, [r0] - movs r0, 0x58 - adds r1, r2, 0 - muls r1, r0 - mov r0, r8 - adds r0, 0x4C - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - beq _080489D0 - b _08048DF4 -_080489D0: - ldrb r0, [r7] - mov r3, r12 - ldrb r3, [r3] - cmp r0, r3 - beq _080489DC - b _08048DF4 -_080489DC: - mov r4, r8 - adds r0, r1, r4 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x48 - bne _080489EA - b _08048DF4 -_080489EA: - cmp r0, 0xF - bne _080489F0 - b _08048DF4 -_080489F0: - adds r0, r2, 0 - bl CancelMultiTurnMoves - b _08048DE4 - .pool -_08048A00: - mov r2, r9 - ldrb r1, [r2] - movs r0, 0x58 - muls r0, r1 - add r0, r8 - adds r0, 0x20 - ldrb r1, [r0] - cmp r1, 0x11 - bne _08048A70 - cmp r5, 0x1 - beq _08048A1A - cmp r6, 0x80 - bne _08048A70 -_08048A1A: - ldr r0, =gLastUsedAbility - strb r1, [r0] - mov r3, r9 - ldrb r0, [r3] - movs r1, 0x11 - bl RecordAbilityBattle - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_PSNPrevention - str r0, [r4] - ldr r2, =gHitMarker - ldr r1, [r2] - movs r0, 0x80 - lsls r0, 6 - ands r0, r1 - cmp r0, 0 - bne _08048A46 - b _08048D20 -_08048A46: - movs r0, 0x1 - ldr r4, =gBattleCommunication - strb r0, [r4, 0x5] -_08048A4C: - ldr r0, =0xffffdfff - ands r1, r0 - str r1, [r2] - bl _080499B2 - .pool -_08048A70: - mov r2, r9 - ldrb r0, [r2] - movs r1, 0x58 - muls r0, r1 - add r0, r8 - adds r1, r0, 0 - adds r1, 0x21 - ldrb r1, [r1] - cmp r1, 0x3 - beq _08048A94 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0x3 - beq _08048A94 - cmp r1, 0x8 - beq _08048A94 - cmp r0, 0x8 - bne _08048AAE -_08048A94: - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 6 - ands r0, r1 - cmp r0, 0 - beq _08048AAE - cmp r5, 0x1 - bne _08048AA8 - b _08048D66 -_08048AA8: - cmp r6, 0x80 - bne _08048AAE - b _08048D66 -_08048AAE: - mov r3, r9 - ldrb r1, [r3] - movs r0, 0x58 - muls r1, r0 - mov r4, r8 - adds r3, r1, r4 - adds r0, r3, 0 - adds r0, 0x21 - ldrb r4, [r0] - cmp r4, 0x3 - bne _08048AC6 - b _08048DF4 -_08048AC6: - adds r0, 0x1 - ldrb r0, [r0] - cmp r0, 0x3 - bne _08048AD0 - b _08048DF4 -_08048AD0: - cmp r4, 0x8 - bne _08048AD6 - b _08048DF4 -_08048AD6: - cmp r0, 0x8 - bne _08048ADC - b _08048DF4 -_08048ADC: - mov r0, r8 - adds r0, 0x4C - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - beq _08048AEA - b _08048DF4 -_08048AEA: - adds r0, r3, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x11 - bne _08048AF6 - b _08048DF4 -_08048AF6: - b _08048DE4 - .pool -_08048AFC: - mov r2, r9 - ldrb r1, [r2] - movs r0, 0x58 - muls r0, r1 - add r0, r8 - adds r0, 0x20 - ldrb r1, [r0] - cmp r1, 0x29 - bne _08048B54 - cmp r5, 0x1 - beq _08048B16 - cmp r6, 0x80 - bne _08048B54 -_08048B16: - ldr r0, =gLastUsedAbility - strb r1, [r0] - mov r3, r9 - ldrb r0, [r3] - movs r1, 0x29 - bl RecordAbilityBattle - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_BRNPrevention - str r0, [r4] - ldr r2, =gHitMarker - ldr r1, [r2] - movs r0, 0x80 - lsls r0, 6 - ands r0, r1 - cmp r0, 0 - beq _08048B42 - b _08048A46 -_08048B42: - b _08048D20 - .pool -_08048B54: - mov r2, r9 - ldrb r1, [r2] - movs r0, 0x58 - muls r0, r1 - mov r3, r8 - adds r1, r0, r3 - adds r0, r1, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0xA - beq _08048B74 - adds r0, r1, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0xA - bne _08048BA4 -_08048B74: - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 6 - ands r0, r1 - cmp r0, 0 - beq _08048BA4 - cmp r5, 0x1 - beq _08048B8A - cmp r6, 0x80 - bne _08048BA4 -_08048B8A: - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_BRNPrevention - b _08048D72 - .pool -_08048BA4: - mov r4, r9 - ldrb r0, [r4] - movs r1, 0x58 - adds r2, r0, 0 - muls r2, r1 - mov r0, r8 - adds r1, r2, r0 - adds r0, r1, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0xA - bne _08048BBE - b _08048DF4 -_08048BBE: - adds r0, r1, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0xA - bne _08048BCA - b _08048DF4 -_08048BCA: - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x29 - bne _08048BD6 - b _08048DF4 -_08048BD6: - mov r0, r8 - adds r0, 0x4C - adds r0, r2, r0 - ldr r0, [r0] - cmp r0, 0 - beq _08048BE4 - b _08048DF4 -_08048BE4: - movs r1, 0x1 - mov r10, r1 - b _08048DF4 -_08048BEA: - movs r0, 0 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0xD - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - bne _08048C26 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0x4D - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _08048C26 - ldr r0, =gBattleWeather - ldrh r1, [r0] - movs r0, 0x60 - ands r0, r1 - cmp r0, 0 - beq _08048C26 - movs r2, 0 - str r2, [sp, 0x4] -_08048C26: - ldr r4, =gBattleMons - ldr r0, =gEffectBank - ldrb r3, [r0] - movs r0, 0x58 - adds r2, r3, 0 - muls r2, r0 - adds r1, r2, r4 - adds r0, r1, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0xF - bne _08048C40 - b _08048DF4 -_08048C40: - adds r0, r1, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0xF - bne _08048C4C - b _08048DF4 -_08048C4C: - adds r0, r4, 0 - adds r0, 0x4C - adds r0, r2, r0 - ldr r0, [r0] - cmp r0, 0 - beq _08048C5A - b _08048DF4 -_08048C5A: - ldr r4, [sp, 0x4] - cmp r4, 0 - bne _08048C62 - b _08048DF4 -_08048C62: - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x28 - bne _08048C6E - b _08048DF4 -_08048C6E: - adds r0, r3, 0 - bl CancelMultiTurnMoves - b _08048DE4 - .pool -_08048C84: - mov r2, r9 - ldrb r1, [r2] - movs r0, 0x58 - muls r1, r0 - mov r3, r8 - adds r0, r1, r3 - adds r0, 0x20 - ldrb r2, [r0] - cmp r2, 0x7 - bne _08048CF4 - cmp r5, 0x1 - beq _08048CA2 - cmp r6, 0x80 - beq _08048CA2 - b _08048DF4 -_08048CA2: - ldr r0, =gLastUsedAbility - strb r2, [r0] - mov r4, r9 - ldrb r0, [r4] - movs r1, 0x7 - bl RecordAbilityBattle - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_PRLZPrevention - str r0, [r4] - ldr r2, =gHitMarker - ldr r1, [r2] - movs r0, 0x80 - lsls r0, 6 - ands r0, r1 - cmp r0, 0 - beq _08048CE8 - movs r0, 0x1 - ldr r3, =gBattleCommunication - strb r0, [r3, 0x5] - b _08048A4C - .pool -_08048CE8: - ldr r4, =gBattleCommunication - strb r0, [r4, 0x5] - bl _080499B2 - .pool -_08048CF4: - mov r0, r8 - adds r0, 0x4C - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _08048DF4 - b _08048DE4 -_08048D02: - mov r2, r9 - ldrb r1, [r2] - movs r0, 0x58 - muls r0, r1 - add r0, r8 - adds r0, 0x20 - ldrb r1, [r0] - cmp r1, 0x11 - bne _08048D2C - cmp r5, 0x1 - bne _08048D1A - b _08048A1A -_08048D1A: - cmp r6, 0x80 - bne _08048D2C - b _08048A1A -_08048D20: - ldr r1, =gBattleCommunication - strb r0, [r1, 0x5] - bl _080499B2 - .pool -_08048D2C: - mov r2, r9 - ldrb r0, [r2] - movs r1, 0x58 - muls r0, r1 - add r0, r8 - adds r1, r0, 0 - adds r1, 0x21 - ldrb r1, [r1] - cmp r1, 0x3 - beq _08048D50 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0x3 - beq _08048D50 - cmp r1, 0x8 - beq _08048D50 - cmp r0, 0x8 - bne _08048D94 -_08048D50: - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 6 - ands r0, r1 - cmp r0, 0 - beq _08048D94 - cmp r5, 0x1 - beq _08048D66 - cmp r6, 0x80 - bne _08048D94 -_08048D66: - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_PSNPrevention -_08048D72: - str r0, [r4] - ldr r1, =gBattleCommunication - movs r2, 0 - movs r0, 0x2 - strb r0, [r1, 0x5] - strb r2, [r1, 0x3] - bl _080499B8 - .pool -_08048D94: - mov r3, r9 - ldrb r0, [r3] - movs r6, 0x58 - muls r0, r6 - mov r2, r8 - adds r2, 0x4C - adds r5, r0, r2 - ldr r4, [r5] - cmp r4, 0 - bne _08048DF4 - mov r3, r8 - adds r1, r0, r3 - adds r0, r1, 0 - adds r0, 0x21 - ldrb r3, [r0] - cmp r3, 0x3 - beq _08048DEA - adds r0, 0x1 - ldrb r0, [r0] - cmp r0, 0x3 - beq _08048DEA - cmp r3, 0x8 - beq _08048DEA - cmp r0, 0x8 - beq _08048DEA - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x11 - beq _08048DF4 - mov r4, r9 - ldrb r0, [r4] - adds r1, r0, 0 - muls r1, r6 - adds r1, r2 - ldr r0, [r1] - movs r2, 0x9 - negs r2, r2 - ands r0, r2 - str r0, [r1] -_08048DE4: - movs r0, 0x1 - mov r10, r0 - b _08048DF4 -_08048DEA: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r2, 0x8 - orrs r1, r2 - strb r1, [r0] -_08048DF4: - mov r1, r10 - cmp r1, 0x1 - beq _08048DFC - b _08048F1C -_08048DFC: - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r1, =gStatusFlagsForMoveEffects - ldr r0, =gBattleCommunication - ldrb r0, [r0, 0x3] - lsls r0, 2 - adds r0, r1 - ldr r3, [r0] - cmp r3, 0x7 - bne _08048E50 - bl Random - ldr r2, =gBattleMons - ldr r1, =gEffectBank - ldrb r3, [r1] - movs r1, 0x58 - muls r3, r1 - adds r2, 0x4C - adds r3, r2 - movs r1, 0x3 - ands r1, r0 - adds r1, 0x2 - ldr r0, [r3] - orrs r0, r1 - str r0, [r3] - b _08048E64 - .pool -_08048E50: - ldr r2, =gBattleMons - ldr r0, =gEffectBank - ldrb r1, [r0] - movs r0, 0x58 - muls r1, r0 - adds r2, 0x4C - adds r1, r2 - ldr r0, [r1] - orrs r0, r3 - str r0, [r1] -_08048E64: - ldr r2, =gBattlescriptCurrInstr - ldr r1, =gMoveEffectBS_Ptrs - ldr r5, =gBattleCommunication - ldrb r0, [r5, 0x3] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - str r0, [r2] - ldr r4, =gActiveBank - ldr r1, =gEffectBank - ldrb r0, [r1] - strb r0, [r4] - ldrb r1, [r1] - movs r0, 0x58 - muls r0, r1 - ldr r1, =gBattleMons + 0x4C - adds r0, r1 - str r0, [sp] - movs r0, 0 - movs r1, 0x28 - movs r2, 0 - movs r3, 0x4 - bl EmitSetAttributes - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r2, =gHitMarker - ldr r1, [r2] - movs r0, 0x80 - lsls r0, 6 - ands r0, r1 - cmp r0, 0 - beq _08048ED8 - movs r0, 0x1 - strb r0, [r5, 0x5] - ldr r0, =0xffffdfff - ands r1, r0 - str r1, [r2] - b _08048EDA - .pool -_08048ED8: - strb r0, [r5, 0x5] -_08048EDA: - ldr r0, =gBattleCommunication - ldrb r2, [r0, 0x3] - cmp r2, 0x2 - beq _08048EF2 - cmp r2, 0x6 - beq _08048EF2 - cmp r2, 0x5 - beq _08048EF2 - cmp r2, 0x3 - beq _08048EF2 - bl _080499B8 -_08048EF2: - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0xB2 - ldr r2, =gBattleCommunication - ldrb r1, [r2, 0x3] - strb r1, [r0] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 7 - orrs r0, r1 - str r0, [r2] - bl _080499B8 - .pool -_08048F1C: - mov r3, r10 - cmp r3, 0 - beq _08048F26 - bl _080499B8 -_08048F26: - ldr r0, =gBattleCommunication - strb r3, [r0, 0x3] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bl _080499B8 - .pool -_08048F40: - mov r4, r9 - ldrb r1, [r4] - movs r0, 0x58 - muls r1, r0 - mov r0, r8 - adds r0, 0x50 - adds r1, r0 - ldr r2, =gStatusFlagsForMoveEffects - ldr r0, =gBattleCommunication - ldrb r3, [r0, 0x3] - lsls r0, r3, 2 - adds r0, r2 - ldr r1, [r1] - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _08048F66 - bl _08049994 -_08048F66: - subs r0, r3, 0x7 - cmp r0, 0x34 - bls _08048F70 - bl _080499B2 -_08048F70: - lsls r0, 2 - ldr r1, =_08048F88 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08048F88: - .4byte _0804905C - .4byte _080490D0 - .4byte _08049244 - .4byte _0804915C - .4byte _080491D8 - .4byte _0804927C - .4byte _080492C4 - .4byte _08049390 - .4byte _080493D4 - .4byte _080493D4 - .4byte _080493D4 - .4byte _080493D4 - .4byte _080493D4 - .4byte _080493D4 - .4byte _080493D4 - .4byte _0804941C - .4byte _0804941C - .4byte _0804941C - .4byte _0804941C - .4byte _0804941C - .4byte _0804941C - .4byte _0804941C - .4byte _080494FC - .4byte _08049544 - .4byte _08049564 - .4byte _08049720 - .4byte _0804975C - .4byte _08049778 - .4byte _08049790 - .4byte _080497A8 - .4byte _08049808 - .4byte _08049820 - .4byte _08049468 - .4byte _08049468 - .4byte _08049468 - .4byte _08049468 - .4byte _08049468 - .4byte _08049468 - .4byte _08049468 - .4byte _080494B0 - .4byte _080494B0 - .4byte _080494B0 - .4byte _080494B0 - .4byte _080494B0 - .4byte _080494B0 - .4byte _080494B0 - .4byte _08049864 - .4byte _080498C0 - .4byte _080499B2 - .4byte _080499B2 - .4byte _080499B2 - .4byte _080499B2 - .4byte _080499A4 -_0804905C: - mov r1, r9 - ldrb r0, [r1] - movs r5, 0x58 - adds r1, r0, 0 - muls r1, r5 - mov r2, r8 - adds r0, r1, r2 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x14 - bne _08049076 - bl _08049994 -_08049076: - mov r4, r8 - adds r4, 0x50 - adds r0, r1, r4 - ldr r0, [r0] - movs r1, 0x7 - ands r0, r1 - cmp r0, 0 - beq _0804908A - bl _08049994 -_0804908A: - bl Random - mov r3, r9 - ldrb r1, [r3] - adds r2, r1, 0 - muls r2, r5 - adds r2, r4 - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - lsrs r1, 16 - adds r1, 0x2 - ldr r0, [r2] - orrs r0, r1 - str r0, [r2] - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r1, =gMoveEffectBS_Ptrs - ldr r0, =gBattleCommunication - ldrb r0, [r0, 0x3] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - bl _080499B0 - .pool -_080490D0: - mov r4, r9 - ldrb r2, [r4] - movs r4, 0x58 - adds r0, r2, 0 - muls r0, r4 - add r0, r8 - adds r0, 0x20 - ldrb r1, [r0] - cmp r1, 0x27 - bne _08049114 - cmp r5, 0x1 - beq _080490F0 - cmp r6, 0x80 - beq _080490F0 - bl _08049994 -_080490F0: - ldr r0, =gLastUsedAbility - strb r1, [r0] - mov r1, r9 - ldrb r0, [r1] - movs r1, 0x27 - bl RecordAbilityBattle - ldr r1, =gBattlescriptCurrInstr - ldr r0, =BattleScript_FlinchPrevention - str r0, [r1] - bl _080499B2 - .pool -_08049114: - adds r0, r2, 0 - bl BankGetTurnOrder - ldr r1, =gCurrentMoveTurn - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bhi _0804912A - bl _08049994 -_0804912A: - mov r2, r9 - ldrb r0, [r2] - adds r2, r0, 0 - muls r2, r4 - mov r0, r8 - adds r0, 0x50 - adds r2, r0 - ldr r1, =gStatusFlagsForMoveEffects - ldr r0, =gBattleCommunication - ldrb r0, [r0, 0x3] - lsls r0, 2 - adds r0, r1 - ldr r1, [r2] - ldr r0, [r0] - orrs r1, r0 - str r1, [r2] - bl _08049994 - .pool -_0804915C: - mov r3, r9 - ldrb r0, [r3] - movs r5, 0x58 - muls r0, r5 - mov r4, r8 - adds r4, 0x50 - adds r2, r0, r4 - ldr r1, [r2] - movs r0, 0x70 - ands r0, r1 - cmp r0, 0 - beq _08049178 - bl _08049994 -_08049178: - movs r0, 0x80 - lsls r0, 5 - orrs r1, r0 - str r1, [r2] - ldr r1, =gLockedMoves - ldrb r0, [r3] - lsls r0, 1 - adds r0, r1 - ldr r1, =gCurrentMove - ldrh r1, [r1] - strh r1, [r0] - bl Random - mov r2, r9 - ldrb r1, [r2] - adds r2, r1, 0 - muls r2, r5 - adds r2, r4 - movs r1, 0x3 - ands r1, r0 - adds r1, 0x2 - lsls r1, 4 - ldr r0, [r2] - orrs r0, r1 - str r0, [r2] - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r1, =gMoveEffectBS_Ptrs - ldr r0, =gBattleCommunication - ldrb r0, [r0, 0x3] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - bl _080499B0 - .pool -_080491D8: - ldr r5, =gBankAttacker - ldrb r0, [r5] - bl GetBankIdentity - movs r1, 0x1 - ands r1, r0 - cmp r1, 0 - bne _08049210 - ldr r4, =gPaydayMoney - ldrh r3, [r4] - ldr r2, =gBattleMons - ldrb r1, [r5] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x2A - ldrb r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - adds r0, r3, r0 - strh r0, [r4] - lsls r0, 16 - lsrs r0, 16 - cmp r3, r0 - bls _08049210 - ldr r3, =0x0000ffff - adds r0, r3, 0 - strh r0, [r4] -_08049210: - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r1, =gMoveEffectBS_Ptrs - ldr r0, =gBattleCommunication - ldrb r0, [r0, 0x3] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - b _080499B0 - .pool -_08049244: - mov r4, r9 - ldrb r1, [r4] - movs r0, 0x58 - muls r0, r1 - mov r1, r8 - adds r1, 0x4C - adds r0, r1 - ldr r0, [r0] - cmp r0, 0 - beq _0804925A - b _08049994 -_0804925A: - bl Random - ldr r4, =gBattleCommunication - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - bl __umodsi3 - adds r0, 0x3 - strb r0, [r4, 0x3] - movs r0, 0 - movs r1, 0 - bl SetMoveEffect - b _080499B2 - .pool -_0804927C: - mov r0, r9 - ldrb r1, [r0] - movs r0, 0x58 - adds r2, r1, 0 - muls r2, r0 - mov r0, r8 - adds r0, 0x50 - adds r2, r0 - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 5 - orrs r0, r1 - str r0, [r2] - ldr r1, =gLockedMoves - mov r2, r9 - ldrb r0, [r2] - lsls r0, 1 - adds r0, r1 - ldr r1, =gCurrentMove - ldrh r1, [r1] - strh r1, [r0] - ldr r0, =gProtectStructs - ldrb r1, [r2] - lsls r1, 4 - adds r1, r0 - ldrb r0, [r1, 0x1] - movs r2, 0x4 - orrs r0, r2 - strb r0, [r1, 0x1] - b _08049994 - .pool -_080492C4: - mov r3, r9 - ldrb r0, [r3] - movs r6, 0x58 - muls r0, r6 - mov r4, r8 - adds r4, 0x50 - adds r0, r4 - ldr r5, [r0] - movs r0, 0xE0 - lsls r0, 8 - ands r5, r0 - cmp r5, 0 - beq _080492E0 - b _08049994 -_080492E0: - bl Random - mov r2, r9 - ldrb r1, [r2] - adds r2, r1, 0 - muls r2, r6 - adds r2, r4 - movs r1, 0x3 - ands r1, r0 - adds r1, 0x3 - lsls r1, 13 - ldr r0, [r2] - orrs r0, r1 - str r0, [r2] - mov r3, r9 - ldrb r1, [r3] - ldr r2, =gBattleStruct - ldr r0, [r2] - lsls r1, 1 - adds r1, r0 - ldr r6, =gCurrentMove - ldrh r0, [r6] - strb r0, [r1, 0x4] - ldrb r1, [r3] - ldr r0, [r2] - lsls r1, 1 - adds r1, r0 - ldrh r0, [r6] - lsrs r0, 8 - strb r0, [r1, 0x5] - ldrb r1, [r3] - ldr r0, [r2] - adds r1, r0 - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r1, 0x14] - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r1, =gMoveEffectBS_Ptrs - ldr r2, =gBattleCommunication - ldrb r0, [r2, 0x3] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - str r0, [r4] - strb r5, [r2, 0x5] - ldr r3, =gTrappingMoves - ldrh r0, [r3] - ldrh r4, [r6] - cmp r0, r4 - bne _0804934E - b _080499B2 -_0804934E: - adds r1, r2, 0 - adds r2, r6, 0 -_08049352: - ldrb r0, [r1, 0x5] - adds r0, 0x1 - strb r0, [r1, 0x5] - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x4 - bls _08049362 - b _080499B2 -_08049362: - ldrb r0, [r1, 0x5] - lsls r0, 1 - adds r0, r3 - ldrh r0, [r0] - ldrh r4, [r2] - cmp r0, r4 - bne _08049352 - b _080499B2 - .pool -_08049390: - ldr r1, =gBattleMoveDamage - ldr r0, =gHpDealt - ldr r0, [r0] - cmp r0, 0 - bge _0804939C - adds r0, 0x3 -_0804939C: - asrs r0, 2 - str r0, [r1] - cmp r0, 0 - bne _080493A8 - movs r0, 0x1 - str r0, [r1] -_080493A8: - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r1, =gMoveEffectBS_Ptrs - ldr r0, =gBattleCommunication - ldrb r0, [r0, 0x3] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - b _080499B0 - .pool -_080493D4: - ldr r4, =gBattleCommunication - ldrb r1, [r4, 0x3] - adds r1, 0xF2 - lsls r1, 24 - lsrs r1, 24 - movs r0, 0x10 - adds r2, r7, 0 - movs r3, 0 - bl ChangeStatBuffs - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0 - beq _080493F2 - b _08049994 -_080493F2: - ldr r2, =gBattleScripting - ldrb r1, [r4, 0x3] - movs r0, 0x3F - ands r0, r1 - strb r0, [r2, 0x10] - strb r3, [r2, 0x11] - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_StatUp - b _080499B0 - .pool -_0804941C: - movs r0, 0x70 - negs r0, r0 - ldr r4, =gBattleCommunication - ldrb r1, [r4, 0x3] - adds r1, 0xEB - lsls r1, 24 - lsrs r1, 24 - adds r2, r7, 0 - movs r3, 0 - bl ChangeStatBuffs - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0 - beq _0804943C - b _08049994 -_0804943C: - ldr r2, =gBattleScripting - ldrb r1, [r4, 0x3] - movs r0, 0x3F - ands r0, r1 - strb r0, [r2, 0x10] - strb r3, [r2, 0x11] - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_StatDown - b _080499B0 - .pool -_08049468: - ldr r4, =gBattleCommunication - ldrb r1, [r4, 0x3] - adds r1, 0xDA - lsls r1, 24 - lsrs r1, 24 - movs r0, 0x20 - adds r2, r7, 0 - movs r3, 0 - bl ChangeStatBuffs - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0 - beq _08049486 - b _08049994 -_08049486: - ldr r2, =gBattleScripting - ldrb r1, [r4, 0x3] - movs r0, 0x3F - ands r0, r1 - strb r0, [r2, 0x10] - strb r3, [r2, 0x11] - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_StatUp - b _080499B0 - .pool -_080494B0: - movs r0, 0x60 - negs r0, r0 - ldr r4, =gBattleCommunication - ldrb r1, [r4, 0x3] - adds r1, 0xD3 - lsls r1, 24 - lsrs r1, 24 - adds r2, r7, 0 - movs r3, 0 - bl ChangeStatBuffs - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0 - beq _080494D0 - b _08049994 -_080494D0: - ldr r2, =gBattleScripting - ldrb r1, [r4, 0x3] - movs r0, 0x3F - ands r0, r1 - strb r0, [r2, 0x10] - strb r3, [r2, 0x11] - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_StatDown - b _080499B0 - .pool -_080494FC: - mov r0, r9 - ldrb r1, [r0] - movs r0, 0x58 - adds r2, r1, 0 - muls r2, r0 - mov r0, r8 - adds r0, 0x50 - adds r2, r0 - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 15 - orrs r0, r1 - str r0, [r2] - ldr r2, =gDisableStructs - mov r3, r9 - ldrb r1, [r3] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - movs r1, 0x2 - strb r1, [r0, 0x19] - ldr r1, =gLockedMoves - ldrb r0, [r3] - lsls r0, 1 - adds r0, r1 - ldr r1, =gCurrentMove - ldrh r1, [r1] - strh r1, [r0] - b _08049994 - .pool -_08049544: - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - adds r2, r1, 0 - muls r2, r0 - mov r0, r8 - adds r0, 0x50 - adds r2, r0 - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 16 -_0804955A: - orrs r0, r1 - str r0, [r2] - b _08049994 - .pool -_08049564: - ldr r5, =gBattleTypeFlags - ldr r0, [r5] - movs r1, 0x80 - lsls r1, 19 - ands r0, r1 - cmp r0, 0 - beq _08049574 - b _08049994 -_08049574: - ldr r6, =gBankAttacker - ldrb r0, [r6] - bl GetBankSide - lsls r0, 24 - lsrs r4, r0, 24 - ldrb r0, [r6] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _080495A8 - ldr r0, [r5] - ldr r1, =0x0a3f0902 - ands r0, r1 - cmp r0, 0 - bne _080495D4 - b _08049994 - .pool -_080495A8: - ldr r0, [r5] - ldr r1, =0x0a3f0902 - ands r0, r1 - cmp r0, 0 - bne _080495D4 - ldr r0, =gWishFutureKnock - adds r0, 0x29 - adds r0, r4, r0 - ldrb r1, [r0] - ldr r3, =gBitTable - ldr r2, =gBattlePartyID - ldrb r0, [r6] - lsls r0, 1 - adds r0, r2 - ldrh r0, [r0] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _080495D4 - b _08049994 -_080495D4: - ldr r2, =gBattleMons - ldr r1, =gBankTarget - ldrb r0, [r1] - movs r5, 0x58 - muls r0, r5 - adds r4, r0, r2 - ldrh r0, [r4, 0x2E] - adds r7, r1, 0 - mov r8, r2 - cmp r0, 0 - beq _0804963C - adds r0, r4, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x3C - bne _0804963C - bl b_movescr_stack_push_cursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =BattleScript_NoItemSteal - str r0, [r1] - ldr r1, =gLastUsedAbility - ldrb r0, [r7] - muls r0, r5 - add r0, r8 - adds r0, 0x20 - ldrb r0, [r0] - strb r0, [r1] - ldrb r0, [r7] - ldrb r1, [r1] - bl RecordAbilityBattle - b _080499B2 - .pool -_0804963C: - ldr r4, =gBankAttacker - mov r10, r4 - ldrb r2, [r4] - movs r0, 0x58 - mov r9, r0 - mov r0, r9 - muls r0, r2 - add r0, r8 - ldrh r4, [r0, 0x2E] - cmp r4, 0 - beq _08049654 - b _08049994 -_08049654: - ldrb r0, [r7] - mov r1, r9 - muls r1, r0 - adds r0, r1, 0 - add r0, r8 - ldrh r3, [r0, 0x2E] - adds r1, r3, 0 - cmp r1, 0xAF - bne _08049668 - b _08049994 -_08049668: - adds r0, r3, 0 - subs r0, 0x79 - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0xB - bhi _08049676 - b _08049994 -_08049676: - cmp r1, 0 - bne _0804967C - b _08049994 -_0804967C: - ldr r5, =gBattleStruct - lsls r0, r2, 1 - adds r0, 0xD0 - ldr r1, [r5] - adds r1, r0 - ldr r2, =gLastUsedItem - strh r3, [r1] - strh r3, [r2] - ldrb r0, [r7] - mov r3, r9 - muls r3, r0 - adds r0, r3, 0 - add r0, r8 - movs r6, 0 - strh r4, [r0, 0x2E] - ldr r4, =gActiveBank - mov r1, r10 - ldrb r0, [r1] - strb r0, [r4] - str r2, [sp] - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - movs r3, 0x2 - bl EmitSetAttributes - mov r2, r10 - ldrb r0, [r2] - bl MarkBufferBankForExecution - ldrb r0, [r7] - strb r0, [r4] - ldrb r0, [r7] - mov r3, r9 - muls r3, r0 - adds r0, r3, 0 - mov r1, r8 - adds r1, 0x2E - adds r0, r1 - str r0, [sp] - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - movs r3, 0x2 - bl EmitSetAttributes - ldrb r0, [r7] - bl MarkBufferBankForExecution - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_ItemSteal - str r0, [r4] - ldrb r0, [r7] - ldr r1, [r5] - lsls r0, 1 - adds r0, r1 - adds r0, 0xC8 - strb r6, [r0] - ldrb r0, [r7] - ldr r1, [r5] - lsls r0, 1 - adds r0, r1 - adds r0, 0xC9 - strb r6, [r0] - b _080499B2 - .pool -_08049720: - ldr r3, =gBankTarget - ldrb r1, [r3] - movs r0, 0x58 - adds r2, r1, 0 - muls r2, r0 - mov r0, r8 - adds r0, 0x50 - adds r2, r0 - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 19 - orrs r0, r1 - str r0, [r2] - ldr r2, =gDisableStructs - ldrb r1, [r3] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - ldr r1, =gBankAttacker - ldrb r1, [r1] - strb r1, [r0, 0x14] - b _08049994 - .pool -_0804975C: - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - adds r2, r1, 0 - muls r2, r0 - mov r0, r8 - adds r0, 0x50 - adds r2, r0 - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 20 - b _0804955A - .pool -_08049778: - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_AllStatsUp - b _080499B0 - .pool -_08049790: - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_RapidSpinAway - b _080499B0 - .pool -_080497A8: - ldr r6, =gBankTarget - ldrb r0, [r6] - movs r2, 0x58 - muls r0, r2 - mov r1, r8 - adds r1, 0x4C - adds r5, r0, r1 - ldr r4, [r5] - movs r0, 0x40 - ands r0, r4 - cmp r0, 0 - bne _080497C2 - b _08049994 -_080497C2: - movs r0, 0x41 - negs r0, r0 - ands r4, r0 - str r4, [r5] - ldr r4, =gActiveBank - ldrb r0, [r6] - strb r0, [r4] - ldrb r0, [r4] - muls r0, r2 - adds r0, r1 - str r0, [sp] - movs r0, 0 - movs r1, 0x28 - movs r2, 0 - movs r3, 0x4 - bl EmitSetAttributes - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_TargetPRLZHeal - b _080499B0 - .pool -_08049808: - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_AtkDefDown - b _080499B0 - .pool -_08049820: - ldr r4, =gBattleMoveDamage - ldr r0, =gHpDealt - ldr r0, [r0] - movs r1, 0x3 - bl __divsi3 - str r0, [r4] - cmp r0, 0 - bne _08049836 - movs r0, 0x1 - str r0, [r4] -_08049836: - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r1, =gMoveEffectBS_Ptrs - ldr r0, =gBattleCommunication - ldrb r0, [r0, 0x3] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - b _080499B0 - .pool -_08049864: - mov r4, r9 - ldrb r0, [r4] - movs r5, 0x58 - muls r0, r5 - mov r4, r8 - adds r4, 0x50 - adds r2, r0, r4 - ldr r1, [r2] - movs r0, 0xC0 - lsls r0, 4 - ands r0, r1 - cmp r0, 0 - beq _08049880 - b _08049994 -_08049880: - movs r0, 0x80 - lsls r0, 5 - orrs r1, r0 - str r1, [r2] - ldr r1, =gLockedMoves - mov r2, r9 - ldrb r0, [r2] - lsls r0, 1 - adds r0, r1 - ldr r1, =gCurrentMove - ldrh r1, [r1] - strh r1, [r0] - bl Random - mov r3, r9 - ldrb r1, [r3] - adds r2, r1, 0 - muls r2, r5 - adds r2, r4 - movs r1, 0x1 - ands r1, r0 - adds r1, 0x2 - lsls r1, 10 - ldr r0, [r2] - orrs r0, r1 - str r0, [r2] - b _080499B2 - .pool -_080498C0: - mov r4, r9 - ldrb r3, [r4] - movs r5, 0x58 - adds r0, r3, 0 - muls r0, r5 - mov r2, r8 - adds r1, r0, r2 - adds r0, r1, 0 - adds r0, 0x20 - ldrb r2, [r0] - cmp r2, 0x3C - bne _08049900 - ldrh r0, [r1, 0x2E] - cmp r0, 0 - beq _08049994 - ldr r0, =gLastUsedAbility - strb r2, [r0] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB63F - str r0, [r1] - ldrb r0, [r4] - movs r1, 0x3C - bl RecordAbilityBattle - b _080499B2 - .pool -_08049900: - ldrh r0, [r1, 0x2E] - cmp r0, 0 - beq _08049994 - adds r0, r3, 0 - bl GetBankSide - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gLastUsedItem - mov r3, r9 - ldrb r0, [r3] - muls r0, r5 - add r0, r8 - ldrh r0, [r0, 0x2E] - strh r0, [r1] - ldrb r0, [r3] - muls r0, r5 - add r0, r8 - movs r5, 0 - movs r1, 0 - strh r1, [r0, 0x2E] - ldr r2, =gWishFutureKnock - adds r2, 0x29 - adds r2, r4, r2 - ldr r3, =gBitTable - ldr r1, =gBattlePartyID - mov r4, r9 - ldrb r0, [r4] - lsls r0, 1 - adds r0, r1 - ldrh r0, [r0] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_KnockedOff - str r0, [r4] - mov r1, r9 - ldrb r0, [r1] - ldr r2, =gBattleStruct - ldr r1, [r2] - lsls r0, 1 - adds r0, r1 - adds r0, 0xC8 - strb r5, [r0] - mov r3, r9 - ldrb r0, [r3] - ldr r1, [r2] - lsls r0, 1 - adds r0, r1 - adds r0, 0xC9 - strb r5, [r0] - b _080499B2 - .pool -_08049994: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - b _080499B2 - .pool -_080499A4: - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl b_movescr_stack_push - ldr r0, =BattleScript_SAtkDown2 -_080499B0: - str r0, [r4] -_080499B2: - ldr r1, =gBattleCommunication - movs r0, 0 - strb r0, [r1, 0x3] -_080499B8: - add sp, 0x8 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end SetMoveEffect - - thumb_func_start atk15_seteffectwithchancetarget -atk15_seteffectwithchancetarget: @ 80499D4 - push {r4,lr} - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x20 - bne _08049A10 - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x5] - lsls r4, r0, 1 - b _08049A20 - .pool -_08049A10: - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r4, [r0, 0x5] -_08049A20: - ldr r3, =gBattleCommunication - ldrb r2, [r3, 0x3] - movs r0, 0x80 - ands r0, r2 - cmp r0, 0 - beq _08049A50 - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - bne _08049A50 - movs r0, 0x7F - ands r0, r2 - strb r0, [r3, 0x3] - b _08049A7E - .pool -_08049A50: - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x64 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - cmp r0, r4 - bcs _08049A9A - ldr r0, =gBattleCommunication - ldrb r0, [r0, 0x3] - cmp r0, 0 - beq _08049A9A - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - bne _08049A9A - cmp r4, 0x63 - bls _08049A90 -_08049A7E: - movs r0, 0 - movs r1, 0x80 - bl SetMoveEffect - b _08049AA2 - .pool -_08049A90: - movs r0, 0 - movs r1, 0 - bl SetMoveEffect - b _08049AA2 -_08049A9A: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] -_08049AA2: - ldr r0, =gBattleCommunication - movs r1, 0 - strb r1, [r0, 0x3] - ldr r0, =gBattleScripting - strb r1, [r0, 0x16] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk15_seteffectwithchancetarget - - thumb_func_start atk16_seteffectprimary -atk16_seteffectprimary: @ 8049AC0 - push {lr} - movs r0, 0x1 - movs r1, 0 - bl SetMoveEffect - pop {r0} - bx r0 - thumb_func_end atk16_seteffectprimary - - thumb_func_start atk17_seteffectsecondary -atk17_seteffectsecondary: @ 8049AD0 - push {lr} - movs r0, 0 - movs r1, 0 - bl SetMoveEffect - pop {r0} - bx r0 - thumb_func_end atk17_seteffectsecondary - - thumb_func_start atk18_status_effect_clear -atk18_status_effect_clear: @ 8049AE0 - push {lr} - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r2, =gActiveBank - strb r0, [r2] - ldr r3, =gBattleCommunication - ldrb r0, [r3, 0x3] - cmp r0, 0x6 - bhi _08049B14 - ldr r1, =gBattleMons - ldrb r2, [r2] - movs r0, 0x58 - muls r2, r0 - adds r1, 0x4C - b _08049B1E - .pool -_08049B14: - ldr r1, =gBattleMons - ldrb r2, [r2] - movs r0, 0x58 - muls r2, r0 - adds r1, 0x50 -_08049B1E: - adds r2, r1 - ldr r1, =gStatusFlagsForMoveEffects - ldrb r0, [r3, 0x3] - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - ldr r0, [r2] - bics r0, r1 - str r0, [r2] - ldr r0, =gBattleCommunication - movs r2, 0 - strb r2, [r0, 0x3] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] - ldr r0, =gBattleScripting - strb r2, [r0, 0x16] - pop {r0} - bx r0 - .pool - thumb_func_end atk18_status_effect_clear - - thumb_func_start atk19_faint_pokemon -atk19_faint_pokemon: @ 8049B5C - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x4 - ldr r0, =gBattlescriptCurrInstr - ldr r2, [r0] - ldrb r1, [r2, 0x2] - adds r6, r0, 0 - cmp r1, 0 - beq _08049BE0 - ldrb r0, [r2, 0x1] - bl GetBattleBank - ldr r5, =gActiveBank - strb r0, [r5] - ldr r2, =gHitMarker - ldr r1, =gBitTable - ldrb r0, [r5] - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - lsls r1, 28 - ldr r0, [r2] - ands r0, r1 - cmp r0, 0 - bne _08049B94 - b _08049E2C -_08049B94: - ldr r1, [r6] - ldrb r4, [r1, 0x3] - ldrb r0, [r1, 0x4] - lsls r0, 8 - orrs r4, r0 - ldrb r0, [r1, 0x5] - lsls r0, 16 - orrs r4, r0 - ldrb r0, [r1, 0x6] - lsls r0, 24 - orrs r4, r0 - bl b_movescr_stack_pop_cursor - str r4, [r6] - ldrb r0, [r5] - bl GetBankSide - ldr r1, =gSideAffecting - lsls r0, 24 - lsrs r0, 23 - adds r0, r1 - ldrh r2, [r0] - ldr r1, =0x0000fdff - ands r1, r2 - strh r1, [r0] - b _08049E32 - .pool -_08049BE0: - ldrb r0, [r2, 0x1] - cmp r0, 0x1 - bne _08049C08 - ldr r1, =gActiveBank - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r1] - ldr r0, =gBankTarget - ldrb r0, [r0] - mov r9, r0 - ldr r4, =gUnknown_082DA7AA - b _08049C18 - .pool -_08049C08: - ldr r1, =gActiveBank - ldr r0, =gBankTarget - ldrb r0, [r0] - strb r0, [r1] - ldr r0, =gBankAttacker - ldrb r0, [r0] - mov r9, r0 - ldr r4, =gUnknown_082DA7B7 -_08049C18: - mov r8, r1 - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r2, =gBitTable - mov r7, r8 - ldrb r3, [r7] - lsls r0, r3, 2 - adds r0, r2 - ldr r2, [r0] - ands r1, r2 - cmp r1, 0 - beq _08049C32 - b _08049E2C -_08049C32: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r3 - adds r0, r1 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _08049C42 - b _08049E2C -_08049C42: - ldr r5, =gHitMarker - lsls r1, r2, 28 - ldr r0, [r5] - orrs r0, r1 - str r0, [r5] - ldr r0, [r6] - adds r0, 0x7 - bl b_movescr_stack_push - str r4, [r6] - ldrb r0, [r7] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _08049CA4 - ldr r0, [r5] - movs r1, 0x80 - lsls r1, 15 - orrs r0, r1 - str r0, [r5] - ldr r1, =gBattleResults - ldrb r0, [r1] - cmp r0, 0xFE - bhi _08049C78 - adds r0, 0x1 - strb r0, [r1] -_08049C78: - ldrb r0, [r7] - bl sub_80570F4 - b _08049CCE - .pool -_08049CA4: - ldr r4, =gBattleResults - ldrb r0, [r4, 0x1] - cmp r0, 0xFE - bhi _08049CB0 - adds r0, 0x1 - strb r0, [r4, 0x1] -_08049CB0: - ldr r1, =gBattlePartyID - mov r2, r8 - ldrb r0, [r2] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gEnemyParty - adds r0, r1 - movs r1, 0xB - movs r2, 0 - bl GetMonData - strh r0, [r4, 0x20] -_08049CCE: - ldr r2, =gHitMarker - ldr r1, [r2] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _08049D0C - ldr r6, =gBattleMons - ldr r0, =gBankAttacker - ldrb r0, [r0] - movs r5, 0x58 - muls r0, r5 - adds r0, r6 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _08049D0C - movs r0, 0x41 - negs r0, r0 - ands r1, r0 - str r1, [r2] - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - bl b_movescr_stack_push - ldr r1, =gBattleMoveDamage - mov r0, r9 - muls r0, r5 - adds r0, r6 - ldrh r0, [r0, 0x28] - str r0, [r1] - ldr r0, =gUnknown_082DAE3E - str r0, [r4] -_08049D0C: - ldr r1, =gStatuses3 - ldr r6, =gBankTarget - ldrb r0, [r6] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 7 - ands r0, r1 - cmp r0, 0 - bne _08049D24 - b _08049E32 -_08049D24: - ldr r0, =gHitMarker - ldr r5, [r0] - movs r0, 0x80 - lsls r0, 17 - ands r5, r0 - cmp r5, 0 - beq _08049D34 - b _08049E32 -_08049D34: - ldr r3, =gBankAttacker - mov r8, r3 - ldrb r0, [r3] - bl GetBankSide - adds r4, r0, 0 - ldrb r0, [r6] - bl GetBankSide - lsls r4, 24 - lsls r0, 24 - cmp r4, r0 - beq _08049E32 - ldr r0, =gBattleMons - mov r9, r0 - mov r2, r8 - ldrb r1, [r2] - movs r7, 0x58 - adds r2, r1, 0 - muls r2, r7 - adds r0, r2, r0 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _08049E32 - ldr r0, =gCurrentMove - ldrh r0, [r0] - cmp r0, 0xA5 - beq _08049E32 - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, r1, r0 - adds r0, 0x80 - ldrb r4, [r0] - adds r0, r4, r2 - mov r6, r9 - adds r6, 0x24 - adds r0, r6 - strb r5, [r0] - ldr r5, =gBattlescriptCurrInstr - ldr r0, [r5] - bl b_movescr_stack_push - ldr r0, =gUnknown_082DB18D - str r0, [r5] - ldr r5, =gActiveBank - mov r3, r8 - ldrb r0, [r3] - strb r0, [r5] - adds r1, r4, 0 - adds r1, 0x9 - lsls r1, 24 - lsrs r1, 24 - ldrb r0, [r5] - muls r0, r7 - adds r0, r6 - adds r0, r4 - str r0, [sp] - movs r0, 0 - movs r2, 0 - movs r3, 0x1 - bl EmitSetAttributes - ldrb r0, [r5] - bl MarkBufferBankForExecution - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x2 - strb r0, [r1, 0x1] - lsls r4, 1 - mov r2, r8 - ldrb r0, [r2] - muls r0, r7 - adds r0, r4, r0 - mov r2, r9 - adds r2, 0xC - adds r0, r2 - ldrh r0, [r0] - strb r0, [r1, 0x2] - mov r3, r8 - ldrb r0, [r3] - muls r0, r7 - adds r4, r0 - adds r4, r2 - ldrh r0, [r4] - lsrs r0, 8 - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - b _08049E32 - .pool -_08049E2C: - ldr r0, [r6] - adds r0, 0x7 - str r0, [r6] -_08049E32: - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end atk19_faint_pokemon - - thumb_func_start atk1A_faint_animation -atk1A_faint_animation: @ 8049E40 - push {r4,r5,lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _08049E6A - ldr r5, =gBattlescriptCurrInstr - ldr r0, [r5] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r4, =gActiveBank - strb r0, [r4] - movs r0, 0 - bl dp01_build_cmdbuf_x0A_A_A_A - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r0, [r5] - adds r0, 0x2 - str r0, [r5] -_08049E6A: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk1A_faint_animation - - thumb_func_start atk1B_faint_effects_clear -atk1B_faint_effects_clear: @ 8049E7C - push {r4,r5,lr} - sub sp, 0x4 - ldr r0, =gBattleExecBuffer - ldr r5, [r0] - cmp r5, 0 - bne _08049EE8 - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r4, =gActiveBank - strb r0, [r4] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 11 - ands r0, r1 - cmp r0, 0 - beq _08049EB4 - ldr r2, =gBattleMons - ldrb r1, [r4] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _08049EDC -_08049EB4: - ldr r1, =gBattleMons - ldrb r0, [r4] - movs r2, 0x58 - muls r0, r2 - adds r1, 0x4C - adds r0, r1 - str r5, [r0] - ldrb r0, [r4] - muls r0, r2 - adds r0, r1 - str r0, [sp] - movs r0, 0 - movs r1, 0x28 - movs r2, 0 - movs r3, 0x4 - bl EmitSetAttributes - ldrb r0, [r4] - bl MarkBufferBankForExecution -_08049EDC: - bl sub_803A75C - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] -_08049EE8: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk1B_faint_effects_clear - - thumb_func_start atk1C_jumpifstatus -atk1C_jumpifstatus: @ 8049F04 - push {r4,r5,lr} - ldr r5, =gBattlescriptCurrInstr - ldr r0, [r5] - ldrb r0, [r0, 0x1] - bl GetBattleBank - lsls r0, 24 - lsrs r0, 24 - ldr r2, [r5] - ldrb r4, [r2, 0x2] - ldrb r1, [r2, 0x3] - lsls r1, 8 - adds r4, r1 - ldrb r1, [r2, 0x4] - lsls r1, 16 - adds r4, r1 - ldrb r1, [r2, 0x5] - lsls r1, 24 - adds r4, r1 - ldrb r3, [r2, 0x6] - ldrb r1, [r2, 0x7] - lsls r1, 8 - adds r3, r1 - ldrb r1, [r2, 0x8] - lsls r1, 16 - adds r3, r1 - ldrb r1, [r2, 0x9] - lsls r1, 24 - adds r3, r1 - ldr r2, =gBattleMons - movs r1, 0x58 - muls r1, r0 - adds r0, r2, 0 - adds r0, 0x4C - adds r0, r1, r0 - ldr r0, [r0] - ands r0, r4 - cmp r0, 0 - beq _08049F68 - adds r0, r1, r2 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _08049F68 - str r3, [r5] - b _08049F70 - .pool -_08049F68: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0xA - str r0, [r1] -_08049F70: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk1C_jumpifstatus - - thumb_func_start atk1D_jumpifstatus2 -atk1D_jumpifstatus2: @ 8049F7C - push {r4,r5,lr} - ldr r5, =gBattlescriptCurrInstr - ldr r0, [r5] - ldrb r0, [r0, 0x1] - bl GetBattleBank - lsls r0, 24 - lsrs r0, 24 - ldr r2, [r5] - ldrb r4, [r2, 0x2] - ldrb r1, [r2, 0x3] - lsls r1, 8 - adds r4, r1 - ldrb r1, [r2, 0x4] - lsls r1, 16 - adds r4, r1 - ldrb r1, [r2, 0x5] - lsls r1, 24 - adds r4, r1 - ldrb r3, [r2, 0x6] - ldrb r1, [r2, 0x7] - lsls r1, 8 - adds r3, r1 - ldrb r1, [r2, 0x8] - lsls r1, 16 - adds r3, r1 - ldrb r1, [r2, 0x9] - lsls r1, 24 - adds r3, r1 - ldr r2, =gBattleMons - movs r1, 0x58 - muls r1, r0 - adds r0, r2, 0 - adds r0, 0x50 - adds r0, r1, r0 - ldr r0, [r0] - ands r0, r4 - cmp r0, 0 - beq _08049FE0 - adds r0, r1, r2 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _08049FE0 - str r3, [r5] - b _08049FE8 - .pool -_08049FE0: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0xA - str r0, [r1] -_08049FE8: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk1D_jumpifstatus2 - - thumb_func_start atk1E_jumpifability -atk1E_jumpifability: @ 8049FF4 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - ldr r6, =gBattlescriptCurrInstr - ldr r2, [r6] - ldrb r5, [r2, 0x2] - mov r8, r5 - ldrb r1, [r2, 0x3] - ldrb r0, [r2, 0x4] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 24 - adds r7, r1, r0 - ldrb r0, [r2, 0x1] - cmp r0, 0x8 - bne _0804A054 - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0 - str r0, [sp] - movs r0, 0xD - adds r2, r5, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - beq _0804A0C8 - ldr r1, =gLastUsedAbility - strb r5, [r1] - str r7, [r6] - subs r4, 0x1 - lsls r0, r4, 24 - lsrs r0, 24 - ldrb r1, [r1] - b _0804A0B0 - .pool -_0804A054: - cmp r0, 0x9 - bne _0804A08C - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0 - str r0, [sp] - movs r0, 0xC - adds r2, r5, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - beq _0804A0C8 - ldr r1, =gLastUsedAbility - strb r5, [r1] - str r7, [r6] - subs r4, 0x1 - lsls r0, r4, 24 - lsrs r0, 24 - ldrb r1, [r1] - b _0804A0B0 - .pool -_0804A08C: - ldrb r0, [r2, 0x1] - bl GetBattleBank - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r4 - adds r0, r1 - adds r0, 0x20 - ldrb r1, [r0] - cmp r1, r8 - bne _0804A0C8 - ldr r0, =gLastUsedAbility - strb r1, [r0] - str r7, [r6] - ldrb r1, [r0] - adds r0, r4, 0 -_0804A0B0: - bl RecordAbilityBattle - ldr r0, =gBattleScripting - strb r4, [r0, 0x15] - b _0804A0CE - .pool -_0804A0C8: - ldr r0, [r6] - adds r0, 0x7 - str r0, [r6] -_0804A0CE: - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end atk1E_jumpifability - - thumb_func_start atk1F_jumpifsideaffecting -atk1F_jumpifsideaffecting: @ 804A0DC - push {r4-r6,lr} - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r4, [r0, 0x1] - cmp r4, 0x1 - bne _0804A0FC - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankIdentity - b _0804A106 - .pool -_0804A0FC: - ldr r0, =gBankTarget - ldrb r0, [r0] - bl GetBankIdentity - movs r4, 0x1 -_0804A106: - ands r4, r0 - ldr r6, =gBattlescriptCurrInstr - ldr r3, [r6] - ldrb r2, [r3, 0x2] - ldrb r0, [r3, 0x3] - lsls r0, 8 - orrs r2, r0 - ldrb r1, [r3, 0x4] - ldrb r0, [r3, 0x5] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r3, 0x6] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r3, 0x7] - lsls r0, 24 - adds r5, r1, r0 - ldr r1, =gSideAffecting - lsls r0, r4, 1 - adds r0, r1 - ldrh r0, [r0] - ands r2, r0 - cmp r2, 0 - beq _0804A148 - str r5, [r6] - b _0804A14E - .pool -_0804A148: - adds r0, r3, 0 - adds r0, 0x8 - str r0, [r6] -_0804A14E: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end atk1F_jumpifsideaffecting - - thumb_func_start atk20_jumpifstat -atk20_jumpifstat: @ 804A154 - push {r4,r5,lr} - movs r5, 0 - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl GetBattleBank - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gBattleMons - ldr r3, [r4] - movs r1, 0x58 - muls r0, r1 - ldrb r1, [r3, 0x3] - adds r0, r1 - adds r2, 0x18 - adds r0, r2 - ldrb r2, [r0] - ldrb r0, [r3, 0x2] - cmp r0, 0x5 - bhi _0804A212 - lsls r0, 2 - ldr r1, =_0804A194 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0804A194: - .4byte _0804A1AC - .4byte _0804A1BC - .4byte _0804A1CC - .4byte _0804A1DC - .4byte _0804A1EC - .4byte _0804A200 -_0804A1AC: - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x4] - cmp r2, r0 - bne _0804A212 - b _0804A20C - .pool -_0804A1BC: - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x4] - cmp r2, r0 - beq _0804A212 - b _0804A20C - .pool -_0804A1CC: - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x4] - cmp r2, r0 - bls _0804A212 - b _0804A20C - .pool -_0804A1DC: - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x4] - cmp r2, r0 - bcs _0804A212 - b _0804A20C - .pool -_0804A1EC: - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x4] - ands r2, r0 - cmp r2, 0 - beq _0804A212 - b _0804A20C - .pool -_0804A200: - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x4] - ands r2, r0 - cmp r2, 0 - bne _0804A212 -_0804A20C: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 -_0804A212: - cmp r5, 0 - beq _0804A238 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x5] - ldrb r0, [r2, 0x6] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x8] - lsls r0, 24 - adds r1, r0 - str r1, [r3] - b _0804A240 - .pool -_0804A238: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x9 - str r0, [r1] -_0804A240: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk20_jumpifstat - - thumb_func_start atk21_jumpifstatus3 -atk21_jumpifstatus3: @ 804A24C - push {r4-r6,lr} - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r5, =gActiveBank - strb r0, [r5] - ldr r2, [r4] - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - adds r6, r1, r0 - ldrb r1, [r2, 0x7] - ldrb r0, [r2, 0x8] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x9] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0xA] - lsls r0, 24 - adds r3, r1, r0 - ldrb r0, [r2, 0x6] - cmp r0, 0 - beq _0804A2AC - ldr r0, =gStatuses3 - ldrb r1, [r5] - lsls r1, 2 - adds r1, r0 - ldr r0, [r1] - ands r0, r6 - cmp r0, 0 - bne _0804A2C4 - b _0804A2BC - .pool -_0804A2AC: - ldr r0, =gStatuses3 - ldrb r1, [r5] - lsls r1, 2 - adds r1, r0 - ldr r0, [r1] - ands r0, r6 - cmp r0, 0 - beq _0804A2C4 -_0804A2BC: - str r3, [r4] - b _0804A2CA - .pool -_0804A2C4: - adds r0, r2, 0 - adds r0, 0xB - str r0, [r4] -_0804A2CA: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end atk21_jumpifstatus3 - - thumb_func_start atk22_jumpiftype -atk22_jumpiftype: @ 804A2D0 - push {r4-r6,lr} - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl GetBattleBank - lsls r0, 24 - lsrs r0, 24 - ldr r3, [r4] - ldrb r5, [r3, 0x2] - ldrb r2, [r3, 0x3] - ldrb r1, [r3, 0x4] - lsls r1, 8 - adds r2, r1 - ldrb r1, [r3, 0x5] - lsls r1, 16 - adds r2, r1 - ldrb r1, [r3, 0x6] - lsls r1, 24 - adds r6, r2, r1 - ldr r2, =gBattleMons - movs r1, 0x58 - muls r0, r1 - adds r1, r0, r2 - adds r0, r1, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, r5 - beq _0804A314 - adds r0, r1, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, r5 - bne _0804A320 -_0804A314: - str r6, [r4] - b _0804A324 - .pool -_0804A320: - adds r0, r3, 0x7 - str r0, [r4] -_0804A324: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end atk22_jumpiftype - - thumb_func_start atk23_getexp -atk23_getexp: @ 804A32C - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - movs r6, 0 - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x50 - mov r9, r0 - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r1, =gBank1 - strb r0, [r1] - ldr r2, =gUnknown_020243FE - movs r1, 0x2 - ands r1, r0 - lsls r1, 24 - lsrs r1, 25 - adds r1, r2 - ldrb r1, [r1] - mov r8, r1 - ldr r0, =gBattleScripting - ldrb r0, [r0, 0x1C] - cmp r0, 0x6 - bls _0804A368 - bl _0804ACB2 -_0804A368: - lsls r0, 2 - ldr r1, =_0804A38C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0804A38C: - .4byte _0804A3A8 - .4byte _0804A414 - .4byte _0804A52E - .4byte _0804A850 - .4byte _0804A954 - .4byte _0804AC40 - .4byte _0804AC88 -_0804A3A8: - ldr r4, =gBank1 - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _0804A3BC - bl _0804AC7C -_0804A3BC: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ldr r1, =0x063f0982 - ands r0, r1 - cmp r0, 0 - beq _0804A3CC - bl _0804AC7C -_0804A3CC: - ldr r1, =gBattleScripting - ldrb r0, [r1, 0x1C] - adds r0, 0x1 - strb r0, [r1, 0x1C] - ldr r0, =gBattleStruct - ldr r2, [r0] - adds r2, 0xDF - ldr r3, =gBitTable - ldr r1, =gBattlePartyID - ldrb r0, [r4] - lsls r0, 1 - adds r0, r1 - ldrh r0, [r0] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - bl _0804ACB2 - .pool -_0804A414: - movs r5, 0 - movs r7, 0 -_0804A418: - movs r0, 0x64 - adds r1, r7, 0 - muls r1, r0 - ldr r0, =gPlayerParty - adds r4, r1, r0 - adds r0, r4, 0 - movs r1, 0xB - bl GetMonData - cmp r0, 0 - beq _0804A486 - adds r0, r4, 0 - movs r1, 0x39 - bl GetMonData - cmp r0, 0 - beq _0804A486 - ldr r0, =gBitTable - lsls r1, r7, 2 - adds r1, r0 - ldr r0, [r1] - mov r1, r8 - ands r0, r1 - cmp r0, 0 - beq _0804A44C - adds r5, 0x1 -_0804A44C: - adds r0, r4, 0 - movs r1, 0xC - bl GetMonData - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0xAF - bne _0804A478 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x00003226 - adds r0, r2 - ldrb r4, [r0] - b _0804A480 - .pool -_0804A478: - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r4, r0, 24 -_0804A480: - cmp r4, 0x19 - bne _0804A486 - adds r6, 0x1 -_0804A486: - adds r7, 0x1 - cmp r7, 0x5 - ble _0804A418 - ldr r3, =gBaseStats - ldr r2, =gBattleMons - ldr r0, =gBank1 - ldrb r1, [r0] - movs r0, 0x58 - muls r1, r0 - adds r1, r2 - ldrh r2, [r1] - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r3 - ldrb r2, [r0, 0x9] - adds r1, 0x2A - ldrb r0, [r1] - muls r0, r2 - movs r1, 0x7 - bl __divsi3 - lsls r0, 16 - lsrs r1, r0, 16 - cmp r6, 0 - beq _0804A4FC - lsrs r4, r0, 17 - adds r0, r4, 0 - adds r1, r5, 0 - bl __divsi3 - mov r1, r9 - strh r0, [r1] - lsls r0, 16 - cmp r0, 0 - bne _0804A4D2 - movs r0, 0x1 - strh r0, [r1] -_0804A4D2: - ldr r5, =gUnknown_02024402 - adds r0, r4, 0 - adds r1, r6, 0 - bl __divsi3 - strh r0, [r5] - lsls r0, 16 - cmp r0, 0 - bne _0804A516 - movs r0, 0x1 - strh r0, [r5] - b _0804A516 - .pool -_0804A4FC: - adds r0, r1, 0 - adds r1, r5, 0 - bl __divsi3 - mov r2, r9 - strh r0, [r2] - lsls r0, 16 - cmp r0, 0 - bne _0804A512 - movs r0, 0x1 - strh r0, [r2] -_0804A512: - ldr r0, =gUnknown_02024402 - strh r6, [r0] -_0804A516: - ldr r1, =gBattleScripting - ldrb r0, [r1, 0x1C] - adds r0, 0x1 - movs r2, 0 - strb r0, [r1, 0x1C] - ldr r1, =gBattleStruct - ldr r0, [r1] - strb r2, [r0, 0x10] - ldr r0, [r1] - adds r0, 0x53 - mov r4, r8 - strb r4, [r0] -_0804A52E: - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - beq _0804A538 - b _0804ACB2 -_0804A538: - ldr r0, =gBattleStruct - ldr r0, [r0] - ldrb r1, [r0, 0x10] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0xC - bl GetMonData - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0xAF - bne _0804A57C - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x00003226 - adds r0, r1 - ldrb r4, [r0] - b _0804A584 - .pool -_0804A57C: - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r4, r0, 24 -_0804A584: - ldr r5, =gBattleStruct - cmp r4, 0x19 - beq _0804A5AC - ldr r0, [r5] - adds r1, r0, 0 - adds r1, 0x53 - ldrb r0, [r1] - movs r2, 0x1 - ands r2, r0 - cmp r2, 0 - bne _0804A5AC - lsrs r0, 1 - strb r0, [r1] - ldr r1, =gBattleScripting - b _0804A5D0 - .pool -_0804A5AC: - ldr r0, [r5] - ldrb r1, [r0, 0x10] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x38 - bl GetMonData - cmp r0, 0x64 - bne _0804A5E8 - ldr r1, [r5] - adds r1, 0x53 - ldrb r0, [r1] - lsrs r0, 1 - strb r0, [r1] - ldr r1, =gBattleScripting - movs r2, 0 -_0804A5D0: - movs r0, 0x5 - strb r0, [r1, 0x1C] - ldr r0, =gBattleMoveDamage - str r2, [r0] - b _0804ACB2 - .pool -_0804A5E8: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x8 - ands r0, r1 - cmp r0, 0 - bne _0804A616 - ldr r0, =gBattleMons - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _0804A616 - ldr r0, [r5] - ldrb r0, [r0, 0x12] - cmp r0, 0 - bne _0804A616 - bl sub_805EA60 - ldr r0, =0x00000161 - bl PlayBGM - ldr r1, [r5] - ldrb r0, [r1, 0x12] - adds r0, 0x1 - strb r0, [r1, 0x12] -_0804A616: - ldr r5, =gBattleStruct - ldr r0, [r5] - ldrb r1, [r0, 0x10] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0x39 - bl GetMonData - cmp r0, 0 - bne _0804A630 - b _0804A824 -_0804A630: - ldr r0, [r5] - adds r0, 0x53 - ldrb r0, [r0] - movs r3, 0x1 - ands r3, r0 - cmp r3, 0 - beq _0804A664 - ldr r1, =gBattleMoveDamage - mov r2, r9 - ldrh r0, [r2] - str r0, [r1] - mov r9, r1 - b _0804A66A - .pool -_0804A664: - ldr r0, =gBattleMoveDamage - str r3, [r0] - mov r9, r0 -_0804A66A: - cmp r4, 0x19 - bne _0804A67A - ldr r0, =gUnknown_02024402 - ldrh r1, [r0] - mov r2, r9 - ldr r0, [r2] - adds r0, r1 - str r0, [r2] -_0804A67A: - cmp r4, 0x28 - bne _0804A68E - mov r4, r9 - ldr r1, [r4] - movs r0, 0x96 - muls r0, r1 - movs r1, 0x64 - bl __divsi3 - str r0, [r4] -_0804A68E: - ldr r5, =gBattleTypeFlags - ldr r0, [r5] - movs r1, 0x8 - ands r0, r1 - cmp r0, 0 - beq _0804A6AA - ldr r4, =gBattleMoveDamage - ldr r1, [r4] - movs r0, 0x96 - muls r0, r1 - movs r1, 0x64 - bl __divsi3 - str r0, [r4] -_0804A6AA: - ldr r4, =gBattleStruct - ldr r0, [r4] - ldrb r1, [r0, 0x10] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - bl IsTradedMon - lsls r0, 24 - cmp r0, 0 - beq _0804A714 - ldr r0, [r5] - movs r1, 0x80 - lsls r1, 15 - ands r0, r1 - cmp r0, 0 - beq _0804A6F8 - ldr r0, [r4] - ldrb r0, [r0, 0x10] - cmp r0, 0x2 - bls _0804A6F8 - ldr r7, =0x00000149 - ldr r0, =gBattleMoveDamage - mov r9, r0 - b _0804A71A - .pool -_0804A6F8: - ldr r4, =gBattleMoveDamage - ldr r1, [r4] - movs r0, 0x96 - muls r0, r1 - movs r1, 0x64 - bl __divsi3 - str r0, [r4] - movs r7, 0xA5 - lsls r7, 1 - mov r9, r4 - b _0804A71A - .pool -_0804A714: - ldr r7, =0x00000149 - ldr r1, =gBattleMoveDamage - mov r9, r1 -_0804A71A: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x1 - ands r1, r0 - cmp r1, 0 - beq _0804A786 - ldr r0, =gBattlePartyID - ldr r1, =gBattleStruct - ldr r4, [r1] - ldrh r0, [r0, 0x4] - adds r5, r1, 0 - ldr r3, =gBitTable - ldr r2, =gAbsentBankFlags - ldrb r1, [r4, 0x10] - cmp r0, r1 - bne _0804A76C - ldrb r1, [r2] - ldr r0, [r3, 0x8] - ands r1, r0 - cmp r1, 0 - bne _0804A76C - adds r1, r4, 0 - adds r1, 0x8F - movs r0, 0x2 - strb r0, [r1] - b _0804A78E - .pool -_0804A76C: - ldrb r2, [r2] - ldr r0, [r3] - ands r2, r0 - cmp r2, 0 - bne _0804A77E - ldr r0, [r5] - adds r0, 0x8F - strb r2, [r0] - b _0804A78E -_0804A77E: - ldr r0, [r5] - adds r0, 0x8F - movs r1, 0x2 - b _0804A78C -_0804A786: - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x8F -_0804A78C: - strb r1, [r0] -_0804A78E: - ldr r1, =gBattleTextBuff1 - movs r2, 0 - mov r12, r2 - movs r3, 0xFD - strb r3, [r1] - movs r5, 0x4 - strb r5, [r1, 0x1] - ldr r6, =gBattleStruct - ldr r2, [r6] - movs r4, 0x8F - adds r4, r2 - mov r8, r4 - ldrb r0, [r4] - strb r0, [r1, 0x2] - ldrb r0, [r2, 0x10] - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r1, =gBattleTextBuff2 - strb r3, [r1] - mov r0, r12 - strb r0, [r1, 0x1] - strb r7, [r1, 0x2] - movs r4, 0xFF - lsls r4, 8 - ands r7, r4 - asrs r0, r7, 8 - strb r0, [r1, 0x3] - movs r0, 0x1 - negs r0, r0 - strb r0, [r1, 0x4] - ldr r1, =gBattleTextBuff3 - strb r3, [r1] - movs r0, 0x1 - strb r0, [r1, 0x1] - strb r5, [r1, 0x2] - movs r0, 0x5 - strb r0, [r1, 0x3] - mov r0, r9 - ldr r2, [r0] - strb r2, [r1, 0x4] - adds r0, r2, 0 - ands r0, r4 - asrs r0, 8 - strb r0, [r1, 0x5] - movs r0, 0xFF - lsls r0, 16 - ands r0, r2 - asrs r0, 16 - strb r0, [r1, 0x6] - lsrs r2, 24 - strb r2, [r1, 0x7] - movs r0, 0x1 - negs r0, r0 - strb r0, [r1, 0x8] - mov r2, r8 - ldrb r1, [r2] - movs r0, 0xD - bl PrepareStringBattle - ldr r0, [r6] - ldrb r1, [r0, 0x10] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - ldr r3, =gBattleMons - ldr r1, =gBank1 - ldrb r2, [r1] - movs r1, 0x58 - muls r1, r2 - adds r1, r3 - ldrh r1, [r1] - bl MonGainEVs -_0804A824: - ldr r0, =gBattleStruct - ldr r1, [r0] - adds r1, 0x53 - ldrb r0, [r1] - lsrs r0, 1 - strb r0, [r1] - b _0804A92A - .pool -_0804A850: - ldr r0, =gBattleExecBuffer - ldr r2, [r0] - cmp r2, 0 - beq _0804A85A - b _0804ACB2 -_0804A85A: - ldr r1, =gBattleBufferB - ldr r7, =gBattleStruct - ldr r0, [r7] - adds r0, 0x8F - ldrb r0, [r0] - lsls r0, 9 - adds r0, r1 - strb r2, [r0] - ldr r0, [r7] - ldrb r0, [r0, 0x10] - movs r6, 0x64 - muls r0, r6 - ldr r5, =gPlayerParty - adds r0, r5 - movs r1, 0x39 - bl GetMonData - cmp r0, 0 - beq _0804A92A - ldr r0, [r7] - ldrb r0, [r0, 0x10] - muls r0, r6 - adds r0, r5 - movs r1, 0x38 - bl GetMonData - cmp r0, 0x64 - beq _0804A92A - ldr r0, [r7] - ldrb r0, [r0, 0x10] - muls r0, r6 - adds r0, r5 - movs r1, 0x3A - bl GetMonData - ldr r4, =gBattleResources - ldr r1, [r4] - ldr r1, [r1, 0x10] - strh r0, [r1] - ldr r0, [r7] - ldrb r0, [r0, 0x10] - muls r0, r6 - adds r0, r5 - movs r1, 0x3B - bl GetMonData - ldr r1, [r4] - ldr r1, [r1, 0x10] - strh r0, [r1, 0x2] - ldr r0, [r7] - ldrb r0, [r0, 0x10] - muls r0, r6 - adds r0, r5 - movs r1, 0x3C - bl GetMonData - ldr r1, [r4] - ldr r1, [r1, 0x10] - strh r0, [r1, 0x4] - ldr r0, [r7] - ldrb r0, [r0, 0x10] - muls r0, r6 - adds r0, r5 - movs r1, 0x3D - bl GetMonData - ldr r1, [r4] - ldr r1, [r1, 0x10] - strh r0, [r1, 0x6] - ldr r0, [r7] - ldrb r0, [r0, 0x10] - muls r0, r6 - adds r0, r5 - movs r1, 0x3E - bl GetMonData - ldr r1, [r4] - ldr r1, [r1, 0x10] - strh r0, [r1, 0x8] - ldr r0, [r7] - ldrb r0, [r0, 0x10] - muls r0, r6 - adds r0, r5 - movs r1, 0x3F - bl GetMonData - ldr r1, [r4] - ldr r1, [r1, 0x10] - strh r0, [r1, 0xA] - ldr r4, =gActiveBank - ldr r1, [r7] - adds r0, r1, 0 - adds r0, 0x8F - ldrb r0, [r0] - strb r0, [r4] - ldrb r1, [r1, 0x10] - ldr r0, =gBattleMoveDamage - ldrh r2, [r0] - movs r0, 0 - bl dp01_build_cmdbuf_x19_a_bb - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0804A92A: - ldr r1, =gBattleScripting - ldrb r0, [r1, 0x1C] - adds r0, 0x1 - strb r0, [r1, 0x1C] - b _0804ACB2 - .pool -_0804A954: - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - beq _0804A95E - b _0804ACB2 -_0804A95E: - ldr r1, =gActiveBank - ldr r0, =gBattleStruct - ldr r4, [r0] - adds r0, r4, 0 - adds r0, 0x8F - ldrb r0, [r0] - strb r0, [r1] - ldr r3, =gBattleBufferB - ldrb r2, [r1] - lsls r1, r2, 9 - adds r0, r1, r3 - ldrb r0, [r0] - cmp r0, 0x21 - beq _0804A97C - b _0804AC28 -_0804A97C: - adds r0, r3, 0x1 - adds r0, r1, r0 - ldrb r0, [r0] - cmp r0, 0xB - beq _0804A988 - b _0804AC28 -_0804A988: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x8 - ands r0, r1 - cmp r0, 0 - beq _0804A9B2 - ldr r0, =gBattlePartyID - lsls r1, r2, 1 - adds r1, r0 - ldrh r0, [r1] - ldrb r4, [r4, 0x10] - cmp r0, r4 - bne _0804A9B2 - adds r1, r0, 0 - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - adds r1, r2, 0 - bl sub_805E990 -_0804A9B2: - ldr r1, =gBattleTextBuff1 - movs r3, 0xFD - strb r3, [r1] - movs r0, 0x4 - strb r0, [r1, 0x1] - ldr r6, =gActiveBank - ldrb r0, [r6] - strb r0, [r1, 0x2] - ldr r4, =gBattleStruct - mov r9, r4 - ldr r2, [r4] - ldrb r0, [r2, 0x10] - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r4, =gBattleTextBuff2 - strb r3, [r4] - movs r0, 0x1 - strb r0, [r4, 0x1] - strb r0, [r4, 0x2] - movs r0, 0x3 - strb r0, [r4, 0x3] - ldrb r0, [r2, 0x10] - movs r1, 0x64 - mov r8, r1 - mov r2, r8 - muls r2, r0 - adds r0, r2, 0 - ldr r7, =gPlayerParty - adds r0, r7 - movs r1, 0x38 - bl GetMonData - strb r0, [r4, 0x4] - movs r0, 0x1 - negs r0, r0 - strb r0, [r4, 0x5] - bl b_movescr_stack_push_cursor - ldr r2, =gUnknown_03005D54 - ldr r1, =gBitTable - mov r4, r9 - ldr r5, [r4] - ldrb r0, [r5, 0x10] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DABBD - str r0, [r1] - ldr r4, =gBattleMoveDamage - ldr r2, =gBattleBufferB - ldrb r1, [r6] - lsls r1, 9 - adds r0, r2, 0x2 - adds r0, r1, r0 - ldrb r3, [r0] - adds r2, 0x3 - adds r1, r2 - ldrb r0, [r1] - lsls r0, 8 - orrs r3, r0 - str r3, [r4] - ldrb r0, [r5, 0x10] - mov r1, r8 - muls r1, r0 - adds r0, r1, 0 - adds r0, r7 - movs r1, 0 - bl AdjustFriendship - ldr r1, =gBattlePartyID - mov r2, r9 - ldr r0, [r2] - ldrb r2, [r0, 0x10] - ldrh r0, [r1] - cmp r0, r2 - bne _0804AB1E - ldr r4, =gBattleMons - ldrh r0, [r4, 0x28] - cmp r0, 0 - beq _0804AB1E - mov r0, r8 - muls r0, r2 - adds r0, r7 - movs r1, 0x38 - bl GetMonData - adds r1, r4, 0 - adds r1, 0x2A - strb r0, [r1] - mov r1, r9 - ldr r0, [r1] - ldrb r0, [r0, 0x10] - mov r2, r8 - muls r2, r0 - adds r0, r2, 0 - adds r0, r7 - movs r1, 0x39 - bl GetMonData - strh r0, [r4, 0x28] - mov r1, r9 - ldr r0, [r1] - ldrb r0, [r0, 0x10] - mov r2, r8 - muls r2, r0 - adds r0, r2, 0 - adds r0, r7 - movs r1, 0x3A - bl GetMonData - strh r0, [r4, 0x2C] - mov r1, r9 - ldr r0, [r1] - ldrb r0, [r0, 0x10] - mov r2, r8 - muls r2, r0 - adds r0, r2, 0 - adds r0, r7 - movs r1, 0x3B - bl GetMonData - strh r0, [r4, 0x2] - mov r1, r9 - ldr r0, [r1] - ldrb r0, [r0, 0x10] - mov r2, r8 - muls r2, r0 - adds r0, r2, 0 - adds r0, r7 - movs r1, 0x3C - bl GetMonData - strh r0, [r4, 0x4] - mov r1, r9 - ldr r0, [r1] - ldrb r0, [r0, 0x10] - mov r2, r8 - muls r2, r0 - adds r0, r2, 0 - adds r0, r7 - movs r1, 0x3D - bl GetMonData - strh r0, [r4, 0x6] - mov r1, r9 - ldr r0, [r1] - ldrb r0, [r0, 0x10] - mov r2, r8 - muls r2, r0 - adds r0, r2, 0 - adds r0, r7 - movs r1, 0x3D - bl GetMonData - strh r0, [r4, 0x6] - mov r1, r9 - ldr r0, [r1] - ldrb r0, [r0, 0x10] - mov r2, r8 - muls r2, r0 - adds r0, r2, 0 - adds r0, r7 - movs r1, 0x3E - bl GetMonData - strh r0, [r4, 0x8] - mov r1, r9 - ldr r0, [r1] - ldrb r0, [r0, 0x10] - mov r2, r8 - muls r2, r0 - adds r0, r2, 0 - adds r0, r7 - movs r1, 0x3F - bl GetMonData - strh r0, [r4, 0xA] -_0804AB1E: - ldr r0, =gBattlePartyID - ldr r7, =gBattleStruct - ldr r1, [r7] - ldrb r2, [r1, 0x10] - ldrh r0, [r0, 0x4] - cmp r0, r2 - beq _0804AB2E - b _0804AC2E -_0804AB2E: - ldr r6, =gBattleMons - movs r4, 0xD8 - adds r4, r6 - mov r8, r4 - ldrh r0, [r4] - cmp r0, 0 - beq _0804AC2E - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0804AC2E - movs r5, 0x64 - adds r0, r2, 0 - muls r0, r5 - ldr r4, =gPlayerParty - adds r0, r4 - movs r1, 0x38 - bl GetMonData - adds r1, r6, 0 - adds r1, 0xDA - strb r0, [r1] - ldr r0, [r7] - ldrb r0, [r0, 0x10] - muls r0, r5 - adds r0, r4 - movs r1, 0x39 - bl GetMonData - mov r1, r8 - strh r0, [r1] - ldr r0, [r7] - ldrb r0, [r0, 0x10] - muls r0, r5 - adds r0, r4 - movs r1, 0x3A - bl GetMonData - adds r1, r6, 0 - adds r1, 0xDC - strh r0, [r1] - ldr r0, [r7] - ldrb r0, [r0, 0x10] - muls r0, r5 - adds r0, r4 - movs r1, 0x3B - bl GetMonData - adds r1, r6, 0 - adds r1, 0xB2 - strh r0, [r1] - ldr r0, [r7] - ldrb r0, [r0, 0x10] - muls r0, r5 - adds r0, r4 - movs r1, 0x3C - bl GetMonData - adds r1, r6, 0 - adds r1, 0xB4 - strh r0, [r1] - ldr r0, [r7] - ldrb r0, [r0, 0x10] - muls r0, r5 - adds r0, r4 - movs r1, 0x3D - bl GetMonData - movs r2, 0xB6 - adds r2, r6 - mov r8, r2 - strh r0, [r2] - ldr r0, [r7] - ldrb r0, [r0, 0x10] - muls r0, r5 - adds r0, r4 - movs r1, 0x3D - bl GetMonData - mov r1, r8 - strh r0, [r1] - ldr r0, [r7] - ldrb r0, [r0, 0x10] - muls r0, r5 - adds r0, r4 - movs r1, 0x3E - bl GetMonData - adds r1, r6, 0 - adds r1, 0xB8 - strh r0, [r1] - b _0804AC2E - .pool -_0804AC28: - ldr r1, =gBattleMoveDamage - movs r0, 0 - str r0, [r1] -_0804AC2E: - ldr r1, =gBattleScripting - movs r0, 0x5 - strb r0, [r1, 0x1C] - b _0804ACB2 - .pool -_0804AC40: - ldr r0, =gBattleMoveDamage - ldr r0, [r0] - cmp r0, 0 - beq _0804AC58 - ldr r1, =gBattleScripting - movs r0, 0x3 - strb r0, [r1, 0x1C] - b _0804ACB2 - .pool -_0804AC58: - ldr r2, =gBattleStruct - ldr r1, [r2] - ldrb r0, [r1, 0x10] - adds r0, 0x1 - strb r0, [r1, 0x10] - ldr r0, [r2] - ldrb r0, [r0, 0x10] - cmp r0, 0x5 - bhi _0804AC7C - ldr r1, =gBattleScripting - movs r0, 0x2 - strb r0, [r1, 0x1C] - b _0804ACB2 - .pool -_0804AC7C: - ldr r1, =gBattleScripting - movs r0, 0x6 - strb r0, [r1, 0x1C] - b _0804ACB2 - .pool -_0804AC88: - ldr r0, =gBattleExecBuffer - ldr r5, [r0] - cmp r5, 0 - bne _0804ACB2 - ldr r4, =gBattleMons - ldr r2, =gBank1 - ldrb r0, [r2] - movs r1, 0x58 - muls r0, r1 - adds r0, r4 - movs r3, 0 - strh r5, [r0, 0x2E] - ldrb r0, [r2] - muls r0, r1 - adds r0, r4 - adds r0, 0x20 - strb r3, [r0] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] -_0804ACB2: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk23_getexp - - thumb_func_start atk24 -atk24: @ 804ACD0 - push {r4-r7,lr} - mov r7, r8 - push {r7} - movs r6, 0 - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - beq _0804ACE2 - b _0804AF22 -_0804ACE2: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 15 - ands r0, r1 - cmp r0, 0 - beq _0804AD48 - ldr r0, =gPartnerTrainerId - ldrh r1, [r0] - ldr r0, =0x00000c03 - cmp r1, r0 - bne _0804AD48 - movs r5, 0 -_0804ACFC: - movs r0, 0x64 - adds r1, r5, 0 - muls r1, r0 - ldr r0, =gPlayerParty - adds r4, r1, r0 - adds r0, r4, 0 - movs r1, 0xB - bl GetMonData - cmp r0, 0 - beq _0804AD2C - adds r0, r4, 0 - movs r1, 0x2D - bl GetMonData - cmp r0, 0 - bne _0804AD2C - adds r0, r4, 0 - movs r1, 0x39 - bl GetMonData - adds r0, r6, r0 - lsls r0, 16 - lsrs r6, r0, 16 -_0804AD2C: - adds r5, 0x1 - cmp r5, 0x2 - ble _0804ACFC - b _0804ADA8 - .pool -_0804AD48: - movs r5, 0 -_0804AD4A: - movs r0, 0x64 - adds r1, r5, 0 - muls r1, r0 - ldr r0, =gPlayerParty - adds r4, r1, r0 - adds r0, r4, 0 - movs r1, 0xB - bl GetMonData - cmp r0, 0 - beq _0804ADA2 - adds r0, r4, 0 - movs r1, 0x2D - bl GetMonData - cmp r0, 0 - bne _0804ADA2 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 11 - ands r0, r1 - cmp r0, 0 - beq _0804AD94 - ldr r0, =gBattleStruct - ldr r0, [r0] - movs r1, 0xA8 - lsls r1, 2 - adds r0, r1 - ldrb r1, [r0] - ldr r2, =gBitTable - lsls r0, r5, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _0804ADA2 -_0804AD94: - adds r0, r4, 0 - movs r1, 0x39 - bl GetMonData - adds r0, r6, r0 - lsls r0, 16 - lsrs r6, r0, 16 -_0804ADA2: - adds r5, 0x1 - cmp r5, 0x5 - ble _0804AD4A -_0804ADA8: - cmp r6, 0 - bne _0804ADB6 - ldr r0, =gBattleOutcome - ldrb r1, [r0] - movs r2, 0x2 - orrs r1, r2 - strb r1, [r0] -_0804ADB6: - movs r6, 0 - movs r5, 0 -_0804ADBA: - movs r0, 0x64 - adds r1, r5, 0 - muls r1, r0 - ldr r0, =gEnemyParty - adds r4, r1, r0 - adds r0, r4, 0 - movs r1, 0xB - bl GetMonData - cmp r0, 0 - beq _0804AE10 - adds r0, r4, 0 - movs r1, 0x2D - bl GetMonData - cmp r0, 0 - bne _0804AE10 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 11 - ands r0, r1 - cmp r0, 0 - beq _0804AE02 - ldr r0, =gBattleStruct - ldr r0, [r0] - ldr r1, =0x000002a1 - adds r0, r1 - ldrb r1, [r0] - ldr r2, =gBitTable - lsls r0, r5, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _0804AE10 -_0804AE02: - adds r0, r4, 0 - movs r1, 0x39 - bl GetMonData - adds r0, r6, r0 - lsls r0, 16 - lsrs r6, r0, 16 -_0804AE10: - adds r5, 0x1 - cmp r5, 0x5 - ble _0804ADBA - ldr r2, =gBattleOutcome - cmp r6, 0 - bne _0804AE24 - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] -_0804AE24: - ldrb r0, [r2] - cmp r0, 0 - bne _0804AF1A - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - ldr r2, =0x02000002 - ands r1, r2 - mov r8, r0 - cmp r1, 0 - beq _0804AF1A - movs r3, 0 - movs r5, 0 - ldr r0, =gNoOfAllBanks - ldrb r1, [r0] - mov r12, r0 - ldr r7, =gBattlescriptCurrInstr - cmp r3, r1 - bge _0804AE70 - ldr r0, =gHitMarker - movs r6, 0x80 - lsls r6, 21 - ldr r4, [r0] - adds r2, r1, 0 - ldr r1, =gSpecialStatuses -_0804AE54: - adds r0, r6, 0 - lsls r0, r5 - ands r0, r4 - cmp r0, 0 - beq _0804AE68 - ldrb r0, [r1] - lsls r0, 25 - cmp r0, 0 - blt _0804AE68 - adds r3, 0x1 -_0804AE68: - adds r1, 0x28 - adds r5, 0x2 - cmp r5, r2 - blt _0804AE54 -_0804AE70: - movs r2, 0 - movs r5, 0x1 - mov r4, r12 - ldrb r1, [r4] - cmp r5, r1 - bge _0804AEAA - ldr r0, =gHitMarker - movs r4, 0x80 - lsls r4, 21 - mov r12, r4 - ldr r6, [r0] - ldr r0, =gSpecialStatuses - adds r4, r1, 0 - adds r1, r0, 0 - adds r1, 0x14 -_0804AE8E: - mov r0, r12 - lsls r0, r5 - ands r0, r6 - cmp r0, 0 - beq _0804AEA2 - ldrb r0, [r1] - lsls r0, 25 - cmp r0, 0 - blt _0804AEA2 - adds r2, 0x1 -_0804AEA2: - adds r1, 0x28 - adds r5, 0x2 - cmp r5, r4 - blt _0804AE8E -_0804AEAA: - mov r1, r8 - ldr r0, [r1] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0804AEF0 - adds r0, r2, r3 - cmp r0, 0x1 - bgt _0804AEF8 - b _0804AF12 - .pool -_0804AEF0: - cmp r2, 0 - beq _0804AF12 - cmp r3, 0 - beq _0804AF12 -_0804AEF8: - ldr r2, [r7] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - adds r1, r0 - str r1, [r7] - b _0804AF22 -_0804AF12: - ldr r0, [r7] - adds r0, 0x5 - str r0, [r7] - b _0804AF22 -_0804AF1A: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_0804AF22: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk24 - - thumb_func_start sub_804AF30 -sub_804AF30: @ 804AF30 - ldr r1, =gBattleMoveFlags - movs r0, 0 - strb r0, [r1] - ldr r0, =gBattleScripting - movs r2, 0 - movs r1, 0x1 - strb r1, [r0, 0xE] - ldr r0, =gCritMultiplier - strb r1, [r0] - ldr r0, =gBattleCommunication - strb r2, [r0, 0x3] - strb r2, [r0, 0x6] - ldr r2, =gHitMarker - ldr r0, [r2] - subs r1, 0x42 - ands r0, r1 - ldr r1, =0xffffbfff - ands r0, r1 - str r0, [r2] - bx lr - .pool - thumb_func_end sub_804AF30 - - thumb_func_start atk25_move_values_cleanup -atk25_move_values_cleanup: @ 804AF70 - push {lr} - bl sub_804AF30 - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atk25_move_values_cleanup - - thumb_func_start atk26_set_multihit -atk26_set_multihit: @ 804AF88 - ldr r3, =gMultiHitCounter - ldr r2, =gBattlescriptCurrInstr - ldr r0, [r2] - ldrb r1, [r0, 0x1] - strb r1, [r3] - adds r0, 0x2 - str r0, [r2] - bx lr - .pool - thumb_func_end atk26_set_multihit - - thumb_func_start atk27_decrement_multihit -atk27_decrement_multihit: @ 804AFA0 - push {lr} - ldr r1, =gMultiHitCounter - ldrb r0, [r1] - subs r0, 0x1 - strb r0, [r1] - lsls r0, 24 - cmp r0, 0 - bne _0804AFC4 - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _0804AFDE - .pool -_0804AFC4: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - adds r1, r0 - str r1, [r3] -_0804AFDE: - pop {r0} - bx r0 - .pool - thumb_func_end atk27_decrement_multihit - - thumb_func_start atk28_goto -atk28_goto: @ 804AFE8 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - adds r1, r0 - str r1, [r3] - bx lr - .pool - thumb_func_end atk28_goto - - thumb_func_start atk29_jumpifbyte -atk29_jumpifbyte: @ 804B008 - push {r4-r6,lr} - ldr r3, =gBattlescriptCurrInstr - ldr r1, [r3] - ldrb r6, [r1, 0x1] - ldrb r2, [r1, 0x2] - ldrb r0, [r1, 0x3] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r1, 0x4] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r1, 0x5] - lsls r0, 24 - adds r5, r2, r0 - ldrb r4, [r1, 0x6] - ldrb r2, [r1, 0x7] - ldrb r0, [r1, 0x8] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r1, 0x9] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r1, 0xA] - lsls r0, 24 - adds r2, r0 - adds r1, 0xB - str r1, [r3] - cmp r6, 0x5 - bhi _0804B0A0 - lsls r0, r6, 2 - ldr r1, =_0804B054 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0804B054: - .4byte _0804B06C - .4byte _0804B074 - .4byte _0804B07C - .4byte _0804B084 - .4byte _0804B08C - .4byte _0804B096 -_0804B06C: - ldrb r0, [r5] - cmp r0, r4 - bne _0804B0A0 - b _0804B09E -_0804B074: - ldrb r0, [r5] - cmp r0, r4 - beq _0804B0A0 - b _0804B09E -_0804B07C: - ldrb r0, [r5] - cmp r0, r4 - bls _0804B0A0 - b _0804B09E -_0804B084: - ldrb r0, [r5] - cmp r0, r4 - bcs _0804B0A0 - b _0804B09E -_0804B08C: - ldrb r0, [r5] - ands r4, r0 - cmp r4, 0 - beq _0804B0A0 - b _0804B09E -_0804B096: - ldrb r0, [r5] - ands r4, r0 - cmp r4, 0 - bne _0804B0A0 -_0804B09E: - str r2, [r3] -_0804B0A0: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end atk29_jumpifbyte - - thumb_func_start atk2A_jumpifhalfword -atk2A_jumpifhalfword: @ 804B0A8 - push {r4-r6,lr} - ldr r3, =gBattlescriptCurrInstr - ldr r1, [r3] - ldrb r6, [r1, 0x1] - ldrb r2, [r1, 0x2] - ldrb r0, [r1, 0x3] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r1, 0x4] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r1, 0x5] - lsls r0, 24 - adds r5, r2, r0 - ldrb r4, [r1, 0x6] - ldrb r0, [r1, 0x7] - lsls r0, 8 - orrs r4, r0 - ldrb r2, [r1, 0x8] - ldrb r0, [r1, 0x9] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r1, 0xA] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r1, 0xB] - lsls r0, 24 - adds r2, r0 - adds r1, 0xC - str r1, [r3] - cmp r6, 0x5 - bhi _0804B148 - lsls r0, r6, 2 - ldr r1, =_0804B0FC - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0804B0FC: - .4byte _0804B114 - .4byte _0804B11C - .4byte _0804B124 - .4byte _0804B12C - .4byte _0804B134 - .4byte _0804B13E -_0804B114: - ldrh r0, [r5] - cmp r0, r4 - bne _0804B148 - b _0804B146 -_0804B11C: - ldrh r0, [r5] - cmp r0, r4 - beq _0804B148 - b _0804B146 -_0804B124: - ldrh r0, [r5] - cmp r0, r4 - bls _0804B148 - b _0804B146 -_0804B12C: - ldrh r0, [r5] - cmp r0, r4 - bcs _0804B148 - b _0804B146 -_0804B134: - ldrh r0, [r5] - ands r4, r0 - cmp r4, 0 - beq _0804B148 - b _0804B146 -_0804B13E: - ldrh r0, [r5] - ands r4, r0 - cmp r4, 0 - bne _0804B148 -_0804B146: - str r2, [r3] -_0804B148: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end atk2A_jumpifhalfword - - thumb_func_start atk2B_jumpifword -atk2B_jumpifword: @ 804B150 - push {r4-r6,lr} - ldr r3, =gBattlescriptCurrInstr - ldr r1, [r3] - ldrb r6, [r1, 0x1] - ldrb r2, [r1, 0x2] - ldrb r0, [r1, 0x3] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r1, 0x4] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r1, 0x5] - lsls r0, 24 - adds r5, r2, r0 - ldrb r4, [r1, 0x6] - ldrb r0, [r1, 0x7] - lsls r0, 8 - orrs r4, r0 - ldrb r0, [r1, 0x8] - lsls r0, 16 - orrs r4, r0 - ldrb r0, [r1, 0x9] - lsls r0, 24 - orrs r4, r0 - ldrb r2, [r1, 0xA] - ldrb r0, [r1, 0xB] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r1, 0xC] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r1, 0xD] - lsls r0, 24 - adds r2, r0 - adds r1, 0xE - str r1, [r3] - cmp r6, 0x5 - bhi _0804B1FC - lsls r0, r6, 2 - ldr r1, =_0804B1B0 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0804B1B0: - .4byte _0804B1C8 - .4byte _0804B1D0 - .4byte _0804B1D8 - .4byte _0804B1E0 - .4byte _0804B1E8 - .4byte _0804B1F2 -_0804B1C8: - ldr r0, [r5] - cmp r0, r4 - bne _0804B1FC - b _0804B1FA -_0804B1D0: - ldr r0, [r5] - cmp r0, r4 - beq _0804B1FC - b _0804B1FA -_0804B1D8: - ldr r0, [r5] - cmp r0, r4 - bls _0804B1FC - b _0804B1FA -_0804B1E0: - ldr r0, [r5] - cmp r0, r4 - bcs _0804B1FC - b _0804B1FA -_0804B1E8: - ldr r0, [r5] - ands r0, r4 - cmp r0, 0 - beq _0804B1FC - b _0804B1FA -_0804B1F2: - ldr r0, [r5] - ands r0, r4 - cmp r0, 0 - bne _0804B1FC -_0804B1FA: - str r2, [r3] -_0804B1FC: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end atk2B_jumpifword - - thumb_func_start atk2C_jumpifarrayequal -atk2C_jumpifarrayequal: @ 804B204 - push {r4-r7,lr} - ldr r2, =gBattlescriptCurrInstr - ldr r3, [r2] - ldrb r1, [r3, 0x1] - ldrb r0, [r3, 0x2] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r3, 0x3] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r3, 0x4] - lsls r0, 24 - adds r5, r1, r0 - ldrb r1, [r3, 0x5] - ldrb r0, [r3, 0x6] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r3, 0x7] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r3, 0x8] - lsls r0, 24 - adds r4, r1, r0 - ldrb r6, [r3, 0x9] - ldrb r1, [r3, 0xA] - ldrb r0, [r3, 0xB] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r3, 0xC] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r3, 0xD] - lsls r0, 24 - adds r1, r0 - mov r12, r1 - movs r1, 0 - cmp r1, r6 - bcs _0804B27C - ldrb r0, [r5] - ldrb r7, [r4] - cmp r0, r7 - beq _0804B260 - adds r0, r3, 0 - b _0804B278 - .pool -_0804B260: - adds r5, 0x1 - adds r4, 0x1 - adds r0, r1, 0x1 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, r6 - bcs _0804B27C - ldrb r0, [r5] - ldrb r3, [r4] - cmp r0, r3 - beq _0804B260 - ldr r0, [r2] -_0804B278: - adds r0, 0xE - str r0, [r2] -_0804B27C: - cmp r1, r6 - bne _0804B284 - mov r7, r12 - str r7, [r2] -_0804B284: - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end atk2C_jumpifarrayequal - - thumb_func_start atk2D_jumpifarraynotequal -atk2D_jumpifarraynotequal: @ 804B28C - push {r4-r7,lr} - movs r7, 0 - ldr r3, =gBattlescriptCurrInstr - ldr r1, [r3] - ldrb r2, [r1, 0x1] - ldrb r0, [r1, 0x2] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r1, 0x3] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r1, 0x4] - lsls r0, 24 - adds r5, r2, r0 - ldrb r2, [r1, 0x5] - ldrb r0, [r1, 0x6] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r1, 0x7] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r1, 0x8] - lsls r0, 24 - adds r4, r2, r0 - ldrb r6, [r1, 0x9] - ldrb r2, [r1, 0xA] - ldrb r0, [r1, 0xB] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r1, 0xC] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r1, 0xD] - lsls r0, 24 - adds r2, r0 - mov r12, r2 - movs r1, 0 - cmp r7, r6 - bcs _0804B2F6 -_0804B2DA: - ldrb r0, [r5] - ldrb r2, [r4] - cmp r0, r2 - bne _0804B2E8 - adds r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 -_0804B2E8: - adds r5, 0x1 - adds r4, 0x1 - adds r0, r1, 0x1 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, r6 - bcc _0804B2DA -_0804B2F6: - cmp r7, r6 - beq _0804B304 - mov r0, r12 - b _0804B308 - .pool -_0804B304: - ldr r0, [r3] - adds r0, 0xE -_0804B308: - str r0, [r3] - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end atk2D_jumpifarraynotequal - - thumb_func_start atk2E_setbyte -atk2E_setbyte: @ 804B310 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - adds r1, r0 - ldrb r0, [r2, 0x5] - strb r0, [r1] - ldr r0, [r3] - adds r0, 0x6 - str r0, [r3] - bx lr - .pool - thumb_func_end atk2E_setbyte - - thumb_func_start atk2F_addbyte -atk2F_addbyte: @ 804B338 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - adds r1, r0 - ldrb r0, [r2, 0x5] - ldrb r2, [r1] - adds r0, r2 - strb r0, [r1] - ldr r0, [r3] - adds r0, 0x6 - str r0, [r3] - bx lr - .pool - thumb_func_end atk2F_addbyte - - thumb_func_start atk30_subbyte -atk30_subbyte: @ 804B364 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - adds r1, r0 - ldrb r0, [r1] - ldrb r2, [r2, 0x5] - subs r0, r2 - strb r0, [r1] - ldr r0, [r3] - adds r0, 0x6 - str r0, [r3] - bx lr - .pool - thumb_func_end atk30_subbyte - - thumb_func_start atk31_copyarray -atk31_copyarray: @ 804B390 - push {r4-r6,lr} - ldr r3, =gBattlescriptCurrInstr - ldr r1, [r3] - ldrb r2, [r1, 0x1] - ldrb r0, [r1, 0x2] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r1, 0x3] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r1, 0x4] - lsls r0, 24 - adds r6, r2, r0 - ldrb r2, [r1, 0x5] - ldrb r0, [r1, 0x6] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r1, 0x7] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r1, 0x8] - lsls r0, 24 - adds r5, r2, r0 - ldrb r4, [r1, 0x9] - movs r2, 0 - cmp r2, r4 - bge _0804B3D4 -_0804B3C6: - adds r0, r6, r2 - adds r1, r5, r2 - ldrb r1, [r1] - strb r1, [r0] - adds r2, 0x1 - cmp r2, r4 - blt _0804B3C6 -_0804B3D4: - ldr r0, [r3] - adds r0, 0xA - str r0, [r3] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atk31_copyarray - - thumb_func_start atk32_copyarray_withindex -atk32_copyarray_withindex: @ 804B3E4 - push {r4-r7,lr} - ldr r3, =gBattlescriptCurrInstr - ldr r1, [r3] - ldrb r2, [r1, 0x1] - ldrb r0, [r1, 0x2] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r1, 0x3] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r1, 0x4] - lsls r0, 24 - adds r7, r2, r0 - ldrb r2, [r1, 0x5] - ldrb r0, [r1, 0x6] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r1, 0x7] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r1, 0x8] - lsls r0, 24 - adds r6, r2, r0 - ldrb r2, [r1, 0x9] - ldrb r0, [r1, 0xA] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r1, 0xB] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r1, 0xC] - lsls r0, 24 - adds r5, r2, r0 - ldrb r4, [r1, 0xD] - movs r2, 0 - cmp r2, r4 - bge _0804B440 -_0804B42E: - adds r0, r7, r2 - ldrb r1, [r5] - adds r1, r2, r1 - adds r1, r6, r1 - ldrb r1, [r1] - strb r1, [r0] - adds r2, 0x1 - cmp r2, r4 - blt _0804B42E -_0804B440: - ldr r0, [r3] - adds r0, 0xE - str r0, [r3] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk32_copyarray_withindex - - thumb_func_start atk33_orbyte -atk33_orbyte: @ 804B450 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - adds r1, r0 - ldrb r0, [r1] - ldrb r2, [r2, 0x5] - orrs r0, r2 - strb r0, [r1] - ldr r0, [r3] - adds r0, 0x6 - str r0, [r3] - bx lr - .pool - thumb_func_end atk33_orbyte - - thumb_func_start atk34_orhalfword -atk34_orhalfword: @ 804B47C - push {r4,lr} - ldr r4, =gBattlescriptCurrInstr - ldr r3, [r4] - ldrb r2, [r3, 0x1] - ldrb r0, [r3, 0x2] - lsls r0, 8 - adds r2, r0 - ldrb r0, [r3, 0x3] - lsls r0, 16 - adds r2, r0 - ldrb r0, [r3, 0x4] - lsls r0, 24 - adds r2, r0 - ldrb r1, [r3, 0x5] - ldrb r0, [r3, 0x6] - lsls r0, 8 - orrs r1, r0 - ldrh r0, [r2] - orrs r1, r0 - strh r1, [r2] - ldr r0, [r4] - adds r0, 0x7 - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk34_orhalfword - - thumb_func_start atk35_orword -atk35_orword: @ 804B4B4 - push {r4,lr} - ldr r4, =gBattlescriptCurrInstr - ldr r2, [r4] - ldrb r3, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - adds r3, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - adds r3, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - adds r3, r0 - ldrb r1, [r2, 0x5] - ldrb r0, [r2, 0x6] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x8] - lsls r0, 24 - adds r1, r0 - ldr r0, [r3] - orrs r0, r1 - str r0, [r3] - ldr r0, [r4] - adds r0, 0x9 - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk35_orword - - thumb_func_start atk36_bicbyte -atk36_bicbyte: @ 804B4F8 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - adds r1, r0 - ldrb r2, [r2, 0x5] - ldrb r0, [r1] - bics r0, r2 - strb r0, [r1] - ldr r0, [r3] - adds r0, 0x6 - str r0, [r3] - bx lr - .pool - thumb_func_end atk36_bicbyte - - thumb_func_start atk37_bichalfword -atk37_bichalfword: @ 804B524 - push {r4,lr} - ldr r4, =gBattlescriptCurrInstr - ldr r3, [r4] - ldrb r1, [r3, 0x1] - ldrb r0, [r3, 0x2] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r3, 0x3] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r3, 0x4] - lsls r0, 24 - adds r1, r0 - ldrb r2, [r3, 0x5] - ldrb r0, [r3, 0x6] - lsls r0, 8 - orrs r2, r0 - ldrh r0, [r1] - bics r0, r2 - strh r0, [r1] - ldr r0, [r4] - adds r0, 0x7 - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk37_bichalfword - - thumb_func_start atk38_bicword -atk38_bicword: @ 804B55C - push {r4,lr} - ldr r4, =gBattlescriptCurrInstr - ldr r2, [r4] - ldrb r3, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - adds r3, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - adds r3, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - adds r3, r0 - ldrb r1, [r2, 0x5] - ldrb r0, [r2, 0x6] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x8] - lsls r0, 24 - adds r1, r0 - ldr r0, [r3] - bics r0, r1 - str r0, [r3] - ldr r0, [r4] - adds r0, 0x9 - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk38_bicword - - thumb_func_start atk39_pause -atk39_pause: @ 804B5A0 - push {r4,r5,lr} - ldr r0, =gBattleExecBuffer - ldr r4, [r0] - cmp r4, 0 - bne _0804B5CC - ldr r5, =gBattlescriptCurrInstr - ldr r2, [r5] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldr r3, =gPauseCounterBattle - ldrh r0, [r3] - adds r0, 0x1 - strh r0, [r3] - lsls r0, 16 - lsrs r0, 16 - cmp r0, r1 - bcc _0804B5CC - strh r4, [r3] - adds r0, r2, 0x3 - str r0, [r5] -_0804B5CC: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk39_pause - - thumb_func_start atk3A_waitstate -atk3A_waitstate: @ 804B5E0 - push {lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0804B5F2 - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] -_0804B5F2: - pop {r0} - bx r0 - .pool - thumb_func_end atk3A_waitstate - - thumb_func_start atk3B_healthbar_update -atk3B_healthbar_update: @ 804B600 - push {lr} - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - cmp r0, 0 - bne _0804B620 - ldr r0, =gActiveBank - ldr r1, =gBankTarget - b _0804B624 - .pool -_0804B620: - ldr r0, =gActiveBank - ldr r1, =gBankAttacker -_0804B624: - ldrb r1, [r1] - strb r1, [r0] - ldr r0, =gBattleMoveDamage - ldrh r1, [r0] - movs r0, 0 - bl EmitHealthBarUpdate - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atk3B_healthbar_update - - thumb_func_start atk3C_return -atk3C_return: @ 804B658 - push {lr} - bl b_movescr_stack_pop_cursor - pop {r0} - bx r0 - thumb_func_end atk3C_return - - thumb_func_start atk3D_end -atk3D_end: @ 804B664 - push {lr} - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 11 - ands r0, r1 - cmp r0, 0 - beq _0804B67C - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl sub_81A5718 -_0804B67C: - ldr r0, =gBattleMoveFlags - movs r1, 0 - strb r1, [r0] - ldr r0, =gActiveBank - strb r1, [r0] - ldr r1, =gFightStateTracker - movs r0, 0xB - strb r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atk3D_end - - thumb_func_start atk3E_end2 -atk3E_end2: @ 804B6A4 - ldr r1, =gActiveBank - movs r0, 0 - strb r0, [r1] - ldr r1, =gFightStateTracker - movs r0, 0xB - strb r0, [r1] - bx lr - .pool - thumb_func_end atk3E_end2 - - thumb_func_start atk3F_end3 -atk3F_end3: @ 804B6BC - push {lr} - bl b_movescr_stack_pop_cursor - ldr r3, =gBattleResources - ldr r0, [r3] - ldr r0, [r0, 0xC] - adds r1, r0, 0 - adds r1, 0x20 - ldrb r0, [r1] - cmp r0, 0 - beq _0804B6D6 - subs r0, 0x1 - strb r0, [r1] -_0804B6D6: - ldr r2, =gBattleMainFunc - ldr r0, [r3] - ldr r1, [r0, 0xC] - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - lsls r0, 2 - adds r1, r0 - ldr r0, [r1] - str r0, [r2] - pop {r0} - bx r0 - .pool - thumb_func_end atk3F_end3 - - thumb_func_start atk41_call -atk41_call: @ 804B6F8 - push {r4,lr} - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x5 - bl b_movescr_stack_push - ldr r2, [r4] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk41_call - - thumb_func_start atk42_jumpiftype2 -atk42_jumpiftype2: @ 804B728 - push {r4,lr} - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl GetBattleBank - lsls r0, 24 - lsrs r0, 24 - ldr r3, [r4] - ldr r2, =gBattleMons - movs r1, 0x58 - muls r0, r1 - adds r0, r2 - adds r1, r0, 0 - adds r1, 0x21 - ldrb r2, [r3, 0x2] - ldrb r1, [r1] - cmp r2, r1 - beq _0804B756 - adds r0, 0x22 - ldrb r0, [r0] - cmp r2, r0 - bne _0804B778 -_0804B756: - ldrb r1, [r3, 0x3] - ldrb r0, [r3, 0x4] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r3, 0x5] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r3, 0x6] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _0804B77C - .pool -_0804B778: - adds r0, r3, 0x7 - str r0, [r4] -_0804B77C: - pop {r4} - pop {r0} - bx r0 - thumb_func_end atk42_jumpiftype2 - - thumb_func_start atk43_jumpifabilitypresent -atk43_jumpifabilitypresent: @ 804B784 - push {r4,lr} - sub sp, 0x4 - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r2, [r0, 0x1] - movs r0, 0 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _0804B7C0 - ldr r2, [r4] - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _0804B7C6 - .pool -_0804B7C0: - ldr r0, [r4] - adds r0, 0x6 - str r0, [r4] -_0804B7C6: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - thumb_func_end atk43_jumpifabilitypresent - - thumb_func_start atk44 -atk44: @ 804B7D0 - ldr r0, =gBankAttacker - ldrb r0, [r0] - ldr r1, =gBattleStruct - ldr r1, [r1] - adds r0, r1 - adds r0, 0x54 - movs r1, 0x1 - strb r1, [r0] - bx lr - .pool - thumb_func_end atk44 - - thumb_func_start atk45_playanimation -atk45_playanimation: @ 804B7EC - push {r4-r6,lr} - ldr r5, =gBattlescriptCurrInstr - ldr r0, [r5] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r6, =gActiveBank - strb r0, [r6] - ldr r2, [r5] - ldrb r1, [r2, 0x3] - ldrb r0, [r2, 0x4] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x6] - lsls r0, 24 - adds r3, r1, r0 - ldrb r4, [r2, 0x2] - adds r0, r4, 0 - cmp r0, 0x1 - beq _0804B822 - cmp r0, 0x11 - beq _0804B822 - cmp r0, 0x2 - bne _0804B848 -_0804B822: - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r1, [r0, 0x2] - ldrh r2, [r3] - movs r0, 0 - bl dp01_build_cmdbuf_x34_a_bb_aka_battle_anim - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution - ldr r0, [r4] - adds r0, 0x7 - str r0, [r4] - b _0804B8AA - .pool -_0804B848: - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0804B868 - adds r0, r2, 0x7 - bl b_movescr_stack_push - ldr r0, =BattleScript_Pausex20 - b _0804B8A8 - .pool -_0804B868: - adds r0, r4, 0 - subs r0, 0xA - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3 - bls _0804B894 - ldr r1, =gStatuses3 - ldrb r0, [r6] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x000400c0 - ands r0, r1 - cmp r0, 0 - beq _0804B894 - adds r0, r2, 0x7 - b _0804B8A8 - .pool -_0804B894: - ldrb r1, [r2, 0x2] - ldrh r2, [r3] - movs r0, 0 - bl dp01_build_cmdbuf_x34_a_bb_aka_battle_anim - ldrb r0, [r6] - bl MarkBufferBankForExecution - ldr r0, [r5] - adds r0, 0x7 -_0804B8A8: - str r0, [r5] -_0804B8AA: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end atk45_playanimation - - thumb_func_start atk46_playanimation2 -atk46_playanimation2: @ 804B8B0 - push {r4-r7,lr} - ldr r6, =gBattlescriptCurrInstr - ldr r0, [r6] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r7, =gActiveBank - strb r0, [r7] - ldr r2, [r6] - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - adds r3, r1, r0 - ldrb r1, [r2, 0x6] - ldrb r0, [r2, 0x7] - lsls r0, 8 - adds r1, r0 - ldrb r0, [r2, 0x8] - lsls r0, 16 - adds r1, r0 - ldrb r0, [r2, 0x9] - lsls r0, 24 - adds r4, r1, r0 - ldrb r5, [r3] - adds r0, r5, 0 - cmp r0, 0x1 - beq _0804B8FA - cmp r0, 0x11 - beq _0804B8FA - cmp r0, 0x2 - bne _0804B920 -_0804B8FA: - ldrb r1, [r3] - ldrh r2, [r4] - movs r0, 0 - bl dp01_build_cmdbuf_x34_a_bb_aka_battle_anim - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0xA - str r0, [r1] - b _0804B976 - .pool -_0804B920: - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0804B934 - adds r0, r2, 0 - b _0804B972 - .pool -_0804B934: - adds r0, r5, 0 - subs r0, 0xA - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3 - bls _0804B960 - ldr r1, =gStatuses3 - ldrb r0, [r7] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x000400c0 - ands r0, r1 - cmp r0, 0 - beq _0804B960 - adds r0, r2, 0 - b _0804B972 - .pool -_0804B960: - ldrb r1, [r3] - ldrh r2, [r4] - movs r0, 0 - bl dp01_build_cmdbuf_x34_a_bb_aka_battle_anim - ldrb r0, [r7] - bl MarkBufferBankForExecution - ldr r0, [r6] -_0804B972: - adds r0, 0xA - str r0, [r6] -_0804B976: - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end atk46_playanimation2 - - thumb_func_start atk47_setgraphicalstatchangevalues -atk47_setgraphicalstatchangevalues: @ 804B97C - push {r4,lr} - movs r3, 0 - ldr r1, =gBattleScripting - ldrb r0, [r1, 0x1A] - movs r2, 0xF0 - ands r2, r0 - adds r4, r1, 0 - cmp r2, 0x20 - beq _0804B9AA - cmp r2, 0x20 - bgt _0804B99C - cmp r2, 0x10 - beq _0804B9A6 - b _0804B9B4 - .pool -_0804B99C: - cmp r2, 0x90 - beq _0804B9AE - cmp r2, 0xA0 - beq _0804B9B2 - b _0804B9B4 -_0804B9A6: - movs r3, 0xF - b _0804B9B4 -_0804B9AA: - movs r3, 0x27 - b _0804B9B4 -_0804B9AE: - movs r3, 0x16 - b _0804B9B4 -_0804B9B2: - movs r3, 0x2E -_0804B9B4: - ldrb r1, [r4, 0x1A] - movs r0, 0xF - ands r0, r1 - adds r0, r3, r0 - subs r0, 0x1 - movs r1, 0 - strb r0, [r4, 0x10] - strb r1, [r4, 0x11] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk47_setgraphicalstatchangevalues - thumb_func_start atk48_playstatchangeanimation atk48_playstatchangeanimation: @ 804B9D8 push {r4-r7,lr} @@ -6061,7 +219,7 @@ _0804BB6C: movs r1, 0x1 mov r2, r8 str r3, [sp] - bl dp01_build_cmdbuf_x34_a_bb_aka_battle_anim + bl EmitBattleAnimation ldr r0, =gActiveBank ldrb r0, [r0] bl MarkBufferBankForExecution @@ -6198,7 +356,7 @@ _0804BCAC: str r0, [r5] ldr r0, =gBattleScripting strb r4, [r0, 0x14] - bl sub_804AF30 + bl MoveValuesCleanUp ldr r2, =gUnknown_082D86A8 mov r0, r8 ldrh r1, [r0] @@ -6210,7 +368,7 @@ _0804BCAC: lsls r0, 2 adds r0, r2 ldr r0, [r0] - bl b_movescr_stack_push + bl BattleScriptPush ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DB87D bl _0804C5B8 @@ -6360,7 +518,7 @@ _0804BE14: _0804BE26: adds r0, r2, 0x1 strb r0, [r1, 0x19] - bl b_movescr_stack_push_cursor + bl BattleScriptPushCursor ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DAE0D str r0, [r1] @@ -6440,7 +598,7 @@ _0804BEBA: bl EmitSetAttributes ldrb r0, [r4] bl MarkBufferBankForExecution - bl b_movescr_stack_push_cursor + bl BattleScriptPushCursor ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DB282 str r0, [r1] @@ -9718,7 +3876,7 @@ _0804DBC8: ldr r0, =gBattleScripting ldrb r1, [r4] strb r1, [r0, 0x17] - bl b_movescr_stack_push_cursor + bl BattleScriptPushCursor mov r7, r9 ldr r0, [r7] ldrb r0, [r0, 0x1] @@ -15079,7 +9237,7 @@ _08050AA8: .pool _08050B10: mov r0, r8 - bl b_movescr_stack_push + bl BattleScriptPush ldr r1, =gBattleScripting ldr r6, =gActiveBank ldrb r0, [r6] @@ -15159,7 +9317,7 @@ _08050B94: .pool _08050BD4: mov r0, r8 - bl b_movescr_stack_push + bl BattleScriptPush ldr r1, =gBattleScripting ldr r2, =gActiveBank ldrb r0, [r2] @@ -15208,7 +9366,7 @@ _08050C2C: cmp r5, 0x1 bne _08050B68 mov r0, r8 - bl b_movescr_stack_push + bl BattleScriptPush ldr r1, =gBattleScripting ldr r3, =gActiveBank ldrb r0, [r3] @@ -15248,7 +9406,7 @@ _08050C8C: b _08050B68 _08050CAE: mov r0, r8 - bl b_movescr_stack_push + bl BattleScriptPush ldr r1, =gBattleScripting ldr r2, =gActiveBank ldrb r0, [r2] @@ -16403,7 +10561,7 @@ atk91_givepaydaymoney: @ 80515C8 ldr r4, =gBattlescriptCurrInstr ldr r0, [r4] adds r0, 0x1 - bl b_movescr_stack_push + bl BattleScriptPush ldr r0, =gUnknown_082DB307 str r0, [r4] b _08051658 @@ -21438,7 +15596,7 @@ atkBE_breakfree: @ 805417C strb r0, [r1, 0x3] movs r0, 0xFF strb r0, [r1, 0x4] - bl b_movescr_stack_push_cursor + bl BattleScriptPushCursor ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DAFC5 b _080542BA @@ -21464,7 +15622,7 @@ _08054210: negs r2, r2 ands r0, r2 str r0, [r1] - bl b_movescr_stack_push_cursor + bl BattleScriptPushCursor ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DAFD6 b _080542BA @@ -21501,7 +15659,7 @@ _08054250: lsls r1, 2 adds r1, r2 strb r4, [r1, 0xA] - bl b_movescr_stack_push_cursor + bl BattleScriptPushCursor ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DAFDD b _080542BA @@ -22608,7 +16766,7 @@ atkCC_callterrainattack: @ 8054BEC lsls r0, 2 adds r0, r3 ldr r0, [r0] - bl b_movescr_stack_push + bl BattleScriptPush ldr r1, =gBattlescriptCurrInstr ldr r0, [r1] adds r0, 0x1 @@ -23039,7 +17197,7 @@ _08054FDC: cmp r0, 0x3C bne _08055010 ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB63F + ldr r0, =BattleScript_StickyHoldOnKnockOff str r0, [r1] ldr r1, =gLastUsedAbility ldrb r0, [r7] @@ -24725,7 +18883,7 @@ _08055E2C: ldrb r2, [r0] movs r0, 0 movs r1, 0 - bl dp01_build_cmdbuf_x34_a_bb_aka_battle_anim + bl EmitBattleAnimation ldrb r0, [r4] bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr diff --git a/asm/battle_5.s b/asm/battle_5.s index 3db603531..9c35a8913 100644 --- a/asm/battle_5.s +++ b/asm/battle_5.s @@ -183,8 +183,8 @@ _080570D0: .pool thumb_func_end sub_8057028 - thumb_func_start sub_80570F4 -sub_80570F4: @ 80570F4 + thumb_func_start AdjustFriendshipOnBattleFaint +AdjustFriendshipOnBattleFaint: @ 80570F4 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 @@ -285,7 +285,7 @@ _080571CE: pop {r0} bx r0 .pool - thumb_func_end sub_80570F4 + thumb_func_end AdjustFriendshipOnBattleFaint thumb_func_start sub_80571DC sub_80571DC: @ 80571DC @@ -414,7 +414,7 @@ _0805729A: ldr r1, =0xf7ffffff ands r0, r1 str r0, [r2] - bl b_movescr_stack_push_cursor + bl BattleScriptPushCursor movs r0, 0x1 mov r2, r10 strb r0, [r2, 0x5] @@ -474,7 +474,7 @@ _08057354: ldr r1, =0xf7ffffff ands r0, r1 str r0, [r2] - bl b_movescr_stack_push_cursor + bl BattleScriptPushCursor ldr r0, =gBattleCommunication strb r4, [r0, 0x5] ldr r1, =gBattlescriptCurrInstr @@ -523,7 +523,7 @@ _080573D4: negs r1, r1 ands r0, r1 str r0, [r4] - bl b_movescr_stack_push_cursor + bl BattleScriptPushCursor ldr r1, =gBattlescriptCurrInstr ldr r0, =BattleScript_MoveUsedUnfroze str r0, [r1] diff --git a/asm/battle_7.s b/asm/battle_7.s index fd8c3b4a5..10fabc389 100644 --- a/asm/battle_7.s +++ b/asm/battle_7.s @@ -2937,8 +2937,8 @@ _0805EA5A: bx r0 thumb_func_end sub_805E990 - thumb_func_start sub_805EA60 -sub_805EA60: @ 805EA60 + thumb_func_start BattleMusicStop +BattleMusicStop: @ 805EA60 push {r4-r6,lr} movs r0, 0 bl GetBankByPlayerAI @@ -2977,7 +2977,7 @@ _0805EAA2: pop {r0} bx r0 .pool - thumb_func_end sub_805EA60 + thumb_func_end BattleMusicStop thumb_func_start sub_805EAB4 sub_805EAB4: @ 805EAB4 diff --git a/asm/battle_controller_linkopponent.s b/asm/battle_controller_linkopponent.s index d28823a8b..e8975a7aa 100644 --- a/asm/battle_controller_linkopponent.s +++ b/asm/battle_controller_linkopponent.s @@ -5565,7 +5565,7 @@ sub_806743C: @ 806743C ldrb r0, [r0] cmp r0, 0 beq _08067478 - bl sub_805EA60 + bl BattleMusicStop ldrb r1, [r5] lsls r1, 9 adds r0, r4, 0x1 diff --git a/asm/battle_controller_linkpartner.s b/asm/battle_controller_linkpartner.s index 881228279..e02a967d0 100644 --- a/asm/battle_controller_linkpartner.s +++ b/asm/battle_controller_linkpartner.s @@ -4874,7 +4874,7 @@ sub_814D9D8: @ 814D9D8 ldrb r0, [r0] cmp r0, 0 beq _0814DA14 - bl sub_805EA60 + bl BattleMusicStop ldrb r1, [r5] lsls r1, 9 adds r0, r4, 0x1 diff --git a/asm/battle_controller_opponent.s b/asm/battle_controller_opponent.s index 639ef0ce6..1bfa3ff12 100644 --- a/asm/battle_controller_opponent.s +++ b/asm/battle_controller_opponent.s @@ -6015,7 +6015,7 @@ sub_8062630: @ 8062630 ldrb r0, [r0] cmp r0, 0 beq _0806266C - bl sub_805EA60 + bl BattleMusicStop ldrb r1, [r5] lsls r1, 9 adds r0, r4, 0x1 diff --git a/asm/battle_controller_player.s b/asm/battle_controller_player.s index 0e9318dc9..d9d5c5e6a 100644 --- a/asm/battle_controller_player.s +++ b/asm/battle_controller_player.s @@ -8913,7 +8913,7 @@ _0805C3BC: sub_805C3EC: @ 805C3EC push {lr} sub sp, 0x4 - bl sub_805EA60 + bl BattleMusicStop movs r0, 0x1 negs r0, r0 movs r1, 0 @@ -9595,7 +9595,7 @@ sub_805C9B0: @ 805C9B0 ldrb r0, [r0] cmp r0, 0 beq _0805C9EC - bl sub_805EA60 + bl BattleMusicStop ldrb r1, [r5] lsls r1, 9 adds r0, r4, 0x1 diff --git a/asm/battle_controller_player_partner.s b/asm/battle_controller_player_partner.s index 6b5a14f95..f77dc2c33 100644 --- a/asm/battle_controller_player_partner.s +++ b/asm/battle_controller_player_partner.s @@ -5661,7 +5661,7 @@ sub_81BE03C: @ 81BE03C ldrb r0, [r0] cmp r0, 0 beq _081BE078 - bl sub_805EA60 + bl BattleMusicStop ldrb r1, [r5] lsls r1, 9 adds r0, r4, 0x1 diff --git a/asm/battle_controller_recorded_opponent.s b/asm/battle_controller_recorded_opponent.s index dc7fe7de5..6f047a4ef 100644 --- a/asm/battle_controller_recorded_opponent.s +++ b/asm/battle_controller_recorded_opponent.s @@ -5304,7 +5304,7 @@ sub_818936C: @ 818936C ldrb r0, [r0] cmp r0, 0 beq _081893A8 - bl sub_805EA60 + bl BattleMusicStop ldrb r1, [r5] lsls r1, 9 adds r0, r4, 0x1 diff --git a/asm/battle_controller_recorded_player.s b/asm/battle_controller_recorded_player.s index b2769671c..7b0cd6d41 100644 --- a/asm/battle_controller_recorded_player.s +++ b/asm/battle_controller_recorded_player.s @@ -5455,7 +5455,7 @@ sub_818C994: @ 818C994 ldrb r0, [r0] cmp r0, 0 beq _0818C9D0 - bl sub_805EA60 + bl BattleMusicStop ldrb r1, [r5] lsls r1, 9 adds r0, r4, 0x1 diff --git a/asm/battle_controller_safari.s b/asm/battle_controller_safari.s index 1aff72176..13111e08d 100644 --- a/asm/battle_controller_safari.s +++ b/asm/battle_controller_safari.s @@ -1161,7 +1161,7 @@ dp01t_34_6_move_anim_start_t3: @ 8159CC4 ldrb r0, [r0] cmp r0, 0 beq _08159D00 - bl sub_805EA60 + bl BattleMusicStop ldrb r1, [r5] lsls r1, 9 adds r0, r4, 0x1 diff --git a/asm/battle_controller_wally.s b/asm/battle_controller_wally.s index ddb97f927..6f59c4104 100644 --- a/asm/battle_controller_wally.s +++ b/asm/battle_controller_wally.s @@ -4150,7 +4150,7 @@ sub_816A840: @ 816A840 ldrb r0, [r0] cmp r0, 0 beq _0816A87C - bl sub_805EA60 + bl BattleMusicStop ldrb r1, [r5] lsls r1, 9 adds r0, r4, 0x1 diff --git a/asm/rom3.s b/asm/rom3.s index f6b6f2d03..84dec85e5 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -2355,8 +2355,8 @@ dp01_build_cmdbuf_x09_9_9_9: @ 8033A24 .pool thumb_func_end dp01_build_cmdbuf_x09_9_9_9 - thumb_func_start dp01_build_cmdbuf_x0A_A_A_A -dp01_build_cmdbuf_x0A_A_A_A: @ 8033A44 + thumb_func_start EmitFaintAnimation +EmitFaintAnimation: @ 8033A44 push {lr} lsls r0, 24 lsrs r0, 24 @@ -2371,7 +2371,7 @@ dp01_build_cmdbuf_x0A_A_A_A: @ 8033A44 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x0A_A_A_A + thumb_func_end EmitFaintAnimation thumb_func_start dp01_build_cmdbuf_x0B_B_B_B dp01_build_cmdbuf_x0B_B_B_B: @ 8033A64 @@ -2967,8 +2967,8 @@ EmitHealthBarUpdate: @ 8033EFC .pool thumb_func_end EmitHealthBarUpdate - thumb_func_start dp01_build_cmdbuf_x19_a_bb -dp01_build_cmdbuf_x19_a_bb: @ 8033F34 + thumb_func_start EmitExpUpdate +EmitExpUpdate: @ 8033F34 push {r4,lr} adds r4, r1, 0 lsls r0, 24 @@ -2993,7 +2993,7 @@ dp01_build_cmdbuf_x19_a_bb: @ 8033F34 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x19_a_bb + thumb_func_end EmitExpUpdate thumb_func_start dp01_build_cmdbuf_x1A_aaaa_bbbb dp01_build_cmdbuf_x1A_aaaa_bbbb: @ 8033F68 @@ -3661,8 +3661,8 @@ dp01_build_cmdbuf_x33_a_33_33: @ 8034414 .pool thumb_func_end dp01_build_cmdbuf_x33_a_33_33 - thumb_func_start dp01_build_cmdbuf_x34_a_bb_aka_battle_anim -dp01_build_cmdbuf_x34_a_bb_aka_battle_anim: @ 8034438 + thumb_func_start EmitBattleAnimation +EmitBattleAnimation: @ 8034438 push {r4,lr} adds r4, r1, 0 lsls r0, 24 @@ -3682,7 +3682,7 @@ dp01_build_cmdbuf_x34_a_bb_aka_battle_anim: @ 8034438 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x34_a_bb_aka_battle_anim + thumb_func_end EmitBattleAnimation thumb_func_start sub_8034464 sub_8034464: @ 8034464 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 7a013c51c..0d94d31b0 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -33,10 +33,10 @@ gUnknown_082D9EFB:: @ 82D9EFB gUnknown_082D9F1C:: @ 82D9F1C .incbin "baserom.gba", 0x2d9f1c, 0x88e -gUnknown_082DA7AA:: @ 82DA7AA +BattleScript_FaintAttacker:: @ 82DA7AA .incbin "baserom.gba", 0x2da7aa, 0xd -gUnknown_082DA7B7:: @ 82DA7B7 +BattleScript_FaintTarget:: @ 82DA7B7 .incbin "baserom.gba", 0x2da7b7, 0xd gUnknown_082DA7C4:: @ 82DA7C4 @@ -93,7 +93,7 @@ gUnknown_082DAB15:: @ 82DAB15 BattleScript_Pausex20:: @ 82DABB9 .incbin "baserom.gba", 0x2dabb9, 0x4 -gUnknown_082DABBD:: @ 82DABBD +BattleScript_LevelUp:: @ 82DABBD .incbin "baserom.gba", 0x2dabbd, 0x6f gUnknown_082DAC2C:: @ 82DAC2C @@ -156,7 +156,7 @@ gUnknown_082DAE2A:: @ 82DAE2A BattleScript_EncoredNoMore:: @ 82DAE37 .incbin "baserom.gba", 0x2dae37, 0x7 -gUnknown_082DAE3E:: @ 82DAE3E +BattleScript_DestinyBondTakesLife:: @ 82DAE3E .incbin "baserom.gba", 0x2dae3e, 0x1b gUnknown_082DAE59:: @ 82DAE59 @@ -237,7 +237,7 @@ gUnknown_082DB181:: @ 82DB181 gUnknown_082DB185:: @ 82DB185 .incbin "baserom.gba", 0x2db185, 0x8 -gUnknown_082DB18D:: @ 82DB18D +BattleScript_GrudgeTakesPp:: @ 82DB18D .incbin "baserom.gba", 0x2db18d, 0x7 BattleScript_MagicCoatBounce:: @ 82DB194 @@ -411,7 +411,7 @@ BattleScript_SoundproofProtected:: @ 82DB61F gUnknown_082DB62F:: @ 82DB62F .incbin "baserom.gba", 0x2db62f, 0x10 -gUnknown_082DB63F:: @ 82DB63F +BattleScript_StickyHoldOnKnockOff:: @ 82DB63F .incbin "baserom.gba", 0x2db63f, 0xe BattleScript_ColorChangeActivates:: @ 82DB64D diff --git a/include/battle.h b/include/battle.h index 56b74aa62..920a60060 100644 --- a/include/battle.h +++ b/include/battle.h @@ -218,13 +218,23 @@ #define TYPE_MUL_NORMAL 10 #define TYPE_MUL_SUPER_EFFECTIVE 20 -#define BS_GET_TARGET 0 -#define BS_GET_ATTACKER 1 -#define BS_GET_EFFECT_BANK 2 -#define BS_GET_SCRIPTING_BANK 10 -#define BS_GET_OPPONENT1 12 -#define BS_GET_PLAYER2 13 -#define BS_GET_OPPONENT2 14 +#define BS_GET_TARGET 0 +#define BS_GET_ATTACKER 1 +#define BS_GET_EFFECT_BANK 2 +#define BS_GET_ATTACKER_SIDE 8 // for atk1E_jumpifability +#define BS_GET_NOT_ATTACKER_SIDE 9 // for atk1E_jumpifability +#define BS_GET_SCRIPTING_BANK 10 +#define BS_GET_OPPONENT1 12 +#define BS_GET_PLAYER2 13 +#define BS_GET_OPPONENT2 14 + +// for battle script commands +#define CMP_EQUAL 0x0 +#define CMP_NOT_EQUAL 0x1 +#define CMP_GREATER_THAN 0x2 +#define CMP_LESS_THAN 0x3 +#define CMP_COMMON_BITS 0x4 +#define CMP_NO_COMMON_BITS 0x5 struct Trainer { @@ -422,13 +432,23 @@ struct BattleCallbacksStack u8 size; }; +struct StatsArray +{ + u16 hp; + u16 atk; + u16 def; + u16 spd; + u16 spAtk; + u16 spDef; +}; + struct BattleResources { struct SecretBaseRecord* secretBase; struct UnknownFlags *flags; struct BattleScriptsStack* battleScriptsStack; struct BattleCallbacksStack* battleCallbackStack; - void* statsBeforeLvlUp; + struct StatsArray* statsBeforeLvlUp; struct AI_ThinkingStruct *ai; struct BattleHistory *battleHistory; struct BattleScriptsStack *AI_ScriptsStack; @@ -438,6 +458,7 @@ extern struct BattleResources* gBattleResources; #define BATTLESCRIPTS_STACK (gBattleResources->battleScriptsStack) #define BATTLE_CALLBACKS_STACK (gBattleResources->battleCallbackStack) +#define BATTLE_LVLUP_STATS (gBattleResources->statsBeforeLvlUp) struct BattleResults { @@ -536,14 +557,10 @@ struct BattleStruct u8 field_4D; u8 field_4E; u8 field_4F; - u8 field_50; - u8 field_51; + u16 expValue; u8 field_52; - u8 field_53; - u8 field_54; - u8 field_55; - u8 field_56; - u8 field_57; + u8 sentInPokes; + u8 field_54[4]; u8 field_58; u8 field_59; u8 field_5A; @@ -642,6 +659,11 @@ struct BattleStruct u8 field_1A1; u8 filler1A2; u8 atkCancellerTracker; + u8 field_1A4[240]; + u8 field_294[4]; + u8 field_298[8]; + u8 field_2A0; + u8 field_2A1; }; extern struct BattleStruct* gBattleStruct; @@ -677,6 +699,20 @@ extern struct BattleStruct* gBattleStruct; #define MOVE_EFFECT_CHARGING 0xC #define MOVE_EFFECT_WRAP 0xD #define MOVE_EFFECT_RECOIL_25 0xE +#define MOVE_EFFECT_ATK_PLUS_1 0xF +#define MOVE_EFFECT_DEF_PLUS_1 0x10 +#define MOVE_EFFECT_SPD_PLUS_1 0x11 +#define MOVE_EFFECT_SP_ATK_PLUS_1 0x12 +#define MOVE_EFFECT_SP_DEF_PLUS_1 0x13 +#define MOVE_EFFECT_ACC_PLUS_1 0x14 +#define MOVE_EFFECT_EVS_PLUS_1 0x15 +#define MOVE_EFFECT_ATK_MINUS_1 0x16 +#define MOVE_EFFECT_DEF_MINUS_1 0x17 +#define MOVE_EFFECT_SPD_MINUS_1 0x18 +#define MOVE_EFFECT_SP_ATK_MINUS_1 0x19 +#define MOVE_EFFECT_SP_DEF_MINUS_1 0x1A +#define MOVE_EFFECT_ACC_MINUS_1 0x1B +#define MOVE_EFFECT_EVS_MINUS_1 0x1C #define MOVE_EFFECT_RECHARGE 0x1D #define MOVE_EFFECT_RAGE 0x1E #define MOVE_EFFECT_STEAL_ITEM 0x1F @@ -687,10 +723,73 @@ extern struct BattleStruct* gBattleStruct; #define MOVE_EFFECT_REMOVE_PARALYSIS 0x24 #define MOVE_EFFECT_ATK_DEF_DOWN 0x25 #define MOVE_EFFECT_RECOIL_33_PARALYSIS 0x26 +#define MOVE_EFFECT_ATK_PLUS_2 0x27 +#define MOVE_EFFECT_DEF_PLUS_2 0x28 +#define MOVE_EFFECT_SPD_PLUS_2 0x29 +#define MOVE_EFFECT_SP_ATK_PLUS_2 0x2A +#define MOVE_EFFECT_SP_DEF_PLUS_2 0x2B +#define MOVE_EFFECT_ACC_PLUS_2 0x2C +#define MOVE_EFFECT_EVS_PLUS_2 0x2D +#define MOVE_EFFECT_ATK_MINUS_2 0x2E +#define MOVE_EFFECT_DEF_MINUS_2 0x2F +#define MOVE_EFFECT_SPD_MINUS_2 0x30 +#define MOVE_EFFECT_SP_ATK_MINUS_2 0x31 +#define MOVE_EFFECT_SP_DEF_MINUS_2 0x32 +#define MOVE_EFFECT_ACC_MINUS_2 0x33 +#define MOVE_EFFECT_EVS_MINUS_2 0x34 #define MOVE_EFFECT_THRASH 0x35 #define MOVE_EFFECT_KNOCK_OFF 0x36 +#define MOVE_EFFECT_NOTHING_37 0x37 +#define MOVE_EFFECT_NOTHING_38 0x38 +#define MOVE_EFFECT_NOTHING_39 0x39 +#define MOVE_EFFECT_NOTHING_3A 0x3A #define MOVE_EFFECT_SP_ATK_TWO_DOWN 0x3B +#define MOVE_EFFECT_NOTHING_3C 0x3C +#define MOVE_EFFECT_NOTHING_3D 0x3D +#define MOVE_EFFECT_NOTHING_3E 0x3E +#define MOVE_EFFECT_NOTHING_3F 0x3F #define MOVE_EFFECT_AFFECTS_USER 0x40 +#define MOVE_EFFECT_CERTAIN 0x80 + +// battle animations ids + +#define B_ANIM_CASTFORM_CHANGE 0x0 +#define B_ANIM_STATS_CHANGE 0x1 +#define B_ANIM_SUBSTITUTE_FADE 0x2 +#define B_ANIM_SUBSTITUTE_APPEAR 0x3 +#define B_ANIM_x4 0x4 +#define B_ANIM_ITEM_KNOCKOFF 0x5 +#define B_ANIM_TURN_TRAP 0x6 +#define B_ANIM_ITEM_EFFECT 0x7 +#define B_ANIM_SMOKEBALL_ESCAPE 0x8 +#define B_ANIM_HANGED_ON 0x9 +#define B_ANIM_RAIN_CONTINUES 0xA +#define B_ANIM_SUN_CONTINUES 0xB +#define B_ANIM_SANDSTORM_CONTINUES 0xC +#define B_ANIM_HAIL_CONTINUES 0xD +#define B_ANIM_LEECH_SEED_DRAIN 0xE +#define B_ANIM_MON_HIT 0xF +#define B_ANIM_ITEM_STEAL 0x10 +#define B_ANIM_SNATCH_MOVE 0x11 +#define B_ANIM_FUTURE_SIGHT_HIT 0x12 +#define B_ANIM_x13 0x13 +#define B_ANIM_x14 0x14 +#define B_ANIM_INGRAIN_HEAL 0x15 +#define B_ANIM_WISH_HEAL 0x16 +#define B_ANIM_x17 0x17 +#define B_ANIM_x18 0x18 +#define B_ANIM_x19 0x19 +#define B_ANIM_x1A 0x1A +#define B_ANIM_x1B 0x1B +#define B_ANIM_x1C 0x1C +#define B_ANIM_x1D 0x1D + +#define GET_STAT_BUFF_ID(n)((n & 0xF)) // first four bits 0x1, 0x2, 0x4, 0x8 +#define GET_STAT_BUFF_VALUE(n)((n & 0xF0) >> 4) // 0x10, 0x20, 0x40 +#define STAT_BUFF_NEGATIVE 0x80 // 0x80, the sign bit + +#define SET_STAT_BUFF_ID(n)((n & 0xF)) +#define SET_STAT_BUFF_VALUE(n)(((s8)(((s8)(n) << 4)) & 0xF0)) struct BattleScripting { @@ -718,6 +817,8 @@ struct BattleScripting u8 animTurn; u8 animTargetsHit; u8 statChanger; + u8 field_1B; + u8 atk23_state; }; extern struct BattleScripting gBattleScripting; @@ -729,10 +830,12 @@ void CancelMultiTurnMoves(u8 bank); void PressurePPLose(u8 bankAtk, u8 bankDef, u16 move); void PrepareStringBattle(u16 stringId, u8 bank); u8 GetBattleBank(u8 caseId); +void UndoEffectsAfterFainting(void); // battle_3 -void b_movescr_stack_push(const u8* bsPtr); -void b_movescr_stack_push_cursor(void); +void BattleScriptPush(const u8* bsPtr); +void BattleScriptPushCursor(void); +void BattleScriptPop(void); u8 sub_803FB4C(void); // msg, can't select a move u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check); bool8 AreAllMovesUnusable(void); @@ -760,6 +863,13 @@ u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef); u8 AI_TypeCalc(u16 move, u16 species, u8 ability); u8 BankGetTurnOrder(u8 bank); +// battle_5 +void AdjustFriendshipOnBattleFaint(u8 bank); + +// battle 7 +void BattleMusicStop(void); +void sub_805E990(struct Pokemon* mon, u8 bank); + // rom_80A5C6C u8 GetBankSide(u8 bank); u8 GetBankIdentity(u8 bank); diff --git a/include/battle_controllers.h b/include/battle_controllers.h index b23649192..bfa1bd507 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -7,6 +7,9 @@ void EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 movePower, s32 void EmitHealthBarUpdate(u8 bufferId, u16 hpValue); void EmitEffectivenessSound(u8 bufferId, u16 songId); void EmitPrintStringPlayerOnly(u8 bufferId, u16 stringId); +void EmitFaintAnimation(u8 bufferId); +void EmitExpUpdate(u8 bufferId, u8 partyId, u16 expPoints); +void EmitBattleAnimation(u8 bufferId, u8 animationId, u16 argument); void MarkBufferBankForExecution(u8 bank); diff --git a/include/pokemon.h b/include/pokemon.h index 9d01c051e..674e6dbf4 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -620,6 +620,9 @@ bool8 IsPokeSpriteNotFlipped(u16 species); bool8 IsMonShiny(struct Pokemon *mon); bool8 IsShinyOtIdPersonality(u32 otId, u32 personality); +void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies); +bool8 IsTradedMon(struct Pokemon *mon); + #include "sprite.h" void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3); diff --git a/src/battle_3.c b/src/battle_3.c index 4f0997aa0..1b62e3bb8 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -196,17 +196,17 @@ extern void sub_803E08C(void); extern void bc_move_exec_returning(void); extern s8 GetFlavourRelationByPersonality(u32 personality, u8 flavor); -void b_movescr_stack_push(const u8* bsPtr) +void BattleScriptPush(const u8* bsPtr) { BATTLESCRIPTS_STACK->ptr[BATTLESCRIPTS_STACK->size++] = bsPtr; } -void b_movescr_stack_push_cursor(void) +void BattleScriptPushCursor(void) { BATTLESCRIPTS_STACK->ptr[BATTLESCRIPTS_STACK->size++] = gBattlescriptCurrInstr; } -void b_movescr_stack_pop_cursor(void) +void BattleScriptPop(void) { gBattlescriptCurrInstr = BATTLESCRIPTS_STACK->ptr[--BATTLESCRIPTS_STACK->size]; } @@ -1206,7 +1206,7 @@ u8 AtkCanceller_UnableToUseMove(void) { gBattleMons[gBankAttacker].status1 &= ~(STATUS_SLEEP); gBattleMons[gBankAttacker].status2 &= ~(STATUS2_NIGHTMARE); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattleCommunication[MULTISTRING_CHOOSER] = 1; gBattlescriptCurrInstr = BattleScript_MoveUsedWokeUp; effect = 2; @@ -1234,7 +1234,7 @@ u8 AtkCanceller_UnableToUseMove(void) else { gBattleMons[gBankAttacker].status2 &= ~(STATUS2_NIGHTMARE); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattleCommunication[MULTISTRING_CHOOSER] = 0; gBattlescriptCurrInstr = BattleScript_MoveUsedWokeUp; effect = 2; @@ -1262,7 +1262,7 @@ u8 AtkCanceller_UnableToUseMove(void) else // unfreeze { gBattleMons[gBankAttacker].status1 &= ~(STATUS_FREEZE); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze; gBattleCommunication[MULTISTRING_CHOOSER] = 0; } @@ -1349,7 +1349,7 @@ u8 AtkCanceller_UnableToUseMove(void) if (Random() & 1) { gBattleCommunication[MULTISTRING_CHOOSER] = 0; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); } else // confusion dmg { @@ -1363,7 +1363,7 @@ u8 AtkCanceller_UnableToUseMove(void) } else // snapped out of confusion { - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_MoveUsedIsConfusedNoMore; } effect = 1; @@ -1387,10 +1387,10 @@ u8 AtkCanceller_UnableToUseMove(void) { gBattleScripting.bank = CountTrailingZeroBits((gBattleMons[gBankAttacker].status2 & STATUS2_INFATUATION) >> 0x10); if (Random() & 1) - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); else { - b_movescr_stack_push(BattleScript_MoveUsedIsParalyzedCantAttack); + BattleScriptPush(BattleScript_MoveUsedIsParalyzedCantAttack); gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; gProtectStructs[gBankAttacker].loveImmobility = 1; CancelMultiTurnMoves(gBankAttacker); @@ -1432,7 +1432,7 @@ u8 AtkCanceller_UnableToUseMove(void) if (gBattleMoves[gCurrentMove].effect == EFFECT_THAW_HIT) { gBattleMons[gBankAttacker].status1 &= ~(STATUS_FREEZE); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze; gBattleCommunication[MULTISTRING_CHOOSER] = 1; } @@ -1969,7 +1969,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) gBattleTextBuff1[1] = 3; gBattleTextBuff1[2] = moveType; gBattleTextBuff1[3] = 0xFF; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_ColorChangeActivates; effect++; } @@ -1985,7 +1985,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) gBattleMoveDamage = gBattleMons[gBankAttacker].maxHP / 16; if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_RoughSkinActivates; effect++; } @@ -2006,7 +2006,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) if (gBattleCommunication[MOVE_EFFECT_BYTE] == 3) gBattleCommunication[MOVE_EFFECT_BYTE] += 2; gBattleCommunication[MOVE_EFFECT_BYTE] += 0x40; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_ApplySecondaryEffect; gHitMarker |= HITMARKER_IGNORE_SAFEGUARD; effect++; @@ -2021,7 +2021,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) && (Random() % 3) == 0) { gBattleCommunication[MOVE_EFFECT_BYTE] = 0x42; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_ApplySecondaryEffect; gHitMarker |= HITMARKER_IGNORE_SAFEGUARD; effect++; @@ -2036,7 +2036,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) && (Random() % 3) == 0) { gBattleCommunication[MOVE_EFFECT_BYTE] = 0x45; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_ApplySecondaryEffect; gHitMarker |= HITMARKER_IGNORE_SAFEGUARD; effect++; @@ -2051,7 +2051,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) && (Random() % 3) == 0) { gBattleCommunication[MOVE_EFFECT_BYTE] = 0x43; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_ApplySecondaryEffect; gHitMarker |= HITMARKER_IGNORE_SAFEGUARD; effect++; @@ -2073,7 +2073,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) && GetGenderFromSpeciesAndPersonality(speciesDef, pidDef) != 0xFF) { gBattleMons[gBankAttacker].status2 |= (gBitTable[gBankTarget] << 0x10); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_CuteCharmActivates; effect++; } @@ -2155,7 +2155,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) gBattleMons[i].status2 &= ~(STATUS2_INFATUATION); break; } - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = gUnknown_082DB68C; gBattleScripting.bank = i; gActiveBank = i; @@ -2197,7 +2197,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) gBattleStruct->synchronizeMoveEffect = 2; gBattleCommunication[MOVE_EFFECT_BYTE] = gBattleStruct->synchronizeMoveEffect + 0x40; gBattleScripting.bank = gBankTarget; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_SynchronizeActivates; gHitMarker |= HITMARKER_IGNORE_SAFEGUARD; effect++; @@ -2212,7 +2212,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) gBattleStruct->synchronizeMoveEffect = 2; gBattleCommunication[MOVE_EFFECT_BYTE] = gBattleStruct->synchronizeMoveEffect; gBattleScripting.bank = gBankAttacker; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_SynchronizeActivates; gHitMarker |= HITMARKER_IGNORE_SAFEGUARD; effect++; @@ -2303,7 +2303,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) { gLastUsedAbility = ABILITY_INTIMIDATE; gStatuses3[i] &= ~(STATUS3_INTIMIDATE_POKES); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = gUnknown_082DB4C1; gBattleStruct->intimidateBank = i; effect++; @@ -3592,7 +3592,7 @@ _0804330E:\n\ strb r3, [r1, 0x2]\n\ movs r0, 0xFF\n\ strb r0, [r1, 0x3]\n\ - bl b_movescr_stack_push_cursor\n\ + bl BattleScriptPushCursor\n\ ldr r1, =gBattlescriptCurrInstr\n\ ldr r0, =BattleScript_ColorChangeActivates\n\ str r0, [r1]\n\ @@ -3668,7 +3668,7 @@ _080433CA:\n\ bne _080433D8\n\ str r2, [r1]\n\ _080433D8:\n\ - bl b_movescr_stack_push_cursor\n\ + bl BattleScriptPushCursor\n\ ldr r1, =gBattlescriptCurrInstr\n\ ldr r0, =BattleScript_RoughSkinActivates\n\ str r0, [r1]\n\ @@ -3763,7 +3763,7 @@ _080434BC:\n\ ldrb r0, [r1, 0x3]\n\ adds r0, 0x40\n\ strb r0, [r1, 0x3]\n\ - bl b_movescr_stack_push_cursor\n\ + bl BattleScriptPushCursor\n\ ldr r1, =gBattlescriptCurrInstr\n\ ldr r0, =BattleScript_ApplySecondaryEffect\n\ str r0, [r1]\n\ @@ -3849,7 +3849,7 @@ _08043598:\n\ ldr r1, =gBattleCommunication\n\ movs r0, 0x42\n\ strb r0, [r1, 0x3]\n\ - bl b_movescr_stack_push_cursor\n\ + bl BattleScriptPushCursor\n\ ldr r1, =gBattlescriptCurrInstr\n\ ldr r0, =BattleScript_ApplySecondaryEffect\n\ str r0, [r1]\n\ @@ -3935,7 +3935,7 @@ _08043674:\n\ ldr r1, =gBattleCommunication\n\ movs r0, 0x45\n\ strb r0, [r1, 0x3]\n\ - bl b_movescr_stack_push_cursor\n\ + bl BattleScriptPushCursor\n\ ldr r1, =gBattlescriptCurrInstr\n\ ldr r0, =BattleScript_ApplySecondaryEffect\n\ str r0, [r1]\n\ @@ -4021,7 +4021,7 @@ _08043750:\n\ ldr r1, =gBattleCommunication\n\ movs r0, 0x43\n\ strb r0, [r1, 0x3]\n\ - bl b_movescr_stack_push_cursor\n\ + bl BattleScriptPushCursor\n\ ldr r1, =gBattlescriptCurrInstr\n\ ldr r0, =BattleScript_ApplySecondaryEffect\n\ str r0, [r1]\n\ @@ -4183,7 +4183,7 @@ _080438B6:\n\ ldr r0, [r2]\n\ orrs r0, r1\n\ str r0, [r2]\n\ - bl b_movescr_stack_push_cursor\n\ + bl BattleScriptPushCursor\n\ ldr r1, =gBattlescriptCurrInstr\n\ ldr r0, =BattleScript_CuteCharmActivates\n\ str r0, [r1]\n\ @@ -4484,7 +4484,7 @@ _08043BF8:\n\ _08043BFA:\n\ str r0, [r2]\n\ _08043BFC:\n\ - bl b_movescr_stack_push_cursor\n\ + bl BattleScriptPushCursor\n\ ldr r1, =gBattlescriptCurrInstr\n\ ldr r0, =gUnknown_082DB68C\n\ str r0, [r1]\n\ @@ -4607,7 +4607,7 @@ _08043CF8:\n\ ldr r0, =gBankTarget\n\ ldrb r0, [r0]\n\ strb r0, [r1, 0x17]\n\ - bl b_movescr_stack_push_cursor\n\ + bl BattleScriptPushCursor\n\ ldr r1, =gBattlescriptCurrInstr\n\ ldr r0, =BattleScript_SynchronizeActivates\n\ str r0, [r1]\n\ @@ -4662,7 +4662,7 @@ _08043D7C:\n\ ldr r0, =gBankAttacker\n\ ldrb r0, [r0]\n\ strb r0, [r1, 0x17]\n\ - bl b_movescr_stack_push_cursor\n\ + bl BattleScriptPushCursor\n\ ldr r1, =gBattlescriptCurrInstr\n\ ldr r0, =BattleScript_SynchronizeActivates\n\ str r0, [r1]\n\ @@ -5380,7 +5380,7 @@ _080443B4:\n\ ldr r1, =0xfff7ffff\n\ ands r0, r1\n\ str r0, [r2]\n\ - bl b_movescr_stack_push_cursor\n\ + bl BattleScriptPushCursor\n\ ldr r1, =gBattlescriptCurrInstr\n\ ldr r0, =gUnknown_082DB4C1\n\ str r0, [r1]\n\ @@ -5465,7 +5465,7 @@ void b_call_bc_move_exec(const u8* BS_ptr) void b_push_move_exec(const u8* BS_ptr) { - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BS_ptr; BATTLE_CALLBACKS_STACK->function[BATTLE_CALLBACKS_STACK->size++] = gBattleMainFunc; gBattleMainFunc = sub_803E08C; @@ -6029,7 +6029,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) if (gBattleMons[bank].status1 & STATUS_PARALYSIS) { gBattleMons[bank].status1 &= ~(STATUS_PARALYSIS); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_BerryCureParRet; effect = ITEM_STATUS_CHANGE; } @@ -6038,7 +6038,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) if (gBattleMons[bank].status1 & STATUS_PSN_ANY) { gBattleMons[bank].status1 &= ~(STATUS_PSN_ANY | STATUS_TOXIC_COUNTER); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_BerryCurePsnRet; effect = ITEM_STATUS_CHANGE; } @@ -6047,7 +6047,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) if (gBattleMons[bank].status1 & STATUS_BURN) { gBattleMons[bank].status1 &= ~(STATUS_BURN); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_BerryCureBrnRet; effect = ITEM_STATUS_CHANGE; } @@ -6056,7 +6056,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) if (gBattleMons[bank].status1 & STATUS_FREEZE) { gBattleMons[bank].status1 &= ~(STATUS_FREEZE); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_BerryCureFrzRet; effect = ITEM_STATUS_CHANGE; } @@ -6066,7 +6066,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) { gBattleMons[bank].status1 &= ~(STATUS_SLEEP); gBattleMons[bank].status2 &= ~(STATUS2_NIGHTMARE); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_BerryCureSlpRet; effect = ITEM_STATUS_CHANGE; } @@ -6075,7 +6075,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) if (gBattleMons[bank].status2 & STATUS2_CONFUSION) { gBattleMons[bank].status2 &= ~(STATUS2_CONFUSION); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_BerryCureConfusionRet; effect = ITEM_EFFECT_OTHER; } @@ -6085,7 +6085,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) { gBattleMons[bank].status2 &= ~(STATUS2_INFATUATION); StringCopy(gBattleTextBuff1, gStatusConditionString_LoveJpn); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattleCommunication[MULTISTRING_CHOOSER] = 0; gBattlescriptCurrInstr = BattleScript_BerryCureChosenStatusRet; effect = ITEM_EFFECT_OTHER; @@ -6121,7 +6121,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) } gBattleMons[bank].status1 = 0; gBattleMons[bank].status2 &= ~(STATUS2_CONFUSION); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattleCommunication[MULTISTRING_CHOOSER] = 0; gBattlescriptCurrInstr = BattleScript_BerryCureChosenStatusRet; effect = ITEM_STATUS_CHANGE; @@ -6140,7 +6140,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) { gBattleScripting.bank = bank; gStringBank = bank; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_WhiteHerbRet; return effect; // unnecessary return } @@ -6170,9 +6170,9 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) && gBattleMons[gBankTarget].hp) { gBattleCommunication[MOVE_EFFECT_BYTE] = 8; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); SetMoveEffect(0, 0); - b_movescr_stack_pop_cursor(); + BattleScriptPop(); } break; case HOLD_EFFECT_SHELL_BELL: @@ -6190,7 +6190,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) if (gBattleMoveDamage == 0) gBattleMoveDamage = -1; gSpecialStatuses[gBankTarget].moveturnLostHP = 0; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_ItemHealHP_Ret; effect++; } diff --git a/src/battle_4.c b/src/battle_4.c index 6e71a6a57..8e0be22c2 100644 --- a/src/battle_4.c +++ b/src/battle_4.c @@ -15,6 +15,8 @@ #include "battle_controllers.h" #include "species.h" #include "songs.h" +#include "text.h" +#include "sound.h" // variables @@ -75,6 +77,7 @@ extern u8 gActionForBanks[BATTLE_BANKS_COUNT]; extern u8 gCurrentMoveTurn; extern u8 gBattleBufferB[BATTLE_BANKS_COUNT][0x200]; extern u16 gLockedMoves[BATTLE_BANKS_COUNT]; +extern u16 gPartnerTrainerId; extern const struct BattleMove gBattleMoves[]; extern const struct BaseStats gBaseStats[]; @@ -84,7 +87,7 @@ extern const u16 gTrappingMoves[]; extern const u8 gTrainerMoney[]; // functions - +extern void sub_81A5718(u8 bank); // battle frontier 2 // BattleScripts extern const u8 BattleScript_MoveEnd[]; @@ -108,6 +111,7 @@ extern const u8 BattleScript_ItemSteal[]; extern const u8 BattleScript_RapidSpinAway[]; extern const u8 BattleScript_TargetPRLZHeal[]; extern const u8 BattleScript_KnockedOff[]; +extern const u8 BattleScript_StickyHoldOnKnockOff[]; extern const u8 BattleScript_AllStatsUp[]; extern const u8 BattleScript_AtkDefDown[]; extern const u8 BattleScript_SAtkDown2[]; @@ -124,6 +128,10 @@ extern const u8 BattleScript_TrainerBallBlock[]; extern const u8 BattleScript_WallyBallThrow[]; extern const u8 BattleScript_SuccessBallThrow[]; extern const u8 BattleScript_ShakeBallThrow[]; +extern const u8 BattleScript_FaintAttacker[]; +extern const u8 BattleScript_FaintTarget[]; +extern const u8 BattleScript_DestinyBondTakesLife[]; +extern const u8 BattleScript_GrudgeTakesPp[]; // read via orr #define BSScriptRead32(ptr) ((ptr)[0] | (ptr)[1] << 8 | (ptr)[2] << 16 | (ptr)[3] << 24) @@ -144,7 +152,7 @@ bool8 IsTwoTurnsMove(u16 move); void DestinyBondFlagUpdate(void); u8 AttacksThisTurn(u8 bank, u16 move); // Note: returns 1 if it's a charging turn, otherwise 2. static void CheckWonderGuardAndLevitate(void); -u8 ChangeStatBuffs(s8, u8 statId, u8, const u8* BS_ptr); +u8 ChangeStatBuffs(s8 statValue, u8 statId, u8, const u8* BS_ptr); void atk00_attackcanceler(void); void atk01_accuracycheck(void); @@ -687,10 +695,10 @@ const u32 gStatusFlagsForMoveEffects[] = STATUS2_CONFUSION, STATUS2_FLINCHED, 0x00000000, - 0x00000070, + STATUS2_UPROAR, 0x00000000, - 0x00001000, - 0x0000E000, + STATUS2_MULTIPLETURNS, + STATUS2_WRAPPED, 0x00000000, 0x00000000, 0x00000000, @@ -706,10 +714,10 @@ const u32 gStatusFlagsForMoveEffects[] = 0x00000000, 0x00000000, 0x00000000, - 0x00400000, + STATUS2_RECHARGE, 0x00000000, 0x00000000, - 0x04000000, + STATUS2_ESCAPE_PREVENTION, 0x08000000, 0x00000000, 0x00000000, @@ -730,7 +738,7 @@ const u32 gStatusFlagsForMoveEffects[] = 0x00000000, 0x00000000, 0x00000000, - 0x00000C00, + STATUS2_LOCK_CONFUSE, 0x00000000, 0x00000000, 0x00000000, @@ -792,7 +800,7 @@ void atk00_attackcanceler(void) { PressurePPLose(gBankAttacker, gBankTarget, MOVE_MAGIC_COAT); gProtectStructs[gBankTarget].bounceMove = 0; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_MagicCoatBounce; return; } @@ -804,7 +812,7 @@ void atk00_attackcanceler(void) PressurePPLose(gBankAttacker, gTurnOrder[i], MOVE_SNATCH); gProtectStructs[gTurnOrder[i]].stealMove = 0; gBattleScripting.bank = gTurnOrder[i]; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_SnatchedMove; return; } @@ -814,7 +822,7 @@ void atk00_attackcanceler(void) { gSpecialStatuses[gBankTarget].lightningRodRedirected = 0; gLastUsedAbility = ABILITY_LIGHTNING_ROD; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_TookAttack; RecordAbilityBattle(gBankTarget, gLastUsedAbility); } @@ -1584,7 +1592,7 @@ void atk09_attackanimation(void) if ((gHitMarker & HITMARKER_NO_ANIMATIONS) && (gCurrentMove != MOVE_TRANSFORM && gCurrentMove != MOVE_SUBSTITUTE)) { - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_Pausex20; gBattleScripting.animTurn++; gBattleScripting.animTargetsHit++; @@ -1625,7 +1633,7 @@ void atk09_attackanimation(void) } else { - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_Pausex20; } } @@ -1710,7 +1718,7 @@ void atk0C_datahpupdate(void) if (gDisableStructs[gActiveBank].substituteHP == 0) { gBattlescriptCurrInstr += 2; - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_SubstituteFade; return; } @@ -1898,7 +1906,7 @@ void atk0F_resultmessage(void) gLastUsedItem = gBattleMons[gBankTarget].item; gStringBank = gBankTarget; gBattleMoveFlags &= ~(MOVESTATUS_ENDURED | MOVESTATUS_HUNGON); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_HangedOnMsg; return; default: @@ -1911,14 +1919,14 @@ void atk0F_resultmessage(void) gBattleMoveFlags &= ~(MOVESTATUS_ONEHITKO); gBattleMoveFlags &= ~(MOVESTATUS_SUPEREFFECTIVE); gBattleMoveFlags &= ~(MOVESTATUS_NOTVERYEFFECTIVE); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_OneHitKOMsg; return; } else if (gBattleMoveFlags & MOVESTATUS_ENDURED) { gBattleMoveFlags &= ~(MOVESTATUS_ENDURED | MOVESTATUS_HUNGON); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_EnduredMsg; return; } @@ -1927,7 +1935,7 @@ void atk0F_resultmessage(void) gLastUsedItem = gBattleMons[gBankTarget].item; gStringBank = gBankTarget; gBattleMoveFlags &= ~(MOVESTATUS_ENDURED | MOVESTATUS_HUNGON); - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_HangedOnMsg; return; } @@ -2110,12 +2118,12 @@ void SetMoveEffect(bool8 primary, u8 certain) break; case STATUS_POISON: if (gBattleMons[gEffectBank].ability == ABILITY_IMMUNITY - && (primary == TRUE || certain == 0x80)) + && (primary == TRUE || certain == MOVE_EFFECT_CERTAIN)) { gLastUsedAbility = ABILITY_IMMUNITY; RecordAbilityBattle(gEffectBank, ABILITY_IMMUNITY); - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_PSNPrevention; if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) @@ -2132,9 +2140,9 @@ void SetMoveEffect(bool8 primary, u8 certain) if ((gBattleMons[gEffectBank].type1 == TYPE_POISON || gBattleMons[gEffectBank].type2 == TYPE_POISON || gBattleMons[gEffectBank].type1 == TYPE_STEEL || gBattleMons[gEffectBank].type2 == TYPE_STEEL) && (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) - && (primary == 1 || certain == 0x80)) + && (primary == TRUE || certain == MOVE_EFFECT_CERTAIN)) { - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_PSNPrevention; gBattleCommunication[MULTISTRING_CHOOSER] = 2; @@ -2157,12 +2165,12 @@ void SetMoveEffect(bool8 primary, u8 certain) break; case STATUS_BURN: if (gBattleMons[gEffectBank].ability == ABILITY_WATER_VEIL - && (primary == 1 || certain == 0x80)) + && (primary == TRUE || certain == MOVE_EFFECT_CERTAIN)) { gLastUsedAbility = ABILITY_WATER_VEIL; RecordAbilityBattle(gEffectBank, ABILITY_WATER_VEIL); - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_BRNPrevention; if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { @@ -2178,9 +2186,9 @@ void SetMoveEffect(bool8 primary, u8 certain) if ((gBattleMons[gEffectBank].type1 == TYPE_FIRE || gBattleMons[gEffectBank].type2 == TYPE_FIRE) && (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) - && (primary == 1 || certain == 0x80)) + && (primary == TRUE || certain == MOVE_EFFECT_CERTAIN)) { - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_BRNPrevention; gBattleCommunication[MULTISTRING_CHOOSER] = 2; @@ -2217,12 +2225,12 @@ void SetMoveEffect(bool8 primary, u8 certain) case STATUS_PARALYSIS: if (gBattleMons[gEffectBank].ability == ABILITY_LIMBER) { - if (primary == TRUE || certain == 0x80) + if (primary == TRUE || certain == MOVE_EFFECT_CERTAIN) { gLastUsedAbility = ABILITY_LIMBER; RecordAbilityBattle(gEffectBank, ABILITY_LIMBER); - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_PRLZPrevention; if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) @@ -2245,12 +2253,12 @@ void SetMoveEffect(bool8 primary, u8 certain) statusChanged = TRUE; break; case STATUS_TOXIC_POISON: - if (gBattleMons[gEffectBank].ability == ABILITY_IMMUNITY && (primary == 1 || certain == 0x80)) + if (gBattleMons[gEffectBank].ability == ABILITY_IMMUNITY && (primary == TRUE || certain == MOVE_EFFECT_CERTAIN)) { gLastUsedAbility = ABILITY_IMMUNITY; RecordAbilityBattle(gEffectBank, ABILITY_IMMUNITY); - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_PSNPrevention; if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) @@ -2267,9 +2275,9 @@ void SetMoveEffect(bool8 primary, u8 certain) if ((gBattleMons[gEffectBank].type1 == TYPE_POISON || gBattleMons[gEffectBank].type2 == TYPE_POISON || gBattleMons[gEffectBank].type1 == TYPE_STEEL || gBattleMons[gEffectBank].type2 == TYPE_STEEL) && (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) - && (primary == TRUE || certain == 0x80)) + && (primary == TRUE || certain == MOVE_EFFECT_CERTAIN)) { - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_PSNPrevention; gBattleCommunication[MULTISTRING_CHOOSER] = 2; @@ -2299,7 +2307,7 @@ void SetMoveEffect(bool8 primary, u8 certain) } if (statusChanged == TRUE) { - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); if (gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]] == STATUS_SLEEP) gBattleMons[gEffectBank].status1 |= ((Random() & 3) + 2); @@ -2341,6 +2349,7 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattlescriptCurrInstr++; return; } + return; } else { @@ -2351,7 +2360,7 @@ void SetMoveEffect(bool8 primary, u8 certain) else { u8 side; - switch (gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]) + switch (gBattleCommunication[MOVE_EFFECT_BYTE]) { case MOVE_EFFECT_CONFUSION: if (gBattleMons[gEffectBank].ability == ABILITY_OWN_TEMPO @@ -2363,47 +2372,46 @@ void SetMoveEffect(bool8 primary, u8 certain) { gBattleMons[gEffectBank].status2 |= (((Random()) % 0x4)) + 2; - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; } break; case MOVE_EFFECT_FLINCH: if (gBattleMons[gEffectBank].ability == ABILITY_INNER_FOCUS) { - if (primary == 1 || certain == 0x80) + if (primary == TRUE || certain == MOVE_EFFECT_CERTAIN) { gLastUsedAbility = ABILITY_INNER_FOCUS; RecordAbilityBattle(gEffectBank, ABILITY_INNER_FOCUS); gBattlescriptCurrInstr = BattleScript_FlinchPrevention; - RESET_RETURN } else { gBattlescriptCurrInstr++; - break; } } else { if (BankGetTurnOrder(gEffectBank) > gCurrentMoveTurn) gBattleMons[gEffectBank].status2 |= gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]; - INCREMENT_RESET_RETURN + gBattlescriptCurrInstr++; } break; case MOVE_EFFECT_UPROAR: - if (gBattleMons[gEffectBank].status2 & STATUS2_UPROAR) - { - gBattlescriptCurrInstr++; - } - else + if (!(gBattleMons[gEffectBank].status2 & STATUS2_UPROAR)) { + gBattleMons[gEffectBank].status2 |= STATUS2_MULTIPLETURNS; gLockedMoves[gEffectBank] = gCurrentMove; gBattleMons[gEffectBank].status2 |= ((Random() & 3) + 2) << 4; - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; } + else + { + gBattlescriptCurrInstr++; + } break; case MOVE_EFFECT_PAYDAY: if (GET_BANK_SIDE(gBankAttacker) == SIDE_PLAYER) @@ -2413,7 +2421,7 @@ void SetMoveEffect(bool8 primary, u8 certain) if (PayDay > gPaydayMoney) gPaydayMoney = 0xFFFF; } - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; break; case MOVE_EFFECT_TRI_ATTACK: @@ -2440,18 +2448,20 @@ void SetMoveEffect(bool8 primary, u8 certain) } else { - gBattleMons[gEffectBank].status2 |= ((Random() & 3) + 2) << 0xD; + gBattleMons[gEffectBank].status2 |= ((Random() & 3) + 3) << 0xD; *(gBattleStruct->wrappedMove + gEffectBank * 2 + 0) = gCurrentMove; *(gBattleStruct->wrappedMove + gEffectBank * 2 + 1) = gCurrentMove >> 8; *(gBattleStruct->wrappedBy + gEffectBank) = gBankAttacker; - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; - for (gBattleCommunication[MULTISTRING_CHOOSER] = 0; gBattleCommunication[MULTISTRING_CHOOSER] <= 4; gBattleCommunication[MULTISTRING_CHOOSER]++) + for (gBattleCommunication[MULTISTRING_CHOOSER] = 0; ; gBattleCommunication[MULTISTRING_CHOOSER]++) { - if (gCurrentMove == gTrappingMoves[gBattleCommunication[MULTISTRING_CHOOSER]]) + if (gBattleCommunication[MULTISTRING_CHOOSER] > 4) + break; + if (gTrappingMoves[gBattleCommunication[MULTISTRING_CHOOSER]] == gCurrentMove) break; } } @@ -2461,58 +2471,90 @@ void SetMoveEffect(bool8 primary, u8 certain) if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; break; - case 15 ... 21: // stat + 1 - if (ChangeStatBuffs(0x10, gBattleCommunication[MOVE_EFFECT_BYTE] + 0xF2, affectsUser, 0)) + case MOVE_EFFECT_ATK_PLUS_1: + case MOVE_EFFECT_DEF_PLUS_1: + case MOVE_EFFECT_SPD_PLUS_1: + case MOVE_EFFECT_SP_ATK_PLUS_1: + case MOVE_EFFECT_SP_DEF_PLUS_1: + case MOVE_EFFECT_ACC_PLUS_1: + case MOVE_EFFECT_EVS_PLUS_1: + if (ChangeStatBuffs(SET_STAT_BUFF_VALUE(1), + gBattleCommunication[MOVE_EFFECT_BYTE] - MOVE_EFFECT_ATK_PLUS_1 + 1, + affectsUser, 0)) { gBattlescriptCurrInstr++; } else { - gBattleScripting.animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & 0x3F; + gBattleScripting.animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & ~(MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN); gBattleScripting.animArg2 = 0; - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_StatUp; } break; - case 22 ... 28: // stat - 1 - if (ChangeStatBuffs(~(0x6f), gBattleCommunication[MOVE_EFFECT_BYTE] + 0xEB, affectsUser, 0)) + case MOVE_EFFECT_ATK_MINUS_1: + case MOVE_EFFECT_DEF_MINUS_1: + case MOVE_EFFECT_SPD_MINUS_1: + case MOVE_EFFECT_SP_ATK_MINUS_1: + case MOVE_EFFECT_SP_DEF_MINUS_1: + case MOVE_EFFECT_ACC_MINUS_1: + case MOVE_EFFECT_EVS_MINUS_1: + if (ChangeStatBuffs(SET_STAT_BUFF_VALUE(1) | STAT_BUFF_NEGATIVE, + gBattleCommunication[MOVE_EFFECT_BYTE] - MOVE_EFFECT_ATK_MINUS_1 + 1, + affectsUser, 0)) { gBattlescriptCurrInstr++; } else { - gBattleScripting.animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & 0x3F; + gBattleScripting.animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & ~(MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN); gBattleScripting.animArg2 = 0; - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_StatDown; } break; - case 39 ... 45: // stat + 2 - if (ChangeStatBuffs(0x20, gBattleCommunication[MOVE_EFFECT_BYTE] + 0xDA, affectsUser, 0)) + case MOVE_EFFECT_ATK_PLUS_2: + case MOVE_EFFECT_DEF_PLUS_2: + case MOVE_EFFECT_SPD_PLUS_2: + case MOVE_EFFECT_SP_ATK_PLUS_2: + case MOVE_EFFECT_SP_DEF_PLUS_2: + case MOVE_EFFECT_ACC_PLUS_2: + case MOVE_EFFECT_EVS_PLUS_2: + if (ChangeStatBuffs(SET_STAT_BUFF_VALUE(2), + gBattleCommunication[MOVE_EFFECT_BYTE] - MOVE_EFFECT_ATK_PLUS_2 + 1, + affectsUser, 0)) { gBattlescriptCurrInstr++; } else { - gBattleScripting.animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & 0x3F; + gBattleScripting.animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & ~(MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN); gBattleScripting.animArg2 = 0; - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_StatUp; } break; - case 46 ... 52: // stat - 2 - if (ChangeStatBuffs(~(0x5f), gBattleCommunication[MOVE_EFFECT_BYTE] + 0xD3, affectsUser, 0)) + case MOVE_EFFECT_ATK_MINUS_2: + case MOVE_EFFECT_DEF_MINUS_2: + case MOVE_EFFECT_SPD_MINUS_2: + case MOVE_EFFECT_SP_ATK_MINUS_2: + case MOVE_EFFECT_SP_DEF_MINUS_2: + case MOVE_EFFECT_ACC_MINUS_2: + case MOVE_EFFECT_EVS_MINUS_2: + if (ChangeStatBuffs(SET_STAT_BUFF_VALUE(2) | STAT_BUFF_NEGATIVE, + gBattleCommunication[MOVE_EFFECT_BYTE] - MOVE_EFFECT_ATK_MINUS_2 + 1, + affectsUser, 0)) { gBattlescriptCurrInstr++; } else { - gBattleScripting.animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & 0x3F; + gBattleScripting.animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & ~(MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN); gBattleScripting.animArg2 = 0; - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_StatDown; } break; @@ -2544,9 +2586,8 @@ void SetMoveEffect(bool8 primary, u8 certain) | BATTLE_TYPE_SECRET_BASE))) { gBattlescriptCurrInstr++; - break; } - if (!(gBattleTypeFlags & + else if (!(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_FRONTIER | BATTLE_TYPE_LINK @@ -2555,57 +2596,51 @@ void SetMoveEffect(bool8 primary, u8 certain) && (gWishFutureKnock.knockedOffPokes[side] & gBitTable[gBattlePartyID[gBankAttacker]])) { gBattlescriptCurrInstr++; - break; } - if (gBattleMons[gBankTarget].item + else if (gBattleMons[gBankTarget].item && gBattleMons[gBankTarget].ability == ABILITY_STICKY_HOLD) { - b_movescr_stack_push_cursor(); + BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_NoItemSteal; gLastUsedAbility = gBattleMons[gBankTarget].ability; RecordAbilityBattle(gBankTarget, gLastUsedAbility); - - break; } - if (gBattleMons[gBankAttacker].item) + else if (gBattleMons[gBankAttacker].item + || gBattleMons[gBankTarget].item == ITEM_ENIGMA_BERRY + || (gBattleMons[gBankTarget].item > 0x78 && gBattleMons[gBankTarget].item < 0x85) + || gBattleMons[gBankTarget].item == 0) { gBattlescriptCurrInstr++; - break; } - if (gBattleMons[gBankTarget].item == ITEM_ENIGMA_BERRY) + else { - gBattlescriptCurrInstr++; - break; - } - if (gBattleMons[gBankTarget].item > 0x78 - && gBattleMons[gBankTarget].item < (0x79 + 12)) - { - gBattlescriptCurrInstr++; - break; - } - if (gBattleMons[gBankTarget].item == 0) - { - gBattlescriptCurrInstr++; - break; + // This is a leftover from R/S direct use of ewram addresses + void** memes1 = (void**)(&gBattleStruct); + void* memes2 = (void*)((u32)(gBankAttacker * 2 + offsetof(struct BattleStruct, field_D0))); + u16* memes3 = (u16*)(((void*)(*memes1) + (u32)(memes2))); + gLastUsedItem = *memes3 = gBattleMons[gBankTarget].item; + + // A sane representation of this would simply be: + // gLastUsedItem = gBattleStruct->field_D0[gBankAttacker] = gBattleMons[gBankTarget].item; + + gBattleMons[gBankTarget].item = 0; + + gActiveBank = gBankAttacker; + EmitSetAttributes(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gLastUsedItem); + MarkBufferBankForExecution(gBankAttacker); + + gActiveBank = gBankTarget; + EmitSetAttributes(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gBankTarget].item); + MarkBufferBankForExecution(gBankTarget); + + BattleScriptPush(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_ItemSteal; + + *(u8*)((u8*)(&gBattleStruct->choicedMove[gBankTarget]) + 0) = 0; + *(u8*)((u8*)(&gBattleStruct->choicedMove[gBankTarget]) + 1) = 0; } - *(u16*)((u8*)((gBattleStruct->field_D0) + gBankAttacker * 2)) = gLastUsedItem = gBattleMons[gBankTarget].item; - gBattleMons[gBankTarget].item = 0; - - gActiveBank = gBankAttacker; - EmitSetAttributes(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gLastUsedItem); - MarkBufferBankForExecution(gBankAttacker); - - gActiveBank = gBankTarget; - EmitSetAttributes(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gBankTarget].item); - MarkBufferBankForExecution(gBankTarget); - - b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BattleScript_ItemSteal; - - *(u8*)((u8*)(&gBattleStruct->choicedMove[gBankTarget]) + 0) = 0; - *(u8*)((u8*)(&gBattleStruct->choicedMove[gBankTarget]) + 1) = 0; } break; case MOVE_EFFECT_PREVENT_ESCAPE: @@ -2618,11 +2653,11 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattlescriptCurrInstr++; break; case MOVE_EFFECT_ALL_STATS_UP: - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_AllStatsUp; break; case MOVE_EFFECT_RAPIDSPIN: - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_RapidSpinAway; break; case MOVE_EFFECT_REMOVE_PARALYSIS: // Smelling salts @@ -2635,15 +2670,15 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattleMons[gBankTarget].status1 &= ~(STATUS_PARALYSIS); gActiveBank = gBankTarget; - EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gBankTarget].status1); + EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); MarkBufferBankForExecution(gActiveBank); - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_TargetPRLZHeal; } break; case MOVE_EFFECT_ATK_DEF_DOWN: // SuperPower - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_AtkDefDown; break; case MOVE_EFFECT_RECOIL_33_PARALYSIS: // Volt Tackle @@ -2651,7 +2686,7 @@ void SetMoveEffect(bool8 primary, u8 certain) if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; break; case MOVE_EFFECT_THRASH: @@ -2676,16 +2711,12 @@ void SetMoveEffect(bool8 primary, u8 certain) else { gLastUsedAbility = ABILITY_STICKY_HOLD; - gBattlescriptCurrInstr = BattleScript_NoItemSteal; + gBattlescriptCurrInstr = BattleScript_StickyHoldOnKnockOff; RecordAbilityBattle(gEffectBank, ABILITY_STICKY_HOLD); } break; } - if (gBattleMons[gEffectBank].item == 0) - { - gBattlescriptCurrInstr++; - } - else + if (gBattleMons[gEffectBank].item) { side = GetBankSide(gEffectBank); @@ -2693,18 +2724,19 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattleMons[gEffectBank].item = 0; gWishFutureKnock.knockedOffPokes[side] |= gBitTable[gBattlePartyID[gEffectBank]]; - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_KnockedOff; *(u8*)((u8*)(&gBattleStruct->choicedMove[gEffectBank]) + 0) = 0; *(u8*)((u8*)(&gBattleStruct->choicedMove[gEffectBank]) + 1) = 0; } - break; - default: - gBattlescriptCurrInstr++; + else + { + gBattlescriptCurrInstr++; + } break; case MOVE_EFFECT_SP_ATK_TWO_DOWN: // Overheat - b_movescr_stack_push(gBattlescriptCurrInstr + 1); + BattleScriptPush(gBattlescriptCurrInstr + 1); gBattlescriptCurrInstr = BattleScript_SAtkDown2; break; } @@ -2713,3 +2745,1615 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattleCommunication[MOVE_EFFECT_BYTE] = 0; } + +void atk15_seteffectwithchancetarget(void) +{ + u32 percentChance; + + if (gBattleMons[gBankAttacker].ability == ABILITY_SERENE_GRACE) + percentChance = gBattleMoves[gCurrentMove].secondaryEffectChance * 2; + else + percentChance = gBattleMoves[gCurrentMove].secondaryEffectChance; + + if (gBattleCommunication[MOVE_EFFECT_BYTE] & MOVE_EFFECT_CERTAIN + && !(gBattleMoveFlags & MOVESTATUS_NOEFFECT)) + { + gBattleCommunication[MOVE_EFFECT_BYTE] &= ~(MOVE_EFFECT_CERTAIN); + SetMoveEffect(0, MOVE_EFFECT_CERTAIN); + } + else if (Random() % 100 < percentChance + && gBattleCommunication[MOVE_EFFECT_BYTE] + && !(gBattleMoveFlags & MOVESTATUS_NOEFFECT)) + { + if (percentChance >= 100) + SetMoveEffect(0, MOVE_EFFECT_CERTAIN); + else + SetMoveEffect(0, 0); + } + else + { + gBattlescriptCurrInstr++; + } + + gBattleCommunication[MOVE_EFFECT_BYTE] = 0; + gBattleScripting.field_16 = 0; +} + +void atk16_seteffectprimary(void) +{ + SetMoveEffect(TRUE, 0); +} + +void atk17_seteffectsecondary(void) +{ + SetMoveEffect(FALSE, 0); +} + +void atk18_status_effect_clear(void) +{ + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + if (gBattleCommunication[MOVE_EFFECT_BYTE] <= MOVE_EFFECT_TOXIC) + gBattleMons[gActiveBank].status1 &= (~gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]); + else + gBattleMons[gActiveBank].status2 &= (~gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]); + + gBattleCommunication[MOVE_EFFECT_BYTE] = 0; + gBattlescriptCurrInstr += 2; + gBattleScripting.field_16 = 0; +} + +void atk19_faint_pokemon(void) +{ + const u8 *BS_ptr; + + if (gBattlescriptCurrInstr[2] != 0) + { + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); + if (gHitMarker & HITMARKER_FAINTED(gActiveBank)) + { + BS_ptr = BSScriptReadPtr(gBattlescriptCurrInstr + 3); + + BattleScriptPop(); + gBattlescriptCurrInstr = BS_ptr; + gSideAffecting[GetBankSide(gActiveBank)] &= ~(SIDE_STATUS_SPIKES_DAMAGED); + } + else + { + gBattlescriptCurrInstr += 7; + } + } + else + { + u8 bank; + + if (gBattlescriptCurrInstr[1] == BS_GET_ATTACKER) + { + gActiveBank = gBankAttacker; + bank = gBankTarget; + BS_ptr = BattleScript_FaintAttacker; + } + else + { + gActiveBank = gBankTarget; + bank = gBankAttacker; + BS_ptr = BattleScript_FaintTarget; + } + if (!(gAbsentBankFlags & gBitTable[gActiveBank]) + && gBattleMons[gActiveBank].hp == 0) + { + gHitMarker |= HITMARKER_FAINTED(gActiveBank); + BattleScriptPush(gBattlescriptCurrInstr + 7); + gBattlescriptCurrInstr = BS_ptr; + if (GetBankSide(gActiveBank) == SIDE_PLAYER) + { + gHitMarker |= HITMARKER_x400000; + if (gBattleResults.playerFaintCounter < 0xFF) + gBattleResults.playerFaintCounter++; + AdjustFriendshipOnBattleFaint(gActiveBank); + } + else + { + if (gBattleResults.opponentFaintCounter < 0xFF) + gBattleResults.opponentFaintCounter++; + gBattleResults.lastOpponentSpecies = GetMonData(&gEnemyParty[gBattlePartyID[gActiveBank]], MON_DATA_SPECIES, NULL); + } + if ((gHitMarker & HITMARKER_DESTINYBOND) && gBattleMons[gBankAttacker].hp != 0) + { + gHitMarker &= ~(HITMARKER_DESTINYBOND); + BattleScriptPush(gBattlescriptCurrInstr); + gBattleMoveDamage = gBattleMons[bank].hp; + gBattlescriptCurrInstr = BattleScript_DestinyBondTakesLife; + } + if ((gStatuses3[gBankTarget] & STATUS3_GRUDGE) + && !(gHitMarker & HITMARKER_GRUDGE) + && GetBankSide(gBankAttacker) != GetBankSide(gBankTarget) + && gBattleMons[gBankAttacker].hp != 0 + && gCurrentMove != MOVE_STRUGGLE) + { + u8 moveIndex = *(gBattleStruct->chosenMovesIds + gBankAttacker); + + gBattleMons[gBankAttacker].pp[moveIndex] = 0; + BattleScriptPush(gBattlescriptCurrInstr); + gBattlescriptCurrInstr = BattleScript_GrudgeTakesPp; + gActiveBank = gBankAttacker; + EmitSetAttributes(0, moveIndex + REQUEST_PPMOVE1_BATTLE, 0, 1, &gBattleMons[gActiveBank].pp[moveIndex]); + MarkBufferBankForExecution(gActiveBank); + + gBattleTextBuff1[0] = PLACEHOLDER_BEGIN; + gBattleTextBuff1[1] = 2; + gBattleTextBuff1[2] = gBattleMons[gBankAttacker].moves[moveIndex]; + gBattleTextBuff1[3] = gBattleMons[gBankAttacker].moves[moveIndex] >> 8; + gBattleTextBuff1[4] = EOS; + } + } + else + { + gBattlescriptCurrInstr += 7; + } + } +} + +void atk1A_faint_animation(void) +{ + if (gBattleExecBuffer == 0) + { + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + EmitFaintAnimation(0); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr += 2; + } +} + +void atk1B_faint_effects_clear(void) +{ + if (gBattleExecBuffer == 0) + { + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + if (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || gBattleMons[gActiveBank].hp == 0) + { + gBattleMons[gActiveBank].status1 = 0; + EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 0x4, &gBattleMons[gActiveBank].status1); + MarkBufferBankForExecution(gActiveBank); + } + + UndoEffectsAfterFainting(); // Effects like attractions, trapping, etc. + gBattlescriptCurrInstr += 2; + } +} + +void atk1C_jumpifstatus(void) +{ + u8 bank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + u32 flags = BS2ScriptRead32(gBattlescriptCurrInstr + 2); + const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 6); + + if (gBattleMons[bank].status1 & flags && gBattleMons[bank].hp) + gBattlescriptCurrInstr = jumpPtr; + else + gBattlescriptCurrInstr += 10; +} + +void atk1D_jumpifstatus2(void) +{ + u8 bank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + u32 flags = BS2ScriptRead32(gBattlescriptCurrInstr + 2); + const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 6); + + if (gBattleMons[bank].status2 & flags && gBattleMons[bank].hp) + gBattlescriptCurrInstr = jumpPtr; + else + gBattlescriptCurrInstr += 10; +} + +void atk1E_jumpifability(void) +{ + u8 bank; + u8 ability = BSScriptRead8(gBattlescriptCurrInstr + 2); + const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 3); + + if (BSScriptRead8(gBattlescriptCurrInstr + 1) == BS_GET_ATTACKER_SIDE) + { + bank = AbilityBattleEffects(ABILITYEFFECT_CHECK_BANK_SIDE, gBankAttacker, ability, 0, 0); + if (bank) + { + gLastUsedAbility = ability; + gBattlescriptCurrInstr = jumpPtr; + RecordAbilityBattle(bank - 1, gLastUsedAbility); + gBattleScripting.field_15 = bank - 1; + } + else + gBattlescriptCurrInstr += 7; + } + else if (BSScriptRead8(gBattlescriptCurrInstr + 1) == BS_GET_NOT_ATTACKER_SIDE) + { + bank = AbilityBattleEffects(ABILITYEFFECT_CHECK_OTHER_SIDE, gBankAttacker, ability, 0, 0); + if (bank) + { + gLastUsedAbility = ability; + gBattlescriptCurrInstr = jumpPtr; + RecordAbilityBattle(bank - 1, gLastUsedAbility); + gBattleScripting.field_15 = bank - 1; + } + else + gBattlescriptCurrInstr += 7; + } + else + { + bank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + if (gBattleMons[bank].ability == ability) + { + gLastUsedAbility = ability; + gBattlescriptCurrInstr = jumpPtr; + RecordAbilityBattle(bank, gLastUsedAbility); + gBattleScripting.field_15 = bank; + } + else + gBattlescriptCurrInstr += 7; + } +} + +void atk1F_jumpifsideaffecting(void) +{ + u8 side; + u16 flags; + const u8* jumpPtr; + + if (BSScriptRead8(gBattlescriptCurrInstr + 1) == BS_GET_ATTACKER) + side = GET_BANK_SIDE(gBankAttacker); + else + side = GET_BANK_SIDE(gBankTarget); + + flags = BS2ScriptRead16(gBattlescriptCurrInstr + 2); + jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 4); + + if (gSideAffecting[side] & flags) + gBattlescriptCurrInstr = jumpPtr; + else + gBattlescriptCurrInstr += 8; +} + +void atk20_jumpifstat(void) +{ + u8 ret = 0; + u8 bank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + u8 value = gBattleMons[bank].statStages[BSScriptRead8(gBattlescriptCurrInstr + 3)]; + + switch (BSScriptRead8(gBattlescriptCurrInstr + 2)) + { + case CMP_EQUAL: + if (value == BSScriptRead8(gBattlescriptCurrInstr + 4)) + ret++; + break; + case CMP_NOT_EQUAL: + if (value != BSScriptRead8(gBattlescriptCurrInstr + 4)) + ret++; + break; + case CMP_GREATER_THAN: + if (value > BSScriptRead8(gBattlescriptCurrInstr + 4)) + ret++; + break; + case CMP_LESS_THAN: + if (value < BSScriptRead8(gBattlescriptCurrInstr + 4)) + ret++; + break; + case CMP_COMMON_BITS: + if (value & BSScriptRead8(gBattlescriptCurrInstr + 4)) + ret++; + break; + case CMP_NO_COMMON_BITS: + if (!(value & BSScriptRead8(gBattlescriptCurrInstr + 4))) + ret++; + break; + } + + if (ret) + gBattlescriptCurrInstr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 5); + else + gBattlescriptCurrInstr += 9; +} + +void atk21_jumpifstatus3(void) +{ + u32 flags; + const u8* jumpPtr; + + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + flags = BS2ScriptRead32(gBattlescriptCurrInstr + 2); + jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 7); + + if (BSScriptRead8(gBattlescriptCurrInstr + 6)) + { + if ((gStatuses3[gActiveBank] & flags) != 0) + gBattlescriptCurrInstr += 11; + else + gBattlescriptCurrInstr = jumpPtr; + } + else + { + if ((gStatuses3[gActiveBank] & flags) != 0) + gBattlescriptCurrInstr = jumpPtr; + else + gBattlescriptCurrInstr += 11; + } +} + +void atk22_jumpiftype(void) +{ + u8 bank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + u8 type = BSScriptRead8(gBattlescriptCurrInstr + 2); + const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 3); + + if (gBattleMons[bank].type1 == type || gBattleMons[bank].type2 == type) + gBattlescriptCurrInstr = jumpPtr; + else + gBattlescriptCurrInstr += 7; +} + +void atk23_getexp(void) +{ + u16 item; + s32 i; // also used as stringId + u8 holdEffect; + s32 sentIn; + + s32 viaExpShare = 0; + u16* exp = &gBattleStruct->expValue; + + gBank1 = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + sentIn = gSentPokesToOpponent[(gBank1 & 2) >> 1]; + + switch (gBattleScripting.atk23_state) + { + case 0: // check if should receive exp at all + if (GetBankSide(gBank1) != SIDE_OPPONENT || (gBattleTypeFlags & + (BATTLE_TYPE_LINK + | BATTLE_TYPE_x2000000 + | BATTLE_TYPE_x4000000 + | BATTLE_TYPE_FRONTIER + | BATTLE_TYPE_SAFARI + | BATTLE_TYPE_BATTLE_TOWER + | BATTLE_TYPE_EREADER_TRAINER))) + { + gBattleScripting.atk23_state = 6; // goto last case + } + else + { + gBattleScripting.atk23_state++; + gBattleStruct->field_DF |= gBitTable[gBattlePartyID[gBank1]]; + } + break; + case 1: // calculate experience points to redistribute + { + u16 calculatedExp; + s32 viaSentIn; + + for (viaSentIn = 0, i = 0; i < 6; i++) + { + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) == SPECIES_NONE || GetMonData(&gPlayerParty[i], MON_DATA_HP) == 0) + continue; + if (gBitTable[i] & sentIn) + viaSentIn++; + + item = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); + + if (item == ITEM_ENIGMA_BERRY) + holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; + else + holdEffect = ItemId_GetHoldEffect(item); + + if (holdEffect == HOLD_EFFECT_EXP_SHARE) + viaExpShare++; + } + + calculatedExp = gBaseStats[gBattleMons[gBank1].species].expYield * gBattleMons[gBank1].level / 7; + + if (viaExpShare) // at least one mon is getting exp via exp share + { + *exp = calculatedExp / 2 / viaSentIn; + if (*exp == 0) + *exp = 1; + + gExpShareExp = calculatedExp / 2 / viaExpShare; + if (gExpShareExp == 0) + gExpShareExp = 1; + } + else + { + *exp = calculatedExp / viaSentIn; + if (*exp == 0) + *exp = 1; + gExpShareExp = 0; + } + + gBattleScripting.atk23_state++; + gBattleStruct->expGetterId = 0; + gBattleStruct->sentInPokes = sentIn; + } + // fall through + case 2: // set exp value to the poke in expgetter_id and print message + if (gBattleExecBuffer == 0) + { + item = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_HELD_ITEM); + + if (item == ITEM_ENIGMA_BERRY) + holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; + else + holdEffect = ItemId_GetHoldEffect(item); + + if (holdEffect != HOLD_EFFECT_EXP_SHARE && !(gBattleStruct->sentInPokes & 1)) + { + *(&gBattleStruct->sentInPokes) >>= 1; + gBattleScripting.atk23_state = 5; + gBattleMoveDamage = 0; // used for exp + } + else if (GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_LEVEL) == MAX_MON_LEVEL) + { + *(&gBattleStruct->sentInPokes) >>= 1; + gBattleScripting.atk23_state = 5; + gBattleMoveDamage = 0; // used for exp + } + else + { + // music change in wild battle after fainting a poke + if (!(gBattleTypeFlags & BATTLE_TYPE_TRAINER) && gBattleMons[0].hp && !gBattleStruct->wildVictorySong) + { + BattleMusicStop(); + PlayBGM(0x161); + gBattleStruct->wildVictorySong++; + } + + if (GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_HP)) + { + if (gBattleStruct->sentInPokes & 1) + gBattleMoveDamage = *exp; + else + gBattleMoveDamage = 0; + + if (holdEffect == HOLD_EFFECT_EXP_SHARE) + gBattleMoveDamage += gExpShareExp; + if (holdEffect == HOLD_EFFECT_LUCKY_EGG) + gBattleMoveDamage = (gBattleMoveDamage * 150) / 100; + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) + gBattleMoveDamage = (gBattleMoveDamage * 150) / 100; + + if (IsTradedMon(&gPlayerParty[gBattleStruct->expGetterId])) + { + // check if the pokemon doesn't belong to the player + if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && gBattleStruct->expGetterId >= 3) + { + i = 0x149; + } + else + { + gBattleMoveDamage = (gBattleMoveDamage * 150) / 100; + i = 0x14A; + } + } + else + { + i = 0x149; + } + + // get exp getter bank + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + { + if (!(gBattlePartyID[2] != gBattleStruct->expGetterId) && !(gAbsentBankFlags & gBitTable[2])) + gBattleStruct->expGetterBank = 2; + else + { + if (!(gAbsentBankFlags & gBitTable[0])) + gBattleStruct->expGetterBank = 0; + else + gBattleStruct->expGetterBank = 2; + } + } + else + gBattleStruct->expGetterBank = 0; + + // buffer poke name + gBattleTextBuff1[0] = PLACEHOLDER_BEGIN; + gBattleTextBuff1[1] = 4; + gBattleTextBuff1[2] = gBattleStruct->expGetterBank; + gBattleTextBuff1[3] = gBattleStruct->expGetterId; + gBattleTextBuff1[4] = EOS; + + // buffer 'gained' or 'gained a boosted' + gBattleTextBuff2[0] = PLACEHOLDER_BEGIN; + gBattleTextBuff2[1] = 0; + gBattleTextBuff2[2] = i; + gBattleTextBuff2[3] = (i & 0xFF00) >> 8; + gBattleTextBuff2[4] = EOS; + + // buffer exp number + gBattleTextBuff3[0] = PLACEHOLDER_BEGIN; + gBattleTextBuff3[1] = 1; + gBattleTextBuff3[2] = 4; // word + gBattleTextBuff3[3] = 5; // max digits + gBattleTextBuff3[4] = gBattleMoveDamage; + gBattleTextBuff3[5] = (gBattleMoveDamage & 0x0000FF00) >> 8; + gBattleTextBuff3[6] = (gBattleMoveDamage & 0x00FF0000) >> 16; + gBattleTextBuff3[7] = (gBattleMoveDamage & 0xFF000000) >> 24; + gBattleTextBuff3[8] = EOS; + + PrepareStringBattle(0xD, gBattleStruct->expGetterBank); + MonGainEVs(&gPlayerParty[gBattleStruct->expGetterId], gBattleMons[gBank1].species); + } + gBattleStruct->sentInPokes >>= 1; + gBattleScripting.atk23_state++; + } + } + break; + case 3: // Set stats and give exp + if (gBattleExecBuffer == 0) + { + gBattleBufferB[gBattleStruct->expGetterBank][0] = 0; + if (GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_HP) && GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_LEVEL) != MAX_MON_LEVEL) + { + BATTLE_LVLUP_STATS->hp = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_MAX_HP); + BATTLE_LVLUP_STATS->atk = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_ATK); + BATTLE_LVLUP_STATS->def = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_DEF); + BATTLE_LVLUP_STATS->spd = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_SPD); + BATTLE_LVLUP_STATS->spAtk = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_SPATK); + BATTLE_LVLUP_STATS->spDef = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_SPDEF); + + gActiveBank = gBattleStruct->expGetterBank; + EmitExpUpdate(0, gBattleStruct->expGetterId, gBattleMoveDamage); + MarkBufferBankForExecution(gActiveBank); + } + gBattleScripting.atk23_state++; + } + break; + case 4: // lvl up if necessary + if (gBattleExecBuffer == 0) + { + gActiveBank = gBattleStruct->expGetterBank; + if (gBattleBufferB[gActiveBank][0] == 0x21 && gBattleBufferB[gActiveBank][1] == 0xB) + { + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && gBattlePartyID[gActiveBank] == gBattleStruct->expGetterId) + sub_805E990(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank); + + // buff poke name + gBattleTextBuff1[0] = PLACEHOLDER_BEGIN; + gBattleTextBuff1[1] = 4; + gBattleTextBuff1[2] = gActiveBank; + gBattleTextBuff1[3] = gBattleStruct->expGetterId; + gBattleTextBuff1[4] = EOS; + + // buff level + gBattleTextBuff2[0] = PLACEHOLDER_BEGIN; + gBattleTextBuff2[1] = 1; + gBattleTextBuff2[2] = 1; + gBattleTextBuff2[3] = 3; + gBattleTextBuff2[4] = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_LEVEL); + gBattleTextBuff2[5] = EOS; + + BattleScriptPushCursor(); + gLeveledUpInBattle |= gBitTable[gBattleStruct->expGetterId]; + gBattlescriptCurrInstr = BattleScript_LevelUp; + gBattleMoveDamage = (gBattleBufferB[gActiveBank][2] | (gBattleBufferB[gActiveBank][3] << 8)); + AdjustFriendship(&gPlayerParty[gBattleStruct->expGetterId], 0); + + // update battle mon structure after level up + if (gBattlePartyID[0] == gBattleStruct->expGetterId && gBattleMons[0].hp) + { + gBattleMons[0].level = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_LEVEL); + gBattleMons[0].hp = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_HP); + gBattleMons[0].maxHP = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_MAX_HP); + gBattleMons[0].attack = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_ATK); + gBattleMons[0].defense = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_DEF); + // Why is this duplicated? + gBattleMons[0].speed = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_SPD); + gBattleMons[0].speed = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_SPD); + + gBattleMons[0].spAttack = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_SPATK); + gBattleMons[0].spDefense = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_SPDEF); + } + // What is else if? + if (gBattlePartyID[2] == gBattleStruct->expGetterId && gBattleMons[2].hp && (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) + { + gBattleMons[2].level = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_LEVEL); + gBattleMons[2].hp = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_HP); + gBattleMons[2].maxHP = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_MAX_HP); + gBattleMons[2].attack = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_ATK); + gBattleMons[2].defense = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_DEF); + // Duplicated again, but this time there's no Sp Defense + gBattleMons[2].speed = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_SPD); + gBattleMons[2].speed = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_SPD); + + gBattleMons[2].spAttack = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_SPATK); + } + gBattleScripting.atk23_state = 5; + } + else + { + gBattleMoveDamage = 0; + gBattleScripting.atk23_state = 5; + } + } + break; + case 5: // looper increment + if (gBattleMoveDamage) // there is exp to give, goto case 3 that gives exp + gBattleScripting.atk23_state = 3; + else + { + gBattleStruct->expGetterId++; + if (gBattleStruct->expGetterId <= 5) + gBattleScripting.atk23_state = 2; // loop again + else + gBattleScripting.atk23_state = 6; // we're done + } + break; + case 6: // increment instruction + if (gBattleExecBuffer == 0) + { + // not sure why gf clears the item and ability here + gBattleMons[gBank1].item = 0; + gBattleMons[gBank1].ability = 0; + gBattlescriptCurrInstr += 2; + } + break; + } +} + +#ifdef NONMATCHING +void atk24(void) +{ + u16 HP_count = 0; + s32 i; + + if (gBattleExecBuffer) + return; + + if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && gPartnerTrainerId == STEVEN_PARTNER_ID) + { + for (i = 0; i < 3; i++) + { + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG)) + HP_count += GetMonData(&gPlayerParty[i], MON_DATA_HP); + } + } + else + { + for (i = 0; i < 6; i++) + { + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) && !GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG) + && (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || !(gBattleStruct->field_2A0 & gBitTable[i]))) + { + HP_count += GetMonData(&gPlayerParty[i], MON_DATA_HP); + } + } + } + + if (HP_count == 0) + gBattleOutcome |= BATTLE_LOST; + + for (HP_count = 0, i = 0; i < 6; i++) + { + if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES) && !GetMonData(&gEnemyParty[i], MON_DATA_IS_EGG) + && (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || !(gBattleStruct->field_2A1 & gBitTable[i]))) + { + HP_count += GetMonData(&gEnemyParty[i], MON_DATA_HP); + } + } + + if (HP_count == 0) + gBattleOutcome |= BATTLE_WON; + + if (gBattleOutcome == 0 && (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000))) + { + s32 foundPlayer; + s32 foundOpponent; + + // Impossible to decompile loops. + for (foundPlayer = 0, i = 0; i < gNoOfAllBanks; i += 2) + { + if (HITMARKER_UNK(i) & gHitMarker && !gSpecialStatuses[i].flag40) + foundPlayer++; + } + + for (foundOpponent = 0, i = 1; i < gNoOfAllBanks; i += 2) + { + if (HITMARKER_UNK(i) & gHitMarker && !gSpecialStatuses[i].flag40) + foundOpponent++; + } + + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + if (foundOpponent + foundPlayer > 1) + gBattlescriptCurrInstr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + else + gBattlescriptCurrInstr += 5; + } + else + { + if (foundOpponent != 0 && foundPlayer != 0) + gBattlescriptCurrInstr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + else + gBattlescriptCurrInstr += 5; + } + } + else + { + gBattlescriptCurrInstr += 5; + } +} +#else +__attribute__((naked)) +void atk24(void) +{ + asm("\n\ + .syntax unified\n\ + push {r4-r7,lr}\n\ + mov r7, r8\n\ + push {r7}\n\ + movs r6, 0\n\ + ldr r0, =gBattleExecBuffer\n\ + ldr r0, [r0]\n\ + cmp r0, 0\n\ + beq _0804ACE2\n\ + b _0804AF22\n\ + _0804ACE2:\n\ + ldr r0, =gBattleTypeFlags\n\ + ldr r0, [r0]\n\ + movs r1, 0x80\n\ + lsls r1, 15\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _0804AD48\n\ + ldr r0, =gPartnerTrainerId\n\ + ldrh r1, [r0]\n\ + ldr r0, =0x00000c03\n\ + cmp r1, r0\n\ + bne _0804AD48\n\ + movs r5, 0\n\ + _0804ACFC:\n\ + movs r0, 0x64\n\ + adds r1, r5, 0\n\ + muls r1, r0\n\ + ldr r0, =gPlayerParty\n\ + adds r4, r1, r0\n\ + adds r0, r4, 0\n\ + movs r1, 0xB\n\ + bl GetMonData\n\ + cmp r0, 0\n\ + beq _0804AD2C\n\ + adds r0, r4, 0\n\ + movs r1, 0x2D\n\ + bl GetMonData\n\ + cmp r0, 0\n\ + bne _0804AD2C\n\ + adds r0, r4, 0\n\ + movs r1, 0x39\n\ + bl GetMonData\n\ + adds r0, r6, r0\n\ + lsls r0, 16\n\ + lsrs r6, r0, 16\n\ + _0804AD2C:\n\ + adds r5, 0x1\n\ + cmp r5, 0x2\n\ + ble _0804ACFC\n\ + b _0804ADA8\n\ + .pool\n\ + _0804AD48:\n\ + movs r5, 0\n\ + _0804AD4A:\n\ + movs r0, 0x64\n\ + adds r1, r5, 0\n\ + muls r1, r0\n\ + ldr r0, =gPlayerParty\n\ + adds r4, r1, r0\n\ + adds r0, r4, 0\n\ + movs r1, 0xB\n\ + bl GetMonData\n\ + cmp r0, 0\n\ + beq _0804ADA2\n\ + adds r0, r4, 0\n\ + movs r1, 0x2D\n\ + bl GetMonData\n\ + cmp r0, 0\n\ + bne _0804ADA2\n\ + ldr r0, =gBattleTypeFlags\n\ + ldr r0, [r0]\n\ + movs r1, 0x80\n\ + lsls r1, 11\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _0804AD94\n\ + ldr r0, =gBattleStruct\n\ + ldr r0, [r0]\n\ + movs r1, 0xA8\n\ + lsls r1, 2\n\ + adds r0, r1\n\ + ldrb r1, [r0]\n\ + ldr r2, =gBitTable\n\ + lsls r0, r5, 2\n\ + adds r0, r2\n\ + ldr r0, [r0]\n\ + ands r1, r0\n\ + cmp r1, 0\n\ + bne _0804ADA2\n\ + _0804AD94:\n\ + adds r0, r4, 0\n\ + movs r1, 0x39\n\ + bl GetMonData\n\ + adds r0, r6, r0\n\ + lsls r0, 16\n\ + lsrs r6, r0, 16\n\ + _0804ADA2:\n\ + adds r5, 0x1\n\ + cmp r5, 0x5\n\ + ble _0804AD4A\n\ + _0804ADA8:\n\ + cmp r6, 0\n\ + bne _0804ADB6\n\ + ldr r0, =gBattleOutcome\n\ + ldrb r1, [r0]\n\ + movs r2, 0x2\n\ + orrs r1, r2\n\ + strb r1, [r0]\n\ + _0804ADB6:\n\ + movs r6, 0\n\ + movs r5, 0\n\ + _0804ADBA:\n\ + movs r0, 0x64\n\ + adds r1, r5, 0\n\ + muls r1, r0\n\ + ldr r0, =gEnemyParty\n\ + adds r4, r1, r0\n\ + adds r0, r4, 0\n\ + movs r1, 0xB\n\ + bl GetMonData\n\ + cmp r0, 0\n\ + beq _0804AE10\n\ + adds r0, r4, 0\n\ + movs r1, 0x2D\n\ + bl GetMonData\n\ + cmp r0, 0\n\ + bne _0804AE10\n\ + ldr r0, =gBattleTypeFlags\n\ + ldr r0, [r0]\n\ + movs r1, 0x80\n\ + lsls r1, 11\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _0804AE02\n\ + ldr r0, =gBattleStruct\n\ + ldr r0, [r0]\n\ + ldr r1, =0x000002a1\n\ + adds r0, r1\n\ + ldrb r1, [r0]\n\ + ldr r2, =gBitTable\n\ + lsls r0, r5, 2\n\ + adds r0, r2\n\ + ldr r0, [r0]\n\ + ands r1, r0\n\ + cmp r1, 0\n\ + bne _0804AE10\n\ + _0804AE02:\n\ + adds r0, r4, 0\n\ + movs r1, 0x39\n\ + bl GetMonData\n\ + adds r0, r6, r0\n\ + lsls r0, 16\n\ + lsrs r6, r0, 16\n\ + _0804AE10:\n\ + adds r5, 0x1\n\ + cmp r5, 0x5\n\ + ble _0804ADBA\n\ + ldr r2, =gBattleOutcome\n\ + cmp r6, 0\n\ + bne _0804AE24\n\ + ldrb r0, [r2]\n\ + movs r1, 0x1\n\ + orrs r0, r1\n\ + strb r0, [r2]\n\ + _0804AE24:\n\ + ldrb r0, [r2]\n\ + cmp r0, 0\n\ + bne _0804AF1A\n\ + ldr r0, =gBattleTypeFlags\n\ + ldr r1, [r0]\n\ + ldr r2, =0x02000002\n\ + ands r1, r2\n\ + mov r8, r0\n\ + cmp r1, 0\n\ + beq _0804AF1A\n\ + movs r3, 0\n\ + movs r5, 0\n\ + ldr r0, =gNoOfAllBanks\n\ + ldrb r1, [r0]\n\ + mov r12, r0\n\ + ldr r7, =gBattlescriptCurrInstr\n\ + cmp r3, r1\n\ + bge _0804AE70\n\ + ldr r0, =gHitMarker\n\ + movs r6, 0x80\n\ + lsls r6, 21\n\ + ldr r4, [r0]\n\ + adds r2, r1, 0\n\ + ldr r1, =gSpecialStatuses\n\ + _0804AE54:\n\ + adds r0, r6, 0\n\ + lsls r0, r5\n\ + ands r0, r4\n\ + cmp r0, 0\n\ + beq _0804AE68\n\ + ldrb r0, [r1]\n\ + lsls r0, 25\n\ + cmp r0, 0\n\ + blt _0804AE68\n\ + adds r3, 0x1\n\ + _0804AE68:\n\ + adds r1, 0x28\n\ + adds r5, 0x2\n\ + cmp r5, r2\n\ + blt _0804AE54\n\ + _0804AE70:\n\ + movs r2, 0\n\ + movs r5, 0x1\n\ + mov r4, r12\n\ + ldrb r1, [r4]\n\ + cmp r5, r1\n\ + bge _0804AEAA\n\ + ldr r0, =gHitMarker\n\ + movs r4, 0x80\n\ + lsls r4, 21\n\ + mov r12, r4\n\ + ldr r6, [r0]\n\ + ldr r0, =gSpecialStatuses\n\ + adds r4, r1, 0\n\ + adds r1, r0, 0\n\ + adds r1, 0x14\n\ + _0804AE8E:\n\ + mov r0, r12\n\ + lsls r0, r5\n\ + ands r0, r6\n\ + cmp r0, 0\n\ + beq _0804AEA2\n\ + ldrb r0, [r1]\n\ + lsls r0, 25\n\ + cmp r0, 0\n\ + blt _0804AEA2\n\ + adds r2, 0x1\n\ + _0804AEA2:\n\ + adds r1, 0x28\n\ + adds r5, 0x2\n\ + cmp r5, r4\n\ + blt _0804AE8E\n\ + _0804AEAA:\n\ + mov r1, r8\n\ + ldr r0, [r1]\n\ + movs r1, 0x40\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _0804AEF0\n\ + adds r0, r2, r3\n\ + cmp r0, 0x1\n\ + bgt _0804AEF8\n\ + b _0804AF12\n\ + .pool\n\ + _0804AEF0:\n\ + cmp r2, 0\n\ + beq _0804AF12\n\ + cmp r3, 0\n\ + beq _0804AF12\n\ + _0804AEF8:\n\ + ldr r2, [r7]\n\ + ldrb r1, [r2, 0x1]\n\ + ldrb r0, [r2, 0x2]\n\ + lsls r0, 8\n\ + adds r1, r0\n\ + ldrb r0, [r2, 0x3]\n\ + lsls r0, 16\n\ + adds r1, r0\n\ + ldrb r0, [r2, 0x4]\n\ + lsls r0, 24\n\ + adds r1, r0\n\ + str r1, [r7]\n\ + b _0804AF22\n\ + _0804AF12:\n\ + ldr r0, [r7]\n\ + adds r0, 0x5\n\ + str r0, [r7]\n\ + b _0804AF22\n\ + _0804AF1A:\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, [r1]\n\ + adds r0, 0x5\n\ + str r0, [r1]\n\ + _0804AF22:\n\ + pop {r3}\n\ + mov r8, r3\n\ + pop {r4-r7}\n\ + pop {r0}\n\ + bx r0\n\ + .pool\n\ + .syntax divided"); +} + +#endif // NONMATCHING + +void MoveValuesCleanUp(void) +{ + gBattleMoveFlags = 0; + gBattleScripting.dmgMultiplier = 1; + gCritMultiplier = 1; + gBattleCommunication[MOVE_EFFECT_BYTE] = 0; + gBattleCommunication[6] = 0; + gHitMarker &= ~(HITMARKER_DESTINYBOND); + gHitMarker &= ~(HITMARKER_SYNCHRONISE_EFFECT); +} + +void atk25_move_values_cleanup(void) +{ + MoveValuesCleanUp(); + gBattlescriptCurrInstr += 1; +} + +void atk26_set_multihit(void) +{ + gMultiHitCounter = BSScriptRead8(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr += 2; +} + +void atk27_decrement_multihit(void) +{ + if (--gMultiHitCounter == 0) + gBattlescriptCurrInstr += 5; + else + gBattlescriptCurrInstr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); +} + +void atk28_goto(void) +{ + gBattlescriptCurrInstr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); +} + +void atk29_jumpifbyte(void) +{ + u8 caseID = BSScriptRead8(gBattlescriptCurrInstr + 1); + const u8* memByte = BS2ScriptReadPtr(gBattlescriptCurrInstr + 2); + u8 value = BSScriptRead8(gBattlescriptCurrInstr + 6); + const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 7); + + gBattlescriptCurrInstr += 11; + + switch (caseID) + { + case CMP_EQUAL: + if (*memByte == value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_NOT_EQUAL: + if (*memByte != value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_GREATER_THAN: + if (*memByte > value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_LESS_THAN: + if (*memByte < value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_COMMON_BITS: + if (*memByte & value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_NO_COMMON_BITS: + if (!(*memByte & value)) + gBattlescriptCurrInstr = jumpPtr; + break; + } +} + +void atk2A_jumpifhalfword(void) +{ + u8 caseID = BSScriptRead8(gBattlescriptCurrInstr + 1); + const u16* memHword = BS2ScriptReadPtr(gBattlescriptCurrInstr + 2); + u16 value = BS2ScriptRead16(gBattlescriptCurrInstr + 6); + const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 8); + + gBattlescriptCurrInstr += 12; + + switch (caseID) + { + case CMP_EQUAL: + if (*memHword == value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_NOT_EQUAL: + if (*memHword != value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_GREATER_THAN: + if (*memHword > value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_LESS_THAN: + if (*memHword < value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_COMMON_BITS: + if (*memHword & value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_NO_COMMON_BITS: + if (!(*memHword & value)) + gBattlescriptCurrInstr = jumpPtr; + break; + } +} + +void atk2B_jumpifword(void) +{ + u8 caseID = BSScriptRead8(gBattlescriptCurrInstr + 1); + const u32* memWord = BS2ScriptReadPtr(gBattlescriptCurrInstr + 2); + u32 value = BSScriptRead32(gBattlescriptCurrInstr + 6); + const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 10); + + gBattlescriptCurrInstr += 14; + + switch (caseID) + { + case CMP_EQUAL: + if (*memWord == value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_NOT_EQUAL: + if (*memWord != value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_GREATER_THAN: + if (*memWord > value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_LESS_THAN: + if (*memWord < value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_COMMON_BITS: + if (*memWord & value) + gBattlescriptCurrInstr = jumpPtr; + break; + case CMP_NO_COMMON_BITS: + if (!(*memWord & value)) + gBattlescriptCurrInstr = jumpPtr; + break; + } +} + +void atk2C_jumpifarrayequal(void) +{ + const u8* mem1 = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + const u8* mem2 = BS2ScriptReadPtr(gBattlescriptCurrInstr + 5); + u32 size = BSScriptRead8(gBattlescriptCurrInstr + 9); + const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 10); + + u8 i; + for (i = 0; i < size; i++) + { + if (*mem1 != *mem2) + { + gBattlescriptCurrInstr += 14; + break; + } + mem1++, mem2++; + } + + if (i == size) + gBattlescriptCurrInstr = jumpPtr; +} + +void atk2D_jumpifarraynotequal(void) +{ + u8 equalBytes = 0; + const u8* mem1 = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + const u8* mem2 = BS2ScriptReadPtr(gBattlescriptCurrInstr + 5); + u32 size = BSScriptRead8(gBattlescriptCurrInstr + 9); + const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 10); + + u8 i; + for (i = 0; i < size; i++) + { + if (*mem1 == *mem2) + { + equalBytes++; + } + mem1++, mem2++; + } + + if (equalBytes != size) + gBattlescriptCurrInstr = jumpPtr; + else + gBattlescriptCurrInstr += 14; +} + +void atk2E_setbyte(void) +{ + u8* memByte = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + *memByte = BSScriptRead8(gBattlescriptCurrInstr + 5); + + gBattlescriptCurrInstr += 6; +} + +void atk2F_addbyte(void) +{ + u8* memByte = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + *memByte += BSScriptRead8(gBattlescriptCurrInstr + 5); + gBattlescriptCurrInstr += 6; +} + +void atk30_subbyte(void) +{ + u8* memByte = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + *memByte -= BSScriptRead8(gBattlescriptCurrInstr + 5); + gBattlescriptCurrInstr += 6; +} + +void atk31_copyarray(void) +{ + u8* dest = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + const u8* src = BS2ScriptReadPtr(gBattlescriptCurrInstr + 5); + s32 size = BSScriptRead8(gBattlescriptCurrInstr + 9); + + s32 i; + for (i = 0; i < size; i++) + { + dest[i] = src[i]; + } + + gBattlescriptCurrInstr += 10; +} + +void atk32_copyarray_withindex(void) +{ + u8* dest = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + const u8* src = BS2ScriptReadPtr(gBattlescriptCurrInstr + 5); + const u8* index = BS2ScriptReadPtr(gBattlescriptCurrInstr + 9); + s32 size = BSScriptRead8(gBattlescriptCurrInstr + 13); + + s32 i; + for (i = 0; i < size; i++) + { + dest[i] = src[i + *index]; + } + + gBattlescriptCurrInstr += 14; +} + +void atk33_orbyte(void) +{ + u8* memByte = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + *memByte |= BSScriptRead8(gBattlescriptCurrInstr + 5); + gBattlescriptCurrInstr += 6; +} + +void atk34_orhalfword(void) +{ + u16* memHword = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + u16 val = BS2ScriptRead16(gBattlescriptCurrInstr + 5); + + *memHword |= val; + gBattlescriptCurrInstr += 7; +} + +void atk35_orword(void) +{ + u32* memWord = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + u32 val = BS2ScriptRead32(gBattlescriptCurrInstr + 5); + + *memWord |= val; + gBattlescriptCurrInstr += 9; +} + +void atk36_bicbyte(void) +{ + u8* memByte = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + *memByte &= ~(BSScriptRead8(gBattlescriptCurrInstr + 5)); + gBattlescriptCurrInstr += 6; +} + +void atk37_bichalfword(void) +{ + u16* memHword = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + u16 val = BS2ScriptRead16(gBattlescriptCurrInstr + 5); + + *memHword &= ~val; + gBattlescriptCurrInstr += 7; +} + +void atk38_bicword(void) +{ + u32* memWord = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); + u32 val = BS2ScriptRead32(gBattlescriptCurrInstr + 5); + + *memWord &= ~val; + gBattlescriptCurrInstr += 9; +} + +void atk39_pause(void) +{ + if (gBattleExecBuffer == 0) + { + u16 value = BS2ScriptRead16(gBattlescriptCurrInstr + 1); + if (++gPauseCounterBattle >= value) + { + gPauseCounterBattle = 0; + gBattlescriptCurrInstr += 3; + } + } +} + +void atk3A_waitstate(void) +{ + if (gBattleExecBuffer == 0) + gBattlescriptCurrInstr++; +} + +void atk3B_healthbar_update(void) +{ + if (BSScriptRead8(gBattlescriptCurrInstr + 1) == BS_GET_TARGET) + gActiveBank = gBankTarget; + else + gActiveBank = gBankAttacker; + + EmitHealthBarUpdate(0, gBattleMoveDamage); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr += 2; +} + +void atk3C_return(void) +{ + BattleScriptPop(); +} + +void atk3D_end(void) +{ + if (gBattleTypeFlags & BATTLE_TYPE_ARENA) + sub_81A5718(gBankAttacker); + + gBattleMoveFlags = 0; + gActiveBank = 0; + gFightStateTracker = 0xB; +} + +void atk3E_end2(void) +{ + gActiveBank = 0; + gFightStateTracker = 0xB; +} + +void atk3F_end3(void) // pops the main function stack +{ + BattleScriptPop(); + if (BATTLE_CALLBACKS_STACK->size) + BATTLE_CALLBACKS_STACK->size--; + gBattleMainFunc = BATTLE_CALLBACKS_STACK->function[BATTLE_CALLBACKS_STACK->size]; +} + +void atk41_call(void) +{ + BattleScriptPush(gBattlescriptCurrInstr + 5); + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); +} + +void atk42_jumpiftype2(void) +{ + u8 bank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + if (BSScriptRead8(gBattlescriptCurrInstr + 2) == gBattleMons[bank].type1 || BSScriptRead8(gBattlescriptCurrInstr + 2) == gBattleMons[bank].type2) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 3); + else + gBattlescriptCurrInstr += 7; +} + +void atk43_jumpifabilitypresent(void) +{ + if (AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, BSScriptRead8(gBattlescriptCurrInstr + 1), 0, 0)) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); + else + gBattlescriptCurrInstr += 6; +} + +void atk44(void) +{ + *(gBankAttacker + gBattleStruct->field_54) = 1; +} + +void atk45_playanimation(void) +{ + const u16* argumentPtr; + + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + argumentPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 3); + + if (gBattlescriptCurrInstr[2] == B_ANIM_STATS_CHANGE + || gBattlescriptCurrInstr[2] == B_ANIM_SNATCH_MOVE + || gBattlescriptCurrInstr[2] == B_ANIM_SUBSTITUTE_FADE) + { + EmitBattleAnimation(0, gBattlescriptCurrInstr[2], *argumentPtr); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr += 7; + } + else if (gHitMarker & HITMARKER_NO_ANIMATIONS) + { + BattleScriptPush(gBattlescriptCurrInstr + 7); + gBattlescriptCurrInstr = BattleScript_Pausex20; + } + else if (gBattlescriptCurrInstr[2] == B_ANIM_RAIN_CONTINUES + || gBattlescriptCurrInstr[2] == B_ANIM_SUN_CONTINUES + || gBattlescriptCurrInstr[2] == B_ANIM_SANDSTORM_CONTINUES + || gBattlescriptCurrInstr[2] == B_ANIM_HAIL_CONTINUES) + { + EmitBattleAnimation(0, gBattlescriptCurrInstr[2], *argumentPtr); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr += 7; + } + else if (gStatuses3[gActiveBank] & STATUS3_SEMI_INVULNERABLE) + { + gBattlescriptCurrInstr += 7; + } + else + { + EmitBattleAnimation(0, gBattlescriptCurrInstr[2], *argumentPtr); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr += 7; + } +} + +void atk46_playanimation2(void) // animation Id is stored in the first pointer +{ + const u16* argumentPtr; + const u8* animationIdPtr; + + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + animationIdPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 2); + argumentPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 6); + + if (*animationIdPtr == B_ANIM_STATS_CHANGE + || *animationIdPtr == B_ANIM_SNATCH_MOVE + || *animationIdPtr == B_ANIM_SUBSTITUTE_FADE) + { + EmitBattleAnimation(0, *animationIdPtr, *argumentPtr); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr += 10; + } + else if (gHitMarker & HITMARKER_NO_ANIMATIONS) + { + gBattlescriptCurrInstr += 10; + } + else if (*animationIdPtr == B_ANIM_RAIN_CONTINUES + || *animationIdPtr == B_ANIM_SUN_CONTINUES + || *animationIdPtr == B_ANIM_SANDSTORM_CONTINUES + || *animationIdPtr == B_ANIM_HAIL_CONTINUES) + { + EmitBattleAnimation(0, *animationIdPtr, *argumentPtr); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr += 10; + } + else if (gStatuses3[gActiveBank] & STATUS3_SEMI_INVULNERABLE) + { + gBattlescriptCurrInstr += 10; + } + else + { + EmitBattleAnimation(0, *animationIdPtr, *argumentPtr); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr += 10; + } +} + +void atk47_setgraphicalstatchangevalues(void) +{ + u8 value = 0; + switch (gBattleScripting.statChanger & 0xF0) + { + case 0x10: // +1 + value = 0xF; + break; + case 0x20: // +2 + value = 0x27; + break; + case 0x90: // -1 + value = 0x16; + break; + case 0xA0: // -2 + value = 0x2E; + break; + } + gBattleScripting.animArg1 = (gBattleScripting.statChanger & 0xF) + value - 1; + gBattleScripting.animArg2 = 0; + gBattlescriptCurrInstr++; +} + +void atk48_playstatchangeanimation(void) +{ + s32 currStat = 0; + s16 statAnimId = 0; + s32 checkingStatAnimId = 0; + s32 changeableStats = 0; + u32 statsToCheck = 0; + + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + statsToCheck = BSScriptRead8(gBattlescriptCurrInstr + 2); + + if (gBattlescriptCurrInstr[3] & 1) // goes down + { + for (checkingStatAnimId = (gBattlescriptCurrInstr[3] & 0x2) ? 0x2D : 0x15; + statsToCheck != 0; + statsToCheck >>= 1, checkingStatAnimId += 1, currStat++) + { + if (!(statsToCheck & 1)) + continue; + if (!(gBattlescriptCurrInstr[3] & 8)) + { + if (gBattleMons[gActiveBank].statStages[currStat] > 0) + { + statAnimId = checkingStatAnimId; + changeableStats++; + } + } + else if (!gSideTimers[GET_BANK_SIDE(gActiveBank)].mistTimer + && gBattleMons[gActiveBank].ability != ABILITY_CLEAR_BODY + && gBattleMons[gActiveBank].ability != ABILITY_WHITE_SMOKE + && !(gBattleMons[gActiveBank].ability == ABILITY_KEEN_EYE && currStat == STAT_STAGE_ACC) + && !(gBattleMons[gActiveBank].ability == ABILITY_HYPER_CUTTER && currStat == STAT_STAGE_ATK)) + { + if (gBattleMons[gActiveBank].statStages[currStat] > 0) + { + statAnimId = checkingStatAnimId; + changeableStats++; + } + } + } + + if (changeableStats > 1) // more than one stat, so the color is gray + { + if (gBattlescriptCurrInstr[3] & 2) + statAnimId = 0x3A; + else + statAnimId = 0x39; + } + } + else // goes up + { + for (checkingStatAnimId = (gBattlescriptCurrInstr[3] & 0x2) ? 0x26 : 0xE; + statsToCheck != 0; + statsToCheck >>= 1, checkingStatAnimId += 1, currStat++) + { + if (statsToCheck & 1 && gBattleMons[gActiveBank].statStages[currStat] < 0xC) + { + statAnimId = checkingStatAnimId; + changeableStats++; + } + } + + if (changeableStats > 1) // more than one stat, so the color is gray + { + if (gBattlescriptCurrInstr[3] & 2) + statAnimId = 0x38; + else + statAnimId = 0x37; + } + } + + if (gBattlescriptCurrInstr[3] & 4 && changeableStats < 2) + { + gBattlescriptCurrInstr += 4; + } + else if (changeableStats != 0 && gBattleScripting.field_1B == 0) + { + EmitBattleAnimation(0, B_ANIM_STATS_CHANGE, statAnimId); + MarkBufferBankForExecution(gActiveBank); + if (gBattlescriptCurrInstr[3] & 4 && changeableStats > 1) + gBattleScripting.field_1B = 1; + gBattlescriptCurrInstr += 4; + } + else + { + gBattlescriptCurrInstr += 4; + } +} diff --git a/sym_common.txt b/sym_common.txt index 23809c1a7..834f23918 100644 --- a/sym_common.txt +++ b/sym_common.txt @@ -218,7 +218,7 @@ gUnknown_03005D3A: @ 3005D3A gUnknown_03005D46: @ 3005D46 .space 0xE -gUnknown_03005D54: @ 3005D54 +gLeveledUpInBattle: @ 3005D54 .space 0xC gBattleBankFunc: @ 3005D60 diff --git a/sym_ewram.txt b/sym_ewram.txt index e1238a0cf..616b1ca80 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -475,13 +475,13 @@ gWishFutureKnock: @ 20243D0 gUnknown_020243FC: @ 20243FC .space 0x2 -gUnknown_020243FE: @ 20243FE +gSentPokesToOpponent: @ 20243FE .space 0x2 gDynamicBasePower: @ 2024400 .space 0x2 -gUnknown_02024402: @ 2024402 +gExpShareExp: @ 2024402 .space 0x2 gEnigmaBerries: @ 2024404 From fc57c6c817bcb8bed4469b5114ced17129bdca81 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 23 Sep 2017 00:06:52 +0200 Subject: [PATCH 273/342] atk 48 is really troublesome --- include/battle.h | 5 ++++ src/battle_4.c | 67 ++++++++++++++++++++++++------------------------ 2 files changed, 39 insertions(+), 33 deletions(-) diff --git a/include/battle.h b/include/battle.h index 920a60060..957e3542b 100644 --- a/include/battle.h +++ b/include/battle.h @@ -784,6 +784,11 @@ extern struct BattleStruct* gBattleStruct; #define B_ANIM_x1C 0x1C #define B_ANIM_x1D 0x1D +#define ATK48_STAT_NEGATIVE 0x1 +#define ATK48_STAT_BY_TWO 0x2 +#define ATK48_BIT_x4 0x4 +#define ATK48_LOWER_FAIL_CHECK 0x8 + #define GET_STAT_BUFF_ID(n)((n & 0xF)) // first four bits 0x1, 0x2, 0x4, 0x8 #define GET_STAT_BUFF_VALUE(n)((n & 0xF0) >> 4) // 0x10, 0x20, 0x40 #define STAT_BUFF_NEGATIVE 0x80 // 0x80, the sign bit diff --git a/src/battle_4.c b/src/battle_4.c index 8e0be22c2..ec84d1a5c 100644 --- a/src/battle_4.c +++ b/src/battle_4.c @@ -4271,48 +4271,49 @@ void atk47_setgraphicalstatchangevalues(void) void atk48_playstatchangeanimation(void) { - s32 currStat = 0; + u32 currStat = 0; s16 statAnimId = 0; - s32 checkingStatAnimId = 0; + s16 checkingStatAnimId = 0; s32 changeableStats = 0; u32 statsToCheck = 0; - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); - statsToCheck = BSScriptRead8(gBattlescriptCurrInstr + 2); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); + statsToCheck = gBattlescriptCurrInstr[2]; - if (gBattlescriptCurrInstr[3] & 1) // goes down + if (gBattlescriptCurrInstr[3] & ATK48_STAT_NEGATIVE) // goes down { - for (checkingStatAnimId = (gBattlescriptCurrInstr[3] & 0x2) ? 0x2D : 0x15; - statsToCheck != 0; - statsToCheck >>= 1, checkingStatAnimId += 1, currStat++) + checkingStatAnimId = (gBattlescriptCurrInstr[3] & ATK48_STAT_BY_TWO) ? 0x2D : 0x15; + while (statsToCheck != 0) { - if (!(statsToCheck & 1)) - continue; - if (!(gBattlescriptCurrInstr[3] & 8)) + if (statsToCheck & 1) { - if (gBattleMons[gActiveBank].statStages[currStat] > 0) + if (!(gBattlescriptCurrInstr[3] & ATK48_LOWER_FAIL_CHECK)) { - statAnimId = checkingStatAnimId; - changeableStats++; - } - } - else if (!gSideTimers[GET_BANK_SIDE(gActiveBank)].mistTimer - && gBattleMons[gActiveBank].ability != ABILITY_CLEAR_BODY - && gBattleMons[gActiveBank].ability != ABILITY_WHITE_SMOKE - && !(gBattleMons[gActiveBank].ability == ABILITY_KEEN_EYE && currStat == STAT_STAGE_ACC) - && !(gBattleMons[gActiveBank].ability == ABILITY_HYPER_CUTTER && currStat == STAT_STAGE_ATK)) - { - if (gBattleMons[gActiveBank].statStages[currStat] > 0) - { - statAnimId = checkingStatAnimId; - changeableStats++; + if (gBattleMons[gActiveBank].statStages[currStat] > 0) + { + statAnimId = checkingStatAnimId; + changeableStats++; + } + } + else if (!gSideTimers[GET_BANK_SIDE(gActiveBank)].mistTimer + && gBattleMons[gActiveBank].ability != ABILITY_CLEAR_BODY + && gBattleMons[gActiveBank].ability != ABILITY_WHITE_SMOKE + && !(gBattleMons[gActiveBank].ability == ABILITY_KEEN_EYE && currStat == STAT_STAGE_ACC) + && !(gBattleMons[gActiveBank].ability == ABILITY_HYPER_CUTTER && currStat == STAT_STAGE_ATK)) + { + if (gBattleMons[gActiveBank].statStages[currStat] > 0) + { + statAnimId = checkingStatAnimId; + changeableStats++; + } } } + statsToCheck >>= 1, checkingStatAnimId++, currStat++; } if (changeableStats > 1) // more than one stat, so the color is gray { - if (gBattlescriptCurrInstr[3] & 2) + if (gBattlescriptCurrInstr[3] & ATK48_STAT_BY_TWO) statAnimId = 0x3A; else statAnimId = 0x39; @@ -4320,27 +4321,27 @@ void atk48_playstatchangeanimation(void) } else // goes up { - for (checkingStatAnimId = (gBattlescriptCurrInstr[3] & 0x2) ? 0x26 : 0xE; - statsToCheck != 0; - statsToCheck >>= 1, checkingStatAnimId += 1, currStat++) + checkingStatAnimId = (gBattlescriptCurrInstr[3] & ATK48_STAT_BY_TWO) ? 0x26 : 0xE; + while (statsToCheck != 0) { if (statsToCheck & 1 && gBattleMons[gActiveBank].statStages[currStat] < 0xC) { statAnimId = checkingStatAnimId; changeableStats++; } + statsToCheck >>= 1, checkingStatAnimId += 1, currStat++; } if (changeableStats > 1) // more than one stat, so the color is gray { - if (gBattlescriptCurrInstr[3] & 2) + if (gBattlescriptCurrInstr[3] & ATK48_STAT_BY_TWO) statAnimId = 0x38; else statAnimId = 0x37; } } - if (gBattlescriptCurrInstr[3] & 4 && changeableStats < 2) + if (gBattlescriptCurrInstr[3] & ATK48_BIT_x4 && changeableStats < 2) { gBattlescriptCurrInstr += 4; } @@ -4348,7 +4349,7 @@ void atk48_playstatchangeanimation(void) { EmitBattleAnimation(0, B_ANIM_STATS_CHANGE, statAnimId); MarkBufferBankForExecution(gActiveBank); - if (gBattlescriptCurrInstr[3] & 4 && changeableStats > 1) + if (gBattlescriptCurrInstr[3] & ATK48_BIT_x4 && changeableStats > 1) gBattleScripting.field_1B = 1; gBattlescriptCurrInstr += 4; } From 21f668d6a574dd7df4d761148c6f02ee4cdda6f1 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 23 Sep 2017 00:13:11 +0200 Subject: [PATCH 274/342] add things git ate --- data/data3_a0_B.s | 10 +++++++++- data/field_map_obj.s | 8 ++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/data/data3_a0_B.s b/data/data3_a0_B.s index d28daf39b..75279e607 100644 --- a/data/data3_a0_B.s +++ b/data/data3_a0_B.s @@ -63,7 +63,15 @@ gUnknown_0850E84A:: @ 850E84A .incbin "baserom.gba", 0x50e84a, 0x6 gUnknown_0850E850:: @ 850E850 - .incbin "baserom.gba", 0x50e850, 0x2c + .incbin "baserom.gba", 0x50e850, 0x4 +gUnknown_0850E854:: + .incbin "baserom.gba", 0x50e854, 0x8 +gUnknown_0850E85C:: + .incbin "baserom.gba", 0x50e85C, 0x8 +gUnknown_0850E864:: + .incbin "baserom.gba", 0x50e864, 0xc +gUnknown_0850E870:: + .incbin "baserom.gba", 0x50e870, 0xc gUnknown_0850E87C:: @ 850E87C .incbin "baserom.gba", 0x50e87c, 0x1680 diff --git a/data/field_map_obj.s b/data/field_map_obj.s index 3509e3c4f..52b39f932 100644 --- a/data/field_map_obj.s +++ b/data/field_map_obj.s @@ -1268,16 +1268,16 @@ gUnknown_0850DC50:: @ 850DC50 .4byte gUnknown_0850DF08 .4byte gUnknown_0850DF14 .4byte gUnknown_0850DF20 -.4byte 0x850E854 @ FIX ME: ADD LABEL -.4byte 0x850E85C @ FIX ME: ADD LABEL +.4byte gUnknown_0850E854 +.4byte gUnknown_0850E85C .4byte gUnknown_0850E3A0 .4byte gUnknown_0850E3AC .4byte gUnknown_0850E5C4 .4byte gUnknown_0850E5CC .4byte gUnknown_0850E5D4 .4byte gUnknown_0850E468 -.4byte 0x850E864 @ FIX ME: ADD LABEL -.4byte 0x850E870 @ FIX ME: ADD LABEL +.4byte gUnknown_0850E864 +.4byte gUnknown_0850E870 gUnknown_0850DEC8:: @ 850DEC8 .4byte sub_8093950 From 55348b0771b5017eb4c8275a773eeb7ee7e0121e Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 22 Sep 2017 21:07:12 -0400 Subject: [PATCH 275/342] correct gitattributes assignment of languages. --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitattributes b/.gitattributes index 18a043001..96c1c1231 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12,3 +12,6 @@ Makefile text eol=lf *.png binary *.bin binary + +*.h linguist-language=C +*.inc linguist-language=Assembly From 561d60342f7ec39f03671ce37ab4f0ab8d0244c6 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 22 Sep 2017 21:18:53 -0400 Subject: [PATCH 276/342] Decompile data --- data/unk_text_util_2.s | 11 ----------- ld_script.txt | 2 +- src/unk_text_util_2.c | 4 ++-- 3 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 data/unk_text_util_2.s diff --git a/data/unk_text_util_2.s b/data/unk_text_util_2.s deleted file mode 100644 index 69f227ea2..000000000 --- a/data/unk_text_util_2.s +++ /dev/null @@ -1,11 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -gUnknown_08616124:: @ 8616124 - .incbin "baserom.gba", 0x616124, 0x4 - - .align 2 -gFont6BrailleGlyphs:: @ 8616128 - .incbin "data/graphics/fonts/font6.fwjpnfont" diff --git a/ld_script.txt b/ld_script.txt index 136c198dc..1ad681e36 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -389,7 +389,7 @@ SECTIONS { data/item_icon.o(.rodata); data/party_menu.o(.rodata); data/battle_tent.o(.rodata); - data/unk_text_util_2.o(.rodata); + src/unk_text_util_2.o(.rodata); data/unk_81BAD84.o(.rodata); data/battle_controller_player_partner.o(.rodata); data/fossil_special_fldeff_groundshake.o(.rodata); diff --git a/src/unk_text_util_2.c b/src/unk_text_util_2.c index d9bd9d98d..d88af611f 100644 --- a/src/unk_text_util_2.c +++ b/src/unk_text_util_2.c @@ -4,8 +4,8 @@ #include "text.h" #include "sound.h" -extern const u8 gUnknown_08616124[]; -extern const u16 gFont6BrailleGlyphs[]; +static const u8 gUnknown_08616124[] = {1, 2, 4}; +static const u16 gFont6BrailleGlyphs[] = INCBIN_U16("data/graphics/fonts/font6.fwjpnfont"); static void DecompressGlyphFont6(u16); From 4cf115000289d10de3408e752b37128446dd261c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 22 Sep 2017 21:26:37 -0400 Subject: [PATCH 277/342] clion pls --- include/text.h | 32 +++++++++++++++++--------------- src/text.c | 2 +- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/include/text.h b/include/text.h index a7a79da7a..fc8ffa82f 100644 --- a/include/text.h +++ b/include/text.h @@ -94,23 +94,25 @@ struct TextPrinterSubStruct u8 active; }; +struct TextSubPrinter { // TODO: Better name + u8* current_text_offset; + u8 windowId; + u8 fontId; + u8 x; + u8 y; + u8 currentX; // 0x8 + u8 currentY; + u8 letterSpacing; + u8 lineSpacing; + u8 fontColor_l:4; // 0xC + u8 fontColor_h:4; + u8 bgColor:4; + u8 shadowColor:4; +}; + struct TextPrinter { - struct TextSubPrinter { // TODO: Better name - u8* current_text_offset; - u8 windowId; - u8 fontId; - u8 x; - u8 y; - u8 currentX; // 0x8 - u8 currentY; - u8 letterSpacing; - u8 lineSpacing; - u8 fontColor_l:4; // 0xC - u8 fontColor_h:4; - u8 bgColor:4; - u8 shadowColor:4; - } subPrinter; + struct TextSubPrinter subPrinter; void (*callback)(struct TextSubPrinter *, u16); // 0x10 diff --git a/src/text.c b/src/text.c index fe1c5df24..90c069293 100644 --- a/src/text.c +++ b/src/text.c @@ -1,9 +1,9 @@ #include "global.h" -#include "text.h" #include "main.h" #include "palette.h" #include "string_util.h" #include "window.h" +#include "text.h" extern void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue); extern void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height); From 244842618352ec090234bd63a0878f47459ea4a3 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 22 Sep 2017 22:45:47 -0400 Subject: [PATCH 278/342] decompile field_special_scene.c --- asm/field_control_avatar.s | 2 +- asm/porthole.s | 282 ------------------ asm/region_map.s | 2 +- asm/rom4.s | 2 +- asm/rom6.s | 12 +- asm/truck_scene.s | 589 ------------------------------------- data/data3b.s | 2 +- include/field_map_obj.h | 2 + ld_script.txt | 3 +- src/field_special_scene.c | 365 +++++++++++++++++++++++ 10 files changed, 378 insertions(+), 883 deletions(-) delete mode 100644 asm/porthole.s delete mode 100644 asm/truck_scene.s create mode 100755 src/field_special_scene.c diff --git a/asm/field_control_avatar.s b/asm/field_control_avatar.s index 5c515ae3d..46983f325 100644 --- a/asm/field_control_avatar.s +++ b/asm/field_control_avatar.s @@ -1467,7 +1467,7 @@ _0809CAF8: cmp r0, 0x1 beq _0809CB28 movs r0, 0x1 - bl sub_8137FC0 + bl CountSSTidalStep cmp r0, 0x1 bne _0809CB1C ldr r0, =gUnknown_0823C050 diff --git a/asm/porthole.s b/asm/porthole.s deleted file mode 100644 index 282f6f584..000000000 --- a/asm/porthole.s +++ /dev/null @@ -1,282 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_80FB59C -sub_80FB59C: @ 80FB59C - push {r4-r6,lr} - sub sp, 0xC - mov r4, sp - adds r4, 0x5 - mov r5, sp - adds r5, 0x6 - add r6, sp, 0x8 - add r0, sp, 0x4 - adds r1, r4, 0 - adds r2, r5, 0 - adds r3, r6, 0 - bl sub_8137FFC - lsls r0, 24 - cmp r0, 0 - bne _080FB5DE - add r0, sp, 0x4 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - movs r1, 0 - ldrsb r1, [r4, r1] - movs r2, 0x1 - negs r2, r2 - movs r3, 0 - ldrsb r3, [r5, r3] - movs r4, 0 - ldrsb r4, [r6, r4] - str r4, [sp] - bl warp1_set - movs r0, 0x1 - b _080FB5E0 -_080FB5DE: - movs r0, 0 -_080FB5E0: - add sp, 0xC - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_80FB59C - - thumb_func_start sub_80FB5E8 -sub_80FB5E8: @ 80FB5E8 - push {r4-r7,lr} - lsls r0, 24 - lsrs r5, r0, 24 - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - ldr r1, =gTasks + 0x8 - adds r4, r0, r1 - ldr r0, =0x000040b4 - bl GetVarPointer - adds r7, r0, 0 - ldr r0, =gSaveBlock1Ptr - ldr r3, [r0] - adds r6, r3, 0x4 - movs r0, 0 - ldrsh r2, [r4, r0] - cmp r2, 0x1 - beq _080FB648 - cmp r2, 0x1 - bgt _080FB624 - cmp r2, 0 - beq _080FB62E - b _080FB6E2 - .pool -_080FB624: - cmp r2, 0x2 - beq _080FB68A - cmp r2, 0x3 - beq _080FB6C4 - b _080FB6E2 -_080FB62E: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _080FB6E2 - strh r2, [r4, 0x2] - movs r0, 0x2 - strh r0, [r4] - b _080FB6E2 - .pool -_080FB648: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - adds r0, r2, 0 - ands r0, r1 - cmp r0, 0 - beq _080FB656 - strh r2, [r4, 0x2] -_080FB656: - ldrb r1, [r6, 0x1] - ldrb r2, [r3, 0x4] - movs r0, 0xFF - bl sub_80D3340 - lsls r0, 24 - cmp r0, 0 - beq _080FB6E2 - movs r0, 0x1 - bl sub_8137FC0 - cmp r0, 0x1 - bne _080FB686 - ldrh r0, [r7] - cmp r0, 0x2 - bne _080FB680 - movs r0, 0x9 - b _080FB682 - .pool -_080FB680: - movs r0, 0xA -_080FB682: - strh r0, [r7] - b _080FB692 -_080FB686: - movs r0, 0x2 - strh r0, [r4] -_080FB68A: - movs r1, 0x2 - ldrsh r0, [r4, r1] - cmp r0, 0 - beq _080FB698 -_080FB692: - movs r0, 0x3 - strh r0, [r4] - b _080FB6E2 -_080FB698: - ldrh r0, [r7] - cmp r0, 0x2 - bne _080FB6AC - ldrb r1, [r6, 0x1] - ldrb r2, [r6] - ldr r3, =gUnknown_0858E8AB - b _080FB6B2 - .pool -_080FB6AC: - ldrb r1, [r6, 0x1] - ldrb r2, [r6] - ldr r3, =gUnknown_0858E8AD -_080FB6B2: - movs r0, 0xFF - bl exec_movement - movs r0, 0x1 - strh r0, [r4] - b _080FB6E2 - .pool -_080FB6C4: - ldr r0, =0x00004001 - bl FlagReset - movs r0, 0x80 - lsls r0, 7 - bl FlagReset - movs r0, 0 - bl copy_saved_warp2_bank_and_enter_x_to_warp1 - bl sp13E_warp_to_last_warp - adds r0, r5, 0 - bl DestroyTask -_080FB6E2: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80FB5E8 - - thumb_func_start sub_80FB6EC -sub_80FB6EC: @ 80FB6EC - push {r4,lr} - sub sp, 0x4 - ldr r1, =SpriteCallbackDummy - movs r0, 0 - str r0, [sp] - movs r0, 0x8C - movs r2, 0x70 - movs r3, 0x50 - bl AddPseudoFieldObject - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gSprites - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r4, r1, r2 - adds r2, r4, 0 - adds r2, 0x3E - ldrb r1, [r2] - movs r0, 0x3 - negs r0, r0 - ands r0, r1 - strb r0, [r2] - ldr r0, =0x000040b4 - bl VarGet - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0x2 - bne _080FB74C - movs r0, 0x4 - bl FieldObjectDirectionToImageAnimId - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r4, 0 - bl StartSpriteAnim - b _080FB75E - .pool -_080FB74C: - movs r0, 0x3 - bl FieldObjectDirectionToImageAnimId - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r4, 0 - bl StartSpriteAnim -_080FB75E: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80FB6EC - - thumb_func_start sub_80FB768 -sub_80FB768: @ 80FB768 - push {lr} - bl sub_80FB6EC - ldr r2, =gMapObjects - ldr r0, =gPlayerAvatar - ldrb r1, [r0, 0x5] - lsls r0, r1, 3 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0, 0x1] - movs r2, 0x20 - orrs r1, r2 - strb r1, [r0, 0x1] - bl pal_fill_black - ldr r0, =sub_80FB5E8 - movs r1, 0x50 - bl CreateTask - bl ScriptContext2_Enable - pop {r0} - bx r0 - .pool - thumb_func_end sub_80FB768 - - thumb_func_start sub_80FB7A4 -sub_80FB7A4: @ 80FB7A4 - push {lr} - ldr r0, =0x0000088d - bl FlagSet - ldr r0, =0x00004001 - bl FlagSet - movs r0, 0x80 - lsls r0, 7 - bl FlagSet - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - movs r1, 0x4 - ldrsb r1, [r0, r1] - movs r2, 0x5 - ldrsb r2, [r0, r2] - movs r3, 0x1 - negs r3, r3 - movs r0, 0 - bl saved_warp2_set - bl sub_80FB59C - bl sub_80AF8B8 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80FB7A4 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/region_map.s b/asm/region_map.s index 150b4893e..032bdf7a5 100644 --- a/asm/region_map.s +++ b/asm/region_map.s @@ -1939,7 +1939,7 @@ sub_8123C00: @ 8123C00 adds r1, r4, 0 adds r2, r5, 0 adds r3, r6, 0 - bl sub_8137FFC + bl GetSSTidalLocation lsls r0, 24 lsrs r0, 24 mov r10, r5 diff --git a/asm/rom4.s b/asm/rom4.s index a3125efc4..1887883d7 100644 --- a/asm/rom4.s +++ b/asm/rom4.s @@ -3175,7 +3175,7 @@ CB2_NewGame: @ 8085EF8 bl ScriptContext1_Init bl ScriptContext2_Disable ldr r1, =gUnknown_03005DAC - ldr r0, =sub_80FB4E0 + ldr r0, =ExecuteTruckSequence str r0, [r1] ldr r1, =gUnknown_03005DB0 movs r0, 0 diff --git a/asm/rom6.s b/asm/rom6.s index 4bad6e35d..e664a9666 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -5062,8 +5062,8 @@ sub_8137FB0: @ 8137FB0 .pool thumb_func_end sub_8137FB0 - thumb_func_start sub_8137FC0 -sub_8137FC0: @ 8137FC0 + thumb_func_start CountSSTidalStep +CountSSTidalStep: @ 8137FC0 push {r4,lr} lsls r0, 16 lsrs r4, r0, 16 @@ -5091,10 +5091,10 @@ _08137FF6: pop {r4} pop {r1} bx r1 - thumb_func_end sub_8137FC0 + thumb_func_end CountSSTidalStep - thumb_func_start sub_8137FFC -sub_8137FFC: @ 8137FFC + thumb_func_start GetSSTidalLocation +GetSSTidalLocation: @ 8137FFC push {r4-r7,lr} mov r7, r8 push {r7} @@ -5203,7 +5203,7 @@ _081380CE: pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_8137FFC + thumb_func_end GetSSTidalLocation thumb_func_start is_tile_that_overrides_player_control is_tile_that_overrides_player_control: @ 81380D8 diff --git a/asm/truck_scene.s b/asm/truck_scene.s deleted file mode 100644 index bc3388cb6..000000000 --- a/asm/truck_scene.s +++ /dev/null @@ -1,589 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_80FB0B0 -sub_80FB0B0: @ 80FB0B0 - push {r4,lr} - adds r4, r0, 0 - movs r1, 0x78 - bl __modsi3 - cmp r0, 0 - bne _080FB0C4 - movs r0, 0x1 - negs r0, r0 - b _080FB0D6 -_080FB0C4: - adds r0, r4, 0 - movs r1, 0xA - bl __modsi3 - cmp r0, 0x4 - ble _080FB0D4 - movs r0, 0 - b _080FB0D6 -_080FB0D4: - movs r0, 0x1 -_080FB0D6: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80FB0B0 - - thumb_func_start sub_80FB0DC -sub_80FB0DC: @ 80FB0DC - push {lr} - adds r0, 0x78 - movs r1, 0xB4 - bl __modsi3 - cmp r0, 0 - beq _080FB0EE - movs r0, 0 - b _080FB0F2 -_080FB0EE: - movs r0, 0x1 - negs r0, r0 -_080FB0F2: - pop {r1} - bx r1 - thumb_func_end sub_80FB0DC - - thumb_func_start sub_80FB0F8 -sub_80FB0F8: @ 80FB0F8 - push {r4,r5,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - ldr r0, =gTasks + 0x8 - adds r5, r1, r0 - movs r1, 0 - ldrsh r0, [r5, r1] - adds r0, 0x1E - bl sub_80FB0DC - ldr r4, =gSaveBlock1Ptr - ldr r2, [r4] - ldrb r1, [r2, 0x5] - ldrb r2, [r2, 0x4] - lsls r0, 18 - movs r3, 0xC0 - lsls r3, 10 - orrs r0, r3 - asrs r0, 16 - str r0, [sp] - movs r0, 0x1 - movs r3, 0x3 - bl sub_808E82C - movs r3, 0 - ldrsh r0, [r5, r3] - bl sub_80FB0DC - ldr r2, [r4] - ldrb r1, [r2, 0x5] - ldrb r2, [r2, 0x4] - lsls r0, 17 - ldr r3, =0xfffd0000 - adds r0, r3 - asrs r0, 16 - str r0, [sp] - movs r0, 0x2 - movs r3, 0 - bl sub_808E82C - movs r1, 0 - ldrsh r0, [r5, r1] - bl sub_80FB0DC - ldr r2, [r4] - ldrb r1, [r2, 0x5] - ldrb r2, [r2, 0x4] - movs r4, 0 - movs r3, 0x3 - negs r3, r3 - lsls r0, 18 - asrs r0, 16 - str r0, [sp] - movs r0, 0x3 - bl sub_808E82C - ldrh r0, [r5] - adds r0, 0x1 - strh r0, [r5] - lsls r0, 16 - ldr r1, =0x75300000 - cmp r0, r1 - bne _080FB180 - strh r4, [r5] -_080FB180: - movs r3, 0 - ldrsh r0, [r5, r3] - bl sub_80FB0B0 - adds r1, r0, 0 - lsls r1, 16 - asrs r1, 16 - movs r0, 0 - bl SetCameraPanning - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80FB0F8 - - thumb_func_start sub_80FB1AC -sub_80FB1AC: @ 80FB1AC - push {r4-r7,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r2, r0, 24 - lsls r0, r2, 2 - adds r0, r2 - lsls r3, r0, 3 - ldr r4, =gTasks + 0x8 - adds r7, r3, r4 - ldrh r1, [r7] - adds r1, 0x1 - strh r1, [r7] - ldrh r0, [r7, 0x4] - adds r0, 0x1 - strh r0, [r7, 0x4] - lsls r1, 16 - asrs r1, 16 - cmp r1, 0x5 - ble _080FB1DC - movs r0, 0 - strh r0, [r7] - ldrh r0, [r7, 0x2] - adds r0, 0x1 - strh r0, [r7, 0x2] -_080FB1DC: - ldrh r0, [r7, 0x2] - cmp r0, 0x13 - bne _080FB1F0 - adds r0, r2, 0 - bl DestroyTask - b _080FB2A8 - .pool -_080FB1F0: - ldr r2, =gUnknown_0858E898 - movs r1, 0x2 - ldrsh r0, [r7, r1] - adds r0, r2 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - cmp r0, 0x2 - bne _080FB20C - adds r0, r4, 0 - subs r0, 0x8 - adds r0, r3, r0 - ldr r1, =sub_80FB2C0 - str r1, [r0] -_080FB20C: - movs r4, 0x2 - ldrsh r0, [r7, r4] - adds r0, r2 - movs r5, 0 - ldrsb r5, [r0, r5] - lsls r5, 16 - lsrs r5, 16 - movs r1, 0x4 - ldrsh r0, [r7, r1] - bl sub_80FB0B0 - adds r1, r0, 0 - lsls r5, 16 - asrs r5, 16 - lsls r1, 16 - asrs r1, 16 - adds r0, r5, 0 - bl SetCameraPanning - movs r4, 0x4 - ldrsh r0, [r7, r4] - adds r0, 0x1E - bl sub_80FB0DC - ldr r6, =gSaveBlock1Ptr - ldr r2, [r6] - ldrb r1, [r2, 0x5] - ldrb r2, [r2, 0x4] - movs r3, 0x3 - subs r3, r5 - lsls r3, 16 - asrs r3, 16 - lsls r0, 18 - movs r4, 0xC0 - lsls r4, 10 - orrs r0, r4 - asrs r0, 16 - str r0, [sp] - movs r0, 0x1 - bl sub_808E82C - movs r1, 0x4 - ldrsh r0, [r7, r1] - bl sub_80FB0DC - ldr r2, [r6] - ldrb r1, [r2, 0x5] - ldrb r2, [r2, 0x4] - negs r3, r5 - lsls r3, 16 - asrs r3, 16 - lsls r0, 17 - ldr r4, =0xfffd0000 - adds r0, r4 - asrs r0, 16 - str r0, [sp] - movs r0, 0x2 - bl sub_808E82C - movs r1, 0x4 - ldrsh r0, [r7, r1] - bl sub_80FB0DC - ldr r2, [r6] - ldrb r1, [r2, 0x5] - ldrb r2, [r2, 0x4] - movs r4, 0x3 - negs r4, r4 - adds r3, r4, 0 - subs r3, r5 - lsls r3, 16 - asrs r3, 16 - lsls r0, 18 - asrs r0, 16 - str r0, [sp] - movs r0, 0x3 - bl sub_808E82C -_080FB2A8: - add sp, 0x4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80FB1AC - - thumb_func_start sub_80FB2C0 -sub_80FB2C0: @ 80FB2C0 - push {r4-r6,lr} - mov r6, r8 - push {r6} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - adds r3, r0, 0 - lsls r0, r3, 2 - adds r0, r3 - lsls r0, 3 - ldr r1, =gTasks + 0x8 - adds r2, r0, r1 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x5 - ble _080FB2F0 - movs r0, 0 - strh r0, [r2] - ldrh r0, [r2, 0x2] - adds r0, 0x1 - strh r0, [r2, 0x2] -_080FB2F0: - ldrh r0, [r2, 0x2] - cmp r0, 0x13 - bne _080FB304 - adds r0, r3, 0 - bl DestroyTask - b _080FB358 - .pool -_080FB304: - ldr r1, =gUnknown_0858E898 - movs r3, 0x2 - ldrsh r0, [r2, r3] - adds r0, r1 - movs r1, 0 - mov r8, r1 - movs r6, 0 - ldrsb r6, [r0, r6] - adds r0, r6, 0 - bl SetCameraPanning - ldr r5, =gSaveBlock1Ptr - ldr r0, [r5] - ldrb r1, [r0, 0x5] - ldrb r2, [r0, 0x4] - movs r3, 0x3 - subs r3, r6 - movs r0, 0x3 - str r0, [sp] - movs r0, 0x1 - bl sub_808E82C - ldr r0, [r5] - ldrb r1, [r0, 0x5] - ldrb r2, [r0, 0x4] - negs r3, r6 - mov r4, r8 - subs r4, 0x3 - str r4, [sp] - movs r0, 0x2 - bl sub_808E82C - ldr r0, [r5] - ldrb r1, [r0, 0x5] - ldrb r2, [r0, 0x4] - subs r4, r6 - mov r3, r8 - str r3, [sp] - movs r0, 0x3 - adds r3, r4, 0 - bl sub_808E82C -_080FB358: - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80FB2C0 - - thumb_func_start sub_80FB36C -sub_80FB36C: @ 80FB36C - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - ldr r1, =gTasks + 0x8 - adds r4, r0, r1 - movs r1, 0 - ldrsh r0, [r4, r1] - cmp r0, 0x5 - bls _080FB386 - b _080FB4D8 -_080FB386: - lsls r0, 2 - ldr r1, =_080FB398 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_080FB398: - .4byte _080FB3B0 - .4byte _080FB3E8 - .4byte _080FB404 - .4byte _080FB450 - .4byte _080FB474 - .4byte _080FB492 -_080FB3B0: - ldrh r0, [r4, 0x2] - adds r0, 0x1 - strh r0, [r4, 0x2] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x5A - beq _080FB3C0 - b _080FB4D8 -_080FB3C0: - movs r0, 0 - bl SetCameraPanningCallback - movs r0, 0 - strh r0, [r4, 0x2] - ldr r0, =sub_80FB0F8 - movs r1, 0xA - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - strh r0, [r4, 0x4] - movs r0, 0x1 - strh r0, [r4] - movs r0, 0x31 - bl PlaySE - b _080FB4D8 - .pool -_080FB3E8: - ldrh r0, [r4, 0x2] - adds r0, 0x1 - strh r0, [r4, 0x2] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x96 - bne _080FB4D8 - bl pal_fill_black - movs r0, 0 - strh r0, [r4, 0x2] - movs r0, 0x2 - strh r0, [r4] - b _080FB4D8 -_080FB404: - ldrh r0, [r4, 0x2] - adds r3, r0, 0x1 - strh r3, [r4, 0x2] - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0 - bne _080FB4D8 - lsls r1, r3, 16 - movs r0, 0x96 - lsls r0, 17 - cmp r1, r0 - ble _080FB4D8 - strh r2, [r4, 0x2] - ldrb r0, [r4, 0x4] - bl DestroyTask - ldr r0, =sub_80FB1AC - movs r1, 0xA - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - strh r0, [r4, 0x6] - movs r0, 0x3 - strh r0, [r4] - movs r0, 0x32 - bl PlaySE - b _080FB4D8 - .pool -_080FB450: - ldr r2, =gTasks - movs r0, 0x6 - ldrsh r1, [r4, r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r2 - ldrb r5, [r0, 0x4] - cmp r5, 0 - bne _080FB4D8 - bl InstallCameraPanAheadCallback - strh r5, [r4, 0x2] - movs r0, 0x4 - strh r0, [r4] - b _080FB4D8 - .pool -_080FB474: - ldrh r0, [r4, 0x2] - adds r0, 0x1 - strh r0, [r4, 0x2] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x5A - bne _080FB4D8 - movs r0, 0x33 - bl PlaySE - movs r0, 0 - strh r0, [r4, 0x2] - movs r0, 0x5 - strh r0, [r4] - b _080FB4D8 -_080FB492: - ldrh r0, [r4, 0x2] - adds r0, 0x1 - strh r0, [r4, 0x2] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x78 - bne _080FB4D8 - movs r2, 0x82 - lsls r2, 2 - movs r0, 0xB - movs r1, 0x8 - bl MapGridSetMetatileIdAt - movs r2, 0x84 - lsls r2, 2 - movs r0, 0xB - movs r1, 0x9 - bl MapGridSetMetatileIdAt - movs r2, 0x86 - lsls r2, 2 - movs r0, 0xB - movs r1, 0xA - bl MapGridSetMetatileIdAt - bl DrawWholeMapView - movs r0, 0x34 - bl PlaySE - adds r0, r5, 0 - bl DestroyTask - bl ScriptContext2_Disable -_080FB4D8: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80FB36C - - thumb_func_start sub_80FB4E0 -sub_80FB4E0: @ 80FB4E0 - push {lr} - sub sp, 0x4 - ldr r2, =0x0000020d - movs r0, 0xB - movs r1, 0x8 - bl MapGridSetMetatileIdAt - ldr r2, =0x00000215 - movs r0, 0xB - movs r1, 0x9 - bl MapGridSetMetatileIdAt - ldr r2, =0x0000021d - movs r0, 0xB - movs r1, 0xA - bl MapGridSetMetatileIdAt - bl DrawWholeMapView - bl ScriptContext2_Enable - movs r0, 0 - str r0, [sp] - ldr r1, =gPlttBufferFaded - ldr r2, =0x01000100 - mov r0, sp - bl CpuFastSet - ldr r0, =sub_80FB36C - movs r1, 0xA - bl CreateTask - add sp, 0x4 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80FB4E0 - - thumb_func_start sub_80FB540 -sub_80FB540: @ 80FB540 - push {r4-r6,lr} - sub sp, 0x4 - ldr r0, =sub_80FB36C - bl FuncIsActiveTask - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, 0 - bne _080FB58A - ldr r4, =gSaveBlock1Ptr - ldr r0, [r4] - ldrb r1, [r0, 0x5] - ldrb r2, [r0, 0x4] - movs r0, 0x3 - str r0, [sp] - movs r0, 0x1 - movs r3, 0x3 - bl sub_808E82C - ldr r0, [r4] - ldrb r1, [r0, 0x5] - ldrb r2, [r0, 0x4] - movs r5, 0x3 - negs r5, r5 - str r5, [sp] - movs r0, 0x2 - movs r3, 0 - bl sub_808E82C - ldr r0, [r4] - ldrb r1, [r0, 0x5] - ldrb r2, [r0, 0x4] - str r6, [sp] - movs r0, 0x3 - adds r3, r5, 0 - bl sub_808E82C -_080FB58A: - add sp, 0x4 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80FB540 - - .align 2, 0 @ Don't pad with nop. diff --git a/data/data3b.s b/data/data3b.s index 3faa3d290..a4499c852 100644 --- a/data/data3b.s +++ b/data/data3b.s @@ -56,7 +56,7 @@ gUnknown_0858E864:: @ 858E864 gUnknown_0858E880:: @ 858E880 .incbin "baserom.gba", 0x58e880, 0x18 -gUnknown_0858E898:: @ 858E898 +gTruckCamera_HorizontalTable:: @ 858E898 .incbin "baserom.gba", 0x58e898, 0x13 gUnknown_0858E8AB:: @ 858E8AB diff --git a/include/field_map_obj.h b/include/field_map_obj.h index 40cc64054..be7b82a21 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -4,6 +4,8 @@ #define NUM_OBJECT_GRAPHICS_INFO 239 #define SPRITE_VAR 240 +struct Sprite; // pika pls + // Exported struct declarations enum SpinnerRunnerFollowPatterns { diff --git a/ld_script.txt b/ld_script.txt index 048f12336..e973a7748 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -158,8 +158,7 @@ SECTIONS { asm/field_poison.o(.text); src/pokemon_size_record.o(.text); asm/fldeff_80F9BCC.o(.text); - asm/truck_scene.o(.text); - asm/porthole.o(.text); + src/field_special_scene.o(.text); asm/rotating_gate.o(.text); src/safari_zone.o(.text); asm/contest_link_80FC4F4.o(.text); diff --git a/src/field_special_scene.c b/src/field_special_scene.c new file mode 100755 index 000000000..22a20161d --- /dev/null +++ b/src/field_special_scene.c @@ -0,0 +1,365 @@ +#include "global.h" +#include "task.h" +#include "field_map_obj.h" +#include "songs.h" +#include "sound.h" +#include "palette.h" +#include "script.h" +#include "vars.h" +#include "event_data.h" +#include "main.h" +#include "sprite.h" + +#define SECONDS(value) ((signed) (60.0 * value + 0.5)) + +// porthole states +enum +{ + INIT_PORTHOLE, + IDLE_CHECK, + EXECUTE_MOVEMENT, + EXIT_PORTHOLE, +}; + +extern void SetCameraPanning(s16 x, s16 y); +extern void SetCameraPanningCallback(void ( *callback)()); +extern void InstallCameraPanAheadCallback(); +extern void pal_fill_black(void); +extern void MapGridSetMetatileIdAt(s32 x, s32 y, u16 metatileId); +extern void DrawWholeMapView(); + +extern s8 gTruckCamera_HorizontalTable[]; + +extern u8 gUnknown_0858E8AB[]; +extern u8 gUnknown_0858E8AD[]; + +void Task_Truck3(u8); + +s32 GetTruckCameraBobbingY(int a1) +{ + if (!(a1 % 120)) + return -1; + else if ((a1 % 10) <= 4) + return 1; + + return 0; +} + +s32 GetTruckBoxMovement(int a1) // for the box movement? +{ + if (!((a1 + 120) % 180)) + return -1; + + return 0; +} + +// smh STILL BROKEN IN EMERALD +void Task_Truck1(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + s16 cameraYpan; + s16 box1 = 0; + s16 box2 = 0; + s16 box3 = 0; + u8 mapNum, mapGroup; + register s16 zero asm("r4"); + + box1 = GetTruckBoxMovement(data[0] + 30) * 4; // top box. + sub_808E82C(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3, box1 + 3); + box2 = GetTruckBoxMovement(data[0]) * 2; // bottom left box. + sub_808E82C(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 0, box2 - 3); + box3 = GetTruckBoxMovement(data[0]) * 4; // bottom right box. + mapNum = gSaveBlock1Ptr->location.mapNum; + mapGroup = gSaveBlock1Ptr->location.mapGroup; + zero = 0; + sub_808E82C(3, mapNum, mapGroup, -3, box3); + + if (++data[0] == SECONDS(500)) // this will never run + data[0] = zero; // reset the timer if it gets stuck. + + cameraYpan = GetTruckCameraBobbingY(data[0]); + SetCameraPanning(0, cameraYpan); +} + +void Task_Truck2(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + s16 cameraYpan; + s16 cameraXpan; + s16 box1; + s16 box2; + s16 box3; + + data[0]++; + data[2]++; + + if (data[0] > 5) + { + data[0] = 0; + data[1]++; + } + if ((u16)data[1] == 19) + { + DestroyTask(taskId); + } + else + { + if (gTruckCamera_HorizontalTable[data[1]] == 2) + gTasks[taskId].func = Task_Truck3; + + cameraXpan = gTruckCamera_HorizontalTable[data[1]]; + cameraYpan = GetTruckCameraBobbingY(data[2]); + SetCameraPanning(cameraXpan, cameraYpan); + box1 = GetTruckBoxMovement(data[2] + 30) * 4; + sub_808E82C(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, box1 + 3); + box2 = GetTruckBoxMovement(data[2]) * 2; + sub_808E82C(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, box2 - 3); + box3 = GetTruckBoxMovement(data[2]) * 4; + sub_808E82C(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, box3); + } +} + +void Task_Truck3(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + s16 cameraXpan; + s16 cameraYpan; + + data[0]++; + + if (data[0] > 5) + { + data[0] = 0; + data[1]++; + } + + if ((u16)data[1] == 19) + { + DestroyTask(taskId); + } + else + { + cameraXpan = gTruckCamera_HorizontalTable[data[1]]; + cameraYpan = 0; + SetCameraPanning(cameraXpan, 0); + sub_808E82C(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3 - cameraXpan, cameraYpan + 3); + sub_808E82C(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -cameraXpan, cameraYpan - 3); + sub_808E82C(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3 - cameraXpan, cameraYpan); + } +} + +void Task_HandleTruckSequence(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + + switch (data[0]) + { + /* + Each case has a timer which is handled with data[1], incrementing + until it reaches the if function's condition, which sets the next task up. + */ + case 0: + data[1]++; + if (data[1] == SECONDS(1.5)) + { + SetCameraPanningCallback(NULL); + data[1] = 0; // reset the timer. + data[2] = CreateTask(Task_Truck1, 0xA); + data[0] = 1; // run the next case. + PlaySE(SE_TRACK_MOVE); + } + break; + case 1: + data[1]++; + if (data[1] == SECONDS(2.5)) + { + pal_fill_black(); + data[1] = 0; + data[0] = 2; + } + break; + case 2: + data[1]++; + if (!gPaletteFade.active && data[1] > SECONDS(5)) + { + data[1] = 0; + DestroyTask(data[2]); + data[3] = CreateTask(Task_Truck2, 0xA); + data[0] = 3; + PlaySE(SE_TRACK_STOP); + } + break; + case 3: + if (!gTasks[data[3]].isActive) // is Truck2 no longer active (is Truck3 active?) + { + InstallCameraPanAheadCallback(); + data[1] = 0; + data[0] = 4; + } + break; + case 4: + data[1]++; + if (data[1] == 90) + { + PlaySE(SE_TRACK_HAIK); + data[1] = 0; + data[0] = 5; + } + break; + case 5: + data[1]++; + if (data[1] == 120) + { + MapGridSetMetatileIdAt(11, 8, 520); + MapGridSetMetatileIdAt(11, 9, 528); + MapGridSetMetatileIdAt(11, 10, 536); + DrawWholeMapView(); + PlaySE(SE_TRACK_DOOR); + DestroyTask(taskId); + ScriptContext2_Disable(); + } + break; + } +} + +void ExecuteTruckSequence(void) +{ + MapGridSetMetatileIdAt(11, 8, 525); + MapGridSetMetatileIdAt(11, 9, 533); + MapGridSetMetatileIdAt(11, 10, 541); + DrawWholeMapView(); + ScriptContext2_Enable(); + CpuFastFill(0, gPlttBufferFaded, 0x400); + CreateTask(Task_HandleTruckSequence, 0xA); +} + +void EndTruckSequence(u8 taskId) +{ + if (!FuncIsActiveTask(Task_HandleTruckSequence)) + { + sub_808E82C(1, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 3, 3); + sub_808E82C(2, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, 0, -3); + sub_808E82C(3, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, -3, 0); + } +} + +extern u8 GetSSTidalLocation(s8 *, s8 *, s16 *, s16 *); // should be in field_specials.h +extern void warp1_set(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); + +bool8 sub_80FB59C(void) +{ + s8 mapGroup, mapNum; + s16 x, y; + + if (GetSSTidalLocation(&mapGroup, &mapNum, &x, &y)) + { + return FALSE; + } + else + { + warp1_set(mapGroup, mapNum, -1, x, y); + return TRUE; + } +} + +extern bool8 sub_80D3340(u8, u8, u8); +extern bool32 CountSSTidalStep(u16); +extern bool8 exec_movement(u8, u8, u8, u8 *); +extern void copy_saved_warp2_bank_and_enter_x_to_warp1(u8 unused); +extern void sp13E_warp_to_last_warp(void); + +void Task_HandlePorthole(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + u16 *var = GetVarPointer(VAR_PORTHOLE); + struct WarpData *location = &gSaveBlock1Ptr->location; + + switch (data[0]) + { + case INIT_PORTHOLE: // finish fading before making porthole finish. + if (!gPaletteFade.active) + { + data[1] = 0; + data[0] = EXECUTE_MOVEMENT; // execute movement before checking if should be exited. strange? + } + break; + case IDLE_CHECK: // idle and move. + if (gMain.newKeys & A_BUTTON) + data[1] = 1; + if (!sub_80D3340(0xFF, location->mapNum, location->mapGroup)) + return; + if (CountSSTidalStep(1) == TRUE) + { + if (*var == 2) + *var = 9; + else + *var = 10; + data[0] = 3; + return; + } + data[0] = 2; + case EXECUTE_MOVEMENT: // execute movement. + if (data[1]) + { + data[0] = EXIT_PORTHOLE; // exit porthole. + return; + } + // run this once. + if (*var == 2) // which direction? + { + exec_movement(0xFF, location->mapNum, location->mapGroup, gUnknown_0858E8AB); + data[0] = IDLE_CHECK; // run case 1. + } + else + { + exec_movement(0xFF, location->mapNum, location->mapGroup, gUnknown_0858E8AD); + data[0] = IDLE_CHECK; // run case 1. + } + break; + case EXIT_PORTHOLE: // exit porthole. + FlagReset(0x4001); + FlagReset(0x4000); + copy_saved_warp2_bank_and_enter_x_to_warp1(0); + sp13E_warp_to_last_warp(); + DestroyTask(taskId); + break; + } +} + +void sub_80FB6EC(void) +{ + u8 spriteId = AddPseudoFieldObject(0x8C, SpriteCallbackDummy, 112, 80, 0); + + gSprites[spriteId].coordOffsetEnabled = FALSE; + + if (VarGet(0x40B4) == 2) + { + StartSpriteAnim(&gSprites[spriteId], FieldObjectDirectionToImageAnimId(4)); + } + else + { + StartSpriteAnim(&gSprites[spriteId], FieldObjectDirectionToImageAnimId(3)); + } +} + +void sub_80FB768(void) +{ + sub_80FB6EC(); + gMapObjects[gPlayerAvatar.mapObjectId].mapobj_bit_13 = TRUE; + pal_fill_black(); + CreateTask(Task_HandlePorthole, 80); + ScriptContext2_Enable(); +} + +extern void saved_warp2_set(int unused, s8 mapGroup, s8 mapNum, s8 warpId); +extern void sub_80AF8B8(void); + +void sub_80FB7A4(void) +{ + FlagSet(SYS_CRUISE_MODE); + FlagSet(0x4001); + FlagSet(0x4000); + saved_warp2_set(0, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, -1); + sub_80FB59C(); + sub_80AF8B8(); +} From 24751851d27ac288797457cdd44a261b98e47ed4 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sat, 23 Sep 2017 12:06:23 -0400 Subject: [PATCH 279/342] correct field_map_obj.h order declaration. --- include/field_map_obj.h | 2 -- src/field_special_scene.c | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/field_map_obj.h b/include/field_map_obj.h index be7b82a21..40cc64054 100755 --- a/include/field_map_obj.h +++ b/include/field_map_obj.h @@ -4,8 +4,6 @@ #define NUM_OBJECT_GRAPHICS_INFO 239 #define SPRITE_VAR 240 -struct Sprite; // pika pls - // Exported struct declarations enum SpinnerRunnerFollowPatterns { diff --git a/src/field_special_scene.c b/src/field_special_scene.c index 22a20161d..2855b3f3a 100755 --- a/src/field_special_scene.c +++ b/src/field_special_scene.c @@ -1,5 +1,6 @@ #include "global.h" #include "task.h" +#include "sprite.h" #include "field_map_obj.h" #include "songs.h" #include "sound.h" @@ -8,7 +9,6 @@ #include "vars.h" #include "event_data.h" #include "main.h" -#include "sprite.h" #define SECONDS(value) ((signed) (60.0 * value + 0.5)) @@ -35,7 +35,7 @@ extern u8 gUnknown_0858E8AD[]; void Task_Truck3(u8); -s32 GetTruckCameraBobbingY(int a1) +s16 GetTruckCameraBobbingY(int a1) { if (!(a1 % 120)) return -1; @@ -45,7 +45,7 @@ s32 GetTruckCameraBobbingY(int a1) return 0; } -s32 GetTruckBoxMovement(int a1) // for the box movement? +s16 GetTruckBoxMovement(int a1) // for the box movement? { if (!((a1 + 120) % 180)) return -1; @@ -74,7 +74,7 @@ void Task_Truck1(u8 taskId) zero = 0; sub_808E82C(3, mapNum, mapGroup, -3, box3); - if (++data[0] == SECONDS(500)) // this will never run + if (SECONDS(500) == ++data[0]) // this will never run data[0] = zero; // reset the timer if it gets stuck. cameraYpan = GetTruckCameraBobbingY(data[0]); From 57543e164e0ed15c23e295ffa08e5804d4d32037 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sat, 23 Sep 2017 12:42:06 -0400 Subject: [PATCH 280/342] revert pointless change --- src/field_special_scene.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/field_special_scene.c b/src/field_special_scene.c index 2855b3f3a..20331f37c 100755 --- a/src/field_special_scene.c +++ b/src/field_special_scene.c @@ -74,7 +74,7 @@ void Task_Truck1(u8 taskId) zero = 0; sub_808E82C(3, mapNum, mapGroup, -3, box3); - if (SECONDS(500) == ++data[0]) // this will never run + if (++data[0] == SECONDS(500)) // this will never run data[0] = zero; // reset the timer if it gets stuck. cameraYpan = GetTruckCameraBobbingY(data[0]); From 601fc9e85b383792819768c31728e4855e854f32 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 23 Sep 2017 20:13:45 +0200 Subject: [PATCH 281/342] atk49 is matching baby WOHOHOHOHO --- asm/battle_2.s | 30 +- asm/battle_4.s | 1396 +--------------------------------- asm/rom3.s | 10 +- data/battle_scripts_1.s | 6 +- include/battle.h | 24 +- include/battle_controllers.h | 1 + include/pokemon.h | 1 + src/battle_3.c | 5 +- src/battle_4.c | 570 +++++++++++++- sym_ewram.txt | 4 +- 10 files changed, 616 insertions(+), 1431 deletions(-) diff --git a/asm/battle_2.s b/asm/battle_2.s index 47db7e082..f965af976 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -6357,7 +6357,7 @@ sub_8039F40: @ 8039F40 mov r12, r1 ldr r5, =gDisableStructs movs r4, 0 - ldr r7, =gUnknown_02024240 + ldr r7, =gUnknownMovesUsedByBanks ldr r6, =gLockedMoves _08039F70: ldr r0, =gStatuses3 @@ -7073,7 +7073,7 @@ _0803A540: mov r1, r9 ldrb r0, [r1] lsls r0, 1 - ldr r3, =gUnknown_02024240 + ldr r3, =gUnknownMovesUsedByBanks adds r0, r3 strh r4, [r0] ldrb r0, [r1] @@ -7584,7 +7584,7 @@ _0803A852: strh r2, [r0] ldrb r0, [r1] lsls r0, 1 - ldr r1, =gUnknown_02024240 + ldr r1, =gUnknownMovesUsedByBanks adds r0, r1 strh r2, [r0] ldr r2, =gActiveBank @@ -13706,7 +13706,7 @@ _0803E110: ands r0, r1 strb r0, [r3] ldr r2, =gCurrentMove - ldr r1, =gUnknown_020241EC + ldr r1, =gLastUsedMove movs r0, 0xA5 strh r0, [r1] strh r0, [r2] @@ -13746,7 +13746,7 @@ _0803E1BC: beq _0803E204 _0803E1E2: ldr r3, =gCurrentMove - ldr r2, =gUnknown_020241EC + ldr r2, =gLastUsedMove ldr r1, =gLockedMoves lsls r0, r4, 1 adds r0, r1 @@ -13776,7 +13776,7 @@ _0803E204: cmp r1, r0 bne _0803E268 ldr r2, =gCurrentMove - ldr r0, =gUnknown_020241EC + ldr r0, =gLastUsedMove strh r3, [r0] strh r3, [r2] ldrb r1, [r6] @@ -13807,7 +13807,7 @@ _0803E268: mov r0, r8 strb r2, [r0] ldr r3, =gCurrentMove - ldr r2, =gUnknown_020241EC + ldr r2, =gLastUsedMove ldrb r0, [r0] lsls r0, 1 ldrb r1, [r6] @@ -13869,7 +13869,7 @@ _0803E2DC: cmp r3, r2 beq _0803E334 ldr r1, =gCurrentMove - ldr r0, =gUnknown_020241EC + ldr r0, =gLastUsedMove strh r3, [r0] strh r3, [r1] ldrh r0, [r1] @@ -13885,7 +13885,7 @@ _0803E316: .pool _0803E334: ldr r1, =gCurrentMove - ldr r0, =gUnknown_020241EC + ldr r0, =gLastUsedMove strh r3, [r0] strh r3, [r1] _0803E33C: @@ -14086,7 +14086,7 @@ _0803E4E0: b _0803E5E2 _0803E4E8: ldr r2, =gBattleMoves - ldr r0, =gUnknown_020241EC + ldr r0, =gLastUsedMove ldrh r1, [r0] lsls r0, r1, 1 adds r0, r1 @@ -14218,7 +14218,7 @@ _0803E630: cmp r0, 0 beq _0803E6E0 ldr r2, =gBattleMoves - ldr r0, =gUnknown_020241EC + ldr r0, =gLastUsedMove ldrh r1, [r0] lsls r0, r1, 1 adds r0, r1 @@ -14406,7 +14406,7 @@ _0803E7EC: .pool _0803E808: ldr r4, =gBattlescriptCurrInstr - ldr r3, =gUnknown_082D86A8 + ldr r3, =gBattleScriptsForMoveEffects ldr r2, =gBattleMoves ldr r0, =gCurrentMove ldrh r1, [r0] @@ -16252,8 +16252,8 @@ CancelMultiTurnMoves: @ 803F8A0 .pool thumb_func_end CancelMultiTurnMoves - thumb_func_start sub_803F90C -sub_803F90C: @ 803F90C + thumb_func_start HasMoveFailed +HasMoveFailed: @ 803F90C push {lr} lsls r0, 24 ldr r1, =gProtectStructs @@ -16298,7 +16298,7 @@ _0803F95C: _0803F95E: pop {r1} bx r1 - thumb_func_end sub_803F90C + thumb_func_end HasMoveFailed thumb_func_start PrepareStringBattle PrepareStringBattle: @ 803F964 diff --git a/asm/battle_4.s b/asm/battle_4.s index ddde05c1d..6a609e0fb 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -5,1380 +5,6 @@ .text - - thumb_func_start atk48_playstatchangeanimation -atk48_playstatchangeanimation: @ 804B9D8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - movs r7, 0 - movs r0, 0 - mov r8, r0 - movs r3, 0 - ldr r5, =gBattlescriptCurrInstr - ldr r0, [r5] - ldrb r0, [r0, 0x1] - str r3, [sp] - bl GetBattleBank - ldr r2, =gActiveBank - strb r0, [r2] - ldr r0, [r5] - ldrb r4, [r0, 0x2] - ldrb r1, [r0, 0x3] - movs r0, 0x1 - ands r0, r1 - ldr r3, [sp] - cmp r0, 0 - beq _0804BAEC - movs r0, 0x2 - ands r0, r1 - movs r1, 0x15 - cmp r0, 0 - beq _0804BA18 - movs r1, 0x2D -_0804BA18: - cmp r4, 0 - beq _0804BAC0 - movs r0, 0x1 - mov r10, r0 - ldr r0, =gBattleMons + 0x18 - mov r9, r0 - lsls r5, r1, 16 -_0804BA26: - adds r0, r4, 0 - mov r1, r10 - ands r0, r1 - cmp r0, 0 - beq _0804BAB2 - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r1, [r0, 0x3] - movs r0, 0x8 - ands r0, r1 - cmp r0, 0 - beq _0804BA58 - ldr r0, =gActiveBank - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r7, r0 - b _0804BAA0 - .pool -_0804BA58: - ldr r6, =gActiveBank - ldrb r0, [r6] - str r3, [sp] - bl GetBankIdentity - mov r1, r10 - ands r1, r0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSideTimers - adds r0, r1 - ldrb r0, [r0, 0x4] - ldr r3, [sp] - cmp r0, 0 - bne _0804BAB2 - ldr r0, =gBattleMons - ldrb r2, [r6] - movs r1, 0x58 - muls r2, r1 - adds r0, r2, r0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x1D - beq _0804BAB2 - cmp r0, 0x49 - beq _0804BAB2 - cmp r0, 0x33 - bne _0804BA96 - cmp r7, 0x6 - beq _0804BAB2 -_0804BA96: - cmp r0, 0x34 - bne _0804BA9E - cmp r7, 0x1 - beq _0804BAB2 -_0804BA9E: - adds r0, r7, r2 -_0804BAA0: - add r0, r9 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - cmp r0, 0 - ble _0804BAB2 - lsrs r0, r5, 16 - mov r8, r0 - adds r3, 0x1 -_0804BAB2: - lsrs r4, 1 - movs r1, 0x80 - lsls r1, 9 - adds r5, r1 - adds r7, 0x1 - cmp r4, 0 - bne _0804BA26 -_0804BAC0: - ldr r0, =gBattlescriptCurrInstr - mov r9, r0 - cmp r3, 0x1 - ble _0804BB4E - ldr r0, [r0] - ldrb r1, [r0, 0x3] - movs r0, 0x2 - ands r0, r1 - movs r1, 0x39 - mov r8, r1 - cmp r0, 0 - beq _0804BB4E - movs r0, 0x3A - b _0804BB4C - .pool -_0804BAEC: - movs r0, 0x2 - ands r0, r1 - movs r1, 0xE - cmp r0, 0 - beq _0804BAF8 - movs r1, 0x26 -_0804BAF8: - mov r9, r5 - cmp r4, 0 - beq _0804BB34 - ldr r6, =gBattleMons + 0x18 - adds r5, r2, 0 - lsls r2, r1, 16 -_0804BB04: - movs r0, 0x1 - ands r0, r4 - cmp r0, 0 - beq _0804BB26 - ldrb r1, [r5] - movs r0, 0x58 - muls r0, r1 - adds r0, r7, r0 - adds r0, r6 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - cmp r0, 0xB - bgt _0804BB26 - lsrs r1, r2, 16 - mov r8, r1 - adds r3, 0x1 -_0804BB26: - lsrs r4, 1 - movs r0, 0x80 - lsls r0, 9 - adds r2, r0 - adds r7, 0x1 - cmp r4, 0 - bne _0804BB04 -_0804BB34: - cmp r3, 0x1 - ble _0804BB4E - mov r1, r9 - ldr r0, [r1] - ldrb r1, [r0, 0x3] - movs r0, 0x2 - ands r0, r1 - movs r1, 0x37 - mov r8, r1 - cmp r0, 0 - beq _0804BB4E - movs r0, 0x38 -_0804BB4C: - mov r8, r0 -_0804BB4E: - mov r1, r9 - ldr r2, [r1] - ldrb r1, [r2, 0x3] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _0804BB6C - cmp r3, 0x1 - bgt _0804BB6C - adds r0, r2, 0x4 - mov r1, r9 - b _0804BBBA - .pool -_0804BB6C: - cmp r3, 0 - beq _0804BBB4 - ldr r4, =gBattleScripting - ldrb r0, [r4, 0x1B] - cmp r0, 0 - bne _0804BBB4 - movs r0, 0 - movs r1, 0x1 - mov r2, r8 - str r3, [sp] - bl EmitBattleAnimation - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r1, [r0, 0x3] - movs r0, 0x4 - ands r0, r1 - ldr r3, [sp] - cmp r0, 0 - beq _0804BBA4 - cmp r3, 0x1 - ble _0804BBA4 - movs r0, 0x1 - strb r0, [r4, 0x1B] -_0804BBA4: - ldr r1, =gBattlescriptCurrInstr - b _0804BBB6 - .pool -_0804BBB4: - mov r1, r9 -_0804BBB6: - ldr r0, [r1] - adds r0, 0x4 -_0804BBBA: - str r0, [r1] - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end atk48_playstatchangeanimation - - thumb_func_start atk49_moveendturn -atk49_moveendturn: @ 804BBCC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x1C - movs r0, 0 - mov r10, r0 - ldr r2, =gUnknown_020241EC - ldrh r1, [r2] - ldr r0, =0x0000ffff - movs r3, 0 - str r3, [sp, 0x18] - cmp r1, r0 - beq _0804BBEE - ldrh r2, [r2] - str r2, [sp, 0x18] -_0804BBEE: - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r4, [r0, 0x1] - str r4, [sp, 0x10] - ldrb r0, [r0, 0x2] - str r0, [sp, 0x14] - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r1, r0, r1 - ldrh r0, [r1, 0x2E] - cmp r0, 0xAF - bne _0804BC34 - ldr r1, =gEnigmaBerries - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0, 0x7] - b _0804BC3E - .pool -_0804BC34: - ldrh r0, [r1, 0x2E] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r0, 24 -_0804BC3E: - str r0, [sp, 0x8] - ldr r1, =gBattleStruct - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 1 - adds r0, 0xC8 - ldr r1, [r1] - adds r0, r1, r0 - str r0, [sp, 0xC] - ldrb r0, [r1, 0x13] - cmp r0, 0 - beq _0804BCF0 - movs r5, 0x3F - ands r5, r0 - str r5, [sp, 0x4] - b _0804BD02 - .pool -_0804BC68: - ldr r4, =gActiveBank - strb r2, [r4] - movs r0, 0 - movs r1, 0x1 - bl dp01_build_cmdbuf_x33_a_33_33 - ldrb r0, [r4] - bl MarkBufferBankForExecution - b _0804C15A - .pool -_0804BC80: - ldr r4, =gActiveBank - strb r2, [r4] - movs r0, 0 - movs r1, 0 - bl dp01_build_cmdbuf_x33_a_33_33 - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldrb r1, [r6] - lsls r1, 2 - adds r1, r5 - ldr r0, [r1] - ldr r2, =0xfffbff3f - ands r0, r2 - str r0, [r1] - b _0804C15A - .pool -_0804BCAC: - strb r2, [r7] - ldr r0, [r5] - orrs r0, r6 - str r0, [r5] - ldr r0, =gBattleScripting - strb r4, [r0, 0x14] - bl MoveValuesCleanUp - ldr r2, =gUnknown_082D86A8 - mov r0, r8 - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - add r0, r9 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r2 - ldr r0, [r0] - bl BattleScriptPush - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB87D - bl _0804C5B8 - .pool -_0804BCF0: - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x2] - str r0, [sp, 0x4] -_0804BD02: - ldr r1, =gBattleScripting - mov r12, r1 - b _0804BD1E - .pool -_0804BD14: - mov r2, r10 - cmp r2, 0 - beq _0804BD1E - bl _0804C5A4 -_0804BD1E: - mov r3, r12 - ldrb r0, [r3, 0x14] - cmp r0, 0x11 - bls _0804BD2A - bl _0804C570 -_0804BD2A: - lsls r0, 2 - ldr r1, =_0804BD38 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0804BD38: - .4byte _0804BD80 - .4byte _0804BE5C - .4byte _0804BF18 - .4byte _0804BF3C - .4byte _0804BF54 - .4byte _0804BF7C - .4byte _0804BFA0 - .4byte _0804C048 - .4byte _0804C0BE - .4byte _0804C0F4 - .4byte _0804C194 - .4byte _0804C088 - .4byte _0804C0A8 - .4byte _0804C1D8 - .4byte _0804C21C - .4byte _0804C3FC - .4byte _0804C4E4 - .4byte _0804C570 -_0804BD80: - ldr r6, =gBattleMons - ldr r5, =gBankTarget - ldrb r3, [r5] - movs r7, 0x58 - adds r2, r3, 0 - muls r2, r7 - adds r0, r6, 0 - adds r0, 0x50 - adds r0, r2, r0 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 16 - ands r0, r1 - cmp r0, 0 - bne _0804BDA0 - b _0804C184 -_0804BDA0: - adds r0, r2, r6 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _0804BDAA - b _0804C184 -_0804BDAA: - ldr r0, =gBankAttacker - ldrb r1, [r0] - cmp r1, r3 - bne _0804BDB4 - b _0804C184 -_0804BDB4: - adds r0, r1, 0 - bl GetBankSide - adds r4, r0, 0 - ldrb r0, [r5] - bl GetBankSide - lsls r4, 24 - lsls r0, 24 - cmp r4, r0 - bne _0804BDCC - b _0804C184 -_0804BDCC: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _0804BDDA - b _0804C184 -_0804BDDA: - ldr r2, =gSpecialStatuses - ldrb r3, [r5] - lsls r0, r3, 2 - adds r0, r3 - lsls r1, r0, 2 - adds r0, r2, 0 - adds r0, 0x8 - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _0804BDFE - adds r0, r2, 0 - adds r0, 0xC - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _0804BDFE - b _0804C184 -_0804BDFE: - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - cmp r0, 0 - bne _0804BE14 - b _0804C184 -_0804BE14: - adds r0, r3, 0 - muls r0, r7 - adds r1, r0, r6 - ldrb r2, [r1, 0x19] - movs r0, 0x19 - ldrsb r0, [r1, r0] - cmp r0, 0xB - ble _0804BE26 - b _0804C184 -_0804BE26: - adds r0, r2, 0x1 - strb r0, [r1, 0x19] - bl BattleScriptPushCursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAE0D - str r0, [r1] - b _0804C0B8 - .pool -_0804BE5C: - ldr r4, =gBattleMons - ldr r6, =gBankTarget - ldrb r2, [r6] - movs r5, 0x58 - mov r12, r5 - mov r1, r12 - muls r1, r2 - adds r7, r4, 0 - adds r7, 0x4C - adds r5, r1, r7 - ldr r3, [r5] - movs r0, 0x20 - ands r0, r3 - cmp r0, 0 - bne _0804BE7C - b _0804C184 -_0804BE7C: - adds r0, r1, r4 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _0804BE86 - b _0804C184 -_0804BE86: - ldr r0, =gBankAttacker - ldrb r0, [r0] - cmp r0, r2 - bne _0804BE90 - b _0804C184 -_0804BE90: - ldr r0, =gSpecialStatuses - lsls r1, r2, 2 - adds r1, r2 - lsls r1, 2 - adds r0, 0xC - adds r1, r0 - ldr r0, [r1] - cmp r0, 0 - bne _0804BEA4 - b _0804C184 -_0804BEA4: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _0804BEB2 - b _0804C184 -_0804BEB2: - ldr r0, [sp, 0x4] - cmp r0, 0xA - beq _0804BEBA - b _0804C184 -_0804BEBA: - movs r0, 0x21 - negs r0, r0 - ands r3, r0 - str r3, [r5] - ldr r4, =gActiveBank - ldrb r0, [r6] - strb r0, [r4] - ldrb r0, [r6] - mov r1, r12 - muls r1, r0 - adds r0, r1, 0 - adds r0, r7 - str r0, [sp] - movs r0, 0 - movs r1, 0x28 - movs r2, 0 - movs r3, 0x4 - bl EmitSetAttributes - ldrb r0, [r4] - bl MarkBufferBankForExecution - bl BattleScriptPushCursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB282 - str r0, [r1] - movs r2, 0x1 - mov r10, r2 - b _0804C184 - .pool -_0804BF18: - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0 - str r0, [sp] - movs r0, 0x7 - movs r2, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _0804BF32 - b _0804C184 -_0804BF32: - movs r3, 0x1 - mov r10, r3 - b _0804C184 - .pool -_0804BF3C: - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0 - str r0, [sp] - movs r0, 0x4 - movs r2, 0 - movs r3, 0 - bl AbilityBattleEffects - b _0804C0B2 - .pool -_0804BF54: - movs r0, 0 - str r0, [sp] - movs r0, 0x5 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _0804BF6C - b _0804C184 -_0804BF6C: - movs r5, 0x1 - mov r10, r5 - ldr r0, =gBattleScripting - mov r12, r0 - b _0804C570 - .pool -_0804BF7C: - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0 - str r0, [sp] - movs r0, 0x8 - movs r2, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _0804BF96 - b _0804C184 -_0804BF96: - movs r1, 0x1 - mov r10, r1 - b _0804C184 - .pool -_0804BFA0: - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 18 - ands r0, r1 - cmp r0, 0 - beq _0804BFE4 - ldr r2, [sp, 0x8] - cmp r2, 0x1D - bne _0804BFE4 - ldr r0, =gUnknown_020241EC - ldrh r2, [r0] - adds r3, r0, 0 - cmp r2, 0xA5 - beq _0804BFE4 - ldr r4, [sp, 0xC] - ldrh r1, [r4] - cmp r1, 0 - beq _0804BFCC - ldr r0, =0x0000ffff - cmp r1, r0 - bne _0804BFE4 -_0804BFCC: - cmp r2, 0xE2 - bne _0804BFDE - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - bne _0804BFDE - b _0804C4B6 -_0804BFDE: - ldrh r0, [r3] - ldr r1, [sp, 0xC] - strh r0, [r1] -_0804BFE4: - movs r4, 0 - ldr r2, =gBattleMons - ldr r3, =gBankAttacker - ldrb r1, [r3] - movs r0, 0x58 - muls r0, r1 - adds r2, 0xC - adds r0, r2 - ldrh r0, [r0] - ldr r5, [sp, 0xC] - ldrh r1, [r5] - mov r9, r3 - cmp r0, r1 - beq _0804C01C - mov r6, r9 - movs r3, 0x58 - adds r5, r1, 0 -_0804C006: - adds r4, 0x1 - cmp r4, 0x3 - bgt _0804C01C - lsls r0, r4, 1 - ldrb r1, [r6] - muls r1, r3 - adds r0, r1 - adds r0, r2 - ldrh r0, [r0] - cmp r0, r5 - bne _0804C006 -_0804C01C: - cmp r4, 0x4 - bne _0804C026 - movs r0, 0 - ldr r1, [sp, 0xC] - strh r0, [r1] -_0804C026: - mov r2, r12 - ldrb r0, [r2, 0x14] - adds r0, 0x1 - strb r0, [r2, 0x14] - b _0804C570 - .pool -_0804C048: - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r3, [r0] - cmp r4, r3 - blt _0804C054 - b _0804C202 -_0804C054: - ldr r7, =gBattleStruct - movs r6, 0 - movs r3, 0xD0 - adds r5, r0, 0 - ldr r2, =gBattleMons -_0804C05E: - ldr r0, [r7] - adds r0, r3 - ldrh r1, [r0] - cmp r1, 0 - beq _0804C06C - strh r1, [r2, 0x2E] - strh r6, [r0] -_0804C06C: - adds r3, 0x2 - adds r2, 0x58 - adds r4, 0x1 - ldrb r0, [r5] - cmp r4, r0 - blt _0804C05E - b _0804C202 - .pool -_0804C088: - movs r0, 0x3 - movs r1, 0 - movs r2, 0 - bl ItemBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _0804C184 - movs r2, 0x1 - mov r10, r2 - ldr r3, =gBattleScripting - mov r12, r3 - b _0804C570 - .pool -_0804C0A8: - movs r0, 0x4 - movs r1, 0 - movs r2, 0 - bl ItemBattleEffects -_0804C0B2: - lsls r0, 24 - cmp r0, 0 - beq _0804C184 -_0804C0B8: - movs r4, 0x1 - mov r10, r4 - b _0804C184 -_0804C0BE: - ldr r1, =gStatuses3 - ldr r0, =gBankAttacker - ldrb r2, [r0] - lsls r0, r2, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x000400c0 - ands r0, r1 - cmp r0, 0 - bne _0804C0D4 - b _0804C4B6 -_0804C0D4: - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0804C0E2 - b _0804BC68 -_0804C0E2: - b _0804C4B6 - .pool -_0804C0F4: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - bne _0804C120 - ldr r1, =gStatuses3 - ldr r0, =gBankAttacker - ldrb r2, [r0] - lsls r0, r2, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x000400c0 - ands r0, r1 - cmp r0, 0 - beq _0804C120 - adds r0, r2, 0 - bl sub_803F90C - lsls r0, 24 - cmp r0, 0 - beq _0804C184 -_0804C120: - ldr r4, =gActiveBank - ldr r5, =gBankAttacker - ldrb r0, [r5] - strb r0, [r4] - movs r0, 0 - movs r1, 0 - bl dp01_build_cmdbuf_x33_a_33_33 - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r0, =gStatuses3 - ldrb r2, [r5] - lsls r2, 2 - adds r2, r0 - ldr r0, [r2] - ldr r1, =0xfffbff3f - ands r0, r1 - str r0, [r2] - ldr r2, =gSpecialStatuses - ldrb r1, [r5] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0] - movs r2, 0x4 - orrs r1, r2 - strb r1, [r0] -_0804C15A: - ldr r1, =gBattleScripting - ldrb r0, [r1, 0x14] - adds r0, 0x1 - strb r0, [r1, 0x14] - b _0804C5BA - .pool -_0804C184: - ldr r1, =gBattleScripting - ldrb r0, [r1, 0x14] - adds r0, 0x1 - strb r0, [r1, 0x14] - mov r12, r1 - b _0804C570 - .pool -_0804C194: - ldr r0, =gSpecialStatuses - ldr r6, =gBankTarget - ldrb r2, [r6] - lsls r3, r2, 2 - adds r1, r3, r2 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1] - lsls r0, 29 - cmp r0, 0 - blt _0804C202 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r2, r0 - bcs _0804C202 - ldr r5, =gStatuses3 - adds r0, r3, r5 - ldr r0, [r0] - ldr r1, =0x000400c0 - ands r0, r1 - cmp r0, 0 - bne _0804C1C2 - b _0804BC80 -_0804C1C2: - b _0804C202 - .pool -_0804C1D8: - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r2, [r0] - cmp r4, r2 - bge _0804C202 - ldr r2, =gDisableStructs - ldr r5, =0xfeffffff - adds r3, r0, 0 - ldr r1, =gBattleMons + 0x50 -_0804C1EA: - ldrb r0, [r2, 0xA] - cmp r0, 0 - bne _0804C1F6 - ldr r0, [r1] - ands r0, r5 - str r0, [r1] -_0804C1F6: - adds r2, 0x1C - adds r1, 0x58 - adds r4, 0x1 - ldrb r0, [r3] - cmp r4, r0 - blt _0804C1EA -_0804C202: - mov r1, r12 - ldrb r0, [r1, 0x14] - adds r0, 0x1 - strb r0, [r1, 0x14] - b _0804C570 - .pool -_0804C21C: - ldr r1, =gHitMarker - ldr r3, [r1] - movs r0, 0x80 - lsls r0, 5 - ands r0, r3 - ldr r2, =gBankAttacker - mov r9, r2 - adds r5, r1, 0 - cmp r0, 0 - beq _0804C246 - ldr r0, =gActiveBank - ldrb r2, [r2] - strb r2, [r0] - ldr r1, =gBankTarget - ldrb r0, [r1] - mov r4, r9 - strb r0, [r4] - strb r2, [r1] - ldr r0, =0xffffefff - ands r3, r0 - str r3, [r5] -_0804C246: - ldr r0, [r5] - movs r1, 0x80 - lsls r1, 3 - ands r0, r1 - cmp r0, 0 - beq _0804C262 - ldr r0, =gUnknown_02024240 - mov r2, r9 - ldrb r1, [r2] - lsls r1, 1 - adds r1, r0 - ldr r0, =gUnknown_020241EC - ldrh r0, [r0] - strh r0, [r1] -_0804C262: - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r2, =gBitTable - mov r3, r9 - ldrb r4, [r3] - lsls r0, r4, 2 - adds r0, r2 - ldr r3, [r0] - ands r1, r3 - adds r6, r2, 0 - cmp r1, 0 - beq _0804C27C - b _0804C3E8 -_0804C27C: - ldr r0, =gBattleStruct - ldr r1, [r0] - adds r1, 0x91 - ldrb r1, [r1] - ands r1, r3 - adds r7, r0, 0 - cmp r1, 0 - beq _0804C28E - b _0804C3E8 -_0804C28E: - ldr r0, =gBattleMoves - ldr r2, [sp, 0x18] - lsls r1, r2, 1 - adds r1, r2 - lsls r1, 2 - adds r1, r0 - ldrb r1, [r1] - mov r8, r0 - cmp r1, 0x7F - bne _0804C2A4 - b _0804C3E8 -_0804C2A4: - ldr r0, [r5] - movs r1, 0x80 - lsls r1, 18 - ands r0, r1 - cmp r0, 0 - beq _0804C308 - ldr r0, =gLastUsedMovesByBanks - lsls r1, r4, 1 - adds r1, r0 - ldr r0, =gUnknown_020241EC - ldrh r0, [r0] - strh r0, [r1] - ldr r0, =gUnknown_02024260 - mov r3, r9 - ldrb r1, [r3] - lsls r1, 1 - adds r1, r0 - ldr r0, =gCurrentMove - ldrh r0, [r0] - strh r0, [r1] - b _0804C322 - .pool -_0804C308: - ldr r1, =gLastUsedMovesByBanks - lsls r0, r4, 1 - adds r0, r1 - ldr r1, =0x0000ffff - strh r1, [r0] - ldr r1, =gUnknown_02024260 - mov r4, r9 - ldrb r0, [r4] - lsls r0, 1 - adds r0, r1 - movs r1, 0x1 - negs r1, r1 - strh r1, [r0] -_0804C322: - ldr r2, =gBankTarget - ldrb r3, [r2] - lsls r0, r3, 2 - adds r0, r6 - ldr r0, [r0] - lsls r0, 28 - ldr r1, [r5] - ands r1, r0 - cmp r1, 0 - bne _0804C340 - ldr r0, =gUnknown_02024270 - adds r0, r3, r0 - mov r3, r9 - ldrb r1, [r3] - strb r1, [r0] -_0804C340: - ldr r0, [r5] - movs r1, 0x80 - lsls r1, 18 - ands r0, r1 - cmp r0, 0 - beq _0804C3DC - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - bne _0804C3DC - ldr r0, =gUnknown_020241EC - ldrh r3, [r0] - ldr r0, =0x0000ffff - cmp r3, r0 - bne _0804C390 - ldr r1, =gUnknown_02024250 - ldrb r0, [r2] - lsls r0, 1 - adds r0, r1 - strh r3, [r0] - b _0804C3E8 - .pool -_0804C390: - ldr r0, =gUnknown_02024250 - ldrb r1, [r2] - lsls r1, 1 - adds r1, r0 - ldr r4, =gCurrentMove - ldrh r0, [r4] - strh r0, [r1] - ldr r0, [r7] - ldrb r3, [r0, 0x13] - cmp r3, 0 - beq _0804C3C0 - ldr r0, =gUnknown_02024258 - ldrb r1, [r2] - lsls r1, 1 - adds r1, r0 - movs r0, 0x3F - ands r0, r3 - b _0804C3E6 - .pool -_0804C3C0: - ldr r0, =gUnknown_02024258 - ldrb r2, [r2] - lsls r2, 1 - adds r2, r0 - ldrh r1, [r4] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - add r0, r8 - ldrb r0, [r0, 0x2] - strh r0, [r2] - b _0804C3E8 - .pool -_0804C3DC: - ldr r0, =gUnknown_02024250 - ldrb r1, [r2] - lsls r1, 1 - adds r1, r0 - ldr r0, =0x0000ffff -_0804C3E6: - strh r0, [r1] -_0804C3E8: - mov r4, r12 - ldrb r0, [r4, 0x14] - adds r0, 0x1 - strb r0, [r4, 0x14] - b _0804C570 - .pool -_0804C3FC: - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r7, =gBitTable - ldr r2, =gBankAttacker - ldrb r3, [r2] - lsls r0, r3, 2 - adds r0, r7 - ldr r4, [r0] - ands r1, r4 - mov r9, r2 - cmp r1, 0 - bne _0804C4B6 - ldr r6, =gBattleStruct - ldr r5, [r6] - adds r0, r5, 0 - adds r0, 0x91 - ldrb r0, [r0] - ands r0, r4 - cmp r0, 0 - bne _0804C4B6 - ldr r1, =gBattleMoves - ldr r2, [sp, 0x18] - lsls r0, r2, 1 - adds r0, r2 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x8] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _0804C4B6 - ldr r0, =gHitMarker - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 18 - ands r0, r1 - cmp r0, 0 - beq _0804C4B6 - ldr r4, =gBankTarget - ldrb r0, [r4] - cmp r3, r0 - beq _0804C4B6 - ldrb r2, [r4] - lsls r0, r2, 2 - adds r0, r7 - ldr r0, [r0] - lsls r0, 28 - ands r1, r0 - cmp r1, 0 - bne _0804C4B6 - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - bne _0804C4B6 - lsls r1, r2, 1 - adds r1, r5 - adds r1, 0x98 - ldr r3, =gUnknown_020241EC - ldrh r0, [r3] - strb r0, [r1] - ldrb r1, [r4] - ldr r0, [r6] - lsls r1, 1 - adds r1, r0 - adds r1, 0x99 - ldrh r0, [r3] - lsrs r0, 8 - strb r0, [r1] - ldrb r0, [r4] - mov r2, r9 - ldrb r1, [r2] - ldr r2, [r6] - lsls r0, 3 - lsls r1, 1 - adds r0, r1 - adds r0, r2 - adds r0, 0xE0 - ldrh r1, [r3] - strb r1, [r0] - ldrb r1, [r4] - mov r4, r9 - ldrb r0, [r4] - ldr r2, [r6] - lsls r1, 3 - lsls r0, 1 - adds r1, r0 - adds r1, r2 - adds r1, 0xE1 - ldrh r0, [r3] - lsrs r0, 8 - strb r0, [r1] -_0804C4B6: - mov r5, r12 - ldrb r0, [r5, 0x14] - adds r0, 0x1 - strb r0, [r5, 0x14] - b _0804C570 - .pool -_0804C4E4: - ldr r5, =gHitMarker - ldr r2, [r5] - movs r0, 0x80 - lsls r0, 12 - ands r0, r2 - cmp r0, 0 - bne _0804C568 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0804C568 - ldr r1, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0, 0x1] - lsls r0, 29 - cmp r0, 0 - blt _0804C568 - ldr r0, =gBattleMoves - mov r9, r0 - ldr r1, =gCurrentMove - mov r8, r1 - ldrh r0, [r1] - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - add r1, r9 - ldrb r0, [r1, 0x6] - cmp r0, 0x8 - bne _0804C568 - movs r6, 0x80 - lsls r6, 2 - adds r4, r6, 0 - ands r4, r2 - cmp r4, 0 - bne _0804C568 - ldr r7, =gBankTarget - ldrb r0, [r7] - bl GetBankIdentity - movs r1, 0x2 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByPlayerAI - lsls r0, 24 - lsrs r2, r0, 24 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _0804C55E - bl _0804BCAC -_0804C55E: - ldr r0, [r5] - orrs r0, r6 - str r0, [r5] - ldr r2, =gBattleScripting - mov r12, r2 -_0804C568: - mov r3, r12 - ldrb r0, [r3, 0x14] - adds r0, 0x1 - strb r0, [r3, 0x14] -_0804C570: - ldr r4, [sp, 0x10] - cmp r4, 0x1 - bne _0804C582 - mov r5, r10 - cmp r5, 0 - bne _0804C582 - movs r0, 0x11 - mov r1, r12 - strb r0, [r1, 0x14] -_0804C582: - ldr r2, [sp, 0x10] - cmp r2, 0x2 - bne _0804C598 - ldr r4, [sp, 0x14] - mov r3, r12 - ldrb r3, [r3, 0x14] - cmp r4, r3 - bne _0804C598 - movs r0, 0x11 - mov r4, r12 - strb r0, [r4, 0x14] -_0804C598: - mov r5, r12 - ldrb r0, [r5, 0x14] - cmp r0, 0x11 - beq _0804C5A4 - bl _0804BD14 -_0804C5A4: - mov r1, r12 - ldrb r0, [r1, 0x14] - cmp r0, 0x11 - bne _0804C5BA - mov r2, r10 - cmp r2, 0 - bne _0804C5BA - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x3 -_0804C5B8: - str r0, [r1] -_0804C5BA: - add sp, 0x1C - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk49_moveendturn - thumb_func_start atk4A_typecalc2 atk4A_typecalc2: @ 804C5F4 push {r4-r7,lr} @@ -5448,7 +4074,7 @@ atk63_jumptorandomattack: @ 804E990 b _0804E9C2 .pool _0804E9B4: - ldr r2, =gUnknown_020241EC + ldr r2, =gLastUsedMove ldr r1, =gCurrentMove ldr r0, =gRandomMove ldrh r0, [r0] @@ -5456,7 +4082,7 @@ _0804E9B4: strh r0, [r2] adds r0, r1, 0 _0804E9C2: - ldr r3, =gUnknown_082D86A8 + ldr r3, =gBattleScriptsForMoveEffects ldr r2, =gBattleMoves ldrh r1, [r0] lsls r0, r1, 1 @@ -6746,7 +5372,7 @@ atk6F_set_visible: @ 804F50C strb r0, [r4] movs r0, 0 movs r1, 0 - bl dp01_build_cmdbuf_x33_a_33_33 + bl EmitSpriteInvisibility ldrb r0, [r4] bl MarkBufferBankForExecution ldr r0, [r5] @@ -8215,7 +6841,7 @@ _0805024A: ldr r1, =gBankTarget strb r0, [r1] ldr r5, =gBattlescriptCurrInstr - ldr r3, =gUnknown_082D86A8 + ldr r3, =gBattleScriptsForMoveEffects ldr r2, =gBattleMoves ldrh r1, [r4] lsls r0, r1, 1 @@ -11692,7 +10318,7 @@ atk9B_transformdataexecution: @ 805205C push {r4-r7,lr} mov r7, r8 push {r7} - ldr r1, =gUnknown_020241EC + ldr r1, =gLastUsedMove ldr r2, =0x0000ffff adds r0, r2, 0 strh r0, [r1] @@ -12000,7 +10626,7 @@ atk9D_copyattack: @ 8052300 mov r6, r9 mov r5, r8 push {r5-r7} - ldr r0, =gUnknown_020241EC + ldr r0, =gLastUsedMove ldr r1, =0x0000ffff adds r7, r1, 0 strh r7, [r0] @@ -12256,7 +10882,7 @@ _0805251C: ldr r1, =0xfffffbff ands r0, r1 str r0, [r2] - ldr r3, =gUnknown_082D86A8 + ldr r3, =gBattleScriptsForMoveEffects ldr r2, =gBattleMoves ldrh r1, [r4] lsls r0, r1, 1 @@ -13229,7 +11855,7 @@ atkA8_copymovepermanently: @ 8052D8C mov r5, r8 push {r5-r7} sub sp, 0x14 - ldr r0, =gUnknown_020241EC + ldr r0, =gLastUsedMove ldr r1, =0x0000ffff adds r5, r1, 0 strh r5, [r0] @@ -13252,7 +11878,7 @@ atkA8_copymovepermanently: @ 8052D8C beq _08052DC4 b _08052F18 _08052DC4: - ldr r0, =gUnknown_02024240 + ldr r0, =gUnknownMovesUsedByBanks ldr r2, =gBankTarget ldrb r1, [r2] lsls r1, 1 @@ -13387,7 +12013,7 @@ _08052E7A: strb r0, [r1] movs r0, 0x2 strb r0, [r1, 0x1] - ldr r3, =gUnknown_02024240 + ldr r3, =gUnknownMovesUsedByBanks ldr r2, =gBankTarget ldrb r0, [r2] lsls r0, 1 @@ -16755,7 +15381,7 @@ atkCC_callterrainattack: @ 8054BEC bl GetMoveTarget ldr r1, =gBankTarget strb r0, [r1] - ldr r3, =gUnknown_082D86A8 + ldr r3, =gBattleScriptsForMoveEffects ldr r2, =gBattleMoves ldrh r1, [r4] lsls r0, r1, 1 diff --git a/asm/rom3.s b/asm/rom3.s index 84dec85e5..f4a273d95 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -2596,7 +2596,7 @@ dp01_build_cmdbuf_x10_TODO: @ 8033BE4 ldr r4, =gCurrentMove ldrh r0, [r4] strh r0, [r2, 0x4] - ldr r0, =gUnknown_020241EC + ldr r0, =gLastUsedMove ldrh r0, [r0] mov r1, r12 strh r0, [r1, 0x2] @@ -2711,7 +2711,7 @@ EmitPrintStringPlayerOnly: @ 8033CFC ldr r0, =gCurrentMove ldrh r0, [r0] strh r0, [r2, 0x4] - ldr r0, =gUnknown_020241EC + ldr r0, =gLastUsedMove ldrh r0, [r0] mov r1, r12 strh r0, [r1, 0x2] @@ -3642,8 +3642,8 @@ dp01_build_cmdbuf_x32_32_32_32: @ 80343F4 .pool thumb_func_end dp01_build_cmdbuf_x32_32_32_32 - thumb_func_start dp01_build_cmdbuf_x33_a_33_33 -dp01_build_cmdbuf_x33_a_33_33: @ 8034414 + thumb_func_start EmitSpriteInvisibility +EmitSpriteInvisibility: @ 8034414 push {lr} adds r3, r1, 0 lsls r0, 24 @@ -3659,7 +3659,7 @@ dp01_build_cmdbuf_x33_a_33_33: @ 8034414 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x33_a_33_33 + thumb_func_end EmitSpriteInvisibility thumb_func_start EmitBattleAnimation EmitBattleAnimation: @ 8034438 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 0d94d31b0..14305b7a2 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -3,7 +3,7 @@ .section script_data, "aw", %progbits -gUnknown_082D86A8:: @ 82D86A8 +gBattleScriptsForMoveEffects:: @ 82D86A8 .incbin "baserom.gba", 0x2d86a8, 0x388 gUnknown_082D8A30:: @ 82D8A30 @@ -138,7 +138,7 @@ gUnknown_082DADD8:: @ 82DADD8 gUnknown_082DAE03:: @ 82DAE03 .incbin "baserom.gba", 0x2dae03, 0xa -gUnknown_082DAE0D:: @ 82DAE0D +BattleScript_RageIsBuilding:: @ 82DAE0D .incbin "baserom.gba", 0x2dae0d, 0x7 BattleScript_MoveUsedIsDisabled:: @ 82DAE14 @@ -279,7 +279,7 @@ BattleScript_MoveUsedIsFrozen:: @ 82DB26A BattleScript_MoveUsedUnfroze:: @ 82DB277 .incbin "baserom.gba", 0x2db277, 0xb -gUnknown_082DB282:: @ 82DB282 +BattleScript_DefrostedViaFireMove:: @ 82DB282 .incbin "baserom.gba", 0x2db282, 0x9 BattleScript_MoveUsedIsParalyzed:: @ 82DB28B diff --git a/include/battle.h b/include/battle.h index 957e3542b..a6573934f 100644 --- a/include/battle.h +++ b/include/battle.h @@ -619,14 +619,7 @@ struct BattleStruct u8 field_95; u8 field_96; u8 field_97; - u8 field_98; - u8 field_99; - u8 field_9A; - u8 field_9B; - u8 field_9C; - u8 field_9D; - u8 field_9E; - u8 field_9F; + u8 mirrorMoves[8]; // ask gamefreak why they declared it that way u8 field_A0; u8 field_A1; u8 field_A2; @@ -647,14 +640,16 @@ struct BattleStruct u16 usedHeldItems[BATTLE_BANKS_COUNT]; u8 field_C0[8]; u16 choicedMove[BATTLE_BANKS_COUNT]; - u16 field_D0[BATTLE_BANKS_COUNT]; + u16 changedItems[BATTLE_BANKS_COUNT]; u8 intimidateBank; u8 fillerD9[0xDA-0xD9]; u8 field_DA; u8 turnSideTracker; u8 fillerDC[0xDF-0xDC]; u8 field_DF; - u8 fillerE0[0x1A0-0xE0]; + u8 mirrorMoveArrays[32]; + u16 castformPalette[4][16]; + u8 field_180[32]; u8 field_1A0; u8 field_1A1; u8 filler1A2; @@ -675,6 +670,14 @@ extern struct BattleStruct* gBattleStruct; var2[offsetof(struct structName, offsetField)] = value; \ } +// This is a leftover from R/S direct use of ewram addresses +#define GET_CHANGED_ITEM_PTR_VIA_MEME_ACCESS(bank, varName) \ +{ \ + void** memes1 = (void**)(&gBattleStruct); \ + void* memes2 = (void*)((u32)(bank * 2 + offsetof(struct BattleStruct, changedItems))); \ + varName = (u16*)(((void*)(*memes1) + (u32)(memes2))); \ +} + #define GET_MOVE_TYPE(move, typeArg) \ { \ if (gBattleStruct->dynamicMoveType) \ @@ -836,6 +839,7 @@ void PressurePPLose(u8 bankAtk, u8 bankDef, u16 move); void PrepareStringBattle(u16 stringId, u8 bank); u8 GetBattleBank(u8 caseId); void UndoEffectsAfterFainting(void); +bool8 HasMoveFailed(u8 bank); // battle_3 void BattleScriptPush(const u8* bsPtr); diff --git a/include/battle_controllers.h b/include/battle_controllers.h index bfa1bd507..2ae6f002f 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -10,6 +10,7 @@ void EmitPrintStringPlayerOnly(u8 bufferId, u16 stringId); void EmitFaintAnimation(u8 bufferId); void EmitExpUpdate(u8 bufferId, u8 partyId, u16 expPoints); void EmitBattleAnimation(u8 bufferId, u8 animationId, u16 argument); +void EmitSpriteInvisibility(u8 bufferId, bool8 isInvisible); void MarkBufferBankForExecution(u8 bank); diff --git a/include/pokemon.h b/include/pokemon.h index 674e6dbf4..1049776e8 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -443,6 +443,7 @@ struct BattleMove #define FLAG_PROTECT_AFFECTED 0x2 #define FLAG_MAGICCOAT_AFFECTED 0x4 #define FLAG_SNATCH_AFFECTED 0x8 +#define FLAG_MIRROR_MOVE_AFFECTED 0x10 #define FLAG_KINGSROCK_AFFECTED 0x20 struct SpindaSpot diff --git a/src/battle_3.c b/src/battle_3.c index 1b62e3bb8..4453545d3 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -186,7 +186,6 @@ extern void b_call_bc_move_exec(const u8 *); extern void BattleTurnPassed(void); extern void SetMoveEffect(bool8 primary, u8 certainArg); extern bool8 UproarWakeUpCheck(u8 bank); -extern u8 sub_803F90C(u8 bank); extern void sub_803F9EC(); extern bool8 sub_80423F4(u8 bank, u8, u8); extern u8 sub_806D864(u8); @@ -848,7 +847,7 @@ u8 TurnBasedEffects(void) { gBankAttacker = gActiveBank; gBattleMons[gActiveBank].status2 -= 0x10; // uproar timer goes down - if (sub_803F90C(gActiveBank)) + if (HasMoveFailed(gActiveBank)) { CancelMultiTurnMoves(gActiveBank); gBattleCommunication[MULTISTRING_CHOOSER] = 1; @@ -874,7 +873,7 @@ u8 TurnBasedEffects(void) if (gBattleMons[gActiveBank].status2 & STATUS2_LOCK_CONFUSE) { gBattleMons[gActiveBank].status2 -= 0x400; - if (sub_803F90C(gActiveBank)) + if (HasMoveFailed(gActiveBank)) CancelMultiTurnMoves(gActiveBank); else if (!(gBattleMons[gActiveBank].status2 & STATUS2_LOCK_CONFUSE) && (gBattleMons[gActiveBank].status2 & STATUS2_MULTIPLETURNS)) diff --git a/src/battle_4.c b/src/battle_4.c index ec84d1a5c..f896cd806 100644 --- a/src/battle_4.c +++ b/src/battle_4.c @@ -57,6 +57,8 @@ extern u8 gBattleMoveFlags; extern u8 gBattleCommunication[]; extern u16 gUnknown_02024250[4]; extern u16 gUnknown_02024258[4]; +extern u16 gUnknown_02024260[4]; +extern u8 gUnknown_02024270[4]; extern u8 gStringBank; extern u16 gDynamicBasePower; extern u16 gLastUsedItem; @@ -78,6 +80,9 @@ extern u8 gCurrentMoveTurn; extern u8 gBattleBufferB[BATTLE_BANKS_COUNT][0x200]; extern u16 gLockedMoves[BATTLE_BANKS_COUNT]; extern u16 gPartnerTrainerId; +extern u16 gLastUsedMove; +extern u16 gUnknownMovesUsedByBanks[BATTLE_BANKS_COUNT]; +extern u16 gLastUsedMovesByBanks[BATTLE_BANKS_COUNT]; extern const struct BattleMove gBattleMoves[]; extern const struct BaseStats gBaseStats[]; @@ -85,6 +90,7 @@ extern const u8 gTypeEffectiveness[]; extern const u16 gMissStringIds[]; extern const u16 gTrappingMoves[]; extern const u8 gTrainerMoney[]; +extern const u8* const gBattleScriptsForMoveEffects[]; // functions extern void sub_81A5718(u8 bank); // battle frontier 2 @@ -132,6 +138,9 @@ extern const u8 BattleScript_FaintAttacker[]; extern const u8 BattleScript_FaintTarget[]; extern const u8 BattleScript_DestinyBondTakesLife[]; extern const u8 BattleScript_GrudgeTakesPp[]; +extern const u8 BattleScript_RageIsBuilding[]; +extern const u8 BattleScript_DefrostedViaFireMove[]; +extern const u8 gUnknown_082DB87D[]; // read via orr #define BSScriptRead32(ptr) ((ptr)[0] | (ptr)[1] << 8 | (ptr)[2] << 16 | (ptr)[3] << 24) @@ -145,7 +154,7 @@ extern const u8 BattleScript_GrudgeTakesPp[]; #define TARGET_PROTECT_AFFECTED ((gProtectStructs[gBankTarget].protected && gBattleMoves[gCurrentMove].flags & FLAG_PROTECT_AFFECTED)) -#define TARGET_TURN_DAMAGED (((gSpecialStatuses[gBankTarget].moveturnLostHP_physical || gSpecialStatuses[gBankTarget].moveturnLostHP_physical.moveturnLostHP_special))) +#define TARGET_TURN_DAMAGED (((gSpecialStatuses[gBankTarget].moveturnLostHP_physical || gSpecialStatuses[gBankTarget].moveturnLostHP_special))) // this file's functions bool8 IsTwoTurnsMove(u16 move); @@ -227,7 +236,7 @@ void atk45_playanimation(void); void atk46_playanimation2(void); void atk47_setgraphicalstatchangevalues(void); void atk48_playstatchangeanimation(void); -void atk49_moveendturn(void); +void atk49_moveend(void); void atk4A_typecalc2(void); void atk4B_return_atk_to_ball(void); void atk4C_copy_poke_data(void); @@ -479,7 +488,7 @@ void (* const gBattleScriptingCommandsTable[])(void) = atk46_playanimation2, atk47_setgraphicalstatchangevalues, atk48_playstatchangeanimation, - atk49_moveendturn, + atk49_moveend, atk4A_typecalc2, atk4B_return_atk_to_ball, atk4C_copy_poke_data, @@ -2616,13 +2625,12 @@ void SetMoveEffect(bool8 primary, u8 certain) else { // This is a leftover from R/S direct use of ewram addresses - void** memes1 = (void**)(&gBattleStruct); - void* memes2 = (void*)((u32)(gBankAttacker * 2 + offsetof(struct BattleStruct, field_D0))); - u16* memes3 = (u16*)(((void*)(*memes1) + (u32)(memes2))); - gLastUsedItem = *memes3 = gBattleMons[gBankTarget].item; + u16* changedItem; + GET_CHANGED_ITEM_PTR_VIA_MEME_ACCESS(gBankAttacker, changedItem); + gLastUsedItem = *changedItem = gBattleMons[gBankTarget].item; // A sane representation of this would simply be: - // gLastUsedItem = gBattleStruct->field_D0[gBankAttacker] = gBattleMons[gBankTarget].item; + // gLastUsedItem = gBattleStruct->changedItems[gBankAttacker] = gBattleMons[gBankTarget].item; gBattleMons[gBankTarget].item = 0; @@ -4269,6 +4277,7 @@ void atk47_setgraphicalstatchangevalues(void) gBattlescriptCurrInstr++; } +#ifdef NONMATCHING void atk48_playstatchangeanimation(void) { u32 currStat = 0; @@ -4358,3 +4367,548 @@ void atk48_playstatchangeanimation(void) gBattlescriptCurrInstr += 4; } } +#else +__attribute__((naked)) +void atk48_playstatchangeanimation(void) +{ + asm("\n\ + .syntax unified\n\ + push {r4-r7,lr}\n\ + mov r7, r10\n\ + mov r6, r9\n\ + mov r5, r8\n\ + push {r5-r7}\n\ + sub sp, 0x4\n\ + movs r7, 0\n\ + movs r0, 0\n\ + mov r8, r0\n\ + movs r3, 0\n\ + ldr r5, =gBattlescriptCurrInstr\n\ + ldr r0, [r5]\n\ + ldrb r0, [r0, 0x1]\n\ + str r3, [sp]\n\ + bl GetBattleBank\n\ + ldr r2, =gActiveBank\n\ + strb r0, [r2]\n\ + ldr r0, [r5]\n\ + ldrb r4, [r0, 0x2]\n\ + ldrb r1, [r0, 0x3]\n\ + movs r0, 0x1\n\ + ands r0, r1\n\ + ldr r3, [sp]\n\ + cmp r0, 0\n\ + beq _0804BAEC\n\ + movs r0, 0x2\n\ + ands r0, r1\n\ + movs r1, 0x15\n\ + cmp r0, 0\n\ + beq _0804BA18\n\ + movs r1, 0x2D\n\ +_0804BA18:\n\ + cmp r4, 0\n\ + beq _0804BAC0\n\ + movs r0, 0x1\n\ + mov r10, r0\n\ + ldr r0, =gBattleMons + 0x18\n\ + mov r9, r0\n\ + lsls r5, r1, 16\n\ +_0804BA26:\n\ + adds r0, r4, 0\n\ + mov r1, r10\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _0804BAB2\n\ + ldr r0, =gBattlescriptCurrInstr\n\ + ldr r0, [r0]\n\ + ldrb r1, [r0, 0x3]\n\ + movs r0, 0x8\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _0804BA58\n\ + ldr r0, =gActiveBank\n\ + ldrb r1, [r0]\n\ + movs r0, 0x58\n\ + muls r0, r1\n\ + adds r0, r7, r0\n\ + b _0804BAA0\n\ + .pool\n\ +_0804BA58:\n\ + ldr r6, =gActiveBank\n\ + ldrb r0, [r6]\n\ + str r3, [sp]\n\ + bl GetBankIdentity\n\ + mov r1, r10\n\ + ands r1, r0\n\ + lsls r0, r1, 1\n\ + adds r0, r1\n\ + lsls r0, 2\n\ + ldr r1, =gSideTimers\n\ + adds r0, r1\n\ + ldrb r0, [r0, 0x4]\n\ + ldr r3, [sp]\n\ + cmp r0, 0\n\ + bne _0804BAB2\n\ + ldr r0, =gBattleMons\n\ + ldrb r2, [r6]\n\ + movs r1, 0x58\n\ + muls r2, r1\n\ + adds r0, r2, r0\n\ + adds r0, 0x20\n\ + ldrb r0, [r0]\n\ + cmp r0, 0x1D\n\ + beq _0804BAB2\n\ + cmp r0, 0x49\n\ + beq _0804BAB2\n\ + cmp r0, 0x33\n\ + bne _0804BA96\n\ + cmp r7, 0x6\n\ + beq _0804BAB2\n\ +_0804BA96:\n\ + cmp r0, 0x34\n\ + bne _0804BA9E\n\ + cmp r7, 0x1\n\ + beq _0804BAB2\n\ +_0804BA9E:\n\ + adds r0, r7, r2\n\ +_0804BAA0:\n\ + add r0, r9\n\ + ldrb r0, [r0]\n\ + lsls r0, 24\n\ + asrs r0, 24\n\ + cmp r0, 0\n\ + ble _0804BAB2\n\ + lsrs r0, r5, 16\n\ + mov r8, r0\n\ + adds r3, 0x1\n\ +_0804BAB2:\n\ + lsrs r4, 1\n\ + movs r1, 0x80\n\ + lsls r1, 9\n\ + adds r5, r1\n\ + adds r7, 0x1\n\ + cmp r4, 0\n\ + bne _0804BA26\n\ +_0804BAC0:\n\ + ldr r0, =gBattlescriptCurrInstr\n\ + mov r9, r0\n\ + cmp r3, 0x1\n\ + ble _0804BB4E\n\ + ldr r0, [r0]\n\ + ldrb r1, [r0, 0x3]\n\ + movs r0, 0x2\n\ + ands r0, r1\n\ + movs r1, 0x39\n\ + mov r8, r1\n\ + cmp r0, 0\n\ + beq _0804BB4E\n\ + movs r0, 0x3A\n\ + b _0804BB4C\n\ + .pool\n\ +_0804BAEC:\n\ + movs r0, 0x2\n\ + ands r0, r1\n\ + movs r1, 0xE\n\ + cmp r0, 0\n\ + beq _0804BAF8\n\ + movs r1, 0x26\n\ +_0804BAF8:\n\ + mov r9, r5\n\ + cmp r4, 0\n\ + beq _0804BB34\n\ + ldr r6, =gBattleMons + 0x18\n\ + adds r5, r2, 0\n\ + lsls r2, r1, 16\n\ +_0804BB04:\n\ + movs r0, 0x1\n\ + ands r0, r4\n\ + cmp r0, 0\n\ + beq _0804BB26\n\ + ldrb r1, [r5]\n\ + movs r0, 0x58\n\ + muls r0, r1\n\ + adds r0, r7, r0\n\ + adds r0, r6\n\ + ldrb r0, [r0]\n\ + lsls r0, 24\n\ + asrs r0, 24\n\ + cmp r0, 0xB\n\ + bgt _0804BB26\n\ + lsrs r1, r2, 16\n\ + mov r8, r1\n\ + adds r3, 0x1\n\ +_0804BB26:\n\ + lsrs r4, 1\n\ + movs r0, 0x80\n\ + lsls r0, 9\n\ + adds r2, r0\n\ + adds r7, 0x1\n\ + cmp r4, 0\n\ + bne _0804BB04\n\ +_0804BB34:\n\ + cmp r3, 0x1\n\ + ble _0804BB4E\n\ + mov r1, r9\n\ + ldr r0, [r1]\n\ + ldrb r1, [r0, 0x3]\n\ + movs r0, 0x2\n\ + ands r0, r1\n\ + movs r1, 0x37\n\ + mov r8, r1\n\ + cmp r0, 0\n\ + beq _0804BB4E\n\ + movs r0, 0x38\n\ +_0804BB4C:\n\ + mov r8, r0\n\ +_0804BB4E:\n\ + mov r1, r9\n\ + ldr r2, [r1]\n\ + ldrb r1, [r2, 0x3]\n\ + movs r0, 0x4\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _0804BB6C\n\ + cmp r3, 0x1\n\ + bgt _0804BB6C\n\ + adds r0, r2, 0x4\n\ + mov r1, r9\n\ + b _0804BBBA\n\ + .pool\n\ +_0804BB6C:\n\ + cmp r3, 0\n\ + beq _0804BBB4\n\ + ldr r4, =gBattleScripting\n\ + ldrb r0, [r4, 0x1B]\n\ + cmp r0, 0\n\ + bne _0804BBB4\n\ + movs r0, 0\n\ + movs r1, 0x1\n\ + mov r2, r8\n\ + str r3, [sp]\n\ + bl EmitBattleAnimation\n\ + ldr r0, =gActiveBank\n\ + ldrb r0, [r0]\n\ + bl MarkBufferBankForExecution\n\ + ldr r0, =gBattlescriptCurrInstr\n\ + ldr r0, [r0]\n\ + ldrb r1, [r0, 0x3]\n\ + movs r0, 0x4\n\ + ands r0, r1\n\ + ldr r3, [sp]\n\ + cmp r0, 0\n\ + beq _0804BBA4\n\ + cmp r3, 0x1\n\ + ble _0804BBA4\n\ + movs r0, 0x1\n\ + strb r0, [r4, 0x1B]\n\ +_0804BBA4:\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + b _0804BBB6\n\ + .pool\n\ +_0804BBB4:\n\ + mov r1, r9\n\ +_0804BBB6:\n\ + ldr r0, [r1]\n\ + adds r0, 0x4\n\ +_0804BBBA:\n\ + str r0, [r1]\n\ + add sp, 0x4\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\ + .syntax divided"); +} +#endif // NONMATCHING + +#define ATK49_LAST_CASE 17 + +void atk49_moveend(void) +{ + s32 i; + bool32 effect; + u8 moveType; + u8 holdEffectAtk; + u16 *choicedMoveAtk; + u8 arg1, arg2; + u16 lastMove; + + effect = FALSE; + + if (gLastUsedMove == 0xFFFF) + lastMove = 0; + else + lastMove = gLastUsedMove; + + arg1 = gBattlescriptCurrInstr[1]; + arg2 = gBattlescriptCurrInstr[2]; + + if (gBattleMons[gBankAttacker].item == ITEM_ENIGMA_BERRY) + holdEffectAtk = gEnigmaBerries[gBankAttacker].holdEffect; + else + holdEffectAtk = ItemId_GetHoldEffect(gBattleMons[gBankAttacker].item); + + choicedMoveAtk = &gBattleStruct->choicedMove[gBankAttacker]; + + GET_MOVE_TYPE(gCurrentMove, moveType); + + do + { + switch (gBattleScripting.atk49_state) + { + case 0: // rage check + if (gBattleMons[gBankTarget].status2 & STATUS2_RAGE + && gBattleMons[gBankTarget].hp != 0 && gBankAttacker != gBankTarget + && GetBankSide(gBankAttacker) != GetBankSide(gBankTarget) + && !(gBattleMoveFlags & MOVESTATUS_NOEFFECT) && TARGET_TURN_DAMAGED + && gBattleMoves[gCurrentMove].power && gBattleMons[gBankTarget].statStages[STAT_STAGE_ATK] <= 0xB) + { + gBattleMons[gBankTarget].statStages[STAT_STAGE_ATK]++; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_RageIsBuilding; + effect = TRUE; + } + gBattleScripting.atk49_state++; + break; + case 1: // defrosting check + if (gBattleMons[gBankTarget].status1 & STATUS_FREEZE + && gBattleMons[gBankTarget].hp != 0 && gBankAttacker != gBankTarget + && gSpecialStatuses[gBankTarget].moveturnLostHP_special + && !(gBattleMoveFlags & MOVESTATUS_NOEFFECT) && moveType == TYPE_FIRE) + { + gBattleMons[gBankTarget].status1 &= ~(STATUS_FREEZE); + gActiveBank = gBankTarget; + EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gBankTarget].status1); + MarkBufferBankForExecution(gActiveBank); + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_DefrostedViaFireMove; + effect = TRUE; + } + gBattleScripting.atk49_state++; + break; + case 2: // target synchronize + if (AbilityBattleEffects(ABILITYEFFECT_SYNCHRONIZE, gBankTarget, 0, 0, 0)) + effect = TRUE; + gBattleScripting.atk49_state++; + break; + case 3: // contact abilities + if (AbilityBattleEffects(ABILITYEFFECT_CONTACT, gBankTarget, 0, 0, 0)) + effect = TRUE; + gBattleScripting.atk49_state++; + break; + case 4: // status immunities + if (AbilityBattleEffects(ABILITYEFFECT_IMMUNITY, 0, 0, 0, 0)) + effect = TRUE; // it loops through all banks, so we increment after its done with all banks + else + gBattleScripting.atk49_state++; + break; + case 5: // attacker synchronize + if (AbilityBattleEffects(ABILITYEFFECT_ATK_SYNCHRONIZE, gBankAttacker, 0, 0, 0)) + effect = TRUE; + gBattleScripting.atk49_state++; + break; + case 6: // update choice band move + if (!(gHitMarker & HITMARKER_OBEYS) || holdEffectAtk != HOLD_EFFECT_CHOICE_BAND + || gLastUsedMove == MOVE_STRUGGLE || (*choicedMoveAtk != 0 && *choicedMoveAtk != 0xFFFF)) + goto LOOP; + if (gLastUsedMove == MOVE_BATON_PASS && !(gBattleMoveFlags & MOVESTATUS_FAILED)) + { + gBattleScripting.atk49_state++; + break; + } + *choicedMoveAtk = gLastUsedMove; + LOOP: + { + for (i = 0; i < 4; i++) + { + if (gBattleMons[gBankAttacker].moves[i] == *choicedMoveAtk) + break; + } + if (i == 4) + *choicedMoveAtk = 0; + + gBattleScripting.atk49_state++; + } + break; + case 7: // changed held items + for (i = 0; i < gNoOfAllBanks; i++) + { + u16* changedItem; + GET_CHANGED_ITEM_PTR_VIA_MEME_ACCESS(i, changedItem); + if (*changedItem != 0) + { + gBattleMons[i].item = *changedItem; + *changedItem = 0; + } + } + gBattleScripting.atk49_state++; + break; + case 11: // item effects for all banks + if (ItemBattleEffects(3, 0, FALSE)) + effect = TRUE; + else + gBattleScripting.atk49_state++; + break; + case 12: // king's rock and shell bell + if (ItemBattleEffects(4, 0, FALSE)) + effect = TRUE; + gBattleScripting.atk49_state++; + break; + case 8: // make attacker sprite invisible + if (gStatuses3[gBankAttacker] & (STATUS3_SEMI_INVULNERABLE) + && gHitMarker & HITMARKER_NO_ANIMATIONS) + { + gActiveBank = gBankAttacker; + EmitSpriteInvisibility(0, TRUE); + MarkBufferBankForExecution(gActiveBank); + gBattleScripting.atk49_state++; + return; + } + gBattleScripting.atk49_state++; + break; + case 9: // make attacker sprite visible + if (gBattleMoveFlags & MOVESTATUS_NOEFFECT + || !(gStatuses3[gBankAttacker] & (STATUS3_SEMI_INVULNERABLE)) + || HasMoveFailed(gBankAttacker)) + { + gActiveBank = gBankAttacker; + EmitSpriteInvisibility(0, FALSE); + MarkBufferBankForExecution(gActiveBank); + gStatuses3[gBankAttacker] &= ~(STATUS3_SEMI_INVULNERABLE); + gSpecialStatuses[gBankAttacker].restoredBankSprite = 1; + gBattleScripting.atk49_state++; + return; + } + gBattleScripting.atk49_state++; + break; + case 10: // make target sprite visible + if (!gSpecialStatuses[gBankTarget].restoredBankSprite && gBankTarget < gNoOfAllBanks + && !(gStatuses3[gBankTarget] & STATUS3_SEMI_INVULNERABLE)) + { + gActiveBank = gBankTarget; + EmitSpriteInvisibility(0, FALSE); + MarkBufferBankForExecution(gActiveBank); + gStatuses3[gBankTarget] &= ~(STATUS3_SEMI_INVULNERABLE); + gBattleScripting.atk49_state++; + return; + } + gBattleScripting.atk49_state++; + break; + case 13: // update substitute + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gDisableStructs[i].substituteHP == 0) + gBattleMons[i].status2 &= ~(STATUS2_SUBSTITUTE); + } + gBattleScripting.atk49_state++; + break; + case 14: // This case looks interesting, although I am not certain what it does. Probably fine tunes edge cases. + if (gHitMarker & HITMARKER_PURSUIT_TRAP) + { + gActiveBank = gBankAttacker; + gBankAttacker = gBankTarget; + gBankTarget = gActiveBank; + gHitMarker &= ~(HITMARKER_PURSUIT_TRAP); + } + if (gHitMarker & HITMARKER_ATTACKSTRING_PRINTED) + { + gUnknownMovesUsedByBanks[gBankAttacker] = gLastUsedMove; + } + if (!(gAbsentBankFlags & gBitTable[gBankAttacker]) + && !(gBattleStruct->field_91 & gBitTable[gBankAttacker]) + && gBattleMoves[lastMove].effect != EFFECT_BATON_PASS) + { + if (gHitMarker & HITMARKER_OBEYS) + { + gLastUsedMovesByBanks[gBankAttacker] = gLastUsedMove; + gUnknown_02024260[gBankAttacker] = gCurrentMove; + } + else + { + gLastUsedMovesByBanks[gBankAttacker] = 0xFFFF; + gUnknown_02024260[gBankAttacker] = 0xFFFF; + } + + if (!(gHitMarker & HITMARKER_FAINTED(gBankTarget))) + gUnknown_02024270[gBankTarget] = gBankAttacker; + + if (gHitMarker & HITMARKER_OBEYS && !(gBattleMoveFlags & MOVESTATUS_NOEFFECT)) + { + if (gLastUsedMove == 0xFFFF) + { + gUnknown_02024250[gBankTarget] = gLastUsedMove; + } + else + { + gUnknown_02024250[gBankTarget] = gCurrentMove; + GET_MOVE_TYPE(gCurrentMove, gUnknown_02024258[gBankTarget]); + } + } + else + { + gUnknown_02024250[gBankTarget] = 0xFFFF; + } + } + gBattleScripting.atk49_state++; + break; + case 15: // mirror move + if (!(gAbsentBankFlags & gBitTable[gBankAttacker]) && !(gBattleStruct->field_91 & gBitTable[gBankAttacker]) + && gBattleMoves[lastMove].flags & FLAG_MIRROR_MOVE_AFFECTED && gHitMarker & HITMARKER_OBEYS + && gBankAttacker != gBankTarget && !(gHitMarker & HITMARKER_FAINTED(gBankTarget)) + && !(gBattleMoveFlags & MOVESTATUS_NOEFFECT)) + { + u8 target, attacker; + + *(gBattleStruct->mirrorMoves + gBankTarget * 2 + 0) = gLastUsedMove; + *(gBattleStruct->mirrorMoves + gBankTarget * 2 + 1) = gLastUsedMove >> 8; + + target = gBankTarget; + attacker = gBankAttacker; + *(attacker * 2 + target * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = gLastUsedMove; + + target = gBankTarget; + attacker = gBankAttacker; + *(attacker * 2 + target * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 1) = gLastUsedMove >> 8; + } + gBattleScripting.atk49_state++; + break; + case 16: // + if (!(gHitMarker & HITMARKER_UNABLE_TO_USE_MOVE) && gBattleTypeFlags & BATTLE_TYPE_DOUBLE + && !gProtectStructs[gBankAttacker].chargingTurn && gBattleMoves[gCurrentMove].target == MOVE_TARGET_BOTH + && !(gHitMarker & HITMARKER_NO_ATTACKSTRING)) + { + u8 bank = GetBankByPlayerAI(GetBankIdentity(gBankTarget) ^ 2); + if (gBattleMons[bank].hp != 0) + { + gBankTarget = bank; + gHitMarker |= HITMARKER_NO_ATTACKSTRING; + gBattleScripting.atk49_state = 0; + MoveValuesCleanUp(); + BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]); + gBattlescriptCurrInstr = gUnknown_082DB87D; + return; + } + else + { + gHitMarker |= HITMARKER_NO_ATTACKSTRING; + } + } + gBattleScripting.atk49_state++; + break; + case ATK49_LAST_CASE: + break; + } + + if (arg1 == 1 && effect == FALSE) + gBattleScripting.atk49_state = ATK49_LAST_CASE; + if (arg1 == 2 && arg2 == gBattleScripting.atk49_state) + gBattleScripting.atk49_state = ATK49_LAST_CASE; + + } while (gBattleScripting.atk49_state != ATK49_LAST_CASE && effect == FALSE); + + if (gBattleScripting.atk49_state == ATK49_LAST_CASE && effect == FALSE) + gBattlescriptCurrInstr += 3; +} + diff --git a/sym_ewram.txt b/sym_ewram.txt index 616b1ca80..bc7392885 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -334,7 +334,7 @@ gUnknown_020241E9: @ 20241E9 gCurrentMove: @ 20241EA .space 0x2 -gUnknown_020241EC: @ 20241EC +gLastUsedMove: @ 20241EC .space 0x2 gRandomMove: @ 20241EE @@ -391,7 +391,7 @@ gUnknown_02024220: @ 2024220 gUnknown_02024230: @ 2024230 .space 0x10 -gUnknown_02024240: @ 2024240 +gUnknownMovesUsedByBanks: @ 2024240 .space 0x8 gLastUsedMovesByBanks: @ 2024248 From 898d0b20ad524e2837079a50f33f6fae0e72b685 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 24 Sep 2017 00:29:52 +0200 Subject: [PATCH 282/342] up to x50 --- asm/battle_2.s | 20 +- asm/battle_4.s | 1130 +--------------------------------- asm/pokemon_item_effect.s | 2 +- asm/rom3.s | 30 +- include/battle.h | 21 +- include/battle_controllers.h | 4 + include/pokemon.h | 3 + src/battle_3.c | 2 - src/battle_4.c | 368 +++++++++++ src/pokemon_3.c | 4 +- 10 files changed, 422 insertions(+), 1162 deletions(-) diff --git a/asm/battle_2.s b/asm/battle_2.s index 61ee83101..cc387f1a8 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -6678,8 +6678,8 @@ _0803A1E4: .pool thumb_func_end sub_8039F40 - thumb_func_start sub_803A284 -sub_803A284: @ 803A284 + thumb_func_start SwitchInClearStructs +SwitchInClearStructs: @ 803A284 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -7254,7 +7254,7 @@ _0803A6B4: pop {r0} bx r0 .pool - thumb_func_end sub_803A284 + thumb_func_end SwitchInClearStructs thumb_func_start UndoEffectsAfterFainting UndoEffectsAfterFainting: @ 803A75C @@ -7806,7 +7806,7 @@ _0803ABD4: movs r0, 0 movs r1, 0 movs r2, 0 - bl dp01_build_cmdbuf_x00_a_b_0 + bl EmitGetAttributes ldrb r0, [r4] bl MarkBufferBankForExecution ldrb r0, [r5] @@ -8947,7 +8947,7 @@ _0803B5B2: ldrb r1, [r0] movs r0, 0 movs r2, 0 - bl dp01_build_cmdbuf_x05_a_b_c + bl EmitSwitchInAnim ldrb r0, [r4] bl MarkBufferBankForExecution _0803B5D4: @@ -10488,7 +10488,7 @@ _0803C374: str r0, [sp] movs r0, 0 movs r2, 0x6 - bl dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f + bl EmitChoosePokemon b _0803C42E .pool _0803C3B0: @@ -10531,7 +10531,7 @@ _0803C3EE: movs r1, 0 _0803C400: movs r3, 0 - bl dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f + bl EmitChoosePokemon b _0803C42E .pool _0803C410: @@ -10548,7 +10548,7 @@ _0803C410: movs r1, 0 movs r2, 0x6 movs r3, 0 - bl dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f + bl EmitChoosePokemon _0803C42E: ldr r0, =gActiveBank ldrb r0, [r0] @@ -11287,14 +11287,14 @@ _0803CB3C: movs r0, 0 movs r1, 0 adds r2, r4, 0 - bl sub_8034464 + bl EmitLinkStandbyMsg b _0803CB66 .pool _0803CB5C: movs r0, 0 movs r1, 0x1 adds r2, r4, 0 - bl sub_8034464 + bl EmitLinkStandbyMsg _0803CB66: ldr r4, =gActiveBank _0803CB68: diff --git a/asm/battle_4.s b/asm/battle_4.s index c2654ad64..8c3a0ea7e 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -5,1108 +5,6 @@ .text - thumb_func_start atk4A_typecalc2 -atk4A_typecalc2: @ 804C5F4 - push {r4-r7,lr} - mov r7, r8 - push {r7} - movs r4, 0 - movs r5, 0 - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x2] - mov r8, r0 - ldr r2, =gBattleMons - ldr r3, =gBankTarget - ldrb r1, [r3] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x20 - ldrb r0, [r0] - mov r12, r2 - adds r7, r3, 0 - cmp r0, 0x1A - bne _0804C688 - mov r1, r8 - cmp r1, 0x4 - bne _0804C688 - ldr r3, =gLastUsedAbility - strb r0, [r3] - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x9 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gUnknown_02024250 - ldrb r0, [r7] - lsls r0, 1 - adds r0, r1 - strh r4, [r0] - ldr r0, =gBattleCommunication - mov r2, r8 - strb r2, [r0, 0x6] - ldrb r0, [r7] - ldrb r1, [r3] - bl RecordAbilityBattle - b _0804C76A - .pool -_0804C678: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r2, 0x8 - orrs r1, r2 - strb r1, [r0] - b _0804C76A - .pool -_0804C688: - ldr r1, =gTypeEffectiveness - adds r0, r5, r1 - ldrb r0, [r0] - adds r6, r1, 0 - b _0804C74A - .pool -_0804C698: - adds r0, r5, r6 - ldrb r0, [r0] - cmp r0, r8 - bne _0804C744 - adds r2, r5, 0x1 - adds r3, r2, r6 - ldrb r1, [r7] - movs r0, 0x58 - muls r0, r1 - add r0, r12 - adds r0, 0x21 - ldrb r1, [r3] - adds r3, r2, 0 - ldrb r0, [r0] - cmp r1, r0 - bne _0804C6D6 - adds r0, r5, 0x2 - adds r0, r6 - ldrb r1, [r0] - cmp r1, 0 - beq _0804C678 - cmp r1, 0x5 - bne _0804C6CA - movs r0, 0x4 - orrs r4, r0 -_0804C6CA: - cmp r1, 0x14 - bne _0804C6D6 - movs r0, 0x2 - orrs r4, r0 - lsls r0, r4, 24 - lsrs r4, r0, 24 -_0804C6D6: - adds r2, r3, r6 - ldrb r1, [r7] - movs r0, 0x58 - muls r0, r1 - add r0, r12 - adds r1, r0, 0 - adds r1, 0x22 - ldrb r2, [r2] - ldrb r1, [r1] - cmp r2, r1 - bne _0804C744 - adds r0, 0x21 - ldrb r1, [r0] - cmp r1, r2 - beq _0804C6FE - adds r0, r5, 0x2 - adds r0, r6 - ldrb r0, [r0] - cmp r0, 0 - beq _0804C678 -_0804C6FE: - cmp r1, r2 - beq _0804C714 - adds r0, r5, 0x2 - adds r0, r6 - ldrb r0, [r0] - cmp r0, 0x5 - bne _0804C714 - movs r0, 0x4 - orrs r4, r0 - lsls r0, r4, 24 - lsrs r4, r0, 24 -_0804C714: - adds r2, r3, r6 - ldrb r1, [r7] - movs r0, 0x58 - muls r0, r1 - add r0, r12 - adds r1, r0, 0 - adds r1, 0x22 - ldrb r2, [r2] - ldrb r1, [r1] - cmp r2, r1 - bne _0804C744 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, r2 - beq _0804C744 - adds r0, r5, 0x2 - adds r0, r6 - ldrb r0, [r0] - cmp r0, 0x14 - bne _0804C744 - movs r0, 0x2 - orrs r4, r0 - lsls r0, r4, 24 - lsrs r4, r0, 24 -_0804C744: - adds r5, 0x3 - adds r0, r5, r6 - ldrb r0, [r0] -_0804C74A: - cmp r0, 0xFF - beq _0804C76A - cmp r0, 0xFE - bne _0804C698 - ldrb r1, [r7] - movs r0, 0x58 - muls r0, r1 - mov r1, r12 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 22 - ands r0, r1 - cmp r0, 0 - beq _0804C744 -_0804C76A: - ldr r2, =gBattleMons - ldr r0, =gBankTarget - mov r8, r0 - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x20 - ldrb r6, [r0] - cmp r6, 0x19 - bne _0804C7E6 - movs r5, 0x29 - ands r5, r4 - cmp r5, 0 - bne _0804C7E6 - ldr r0, =gBankAttacker - ldrb r0, [r0] - ldr r7, =gCurrentMove - ldrh r1, [r7] - bl AttacksThisTurn - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0x2 - bne _0804C7E6 - adds r0, r4, 0 - ands r0, r1 - cmp r0, 0 - beq _0804C7AC - movs r0, 0x6 - ands r4, r0 - cmp r4, 0x6 - bne _0804C7E6 -_0804C7AC: - ldr r2, =gBattleMoves - ldrh r1, [r7] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - cmp r0, 0 - beq _0804C7E6 - ldr r3, =gLastUsedAbility - strb r6, [r3] - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gUnknown_02024250 - mov r2, r8 - ldrb r0, [r2] - lsls r0, 1 - adds r0, r1 - strh r5, [r0] - ldr r1, =gBattleCommunication - movs r0, 0x3 - strb r0, [r1, 0x6] - ldrb r0, [r2] - ldrb r1, [r3] - bl RecordAbilityBattle -_0804C7E6: - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x8 - ands r0, r1 - cmp r0, 0 - beq _0804C804 - ldr r2, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r1, 4 - adds r1, r2 - ldrb r0, [r1, 0x1] - movs r2, 0x2 - orrs r0, r2 - strb r0, [r1, 0x1] -_0804C804: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk4A_typecalc2 - - thumb_func_start atk4B_return_atk_to_ball -atk4B_return_atk_to_ball: @ 804C844 - push {r4,lr} - ldr r4, =gActiveBank - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r4] - ldr r2, =gHitMarker - ldr r1, =gBitTable - ldrb r0, [r4] - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - lsls r1, 28 - ldr r0, [r2] - ands r0, r1 - cmp r0, 0 - bne _0804C872 - movs r0, 0 - movs r1, 0 - bl dp01_build_cmdbuf_x06_a - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0804C872: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk4B_return_atk_to_ball - - thumb_func_start atk4C_copy_poke_data -atk4C_copy_poke_data: @ 804C894 - push {r4,r5,lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0804C8E4 - ldr r5, =gBattlescriptCurrInstr - ldr r0, [r5] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r4, =gActiveBank - strb r0, [r4] - ldr r3, =gBattlePartyID - ldrb r0, [r4] - lsls r2, r0, 1 - adds r2, r3 - ldr r1, =gBattleStruct - ldr r1, [r1] - adds r0, r1 - adds r0, 0x5C - ldrb r0, [r0] - strh r0, [r2] - ldr r1, =gBitTable - ldrb r0, [r4] - lsls r0, 1 - adds r0, r3 - ldrh r0, [r0] - lsls r0, 2 - adds r0, r1 - ldrb r2, [r0] - movs r0, 0 - movs r1, 0 - bl dp01_build_cmdbuf_x00_a_b_0 - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r0, [r5] - adds r0, 0x2 - str r0, [r5] -_0804C8E4: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk4C_copy_poke_data - - thumb_func_start atk4D_switch_data_update -atk4D_switch_data_update: @ 804C904 - push {r4-r7,lr} - sub sp, 0x58 - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - beq _0804C912 - b _0804CAA4 -_0804C912: - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r4, =gActiveBank - strb r0, [r4] - ldr r6, =gBattleMons - ldrb r0, [r4] - movs r5, 0x58 - adds r1, r0, 0 - muls r1, r5 - adds r1, r6 - mov r0, sp - movs r2, 0x58 - bl memcpy - ldrb r0, [r4] - muls r0, r5 - adds r3, r0, r6 - movs r2, 0 - ldr r5, =gBattleBufferB -_0804C93E: - adds r0, r3, r2 - ldrb r1, [r4] - lsls r1, 9 - adds r1, 0x4 - adds r1, r2, r1 - adds r1, r5 - ldrb r1, [r1] - strb r1, [r0] - adds r2, 0x1 - cmp r2, 0x57 - bls _0804C93E - ldr r4, =gBattleMons - ldr r6, =gActiveBank - ldrb r0, [r6] - movs r7, 0x58 - adds r2, r0, 0 - muls r2, r7 - adds r2, r4 - ldr r3, =gBaseStats - ldrh r1, [r2] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r3 - ldrb r0, [r0, 0x6] - adds r2, 0x21 - strb r0, [r2] - ldrb r0, [r6] - adds r1, r0, 0 - muls r1, r7 - adds r1, r4 - ldrh r2, [r1] - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r3 - ldrb r0, [r0, 0x7] - adds r1, 0x22 - strb r0, [r1] - ldrb r0, [r6] - adds r1, r0, 0 - muls r1, r7 - adds r1, r4 - ldrh r0, [r1] - ldrb r1, [r1, 0x17] - lsrs r1, 7 - bl GetAbilityBySpecies - ldrb r1, [r6] - muls r1, r7 - adds r1, r4 - adds r1, 0x20 - strb r0, [r1] - ldrb r0, [r6] - bl GetBankSide - lsls r0, 24 - lsrs r2, r0, 24 - ldr r0, =gWishFutureKnock - adds r0, 0x29 - adds r0, r2, r0 - ldrb r1, [r0] - ldr r3, =gBitTable - ldr r2, =gBattlePartyID - ldrb r5, [r6] - lsls r0, r5, 1 - adds r0, r2 - ldrh r0, [r0] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - ands r1, r0 - mov r12, r4 - cmp r1, 0 - beq _0804C9DE - adds r0, r5, 0 - muls r0, r7 - add r0, r12 - movs r1, 0 - strh r1, [r0, 0x2E] -_0804C9DE: - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - cmp r0, 0x7F - bne _0804CA26 - movs r2, 0 - adds r4, r6, 0 - movs r6, 0x58 - mov r5, r12 - adds r5, 0x18 - add r3, sp, 0x18 -_0804C9FE: - ldrb r0, [r4] - adds r1, r0, 0 - muls r1, r6 - adds r1, r2, r1 - adds r1, r5 - adds r0, r3, r2 - ldrb r0, [r0] - strb r0, [r1] - adds r2, 0x1 - cmp r2, 0x7 - ble _0804C9FE - ldr r0, =gActiveBank - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - mov r1, r12 - adds r1, 0x50 - adds r0, r1 - ldr r1, [sp, 0x50] - str r1, [r0] -_0804CA26: - bl sub_803A284 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 10 - ands r0, r1 - cmp r0, 0 - beq _0804CA78 - ldr r4, =gBattleMons - ldr r0, =gActiveBank - ldrb r3, [r0] - movs r0, 0x58 - adds r2, r3, 0 - muls r2, r0 - adds r1, r2, r4 - ldrh r0, [r1, 0x2C] - lsrs r0, 1 - ldrh r1, [r1, 0x28] - cmp r0, r1 - bcc _0804CA78 - cmp r1, 0 - beq _0804CA78 - adds r0, r4, 0 - adds r0, 0x4C - adds r0, r2, r0 - ldr r0, [r0] - movs r1, 0x7 - ands r0, r1 - cmp r0, 0 - bne _0804CA78 - ldr r0, =gBattleStruct - ldr r2, [r0] - adds r2, 0x92 - ldr r1, =gBitTable - lsls r0, r3, 2 - adds r0, r1 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] -_0804CA78: - ldr r0, =gBattleScripting - ldr r3, =gActiveBank - ldrb r2, [r3] - strb r2, [r0, 0x17] - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x7 - strb r0, [r1, 0x1] - strb r2, [r1, 0x2] - ldr r2, =gBattlePartyID - ldrb r0, [r3] - lsls r0, 1 - adds r0, r2 - ldrh r0, [r0] - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] -_0804CAA4: - add sp, 0x58 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk4D_switch_data_update - - thumb_func_start atk4E_switchin_anim -atk4E_switchin_anim: @ 804CAE8 - push {r4-r6,lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0804CB86 - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r6, =gActiveBank - strb r0, [r6] - ldrb r0, [r6] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0804CB3E - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ldr r1, =0x063f0902 - ands r0, r1 - cmp r0, 0 - bne _0804CB3E - ldr r4, =gBattleMons - ldrb r0, [r6] - movs r5, 0x58 - muls r0, r5 - adds r0, r4 - ldrh r0, [r0] - bl SpeciesToNationalPokedexNum - lsls r0, 16 - lsrs r0, 16 - ldrb r1, [r6] - muls r1, r5 - adds r4, 0x48 - adds r1, r4 - ldr r2, [r1] - movs r1, 0x2 - bl HandleSetPokedexFlag -_0804CB3E: - ldr r2, =gAbsentBankFlags - ldr r1, =gBitTable - ldr r5, =gActiveBank - ldrb r0, [r5] - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - ldrb r0, [r2] - bics r0, r1 - strb r0, [r2] - ldr r1, =gBattlePartyID - ldrb r0, [r5] - lsls r0, 1 - adds r0, r1 - ldrb r1, [r0] - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r2, [r0, 0x2] - movs r0, 0 - bl dp01_build_cmdbuf_x05_a_b_c - ldrb r0, [r5] - bl MarkBufferBankForExecution - ldr r0, [r4] - adds r0, 0x3 - str r0, [r4] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 11 - ands r0, r1 - cmp r0, 0 - beq _0804CB86 - bl sub_81A56B4 -_0804CB86: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atk4E_switchin_anim - - thumb_func_start atk4F_jump_if_cannot_switch -atk4F_jump_if_cannot_switch: @ 804CBB0 - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r1, [r0, 0x1] - movs r0, 0x7F - ands r0, r1 - bl GetBattleBank - ldr r3, =gActiveBank - strb r0, [r3] - ldr r2, [r4] - ldrb r1, [r2, 0x1] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0804CC28 - ldr r1, =gBattleMons - ldrb r3, [r3] - movs r0, 0x58 - muls r0, r3 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x0400e000 - ands r0, r1 - cmp r0, 0 - bne _0804CBFC - ldr r1, =gStatuses3 - lsls r0, r3, 2 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 3 - ands r0, r1 - cmp r0, 0 - beq _0804CC28 -_0804CBFC: - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _0804CF00 - .pool -_0804CC28: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 15 - ands r0, r1 - cmp r0, 0 - beq _0804CCC0 - ldr r5, =gActiveBank - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gPlayerParty - mov r8, r1 - cmp r0, 0x1 - bne _0804CC4E - ldr r0, =gEnemyParty - mov r8, r0 -_0804CC4E: - movs r4, 0 - ldrb r1, [r5] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _0804CC5C - movs r4, 0x3 -_0804CC5C: - adds r6, r4, 0x3 - cmp r4, r6 - bge _0804CCA4 - ldr r7, =gBattlePartyID -_0804CC64: - movs r0, 0x64 - muls r0, r4 - mov r1, r8 - adds r5, r1, r0 - adds r0, r5, 0 - movs r1, 0xB - bl GetMonData - cmp r0, 0 - beq _0804CC9E - adds r0, r5, 0 - movs r1, 0x2D - bl GetMonData - cmp r0, 0 - bne _0804CC9E - adds r0, r5, 0 - movs r1, 0x39 - bl GetMonData - cmp r0, 0 - beq _0804CC9E - ldr r0, =gActiveBank - ldrb r0, [r0] - lsls r0, 1 - adds r0, r7 - ldrh r0, [r0] - cmp r0, r4 - bne _0804CCA4 -_0804CC9E: - adds r4, 0x1 - cmp r4, r6 - blt _0804CC64 -_0804CCA4: - cmp r4, r6 - bne _0804CCAA - b _0804CED0 -_0804CCAA: - b _0804CEF8 - .pool -_0804CCC0: - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0804CD8C - movs r0, 0x80 - lsls r0, 16 - ands r1, r0 - cmp r1, 0 - beq _0804CD00 - ldr r5, =gActiveBank - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0804CCEC - ldr r0, =gPlayerParty - b _0804CD16 - .pool -_0804CCEC: - ldr r1, =gEnemyParty - mov r8, r1 - ldrb r0, [r5] - movs r4, 0x3 - cmp r0, 0x1 - bne _0804CD32 - movs r4, 0 - b _0804CD32 - .pool -_0804CD00: - ldr r5, =gActiveBank - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gPlayerParty - mov r8, r1 - cmp r0, 0x1 - bne _0804CD18 - ldr r0, =gEnemyParty -_0804CD16: - mov r8, r0 -_0804CD18: - movs r4, 0 - ldrb r0, [r5] - bl sub_806D864 - lsls r0, 24 - lsrs r0, 24 - bl sub_806D82C - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0x1 - bne _0804CD32 - movs r4, 0x3 -_0804CD32: - adds r6, r4, 0x3 - cmp r4, r6 - bge _0804CCA4 - ldr r7, =gBattlePartyID -_0804CD3A: - movs r0, 0x64 - muls r0, r4 - mov r1, r8 - adds r5, r1, r0 - adds r0, r5, 0 - movs r1, 0xB - bl GetMonData - cmp r0, 0 - beq _0804CD74 - adds r0, r5, 0 - movs r1, 0x2D - bl GetMonData - cmp r0, 0 - bne _0804CD74 - adds r0, r5, 0 - movs r1, 0x39 - bl GetMonData - cmp r0, 0 - beq _0804CD74 - ldr r0, =gActiveBank - ldrb r0, [r0] - lsls r0, 1 - adds r0, r7 - ldrh r0, [r0] - cmp r0, r4 - bne _0804CCA4 -_0804CD74: - adds r4, 0x1 - cmp r4, r6 - blt _0804CD3A - b _0804CCA4 - .pool -_0804CD8C: - movs r0, 0x80 - lsls r0, 8 - ands r1, r0 - cmp r1, 0 - beq _0804CE10 - ldr r5, =gActiveBank - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0804CE10 - ldr r0, =gEnemyParty - mov r8, r0 - movs r4, 0 - ldrb r0, [r5] - cmp r0, 0x3 - bne _0804CDB4 - movs r4, 0x3 -_0804CDB4: - adds r6, r4, 0x3 - cmp r4, r6 - blt _0804CDBC - b _0804CCA4 -_0804CDBC: - ldr r7, =gBattlePartyID -_0804CDBE: - movs r0, 0x64 - muls r0, r4 - mov r1, r8 - adds r5, r1, r0 - adds r0, r5, 0 - movs r1, 0xB - bl GetMonData - cmp r0, 0 - beq _0804CDFA - adds r0, r5, 0 - movs r1, 0x2D - bl GetMonData - cmp r0, 0 - bne _0804CDFA - adds r0, r5, 0 - movs r1, 0x39 - bl GetMonData - cmp r0, 0 - beq _0804CDFA - ldr r0, =gActiveBank - ldrb r0, [r0] - lsls r0, 1 - adds r0, r7 - ldrh r0, [r0] - cmp r0, r4 - beq _0804CDFA - b _0804CCA4 -_0804CDFA: - adds r4, 0x1 - cmp r4, r6 - blt _0804CDBE - b _0804CCA4 - .pool -_0804CE10: - ldr r0, =gActiveBank - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x1 - bne _0804CE54 - movs r0, 0x1 - bl GetBankByPlayerAI - lsls r0, 24 - lsrs r7, r0, 24 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ands r0, r4 - cmp r0, 0 - beq _0804CE48 - movs r0, 0x3 - bl GetBankByPlayerAI - lsls r0, 24 - lsrs r6, r0, 24 - b _0804CE4A - .pool -_0804CE48: - adds r6, r7, 0 -_0804CE4A: - ldr r0, =gEnemyParty - mov r8, r0 - b _0804CE82 - .pool -_0804CE54: - movs r0, 0 - bl GetBankByPlayerAI - lsls r0, 24 - lsrs r7, r0, 24 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0804CE7C - movs r0, 0x2 - bl GetBankByPlayerAI - lsls r0, 24 - lsrs r6, r0, 24 - b _0804CE7E - .pool -_0804CE7C: - adds r6, r7, 0 -_0804CE7E: - ldr r1, =gPlayerParty - mov r8, r1 -_0804CE82: - movs r4, 0 -_0804CE84: - movs r0, 0x64 - muls r0, r4 - mov r1, r8 - adds r5, r1, r0 - adds r0, r5, 0 - movs r1, 0x39 - bl GetMonData - cmp r0, 0 - beq _0804CEC6 - adds r0, r5, 0 - movs r1, 0xB - bl GetMonData - cmp r0, 0 - beq _0804CEC6 - adds r0, r5, 0 - movs r1, 0x2D - bl GetMonData - cmp r0, 0 - bne _0804CEC6 - ldr r1, =gBattlePartyID - lsls r0, r7, 1 - adds r0, r1 - ldrh r0, [r0] - cmp r4, r0 - beq _0804CEC6 - lsls r0, r6, 1 - adds r0, r1 - ldrh r0, [r0] - cmp r4, r0 - bne _0804CECC -_0804CEC6: - adds r4, 0x1 - cmp r4, 0x5 - ble _0804CE84 -_0804CECC: - cmp r4, 0x6 - bne _0804CEF8 -_0804CED0: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _0804CF00 - .pool -_0804CEF8: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x6 - str r0, [r1] -_0804CF00: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk4F_jump_if_cannot_switch - - thumb_func_start sub_804CF10 -sub_804CF10: @ 804CF10 - push {r4,r5,lr} - sub sp, 0x4 - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - ldr r5, =gActiveBank - ldrb r0, [r5] - ldr r4, =gBattleStruct - ldr r1, [r4] - adds r1, r0, r1 - adds r1, 0x58 - ldr r3, =gBattlePartyID - lsls r0, 1 - adds r0, r3 - ldrh r0, [r0] - strb r0, [r1] - ldrb r0, [r5] - ldr r1, [r4] - adds r0, r1 - adds r0, 0x5C - movs r1, 0x6 - strb r1, [r0] - ldr r1, [r4] - adds r1, 0x93 - ldr r3, =gBitTable - ldrb r0, [r5] - lsls r0, 2 - adds r0, r3 - ldr r3, [r0] - ldrb r0, [r1] - bics r0, r3 - strb r0, [r1] - ldrb r0, [r5] - lsls r1, r0, 1 - adds r1, r0 - adds r1, 0x60 - ldr r0, [r4] - adds r0, r1 - str r0, [sp] - movs r0, 0 - movs r1, 0x1 - movs r3, 0 - bl dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f - ldrb r0, [r5] - bl MarkBufferBankForExecution - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_804CF10 - thumb_func_start atk50_openpartyscreen atk50_openpartyscreen: @ 804CF88 push {r4-r7,lr} @@ -1192,7 +90,7 @@ _0804CFE2: movs r0, 0 movs r1, 0x2 movs r2, 0 - bl sub_8034464 + bl EmitLinkStandbyMsg ldrb r0, [r4] bl MarkBufferBankForExecution b _0804D098 @@ -1225,7 +123,7 @@ _0804D088: movs r0, 0 movs r1, 0x2 movs r2, 0 - bl sub_8034464 + bl EmitLinkStandbyMsg ldrb r0, [r4] bl MarkBufferBankForExecution _0804D098: @@ -1318,7 +216,7 @@ _0804D15C: movs r0, 0 movs r1, 0x2 movs r2, 0 - bl sub_8034464 + bl EmitLinkStandbyMsg ldrb r0, [r4] bl MarkBufferBankForExecution movs r0, 0x1 @@ -1402,7 +300,7 @@ _0804D214: movs r0, 0 movs r1, 0x2 movs r2, 0 - bl sub_8034464 + bl EmitLinkStandbyMsg ldrb r0, [r4] bl MarkBufferBankForExecution _0804D22E: @@ -1475,7 +373,7 @@ _0804D2CC: movs r0, 0 movs r1, 0x2 movs r2, 0 - bl sub_8034464 + bl EmitLinkStandbyMsg ldrb r0, [r4] bl MarkBufferBankForExecution movs r0, 0x2 @@ -1561,7 +459,7 @@ _0804D388: movs r0, 0 movs r1, 0x2 movs r2, 0 - bl sub_8034464 + bl EmitLinkStandbyMsg ldrb r0, [r4] bl MarkBufferBankForExecution _0804D3A2: @@ -1597,7 +495,7 @@ _0804D3E8: movs r0, 0 movs r1, 0x2 movs r2, 0 - bl sub_8034464 + bl EmitLinkStandbyMsg ldr r0, =gActiveBank ldrb r0, [r0] bl MarkBufferBankForExecution @@ -1634,7 +532,7 @@ _0804D43C: movs r0, 0 movs r1, 0x2 movs r2, 0 - bl sub_8034464 + bl EmitLinkStandbyMsg ldr r0, =gActiveBank ldrb r0, [r0] bl MarkBufferBankForExecution @@ -1964,7 +862,7 @@ _0804D6E0: movs r0, 0 adds r1, r5, 0 movs r3, 0 - bl dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f + bl EmitChoosePokemon ldrb r0, [r4] bl MarkBufferBankForExecution ldr r0, [r6] @@ -2003,7 +901,7 @@ _0804D77C: movs r0, 0 movs r1, 0x2 movs r2, 0 - bl sub_8034464 + bl EmitLinkStandbyMsg ldrb r0, [r4] bl MarkBufferBankForExecution _0804D792: @@ -2045,7 +943,7 @@ _0804D7F4: movs r0, 0 movs r1, 0x2 movs r2, 0 - bl sub_8034464 + bl EmitLinkStandbyMsg ldrb r0, [r4] bl MarkBufferBankForExecution _0804D804: @@ -2825,7 +1723,7 @@ atk58_return_to_ball: @ 804DEB8 strb r0, [r4] movs r0, 0 movs r1, 0x1 - bl dp01_build_cmdbuf_x06_a + bl EmitReturnPokeToBall ldrb r0, [r4] bl MarkBufferBankForExecution ldr r0, [r5] @@ -3829,7 +2727,7 @@ _0804E794: movs r0, 0 movs r1, 0 movs r2, 0 - bl dp01_build_cmdbuf_x00_a_b_0 + bl EmitGetAttributes ldrb r0, [r6] bl MarkBufferBankForExecution ldrb r0, [r5] @@ -6202,7 +5100,7 @@ _0804FCA2: beq _0804FD70 movs r0, 0 movs r1, 0 - bl dp01_build_cmdbuf_x06_a + bl EmitReturnPokeToBall ldrb r0, [r4] bl MarkBufferBankForExecution b _0804FD70 diff --git a/asm/pokemon_item_effect.s b/asm/pokemon_item_effect.s index c798d7753..69895d5d0 100644 --- a/asm/pokemon_item_effect.s +++ b/asm/pokemon_item_effect.s @@ -1155,7 +1155,7 @@ _0806C6AE: movs r0, 0 movs r1, 0 movs r2, 0 - bl dp01_build_cmdbuf_x00_a_b_0 + bl EmitGetAttributes ldrb r0, [r4] bl MarkBufferBankForExecution strb r5, [r4] diff --git a/asm/rom3.s b/asm/rom3.s index f4a273d95..4ab819fa2 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -2134,8 +2134,8 @@ _0803389C: .pool thumb_func_end sub_803375C - thumb_func_start dp01_build_cmdbuf_x00_a_b_0 -dp01_build_cmdbuf_x00_a_b_0: @ 80338B4 + thumb_func_start EmitGetAttributes +EmitGetAttributes: @ 80338B4 push {r4,lr} adds r4, r1, 0 lsls r0, 24 @@ -2152,7 +2152,7 @@ dp01_build_cmdbuf_x00_a_b_0: @ 80338B4 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x00_a_b_0 + thumb_func_end EmitGetAttributes thumb_func_start dp01_build_cmdbuf_x01_a_b_0 dp01_build_cmdbuf_x01_a_b_0: @ 80338D8 @@ -2264,8 +2264,8 @@ dp01_build_cmdbuf_x04_4_4_4: @ 8033980 .pool thumb_func_end dp01_build_cmdbuf_x04_4_4_4 - thumb_func_start dp01_build_cmdbuf_x05_a_b_c -dp01_build_cmdbuf_x05_a_b_c: @ 80339A0 + thumb_func_start EmitSwitchInAnim +EmitSwitchInAnim: @ 80339A0 push {r4,lr} adds r4, r1, 0 lsls r0, 24 @@ -2282,10 +2282,10 @@ dp01_build_cmdbuf_x05_a_b_c: @ 80339A0 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x05_a_b_c + thumb_func_end EmitSwitchInAnim - thumb_func_start dp01_build_cmdbuf_x06_a -dp01_build_cmdbuf_x06_a: @ 80339C4 + thumb_func_start EmitReturnPokeToBall +EmitReturnPokeToBall: @ 80339C4 push {lr} adds r3, r1, 0 lsls r0, 24 @@ -2299,7 +2299,7 @@ dp01_build_cmdbuf_x06_a: @ 80339C4 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x06_a + thumb_func_end EmitReturnPokeToBall thumb_func_start dp01_build_cmdbuf_x07_7_7_7 dp01_build_cmdbuf_x07_7_7_7: @ 80339E4 @@ -2888,8 +2888,8 @@ _08033E7E: .pool thumb_func_end sub_8033E6C - thumb_func_start dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f -dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f: @ 8033EA0 + thumb_func_start EmitChoosePokemon +EmitChoosePokemon: @ 8033EA0 push {r4-r6,lr} ldr r6, [sp, 0x10] lsls r0, 24 @@ -2918,7 +2918,7 @@ _08033EBA: pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x16_a_b_c_ptr_d_e_f + thumb_func_end EmitChoosePokemon thumb_func_start dp01_build_cmdbuf_x17_17_17_17 dp01_build_cmdbuf_x17_17_17_17: @ 8033EDC @@ -3684,8 +3684,8 @@ EmitBattleAnimation: @ 8034438 .pool thumb_func_end EmitBattleAnimation - thumb_func_start sub_8034464 -sub_8034464: @ 8034464 + thumb_func_start EmitLinkStandbyMsg +EmitLinkStandbyMsg: @ 8034464 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 @@ -3716,7 +3716,7 @@ _08034490: pop {r0} bx r0 .pool - thumb_func_end sub_8034464 + thumb_func_end EmitLinkStandbyMsg thumb_func_start dp01_build_cmdbuf_x38_a dp01_build_cmdbuf_x38_a: @ 80344A8 diff --git a/include/battle.h b/include/battle.h index a6573934f..e71a23e28 100644 --- a/include/battle.h +++ b/include/battle.h @@ -561,23 +561,9 @@ struct BattleStruct u8 field_52; u8 sentInPokes; u8 field_54[4]; - u8 field_58; - u8 field_59; - u8 field_5A; - u8 field_5B; + u8 field_58[4]; u8 field_5C[4]; - u8 field_60; - u8 field_61; - u8 field_62; - u8 field_63; - u8 field_64; - u8 field_65; - u8 field_66; - u8 field_67; - u8 field_68; - u8 field_69; - u8 field_6A; - u8 field_6B; + u8 field_60[4][3]; u8 field_6C; u8 field_6D; u8 field_6E; @@ -792,6 +778,8 @@ extern struct BattleStruct* gBattleStruct; #define ATK48_BIT_x4 0x4 #define ATK48_LOWER_FAIL_CHECK 0x8 +#define ATK4F_DONT_CHECK_STATUSES 0x80 + #define GET_STAT_BUFF_ID(n)((n & 0xF)) // first four bits 0x1, 0x2, 0x4, 0x8 #define GET_STAT_BUFF_VALUE(n)((n & 0xF0) >> 4) // 0x10, 0x20, 0x40 #define STAT_BUFF_NEGATIVE 0x80 // 0x80, the sign bit @@ -840,6 +828,7 @@ void PrepareStringBattle(u16 stringId, u8 bank); u8 GetBattleBank(u8 caseId); void UndoEffectsAfterFainting(void); bool8 HasMoveFailed(u8 bank); +void SwitchInClearStructs(void); // battle_3 void BattleScriptPush(const u8* bsPtr); diff --git a/include/battle_controllers.h b/include/battle_controllers.h index 2ae6f002f..443ca5be1 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -11,6 +11,10 @@ void EmitFaintAnimation(u8 bufferId); void EmitExpUpdate(u8 bufferId, u8 partyId, u16 expPoints); void EmitBattleAnimation(u8 bufferId, u8 animationId, u16 argument); void EmitSpriteInvisibility(u8 bufferId, bool8 isInvisible); +void EmitReturnPokeToBall(u8 bufferId, u8 arg1); +void EmitGetAttributes(u8 bufferId, u8 arg1, u8 arg2); +void EmitSwitchInAnim(u8 bufferId, u8 partyId, bool8 dontClearSubstituteBit); +void EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, const u8* arg4); void MarkBufferBankForExecution(u8 bank); diff --git a/include/pokemon.h b/include/pokemon.h index 1049776e8..f629799e5 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -623,6 +623,9 @@ bool8 IsShinyOtIdPersonality(u32 otId, u32 personality); void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies); bool8 IsTradedMon(struct Pokemon *mon); +void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality); +s32 sub_806D864(u16 a1); +bool16 sub_806D82C(u8 id); #include "sprite.h" diff --git a/src/battle_3.c b/src/battle_3.c index 4453545d3..1b443118d 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -188,8 +188,6 @@ extern void SetMoveEffect(bool8 primary, u8 certainArg); extern bool8 UproarWakeUpCheck(u8 bank); extern void sub_803F9EC(); extern bool8 sub_80423F4(u8 bank, u8, u8); -extern u8 sub_806D864(u8); -extern u8 sub_806D82C(u8); extern u8 weather_get_current(void); extern void sub_803E08C(void); extern void bc_move_exec_returning(void); diff --git a/src/battle_4.c b/src/battle_4.c index f896cd806..db6d7fe53 100644 --- a/src/battle_4.c +++ b/src/battle_4.c @@ -17,6 +17,7 @@ #include "songs.h" #include "text.h" #include "sound.h" +#include "pokedex.h" // variables @@ -94,6 +95,7 @@ extern const u8* const gBattleScriptsForMoveEffects[]; // functions extern void sub_81A5718(u8 bank); // battle frontier 2 +extern void sub_81A56B4(void); // battle frontier 2 // BattleScripts extern const u8 BattleScript_MoveEnd[]; @@ -4912,3 +4914,369 @@ void atk49_moveend(void) gBattlescriptCurrInstr += 3; } +void atk4A_typecalc2(void) +{ + u8 flags = 0; + s32 i = 0; + u8 moveType = gBattleMoves[gCurrentMove].type; + + if (gBattleMons[gBankTarget].ability == ABILITY_LEVITATE && moveType == TYPE_GROUND) + { + gLastUsedAbility = gBattleMons[gBankTarget].ability; + gBattleMoveFlags |= (MOVESTATUS_MISSED | MOVESTATUS_NOTAFFECTED); + gUnknown_02024250[gBankTarget] = 0; + gBattleCommunication[6] = moveType; + RecordAbilityBattle(gBankTarget, gLastUsedAbility); + } + else + { + while (gTypeEffectiveness[i]!= TYPE_ENDTABLE) + { + if (gTypeEffectiveness[i] == TYPE_FORESIGHT) + { + if (gBattleMons[gBankTarget].status2 & STATUS2_FORESIGHT) + { + break; + } + else + { + i += 3; + continue; + } + } + + if (gTypeEffectiveness[i] == moveType) + { + // check type1 + if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type1) + { + if (gTypeEffectiveness[i + 2] == 0) + { + gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED; + break; + } + if (gTypeEffectiveness[i + 2] == 5) + { + flags |= MOVESTATUS_NOTVERYEFFECTIVE; + } + if (gTypeEffectiveness[i + 2] == 20) + { + flags |= MOVESTATUS_SUPEREFFECTIVE; + } + } + // check type2 + if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2) + { + if (gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2 + && gTypeEffectiveness[i + 2] == 0) + { + gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED; + break; + } + if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2 + && gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2 + && gTypeEffectiveness[i + 2] == 5) + { + flags |= MOVESTATUS_NOTVERYEFFECTIVE; + } + if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2 + && gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2 + && gTypeEffectiveness[i + 2] == 20) + { + flags |= MOVESTATUS_SUPEREFFECTIVE; + } + } + } + i += 3; + } + } + + if (gBattleMons[gBankTarget].ability == ABILITY_WONDER_GUARD + && !(flags & MOVESTATUS_NOEFFECT) + && AttacksThisTurn(gBankAttacker, gCurrentMove) == 2 + && (!(flags & MOVESTATUS_SUPEREFFECTIVE) || ((flags & (MOVESTATUS_SUPEREFFECTIVE | MOVESTATUS_NOTVERYEFFECTIVE)) == (MOVESTATUS_SUPEREFFECTIVE | MOVESTATUS_NOTVERYEFFECTIVE))) + && gBattleMoves[gCurrentMove].power) + { + gLastUsedAbility = ABILITY_WONDER_GUARD; + gBattleMoveFlags |= MOVESTATUS_MISSED; + gUnknown_02024250[gBankTarget] = 0; + gBattleCommunication[6] = 3; + RecordAbilityBattle(gBankTarget, gLastUsedAbility); + } + if (gBattleMoveFlags & MOVESTATUS_NOTAFFECTED) + gProtectStructs[gBankAttacker].notEffective = 1; + + gBattlescriptCurrInstr++; +} + +void atk4B_return_atk_to_ball(void) +{ + gActiveBank = gBankAttacker; + if (!(gHitMarker & HITMARKER_FAINTED(gActiveBank))) + { + EmitReturnPokeToBall(0, 0); + MarkBufferBankForExecution(gActiveBank); + } + gBattlescriptCurrInstr++; +} + +void atk4C_copy_poke_data(void) +{ + if (gBattleExecBuffer) + return; + + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + gBattlePartyID[gActiveBank] = *(gBattleStruct->field_5C + gActiveBank); + + EmitGetAttributes(0, 0, gBitTable[gBattlePartyID[gActiveBank]]); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 2; +} + +void atk4D_switch_data_update(void) +{ + struct BattlePokemon oldData; + s32 i; + u8 *monData; + + if (gBattleExecBuffer) + return; + + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + oldData = gBattleMons[gActiveBank]; + monData = (u8*)(&gBattleMons[gActiveBank]); + + for (i = 0; i < sizeof(struct BattlePokemon); i++) + { + monData[i] = gBattleBufferB[gActiveBank][4 + i]; + } + + gBattleMons[gActiveBank].type1 = gBaseStats[gBattleMons[gActiveBank].species].type1; + gBattleMons[gActiveBank].type2 = gBaseStats[gBattleMons[gActiveBank].species].type2; + gBattleMons[gActiveBank].ability = GetAbilityBySpecies(gBattleMons[gActiveBank].species, gBattleMons[gActiveBank].altAbility); + + // check knocked off item + i = GetBankSide(gActiveBank); + if (gWishFutureKnock.knockedOffPokes[i] & gBitTable[gBattlePartyID[gActiveBank]]) + { + gBattleMons[gActiveBank].item = 0; + } + + if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS) + { + for (i = 0; i < 8; i++) + { + gBattleMons[gActiveBank].statStages[i] = oldData.statStages[i]; + } + gBattleMons[gActiveBank].status2 = oldData.status2; + } + + SwitchInClearStructs(); + + if (gBattleTypeFlags & BATTLE_TYPE_PALACE && gBattleMons[gActiveBank].maxHP / 2 >= gBattleMons[gActiveBank].hp + && gBattleMons[gActiveBank].hp != 0 && !(gBattleMons[gActiveBank].status1 & STATUS_SLEEP)) + { + gBattleStruct->field_92 |= gBitTable[gActiveBank]; + } + + gBattleScripting.bank = gActiveBank; + gBattleTextBuff1[0] = PLACEHOLDER_BEGIN; + gBattleTextBuff1[1] = 7; + gBattleTextBuff1[2] = gActiveBank; + gBattleTextBuff1[3] = gBattlePartyID[gActiveBank]; + gBattleTextBuff1[4] = EOS; + + gBattlescriptCurrInstr += 2; +} + +void atk4E_switchin_anim(void) +{ + if (gBattleExecBuffer) + return; + + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + if (GetBankSide(gActiveBank) == SIDE_OPPONENT + && !(gBattleTypeFlags & (BATTLE_TYPE_LINK + | BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_x2000000 + | BATTLE_TYPE_x4000000 + | BATTLE_TYPE_FRONTIER))) + HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), FLAG_SET_SEEN, gBattleMons[gActiveBank].personality); + + gAbsentBankFlags &= ~(gBitTable[gActiveBank]); + + EmitSwitchInAnim(0, gBattlePartyID[gActiveBank], gBattlescriptCurrInstr[2]); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 3; + + if (gBattleTypeFlags & BATTLE_TYPE_ARENA) + sub_81A56B4(); +} + +void atk4F_jump_if_cannot_switch(void) +{ + s32 val = 0; + s32 compareVar = 0; + struct Pokemon *party = NULL; + s32 r7 = 0; + + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1] & ~(ATK4F_DONT_CHECK_STATUSES)); + + if (!(gBattlescriptCurrInstr[1] & ATK4F_DONT_CHECK_STATUSES) + && ((gBattleMons[gActiveBank].status2 & (STATUS2_WRAPPED | STATUS2_ESCAPE_PREVENTION)) + || (gStatuses3[gActiveBank] & STATUS3_ROOTED))) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); + } + else if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) + { + #ifndef NONMATCHING + asm("":::"r5"); + #endif // NONMATCHING + if (GetBankSide(gActiveBank) == SIDE_OPPONENT) + party = gEnemyParty; + else + party = gPlayerParty; + + val = 0; + if (2 & gActiveBank) + val = 3; + + for (compareVar = val + 3; val < compareVar; val++) + { + if (GetMonData(&party[val], MON_DATA_SPECIES) != SPECIES_NONE + && !GetMonData(&party[val], MON_DATA_IS_EGG) + && GetMonData(&party[val], MON_DATA_HP) != 0 + && gBattlePartyID[gActiveBank] != val) + break; + } + + if (val == compareVar) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); + else + gBattlescriptCurrInstr += 6; + } + else if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + if (gBattleTypeFlags & BATTLE_TYPE_x800000) + { + if (GetBankSide(gActiveBank) == SIDE_PLAYER) + { + party = gPlayerParty; + + val = 0; + if (sub_806D82C(sub_806D864(gActiveBank)) == TRUE) + val = 3; + } + else + { + party = gEnemyParty; + + if (gActiveBank == 1) + val = 0; + else + val = 3; + } + } + else + { + if (GetBankSide(gActiveBank) == SIDE_OPPONENT) + party = gEnemyParty; + else + party = gPlayerParty; + + + val = 0; + if (sub_806D82C(sub_806D864(gActiveBank)) == TRUE) + val = 3; + } + + for (compareVar = val + 3; val < compareVar; val++) + { + if (GetMonData(&party[val], MON_DATA_SPECIES) != SPECIES_NONE + && !GetMonData(&party[val], MON_DATA_IS_EGG) + && GetMonData(&party[val], MON_DATA_HP) != 0 + && gBattlePartyID[gActiveBank] != val) + break; + } + + if (val == compareVar) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); + else + gBattlescriptCurrInstr += 6; + } + else if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS && GetBankSide(gActiveBank) == SIDE_OPPONENT) + { + party = gEnemyParty; + + val = 0; + if (gActiveBank == 3) + val = 3; + + for (compareVar = val + 3; val < compareVar; val++) + { + if (GetMonData(&party[val], MON_DATA_SPECIES) != SPECIES_NONE + && !GetMonData(&party[val], MON_DATA_IS_EGG) + && GetMonData(&party[val], MON_DATA_HP) != 0 + && gBattlePartyID[gActiveBank] != val) + break; + } + + if (val == compareVar) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); + else + gBattlescriptCurrInstr += 6; + } + else + { + if (GetBankSide(gActiveBank) == SIDE_OPPONENT) + { + r7 = GetBankByPlayerAI(1); + + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + compareVar = GetBankByPlayerAI(3); + else + compareVar = r7; + + party = gEnemyParty; + } + else + { + r7 = GetBankByPlayerAI(0); + + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + compareVar = GetBankByPlayerAI(2); + else + compareVar = r7; + + party = gPlayerParty; + } + for (val = 0; val < 6; val++) + { + if (GetMonData(&party[val], MON_DATA_HP) != 0 + && GetMonData(&party[val], MON_DATA_SPECIES) != SPECIES_NONE + && !GetMonData(&party[val], MON_DATA_IS_EGG) + && val != gBattlePartyID[r7] && val != gBattlePartyID[compareVar]) + break; + } + + if (val == 6) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); + else + gBattlescriptCurrInstr += 6; + } +} + +void sub_804CF10(u8 arg0) +{ + *(gBattleStruct->field_58 + gActiveBank) = gBattlePartyID[gActiveBank]; + *(gBattleStruct->field_5C + gActiveBank) = 6; + gBattleStruct->field_93 &= ~(gBitTable[gActiveBank]); + + EmitChoosePokemon(0, 1, arg0, 0, gBattleStruct->field_60[gActiveBank]); + MarkBufferBankForExecution(gActiveBank); +} diff --git a/src/pokemon_3.c b/src/pokemon_3.c index 603732a34..2bc06c580 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -601,9 +601,9 @@ bool8 sub_806D7EC(void) return retVal; } -bool8 sub_806D82C(u8 id) +bool16 sub_806D82C(u8 id) { - bool8 retVal = FALSE; + bool16 retVal = FALSE; switch (gLinkPlayers[id].lp_field_18) { case 0: From 52a951276f8d4b79195a0d4889503e4a7f096024 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 25 Sep 2017 00:09:13 +0200 Subject: [PATCH 283/342] battle 4, up to x69 --- asm/battle_1.s | 26 +- asm/battle_2.s | 52 +- asm/battle_4.s | 3517 +-------------------- asm/battle_controller_linkopponent.s | 2 +- asm/battle_controller_linkpartner.s | 2 +- asm/battle_controller_opponent.s | 2 +- asm/battle_controller_player.s | 38 +- asm/battle_controller_player_partner.s | 2 +- asm/battle_controller_recorded_opponent.s | 2 +- asm/battle_controller_recorded_player.s | 2 +- asm/battle_controller_safari.s | 8 +- asm/battle_controller_wally.s | 8 +- asm/battle_frontier_2.s | 16 +- asm/battle_message.s | 22 +- asm/evolution_scene.s | 38 +- asm/recorded_battle.s | 10 +- asm/reshow_battle_screen.s | 8 +- asm/rom3.s | 54 +- data/data2b.s | 2 +- include/battle.h | 67 +- include/battle_controllers.h | 16 + include/battle_message.h | 144 +- include/pokemon.h | 1 + include/recorded_battle.h | 6 + include/reshow_battle_screen.h | 6 + include/text.h | 4 +- src/battle_4.c | 1139 ++++++- src/pokemon_3.c | 2 +- 28 files changed, 1492 insertions(+), 3704 deletions(-) create mode 100644 include/recorded_battle.h create mode 100644 include/reshow_battle_screen.h diff --git a/asm/battle_1.s b/asm/battle_1.s index d1a4e6ea0..3507f6a71 100644 --- a/asm/battle_1.s +++ b/asm/battle_1.s @@ -1888,7 +1888,7 @@ sub_8035C4C: @ 8035C4C bne _08035C68 ldr r0, =gText_Draw movs r1, 0x15 - bl battle_show_message_maybe + bl sub_814F9EC b _08035D68 .pool _08035C68: @@ -1964,10 +1964,10 @@ _08035CE2: _08035CFC: ldr r0, =gText_Win movs r1, 0x17 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gText_Loss movs r1, 0x16 - bl battle_show_message_maybe + bl sub_814F9EC b _08035D68 .pool _08035D20: @@ -1985,19 +1985,19 @@ _08035D20: _08035D36: ldr r0, =gText_Win movs r1, 0x16 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gText_Loss movs r1, 0x17 - bl battle_show_message_maybe + bl sub_814F9EC b _08035D68 .pool _08035D58: ldr r0, =gText_Win movs r1, 0x17 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gText_Loss movs r1, 0x16 - bl battle_show_message_maybe + bl sub_814F9EC _08035D68: pop {r0} bx r0 @@ -2068,14 +2068,14 @@ _08035DDC: _08035DE6: adds r0, r1, 0 movs r1, 0x11 - bl battle_show_message_maybe + bl sub_814F9EC ldrb r1, [r4, 0x18] movs r0, 0x4 b _08035E14 _08035DF4: adds r0, r1, 0 movs r1, 0x12 - bl battle_show_message_maybe + bl sub_814F9EC ldrb r1, [r4, 0x18] movs r0, 0x4 str r0, [sp] @@ -2085,7 +2085,7 @@ _08035DF4: _08035E08: adds r0, r1, 0 movs r1, 0x13 - bl battle_show_message_maybe + bl sub_814F9EC ldrb r1, [r4, 0x18] movs r0, 0x8 _08035E14: @@ -2099,7 +2099,7 @@ _08035E1A: _08035E22: adds r0, r1, 0 movs r1, 0x14 - bl battle_show_message_maybe + bl sub_814F9EC ldrb r1, [r4, 0x18] movs r0, 0x8 str r0, [sp] @@ -2139,14 +2139,14 @@ _08035E66: adds r1, r0, r4 adds r0, r1, 0 movs r1, 0xF - bl battle_show_message_maybe + bl sub_814F9EC lsls r0, r6, 3 subs r0, r6 lsls r0, 2 adds r1, r0, r4 adds r0, r1, 0 movs r1, 0x10 - bl battle_show_message_maybe + bl sub_814F9EC movs r4, 0x7 str r4, [sp] adds r0, r7, 0 diff --git a/asm/battle_2.s b/asm/battle_2.s index cc387f1a8..14e332d7c 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -1399,7 +1399,7 @@ _080373E0: str r0, [r2] ldr r0, =sub_8039EF0 str r0, [r1] - ldr r0, =sub_8038420 + ldr r0, =BattleMainCB2 bl SetMainCallback2 ldr r2, =gBattleTypeFlags ldr r1, [r2] @@ -1999,7 +1999,7 @@ _080379A0: str r0, [r2] ldr r0, =sub_8039EF0 str r0, [r1] - ldr r0, =sub_8038420 + ldr r0, =BattleMainCB2 bl SetMainCallback2 ldr r2, =gBattleTypeFlags ldr r1, [r2] @@ -3130,7 +3130,7 @@ _080383BC: str r0, [r2] ldr r0, =sub_8039EF0 str r0, [r1] - ldr r0, =sub_8038420 + ldr r0, =BattleMainCB2 bl SetMainCallback2 ldr r3, =gBattleTypeFlags ldr r2, [r3] @@ -3156,8 +3156,8 @@ _080383F8: .pool thumb_func_end sub_8037DF4 - thumb_func_start sub_8038420 -sub_8038420: @ 8038420 + thumb_func_start BattleMainCB2 +BattleMainCB2: @ 8038420 push {lr} sub sp, 0x4 bl AnimateSprites @@ -3203,7 +3203,7 @@ _08038482: pop {r0} bx r0 .pool - thumb_func_end sub_8038420 + thumb_func_end BattleMainCB2 thumb_func_start sub_803849C sub_803849C: @ 803849C @@ -4662,7 +4662,7 @@ _0803912C: bl sub_800ADF8 ldr r0, =gUnknown_0824978D movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC b _08039172 .pool _0803914C: @@ -4997,7 +4997,7 @@ _08039470: _0803947E: ldr r0, =gText_RecordBattleToPass movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gBattleCommunication ldrb r0, [r1] adds r0, 0x1 @@ -5020,11 +5020,11 @@ _080394AC: bl sub_8056A3C ldr r0, =gText_BattleYesNoChoice movs r1, 0xC - bl battle_show_message_maybe + bl sub_814F9EC ldr r4, =gBattleCommunication movs r0, 0x1 strb r0, [r4, 0x1] - bl sub_8056B74 + bl BattleCreateCursorAt b _080396EA .pool _080394D8: @@ -5042,7 +5042,7 @@ _080394EC: movs r0, 0x5 bl PlaySE ldrb r0, [r4, 0x1] - bl sub_8056BAC + bl BattleDestroyCursorAt movs r0, 0 b _0803951E .pool @@ -5059,11 +5059,11 @@ _08039510: movs r0, 0x5 bl PlaySE ldrb r0, [r4, 0x1] - bl sub_8056BAC + bl BattleDestroyCursorAt movs r0, 0x1 _0803951E: strb r0, [r4, 0x1] - bl sub_8056B74 + bl BattleCreateCursorAt b _0803975E _08039526: movs r5, 0x1 @@ -5130,7 +5130,7 @@ _0803958A: bl sub_800ADF8 ldr r0, =gUnknown_0824978D movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC _080395B4: ldr r1, =gBattleCommunication ldrb r0, [r1] @@ -5218,7 +5218,7 @@ _08039686: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC movs r0, 0x80 strb r0, [r4, 0x1] b _080396EA @@ -5256,7 +5256,7 @@ _080396A8: bl sub_800ADF8 ldr r0, =gUnknown_0824978D movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC _080396EA: ldrb r0, [r4] adds r0, 0x1 @@ -8280,7 +8280,7 @@ _0803AFFA: movs r0, 0 mov r1, sp movs r2, 0x80 - bl dp01_build_cmdbuf_x30_TODO + bl EmitCmd48 ldrb r0, [r4] bl MarkBufferBankForExecution movs r7, 0 @@ -8332,7 +8332,7 @@ _0803B072: movs r0, 0 mov r1, sp movs r2, 0x80 - bl dp01_build_cmdbuf_x30_TODO + bl EmitCmd48 ldrb r0, [r4] bl MarkBufferBankForExecution ldr r1, =gBattleMainFunc @@ -9237,7 +9237,7 @@ _0803B7EA: strb r1, [r0] ldr r0, =gText_EmptyString3 movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gBattleMainFunc ldr r0, =sub_803BE74 str r0, [r1] @@ -9546,7 +9546,7 @@ _0803BAE6: strb r1, [r0] mov r0, r9 movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gBattleMainFunc ldr r0, =sub_803BE74 str r0, [r1] @@ -10140,7 +10140,7 @@ _0803C058: adds r0, r4 ldrb r1, [r0] adds r0, r5, 0 - bl sub_8184FBC + bl RecordedBattle_SetBankAction ldr r1, =gUnknown_0202421C ldrb r0, [r6] adds r1, r0, r1 @@ -11067,12 +11067,12 @@ _0803C91C: lsls r1, r0, 9 adds r1, r5 ldrb r1, [r1] - bl sub_8184FBC + bl RecordedBattle_SetBankAction ldrb r0, [r6] lsls r1, r0, 9 adds r1, r7 ldrb r1, [r1] - bl sub_8184FBC + bl RecordedBattle_SetBankAction _0803C942: ldrb r0, [r6] ldr r4, =gBattleStruct @@ -11602,7 +11602,7 @@ sub_803CDF8: @ 803CDF8 lsls r1, r0, 9 adds r1, r2 ldrb r1, [r1] - bl sub_8184FBC + bl RecordedBattle_SetBankAction ldr r0, =gBattleTypeFlags ldr r0, [r0] movs r1, 0x42 @@ -13335,7 +13335,7 @@ _0803DDD2: ldr r0, =sub_803DE40 str r0, [r1] ldr r1, =gUnknown_030061E8 - ldr r0, =sub_8038420 + ldr r0, =BattleMainCB2 str r0, [r1] b _0803DE2A .pool @@ -13476,7 +13476,7 @@ sub_803DF48: @ 803DF48 push {lr} ldr r0, =gMain ldr r1, [r0, 0x4] - ldr r0, =sub_8038420 + ldr r0, =BattleMainCB2 cmp r1, r0 bne _0803DF5A ldr r1, =gBattleMainFunc diff --git a/asm/battle_4.s b/asm/battle_4.s index 8c3a0ea7e..3a6558a86 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -5,3489 +5,6 @@ .text - thumb_func_start atk50_openpartyscreen -atk50_openpartyscreen: @ 804CF88 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - sub sp, 0x4 - movs r7, 0 - movs r0, 0 - mov r9, r0 - ldr r6, =gBattlescriptCurrInstr - ldr r2, [r6] - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - mov r8, r1 - ldrb r1, [r2, 0x1] - adds r0, r1, 0 - mov r12, r6 - cmp r0, 0x5 - beq _0804CFBE - b _0804D464 -_0804CFBE: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x41 - ands r1, r0 - cmp r1, 0x1 - beq _0804D0B0 - ldr r1, =gActiveBank - strb r7, [r1] - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r7, r0 - bcc _0804CFD8 - b _0804D450 -_0804CFD8: - ldr r7, =gHitMarker - ldr r6, =gBitTable - adds r4, r1, 0 - ldr r2, =gAbsentBankFlags - mov r8, r2 -_0804CFE2: - ldrb r2, [r4] - lsls r0, r2, 2 - adds r0, r6 - ldr r1, [r0] - lsls r1, 28 - ldr r0, [r7] - ands r0, r1 - cmp r0, 0 - beq _0804D088 - adds r0, r2, 0 - movs r1, 0x6 - movs r2, 0x6 - bl sub_80423F4 - lsls r0, 24 - cmp r0, 0 - beq _0804D054 - ldrb r0, [r4] - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - mov r2, r8 - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - ldrb r0, [r4] - lsls r0, 2 - adds r0, r6 - ldr r1, [r0] - lsls r1, 28 - ldr r0, [r7] - bics r0, r1 - str r0, [r7] - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - bl EmitLinkStandbyMsg - ldrb r0, [r4] - bl MarkBufferBankForExecution - b _0804D098 - .pool -_0804D054: - ldr r5, =gSpecialStatuses - ldrb r0, [r4] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 2 - adds r1, r5 - ldrb r0, [r1] - lsls r0, 25 - cmp r0, 0 - blt _0804D098 - movs r0, 0x6 - bl sub_804CF10 - ldrb r1, [r4] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - ldrb r1, [r0] - movs r2, 0x40 - orrs r1, r2 - strb r1, [r0] - b _0804D098 - .pool -_0804D088: - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - bl EmitLinkStandbyMsg - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0804D098: - ldrb r0, [r4] - adds r0, 0x1 - strb r0, [r4] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bcc _0804CFE2 - b _0804D450 - .pool -_0804D0B0: - ands r0, r1 - cmp r0, 0 - bne _0804D0B8 - b _0804D450 -_0804D0B8: - ldr r0, =gHitMarker - mov r8, r0 - ldr r0, [r0] - lsrs r5, r0, 28 - ldr r6, =gBitTable - ldr r0, [r6] - ands r0, r5 - cmp r0, 0 - beq _0804D170 - ldr r4, =gActiveBank - strb r7, [r4] - movs r0, 0 - movs r1, 0x6 - movs r2, 0x6 - bl sub_80423F4 - lsls r0, 24 - cmp r0, 0 - beq _0804D120 - ldr r2, =gAbsentBankFlags - ldrb r0, [r4] - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - ldrb r0, [r4] - lsls r0, 2 - adds r0, r6 - ldr r1, [r0] - lsls r1, 28 - mov r2, r8 - ldr r0, [r2] - bics r0, r1 - str r0, [r2] - movs r0, 0 - bl dp01_build_cmdbuf_x2A_2A_2A_2A - ldrb r0, [r4] - bl MarkBufferBankForExecution - b _0804D170 - .pool -_0804D120: - ldr r6, =gSpecialStatuses - ldrb r0, [r4] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 2 - adds r1, r6 - ldrb r0, [r1] - lsls r0, 25 - cmp r0, 0 - blt _0804D15C - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x5E - ldrb r0, [r0] - bl sub_804CF10 - ldrb r1, [r4] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - ldrb r1, [r0] - movs r2, 0x40 - orrs r1, r2 - strb r1, [r0] - b _0804D170 - .pool -_0804D15C: - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - bl EmitLinkStandbyMsg - ldrb r0, [r4] - bl MarkBufferBankForExecution - movs r0, 0x1 - mov r9, r0 -_0804D170: - ldr r6, =gBitTable - ldr r0, [r6, 0x8] - ands r0, r5 - cmp r0, 0 - beq _0804D22E - ldr r0, [r6] - ands r0, r5 - cmp r0, 0 - bne _0804D22E - ldr r4, =gActiveBank - movs r0, 0x2 - strb r0, [r4] - movs r0, 0x2 - movs r1, 0x6 - movs r2, 0x6 - bl sub_80423F4 - lsls r0, 24 - cmp r0, 0 - beq _0804D1D8 - ldr r2, =gAbsentBankFlags - ldrb r0, [r4] - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - ldr r2, =gHitMarker - ldrb r0, [r4] - lsls r0, 2 - adds r0, r6 - ldr r1, [r0] - lsls r1, 28 - ldr r0, [r2] - bics r0, r1 - str r0, [r2] - movs r0, 0 - bl dp01_build_cmdbuf_x2A_2A_2A_2A - ldrb r0, [r4] - bl MarkBufferBankForExecution - b _0804D22E - .pool -_0804D1D8: - ldr r6, =gSpecialStatuses - ldrb r0, [r4] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 2 - adds r1, r6 - ldrb r0, [r1] - lsls r0, 25 - cmp r0, 0 - blt _0804D214 - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x5C - ldrb r0, [r0] - bl sub_804CF10 - ldrb r1, [r4] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - ldrb r1, [r0] - movs r2, 0x40 - orrs r1, r2 - strb r1, [r0] - b _0804D22E - .pool -_0804D214: - movs r0, 0x1 - mov r1, r9 - ands r0, r1 - cmp r0, 0 - bne _0804D22E - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - bl EmitLinkStandbyMsg - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0804D22E: - ldr r6, =gBitTable - ldr r0, [r6, 0x4] - ands r0, r5 - cmp r0, 0 - beq _0804D2E4 - ldr r4, =gActiveBank - movs r0, 0x1 - strb r0, [r4] - movs r0, 0x1 - movs r1, 0x6 - movs r2, 0x6 - bl sub_80423F4 - lsls r0, 24 - cmp r0, 0 - beq _0804D290 - ldr r2, =gAbsentBankFlags - ldrb r0, [r4] - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - ldr r2, =gHitMarker - ldrb r0, [r4] - lsls r0, 2 - adds r0, r6 - ldr r1, [r0] - lsls r1, 28 - ldr r0, [r2] - bics r0, r1 - str r0, [r2] - movs r0, 0 - bl dp01_build_cmdbuf_x2A_2A_2A_2A - ldrb r0, [r4] - bl MarkBufferBankForExecution - b _0804D2E4 - .pool -_0804D290: - ldr r6, =gSpecialStatuses - ldrb r0, [r4] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 2 - adds r1, r6 - ldrb r0, [r1] - lsls r0, 25 - cmp r0, 0 - blt _0804D2CC - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x5F - ldrb r0, [r0] - bl sub_804CF10 - ldrb r1, [r4] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - ldrb r1, [r0] - movs r2, 0x40 - orrs r1, r2 - strb r1, [r0] - b _0804D2E4 - .pool -_0804D2CC: - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - bl EmitLinkStandbyMsg - ldrb r0, [r4] - bl MarkBufferBankForExecution - movs r0, 0x2 - mov r2, r9 - orrs r2, r0 - mov r9, r2 -_0804D2E4: - ldr r6, =gBitTable - ldr r0, [r6, 0xC] - ands r0, r5 - cmp r0, 0 - beq _0804D3A2 - ldr r0, [r6, 0x4] - ands r0, r5 - cmp r0, 0 - bne _0804D3A2 - ldr r4, =gActiveBank - movs r0, 0x3 - strb r0, [r4] - movs r0, 0x3 - movs r1, 0x6 - movs r2, 0x6 - bl sub_80423F4 - lsls r0, 24 - cmp r0, 0 - beq _0804D34C - ldr r2, =gAbsentBankFlags - ldrb r0, [r4] - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - ldr r2, =gHitMarker - ldrb r0, [r4] - lsls r0, 2 - adds r0, r6 - ldr r1, [r0] - lsls r1, 28 - ldr r0, [r2] - bics r0, r1 - str r0, [r2] - movs r0, 0 - bl dp01_build_cmdbuf_x2A_2A_2A_2A - ldrb r0, [r4] - bl MarkBufferBankForExecution - b _0804D3A2 - .pool -_0804D34C: - ldr r6, =gSpecialStatuses - ldrb r0, [r4] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 2 - adds r1, r6 - ldrb r0, [r1] - lsls r0, 25 - cmp r0, 0 - blt _0804D388 - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x5D - ldrb r0, [r0] - bl sub_804CF10 - ldrb r1, [r4] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - ldrb r1, [r0] - movs r2, 0x40 - orrs r1, r2 - strb r1, [r0] - b _0804D3A2 - .pool -_0804D388: - movs r0, 0x2 - mov r1, r9 - ands r1, r0 - cmp r1, 0 - bne _0804D3A2 - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - bl EmitLinkStandbyMsg - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0804D3A2: - ldr r1, =gSpecialStatuses - ldrb r0, [r1] - lsls r0, 25 - cmp r0, 0 - blt _0804D3FA - adds r0, r1, 0 - adds r0, 0x28 - ldrb r0, [r0] - lsls r0, 25 - cmp r0, 0 - blt _0804D3FA - cmp r5, 0 - beq _0804D3FA - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r0, =gBitTable - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _0804D3E4 - ldr r1, =gActiveBank - movs r0, 0x2 - strb r0, [r1] - b _0804D3E8 - .pool -_0804D3E4: - ldr r0, =gActiveBank - strb r1, [r0] -_0804D3E8: - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - bl EmitLinkStandbyMsg - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution -_0804D3FA: - ldr r1, =gSpecialStatuses - ldrb r0, [r1, 0x14] - lsls r0, 25 - cmp r0, 0 - blt _0804D450 - adds r0, r1, 0 - adds r0, 0x3C - ldrb r0, [r0] - lsls r0, 25 - cmp r0, 0 - blt _0804D450 - cmp r5, 0 - beq _0804D450 - ldr r0, =gAbsentBankFlags - ldrb r0, [r0] - ldr r1, =gBitTable - ldr r1, [r1, 0x4] - ands r0, r1 - cmp r0, 0 - beq _0804D438 - ldr r1, =gActiveBank - movs r0, 0x3 - b _0804D43C - .pool -_0804D438: - ldr r1, =gActiveBank - movs r0, 0x1 -_0804D43C: - strb r0, [r1] - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - bl EmitLinkStandbyMsg - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution -_0804D450: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x6 - str r0, [r1] - b _0804D804 - .pool -_0804D464: - cmp r0, 0x6 - beq _0804D46A - b _0804D658 -_0804D46A: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0804D478 - b _0804D5F4 -_0804D478: - movs r0, 0x1 - ands r1, r0 - cmp r1, 0 - bne _0804D482 - b _0804D5F4 -_0804D482: - ldr r7, =gHitMarker - ldr r0, [r7] - lsrs r5, r0, 28 - ldr r4, =gBitTable - ldr r0, [r4, 0x8] - ands r0, r5 - cmp r0, 0 - beq _0804D52A - ldr r0, [r4] - ands r0, r5 - cmp r0, 0 - beq _0804D52A - ldr r6, =gActiveBank - movs r0, 0x2 - strb r0, [r6] - ldr r0, =gBattleBufferB - ldrb r1, [r0, 0x1] - movs r0, 0x2 - movs r2, 0x6 - bl sub_80423F4 - lsls r0, 24 - cmp r0, 0 - beq _0804D4F8 - ldr r2, =gAbsentBankFlags - ldrb r0, [r6] - lsls r0, 2 - adds r0, r4 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - ldrb r0, [r6] - lsls r0, 2 - adds r0, r4 - ldr r1, [r0] - lsls r1, 28 - ldr r0, [r7] - bics r0, r1 - str r0, [r7] - movs r0, 0 - bl dp01_build_cmdbuf_x2A_2A_2A_2A - ldrb r0, [r6] - bl MarkBufferBankForExecution - b _0804D52A - .pool -_0804D4F8: - ldr r4, =gSpecialStatuses - ldrb r0, [r6] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 2 - adds r1, r4 - ldrb r0, [r1] - lsls r0, 25 - cmp r0, 0 - blt _0804D52A - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x5C - ldrb r0, [r0] - bl sub_804CF10 - ldrb r1, [r6] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r1, [r0] - movs r2, 0x40 - orrs r1, r2 - strb r1, [r0] -_0804D52A: - ldr r4, =gBitTable - ldr r0, [r4, 0xC] - ands r0, r5 - cmp r0, 0 - beq _0804D5DA - ldr r0, [r4, 0x4] - ands r5, r0 - cmp r5, 0 - beq _0804D5DA - ldr r5, =gActiveBank - movs r0, 0x3 - strb r0, [r5] - ldr r0, =gBattleBufferB - ldr r2, =0x00000201 - adds r0, r2 - ldrb r1, [r0] - movs r0, 0x3 - movs r2, 0x6 - bl sub_80423F4 - lsls r0, 24 - cmp r0, 0 - beq _0804D5A8 - ldr r2, =gAbsentBankFlags - ldrb r0, [r5] - lsls r0, 2 - adds r0, r4 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - ldr r2, =gHitMarker - ldrb r0, [r5] - lsls r0, 2 - adds r0, r4 - ldr r1, [r0] - lsls r1, 28 - ldr r0, [r2] - bics r0, r1 - str r0, [r2] - movs r0, 0 - bl dp01_build_cmdbuf_x2A_2A_2A_2A - ldrb r0, [r5] - bl MarkBufferBankForExecution - b _0804D5DA - .pool -_0804D5A8: - ldr r4, =gSpecialStatuses - ldrb r0, [r5] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 2 - adds r1, r4 - ldrb r0, [r1] - lsls r0, 25 - cmp r0, 0 - blt _0804D5DA - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x5D - ldrb r0, [r0] - bl sub_804CF10 - ldrb r1, [r5] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r1, [r0] - movs r2, 0x40 - orrs r1, r2 - strb r1, [r0] -_0804D5DA: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x6 - str r0, [r1] - mov r12, r1 - b _0804D5F8 - .pool -_0804D5F4: - adds r0, r2, 0x6 - str r0, [r6] -_0804D5F8: - ldr r0, =gHitMarker - ldr r0, [r0] - lsrs r5, r0, 28 - ldr r1, =gBank1 - movs r0, 0 - strb r0, [r1] - ldr r4, =gBitTable - ldr r2, [r4] - ands r2, r5 - ldr r6, =gNoOfAllBanks - cmp r2, 0 - bne _0804D634 - adds r7, r6, 0 - ldrb r0, [r6] - cmp r2, r0 - bcs _0804D634 - adds r3, r1, 0 -_0804D61A: - ldrb r0, [r3] - adds r0, 0x1 - strb r0, [r3] - ldrb r2, [r3] - lsls r0, r2, 2 - adds r0, r4 - ldr r0, [r0] - ands r0, r5 - cmp r0, 0 - bne _0804D634 - ldrb r0, [r7] - cmp r2, r0 - bcc _0804D61A -_0804D634: - ldrb r0, [r1] - ldrb r6, [r6] - cmp r0, r6 - beq _0804D63E - b _0804D804 -_0804D63E: - mov r1, r8 - mov r2, r12 - str r1, [r2] - b _0804D804 - .pool -_0804D658: - movs r0, 0x80 - ands r0, r1 - movs r5, 0x1 - cmp r0, 0 - beq _0804D664 - movs r5, 0 -_0804D664: - movs r0, 0x7F - ands r0, r1 - bl GetBattleBank - lsls r0, 24 - lsrs r7, r0, 24 - ldr r1, =gSpecialStatuses - lsls r0, r7, 2 - adds r0, r7 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 25 - cmp r0, 0 - bge _0804D690 - ldr r0, [r6] - adds r0, 0x6 - str r0, [r6] - b _0804D804 - .pool -_0804D690: - adds r0, r7, 0 - movs r1, 0x6 - movs r2, 0x6 - bl sub_80423F4 - lsls r0, 24 - cmp r0, 0 - beq _0804D6E0 - ldr r2, =gActiveBank - strb r7, [r2] - ldr r3, =gAbsentBankFlags - ldr r4, =gBitTable - ldrb r0, [r2] - lsls r0, 2 - adds r0, r4 - ldr r0, [r0] - ldrb r1, [r3] - orrs r0, r1 - strb r0, [r3] - ldr r3, =gHitMarker - ldrb r0, [r2] - lsls r0, 2 - adds r0, r4 - ldr r1, [r0] - lsls r1, 28 - ldr r0, [r3] - bics r0, r1 - str r0, [r3] - mov r0, r8 - str r0, [r6] - b _0804D804 - .pool -_0804D6E0: - ldr r4, =gActiveBank - strb r7, [r4] - ldrb r0, [r4] - ldr r3, =gBattleStruct - ldr r1, [r3] - adds r1, r0, r1 - adds r1, 0x58 - ldr r2, =gBattlePartyID - lsls r0, 1 - adds r0, r2 - ldrh r0, [r0] - strb r0, [r1] - ldrb r0, [r4] - ldr r1, [r3] - adds r0, r1 - adds r0, 0x5C - movs r1, 0x6 - strb r1, [r0] - ldr r1, [r3] - adds r1, 0x93 - ldr r2, =gBitTable - ldrb r0, [r4] - lsls r0, 2 - adds r0, r2 - ldr r2, [r0] - ldrb r0, [r1] - bics r0, r2 - strb r0, [r1] - ldrb r1, [r4] - movs r0, 0x2 - eors r0, r1 - ldr r3, [r3] - adds r0, r3 - adds r0, 0x5C - ldrb r2, [r0] - ldrb r1, [r4] - lsls r0, r1, 1 - adds r0, r1 - adds r0, 0x60 - adds r3, r0 - str r3, [sp] - movs r0, 0 - adds r1, r5, 0 - movs r3, 0 - bl EmitChoosePokemon - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r0, [r6] - adds r0, 0x6 - str r0, [r6] - ldrb r0, [r4] - bl GetBankIdentity - lsls r0, 24 - cmp r0, 0 - bne _0804D760 - ldr r1, =gBattleResults - ldrb r0, [r1, 0x2] - cmp r0, 0xFE - bhi _0804D760 - adds r0, 0x1 - strb r0, [r1, 0x2] -_0804D760: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0804D7C4 - ldr r1, =gActiveBank - movs r0, 0 - strb r0, [r1] - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r0, 0 - beq _0804D804 - adds r4, r1, 0 -_0804D77C: - ldrb r0, [r4] - cmp r0, r7 - beq _0804D792 - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - bl EmitLinkStandbyMsg - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0804D792: - ldrb r0, [r4] - adds r0, 0x1 - strb r0, [r4] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bcc _0804D77C - b _0804D804 - .pool -_0804D7C4: - adds r0, r7, 0 - bl GetBankIdentity - movs r1, 0x1 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByPlayerAI - ldr r4, =gActiveBank - strb r0, [r4] - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r2, =gBitTable - ldrb r3, [r4] - lsls r0, r3, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _0804D7F4 - movs r0, 0x2 - eors r3, r0 - strb r3, [r4] -_0804D7F4: - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - bl EmitLinkStandbyMsg - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0804D804: - add sp, 0x4 - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk50_openpartyscreen - - thumb_func_start atk51_switch_handle_order -atk51_switch_handle_order: @ 804D820 - push {r4-r7,lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - beq _0804D82C - b _0804DA8A -_0804D82C: - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r5, =gActiveBank - strb r0, [r5] - ldr r0, [r4] - ldrb r0, [r0, 0x2] - cmp r0, 0x1 - beq _0804D8CC - cmp r0, 0x1 - bgt _0804D858 - cmp r0, 0 - beq _0804D862 - b _0804DA82 - .pool -_0804D858: - cmp r0, 0x2 - beq _0804D8E8 - cmp r0, 0x3 - beq _0804D922 - b _0804DA82 -_0804D862: - movs r6, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r6, r0 - blt _0804D86E - b _0804DA82 -_0804D86E: - ldr r7, =gBattleBufferB -_0804D870: - ldrb r0, [r7] - cmp r0, 0x22 - bne _0804D8AA - ldr r5, =gBattleStruct - ldr r0, [r5] - adds r0, r6, r0 - adds r0, 0x5C - ldrb r1, [r7, 0x1] - strb r1, [r0] - ldr r0, [r5] - adds r0, 0x93 - ldrb r1, [r0] - ldr r2, =gBitTable - lsls r0, r6, 2 - adds r0, r2 - ldr r4, [r0] - ands r1, r4 - cmp r1, 0 - bne _0804D8AA - lsls r0, r6, 24 - lsrs r0, 24 - ldrb r1, [r7, 0x1] - bl sub_8184FBC - ldr r1, [r5] - adds r1, 0x93 - ldrb r0, [r1] - orrs r4, r0 - strb r4, [r1] -_0804D8AA: - movs r0, 0x80 - lsls r0, 2 - adds r7, r0 - adds r6, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r6, r0 - blt _0804D870 - b _0804DA82 - .pool -_0804D8CC: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0804D8DA - b _0804DA82 -_0804D8DA: - ldrb r0, [r5] - bl sub_803BDA0 - b _0804DA82 - .pool -_0804D8E8: - ldr r4, =gBattleStruct - ldr r0, [r4] - adds r0, 0x93 - ldrb r1, [r0] - ldr r6, =gBitTable - ldrb r2, [r5] - lsls r0, r2, 2 - adds r0, r6 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _0804D922 - ldr r0, =gBattleBufferB - lsls r1, r2, 9 - adds r0, 0x1 - adds r1, r0 - ldrb r1, [r1] - adds r0, r2, 0 - bl sub_8184FBC - ldr r2, [r4] - adds r2, 0x93 - ldrb r0, [r5] - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] -_0804D922: - ldr r1, =gBattleCommunication - ldr r6, =gBattleBufferB - ldr r7, =gActiveBank - ldrb r0, [r7] - lsls r0, 9 - adds r2, r6, 0x1 - adds r0, r2 - ldrb r0, [r0] - strb r0, [r1] - ldrb r0, [r7] - ldr r1, =gBattleStruct - mov r12, r1 - ldr r1, [r1] - adds r1, r0, r1 - adds r1, 0x5C - lsls r0, 9 - adds r0, r2 - ldrb r0, [r0] - strb r0, [r1] - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x42 - ands r0, r1 - cmp r0, 0x42 - bne _0804DA14 - ldrb r0, [r7] - mov r3, r12 - ldr r2, [r3] - lsls r1, r0, 1 - adds r1, r0 - adds r1, r2 - adds r1, 0x60 - ldrb r2, [r1] - movs r0, 0xF - ands r0, r2 - strb r0, [r1] - ldrb r0, [r7] - ldr r2, [r3] - lsls r1, r0, 1 - adds r1, r0 - adds r1, r2 - adds r1, 0x60 - lsls r0, 9 - adds r5, r6, 0x2 - adds r0, r5 - ldrb r2, [r0] - movs r3, 0xF0 - adds r0, r3, 0 - ands r0, r2 - ldrb r2, [r1] - orrs r0, r2 - strb r0, [r1] - ldrb r1, [r7] - mov r0, r12 - ldr r2, [r0] - lsls r0, r1, 1 - adds r0, r1 - adds r0, r2 - adds r0, 0x61 - lsls r1, 9 - adds r6, 0x3 - adds r1, r6 - ldrb r1, [r1] - strb r1, [r0] - ldrb r0, [r7] - movs r4, 0x2 - eors r0, r4 - mov r1, r12 - ldr r2, [r1] - lsls r1, r0, 1 - adds r1, r0 - adds r1, r2 - adds r1, 0x60 - ldrb r2, [r1] - adds r0, r3, 0 - ands r0, r2 - strb r0, [r1] - ldrb r0, [r7] - eors r0, r4 - mov r1, r12 - ldr r2, [r1] - lsls r1, r0, 1 - adds r1, r0 - adds r1, r2 - adds r1, 0x60 - ldrb r0, [r7] - lsls r0, 9 - adds r0, r5 - ldrb r0, [r0] - ands r3, r0 - lsrs r3, 4 - ldrb r0, [r1] - orrs r3, r0 - strb r3, [r1] - ldrb r0, [r7] - eors r4, r0 - mov r2, r12 - ldr r0, [r2] - lsls r1, r4, 1 - adds r1, r4 - adds r1, r0 - adds r1, 0x62 - ldrb r0, [r7] - lsls r0, 9 - adds r0, r6 - ldrb r0, [r0] - strb r0, [r1] - b _0804DA36 - .pool -_0804DA14: - movs r0, 0x80 - lsls r0, 15 - ands r1, r0 - cmp r1, 0 - beq _0804DA30 - ldrb r0, [r7] - mov r3, r12 - ldr r1, [r3] - adds r1, r0, r1 - adds r1, 0x5C - ldrb r1, [r1] - bl sub_80571DC - b _0804DA36 -_0804DA30: - ldrb r0, [r7] - bl sub_803BDA0 -_0804DA36: - ldr r1, =gBattleTextBuff1 - movs r5, 0xFD - strb r5, [r1] - movs r0, 0x6 - strb r0, [r1, 0x1] - ldr r4, =gBattleMons - ldr r3, =gBankAttacker - ldrb r0, [r3] - movs r2, 0x58 - muls r0, r2 - adds r0, r4 - ldrh r0, [r0] - strb r0, [r1, 0x2] - ldrb r0, [r3] - muls r0, r2 - adds r0, r4 - ldrh r0, [r0] - lsrs r0, 8 - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r2, =gBattleTextBuff2 - strb r5, [r2] - movs r0, 0x7 - strb r0, [r2, 0x1] - ldr r3, =gActiveBank - ldrb r0, [r3] - strb r0, [r2, 0x2] - ldr r1, =gBattleBufferB - ldrb r0, [r3] - lsls r0, 9 - adds r1, 0x1 - adds r0, r1 - ldrb r0, [r0] - strb r0, [r2, 0x3] - movs r0, 0x1 - negs r0, r0 - strb r0, [r2, 0x4] -_0804DA82: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x3 - str r0, [r1] -_0804DA8A: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk51_switch_handle_order - - thumb_func_start atk52_switch_in_effects -atk52_switch_in_effects: @ 804DAAC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - ldr r0, =gBattlescriptCurrInstr - mov r9, r0 - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r4, =gActiveBank - strb r0, [r4] - ldrb r0, [r4] - bl sub_803FA70 - ldr r1, =gHitMarker - mov r8, r1 - ldr r1, =gBitTable - ldrb r0, [r4] - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - lsls r1, 28 - mov r2, r8 - ldr r0, [r2] - bics r0, r1 - str r0, [r2] - ldr r2, =gSpecialStatuses - ldrb r0, [r4] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 2 - adds r1, r2 - ldrb r2, [r1] - movs r0, 0x41 - negs r0, r0 - ands r0, r2 - strb r0, [r1] - ldrb r0, [r4] - bl GetBankSide - ldr r5, =gSideAffecting - lsls r0, 24 - lsrs r0, 23 - adds r0, r5 - ldrh r1, [r0] - movs r7, 0x80 - lsls r7, 2 - mov r10, r7 - mov r0, r10 - ands r0, r1 - cmp r0, 0 - beq _0804DB1C - b _0804DC30 -_0804DB1C: - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - lsrs r0, 23 - adds r0, r5 - ldrh r1, [r0] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - bne _0804DB34 - b _0804DC30 -_0804DB34: - ldr r7, =gBattleMons - ldrb r2, [r4] - movs r6, 0x58 - adds r0, r2, 0 - muls r0, r6 - adds r1, r0, r7 - adds r0, r1, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0x2 - beq _0804DC30 - adds r0, r1, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0x2 - beq _0804DC30 - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x1A - beq _0804DC30 - adds r0, r2, 0 - bl GetBankSide - lsls r0, 24 - lsrs r0, 23 - adds r0, r5 - ldrh r2, [r0] - mov r1, r10 - orrs r1, r2 - strh r1, [r0] - ldrb r0, [r4] - adds r2, r0, 0 - muls r2, r6 - adds r0, r7, 0 - adds r0, 0x50 - adds r2, r0 - ldr r0, [r2] - ldr r1, =0xfdffffff - ands r0, r1 - str r0, [r2] - mov r1, r8 - ldr r0, [r1] - movs r2, 0x41 - negs r2, r2 - ands r0, r2 - str r0, [r1] - ldrb r0, [r4] - bl GetBankSide - ldr r2, =gSideTimers - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - adds r1, r2 - ldrb r0, [r1, 0xA] - movs r1, 0x5 - subs r1, r0 - lsls r1, 25 - lsrs r1, 24 - ldr r5, =gBattleMoveDamage - ldrb r0, [r4] - muls r0, r6 - adds r0, r7 - ldrh r0, [r0, 0x2C] - bl __divsi3 - str r0, [r5] - cmp r0, 0 - bne _0804DBC8 - movs r0, 0x1 - str r0, [r5] -_0804DBC8: - ldr r0, =gBattleScripting - ldrb r1, [r4] - strb r1, [r0, 0x17] - bl BattleScriptPushCursor - mov r7, r9 - ldr r0, [r7] - ldrb r0, [r0, 0x1] - cmp r0, 0 - bne _0804DC14 - ldr r0, =gUnknown_082DAE90 - str r0, [r7] - b _0804DD8E - .pool -_0804DC14: - cmp r0, 0x1 - bne _0804DC24 - ldr r0, =gUnknown_082DAE59 - mov r1, r9 - str r0, [r1] - b _0804DD8E - .pool -_0804DC24: - ldr r0, =gUnknown_082DAEC7 - mov r2, r9 - str r0, [r2] - b _0804DD8E - .pool -_0804DC30: - ldr r2, =gBattleMons - ldr r1, =gActiveBank - ldrb r3, [r1] - movs r0, 0x58 - muls r0, r3 - adds r0, r2 - adds r0, 0x20 - ldrb r0, [r0] - adds r5, r1, 0 - ldr r4, =gDisableStructs - cmp r0, 0x36 - bne _0804DC5E - lsls r0, r3, 3 - subs r0, r3 - lsls r0, 2 - adds r2, r0, r4 - ldrb r1, [r2, 0x18] - lsls r0, r1, 30 - cmp r0, 0 - blt _0804DC5E - movs r0, 0x1 - orrs r0, r1 - strb r0, [r2, 0x18] -_0804DC5E: - ldrb r0, [r5] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r1, r4 - ldrb r2, [r1, 0x18] - movs r0, 0x3 - negs r0, r0 - ands r0, r2 - strb r0, [r1, 0x18] - ldrb r1, [r5] - movs r0, 0 - str r0, [sp] - movs r2, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _0804DC88 - b _0804DD8E -_0804DC88: - ldrb r1, [r5] - movs r0, 0 - movs r2, 0 - bl ItemBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _0804DD8E - ldrb r0, [r5] - bl GetBankSide - ldr r1, =gSideAffecting - lsls r0, 24 - lsrs r0, 23 - adds r0, r1 - ldrh r2, [r0] - ldr r1, =0x0000fdff - ands r1, r2 - strh r1, [r0] - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r7, [r0] - cmp r4, r7 - bge _0804DCD8 - ldr r6, =gTurnOrder - adds r1, r5, 0 - ldr r5, =gUnknown_0202407A - movs r3, 0xC - adds r2, r0, 0 -_0804DCC2: - adds r0, r4, r6 - ldrb r0, [r0] - ldrb r7, [r1] - cmp r0, r7 - bne _0804DCD0 - adds r0, r4, r5 - strb r3, [r0] -_0804DCD0: - adds r4, 0x1 - ldrb r0, [r2] - cmp r4, r0 - blt _0804DCC2 -_0804DCD8: - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - bge _0804DD0C - ldr r6, =gBattleStruct - ldr r5, =gBattleMons -_0804DCE6: - lsls r0, r4, 24 - lsrs r0, 24 - bl GetBankSide - lsls r0, 24 - lsrs r0, 23 - adds r0, 0xA8 - ldr r1, [r6] - adds r1, r0 - movs r0, 0x58 - muls r0, r4 - adds r0, r5 - ldrh r0, [r0, 0x28] - strh r0, [r1] - adds r4, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _0804DCE6 -_0804DD0C: - ldr r0, =gBattlescriptCurrInstr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r5, r0, 0 - cmp r1, 0x5 - bne _0804DD88 - ldr r0, =gHitMarker - ldr r0, [r0] - lsrs r4, r0, 28 - ldr r1, =gBank1 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - ldr r2, =gBitTable - b _0804DD6E - .pool -_0804DD60: - ldr r0, =gNoOfAllBanks - ldrb r3, [r1] - ldrb r0, [r0] - cmp r3, r0 - bcs _0804DD88 - adds r0, r3, 0x1 - strb r0, [r1] -_0804DD6E: - ldrb r0, [r1] - lsls r0, 2 - adds r0, r2 - ldr r3, [r0] - adds r0, r4, 0 - ands r0, r3 - cmp r0, 0 - beq _0804DD60 - ldr r0, =gAbsentBankFlags - ldrb r0, [r0] - ands r0, r3 - cmp r0, 0 - bne _0804DD60 -_0804DD88: - ldr r0, [r5] - adds r0, 0x2 - str r0, [r5] -_0804DD8E: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk52_switch_in_effects - - thumb_func_start atk53_trainer_slide -atk53_trainer_slide: @ 804DDA8 - push {r4,r5,lr} - ldr r5, =gBattlescriptCurrInstr - ldr r0, [r5] - ldrb r0, [r0, 0x1] - bl GetBankByPlayerAI - ldr r4, =gActiveBank - strb r0, [r4] - movs r0, 0 - bl dp01_build_cmdbuf_x08_8_8_8 - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r0, [r5] - adds r0, 0x2 - str r0, [r5] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk53_trainer_slide - - thumb_func_start atk54_effectiveness_sound -atk54_effectiveness_sound: @ 804DDD8 - push {r4,r5,lr} - ldr r5, =gActiveBank - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r5] - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r1, [r0, 0x1] - ldrb r0, [r0, 0x2] - lsls r0, 8 - orrs r1, r0 - movs r0, 0 - bl EmitEffectivenessSound - ldrb r0, [r5] - bl MarkBufferBankForExecution - ldr r0, [r4] - adds r0, 0x3 - str r0, [r4] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk54_effectiveness_sound - - thumb_func_start atk55_play_sound -atk55_play_sound: @ 804DE14 - push {r4,r5,lr} - ldr r5, =gActiveBank - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r5] - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r1, [r0, 0x1] - ldrb r0, [r0, 0x2] - lsls r0, 8 - orrs r1, r0 - movs r0, 0 - movs r2, 0 - bl sub_8034300 - ldrb r0, [r5] - bl MarkBufferBankForExecution - ldr r0, [r4] - adds r0, 0x3 - str r0, [r4] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk55_play_sound - - thumb_func_start atk56_fainting_cry -atk56_fainting_cry: @ 804DE50 - push {r4,r5,lr} - ldr r5, =gBattlescriptCurrInstr - ldr r0, [r5] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r4, =gActiveBank - strb r0, [r4] - movs r0, 0 - bl dp01_build_cmdbuf_x2D_2D_2D_2D - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r0, [r5] - adds r0, 0x2 - str r0, [r5] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk56_fainting_cry - - thumb_func_start atk57 -atk57: @ 804DE80 - push {r4,lr} - movs r0, 0 - bl GetBankByPlayerAI - ldr r4, =gActiveBank - strb r0, [r4] - ldr r0, =gBattleOutcome - ldrb r1, [r0] - movs r0, 0 - bl dp01_build_cmdbuf_x37_a - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk57 - - thumb_func_start atk58_return_to_ball -atk58_return_to_ball: @ 804DEB8 - push {r4,r5,lr} - ldr r5, =gBattlescriptCurrInstr - ldr r0, [r5] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r4, =gActiveBank - strb r0, [r4] - movs r0, 0 - movs r1, 0x1 - bl EmitReturnPokeToBall - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r0, [r5] - adds r0, 0x2 - str r0, [r5] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk58_return_to_ball - - thumb_func_start atk59_learnmove_inbattle -atk59_learnmove_inbattle: @ 804DEEC - push {r4-r7,lr} - ldr r0, =gBattlescriptCurrInstr - ldr r2, [r0] - ldrb r6, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r6, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r6, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r6, r0 - ldrb r4, [r2, 0x5] - ldrb r0, [r2, 0x6] - lsls r0, 8 - orrs r4, r0 - ldrb r0, [r2, 0x7] - lsls r0, 16 - orrs r4, r0 - ldrb r0, [r2, 0x8] - lsls r0, 24 - orrs r4, r0 - ldr r0, =gBattleStruct - ldr r0, [r0] - ldrb r1, [r0, 0x10] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - ldrb r1, [r2, 0x9] - bl MonTryLearningNewMove - lsls r0, 16 - lsrs r5, r0, 16 - ldr r0, =0x0000fffe - cmp r5, r0 - bne _0804DF56 - adds r7, r5, 0 -_0804DF3A: - ldr r0, =gBattleStruct - ldr r0, [r0] - ldrb r1, [r0, 0x10] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0 - bl MonTryLearningNewMove - lsls r0, 16 - lsrs r5, r0, 16 - cmp r5, r7 - beq _0804DF3A -_0804DF56: - cmp r5, 0 - bne _0804DF70 - ldr r0, =gBattlescriptCurrInstr - str r4, [r0] - b _0804E018 - .pool -_0804DF70: - ldr r0, =0x0000ffff - cmp r5, r0 - bne _0804DF88 - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0xA - str r0, [r1] - b _0804E018 - .pool -_0804DF88: - movs r0, 0 - bl GetBankByPlayerAI - ldr r1, =gActiveBank - strb r0, [r1] - ldr r2, =gBattlePartyID - ldrb r3, [r1] - lsls r0, r3, 1 - adds r0, r2 - ldr r1, =gBattleStruct - ldr r1, [r1] - ldrh r0, [r0] - ldrb r1, [r1, 0x10] - cmp r0, r1 - bne _0804DFC8 - ldr r4, =gBattleMons - movs r0, 0x58 - adds r2, r3, 0 - muls r2, r0 - adds r0, r4, 0 - adds r0, 0x50 - adds r0, r2, r0 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 14 - ands r0, r1 - cmp r0, 0 - bne _0804DFC8 - adds r0, r2, r4 - adds r1, r5, 0 - bl GiveMoveToBattleMon -_0804DFC8: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0804E014 - movs r0, 0x2 - bl GetBankByPlayerAI - ldr r1, =gActiveBank - strb r0, [r1] - ldr r2, =gBattlePartyID - ldrb r3, [r1] - lsls r0, r3, 1 - adds r0, r2 - ldr r1, =gBattleStruct - ldr r1, [r1] - ldrh r0, [r0] - ldrb r1, [r1, 0x10] - cmp r0, r1 - bne _0804E014 - ldr r4, =gBattleMons - movs r0, 0x58 - adds r2, r3, 0 - muls r2, r0 - adds r0, r4, 0 - adds r0, 0x50 - adds r0, r2, r0 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 14 - ands r0, r1 - cmp r0, 0 - bne _0804E014 - adds r0, r2, r4 - adds r1, r5, 0 - bl GiveMoveToBattleMon -_0804E014: - ldr r0, =gBattlescriptCurrInstr - str r6, [r0] -_0804E018: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk59_learnmove_inbattle - - thumb_func_start atk5A -atk5A: @ 804E038 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - ldr r0, =gActiveBank - movs r1, 0 - strb r1, [r0] - ldr r0, =gBattleScripting - ldrb r1, [r0, 0x1F] - adds r2, r0, 0 - cmp r1, 0x6 - bls _0804E052 - b _0804E3B8 -_0804E052: - lsls r0, r1, 2 - ldr r1, =_0804E068 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0804E068: - .4byte _0804E084 - .4byte _0804E0BC - .4byte _0804E162 - .4byte _0804E1B8 - .4byte _0804E1E4 - .4byte _0804E38C - .4byte _0804E3AC -_0804E084: - movs r4, 0 - str r4, [sp] - movs r0, 0x18 - movs r1, 0x8 - movs r2, 0x1D - movs r3, 0xD - bl sub_8056A3C - ldr r0, =gText_BattleYesNoChoice - movs r1, 0xC - bl battle_show_message_maybe - ldr r1, =gBattleScripting - ldrb r0, [r1, 0x1F] - adds r0, 0x1 - strb r0, [r1, 0x1F] - ldr r0, =gBattleCommunication - strb r4, [r0, 0x1] - movs r0, 0 - bl sub_8056B74 - b _0804E3B8 - .pool -_0804E0BC: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0804E0E4 - ldr r4, =gBattleCommunication - ldrb r0, [r4, 0x1] - cmp r0, 0 - beq _0804E0E4 - movs r0, 0x5 - bl PlaySE - ldrb r0, [r4, 0x1] - bl sub_8056BAC - movs r0, 0 - strb r0, [r4, 0x1] - bl sub_8056B74 -_0804E0E4: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0804E10C - ldr r4, =gBattleCommunication - ldrb r0, [r4, 0x1] - cmp r0, 0 - bne _0804E10C - movs r0, 0x5 - bl PlaySE - ldrb r0, [r4, 0x1] - bl sub_8056BAC - movs r0, 0x1 - strb r0, [r4, 0x1] - bl sub_8056B74 -_0804E10C: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r5, 0x1 - adds r0, r5, 0 - ands r0, r1 - cmp r0, 0 - beq _0804E150 - movs r0, 0x5 - bl PlaySE - ldr r0, =gBattleCommunication - ldrb r4, [r0, 0x1] - cmp r4, 0 - bne _0804E20A - str r5, [sp] - movs r0, 0x18 - movs r1, 0x8 - movs r2, 0x1D - movs r3, 0xD - bl sub_8056A3C - movs r0, 0x1 - negs r0, r0 - str r4, [sp] - movs r1, 0 - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - b _0804E192 - .pool -_0804E150: - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - bne _0804E15A - b _0804E3B8 -_0804E15A: - movs r0, 0x5 - bl PlaySE - b _0804E20A -_0804E162: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0804E170 - b _0804E3B8 -_0804E170: - bl FreeAllWindowBuffers - ldr r0, =gPlayerParty - ldr r1, =gBattleStruct - ldr r1, [r1] - ldrb r1, [r1, 0x10] - ldr r2, =gPlayerPartyCount - ldrb r2, [r2] - subs r2, 0x1 - lsls r2, 24 - lsrs r2, 24 - ldr r3, =sub_80A92F8 - ldr r4, =gMoveToLearn - ldrh r4, [r4] - str r4, [sp] - bl sub_81BFA38 -_0804E192: - ldr r1, =gBattleScripting - ldrb r0, [r1, 0x1F] - adds r0, 0x1 - strb r0, [r1, 0x1F] - b _0804E3B8 - .pool -_0804E1B8: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0804E1C6 - b _0804E3B8 -_0804E1C6: - ldr r0, =gMain - ldr r1, [r0, 0x4] - ldr r0, =sub_8038420 - cmp r1, r0 - beq _0804E1D2 - b _0804E3B8 -_0804E1D2: - ldrb r0, [r2, 0x1F] - adds r0, 0x1 - b _0804E3B6 - .pool -_0804E1E4: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0804E1F2 - b _0804E3B8 -_0804E1F2: - ldr r0, =gMain - ldr r1, [r0, 0x4] - ldr r0, =sub_8038420 - cmp r1, r0 - beq _0804E1FE - b _0804E3B8 -_0804E1FE: - bl sub_81C1B94 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0x4 - bne _0804E224 -_0804E20A: - ldr r1, =gBattleScripting - movs r0, 0x5 - strb r0, [r1, 0x1F] - b _0804E3B8 - .pool -_0804E224: - ldr r6, =gBattleStruct - ldr r0, [r6] - ldrb r0, [r0, 0x10] - movs r1, 0x64 - mov r8, r1 - mov r1, r8 - muls r1, r0 - adds r0, r1, 0 - ldr r7, =gPlayerParty - adds r0, r7 - adds r1, r5, 0 - adds r1, 0xD - bl GetMonData - lsls r0, 16 - lsrs r4, r0, 16 - adds r0, r4, 0 - bl IsHMMove2 - cmp r0, 0 - beq _0804E274 - ldr r0, =0x0000013f - ldr r1, =gActiveBank - ldrb r1, [r1] - bl PrepareStringBattle - ldr r1, =gBattleScripting - movs r0, 0x6 - strb r0, [r1, 0x1F] - b _0804E3B8 - .pool -_0804E274: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - ldr r1, =gBattleTextBuff2 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x2 - strb r0, [r1, 0x1] - strb r4, [r1, 0x2] - lsrs r0, r4, 8 - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r0, [r6] - ldrb r0, [r0, 0x10] - mov r1, r8 - muls r1, r0 - adds r0, r1, 0 - adds r0, r7 - adds r1, r5, 0 - bl RemoveMonPPBonus - ldr r0, [r6] - ldrb r0, [r0, 0x10] - mov r1, r8 - muls r1, r0 - adds r0, r1, 0 - adds r0, r7 - ldr r7, =gMoveToLearn - ldrh r1, [r7] - adds r2, r5, 0 - bl SetMonMoveSlot - ldr r0, =gBattlePartyID - ldr r1, [r6] - ldrh r0, [r0] - ldrb r1, [r1, 0x10] - cmp r0, r1 - bne _0804E30A - ldr r4, =gBattleMons - ldr r0, [r4, 0x50] - movs r1, 0x80 - lsls r1, 14 - ands r0, r1 - cmp r0, 0 - bne _0804E30A - ldr r0, =gDisableStructs - ldrb r1, [r0, 0x18] - lsrs r1, 4 - ldr r2, =gBitTable - lsls r0, r5, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _0804E30A - adds r0, r4, 0 - adds r1, r5, 0 - bl RemoveBattleMonPPBonus - ldrh r1, [r7] - adds r0, r4, 0 - adds r2, r5, 0 - bl SetBattleMonMoveSlot -_0804E30A: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0804E3B8 - ldr r2, =gBattlePartyID - ldr r0, =gBattleStruct - ldr r1, [r0] - ldrh r0, [r2, 0x4] - ldrb r1, [r1, 0x10] - cmp r0, r1 - bne _0804E3B8 - ldr r4, =gBattleMons - movs r1, 0x80 - lsls r1, 1 - adds r0, r4, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 14 - ands r0, r1 - cmp r0, 0 - bne _0804E3B8 - ldr r0, =gDisableStructs - adds r0, 0x50 - ldrb r1, [r0] - lsrs r1, 4 - ldr r2, =gBitTable - lsls r0, r5, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _0804E3B8 - adds r4, 0xB0 - adds r0, r4, 0 - adds r1, r5, 0 - bl RemoveBattleMonPPBonus - ldr r0, =gMoveToLearn - ldrh r1, [r0] - adds r0, r4, 0 - adds r2, r5, 0 - bl SetBattleMonMoveSlot - b _0804E3B8 - .pool -_0804E38C: - movs r0, 0x1 - str r0, [sp] - movs r0, 0x18 - movs r1, 0x8 - movs r2, 0x1D - movs r3, 0xD - bl sub_8056A3C - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _0804E3B8 - .pool -_0804E3AC: - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0804E3B8 - movs r0, 0x2 -_0804E3B6: - strb r0, [r2, 0x1F] -_0804E3B8: - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk5A - - thumb_func_start atk5B_80256E0 -atk5B_80256E0: @ 804E3C8 - push {r4,r5,lr} - sub sp, 0x4 - ldr r5, =gBattleScripting - ldrb r4, [r5, 0x1F] - cmp r4, 0 - beq _0804E3E0 - cmp r4, 0x1 - beq _0804E410 - b _0804E4FA - .pool -_0804E3E0: - str r4, [sp] - movs r0, 0x18 - movs r1, 0x8 - movs r2, 0x1D - movs r3, 0xD - bl sub_8056A3C - ldr r0, =gText_BattleYesNoChoice - movs r1, 0xC - bl battle_show_message_maybe - ldrb r0, [r5, 0x1F] - adds r0, 0x1 - strb r0, [r5, 0x1F] - ldr r0, =gBattleCommunication - strb r4, [r0, 0x1] - movs r0, 0 - bl sub_8056B74 - b _0804E4FA - .pool -_0804E410: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0804E438 - ldr r4, =gBattleCommunication - ldrb r0, [r4, 0x1] - cmp r0, 0 - beq _0804E438 - movs r0, 0x5 - bl PlaySE - ldrb r0, [r4, 0x1] - bl sub_8056BAC - movs r0, 0 - strb r0, [r4, 0x1] - bl sub_8056B74 -_0804E438: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0804E460 - ldr r4, =gBattleCommunication - ldrb r0, [r4, 0x1] - cmp r0, 0 - bne _0804E460 - movs r0, 0x5 - bl PlaySE - ldrb r0, [r4, 0x1] - bl sub_8056BAC - movs r0, 0x1 - strb r0, [r4, 0x1] - bl sub_8056B74 -_0804E460: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r4, 0x1 - adds r0, r4, 0 - ands r0, r1 - cmp r0, 0 - beq _0804E4C4 - movs r0, 0x5 - bl PlaySE - ldr r0, =gBattleCommunication - ldrb r0, [r0, 0x1] - cmp r0, 0 - beq _0804E4A4 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _0804E4AC - .pool -_0804E4A4: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_0804E4AC: - movs r0, 0x1 - str r0, [sp] - movs r0, 0x18 - movs r1, 0x8 - movs r2, 0x1D - movs r3, 0xD - bl sub_8056A3C - b _0804E4FA - .pool -_0804E4C4: - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _0804E4FA - movs r0, 0x5 - bl PlaySE - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - str r4, [sp] - movs r0, 0x18 - movs r1, 0x8 - movs r2, 0x1D - movs r3, 0xD - bl sub_8056A3C -_0804E4FA: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk5B_80256E0 - - thumb_func_start atk5C_hitanimation -atk5C_hitanimation: @ 804E508 - push {r4,lr} - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r2, =gActiveBank - strb r0, [r2] - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - bne _0804E58C - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 1 - ands r0, r1 - cmp r0, 0 - beq _0804E55A - ldr r1, =gBattleMons - ldrb r2, [r2] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 17 - ands r0, r1 - cmp r0, 0 - beq _0804E55A - ldr r0, =gDisableStructs - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0xA] - cmp r0, 0 - bne _0804E58C -_0804E55A: - movs r0, 0 - bl dp01_build_cmdbuf_x29_29_29_29 - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] - b _0804E592 - .pool -_0804E58C: - ldr r0, [r4] - adds r0, 0x2 - str r0, [r4] -_0804E592: - pop {r4} - pop {r0} - bx r0 - thumb_func_end atk5C_hitanimation - - thumb_func_start sub_804E598 -sub_804E598: @ 804E598 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - lsls r0, 16 - lsrs r6, r0, 16 - movs r7, 0 - movs r5, 0 - movs r0, 0x80 - lsls r0, 3 - cmp r6, r0 - bne _0804E5D8 - ldr r0, =gBattleResources - ldr r0, [r0] - ldr r0, [r0] - adds r0, 0x94 - ldrb r2, [r0] - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x4A - ldrb r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - muls r0, r2 - b _0804E6CA - .pool -_0804E5D8: - ldr r0, =gTrainers - lsls r2, r6, 2 - adds r1, r2, r6 - lsls r1, 3 - adds r4, r1, r0 - ldrb r3, [r4] - mov r12, r0 - cmp r3, 0x1 - beq _0804E62E - cmp r3, 0x1 - bgt _0804E5F8 - cmp r3, 0 - beq _0804E602 - b _0804E644 - .pool -_0804E5F8: - cmp r3, 0x2 - beq _0804E618 - cmp r3, 0x3 - beq _0804E62E - b _0804E644 -_0804E602: - mov r0, r12 - adds r0, 0x24 - adds r0, r1, r0 - ldr r1, [r0] - adds r0, r4, 0 - adds r0, 0x20 - ldrb r0, [r0] - lsls r0, 3 - adds r0, r1 - subs r0, 0x8 - b _0804E642 -_0804E618: - mov r0, r12 - adds r0, 0x24 - adds r0, r1, r0 - ldr r1, [r0] - adds r0, r4, 0 - adds r0, 0x20 - ldrb r0, [r0] - lsls r0, 3 - adds r0, r1 - subs r0, 0x8 - b _0804E642 -_0804E62E: - mov r0, r12 - adds r0, 0x24 - adds r0, r1, r0 - ldr r1, [r0] - adds r0, r4, 0 - adds r0, 0x20 - ldrb r0, [r0] - lsls r0, 4 - adds r0, r1 - subs r0, 0x10 -_0804E642: - ldrb r5, [r0, 0x2] -_0804E644: - ldr r1, =gUnknown_0831AEB8 - lsls r0, r7, 2 - adds r4, r0, r1 - ldrb r3, [r4] - ldr r0, =gBattleStruct - mov r8, r0 - mov r9, r1 - ldr r1, =gBattleTypeFlags - mov r10, r1 - cmp r3, 0xFF - beq _0804E67A - adds r0, r2, r6 - lsls r0, 3 - add r0, r12 - ldrb r1, [r0, 0x1] - cmp r3, r1 - beq _0804E67A - adds r2, r0, 0 - adds r0, r4, 0 -_0804E66A: - adds r0, 0x4 - adds r7, 0x1 - ldrb r1, [r0] - cmp r1, 0xFF - beq _0804E67A - ldrb r3, [r2, 0x1] - cmp r1, r3 - bne _0804E66A -_0804E67A: - mov r0, r10 - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 8 - ands r0, r1 - cmp r0, 0 - bne _0804E6B4 - movs r0, 0x1 - ands r1, r0 - cmp r1, 0 - beq _0804E6B4 - mov r3, r8 - ldr r0, [r3] - adds r0, 0x4A - ldrb r0, [r0] - lsls r0, 2 - adds r1, r5, 0 - muls r1, r0 - lsls r0, r7, 2 - add r0, r9 - ldrb r0, [r0, 0x1] - lsls r0, 1 - b _0804E6C8 - .pool -_0804E6B4: - mov r1, r8 - ldr r0, [r1] - adds r0, 0x4A - ldrb r0, [r0] - lsls r0, 2 - adds r1, r5, 0 - muls r1, r0 - lsls r0, r7, 2 - add r0, r9 - ldrb r0, [r0, 0x1] -_0804E6C8: - muls r0, r1 -_0804E6CA: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_804E598 - - thumb_func_start atk5D_getmoneyreward -atk5D_getmoneyreward: @ 804E6D8 - push {r4,lr} - ldr r0, =gTrainerBattleOpponent_A - ldrh r0, [r0] - bl sub_804E598 - adds r4, r0, 0 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 8 - ands r0, r1 - cmp r0, 0 - beq _0804E6FC - ldr r0, =gTrainerBattleOpponent_B - ldrh r0, [r0] - bl sub_804E598 - adds r4, r0 -_0804E6FC: - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - movs r1, 0x92 - lsls r1, 3 - adds r0, r1 - adds r1, r4, 0 - bl AddMoney - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x1 - strb r0, [r1, 0x1] - movs r0, 0x4 - strb r0, [r1, 0x2] - movs r0, 0x5 - strb r0, [r1, 0x3] - strb r4, [r1, 0x4] - movs r0, 0xFF - lsls r0, 8 - ands r0, r4 - lsrs r0, 8 - strb r0, [r1, 0x5] - movs r0, 0xFF - lsls r0, 16 - ands r0, r4 - lsrs r0, 16 - strb r0, [r1, 0x6] - lsrs r0, r4, 24 - strb r0, [r1, 0x7] - movs r0, 0xFF - strb r0, [r1, 0x8] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk5D_getmoneyreward - - thumb_func_start atk5E_8025A70 -atk5E_8025A70: @ 804E764 - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r6, =gActiveBank - strb r0, [r6] - ldr r5, =gBattleCommunication - ldrb r0, [r5] - mov r8, r4 - cmp r0, 0 - beq _0804E794 - cmp r0, 0x1 - beq _0804E7AC - b _0804E800 - .pool -_0804E794: - movs r0, 0 - movs r1, 0 - movs r2, 0 - bl EmitGetAttributes - ldrb r0, [r6] - bl MarkBufferBankForExecution - ldrb r0, [r5] - adds r0, 0x1 - strb r0, [r5] - b _0804E800 -_0804E7AC: - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0804E800 - ldrb r0, [r6] - lsls r0, 9 - ldr r1, =gBattleBufferB + 4 - adds r0, r1 - mov r12, r0 - movs r2, 0 - adds r4, r6, 0 - movs r5, 0x58 - ldr r6, =gBattleMons + 0x24 - adds r7, r6, 0 - subs r7, 0x18 - mov r3, r12 - adds r3, 0xC -_0804E7CE: - lsls r1, r2, 1 - ldrb r0, [r4] - muls r0, r5 - adds r1, r0 - adds r1, r7 - ldrh r0, [r3] - strh r0, [r1] - ldrb r0, [r4] - adds r1, r0, 0 - muls r1, r5 - adds r1, r2, r1 - adds r1, r6 - mov r0, r12 - adds r0, 0x24 - adds r0, r2 - ldrb r0, [r0] - strb r0, [r1] - adds r3, 0x2 - adds r2, 0x1 - cmp r2, 0x3 - ble _0804E7CE - mov r1, r8 - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] -_0804E800: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk5E_8025A70 - - thumb_func_start atk5F_8025B24 -atk5F_8025B24: @ 804E818 - push {lr} - ldr r0, =gActiveBank - ldr r2, =gBankAttacker - ldrb r3, [r2] - strb r3, [r0] - ldr r1, =gBankTarget - ldrb r0, [r1] - strb r0, [r2] - strb r3, [r1] - ldr r2, =gHitMarker - ldr r1, [r2] - movs r3, 0x80 - lsls r3, 5 - adds r0, r1, 0 - ands r0, r3 - cmp r0, 0 - beq _0804E854 - ldr r0, =0xffffefff - ands r1, r0 - b _0804E856 - .pool -_0804E854: - orrs r1, r3 -_0804E856: - str r1, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atk5F_8025B24 - - thumb_func_start atk60_increment_gamestat -atk60_increment_gamestat: @ 804E868 - push {lr} - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0804E882 - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl IncrementGameStat -_0804E882: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atk60_increment_gamestat - - thumb_func_start atk61_8025BA4 -atk61_8025BA4: @ 804E898 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x30 - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0804E94C - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r1, =gActiveBank - strb r0, [r1] - ldrb r0, [r1] - bl GetBankSide - lsls r0, 24 - ldr r1, =gEnemyParty - mov r8, r1 - cmp r0, 0 - bne _0804E8CA - ldr r0, =gPlayerParty - mov r8, r0 -_0804E8CA: - movs r7, 0 - add r6, sp, 0x4 - mov r5, sp -_0804E8D0: - movs r0, 0x64 - muls r0, r7 - mov r1, r8 - adds r4, r1, r0 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - cmp r0, 0 - beq _0804E8F4 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - movs r1, 0xCE - lsls r1, 1 - cmp r0, r1 - bne _0804E914 -_0804E8F4: - ldr r0, =0x0000ffff - strh r0, [r5] - movs r0, 0 - b _0804E926 - .pool -_0804E914: - adds r0, r4, 0 - movs r1, 0x39 - bl GetMonData - strh r0, [r5] - adds r0, r4, 0 - movs r1, 0x37 - bl GetMonData -_0804E926: - str r0, [r6] - adds r6, 0x8 - adds r5, 0x8 - adds r7, 0x1 - cmp r7, 0x5 - ble _0804E8D0 - movs r0, 0 - mov r1, sp - movs r2, 0x1 - bl dp01_build_cmdbuf_x30_TODO - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] -_0804E94C: - add sp, 0x30 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk61_8025BA4 - - thumb_func_start atk62_08025C6C -atk62_08025C6C: @ 804E960 - push {r4,r5,lr} - ldr r5, =gBattlescriptCurrInstr - ldr r0, [r5] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r4, =gActiveBank - strb r0, [r4] - movs r0, 0 - bl dp01_build_cmdbuf_x31_31_31_31 - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r0, [r5] - adds r0, 0x2 - str r0, [r5] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk62_08025C6C - - thumb_func_start atk63_jumptorandomattack -atk63_jumptorandomattack: @ 804E990 - push {r4,lr} - ldr r0, =gBattlescriptCurrInstr - ldr r1, [r0] - ldrb r1, [r1, 0x1] - adds r4, r0, 0 - cmp r1, 0 - beq _0804E9B4 - ldr r0, =gCurrentMove - ldr r1, =gRandomMove - ldrh r1, [r1] - strh r1, [r0] - b _0804E9C2 - .pool -_0804E9B4: - ldr r2, =gLastUsedMove - ldr r1, =gCurrentMove - ldr r0, =gRandomMove - ldrh r0, [r0] - strh r0, [r1] - strh r0, [r2] - adds r0, r1, 0 -_0804E9C2: - ldr r3, =gBattleScriptsForMoveEffects - ldr r2, =gBattleMoves - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk63_jumptorandomattack - - thumb_func_start atk64_statusanimation -atk64_statusanimation: @ 804E9F4 - push {r4,lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0804EA5C - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r4, =gActiveBank - strb r0, [r4] - ldr r1, =gStatuses3 - ldrb r2, [r4] - lsls r0, r2, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x000400c0 - ands r0, r1 - cmp r0, 0 - bne _0804EA54 - ldr r0, =gDisableStructs - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0xA] - cmp r0, 0 - bne _0804EA54 - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0804EA54 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r2 - adds r1, 0x4C - adds r0, r1 - ldr r2, [r0] - movs r0, 0 - movs r1, 0 - bl dp01_build_cmdbuf_x1B_aaaa_b - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0804EA54: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] -_0804EA5C: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk64_statusanimation - - thumb_func_start atk65_status2animation -atk65_status2animation: @ 804EA84 - push {r4,r5,lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0804EB04 - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r5, =gActiveBank - strb r0, [r5] - ldr r1, [r4] - ldrb r3, [r1, 0x2] - ldrb r0, [r1, 0x3] - lsls r0, 8 - orrs r3, r0 - ldrb r0, [r1, 0x4] - lsls r0, 16 - orrs r3, r0 - ldrb r0, [r1, 0x5] - lsls r0, 24 - orrs r3, r0 - ldr r1, =gStatuses3 - ldrb r2, [r5] - lsls r0, r2, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x000400c0 - ands r0, r1 - cmp r0, 0 - bne _0804EAFC - ldr r0, =gDisableStructs - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0xA] - cmp r0, 0 - bne _0804EAFC - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0804EAFC - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r2, [r0] - ands r2, r3 - movs r0, 0 - movs r1, 0x1 - bl dp01_build_cmdbuf_x1B_aaaa_b - ldrb r0, [r5] - bl MarkBufferBankForExecution -_0804EAFC: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x6 - str r0, [r1] -_0804EB04: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk65_status2animation - - thumb_func_start atk66_chosenstatusanimation -atk66_chosenstatusanimation: @ 804EB2C - push {r4,r5,lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0804EB9E - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r5, =gActiveBank - strb r0, [r5] - ldr r4, [r4] - ldrb r2, [r4, 0x3] - ldrb r0, [r4, 0x4] - lsls r0, 8 - orrs r2, r0 - ldrb r0, [r4, 0x5] - lsls r0, 16 - orrs r2, r0 - ldrb r0, [r4, 0x6] - lsls r0, 24 - orrs r2, r0 - ldr r1, =gStatuses3 - ldrb r3, [r5] - lsls r0, r3, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x000400c0 - ands r0, r1 - cmp r0, 0 - bne _0804EB96 - ldr r0, =gDisableStructs - lsls r1, r3, 3 - subs r1, r3 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0xA] - cmp r0, 0 - bne _0804EB96 - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0804EB96 - ldrb r1, [r4, 0x2] - movs r0, 0 - bl dp01_build_cmdbuf_x1B_aaaa_b - ldrb r0, [r5] - bl MarkBufferBankForExecution -_0804EB96: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x7 - str r0, [r1] -_0804EB9E: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk66_chosenstatusanimation - - thumb_func_start atk67_8025ECC -atk67_8025ECC: @ 804EBC0 - push {r4,r5,lr} - sub sp, 0x4 - ldr r5, =gBattleCommunication - ldrb r4, [r5] - cmp r4, 0 - beq _0804EBD8 - cmp r4, 0x1 - beq _0804EC04 - b _0804EC96 - .pool -_0804EBD8: - str r4, [sp] - movs r0, 0x18 - movs r1, 0x8 - movs r2, 0x1D - movs r3, 0xD - bl sub_8056A3C - ldr r0, =gText_BattleYesNoChoice - movs r1, 0xC - bl battle_show_message_maybe - ldrb r0, [r5] - adds r0, 0x1 - strb r0, [r5] - strb r4, [r5, 0x1] - movs r0, 0 - bl sub_8056B74 - b _0804EC96 - .pool -_0804EC04: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0804EC2A - ldrb r0, [r5, 0x1] - cmp r0, 0 - beq _0804EC2A - movs r0, 0x5 - bl PlaySE - ldrb r0, [r5, 0x1] - bl sub_8056BAC - movs r0, 0 - strb r0, [r5, 0x1] - bl sub_8056B74 -_0804EC2A: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0804EC52 - ldr r4, =gBattleCommunication - ldrb r0, [r4, 0x1] - cmp r0, 0 - bne _0804EC52 - movs r0, 0x5 - bl PlaySE - ldrb r0, [r4, 0x1] - bl sub_8056BAC - movs r0, 0x1 - strb r0, [r4, 0x1] - bl sub_8056B74 -_0804EC52: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _0804EC70 - ldr r0, =gBattleCommunication - movs r4, 0x1 - strb r4, [r0, 0x1] - b _0804EC7A - .pool -_0804EC70: - movs r4, 0x1 - adds r0, r4, 0 - ands r0, r1 - cmp r0, 0 - beq _0804EC96 -_0804EC7A: - movs r0, 0x5 - bl PlaySE - str r4, [sp] - movs r0, 0x18 - movs r1, 0x8 - movs r2, 0x1D - movs r3, 0xD - bl sub_8056A3C - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] -_0804EC96: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk67_8025ECC - - thumb_func_start atk68_80246A0 -atk68_80246A0: @ 804ECA4 - push {r4,r5,lr} - movs r1, 0 - ldr r2, =gNoOfAllBanks - ldr r5, =gBattlescriptCurrInstr - ldrb r0, [r2] - cmp r1, r0 - bge _0804ECC2 - ldr r4, =gUnknown_0202407A - movs r3, 0xC -_0804ECB6: - adds r0, r1, r4 - strb r3, [r0] - adds r1, 0x1 - ldrb r0, [r2] - cmp r1, r0 - blt _0804ECB6 -_0804ECC2: - ldr r0, [r5] - adds r0, 0x1 - str r0, [r5] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk68_80246A0 - - thumb_func_start atk69_dmg_adjustment2 -atk69_dmg_adjustment2: @ 804ECDC - push {r4-r7,lr} - ldr r7, =gBattleMons - ldr r6, =gBankTarget - ldrb r2, [r6] - movs r5, 0x58 - adds r0, r2, 0 - muls r0, r5 - adds r1, r0, r7 - ldrh r0, [r1, 0x2E] - cmp r0, 0xAF - bne _0804ED10 - ldr r1, =gEnigmaBerries - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r1 - ldrb r4, [r0, 0x7] - ldrb r6, [r0, 0x1A] - b _0804ED2A - .pool -_0804ED10: - ldrh r0, [r1, 0x2E] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r4, r0, 24 - ldrb r0, [r6] - muls r0, r5 - adds r0, r7 - ldrh r0, [r0, 0x2E] - bl ItemId_GetHoldEffectParam - lsls r0, 24 - lsrs r6, r0, 24 -_0804ED2A: - ldr r1, =gStringBank - ldr r5, =gBankTarget - ldrb r0, [r5] - strb r0, [r1] - cmp r4, 0x27 - bne _0804ED68 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x64 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - cmp r0, r6 - bcs _0804ED68 - ldrb r0, [r5] - movs r1, 0x27 - bl RecordItemEffectBattle - ldr r2, =gSpecialStatuses - ldrb r1, [r5] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0] - movs r2, 0x80 - orrs r1, r2 - strb r1, [r0] -_0804ED68: - ldr r2, =gBattleMons - ldr r3, =gBankTarget - ldrb r4, [r3] - movs r0, 0x58 - muls r0, r4 - adds r1, r2, 0 - adds r1, 0x50 - adds r0, r1 - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 17 - ands r1, r0 - adds r5, r2, 0 - cmp r1, 0 - bne _0804EE38 - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - cmp r0, 0x65 - beq _0804EDBA - ldr r0, =gProtectStructs - lsls r1, r4, 4 - adds r1, r0 - ldrb r0, [r1] - lsls r0, 30 - cmp r0, 0 - blt _0804EDBA - ldr r0, =gSpecialStatuses - lsls r1, r4, 2 - adds r1, r4 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1] - lsrs r0, 7 - cmp r0, 0 - beq _0804EE38 -_0804EDBA: - ldrb r0, [r3] - movs r4, 0x58 - muls r0, r4 - adds r0, r5 - ldrh r1, [r0, 0x28] - ldr r2, =gBattleMoveDamage - ldr r0, [r2] - cmp r1, r0 - bgt _0804EE38 - subs r0, r1, 0x1 - str r0, [r2] - ldr r1, =gProtectStructs - ldrb r3, [r3] - lsls r0, r3, 4 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 30 - cmp r0, 0 - bge _0804EE10 - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r2, 0x40 - orrs r1, r2 - strb r1, [r0] - b _0804EE38 - .pool -_0804EE10: - ldr r0, =gSpecialStatuses - lsls r1, r3, 2 - adds r1, r3 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1] - lsrs r0, 7 - cmp r0, 0 - beq _0804EE38 - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gLastUsedItem - adds r0, r3, 0 - muls r0, r4 - adds r0, r5 - ldrh r0, [r0, 0x2E] - strh r0, [r1] -_0804EE38: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk69_dmg_adjustment2 - thumb_func_start atk6A_removeitem atk6A_removeitem: @ 804EE58 push {r4-r6,lr} @@ -5058,7 +1575,7 @@ _0804FC38: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0x16 - bl battle_show_message_maybe + bl sub_814F9EC b _0804FD70 .pool _0804FC60: @@ -5168,7 +1685,7 @@ _0804FD5C: lsls r1, 1 movs r0, 0 movs r2, 0x1 - bl sub_8034300 + bl EmitPlaySound ldr r0, =gActiveBank ldrb r0, [r0] bl MarkBufferBankForExecution @@ -17635,7 +14152,7 @@ _08056978: bne _08056A2C ldr r0, =gMain ldr r1, [r0, 0x4] - ldr r0, =sub_8038420 + ldr r0, =BattleMainCB2 cmp r1, r0 bne _08056A2C ldr r2, =gTasks @@ -17866,8 +14383,8 @@ _08056B62: bx r0 thumb_func_end sub_8056A3C - thumb_func_start sub_8056B74 -sub_8056B74: @ 8056B74 + thumb_func_start BattleCreateCursorAt +BattleCreateCursorAt: @ 8056B74 push {lr} sub sp, 0x10 adds r3, r0, 0 @@ -17894,10 +14411,10 @@ sub_8056B74: @ 8056B74 add sp, 0x10 pop {r0} bx r0 - thumb_func_end sub_8056B74 + thumb_func_end BattleCreateCursorAt - thumb_func_start sub_8056BAC -sub_8056BAC: @ 8056BAC + thumb_func_start BattleDestroyCursorAt +BattleDestroyCursorAt: @ 8056BAC push {lr} sub sp, 0x10 adds r3, r0, 0 @@ -17926,7 +14443,7 @@ sub_8056BAC: @ 8056BAC pop {r0} bx r0 .pool - thumb_func_end sub_8056BAC + thumb_func_end BattleDestroyCursorAt thumb_func_start atkF3_nickname_caught_poke atkF3_nickname_caught_poke: @ 8056BEC @@ -17966,14 +14483,14 @@ _08056C2C: bl sub_8056A3C ldr r0, =gText_BattleYesNoChoice movs r1, 0xC - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gBattleCommunication ldrb r0, [r1] adds r0, 0x1 strb r0, [r1] strb r4, [r1, 0x1] movs r0, 0 - bl sub_8056B74 + bl BattleCreateCursorAt b _08056E62 .pool _08056C60: @@ -17989,10 +14506,10 @@ _08056C60: movs r0, 0x5 bl PlaySE ldrb r0, [r4, 0x1] - bl sub_8056BAC + bl BattleDestroyCursorAt movs r0, 0 strb r0, [r4, 0x1] - bl sub_8056B74 + bl BattleCreateCursorAt _08056C86: ldr r0, =gMain ldrh r1, [r0, 0x2E] @@ -18007,10 +14524,10 @@ _08056C86: movs r0, 0x5 bl PlaySE ldrb r0, [r4, 0x1] - bl sub_8056BAC + bl BattleDestroyCursorAt movs r0, 0x1 strb r0, [r4, 0x1] - bl sub_8056B74 + bl BattleCreateCursorAt _08056CAE: ldr r0, =gMain ldrh r1, [r0, 0x2E] @@ -18124,7 +14641,7 @@ _08056D0A: ldr r1, [r2] adds r1, 0x6D str r0, [sp] - ldr r0, =sub_8038420 + ldr r0, =BattleMainCB2 str r0, [sp, 0x4] movs r0, 0x2 adds r2, r6, 0 @@ -18139,7 +14656,7 @@ _08056D0A: _08056DD4: ldr r0, =gMain ldr r1, [r0, 0x4] - ldr r0, =sub_8038420 + ldr r0, =BattleMainCB2 cmp r1, r0 bne _08056E62 ldr r0, =gPaletteFade diff --git a/asm/battle_controller_linkopponent.s b/asm/battle_controller_linkopponent.s index e8975a7aa..5a762a174 100644 --- a/asm/battle_controller_linkopponent.s +++ b/asm/battle_controller_linkopponent.s @@ -5045,7 +5045,7 @@ sub_8066FF4: @ 8066FF4 bl BufferStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gBattleBankFunc ldrb r0, [r5] lsls r0, 2 diff --git a/asm/battle_controller_linkpartner.s b/asm/battle_controller_linkpartner.s index e02a967d0..3a1b21ed7 100644 --- a/asm/battle_controller_linkpartner.s +++ b/asm/battle_controller_linkpartner.s @@ -4354,7 +4354,7 @@ sub_814D590: @ 814D590 bl BufferStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gBattleBankFunc ldrb r0, [r5] lsls r0, 2 diff --git a/asm/battle_controller_opponent.s b/asm/battle_controller_opponent.s index 1bfa3ff12..4400217ae 100644 --- a/asm/battle_controller_opponent.s +++ b/asm/battle_controller_opponent.s @@ -5185,7 +5185,7 @@ sub_8061F34: @ 8061F34 bl BufferStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gBattleBankFunc ldrb r0, [r5] lsls r0, 2 diff --git a/asm/battle_controller_player.s b/asm/battle_controller_player.s index cbfad9c9f..ddb739b72 100644 --- a/asm/battle_controller_player.s +++ b/asm/battle_controller_player.s @@ -1247,7 +1247,7 @@ _08057F80: bl battle_menu_cursor_related_2 ldr r0, =gText_BattleSwitchWhich movs r1, 0xB - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gBattleBankFunc ldr r0, =gActiveBank ldrb r0, [r0] @@ -4042,7 +4042,7 @@ sub_8059828: @ 8059828 push {lr} ldr r0, =gMain ldr r1, [r0, 0x4] - ldr r0, =sub_8038420 + ldr r0, =BattleMainCB2 cmp r1, r0 bne _08059898 ldr r0, =gPaletteFade @@ -4118,7 +4118,7 @@ sub_80598E0: @ 80598E0 push {lr} ldr r0, =gMain ldr r1, [r0, 0x4] - ldr r0, =sub_8038420 + ldr r0, =BattleMainCB2 cmp r1, r0 bne _08059906 ldr r0, =gPaletteFade @@ -4244,11 +4244,11 @@ sub_80599D4: @ 80599D4 movs r0, 0x5 bl PlaySE ldrb r0, [r4] - bl sub_8056BAC + bl BattleDestroyCursorAt movs r0, 0 strb r0, [r4] movs r0, 0 - bl sub_8056B74 + bl BattleCreateCursorAt _08059A02: ldr r0, =gMain ldrh r1, [r0, 0x2E] @@ -4263,11 +4263,11 @@ _08059A02: movs r0, 0x5 bl PlaySE ldrb r0, [r4] - bl sub_8056BAC + bl BattleDestroyCursorAt movs r0, 0x1 strb r0, [r4] movs r0, 0x1 - bl sub_8056B74 + bl BattleCreateCursorAt _08059A2C: ldr r0, =gMain ldrh r1, [r0, 0x2E] @@ -4355,7 +4355,7 @@ _08059AC4: lsls r1, 24 lsrs r1, 24 adds r0, r7, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldrh r0, [r4] cmp r0, 0 beq _08059AF4 @@ -4382,7 +4382,7 @@ sub_8059B18: @ 8059B18 bl StringCopy adds r0, r4, 0 movs r1, 0x7 - bl battle_show_message_maybe + bl sub_814F9EC pop {r4} pop {r0} bx r0 @@ -4432,7 +4432,7 @@ sub_8059B3C: @ 8059B3C bl ConvertIntToDecimalStringN adds r0, r6, 0 movs r1, 0x9 - bl battle_show_message_maybe + bl sub_814F9EC _08059B98: pop {r4-r7} pop {r0} @@ -4481,7 +4481,7 @@ sub_8059BB0: @ 8059BB0 bl StringCopy adds r0, r6, 0 movs r1, 0xA - bl battle_show_message_maybe + bl sub_814F9EC pop {r4-r6} pop {r0} bx r0 @@ -4637,7 +4637,7 @@ sub_8059CF8: @ 8059CF8 thumb_func_start sub_8059D40 sub_8059D40: @ 8059D40 push {lr} - ldr r0, =sub_80A92F8 + ldr r0, =ReshowBattleScreenAfterMenu bl SetMainCallback2 pop {r0} bx r0 @@ -4647,7 +4647,7 @@ sub_8059D40: @ 8059D40 thumb_func_start sub_8059D50 sub_8059D50: @ 8059D50 push {lr} - ldr r0, =sub_80A92F8 + ldr r0, =ReshowBattleScreenAfterMenu bl SetMainCallback2 pop {r0} bx r0 @@ -4718,7 +4718,7 @@ b_link_standby_message: @ 8059DC0 strh r1, [r0] ldr r0, =gText_LinkStandby movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC _08059DE0: pop {r0} bx r0 @@ -8458,7 +8458,7 @@ sub_805BF80: @ 805BF80 bl BufferStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gBattleBankFunc ldrb r0, [r5] lsls r0, 2 @@ -8534,7 +8534,7 @@ dp01t_12_6_battle_menu: @ 805C044 bl sub_817F2A8 ldr r0, =gText_BattleMenu movs r1, 0x2 - bl battle_show_message_maybe + bl sub_814F9EC movs r4, 0 _0805C062: lsls r0, r4, 24 @@ -8554,7 +8554,7 @@ _0805C062: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0x1 - bl battle_show_message_maybe + bl sub_814F9EC pop {r4} pop {r0} bx r0 @@ -8580,12 +8580,12 @@ sub_805C0B0: @ 805C0B0 bl sub_8056A3C ldr r0, =gText_BattleYesNoChoice movs r1, 0xC - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gUnknown_03005D74 movs r0, 0x1 strb r0, [r1] movs r0, 0x1 - bl sub_8056B74 + bl BattleCreateCursorAt ldr r1, =gBattleBankFunc ldrb r0, [r4] lsls r0, 2 diff --git a/asm/battle_controller_player_partner.s b/asm/battle_controller_player_partner.s index f77dc2c33..f14b5bc51 100644 --- a/asm/battle_controller_player_partner.s +++ b/asm/battle_controller_player_partner.s @@ -4966,7 +4966,7 @@ sub_81BDA4C: @ 81BDA4C bl BufferStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gBattleBankFunc ldrb r0, [r4] lsls r0, 2 diff --git a/asm/battle_controller_recorded_opponent.s b/asm/battle_controller_recorded_opponent.s index 6f047a4ef..90928e7d4 100644 --- a/asm/battle_controller_recorded_opponent.s +++ b/asm/battle_controller_recorded_opponent.s @@ -4722,7 +4722,7 @@ sub_8188E90: @ 8188E90 bl BufferStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gBattleBankFunc ldrb r0, [r4] lsls r0, 2 diff --git a/asm/battle_controller_recorded_player.s b/asm/battle_controller_recorded_player.s index 7b0cd6d41..534f34068 100644 --- a/asm/battle_controller_recorded_player.s +++ b/asm/battle_controller_recorded_player.s @@ -4822,7 +4822,7 @@ sub_818C43C: @ 818C43C bl BufferStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gBattleBankFunc ldrb r0, [r4] lsls r0, 2 diff --git a/asm/battle_controller_safari.s b/asm/battle_controller_safari.s index 2db6fa613..b02f95471 100644 --- a/asm/battle_controller_safari.s +++ b/asm/battle_controller_safari.s @@ -387,7 +387,7 @@ sub_8159698: @ 8159698 push {lr} ldr r0, =gMain ldr r1, [r0, 0x4] - ldr r0, =sub_8038420 + ldr r0, =BattleMainCB2 cmp r1, r0 bne _081596BE ldr r0, =gPaletteFade @@ -792,7 +792,7 @@ dp01t_10_6_message: @ 81599DC bl BufferStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gBattleBankFunc ldrb r0, [r4] lsls r0, 2 @@ -862,7 +862,7 @@ sub_8159A94: @ 8159A94 str r1, [r0] ldr r0, =gText_SafariZoneMenu movs r1, 0x2 - bl battle_show_message_maybe + bl sub_814F9EC movs r4, 0 _08159AAE: lsls r0, r4, 24 @@ -882,7 +882,7 @@ _08159AAE: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0x1 - bl battle_show_message_maybe + bl sub_814F9EC pop {r4} pop {r0} bx r0 diff --git a/asm/battle_controller_wally.s b/asm/battle_controller_wally.s index f67a21499..e723a522b 100644 --- a/asm/battle_controller_wally.s +++ b/asm/battle_controller_wally.s @@ -299,7 +299,7 @@ sub_8168610: @ 8168610 push {lr} ldr r0, =gMain ldr r1, [r0, 0x4] - ldr r0, =sub_8038420 + ldr r0, =BattleMainCB2 cmp r1, r0 bne _08168636 ldr r0, =gPaletteFade @@ -3606,7 +3606,7 @@ sub_816A3B8: @ 816A3B8 bl BufferStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gBattleBankFunc ldrb r0, [r4] lsls r0, 2 @@ -3676,7 +3676,7 @@ dp01t_12_1_battle_menu: @ 816A470 str r1, [r0] ldr r0, =gText_BattleMenu movs r1, 0x2 - bl battle_show_message_maybe + bl sub_814F9EC movs r4, 0 _0816A48A: lsls r0, r4, 24 @@ -3696,7 +3696,7 @@ _0816A48A: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0x1 - bl battle_show_message_maybe + bl sub_814F9EC pop {r4} pop {r0} bx r0 diff --git a/asm/battle_frontier_2.s b/asm/battle_frontier_2.s index 8a9b0ba24..bea4972e3 100755 --- a/asm/battle_frontier_2.s +++ b/asm/battle_frontier_2.s @@ -20582,29 +20582,29 @@ _081A5328: ldr r4, =gDisplayedStringBattle adds r0, r4, 0 movs r1, 0xF - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gText_Vs movs r1, 0x10 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gText_RivalBuffer bl StrCpyDecodeToDisplayedStringBattle adds r0, r4, 0 movs r1, 0x11 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gText_Mind movs r1, 0x12 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gText_Skill movs r1, 0x13 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gText_Body movs r1, 0x14 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gText_Judgement bl StrCpyDecodeToDisplayedStringBattle adds r0, r4, 0 movs r1, 0x15 - bl battle_show_message_maybe + bl sub_814F9EC b _081A553E .pool _081A53B4: @@ -20688,7 +20688,7 @@ _081A5464: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0x15 - bl battle_show_message_maybe + bl sub_814F9EC ldrb r0, [r5] adds r0, 0x1 strb r0, [r5] diff --git a/asm/battle_message.s b/asm/battle_message.s index dfbf069b3..f1f2447aa 100644 --- a/asm/battle_message.s +++ b/asm/battle_message.s @@ -703,7 +703,7 @@ _0814E6DE: StrCpyDecodeToDisplayedStringBattle: @ 814E6F0 push {lr} ldr r1, =gDisplayedStringBattle - bl StrCpyDecodeBattle + bl BattleStringExpandPlaceholders pop {r1} bx r1 .pool @@ -763,8 +763,8 @@ _0814E75A: bx r1 thumb_func_end AppendStatusString - thumb_func_start StrCpyDecodeBattle -StrCpyDecodeBattle: @ 814E764 + thumb_func_start BattleStringExpandPlaceholders + BattleStringExpandPlaceholders: @ 814E764 push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -904,7 +904,7 @@ _0814E8EE: adds r0, r1, 0 _0814E8F0: adds r1, r4, 0 - bl StrCpyDecodeBattleTextBuff + bl ExpandBattleTextBuffPlaceholders bl _0814F5C0 .pool _0814E904: @@ -2335,10 +2335,10 @@ _0814F62A: pop {r4-r7} pop {r1} bx r1 - thumb_func_end StrCpyDecodeBattle + thumb_func_end BattleStringExpandPlaceholders - thumb_func_start StrCpyDecodeBattleTextBuff -StrCpyDecodeBattleTextBuff: @ 814F648 + thumb_func_start ExpandBattleTextBuffPlaceholders +ExpandBattleTextBuffPlaceholders: @ 814F648 push {r4-r7,lr} mov r7, r8 push {r7} @@ -2652,7 +2652,7 @@ _0814F8EA: pop {r4-r7} pop {r0} bx r0 - thumb_func_end StrCpyDecodeBattleTextBuff + thumb_func_end ExpandBattleTextBuffPlaceholders thumb_func_start sub_814F8F8 sub_814F8F8: @ 814F8F8 @@ -2773,8 +2773,8 @@ _0814F9E0: .pool thumb_func_end sub_814F950 - thumb_func_start battle_show_message_maybe -battle_show_message_maybe: @ 814F9EC + thumb_func_start sub_814F9EC +sub_814F9EC: @ 814F9EC push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -2987,7 +2987,7 @@ _0814FB9C: pop {r4-r7} pop {r0} bx r0 - thumb_func_end battle_show_message_maybe + thumb_func_end sub_814F9EC thumb_func_start sub_814FBAC sub_814FBAC: @ 814FBAC diff --git a/asm/evolution_scene.s b/asm/evolution_scene.s index efae2f07c..afc3c843b 100644 --- a/asm/evolution_scene.s +++ b/asm/evolution_scene.s @@ -1338,7 +1338,7 @@ _0813E6E4: bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gTasks mov r2, r8 adds r1, r2, r7 @@ -1626,7 +1626,7 @@ _0813E99E: bl StringExpandPlaceholders adds r0, r4, 0 movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =0x00000173 bl PlayBGM ldr r2, =gTasks @@ -1868,7 +1868,7 @@ _0813EBE4: _0813EBEC: ldr r0, =gStringVar4 movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gTasks mov r2, r8 adds r0, r2, r7 @@ -1900,7 +1900,7 @@ _0813EC2A: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gTasks mov r3, r8 adds r1, r3, r7 @@ -1997,7 +1997,7 @@ _0813ED16: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gTasks mov r2, r8 adds r1, r2, r7 @@ -2026,7 +2026,7 @@ _0813ED62: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gTasks mov r3, r8 adds r1, r3, r7 @@ -2051,7 +2051,7 @@ _0813ED90: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gTasks mov r2, r8 adds r1, r2, r7 @@ -2087,7 +2087,7 @@ _0813EDEA: bl sub_8056A3C ldr r0, =gText_BattleYesNoChoice movs r1, 0xC - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gTasks mov r3, r8 adds r1, r3, r7 @@ -2100,7 +2100,7 @@ _0813EDEA: ldr r0, =gBattleCommunication strb r2, [r0, 0x1] movs r0, 0 - bl sub_8056B74 + bl BattleCreateCursorAt b _0813F1A4 .pool _0813EE34: @@ -2117,10 +2117,10 @@ _0813EE34: movs r0, 0x5 bl PlaySE ldrb r0, [r4, 0x1] - bl sub_8056BAC + bl BattleDestroyCursorAt movs r0, 0 strb r0, [r4, 0x1] - bl sub_8056B74 + bl BattleCreateCursorAt _0813EE5C: ldr r0, =gMain ldrh r1, [r0, 0x2E] @@ -2135,10 +2135,10 @@ _0813EE5C: movs r0, 0x5 bl PlaySE ldrb r0, [r4, 0x1] - bl sub_8056BAC + bl BattleDestroyCursorAt movs r0, 0x1 strb r0, [r4, 0x1] - bl sub_8056B74 + bl BattleCreateCursorAt _0813EE84: ldr r0, =gMain ldrh r1, [r0, 0x2E] @@ -2292,7 +2292,7 @@ _0813EFC8: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gTasks mov r2, r8 adds r0, r2, r7 @@ -2341,7 +2341,7 @@ _0813F05C: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gTasks mov r2, r8 adds r1, r2, r7 @@ -2370,7 +2370,7 @@ _0813F0AA: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r0, =gTasks mov r3, r8 adds r1, r3, r7 @@ -2398,7 +2398,7 @@ _0813F0D8: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gTasks mov r2, r8 adds r0, r2, r7 @@ -2414,7 +2414,7 @@ _0813F120: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gTasks mov r3, r8 adds r0, r3, r7 @@ -2434,7 +2434,7 @@ _0813F154: bl StrCpyDecodeToDisplayedStringBattle ldr r0, =gDisplayedStringBattle movs r1, 0 - bl battle_show_message_maybe + bl sub_814F9EC ldr r1, =gTasks mov r2, r8 adds r0, r2, r7 diff --git a/asm/recorded_battle.s b/asm/recorded_battle.s index 94d96b2f8..c84b518c3 100644 --- a/asm/recorded_battle.s +++ b/asm/recorded_battle.s @@ -236,8 +236,8 @@ _08184FA0: .pool thumb_func_end sub_8184E58 - thumb_func_start sub_8184FBC -sub_8184FBC: @ 8184FBC + thumb_func_start RecordedBattle_SetBankAction +RecordedBattle_SetBankAction: @ 8184FBC push {r4-r6,lr} lsls r0, 24 lsrs r5, r0, 24 @@ -269,7 +269,7 @@ _08184FF0: pop {r0} bx r0 .pool - thumb_func_end sub_8184FBC + thumb_func_end RecordedBattle_SetBankAction thumb_func_start sub_8185008 sub_8185008: @ 8185008 @@ -2212,7 +2212,7 @@ _081860C2: ldr r1, [sp, 0x4C] lsrs r0, r1, 24 movs r1, 0x6 - bl sub_8184FBC + bl RecordedBattle_SetBankAction movs r5, 0 ldr r2, =gUnknown_0203CC70 mov r8, r2 @@ -2241,7 +2241,7 @@ _081860F0: lsrs r1, 24 ldr r2, [sp, 0x4C] lsrs r0, r2, 24 - bl sub_8184FBC + bl RecordedBattle_SetBankAction b _08186118 .pool _08186110: diff --git a/asm/reshow_battle_screen.s b/asm/reshow_battle_screen.s index f83a11ff1..97cc16c77 100644 --- a/asm/reshow_battle_screen.s +++ b/asm/reshow_battle_screen.s @@ -10,8 +10,8 @@ nullsub_35: @ 80A92F4 bx lr thumb_func_end nullsub_35 - thumb_func_start sub_80A92F8 -sub_80A92F8: @ 80A92F8 + thumb_func_start ReshowBattleScreenAfterMenu +ReshowBattleScreenAfterMenu: @ 80A92F8 push {lr} ldr r2, =gPaletteFade ldrb r0, [r2, 0x8] @@ -37,7 +37,7 @@ sub_80A92F8: @ 80A92F8 pop {r0} bx r0 .pool - thumb_func_end sub_80A92F8 + thumb_func_end ReshowBattleScreenAfterMenu thumb_func_start c2_80777E8 c2_80777E8: @ 80A933C @@ -301,7 +301,7 @@ _080A95A4: movs r0, 0x7F ands r0, r1 strb r0, [r2, 0x8] - ldr r0, =sub_8038420 + ldr r0, =BattleMainCB2 bl SetMainCallback2 bl sub_805EF14 _080A95D2: diff --git a/asm/rom3.s b/asm/rom3.s index 4ab819fa2..bf68c86c8 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -2319,8 +2319,8 @@ dp01_build_cmdbuf_x07_7_7_7: @ 80339E4 .pool thumb_func_end dp01_build_cmdbuf_x07_7_7_7 - thumb_func_start dp01_build_cmdbuf_x08_8_8_8 -dp01_build_cmdbuf_x08_8_8_8: @ 8033A04 + thumb_func_start EmitTrainerSlide +EmitTrainerSlide: @ 8033A04 push {lr} lsls r0, 24 lsrs r0, 24 @@ -2335,7 +2335,7 @@ dp01_build_cmdbuf_x08_8_8_8: @ 8033A04 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x08_8_8_8 + thumb_func_end EmitTrainerSlide thumb_func_start dp01_build_cmdbuf_x09_9_9_9 dp01_build_cmdbuf_x09_9_9_9: @ 8033A24 @@ -3038,8 +3038,8 @@ dp01_build_cmdbuf_x1A_aaaa_bbbb: @ 8033F68 .pool thumb_func_end dp01_build_cmdbuf_x1A_aaaa_bbbb - thumb_func_start dp01_build_cmdbuf_x1B_aaaa_b -dp01_build_cmdbuf_x1B_aaaa_b: @ 8033FBC + thumb_func_start EmitStatusAnimation +EmitStatusAnimation: @ 8033FBC push {r4,lr} adds r4, r1, 0 lsls r0, 24 @@ -3067,7 +3067,7 @@ dp01_build_cmdbuf_x1B_aaaa_b: @ 8033FBC pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x1B_aaaa_b + thumb_func_end EmitStatusAnimation thumb_func_start dp01_build_cmdbuf_x1C_a dp01_build_cmdbuf_x1C_a: @ 8033FF8 @@ -3431,8 +3431,8 @@ dp01_build_cmdbuf_x28_28_28_28: @ 8034274 .pool thumb_func_end dp01_build_cmdbuf_x28_28_28_28 - thumb_func_start dp01_build_cmdbuf_x29_29_29_29 -dp01_build_cmdbuf_x29_29_29_29: @ 8034294 + thumb_func_start EmitHitAnimation +EmitHitAnimation: @ 8034294 push {lr} lsls r0, 24 lsrs r0, 24 @@ -3447,10 +3447,10 @@ dp01_build_cmdbuf_x29_29_29_29: @ 8034294 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x29_29_29_29 + thumb_func_end EmitHitAnimation - thumb_func_start dp01_build_cmdbuf_x2A_2A_2A_2A -dp01_build_cmdbuf_x2A_2A_2A_2A: @ 80342B4 + thumb_func_start Emit_x2A +Emit_x2A: @ 80342B4 push {lr} lsls r0, 24 lsrs r0, 24 @@ -3465,7 +3465,7 @@ dp01_build_cmdbuf_x2A_2A_2A_2A: @ 80342B4 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x2A_2A_2A_2A + thumb_func_end Emit_x2A thumb_func_start EmitEffectivenessSound EmitEffectivenessSound: @ 80342D4 @@ -3491,8 +3491,8 @@ EmitEffectivenessSound: @ 80342D4 .pool thumb_func_end EmitEffectivenessSound - thumb_func_start sub_8034300 -sub_8034300: @ 8034300 + thumb_func_start EmitPlaySound +EmitPlaySound: @ 8034300 push {r4,lr} lsls r0, 24 lsrs r0, 24 @@ -3512,10 +3512,10 @@ sub_8034300: @ 8034300 pop {r0} bx r0 .pool - thumb_func_end sub_8034300 + thumb_func_end EmitPlaySound - thumb_func_start dp01_build_cmdbuf_x2D_2D_2D_2D -dp01_build_cmdbuf_x2D_2D_2D_2D: @ 803432C + thumb_func_start EmitFaintingCry +EmitFaintingCry: @ 803432C push {lr} lsls r0, 24 lsrs r0, 24 @@ -3530,7 +3530,7 @@ dp01_build_cmdbuf_x2D_2D_2D_2D: @ 803432C pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x2D_2D_2D_2D + thumb_func_end EmitFaintingCry thumb_func_start dp01_build_cmdbuf_x2E_a dp01_build_cmdbuf_x2E_a: @ 803434C @@ -3567,8 +3567,8 @@ dp01_build_cmdbuf_x2F_2F_2F_2F: @ 803436C .pool thumb_func_end dp01_build_cmdbuf_x2F_2F_2F_2F - thumb_func_start dp01_build_cmdbuf_x30_TODO -dp01_build_cmdbuf_x30_TODO: @ 803438C + thumb_func_start EmitCmd48 +EmitCmd48: @ 803438C push {r4,r5,lr} adds r4, r1, 0 lsls r0, 24 @@ -3604,10 +3604,10 @@ _080343B4: pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x30_TODO + thumb_func_end EmitCmd48 - thumb_func_start dp01_build_cmdbuf_x31_31_31_31 -dp01_build_cmdbuf_x31_31_31_31: @ 80343D4 + thumb_func_start EmitCmd49 +EmitCmd49: @ 80343D4 push {lr} lsls r0, 24 lsrs r0, 24 @@ -3622,7 +3622,7 @@ dp01_build_cmdbuf_x31_31_31_31: @ 80343D4 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x31_31_31_31 + thumb_func_end EmitCmd49 thumb_func_start dp01_build_cmdbuf_x32_32_32_32 dp01_build_cmdbuf_x32_32_32_32: @ 80343F4 @@ -3735,8 +3735,8 @@ dp01_build_cmdbuf_x38_a: @ 80344A8 .pool thumb_func_end dp01_build_cmdbuf_x38_a - thumb_func_start dp01_build_cmdbuf_x37_a -dp01_build_cmdbuf_x37_a: @ 80344C8 + thumb_func_start Emit_x37 +Emit_x37: @ 80344C8 push {r4,r5,lr} adds r5, r0, 0 lsls r5, 24 @@ -3770,6 +3770,6 @@ dp01_build_cmdbuf_x37_a: @ 80344C8 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x37_a + thumb_func_end Emit_x37 .align 2, 0 @ Don't pad with nop. diff --git a/data/data2b.s b/data/data2b.s index 5df0bdf54..fd72e835e 100644 --- a/data/data2b.s +++ b/data/data2b.s @@ -209,7 +209,7 @@ gTypeEffectiveness:: @ 831ACE8 .include "data/text/type_names.inc" .align 2 -gUnknown_0831AEB8:: @ 831AEB8 +gTrainerMoneyTable:: @ 831AEB8 .incbin "baserom.gba", 0x31aeb8, 0xe0 @ 831AF98 diff --git a/include/battle.h b/include/battle.h index e71a23e28..d45944274 100644 --- a/include/battle.h +++ b/include/battle.h @@ -200,6 +200,7 @@ #define REQUEST_HP_BATTLE 0x2A // array entries for battle communication +#define CURSOR_POSITION 0x1 #define MOVE_EFFECT_BYTE 0x3 #define MULTISTRING_CHOOSER 0x5 #define MSG_DISPLAY 0x7 @@ -236,6 +237,46 @@ #define CMP_COMMON_BITS 0x4 #define CMP_NO_COMMON_BITS 0x5 +struct TrainerMonNoItemDefaultMoves +{ + u16 species; + u8 lvl; + u16 evsValue; +}; + +struct TrainerMonItemDefaultMoves +{ + u16 species; + u8 lvl; + u16 evsValue; + u16 heldItem; +}; + +struct TrainerMonNoItemCustomMoves +{ + u16 species; + u8 lvl; + u16 evsValue; + u16 moves[4]; +}; + +struct TrainerMonItemCustomMoves +{ + u16 species; + u8 lvl; + u16 evsValue; + u16 heldItem; + u16 moves[4]; +}; + +union TrainerMonPtr +{ + struct TrainerMonNoItemDefaultMoves* NoItemDefaultMoves; + struct TrainerMonNoItemCustomMoves* NoItemCustomMoves; + struct TrainerMonItemDefaultMoves* ItemDefaultMoves; + struct TrainerMonItemCustomMoves* ItemCustomMoves; +}; + struct Trainer { /*0x00*/ u8 partyFlags; @@ -247,9 +288,12 @@ struct Trainer /*0x18*/ bool8 doubleBattle; /*0x1C*/ u32 aiFlags; /*0x20*/ u8 partySize; - /*0x24*/ void *party; + /*0x24*/ union TrainerMonPtr party; }; +#define PARTY_FLAG_CUSTOM_MOVES 0x1 +#define PARTY_FLAG_HAS_ITEM 0x2 + extern const struct Trainer gTrainers[]; #define TRAINER_ENCOUNTER_MUSIC(trainer)((gTrainers[trainer].encounterMusic_gender & 0x7F)) @@ -289,7 +333,8 @@ struct DisableStruct /*0x16*/ u8 isFirstTurn; /*0x17*/ u8 unk17; /*0x18*/ u8 truantCounter : 1; - /*0x18*/ u8 unk18_a : 3; + /*0x18*/ u8 truantUnknownBit : 1; + /*0x18*/ u8 unk18_a_2 : 2; /*0x18*/ u8 unk18_b : 4; /*0x19*/ u8 rechargeCounter; /*0x1A*/ u8 unk1A[2]; @@ -464,7 +509,7 @@ struct BattleResults { u8 playerFaintCounter; // 0x0 u8 opponentFaintCounter; // 0x1 - u8 unk2; // 0x2 + u8 playerSwitchesCounter; // 0x2 u8 unk3; // 0x3 u8 unk4; // 0x4 u8 unk5_0:1; // 0x5 @@ -664,6 +709,13 @@ extern struct BattleStruct* gBattleStruct; varName = (u16*)(((void*)(*memes1) + (u32)(memes2))); \ } +#define GET_HP_SWITCHOUT_PTR_VIA_MEME_ACCESS(bank, varName) \ +{ \ + void** memes1 = (void**)(&gBattleStruct); \ + void* memes2 = (void*)((u32)(bank * 2 + offsetof(struct BattleStruct, hpOnSwitchout))); \ + varName = (u16*)(((void*)(*memes1) + (u32)(memes2))); \ +} + #define GET_MOVE_TYPE(move, typeArg) \ { \ if (gBattleStruct->dynamicMoveType) \ @@ -815,6 +867,9 @@ struct BattleScripting u8 statChanger; u8 field_1B; u8 atk23_state; + u8 field_1D; + u8 field_1E; + u8 learnMoveState; }; extern struct BattleScripting gBattleScripting; @@ -829,6 +884,9 @@ u8 GetBattleBank(u8 caseId); void UndoEffectsAfterFainting(void); bool8 HasMoveFailed(u8 bank); void SwitchInClearStructs(void); +void sub_803BDA0(u8 bank); +void sub_803FA70(u8 bank); +void BattleMainCB2(void); // battle_3 void BattleScriptPush(const u8* bsPtr); @@ -860,9 +918,12 @@ void AI_CalcDmg(u8 bankAtk, u8 bankDef); u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef); u8 AI_TypeCalc(u16 move, u16 species, u8 ability); u8 BankGetTurnOrder(u8 bank); +void BattleDestroyCursorAt(u8 cursorPosition); +void BattleCreateCursorAt(u8 cursorPosition); // battle_5 void AdjustFriendshipOnBattleFaint(u8 bank); +void sub_80571DC(u8 bank, u8 arg1); // battle 7 void BattleMusicStop(void); diff --git a/include/battle_controllers.h b/include/battle_controllers.h index 443ca5be1..b24aa9cc5 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -1,13 +1,21 @@ #ifndef GUARD_BATTLE_CONTROLLERS_H #define GUARD_BATTLE_CONTROLLERS_H +struct HpAndStatus +{ + u16 hp; + u32 status; +}; + // rom3.s, emitters void EmitSetAttributes(u8 bufferId, u8 request, u8 c, u8 bytes, void *data); void EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 movePower, s32 dmg, u8 friendship, struct DisableStruct* disableStructPtr, u8 multihit); void EmitHealthBarUpdate(u8 bufferId, u16 hpValue); void EmitEffectivenessSound(u8 bufferId, u16 songId); +void EmitPlaySound(u8 bufferId, u16 songId, u8 arg2); void EmitPrintStringPlayerOnly(u8 bufferId, u16 stringId); void EmitFaintAnimation(u8 bufferId); +void Emit_x2A(u8 bufferId); void EmitExpUpdate(u8 bufferId, u8 partyId, u16 expPoints); void EmitBattleAnimation(u8 bufferId, u8 animationId, u16 argument); void EmitSpriteInvisibility(u8 bufferId, bool8 isInvisible); @@ -15,6 +23,14 @@ void EmitReturnPokeToBall(u8 bufferId, u8 arg1); void EmitGetAttributes(u8 bufferId, u8 arg1, u8 arg2); void EmitSwitchInAnim(u8 bufferId, u8 partyId, bool8 dontClearSubstituteBit); void EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, const u8* arg4); +void EmitLinkStandbyMsg(u8 bufferId, u8 arg1, u8 arg2); +void EmitTrainerSlide(u8 bufferId); +void EmitFaintingCry(u8 bufferId); +void Emit_x37(u8 bufferId, u8 arg1); +void EmitHitAnimation(u8 bufferId); +void EmitCmd48(u8 bufferId, struct HpAndStatus* hpAndStatus, u8 arg2); +void EmitCmd49(u8 bufferId); +void EmitStatusAnimation(u8 bufferId, bool8 status2, u32 status); void MarkBufferBankForExecution(u8 bank); diff --git a/include/battle_message.h b/include/battle_message.h index ca310ae6f..ad1ce3455 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -1,6 +1,147 @@ #ifndef GUARD_BATTLE_MESSAGE_H #define GUARD_BATTLE_MESSAGE_H +// for 0xFD + +#define B_TXT_BUFF1 00 +#define B_TXT_BUFF2 01 +#define B_TXT_COPY_VAR_1 02 +#define B_TXT_COPY_VAR_2 03 +#define B_TXT_COPY_VAR_3 04 +#define B_TXT_PLAYER_MON1_NAME 05 +#define B_TXT_OPPONENT_MON1_NAME 06 +#define B_TXT_PLAYER_MON2_NAME 07 +#define B_TXT_OPPONENT_MON2_NAME 08 +#define B_TXT_LINK_PLAYER_MON1_NAME 09 +#define B_TXT_LINK_OPPONENT_MON1_NAME 0A +#define B_TXT_LINK_PLAYER_MON2_NAME 0B +#define B_TXT_LINK_OPPONENT_MON2_NAME 0C +#define B_TXT_ATK_NAME_WITH_PREFIX_MON1 0D +#define B_TXT_ATK_NAME 0E +#define B_TXT_ATK_NAME_WITH_PREFIX 0F +#define B_TXT_DEF_NAME_WITH_PREFIX 10 +#define B_TXT_EFF_NAME_WITH_PREFIX 11 // EFF = short for gEffectBank +#define B_TXT_SCR_ACTIVE_NAME_WITH_PREFIX 12 +#define B_TXT_ACTIVE_NAME_WITH_PREFIX 13 +#define B_TXT_CURRENT_MOVE 14 +#define B_TXT_LAST_MOVE 15 +#define B_TXT_LAST_ITEM 16 +#define B_TXT_LAST_ABILITY 17 +#define B_TXT_ATK_ABILITY 18 +#define B_TXT_DEF_ABILITY 19 +#define B_TXT_SCR_ACTIVE_ABILITY 1A +#define B_TXT_EFF_ABILITY 1B +#define B_TXT_TRAINER1_CLASS 1C +#define B_TXT_TRAINER1_NAME 1D +#define B_TXT_1E 1E // trainer name for a link player +#define B_TXT_1F 1F // trainer name for a link player +#define B_TXT_20 20 // trainer name for a link player +#define B_TXT_21 21 // trainer name for a link player +#define B_TXT_22 22 // trainer name for a link player +#define B_TXT_PLAYER_NAME 23 +#define B_TXT_TRAINER1_LOSE_TEXT 24 +#define B_TXT_TRAINER1_WIN_TEXT 25 +#define B_TXT_26 26 +#define B_TXT_PC_CREATOR_NAME 27 +#define B_TXT_ATK_PREFIX1 28 +#define B_TXT_DEF_PREFIX1 29 +#define B_TXT_ATK_PREFIX2 2A +#define B_TXT_DEF_PREFIX2 2B +#define B_TXT_ATK_PREFIX3 2C +#define B_TXT_DEF_PREFIX3 2D +#define B_TXT_TRAINER2_CLASS 2E +#define B_TXT_TRAINER2_NAME 2F +#define B_TXT_TRAINER2_LOSE_TEXT 30 +#define B_TXT_TRAINER2_WIN_TEXT 31 +#define B_TXT_PARTNER_CLASS 32 +#define B_TXT_PARTNER_NAME 33 +#define B_TXT_BUFF3 34 + +// for B_TXT_BUFF1, B_TXT_BUFF2 and B_TXT_BUFF3 + +#define B_BUFF_STRING 0 +#define B_BUFF_NUMBER 1 +#define B_BUFF_MOVE 2 +#define B_BUFF_TYPE 3 +#define B_BUFF_MON_NICK_WITH_PREFIX 4 +#define B_BUFF_STAT 5 +#define B_BUFF_SPECIES 6 +#define B_BUFF_MON_NICK 7 +#define B_BUFF_NEGATIVE_FLAVOUR 8 +#define B_BUFF_ABILITY 9 +#define B_BUFF_ITEM 10 + +#define B_BUFF_PLACEHOLDER_BEGIN 0xFD +#define B_BUFF_EOS 0xFF + +#define PREPARE_BYTE_NUMBER_BUFFER(textVar, maxDigits, number) \ +{ \ + textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ + textVar[1] = B_BUFF_NUMBER; \ + textVar[2] = 1; \ + textVar[3] = maxDigits; \ + textVar[4] = (number); \ + textVar[5] = B_BUFF_EOS; \ +} + +#define PREPARE_WORD_NUMBER_BUFFER(textVar, maxDigits, number) \ +{ \ + textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ + textVar[1] = B_BUFF_NUMBER; \ + textVar[2] = 4; \ + textVar[3] = maxDigits; \ + textVar[4] = (number); \ + textVar[5] = (number & 0x0000FF00) >> 8; \ + textVar[6] = (number & 0x00FF0000) >> 16; \ + textVar[7] = (number & 0xFF000000) >> 24; \ + textVar[8] = B_BUFF_EOS; \ +} + +#define PREPARE_STRING_BUFFER(textVar, stringId) \ +{ \ + textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ + textVar[1] = B_BUFF_STRING; \ + textVar[2] = stringId; \ + textVar[3] = (stringId & 0xFF00) >> 8; \ + textVar[4] = B_BUFF_EOS; \ +} + +#define PREPARE_MOVE_BUFFER(textVar, move) \ +{ \ + textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ + textVar[1] = B_BUFF_MOVE; \ + textVar[2] = move; \ + textVar[3] = (move & 0xFF00) >> 8; \ + textVar[4] = B_BUFF_EOS; \ +} + +#define PREPARE_SPECIES_BUFFER(textVar, species) \ +{ \ + textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ + textVar[1] = B_BUFF_SPECIES; \ + textVar[2] = species; \ + textVar[3] = (species & 0xFF00) >> 8; \ + textVar[4] = B_BUFF_EOS; \ +} + +#define PREPARE_MON_NICK_WITH_PREFIX_BUFFER(textVar, bank, partyId) \ +{ \ + textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ + textVar[1] = B_BUFF_MON_NICK_WITH_PREFIX; \ + textVar[2] = bank; \ + textVar[3] = partyId; \ + textVar[4] = B_BUFF_EOS; \ +} + +#define PREPARE_MON_NICK_BUFFER(textVar, bank, partyId) \ +{ \ + textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ + textVar[1] = B_BUFF_MON_NICK; \ + textVar[2] = bank; \ + textVar[3] = partyId; \ + textVar[4] = B_BUFF_EOS; \ +} + struct StringInfoBattle { u16 currentMove; @@ -18,7 +159,8 @@ struct StringInfoBattle void BufferStringBattle(u16 stringID); u32 StrCpyDecodeToDisplayedStringBattle(const u8* src); -u32 StrCpyDecodeBattle(const u8* src, u8* dst); +u32 BattleStringExpandPlaceholders(const u8* src, u8* dst); +void sub_814F9EC(const u8* text, u8 arg1); extern u8 gBattleTextBuff1[]; extern u8 gBattleTextBuff2[]; diff --git a/include/pokemon.h b/include/pokemon.h index f629799e5..518d28e58 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -626,6 +626,7 @@ bool8 IsTradedMon(struct Pokemon *mon); void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality); s32 sub_806D864(u16 a1); bool16 sub_806D82C(u8 id); +u16 MonTryLearningNewMove(struct Pokemon* mon, bool8); #include "sprite.h" diff --git a/include/recorded_battle.h b/include/recorded_battle.h new file mode 100644 index 000000000..d19a2b713 --- /dev/null +++ b/include/recorded_battle.h @@ -0,0 +1,6 @@ +#ifndef GUARD_RECORDED_BATTLE_H +#define GUARD_RECORDED_BATTLE_H + +void RecordedBattle_SetBankAction(u8 bank, u8 action); + +#endif // GUARD_RECORDED_BATTLE_H diff --git a/include/reshow_battle_screen.h b/include/reshow_battle_screen.h new file mode 100644 index 000000000..62773b48b --- /dev/null +++ b/include/reshow_battle_screen.h @@ -0,0 +1,6 @@ +#ifndef GUARD_RESHOW_BATTLE_SCREEN_H +#define GUARD_RESHOW_BATTLE_SCREEN_H + +void ReshowBattleScreenAfterMenu(void); + +#endif // GUARD_RESHOW_BATTLE_SCREEN_H diff --git a/include/text.h b/include/text.h index dba409f37..f0c85b978 100644 --- a/include/text.h +++ b/include/text.h @@ -71,7 +71,9 @@ #define EXT_CTRL_CODE_BEGIN 0xFC // extended control code #define PLACEHOLDER_BEGIN 0xFD // string placeholder #define CHAR_NEWLINE 0xFE -#define EOS 0xFF // end of string +#define EOS 0xFF // end of string + +// battle placeholders are located in battle_message.h #define EXT_CTRL_CODE_JPN 0x15 #define EXT_CTRL_CODE_ENG 0x16 diff --git a/src/battle_4.c b/src/battle_4.c index db6d7fe53..77a4393c4 100644 --- a/src/battle_4.c +++ b/src/battle_4.c @@ -18,6 +18,12 @@ #include "text.h" #include "sound.h" #include "pokedex.h" +#include "recorded_battle.h" +#include "window.h" +#include "reshow_battle_screen.h" +#include "main.h" +#include "palette.h" +#include "money.h" // variables @@ -32,7 +38,7 @@ extern u32 gBattleExecBuffer; extern u8 gNoOfAllBanks; extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; extern u8 gTurnOrder[BATTLE_BANKS_COUNT]; -extern u8 gUnknown_02024A76[BATTLE_BANKS_COUNT]; +extern u8 gUnknown_0202407A[BATTLE_BANKS_COUNT]; extern u16 gCurrentMove; extern u8 gLastUsedAbility; extern u16 gBattleWeather; @@ -47,7 +53,6 @@ extern u16 gPaydayMoney; extern u16 gRandomTurnNumber; extern u8 gBattleOutcome; extern u8 gBattleTerrain; -extern u16 gTrainerBattleOpponent; extern u8 gBankAttacker; extern u8 gBankTarget; extern const u8* gBattlescriptCurrInstr; @@ -84,18 +89,29 @@ extern u16 gPartnerTrainerId; extern u16 gLastUsedMove; extern u16 gUnknownMovesUsedByBanks[BATTLE_BANKS_COUNT]; extern u16 gLastUsedMovesByBanks[BATTLE_BANKS_COUNT]; +extern u16 gTrainerBattleOpponent_A; +extern u16 gTrainerBattleOpponent_B; + +struct TrainerMoney +{ + u8 classId; + u8 value; +}; extern const struct BattleMove gBattleMoves[]; extern const struct BaseStats gBaseStats[]; extern const u8 gTypeEffectiveness[]; extern const u16 gMissStringIds[]; extern const u16 gTrappingMoves[]; -extern const u8 gTrainerMoney[]; +extern const struct TrainerMoney gTrainerMoneyTable[]; extern const u8* const gBattleScriptsForMoveEffects[]; // functions extern void sub_81A5718(u8 bank); // battle frontier 2 extern void sub_81A56B4(void); // battle frontier 2 +extern void sub_81BFA38(struct Pokemon* party, u8 monPartyId, u8 monCount, void (*callback)(void), u16 move); // pokemon summary screen +extern u8 sub_81C1B94(void); // pokemon summary screen +extern void IncrementGameStat(u8 statId); // rom_4 // BattleScripts extern const u8 BattleScript_MoveEnd[]; @@ -143,6 +159,12 @@ extern const u8 BattleScript_GrudgeTakesPp[]; extern const u8 BattleScript_RageIsBuilding[]; extern const u8 BattleScript_DefrostedViaFireMove[]; extern const u8 gUnknown_082DB87D[]; +extern const u8 gUnknown_082DAE90[]; +extern const u8 gUnknown_082DAE59[]; +extern const u8 gUnknown_082DAEC7[]; + +// strings +extern const u8 gText_BattleYesNoChoice[]; // read via orr #define BSScriptRead32(ptr) ((ptr)[0] | (ptr)[1] << 8 | (ptr)[2] << 16 | (ptr)[3] << 24) @@ -164,6 +186,7 @@ void DestinyBondFlagUpdate(void); u8 AttacksThisTurn(u8 bank, u16 move); // Note: returns 1 if it's a charging turn, otherwise 2. static void CheckWonderGuardAndLevitate(void); u8 ChangeStatBuffs(s8 statValue, u8 statId, u8, const u8* BS_ptr); +void sub_8056A3C(u8 arg0, u8 arg1, u8 arg2, u8 arg3, u8 arg4); void atk00_attackcanceler(void); void atk01_accuracycheck(void); @@ -255,8 +278,8 @@ void atk56_fainting_cry(void); void atk57(void); void atk58_return_to_ball(void); void atk59_learnmove_inbattle(void); -void atk5A(void); -void atk5B_80256E0(void); +void atk5A_yesnoboxlearnmove(void); +void atk5B_yesnoboxstoplearningmove(void); void atk5C_hitanimation(void); void atk5D_getmoneyreward(void); void atk5E_8025A70(void); @@ -268,9 +291,9 @@ void atk63_jumptorandomattack(void); void atk64_statusanimation(void); void atk65_status2animation(void); void atk66_chosenstatusanimation(void); -void atk67_8025ECC(void); +void atk67_yesnobox(void); void atk68_80246A0(void); -void atk69_dmg_adjustment2(void); +void atk69_dmg_adjustment3(void); void atk6A_removeitem(void); void atk6B_atknameinbuff1(void); void atk6C_lvlbox_display(void); @@ -507,8 +530,8 @@ void (* const gBattleScriptingCommandsTable[])(void) = atk57, atk58_return_to_ball, atk59_learnmove_inbattle, - atk5A, - atk5B_80256E0, + atk5A_yesnoboxlearnmove, + atk5B_yesnoboxstoplearningmove, atk5C_hitanimation, atk5D_getmoneyreward, atk5E_8025A70, @@ -520,9 +543,9 @@ void (* const gBattleScriptingCommandsTable[])(void) = atk64_statusanimation, atk65_status2animation, atk66_chosenstatusanimation, - atk67_8025ECC, + atk67_yesnobox, atk68_80246A0, - atk69_dmg_adjustment2, + atk69_dmg_adjustment3, atk6A_removeitem, atk6B_atknameinbuff1, atk6C_lvlbox_display, @@ -758,7 +781,7 @@ const u32 gStatusFlagsForMoveEffects[] = 0x00000000 }; -extern const u8* gMoveEffectBS_Ptrs[]; +extern const u8* const gMoveEffectBS_Ptrs[]; void atk00_attackcanceler(void) { @@ -2890,11 +2913,7 @@ void atk19_faint_pokemon(void) EmitSetAttributes(0, moveIndex + REQUEST_PPMOVE1_BATTLE, 0, 1, &gBattleMons[gActiveBank].pp[moveIndex]); MarkBufferBankForExecution(gActiveBank); - gBattleTextBuff1[0] = PLACEHOLDER_BEGIN; - gBattleTextBuff1[1] = 2; - gBattleTextBuff1[2] = gBattleMons[gBankAttacker].moves[moveIndex]; - gBattleTextBuff1[3] = gBattleMons[gBankAttacker].moves[moveIndex] >> 8; - gBattleTextBuff1[4] = EOS; + PREPARE_MOVE_BUFFER(gBattleTextBuff1, gBattleMons[gBankAttacker].moves[moveIndex]) } } else @@ -3262,30 +3281,12 @@ void atk23_getexp(void) else gBattleStruct->expGetterBank = 0; - // buffer poke name - gBattleTextBuff1[0] = PLACEHOLDER_BEGIN; - gBattleTextBuff1[1] = 4; - gBattleTextBuff1[2] = gBattleStruct->expGetterBank; - gBattleTextBuff1[3] = gBattleStruct->expGetterId; - gBattleTextBuff1[4] = EOS; + PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gBattleStruct->expGetterBank, gBattleStruct->expGetterId) // buffer 'gained' or 'gained a boosted' - gBattleTextBuff2[0] = PLACEHOLDER_BEGIN; - gBattleTextBuff2[1] = 0; - gBattleTextBuff2[2] = i; - gBattleTextBuff2[3] = (i & 0xFF00) >> 8; - gBattleTextBuff2[4] = EOS; + PREPARE_STRING_BUFFER(gBattleTextBuff2, i) - // buffer exp number - gBattleTextBuff3[0] = PLACEHOLDER_BEGIN; - gBattleTextBuff3[1] = 1; - gBattleTextBuff3[2] = 4; // word - gBattleTextBuff3[3] = 5; // max digits - gBattleTextBuff3[4] = gBattleMoveDamage; - gBattleTextBuff3[5] = (gBattleMoveDamage & 0x0000FF00) >> 8; - gBattleTextBuff3[6] = (gBattleMoveDamage & 0x00FF0000) >> 16; - gBattleTextBuff3[7] = (gBattleMoveDamage & 0xFF000000) >> 24; - gBattleTextBuff3[8] = EOS; + PREPARE_WORD_NUMBER_BUFFER(gBattleTextBuff3, 5, gBattleMoveDamage) PrepareStringBattle(0xD, gBattleStruct->expGetterBank); MonGainEVs(&gPlayerParty[gBattleStruct->expGetterId], gBattleMons[gBank1].species); @@ -3324,20 +3325,9 @@ void atk23_getexp(void) if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && gBattlePartyID[gActiveBank] == gBattleStruct->expGetterId) sub_805E990(&gPlayerParty[gBattlePartyID[gActiveBank]], gActiveBank); - // buff poke name - gBattleTextBuff1[0] = PLACEHOLDER_BEGIN; - gBattleTextBuff1[1] = 4; - gBattleTextBuff1[2] = gActiveBank; - gBattleTextBuff1[3] = gBattleStruct->expGetterId; - gBattleTextBuff1[4] = EOS; + PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gActiveBank, gBattleStruct->expGetterId) - // buff level - gBattleTextBuff2[0] = PLACEHOLDER_BEGIN; - gBattleTextBuff2[1] = 1; - gBattleTextBuff2[2] = 1; - gBattleTextBuff2[3] = 3; - gBattleTextBuff2[4] = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_LEVEL); - gBattleTextBuff2[5] = EOS; + PREPARE_BYTE_NUMBER_BUFFER(gBattleTextBuff2, 3, GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_LEVEL)) BattleScriptPushCursor(); gLeveledUpInBattle |= gBitTable[gBattleStruct->expGetterId]; @@ -5280,3 +5270,1050 @@ void sub_804CF10(u8 arg0) EmitChoosePokemon(0, 1, arg0, 0, gBattleStruct->field_60[gActiveBank]); MarkBufferBankForExecution(gActiveBank); } + +void atk50_openpartyscreen(void) +{ + u32 flags; + u8 hitmarkerFaintBits; + u8 bank; + const u8 *jumpPtr; + + bank = 0; + flags = 0; + jumpPtr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); + + if (gBattlescriptCurrInstr[1] == 5) + { + if ((gBattleTypeFlags & (BATTLE_TYPE_DOUBLE | BATTLE_TYPE_MULTI)) != BATTLE_TYPE_DOUBLE) + { + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (gHitMarker & HITMARKER_FAINTED(gActiveBank)) + { + if (sub_80423F4(gActiveBank, 6, 6)) + { + gAbsentBankFlags |= gBitTable[gActiveBank]; + gHitMarker &= ~(HITMARKER_FAINTED(gActiveBank)); + EmitLinkStandbyMsg(0, 2, 0); + MarkBufferBankForExecution(gActiveBank); + } + else if (!gSpecialStatuses[gActiveBank].flag40) + { + sub_804CF10(6); + gSpecialStatuses[gActiveBank].flag40 = 1; + } + } + else + { + EmitLinkStandbyMsg(0, 2, 0); + MarkBufferBankForExecution(gActiveBank); + } + } + } + else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + { + u8 flag40_0, flag40_1, flag40_2, flag40_3; + + hitmarkerFaintBits = gHitMarker >> 0x1C; + + if (gBitTable[0] & hitmarkerFaintBits) + { + gActiveBank = 0; + if (sub_80423F4(0, 6, 6)) + { + gAbsentBankFlags |= gBitTable[gActiveBank]; + gHitMarker &= ~(HITMARKER_FAINTED(gActiveBank)); + Emit_x2A(0); + MarkBufferBankForExecution(gActiveBank); + } + else if (!gSpecialStatuses[gActiveBank].flag40) + { + sub_804CF10(gBattleStruct->field_5C[2]); + gSpecialStatuses[gActiveBank].flag40 = 1; + } + else + { + EmitLinkStandbyMsg(0, 2, 0); + MarkBufferBankForExecution(gActiveBank); + flags |= 1; + } + } + if (gBitTable[2] & hitmarkerFaintBits && !(gBitTable[0] & hitmarkerFaintBits)) + { + gActiveBank = 2; + if (sub_80423F4(2, 6, 6)) + { + gAbsentBankFlags |= gBitTable[gActiveBank]; + gHitMarker &= ~(HITMARKER_FAINTED(gActiveBank)); + Emit_x2A(0); + MarkBufferBankForExecution(gActiveBank); + } + else if (!gSpecialStatuses[gActiveBank].flag40) + { + sub_804CF10(gBattleStruct->field_5C[0]); + gSpecialStatuses[gActiveBank].flag40 = 1; + } + else if (!(flags & 1)) + { + EmitLinkStandbyMsg(0, 2, 0); + MarkBufferBankForExecution(gActiveBank); + } + } + if (gBitTable[1] & hitmarkerFaintBits) + { + gActiveBank = 1; + if (sub_80423F4(1, 6, 6)) + { + gAbsentBankFlags |= gBitTable[gActiveBank]; + gHitMarker &= ~(HITMARKER_FAINTED(gActiveBank)); + Emit_x2A(0); + MarkBufferBankForExecution(gActiveBank); + } + else if (!gSpecialStatuses[gActiveBank].flag40) + { + sub_804CF10(gBattleStruct->field_5C[3]); + gSpecialStatuses[gActiveBank].flag40 = 1; + } + else + { + EmitLinkStandbyMsg(0, 2, 0); + MarkBufferBankForExecution(gActiveBank); + flags |= 2; + } + } + if (gBitTable[3] & hitmarkerFaintBits && !(gBitTable[1] & hitmarkerFaintBits)) + { + gActiveBank = 3; + if (sub_80423F4(3, 6, 6)) + { + gAbsentBankFlags |= gBitTable[gActiveBank]; + gHitMarker &= ~(HITMARKER_FAINTED(gActiveBank)); + Emit_x2A(0); + MarkBufferBankForExecution(gActiveBank); + } + else if (!gSpecialStatuses[gActiveBank].flag40) + { + sub_804CF10(gBattleStruct->field_5C[1]); + gSpecialStatuses[gActiveBank].flag40 = 1; + } + else if (!(flags & 2)) + { + EmitLinkStandbyMsg(0, 2, 0); + MarkBufferBankForExecution(gActiveBank); + } + } + + flag40_0 = gSpecialStatuses[0].flag40; + if (!flag40_0) + { + flag40_2 = gSpecialStatuses[2].flag40; + if (!flag40_2 && hitmarkerFaintBits != 0) + { + if (gAbsentBankFlags & gBitTable[0]) + gActiveBank = 2; + else + gActiveBank = 0; + + EmitLinkStandbyMsg(0, 2, 0); + MarkBufferBankForExecution(gActiveBank); + } + + } + flag40_1 = gSpecialStatuses[1].flag40; + if (!flag40_1) + { + flag40_3 = gSpecialStatuses[3].flag40; + if (!flag40_3 && hitmarkerFaintBits != 0) + { + if (gAbsentBankFlags & gBitTable[1]) + gActiveBank = 3; + else + gActiveBank = 1; + + EmitLinkStandbyMsg(0, 2, 0); + MarkBufferBankForExecution(gActiveBank); + } + } + } + gBattlescriptCurrInstr += 6; + } + else if (gBattlescriptCurrInstr[1] == 6) + { + if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) + { + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + { + hitmarkerFaintBits = gHitMarker >> 0x1C; + if (gBitTable[2] & hitmarkerFaintBits && gBitTable[0] & hitmarkerFaintBits) + { + gActiveBank = 2; + if (sub_80423F4(2, gBattleBufferB[0][1], 6)) + { + gAbsentBankFlags |= gBitTable[gActiveBank]; + gHitMarker &= ~(HITMARKER_FAINTED(gActiveBank)); + Emit_x2A(0); + MarkBufferBankForExecution(gActiveBank); + } + else if (!gSpecialStatuses[gActiveBank].flag40) + { + sub_804CF10(gBattleStruct->field_5C[0]); + gSpecialStatuses[gActiveBank].flag40 = 1; + } + } + if (gBitTable[3] & hitmarkerFaintBits && hitmarkerFaintBits & gBitTable[1]) + { + gActiveBank = 3; + if (sub_80423F4(3, gBattleBufferB[1][1], 6)) + { + gAbsentBankFlags |= gBitTable[gActiveBank]; + gHitMarker &= ~(HITMARKER_FAINTED(gActiveBank)); + Emit_x2A(0); + MarkBufferBankForExecution(gActiveBank); + } + else if (!gSpecialStatuses[gActiveBank].flag40) + { + sub_804CF10(gBattleStruct->field_5C[1]); + gSpecialStatuses[gActiveBank].flag40 = 1; + } + } + gBattlescriptCurrInstr += 6; + } + else + { + gBattlescriptCurrInstr += 6; + } + } + else + { + gBattlescriptCurrInstr += 6; + } + + hitmarkerFaintBits = gHitMarker >> 0x1C; + + gBank1 = 0; + while (1) + { + if (gBitTable[gBank1] & hitmarkerFaintBits) + break; + if (gBank1 >= gNoOfAllBanks) + break; + gBank1++; + } + + if (gBank1 == gNoOfAllBanks) + gBattlescriptCurrInstr = jumpPtr; + } + else + { + if (gBattlescriptCurrInstr[1] & 0x80) + hitmarkerFaintBits = 0; // used here as the caseId for the EmitChoose function + else + hitmarkerFaintBits = 1; + + bank = GetBattleBank(gBattlescriptCurrInstr[1] & ~(0x80)); + if (gSpecialStatuses[bank].flag40) + { + gBattlescriptCurrInstr += 6; + } + else if (sub_80423F4(bank, 6, 6)) + { + gActiveBank = bank; + gAbsentBankFlags |= gBitTable[gActiveBank]; + gHitMarker &= ~(HITMARKER_FAINTED(gActiveBank)); + gBattlescriptCurrInstr = jumpPtr; + } + else + { + gActiveBank = bank; + *(gBattleStruct->field_58 + gActiveBank) = gBattlePartyID[gActiveBank]; + *(gBattleStruct->field_5C + gActiveBank) = 6; + gBattleStruct->field_93 &= ~(gBitTable[gActiveBank]); + + EmitChoosePokemon(0, hitmarkerFaintBits, *(gBattleStruct->field_5C + (gActiveBank ^ 2)), 0, gBattleStruct->field_60[gActiveBank]); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 6; + + if (GetBankIdentity(gActiveBank) == 0 && gBattleResults.playerSwitchesCounter < 0xFF) + gBattleResults.playerSwitchesCounter++; + + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (gActiveBank != bank) + { + EmitLinkStandbyMsg(0, 2, 0); + MarkBufferBankForExecution(gActiveBank); + } + } + } + else + { + gActiveBank = GetBankByPlayerAI(GetBankIdentity(bank) ^ 1); + if (gAbsentBankFlags & gBitTable[gActiveBank]) + gActiveBank ^= 2; + + EmitLinkStandbyMsg(0, 2, 0); + MarkBufferBankForExecution(gActiveBank); + } + } + } +} + +void atk51_switch_handle_order(void) +{ + s32 i; + if (gBattleExecBuffer) + return; + + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + switch (BSScriptRead8(gBattlescriptCurrInstr + 2)) + { + case 0: + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gBattleBufferB[i][0] == 0x22) + { + *(gBattleStruct->field_5C + i) = gBattleBufferB[i][1]; + if (!(gBattleStruct->field_93 & gBitTable[i])) + { + RecordedBattle_SetBankAction(i, gBattleBufferB[i][1]); + gBattleStruct->field_93 |= gBitTable[i]; + } + } + } + break; + case 1: + if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) + sub_803BDA0(gActiveBank); + break; + case 2: + if (!(gBattleStruct->field_93 & gBitTable[gActiveBank])) + { + RecordedBattle_SetBankAction(gActiveBank, gBattleBufferB[gActiveBank][1]); + gBattleStruct->field_93 |= gBitTable[gActiveBank]; + } + // fall through + case 3: + gBattleCommunication[0] = gBattleBufferB[gActiveBank][1]; + *(gBattleStruct->field_5C + gActiveBank) = gBattleBufferB[gActiveBank][1]; + + if ((gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_LINK)) == (BATTLE_TYPE_MULTI | BATTLE_TYPE_LINK)) + { + *(gActiveBank * 3 + (u8*)(gBattleStruct->field_60) + 0) &= 0xF; + *(gActiveBank * 3 + (u8*)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBank][2] & 0xF0); + *(gActiveBank * 3 + (u8*)(gBattleStruct->field_60) + 1) = gBattleBufferB[gActiveBank][3]; + + *((gActiveBank ^ 2) * 3 + (u8*)(gBattleStruct->field_60) + 0) &= (0xF0); + *((gActiveBank ^ 2) * 3 + (u8*)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBank][2] & 0xF0) >> 4; + *((gActiveBank ^ 2) * 3 + (u8*)(gBattleStruct->field_60) + 2) = gBattleBufferB[gActiveBank][3]; + } + else if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) + { + sub_80571DC(gActiveBank, *(gBattleStruct->field_5C + gActiveBank)); + } + else + { + sub_803BDA0(gActiveBank); + } + + PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[gBankAttacker].species) + PREPARE_MON_NICK_BUFFER(gBattleTextBuff2, gActiveBank, gBattleBufferB[gActiveBank][1]) + + break; + } + + gBattlescriptCurrInstr += 3; +} + +void atk52_switch_in_effects(void) +{ + s32 i; + + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + sub_803FA70(gActiveBank); + + gHitMarker &= ~(HITMARKER_FAINTED(gActiveBank)); + gSpecialStatuses[gActiveBank].flag40 = 0; + + if (!(gSideAffecting[GetBankSide(gActiveBank)] & SIDE_STATUS_SPIKES_DAMAGED) + && (gSideAffecting[GetBankSide(gActiveBank)] & SIDE_STATUS_SPIKES) + && gBattleMons[gActiveBank].type1 != TYPE_FLYING + && gBattleMons[gActiveBank].type2 != TYPE_FLYING + && gBattleMons[gActiveBank].ability != ABILITY_LEVITATE) + { + u8 spikesDmg; + + gSideAffecting[GetBankSide(gActiveBank)] |= SIDE_STATUS_SPIKES_DAMAGED; + + gBattleMons[gActiveBank].status2 &= ~(STATUS2_DESTINY_BOND); + gHitMarker &= ~(HITMARKER_DESTINYBOND); + + spikesDmg = (5 - gSideTimers[GetBankSide(gActiveBank)].spikesAmount) * 2; + gBattleMoveDamage = gBattleMons[gActiveBank].maxHP / (spikesDmg); + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + + gBattleScripting.bank = gActiveBank; + BattleScriptPushCursor(); + + if (BSScriptRead8(gBattlescriptCurrInstr + 1) == 0) + gBattlescriptCurrInstr = gUnknown_082DAE90; + else if (BSScriptRead8(gBattlescriptCurrInstr + 1) == 1) + gBattlescriptCurrInstr = gUnknown_082DAE59; + else + gBattlescriptCurrInstr = gUnknown_082DAEC7; + } + else + { + if (gBattleMons[gActiveBank].ability == ABILITY_TRUANT && !gDisableStructs[gActiveBank].truantUnknownBit) + gDisableStructs[gActiveBank].truantCounter = 1; + + gDisableStructs[gActiveBank].truantUnknownBit = 0; + + if (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gActiveBank, 0, 0, 0) == 0 && + ItemBattleEffects(0, gActiveBank, 0) == 0) + { + gSideAffecting[GetBankSide(gActiveBank)] &= ~(SIDE_STATUS_SPIKES_DAMAGED); + + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gTurnOrder[i] == gActiveBank) + gUnknown_0202407A[i] = 0xC; + } + + for (i = 0; i < gNoOfAllBanks; i++) + { + u16* hpOnSwitchout; + GET_HP_SWITCHOUT_PTR_VIA_MEME_ACCESS(GetBankSide(i), hpOnSwitchout) + *hpOnSwitchout = gBattleMons[i].hp; + } + + if (BSScriptRead8(gBattlescriptCurrInstr + 1) == 5) + { + u32 hitmarkerFaintBits = gHitMarker >> 0x1C; + + gBank1++; + while (1) + { + if (hitmarkerFaintBits & gBitTable[gBank1] && !(gAbsentBankFlags & gBitTable[gBank1])) + break; + if (gBank1 >= gNoOfAllBanks) + break; + gBank1++; + } + } + gBattlescriptCurrInstr += 2; + } + } +} + +void atk53_trainer_slide(void) +{ + gActiveBank = GetBankByPlayerAI(gBattlescriptCurrInstr[1]); + EmitTrainerSlide(0); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 2; +} + +void atk54_effectiveness_sound(void) +{ + gActiveBank = gBankAttacker; + EmitEffectivenessSound(0, BS2ScriptRead16(gBattlescriptCurrInstr + 1)); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 3; +} + +void atk55_play_sound(void) +{ + gActiveBank = gBankAttacker; + EmitPlaySound(0, BS2ScriptRead16(gBattlescriptCurrInstr + 1), 0); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 3; +} + +void atk56_fainting_cry(void) +{ + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + EmitFaintingCry(0); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 2; +} + +void atk57(void) +{ + gActiveBank = GetBankByPlayerAI(0); + Emit_x37(0, gBattleOutcome); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 1; +} + +void atk58_return_to_ball(void) +{ + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + EmitReturnPokeToBall(0, 1); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 2; +} + +void atk59_learnmove_inbattle(void) +{ + const u8* jumpPtr1 = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + const u8* jumpPtr2 = BSScriptReadPtr(gBattlescriptCurrInstr + 5); + + u16 ret = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterId], BSScriptRead8(gBattlescriptCurrInstr + 9)); + while (ret == 0xFFFE) + ret = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterId], 0); + + if (ret == 0) + { + gBattlescriptCurrInstr = jumpPtr2; + } + else if (ret == 0xFFFF) + { + gBattlescriptCurrInstr += 10; + } + else + { + gActiveBank = GetBankByPlayerAI(0); + + if (gBattlePartyID[gActiveBank] == gBattleStruct->expGetterId + && !(gBattleMons[gActiveBank].status2 & STATUS2_TRANSFORMED)) + { + GiveMoveToBattleMon(&gBattleMons[gActiveBank], ret); + } + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + { + gActiveBank = GetBankByPlayerAI(2); + if (gBattlePartyID[gActiveBank] == gBattleStruct->expGetterId + && !(gBattleMons[gActiveBank].status2 & STATUS2_TRANSFORMED)) + { + GiveMoveToBattleMon(&gBattleMons[gActiveBank], ret); + } + } + + gBattlescriptCurrInstr = jumpPtr1; + } +} + +void atk5A_yesnoboxlearnmove(void) +{ + gActiveBank = 0; + + switch (gBattleScripting.learnMoveState) + { + case 0: + sub_8056A3C(0x18, 8, 0x1D, 0xD, 0); + sub_814F9EC(gText_BattleYesNoChoice, 0xC); + gBattleScripting.learnMoveState++; + gBattleCommunication[CURSOR_POSITION] = 0; + BattleCreateCursorAt(0); + break; + case 1: + if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0) + { + PlaySE(SE_SELECT); + BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]); + gBattleCommunication[CURSOR_POSITION] = 0; + BattleCreateCursorAt(0); + } + if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0) + { + PlaySE(SE_SELECT); + BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]); + gBattleCommunication[CURSOR_POSITION] = 1; + BattleCreateCursorAt(1); + } + if (gMain.newKeys & A_BUTTON) + { + PlaySE(SE_SELECT); + if (gBattleCommunication[1] == 0) + { + sub_8056A3C(0x18, 0x8, 0x1D, 0xD, 1); + BeginNormalPaletteFade(-1, 0, 0, 0x10, 0); + gBattleScripting.learnMoveState++; + } + else + { + gBattleScripting.learnMoveState = 5; + } + } + else if (gMain.newKeys & B_BUTTON) + { + PlaySE(SE_SELECT); + gBattleScripting.learnMoveState = 5; + } + break; + case 2: + if (!gPaletteFade.active) + { + FreeAllWindowBuffers(); + sub_81BFA38(gPlayerParty, gBattleStruct->expGetterId, gPlayerPartyCount - 1, ReshowBattleScreenAfterMenu, gMoveToLearn); + gBattleScripting.learnMoveState++; + } + break; + case 3: + if (!gPaletteFade.active && gMain.callback2 == BattleMainCB2) + { + gBattleScripting.learnMoveState++; + } + break; + case 4: + if (!gPaletteFade.active && gMain.callback2 == BattleMainCB2) + { + u8 movePosition = sub_81C1B94(); + if (movePosition == 4) + { + gBattleScripting.learnMoveState = 5; + } + else + { + u16 moveId = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_MOVE1 + movePosition); + if (IsHMMove2(moveId)) + { + PrepareStringBattle(0x13F, gActiveBank); + gBattleScripting.learnMoveState = 6; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + + PREPARE_MOVE_BUFFER(gBattleTextBuff2, moveId) + + RemoveMonPPBonus(&gPlayerParty[gBattleStruct->expGetterId], movePosition); + SetMonMoveSlot(&gPlayerParty[gBattleStruct->expGetterId], gMoveToLearn, movePosition); + + if (gBattlePartyID[0] == gBattleStruct->expGetterId + && !(gBattleMons[0].status2 & STATUS2_TRANSFORMED) + && !(gDisableStructs[0].unk18_b & gBitTable[movePosition])) + { + RemoveBattleMonPPBonus(&gBattleMons[0], movePosition); + SetBattleMonMoveSlot(&gBattleMons[0], gMoveToLearn, movePosition); + } + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE + && gBattlePartyID[2] == gBattleStruct->expGetterId + && !(gBattleMons[2].status2 & STATUS2_TRANSFORMED) + && !(gDisableStructs[2].unk18_b & gBitTable[movePosition])) + { + RemoveBattleMonPPBonus(&gBattleMons[2], movePosition); + SetBattleMonMoveSlot(&gBattleMons[2], gMoveToLearn, movePosition); + } + } + } + } + break; + case 5: + sub_8056A3C(0x18, 8, 0x1D, 0xD, 1); + gBattlescriptCurrInstr += 5; + break; + case 6: + if (gBattleExecBuffer == 0) + { + gBattleScripting.learnMoveState = 2; + } + break; + } +} + +void atk5B_yesnoboxstoplearningmove(void) +{ + switch (gBattleScripting.learnMoveState) + { + case 0: + sub_8056A3C(0x18, 8, 0x1D, 0xD, 0); + sub_814F9EC(gText_BattleYesNoChoice, 0xC); + gBattleScripting.learnMoveState++; + gBattleCommunication[CURSOR_POSITION] = 0; + BattleCreateCursorAt(0); + break; + case 1: + if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0) + { + PlaySE(SE_SELECT); + BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]); + gBattleCommunication[CURSOR_POSITION] = 0; + BattleCreateCursorAt(0); + } + if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0) + { + PlaySE(SE_SELECT); + BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]); + gBattleCommunication[CURSOR_POSITION] = 1; + BattleCreateCursorAt(1); + } + if (gMain.newKeys & A_BUTTON) + { + PlaySE(SE_SELECT); + + if (gBattleCommunication[1] != 0) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + else + gBattlescriptCurrInstr += 5; + + sub_8056A3C(0x18, 0x8, 0x1D, 0xD, 1); + } + else if (gMain.newKeys & B_BUTTON) + { + PlaySE(SE_SELECT); + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + sub_8056A3C(0x18, 0x8, 0x1D, 0xD, 1); + } + break; + } +} + +void atk5C_hitanimation(void) +{ + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + if (gBattleMoveFlags & MOVESTATUS_NOEFFECT) + { + gBattlescriptCurrInstr += 2; + } + else if (!(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE) || !(gBattleMons[gActiveBank].status2 & STATUS2_SUBSTITUTE) || gDisableStructs[gActiveBank].substituteHP == 0) + { + EmitHitAnimation(0); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr += 2; + } + else + { + gBattlescriptCurrInstr += 2; + } +} + +static u32 GetTrainerMoneyToGive(u16 trainerId) +{ + u32 i = 0; + u32 lastMonLevel = 0; + u32 moneyReward = 0; + + if (trainerId == SECRET_BASE_OPPONENT) + { + moneyReward = 20 * gBattleResources->secretBase->partyLevels[0] * gBattleStruct->moneyMultiplier; + } + else + { + switch (gTrainers[trainerId].partyFlags) + { + case 0: + { + const struct TrainerMonNoItemDefaultMoves *party = gTrainers[trainerId].party.NoItemDefaultMoves; + lastMonLevel = party[gTrainers[trainerId].partySize - 1].lvl; + } + break; + case PARTY_FLAG_CUSTOM_MOVES: + { + const struct TrainerMonNoItemCustomMoves *party = gTrainers[trainerId].party.NoItemCustomMoves; + lastMonLevel = party[gTrainers[trainerId].partySize - 1].lvl; + } + break; + case PARTY_FLAG_HAS_ITEM: + { + const struct TrainerMonItemDefaultMoves *party = gTrainers[trainerId].party.ItemDefaultMoves; + lastMonLevel = party[gTrainers[trainerId].partySize - 1].lvl; + } + break; + case PARTY_FLAG_CUSTOM_MOVES | PARTY_FLAG_HAS_ITEM: + { + const struct TrainerMonItemCustomMoves *party = gTrainers[trainerId].party.ItemCustomMoves; + lastMonLevel = party[gTrainers[trainerId].partySize - 1].lvl; + } + break; + } + + for (; gTrainerMoneyTable[i].classId != 0xFF; i++) + { + if (gTrainerMoneyTable[i].classId == gTrainers[trainerId].trainerClass) + break; + } + + if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) + moneyReward = 4 * lastMonLevel * gBattleStruct->moneyMultiplier * gTrainerMoneyTable[i].value; + else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + moneyReward = 4 * lastMonLevel * gBattleStruct->moneyMultiplier * 2 * gTrainerMoneyTable[i].value; + else + moneyReward = 4 * lastMonLevel * gBattleStruct->moneyMultiplier * gTrainerMoneyTable[i].value; + } + + return moneyReward; +} + +void atk5D_getmoneyreward(void) +{ + u32 moneyReward = GetTrainerMoneyToGive(gTrainerBattleOpponent_A); + if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) + moneyReward += GetTrainerMoneyToGive(gTrainerBattleOpponent_B); + + AddMoney(&gSaveBlock1Ptr->money, moneyReward); + + PREPARE_WORD_NUMBER_BUFFER(gBattleTextBuff1, 5, moneyReward) + + gBattlescriptCurrInstr++; +} + +void atk5E_8025A70(void) +{ + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + switch (gBattleCommunication[0]) + { + case 0: + EmitGetAttributes(0, REQUEST_ALL_BATTLE, 0); + MarkBufferBankForExecution(gActiveBank); + gBattleCommunication[0]++; + break; + case 1: + if (gBattleExecBuffer == 0) + { + s32 i; + struct BattlePokemon* bufferPoke = (struct BattlePokemon*) &gBattleBufferB[gActiveBank][4]; + for (i = 0; i < 4; i++) + { + gBattleMons[gActiveBank].moves[i] = bufferPoke->moves[i]; + gBattleMons[gActiveBank].pp[i] = bufferPoke->pp[i]; + } + gBattlescriptCurrInstr += 2; + } + break; + } +} + +void atk5F_8025B24(void) +{ + gActiveBank = gBankAttacker; + gBankAttacker = gBankTarget; + gBankTarget = gActiveBank; + + if (gHitMarker & HITMARKER_PURSUIT_TRAP) + gHitMarker &= ~(HITMARKER_PURSUIT_TRAP); + else + gHitMarker |= HITMARKER_PURSUIT_TRAP; + + gBattlescriptCurrInstr++; +} + +void atk60_increment_gamestat(void) +{ + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + IncrementGameStat(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + gBattlescriptCurrInstr += 2; +} + +void atk61_8025BA4(void) +{ + s32 i; + struct Pokemon* party; + struct HpAndStatus hpStatuses[6]; + + if (gBattleExecBuffer) + return; + + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + if (GetBankSide(gActiveBank) == SIDE_PLAYER) + party = gPlayerParty; + else + party = gEnemyParty; + + for (i = 0; i < 6; i++) + { + if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE + || GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG) + { + hpStatuses[i].hp = 0xFFFF; + hpStatuses[i].status = 0; + } + else + { + hpStatuses[i].hp = GetMonData(&party[i], MON_DATA_HP); + hpStatuses[i].status = GetMonData(&party[i], MON_DATA_STATUS); + } + } + + EmitCmd48(0, hpStatuses, 1); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 2; +} + +void atk62_08025C6C(void) +{ + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + EmitCmd49(0); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 2; +} + +void atk63_jumptorandomattack(void) +{ + if (BSScriptRead8(gBattlescriptCurrInstr + 1) != 0) + gCurrentMove = gRandomMove; + else + gLastUsedMove = gCurrentMove = gRandomMove; + + gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; +} + +void atk64_statusanimation(void) +{ + if (gBattleExecBuffer == 0) + { + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + if (!(gStatuses3[gActiveBank] & STATUS3_SEMI_INVULNERABLE) + && gDisableStructs[gActiveBank].substituteHP == 0 + && !(gHitMarker & HITMARKER_NO_ANIMATIONS)) + { + EmitStatusAnimation(0, FALSE, gBattleMons[gActiveBank].status1); + MarkBufferBankForExecution(gActiveBank); + } + gBattlescriptCurrInstr += 2; + } +} + +void atk65_status2animation(void) +{ + u32 wantedToAnimate; + + if (gBattleExecBuffer == 0) + { + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + wantedToAnimate = BSScriptRead32(gBattlescriptCurrInstr + 2); + if (!(gStatuses3[gActiveBank] & STATUS3_SEMI_INVULNERABLE) + && gDisableStructs[gActiveBank].substituteHP == 0 + && !(gHitMarker & HITMARKER_NO_ANIMATIONS)) + { + EmitStatusAnimation(0, TRUE, gBattleMons[gActiveBank].status2 & wantedToAnimate); + MarkBufferBankForExecution(gActiveBank); + } + gBattlescriptCurrInstr += 6; + } +} + +void atk66_chosenstatusanimation(void) +{ + u32 wantedStatus; + + if (gBattleExecBuffer == 0) + { + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + wantedStatus = BSScriptRead32(gBattlescriptCurrInstr + 3); + if (!(gStatuses3[gActiveBank] & STATUS3_SEMI_INVULNERABLE) + && gDisableStructs[gActiveBank].substituteHP == 0 + && !(gHitMarker & HITMARKER_NO_ANIMATIONS)) + { + EmitStatusAnimation(0, BSScriptRead8(gBattlescriptCurrInstr + 2), wantedStatus); + MarkBufferBankForExecution(gActiveBank); + } + gBattlescriptCurrInstr += 7; + } +} + +void atk67_yesnobox(void) +{ + switch (gBattleCommunication[0]) + { + case 0: + sub_8056A3C(0x18, 8, 0x1D, 0xD, 0); + sub_814F9EC(gText_BattleYesNoChoice, 0xC); + gBattleCommunication[0]++; + gBattleCommunication[CURSOR_POSITION] = 0; + BattleCreateCursorAt(0); + break; + case 1: + if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0) + { + PlaySE(SE_SELECT); + BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]); + gBattleCommunication[CURSOR_POSITION] = 0; + BattleCreateCursorAt(0); + } + if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0) + { + PlaySE(SE_SELECT); + BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]); + gBattleCommunication[CURSOR_POSITION] = 1; + BattleCreateCursorAt(1); + } + if (gMain.newKeys & B_BUTTON) + { + gBattleCommunication[CURSOR_POSITION] = 1; + PlaySE(SE_SELECT); + sub_8056A3C(0x18, 8, 0x1D, 0xD, 1); + gBattlescriptCurrInstr++; + } + else if (gMain.newKeys & A_BUTTON) + { + PlaySE(SE_SELECT); + sub_8056A3C(0x18, 8, 0x1D, 0xD, 1); + gBattlescriptCurrInstr++; + } + break; + } +} + +void atk68_80246A0(void) +{ + s32 i; + + for (i = 0; i < gNoOfAllBanks; i++) + gUnknown_0202407A[i] = 0xC; + + gBattlescriptCurrInstr++; +} + +void atk69_dmg_adjustment3(void) // The same as 0x7, except there's no random damage multiplier. +{ + u8 holdEffect, quality; + + if (gBattleMons[gBankTarget].item == ITEM_ENIGMA_BERRY) + { + holdEffect = gEnigmaBerries[gBankTarget].holdEffect, quality = gEnigmaBerries[gBankTarget].holdEffectParam; + } + else + { + holdEffect = ItemId_GetHoldEffect(gBattleMons[gBankTarget].item); + quality = ItemId_GetHoldEffectParam(gBattleMons[gBankTarget].item); + } + + gStringBank = gBankTarget; + + if (holdEffect == HOLD_EFFECT_FOCUS_BAND && (Random() % 100) < quality) + { + RecordItemEffectBattle(gBankTarget, holdEffect); + gSpecialStatuses[gBankTarget].focusBanded = 1; + } + if (gBattleMons[gBankTarget].status2 & STATUS2_SUBSTITUTE) + goto END; + if (gBattleMoves[gCurrentMove].effect != EFFECT_FALSE_SWIPE && !gProtectStructs[gBankTarget].endured + && !gSpecialStatuses[gBankTarget].focusBanded) + goto END; + + if (gBattleMons[gBankTarget].hp > gBattleMoveDamage) + goto END; + + gBattleMoveDamage = gBattleMons[gBankTarget].hp - 1; + + if (gProtectStructs[gBankTarget].endured) + { + gBattleMoveFlags |= MOVESTATUS_ENDURED; + } + else if (gSpecialStatuses[gBankTarget].focusBanded) + { + gBattleMoveFlags |= MOVESTATUS_HUNGON; + gLastUsedItem = gBattleMons[gBankTarget].item; + } + + END: + gBattlescriptCurrInstr++; +} diff --git a/src/pokemon_3.c b/src/pokemon_3.c index 2bc06c580..aaa02c5d4 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -1374,7 +1374,7 @@ void sub_806E994(void) gBattleTextBuff2[2] = gBankInMenu; gBattleTextBuff2[3] = pokemon_order_func(gBattlePartyID[gBankInMenu]); gBattleTextBuff2[4] = EOS; - StrCpyDecodeBattle(gText_PkmnsXPreventsSwitching, gStringVar4); + BattleStringExpandPlaceholders(gText_PkmnsXPreventsSwitching, gStringVar4); } struct PokeItem From 3013d3726fb8654544f26faebb3de0e4713456b8 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 25 Sep 2017 11:23:44 -0400 Subject: [PATCH 284/342] Split data3b.s --- asm/decoration.s | 4 +- asm/scrcmd.s | 2 +- asm/shop.s | 4 +- asm/trader.s | 6 +- asm/tv.s | 8 +- data/battle_anim_80FE840.s | 179 ++++++ data/bike.s | 23 + data/contest_painting.s | 64 +++ data/cute_sketch.s | 8 + data/data3b.s | 1017 ----------------------------------- data/decoration.s | 86 +++ data/easy_chat.s | 113 ++++ data/field_effect.s | 55 ++ data/heal_location.s | 11 + data/item_use.s | 15 + data/mail.s | 26 + data/mauville_old_man.s | 26 + data/menu_helpers.s | 14 + data/mon_markings.s | 29 + data/region_map.s | 101 ++++ data/rotating_gate.s | 41 ++ data/slot_machine.s | 290 ++++++++++ data/truck_scene_porthole.s | 13 + ld_script.txt | 18 +- 24 files changed, 1123 insertions(+), 1030 deletions(-) create mode 100644 data/battle_anim_80FE840.s create mode 100644 data/bike.s create mode 100644 data/contest_painting.s create mode 100644 data/cute_sketch.s delete mode 100644 data/data3b.s create mode 100644 data/decoration.s create mode 100644 data/easy_chat.s create mode 100644 data/field_effect.s create mode 100644 data/heal_location.s create mode 100644 data/item_use.s create mode 100644 data/mail.s create mode 100644 data/mauville_old_man.s create mode 100644 data/menu_helpers.s create mode 100644 data/mon_markings.s create mode 100644 data/region_map.s create mode 100644 data/rotating_gate.s create mode 100644 data/slot_machine.s create mode 100644 data/truck_scene_porthole.s diff --git a/asm/decoration.s b/asm/decoration.s index 546cf2dfc..9b65c7c79 100644 --- a/asm/decoration.s +++ b/asm/decoration.s @@ -1264,7 +1264,7 @@ sub_8127454: @ 8127454 ldr r1, =gStringVar1 bl StringCopy lsls r4, 5 - ldr r0, =gUnknown_085A5C09 + ldr r0, =gDecorations + 1 adds r4, r0 adds r0, r5, 0 adds r1, r4, 0 @@ -7083,7 +7083,7 @@ sub_812A3D4: @ 812A3D4 adds r1, r2 ldrb r1, [r1] lsls r1, 5 - ldr r2, =gUnknown_085A5C09 + ldr r2, =gDecorations + 1 adds r1, r2 bl StringCopy ldr r4, =gStringVar4 diff --git a/asm/scrcmd.s b/asm/scrcmd.s index 39366d29f..7980ba564 100644 --- a/asm/scrcmd.s +++ b/asm/scrcmd.s @@ -3977,7 +3977,7 @@ sub_809B114: @ 809B114 adds r4, r0 ldr r0, [r4] lsrs r1, 11 - ldr r2, =gUnknown_085A5C09 + ldr r2, =gDecorations + 1 adds r1, r2 bl StringCopy movs r0, 0 diff --git a/asm/shop.s b/asm/shop.s index aa993b7de..f4dacaa76 100644 --- a/asm/shop.s +++ b/asm/shop.s @@ -657,7 +657,7 @@ BuyMenuSetListEntry: @ 80E0000 .pool _080E0020: lsls r1, r4, 5 - ldr r0, =gUnknown_085A5C09 + ldr r0, =gDecorations + 1 adds r1, r0 adds r0, r5, 0 bl StringCopy @@ -2106,7 +2106,7 @@ _080E0C28: _080E0C38: ldr r0, =gStringVar1 lsls r1, r5, 5 - ldr r2, =gUnknown_085A5C09 + ldr r2, =gDecorations + 1 adds r1, r2 bl StringCopy ldr r0, =gStringVar2 diff --git a/asm/trader.s b/asm/trader.s index 877d17382..8c21648fc 100644 --- a/asm/trader.s +++ b/asm/trader.s @@ -113,7 +113,7 @@ _08133AC2: _08133AF0: ldrb r1, [r1] lsls r1, 5 - ldr r0, =gUnknown_085A5C09 + ldr r0, =gDecorations + 1 adds r1, r0 movs r0, 0x1 movs r2, 0 @@ -172,7 +172,7 @@ _08133B70: ldrb r0, [r7, 0x6] ldrb r2, [r1] lsls r2, 5 - ldr r1, =gUnknown_085A5C09 + ldr r1, =gDecorations + 1 adds r2, r1 lsls r1, r5, 4 adds r1, 0x1 @@ -450,7 +450,7 @@ sub_8133DA0: @ 8133DA0 ldr r1, =gSpecialVar_0x8004 ldrh r1, [r1] lsls r1, 5 - ldr r4, =gUnknown_085A5C09 + ldr r4, =gDecorations + 1 adds r1, r4 bl StringCopy ldr r0, =gStringVar2 diff --git a/asm/tv.s b/asm/tv.s index 20098a40a..d61392fa1 100644 --- a/asm/tv.s +++ b/asm/tv.s @@ -14911,7 +14911,7 @@ _080F4414: ldr r0, =gStringVar2 ldrb r1, [r5, 0x4] lsls r1, 5 - ldr r2, =gUnknown_085A5C09 + ldr r2, =gDecorations + 1 adds r1, r2 bl StringCopy ldrb r0, [r5, 0x3] @@ -14932,7 +14932,7 @@ _080F4448: ldr r0, =gStringVar2 ldrb r1, [r5, 0x5] lsls r1, 5 - ldr r2, =gUnknown_085A5C09 + ldr r2, =gDecorations + 1 adds r1, r2 bl StringCopy ldrb r1, [r5, 0x3] @@ -14970,7 +14970,7 @@ _080F449C: ldr r0, =gStringVar2 ldrb r1, [r5, 0x6] lsls r1, 5 - ldr r4, =gUnknown_085A5C09 + ldr r4, =gDecorations + 1 adds r1, r4 bl StringCopy ldr r0, =gStringVar3 @@ -14983,7 +14983,7 @@ _080F44C0: ldr r0, =gStringVar2 ldrb r1, [r5, 0x6] lsls r1, 5 - ldr r2, =gUnknown_085A5C09 + ldr r2, =gDecorations + 1 adds r1, r2 _080F44CA: bl StringCopy diff --git a/data/battle_anim_80FE840.s b/data/battle_anim_80FE840.s new file mode 100644 index 000000000..4b1a4d047 --- /dev/null +++ b/data/battle_anim_80FE840.s @@ -0,0 +1,179 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_08592210:: @ 8592210 + .incbin "baserom.gba", 0x592210, 0x4f0 + +gUnknown_08592700:: @ 8592700 + .incbin "baserom.gba", 0x592700, 0x78 + +gUnknown_08592778:: @ 8592778 + .incbin "baserom.gba", 0x592778, 0x100 + +gUnknown_08592878:: @ 8592878 + .incbin "baserom.gba", 0x592878, 0x458 + +gUnknown_08592CD0:: @ 8592CD0 + .incbin "baserom.gba", 0x592cd0, 0x1ec + +gUnknown_08592EBC:: @ 8592EBC + .incbin "baserom.gba", 0x592ebc, 0x30 + +gUnknown_08592EEC:: @ 8592EEC + .incbin "baserom.gba", 0x592eec, 0x134 + +gUnknown_08593020:: @ 8593020 + .incbin "baserom.gba", 0x593020, 0xf4 + +gUnknown_08593114:: @ 8593114 + .incbin "baserom.gba", 0x593114, 0x29c + +gUnknown_085933B0:: @ 85933B0 + .incbin "baserom.gba", 0x5933b0, 0xf0 + +gUnknown_085934A0:: @ 85934A0 + .incbin "baserom.gba", 0x5934a0, 0x148 + +gUnknown_085935E8:: @ 85935E8 + .incbin "baserom.gba", 0x5935e8, 0x20 + +gUnknown_08593608:: @ 8593608 + .incbin "baserom.gba", 0x593608, 0x9c + +gUnknown_085936A4:: @ 85936A4 + .incbin "baserom.gba", 0x5936a4, 0x20c + +gUnknown_085938B0:: @ 85938B0 + .incbin "baserom.gba", 0x5938b0, 0x2c + +gUnknown_085938DC:: @ 85938DC + .incbin "baserom.gba", 0x5938dc, 0x18 + +gUnknown_085938F4:: @ 85938F4 + .incbin "baserom.gba", 0x5938f4, 0x5c + +gUnknown_08593950:: @ 8593950 + .incbin "baserom.gba", 0x593950, 0x38 + +gUnknown_08593988:: @ 8593988 + .incbin "baserom.gba", 0x593988, 0x210 + +gUnknown_08593B98:: @ 8593B98 + .incbin "baserom.gba", 0x593b98, 0x1488 + +gUnknown_08595020:: @ 8595020 + .incbin "baserom.gba", 0x595020, 0x248 + +gUnknown_08595268:: @ 8595268 + .incbin "baserom.gba", 0x595268, 0xa8 + +gUnknown_08595310:: @ 8595310 + .incbin "baserom.gba", 0x595310, 0x2a4 + +gUnknown_085955B4:: @ 85955B4 + .incbin "baserom.gba", 0x5955b4, 0x18 + +gUnknown_085955CC:: @ 85955CC + .incbin "baserom.gba", 0x5955cc, 0x2 + +gUnknown_085955CE:: @ 85955CE + .incbin "baserom.gba", 0x5955ce, 0xb6 + +gUnknown_08595684:: @ 8595684 + .incbin "baserom.gba", 0x595684, 0x10 + +gUnknown_08595694:: @ 8595694 + .incbin "baserom.gba", 0x595694, 0x2c + +gUnknown_085956C0:: @ 85956C0 + .incbin "baserom.gba", 0x5956c0, 0x168 + +gUnknown_08595828:: @ 8595828 + .incbin "baserom.gba", 0x595828, 0x18 + +gUnknown_08595840:: @ 8595840 + .incbin "baserom.gba", 0x595840, 0x18 + +gUnknown_08595858:: @ 8595858 + .incbin "baserom.gba", 0x595858, 0x50 + +gUnknown_085958A8:: @ 85958A8 + .incbin "baserom.gba", 0x5958a8, 0x158 + +gUnknown_08595A00:: @ 8595A00 + .incbin "baserom.gba", 0x595a00, 0x30 + +gUnknown_08595A30:: @ 8595A30 + .incbin "baserom.gba", 0x595a30, 0x138 + +gUnknown_08595B68:: @ 8595B68 + .incbin "baserom.gba", 0x595b68, 0xf4 + +gUnknown_08595C5C:: @ 8595C5C + .incbin "baserom.gba", 0x595c5c, 0x2c + +gUnknown_08595C88:: @ 8595C88 + .incbin "baserom.gba", 0x595c88, 0x2c + +gUnknown_08595CB4:: @ 8595CB4 + .incbin "baserom.gba", 0x595cb4, 0x78 + +gUnknown_08595D2C:: @ 8595D2C + .incbin "baserom.gba", 0x595d2c, 0xa14 + +gUnknown_08596740:: @ 8596740 + .incbin "baserom.gba", 0x596740, 0x1c + +gUnknown_0859675C:: @ 859675C + .incbin "baserom.gba", 0x59675c, 0x20 + +gUnknown_0859677C:: @ 859677C + .incbin "baserom.gba", 0x59677c, 0x18 + +gUnknown_08596794:: @ 8596794 + .incbin "baserom.gba", 0x596794, 0xd0 + +gUnknown_08596864:: @ 8596864 + .incbin "baserom.gba", 0x596864, 0x35c + +gUnknown_08596BC0:: @ 8596BC0 + .incbin "baserom.gba", 0x596bc0, 0x50 + +gUnknown_08596C10:: @ 8596C10 + .incbin "baserom.gba", 0x596c10, 0x18 + +gUnknown_08596C28:: @ 8596C28 + .incbin "baserom.gba", 0x596c28, 0x18 + +gUnknown_08596C40:: @ 8596C40 + .incbin "baserom.gba", 0x596c40, 0x178 + +gUnknown_08596DB8:: @ 8596DB8 + .incbin "baserom.gba", 0x596db8, 0x78 + +gUnknown_08596E30:: @ 8596E30 + .incbin "baserom.gba", 0x596e30, 0x528 + +gUnknown_08597358:: @ 8597358 + .incbin "baserom.gba", 0x597358, 0x30 + +gUnknown_08597388:: @ 8597388 + .incbin "baserom.gba", 0x597388, 0x60 + +gUnknown_085973E8:: @ 85973E8 + .incbin "baserom.gba", 0x5973e8, 0x30 + +gUnknown_08597418:: @ 8597418 + .incbin "baserom.gba", 0x597418, 0x2 + +gUnknown_0859741A:: @ 859741A + .incbin "baserom.gba", 0x59741a, 0x4 + +gUnknown_0859741E:: @ 859741E + .incbin "baserom.gba", 0x59741e, 0x6 + +gUnknown_08597424:: @ 8597424 + .incbin "baserom.gba", 0x597424, 0x28 diff --git a/data/bike.s b/data/bike.s new file mode 100644 index 000000000..26bcc8745 --- /dev/null +++ b/data/bike.s @@ -0,0 +1,23 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0859744C:: @ 859744C + .incbin "baserom.gba", 0x59744c, 0x10 + +gUnknown_0859745C:: @ 859745C + .incbin "baserom.gba", 0x59745c, 0xc + +gUnknown_08597468:: @ 8597468 + .incbin "baserom.gba", 0x597468, 0x34 + +gUnknown_0859749C:: @ 859749C + .incbin "baserom.gba", 0x59749c, 0x1c + +gUnknown_085974B8:: @ 85974B8 + .incbin "baserom.gba", 0x5974b8, 0x8 + +gUnknown_085974C0:: @ 85974C0 + .incbin "baserom.gba", 0x5974c0, 0x70 diff --git a/data/contest_painting.s b/data/contest_painting.s new file mode 100644 index 000000000..728649dec --- /dev/null +++ b/data/contest_painting.s @@ -0,0 +1,64 @@ +@ the third big chunk of data + + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_085A989C:: @ 85A989C + .incbin "baserom.gba", 0x5a989c, 0x200 + +gUnknown_085A9A9C:: @ 85A9A9C + .incbin "baserom.gba", 0x5a9a9c, 0x1084 + +gUnknown_085AAB20:: @ 85AAB20 + .incbin "baserom.gba", 0x5aab20, 0xc30 + +gUnknown_085AB750:: @ 85AB750 + .incbin "baserom.gba", 0x5ab750, 0xb38 + +gUnknown_085AC288:: @ 85AC288 + .incbin "baserom.gba", 0x5ac288, 0xfb8 + +gUnknown_085AD240:: @ 85AD240 + .incbin "baserom.gba", 0x5ad240, 0x1130 + +gUnknown_085AE370:: @ 85AE370 + .incbin "baserom.gba", 0x5ae370, 0x604 + +gUnknown_085AE974:: @ 85AE974 + .incbin "baserom.gba", 0x5ae974, 0x50c + +gUnknown_085AEE80:: @ 85AEE80 + .incbin "baserom.gba", 0x5aee80, 0x50c + +gUnknown_085AF38C:: @ 85AF38C + .incbin "baserom.gba", 0x5af38c, 0x50c + +gUnknown_085AF898:: @ 85AF898 + .incbin "baserom.gba", 0x5af898, 0x50c + +gUnknown_085AFDA4:: @ 85AFDA4 + .incbin "baserom.gba", 0x5afda4, 0x50c + +gUnknown_085B02B0:: @ 85B02B0 + .incbin "baserom.gba", 0x5b02b0, 0x524 + +gUnknown_085B07D4:: @ 85B07D4 + .incbin "baserom.gba", 0x5b07d4, 0x14 + +gUnknown_085B07E8:: @ 85B07E8 + .incbin "baserom.gba", 0x5b07e8, 0x4 + +gUnknown_085B07EC:: @ 85B07EC + .incbin "baserom.gba", 0x5b07ec, 0x8 + +gUnknown_085B07F4:: @ 85B07F4 + .incbin "baserom.gba", 0x5b07f4, 0x3c + +gUnknown_085B0830:: @ 85B0830 + .incbin "baserom.gba", 0x5b0830, 0x8 + +gUnknown_085B0838:: @ 85B0838 + .incbin "baserom.gba", 0x5b0838, 0x4 diff --git a/data/cute_sketch.s b/data/cute_sketch.s new file mode 100644 index 000000000..ebdf1e39d --- /dev/null +++ b/data/cute_sketch.s @@ -0,0 +1,8 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_085A1F94:: @ 85A1F94 + .incbin "baserom.gba", 0x5a1f94, 0x3c74 diff --git a/data/data3b.s b/data/data3b.s deleted file mode 100644 index 3faa3d290..000000000 --- a/data/data3b.s +++ /dev/null @@ -1,1017 +0,0 @@ -@ the third big chunk of data - - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - - .align 2 - .incbin "baserom.gba", 0x58d978, 0x2a0 - - .align 2 -gFieldEffectObjectPalette7:: @ 858DC18 - .incbin "graphics/map_objects/palettes/field_effect_object_palette_07.gbapal" - - .incbin "baserom.gba", 0x58dc38, 0x580 - - .align 2 -gFieldEffectObjectPalette8:: @ 858E1B8 - .incbin "graphics/map_objects/palettes/field_effect_object_palette_08.gbapal" - - .incbin "baserom.gba", 0x58e1d8, 0x428 - -gUnknown_0858E600:: @ 858E600 - .incbin "baserom.gba", 0x58e600, 0x18 - -gUnknown_0858E618:: @ 858E618 - .incbin "baserom.gba", 0x58e618, 0x18 - -gUnknown_0858E630:: @ 858E630 - .incbin "baserom.gba", 0x58e630, 0x18 - - .align 2 -gFieldEffectObjectPaletteInfo7:: @ 858E648 - obj_pal gFieldEffectObjectPalette7, 0x1003 - - .align 2 -gFieldEffectObjectPaletteInfo8:: @ 858E650 - obj_pal gFieldEffectObjectPalette8, 0x1008 - - .incbin "baserom.gba", 0x58e658, 0x34 - -gUnknown_0858E68C:: @ 858E68C - .incbin "baserom.gba", 0x58e68c, 0x18 - - .align 2 -@ This uses one of the secret base palettes, so there is no -@ "field_effect_object_palette_09.pal" file. -gFieldEffectObjectPaletteInfo9:: @ 858E6A4 - obj_pal gTilesetPalettes_SecretBase + 5 * 0x20, 0x100E - - .incbin "baserom.gba", 0x58e6ac, 0x1b8 - -gUnknown_0858E864:: @ 858E864 - .incbin "baserom.gba", 0x58e864, 0x1c - -gUnknown_0858E880:: @ 858E880 - .incbin "baserom.gba", 0x58e880, 0x18 - -gUnknown_0858E898:: @ 858E898 - .incbin "baserom.gba", 0x58e898, 0x13 - -gUnknown_0858E8AB:: @ 858E8AB - .incbin "baserom.gba", 0x58e8ab, 0x2 - -gUnknown_0858E8AD:: @ 858E8AD - .incbin "baserom.gba", 0x58e8ad, 0x3 - -gUnknown_0858E8B0:: @ 858E8B0 - .incbin "baserom.gba", 0x58e8b0, 0x40 - -gUnknown_0858E8F0:: @ 858E8F0 - .incbin "baserom.gba", 0x58e8f0, 0x3468 - -gUnknown_08591D58:: @ 8591D58 - .incbin "baserom.gba", 0x591d58, 0x270 - -gUnknown_08591FC8:: @ 8591FC8 - .incbin "baserom.gba", 0x591fc8, 0x18 - -gUnknown_08591FE0:: @ 8591FE0 - .incbin "baserom.gba", 0x591fe0, 0x18 - -gUnknown_08591FF8:: @ 8591FF8 - .incbin "baserom.gba", 0x591ff8, 0x10 - -gUnknown_08592008:: @ 8592008 - .incbin "baserom.gba", 0x592008, 0x10 - -gUnknown_08592018:: @ 8592018 - .incbin "baserom.gba", 0x592018, 0x10 - -gUnknown_08592028:: @ 8592028 - .incbin "baserom.gba", 0x592028, 0x10 - -gUnknown_08592038:: @ 8592038 - .incbin "baserom.gba", 0x592038, 0x20 - -gUnknown_08592058:: @ 8592058 - .incbin "baserom.gba", 0x592058, 0x20 - -gUnknown_08592078:: @ 8592078 - .incbin "baserom.gba", 0x592078, 0x60 - -gUnknown_085920D8:: @ 85920D8 - .incbin "baserom.gba", 0x5920d8, 0xc - -gUnknown_085920E4:: @ 85920E4 - .incbin "baserom.gba", 0x5920e4, 0x4 - -gUnknown_085920E8:: @ 85920E8 - .incbin "baserom.gba", 0x5920e8, 0x128 - -gUnknown_08592210:: @ 8592210 - .incbin "baserom.gba", 0x592210, 0x4f0 - -gUnknown_08592700:: @ 8592700 - .incbin "baserom.gba", 0x592700, 0x78 - -gUnknown_08592778:: @ 8592778 - .incbin "baserom.gba", 0x592778, 0x100 - -gUnknown_08592878:: @ 8592878 - .incbin "baserom.gba", 0x592878, 0x458 - -gUnknown_08592CD0:: @ 8592CD0 - .incbin "baserom.gba", 0x592cd0, 0x1ec - -gUnknown_08592EBC:: @ 8592EBC - .incbin "baserom.gba", 0x592ebc, 0x30 - -gUnknown_08592EEC:: @ 8592EEC - .incbin "baserom.gba", 0x592eec, 0x134 - -gUnknown_08593020:: @ 8593020 - .incbin "baserom.gba", 0x593020, 0xf4 - -gUnknown_08593114:: @ 8593114 - .incbin "baserom.gba", 0x593114, 0x29c - -gUnknown_085933B0:: @ 85933B0 - .incbin "baserom.gba", 0x5933b0, 0xf0 - -gUnknown_085934A0:: @ 85934A0 - .incbin "baserom.gba", 0x5934a0, 0x148 - -gUnknown_085935E8:: @ 85935E8 - .incbin "baserom.gba", 0x5935e8, 0x20 - -gUnknown_08593608:: @ 8593608 - .incbin "baserom.gba", 0x593608, 0x9c - -gUnknown_085936A4:: @ 85936A4 - .incbin "baserom.gba", 0x5936a4, 0x20c - -gUnknown_085938B0:: @ 85938B0 - .incbin "baserom.gba", 0x5938b0, 0x2c - -gUnknown_085938DC:: @ 85938DC - .incbin "baserom.gba", 0x5938dc, 0x18 - -gUnknown_085938F4:: @ 85938F4 - .incbin "baserom.gba", 0x5938f4, 0x5c - -gUnknown_08593950:: @ 8593950 - .incbin "baserom.gba", 0x593950, 0x38 - -gUnknown_08593988:: @ 8593988 - .incbin "baserom.gba", 0x593988, 0x210 - -gUnknown_08593B98:: @ 8593B98 - .incbin "baserom.gba", 0x593b98, 0x1488 - -gUnknown_08595020:: @ 8595020 - .incbin "baserom.gba", 0x595020, 0x248 - -gUnknown_08595268:: @ 8595268 - .incbin "baserom.gba", 0x595268, 0xa8 - -gUnknown_08595310:: @ 8595310 - .incbin "baserom.gba", 0x595310, 0x2a4 - -gUnknown_085955B4:: @ 85955B4 - .incbin "baserom.gba", 0x5955b4, 0x18 - -gUnknown_085955CC:: @ 85955CC - .incbin "baserom.gba", 0x5955cc, 0x2 - -gUnknown_085955CE:: @ 85955CE - .incbin "baserom.gba", 0x5955ce, 0xb6 - -gUnknown_08595684:: @ 8595684 - .incbin "baserom.gba", 0x595684, 0x10 - -gUnknown_08595694:: @ 8595694 - .incbin "baserom.gba", 0x595694, 0x2c - -gUnknown_085956C0:: @ 85956C0 - .incbin "baserom.gba", 0x5956c0, 0x168 - -gUnknown_08595828:: @ 8595828 - .incbin "baserom.gba", 0x595828, 0x18 - -gUnknown_08595840:: @ 8595840 - .incbin "baserom.gba", 0x595840, 0x18 - -gUnknown_08595858:: @ 8595858 - .incbin "baserom.gba", 0x595858, 0x50 - -gUnknown_085958A8:: @ 85958A8 - .incbin "baserom.gba", 0x5958a8, 0x158 - -gUnknown_08595A00:: @ 8595A00 - .incbin "baserom.gba", 0x595a00, 0x30 - -gUnknown_08595A30:: @ 8595A30 - .incbin "baserom.gba", 0x595a30, 0x138 - -gUnknown_08595B68:: @ 8595B68 - .incbin "baserom.gba", 0x595b68, 0xf4 - -gUnknown_08595C5C:: @ 8595C5C - .incbin "baserom.gba", 0x595c5c, 0x2c - -gUnknown_08595C88:: @ 8595C88 - .incbin "baserom.gba", 0x595c88, 0x2c - -gUnknown_08595CB4:: @ 8595CB4 - .incbin "baserom.gba", 0x595cb4, 0x78 - -gUnknown_08595D2C:: @ 8595D2C - .incbin "baserom.gba", 0x595d2c, 0xa14 - -gUnknown_08596740:: @ 8596740 - .incbin "baserom.gba", 0x596740, 0x1c - -gUnknown_0859675C:: @ 859675C - .incbin "baserom.gba", 0x59675c, 0x20 - -gUnknown_0859677C:: @ 859677C - .incbin "baserom.gba", 0x59677c, 0x18 - -gUnknown_08596794:: @ 8596794 - .incbin "baserom.gba", 0x596794, 0xd0 - -gUnknown_08596864:: @ 8596864 - .incbin "baserom.gba", 0x596864, 0x35c - -gUnknown_08596BC0:: @ 8596BC0 - .incbin "baserom.gba", 0x596bc0, 0x50 - -gUnknown_08596C10:: @ 8596C10 - .incbin "baserom.gba", 0x596c10, 0x18 - -gUnknown_08596C28:: @ 8596C28 - .incbin "baserom.gba", 0x596c28, 0x18 - -gUnknown_08596C40:: @ 8596C40 - .incbin "baserom.gba", 0x596c40, 0x178 - -gUnknown_08596DB8:: @ 8596DB8 - .incbin "baserom.gba", 0x596db8, 0x78 - -gUnknown_08596E30:: @ 8596E30 - .incbin "baserom.gba", 0x596e30, 0x528 - -gUnknown_08597358:: @ 8597358 - .incbin "baserom.gba", 0x597358, 0x30 - -gUnknown_08597388:: @ 8597388 - .incbin "baserom.gba", 0x597388, 0x60 - -gUnknown_085973E8:: @ 85973E8 - .incbin "baserom.gba", 0x5973e8, 0x30 - -gUnknown_08597418:: @ 8597418 - .incbin "baserom.gba", 0x597418, 0x2 - -gUnknown_0859741A:: @ 859741A - .incbin "baserom.gba", 0x59741a, 0x4 - -gUnknown_0859741E:: @ 859741E - .incbin "baserom.gba", 0x59741e, 0x6 - -gUnknown_08597424:: @ 8597424 - .incbin "baserom.gba", 0x597424, 0x28 - -gUnknown_0859744C:: @ 859744C - .incbin "baserom.gba", 0x59744c, 0x10 - -gUnknown_0859745C:: @ 859745C - .incbin "baserom.gba", 0x59745c, 0xc - -gUnknown_08597468:: @ 8597468 - .incbin "baserom.gba", 0x597468, 0x34 - -gUnknown_0859749C:: @ 859749C - .incbin "baserom.gba", 0x59749c, 0x1c - -gUnknown_085974B8:: @ 85974B8 - .incbin "baserom.gba", 0x5974b8, 0x8 - -gUnknown_085974C0:: @ 85974C0 - .incbin "baserom.gba", 0x5974c0, 0x70 - -gUnknown_08597530:: @ 8597530 - .incbin "baserom.gba", 0x597530, 0x20 - -gUnknown_08597550:: @ 8597550 - .incbin "baserom.gba", 0x597550, 0x1f8 - -gUnknown_08597748:: @ 8597748 - .incbin "baserom.gba", 0x597748, 0x1c - -gUnknown_08597764:: @ 8597764 - .incbin "baserom.gba", 0x597764, 0x8 - -gUnknown_0859776C:: @ 859776C - .incbin "baserom.gba", 0x59776c, 0x3a8 - -gUnknown_08597B14:: @ 8597B14 - .incbin "baserom.gba", 0x597b14, 0x20 - -gUnknown_08597B34:: @ 8597B34 - .incbin "baserom.gba", 0x597b34, 0x20 - -gUnknown_08597B54:: @ 8597B54 - .incbin "baserom.gba", 0x597b54, 0xc8 - -gUnknown_08597C1C:: @ 8597C1C - .incbin "baserom.gba", 0x597c1c, 0x8 - -gUnknown_08597C24:: @ 8597C24 - .incbin "baserom.gba", 0x597c24, 0xc - -gUnknown_08597C30:: @ 8597C30 - .incbin "baserom.gba", 0x597c30, 0x24 - -gUnknown_08597C54:: @ 8597C54 - .incbin "baserom.gba", 0x597c54, 0x10 - -gUnknown_08597C64:: @ 8597C64 - .incbin "baserom.gba", 0x597c64, 0x20 - -gUnknown_08597C84:: @ 8597C84 - .incbin "baserom.gba", 0x597c84, 0x8 - -gUnknown_08597C8C:: @ 8597C8C - .incbin "baserom.gba", 0x597c8c, 0x4 - -gUnknown_08597C90:: @ 8597C90 - .incbin "baserom.gba", 0x597c90, 0x10 - -gUnknown_08597CA0:: @ 8597CA0 - .incbin "baserom.gba", 0x597ca0, 0x20 - -gUnknown_08597CC0:: @ 8597CC0 - .incbin "baserom.gba", 0x597cc0, 0x28 - -gUnknown_08597CE8:: @ 8597CE8 - .incbin "baserom.gba", 0x597ce8, 0x20 - -gUnknown_08597D08:: @ 8597D08 - .incbin "baserom.gba", 0x597d08, 0x10 - -gUnknown_08597D18:: @ 8597D18 - .incbin "baserom.gba", 0x597d18, 0x50 - -gUnknown_08597D68:: @ 8597D68 - .incbin "baserom.gba", 0x597d68, 0x68 - -gUnknown_08597DD0:: @ 8597DD0 - .incbin "baserom.gba", 0x597dd0, 0x20 - -gUnknown_08597DF0:: @ 8597DF0 - .incbin "baserom.gba", 0x597df0, 0x40 - -gUnknown_08597E30:: @ 8597E30 - .incbin "baserom.gba", 0x597e30, 0x18 - -gUnknown_08597E48:: @ 8597E48 - .incbin "baserom.gba", 0x597e48, 0x18 - -gUnknown_08597E60:: @ 8597E60 - .incbin "baserom.gba", 0x597e60, 0xc - -gUnknown_08597E6C:: @ 8597E6C - .incbin "baserom.gba", 0x597e6c, 0x30 - -@ 8597E9C - .include "data/text/easy_chat/easy_chat_groups.inc" - -@ 859D0B4 - .include "data/text/easy_chat/easy_chat_words_by_letter.inc" - -@ 859E5D4 - .include "data/text/easy_chat/easy_chat_group_name_pointers.inc" - -gUnknown_0859E62C:: @ 859E62C - .incbin "baserom.gba", 0x59e62c, 0x8 - -gUnknown_0859E634:: @ 859E634 - .incbin "baserom.gba", 0x59e634, 0xc - -gUnknown_0859E640:: @ 859E640 - .incbin "baserom.gba", 0x59e640, 0xc - -gUnknown_0859E64C:: @ 859E64C - .incbin "baserom.gba", 0x59e64c, 0xc - -gUnknown_0859E658:: @ 859E658 - .incbin "baserom.gba", 0x59e658, 0x4 - -gUnknown_0859E65C:: @ 859E65C - .incbin "baserom.gba", 0x59e65c, 0x20 - -gUnknown_0859E67C:: @ 859E67C - .incbin "baserom.gba", 0x59e67c, 0x800 - -gUnknown_0859EE7C:: @ 859EE7C - .incbin "baserom.gba", 0x59ee7c, 0x8 - -gUnknown_0859EE84:: @ 859EE84 - .incbin "baserom.gba", 0x59ee84, 0x58 - -gUnknown_0859EEDC:: @ 859EEDC - .incbin "baserom.gba", 0x59eedc, 0x38 - -gUnknown_0859EF14:: @ 859EF14 - .incbin "baserom.gba", 0x59ef14, 0x8 - -gUnknown_0859EF1C:: @ 859EF1C - .incbin "baserom.gba", 0x59ef1c, 0x88 - -gUnknown_0859EFA4:: @ 859EFA4 - .incbin "baserom.gba", 0x59efa4, 0x40 - -gUnknown_0859EFE4:: @ 859EFE4 - .incbin "baserom.gba", 0x59efe4, 0xc - -gUnknown_0859EFF0:: @ 859EFF0 - .incbin "baserom.gba", 0x59eff0, 0x20 - -gUnknown_0859F010:: @ 859F010 - .incbin "baserom.gba", 0x59f010, 0x20 - -gUnknown_0859F030:: @ 859F030 - .incbin "baserom.gba", 0x59f030, 0x18 - -gUnknown_0859F048:: @ 859F048 - .incbin "baserom.gba", 0x59f048, 0x230 - -gUnknown_0859F278:: @ 859F278 - .incbin "baserom.gba", 0x59f278, 0x10 - -gUnknown_0859F288:: @ 859F288 - .incbin "baserom.gba", 0x59f288, 0x8 - -gUnknown_0859F290:: @ 859F290 - .incbin "baserom.gba", 0x59f290, 0xc - -gUnknown_0859F29C:: @ 859F29C - .incbin "baserom.gba", 0x59f29c, 0x10 - -gUnknown_0859F2AC:: @ 859F2AC - .incbin "baserom.gba", 0x59f2ac, 0x4 - -gUnknown_0859F2B0:: @ 859F2B0 - .incbin "baserom.gba", 0x59f2b0, 0x8 - -gUnknown_0859F2B8:: @ 859F2B8 - .incbin "baserom.gba", 0x59f2b8, 0xfc - -gUnknown_0859F3B4:: @ 859F3B4 - .incbin "baserom.gba", 0x59f3b4, 0xa4 - -gUnknown_0859F458:: @ 859F458 - .incbin "baserom.gba", 0x59f458, 0xbc - -gUnknown_0859F514:: @ 859F514 - .incbin "baserom.gba", 0x59f514, 0x8 - -gUnknown_0859F51C:: @ 859F51C - .incbin "baserom.gba", 0x59f51c, 0x8 - -gUnknown_0859F524:: @ 859F524 - .incbin "baserom.gba", 0x59f524, 0x10 - -gUnknown_0859F534:: @ 859F534 - .incbin "baserom.gba", 0x59f534, 0x8 - -gUnknown_0859F53C:: @ 859F53C - .incbin "baserom.gba", 0x59f53c, 0xd0 - -gUnknown_0859F60C:: @ 859F60C - .incbin "baserom.gba", 0x59f60c, 0x44 - -gUnknown_0859F650:: @ 859F650 - .incbin "baserom.gba", 0x59f650, 0xec - -gUnknown_0859F73C:: @ 859F73C - .incbin "baserom.gba", 0x59f73c, 0x40 - -gUnknown_0859F77C:: @ 859F77C - .incbin "baserom.gba", 0x59f77c, 0xd64 - -gUnknown_085A04E0:: @ 85A04E0 - .incbin "baserom.gba", 0x5a04e0, 0x34c - -gUnknown_085A082C:: @ 85A082C - .incbin "baserom.gba", 0x5a082c, 0x20 - -gUnknown_085A084C:: @ 85A084C - .incbin "baserom.gba", 0x5a084c, 0x80 - -gUnknown_085A08CC:: @ 85A08CC - .incbin "baserom.gba", 0x5a08cc, 0x20 - -gUnknown_085A08EC:: @ 85A08EC - .incbin "baserom.gba", 0x5a08ec, 0x80 - -gUnknown_085A096C:: @ 85A096C - .incbin "baserom.gba", 0x5a096c, 0x1a4 - -@ 85A0B10 - .include "data/region_map_entries.inc" - -gUnknown_085A1B24:: @ 85A1B24 - .incbin "baserom.gba", 0x5a1b24, 0x60 - -gUnknown_085A1B84:: @ 85A1B84 - .incbin "baserom.gba", 0x5a1b84, 0x6 - -gUnknown_085A1B8A:: @ 85A1B8A - .incbin "baserom.gba", 0x5a1b8a, 0x22 - -gUnknown_085A1BAC:: @ 85A1BAC - .incbin "baserom.gba", 0x5a1bac, 0x20 - -gUnknown_085A1BCC:: @ 85A1BCC - .incbin "baserom.gba", 0x5a1bcc, 0x34 - -gUnknown_085A1C00:: @ 85A1C00 - .incbin "baserom.gba", 0x5a1c00, 0x8 - -gUnknown_085A1C08:: @ 85A1C08 - .incbin "baserom.gba", 0x5a1c08, 0x18 - -gUnknown_085A1C20:: @ 85A1C20 - .incbin "baserom.gba", 0x5a1c20, 0x10 - -gUnknown_085A1C30:: @ 85A1C30 - .incbin "baserom.gba", 0x5a1c30, 0x4 - -gUnknown_085A1C34:: @ 85A1C34 - .incbin "baserom.gba", 0x5a1c34, 0x4 - -gUnknown_085A1C38:: @ 85A1C38 - .incbin "baserom.gba", 0x5a1c38, 0x20 - -gUnknown_085A1C58:: @ 85A1C58 - .incbin "baserom.gba", 0x5a1c58, 0x38 - -gUnknown_085A1C90:: @ 85A1C90 - .incbin "baserom.gba", 0x5a1c90, 0xd8 - -gUnknown_085A1D68:: @ 85A1D68 - .incbin "baserom.gba", 0x5a1d68, 0xd4 - -gUnknown_085A1E3C:: @ 85A1E3C - .incbin "baserom.gba", 0x5a1e3c, 0xa0 - -gUnknown_085A1EDC:: @ 85A1EDC - .incbin "baserom.gba", 0x5a1edc, 0x8 - -gUnknown_085A1EE4:: @ 85A1EE4 - .incbin "baserom.gba", 0x5a1ee4, 0xc - -gUnknown_085A1EF0:: @ 85A1EF0 - .incbin "baserom.gba", 0x5a1ef0, 0x20 - -gUnknown_085A1F10:: @ 85A1F10 - .incbin "baserom.gba", 0x5a1f10, 0x8 - -gUnknown_085A1F18:: @ 85A1F18 - .incbin "baserom.gba", 0x5a1f18, 0x64 - -gUnknown_085A1F7C:: @ 85A1F7C - .incbin "baserom.gba", 0x5a1f7c, 0x18 - -gUnknown_085A1F94:: @ 85A1F94 - .incbin "baserom.gba", 0x5a1f94, 0x3c74 - -gDecorations:: @ 85A5C08 - .incbin "baserom.gba", 0x5a5c08, 0x1 - -gUnknown_085A5C09:: @ 85A5C09 - .incbin "baserom.gba", 0x5a5c09, 0x1b - -gUnknown_085A5C24:: @ 85A5C24 - .incbin "baserom.gba", 0x5a5c24, 0xf04 - -gUnknown_085A6B28:: @ 85A6B28 - .incbin "baserom.gba", 0x5a6b28, 0x20 - -gUnknown_085A6B48:: @ 85A6B48 - .incbin "baserom.gba", 0x5a6b48, 0x20 - -gUnknown_085A6B68:: @ 85A6B68 - .incbin "baserom.gba", 0x5a6b68, 0x10 - -gUnknown_085A6B78:: @ 85A6B78 - .incbin "baserom.gba", 0x5a6b78, 0x18 - -gUnknown_085A6B90:: @ 85A6B90 - .incbin "baserom.gba", 0x5a6b90, 0x20 - -gUnknown_085A6BB0:: @ 85A6BB0 - .incbin "baserom.gba", 0x5a6bb0, 0x20 - -gUnknown_085A6BD0:: @ 85A6BD0 - .incbin "baserom.gba", 0x5a6bd0, 0x18 - -gUnknown_085A6BE8:: @ 85A6BE8 - .incbin "baserom.gba", 0x5a6be8, 0x5c8 - -gUnknown_085A71B0:: @ 85A71B0 - .incbin "baserom.gba", 0x5a71b0, 0xa0 - -gUnknown_085A7250:: @ 85A7250 - .incbin "baserom.gba", 0x5a7250, 0x3c - -gUnknown_085A728C:: @ 85A728C - .incbin "baserom.gba", 0x5a728c, 0x18 - -gUnknown_085A72A4:: @ 85A72A4 - .incbin "baserom.gba", 0x5a72a4, 0x18 - -gUnknown_085A72BC:: @ 85A72BC - .incbin "baserom.gba", 0x5a72bc, 0x8 - -gUnknown_085A72C4:: @ 85A72C4 - .incbin "baserom.gba", 0x5a72c4, 0x8 - -gUnknown_085A72CC:: @ 85A72CC - .incbin "baserom.gba", 0x5a72cc, 0x8 - -gUnknown_085A72D4:: @ 85A72D4 - .incbin "baserom.gba", 0x5a72d4, 0x10 - -gUnknown_085A72E4:: @ 85A72E4 - .incbin "baserom.gba", 0x5a72e4, 0x8 - -gUnknown_085A72EC:: @ 85A72EC - .incbin "baserom.gba", 0x5a72ec, 0x8 - -gUnknown_085A72F4:: @ 85A72F4 - .incbin "baserom.gba", 0x5a72f4, 0x54 - -gUnknown_085A7348:: @ 85A7348 - .incbin "baserom.gba", 0x5a7348, 0x8 - -gUnknown_085A7350:: @ 85A7350 - .incbin "baserom.gba", 0x5a7350, 0x88 - -gUnknown_085A73D8:: @ 85A73D8 - .incbin "baserom.gba", 0x5a73d8, 0x8 - -gUnknown_085A73E0:: @ 85A73E0 - .incbin "baserom.gba", 0x5a73e0, 0x24 - -gUnknown_085A7404:: @ 85A7404 - .incbin "baserom.gba", 0x5a7404, 0x18 - -gUnknown_085A741C:: @ 85A741C - .incbin "baserom.gba", 0x5a741c, 0x8 - -gUnknown_085A7424:: @ 85A7424 - .incbin "baserom.gba", 0x5a7424, 0x10 - -gUnknown_085A7434:: @ 85A7434 - .incbin "baserom.gba", 0x5a7434, 0x10 - -gUnknown_085A7444:: @ 85A7444 - .incbin "baserom.gba", 0x5a7444, 0x8 - -gUnknown_085A744C:: @ 85A744C - .incbin "baserom.gba", 0x5a744c, 0x4 - -gUnknown_085A7450:: @ 85A7450 - .incbin "baserom.gba", 0x5a7450, 0x74 - -gUnknown_085A74C4:: @ 85A74C4 - .incbin "baserom.gba", 0x5a74c4, 0xc - -gUnknown_085A74D0:: @ 85A74D0 - .incbin "baserom.gba", 0x5a74d0, 0x14 - -gUnknown_085A74E4:: @ 85A74E4 - .incbin "baserom.gba", 0x5a74e4, 0xc - -gUnknown_085A74F0:: @ 85A74F0 - .incbin "baserom.gba", 0x5a74f0, 0xc - -gUnknown_085A74FC:: @ 85A74FC - .incbin "baserom.gba", 0x5a74fc, 0xc - -gUnknown_085A7508:: @ 85A7508 - .incbin "baserom.gba", 0x5a7508, 0xc - -gUnknown_085A7514:: @ 85A7514 - .incbin "baserom.gba", 0x5a7514, 0xc - -gUnknown_085A7520:: @ 85A7520 - .incbin "baserom.gba", 0x5a7520, 0xc - -gUnknown_085A752C:: @ 85A752C - .incbin "baserom.gba", 0x5a752c, 0xc - -gUnknown_085A7538:: @ 85A7538 - .incbin "baserom.gba", 0x5a7538, 0xc - -gUnknown_085A7544:: @ 85A7544 - .incbin "baserom.gba", 0x5a7544, 0xc - -gUnknown_085A7550:: @ 85A7550 - .incbin "baserom.gba", 0x5a7550, 0x8 - -gUnknown_085A7558:: @ 85A7558 - .incbin "baserom.gba", 0x5a7558, 0x10 - -gUnknown_085A7568:: @ 85A7568 - .incbin "baserom.gba", 0x5a7568, 0x2 - -gUnknown_085A756A:: @ 85A756A - .incbin "baserom.gba", 0x5a756a, 0xa - -gUnknown_085A7574:: @ 85A7574 - .incbin "baserom.gba", 0x5a7574, 0x4c - -gUnknown_085A75C0:: @ 85A75C0 - .incbin "baserom.gba", 0x5a75c0, 0x4 - -gUnknown_085A75C4:: @ 85A75C4 - .incbin "baserom.gba", 0x5a75c4, 0x8 - -gUnknown_085A75CC:: @ 85A75CC - .incbin "baserom.gba", 0x5a75cc, 0x8 - -gUnknown_085A75D4:: @ 85A75D4 - .incbin "baserom.gba", 0x5a75d4, 0x3c - -gUnknown_085A7610:: @ 85A7610 - .incbin "baserom.gba", 0x5a7610, 0x4 - -gUnknown_085A7614:: @ 85A7614 - .incbin "baserom.gba", 0x5a7614, 0x2 - -gUnknown_085A7616:: @ 85A7616 - .incbin "baserom.gba", 0x5a7616, 0x8 - -gUnknown_085A761E:: @ 85A761E - .incbin "baserom.gba", 0x5a761e, 0x8 - -gUnknown_085A7626:: @ 85A7626 - .incbin "baserom.gba", 0x5a7626, 0x8 - -gUnknown_085A762E:: @ 85A762E - .incbin "baserom.gba", 0x5a762e, 0x10 - -gUnknown_085A763E:: @ 85A763E - .incbin "baserom.gba", 0x5a763e, 0x10 - -gUnknown_085A764E:: @ 85A764E - .incbin "baserom.gba", 0x5a764e, 0x10 - -gUnknown_085A765E:: @ 85A765E - .incbin "baserom.gba", 0x5a765e, 0x10 - -gUnknown_085A766E:: @ 85A766E - .incbin "baserom.gba", 0x5a766e, 0x3f - -gUnknown_085A76AD:: @ 85A76AD - .incbin "baserom.gba", 0x5a76ad, 0x7 - -gUnknown_085A76B4:: @ 85A76B4 - .incbin "baserom.gba", 0x5a76b4, 0xc - -gUnknown_085A76C0:: @ 85A76C0 - .incbin "baserom.gba", 0x5a76c0, 0x12 - -gUnknown_085A76D2:: @ 85A76D2 - .incbin "baserom.gba", 0x5a76d2, 0x12 - -gUnknown_085A76E4:: @ 85A76E4 - .incbin "baserom.gba", 0x5a76e4, 0x1e - -gUnknown_085A7702:: @ 85A7702 - .incbin "baserom.gba", 0x5a7702, 0x66 - -gUnknown_085A7768:: @ 85A7768 - .incbin "baserom.gba", 0x5a7768, 0x66 - -gUnknown_085A77CE:: @ 85A77CE - .incbin "baserom.gba", 0x5a77ce, 0xa - -gUnknown_085A77D8:: @ 85A77D8 - .incbin "baserom.gba", 0x5a77d8, 0x14 - -gUnknown_085A77EC:: @ 85A77EC - .incbin "baserom.gba", 0x5a77ec, 0xa - -gUnknown_085A77F6:: @ 85A77F6 - .incbin "baserom.gba", 0x5a77f6, 0x8 - -gUnknown_085A77FE:: @ 85A77FE - .incbin "baserom.gba", 0x5a77fe, 0x6 - -gUnknown_085A7804:: @ 85A7804 - .incbin "baserom.gba", 0x5a7804, 0xa - -gUnknown_085A780E:: @ 85A780E - .incbin "baserom.gba", 0x5a780e, 0x8 - -gUnknown_085A7816:: @ 85A7816 - .incbin "baserom.gba", 0x5a7816, 0x12 - -gUnknown_085A7828:: @ 85A7828 - .incbin "baserom.gba", 0x5a7828, 0x12 - -gUnknown_085A783A:: @ 85A783A - .incbin "baserom.gba", 0x5a783a, 0x8e - -gUnknown_085A78C8:: @ 85A78C8 - .incbin "baserom.gba", 0x5a78c8, 0x13c - -gUnknown_085A7A04:: @ 85A7A04 - .incbin "baserom.gba", 0x5a7a04, 0x1c - -gUnknown_085A7A20:: @ 85A7A20 - .incbin "baserom.gba", 0x5a7a20, 0x2c0 - -gUnknown_085A7CE0:: @ 85A7CE0 - .incbin "baserom.gba", 0x5a7ce0, 0x18 - -gUnknown_085A7CF8:: @ 85A7CF8 - .incbin "baserom.gba", 0x5a7cf8, 0x18 - -gUnknown_085A7D10:: @ 85A7D10 - .incbin "baserom.gba", 0x5a7d10, 0x18 - -gUnknown_085A7D28:: @ 85A7D28 - .incbin "baserom.gba", 0x5a7d28, 0x18 - -gUnknown_085A7D40:: @ 85A7D40 - .incbin "baserom.gba", 0x5a7d40, 0x18 - -gUnknown_085A7D58:: @ 85A7D58 - .incbin "baserom.gba", 0x5a7d58, 0x18 - -gUnknown_085A7D70:: @ 85A7D70 - .incbin "baserom.gba", 0x5a7d70, 0x18 - -gUnknown_085A7D88:: @ 85A7D88 - .incbin "baserom.gba", 0x5a7d88, 0x18 - -gUnknown_085A7DA0:: @ 85A7DA0 - .incbin "baserom.gba", 0x5a7da0, 0x18 - -gUnknown_085A7DB8:: @ 85A7DB8 - .incbin "baserom.gba", 0x5a7db8, 0x18 - -gUnknown_085A7DD0:: @ 85A7DD0 - .incbin "baserom.gba", 0x5a7dd0, 0x18 - -gUnknown_085A7DE8:: @ 85A7DE8 - .incbin "baserom.gba", 0x5a7de8, 0x18 - -gUnknown_085A7E00:: @ 85A7E00 - .incbin "baserom.gba", 0x5a7e00, 0x18 - -gUnknown_085A7E18:: @ 85A7E18 - .incbin "baserom.gba", 0x5a7e18, 0x18 - -gUnknown_085A7E30:: @ 85A7E30 - .incbin "baserom.gba", 0x5a7e30, 0x168 - -gUnknown_085A7F98:: @ 85A7F98 - .incbin "baserom.gba", 0x5a7f98, 0x28 - -gUnknown_085A7FC0:: @ 85A7FC0 - .incbin "baserom.gba", 0x5a7fc0, 0x20 - -gUnknown_085A7FE0:: @ 85A7FE0 - .incbin "baserom.gba", 0x5a7fe0, 0x14 - -gUnknown_085A7FF4:: @ 85A7FF4 - .incbin "baserom.gba", 0x5a7ff4, 0x1c - -gUnknown_085A8010:: @ 85A8010 - .incbin "baserom.gba", 0x5a8010, 0x18 - -gUnknown_085A8028:: @ 85A8028 - .incbin "baserom.gba", 0x5a8028, 0x14 - -gUnknown_085A803C:: @ 85A803C - .incbin "baserom.gba", 0x5a803c, 0x228 - -gUnknown_085A8264:: @ 85A8264 - .incbin "baserom.gba", 0x5a8264, 0x68 - -gUnknown_085A82CC:: @ 85A82CC - .incbin "baserom.gba", 0x5a82cc, 0x68 - -gUnknown_085A8334:: @ 85A8334 - .incbin "baserom.gba", 0x5a8334, 0xb0 - -gUnknown_085A83E4:: @ 85A83E4 - .incbin "baserom.gba", 0x5a83e4, 0x24 - -gUnknown_085A8408:: @ 85A8408 - .incbin "baserom.gba", 0x5a8408, 0x14 - -gUnknown_085A841C:: @ 85A841C - .incbin "baserom.gba", 0x5a841c, 0x14 - -gUnknown_085A8430:: @ 85A8430 - .incbin "baserom.gba", 0x5a8430, 0x5 - -gUnknown_085A8435:: @ 85A8435 - .incbin "baserom.gba", 0x5a8435, 0x6 - -gUnknown_085A843B:: @ 85A843B - .incbin "baserom.gba", 0x5a843b, 0x65 - -gUnknown_085A84A0:: @ 85A84A0 - .incbin "baserom.gba", 0x5a84a0, 0xc - -gUnknown_085A84AC:: @ 85A84AC - .incbin "baserom.gba", 0x5a84ac, 0x64 - -gUnknown_085A8510:: @ 85A8510 - .incbin "baserom.gba", 0x5a8510, 0x10 - -gUnknown_085A8520:: @ 85A8520 - .incbin "baserom.gba", 0x5a8520, 0x4 - -gUnknown_085A8524:: @ 85A8524 - .incbin "baserom.gba", 0x5a8524, 0x20 - -gUnknown_085A8544:: @ 85A8544 - .incbin "baserom.gba", 0x5a8544, 0x48 - -gUnknown_085A858C:: @ 85A858C - .incbin "baserom.gba", 0x5a858c, 0x1154 - -gUnknown_085A96E0:: @ 85A96E0 - .incbin "baserom.gba", 0x5a96e0, 0x1b8 - -gUnknown_085A9898:: @ 85A9898 - .incbin "baserom.gba", 0x5a9898, 0x4 - -gUnknown_085A989C:: @ 85A989C - .incbin "baserom.gba", 0x5a989c, 0x200 - -gUnknown_085A9A9C:: @ 85A9A9C - .incbin "baserom.gba", 0x5a9a9c, 0x1084 - -gUnknown_085AAB20:: @ 85AAB20 - .incbin "baserom.gba", 0x5aab20, 0xc30 - -gUnknown_085AB750:: @ 85AB750 - .incbin "baserom.gba", 0x5ab750, 0xb38 - -gUnknown_085AC288:: @ 85AC288 - .incbin "baserom.gba", 0x5ac288, 0xfb8 - -gUnknown_085AD240:: @ 85AD240 - .incbin "baserom.gba", 0x5ad240, 0x1130 - -gUnknown_085AE370:: @ 85AE370 - .incbin "baserom.gba", 0x5ae370, 0x604 - -gUnknown_085AE974:: @ 85AE974 - .incbin "baserom.gba", 0x5ae974, 0x50c - -gUnknown_085AEE80:: @ 85AEE80 - .incbin "baserom.gba", 0x5aee80, 0x50c - -gUnknown_085AF38C:: @ 85AF38C - .incbin "baserom.gba", 0x5af38c, 0x50c - -gUnknown_085AF898:: @ 85AF898 - .incbin "baserom.gba", 0x5af898, 0x50c - -gUnknown_085AFDA4:: @ 85AFDA4 - .incbin "baserom.gba", 0x5afda4, 0x50c - -gUnknown_085B02B0:: @ 85B02B0 - .incbin "baserom.gba", 0x5b02b0, 0x524 - -gUnknown_085B07D4:: @ 85B07D4 - .incbin "baserom.gba", 0x5b07d4, 0x14 - -gUnknown_085B07E8:: @ 85B07E8 - .incbin "baserom.gba", 0x5b07e8, 0x4 - -gUnknown_085B07EC:: @ 85B07EC - .incbin "baserom.gba", 0x5b07ec, 0x8 - -gUnknown_085B07F4:: @ 85B07F4 - .incbin "baserom.gba", 0x5b07f4, 0x3c - -gUnknown_085B0830:: @ 85B0830 - .incbin "baserom.gba", 0x5b0830, 0x8 - -gUnknown_085B0838:: @ 85B0838 - .incbin "baserom.gba", 0x5b0838, 0x4 diff --git a/data/decoration.s b/data/decoration.s new file mode 100644 index 000000000..de4478f8d --- /dev/null +++ b/data/decoration.s @@ -0,0 +1,86 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gDecorations:: @ 85A5C08 + .incbin "baserom.gba", 0x5a5c08, 0x1c + +gUnknown_085A5C24:: @ 85A5C24 + .incbin "baserom.gba", 0x5a5c24, 0xf04 + +gUnknown_085A6B28:: @ 85A6B28 + .incbin "baserom.gba", 0x5a6b28, 0x20 + +gUnknown_085A6B48:: @ 85A6B48 + .incbin "baserom.gba", 0x5a6b48, 0x20 + +gUnknown_085A6B68:: @ 85A6B68 + .incbin "baserom.gba", 0x5a6b68, 0x10 + +gUnknown_085A6B78:: @ 85A6B78 + .incbin "baserom.gba", 0x5a6b78, 0x18 + +gUnknown_085A6B90:: @ 85A6B90 + .incbin "baserom.gba", 0x5a6b90, 0x20 + +gUnknown_085A6BB0:: @ 85A6BB0 + .incbin "baserom.gba", 0x5a6bb0, 0x20 + +gUnknown_085A6BD0:: @ 85A6BD0 + .incbin "baserom.gba", 0x5a6bd0, 0x18 + +gUnknown_085A6BE8:: @ 85A6BE8 + .incbin "baserom.gba", 0x5a6be8, 0x5c8 + +gUnknown_085A71B0:: @ 85A71B0 + .incbin "baserom.gba", 0x5a71b0, 0xa0 + +gUnknown_085A7250:: @ 85A7250 + .incbin "baserom.gba", 0x5a7250, 0x3c + +gUnknown_085A728C:: @ 85A728C + .incbin "baserom.gba", 0x5a728c, 0x18 + +gUnknown_085A72A4:: @ 85A72A4 + .incbin "baserom.gba", 0x5a72a4, 0x18 + +gUnknown_085A72BC:: @ 85A72BC + .incbin "baserom.gba", 0x5a72bc, 0x8 + +gUnknown_085A72C4:: @ 85A72C4 + .incbin "baserom.gba", 0x5a72c4, 0x8 + +gUnknown_085A72CC:: @ 85A72CC + .incbin "baserom.gba", 0x5a72cc, 0x8 + +gUnknown_085A72D4:: @ 85A72D4 + .incbin "baserom.gba", 0x5a72d4, 0x10 + +gUnknown_085A72E4:: @ 85A72E4 + .incbin "baserom.gba", 0x5a72e4, 0x8 + +gUnknown_085A72EC:: @ 85A72EC + .incbin "baserom.gba", 0x5a72ec, 0x8 + +gUnknown_085A72F4:: @ 85A72F4 + .incbin "baserom.gba", 0x5a72f4, 0x54 + +gUnknown_085A7348:: @ 85A7348 + .incbin "baserom.gba", 0x5a7348, 0x8 + +gUnknown_085A7350:: @ 85A7350 + .incbin "baserom.gba", 0x5a7350, 0x88 + +gUnknown_085A73D8:: @ 85A73D8 + .incbin "baserom.gba", 0x5a73d8, 0x8 + +gUnknown_085A73E0:: @ 85A73E0 + .incbin "baserom.gba", 0x5a73e0, 0x24 + +gUnknown_085A7404:: @ 85A7404 + .incbin "baserom.gba", 0x5a7404, 0x18 + +gUnknown_085A741C:: @ 85A741C + .incbin "baserom.gba", 0x5a741c, 0x8 diff --git a/data/easy_chat.s b/data/easy_chat.s new file mode 100644 index 000000000..d6efc1c7f --- /dev/null +++ b/data/easy_chat.s @@ -0,0 +1,113 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_08597530:: @ 8597530 + .incbin "baserom.gba", 0x597530, 0x20 + +gUnknown_08597550:: @ 8597550 + .incbin "baserom.gba", 0x597550, 0x1f8 + +gUnknown_08597748:: @ 8597748 + .incbin "baserom.gba", 0x597748, 0x1c + +gUnknown_08597764:: @ 8597764 + .incbin "baserom.gba", 0x597764, 0x8 + +gUnknown_0859776C:: @ 859776C + .incbin "baserom.gba", 0x59776c, 0x3a8 + +gUnknown_08597B14:: @ 8597B14 + .incbin "baserom.gba", 0x597b14, 0x20 + +gUnknown_08597B34:: @ 8597B34 + .incbin "baserom.gba", 0x597b34, 0x20 + +gUnknown_08597B54:: @ 8597B54 + .incbin "baserom.gba", 0x597b54, 0xc8 + +gUnknown_08597C1C:: @ 8597C1C + .incbin "baserom.gba", 0x597c1c, 0x8 + +gUnknown_08597C24:: @ 8597C24 + .incbin "baserom.gba", 0x597c24, 0xc + +gUnknown_08597C30:: @ 8597C30 + .incbin "baserom.gba", 0x597c30, 0x24 + +gUnknown_08597C54:: @ 8597C54 + .incbin "baserom.gba", 0x597c54, 0x10 + +gUnknown_08597C64:: @ 8597C64 + .incbin "baserom.gba", 0x597c64, 0x20 + +gUnknown_08597C84:: @ 8597C84 + .incbin "baserom.gba", 0x597c84, 0x8 + +gUnknown_08597C8C:: @ 8597C8C + .incbin "baserom.gba", 0x597c8c, 0x4 + +gUnknown_08597C90:: @ 8597C90 + .incbin "baserom.gba", 0x597c90, 0x10 + +gUnknown_08597CA0:: @ 8597CA0 + .incbin "baserom.gba", 0x597ca0, 0x20 + +gUnknown_08597CC0:: @ 8597CC0 + .incbin "baserom.gba", 0x597cc0, 0x28 + +gUnknown_08597CE8:: @ 8597CE8 + .incbin "baserom.gba", 0x597ce8, 0x20 + +gUnknown_08597D08:: @ 8597D08 + .incbin "baserom.gba", 0x597d08, 0x10 + +gUnknown_08597D18:: @ 8597D18 + .incbin "baserom.gba", 0x597d18, 0x50 + +gUnknown_08597D68:: @ 8597D68 + .incbin "baserom.gba", 0x597d68, 0x68 + +gUnknown_08597DD0:: @ 8597DD0 + .incbin "baserom.gba", 0x597dd0, 0x20 + +gUnknown_08597DF0:: @ 8597DF0 + .incbin "baserom.gba", 0x597df0, 0x40 + +gUnknown_08597E30:: @ 8597E30 + .incbin "baserom.gba", 0x597e30, 0x18 + +gUnknown_08597E48:: @ 8597E48 + .incbin "baserom.gba", 0x597e48, 0x18 + +gUnknown_08597E60:: @ 8597E60 + .incbin "baserom.gba", 0x597e60, 0xc + +gUnknown_08597E6C:: @ 8597E6C + .incbin "baserom.gba", 0x597e6c, 0x30 + +@ 8597E9C + .include "data/text/easy_chat/easy_chat_groups.inc" + +@ 859D0B4 + .include "data/text/easy_chat/easy_chat_words_by_letter.inc" + +@ 859E5D4 + .include "data/text/easy_chat/easy_chat_group_name_pointers.inc" + +gUnknown_0859E62C:: @ 859E62C + .incbin "baserom.gba", 0x59e62c, 0x8 + +gUnknown_0859E634:: @ 859E634 + .incbin "baserom.gba", 0x59e634, 0xc + +gUnknown_0859E640:: @ 859E640 + .incbin "baserom.gba", 0x59e640, 0xc + +gUnknown_0859E64C:: @ 859E64C + .incbin "baserom.gba", 0x59e64c, 0xc + +gUnknown_0859E658:: @ 859E658 + .incbin "baserom.gba", 0x59e658, 0x4 diff --git a/data/field_effect.s b/data/field_effect.s new file mode 100644 index 000000000..88f9f1c94 --- /dev/null +++ b/data/field_effect.s @@ -0,0 +1,55 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + .align 2 + .incbin "baserom.gba", 0x58d978, 0x2a0 + + .align 2 +gFieldEffectObjectPalette7:: @ 858DC18 + .incbin "graphics/map_objects/palettes/field_effect_object_palette_07.gbapal" + + .incbin "baserom.gba", 0x58dc38, 0x580 + + .align 2 +gFieldEffectObjectPalette8:: @ 858E1B8 + .incbin "graphics/map_objects/palettes/field_effect_object_palette_08.gbapal" + + .incbin "baserom.gba", 0x58e1d8, 0x428 + +gUnknown_0858E600:: @ 858E600 + .incbin "baserom.gba", 0x58e600, 0x18 + +gUnknown_0858E618:: @ 858E618 + .incbin "baserom.gba", 0x58e618, 0x18 + +gUnknown_0858E630:: @ 858E630 + .incbin "baserom.gba", 0x58e630, 0x18 + + .align 2 +gFieldEffectObjectPaletteInfo7:: @ 858E648 + obj_pal gFieldEffectObjectPalette7, 0x1003 + + .align 2 +gFieldEffectObjectPaletteInfo8:: @ 858E650 + obj_pal gFieldEffectObjectPalette8, 0x1008 + + .incbin "baserom.gba", 0x58e658, 0x34 + +gUnknown_0858E68C:: @ 858E68C + .incbin "baserom.gba", 0x58e68c, 0x18 + + .align 2 +@ This uses one of the secret base palettes, so there is no +@ "field_effect_object_palette_09.pal" file. +gFieldEffectObjectPaletteInfo9:: @ 858E6A4 + obj_pal gTilesetPalettes_SecretBase + 5 * 0x20, 0x100E + + .incbin "baserom.gba", 0x58e6ac, 0x1b8 + +gUnknown_0858E864:: @ 858E864 + .incbin "baserom.gba", 0x58e864, 0x1c + +gUnknown_0858E880:: @ 858E880 + .incbin "baserom.gba", 0x58e880, 0x18 diff --git a/data/heal_location.s b/data/heal_location.s new file mode 100644 index 000000000..31aa1a351 --- /dev/null +++ b/data/heal_location.s @@ -0,0 +1,11 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0859F534:: @ 859F534 + .incbin "baserom.gba", 0x59f534, 0x8 + +gUnknown_0859F53C:: @ 859F53C + .incbin "baserom.gba", 0x59f53c, 0xd0 diff --git a/data/item_use.s b/data/item_use.s new file mode 100644 index 000000000..20ca8d683 --- /dev/null +++ b/data/item_use.s @@ -0,0 +1,15 @@ + + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_085920D8:: @ 85920D8 + .incbin "baserom.gba", 0x5920d8, 0xc + +gUnknown_085920E4:: @ 85920E4 + .incbin "baserom.gba", 0x5920e4, 0x4 + +gUnknown_085920E8:: @ 85920E8 + .incbin "baserom.gba", 0x5920e8, 0x128 diff --git a/data/mail.s b/data/mail.s new file mode 100644 index 000000000..5dc8270bc --- /dev/null +++ b/data/mail.s @@ -0,0 +1,26 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0859F290:: @ 859F290 + .incbin "baserom.gba", 0x59f290, 0xc + +gUnknown_0859F29C:: @ 859F29C + .incbin "baserom.gba", 0x59f29c, 0x10 + +gUnknown_0859F2AC:: @ 859F2AC + .incbin "baserom.gba", 0x59f2ac, 0x4 + +gUnknown_0859F2B0:: @ 859F2B0 + .incbin "baserom.gba", 0x59f2b0, 0x8 + +gUnknown_0859F2B8:: @ 859F2B8 + .incbin "baserom.gba", 0x59f2b8, 0xfc + +gUnknown_0859F3B4:: @ 859F3B4 + .incbin "baserom.gba", 0x59f3b4, 0xa4 + +gUnknown_0859F458:: @ 859F458 + .incbin "baserom.gba", 0x59f458, 0xbc diff --git a/data/mauville_old_man.s b/data/mauville_old_man.s new file mode 100644 index 000000000..539cace62 --- /dev/null +++ b/data/mauville_old_man.s @@ -0,0 +1,26 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0859EFE4:: @ 859EFE4 + .incbin "baserom.gba", 0x59efe4, 0xc + +gUnknown_0859EFF0:: @ 859EFF0 + .incbin "baserom.gba", 0x59eff0, 0x20 + +gUnknown_0859F010:: @ 859F010 + .incbin "baserom.gba", 0x59f010, 0x20 + +gUnknown_0859F030:: @ 859F030 + .incbin "baserom.gba", 0x59f030, 0x18 + +gUnknown_0859F048:: @ 859F048 + .incbin "baserom.gba", 0x59f048, 0x230 + +gUnknown_0859F278:: @ 859F278 + .incbin "baserom.gba", 0x59f278, 0x10 + +gUnknown_0859F288:: @ 859F288 + .incbin "baserom.gba", 0x59f288, 0x8 diff --git a/data/menu_helpers.s b/data/menu_helpers.s new file mode 100644 index 000000000..b43af0bc4 --- /dev/null +++ b/data/menu_helpers.s @@ -0,0 +1,14 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0859F514:: @ 859F514 + .incbin "baserom.gba", 0x59f514, 0x8 + +gUnknown_0859F51C:: @ 859F51C + .incbin "baserom.gba", 0x59f51c, 0x8 + +gUnknown_0859F524:: @ 859F524 + .incbin "baserom.gba", 0x59f524, 0x10 diff --git a/data/mon_markings.s b/data/mon_markings.s new file mode 100644 index 000000000..795b8d8a6 --- /dev/null +++ b/data/mon_markings.s @@ -0,0 +1,29 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0859E65C:: @ 859E65C + .incbin "baserom.gba", 0x59e65c, 0x20 + +gUnknown_0859E67C:: @ 859E67C + .incbin "baserom.gba", 0x59e67c, 0x800 + +gUnknown_0859EE7C:: @ 859EE7C + .incbin "baserom.gba", 0x59ee7c, 0x8 + +gUnknown_0859EE84:: @ 859EE84 + .incbin "baserom.gba", 0x59ee84, 0x58 + +gUnknown_0859EEDC:: @ 859EEDC + .incbin "baserom.gba", 0x59eedc, 0x38 + +gUnknown_0859EF14:: @ 859EF14 + .incbin "baserom.gba", 0x59ef14, 0x8 + +gUnknown_0859EF1C:: @ 859EF1C + .incbin "baserom.gba", 0x59ef1c, 0x88 + +gUnknown_0859EFA4:: @ 859EFA4 + .incbin "baserom.gba", 0x59efa4, 0x40 diff --git a/data/region_map.s b/data/region_map.s new file mode 100644 index 000000000..78e6cec2f --- /dev/null +++ b/data/region_map.s @@ -0,0 +1,101 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0859F60C:: @ 859F60C + .incbin "baserom.gba", 0x59f60c, 0x44 + +gUnknown_0859F650:: @ 859F650 + .incbin "baserom.gba", 0x59f650, 0xec + +gUnknown_0859F73C:: @ 859F73C + .incbin "baserom.gba", 0x59f73c, 0x40 + +gUnknown_0859F77C:: @ 859F77C + .incbin "baserom.gba", 0x59f77c, 0xd64 + +gUnknown_085A04E0:: @ 85A04E0 + .incbin "baserom.gba", 0x5a04e0, 0x34c + +gUnknown_085A082C:: @ 85A082C + .incbin "baserom.gba", 0x5a082c, 0x20 + +gUnknown_085A084C:: @ 85A084C + .incbin "baserom.gba", 0x5a084c, 0x80 + +gUnknown_085A08CC:: @ 85A08CC + .incbin "baserom.gba", 0x5a08cc, 0x20 + +gUnknown_085A08EC:: @ 85A08EC + .incbin "baserom.gba", 0x5a08ec, 0x80 + +gUnknown_085A096C:: @ 85A096C + .incbin "baserom.gba", 0x5a096c, 0x1a4 + +@ 85A0B10 + .include "data/region_map_entries.inc" + +gUnknown_085A1B24:: @ 85A1B24 + .incbin "baserom.gba", 0x5a1b24, 0x60 + +gUnknown_085A1B84:: @ 85A1B84 + .incbin "baserom.gba", 0x5a1b84, 0x6 + +gUnknown_085A1B8A:: @ 85A1B8A + .incbin "baserom.gba", 0x5a1b8a, 0x22 + +gUnknown_085A1BAC:: @ 85A1BAC + .incbin "baserom.gba", 0x5a1bac, 0x20 + +gUnknown_085A1BCC:: @ 85A1BCC + .incbin "baserom.gba", 0x5a1bcc, 0x34 + +gUnknown_085A1C00:: @ 85A1C00 + .incbin "baserom.gba", 0x5a1c00, 0x8 + +gUnknown_085A1C08:: @ 85A1C08 + .incbin "baserom.gba", 0x5a1c08, 0x18 + +gUnknown_085A1C20:: @ 85A1C20 + .incbin "baserom.gba", 0x5a1c20, 0x10 + +gUnknown_085A1C30:: @ 85A1C30 + .incbin "baserom.gba", 0x5a1c30, 0x4 + +gUnknown_085A1C34:: @ 85A1C34 + .incbin "baserom.gba", 0x5a1c34, 0x4 + +gUnknown_085A1C38:: @ 85A1C38 + .incbin "baserom.gba", 0x5a1c38, 0x20 + +gUnknown_085A1C58:: @ 85A1C58 + .incbin "baserom.gba", 0x5a1c58, 0x38 + +gUnknown_085A1C90:: @ 85A1C90 + .incbin "baserom.gba", 0x5a1c90, 0xd8 + +gUnknown_085A1D68:: @ 85A1D68 + .incbin "baserom.gba", 0x5a1d68, 0xd4 + +gUnknown_085A1E3C:: @ 85A1E3C + .incbin "baserom.gba", 0x5a1e3c, 0xa0 + +gUnknown_085A1EDC:: @ 85A1EDC + .incbin "baserom.gba", 0x5a1edc, 0x8 + +gUnknown_085A1EE4:: @ 85A1EE4 + .incbin "baserom.gba", 0x5a1ee4, 0xc + +gUnknown_085A1EF0:: @ 85A1EF0 + .incbin "baserom.gba", 0x5a1ef0, 0x20 + +gUnknown_085A1F10:: @ 85A1F10 + .incbin "baserom.gba", 0x5a1f10, 0x8 + +gUnknown_085A1F18:: @ 85A1F18 + .incbin "baserom.gba", 0x5a1f18, 0x64 + +gUnknown_085A1F7C:: @ 85A1F7C + .incbin "baserom.gba", 0x5a1f7c, 0x18 diff --git a/data/rotating_gate.s b/data/rotating_gate.s new file mode 100644 index 000000000..90568caa5 --- /dev/null +++ b/data/rotating_gate.s @@ -0,0 +1,41 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0858E8B0:: @ 858E8B0 + .incbin "baserom.gba", 0x58e8b0, 0x40 + +gUnknown_0858E8F0:: @ 858E8F0 + .incbin "baserom.gba", 0x58e8f0, 0x3468 + +gUnknown_08591D58:: @ 8591D58 + .incbin "baserom.gba", 0x591d58, 0x270 + +gUnknown_08591FC8:: @ 8591FC8 + .incbin "baserom.gba", 0x591fc8, 0x18 + +gUnknown_08591FE0:: @ 8591FE0 + .incbin "baserom.gba", 0x591fe0, 0x18 + +gUnknown_08591FF8:: @ 8591FF8 + .incbin "baserom.gba", 0x591ff8, 0x10 + +gUnknown_08592008:: @ 8592008 + .incbin "baserom.gba", 0x592008, 0x10 + +gUnknown_08592018:: @ 8592018 + .incbin "baserom.gba", 0x592018, 0x10 + +gUnknown_08592028:: @ 8592028 + .incbin "baserom.gba", 0x592028, 0x10 + +gUnknown_08592038:: @ 8592038 + .incbin "baserom.gba", 0x592038, 0x20 + +gUnknown_08592058:: @ 8592058 + .incbin "baserom.gba", 0x592058, 0x20 + +gUnknown_08592078:: @ 8592078 + .incbin "baserom.gba", 0x592078, 0x60 diff --git a/data/slot_machine.s b/data/slot_machine.s new file mode 100644 index 000000000..08989ccdc --- /dev/null +++ b/data/slot_machine.s @@ -0,0 +1,290 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_085A7424:: @ 85A7424 + .incbin "baserom.gba", 0x5a7424, 0x10 + +gUnknown_085A7434:: @ 85A7434 + .incbin "baserom.gba", 0x5a7434, 0x10 + +gUnknown_085A7444:: @ 85A7444 + .incbin "baserom.gba", 0x5a7444, 0x8 + +gUnknown_085A744C:: @ 85A744C + .incbin "baserom.gba", 0x5a744c, 0x4 + +gUnknown_085A7450:: @ 85A7450 + .incbin "baserom.gba", 0x5a7450, 0x74 + +gUnknown_085A74C4:: @ 85A74C4 + .incbin "baserom.gba", 0x5a74c4, 0xc + +gUnknown_085A74D0:: @ 85A74D0 + .incbin "baserom.gba", 0x5a74d0, 0x14 + +gUnknown_085A74E4:: @ 85A74E4 + .incbin "baserom.gba", 0x5a74e4, 0xc + +gUnknown_085A74F0:: @ 85A74F0 + .incbin "baserom.gba", 0x5a74f0, 0xc + +gUnknown_085A74FC:: @ 85A74FC + .incbin "baserom.gba", 0x5a74fc, 0xc + +gUnknown_085A7508:: @ 85A7508 + .incbin "baserom.gba", 0x5a7508, 0xc + +gUnknown_085A7514:: @ 85A7514 + .incbin "baserom.gba", 0x5a7514, 0xc + +gUnknown_085A7520:: @ 85A7520 + .incbin "baserom.gba", 0x5a7520, 0xc + +gUnknown_085A752C:: @ 85A752C + .incbin "baserom.gba", 0x5a752c, 0xc + +gUnknown_085A7538:: @ 85A7538 + .incbin "baserom.gba", 0x5a7538, 0xc + +gUnknown_085A7544:: @ 85A7544 + .incbin "baserom.gba", 0x5a7544, 0xc + +gUnknown_085A7550:: @ 85A7550 + .incbin "baserom.gba", 0x5a7550, 0x8 + +gUnknown_085A7558:: @ 85A7558 + .incbin "baserom.gba", 0x5a7558, 0x10 + +gUnknown_085A7568:: @ 85A7568 + .incbin "baserom.gba", 0x5a7568, 0x2 + +gUnknown_085A756A:: @ 85A756A + .incbin "baserom.gba", 0x5a756a, 0xa + +gUnknown_085A7574:: @ 85A7574 + .incbin "baserom.gba", 0x5a7574, 0x4c + +gUnknown_085A75C0:: @ 85A75C0 + .incbin "baserom.gba", 0x5a75c0, 0x4 + +gUnknown_085A75C4:: @ 85A75C4 + .incbin "baserom.gba", 0x5a75c4, 0x8 + +gUnknown_085A75CC:: @ 85A75CC + .incbin "baserom.gba", 0x5a75cc, 0x8 + +gUnknown_085A75D4:: @ 85A75D4 + .incbin "baserom.gba", 0x5a75d4, 0x3c + +gUnknown_085A7610:: @ 85A7610 + .incbin "baserom.gba", 0x5a7610, 0x4 + +gUnknown_085A7614:: @ 85A7614 + .incbin "baserom.gba", 0x5a7614, 0x2 + +gUnknown_085A7616:: @ 85A7616 + .incbin "baserom.gba", 0x5a7616, 0x8 + +gUnknown_085A761E:: @ 85A761E + .incbin "baserom.gba", 0x5a761e, 0x8 + +gUnknown_085A7626:: @ 85A7626 + .incbin "baserom.gba", 0x5a7626, 0x8 + +gUnknown_085A762E:: @ 85A762E + .incbin "baserom.gba", 0x5a762e, 0x10 + +gUnknown_085A763E:: @ 85A763E + .incbin "baserom.gba", 0x5a763e, 0x10 + +gUnknown_085A764E:: @ 85A764E + .incbin "baserom.gba", 0x5a764e, 0x10 + +gUnknown_085A765E:: @ 85A765E + .incbin "baserom.gba", 0x5a765e, 0x10 + +gUnknown_085A766E:: @ 85A766E + .incbin "baserom.gba", 0x5a766e, 0x3f + +gUnknown_085A76AD:: @ 85A76AD + .incbin "baserom.gba", 0x5a76ad, 0x7 + +gUnknown_085A76B4:: @ 85A76B4 + .incbin "baserom.gba", 0x5a76b4, 0xc + +gUnknown_085A76C0:: @ 85A76C0 + .incbin "baserom.gba", 0x5a76c0, 0x12 + +gUnknown_085A76D2:: @ 85A76D2 + .incbin "baserom.gba", 0x5a76d2, 0x12 + +gUnknown_085A76E4:: @ 85A76E4 + .incbin "baserom.gba", 0x5a76e4, 0x1e + +gUnknown_085A7702:: @ 85A7702 + .incbin "baserom.gba", 0x5a7702, 0x66 + +gUnknown_085A7768:: @ 85A7768 + .incbin "baserom.gba", 0x5a7768, 0x66 + +gUnknown_085A77CE:: @ 85A77CE + .incbin "baserom.gba", 0x5a77ce, 0xa + +gUnknown_085A77D8:: @ 85A77D8 + .incbin "baserom.gba", 0x5a77d8, 0x14 + +gUnknown_085A77EC:: @ 85A77EC + .incbin "baserom.gba", 0x5a77ec, 0xa + +gUnknown_085A77F6:: @ 85A77F6 + .incbin "baserom.gba", 0x5a77f6, 0x8 + +gUnknown_085A77FE:: @ 85A77FE + .incbin "baserom.gba", 0x5a77fe, 0x6 + +gUnknown_085A7804:: @ 85A7804 + .incbin "baserom.gba", 0x5a7804, 0xa + +gUnknown_085A780E:: @ 85A780E + .incbin "baserom.gba", 0x5a780e, 0x8 + +gUnknown_085A7816:: @ 85A7816 + .incbin "baserom.gba", 0x5a7816, 0x12 + +gUnknown_085A7828:: @ 85A7828 + .incbin "baserom.gba", 0x5a7828, 0x12 + +gUnknown_085A783A:: @ 85A783A + .incbin "baserom.gba", 0x5a783a, 0x8e + +gUnknown_085A78C8:: @ 85A78C8 + .incbin "baserom.gba", 0x5a78c8, 0x13c + +gUnknown_085A7A04:: @ 85A7A04 + .incbin "baserom.gba", 0x5a7a04, 0x1c + +gUnknown_085A7A20:: @ 85A7A20 + .incbin "baserom.gba", 0x5a7a20, 0x2c0 + +gUnknown_085A7CE0:: @ 85A7CE0 + .incbin "baserom.gba", 0x5a7ce0, 0x18 + +gUnknown_085A7CF8:: @ 85A7CF8 + .incbin "baserom.gba", 0x5a7cf8, 0x18 + +gUnknown_085A7D10:: @ 85A7D10 + .incbin "baserom.gba", 0x5a7d10, 0x18 + +gUnknown_085A7D28:: @ 85A7D28 + .incbin "baserom.gba", 0x5a7d28, 0x18 + +gUnknown_085A7D40:: @ 85A7D40 + .incbin "baserom.gba", 0x5a7d40, 0x18 + +gUnknown_085A7D58:: @ 85A7D58 + .incbin "baserom.gba", 0x5a7d58, 0x18 + +gUnknown_085A7D70:: @ 85A7D70 + .incbin "baserom.gba", 0x5a7d70, 0x18 + +gUnknown_085A7D88:: @ 85A7D88 + .incbin "baserom.gba", 0x5a7d88, 0x18 + +gUnknown_085A7DA0:: @ 85A7DA0 + .incbin "baserom.gba", 0x5a7da0, 0x18 + +gUnknown_085A7DB8:: @ 85A7DB8 + .incbin "baserom.gba", 0x5a7db8, 0x18 + +gUnknown_085A7DD0:: @ 85A7DD0 + .incbin "baserom.gba", 0x5a7dd0, 0x18 + +gUnknown_085A7DE8:: @ 85A7DE8 + .incbin "baserom.gba", 0x5a7de8, 0x18 + +gUnknown_085A7E00:: @ 85A7E00 + .incbin "baserom.gba", 0x5a7e00, 0x18 + +gUnknown_085A7E18:: @ 85A7E18 + .incbin "baserom.gba", 0x5a7e18, 0x18 + +gUnknown_085A7E30:: @ 85A7E30 + .incbin "baserom.gba", 0x5a7e30, 0x168 + +gUnknown_085A7F98:: @ 85A7F98 + .incbin "baserom.gba", 0x5a7f98, 0x28 + +gUnknown_085A7FC0:: @ 85A7FC0 + .incbin "baserom.gba", 0x5a7fc0, 0x20 + +gUnknown_085A7FE0:: @ 85A7FE0 + .incbin "baserom.gba", 0x5a7fe0, 0x14 + +gUnknown_085A7FF4:: @ 85A7FF4 + .incbin "baserom.gba", 0x5a7ff4, 0x1c + +gUnknown_085A8010:: @ 85A8010 + .incbin "baserom.gba", 0x5a8010, 0x18 + +gUnknown_085A8028:: @ 85A8028 + .incbin "baserom.gba", 0x5a8028, 0x14 + +gUnknown_085A803C:: @ 85A803C + .incbin "baserom.gba", 0x5a803c, 0x228 + +gUnknown_085A8264:: @ 85A8264 + .incbin "baserom.gba", 0x5a8264, 0x68 + +gUnknown_085A82CC:: @ 85A82CC + .incbin "baserom.gba", 0x5a82cc, 0x68 + +gUnknown_085A8334:: @ 85A8334 + .incbin "baserom.gba", 0x5a8334, 0xb0 + +gUnknown_085A83E4:: @ 85A83E4 + .incbin "baserom.gba", 0x5a83e4, 0x24 + +gUnknown_085A8408:: @ 85A8408 + .incbin "baserom.gba", 0x5a8408, 0x14 + +gUnknown_085A841C:: @ 85A841C + .incbin "baserom.gba", 0x5a841c, 0x14 + +gUnknown_085A8430:: @ 85A8430 + .incbin "baserom.gba", 0x5a8430, 0x5 + +gUnknown_085A8435:: @ 85A8435 + .incbin "baserom.gba", 0x5a8435, 0x6 + +gUnknown_085A843B:: @ 85A843B + .incbin "baserom.gba", 0x5a843b, 0x65 + +gUnknown_085A84A0:: @ 85A84A0 + .incbin "baserom.gba", 0x5a84a0, 0xc + +gUnknown_085A84AC:: @ 85A84AC + .incbin "baserom.gba", 0x5a84ac, 0x64 + +gUnknown_085A8510:: @ 85A8510 + .incbin "baserom.gba", 0x5a8510, 0x10 + +gUnknown_085A8520:: @ 85A8520 + .incbin "baserom.gba", 0x5a8520, 0x4 + +gUnknown_085A8524:: @ 85A8524 + .incbin "baserom.gba", 0x5a8524, 0x20 + +gUnknown_085A8544:: @ 85A8544 + .incbin "baserom.gba", 0x5a8544, 0x48 + +gUnknown_085A858C:: @ 85A858C + .incbin "baserom.gba", 0x5a858c, 0x1154 + +gUnknown_085A96E0:: @ 85A96E0 + .incbin "baserom.gba", 0x5a96e0, 0x1b8 + +gUnknown_085A9898:: @ 85A9898 + .incbin "baserom.gba", 0x5a9898, 0x4 diff --git a/data/truck_scene_porthole.s b/data/truck_scene_porthole.s new file mode 100644 index 000000000..c89babcc9 --- /dev/null +++ b/data/truck_scene_porthole.s @@ -0,0 +1,13 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 +gUnknown_0858E898:: @ 858E898 + .incbin "baserom.gba", 0x58e898, 0x13 + +gUnknown_0858E8AB:: @ 858E8AB + .incbin "baserom.gba", 0x58e8ab, 0x2 + +gUnknown_0858E8AD:: @ 858E8AD + .incbin "baserom.gba", 0x58e8ad, 0x3 diff --git a/ld_script.txt b/ld_script.txt index b2e996ff5..4e90c8cbe 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -347,7 +347,23 @@ SECTIONS { src/berry.o(.rodata); data/data3_a1.o(.rodata); src/pokemon_size_record.o(.rodata) - data/data3b.o(.rodata); + data/field_effect.o(.rodata); + data/truck_scene_porthole.o(.rodata); + data/rotating_gate.o(.rodata); + data/item_use.o(.rodata); + data/battle_anim_80FE840.o(.rodata); + data/bike.o(.rodata); + data/easy_chat.o(.rodata); + data/mon_markings.o(.rodata); + data/mauville_old_man.o(.rodata); + data/mail.o(.rodata); + data/menu_helpers.o(.rodata); + data/heal_location.o(.rodata); + data/region_map.o(.rodata); + data/cute_sketch.o(.rodata); + data/decoration.o(.rodata); + data/slot_machine.o(.rodata); + data/contest_painting.o(.rodata); src/battle_ai.o(.rodata); data/data4.o(.rodata); data/battle_controller_link_partner.o(.rodata); From 5fbfc57304495228703966379abb33629b888359 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 25 Sep 2017 14:18:54 -0400 Subject: [PATCH 285/342] Disassemble some pointers in data3_a1.s --- data/data3_a1.s | 418 ++++++++- data/event_scripts.s | 267 +++++- data/strings.s | 1970 ++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 2575 insertions(+), 80 deletions(-) diff --git a/data/data3_a1.s b/data/data3_a1.s index 20eb6d6a6..7516c34ff 100644 --- a/data/data3_a1.s +++ b/data/data3_a1.s @@ -6,13 +6,425 @@ .section .rodata gUnknown_0858AB24:: @ 858AB24 - .incbin "baserom.gba", 0x58ab24, 0xac +@ replacing .incbin "baserom.gba", 0x0058ab24, 0xac + .2byte 50, 20 + .2byte 50, 20 + .2byte 50, 20 + .2byte 50, 20 + .2byte 50, 20 + .2byte 50, 30 + .2byte 50, 30 + .2byte 50, 30 + .2byte 50, 30 + .2byte 50, 30 + .2byte 60, 50 + .2byte 60, 50 + .2byte 60, 50 + .2byte 60, 50 + .2byte 60, 50 + .2byte 80, 70 + .2byte 80, 70 + .2byte 80, 70 + .2byte 80, 70 + .2byte 80, 70 + .2byte 100, 100 + .2byte 100, 100 + .2byte 100, 100 + .2byte 100, 100 + .2byte 100, 100 + .2byte 130, 150 + .2byte 130, 150 + .2byte 130, 150 + .2byte 130, 150 + .2byte 130, 150 + .2byte 160, 250 + .2byte 160, 250 + .2byte 160, 250 + .2byte 160, 250 + .2byte 160, 250 + .2byte 180, 500 + .2byte 180, 500 + .2byte 180, 500 + .2byte 180, 500 + .2byte 180, 500 + .2byte 200, 750 + .2byte 200, 750 + .2byte 150, 200 gBlankBerryTree:: @ 858ABD0 .4byte 0x0, 0x0 - + gUnknown_0858ABD8:: @ 858ABD8 - .incbin "baserom.gba", 0x58abd8, 0xb88 +@ replacing .incbin "baserom.gba", 0x0058abd8, 0xb88 + .4byte gUnknown_085ead37, 0 + .4byte gUnknown_085ead41, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085ead67, 0 + .4byte gUnknown_085ead6d, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085ead72, 0 + .4byte gUnknown_085ead84, 0 + .4byte gUnknown_085ead96, 0 + .4byte gText_Cancel2, 0 + .4byte gUnknown_085EADA4, 0 + .4byte gUnknown_085EADB5, 0 + .4byte gUnknown_085EADC4, 0 + .4byte gUnknown_085EADD5, 0 + .4byte gUnknown_085EADE7, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eadf9, 0 + .4byte gUnknown_085eae04, 0 + .4byte gUnknown_085eae12, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eadf9, 0 + .4byte gUnknown_085eae04, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085e8ccb, 0 + .4byte gUnknown_085eae12, 0 + .4byte gUnknown_085eae1b, 0 + .4byte gText_Cancel2, 0 + .4byte gUnknown_085eae27, 0 + .4byte gUnknown_085eae2c, 0 + .4byte gUnknown_085eae31, 0 + .4byte gUnknown_085eae35, 0 + .4byte gUnknown_085eae39, 0 + .4byte gUnknown_085eae3d, 0 + .4byte gUnknown_085eae41, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085ead5f, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eae53, 0 + .4byte gUnknown_085eae5a, 0 + .4byte gText_Yes, 0 + .4byte gText_No, 0 + .4byte gUnknown_085ead6d, 0 + .4byte gUnknown_085eaea2, 0 + .4byte gUnknown_085eaeac, 0 + .4byte gText_Exit, 0 + .4byte gText_Lv50, 0 + .4byte gText_OpenLevel, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_0027ecbc, 0 + .4byte gUnknown_0027ecc3, 0 + .4byte gUnknown_0027eccd, 0 + .4byte gUnknown_0027ecd5, 0 + .4byte gUnknown_0027ecdd, 0 + .4byte gUnknown_0027ece3, 0 + .4byte gUnknown_0027eceb, 0 + .4byte gUnknown_0027ecf2, 0 + .4byte gUnknown_0027ecf8, 0 + .4byte gUnknown_0027ed00, 0 + .4byte gUnknown_0027ed06, 0 + .4byte gUnknown_0027ed10, 0 + .4byte gUnknown_0027ed18, 0 + .4byte gUnknown_0027ed22, 0 + .4byte gUnknown_0027ed2c, 0 + .4byte gUnknown_0027ed36, 0 + .4byte gUnknown_0027ed40, 0 + .4byte gUnknown_0027ed46, 0 + .4byte gUnknown_0027ed4f, 0 + .4byte gUnknown_0027ed59, 0 + .4byte gUnknown_0027ed65, 0 + .4byte gUnknown_0027ed70, 0 + .4byte gUnknown_0027ed74, 0 + .4byte gUnknown_0027ed78, 0 + .4byte gUnknown_0027ed80, 0 + .4byte gUnknown_0027ed95, 0 + .4byte gUnknown_0027edaa, 0 + .4byte gUnknown_0027edb5, 0 + .4byte gUnknown_0027edba, 0 + .4byte gUnknown_0027edc1, 0 + .4byte gUnknown_0027edc9, 0 + .4byte gUnknown_0027edd5, 0 + .4byte gUnknown_0027ede4, 0 + .4byte gUnknown_0027edf0, 0 + .4byte gUnknown_0027edf5, 0 + .4byte gUnknown_0027edf7, 0 + .4byte gUnknown_0027edf9, 0 + .4byte gUnknown_0027edfb, 0 + .4byte gUnknown_0027edfd, 0 + .4byte gUnknown_0027edff, 0 + .4byte gUnknown_0027ee01, 0 + .4byte gUnknown_0027ee03, 0 + .4byte gUnknown_0027ee05, 0 + .4byte gUnknown_0027ee07, 0 + .4byte gUnknown_0027ee09, 0 + .4byte gUnknown_085eaec3, 0 + .4byte gUnknown_085eaed6, 0 + .4byte gUnknown_085eaee6, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eaef6, 0 + .4byte gUnknown_085eaf02, 0 + .4byte gUnknown_085eaf0e, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eaf1b, 0 + .4byte gUnknown_085eaf24, 0 + .4byte gUnknown_085eaf2f, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eaf34, 0 + .4byte gUnknown_085eaf3e, 0 + .4byte gUnknown_085eaf4b, 0 + .4byte gUnknown_085eaf58, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eaf65, 0 + .4byte gUnknown_085eaf70, 0 + .4byte gUnknown_085eaf7d, 0 + .4byte gUnknown_085eaf87, 0 + .4byte gUnknown_085eaf93, 0 + .4byte gUnknown_085eaf9f, 0 + .4byte gUnknown_085eafab, 0 + .4byte gText_Cancel2, 0 + .4byte gUnknown_085eafb6, 0 + .4byte gUnknown_085eafcf, 0 + .4byte gUnknown_085eafe8, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb089, 0 + .4byte gUnknown_085eb09c, 0 + .4byte gUnknown_085eb0af, 0 + .4byte gUnknown_085eb0c2, 0 + .4byte gUnknown_085eb0d5, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb002, 0 + .4byte gUnknown_085eb017, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb02a, 0 + .4byte gUnknown_085eb034, 0 + .4byte gUnknown_085eb79b, 0 + .4byte gUnknown_085eb06e, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb7a9, 0 + .4byte gUnknown_085eb79b, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb07e, 0 + .4byte gUnknown_085eb084, 0 + .4byte gUnknown_085eb79b, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb676, 0 + .4byte gUnknown_085eb673, 0 + .4byte gUnknown_085eb670, 0 + .4byte gUnknown_085eb66d, 0 + .4byte gUnknown_085eb66a, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb040, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb04a, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085eb04a, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb057, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085eb057, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb04a, 0 + .4byte gUnknown_085eb057, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085eb04a, 0 + .4byte gUnknown_085eb057, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb04a, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085eb04a, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb057, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085eb057, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb04a, 0 + .4byte gUnknown_085eb057, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085eb04a, 0 + .4byte gUnknown_085eb057, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb1a0, 0 + .4byte gUnknown_085eb1a9, 0 + .4byte gUnknown_085eb1b6, 0 + .4byte gUnknown_085eb5bc, 0 + .4byte gUnknown_085eb5c3, 0 + .4byte gUnknown_085eb5c8, 0 + .4byte gUnknown_085eb1a0, 0 + .4byte gUnknown_085eb1a9, 0 + .4byte gUnknown_085eb1b6, 0 + .4byte gUnknown_085eb5c3, 0 + .4byte gUnknown_085eb5c8, 0 + .4byte gUnknown_085eb29a, 0 + .4byte gUnknown_085eb2a3, 0 + .4byte gUnknown_085eb372, 0 + .4byte gUnknown_085eb37f, 0 + .4byte gUnknown_085eb389, 0 + .4byte gText_Exit, 0 + .4byte gText_Yes, 0 + .4byte gText_No, 0 + .4byte gUnknown_085ead6d, 0 + .4byte gUnknown_085eae6e, 0 + .4byte gUnknown_085eae7c, 0 + .4byte gUnknown_085eae8a, 0 + .4byte gUnknown_085ead6d, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb372, 0 + .4byte gUnknown_085eb37f, 0 + .4byte gUnknown_085eb397, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb372, 0 + .4byte gUnknown_085eb37f, 0 + .4byte gUnknown_085eb389, 0 + .4byte gUnknown_085eb397, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb372, 0 + .4byte gUnknown_085eb37f, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb3a4, 0 + .4byte gUnknown_085eb3b1, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb3d4, 0 + .4byte gUnknown_085eb3c6, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb1c5, 0 + .4byte gUnknown_085eb1d1, 0 + .4byte gUnknown_085eb1dc, 0 + .4byte gUnknown_085eb1e7, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb212, 0 + .4byte gUnknown_085eb21d, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb227, 0 + .4byte gUnknown_085eb234, 0 + .4byte gUnknown_085eb241, 0 + .4byte gText_Cancel2, 0 + .4byte gUnknown_085eb24e, 0 + .4byte gUnknown_085eb255, 0 + .4byte gText_Exit, 0 + .4byte gText_MenuOptionPokedex, 0 + .4byte gText_MenuOptionPokemon, 0 + .4byte gText_MenuOptionBag, 0 + .4byte gText_MenuOptionPokenav, 0 + .4byte gUnknown_085eb278, 0 + .4byte gText_MenuOptionSave, 0 + .4byte gText_MenuOptionOption, 0 + .4byte gText_MenuOptionExit, 0 + .4byte gUnknown_085eb28a, 0 + .4byte gUnknown_085eb290, 0 + .4byte gUnknown_085eb295, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb2ad, 0 + .4byte gUnknown_085eb2bd, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb2ad, 0 + .4byte gUnknown_085eb2ca, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb2bd, 0 + .4byte gUnknown_085eb2ca, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb2ad, 0 + .4byte gUnknown_085eb2bd, 0 + .4byte gUnknown_085eb2ca, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb2e4, 0 + .4byte gUnknown_085eb2f0, 0 + .4byte gText_Exit, 0 + .4byte gText_Yes, 0 + .4byte gUnknown_085eb2fc, 0 + .4byte gUnknown_085eb3df, 0 + .4byte gUnknown_085eb3ea, 0 + .4byte gUnknown_085eb3f1, 0 + .4byte gUnknown_085eb3fc, 0 + .4byte gUnknown_085eb40a, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb415, 0 + .4byte gUnknown_085eb41d, 0 + .4byte gUnknown_085eb424, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb45c, 0 + .4byte gUnknown_085eb469, 0 + .4byte gUnknown_085eb475, 0 + .4byte gUnknown_085eb482, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb42f, 0 + .4byte gUnknown_085eb43a, 0 + .4byte gUnknown_085eb444, 0 + .4byte gUnknown_085eb451, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb48e, 0 + .4byte gUnknown_085eb496, 0 + .4byte gUnknown_085eb4a3, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb4ad, 0 + .4byte gUnknown_085eb4b9, 0 + .4byte gUnknown_085eb4c7, 0 + .4byte gUnknown_085eb4d4, 0 + .4byte gUnknown_085eb4e0, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb4eb, 0 + .4byte gUnknown_085eb4f9, 0 + .4byte gUnknown_085eb508, 0 + .4byte gUnknown_085eb516, 0 + .4byte gUnknown_085eb523, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb532, 0 + .4byte gUnknown_085eb543, 0 + .4byte gUnknown_085eb555, 0 + .4byte gUnknown_085eb563, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb56e, 0 + .4byte gUnknown_085eb57e, 0 + .4byte gUnknown_085eb589, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb5b6, 0 + .4byte gUnknown_085eb5bc, 0 + .4byte gUnknown_085eb5c3, 0 + .4byte gUnknown_085eb5c8, 0 + .4byte gUnknown_085eb5b6, 0 + .4byte gUnknown_085eb5c3, 0 + .4byte gUnknown_085eb5c8, 0 + .4byte gUnknown_085eb5b6, 0 + .4byte gUnknown_085eb5bc, 0 + .4byte gUnknown_085eb5c8, 0 + .4byte gUnknown_085eb5b6, 0 + .4byte gUnknown_085eb5c8, 0 + .4byte gUnknown_085ee14b, 0 + .4byte gUnknown_085ee14f, 0 + .4byte gUnknown_085eb2ff, 0 + .4byte gUnknown_085eb310, 0 + .4byte gUnknown_085eb317, 0 + .4byte gUnknown_085eb31f, 0 + .4byte gUnknown_085eb7b8, 0 + .4byte gUnknown_085eb7c7, 0 + .4byte gUnknown_085eb7d0, 0 + .4byte gUnknown_085eb7db, 0 + .4byte gUnknown_085eb4ad, 0 + .4byte gUnknown_085eb4b9, 0 + .4byte gUnknown_085eb4c7, 0 + .4byte gUnknown_085eb4d4, 0 + .4byte gUnknown_085eb597, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb5a6, 0 + .4byte gUnknown_085eb45c, 0 + .4byte gUnknown_085eb469, 0 + .4byte gUnknown_085eb475, 0 + .4byte gUnknown_085eb482, 0 + .4byte gText_Exit, 0 + .4byte gUnknown_085eb32d, 0 + .4byte gUnknown_085eb33e, 0 + .4byte gUnknown_085eb350, 0 + .4byte gUnknown_085eb361, 0 + .4byte gText_Exit, 0 + .4byte gText_Exit, 0 gUnknown_0858B760:: @ 858B760 .incbin "baserom.gba", 0x58b760, 0x390 diff --git a/data/event_scripts.s b/data/event_scripts.s index 3303bedae..30e2aa335 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -183,110 +183,216 @@ gUnknown_08272604:: @ 8272604 gUnknown_0827266F:: @ 827266F .string "Which PC should be accessed?$" + +gUnknown_0827268c:: @ 827268C .string "Accessed SOMEONE’S PC.$" + +gUnknown_082726a3:: @ 82726A3 .string "POKéMON Storage System opened.$" + +gUnknown_082726c2:: @ 82726C2 .string "Accessed {PLAYER}’s PC.$" + +gUnknown_082726d4:: @ 82726D4 .string "Accessed LANETTE’s PC.$" + +gUnknown_082726eb:: @ 82726EB .string "Hello, and welcome to\nthe POKéMON CENTER.\pWe restore your tired POKéMON\nto full health.\pWould you like to rest your POKéMON?$" + +gUnknown_08272768:: @ 8272768 .string "Okay, I’ll take your POKéMON\nfor a few seconds.$" + +gUnknown_08272798:: @ 8272798 .string "Thank you for waiting.\pWe’ve restored your POKéMON\nto full health.$" + +gUnknown_082727db:: @ 82727DB .string "We hope to see you again!$" + +gUnknown_082727f5:: @ 82727F5 .string "Hello, and welcome to\nthe POKéMON CENTER.\pWe restore your tired POKéMON\nto full health.\pWould you like to…$" + +gUnknown_08272860:: @ 8272860 .string "Th-that card…\nCould it be… The GOLD CARD?!\pOh, the gold color is brilliant!\nThe four stars seem to sparkle!\pI’ve seen several TRAINERS with\na SILVER CARD before, but, {PLAYER},\lyou’re the first TRAINER I’ve ever\lseen with a GOLD CARD!\pOkay, {PLAYER}, please allow me\nthe honor of resting your POKéMON!$" + +gUnknown_08272982:: @ 8272982 .string "I’m delighted to see you, {PLAYER}!\nYou want the usual, am I right?$" + +gUnknown_082729c0:: @ 82729C0 .string "Okay, I’ll take your POKéMON\nfor a few seconds.$" + +gUnknown_082729f0:: @ 82729F0 .string "Thank you for waiting.$" + +gUnknown_08272a07:: @ 8272A07 .string "We hope to see you again!$" + +gUnknown_08272a21:: @ 8272A21 .string "Welcome!\pHow may I serve you?$" + +gUnknown_08272a3f:: @ 8272A3F .string "Please come again!$" + +gUnknown_08272a52:: @ 8272A52 .string "{PLAYER}{STRING 5}, welcome!\pWhat can I do for you?$" + +gUnknown_08272a78:: @ 8272A78 .string "Obtained the {STR_VAR_2}!$" + +gUnknown_08272a89:: @ 8272A89 .string "The BAG is full…$" + +gUnknown_08272a9a:: @ 8272A9A .string "{PLAYER} put away the {STR_VAR_2}\nin the {STR_VAR_3} POCKET.$" + +gUnknown_08272abf:: @ 8272ABF .string "{PLAYER} found one {STR_VAR_2}!$" + +gUnknown_08272ad0:: @ 8272AD0 .string "Too bad!\nThe BAG is full…$" + +gUnknown_08272aea:: @ 8272AEA .string "{PLAYER} put away the {STR_VAR_2}\nin the BAG.$" + +gUnknown_08272b09:: @ 8272B09 .string "Obtained the {STR_VAR_2}!$" + +gUnknown_08272b1a:: @ 8272B1A .string "Too bad! There’s no room left for\nanother {STR_VAR_2}…$" + +gUnknown_08272b48:: @ 8272B48 .string "The {STR_VAR_2} was transferred\nto the PC.$" + +gUnknown_08272b6a:: @ 8272B6A .string "“Selected items for your convenience!â€\nPOKéMON MART$" + +gUnknown_08272b9e:: @ 8272B9E .string "“Rejuvenate your tired partners!â€\nPOKéMON CENTER$" + +gUnknown_08272bcf:: @ 8272BCF .string "{STR_VAR_1} might like this program.\n… … … … … … … … … … … … … … … …\pBetter get going!$" + +gUnknown_08272c1d:: @ 8272C1D .string "Welcome to LILYCOVE DEPARTMENT STORE.\pWhich floor would you like?$" + +gUnknown_08272c5f:: @ 8272C5F .string "The sandstorm is vicious.\nIt’s impossible to keep going.$" + +gUnknown_08272c98:: @ 8272C98 .string "An item in the BAG can be\nregistered to SELECT for easy use.$" + +gUnknown_08272cd5:: @ 8272CD5 .string "There’s an e-mail from POKéMON TRAINER\nSCHOOL.\p… … … … … …\pA POKéMON may learn up to four moves.\pA TRAINER’s expertise is tested on the\nmove sets chosen for POKéMON.\p… … … … … …$" + +gUnknown_08272d87:: @ 8272D87 .string "{PLAYER} booted up the PC.$" + +gUnknown_08272d9c:: @ 8272D9C .string "The link was canceled.$" + +gUnknown_08272db3:: @ 8272DB3 .string "Want to give a nickname to\nthe {STR_VAR_2} you received?$" + +gUnknown_08272de3:: @ 8272DE3 .string "{PLAYER} is out of usable\nPOKéMON!\p{PLAYER} whited out!$" + +gUnknown_08272e0f:: @ 8272E0F .string "Registered {STR_VAR_1} {STR_VAR_2}\nin the POKéNAV.$" + +gUnknown_08272e30:: @ 8272E30 .string "Do you know the TM SECRET POWER?\pOur group, we love the TM SECRET\nPOWER.\pOne of our members will give it to you.\nCome back and show me if you get it.\pWe’ll accept you as a member and sell\nyou good stuff in secrecy.$" + +gUnknown_08272f07:: @ 8272F07 .string "Your POKéMON may be infected with\nPOKéRUS.\pLittle is known about the POKéRUS\nexcept that they are microscopic life-\lforms that attach to POKéMON.\pWhile infected, POKéMON are said to\ngrow exceptionally well.$" + +gUnknown_08272fd6:: @ 8272FD6 .string "The water is dyed a deep blue…\nWould you like to SURF?$" + +gUnknown_0827300d:: @ 827300D .string "{STR_VAR_1} used SURF!$" + +gUnknown_0827301b:: @ 827301B .string "It sounded as if a door opened\nsomewhere far away.$" + +gUnknown_0827304e:: @ 827304E .string "There is a big hole in the wall.$" + +gUnknown_0827306f:: @ 827306F .string "I’m terribly sorry.\nThe POKéMON WIRELESS CLUB is\lundergoing adjustments now.$" + +gUnknown_082730bc:: @ 82730BC .string "It appears to be undergoing\nadjustments…$" + +gUnknown_082730e5:: @ 82730E5 .string "I’m terribly sorry. The TRADE CENTER\nis undergoing inspections.$" + +gUnknown_08273125:: @ 8273125 .string "I’m terribly sorry. The RECORD CORNER\nis under preparation.$" + +gUnknown_08273161:: @ 8273161 .string "{PLAYER} handed over the\n{STR_VAR_1}.$" + +gUnknown_08273178:: @ 8273178 .string "Thank you for accessing the\nMYSTERY GIFT System.$" + +gUnknown_082731a9:: @ 82731A9 .string "{PLAYER} found one {STR_VAR_1}\n{STR_VAR_2}!$" + +gUnknown_082731bd:: @ 82731BD .string "The weird tree doesn’t like the\nWAILMER PAIL!\pThe weird tree attacked!$" + +gUnknown_08273204:: @ 8273204 .string "The {STR_VAR_1} flew away!$" gText_PkmnTransferredSomeonesPC:: @ 8273216 @@ -301,28 +407,52 @@ gText_PkmnBoxSomeonesPCFull:: @ 8273296 gText_PkmnBoxLanettesPCFull:: @ 82732D9 .string "BOX “{STR_VAR_3}†on\nLANETTE’S PC was full.\p{STR_VAR_2} was transferred to\nBOX “{STR_VAR_1}.â€$" + +gUnknown_0827331c:: @ 827331C .string "There’s no more room for POKéMON!\pThe POKéMON BOXES are full and\ncan’t accept any more!$" + +gUnknown_08273374:: @ 8273374 .string "Do you want to give a nickname to\nthis {STR_VAR_1}?$" + +gUnknown_0827339f:: @ 827339F .string "There is a questionnaire.\nWould you like to fill it out?$" + +gUnknown_082733d8:: @ 82733D8 .string "Thank you for taking the time to\nfill out our questionnaire.\pYour feedback will be used for\nfuture reference.$" + +gUnknown_08273446:: @ 8273446 .string "Oh, hello!\nYou know those words?\pThat means you must know about\nthe MYSTERY GIFT.\pFrom now on, you should be\nreceiving MYSTERY GIFTS!$" + +gUnknown_082734cc:: @ 82734CC .string "Once you save your game, you can\naccess the MYSTERY GIFT.$" + +gUnknown_08273506:: @ 8273506 .string "Oh, hello!\nYou know those words?\pThat means you must know about\nthe MYSTERY EVENT.$" + +gUnknown_08273559:: @ 8273559 .string "Once you save your game, you can\naccess the MYSTERY EVENT.$" + +gUnknown_08273594:: @ 8273594 .string "Thank you for using the MYSTERY\nEVENT System.\pYou must be {PLAYER}.\nThere is a ticket here for you.$" + +gUnknown_082735f2:: @ 82735F2 .string "It appears to be for use at\nthe LILYCOVE CITY port.\pWhy not give it a try and see what\nit is about?$" + +gUnknown_08273656:: @ 8273656 .string "The massive downpour appears to\nhave stopped…$" + +gUnknown_08273684:: @ 8273684 .string "The intense sunshine appears to\nhave subsided…$" gUnknown_082736B3:: @ 82736B3 @@ -554,7 +684,142 @@ gUnknown_0827E8DA:: @ 827E8DA .incbin "baserom.gba", 0x27e8da, 0x132 gUnknown_0827EA0C:: @ 827EA0C - .incbin "baserom.gba", 0x27ea0c, 0x3ff + .incbin "baserom.gba", 0x27ea0c, 0x2b0 + +gUnknown_0027ecbc:: @ 27ECBC + .incbin "baserom.gba", 0x27ecbc, 0x7 + +gUnknown_0027ecc3:: @ 27ECC3 + .incbin "baserom.gba", 0x27ecc3, 0xa + +gUnknown_0027eccd:: @ 27ECCD + .incbin "baserom.gba", 0x27eccd, 0x8 + +gUnknown_0027ecd5:: @ 27ECD5 + .incbin "baserom.gba", 0x27ecd5, 0x8 + +gUnknown_0027ecdd:: @ 27ECDD + .incbin "baserom.gba", 0x27ecdd, 0x6 + +gUnknown_0027ece3:: @ 27ECE3 + .incbin "baserom.gba", 0x27ece3, 0x8 + +gUnknown_0027eceb:: @ 27ECEB + .incbin "baserom.gba", 0x27eceb, 0x7 + +gUnknown_0027ecf2:: @ 27ECF2 + .incbin "baserom.gba", 0x27ecf2, 0x6 + +gUnknown_0027ecf8:: @ 27ECF8 + .incbin "baserom.gba", 0x27ecf8, 0x8 + +gUnknown_0027ed00:: @ 27ED00 + .incbin "baserom.gba", 0x27ed00, 0x6 + +gUnknown_0027ed06:: @ 27ED06 + .incbin "baserom.gba", 0x27ed06, 0xa + +gUnknown_0027ed10:: @ 27ED10 + .incbin "baserom.gba", 0x27ed10, 0x8 + +gUnknown_0027ed18:: @ 27ED18 + .incbin "baserom.gba", 0x27ed18, 0xa + +gUnknown_0027ed22:: @ 27ED22 + .incbin "baserom.gba", 0x27ed22, 0xa + +gUnknown_0027ed2c:: @ 27ED2C + .incbin "baserom.gba", 0x27ed2c, 0xa + +gUnknown_0027ed36:: @ 27ED36 + .incbin "baserom.gba", 0x27ed36, 0xa + +gUnknown_0027ed40:: @ 27ED40 + .incbin "baserom.gba", 0x27ed40, 0x6 + +gUnknown_0027ed46:: @ 27ED46 + .incbin "baserom.gba", 0x27ed46, 0x9 + +gUnknown_0027ed4f:: @ 27ED4F + .incbin "baserom.gba", 0x27ed4f, 0xa + +gUnknown_0027ed59:: @ 27ED59 + .incbin "baserom.gba", 0x27ed59, 0xc + +gUnknown_0027ed65:: @ 27ED65 + .incbin "baserom.gba", 0x27ed65, 0xb + +gUnknown_0027ed70:: @ 27ED70 + .incbin "baserom.gba", 0x27ed70, 0x4 + +gUnknown_0027ed74:: @ 27ED74 + .incbin "baserom.gba", 0x27ed74, 0x4 + +gUnknown_0027ed78:: @ 27ED78 + .incbin "baserom.gba", 0x27ed78, 0x8 + +gUnknown_0027ed80:: @ 27ED80 + .incbin "baserom.gba", 0x27ed80, 0x15 + +gUnknown_0027ed95:: @ 27ED95 + .incbin "baserom.gba", 0x27ed95, 0x15 + +gUnknown_0027edaa:: @ 27EDAA + .incbin "baserom.gba", 0x27edaa, 0xb + +gUnknown_0027edb5:: @ 27EDB5 + .incbin "baserom.gba", 0x27edb5, 0x5 + +gUnknown_0027edba:: @ 27EDBA + .incbin "baserom.gba", 0x27edba, 0x7 + +gUnknown_0027edc1:: @ 27EDC1 + .incbin "baserom.gba", 0x27edc1, 0x8 + +gUnknown_0027edc9:: @ 27EDC9 + .incbin "baserom.gba", 0x27edc9, 0xc + +gUnknown_0027edd5:: @ 27EDD5 + .incbin "baserom.gba", 0x27edd5, 0xf + +gUnknown_0027ede4:: @ 27EDE4 + .incbin "baserom.gba", 0x27ede4, 0xc + +gUnknown_0027edf0:: @ 27EDF0 + .incbin "baserom.gba", 0x27edf0, 0x5 + +gUnknown_0027edf5:: @ 27EDF5 + .incbin "baserom.gba", 0x27edf5, 0x2 + +gUnknown_0027edf7:: @ 27EDF7 + .incbin "baserom.gba", 0x27edf7, 0x2 + +gUnknown_0027edf9:: @ 27EDF9 + .incbin "baserom.gba", 0x27edf9, 0x2 + +gUnknown_0027edfb:: @ 27EDFB + .incbin "baserom.gba", 0x27edfb, 0x2 + +gUnknown_0027edfd:: @ 27EDFD + .incbin "baserom.gba", 0x27edfd, 0x2 + +gUnknown_0027edff:: @ 27EDFF + .incbin "baserom.gba", 0x27edff, 0x2 + +gUnknown_0027ee01:: @ 27EE01 + .incbin "baserom.gba", 0x27ee01, 0x2 + +gUnknown_0027ee03:: @ 27EE03 + .incbin "baserom.gba", 0x27ee03, 0x2 + +gUnknown_0027ee05:: @ 27EE05 + .incbin "baserom.gba", 0x27ee05, 0x2 + +gUnknown_0027ee07:: @ 27EE07 + .incbin "baserom.gba", 0x27ee07, 0x2 + +gUnknown_0027ee09:: @ 27EE09 + .incbin "baserom.gba", 0x27ee09, 0x2 gUnknown_0827EE0B:: @ 827EE0B .incbin "baserom.gba", 0x27ee0b, 0x118fa diff --git a/data/strings.s b/data/strings.s index 188516469..41cc64af8 100644 --- a/data/strings.s +++ b/data/strings.s @@ -50,6 +50,8 @@ gText_EggNickname:: @ 85E8264 gText_Pokemon:: @ 85E8268 .string "POKéMON$" + +gUnknown_085e8270:: @ 85E8270 .string "PROF. BIRCH$" gText_MainMenuNewGame:: @ 85E827C @@ -78,7 +80,11 @@ gText_MysteryGiftCantUse:: @ 85E82E5 gText_MysteryEventsCantUse:: @ 85E8328 .string "MYSTERY EVENTS can’t be used while\nthe Wireless Adapter is attached.$" + +gUnknown_085e836d:: @ 85E836D .string "Updating save file using external\ndata. Please wait.$" + +gUnknown_085e83a2:: @ 85E83A2 .string "The save file has been updated.$" gText_SaveFileCorrupted:: @ 85E83C2 @@ -92,29 +98,59 @@ gJPText_No1MSubCircuit:: @ 85E8440 gText_BatteryRunDry:: @ 85E8453 .string "The internal battery has run dry.\nThe game can be played.\pHowever, clock-based events will\nno longer occur.$" + +gUnknown_085e84bf:: @ 85E84BF .string "PLAYER$" + +gUnknown_085e84c6:: @ 85E84C6 .string "POKéDEX$" gText_MainMenuTime:: @ 85E84CE .string "TIME$" + +gUnknown_085e84d3:: @ 85E84D3 .string "BADGES$" + +gUnknown_085e84da:: @ 85E84DA .string "A Button$" + +gUnknown_085e84e3:: @ 85E84E3 .string "B Button$" + +gUnknown_085e84ec:: @ 85E84EC .string "R Button$" + +gUnknown_085e84f5:: @ 85E84F5 .string "L Button$" + +gUnknown_085e84fe:: @ 85E84FE .string "START$" + +gUnknown_085e8504:: @ 85E8504 .string "SELECT$" + +gUnknown_085e850b:: @ 85E850B .string "+ Control Pad$" + +gUnknown_085e8519:: @ 85E8519 .string "L Button R Button$" + +gUnknown_085e852c:: @ 85E852C .string "CONTROLS$" .align 2 + +gUnknown_085e8538:: @ 85E8538 .string "{UNK_CTRL_F80A}PICK {UNK_CTRL_F800}OK$" .align 2 + +gUnknown_085e8544:: @ 85E8544 .string "{UNK_CTRL_F800}NEXT$" .align 2 + +gUnknown_085e854c:: @ 85E854C .string "{UNK_CTRL_F800}NEXT {UNK_CTRL_F801}BACK$" .align 2 @@ -128,47 +164,131 @@ gText_PickCancel:: @ 85E8574 .align 2 gText_UnkCtrlF800Exit:: @ 85E8588 .string "{UNK_CTRL_F800}EXIT$" + +gUnknown_085e858f:: @ 85E858F .string "BOY$" + +gUnknown_085e8593:: @ 85E8593 .string "GIRL$" + +gUnknown_085e8598:: @ 85E8598 .string "STU$" + +gUnknown_085e859c:: @ 85E859C .string "MILTON$" + +gUnknown_085e85a3:: @ 85E85A3 .string "TOM$" + +gUnknown_085e85a7:: @ 85E85A7 .string "KENNY$" + +gUnknown_085e85ad:: @ 85E85AD .string "REID$" + +gUnknown_085e85b2:: @ 85E85B2 .string "JUDE$" + +gUnknown_085e85b7:: @ 85E85B7 .string "JAXSON$" + +gUnknown_085e85be:: @ 85E85BE .string "EASTON$" + +gUnknown_085e85c5:: @ 85E85C5 .string "WALKER$" + +gUnknown_085e85cc:: @ 85E85CC .string "TERU$" + +gUnknown_085e85d1:: @ 85E85D1 .string "JOHNNY$" + +gUnknown_085e85d8:: @ 85E85D8 .string "BRETT$" + +gUnknown_085e85de:: @ 85E85DE .string "SETH$" + +gUnknown_085e85e3:: @ 85E85E3 .string "TERRY$" + +gUnknown_085e85e9:: @ 85E85E9 .string "CASEY$" + +gUnknown_085e85ef:: @ 85E85EF .string "DARREN$" + +gUnknown_085e85f6:: @ 85E85F6 .string "LANDON$" + +gUnknown_085e85fd:: @ 85E85FD .string "COLLIN$" + +gUnknown_085e8604:: @ 85E8604 .string "STANLEY$" + +gUnknown_085e860c:: @ 85E860C .string "QUINCY$" + +gUnknown_085e8613:: @ 85E8613 .string "KIMMY$" + +gUnknown_085e8619:: @ 85E8619 .string "TIARA$" + +gUnknown_085e861f:: @ 85E861F .string "BELLA$" + +gUnknown_085e8625:: @ 85E8625 .string "JAYLA$" + +gUnknown_085e862b:: @ 85E862B .string "ALLIE$" + +gUnknown_085e8631:: @ 85E8631 .string "LIANNA$" + +gUnknown_085e8638:: @ 85E8638 .string "SARA$" + +gUnknown_085e863d:: @ 85E863D .string "MONICA$" + +gUnknown_085e8644:: @ 85E8644 .string "CAMILA$" + +gUnknown_085e864b:: @ 85E864B .string "AUBREE$" + +gUnknown_085e8652:: @ 85E8652 .string "RUTHIE$" + +gUnknown_085e8659:: @ 85E8659 .string "HAZEL$" + +gUnknown_085e865f:: @ 85E865F .string "NADINE$" + +gUnknown_085e8666:: @ 85E8666 .string "TANJA$" + +gUnknown_085e866c:: @ 85E866C .string "YASMIN$" + +gUnknown_085e8673:: @ 85E8673 .string "NICOLA$" + +gUnknown_085e867a:: @ 85E867A .string "LILLIE$" + +gUnknown_085e8681:: @ 85E8681 .string "TERRA$" + +gUnknown_085e8687:: @ 85E8687 .string "LUCY$" + +gUnknown_085e868c:: @ 85E868C .string "HALIE$" gText_ThisIsAPokemon:: @ 85E8692 @@ -182,13 +302,23 @@ gText_UnkHeight:: @ 85E86C6 gText_UnkWeight:: @ 85E86D0 .string "????.? lbs.$" + +gUnknown_085e86dc:: @ 85E86DC .string " POKéMON$" + +gUnknown_085e86fb:: @ 85E86FB .string "{CLEAR_TO 0x0C} ’ â€$" + +gUnknown_085e8709:: @ 85E8709 .string " . lbs.$" + +gUnknown_085e871a:: @ 85E871A .string "$" gText_CryOf:: @ 85E871B .string "CRY OF$" + +gUnknown_085e8722:: @ 85E8722 .string "$" gText_SizeComparedTo:: @ 85E8723 @@ -211,61 +341,161 @@ gText_SearchCompleted:: @ 85E8773 gUnknown_085E8785:: @ 85E8785 .string "No matching POKéMON were found.$" + +gUnknown_085e87a5:: @ 85E87A5 .string "Search for POKéMON based on\nselected parameters.$" + +gUnknown_085e87d6:: @ 85E87D6 .string "Switch POKéDEX listings.$" + +gUnknown_085e87ef:: @ 85E87EF .string "Return to the POKéDEX.$" + +gUnknown_085e8806:: @ 85E8806 .string "Select the POKéDEX mode.$" + +gUnknown_085e881f:: @ 85E881F .string "Select the POKéDEX listing mode.$" + +gUnknown_085e8840:: @ 85E8840 .string "List by the first letter in the name.\nSpotted POKéMON only.$" + +gUnknown_085e887c:: @ 85E887C .string "List by body color.\nSpotted POKéMON only.$" + +gUnknown_085e88a6:: @ 85E88A6 .string "List by type.\nOwned POKéMON only.$" + +gUnknown_085e88c8:: @ 85E88C8 .string "Execute search/switch.$" + +gUnknown_085e88df:: @ 85E88DF .string "HOENN DEX$" + +gUnknown_085e88e9:: @ 85E88E9 .string "NATIONAL DEX$" + +gUnknown_085e88f6:: @ 85E88F6 .string "NUMERICAL MODE$" + +gUnknown_085e8905:: @ 85E8905 .string "A TO Z MODE$" + +gUnknown_085e8911:: @ 85E8911 .string "HEAVIEST MODE$" + +gUnknown_085e891f:: @ 85E891F .string "LIGHTEST MODE$" + +gUnknown_085e892d:: @ 85E892D .string "TALLEST MODE$" + +gUnknown_085e893a:: @ 85E893A .string "SMALLEST MODE$" + +gUnknown_085e8948:: @ 85E8948 .string "ABC$" + +gUnknown_085e894c:: @ 85E894C .string "DEF$" + +gUnknown_085e8950:: @ 85E8950 .string "GHI$" + +gUnknown_085e8954:: @ 85E8954 .string "JKL$" + +gUnknown_085e8958:: @ 85E8958 .string "MNO$" + +gUnknown_085e895c:: @ 85E895C .string "PQR$" + +gUnknown_085e8960:: @ 85E8960 .string "STU$" + +gUnknown_085e8964:: @ 85E8964 .string "VWX$" + +gUnknown_085e8968:: @ 85E8968 .string "YZ$" + +gUnknown_085e896b:: @ 85E896B .string "RED$" + +gUnknown_085e896f:: @ 85E896F .string "BLUE$" + +gUnknown_085e8974:: @ 85E8974 .string "YELLOW$" + +gUnknown_085e897b:: @ 85E897B .string "GREEN$" + +gUnknown_085e8981:: @ 85E8981 .string "BLACK$" + +gUnknown_085e8987:: @ 85E8987 .string "BROWN$" + +gUnknown_085e898d:: @ 85E898D .string "PURPLE$" + +gUnknown_085e8994:: @ 85E8994 .string "GRAY$" + +gUnknown_085e8999:: @ 85E8999 .string "WHITE$" + +gUnknown_085e899f:: @ 85E899F .string "PINK$" + +gUnknown_085e89a4:: @ 85E89A4 .string "HOENN region’s POKéDEX$" + +gUnknown_085e89bb:: @ 85E89BB .string "National edition POKéDEX$" + +gUnknown_085e89d4:: @ 85E89D4 .string "POKéMON are listed according to their\nnumber.$" + +gUnknown_085e8a02:: @ 85E8A02 .string "Spotted and owned POKéMON are listed\nalphabetically.$" + +gUnknown_085e8a37:: @ 85E8A37 .string "Owned POKéMON are listed from the\nheaviest to the lightest.$" + +gUnknown_085e8a73:: @ 85E8A73 .string "Owned POKéMON are listed from the\nlightest to the heaviest.$" + +gUnknown_085e8aaf:: @ 85E8AAF .string "Owned POKéMON are listed from the\ntallest to the smallest.$" + +gUnknown_085e8aea:: @ 85E8AEA .string "Owned POKéMON are listed from the\nsmallest to the tallest.$" + +gUnknown_085e8b25:: @ 85E8B25 .string "$" + +gUnknown_085e8b26:: @ 85E8B26 .string "DON’T SPECIFY.$" + +gUnknown_085e8b35:: @ 85E8B35 .string "NONE$" gText_SelectorArrow:: @ 85E8B3A .string "â–¶$" + +gUnknown_085e8b3c:: @ 85E8B3C .string " $" gText_WelcomeToHOF:: @ 85E8B3E .string "Welcome to the HALL OF FAME!$" + +gUnknown_085e8b5b:: @ 85E8B5B .string "Spotted POKéMON: {STR_VAR_1}!\nOwned POKéMON: {STR_VAR_2}!\pPROF. BIRCH’s POKéDEX rating!\pPROF. BIRCH: Let’s see…\p$" + +gUnknown_085e8bba:: @ 85E8BBA .string "SAVING…\nDON’T TURN OFF THE POWER.$" gText_HOFCorrupted:: @ 85E8BDC @@ -282,6 +512,8 @@ gText_Number:: @ 85E8C36 gText_Level:: @ 85E8C3B .string "Lv. $" + +gUnknown_085e8c40:: @ 85E8C40 .string "IDNo. /$" gText_Name:: @ 85E8C48 @@ -295,18 +527,32 @@ gText_BirchInTrouble:: @ 85E8C53 gText_ConfirmStarterChoice:: @ 85E8C90 .string "Do you choose this POKéMON?$" + +gUnknown_085e8cac:: @ 85E8CAC .string "POKéMON$" gText_FlyToWhere:: @ 85E8CB4 .string "FLY to where?$" + +gUnknown_085e8cc2:: @ 85E8CC2 .string "USE$" + +gUnknown_085e8cc6:: @ 85E8CC6 .string "TOSS$" + +gUnknown_085e8ccb:: @ 85E8CCB .string "REGISTER$" + +gUnknown_085e8cd4:: @ 85E8CD4 .string "GIVE$" + +gUnknown_085e8cd9:: @ 85E8CD9 .string "CHECK TAG$" gText_Confirm:: @ 85E8CE3 .string "CONFIRM$" + +gUnknown_085e8ceb:: @ 85E8CEB .string "WALK$" gText_Cancel:: @ 85E8CF0 @@ -314,19 +560,35 @@ gText_Cancel:: @ 85E8CF0 gText_Cancel2:: @ 85E8CF7 .string "CANCEL$" + +gUnknown_085e8cfe:: @ 85E8CFE .string "SHOW$" gText_EmptyString2:: @ 85E8D03 .string "$" + +gUnknown_085e8d04:: @ 85E8D04 .string "CANCEL$" + +gUnknown_085e8d0b:: @ 85E8D0B .string "ITEM$" + +gUnknown_085e8d10:: @ 85E8D10 .string "MAIL$" + +gUnknown_085e8d15:: @ 85E8D15 .string "TAKE$" + +gUnknown_085e8d1a:: @ 85E8D1A .string "STORE$" + +gUnknown_085e8d20:: @ 85E8D20 .string "CHECK$" gText_None:: @ 85E8D26 .string "NONE$" + +gUnknown_085e8d2b:: @ 85E8D2B .string "DESELECT$" gText_ThreeMarks:: @ 85E8D34 @@ -358,7 +620,11 @@ gText_LevelSymbol:: @ 85E8D4D gText_UnkCtrlF908Clear01:: @ 85E8D4F .string "{UNK_CTRL_F908}{CLEAR 0x01}$" + +gUnknown_085e8d55:: @ 85E8D55 .string "+$" + +gUnknown_085e8d57:: @ 85E8D57 .string "{RIGHT_ARROW}$" gText_UnkCtrlF907F908:: @ 85E8D59 @@ -375,10 +641,14 @@ gText_GoBackPrevMenu:: @ 85E8D62 gText_WhatWouldYouLike:: @ 85E8D80 .string "What would you like to do?$" + +gUnknown_085e8d9b:: @ 85E8D9B .string "GIVE$" gText_xVar1:: @ 85E8DA0 .string "×{STR_VAR_1}$" + +gUnknown_085e8da4:: @ 85E8DA4 .string " BERRY$" gText_Coins:: @ 85E8DAB @@ -563,19 +833,47 @@ gText_UnkF908Var1Var2:: @ 85E9263 gText_BerryTag:: @ 85E926B .string "BERRY TAG$" + +gUnknown_085e9275:: @ 85E9275 .string "RED {POKEBLOCK}$" + +gUnknown_085e927f:: @ 85E927F .string "BLUE {POKEBLOCK}$" + +gUnknown_085e928a:: @ 85E928A .string "PINK {POKEBLOCK}$" + +gUnknown_085e9295:: @ 85E9295 .string "GREEN {POKEBLOCK}$" + +gUnknown_085e92a1:: @ 85E92A1 .string "YELLOW {POKEBLOCK}$" + +gUnknown_085e92ae:: @ 85E92AE .string "PURPLE {POKEBLOCK}$" + +gUnknown_085e92bb:: @ 85E92BB .string "INDIGO {POKEBLOCK}$" + +gUnknown_085e92c8:: @ 85E92C8 .string "BROWN {POKEBLOCK}$" + +gUnknown_085e92d4:: @ 85E92D4 .string "LITEBLUE {POKEBLOCK}$" + +gUnknown_085e92e3:: @ 85E92E3 .string "OLIVE {POKEBLOCK}$" + +gUnknown_085e92ef:: @ 85E92EF .string "GRAY {POKEBLOCK}$" + +gUnknown_085e92fa:: @ 85E92FA .string "BLACK {POKEBLOCK}$" + +gUnknown_085e9306:: @ 85E9306 .string "WHITE {POKEBLOCK}$" + +gUnknown_085e9312:: @ 85E9312 .string "GOLD {POKEBLOCK}$" gText_Spicy:: @ 85E931D @@ -593,7 +891,11 @@ gText_Bitter:: @ 85E932D gText_Sour:: @ 85E9334 .string "SOUR$" + +gUnknown_085e9339:: @ 85E9339 .string "TASTY$" + +gUnknown_085e933f:: @ 85E933F .string "FEEL$" gText_StowCase:: @ 85E9344 @@ -617,8 +919,14 @@ gText_Var1HappilyAteVar2:: @ 85E9390 gText_Var1DisdainfullyAteVar2:: @ 85E93A9 .string "{STR_VAR_1} disdainfully ate the\n{STR_VAR_2}.{PAUSE_UNTIL_PRESS}$" + +gUnknown_085e93c7:: @ 85E93C7 .string "BUY$" + +gUnknown_085e93cb:: @ 85E93CB .string "SELL$" + +gUnknown_085e93d0:: @ 85E93D0 .string "QUIT$" gText_InBagVar1:: @ 85E93D5 @@ -684,15 +992,35 @@ gText_TurnedOverVar1ForVar2:: @ 85E9677 gText_PokedollarVar1:: @ 85E969C .string "Â¥{STR_VAR_1}$" + +gUnknown_085e96a0:: @ 85E96A0 .string "SHIFT$" + +gUnknown_085e96a6:: @ 85E96A6 .string "SEND OUT$" + +gUnknown_085e96af:: @ 85E96AF .string "SWITCH$" + +gUnknown_085e96b6:: @ 85E96B6 .string "SUMMARY$" + +gUnknown_085e96be:: @ 85E96BE .string "MOVES$" + +gUnknown_085e96c4:: @ 85E96C4 .string "ENTER$" + +gUnknown_085e96ca:: @ 85E96CA .string "NO ENTRY$" + +gUnknown_085e96d3:: @ 85E96D3 .string "TAKE$" + +gUnknown_085e96d8:: @ 85E96D8 .string "READ$" + +gUnknown_085e96dd:: @ 85E96DD .string "TRADE$" gText_HP3:: @ 85E96E3 @@ -821,6 +1149,8 @@ gText_PkmnThawedOut:: @ 85E9CA2 gText_PPWasRestored:: @ 85E9CB7 .string "PP was restored.{PAUSE_UNTIL_PRESS}$" + +gUnknown_085e9cca:: @ 85E9CCA .string "{STR_VAR_1} regained health.{PAUSE_UNTIL_PRESS}$" gText_PkmnBecameHealthy:: @ 85E9CE0 @@ -856,45 +1186,125 @@ gText_ThrowAwayItem:: @ 85E9E00 gText_ItemThrownAway:: @ 85E9E14 .string "The {STR_VAR_1}\nwas thrown away.{PAUSE_UNTIL_PRESS}$" + +gUnknown_085e9e2e:: @ 85E9E2E .string "Teach which POKéMON?$" + +gUnknown_085e9e43:: @ 85E9E43 .string "Choose a POKéMON.$" + +gUnknown_085e9e55:: @ 85E9E55 .string "Move to where?$" + +gUnknown_085e9e64:: @ 85E9E64 .string "Teach which POKéMON?$" + +gUnknown_085e9e79:: @ 85E9E79 .string "Use on which POKéMON?$" + +gUnknown_085e9e8f:: @ 85E9E8F .string "Give to which POKéMON?$" + +gUnknown_085e9ea6:: @ 85E9EA6 .string "Do what with this {PKMN}?$" + +gUnknown_085e9ebc:: @ 85E9EBC .string "There’s nothing to CUT.$" + +gUnknown_085e9ed4:: @ 85E9ED4 .string "You can’t SURF here.$" + +gUnknown_085e9ee9:: @ 85E9EE9 .string "You’re already SURFING.$" + +gUnknown_085e9f01:: @ 85E9F01 .string "Can’t use that here.$" + +gUnknown_085e9f16:: @ 85E9F16 .string "Restore which move?$" + +gUnknown_085e9f2a:: @ 85E9F2A .string "Boost PP of which move?$" + +gUnknown_085e9f42:: @ 85E9F42 .string "Do what with an item?$" + +gUnknown_085e9f58:: @ 85E9F58 .string "No POKéMON for battle!$" + +gUnknown_085e9f6f:: @ 85E9F6F .string "Choose a POKéMON.$" + +gUnknown_085e9f81:: @ 85E9F81 .string "Not enough HP…$" + +gUnknown_085e9f90:: @ 85E9F90 .string "{STR_VAR_1} POKéMON are needed.$" + +gUnknown_085e9fa7:: @ 85E9FA7 .string "POKéMON can’t be the same.$" + +gUnknown_085e9fc2:: @ 85E9FC2 .string "No identical hold items.$" + +gUnknown_085e9fdb:: @ 85E9FDB .string "The current is much too fast!$" + +gUnknown_085e9ff9:: @ 85E9FF9 .string "Do what with the MAIL?$" + +gUnknown_085ea010:: @ 85EA010 .string "Choose POKéMON or CANCEL.$" + +gUnknown_085ea02a:: @ 85EA02A .string "Choose POKéMON and confirm.$" + +gUnknown_085ea046:: @ 85EA046 .string "Let’s enjoy cycling!$" + +gUnknown_085ea05b:: @ 85EA05B .string "This is in use already.$" + +gUnknown_085ea073:: @ 85EA073 .string "{STR_VAR_1} is already holding\none {STR_VAR_2}.$" + +gUnknown_085ea091:: @ 85EA091 .string "No use.$" + +gUnknown_085ea099:: @ 85EA099 .string "ABLE$" + +gUnknown_085ea09e:: @ 85EA09E .string "FIRST$" + +gUnknown_085ea0a4:: @ 85EA0A4 .string "SECOND$" + +gUnknown_085ea0ab:: @ 85EA0AB .string "THIRD$" + +gUnknown_085ea0b1:: @ 85EA0B1 .string "ABLE$" + +gUnknown_085ea0b6:: @ 85EA0B6 .string "NOT ABLE$" + +gUnknown_085ea0bf:: @ 85EA0BF .string "ABLE!$" + +gUnknown_085ea0c5:: @ 85EA0C5 .string "NOT ABLE!$" + +gUnknown_085ea0cf:: @ 85EA0CF .string "LEARNED$" + +gUnknown_085ea0d7:: @ 85EA0D7 .string "HAVE$" + +gUnknown_085ea0dc:: @ 85EA0DC .string "DON’T HAVE$" + +gUnknown_085ea0e7:: @ 85EA0E7 .string "FOURTH$" gText_PkmnCantParticipate:: @ 85EA0EE @@ -922,34 +1332,44 @@ gText_PauseUntilPress:: @ 85EA1CA .string "{PAUSE_UNTIL_PRESS}$" gJPText_PutVar1IntoSpinner:: @ 85EA1CD - .string "{STR_VAR_1}ã‚’ ãã‚‹ãã‚‹ã“ã†ã‹ã‚“ã«\nã ã—㦠よã‚ã—ã„ã§ã™ã‹ï¼Ÿ$" @ "{STR_VAR_1}wo gurugurukoukanni\ndashite yoroshiidesuka?" ("do you want to put {STR_VAR_1} into the spinner?" in Japanese) + .string "{STR_VAR_1}ã‚’ ãã‚‹ãã‚‹ã“ã†ã‹ã‚“ã«\nã ã—㦠よã‚ã—ã„ã§ã™ã‹ï¼Ÿ$" @ "{STR_VAR_1}wo gurugurukoukanni\ndashite yoroshiidesuka?" ("do you want to put {STR_VAR_1} into the spinner?" in Japanese) - .align 2 + .align 2 gText_OnlyPkmnForBattle:: @ 85EA1E8 .string "That’s your only\nPOKéMON for battle.$" - .align 2 + .align 2 gText_PkmnCantBeTradedNow:: @ 85EA210 .string "That POKéMON can’t be traded\nnow.$" - .align 2 + .align 2 gText_EggCantBeTradedNow:: @ 85EA234 - .string "An EGG can’t be traded now.$" - - .align 2 - .string "The other TRAINER’s POKéMON\ncan’t be traded now.$" - - .align 2 - .string "The other TRAINER can’t accept\nthat POKéMON now.$" - - .align 2 - .string "You can’t trade with that\nTRAINER now.$" - - .align 2 - .string "That isn’t the type of POKéMON\nthat the other TRAINER wants.$" - - .align 2 - .string "That isn’t an EGG.$" + .string "An EGG can’t be traded now.$" + + .align 2 + +gUnknown_085ea250:: @ 85EA250 + .string "The other TRAINER’s POKéMON\ncan’t be traded now.$" + + .align 2 + +gUnknown_085ea284:: @ 85EA284 + .string "The other TRAINER can’t accept\nthat POKéMON now.$" + + .align 2 + +gUnknown_085ea2b8:: @ 85EA2B8 + .string "You can’t trade with that\nTRAINER now.$" + + .align 2 + +gUnknown_085ea2e0:: @ 85EA2E0 + .string "That isn’t the type of POKéMON\nthat the other TRAINER wants.$" + + .align 2 + +gUnknown_085ea320:: @ 85EA320 + .string "That isn’t an EGG.$" gText_Register:: @ 85EA333 .string "REGISTER$" @@ -972,6 +1392,8 @@ gText_Speed2:: @ 85EA35B gText_HP4:: @ 85EA361 .string "HP$" + +gUnknown_085ea364:: @ 85EA364 .string "$" gText_OTSlash:: @ 85EA365 @@ -1010,6 +1432,8 @@ gText_RibbonsVar1:: @ 85EA3B4 gText_EmptyString5:: @ 85EA3C0 .string "$" + +gUnknown_085ea3c1:: @ 85EA3C1 .string "EVENTS$" gText_Switch:: @ 85EA3C8 @@ -1096,29 +1520,61 @@ gText_RegisteredDataDeleted:: @ 85EA762 gText_NoRegistry:: @ 85EA785 .string "There is no REGISTRY.{PAUSE_UNTIL_PRESS}$" + +gUnknown_085ea79d:: @ 85EA79D .string "DEL REGIST.$" + +gUnknown_085ea7a9:: @ 85EA7A9 .string "{STR_VAR_3}{STR_VAR_1}/{STR_VAR_2}$" + +gUnknown_085ea7b1:: @ 85EA7B1 .string "DECORATE$" + +gUnknown_085ea7ba:: @ 85EA7BA .string "PUT AWAY$" + +gUnknown_085ea7c3:: @ 85EA7C3 .string "TOSS$" gText_Color161Shadow161:: @ 85EA7C8 .string "{COLOR 161}{SHADOW 161}$" + +gUnknown_085ea7cf:: @ 85EA7CF .string "Put out the selected decoration item.$" + +gUnknown_085ea7f5:: @ 85EA7F5 .string "Store the chosen decoration in the PC.$" + +gUnknown_085ea81c:: @ 85EA81C .string "Throw away unwanted decorations.$" gText_NoDecorations:: @ 85EA83D .string "There are no decorations.{PAUSE_UNTIL_PRESS}$" + +gUnknown_085ea859:: @ 85EA859 .string "DESK$" + +gUnknown_085ea85e:: @ 85EA85E .string "CHAIR$" + +gUnknown_085ea864:: @ 85EA864 .string "PLANT$" + +gUnknown_085ea86a:: @ 85EA86A .string "ORNAMENT$" + +gUnknown_085ea873:: @ 85EA873 .string "MAT$" + +gUnknown_085ea877:: @ 85EA877 .string "POSTER$" + +gUnknown_085ea87e:: @ 85EA87E .string "DOLL$" + +gUnknown_085ea883:: @ 85EA883 .string "CUSHION$" gText_Gold:: @ 85EA88B @@ -1145,6 +1601,8 @@ gText_NoMoreDecorations:: @ 85EA8EA gText_NoMoreDecorations2:: @ 85EA931 .string "No more decorations can be placed.\nThe most that can be placed are {STR_VAR_1}.$" + +gUnknown_085ea978:: @ 85EA978 .string "This can’t be placed here.\nIt must be on a DESK, etc.$" gText_CantPlaceInRoom:: @ 85EA9AE @@ -1174,17 +1632,33 @@ gText_DecorationReturnedToPC:: @ 85EAAC5 gText_NoDecorationsInUse:: @ 85EAAEC .string "There are no decorations in use.{PAUSE_UNTIL_PRESS}$" + +gUnknown_085eab0f:: @ 85EAB0F .string "TRISTAN$" + +gUnknown_085eab17:: @ 85EAB17 .string "PHILIP$" + +gUnknown_085eab1e:: @ 85EAB1E .string "DENNIS$" + +gUnknown_085eab25:: @ 85EAB25 .string "ROBERTO$" + +gUnknown_085eab2d:: @ 85EAB2D .string "TURN OFF$" + +gUnknown_085eab36:: @ 85EAB36 .string "DECORATION$" + +gUnknown_085eab41:: @ 85EAB41 .string "ITEM STORAGE$" gText_Mailbox:: @ 85EAB4E .string "MAILBOX$" + +gUnknown_085eab56:: @ 85EAB56 .string "DEPOSIT ITEM$" gText_WithdrawItem:: @ 85EAB63 @@ -1193,8 +1667,14 @@ gText_WithdrawItem:: @ 85EAB63 gText_TossItem:: @ 85EAB71 .string "TOSS ITEM$" + +gUnknown_085eab7b:: @ 85EAB7B .string "Store items in the PC.$" + +gUnknown_085eab92:: @ 85EAB92 .string "Take out items from the PC.$" + +gUnknown_085eabae:: @ 85EABAE .string "Throw away items stored in the PC.$" gText_NoItems:: @ 85EABD1 @@ -1209,8 +1689,14 @@ gText_WithdrawHowManyItems:: @ 85EAC09 gText_WithdrawXItems:: @ 85EAC22 .string "Withdrew {STR_VAR_2}\n{STR_VAR_1}(s).$" + +gUnknown_085eac35:: @ 85EAC35 .string "READ$" + +gUnknown_085eac3a:: @ 85EAC3A .string "MOVE TO BAG$" + +gUnknown_085eac46:: @ 85EAC46 .string "GIVE$" gText_NoMailHere:: @ 85EAC4B @@ -1252,16 +1738,38 @@ gText_Phoebe:: @ 85EAD29 gText_Glacia:: @ 85EAD30 .string "GLACIA$" + +gUnknown_085ead37:: @ 85EAD37 .string "PETALBURG$" + +gUnknown_085ead41:: @ 85EAD41 .string "SLATEPORT$" + +gUnknown_085ead4b:: @ 85EAD4B .string "LITTLEROOT$" + +gUnknown_085ead56:: @ 85EAD56 .string "LILYCOVE$" + +gUnknown_085ead5f:: @ 85EAD5F .string "DEWFORD$" + +gUnknown_085ead67:: @ 85EAD67 .string "ENTER$" + +gUnknown_085ead6d:: @ 85EAD6D .string "INFO$" + +gUnknown_085ead72:: @ 85EAD72 .string "What’s a CONTEST?$" + +gUnknown_085ead84:: @ 85EAD84 .string "Types of CONTESTS$" + +gUnknown_085ead96:: @ 85EAD96 .string "Ranks$" + +gUnknown_085ead9c:: @ 85EAD9C .string "Judging$" gUnknown_085EADA4:: @@ -1278,22 +1786,56 @@ gUnknown_085EADD5:: gUnknown_085EADE7:: .string "TOUGHNESS CONTEST$" + +gUnknown_085eadf9:: @ 85EADF9 .string "DECORATION$" + +gUnknown_085eae04:: @ 85EAE04 .string "PACK UP$" + +gUnknown_085eae0c:: @ 85EAE0C .string "COUNT$" + +gUnknown_085eae12:: @ 85EAE12 .string "REGISTRY$" + +gUnknown_085eae1b:: @ 85EAE1B .string "INFORMATION$" + +gUnknown_085eae27:: @ 85EAE27 .string "MACH$" + +gUnknown_085eae2c:: @ 85EAE2C .string "ACRO$" + +gUnknown_085eae31:: @ 85EAE31 .string "PSN$" + +gUnknown_085eae35:: @ 85EAE35 .string "PAR$" + +gUnknown_085eae39:: @ 85EAE39 .string "SLP$" + +gUnknown_085eae3d:: @ 85EAE3D .string "BRN$" + +gUnknown_085eae41:: @ 85EAE41 .string "FRZ$" + +gUnknown_085eae45:: @ 85EAE45 .string "TOXIC$" + +gUnknown_085eae4b:: @ 85EAE4B .string "OK$" + +gUnknown_085eae4e:: @ 85EAE4E .string "QUIT$" + +gUnknown_085eae53:: @ 85EAE53 .string "Saw it$" + +gUnknown_085eae5a:: @ 85EAE5A .string "Not yet$" gText_Yes:: @ 85EAE62 @@ -1302,12 +1844,26 @@ gText_Yes:: @ 85EAE62 gText_No:: @ 85EAE66 .string "NO$" + +gUnknown_085eae69:: @ 85EAE69 .string "INFO$" + +gUnknown_085eae6e:: @ 85EAE6E .string "SINGLE BATTLE$" + +gUnknown_085eae7c:: @ 85EAE7C .string "DOUBLE BATTLE$" + +gUnknown_085eae8a:: @ 85EAE8A .string "MULTI BATTLE$" + +gUnknown_085eae97:: @ 85EAE97 .string "MR. BRINEY$" + +gUnknown_085eaea2:: @ 85EAEA2 .string "CHALLENGE$" + +gUnknown_085eaeac:: @ 85EAEAC .string "INFO$" gText_Lv50:: @ 85EAEB1 @@ -1316,44 +1872,122 @@ gText_Lv50:: @ 85EAEB1 gText_OpenLevel:: @ 85EAEB8 .string "OPEN LEVEL$" + +gUnknown_085eaec3:: @ 85EAEC3 .string "FRESH WATER{CLEAR_TO 0x48}Â¥200$" + +gUnknown_085eaed6:: @ 85EAED6 .string "SODA POP{CLEAR_TO 0x48}Â¥300$" + +gUnknown_085eaee6:: @ 85EAEE6 .string "LEMONADE{CLEAR_TO 0x48}Â¥350$" + +gUnknown_085eaef6:: @ 85EAEF6 .string "HOW TO RIDE$" + +gUnknown_085eaf02:: @ 85EAF02 .string "HOW TO TURN$" + +gUnknown_085eaf0e:: @ 85EAF0E .string "SANDY SLOPES$" + +gUnknown_085eaf1b:: @ 85EAF1B .string "WHEELIES$" + +gUnknown_085eaf24:: @ 85EAF24 .string "BUNNY-HOPS$" + +gUnknown_085eaf2f:: @ 85EAF2F .string "JUMP$" + +gUnknown_085eaf34:: @ 85EAF34 .string "Satisfied$" + +gUnknown_085eaf3e:: @ 85EAF3E .string "Dissatisfied$" + +gUnknown_085eaf4b:: @ 85EAF4B .string "DEEPSEATOOTH$" + +gUnknown_085eaf58:: @ 85EAF58 .string "DEEPSEASCALE$" + +gUnknown_085eaf65:: @ 85EAF65 .string "BLUE FLUTE$" + +gUnknown_085eaf70:: @ 85EAF70 .string "YELLOW FLUTE$" + +gUnknown_085eaf7d:: @ 85EAF7D .string "RED FLUTE$" + +gUnknown_085eaf87:: @ 85EAF87 .string "WHITE FLUTE$" + +gUnknown_085eaf93:: @ 85EAF93 .string "BLACK FLUTE$" + +gUnknown_085eaf9f:: @ 85EAF9F .string "GLASS CHAIR$" + +gUnknown_085eafab:: @ 85EAFAB .string "GLASS DESK$" + +gUnknown_085eafb6:: @ 85EAFB6 .string "TREECKO DOLL 1,000 COINS$" + +gUnknown_085eafcf:: @ 85EAFCF .string "TORCHIC DOLL 1,000 COINS$" + +gUnknown_085eafe8:: @ 85EAFE8 .string "MUDKIP DOLL 1,000 COINS$" + +gUnknown_085eb002:: @ 85EB002 .string " 50 COINS Â¥1,000$" + +gUnknown_085eb017:: @ 85EB017 .string "500 COINS Â¥10,000$" + +gUnknown_085eb02a:: @ 85EB02A .string "Excellent$" + +gUnknown_085eb034:: @ 85EB034 .string "Not so good$" + +gUnknown_085eb040:: @ 85EB040 .string "RED SHARD$" + +gUnknown_085eb04a:: @ 85EB04A .string "YELLOW SHARD$" + +gUnknown_085eb057:: @ 85EB057 .string "BLUE SHARD$" + +gUnknown_085eb062:: @ 85EB062 .string "GREEN SHARD$" + +gUnknown_085eb06e:: @ 85EB06E .string "BATTLE FRONTIER$" + +gUnknown_085eb07e:: @ 85EB07E .string "Right$" + +gUnknown_085eb084:: @ 85EB084 .string "Left$" + +gUnknown_085eb089:: @ 85EB089 .string "TM32{CLEAR_TO 0x48}1,500 COINS$" + +gUnknown_085eb09c:: @ 85EB09C .string "TM29{CLEAR_TO 0x48}3,500 COINS$" + +gUnknown_085eb0af:: @ 85EB0AF .string "TM35{CLEAR_TO 0x48}4,000 COINS$" + +gUnknown_085eb0c2:: @ 85EB0C2 .string "TM24{CLEAR_TO 0x48}4,000 COINS$" + +gUnknown_085eb0d5:: @ 85EB0D5 .string "TM13{CLEAR_TO 0x48}4,000 COINS$" gText_Cool:: @ 85EB0E8 @@ -1371,19 +2005,47 @@ gText_Smart:: @ 85EB0F9 gText_Tough:: @ 85EB0FF .string "TOUGH$" + +gUnknown_085eb105:: @ 85EB105 .string "NORMAL$" + +gUnknown_085eb10c:: @ 85EB10C .string "SUPER$" + +gUnknown_085eb112:: @ 85EB112 .string "HYPER$" + +gUnknown_085eb118:: @ 85EB118 .string "MASTER$" + +gUnknown_085eb11f:: @ 85EB11F .string "COOL$" + +gUnknown_085eb124:: @ 85EB124 .string "BEAUTY$" + +gUnknown_085eb12b:: @ 85EB12B .string "CUTE$" + +gUnknown_085eb130:: @ 85EB130 .string "SMART$" + +gUnknown_085eb136:: @ 85EB136 .string "TOUGH$" + +gUnknown_085eb13c:: @ 85EB13C .string "ITEMS$" + +gUnknown_085eb142:: @ 85EB142 .string "KEY ITEMS$" + +gUnknown_085eb14c:: @ 85EB14C .string "POKé BALLS$" + +gUnknown_085eb157:: @ 85EB157 .string "TMs & HMs$" + +gUnknown_085eb161:: @ 85EB161 .string "BERRIES$" gText_SomeonesPC:: @ 85EB169 @@ -1401,23 +2063,59 @@ gText_HallOfFame:: @ 85EB18B gText_LogOff:: @ 85EB198 .string "LOG OFF$" + +gUnknown_085eb1a0:: @ 85EB1A0 .string "OPPONENT$" + +gUnknown_085eb1a9:: @ 85EB1A9 .string "TOURNEY TREE$" + +gUnknown_085eb1b6:: @ 85EB1B6 .string "READY TO START$" + +gUnknown_085eb1c5:: @ 85EB1C5 .string "NORMAL RANK$" + +gUnknown_085eb1d1:: @ 85EB1D1 .string "SUPER RANK$" + +gUnknown_085eb1dc:: @ 85EB1DC .string "HYPER RANK$" + +gUnknown_085eb1e7:: @ 85EB1E7 .string "MASTER RANK$" + +gUnknown_085eb1f3:: @ 85EB1F3 .string "SINGLE$" + +gUnknown_085eb1fa:: @ 85EB1FA .string "DOUBLE$" + +gUnknown_085eb201:: @ 85EB201 .string "MULTI$" + +gUnknown_085eb207:: @ 85EB207 .string "MULTI-LINK$" + +gUnknown_085eb212:: @ 85EB212 .string "BATTLE BAG$" + +gUnknown_085eb21d:: @ 85EB21D .string "HELD ITEM$" + +gUnknown_085eb227:: @ 85EB227 .string "LINK CONTEST$" + +gUnknown_085eb234:: @ 85EB234 .string "ABOUT E-MODE$" + +gUnknown_085eb241:: @ 85EB241 .string "ABOUT G-MODE$" + +gUnknown_085eb24e:: @ 85EB24E .string "E-MODE$" + +gUnknown_085eb255:: @ 85EB255 .string "G-MODE$" gText_MenuOptionPokedex:: @ 85EB25C @@ -1432,6 +2130,8 @@ gText_MenuOptionBag:: @ 85EB26C gText_MenuOptionPokenav:: @ 85EB270 .string "POKéNAV$" + +gUnknown_085eb278:: @ 85EB278 .string "$" gText_MenuOptionSave:: @ 85EB279 @@ -1443,77 +2143,220 @@ gText_MenuOptionOption:: @ 85EB27E gText_MenuOptionExit:: @ 85EB285 .string "EXIT$" - .align 2 +gUnknown_085eb28a:: @ 85EB28A + .string " " + +gUnknown_085eb28c:: @ 85EB28C .string "5BP$" + +gUnknown_085eb290:: @ 85EB290 .string "10BP$" + +gUnknown_085eb295:: @ 85EB295 .string "15BP$" + +gUnknown_085eb29a:: @ 85EB29A .string "RED TENT$" + +gUnknown_085eb2a3:: @ 85EB2A3 .string "BLUE TENT$" + +gUnknown_085eb2ad:: @ 85EB2AD .string "SOUTHERN ISLAND$" + +gUnknown_085eb2bd:: @ 85EB2BD .string "BIRTH ISLAND$" + +gUnknown_085eb2ca:: @ 85EB2CA .string "FARAWAY ISLAND$" + +gUnknown_085eb2d9:: @ 85EB2D9 .string "NAVEL ROCK$" + +gUnknown_085eb2e4:: @ 85EB2E4 .string "CLAW FOSSIL$" + +gUnknown_085eb2f0:: @ 85EB2F0 .string "ROOT FOSSIL$" + +gUnknown_085eb2fc:: @ 85EB2FC .string "NO$" + +gUnknown_085eb2ff:: @ 85EB2FF .string "I’ll battle now!$" + +gUnknown_085eb310:: @ 85EB310 .string "I won!$" + +gUnknown_085eb317:: @ 85EB317 .string "I lost!$" + +gUnknown_085eb31f:: @ 85EB31F .string "I won’t tell.$" + +gUnknown_085eb32d:: @ 85EB32D .string "NORMAL TAG MATCH$" + +gUnknown_085eb33e:: @ 85EB33E .string "VARIETY TAG MATCH$" + +gUnknown_085eb350:: @ 85EB350 .string "UNIQUE TAG MATCH$" + +gUnknown_085eb361:: @ 85EB361 .string "EXPERT TAG MATCH$" + +gUnknown_085eb372:: @ 85EB372 .string "TRADE CENTER$" + +gUnknown_085eb37f:: @ 85EB37F .string "COLOSSEUM$" + +gUnknown_085eb389:: @ 85EB389 .string "RECORD CORNER$" + +gUnknown_085eb397:: @ 85EB397 .string "BERRY CRUSH$" + +gUnknown_085eb3a3:: @ 85EB3A3 .string "$" + +gUnknown_085eb3a4:: @ 85EB3A4 .string "POKéMON JUMP$" + +gUnknown_085eb3b1:: @ 85EB3B1 .string "DODRIO BERRY-PICKING$" + +gUnknown_085eb3c6:: @ 85EB3C6 .string "BECOME LEADER$" + +gUnknown_085eb3d4:: @ 85EB3D4 .string "JOIN GROUP$" + +gUnknown_085eb3df:: @ 85EB3DF .string "TWO STYLES$" + +gUnknown_085eb3ea:: @ 85EB3EA .string "LV. 50$" + +gUnknown_085eb3f1:: @ 85EB3F1 .string "OPEN LEVEL$" + +gUnknown_085eb3fc:: @ 85EB3FC .string "{PKMN} TYPE & NO.$" + +gUnknown_085eb40a:: @ 85EB40A .string "HOLD ITEMS$" + +gUnknown_085eb415:: @ 85EB415 .string "SYMBOLS$" + +gUnknown_085eb41d:: @ 85EB41D .string "RECORD$" + +gUnknown_085eb424:: @ 85EB424 .string "BATTLE PTS$" + +gUnknown_085eb42f:: @ 85EB42F .string "TOWER INFO$" + +gUnknown_085eb43a:: @ 85EB43A .string "BATTLE {PKMN}$" + +gUnknown_085eb444:: @ 85EB444 .string "BATTLE SALON$" + +gUnknown_085eb451:: @ 85EB451 .string "MULTI-LINK$" + +gUnknown_085eb45c:: @ 85EB45C .string "BATTLE RULES$" + +gUnknown_085eb469:: @ 85EB469 .string "JUDGE: MIND$" + +gUnknown_085eb475:: @ 85EB475 .string "JUDGE: SKILL$" + +gUnknown_085eb482:: @ 85EB482 .string "JUDGE: BODY$" + +gUnknown_085eb48e:: @ 85EB48E .string "MATCHUP$" + +gUnknown_085eb496:: @ 85EB496 .string "TOURNEY TREE$" + +gUnknown_085eb4a3:: @ 85EB4A3 .string "DOUBLE KO$" + +gUnknown_085eb4ad:: @ 85EB4AD .string "BASIC RULES$" + +gUnknown_085eb4b9:: @ 85EB4B9 .string "SWAP: PARTNER$" + +gUnknown_085eb4c7:: @ 85EB4C7 .string "SWAP: NUMBER$" + +gUnknown_085eb4d4:: @ 85EB4D4 .string "SWAP: NOTES$" + +gUnknown_085eb4e0:: @ 85EB4E0 .string "OPEN LEVEL$" + +gUnknown_085eb4eb:: @ 85EB4EB .string "BATTLE BASICS$" + +gUnknown_085eb4f9:: @ 85EB4F9 .string "POKéMON NATURE$" + +gUnknown_085eb508:: @ 85EB508 .string "POKéMON MOVES$" + +gUnknown_085eb516:: @ 85EB516 .string "UNDERPOWERED$" + +gUnknown_085eb523:: @ 85EB523 .string "WHEN IN DANGER$" + +gUnknown_085eb532:: @ 85EB532 .string "PYRAMID: POKéMON$" + +gUnknown_085eb543:: @ 85EB543 .string "PYRAMID: TRAINERS$" + +gUnknown_085eb555:: @ 85EB555 .string "PYRAMID: MAZE$" + +gUnknown_085eb563:: @ 85EB563 .string "BATTLE BAG$" + +gUnknown_085eb56e:: @ 85EB56E .string "POKéNAV AND BAG$" + +gUnknown_085eb57e:: @ 85EB57E .string "HELD ITEMS$" + +gUnknown_085eb589:: @ 85EB589 .string "POKéMON ORDER$" + +gUnknown_085eb597:: @ 85EB597 .string "BATTLE POKéMON$" + +gUnknown_085eb5a6:: @ 85EB5A6 .string "BATTLE TRAINERS$" + +gUnknown_085eb5b6:: @ 85EB5B6 .string "GO ON$" + +gUnknown_085eb5bc:: @ 85EB5BC .string "RECORD$" + +gUnknown_085eb5c3:: @ 85EB5C3 .string "REST$" + +gUnknown_085eb5c8:: @ 85EB5C8 .string "RETIRE$" gText_99TimesPlus:: @ 85EB5CF @@ -1528,6 +2371,8 @@ gText_SpaceSeconds:: @ 85EB5E5 gText_SpaceTimes:: @ 85EB5EE .string " time(s)$" + +gUnknown_085eb5f7:: @ 85EB5F7 .string ".$" gText_BigGuy:: @ 85EB5F9 @@ -1542,28 +2387,74 @@ gText_Son:: @ 85EB60A gText_Daughter:: @ 85EB60E .string "daughter$" + +gUnknown_085eb617:: @ 85EB617 .string "BLUE FLUTE$" + +gUnknown_085eb622:: @ 85EB622 .string "YELLOW FLUTE$" + +gUnknown_085eb62f:: @ 85EB62F .string "RED FLUTE$" + +gUnknown_085eb639:: @ 85EB639 .string "WHITE FLUTE$" + +gUnknown_085eb645:: @ 85EB645 .string "BLACK FLUTE$" + +gUnknown_085eb651:: @ 85EB651 .string "PRETTY CHAIR$" + +gUnknown_085eb65e:: @ 85EB65E .string "PRETTY DESK$" + +gUnknown_085eb66a:: @ 85EB66A .string "1F$" + +gUnknown_085eb66d:: @ 85EB66D .string "2F$" + +gUnknown_085eb670:: @ 85EB670 .string "3F$" + +gUnknown_085eb673:: @ 85EB673 .string "4F$" + +gUnknown_085eb676:: @ 85EB676 .string "5F$" + +gUnknown_085eb679:: @ 85EB679 .string "6F$" + +gUnknown_085eb67c:: @ 85EB67C .string "7F$" + +gUnknown_085eb67f:: @ 85EB67F .string "8F$" + +gUnknown_085eb682:: @ 85EB682 .string "9F$" + +gUnknown_085eb685:: @ 85EB685 .string "10F$" + +gUnknown_085eb689:: @ 85EB689 .string "11F$" + +gUnknown_085eb68d:: @ 85EB68D .string "B1F$" + +gUnknown_085eb691:: @ 85EB691 .string "B2F$" + +gUnknown_085eb695:: @ 85EB695 .string "B3F$" + +gUnknown_085eb699:: @ 85EB699 .string "B4F$" + +gUnknown_085eb69d:: @ 85EB69D .string "ROOFTOP$" gText_ElevatorNowOn:: @ 85EB6A5 @@ -1572,107 +2463,303 @@ gText_ElevatorNowOn:: @ 85EB6A5 gText_BP:: @ 85EB6AD .string "BP$" + +gUnknown_085eb6b0:: @ 85EB6B0 .string "ENERGYPOWDER{CLEAR_TO 0x72}{SIZE 0}50$" + +gUnknown_085eb6c5:: @ 85EB6C5 .string "ENERGY ROOT{CLEAR_TO 0x72}{SIZE 0}80$" + +gUnknown_085eb6d9:: @ 85EB6D9 .string "HEAL POWDER{CLEAR_TO 0x72}{SIZE 0}50$" + +gUnknown_085eb6ed:: @ 85EB6ED .string "REVIVAL HERB{CLEAR_TO 0x6C}{SIZE 0}300$" + +gUnknown_085eb703:: @ 85EB703 .string "PROTEIN{CLEAR_TO 0x63}{SIZE 0}1,000$" + +gUnknown_085eb716:: @ 85EB716 .string "IRON{CLEAR_TO 0x63}{SIZE 0}1,000$" + +gUnknown_085eb726:: @ 85EB726 .string "CARBOS{CLEAR_TO 0x63}{SIZE 0}1,000$" + +gUnknown_085eb738:: @ 85EB738 .string "CALCIUM{CLEAR_TO 0x63}{SIZE 0}1,000$" + +gUnknown_085eb74b:: @ 85EB74B .string "ZINC{CLEAR_TO 0x63}{SIZE 0}1,000$" + +gUnknown_085eb75b:: @ 85EB75B .string "HP UP{CLEAR_TO 0x63}{SIZE 0}1,000$" + +gUnknown_085eb76c:: @ 85EB76C .string "PP UP{CLEAR_TO 0x63}{SIZE 0}3,000$" + +gUnknown_085eb77d:: @ 85EB77D .string "RANKING HALL$" + +gUnknown_085eb78a:: @ 85EB78A .string "EXCHANGE SERVICE$" + +gUnknown_085eb79b:: @ 85EB79B .string "LILYCOVE CITY$" + +gUnknown_085eb7a9:: @ 85EB7A9 .string "SLATEPORT CITY$" + +gUnknown_085eb7b8:: @ 85EB7B8 .string "CAVE OF ORIGIN$" + +gUnknown_085eb7c7:: @ 85EB7C7 .string "MT. PYRE$" + +gUnknown_085eb7d0:: @ 85EB7D0 .string "SKY PILLAR$" + +gUnknown_085eb7db:: @ 85EB7DB .string "Don’t remember$" gText_Exit:: @ 85EB7EA .string "EXIT$" + +gUnknown_085eb7ef:: @ 85EB7EF .string "Exit from the BOX?$" + +gUnknown_085eb802:: @ 85EB802 .string "What do you want to do?$" + +gUnknown_085eb81a:: @ 85EB81A .string "Please pick a theme.$" + +gUnknown_085eb82f:: @ 85EB82F .string "Pick the wallpaper.$" + +gUnknown_085eb843:: @ 85EB843 .string "{SPECIAL_F7 0x00} is selected.$" + +gUnknown_085eb853:: @ 85EB853 .string "Jump to which BOX?$" + +gUnknown_085eb866:: @ 85EB866 .string "Deposit in which BOX?$" + +gUnknown_085eb87c:: @ 85EB87C .string "{SPECIAL_F7 0x00} was deposited.$" + +gUnknown_085eb88e:: @ 85EB88E .string "The BOX is full.$" + +gUnknown_085eb89f:: @ 85EB89F .string "Release this POKéMON?$" + +gUnknown_085eb8b5:: @ 85EB8B5 .string "{SPECIAL_F7 0x00} was released.$" + +gUnknown_085eb8c6:: @ 85EB8C6 .string "Bye-bye, {SPECIAL_F7 0x00}!$" + +gUnknown_085eb8d3:: @ 85EB8D3 .string "Mark your POKéMON.$" + +gUnknown_085eb8e6:: @ 85EB8E6 .string "That’s your last POKéMON!$" + +gUnknown_085eb900:: @ 85EB900 .string "Your party’s full!$" + +gUnknown_085eb913:: @ 85EB913 .string "You’re holding a POKéMON!$" + +gUnknown_085eb92d:: @ 85EB92D .string "Which one will you take?$" + +gUnknown_085eb946:: @ 85EB946 .string "You can’t release an EGG.$" + +gUnknown_085eb960:: @ 85EB960 .string "Continue BOX operations?$" + +gUnknown_085eb979:: @ 85EB979 .string "{SPECIAL_F7 0x00} came back!$" + +gUnknown_085eb987:: @ 85EB987 .string "Was it worried about you?$" + +gUnknown_085eb9a1:: @ 85EB9A1 .string "… … … … !$" + +gUnknown_085eb9ab:: @ 85EB9AB .string "Please remove the MAIL.$" + +gUnknown_085eb9c3:: @ 85EB9C3 .string "GIVE to a POKéMON?$" + +gUnknown_085eb9d6:: @ 85EB9D6 .string "Placed item in the BAG.$" + +gUnknown_085eb9ee:: @ 85EB9EE .string "The BAG is full.$" + +gUnknown_085eb9ff:: @ 85EB9FF .string "Put this item in the BAG?$" + +gUnknown_085eba19:: @ 85EBA19 .string "{SPECIAL_F7 0x00} is now held.$" + +gUnknown_085eba29:: @ 85EBA29 .string "Changed to {SPECIAL_F7 0x00}.$" + +gUnknown_085eba38:: @ 85EBA38 .string "MAIL can’t be stored!$" + +gUnknown_085eba4e:: @ 85EBA4E .string "CANCEL$" + +gUnknown_085eba55:: @ 85EBA55 .string "STORE$" + +gUnknown_085eba5b:: @ 85EBA5B .string "WITHDRAW$" + +gUnknown_085eba64:: @ 85EBA64 .string "SHIFT$" + +gUnknown_085eba6a:: @ 85EBA6A .string "MOVE$" + +gUnknown_085eba6f:: @ 85EBA6F .string "PLACE$" + +gUnknown_085eba75:: @ 85EBA75 .string "SUMMARY$" + +gUnknown_085eba7d:: @ 85EBA7D .string "RELEASE$" + +gUnknown_085eba85:: @ 85EBA85 .string "MARK$" + +gUnknown_085eba8a:: @ 85EBA8A .string "NAME$" + +gUnknown_085eba8f:: @ 85EBA8F .string "JUMP$" + +gUnknown_085eba94:: @ 85EBA94 .string "WALLPAPER$" + +gUnknown_085eba9e:: @ 85EBA9E .string "TAKE$" + +gUnknown_085ebaa3:: @ 85EBAA3 .string "GIVE$" + +gUnknown_085ebaa8:: @ 85EBAA8 .string "SWITCH$" + +gUnknown_085ebaaf:: @ 85EBAAF .string "BAG$" + +gUnknown_085ebab3:: @ 85EBAB3 .string "INFO$" + +gUnknown_085ebab8:: @ 85EBAB8 .string "SCENERY 1$" + +gUnknown_085ebac2:: @ 85EBAC2 .string "SCENERY 2$" + +gUnknown_085ebacc:: @ 85EBACC .string "SCENERY 3$" + +gUnknown_085ebad6:: @ 85EBAD6 .string "ETCETERA$" + +gUnknown_085ebadf:: @ 85EBADF .string "FRIENDS$" + +gUnknown_085ebae7:: @ 85EBAE7 .string "FOREST$" + +gUnknown_085ebaee:: @ 85EBAEE .string "CITY$" + +gUnknown_085ebaf3:: @ 85EBAF3 .string "DESERT$" + +gUnknown_085ebafa:: @ 85EBAFA .string "SAVANNA$" + +gUnknown_085ebb02:: @ 85EBB02 .string "CRAG$" + +gUnknown_085ebb07:: @ 85EBB07 .string "VOLCANO$" + +gUnknown_085ebb0f:: @ 85EBB0F .string "SNOW$" + +gUnknown_085ebb14:: @ 85EBB14 .string "CAVE$" + +gUnknown_085ebb19:: @ 85EBB19 .string "BEACH$" + +gUnknown_085ebb1f:: @ 85EBB1F .string "SEAFLOOR$" + +gUnknown_085ebb28:: @ 85EBB28 .string "RIVER$" + +gUnknown_085ebb2e:: @ 85EBB2E .string "SKY$" + +gUnknown_085ebb32:: @ 85EBB32 .string "POLKA-DOT$" + +gUnknown_085ebb3c:: @ 85EBB3C .string "POKéCENTER$" + +gUnknown_085ebb47:: @ 85EBB47 .string "MACHINE$" + +gUnknown_085ebb4f:: @ 85EBB4F .string "SIMPLE$" + +gUnknown_085ebb56:: @ 85EBB56 .string "What would you like to do?$" + +gUnknown_085ebb71:: @ 85EBB71 .string "WITHDRAW POKéMON$" + +gUnknown_085ebb82:: @ 85EBB82 .string "DEPOSIT POKéMON$" + +gUnknown_085ebb92:: @ 85EBB92 .string "MOVE POKéMON$" + +gUnknown_085ebb9f:: @ 85EBB9F .string "MOVE ITEMS$" + +gUnknown_085ebbaa:: @ 85EBBAA .string "SEE YA!$" + +gUnknown_085ebbb2:: @ 85EBBB2 .string "Move POKéMON stored in BOXES to\nyour party.$" + +gUnknown_085ebbde:: @ 85EBBDE .string "Store POKéMON in your party in BOXES.$" + +gUnknown_085ebc04:: @ 85EBC04 .string "Organize the POKéMON in BOXES and\nin your party.$" + +gUnknown_085ebc35:: @ 85EBC35 .string "Move items held by any POKéMON\nin a BOX or your party.$" + +gUnknown_085ebc6c:: @ 85EBC6C .string "Return to the previous menu.$" gText_JustOnePkmn:: @ 85EBC89 @@ -1684,24 +2771,54 @@ gText_PartyFull:: @ 85EBCAD gText_Box:: @ 85EBCC1 .string "BOX$" + +gUnknown_085ebcc5:: @ 85EBCC5 .string "Check the map of the HOENN region.$" + +gUnknown_085ebce8:: @ 85EBCE8 .string "Check POKéMON in detail.$" + +gUnknown_085ebd01:: @ 85EBD01 .string "Call a registered TRAINER.$" + +gUnknown_085ebd1c:: @ 85EBD1C .string "Check obtained RIBBONS.$" + +gUnknown_085ebd34:: @ 85EBD34 .string "Put away the POKéNAV.$" gText_NoRibbonWinners:: @ 85EBD4A .string "There are no RIBBON winners.$" + +gUnknown_085ebd67:: @ 85EBD67 .string "No TRAINERS are registered.$" + +gUnknown_085ebd83:: @ 85EBD83 .string "Check party POKéMON in detail.$" + +gUnknown_085ebda2:: @ 85EBDA2 .string "Check all POKéMON in detail.$" + +gUnknown_085ebdbf:: @ 85EBDBF .string "Return to the POKéNAV menu.$" + +gUnknown_085ebddb:: @ 85EBDDB .string "Find cool POKéMON.$" + +gUnknown_085ebdee:: @ 85EBDEE .string "Find beautiful POKéMON.$" + +gUnknown_085ebe06:: @ 85EBE06 .string "Find cute POKéMON.$" + +gUnknown_085ebe19:: @ 85EBE19 .string "Find smart POKéMON.$" + +gUnknown_085ebe2d:: @ 85EBE2D .string "Find tough POKéMON.$" + +gUnknown_085ebe41:: @ 85EBE41 .string "Return to the CONDITION menu.$" gText_NumberRegistered:: @ 85EBE5F @@ -1710,24 +2827,62 @@ gText_NumberRegistered:: @ 85EBE5F gText_NumberOfBattles:: @ 85EBE6E .string "No. of battles$" + +gUnknown_085ebe7d:: @ 85EBE7D .string "DETAIL$" + +gUnknown_085ebe84:: @ 85EBE84 .string "CALL$" + +gUnknown_085ebe89:: @ 85EBE89 .string "EXIT$" + +gUnknown_085ebe8e:: @ 85EBE8E .string "Can’t call opponent here.$" + +gUnknown_085ebea8:: @ 85EBEA8 .string "STRATEGY$" + +gUnknown_085ebeb1:: @ 85EBEB1 .string "TRAINER’S POKéMON$" + +gUnknown_085ebec3:: @ 85EBEC3 .string "SELF-INTRODUCTION$" + +gUnknown_085ebed5:: @ 85EBED5 .string "{CLEAR 0x80}$" + +gUnknown_085ebed9:: @ 85EBED9 .string "{UNK_CTRL_F800}ZOOM {UNK_CTRL_F801}CANCEL$" + +gUnknown_085ebee9:: @ 85EBEE9 .string "{UNK_CTRL_F800}FULL {UNK_CTRL_F801}CANCEL$" + +gUnknown_085ebef9:: @ 85EBEF9 .string "{UNK_CTRL_F800}CONDITION {UNK_CTRL_F801}CANCEL$" + +gUnknown_085ebf0e:: @ 85EBF0E .string "{UNK_CTRL_F800}MARKINGS {UNK_CTRL_F801}CANCEL$" + +gUnknown_085ebf22:: @ 85EBF22 .string "{UNK_CTRL_F800}SELECT MARK {UNK_CTRL_F801}CANCEL$" + +gUnknown_085ebf39:: @ 85EBF39 .string "{UNK_CTRL_F800}MENU {UNK_CTRL_F801}CANCEL$" + +gUnknown_085ebf49:: @ 85EBF49 .string "{UNK_CTRL_F800}OK {UNK_CTRL_F801}CANCEL$" + +gUnknown_085ebf57:: @ 85EBF57 .string "{UNK_CTRL_F801}CANCEL$" + +gUnknown_085ebf60:: @ 85EBF60 .string "{UNK_CTRL_F800}RIBBONS {UNK_CTRL_F801}CANCEL$" + +gUnknown_085ebf73:: @ 85EBF73 .string "{UNK_CTRL_F800}CHECK {UNK_CTRL_F801}CANCEL$" + +gUnknown_085ebf84:: @ 85EBF84 .string "{UNK_CTRL_F801}CANCEL$" gText_NatureSlash:: @ 85EBF8D @@ -1742,16 +2897,30 @@ gText_InParty:: @ 85EBFCE gText_Number2:: @ 85EBFD7 .string "No. $" + +gUnknown_085ebfdc:: @ 85EBFDC .string "RIBBONS$" + +gUnknown_085ebfe4:: @ 85EBFE4 .string "{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}$" + +gUnknown_085ebff6:: @ 85EBFF6 .string "{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}$" + +gUnknown_085ec008:: @ 85EC008 .string "{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}$" gText_Unknown:: @ 85EC00F .string "UNKNOWN$" + +gUnknown_085ec017:: @ 85EC017 .string "CALL$" + +gUnknown_085ec01c:: @ 85EC01C .string "CHECK$" + +gUnknown_085ec022:: @ 85EC022 .string "CANCEL$" gText_NumberF700:: @ 85EC029 @@ -1760,44 +2929,122 @@ gText_NumberF700:: @ 85EC029 gText_RibbonsF700:: @ 85EC030 .string "RIBBONS {SPECIAL_F7 0x00}$" + +gUnknown_085ec03b:: @ 85EC03B .string "{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}$" + +gUnknown_085ec04f:: @ 85EC04F .string "{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}$" + +gUnknown_085ec063:: @ 85EC063 .string "{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}$" + +gUnknown_085ec06c:: @ 85EC06C .string "Combine four words or phrases$" + +gUnknown_085ec08a:: @ 85EC08A .string "and make your profile.$" + +gUnknown_085ec0a1:: @ 85EC0A1 .string "Combine six words or phrases$" + +gUnknown_085ec0be:: @ 85EC0BE .string "and make a message.$" + +gUnknown_085ec0d2:: @ 85EC0D2 .string "Find words that describe your$" + +gUnknown_085ec0f0:: @ 85EC0F0 .string "feelings right now.$" + +gUnknown_085ec104:: @ 85EC104 .string "With four phrases,$" + +gUnknown_085ec117:: @ 85EC117 .string "Combine nine words or phrases$" + +gUnknown_085ec135:: @ 85EC135 .string "and make a message.$" + +gUnknown_085ec149:: @ 85EC149 .string "Change just one word or phrase$" + +gUnknown_085ec168:: @ 85EC168 .string "and improve the BARD’s song.$" + +gUnknown_085ec185:: @ 85EC185 .string "Your profile$" + +gUnknown_085ec192:: @ 85EC192 .string "Your feeling at the battle’s start$" + +gUnknown_085ec1b5:: @ 85EC1B5 .string "What you say if you win a battle$" + +gUnknown_085ec1d6:: @ 85EC1D6 .string "What you say if you lose a battle$" + +gUnknown_085ec1f8:: @ 85EC1F8 .string "The answer$" + +gUnknown_085ec203:: @ 85EC203 .string "The MAIL message$" + +gUnknown_085ec214:: @ 85EC214 .string "The MAIL salutation$" + +gUnknown_085ec228:: @ 85EC228 .string "The new song$" + +gUnknown_085ec235:: @ 85EC235 .string "Combine two words or phrases$" + +gUnknown_085ec252:: @ 85EC252 .string "and make a trendy saying.$" + +gUnknown_085ec26c:: @ 85EC26C .string "The trendy saying$" + +gUnknown_085ec27e:: @ 85EC27E .string "is as shown. Okay?$" + +gUnknown_085ec291:: @ 85EC291 .string "Combine two words or phrases$" + +gUnknown_085ec2ae:: @ 85EC2AE .string "to teach her a good saying.$" + +gUnknown_085ec2ca:: @ 85EC2CA .string "Find words which fit$" + +gUnknown_085ec2df:: @ 85EC2DF .string "the TRAINER’s image.$" + +gUnknown_085ec2f4:: @ 85EC2F4 .string "The image:$" + +gUnknown_085ec2ff:: @ 85EC2FF .string "Out of the listed choices,$" + +gUnknown_085ec31a:: @ 85EC31A .string "select the answer to the quiz!$" + +gUnknown_085ec339:: @ 85EC339 .string "and create a quiz!$" + +gUnknown_085ec34c:: @ 85EC34C .string "Pick a word or phrase and$" + +gUnknown_085ec366:: @ 85EC366 .string "set the quiz answer.$" + +gUnknown_085ec37b:: @ 85EC37B .string "The answer:$" + +gUnknown_085ec387:: @ 85EC387 .string "The quiz:$" + +gUnknown_085ec391:: @ 85EC391 .string "Apprentice’s phrase:$" gText_QuitEditing:: @ 85EC3A6 @@ -1806,7 +3053,11 @@ gText_QuitEditing:: @ 85EC3A6 gText_StopGivingPkmnMail:: @ 85EC3B4 .string "Stop giving the POKéMON MAIL?$" + +gUnknown_085ec3d2:: @ 85EC3D2 .string "and fill out the questionnaire.$" + +gUnknown_085ec3f2:: @ 85EC3F2 .string "Let’s reply to the interview!$" gText_AllTextBeingEditedWill:: @ 85EC410 @@ -1815,10 +3066,20 @@ gText_AllTextBeingEditedWill:: @ 85EC410 gText_BeDeletedThatOkay:: @ 85EC42F .string "be deleted. Is that okay?$" + +gUnknown_085ec449:: @ 85EC449 .string "Quit editing?$" + +gUnknown_085ec457:: @ 85EC457 .string "The edited text will not be saved.$" + +gUnknown_085ec47a:: @ 85EC47A .string "Is that okay?$" + +gUnknown_085ec488:: @ 85EC488 .string "Please enter a phrase or word.$" + +gUnknown_085ec4a7:: @ 85EC4A7 .string "The entire text can’t be deleted.$" gText_OnlyOnePhrase:: @ 85EC4C9 @@ -1827,27 +3088,63 @@ gText_OnlyOnePhrase:: @ 85EC4C9 gText_OriginalSongWillBeUsed:: @ 85EC4E9 .string "The original song will be used.$" + +gUnknown_085ec509:: @ 85EC509 .string "That’s trendy already!$" gText_CombineTwoWordsOrPhrases:: @ 85EC520 .string "Combine two words or phrases.$" + +gUnknown_085ec53e:: @ 85EC53E .string "Quit giving information?$" + +gUnknown_085ec557:: @ 85EC557 .string "Stop giving the POKéMON MAIL?$" + +gUnknown_085ec575:: @ 85EC575 .string "Create a quiz!$" + +gUnknown_085ec584:: @ 85EC584 .string "Set the answer!$" + +gUnknown_085ec594:: @ 85EC594 .string "Cancel the selection?$" + +gUnknown_085ec5aa:: @ 85EC5AA .string "PROFILE$" + +gUnknown_085ec5b2:: @ 85EC5B2 .string "At the battle’s start:$" + +gUnknown_085ec5c9:: @ 85EC5C9 .string "Upon winning a battle:$" + +gUnknown_085ec5e0:: @ 85EC5E0 .string "Upon losing a battle:$" + +gUnknown_085ec5f6:: @ 85EC5F6 .string "The BARD’s Song$" + +gUnknown_085ec606:: @ 85EC606 .string "What’s hip and happening?$" + +gUnknown_085ec620:: @ 85EC620 .string "Interview$" + +gUnknown_085ec62a:: @ 85EC62A .string "Good saying$" + +gUnknown_085ec636:: @ 85EC636 .string "Fan’s question$" + +gUnknown_085ec645:: @ 85EC645 .string "クイズ㮠ã“ãŸãˆã¯ï¼Ÿ$" @ "kuizuno kotaeha?" ("The quiz's answer is?" in Japanese) + +gUnknown_085ec650:: @ 85EC650 .string "Apprentice’s phrase$" + +gUnknown_085ec664:: @ 85EC664 .string "QUESTIONNAIRE$" gText_YouCannotQuitHere:: @ 85EC672 @@ -1862,8 +3159,14 @@ gText_F700sQuiz:: @ 85EC6A8 gText_Lady:: @ 85EC6B2 .string "Lady$" + +gUnknown_085ec6b7:: @ 85EC6B7 .string "After you have read the quiz$" + +gUnknown_085ec6d4:: @ 85EC6D4 .string "question, press the A Button.$" + +gUnknown_085ec6f2:: @ 85EC6F2 .string "The quiz answer is?$" gText_LikeToQuitQuiz:: @ 85EC706 @@ -1872,6 +3175,8 @@ gText_LikeToQuitQuiz:: @ 85EC706 gText_ChallengeQuestionMark:: @ 85EC727 .string "challenge?$" + +gUnknown_085ec732:: @ 85EC732 .string "Is this quiz OK?$" gText_CreateAQuiz:: @ 85EC743 @@ -1883,16 +3188,30 @@ gText_SelectTheAnswer:: @ 85EC752 gText_LyricsCantBeDeleted:: @ 85EC765 .string "The lyrics can’t be deleted.$" + +gUnknown_085ec782:: @ 85EC782 .string "POKéMON LEAGUE$" + +gUnknown_085ec791:: @ 85EC791 .string "POKéMON CENTER$" gText_GetsAPokeBlockQuestion:: @ 85EC7A0 .string " gets a {POKEBLOCK}?$" + +gUnknown_085ec7af:: @ 85EC7AF .string "Coolness $" + +gUnknown_085ec7b9:: @ 85EC7B9 .string "Beauty $" + +gUnknown_085ec7c1:: @ 85EC7C1 .string "Cuteness $" + +gUnknown_085ec7cb:: @ 85EC7CB .string "Smartness $" + +gUnknown_085ec7d6:: @ 85EC7D6 .string "Toughness $" gText_WasEnhanced:: @ 85EC7E1 @@ -2015,69 +3334,193 @@ gText_Second:: @ 85ECB80 gText_Third:: @ 85ECB87 .string "third$" + +gUnknown_085ecb8d:: @ 85ECB8D .string "0 pts$" + +gUnknown_085ecb93:: @ 85ECB93 .string "10 pts$" + +gUnknown_085ecb9a:: @ 85ECB9A .string "20 pts$" + +gUnknown_085ecba1:: @ 85ECBA1 .string "30 pts$" + +gUnknown_085ecba8:: @ 85ECBA8 .string "40 pts$" + +gUnknown_085ecbaf:: @ 85ECBAF .string "50 pts$" + +gUnknown_085ecbb6:: @ 85ECBB6 .string "60 pts$" + +gUnknown_085ecbbd:: @ 85ECBBD .string "70 pts$" + +gUnknown_085ecbc4:: @ 85ECBC4 .string "80 pts$" + +gUnknown_085ecbcb:: @ 85ECBCB .string "90 pts$" + +gUnknown_085ecbd2:: @ 85ECBD2 .string "100 pts$" + +gUnknown_085ecbda:: @ 85ECBDA .string "?$" + +gUnknown_085ecbdc:: @ 85ECBDC .string "KISS POSTER{CLEAR_TO 0x5E}16BP$" + +gUnknown_085ecbef:: @ 85ECBEF .string "KISS CUSHION{CLEAR_TO 0x5E}32BP$" + +gUnknown_085ecc03:: @ 85ECC03 .string "SMOOCHUM DOLL{CLEAR_TO 0x5E}32BP$" + +gUnknown_085ecc18:: @ 85ECC18 .string "TOGEPI DOLL{CLEAR_TO 0x5E}48BP$" + +gUnknown_085ecc2b:: @ 85ECC2B .string "MEOWTH DOLL{CLEAR_TO 0x5E}48BP$" + +gUnknown_085ecc3e:: @ 85ECC3E .string "CLEFAIRY DOLL{CLEAR_TO 0x5E}48BP$" + +gUnknown_085ecc53:: @ 85ECC53 .string "DITTO DOLL{CLEAR_TO 0x5E}48BP$" + +gUnknown_085ecc65:: @ 85ECC65 .string "CYNDAQUIL DOLL{CLEAR_TO 0x5E}80BP$" + +gUnknown_085ecc7b:: @ 85ECC7B .string "CHIKORITA DOLL{CLEAR_TO 0x5E}80BP$" + +gUnknown_085ecc91:: @ 85ECC91 .string "TOTODILE DOLL{CLEAR_TO 0x5E}80BP$" + +gUnknown_085ecca6:: @ 85ECCA6 .string "LAPRAS DOLL{CLEAR_TO 0x58}128BP$" + +gUnknown_085eccba:: @ 85ECCBA .string "SNORLAX DOLL{CLEAR_TO 0x58}128BP$" + +gUnknown_085ecccf:: @ 85ECCCF .string "VENUSAUR DOLL{CLEAR_TO 0x58}256BP$" + +gUnknown_085ecce5:: @ 85ECCE5 .string "CHARIZARD DOLL{CLEAR_TO 0x58}256BP$" + +gUnknown_085eccfc:: @ 85ECCFC .string "BLASTOISE DOLL{CLEAR_TO 0x58}256BP$" + +gUnknown_085ecd13:: @ 85ECD13 .string "PROTEIN{CLEAR_TO 0x64}1BP$" + +gUnknown_085ecd21:: @ 85ECD21 .string "CALCIUM{CLEAR_TO 0x64}1BP$" + +gUnknown_085ecd2f:: @ 85ECD2F .string "IRON{CLEAR_TO 0x64}1BP$" + +gUnknown_085ecd3a:: @ 85ECD3A .string "ZINC{CLEAR_TO 0x64}1BP$" + +gUnknown_085ecd45:: @ 85ECD45 .string "CARBOS{CLEAR_TO 0x64}1BP$" + +gUnknown_085ecd52:: @ 85ECD52 .string "HP UP{CLEAR_TO 0x64}1BP$" + +gUnknown_085ecd5e:: @ 85ECD5E .string "LEFTOVERS{CLEAR_TO 0x5E}48BP$" + +gUnknown_085ecd6f:: @ 85ECD6F .string "WHITE HERB{CLEAR_TO 0x5E}48BP$" + +gUnknown_085ecd81:: @ 85ECD81 .string "QUICK CLAW{CLEAR_TO 0x5E}48BP$" + +gUnknown_085ecd93:: @ 85ECD93 .string "MENTAL HERB{CLEAR_TO 0x5E}48BP$" + +gUnknown_085ecda6:: @ 85ECDA6 .string "BRIGHTPOWDER{CLEAR_TO 0x5E}64BP$" + +gUnknown_085ecdba:: @ 85ECDBA .string "CHOICE BAND{CLEAR_TO 0x5E}64BP$" + +gUnknown_085ecdcd:: @ 85ECDCD .string "KING’S ROCK{CLEAR_TO 0x5E}64BP$" + +gUnknown_085ecde0:: @ 85ECDE0 .string "FOCUS BAND{CLEAR_TO 0x5E}64BP$" + +gUnknown_085ecdf2:: @ 85ECDF2 .string "SCOPE LENS{CLEAR_TO 0x5E}64BP$" + +gUnknown_085ece04:: @ 85ECE04 .string "SOFTBOILED{CLEAR_TO 0x4E}16BP$" + +gUnknown_085ece16:: @ 85ECE16 .string "SEISMIC TOSS{CLEAR_TO 0x4E}24BP$" + +gUnknown_085ece2a:: @ 85ECE2A .string "DREAM EATER{CLEAR_TO 0x4E}24BP$" + +gUnknown_085ece3d:: @ 85ECE3D .string "MEGA PUNCH{CLEAR_TO 0x4E}24BP$" + +gUnknown_085ece4f:: @ 85ECE4F .string "MEGA KICK{CLEAR_TO 0x4E}48BP$" + +gUnknown_085ece60:: @ 85ECE60 .string "BODY SLAM{CLEAR_TO 0x4E}48BP$" + +gUnknown_085ece71:: @ 85ECE71 .string "ROCK SLIDE{CLEAR_TO 0x4E}48BP$" + +gUnknown_085ece83:: @ 85ECE83 .string "COUNTER{CLEAR_TO 0x4E}48BP$" + +gUnknown_085ece92:: @ 85ECE92 .string "THUNDER WAVE{CLEAR_TO 0x4E}48BP$" + +gUnknown_085ecea6:: @ 85ECEA6 .string "SWORDS DANCE{CLEAR_TO 0x4E}48BP$" + +gUnknown_085eceba:: @ 85ECEBA .string "DEFENSE CURL{CLEAR_TO 0x4E}16BP$" + +gUnknown_085ecece:: @ 85ECECE .string "SNORE{CLEAR_TO 0x4E}24BP$" + +gUnknown_085ecedb:: @ 85ECEDB .string "MUD-SLAP{CLEAR_TO 0x4E}24BP$" + +gUnknown_085eceeb:: @ 85ECEEB .string "SWIFT{CLEAR_TO 0x4E}24BP$" + +gUnknown_085ecef8:: @ 85ECEF8 .string "ICY WIND{CLEAR_TO 0x4E}24BP$" + +gUnknown_085ecf08:: @ 85ECF08 .string "ENDURE{CLEAR_TO 0x4E}48BP$" + +gUnknown_085ecf16:: @ 85ECF16 .string "PSYCH UP{CLEAR_TO 0x4E}48BP$" + +gUnknown_085ecf26:: @ 85ECF26 .string "ICE PUNCH{CLEAR_TO 0x4E}48BP$" + +gUnknown_085ecf37:: @ 85ECF37 .string "THUNDERPUNCH{CLEAR_TO 0x4E}48BP$" + +gUnknown_085ecf4b:: @ 85ECF4B .string "FIRE PUNCH{CLEAR_TO 0x4E}48BP$" - + gText_PkmnFainted3:: @ 85ECF5D .string "{STR_VAR_1} fainted…\p\n$" @@ -2093,6 +3536,8 @@ gText_TrainerCardIDNo:: @ 85ECF78 gText_TrainerCardMoney:: @ 85ECF7E .string "MONEY$" + +gUnknown_085ecf84:: @ 85ECF84 .string "Â¥$" gText_TrainerCardPokedex:: @ 85ECF86 @@ -2104,11 +3549,15 @@ gText_EmptyString6:: @ 85ECF8E gText_Colon2:: @ 85ECF8F .string ":$" + +gUnknown_085ecf91:: @ 85ECF91 .string " points$" gText_TrainerCardTime:: @ 85ECF99 .string "TIME$" + +gUnknown_085ecf9e:: @ 85ECF9E .string "ゲ-ムãƒã‚¤ãƒ³ãƒˆ$" @ "geemupointo" ("game point" in Japanese) gText_Var1sTrainerCard:: @ 85ECFA6 @@ -2117,7 +3566,11 @@ gText_Var1sTrainerCard:: @ 85ECFA6 gText_HallOfFameDebut:: @ 85ECFB8 .string "HALL OF FAME DEBUT $" + +gUnknown_085ecfcd:: @ 85ECFCD .string "LINK BATTLES$" + +gUnknown_085ecfda:: @ 85ECFDA .string "LINK CABLE BATTLES$" gText_WinsLosses:: @ 85ECFED @@ -2156,27 +3609,51 @@ gText_BattleTower:: @ 85ED0D3 gText_WSlashStraightSlash:: @ 85ED0E0 .string "W/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY} STRAIGHT/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_2}$" + +gUnknown_085ed104:: @ 85ED104 .string "BATTLE TOWER$" + +gUnknown_085ed111:: @ 85ED111 .string "BATTLE DOME$" + +gUnknown_085ed11d:: @ 85ED11D .string "BATTLE PALACE$" + +gUnknown_085ed12b:: @ 85ED12B .string "BATTLE FACTORY$" + +gUnknown_085ed13a:: @ 85ED13A .string "BATTLE ARENA$" + +gUnknown_085ed147:: @ 85ED147 .string "BATTLE PIKE$" + +gUnknown_085ed153:: @ 85ED153 .string "BATTLE PYRAMID$" .align 2 + +gUnknown_085ed164:: @ 85ED164 .string "{STR_VAR_1} SINGLE$" .align 2 + +gUnknown_085ed170:: @ 85ED170 .string "{STR_VAR_1} DOUBLE$" .align 2 + +gUnknown_085ed17c:: @ 85ED17C .string "{STR_VAR_1} MULTI$" .align 2 + +gUnknown_085ed188:: @ 85ED188 .string "{STR_VAR_1} LINK$" .align 2 + +gUnknown_085ed190:: @ 85ED190 .string "{STR_VAR_1}$" gText_Give:: @ 85ED193 @@ -2218,11 +3695,15 @@ gText_CommunicationStandby:: @ 85ED207 gText_ColorDarkGrey:: @ 85ED21E .string "{COLOR DARK_GREY}$" + +gUnknown_085ed222:: @ 85ED222 .string "{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR6 WHITE DYNAMIC_COLOR5}$" gText_HighlightDarkGrey:: @ 85ED228 .string "{HIGHLIGHT DARK_GREY}$" + +gUnknown_085ed22c:: @ 85ED22C .string " $" gText_DynColor2Male:: @ 85ED22E @@ -2233,22 +3714,22 @@ gText_DynColor1Female:: @ 85ED233 gText_DynColor2:: @ 85ED238 .string "{COLOR DYNAMIC_COLOR2}$" - + gText_Upper:: @ 85ED23C .string "UPPER$" - + gText_Lower:: @ 85ED242 .string "lower$" - + gText_Others:: @ 85ED248 .string "OTHERS$" - + gText_Symbols:: @ 85ED24F .string "SYMBOLS$" - + gText_Register2:: @ 85ED257 .string "REGISTER$" - + gText_Exit2:: @ 85ED260 .string "EXIT$" @@ -2270,7 +3751,11 @@ gText_F700JoinedChat:: @ 85ED2A9 gText_F700LeftChat:: @ 85ED2BD .string "{SPECIAL_F7 0x00} left the chat.$" + +gUnknown_085ed2cf:: @ 85ED2CF .string "{SPECIAL_F7 0x00}ã®{SPECIAL_F7 0x01}ã²ãã‚:$" @ "{SPECIAL_F7 0x00}'s {SPECIAL_F7 0x01}hikime" + +gUnknown_085ed2d9:: @ 85ED2D9 .string "{SPECIAL_F7 0x00}ã®{SPECIAL_F7 0x01}ã²ãã‚㯠ã„ã¾ã›ã‚“$" @ "{SPECIAL_F7 0x00}'s {SPECIAL_F7 0x01}hikimeha imasen" gText_ExitingChat:: @ 85ED2E8 @@ -2324,26 +3809,54 @@ gText_ThankYou:: @ 85ED440 gText_ByeBye:: @ 85ED44A .string "BYE-BYE!$" + +gUnknown_085ed453:: @ 85ED453 .string "Attack the weak points!$" + +gUnknown_085ed46b:: @ 85ED46B .string "Ultimate STEEL POKéMON.$" + +gUnknown_085ed483:: @ 85ED483 .string "I’d climb even waterfalls$" + +gUnknown_085ed49d:: @ 85ED49D .string "to find a rare stone!$" + +gUnknown_085ed4b3:: @ 85ED4B3 .string "I’m the strongest and most$" + +gUnknown_085ed4ce:: @ 85ED4CE .string "energetic after all!$" + +gUnknown_085ed4e3:: @ 85ED4E3 .string "Battle with knowledge!$" + +gUnknown_085ed4fa:: @ 85ED4FA .string "I will use various POKéMON.$" + +gUnknown_085ed516:: @ 85ED516 .string "I’ll be a better POKéMON$" + +gUnknown_085ed52f:: @ 85ED52F .string "prof than my father is!$" + +gUnknown_085ed547:: @ 85ED547 .string "I’m not so good at battles.$" + +gUnknown_085ed563:: @ 85ED563 .string "I’ll use any POKéMON!$" + +gUnknown_085ed579:: @ 85ED579 .string "My POKéMON and I help$" + +gUnknown_085ed58f:: @ 85ED58F .string "my father’s research.$" gText_HatchedFromEgg:: @ 85ED5A5 .string "{STR_VAR_1} hatched from the EGG!$" gText_NickHatchPrompt:: @ 85ED5BE - .string "Would you like to nickname the newly\nhatched {STR_VAR_1}?$" + .string "Would you like to nickname the newly\nhatched {STR_VAR_1}?$" .align 2 gText_ReadyToBerryCrush:: @ 85ED5F0 @@ -2404,7 +3917,7 @@ gText_Var1Berry:: @ 85ED7FC .align 2 gText_TimeColon:: @ 85ED808 .string "Time:$" - + .align 2 gText_PressingSpeed:: @ 85ED810 .string "Pressing Speed:$" @@ -2479,35 +3992,95 @@ gText_BattleRecord:: @ 85ED90E gText_BattlePoints:: @ 85ED91C .string "Battle Points$" + +gUnknown_085ed92a:: @ 85ED92A .string "CANCEL$" + +gUnknown_085ed931:: @ 85ED931 .string "$" + +gUnknown_085ed932:: @ 85ED932 .string "Check BATTLE FRONTIER MAP.$" + +gUnknown_085ed94d:: @ 85ED94D .string "Check TRAINER CARD.$" + +gUnknown_085ed961:: @ 85ED961 .string "View recorded battle.$" + +gUnknown_085ed977:: @ 85ED977 .string "Put away the FRONTIER PASS.$" + +gUnknown_085ed993:: @ 85ED993 .string "Your current Battle Points.$" + +gUnknown_085ed9af:: @ 85ED9AF .string "Your collected Symbols.$" + +gUnknown_085ed9c7:: @ 85ED9C7 .string "Battle Tower - Ability Symbol$" + +gUnknown_085ed9e5:: @ 85ED9E5 .string "Battle Dome - Tactics Symbol$" + +gUnknown_085eda02:: @ 85EDA02 .string "Battle Palace - Spirits Symbol$" + +gUnknown_085eda21:: @ 85EDA21 .string "Battle Arena - Guts Symbol$" + +gUnknown_085eda3c:: @ 85EDA3C .string "Battle Factory - Knowledge Symbol$" + +gUnknown_085eda5e:: @ 85EDA5E .string "Battle Pike - Luck Symbol$" + +gUnknown_085eda78:: @ 85EDA78 .string "Battle Pyramid - Brave Symbol$" + +gUnknown_085eda96:: @ 85EDA96 .string "There is no Battle Record.$" + +gUnknown_085edab1:: @ 85EDAB1 .string "BATTLE TOWER$" + +gUnknown_085edabe:: @ 85EDABE .string "BATTLE DOME$" + +gUnknown_085edaca:: @ 85EDACA .string "BATTLE PALACE$" + +gUnknown_085edad8:: @ 85EDAD8 .string "BATTLE ARENA$" + +gUnknown_085edae5:: @ 85EDAE5 .string "BATTLE FACTORY$" + +gUnknown_085edaf4:: @ 85EDAF4 .string "BATTLE PIKE$" + +gUnknown_085edb00:: @ 85EDB00 .string "BATTLE PYRAMID$" + +gUnknown_085edb0f:: @ 85EDB0F .string "KO opponents and aim for the top!\nYour ability will be tested.$" + +gUnknown_085edb4e:: @ 85EDB4E .string "Keep winning at the tournament!\nYour tactics will be tested.$" + +gUnknown_085edb8b:: @ 85EDB8B .string "Watch your POKéMON battle!\nYour spirit will be tested.$" + +gUnknown_085edbc2:: @ 85EDBC2 .string "Win battles with teamed-up POKéMON!\nYour guts will be tested.$" + +gUnknown_085edc00:: @ 85EDC00 .string "Aim for victory using rental POKéMON!\nYour knowledge will be tested.$" + +gUnknown_085edc45:: @ 85EDC45 .string "Select one of three paths to battle!\nYour luck will be tested.$" + +gUnknown_085edc84:: @ 85EDC84 .string "Aim for the top with exploration!\nYour bravery will be tested.$" gText_ContinueMenuPlayer:: @ 85EDCC3 @@ -2542,7 +4115,7 @@ gText_BerryPickingResults:: @ 85EDD49 gText_10P30P50P50P:: @ 85EDD6B .string "{CLEAR_TO 0x03}10P{CLEAR_TO 0x2B}30P{CLEAR_TO 0x53}50P{CLEAR_TO 0x77}{UNK_CTRL_F9DD}50P$" - + gText_AnnouncingRankings:: @ 85EDD86 .string "Announcing rankings!$" @@ -2639,6 +4212,8 @@ gText_4th:: @ 85EDFAC gText_Friend:: @ 85EDFB0 .string "Friend$" + +gUnknown_085edfb7:: @ 85EDFB7 .string "POKeMON$" gJPText_MysteryGift:: @ 85EDFBF @@ -2690,8 +4265,13 @@ gUnknown_085EE120:: @ 85EE120 gUnknown_085EE12D:: @ 85EE12D .byte 0x06, 0x07, 0x0a, 0x20, 0x00, 0x54, 0x77, 0xae, 0x00, 0x44, 0x0d, 0xfe, 0x94, 0xae, 0x60, 0x37, 0x00, 0x1e, 0x40, 0x2e, 0x00, 0x44, 0x07, 0x1f, 0x0e, 0x2e, 0x44, 0x0c, 0x10, 0xff +gUnknown_085ee14b:: @ 85EE14B .string "RED$" + +gUnknown_085ee14f:: @ 85EE14F .string "BLUE$" + +gUnknown_085ee154:: @ 85EE154 .string "---$" gText_SingleBattleRoomResults:: @ 85EE158 @@ -2779,31 +4359,49 @@ gText_FloorsCleared:: @ 85EE39C .string "Floors cleared: {STR_VAR_1}$" .align 2 + +gUnknown_085ee3b0:: @ 85EE3B0 .string "LV. 50$" .align 2 + +gUnknown_085ee3b8:: @ 85EE3B8 .string "OPEN LEVEL$" .align 2 + +gUnknown_085ee3c4:: @ 85EE3C4 .string "Win streak: {STR_VAR_2}$" .align 2 + +gUnknown_085ee3d4:: @ 85EE3D4 .string "Clear streak: {STR_VAR_2}$" .align 2 + +gUnknown_085ee3e8:: @ 85EE3E8 .string "Rooms cleared: {STR_VAR_2}$" .align 2 + +gUnknown_085ee3fc:: @ 85EE3FC .string "KOs in a row: {STR_VAR_2}$" .align 2 + +gUnknown_085ee410:: @ 85EE410 .string "Floors cleared: {STR_VAR_2}$" .align 2 gText_1Dot:: @ 85EE424 .string "1.$" + +gUnknown_085ee427:: @ 85EE427 .string "2.$" + +gUnknown_085ee42a:: @ 85EE42A .string "3.$" gText_SavingDontTurnOff2:: @ 85EE42D @@ -2842,12 +4440,26 @@ gText_ABtnTitleScreen:: @ 85EE572 gText_Option:: @ 85EE589 .string "OPTION$" + +gUnknown_085ee590:: @ 85EE590 .string "TEXT SPEED$" + +gUnknown_085ee59b:: @ 85EE59B .string "BATTLE SCENE$" + +gUnknown_085ee5a8:: @ 85EE5A8 .string "BATTLE STYLE$" + +gUnknown_085ee5b5:: @ 85EE5B5 .string "SOUND$" + +gUnknown_085ee5bb:: @ 85EE5BB .string "FRAME$" + +gUnknown_085ee5c1:: @ 85EE5C1 .string "CANCEL$" + +gUnknown_085ee5c8:: @ 85EE5C8 .string "BUTTON MODE$" gText_TextSpeedSlow:: @ 85EE5D4 @@ -2895,9 +4507,17 @@ gText_ButtonTypeLEqualsA:: @ 85EE65D gText_XPLink:: @ 85EE667 .string "{STR_VAR_1}P LINK$" + +gUnknown_085ee670:: @ 85EE670 .string "BRONZE$" + +gUnknown_085ee677:: @ 85EE677 .string "COPPER$" + +gUnknown_085ee67e:: @ 85EE67E .string "SILVER$" + +gUnknown_085ee685:: @ 85EE685 .string "GOLD$" gText_Day:: @ 85EE68A @@ -2909,20 +4529,50 @@ gText_Colon3:: @ 85EE68E gText_Confirm2:: @ 85EE690 .string "CONFIRM$" + +gUnknown_085ee698:: @ 85EE698 .string "Days$" + +gUnknown_085ee69d:: @ 85EE69D .string "Time:$" + +gUnknown_085ee6a3:: @ 85EE6A3 .string "Game time$" + +gUnknown_085ee6ad:: @ 85EE6AD .string "RTC time$" + +gUnknown_085ee6b6:: @ 85EE6B6 .string "Updated time$" + +gUnknown_085ee6c3:: @ 85EE6C3 .string "POKéDEX$" + +gUnknown_085ee6cb:: @ 85EE6CB .string "POKéMON$" + +gUnknown_085ee6d3:: @ 85EE6D3 .string "BAG$" + +gUnknown_085ee6d7:: @ 85EE6D7 .string "POKéNAV$" + +gUnknown_085ee6df:: @ 85EE6DF .string "{PLAYER}$" + +gUnknown_085ee6e2:: @ 85EE6E2 .string "SAVE$" + +gUnknown_085ee6e7:: @ 85EE6E7 .string "OPTION$" + +gUnknown_085ee6ee:: @ 85EE6EE .string "EXIT$" + +gUnknown_085ee6f3:: @ 85EE6F3 .string "RETIRE$" + +gUnknown_085ee6fa:: @ 85EE6FA .string "REST$" gText_SafariBallStock:: @ 85EE6FF @@ -2931,13 +4581,29 @@ gText_SafariBallStock:: @ 85EE6FF gText_BattlePyramidFloor:: @ 85EE716 .string "Battle Pyramid\n{STR_VAR_1}$" + +gUnknown_085ee728:: @ 85EE728 .string "Floor 1$" + +gUnknown_085ee730:: @ 85EE730 .string "Floor 2$" + +gUnknown_085ee738:: @ 85EE738 .string "Floor 3$" + +gUnknown_085ee740:: @ 85EE740 .string "Floor 4$" + +gUnknown_085ee748:: @ 85EE748 .string "Floor 5$" + +gUnknown_085ee750:: @ 85EE750 .string "Floor 6$" + +gUnknown_085ee758:: @ 85EE758 .string "Floor 7$" + +gUnknown_085ee760:: @ 85EE760 .string "Peak$" gText_LinkStandby2:: @ 85EE765 @@ -2958,7 +4624,11 @@ gText_EventSafelyLoaded:: @ 85EE80A gText_LoadErrorEndingSession:: @ 85EE827 .string "Loading error.\nEnding session.$" + +gUnknown_085ee846:: @ 85EE846 .string "プレイヤー$" @ "pureiyaa" ("player" in Japanese) + +gUnknown_085ee84c:: @ 85EE84C .string "ã•ã¾$" @ "sama" (a very high honorific) gText_DexHoenn:: @ 85EE84F @@ -2969,8 +4639,12 @@ gText_DexNational:: @ 85EE855 gText_PokedexDiploma:: @ 85EE85E .string "PLAYER: {CLEAR 0x10}{COLOR RED}{SHADOW LIGHT_RED}{PLAYER}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}\n\nThis document certifies\nthat you have successfully\ncompleted your\n{STR_VAR_1} POKéDEX.\n\n{CLEAR_TO 0x42}{COLOR RED}{SHADOW LIGHT_RED}GAME FREAK$" - + + +gUnknown_085ee8dc:: @ 85EE8DC .string "{COLOR RED}{SHADOW LIGHT_RED}ゲ-ムフリ-ク$" @ geemufuriku ("Game Freak" in Japanese) + +gUnknown_085ee8ea:: @ 85EE8EA .string "{COLOR RED}{SHADOW LIGHT_RED}$" gText_Hoenn:: @ 85EE8F1 @@ -3006,11 +4680,23 @@ gText_TakeGoodCareOfX:: @ 85EE977 gText_ThreeQuestionMarks:: @ 85EEA42 .string "???$" + +gUnknown_085eea46:: @ 85EEA46 .string "MAX. HP$" + +gUnknown_085eea4e:: @ 85EEA4E .string "ATTACK$" + +gUnknown_085eea55:: @ 85EEA55 .string "DEFENSE$" + +gUnknown_085eea5d:: @ 85EEA5D .string "SPEED$" + +gUnknown_085eea63:: @ 85EEA63 .string "SP. ATK$" + +gUnknown_085eea6b:: @ 85EEA6B .string "SP. DEF$" gText_UnkCtrlF904:: @ 85EEA73 @@ -3028,9 +4714,17 @@ gText_MixingRecords:: @ 85EEA7E gText_RecordMixingComplete:: @ 85EEA8E .string "Record mixing completed.\nThank you for waiting.$" + +gUnknown_085eeabe:: @ 85EEABE .string "YOUR NAME?$" + +gUnknown_085eeac9:: @ 85EEAC9 .string "BOX NAME?$" + +gUnknown_085eead3:: @ 85EEAD3 .string "{STR_VAR_1}’s nickname?$" + +gUnknown_085eeae2:: @ 85EEAE2 .string "Tell him the words.$" gText_MoveOkBack:: @ 85EEAF6 @@ -3159,12 +4853,18 @@ gText_PkmnForSwap:: @ 85EECD1 gText_Cancel3:: @ 85EECDD .string "CANCEL$" + +gUnknown_085eece4:: @ 85EECE4 .string "SWAP$" + +gUnknown_085eece9:: @ 85EECE9 .string "ACCEPT$" gText_AcceptThisPkmn:: @ 85EECF0 .string "Accept this POKéMON?$" + +gUnknown_085eed05:: @ 85EED05 .string " $" gText_SamePkmnInPartyAlready:: @ 85EED0A @@ -3193,7 +4893,7 @@ gText_PeopleTrading:: @ 85EED5F gText_PeopleBattling:: @ 85EED6F .string "People battling:$" - + gText_PeopleInUnionRoom:: @ 85EED80 .string "People in the UNION ROOM:$" @@ -3202,13 +4902,13 @@ gText_PeopleCommunicating:: @ 85EED9A gText_F700Players:: @ 85EEDB0 .string "{SPECIAL_F7 0} players$" - + gText_F701Players:: @ 85EEDBB .string "{SPECIAL_F7 1} players$" - + gText_F702Players:: @ 85EEDC6 .string "{SPECIAL_F7 2} players$" - + gText_F703Players:: @ 85EEDD1 .string "{SPECIAL_F7 3} players$" @@ -3218,53 +4918,53 @@ gText_F703Players:: @ 85EEDD1 .4byte gText_F702Players .4byte gText_F703Players - .align 2 + .align 2 gText_WonderCards:: @ 85EEDEC - .string "WONDER CARDS$" + .string "WONDER CARDS$" - .align 2 + .align 2 gText_WonderNews:: @ 85EEDFC - .string "WONDER NEWS$" + .string "WONDER NEWS$" - .align 2 + .align 2 gText_WirelessCommunication:: @ 85EEE08 - .string "WIRELESS COMMUNICATION$" + .string "WIRELESS COMMUNICATION$" - .align 2 + .align 2 gText_Friend2:: @ 85EEE20 - .string "FRIEND$" + .string "FRIEND$" - .align 2 + .align 2 gText_Exit3:: @ 85EEE28 - .string "EXIT$" + .string "EXIT$" - .align 2 + .align 2 gText_Receive:: @ 85EEE30 - .string "RECEIVE$" + .string "RECEIVE$" - .align 2 + .align 2 gText_Send:: @ 85EEE38 - .string "SEND$" + .string "SEND$" - .align 2 + .align 2 gText_Toss:: @ 85EEE40 - .string "TOSS$" + .string "TOSS$" - .align 2 + .align 2 gText_VarietyOfEventsImportedWireless:: @ 85EEE48 - .string "A variety of events will be imported\nover Wireless Communication.$" + .string "A variety of events will be imported\nover Wireless Communication.$" - .align 2 -gText_WonderCardsInPossession:: @ 85EEE40 - .string "Read the WONDER CARDS in your\npossession.$" + .align 2 +gText_WonderCardsInPossession:: @ 85EEE8C + .string "Read the WONDER CARDS in your\npossession.$" - .align 2 + .align 2 gText_ReadNewsThatArrived:: @ 85EEEB8 - .string "Read the NEWS that arrived.$" + .string "Read the NEWS that arrived.$" - .align 2 + .align 2 gText_ReturnToTitle:: @ 85EEED4 - .string "Return to the title screen.$" + .string "Return to the title screen.$" .align 2 gText_DontHaveCardNewOneInput:: @ 85EEEF0 @@ -3283,63 +4983,65 @@ gText_WhereShouldNewsBeAccessed:: @ 85EEF94 .string "Where should the WONDER NEWS\nbe accessed?$" .align 2 + +gUnknown_085eefc0:: @ 85EEFC0 .string "Communication standby…\nB Button: Cancel$" .align 2 gText_Communicating:: @ 85EEFE8 - .string "Communicating…$" + .string "Communicating…$" .align 2 gText_CommunicationCompleted:: @ 85EEFF8 - .string "Communication completed.$" + .string "Communication completed.$" .align 2 gText_CommunicationError:: @ 85EF014 - .string "Communication error.$" + .string "Communication error.$" .align 2 gText_CommunicationCanceled:: @ 85EF02C - .string "Communication has been canceled.$" + .string "Communication has been canceled.$" .align 2 gText_ThrowAwayWonderCard:: @ 85EF050 - .string "Throw away the WONDER CARD\nand input a new CARD?$" + .string "Throw away the WONDER CARD\nand input a new CARD?$" .align 2 gText_HaventReceivedCardsGift:: @ 85EF084 - .string "You haven’t received the CARD’s gift\nyet. Input a new CARD anyway?$" + .string "You haven’t received the CARD’s gift\nyet. Input a new CARD anyway?$" .align 2 gText_WonderCardReceivedFrom:: @ 85EF0C8 - .string "A WONDER CARD has been received\nfrom {STR_VAR_1}.$" + .string "A WONDER CARD has been received\nfrom {STR_VAR_1}.$" .align 2 gText_WonderNewsReceivedFrom:: @ 85EF0F4 - .string "A WONDER NEWS item has been\nreceived from {STR_VAR_1}.$" + .string "A WONDER NEWS item has been\nreceived from {STR_VAR_1}.$" .align 2 gText_WonderCardReceived:: @ 85EF124 - .string "A new WONDER CARD has been\nreceived.$" + .string "A new WONDER CARD has been\nreceived.$" .align 2 gText_WonderNewsReceived:: @ 85EF14C - .string "A new WONDER NEWS item has been\nreceived.$" + .string "A new WONDER NEWS item has been\nreceived.$" .align 2 gText_NewStampReceived:: @ 85EF178 - .string "A new STAMP has been received.$" + .string "A new STAMP has been received.$" .align 2 gText_NewTrainerReceived:: @ 85EF198 - .string "A new TRAINER has arrived.$" + .string "A new TRAINER has arrived.$" .align 2 gText_AlreadyHadCard:: @ 85EF1B4 - .string "You already had that\nWONDER CARD.$" + .string "You already had that\nWONDER CARD.$" .align 2 gText_AlreadyHadNews:: @ 85EF1D8 - .string "You already had that\nWONDER NEWS item.$" + .string "You already had that\nWONDER NEWS item.$" .align 2 gText_AlreadyHadStamp:: @ 85EF200 @@ -3465,7 +5167,7 @@ gText_TotalRecordWLD:: @ 85EF6A1 gText_WinLoseDraw:: @ 85EF6BD .string "{CLEAR_TO 0x53}WIN{CLEAR_TO 0x80}LOSE{CLEAR_TO 0xB0}DRAW$" - + gText_CommunicationStandby5:: @ 85EF6D2 .string "Communication standby…$" @@ -3484,9 +5186,17 @@ gText_YouDontHaveThreeCoins:: @ 85EF734 gText_ReelTimeHelp:: @ 85EF750 .string "REEL TIME\nHere’s your chance to take\naim and nail marks!\nReel Time continues for the\nawarded number of spins.\nIt all ends on a Big Bonus.$" + +gUnknown_085ef7da:: @ 85EF7DA .string "The two seem to get along\nvery well.$" + +gUnknown_085ef7ff:: @ 85EF7FF .string "The two seem to get along.$" + +gUnknown_085ef81a:: @ 85EF81A .string "The two don’t seem to like\neach other much.$" + +gUnknown_085ef846:: @ 85EF846 .string "The two prefer to play with other\nPOKéMON than each other.$" gText_NewLine2:: @ 85EF881 @@ -3507,9 +5217,17 @@ gText_TimeCleared:: @ 85EF895 gText_XMinYDotZSec:: @ 85EF8A3 .string "{STR_VAR_1} min. {STR_VAR_2}.{STR_VAR_3} sec.$" + +gUnknown_085ef8b6:: @ 85EF8B6 .string "1F$" + +gUnknown_085ef8b9:: @ 85EF8B9 .string "2F$" + +gUnknown_085ef8bc:: @ 85EF8BC .string "3F$" + +gUnknown_085ef8bf:: @ 85EF8BF .string "4F$" gText_TeachWhichMoveToPkmn:: @ 85EF8C2 @@ -3533,6 +5251,8 @@ gText_12AndPoof:: @ 85EF979 gText_PkmnForgotMoveAndLearnedNew:: @ 85EF9A6 .string "{STR_VAR_1} forgot {STR_VAR_3}.\pAnd…\p{STR_VAR_1} learned {STR_VAR_2}.$" + +gUnknown_085ef9c8:: @ 85EF9C8 .string "{STR_VAR_1} did not learn the\nmove {STR_VAR_2}.$" gText_GiveUpTeachingNewMove:: @ 85EF9E6 @@ -3547,6 +5267,8 @@ gText_BattleMoves2:: @ 85EFA31 gText_ContestMoves2:: @ 85EFA3E .string "CONTEST MOVES$" + +gUnknown_085efa4c:: @ 85EFA4C .string "TYPE/$" gText_PPSlash:: @ 85EFA52 @@ -3564,11 +5286,23 @@ gText_Appeal2:: @ 85EFA67 gText_Jam2:: @ 85EFA6E .string "JAM$" + +gUnknown_085efa72:: @ 85EFA72 .string "KIRA$" + +gUnknown_085efa77:: @ 85EFA77 .string "AMY$" + +gUnknown_085efa7b:: @ 85EFA7B .string "JOHN$" + +gUnknown_085efa80:: @ 85EFA80 .string "ROY$" + +gUnknown_085efa84:: @ 85EFA84 .string "GABBY$" + +gUnknown_085efa8a:: @ 85EFA8A .string "ANNA$" gText_ClearAllSaveData:: @ 85EFA8F @@ -3586,27 +5320,71 @@ gText_Confirm3:: @ 85EFAE0 gText_Cancel4:: @ 85EFAE8 .string "CANCEL$" + +gUnknown_085efaef:: @ 85EFAEF .string "DEVON PRES$" + +gUnknown_085efafa:: @ 85EFAFA .string "MR. STONE$" + +gUnknown_085efb04:: @ 85EFB04 .string "HARD AS ROCK$" + +gUnknown_085efb11:: @ 85EFB11 .string "STEVEN$" + +gUnknown_085efb18:: @ 85EFB18 .string "RAD NEIGHBOR$" + +gUnknown_085efb25:: @ 85EFB25 .string "RELIABLE ONE$" + +gUnknown_085efb32:: @ 85EFB32 .string "CALM & KIND$" + +gUnknown_085efb3e:: @ 85EFB3E .string "{PKMN} LOVER$" + +gUnknown_085efb47:: @ 85EFB47 .string "DAD$" + +gUnknown_085efb4b:: @ 85EFB4B .string "MOM$" + +gUnknown_085efb4f:: @ 85EFB4F .string "ELUSIVE EYES$" + +gUnknown_085efb5c:: @ 85EFB5C .string "SCOTT$" + +gUnknown_085efb62:: @ 85EFB62 .string "ROCKIN’ WHIZ$" + +gUnknown_085efb6f:: @ 85EFB6F .string "THE BIG HIT$" + +gUnknown_085efb7b:: @ 85EFB7B .string "SWELL SHOCK$" + +gUnknown_085efb87:: @ 85EFB87 .string "PASSION BURN$" + +gUnknown_085efb94:: @ 85EFB94 .string "SKY TAMER$" + +gUnknown_085efb9e:: @ 85EFB9E .string "MYSTIC DUO$" + +gUnknown_085efba9:: @ 85EFBA9 .string "DANDY CHARM$" + +gUnknown_085efbb5:: @ 85EFBB5 .string "ELITE FOUR$" + +gUnknown_085efbc0:: @ 85EFBC0 .string "CHAMPION$" + +gUnknown_085efbc9:: @ 85EFBC9 .string "{PKMN} PROF.$" gText_CommStandbyAwaitingOtherPlayer:: @ 85EFBD2 @@ -3618,25 +5396,65 @@ gText_BattleWasRefused:: @ 85EFC0C gText_RefusedBattle:: @ 85EFC27 .string "Refused the battle.{PAUSE 60}$" + +gUnknown_085efc3e:: @ 85EFC3E .string "NO WEATHER$" + +gUnknown_085efc49:: @ 85EFC49 .string "SUNNY$" + +gUnknown_085efc4f:: @ 85EFC4F .string "SUNNY2$" + +gUnknown_085efc56:: @ 85EFC56 .string "RAIN$" + +gUnknown_085efc5b:: @ 85EFC5B .string "SNOW$" + +gUnknown_085efc60:: @ 85EFC60 .string "LIGHTNING$" + +gUnknown_085efc6a:: @ 85EFC6A .string "FOG$" + +gUnknown_085efc6e:: @ 85EFC6E .string "VOLCANO ASH$" + +gUnknown_085efc7a:: @ 85EFC7A .string "SANDSTORM$" + +gUnknown_085efc84:: @ 85EFC84 .string "FOG2$" + +gUnknown_085efc89:: @ 85EFC89 .string "SEAFLOOR$" + +gUnknown_085efc92:: @ 85EFC92 .string "CLOUDY$" + +gUnknown_085efc99:: @ 85EFC99 .string "SUNNY3$" + +gUnknown_085efca0:: @ 85EFCA0 .string "HEAVY RAIN$" + +gUnknown_085efcab:: @ 85EFCAB .string "SEAFLOOR2$" + +gUnknown_085efcb5:: @ 85EFCB5 .string "DEL. ALL$" + +gUnknown_085efcbe:: @ 85EFCBE .string "CANCEL$" + +gUnknown_085efcc5:: @ 85EFCC5 .string "OK$" + +gUnknown_085efcc8:: @ 85EFCC8 .string "QUIZ$" + +gUnknown_085efccd:: @ 85EFCCD .string "ANSWER$" gText_PokeBalls:: @ 85EFCD4 From 55bae5e8adb9418552c7bd8b75523c2c8a67052b Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 25 Sep 2017 14:47:44 -0400 Subject: [PATCH 286/342] data/script_menu.s --- data/data3_a1.s | 454 ------------------------ data/event_scripts.s | 90 ++--- data/script_menu.s | 827 +++++++++++++++++++++++++++++++++++++++++++ ld_script.txt | 1 + src/berry.c | 52 ++- 5 files changed, 924 insertions(+), 500 deletions(-) create mode 100644 data/script_menu.s diff --git a/data/data3_a1.s b/data/data3_a1.s index 7516c34ff..14d3b54df 100644 --- a/data/data3_a1.s +++ b/data/data3_a1.s @@ -5,460 +5,6 @@ .section .rodata -gUnknown_0858AB24:: @ 858AB24 -@ replacing .incbin "baserom.gba", 0x0058ab24, 0xac - .2byte 50, 20 - .2byte 50, 20 - .2byte 50, 20 - .2byte 50, 20 - .2byte 50, 20 - .2byte 50, 30 - .2byte 50, 30 - .2byte 50, 30 - .2byte 50, 30 - .2byte 50, 30 - .2byte 60, 50 - .2byte 60, 50 - .2byte 60, 50 - .2byte 60, 50 - .2byte 60, 50 - .2byte 80, 70 - .2byte 80, 70 - .2byte 80, 70 - .2byte 80, 70 - .2byte 80, 70 - .2byte 100, 100 - .2byte 100, 100 - .2byte 100, 100 - .2byte 100, 100 - .2byte 100, 100 - .2byte 130, 150 - .2byte 130, 150 - .2byte 130, 150 - .2byte 130, 150 - .2byte 130, 150 - .2byte 160, 250 - .2byte 160, 250 - .2byte 160, 250 - .2byte 160, 250 - .2byte 160, 250 - .2byte 180, 500 - .2byte 180, 500 - .2byte 180, 500 - .2byte 180, 500 - .2byte 180, 500 - .2byte 200, 750 - .2byte 200, 750 - .2byte 150, 200 - -gBlankBerryTree:: @ 858ABD0 - .4byte 0x0, 0x0 - -gUnknown_0858ABD8:: @ 858ABD8 -@ replacing .incbin "baserom.gba", 0x0058abd8, 0xb88 - .4byte gUnknown_085ead37, 0 - .4byte gUnknown_085ead41, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085ead67, 0 - .4byte gUnknown_085ead6d, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085ead72, 0 - .4byte gUnknown_085ead84, 0 - .4byte gUnknown_085ead96, 0 - .4byte gText_Cancel2, 0 - .4byte gUnknown_085EADA4, 0 - .4byte gUnknown_085EADB5, 0 - .4byte gUnknown_085EADC4, 0 - .4byte gUnknown_085EADD5, 0 - .4byte gUnknown_085EADE7, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eadf9, 0 - .4byte gUnknown_085eae04, 0 - .4byte gUnknown_085eae12, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eadf9, 0 - .4byte gUnknown_085eae04, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085e8ccb, 0 - .4byte gUnknown_085eae12, 0 - .4byte gUnknown_085eae1b, 0 - .4byte gText_Cancel2, 0 - .4byte gUnknown_085eae27, 0 - .4byte gUnknown_085eae2c, 0 - .4byte gUnknown_085eae31, 0 - .4byte gUnknown_085eae35, 0 - .4byte gUnknown_085eae39, 0 - .4byte gUnknown_085eae3d, 0 - .4byte gUnknown_085eae41, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085ead5f, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eae53, 0 - .4byte gUnknown_085eae5a, 0 - .4byte gText_Yes, 0 - .4byte gText_No, 0 - .4byte gUnknown_085ead6d, 0 - .4byte gUnknown_085eaea2, 0 - .4byte gUnknown_085eaeac, 0 - .4byte gText_Exit, 0 - .4byte gText_Lv50, 0 - .4byte gText_OpenLevel, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_0027ecbc, 0 - .4byte gUnknown_0027ecc3, 0 - .4byte gUnknown_0027eccd, 0 - .4byte gUnknown_0027ecd5, 0 - .4byte gUnknown_0027ecdd, 0 - .4byte gUnknown_0027ece3, 0 - .4byte gUnknown_0027eceb, 0 - .4byte gUnknown_0027ecf2, 0 - .4byte gUnknown_0027ecf8, 0 - .4byte gUnknown_0027ed00, 0 - .4byte gUnknown_0027ed06, 0 - .4byte gUnknown_0027ed10, 0 - .4byte gUnknown_0027ed18, 0 - .4byte gUnknown_0027ed22, 0 - .4byte gUnknown_0027ed2c, 0 - .4byte gUnknown_0027ed36, 0 - .4byte gUnknown_0027ed40, 0 - .4byte gUnknown_0027ed46, 0 - .4byte gUnknown_0027ed4f, 0 - .4byte gUnknown_0027ed59, 0 - .4byte gUnknown_0027ed65, 0 - .4byte gUnknown_0027ed70, 0 - .4byte gUnknown_0027ed74, 0 - .4byte gUnknown_0027ed78, 0 - .4byte gUnknown_0027ed80, 0 - .4byte gUnknown_0027ed95, 0 - .4byte gUnknown_0027edaa, 0 - .4byte gUnknown_0027edb5, 0 - .4byte gUnknown_0027edba, 0 - .4byte gUnknown_0027edc1, 0 - .4byte gUnknown_0027edc9, 0 - .4byte gUnknown_0027edd5, 0 - .4byte gUnknown_0027ede4, 0 - .4byte gUnknown_0027edf0, 0 - .4byte gUnknown_0027edf5, 0 - .4byte gUnknown_0027edf7, 0 - .4byte gUnknown_0027edf9, 0 - .4byte gUnknown_0027edfb, 0 - .4byte gUnknown_0027edfd, 0 - .4byte gUnknown_0027edff, 0 - .4byte gUnknown_0027ee01, 0 - .4byte gUnknown_0027ee03, 0 - .4byte gUnknown_0027ee05, 0 - .4byte gUnknown_0027ee07, 0 - .4byte gUnknown_0027ee09, 0 - .4byte gUnknown_085eaec3, 0 - .4byte gUnknown_085eaed6, 0 - .4byte gUnknown_085eaee6, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eaef6, 0 - .4byte gUnknown_085eaf02, 0 - .4byte gUnknown_085eaf0e, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eaf1b, 0 - .4byte gUnknown_085eaf24, 0 - .4byte gUnknown_085eaf2f, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eaf34, 0 - .4byte gUnknown_085eaf3e, 0 - .4byte gUnknown_085eaf4b, 0 - .4byte gUnknown_085eaf58, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eaf65, 0 - .4byte gUnknown_085eaf70, 0 - .4byte gUnknown_085eaf7d, 0 - .4byte gUnknown_085eaf87, 0 - .4byte gUnknown_085eaf93, 0 - .4byte gUnknown_085eaf9f, 0 - .4byte gUnknown_085eafab, 0 - .4byte gText_Cancel2, 0 - .4byte gUnknown_085eafb6, 0 - .4byte gUnknown_085eafcf, 0 - .4byte gUnknown_085eafe8, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb089, 0 - .4byte gUnknown_085eb09c, 0 - .4byte gUnknown_085eb0af, 0 - .4byte gUnknown_085eb0c2, 0 - .4byte gUnknown_085eb0d5, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb002, 0 - .4byte gUnknown_085eb017, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb02a, 0 - .4byte gUnknown_085eb034, 0 - .4byte gUnknown_085eb79b, 0 - .4byte gUnknown_085eb06e, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb7a9, 0 - .4byte gUnknown_085eb79b, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb07e, 0 - .4byte gUnknown_085eb084, 0 - .4byte gUnknown_085eb79b, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb676, 0 - .4byte gUnknown_085eb673, 0 - .4byte gUnknown_085eb670, 0 - .4byte gUnknown_085eb66d, 0 - .4byte gUnknown_085eb66a, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb040, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb04a, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb040, 0 - .4byte gUnknown_085eb04a, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb057, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb040, 0 - .4byte gUnknown_085eb057, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb04a, 0 - .4byte gUnknown_085eb057, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb040, 0 - .4byte gUnknown_085eb04a, 0 - .4byte gUnknown_085eb057, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb062, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb040, 0 - .4byte gUnknown_085eb062, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb04a, 0 - .4byte gUnknown_085eb062, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb040, 0 - .4byte gUnknown_085eb04a, 0 - .4byte gUnknown_085eb062, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb057, 0 - .4byte gUnknown_085eb062, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb040, 0 - .4byte gUnknown_085eb057, 0 - .4byte gUnknown_085eb062, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb04a, 0 - .4byte gUnknown_085eb057, 0 - .4byte gUnknown_085eb062, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb040, 0 - .4byte gUnknown_085eb04a, 0 - .4byte gUnknown_085eb057, 0 - .4byte gUnknown_085eb062, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb1a0, 0 - .4byte gUnknown_085eb1a9, 0 - .4byte gUnknown_085eb1b6, 0 - .4byte gUnknown_085eb5bc, 0 - .4byte gUnknown_085eb5c3, 0 - .4byte gUnknown_085eb5c8, 0 - .4byte gUnknown_085eb1a0, 0 - .4byte gUnknown_085eb1a9, 0 - .4byte gUnknown_085eb1b6, 0 - .4byte gUnknown_085eb5c3, 0 - .4byte gUnknown_085eb5c8, 0 - .4byte gUnknown_085eb29a, 0 - .4byte gUnknown_085eb2a3, 0 - .4byte gUnknown_085eb372, 0 - .4byte gUnknown_085eb37f, 0 - .4byte gUnknown_085eb389, 0 - .4byte gText_Exit, 0 - .4byte gText_Yes, 0 - .4byte gText_No, 0 - .4byte gUnknown_085ead6d, 0 - .4byte gUnknown_085eae6e, 0 - .4byte gUnknown_085eae7c, 0 - .4byte gUnknown_085eae8a, 0 - .4byte gUnknown_085ead6d, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb372, 0 - .4byte gUnknown_085eb37f, 0 - .4byte gUnknown_085eb397, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb372, 0 - .4byte gUnknown_085eb37f, 0 - .4byte gUnknown_085eb389, 0 - .4byte gUnknown_085eb397, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb372, 0 - .4byte gUnknown_085eb37f, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb3a4, 0 - .4byte gUnknown_085eb3b1, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb3d4, 0 - .4byte gUnknown_085eb3c6, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb1c5, 0 - .4byte gUnknown_085eb1d1, 0 - .4byte gUnknown_085eb1dc, 0 - .4byte gUnknown_085eb1e7, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb212, 0 - .4byte gUnknown_085eb21d, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb227, 0 - .4byte gUnknown_085eb234, 0 - .4byte gUnknown_085eb241, 0 - .4byte gText_Cancel2, 0 - .4byte gUnknown_085eb24e, 0 - .4byte gUnknown_085eb255, 0 - .4byte gText_Exit, 0 - .4byte gText_MenuOptionPokedex, 0 - .4byte gText_MenuOptionPokemon, 0 - .4byte gText_MenuOptionBag, 0 - .4byte gText_MenuOptionPokenav, 0 - .4byte gUnknown_085eb278, 0 - .4byte gText_MenuOptionSave, 0 - .4byte gText_MenuOptionOption, 0 - .4byte gText_MenuOptionExit, 0 - .4byte gUnknown_085eb28a, 0 - .4byte gUnknown_085eb290, 0 - .4byte gUnknown_085eb295, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb2ad, 0 - .4byte gUnknown_085eb2bd, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb2ad, 0 - .4byte gUnknown_085eb2ca, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb2bd, 0 - .4byte gUnknown_085eb2ca, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb2ad, 0 - .4byte gUnknown_085eb2bd, 0 - .4byte gUnknown_085eb2ca, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb2e4, 0 - .4byte gUnknown_085eb2f0, 0 - .4byte gText_Exit, 0 - .4byte gText_Yes, 0 - .4byte gUnknown_085eb2fc, 0 - .4byte gUnknown_085eb3df, 0 - .4byte gUnknown_085eb3ea, 0 - .4byte gUnknown_085eb3f1, 0 - .4byte gUnknown_085eb3fc, 0 - .4byte gUnknown_085eb40a, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb415, 0 - .4byte gUnknown_085eb41d, 0 - .4byte gUnknown_085eb424, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb45c, 0 - .4byte gUnknown_085eb469, 0 - .4byte gUnknown_085eb475, 0 - .4byte gUnknown_085eb482, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb42f, 0 - .4byte gUnknown_085eb43a, 0 - .4byte gUnknown_085eb444, 0 - .4byte gUnknown_085eb451, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb48e, 0 - .4byte gUnknown_085eb496, 0 - .4byte gUnknown_085eb4a3, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb4ad, 0 - .4byte gUnknown_085eb4b9, 0 - .4byte gUnknown_085eb4c7, 0 - .4byte gUnknown_085eb4d4, 0 - .4byte gUnknown_085eb4e0, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb4eb, 0 - .4byte gUnknown_085eb4f9, 0 - .4byte gUnknown_085eb508, 0 - .4byte gUnknown_085eb516, 0 - .4byte gUnknown_085eb523, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb532, 0 - .4byte gUnknown_085eb543, 0 - .4byte gUnknown_085eb555, 0 - .4byte gUnknown_085eb563, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb56e, 0 - .4byte gUnknown_085eb57e, 0 - .4byte gUnknown_085eb589, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb5b6, 0 - .4byte gUnknown_085eb5bc, 0 - .4byte gUnknown_085eb5c3, 0 - .4byte gUnknown_085eb5c8, 0 - .4byte gUnknown_085eb5b6, 0 - .4byte gUnknown_085eb5c3, 0 - .4byte gUnknown_085eb5c8, 0 - .4byte gUnknown_085eb5b6, 0 - .4byte gUnknown_085eb5bc, 0 - .4byte gUnknown_085eb5c8, 0 - .4byte gUnknown_085eb5b6, 0 - .4byte gUnknown_085eb5c8, 0 - .4byte gUnknown_085ee14b, 0 - .4byte gUnknown_085ee14f, 0 - .4byte gUnknown_085eb2ff, 0 - .4byte gUnknown_085eb310, 0 - .4byte gUnknown_085eb317, 0 - .4byte gUnknown_085eb31f, 0 - .4byte gUnknown_085eb7b8, 0 - .4byte gUnknown_085eb7c7, 0 - .4byte gUnknown_085eb7d0, 0 - .4byte gUnknown_085eb7db, 0 - .4byte gUnknown_085eb4ad, 0 - .4byte gUnknown_085eb4b9, 0 - .4byte gUnknown_085eb4c7, 0 - .4byte gUnknown_085eb4d4, 0 - .4byte gUnknown_085eb597, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb5a6, 0 - .4byte gUnknown_085eb45c, 0 - .4byte gUnknown_085eb469, 0 - .4byte gUnknown_085eb475, 0 - .4byte gUnknown_085eb482, 0 - .4byte gText_Exit, 0 - .4byte gUnknown_085eb32d, 0 - .4byte gUnknown_085eb33e, 0 - .4byte gUnknown_085eb350, 0 - .4byte gUnknown_085eb361, 0 - .4byte gText_Exit, 0 - .4byte gText_Exit, 0 - -gUnknown_0858B760:: @ 858B760 - .incbin "baserom.gba", 0x58b760, 0x390 - -gUnknown_0858BAF0:: @ 858BAF0 - .incbin "baserom.gba", 0x58baf0, 0x78 - -gUnknown_0858BB68:: @ 858BB68 - .incbin "baserom.gba", 0x58bb68, 0x8 - -gUnknown_0858BB70:: @ 858BB70 - .incbin "baserom.gba", 0x58bb70, 0x10 - -gUnknown_0858BB80:: @ 858BB80 - .incbin "baserom.gba", 0x58bb80, 0x1c - -gUnknown_0858BB9C:: @ 858BB9C - .incbin "baserom.gba", 0x58bb9c, 0x10 - -gUnknown_0858BBAC:: @ 858BBAC - .incbin "baserom.gba", 0x58bbac, 0x10 - -gUnknown_0858BBBC:: @ 858BBBC - .incbin "baserom.gba", 0x58bbbc, 0x10 - -gUnknown_0858BBCC:: @ 858BBCC - .incbin "baserom.gba", 0x58bbcc, 0x14 - -gUnknown_0858BBE0:: @ 858BBE0 - .incbin "baserom.gba", 0x58bbe0, 0xc - -gUnknown_0858BBEC:: @ 858BBEC - .incbin "baserom.gba", 0x58bbec, 0x18c - gUnknown_0858BD78:: @ 858BD78 .incbin "baserom.gba", 0x58bd78, 0x40 diff --git a/data/event_scripts.s b/data/event_scripts.s index 30e2aa335..b3aa055d8 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -686,139 +686,139 @@ gUnknown_0827E8DA:: @ 827E8DA gUnknown_0827EA0C:: @ 827EA0C .incbin "baserom.gba", 0x27ea0c, 0x2b0 -gUnknown_0027ecbc:: @ 27ECBC +gUnknown_0827ecbc:: @ 27ECBC .incbin "baserom.gba", 0x27ecbc, 0x7 -gUnknown_0027ecc3:: @ 27ECC3 +gUnknown_0827ecc3:: @ 27ECC3 .incbin "baserom.gba", 0x27ecc3, 0xa -gUnknown_0027eccd:: @ 27ECCD +gUnknown_0827eccd:: @ 27ECCD .incbin "baserom.gba", 0x27eccd, 0x8 -gUnknown_0027ecd5:: @ 27ECD5 +gUnknown_0827ecd5:: @ 27ECD5 .incbin "baserom.gba", 0x27ecd5, 0x8 -gUnknown_0027ecdd:: @ 27ECDD +gUnknown_0827ecdd:: @ 27ECDD .incbin "baserom.gba", 0x27ecdd, 0x6 -gUnknown_0027ece3:: @ 27ECE3 +gUnknown_0827ece3:: @ 27ECE3 .incbin "baserom.gba", 0x27ece3, 0x8 -gUnknown_0027eceb:: @ 27ECEB +gUnknown_0827eceb:: @ 27ECEB .incbin "baserom.gba", 0x27eceb, 0x7 -gUnknown_0027ecf2:: @ 27ECF2 +gUnknown_0827ecf2:: @ 27ECF2 .incbin "baserom.gba", 0x27ecf2, 0x6 -gUnknown_0027ecf8:: @ 27ECF8 +gUnknown_0827ecf8:: @ 27ECF8 .incbin "baserom.gba", 0x27ecf8, 0x8 -gUnknown_0027ed00:: @ 27ED00 +gUnknown_0827ed00:: @ 27ED00 .incbin "baserom.gba", 0x27ed00, 0x6 -gUnknown_0027ed06:: @ 27ED06 +gUnknown_0827ed06:: @ 27ED06 .incbin "baserom.gba", 0x27ed06, 0xa -gUnknown_0027ed10:: @ 27ED10 +gUnknown_0827ed10:: @ 27ED10 .incbin "baserom.gba", 0x27ed10, 0x8 -gUnknown_0027ed18:: @ 27ED18 +gUnknown_0827ed18:: @ 27ED18 .incbin "baserom.gba", 0x27ed18, 0xa -gUnknown_0027ed22:: @ 27ED22 +gUnknown_0827ed22:: @ 27ED22 .incbin "baserom.gba", 0x27ed22, 0xa -gUnknown_0027ed2c:: @ 27ED2C +gUnknown_0827ed2c:: @ 27ED2C .incbin "baserom.gba", 0x27ed2c, 0xa -gUnknown_0027ed36:: @ 27ED36 +gUnknown_0827ed36:: @ 27ED36 .incbin "baserom.gba", 0x27ed36, 0xa -gUnknown_0027ed40:: @ 27ED40 +gUnknown_0827ed40:: @ 27ED40 .incbin "baserom.gba", 0x27ed40, 0x6 -gUnknown_0027ed46:: @ 27ED46 +gUnknown_0827ed46:: @ 27ED46 .incbin "baserom.gba", 0x27ed46, 0x9 -gUnknown_0027ed4f:: @ 27ED4F +gUnknown_0827ed4f:: @ 27ED4F .incbin "baserom.gba", 0x27ed4f, 0xa -gUnknown_0027ed59:: @ 27ED59 +gUnknown_0827ed59:: @ 27ED59 .incbin "baserom.gba", 0x27ed59, 0xc -gUnknown_0027ed65:: @ 27ED65 +gUnknown_0827ed65:: @ 27ED65 .incbin "baserom.gba", 0x27ed65, 0xb -gUnknown_0027ed70:: @ 27ED70 +gUnknown_0827ed70:: @ 27ED70 .incbin "baserom.gba", 0x27ed70, 0x4 -gUnknown_0027ed74:: @ 27ED74 +gUnknown_0827ed74:: @ 27ED74 .incbin "baserom.gba", 0x27ed74, 0x4 -gUnknown_0027ed78:: @ 27ED78 +gUnknown_0827ed78:: @ 27ED78 .incbin "baserom.gba", 0x27ed78, 0x8 -gUnknown_0027ed80:: @ 27ED80 +gUnknown_0827ed80:: @ 27ED80 .incbin "baserom.gba", 0x27ed80, 0x15 -gUnknown_0027ed95:: @ 27ED95 +gUnknown_0827ed95:: @ 27ED95 .incbin "baserom.gba", 0x27ed95, 0x15 -gUnknown_0027edaa:: @ 27EDAA +gUnknown_0827edaa:: @ 27EDAA .incbin "baserom.gba", 0x27edaa, 0xb -gUnknown_0027edb5:: @ 27EDB5 +gUnknown_0827edb5:: @ 27EDB5 .incbin "baserom.gba", 0x27edb5, 0x5 -gUnknown_0027edba:: @ 27EDBA +gUnknown_0827edba:: @ 27EDBA .incbin "baserom.gba", 0x27edba, 0x7 -gUnknown_0027edc1:: @ 27EDC1 +gUnknown_0827edc1:: @ 27EDC1 .incbin "baserom.gba", 0x27edc1, 0x8 -gUnknown_0027edc9:: @ 27EDC9 +gUnknown_0827edc9:: @ 27EDC9 .incbin "baserom.gba", 0x27edc9, 0xc -gUnknown_0027edd5:: @ 27EDD5 +gUnknown_0827edd5:: @ 27EDD5 .incbin "baserom.gba", 0x27edd5, 0xf -gUnknown_0027ede4:: @ 27EDE4 +gUnknown_0827ede4:: @ 27EDE4 .incbin "baserom.gba", 0x27ede4, 0xc -gUnknown_0027edf0:: @ 27EDF0 +gUnknown_0827edf0:: @ 27EDF0 .incbin "baserom.gba", 0x27edf0, 0x5 -gUnknown_0027edf5:: @ 27EDF5 +gUnknown_0827edf5:: @ 27EDF5 .incbin "baserom.gba", 0x27edf5, 0x2 -gUnknown_0027edf7:: @ 27EDF7 +gUnknown_0827edf7:: @ 27EDF7 .incbin "baserom.gba", 0x27edf7, 0x2 -gUnknown_0027edf9:: @ 27EDF9 +gUnknown_0827edf9:: @ 27EDF9 .incbin "baserom.gba", 0x27edf9, 0x2 -gUnknown_0027edfb:: @ 27EDFB +gUnknown_0827edfb:: @ 27EDFB .incbin "baserom.gba", 0x27edfb, 0x2 -gUnknown_0027edfd:: @ 27EDFD +gUnknown_0827edfd:: @ 27EDFD .incbin "baserom.gba", 0x27edfd, 0x2 -gUnknown_0027edff:: @ 27EDFF +gUnknown_0827edff:: @ 27EDFF .incbin "baserom.gba", 0x27edff, 0x2 -gUnknown_0027ee01:: @ 27EE01 +gUnknown_0827ee01:: @ 27EE01 .incbin "baserom.gba", 0x27ee01, 0x2 -gUnknown_0027ee03:: @ 27EE03 +gUnknown_0827ee03:: @ 27EE03 .incbin "baserom.gba", 0x27ee03, 0x2 -gUnknown_0027ee05:: @ 27EE05 +gUnknown_0827ee05:: @ 27EE05 .incbin "baserom.gba", 0x27ee05, 0x2 -gUnknown_0027ee07:: @ 27EE07 +gUnknown_0827ee07:: @ 27EE07 .incbin "baserom.gba", 0x27ee07, 0x2 -gUnknown_0027ee09:: @ 27EE09 +gUnknown_0827ee09:: @ 27EE09 .incbin "baserom.gba", 0x27ee09, 0x2 gUnknown_0827EE0B:: @ 827EE0B diff --git a/data/script_menu.s b/data/script_menu.s new file mode 100644 index 000000000..3a98e2fa5 --- /dev/null +++ b/data/script_menu.s @@ -0,0 +1,827 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0858ABD8:: @ 858ABD8 +@ replacing .incbin "baserom.gba", 0x0058abd8, 0x18 + .4byte gUnknown_085ead37, 0 + .4byte gUnknown_085ead41, 0 + .4byte gText_Exit, 0 + +gUnknown_0858abf0:: @ 58ABF0 +@ replacing .incbin "baserom.gba", 0x0058abf0, 0x18 + .4byte gUnknown_085ead67, 0 + .4byte gUnknown_085ead6d, 0 + .4byte gText_Exit, 0 + +gUnknown_0858ac08:: @ 58AC08 +@ replacing .incbin "baserom.gba", 0x0058ac08, 0x20 + .4byte gUnknown_085ead72, 0 + .4byte gUnknown_085ead84, 0 + .4byte gUnknown_085ead96, 0 + .4byte gText_Cancel2, 0 + +gUnknown_0858ac28:: @ 58AC28 +@ replacing .incbin "baserom.gba", 0x0058ac28, 0x30 + .4byte gUnknown_085EADA4, 0 + .4byte gUnknown_085EADB5, 0 + .4byte gUnknown_085EADC4, 0 + .4byte gUnknown_085EADD5, 0 + .4byte gUnknown_085EADE7, 0 + .4byte gText_Exit, 0 + +gUnknown_0858ac58:: @ 58AC58 +@ replacing .incbin "baserom.gba", 0x0058ac58, 0x20 + .4byte gUnknown_085eadf9, 0 + .4byte gUnknown_085eae04, 0 + .4byte gUnknown_085eae12, 0 + .4byte gText_Exit, 0 + +gUnknown_0858ac78:: @ 58AC78 +@ replacing .incbin "baserom.gba", 0x0058ac78, 0x18 + .4byte gUnknown_085eadf9, 0 + .4byte gUnknown_085eae04, 0 + .4byte gText_Exit, 0 + +gUnknown_0858ac90:: @ 58AC90 +@ replacing .incbin "baserom.gba", 0x0058ac90, 0x20 + .4byte gUnknown_085e8ccb, 0 + .4byte gUnknown_085eae12, 0 + .4byte gUnknown_085eae1b, 0 + .4byte gText_Cancel2, 0 + +gUnknown_0858acb0:: @ 58ACB0 +@ replacing .incbin "baserom.gba", 0x0058acb0, 0x10 + .4byte gUnknown_085eae27, 0 + .4byte gUnknown_085eae2c, 0 + +gUnknown_0858acc0:: @ 58ACC0 +@ replacing .incbin "baserom.gba", 0x0058acc0, 0x30 + .4byte gUnknown_085eae31, 0 + .4byte gUnknown_085eae35, 0 + .4byte gUnknown_085eae39, 0 + .4byte gUnknown_085eae3d, 0 + .4byte gUnknown_085eae41, 0 + .4byte gText_Exit, 0 + +gUnknown_0858acf0:: @ 58ACF0 +@ replacing .incbin "baserom.gba", 0x0058acf0, 0x10 + .4byte gUnknown_085ead5f, 0 + .4byte gText_Exit, 0 + +gUnknown_0858ad00:: @ 58AD00 +@ replacing .incbin "baserom.gba", 0x0058ad00, 0x10 + .4byte gUnknown_085eae53, 0 + .4byte gUnknown_085eae5a, 0 + +gUnknown_0858ad10:: @ 58AD10 +@ replacing .incbin "baserom.gba", 0x0058ad10, 0x18 + .4byte gText_Yes, 0 + .4byte gText_No, 0 + .4byte gUnknown_085ead6d, 0 + +gUnknown_0858ad28:: @ 58AD28 +@ replacing .incbin "baserom.gba", 0x0058ad28, 0x18 + .4byte gUnknown_085eaea2, 0 + .4byte gUnknown_085eaeac, 0 + .4byte gText_Exit, 0 + +gUnknown_0858ad40:: @ 58AD40 +@ replacing .incbin "baserom.gba", 0x0058ad40, 0x18 + .4byte gText_Lv50, 0 + .4byte gText_OpenLevel, 0 + .4byte gText_Exit, 0 + +gUnknown_0858ad58:: @ 58AD58 +@ replacing .incbin "baserom.gba", 0x0058ad58, 0x18 + .4byte gUnknown_0827ecbc, 0 + .4byte gUnknown_0827ecc3, 0 + .4byte gUnknown_0827eccd, 0 + +gUnknown_0858ad70:: @ 58AD70 +@ replacing .incbin "baserom.gba", 0x0058ad70, 0x18 + .4byte gUnknown_0827ecd5, 0 + .4byte gUnknown_0827ecdd, 0 + .4byte gUnknown_0827ece3, 0 + +gUnknown_0858ad88:: @ 58AD88 +@ replacing .incbin "baserom.gba", 0x0058ad88, 0x18 + .4byte gUnknown_0827eceb, 0 + .4byte gUnknown_0827ecf2, 0 + .4byte gUnknown_0827ecf8, 0 + +gUnknown_0858ada0:: @ 58ADA0 +@ replacing .incbin "baserom.gba", 0x0058ada0, 0x18 + .4byte gUnknown_0827ed00, 0 + .4byte gUnknown_0827ed06, 0 + .4byte gUnknown_0827ed10, 0 + +gUnknown_0858adb8:: @ 58ADB8 +@ replacing .incbin "baserom.gba", 0x0058adb8, 0x18 + .4byte gUnknown_0827ed18, 0 + .4byte gUnknown_0827ed22, 0 + .4byte gUnknown_0827ed2c, 0 + +gUnknown_0858add0:: @ 58ADD0 +@ replacing .incbin "baserom.gba", 0x0058add0, 0x18 + .4byte gUnknown_0827ed36, 0 + .4byte gUnknown_0827ed40, 0 + .4byte gUnknown_0827ed46, 0 + +gUnknown_0858ade8:: @ 58ADE8 +@ replacing .incbin "baserom.gba", 0x0058ade8, 0x18 + .4byte gUnknown_0827ed4f, 0 + .4byte gUnknown_0827ed59, 0 + .4byte gUnknown_0827ed65, 0 + +gUnknown_0858ae00:: @ 58AE00 +@ replacing .incbin "baserom.gba", 0x0058ae00, 0x18 + .4byte gUnknown_0827ed70, 0 + .4byte gUnknown_0827ed74, 0 + .4byte gUnknown_0827ed78, 0 + +gUnknown_0858ae18:: @ 58AE18 +@ replacing .incbin "baserom.gba", 0x0058ae18, 0x18 + .4byte gUnknown_0827ed80, 0 + .4byte gUnknown_0827ed95, 0 + .4byte gUnknown_0827edaa, 0 + +gUnknown_0858ae30:: @ 58AE30 +@ replacing .incbin "baserom.gba", 0x0058ae30, 0x18 + .4byte gUnknown_0827edb5, 0 + .4byte gUnknown_0827edba, 0 + .4byte gUnknown_0827edc1, 0 + +gUnknown_0858ae48:: @ 58AE48 +@ replacing .incbin "baserom.gba", 0x0058ae48, 0x18 + .4byte gUnknown_0827edc9, 0 + .4byte gUnknown_0827edd5, 0 + .4byte gUnknown_0827ede4, 0 + +gUnknown_0858ae60:: @ 58AE60 +@ replacing .incbin "baserom.gba", 0x0058ae60, 0x18 + .4byte gUnknown_0827edf0, 0 + .4byte gUnknown_0827edf5, 0 + .4byte gUnknown_0827edf7, 0 + +gUnknown_0858ae78:: @ 58AE78 +@ replacing .incbin "baserom.gba", 0x0058ae78, 0x18 + .4byte gUnknown_0827edf9, 0 + .4byte gUnknown_0827edfb, 0 + .4byte gUnknown_0827edfd, 0 + +gUnknown_0858ae90:: @ 58AE90 +@ replacing .incbin "baserom.gba", 0x0058ae90, 0x18 + .4byte gUnknown_0827edff, 0 + .4byte gUnknown_0827ee01, 0 + .4byte gUnknown_0827ee03, 0 + +gUnknown_0858aea8:: @ 58AEA8 +@ replacing .incbin "baserom.gba", 0x0058aea8, 0x18 + .4byte gUnknown_0827ee05, 0 + .4byte gUnknown_0827ee07, 0 + .4byte gUnknown_0827ee09, 0 + +gUnknown_0858aec0:: @ 58AEC0 +@ replacing .incbin "baserom.gba", 0x0058aec0, 0x20 + .4byte gUnknown_085eaec3, 0 + .4byte gUnknown_085eaed6, 0 + .4byte gUnknown_085eaee6, 0 + .4byte gText_Exit, 0 + +gUnknown_0858aee0:: @ 58AEE0 +@ replacing .incbin "baserom.gba", 0x0058aee0, 0x20 + .4byte gUnknown_085eaef6, 0 + .4byte gUnknown_085eaf02, 0 + .4byte gUnknown_085eaf0e, 0 + .4byte gText_Exit, 0 + +gUnknown_0858af00:: @ 58AF00 +@ replacing .incbin "baserom.gba", 0x0058af00, 0x20 + .4byte gUnknown_085eaf1b, 0 + .4byte gUnknown_085eaf24, 0 + .4byte gUnknown_085eaf2f, 0 + .4byte gText_Exit, 0 + +gUnknown_0858af20:: @ 58AF20 +@ replacing .incbin "baserom.gba", 0x0058af20, 0x10 + .4byte gUnknown_085eaf34, 0 + .4byte gUnknown_085eaf3e, 0 + +gUnknown_0858af30:: @ 58AF30 +@ replacing .incbin "baserom.gba", 0x0058af30, 0x18 + .4byte gUnknown_085eaf4b, 0 + .4byte gUnknown_085eaf58, 0 + .4byte gText_Exit, 0 + +gUnknown_0858af48:: @ 58AF48 +@ replacing .incbin "baserom.gba", 0x0058af48, 0x40 + .4byte gUnknown_085eaf65, 0 + .4byte gUnknown_085eaf70, 0 + .4byte gUnknown_085eaf7d, 0 + .4byte gUnknown_085eaf87, 0 + .4byte gUnknown_085eaf93, 0 + .4byte gUnknown_085eaf9f, 0 + .4byte gUnknown_085eafab, 0 + .4byte gText_Cancel2, 0 + +gUnknown_0858af88:: @ 58AF88 +@ replacing .incbin "baserom.gba", 0x0058af88, 0x20 + .4byte gUnknown_085eafb6, 0 + .4byte gUnknown_085eafcf, 0 + .4byte gUnknown_085eafe8, 0 + .4byte gText_Exit, 0 + +gUnknown_0858afa8:: @ 58AFA8 +@ replacing .incbin "baserom.gba", 0x0058afa8, 0x30 + .4byte gUnknown_085eb089, 0 + .4byte gUnknown_085eb09c, 0 + .4byte gUnknown_085eb0af, 0 + .4byte gUnknown_085eb0c2, 0 + .4byte gUnknown_085eb0d5, 0 + .4byte gText_Exit, 0 + +gUnknown_0858afd8:: @ 58AFD8 +@ replacing .incbin "baserom.gba", 0x0058afd8, 0x18 + .4byte gUnknown_085eb002, 0 + .4byte gUnknown_085eb017, 0 + .4byte gText_Exit, 0 + +gUnknown_0858aff0:: @ 58AFF0 +@ replacing .incbin "baserom.gba", 0x0058aff0, 0x10 + .4byte gUnknown_085eb02a, 0 + .4byte gUnknown_085eb034, 0 + +gUnknown_0858b000:: @ 58B000 +@ replacing .incbin "baserom.gba", 0x0058b000, 0x18 + .4byte gUnknown_085eb79b, 0 + .4byte gUnknown_085eb06e, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b018:: @ 58B018 +@ replacing .incbin "baserom.gba", 0x0058b018, 0x18 + .4byte gUnknown_085eb7a9, 0 + .4byte gUnknown_085eb79b, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b030:: @ 58B030 +@ replacing .incbin "baserom.gba", 0x0058b030, 0x10 + .4byte gUnknown_085eb07e, 0 + .4byte gUnknown_085eb084, 0 + +gUnknown_0858b040:: @ 58B040 +@ replacing .incbin "baserom.gba", 0x0058b040, 0x10 + .4byte gUnknown_085eb79b, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b050:: @ 58B050 +@ replacing .incbin "baserom.gba", 0x0058b050, 0x30 + .4byte gUnknown_085eb676, 0 + .4byte gUnknown_085eb673, 0 + .4byte gUnknown_085eb670, 0 + .4byte gUnknown_085eb66d, 0 + .4byte gUnknown_085eb66a, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b080:: @ 58B080 +@ replacing .incbin "baserom.gba", 0x0058b080, 0x10 + .4byte gUnknown_085eb040, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b090:: @ 58B090 +@ replacing .incbin "baserom.gba", 0x0058b090, 0x10 + .4byte gUnknown_085eb04a, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b0a0:: @ 58B0A0 +@ replacing .incbin "baserom.gba", 0x0058b0a0, 0x18 + .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085eb04a, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b0b8:: @ 58B0B8 +@ replacing .incbin "baserom.gba", 0x0058b0b8, 0x10 + .4byte gUnknown_085eb057, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b0c8:: @ 58B0C8 +@ replacing .incbin "baserom.gba", 0x0058b0c8, 0x18 + .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085eb057, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b0e0:: @ 58B0E0 +@ replacing .incbin "baserom.gba", 0x0058b0e0, 0x18 + .4byte gUnknown_085eb04a, 0 + .4byte gUnknown_085eb057, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b0f8:: @ 58B0F8 +@ replacing .incbin "baserom.gba", 0x0058b0f8, 0x20 + .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085eb04a, 0 + .4byte gUnknown_085eb057, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b118:: @ 58B118 +@ replacing .incbin "baserom.gba", 0x0058b118, 0x10 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b128:: @ 58B128 +@ replacing .incbin "baserom.gba", 0x0058b128, 0x18 + .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b140:: @ 58B140 +@ replacing .incbin "baserom.gba", 0x0058b140, 0x18 + .4byte gUnknown_085eb04a, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b158:: @ 58B158 +@ replacing .incbin "baserom.gba", 0x0058b158, 0x20 + .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085eb04a, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b178:: @ 58B178 +@ replacing .incbin "baserom.gba", 0x0058b178, 0x18 + .4byte gUnknown_085eb057, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b190:: @ 58B190 +@ replacing .incbin "baserom.gba", 0x0058b190, 0x20 + .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085eb057, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b1b0:: @ 58B1B0 +@ replacing .incbin "baserom.gba", 0x0058b1b0, 0x20 + .4byte gUnknown_085eb04a, 0 + .4byte gUnknown_085eb057, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b1d0:: @ 58B1D0 +@ replacing .incbin "baserom.gba", 0x0058b1d0, 0x28 + .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085eb04a, 0 + .4byte gUnknown_085eb057, 0 + .4byte gUnknown_085eb062, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b1f8:: @ 58B1F8 +@ replacing .incbin "baserom.gba", 0x0058b1f8, 0x30 + .4byte gUnknown_085eb1a0, 0 + .4byte gUnknown_085eb1a9, 0 + .4byte gUnknown_085eb1b6, 0 + .4byte gUnknown_085eb5bc, 0 + .4byte gUnknown_085eb5c3, 0 + .4byte gUnknown_085eb5c8, 0 + +gUnknown_0858b228:: @ 58B228 +@ replacing .incbin "baserom.gba", 0x0058b228, 0x28 + .4byte gUnknown_085eb1a0, 0 + .4byte gUnknown_085eb1a9, 0 + .4byte gUnknown_085eb1b6, 0 + .4byte gUnknown_085eb5c3, 0 + .4byte gUnknown_085eb5c8, 0 + +gUnknown_0858b250:: @ 58B250 +@ replacing .incbin "baserom.gba", 0x0058b250, 0x10 + .4byte gUnknown_085eb29a, 0 + .4byte gUnknown_085eb2a3, 0 + +gUnknown_0858b260:: @ 58B260 +@ replacing .incbin "baserom.gba", 0x0058b260, 0x20 + .4byte gUnknown_085eb372, 0 + .4byte gUnknown_085eb37f, 0 + .4byte gUnknown_085eb389, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b280:: @ 58B280 +@ replacing .incbin "baserom.gba", 0x0058b280, 0x18 + .4byte gText_Yes, 0 + .4byte gText_No, 0 + .4byte gUnknown_085ead6d, 0 + +gUnknown_0858b298:: @ 58B298 +@ replacing .incbin "baserom.gba", 0x0058b298, 0x28 + .4byte gUnknown_085eae6e, 0 + .4byte gUnknown_085eae7c, 0 + .4byte gUnknown_085eae8a, 0 + .4byte gUnknown_085ead6d, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b2c0:: @ 58B2C0 +@ replacing .incbin "baserom.gba", 0x0058b2c0, 0x20 + .4byte gUnknown_085eb372, 0 + .4byte gUnknown_085eb37f, 0 + .4byte gUnknown_085eb397, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b2e0:: @ 58B2E0 +@ replacing .incbin "baserom.gba", 0x0058b2e0, 0x28 + .4byte gUnknown_085eb372, 0 + .4byte gUnknown_085eb37f, 0 + .4byte gUnknown_085eb389, 0 + .4byte gUnknown_085eb397, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b308:: @ 58B308 +@ replacing .incbin "baserom.gba", 0x0058b308, 0x18 + .4byte gUnknown_085eb372, 0 + .4byte gUnknown_085eb37f, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b320:: @ 58B320 +@ replacing .incbin "baserom.gba", 0x0058b320, 0x18 + .4byte gUnknown_085eb3a4, 0 + .4byte gUnknown_085eb3b1, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b338:: @ 58B338 +@ replacing .incbin "baserom.gba", 0x0058b338, 0x18 + .4byte gUnknown_085eb3d4, 0 + .4byte gUnknown_085eb3c6, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b350:: @ 58B350 +@ replacing .incbin "baserom.gba", 0x0058b350, 0x28 + .4byte gUnknown_085eb1c5, 0 + .4byte gUnknown_085eb1d1, 0 + .4byte gUnknown_085eb1dc, 0 + .4byte gUnknown_085eb1e7, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b378:: @ 58B378 +@ replacing .incbin "baserom.gba", 0x0058b378, 0x18 + .4byte gUnknown_085eb212, 0 + .4byte gUnknown_085eb21d, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b390:: @ 58B390 +@ replacing .incbin "baserom.gba", 0x0058b390, 0x20 + .4byte gUnknown_085eb227, 0 + .4byte gUnknown_085eb234, 0 + .4byte gUnknown_085eb241, 0 + .4byte gText_Cancel2, 0 + +gUnknown_0858b3b0:: @ 58B3B0 +@ replacing .incbin "baserom.gba", 0x0058b3b0, 0x18 + .4byte gUnknown_085eb24e, 0 + .4byte gUnknown_085eb255, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b3c8:: @ 58B3C8 +@ replacing .incbin "baserom.gba", 0x0058b3c8, 0x40 + .4byte gText_MenuOptionPokedex, 0 + .4byte gText_MenuOptionPokemon, 0 + .4byte gText_MenuOptionBag, 0 + .4byte gText_MenuOptionPokenav, 0 + .4byte gUnknown_085eb278, 0 + .4byte gText_MenuOptionSave, 0 + .4byte gText_MenuOptionOption, 0 + .4byte gText_MenuOptionExit, 0 + +gUnknown_0858b408:: @ 58B408 +@ replacing .incbin "baserom.gba", 0x0058b408, 0x20 + .4byte gUnknown_085eb28a, 0 + .4byte gUnknown_085eb290, 0 + .4byte gUnknown_085eb295, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b428:: @ 58B428 +@ replacing .incbin "baserom.gba", 0x0058b428, 0x18 + .4byte gUnknown_085eb2ad, 0 + .4byte gUnknown_085eb2bd, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b440:: @ 58B440 +@ replacing .incbin "baserom.gba", 0x0058b440, 0x18 + .4byte gUnknown_085eb2ad, 0 + .4byte gUnknown_085eb2ca, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b458:: @ 58B458 +@ replacing .incbin "baserom.gba", 0x0058b458, 0x18 + .4byte gUnknown_085eb2bd, 0 + .4byte gUnknown_085eb2ca, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b470:: @ 58B470 +@ replacing .incbin "baserom.gba", 0x0058b470, 0x20 + .4byte gUnknown_085eb2ad, 0 + .4byte gUnknown_085eb2bd, 0 + .4byte gUnknown_085eb2ca, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b490:: @ 58B490 +@ replacing .incbin "baserom.gba", 0x0058b490, 0x18 + .4byte gUnknown_085eb2e4, 0 + .4byte gUnknown_085eb2f0, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b4a8:: @ 58B4A8 +@ replacing .incbin "baserom.gba", 0x0058b4a8, 0x10 + .4byte gText_Yes, 0 + .4byte gUnknown_085eb2fc, 0 + +gUnknown_0858b4b8:: @ 58B4B8 +@ replacing .incbin "baserom.gba", 0x0058b4b8, 0x30 + .4byte gUnknown_085eb3df, 0 + .4byte gUnknown_085eb3ea, 0 + .4byte gUnknown_085eb3f1, 0 + .4byte gUnknown_085eb3fc, 0 + .4byte gUnknown_085eb40a, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b4e8:: @ 58B4E8 +@ replacing .incbin "baserom.gba", 0x0058b4e8, 0x20 + .4byte gUnknown_085eb415, 0 + .4byte gUnknown_085eb41d, 0 + .4byte gUnknown_085eb424, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b508:: @ 58B508 +@ replacing .incbin "baserom.gba", 0x0058b508, 0x28 + .4byte gUnknown_085eb45c, 0 + .4byte gUnknown_085eb469, 0 + .4byte gUnknown_085eb475, 0 + .4byte gUnknown_085eb482, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b530:: @ 58B530 +@ replacing .incbin "baserom.gba", 0x0058b530, 0x28 + .4byte gUnknown_085eb42f, 0 + .4byte gUnknown_085eb43a, 0 + .4byte gUnknown_085eb444, 0 + .4byte gUnknown_085eb451, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b558:: @ 58B558 +@ replacing .incbin "baserom.gba", 0x0058b558, 0x20 + .4byte gUnknown_085eb48e, 0 + .4byte gUnknown_085eb496, 0 + .4byte gUnknown_085eb4a3, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b578:: @ 58B578 +@ replacing .incbin "baserom.gba", 0x0058b578, 0x30 + .4byte gUnknown_085eb4ad, 0 + .4byte gUnknown_085eb4b9, 0 + .4byte gUnknown_085eb4c7, 0 + .4byte gUnknown_085eb4d4, 0 + .4byte gUnknown_085eb4e0, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b5a8:: @ 58B5A8 +@ replacing .incbin "baserom.gba", 0x0058b5a8, 0x30 + .4byte gUnknown_085eb4eb, 0 + .4byte gUnknown_085eb4f9, 0 + .4byte gUnknown_085eb508, 0 + .4byte gUnknown_085eb516, 0 + .4byte gUnknown_085eb523, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b5d8:: @ 58B5D8 +@ replacing .incbin "baserom.gba", 0x0058b5d8, 0x28 + .4byte gUnknown_085eb532, 0 + .4byte gUnknown_085eb543, 0 + .4byte gUnknown_085eb555, 0 + .4byte gUnknown_085eb563, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b600:: @ 58B600 +@ replacing .incbin "baserom.gba", 0x0058b600, 0x20 + .4byte gUnknown_085eb56e, 0 + .4byte gUnknown_085eb57e, 0 + .4byte gUnknown_085eb589, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b620:: @ 58B620 +@ replacing .incbin "baserom.gba", 0x0058b620, 0x20 + .4byte gUnknown_085eb5b6, 0 + .4byte gUnknown_085eb5bc, 0 + .4byte gUnknown_085eb5c3, 0 + .4byte gUnknown_085eb5c8, 0 + +gUnknown_0858b640:: @ 58B640 +@ replacing .incbin "baserom.gba", 0x0058b640, 0x18 + .4byte gUnknown_085eb5b6, 0 + .4byte gUnknown_085eb5c3, 0 + .4byte gUnknown_085eb5c8, 0 + +gUnknown_0858b658:: @ 58B658 +@ replacing .incbin "baserom.gba", 0x0058b658, 0x18 + .4byte gUnknown_085eb5b6, 0 + .4byte gUnknown_085eb5bc, 0 + .4byte gUnknown_085eb5c8, 0 + +gUnknown_0858b670:: @ 58B670 +@ replacing .incbin "baserom.gba", 0x0058b670, 0x10 + .4byte gUnknown_085eb5b6, 0 + .4byte gUnknown_085eb5c8, 0 + +gUnknown_0858b680:: @ 58B680 +@ replacing .incbin "baserom.gba", 0x0058b680, 0x10 + .4byte gUnknown_085ee14b, 0 + .4byte gUnknown_085ee14f, 0 + +gUnknown_0858b690:: @ 58B690 +@ replacing .incbin "baserom.gba", 0x0058b690, 0x20 + .4byte gUnknown_085eb2ff, 0 + .4byte gUnknown_085eb310, 0 + .4byte gUnknown_085eb317, 0 + .4byte gUnknown_085eb31f, 0 + +gUnknown_0858b6b0:: @ 58B6B0 +@ replacing .incbin "baserom.gba", 0x0058b6b0, 0x20 + .4byte gUnknown_085eb7b8, 0 + .4byte gUnknown_085eb7c7, 0 + .4byte gUnknown_085eb7d0, 0 + .4byte gUnknown_085eb7db, 0 + +gUnknown_0858b6d0:: @ 58B6D0 +@ replacing .incbin "baserom.gba", 0x0058b6d0, 0x30 + .4byte gUnknown_085eb4ad, 0 + .4byte gUnknown_085eb4b9, 0 + .4byte gUnknown_085eb4c7, 0 + .4byte gUnknown_085eb4d4, 0 + .4byte gUnknown_085eb597, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b700:: @ 58B700 +@ replacing .incbin "baserom.gba", 0x0058b700, 0x30 + .4byte gUnknown_085eb5a6, 0 + .4byte gUnknown_085eb45c, 0 + .4byte gUnknown_085eb469, 0 + .4byte gUnknown_085eb475, 0 + .4byte gUnknown_085eb482, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b730:: @ 58B730 +@ replacing .incbin "baserom.gba", 0x0058b730, 0x28 + .4byte gUnknown_085eb32d, 0 + .4byte gUnknown_085eb33e, 0 + .4byte gUnknown_085eb350, 0 + .4byte gUnknown_085eb361, 0 + .4byte gText_Exit, 0 + +gUnknown_0858b758:: @ 58B758 +@ replacing .incbin "baserom.gba", 0x0058b758, 0x8 + .4byte gText_Exit, 0 + + +gUnknown_0858B760:: @ 858B760 +@ replacing .incbin "baserom.gba", 0x0058b760, 0x390 + .4byte 0x0858abd8, 3 + .4byte gUnknown_0858b758, 1 + .4byte gUnknown_0858abf0, 3 + .4byte gUnknown_0858ac08, 4 + .4byte gUnknown_0858ac28, 6 + .4byte gUnknown_0858ac78, 3 + .4byte gUnknown_0858ac58, 4 + .4byte gUnknown_0858ac90, 4 + .4byte gUnknown_0858b758, 1 + .4byte gUnknown_0858b758, 1 + .4byte gUnknown_0858b758, 1 + .4byte gUnknown_0858b4e8, 4 + .4byte gUnknown_0858acb0, 2 + .4byte gUnknown_0858acc0, 6 + .4byte gUnknown_0858acf0, 2 + .4byte gUnknown_0858b758, 1 + .4byte gUnknown_0858ad00, 2 + .4byte gUnknown_0858b280, 3 + .4byte gUnknown_0858b298, 5 + .4byte gUnknown_0858b758, 1 + .4byte gUnknown_0858ad10, 3 + .4byte gUnknown_0858b758, 1 + .4byte gUnknown_0858b758, 1 + .4byte gUnknown_0858ad28, 3 + .4byte gUnknown_0858ad40, 3 + .4byte gUnknown_0858ad58, 3 + .4byte gUnknown_0858ad70, 3 + .4byte gUnknown_0858ad88, 3 + .4byte gUnknown_0858ada0, 3 + .4byte gUnknown_0858adb8, 3 + .4byte gUnknown_0858add0, 3 + .4byte gUnknown_0858ade8, 3 + .4byte gUnknown_0858ae00, 3 + .4byte gUnknown_0858ae18, 3 + .4byte gUnknown_0858ae30, 3 + .4byte gUnknown_0858ae48, 3 + .4byte gUnknown_0858ae60, 3 + .4byte gUnknown_0858ae78, 3 + .4byte gUnknown_0858ae90, 3 + .4byte gUnknown_0858aea8, 3 + .4byte gUnknown_0858b758, 1 + .4byte gUnknown_0858b758, 1 + .4byte gUnknown_0858aec0, 4 + .4byte gUnknown_0858aee0, 4 + .4byte gUnknown_0858af00, 4 + .4byte gUnknown_0858af20, 2 + .4byte gUnknown_0858af30, 3 + .4byte gUnknown_0858af48, 8 + .4byte gUnknown_0858af88, 4 + .4byte gUnknown_0858afd8, 3 + .4byte gUnknown_0858aff0, 2 + .4byte gUnknown_0858b758, 1 + .4byte gUnknown_0858b000, 3 + .4byte gUnknown_0858b018, 3 + .4byte gUnknown_0858b030, 2 + .4byte gUnknown_0858afa8, 6 + .4byte gUnknown_0858b040, 2 + .4byte gUnknown_0858b050, 6 + .4byte gUnknown_0858b080, 2 + .4byte gUnknown_0858b090, 2 + .4byte gUnknown_0858b0a0, 3 + .4byte gUnknown_0858b0b8, 2 + .4byte gUnknown_0858b0c8, 3 + .4byte gUnknown_0858b0e0, 3 + .4byte gUnknown_0858b0f8, 4 + .4byte gUnknown_0858b118, 2 + .4byte gUnknown_0858b128, 3 + .4byte gUnknown_0858b140, 3 + .4byte gUnknown_0858b158, 4 + .4byte gUnknown_0858b178, 3 + .4byte gUnknown_0858b190, 4 + .4byte gUnknown_0858b1b0, 4 + .4byte gUnknown_0858b1d0, 5 + .4byte gUnknown_0858b1f8, 6 + .4byte gUnknown_0858b308, 3 + .4byte gUnknown_0858b308, 3 + .4byte gUnknown_0858b260, 4 + .4byte gUnknown_0858b260, 4 + .4byte gUnknown_0858b2c0, 4 + .4byte gUnknown_0858b2e0, 5 + .4byte gUnknown_0858b320, 3 + .4byte gUnknown_0858b338, 3 + .4byte gUnknown_0858b350, 5 + .4byte gUnknown_0858b378, 3 + .4byte gUnknown_0858b390, 4 + .4byte gUnknown_0858b3b0, 3 + .4byte gUnknown_0858b3c8, 8 + .4byte gUnknown_0858b408, 4 + .4byte gUnknown_0858b250, 2 + .4byte gUnknown_0858b428, 3 + .4byte gUnknown_0858b440, 3 + .4byte gUnknown_0858b458, 3 + .4byte gUnknown_0858b470, 4 + .4byte gUnknown_0858b490, 3 + .4byte gUnknown_0858b4a8, 2 + .4byte gUnknown_0858b4b8, 6 + .4byte gUnknown_0858b508, 5 + .4byte gUnknown_0858b530, 5 + .4byte gUnknown_0858b558, 4 + .4byte gUnknown_0858b578, 6 + .4byte gUnknown_0858b5a8, 6 + .4byte gUnknown_0858b5d8, 5 + .4byte gUnknown_0858b600, 4 + .4byte gUnknown_0858b620, 4 + .4byte gUnknown_0858b640, 3 + .4byte gUnknown_0858b658, 3 + .4byte gUnknown_0858b670, 2 + .4byte gUnknown_0858b228, 5 + .4byte gUnknown_0858b680, 2 + .4byte gUnknown_0858b690, 4 + .4byte gUnknown_0858b6b0, 4 + .4byte gUnknown_0858b6d0, 6 + .4byte gUnknown_0858b700, 6 + .4byte gUnknown_0858b730, 5 + +gUnknown_0858BAF0:: @ 858BAF0 + .incbin "baserom.gba", 0x58baf0, 0x78 + +gUnknown_0858BB68:: @ 858BB68 + .incbin "baserom.gba", 0x58bb68, 0x8 + +gUnknown_0858BB70:: @ 858BB70 + .incbin "baserom.gba", 0x58bb70, 0x10 + +gUnknown_0858BB80:: @ 858BB80 + .incbin "baserom.gba", 0x58bb80, 0x1c + +gUnknown_0858BB9C:: @ 858BB9C + .incbin "baserom.gba", 0x58bb9c, 0x10 + +gUnknown_0858BBAC:: @ 858BBAC + .incbin "baserom.gba", 0x58bbac, 0x10 + +gUnknown_0858BBBC:: @ 858BBBC + .incbin "baserom.gba", 0x58bbbc, 0x10 + +gUnknown_0858BBCC:: @ 858BBCC + .incbin "baserom.gba", 0x58bbcc, 0x14 + +gUnknown_0858BBE0:: @ 858BBE0 + .incbin "baserom.gba", 0x58bbe0, 0xc + +gUnknown_0858BBEC:: @ 858BBEC + .incbin "baserom.gba", 0x58bbec, 0x18c diff --git a/ld_script.txt b/ld_script.txt index 4e90c8cbe..b38856729 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -345,6 +345,7 @@ SECTIONS { data/field_map_obj.o(.rodata); data/data3_a0_B.o(.rodata); src/berry.o(.rodata); + data/script_menu.o(.rodata); data/data3_a1.o(.rodata); src/pokemon_size_record.o(.rodata) data/field_effect.o(.rodata); diff --git a/src/berry.c b/src/berry.c index e9d6994f8..cf49d4dc4 100644 --- a/src/berry.c +++ b/src/berry.c @@ -17,7 +17,6 @@ extern bool8 sub_8092E9C(u8, u8, u8); extern u16 gScriptItemId; extern const u8 BerryTreeScript[]; -extern const struct BerryTree gBlankBerryTree; #define BERRY_NAME_LENGTH 6 @@ -804,6 +803,57 @@ const struct Berry gBerries[] = }, }; +const struct { + u8 unk0; + u16 unk1; +} gUnknown_0858AB24[] = { + { 50, 20}, + { 50, 20}, + { 50, 20}, + { 50, 20}, + { 50, 20}, + { 50, 30}, + { 50, 30}, + { 50, 30}, + { 50, 30}, + { 50, 30}, + { 60, 50}, + { 60, 50}, + { 60, 50}, + { 60, 50}, + { 60, 50}, + { 80, 70}, + { 80, 70}, + { 80, 70}, + { 80, 70}, + { 80, 70}, + {100, 100}, + {100, 100}, + {100, 100}, + {100, 100}, + {100, 100}, + {130, 150}, + {130, 150}, + {130, 150}, + {130, 150}, + {130, 150}, + {160, 250}, + {160, 250}, + {160, 250}, + {160, 250}, + {160, 250}, + {180, 500}, + {180, 500}, + {180, 500}, + {180, 500}, + {180, 500}, + {200, 750}, + {200, 750}, + {150, 200} +}; + +const struct BerryTree gBlankBerryTree = {}; + // unused void ClearEnigmaBerries(void) { From bf9e2b7210361695a3ffdb8305c054c41ad18609 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 25 Sep 2017 15:03:52 -0400 Subject: [PATCH 287/342] split data3_a1 --- data/contest_effect.s | 22 ++ data/contest_link_80F57C4.s | 46 ++++ data/data3_a1.s | 381 ----------------------------- data/money.s | 13 + data/naming_screen.s | 151 ++++++++++++ data/record_mixing.s | 20 ++ data/script_pokemon_util_80F87D8.s | 7 + data/secret_base.s | 26 ++ data/tv.s | 128 ++++++++++ include/berry.h | 7 + ld_script.txt | 9 +- src/berry.c | 5 +- 12 files changed, 429 insertions(+), 386 deletions(-) create mode 100644 data/contest_effect.s create mode 100644 data/contest_link_80F57C4.s delete mode 100644 data/data3_a1.s create mode 100644 data/money.s create mode 100644 data/naming_screen.s create mode 100644 data/record_mixing.s create mode 100644 data/script_pokemon_util_80F87D8.s create mode 100644 data/secret_base.s create mode 100644 data/tv.s diff --git a/data/contest_effect.s b/data/contest_effect.s new file mode 100644 index 000000000..31b294836 --- /dev/null +++ b/data/contest_effect.s @@ -0,0 +1,22 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +@ 858C2B4 + .include "data/contest_moves.inc" + +@ 858CDCC + .include "data/contest_effects.inc" + +@ A lookup table with a 1 for each combo starter ID and a 0 for ID 0, +@ which means "not a combo starter move". +gComboStarterLookupTable:: @ 858CE8C + .byte 0 + .rept 62 + .byte 1 + .endr + + .align 2 +@ 858CECC + .include "data/contest_effect_function_table.inc" diff --git a/data/contest_link_80F57C4.s b/data/contest_link_80F57C4.s new file mode 100644 index 000000000..7d30cea57 --- /dev/null +++ b/data/contest_link_80F57C4.s @@ -0,0 +1,46 @@ +@ the third big chunk of data + + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0858D6B0:: @ 858D6B0 + .incbin "baserom.gba", 0x58d6b0, 0x20 + +gUnknown_0858D6D0:: @ 858D6D0 + .incbin "baserom.gba", 0x58d6d0, 0x128 + +gUnknown_0858D7F8:: @ 858D7F8 + .incbin "baserom.gba", 0x58d7f8, 0x18 + +gUnknown_0858D810:: @ 858D810 + .incbin "baserom.gba", 0x58d810, 0x40 + +gUnknown_0858D850:: @ 858D850 + .incbin "baserom.gba", 0x58d850, 0x10 + +gUnknown_0858D860:: @ 858D860 + .incbin "baserom.gba", 0x58d860, 0x18 + +gUnknown_0858D878:: @ 858D878 + .incbin "baserom.gba", 0x58d878, 0x8 + +gUnknown_0858D880:: @ 858D880 + .incbin "baserom.gba", 0x58d880, 0x8 + +gUnknown_0858D888:: @ 858D888 + .incbin "baserom.gba", 0x58d888, 0x10 + +gUnknown_0858D898:: @ 858D898 + .incbin "baserom.gba", 0x58d898, 0x30 + +gUnknown_0858D8C8:: @ 858D8C8 + .incbin "baserom.gba", 0x58d8c8, 0x18 + +gUnknown_0858D8E0:: @ 858D8E0 + .incbin "baserom.gba", 0x58d8e0, 0x8 + +gUnknown_0858D8E8:: @ 858D8E8 + .incbin "baserom.gba", 0x58d8e8, 0x4 diff --git a/data/data3_a1.s b/data/data3_a1.s deleted file mode 100644 index 14d3b54df..000000000 --- a/data/data3_a1.s +++ /dev/null @@ -1,381 +0,0 @@ -@ the third big chunk of data - - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -gUnknown_0858BD78:: @ 858BD78 - .incbin "baserom.gba", 0x58bd78, 0x40 - -gUnknown_0858BDB8:: @ 858BDB8 - .incbin "baserom.gba", 0x58bdb8, 0x10 - -gUnknown_0858BDC8:: @ 858BDC8 - .incbin "baserom.gba", 0x58bdc8, 0x38 - -gUnknown_0858BE00:: @ 858BE00 - .incbin "baserom.gba", 0x58be00, 0x10 - -gUnknown_0858BE10:: @ 858BE10 - .incbin "baserom.gba", 0x58be10, 0x30 - -gUnknown_0858BE40:: @ 858BE40 - .incbin "baserom.gba", 0x58be40, 0x60 - -gUnknown_0858BEA0:: @ 858BEA0 - .incbin "baserom.gba", 0x58bea0, 0x3 - -gUnknown_0858BEA3:: @ 858BEA3 - .incbin "baserom.gba", 0x58bea3, 0x18 - -gUnknown_0858BEBB:: @ 858BEBB - .incbin "baserom.gba", 0x58bebb, 0x3 - -gUnknown_0858BEBE:: @ 858BEBE - .incbin "baserom.gba", 0x58bebe, 0x3 - -gUnknown_0858BEC1:: @ 858BEC1 - .incbin "baserom.gba", 0x58bec1, 0x3 - -gUnknown_0858BEC4:: @ 858BEC4 - .incbin "baserom.gba", 0x58bec4, 0x10 - -gUnknown_0858BED4:: @ 858BED4 - .incbin "baserom.gba", 0x58bed4, 0x8 - -gUnknown_0858BEDC:: @ 858BEDC - .incbin "baserom.gba", 0x58bedc, 0x8 - -gUnknown_0858BEE4:: @ 858BEE4 - .incbin "baserom.gba", 0x58bee4, 0x4 - -gUnknown_0858BEE8:: @ 858BEE8 - .incbin "baserom.gba", 0x58bee8, 0x10 - -gUnknown_0858BEF8:: @ 858BEF8 - .incbin "baserom.gba", 0x58bef8, 0x6 - -gUnknown_0858BEFE:: @ 858BEFE - .incbin "baserom.gba", 0x58befe, 0x6 - -gUnknown_0858BF04:: @ 858BF04 - .incbin "baserom.gba", 0x58bf04, 0x14 - -gUnknown_0858BF18:: @ 858BF18 - .incbin "baserom.gba", 0x58bf18, 0x10 - -gUnknown_0858BF28:: @ 858BF28 - .incbin "baserom.gba", 0x58bf28, 0xc - -gUnknown_0858BF34:: @ 858BF34 - .incbin "baserom.gba", 0x58bf34, 0xa - -gUnknown_0858BF3E:: @ 858BF3E - .incbin "baserom.gba", 0x58bf3e, 0xa - -gUnknown_0858BF48:: @ 858BF48 - .incbin "baserom.gba", 0x58bf48, 0x8 - -gUnknown_0858BF50:: @ 858BF50 - .incbin "baserom.gba", 0x58bf50, 0x8 - -gUnknown_0858BF58:: @ 858BF58 - .incbin "baserom.gba", 0x58bf58, 0x14 - -gUnknown_0858BF6C:: @ 858BF6C - .incbin "baserom.gba", 0x58bf6c, 0x8 - -gUnknown_0858BF74:: @ 858BF74 - .incbin "baserom.gba", 0x58bf74, 0x14 - -gUnknown_0858BF88:: @ 858BF88 - .incbin "baserom.gba", 0x58bf88, 0x4 - -gUnknown_0858BF8C:: @ 858BF8C - .incbin "baserom.gba", 0x58bf8c, 0xc - -gUnknown_0858BF98:: @ 858BF98 - .incbin "baserom.gba", 0x58bf98, 0xc - -gUnknown_0858BFA4:: @ 858BFA4 - .incbin "baserom.gba", 0x58bfa4, 0x34 - -gUnknown_0858BFD8:: @ 858BFD8 - .incbin "baserom.gba", 0x58bfd8, 0x78 - -gUnknown_0858C050:: @ 858C050 - .incbin "baserom.gba", 0x58c050, 0x8 - -gUnknown_0858C058:: @ 858C058 - .incbin "baserom.gba", 0x58c058, 0x18 - -gUnknown_0858C070:: @ 858C070 - .incbin "baserom.gba", 0x58c070, 0x8 - -gUnknown_0858C078:: @ 858C078 - .incbin "baserom.gba", 0x58c078, 0x48 - -gUnknown_0858C0C0:: @ 858C0C0 - .incbin "baserom.gba", 0x58c0c0, 0x18 - -gUnknown_0858C0D8:: @ 858C0D8 - .incbin "baserom.gba", 0x58c0d8, 0x18 - -gUnknown_0858C0F0:: @ 858C0F0 - .incbin "baserom.gba", 0x58c0f0, 0x18 - -gUnknown_0858C108:: @ 858C108 - .incbin "baserom.gba", 0x58c108, 0x18 - -gUnknown_0858C120:: @ 858C120 - .incbin "baserom.gba", 0x58c120, 0x18 - -gUnknown_0858C138:: @ 858C138 - .incbin "baserom.gba", 0x58c138, 0x18 - -gUnknown_0858C150:: @ 858C150 - .incbin "baserom.gba", 0x58c150, 0x18 - -gUnknown_0858C168:: @ 858C168 - .incbin "baserom.gba", 0x58c168, 0x18 - -gUnknown_0858C180:: @ 858C180 - .incbin "baserom.gba", 0x58c180, 0x18 - -gUnknown_0858C198:: @ 858C198 - .incbin "baserom.gba", 0x58c198, 0x30 - -gUnknown_0858C1C8:: @ 858C1C8 - .incbin "baserom.gba", 0x58c1c8, 0x68 - -gUnknown_0858C230:: @ 858C230 - .incbin "baserom.gba", 0x58c230, 0x5c - -gUnknown_0858C28C:: @ 858C28C - .incbin "baserom.gba", 0x58c28c, 0x18 - -gUnknown_0858C2A4:: @ 858C2A4 - .incbin "baserom.gba", 0x58c2a4, 0x8 - -gUnknown_0858C2AC:: @ 858C2AC - .incbin "baserom.gba", 0x58c2ac, 0x8 - -@ 858C2B4 - .include "data/contest_moves.inc" - -@ 858CDCC - .include "data/contest_effects.inc" - -@ A lookup table with a 1 for each combo starter ID and a 0 for ID 0, -@ which means "not a combo starter move". -gComboStarterLookupTable:: @ 858CE8C - .byte 0 - .rept 62 - .byte 1 - .endr - - .align 2 -@ 858CECC - .include "data/contest_effect_function_table.inc" - -gUnknown_0858CF8C:: @ 858CF8C - .incbin "baserom.gba", 0x58cf8c, 0x2 - -gUnknown_0858CF8E:: @ 858CF8E - .incbin "baserom.gba", 0x58cf8e, 0x6 - -gUnknown_0858CF94:: @ 858CF94 - .incbin "baserom.gba", 0x58cf94, 0x24 - -gUnknown_0858CFB8:: @ 858CFB8 - .incbin "baserom.gba", 0x58cfb8, 0x6 - -gUnknown_0858CFBE:: @ 858CFBE - .incbin "baserom.gba", 0x58cfbe, 0xe - -gUnknown_0858CFCC:: @ 858CFCC - .incbin "baserom.gba", 0x58cfcc, 0x1c - -gUnknown_0858CFE8:: @ 858CFE8 - .incbin "baserom.gba", 0x58cfe8, 0x60 - -gUnknown_0858D048:: @ 858D048 - .incbin "baserom.gba", 0x58d048, 0x10 - -gUnknown_0858D058:: @ 858D058 - .incbin "baserom.gba", 0x58d058, 0x8 - -gUnknown_0858D060:: @ 858D060 - .incbin "baserom.gba", 0x58d060, 0xc - -gUnknown_0858D06C:: @ 858D06C - .incbin "baserom.gba", 0x58d06c, 0x10 - -gUnknown_0858D07C:: @ 858D07C - .incbin "baserom.gba", 0x58d07c, 0x18 - -gUnknown_0858D094:: @ 858D094 - .incbin "baserom.gba", 0x58d094, 0x3c - -gUnknown_0858D0D0:: @ 858D0D0 - .incbin "baserom.gba", 0x58d0d0, 0xe - -gUnknown_0858D0DE:: @ 858D0DE - .incbin "baserom.gba", 0x58d0de, 0xe - -gUnknown_0858D0EC:: @ 858D0EC - .incbin "baserom.gba", 0x58d0ec, 0x1c - -gUnknown_0858D108:: @ 858D108 - .incbin "baserom.gba", 0x58d108, 0x14 - -gUnknown_0858D11C:: @ 858D11C - .incbin "baserom.gba", 0x58d11c, 0x14 - -gUnknown_0858D130:: @ 858D130 - .incbin "baserom.gba", 0x58d130, 0x14 - -gUnknown_0858D144:: @ 858D144 - .incbin "baserom.gba", 0x58d144, 0xc - -gUnknown_0858D150:: @ 858D150 - .incbin "baserom.gba", 0x58d150, 0x20 - -gUnknown_0858D170:: @ 858D170 - .incbin "baserom.gba", 0x58d170, 0x18 - -gUnknown_0858D188:: @ 858D188 - .incbin "baserom.gba", 0x58d188, 0x14 - -gUnknown_0858D19C:: @ 858D19C - .incbin "baserom.gba", 0x58d19c, 0x4 - -gUnknown_0858D1A0:: @ 858D1A0 - .incbin "baserom.gba", 0x58d1a0, 0x30 - -gUnknown_0858D1D0:: @ 858D1D0 - .incbin "baserom.gba", 0x58d1d0, 0x34 - -gUnknown_0858D204:: @ 858D204 - .incbin "baserom.gba", 0x58d204, 0x24 - -gUnknown_0858D228:: @ 858D228 - .incbin "baserom.gba", 0x58d228, 0x18 - -gUnknown_0858D240:: @ 858D240 - .incbin "baserom.gba", 0x58d240, 0x3c - -gUnknown_0858D27C:: @ 858D27C - .incbin "baserom.gba", 0x58d27c, 0x84 - -gUnknown_0858D300:: @ 858D300 - .incbin "baserom.gba", 0x58d300, 0x20 - -gUnknown_0858D320:: @ 858D320 - .incbin "baserom.gba", 0x58d320, 0x18 - -gUnknown_0858D338:: @ 858D338 - .incbin "baserom.gba", 0x58d338, 0x4c - -gUnknown_0858D384:: @ 858D384 - .incbin "baserom.gba", 0x58d384, 0x10 - -gUnknown_0858D394:: @ 858D394 - .incbin "baserom.gba", 0x58d394, 0x1c - -gUnknown_0858D3B0:: @ 858D3B0 - .incbin "baserom.gba", 0x58d3b0, 0x8 - -gUnknown_0858D3B8:: @ 858D3B8 - .incbin "baserom.gba", 0x58d3b8, 0xc - -gUnknown_0858D3C4:: @ 858D3C4 - .incbin "baserom.gba", 0x58d3c4, 0x2c - -gUnknown_0858D3F0:: @ 858D3F0 - .incbin "baserom.gba", 0x58d3f0, 0x1c - -gUnknown_0858D40C:: @ 858D40C - .incbin "baserom.gba", 0x58d40c, 0xc - -gUnknown_0858D418:: @ 858D418 - .incbin "baserom.gba", 0x58d418, 0x10 - -gUnknown_0858D428:: @ 858D428 - .incbin "baserom.gba", 0x58d428, 0x34 - -gUnknown_0858D45C:: @ 858D45C - .incbin "baserom.gba", 0x58d45c, 0x38 - -gUnknown_0858D494:: @ 858D494 - .incbin "baserom.gba", 0x58d494, 0x4 - -gUnknown_0858D498:: @ 858D498 - .incbin "baserom.gba", 0x58d498, 0x1c - -gUnknown_0858D4B4:: @ 858D4B4 - .incbin "baserom.gba", 0x58d4b4, 0x30 - -gUnknown_0858D4E4:: @ 858D4E4 - .incbin "baserom.gba", 0x58d4e4, 0x40 - -gUnknown_0858D524:: @ 858D524 - .incbin "baserom.gba", 0x58d524, 0x4c - -gUnknown_0858D570:: @ 858D570 - .incbin "baserom.gba", 0x58d570, 0x24 - -gUnknown_0858D594:: @ 858D594 - .incbin "baserom.gba", 0x58d594, 0xac - -gUnknown_0858D640:: @ 858D640 - .incbin "baserom.gba", 0x58d640, 0x2c - -gUnknown_0858D66C:: @ 858D66C - .incbin "baserom.gba", 0x58d66c, 0x24 - -gUnknown_0858D690:: @ 858D690 - .incbin "baserom.gba", 0x58d690, 0x20 - -gUnknown_0858D6B0:: @ 858D6B0 - .incbin "baserom.gba", 0x58d6b0, 0x20 - -gUnknown_0858D6D0:: @ 858D6D0 - .incbin "baserom.gba", 0x58d6d0, 0x128 - -gUnknown_0858D7F8:: @ 858D7F8 - .incbin "baserom.gba", 0x58d7f8, 0x18 - -gUnknown_0858D810:: @ 858D810 - .incbin "baserom.gba", 0x58d810, 0x40 - -gUnknown_0858D850:: @ 858D850 - .incbin "baserom.gba", 0x58d850, 0x10 - -gUnknown_0858D860:: @ 858D860 - .incbin "baserom.gba", 0x58d860, 0x18 - -gUnknown_0858D878:: @ 858D878 - .incbin "baserom.gba", 0x58d878, 0x8 - -gUnknown_0858D880:: @ 858D880 - .incbin "baserom.gba", 0x58d880, 0x8 - -gUnknown_0858D888:: @ 858D888 - .incbin "baserom.gba", 0x58d888, 0x10 - -gUnknown_0858D898:: @ 858D898 - .incbin "baserom.gba", 0x58d898, 0x30 - -gUnknown_0858D8C8:: @ 858D8C8 - .incbin "baserom.gba", 0x58d8c8, 0x18 - -gUnknown_0858D8E0:: @ 858D8E0 - .incbin "baserom.gba", 0x58d8e0, 0x8 - -gUnknown_0858D8E8:: @ 858D8E8 - .incbin "baserom.gba", 0x58d8e8, 0x4 - -gUnknown_0858D8EC:: @ 858D8EC - .incbin "baserom.gba", 0x58d8ec, 0x4 diff --git a/data/money.s b/data/money.s new file mode 100644 index 000000000..d7457be46 --- /dev/null +++ b/data/money.s @@ -0,0 +1,13 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0858C28C:: @ 858C28C + .incbin "baserom.gba", 0x58c28c, 0x18 + +gUnknown_0858C2A4:: @ 858C2A4 + .incbin "baserom.gba", 0x58c2a4, 0x8 + +gUnknown_0858C2AC:: @ 858C2AC + .incbin "baserom.gba", 0x58c2ac, 0x8 diff --git a/data/naming_screen.s b/data/naming_screen.s new file mode 100644 index 000000000..352fac8e4 --- /dev/null +++ b/data/naming_screen.s @@ -0,0 +1,151 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_0858BD78:: @ 858BD78 + .incbin "baserom.gba", 0x58bd78, 0x40 + +gUnknown_0858BDB8:: @ 858BDB8 + .incbin "baserom.gba", 0x58bdb8, 0x10 + +gUnknown_0858BDC8:: @ 858BDC8 + .incbin "baserom.gba", 0x58bdc8, 0x38 + +gUnknown_0858BE00:: @ 858BE00 + .incbin "baserom.gba", 0x58be00, 0x10 + +gUnknown_0858BE10:: @ 858BE10 + .incbin "baserom.gba", 0x58be10, 0x30 + +gUnknown_0858BE40:: @ 858BE40 + .incbin "baserom.gba", 0x58be40, 0x60 + +gUnknown_0858BEA0:: @ 858BEA0 + .incbin "baserom.gba", 0x58bea0, 0x3 + +gUnknown_0858BEA3:: @ 858BEA3 + .incbin "baserom.gba", 0x58bea3, 0x18 + +gUnknown_0858BEBB:: @ 858BEBB + .incbin "baserom.gba", 0x58bebb, 0x3 + +gUnknown_0858BEBE:: @ 858BEBE + .incbin "baserom.gba", 0x58bebe, 0x3 + +gUnknown_0858BEC1:: @ 858BEC1 + .incbin "baserom.gba", 0x58bec1, 0x3 + +gUnknown_0858BEC4:: @ 858BEC4 + .incbin "baserom.gba", 0x58bec4, 0x10 + +gUnknown_0858BED4:: @ 858BED4 + .incbin "baserom.gba", 0x58bed4, 0x8 + +gUnknown_0858BEDC:: @ 858BEDC + .incbin "baserom.gba", 0x58bedc, 0x8 + +gUnknown_0858BEE4:: @ 858BEE4 + .incbin "baserom.gba", 0x58bee4, 0x4 + +gUnknown_0858BEE8:: @ 858BEE8 + .incbin "baserom.gba", 0x58bee8, 0x10 + +gUnknown_0858BEF8:: @ 858BEF8 + .incbin "baserom.gba", 0x58bef8, 0x6 + +gUnknown_0858BEFE:: @ 858BEFE + .incbin "baserom.gba", 0x58befe, 0x6 + +gUnknown_0858BF04:: @ 858BF04 + .incbin "baserom.gba", 0x58bf04, 0x14 + +gUnknown_0858BF18:: @ 858BF18 + .incbin "baserom.gba", 0x58bf18, 0x10 + +gUnknown_0858BF28:: @ 858BF28 + .incbin "baserom.gba", 0x58bf28, 0xc + +gUnknown_0858BF34:: @ 858BF34 + .incbin "baserom.gba", 0x58bf34, 0xa + +gUnknown_0858BF3E:: @ 858BF3E + .incbin "baserom.gba", 0x58bf3e, 0xa + +gUnknown_0858BF48:: @ 858BF48 + .incbin "baserom.gba", 0x58bf48, 0x8 + +gUnknown_0858BF50:: @ 858BF50 + .incbin "baserom.gba", 0x58bf50, 0x8 + +gUnknown_0858BF58:: @ 858BF58 + .incbin "baserom.gba", 0x58bf58, 0x14 + +gUnknown_0858BF6C:: @ 858BF6C + .incbin "baserom.gba", 0x58bf6c, 0x8 + +gUnknown_0858BF74:: @ 858BF74 + .incbin "baserom.gba", 0x58bf74, 0x14 + +gUnknown_0858BF88:: @ 858BF88 + .incbin "baserom.gba", 0x58bf88, 0x4 + +gUnknown_0858BF8C:: @ 858BF8C + .incbin "baserom.gba", 0x58bf8c, 0xc + +gUnknown_0858BF98:: @ 858BF98 + .incbin "baserom.gba", 0x58bf98, 0xc + +gUnknown_0858BFA4:: @ 858BFA4 + .incbin "baserom.gba", 0x58bfa4, 0x34 + +gUnknown_0858BFD8:: @ 858BFD8 + .incbin "baserom.gba", 0x58bfd8, 0x78 + +gUnknown_0858C050:: @ 858C050 + .incbin "baserom.gba", 0x58c050, 0x8 + +gUnknown_0858C058:: @ 858C058 + .incbin "baserom.gba", 0x58c058, 0x18 + +gUnknown_0858C070:: @ 858C070 + .incbin "baserom.gba", 0x58c070, 0x8 + +gUnknown_0858C078:: @ 858C078 + .incbin "baserom.gba", 0x58c078, 0x48 + +gUnknown_0858C0C0:: @ 858C0C0 + .incbin "baserom.gba", 0x58c0c0, 0x18 + +gUnknown_0858C0D8:: @ 858C0D8 + .incbin "baserom.gba", 0x58c0d8, 0x18 + +gUnknown_0858C0F0:: @ 858C0F0 + .incbin "baserom.gba", 0x58c0f0, 0x18 + +gUnknown_0858C108:: @ 858C108 + .incbin "baserom.gba", 0x58c108, 0x18 + +gUnknown_0858C120:: @ 858C120 + .incbin "baserom.gba", 0x58c120, 0x18 + +gUnknown_0858C138:: @ 858C138 + .incbin "baserom.gba", 0x58c138, 0x18 + +gUnknown_0858C150:: @ 858C150 + .incbin "baserom.gba", 0x58c150, 0x18 + +gUnknown_0858C168:: @ 858C168 + .incbin "baserom.gba", 0x58c168, 0x18 + +gUnknown_0858C180:: @ 858C180 + .incbin "baserom.gba", 0x58c180, 0x18 + +gUnknown_0858C198:: @ 858C198 + .incbin "baserom.gba", 0x58c198, 0x30 + +gUnknown_0858C1C8:: @ 858C1C8 + .incbin "baserom.gba", 0x58c1c8, 0x68 + +gUnknown_0858C230:: @ 858C230 + .incbin "baserom.gba", 0x58c230, 0x5c diff --git a/data/record_mixing.s b/data/record_mixing.s new file mode 100644 index 000000000..6531633a5 --- /dev/null +++ b/data/record_mixing.s @@ -0,0 +1,20 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0858CF8C:: @ 858CF8C + .incbin "baserom.gba", 0x58cf8c, 0x2 + +gUnknown_0858CF8E:: @ 858CF8E + .incbin "baserom.gba", 0x58cf8e, 0x6 + +gUnknown_0858CF94:: @ 858CF94 + .incbin "baserom.gba", 0x58cf94, 0x24 + +gUnknown_0858CFB8:: @ 858CFB8 + .incbin "baserom.gba", 0x58cfb8, 0x6 + +gUnknown_0858CFBE:: @ 858CFBE + .incbin "baserom.gba", 0x58cfbe, 0xe diff --git a/data/script_pokemon_util_80F87D8.s b/data/script_pokemon_util_80F87D8.s new file mode 100644 index 000000000..beda525c8 --- /dev/null +++ b/data/script_pokemon_util_80F87D8.s @@ -0,0 +1,7 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 +gUnknown_0858D8EC:: @ 858D8EC + .incbin "baserom.gba", 0x58d8ec, 0x4 diff --git a/data/secret_base.s b/data/secret_base.s new file mode 100644 index 000000000..3dd2d808f --- /dev/null +++ b/data/secret_base.s @@ -0,0 +1,26 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0858CFCC:: @ 858CFCC + .incbin "baserom.gba", 0x58cfcc, 0x1c + +gUnknown_0858CFE8:: @ 858CFE8 + .incbin "baserom.gba", 0x58cfe8, 0x60 + +gUnknown_0858D048:: @ 858D048 + .incbin "baserom.gba", 0x58d048, 0x10 + +gUnknown_0858D058:: @ 858D058 + .incbin "baserom.gba", 0x58d058, 0x8 + +gUnknown_0858D060:: @ 858D060 + .incbin "baserom.gba", 0x58d060, 0xc + +gUnknown_0858D06C:: @ 858D06C + .incbin "baserom.gba", 0x58d06c, 0x10 + +gUnknown_0858D07C:: @ 858D07C + .incbin "baserom.gba", 0x58d07c, 0x18 diff --git a/data/tv.s b/data/tv.s new file mode 100644 index 000000000..4d2a608c4 --- /dev/null +++ b/data/tv.s @@ -0,0 +1,128 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0858D094:: @ 858D094 + .incbin "baserom.gba", 0x58d094, 0x3c + +gUnknown_0858D0D0:: @ 858D0D0 + .incbin "baserom.gba", 0x58d0d0, 0xe + +gUnknown_0858D0DE:: @ 858D0DE + .incbin "baserom.gba", 0x58d0de, 0xe + +gUnknown_0858D0EC:: @ 858D0EC + .incbin "baserom.gba", 0x58d0ec, 0x1c + +gUnknown_0858D108:: @ 858D108 + .incbin "baserom.gba", 0x58d108, 0x14 + +gUnknown_0858D11C:: @ 858D11C + .incbin "baserom.gba", 0x58d11c, 0x14 + +gUnknown_0858D130:: @ 858D130 + .incbin "baserom.gba", 0x58d130, 0x14 + +gUnknown_0858D144:: @ 858D144 + .incbin "baserom.gba", 0x58d144, 0xc + +gUnknown_0858D150:: @ 858D150 + .incbin "baserom.gba", 0x58d150, 0x20 + +gUnknown_0858D170:: @ 858D170 + .incbin "baserom.gba", 0x58d170, 0x18 + +gUnknown_0858D188:: @ 858D188 + .incbin "baserom.gba", 0x58d188, 0x14 + +gUnknown_0858D19C:: @ 858D19C + .incbin "baserom.gba", 0x58d19c, 0x4 + +gUnknown_0858D1A0:: @ 858D1A0 + .incbin "baserom.gba", 0x58d1a0, 0x30 + +gUnknown_0858D1D0:: @ 858D1D0 + .incbin "baserom.gba", 0x58d1d0, 0x34 + +gUnknown_0858D204:: @ 858D204 + .incbin "baserom.gba", 0x58d204, 0x24 + +gUnknown_0858D228:: @ 858D228 + .incbin "baserom.gba", 0x58d228, 0x18 + +gUnknown_0858D240:: @ 858D240 + .incbin "baserom.gba", 0x58d240, 0x3c + +gUnknown_0858D27C:: @ 858D27C + .incbin "baserom.gba", 0x58d27c, 0x84 + +gUnknown_0858D300:: @ 858D300 + .incbin "baserom.gba", 0x58d300, 0x20 + +gUnknown_0858D320:: @ 858D320 + .incbin "baserom.gba", 0x58d320, 0x18 + +gUnknown_0858D338:: @ 858D338 + .incbin "baserom.gba", 0x58d338, 0x4c + +gUnknown_0858D384:: @ 858D384 + .incbin "baserom.gba", 0x58d384, 0x10 + +gUnknown_0858D394:: @ 858D394 + .incbin "baserom.gba", 0x58d394, 0x1c + +gUnknown_0858D3B0:: @ 858D3B0 + .incbin "baserom.gba", 0x58d3b0, 0x8 + +gUnknown_0858D3B8:: @ 858D3B8 + .incbin "baserom.gba", 0x58d3b8, 0xc + +gUnknown_0858D3C4:: @ 858D3C4 + .incbin "baserom.gba", 0x58d3c4, 0x2c + +gUnknown_0858D3F0:: @ 858D3F0 + .incbin "baserom.gba", 0x58d3f0, 0x1c + +gUnknown_0858D40C:: @ 858D40C + .incbin "baserom.gba", 0x58d40c, 0xc + +gUnknown_0858D418:: @ 858D418 + .incbin "baserom.gba", 0x58d418, 0x10 + +gUnknown_0858D428:: @ 858D428 + .incbin "baserom.gba", 0x58d428, 0x34 + +gUnknown_0858D45C:: @ 858D45C + .incbin "baserom.gba", 0x58d45c, 0x38 + +gUnknown_0858D494:: @ 858D494 + .incbin "baserom.gba", 0x58d494, 0x4 + +gUnknown_0858D498:: @ 858D498 + .incbin "baserom.gba", 0x58d498, 0x1c + +gUnknown_0858D4B4:: @ 858D4B4 + .incbin "baserom.gba", 0x58d4b4, 0x30 + +gUnknown_0858D4E4:: @ 858D4E4 + .incbin "baserom.gba", 0x58d4e4, 0x40 + +gUnknown_0858D524:: @ 858D524 + .incbin "baserom.gba", 0x58d524, 0x4c + +gUnknown_0858D570:: @ 858D570 + .incbin "baserom.gba", 0x58d570, 0x24 + +gUnknown_0858D594:: @ 858D594 + .incbin "baserom.gba", 0x58d594, 0xac + +gUnknown_0858D640:: @ 858D640 + .incbin "baserom.gba", 0x58d640, 0x2c + +gUnknown_0858D66C:: @ 858D66C + .incbin "baserom.gba", 0x58d66c, 0x24 + +gUnknown_0858D690:: @ 858D690 + .incbin "baserom.gba", 0x58d690, 0x20 diff --git a/include/berry.h b/include/berry.h index dc0481d3d..f51503d41 100644 --- a/include/berry.h +++ b/include/berry.h @@ -53,4 +53,11 @@ void ResetBerryTreeSparkleFlags(void); extern const struct Berry gBerries[]; +struct UnkStruct_0858AB24 { + u8 unk0; + u16 unk1; +}; + +extern const struct UnkStruct_0858AB24 gUnknown_0858AB24[]; + #endif // GUARD_BERRY_H diff --git a/ld_script.txt b/ld_script.txt index b38856729..754f18730 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -346,7 +346,14 @@ SECTIONS { data/data3_a0_B.o(.rodata); src/berry.o(.rodata); data/script_menu.o(.rodata); - data/data3_a1.o(.rodata); + data/naming_screen.o(.rodata); + data/money.o(.rodata); + data/contest_effect.o(.rodata); + data/record_mixing.o(.rodata); + data/secret_base.o(.rodata); + data/tv.o(.rodata); + data/contest_link_80F57C4.o(.rodata); + data/script_pokemon_util_80F87D8.o(.rodata); src/pokemon_size_record.o(.rodata) data/field_effect.o(.rodata); data/truck_scene_porthole.o(.rodata); diff --git a/src/berry.c b/src/berry.c index cf49d4dc4..98cf7d932 100644 --- a/src/berry.c +++ b/src/berry.c @@ -803,10 +803,7 @@ const struct Berry gBerries[] = }, }; -const struct { - u8 unk0; - u16 unk1; -} gUnknown_0858AB24[] = { +const struct UnkStruct_0858AB24 gUnknown_0858AB24[] = { { 50, 20}, { 50, 20}, { 50, 20}, From a8a4a500abf23b8ab3ea206614b94e0f16d9af7d Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 25 Sep 2017 15:27:54 -0400 Subject: [PATCH 288/342] split data3_a0_A --- data/battle_7.s | 32 ++ data/battle_interface.s | 56 ++++ data/berry_blender.s | 167 +++++++++++ data/data3_a0_A.s | 585 ------------------------------------- data/field_door.s | 17 ++ data/field_player_avatar.s | 83 ++++++ data/fieldmap.s | 8 + data/metatile_behavior.s | 8 + data/pokeball.s | 14 + data/rom4.s | 43 +++ data/trade.s | 200 +++++++++++++ ld_script.txt | 12 +- src/new_game.c | 6 +- 13 files changed, 644 insertions(+), 587 deletions(-) create mode 100644 data/battle_7.s create mode 100644 data/battle_interface.s create mode 100644 data/berry_blender.s delete mode 100644 data/data3_a0_A.s create mode 100644 data/field_door.s create mode 100644 data/field_player_avatar.s create mode 100644 data/fieldmap.s create mode 100644 data/metatile_behavior.s create mode 100644 data/pokeball.s create mode 100644 data/rom4.s create mode 100644 data/trade.s diff --git a/data/battle_7.s b/data/battle_7.s new file mode 100644 index 000000000..a64a39dc2 --- /dev/null +++ b/data/battle_7.s @@ -0,0 +1,32 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0832C0D0:: @ 832C0D0 + .incbin "baserom.gba", 0x32c0d0, 0x8 + +gUnknown_0832C0D8:: @ 832C0D8 + .incbin "baserom.gba", 0x32c0d8, 0x8 + +gUnknown_0832C0E0:: @ 832C0E0 + .incbin "baserom.gba", 0x32c0e0, 0x8 + +gUnknown_0832C0E8:: @ 832C0E8 + .incbin "baserom.gba", 0x32c0e8, 0x8 + +gUnknown_0832C0F0:: @ 832C0F0 + .incbin "baserom.gba", 0x32c0f0, 0x8 + +gUnknown_0832C0F8:: @ 832C0F8 + .incbin "baserom.gba", 0x32c0f8, 0x8 + +gUnknown_0832C100:: @ 832C100 + .incbin "baserom.gba", 0x32c100, 0x8 + +gUnknown_0832C108:: @ 832C108 + .incbin "baserom.gba", 0x32c108, 0x20 + +gUnknown_0832C128:: @ 832C128 + .incbin "baserom.gba", 0x32c128, 0x18 diff --git a/data/battle_interface.s b/data/battle_interface.s new file mode 100644 index 000000000..3fd9060fd --- /dev/null +++ b/data/battle_interface.s @@ -0,0 +1,56 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0832C140:: @ 832C140 + .incbin "baserom.gba", 0x32c140, 0x30 + +gUnknown_0832C170:: @ 832C170 + .incbin "baserom.gba", 0x32c170, 0x30 + +gUnknown_0832C1A0:: @ 832C1A0 + .incbin "baserom.gba", 0x32c1a0, 0x20 + +gUnknown_0832C1C0:: @ 832C1C0 + .incbin "baserom.gba", 0x32c1c0, 0xcc + +gUnknown_0832C28C:: @ 832C28C + .incbin "baserom.gba", 0x32c28c, 0x38 + +gUnknown_0832C2C4:: @ 832C2C4 + .incbin "baserom.gba", 0x32c2c4, 0x8 + +gUnknown_0832C2CC:: @ 832C2CC + .incbin "baserom.gba", 0x32c2cc, 0x68 + +gUnknown_0832C334:: @ 832C334 + .incbin "baserom.gba", 0x32c334, 0x8 + +gUnknown_0832C33C:: @ 832C33C + .incbin "baserom.gba", 0x32c33c, 0x8 + +gUnknown_0832C344:: @ 832C344 + .incbin "baserom.gba", 0x32c344, 0x8 + +gUnknown_0832C34C:: @ 832C34C + .incbin "baserom.gba", 0x32c34c, 0x18 + +gUnknown_0832C364:: @ 832C364 + .incbin "baserom.gba", 0x32c364, 0x30 + +gUnknown_0832C394:: @ 832C394 + .incbin "baserom.gba", 0x32c394, 0x30 + +gUnknown_0832C3C4:: @ 832C3C4 + .incbin "baserom.gba", 0x32c3c4, 0x14 + +gUnknown_0832C3D8:: @ 832C3D8 + .incbin "baserom.gba", 0x32c3d8, 0x14 + +gUnknown_0832C3EC:: @ 832C3EC + .incbin "baserom.gba", 0x32c3ec, 0xc + +gUnknown_0832C3F8:: @ 832C3F8 + .incbin "baserom.gba", 0x32c3f8, 0x8 diff --git a/data/berry_blender.s b/data/berry_blender.s new file mode 100644 index 000000000..d3360d4d8 --- /dev/null +++ b/data/berry_blender.s @@ -0,0 +1,167 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_083390D4:: @ 83390D4 + .incbin "baserom.gba", 0x3390d4, 0x20 + +gUnknown_083390F4:: @ 83390F4 + .incbin "baserom.gba", 0x3390f4, 0x400 + +gUnknown_083394F4:: @ 83394F4 + .incbin "baserom.gba", 0x3394f4, 0x246 + +gUnknown_0833973A:: @ 833973A + .incbin "baserom.gba", 0x33973a, 0x61 + +gUnknown_0833979B:: @ 833979B + .incbin "baserom.gba", 0x33979b, 0x2 + +gUnknown_0833979D:: @ 833979D + .incbin "baserom.gba", 0x33979d, 0x33 + +gUnknown_083397D0:: @ 83397D0 + .incbin "baserom.gba", 0x3397d0, 0x4a + +gUnknown_0833981A:: @ 833981A + .incbin "baserom.gba", 0x33981a, 0x17 + +gUnknown_08339831:: @ 8339831 + .incbin "baserom.gba", 0x339831, 0x27 + +gUnknown_08339858:: @ 8339858 + .incbin "baserom.gba", 0x339858, 0x3e + +gUnknown_08339896:: @ 8339896 + .incbin "baserom.gba", 0x339896, 0x1a + +gUnknown_083398B0:: @ 83398B0 + .incbin "baserom.gba", 0x3398b0, 0x2d + +gUnknown_083398DD:: @ 83398DD + .incbin "baserom.gba", 0x3398dd, 0x18 + +gUnknown_083398F5:: @ 83398F5 + .incbin "baserom.gba", 0x3398f5, 0x1f + +gUnknown_08339914:: @ 8339914 + .incbin "baserom.gba", 0x339914, 0x7 + +gUnknown_0833991B:: @ 833991B + .incbin "baserom.gba", 0x33991b, 0x6 + +gUnknown_08339921:: @ 8339921 + .incbin "baserom.gba", 0x339921, 0x7 + +gUnknown_08339928:: @ 8339928 + .incbin "baserom.gba", 0x339928, 0x6 + +gUnknown_0833992E:: @ 833992E + .incbin "baserom.gba", 0x33992e, 0xe + +gUnknown_0833993C:: @ 833993C + .incbin "baserom.gba", 0x33993c, 0x5 + +gUnknown_08339941:: @ 8339941 + .incbin "baserom.gba", 0x339941, 0x2 + +gUnknown_08339943:: @ 8339943 + .incbin "baserom.gba", 0x339943, 0x4 + +gUnknown_08339947:: @ 8339947 + .incbin "baserom.gba", 0x339947, 0x8 + +gUnknown_0833994F:: @ 833994F + .incbin "baserom.gba", 0x33994f, 0xe + +gUnknown_0833995D:: @ 833995D + .incbin "baserom.gba", 0x33995d, 0x13 + +gUnknown_08339970:: @ 8339970 + .incbin "baserom.gba", 0x339970, 0x4 + +gUnknown_08339974:: @ 8339974 + .incbin "baserom.gba", 0x339974, 0xc + +gUnknown_08339980:: @ 8339980 + .incbin "baserom.gba", 0x339980, 0x38 + +gUnknown_083399B8:: @ 83399B8 + .incbin "baserom.gba", 0x3399b8, 0x8 + +gUnknown_083399C0:: @ 83399C0 + .incbin "baserom.gba", 0x3399c0, 0x8 + +gUnknown_083399C8:: @ 83399C8 + .incbin "baserom.gba", 0x3399c8, 0x8 + +gUnknown_083399D0:: @ 83399D0 + .incbin "baserom.gba", 0x3399d0, 0xc + +gUnknown_083399DC:: @ 83399DC + .incbin "baserom.gba", 0x3399dc, 0x8 + +gUnknown_083399E4:: @ 83399E4 + .incbin "baserom.gba", 0x3399e4, 0x3 + +gUnknown_083399E7:: @ 83399E7 + .incbin "baserom.gba", 0x3399e7, 0x5 + +gUnknown_083399EC:: @ 83399EC + .incbin "baserom.gba", 0x3399ec, 0xd4 + +gUnknown_08339AC0:: @ 8339AC0 + .incbin "baserom.gba", 0x339ac0, 0x8 + +gUnknown_08339AC8:: @ 8339AC8 + .incbin "baserom.gba", 0x339ac8, 0x8 + +gUnknown_08339AD0:: @ 8339AD0 + .incbin "baserom.gba", 0x339ad0, 0x8 + +gUnknown_08339AD8:: @ 8339AD8 + .incbin "baserom.gba", 0x339ad8, 0x60 + +gUnknown_08339B38:: @ 8339B38 + .incbin "baserom.gba", 0x339b38, 0x8 + +gUnknown_08339B40:: @ 8339B40 + .incbin "baserom.gba", 0x339b40, 0x98 + +gUnknown_08339BD8:: @ 8339BD8 + .incbin "baserom.gba", 0x339bd8, 0x8 + +gUnknown_08339BE0:: @ 8339BE0 + .incbin "baserom.gba", 0x339be0, 0x44 + +gUnknown_08339C24:: @ 8339C24 + .incbin "baserom.gba", 0x339c24, 0x8 + +gUnknown_08339C2C:: @ 8339C2C + .incbin "baserom.gba", 0x339c2c, 0x2c + +gUnknown_08339C58:: @ 8339C58 + .incbin "baserom.gba", 0x339c58, 0x8 + +gUnknown_08339C60:: @ 8339C60 + .incbin "baserom.gba", 0x339c60, 0x18 + +gUnknown_08339C78:: @ 8339C78 + .incbin "baserom.gba", 0x339c78, 0x28 + +gUnknown_08339CA0:: @ 8339CA0 + .incbin "baserom.gba", 0x339ca0, 0x1e + +gUnknown_08339CBE:: @ 8339CBE + .incbin "baserom.gba", 0x339cbe, 0x5 + +gUnknown_08339CC3:: @ 8339CC3 + .incbin "baserom.gba", 0x339cc3, 0x5 + +gUnknown_08339CC8:: @ 8339CC8 + .incbin "baserom.gba", 0x339cc8, 0x4c + +gUnknown_08339D14:: @ 8339D14 + .incbin "baserom.gba", 0x339d14, 0x8 diff --git a/data/data3_a0_A.s b/data/data3_a0_A.s deleted file mode 100644 index 975b3d640..000000000 --- a/data/data3_a0_A.s +++ /dev/null @@ -1,585 +0,0 @@ -@ the third big chunk of data - - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -gUnknown_0832C0D0:: @ 832C0D0 - .incbin "baserom.gba", 0x32c0d0, 0x8 - -gUnknown_0832C0D8:: @ 832C0D8 - .incbin "baserom.gba", 0x32c0d8, 0x8 - -gUnknown_0832C0E0:: @ 832C0E0 - .incbin "baserom.gba", 0x32c0e0, 0x8 - -gUnknown_0832C0E8:: @ 832C0E8 - .incbin "baserom.gba", 0x32c0e8, 0x8 - -gUnknown_0832C0F0:: @ 832C0F0 - .incbin "baserom.gba", 0x32c0f0, 0x8 - -gUnknown_0832C0F8:: @ 832C0F8 - .incbin "baserom.gba", 0x32c0f8, 0x8 - -gUnknown_0832C100:: @ 832C100 - .incbin "baserom.gba", 0x32c100, 0x8 - -gUnknown_0832C108:: @ 832C108 - .incbin "baserom.gba", 0x32c108, 0x20 - -gUnknown_0832C128:: @ 832C128 - .incbin "baserom.gba", 0x32c128, 0x18 - -gUnknown_0832C140:: @ 832C140 - .incbin "baserom.gba", 0x32c140, 0x30 - -gUnknown_0832C170:: @ 832C170 - .incbin "baserom.gba", 0x32c170, 0x30 - -gUnknown_0832C1A0:: @ 832C1A0 - .incbin "baserom.gba", 0x32c1a0, 0x20 - -gUnknown_0832C1C0:: @ 832C1C0 - .incbin "baserom.gba", 0x32c1c0, 0xcc - -gUnknown_0832C28C:: @ 832C28C - .incbin "baserom.gba", 0x32c28c, 0x38 - -gUnknown_0832C2C4:: @ 832C2C4 - .incbin "baserom.gba", 0x32c2c4, 0x8 - -gUnknown_0832C2CC:: @ 832C2CC - .incbin "baserom.gba", 0x32c2cc, 0x68 - -gUnknown_0832C334:: @ 832C334 - .incbin "baserom.gba", 0x32c334, 0x8 - -gUnknown_0832C33C:: @ 832C33C - .incbin "baserom.gba", 0x32c33c, 0x8 - -gUnknown_0832C344:: @ 832C344 - .incbin "baserom.gba", 0x32c344, 0x8 - -gUnknown_0832C34C:: @ 832C34C - .incbin "baserom.gba", 0x32c34c, 0x18 - -gUnknown_0832C364:: @ 832C364 - .incbin "baserom.gba", 0x32c364, 0x30 - -gUnknown_0832C394:: @ 832C394 - .incbin "baserom.gba", 0x32c394, 0x30 - -gUnknown_0832C3C4:: @ 832C3C4 - .incbin "baserom.gba", 0x32c3c4, 0x14 - -gUnknown_0832C3D8:: @ 832C3D8 - .incbin "baserom.gba", 0x32c3d8, 0x14 - -gUnknown_0832C3EC:: @ 832C3EC - .incbin "baserom.gba", 0x32c3ec, 0xc - -gUnknown_0832C3F8:: @ 832C3F8 - .incbin "baserom.gba", 0x32c3f8, 0x8 - -gUnknown_0832C400:: @ 832C400 - .incbin "baserom.gba", 0x32c400, 0x60 - -gUnknown_0832C460:: @ 832C460 - .incbin "baserom.gba", 0x32c460, 0x128 - -gUnknown_0832C588:: @ 832C588 - .incbin "baserom.gba", 0x32c588, 0x138 - -gUnknown_0832C6C0:: @ 832C6C0 - .incbin "baserom.gba", 0x32c6c0, 0x1fe - -gUnknown_0832C8BE:: @ 832C8BE - .incbin "baserom.gba", 0x32c8be, 0x1fe - -gUnknown_0832CABC:: @ 832CABC - .incbin "baserom.gba", 0x32cabc, 0x800 - -gUnknown_0832D2BC:: @ 832D2BC - .incbin "baserom.gba", 0x32d2bc, 0x800 - -gUnknown_0832DABC:: @ 832DABC - .incbin "baserom.gba", 0x32dabc, 0xb - -gUnknown_0832DAC7:: @ 832DAC7 - .incbin "baserom.gba", 0x32dac7, 0x2 - -gUnknown_0832DAC9:: @ 832DAC9 - .incbin "baserom.gba", 0x32dac9, 0x2 - -gUnknown_0832DACB:: @ 832DACB - .incbin "baserom.gba", 0x32dacb, 0x7 - -gUnknown_0832DAD2:: @ 832DAD2 - .incbin "baserom.gba", 0x32dad2, 0xd - -gUnknown_0832DADF:: @ 832DADF - .incbin "baserom.gba", 0x32dadf, 0x6 - -gUnknown_0832DAE5:: @ 832DAE5 - .incbin "baserom.gba", 0x32dae5, 0x157 - -gUnknown_0832DC3C:: @ 832DC3C - .incbin "baserom.gba", 0x32dc3c, 0x8 - -gUnknown_0832DC44:: @ 832DC44 - .incbin "baserom.gba", 0x32dc44, 0x50 - -gUnknown_0832DC94:: @ 832DC94 - .incbin "baserom.gba", 0x32dc94, 0x18 - -gUnknown_0832DCAC:: @ 832DCAC - .incbin "baserom.gba", 0x32dcac, 0x38 - -gUnknown_0832DCE4:: @ 832DCE4 - .incbin "baserom.gba", 0x32dce4, 0x8 - -gUnknown_0832DCEC:: @ 832DCEC - .incbin "baserom.gba", 0x32dcec, 0x138 - -gUnknown_0832DE24:: @ 832DE24 - .incbin "baserom.gba", 0x32de24, 0x1a - -gUnknown_0832DE3E:: @ 832DE3E - .incbin "baserom.gba", 0x32de3e, 0x18 - -gUnknown_0832DE56:: @ 832DE56 - .incbin "baserom.gba", 0x32de56, 0x3e - -gUnknown_0832DE94:: @ 832DE94 - .incbin "baserom.gba", 0x32de94, 0x18 - -gUnknown_0832DEAC:: @ 832DEAC - .incbin "baserom.gba", 0x32deac, 0x10 - -gUnknown_0832DEBC:: @ 832DEBC - .incbin "baserom.gba", 0x32debc, 0x24 - -gUnknown_0832DEE0:: @ 832DEE0 - .incbin "baserom.gba", 0x32dee0, 0x4 - -gUnknown_0832DEE4:: @ 832DEE4 - .incbin "baserom.gba", 0x32dee4, 0x10 - -gUnknown_0832DEF4:: @ 832DEF4 - .incbin "baserom.gba", 0x32def4, 0x98 - -gUnknown_0832DF8C:: @ 832DF8C - .incbin "baserom.gba", 0x32df8c, 0x8 - -gUnknown_0832DF94:: @ 832DF94 - .incbin "baserom.gba", 0x32df94, 0x5 - -gUnknown_0832DF99:: @ 832DF99 - .incbin "baserom.gba", 0x32df99, 0x2027 - -gUnknown_0832FFC0:: @ 832FFC0 - .incbin "baserom.gba", 0x32ffc0, 0x1fa0 - -gUnknown_08331F60:: @ 8331F60 - .incbin "baserom.gba", 0x331f60, 0x1000 - -gUnknown_08332F60:: @ 8332F60 - .incbin "baserom.gba", 0x332f60, 0x2840 - -gUnknown_083357A0:: @ 83357A0 - .incbin "baserom.gba", 0x3357a0, 0x100 - -gUnknown_083358A0:: @ 83358A0 - .incbin "baserom.gba", 0x3358a0, 0x100 - -gUnknown_083359A0:: @ 83359A0 - .incbin "baserom.gba", 0x3359a0, 0x1000 - -gUnknown_083369A0:: @ 83369A0 - .incbin "baserom.gba", 0x3369a0, 0x1000 - -gUnknown_083379A0:: @ 83379A0 - .incbin "baserom.gba", 0x3379a0, 0x100 - -gUnknown_08337AA0:: @ 8337AA0 - .incbin "baserom.gba", 0x337aa0, 0x200 - -gUnknown_08337CA0:: @ 8337CA0 - .incbin "baserom.gba", 0x337ca0, 0x200 - -gUnknown_08337EA0:: @ 8337EA0 - .incbin "baserom.gba", 0x337ea0, 0x20 - -gUnknown_08337EC0:: @ 8337EC0 - .incbin "baserom.gba", 0x337ec0, 0x690 - -gUnknown_08338550:: @ 8338550 - .incbin "baserom.gba", 0x338550, 0x7c8 - -gUnknown_08338D18:: @ 8338D18 - .incbin "baserom.gba", 0x338d18, 0x8 - -gUnknown_08338D20:: @ 8338D20 - .incbin "baserom.gba", 0x338d20, 0x8 - -gUnknown_08338D28:: @ 8338D28 - .incbin "baserom.gba", 0x338d28, 0x48 - -gUnknown_08338D70:: @ 8338D70 - .incbin "baserom.gba", 0x338d70, 0x8 - -gUnknown_08338D78:: @ 8338D78 - .incbin "baserom.gba", 0x338d78, 0x8 - -gUnknown_08338D80:: @ 8338D80 - .incbin "baserom.gba", 0x338d80, 0x8 - -gUnknown_08338D88:: @ 8338D88 - .incbin "baserom.gba", 0x338d88, 0x38 - -gUnknown_08338DC0:: @ 8338DC0 - .incbin "baserom.gba", 0x338dc0, 0x8 - -gUnknown_08338DC8:: @ 8338DC8 - .incbin "baserom.gba", 0x338dc8, 0x2c - -gUnknown_08338DF4:: @ 8338DF4 - .incbin "baserom.gba", 0x338df4, 0x8 - -gUnknown_08338DFC:: @ 8338DFC - .incbin "baserom.gba", 0x338dfc, 0x70 - -gUnknown_08338E6C:: @ 8338E6C - .incbin "baserom.gba", 0x338e6c, 0x8 - -gUnknown_08338E74:: @ 8338E74 - .incbin "baserom.gba", 0x338e74, 0x18 - -gUnknown_08338E8C:: @ 8338E8C - .incbin "baserom.gba", 0x338e8c, 0x18 - -gUnknown_08338EA4:: @ 8338EA4 - .incbin "baserom.gba", 0x338ea4, 0x28 - -gUnknown_08338ECC:: @ 8338ECC - .incbin "baserom.gba", 0x338ecc, 0x4 - -gUnknown_08338ED0:: @ 8338ED0 - .incbin "baserom.gba", 0x338ed0, 0xf0 - -gUnknown_08338FC0:: @ 8338FC0 - .incbin "baserom.gba", 0x338fc0, 0x3c - -gUnknown_08338FFC:: @ 8338FFC - .incbin "baserom.gba", 0x338ffc, 0x10 - -gUnknown_0833900C:: @ 833900C - .incbin "baserom.gba", 0x33900c, 0x8 - -gUnknown_08339014:: @ 8339014 - .incbin "baserom.gba", 0x339014, 0x10 - -gUnknown_08339024:: @ 8339024 - .incbin "baserom.gba", 0x339024, 0x6c - -gUnknown_08339090:: @ 8339090 - .incbin "baserom.gba", 0x339090, 0x44 - -gUnknown_083390D4:: @ 83390D4 - .incbin "baserom.gba", 0x3390d4, 0x20 - -gUnknown_083390F4:: @ 83390F4 - .incbin "baserom.gba", 0x3390f4, 0x400 - -gUnknown_083394F4:: @ 83394F4 - .incbin "baserom.gba", 0x3394f4, 0x246 - -gUnknown_0833973A:: @ 833973A - .incbin "baserom.gba", 0x33973a, 0x61 - -gUnknown_0833979B:: @ 833979B - .incbin "baserom.gba", 0x33979b, 0x2 - -gUnknown_0833979D:: @ 833979D - .incbin "baserom.gba", 0x33979d, 0x33 - -gUnknown_083397D0:: @ 83397D0 - .incbin "baserom.gba", 0x3397d0, 0x4a - -gUnknown_0833981A:: @ 833981A - .incbin "baserom.gba", 0x33981a, 0x17 - -gUnknown_08339831:: @ 8339831 - .incbin "baserom.gba", 0x339831, 0x27 - -gUnknown_08339858:: @ 8339858 - .incbin "baserom.gba", 0x339858, 0x3e - -gUnknown_08339896:: @ 8339896 - .incbin "baserom.gba", 0x339896, 0x1a - -gUnknown_083398B0:: @ 83398B0 - .incbin "baserom.gba", 0x3398b0, 0x2d - -gUnknown_083398DD:: @ 83398DD - .incbin "baserom.gba", 0x3398dd, 0x18 - -gUnknown_083398F5:: @ 83398F5 - .incbin "baserom.gba", 0x3398f5, 0x1f - -gUnknown_08339914:: @ 8339914 - .incbin "baserom.gba", 0x339914, 0x7 - -gUnknown_0833991B:: @ 833991B - .incbin "baserom.gba", 0x33991b, 0x6 - -gUnknown_08339921:: @ 8339921 - .incbin "baserom.gba", 0x339921, 0x7 - -gUnknown_08339928:: @ 8339928 - .incbin "baserom.gba", 0x339928, 0x6 - -gUnknown_0833992E:: @ 833992E - .incbin "baserom.gba", 0x33992e, 0xe - -gUnknown_0833993C:: @ 833993C - .incbin "baserom.gba", 0x33993c, 0x5 - -gUnknown_08339941:: @ 8339941 - .incbin "baserom.gba", 0x339941, 0x2 - -gUnknown_08339943:: @ 8339943 - .incbin "baserom.gba", 0x339943, 0x4 - -gUnknown_08339947:: @ 8339947 - .incbin "baserom.gba", 0x339947, 0x8 - -gUnknown_0833994F:: @ 833994F - .incbin "baserom.gba", 0x33994f, 0xe - -gUnknown_0833995D:: @ 833995D - .incbin "baserom.gba", 0x33995d, 0x13 - -gUnknown_08339970:: @ 8339970 - .incbin "baserom.gba", 0x339970, 0x4 - -gUnknown_08339974:: @ 8339974 - .incbin "baserom.gba", 0x339974, 0xc - -gUnknown_08339980:: @ 8339980 - .incbin "baserom.gba", 0x339980, 0x38 - -gUnknown_083399B8:: @ 83399B8 - .incbin "baserom.gba", 0x3399b8, 0x8 - -gUnknown_083399C0:: @ 83399C0 - .incbin "baserom.gba", 0x3399c0, 0x8 - -gUnknown_083399C8:: @ 83399C8 - .incbin "baserom.gba", 0x3399c8, 0x8 - -gUnknown_083399D0:: @ 83399D0 - .incbin "baserom.gba", 0x3399d0, 0xc - -gUnknown_083399DC:: @ 83399DC - .incbin "baserom.gba", 0x3399dc, 0x8 - -gUnknown_083399E4:: @ 83399E4 - .incbin "baserom.gba", 0x3399e4, 0x3 - -gUnknown_083399E7:: @ 83399E7 - .incbin "baserom.gba", 0x3399e7, 0x5 - -gUnknown_083399EC:: @ 83399EC - .incbin "baserom.gba", 0x3399ec, 0xd4 - -gUnknown_08339AC0:: @ 8339AC0 - .incbin "baserom.gba", 0x339ac0, 0x8 - -gUnknown_08339AC8:: @ 8339AC8 - .incbin "baserom.gba", 0x339ac8, 0x8 - -gUnknown_08339AD0:: @ 8339AD0 - .incbin "baserom.gba", 0x339ad0, 0x8 - -gUnknown_08339AD8:: @ 8339AD8 - .incbin "baserom.gba", 0x339ad8, 0x60 - -gUnknown_08339B38:: @ 8339B38 - .incbin "baserom.gba", 0x339b38, 0x8 - -gUnknown_08339B40:: @ 8339B40 - .incbin "baserom.gba", 0x339b40, 0x98 - -gUnknown_08339BD8:: @ 8339BD8 - .incbin "baserom.gba", 0x339bd8, 0x8 - -gUnknown_08339BE0:: @ 8339BE0 - .incbin "baserom.gba", 0x339be0, 0x44 - -gUnknown_08339C24:: @ 8339C24 - .incbin "baserom.gba", 0x339c24, 0x8 - -gUnknown_08339C2C:: @ 8339C2C - .incbin "baserom.gba", 0x339c2c, 0x2c - -gUnknown_08339C58:: @ 8339C58 - .incbin "baserom.gba", 0x339c58, 0x8 - -gUnknown_08339C60:: @ 8339C60 - .incbin "baserom.gba", 0x339c60, 0x18 - -gUnknown_08339C78:: @ 8339C78 - .incbin "baserom.gba", 0x339c78, 0x28 - -gUnknown_08339CA0:: @ 8339CA0 - .incbin "baserom.gba", 0x339ca0, 0x1e - -gUnknown_08339CBE:: @ 8339CBE - .incbin "baserom.gba", 0x339cbe, 0x5 - -gUnknown_08339CC3:: @ 8339CC3 - .incbin "baserom.gba", 0x339cc3, 0x5 - -gUnknown_08339CC8:: @ 8339CC8 - .incbin "baserom.gba", 0x339cc8, 0x4c - -gUnknown_08339D14:: @ 8339D14 - .incbin "baserom.gba", 0x339d14, 0x8 - -gContestWinnerPicDummy:: @ 8339D1C - .incbin "baserom.gba", 0x339d1c, 0x20 - -gUnknown_08339D3C:: @ 8339D3C - .incbin "baserom.gba", 0x339d3c, 0x28 - -gUnknown_08339D64:: @ 8339D64 - .incbin "baserom.gba", 0x339d64, 0x48 - -gUnknown_08339DAC:: @ 8339DAC - .incbin "baserom.gba", 0x339dac, 0x10 - -gUnknown_08339DBC:: @ 8339DBC - .incbin "baserom.gba", 0x339dbc, 0xc - -gUnknown_08339DC8:: @ 8339DC8 - .incbin "baserom.gba", 0x339dc8, 0xc - -gUnknown_08339DD4:: @ 8339DD4 - .incbin "baserom.gba", 0x339dd4, 0x2c - -gUnknown_08339E00:: @ 8339E00 - .incbin "baserom.gba", 0x339e00, 0x8 - -@ 8339E08 - .include "data/tilesets/tileset_graphics.inc" - -@ 83960F0 - .include "data/tilesets/metatiles.inc" - -@ 83DF704 - .include "data/tilesets/tilesets.inc" - -@ 83DFE14 - .incbin "baserom.gba", 0x3dfe14, 0xa1fc0 - -gUnknown_08481DD4:: @ 8481DD4 - .incbin "baserom.gba", 0x481dd4, 0x47a4 - -gUnknown_08486578:: @ 8486578 - .incbin "baserom.gba", 0x486578, 0x980 - -gUnknown_08486EF8:: @ 8486EF8 - .incbin "baserom.gba", 0x486ef8, 0x4 - -gUnknown_08486EFC:: @ 8486EFC - .incbin "baserom.gba", 0x486efc, 0x10090 - -gUnknown_08496F8C:: @ 8496F8C - .incbin "baserom.gba", 0x496f8c, 0x14 - -gUnknown_08496FA0:: @ 8496FA0 - .incbin "baserom.gba", 0x496fa0, 0x14 - -gUnknown_08496FB4:: @ 8496FB4 - .incbin "baserom.gba", 0x496fb4, 0x1c0 - -gUnknown_08497174:: @ 8497174 - .incbin "baserom.gba", 0x497174, 0x288 - -gUnknown_084973FC:: @ 84973FC - .incbin "baserom.gba", 0x4973fc, 0x48 - -gUnknown_08497444:: @ 8497444 - .incbin "baserom.gba", 0x497444, 0x4c - -gUnknown_08497490:: @ 8497490 - .incbin "baserom.gba", 0x497490, 0xc - -gUnknown_0849749C:: @ 849749C - .incbin "baserom.gba", 0x49749c, 0x14 - -gUnknown_084974B0:: @ 84974B0 - .incbin "baserom.gba", 0x4974b0, 0x8 - -gUnknown_084974B8:: @ 84974B8 - .incbin "baserom.gba", 0x4974b8, 0x20 - -gUnknown_084974D8:: @ 84974D8 - .incbin "baserom.gba", 0x4974d8, 0x10 - -gUnknown_084974E8:: @ 84974E8 - .incbin "baserom.gba", 0x4974e8, 0x10 - -gUnknown_084974F8:: @ 84974F8 - .incbin "baserom.gba", 0x4974f8, 0x10 - -gUnknown_08497508:: @ 8497508 - .incbin "baserom.gba", 0x497508, 0x2 - -gUnknown_0849750A:: @ 849750A - .incbin "baserom.gba", 0x49750a, 0x2 - -gUnknown_0849750C:: @ 849750C - .incbin "baserom.gba", 0x49750c, 0x14 - -gUnknown_08497520:: @ 8497520 - .incbin "baserom.gba", 0x497520, 0x10 - -gUnknown_08497530:: @ 8497530 - .incbin "baserom.gba", 0x497530, 0xc - -gUnknown_0849753C:: @ 849753C - .incbin "baserom.gba", 0x49753c, 0x4 - -gUnknown_08497540:: @ 8497540 - .incbin "baserom.gba", 0x497540, 0x10 - -gUnknown_08497550:: @ 8497550 - .incbin "baserom.gba", 0x497550, 0x4 - -gUnknown_08497554:: @ 8497554 - .incbin "baserom.gba", 0x497554, 0x8 - -gUnknown_0849755C:: @ 849755C - .incbin "baserom.gba", 0x49755c, 0x40 - -gUnknown_0849759C:: @ 849759C - .incbin "baserom.gba", 0x49759c, 0x6 - -gUnknown_084975A2:: @ 84975A2 - .incbin "baserom.gba", 0x4975a2, 0x6 - -gUnknown_084975A8:: @ 84975A8 - .incbin "baserom.gba", 0x4975a8, 0x2 - -gUnknown_084975AA:: @ 84975AA - .incbin "baserom.gba", 0x4975aa, 0x6 - -gUnknown_084975B0:: @ 84975B0 - .incbin "baserom.gba", 0x4975b0, 0xc - -gUnknown_084975BC:: @ 84975BC - .incbin "baserom.gba", 0x4975bc, 0x8 diff --git a/data/field_door.s b/data/field_door.s new file mode 100644 index 000000000..69a7c6534 --- /dev/null +++ b/data/field_door.s @@ -0,0 +1,17 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_08496F8C:: @ 8496F8C + .incbin "baserom.gba", 0x496f8c, 0x14 + +gUnknown_08496FA0:: @ 8496FA0 + .incbin "baserom.gba", 0x496fa0, 0x14 + +gUnknown_08496FB4:: @ 8496FB4 + .incbin "baserom.gba", 0x496fb4, 0x1c0 + +gUnknown_08497174:: @ 8497174 + .incbin "baserom.gba", 0x497174, 0x288 diff --git a/data/field_player_avatar.s b/data/field_player_avatar.s new file mode 100644 index 000000000..952485463 --- /dev/null +++ b/data/field_player_avatar.s @@ -0,0 +1,83 @@ +@ the third big chunk of data + + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + + +gUnknown_084973FC:: @ 84973FC + .incbin "baserom.gba", 0x4973fc, 0x48 + +gUnknown_08497444:: @ 8497444 + .incbin "baserom.gba", 0x497444, 0x4c + +gUnknown_08497490:: @ 8497490 + .incbin "baserom.gba", 0x497490, 0xc + +gUnknown_0849749C:: @ 849749C + .incbin "baserom.gba", 0x49749c, 0x14 + +gUnknown_084974B0:: @ 84974B0 + .incbin "baserom.gba", 0x4974b0, 0x8 + +gUnknown_084974B8:: @ 84974B8 + .incbin "baserom.gba", 0x4974b8, 0x20 + +gUnknown_084974D8:: @ 84974D8 + .incbin "baserom.gba", 0x4974d8, 0x10 + +gUnknown_084974E8:: @ 84974E8 + .incbin "baserom.gba", 0x4974e8, 0x10 + +gUnknown_084974F8:: @ 84974F8 + .incbin "baserom.gba", 0x4974f8, 0x10 + +gUnknown_08497508:: @ 8497508 + .incbin "baserom.gba", 0x497508, 0x2 + +gUnknown_0849750A:: @ 849750A + .incbin "baserom.gba", 0x49750a, 0x2 + +gUnknown_0849750C:: @ 849750C + .incbin "baserom.gba", 0x49750c, 0x14 + +gUnknown_08497520:: @ 8497520 + .incbin "baserom.gba", 0x497520, 0x10 + +gUnknown_08497530:: @ 8497530 + .incbin "baserom.gba", 0x497530, 0xc + +gUnknown_0849753C:: @ 849753C + .incbin "baserom.gba", 0x49753c, 0x4 + +gUnknown_08497540:: @ 8497540 + .incbin "baserom.gba", 0x497540, 0x10 + +gUnknown_08497550:: @ 8497550 + .incbin "baserom.gba", 0x497550, 0x4 + +gUnknown_08497554:: @ 8497554 + .incbin "baserom.gba", 0x497554, 0x8 + +gUnknown_0849755C:: @ 849755C + .incbin "baserom.gba", 0x49755c, 0x40 + +gUnknown_0849759C:: @ 849759C + .incbin "baserom.gba", 0x49759c, 0x6 + +gUnknown_084975A2:: @ 84975A2 + .incbin "baserom.gba", 0x4975a2, 0x6 + +gUnknown_084975A8:: @ 84975A8 + .incbin "baserom.gba", 0x4975a8, 0x2 + +gUnknown_084975AA:: @ 84975AA + .incbin "baserom.gba", 0x4975aa, 0x6 + +gUnknown_084975B0:: @ 84975B0 + .incbin "baserom.gba", 0x4975b0, 0xc + +gUnknown_084975BC:: @ 84975BC + .incbin "baserom.gba", 0x4975bc, 0x8 diff --git a/data/fieldmap.s b/data/fieldmap.s new file mode 100644 index 000000000..e2cc537da --- /dev/null +++ b/data/fieldmap.s @@ -0,0 +1,8 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_08486EF8:: @ 8486EF8 + .incbin "baserom.gba", 0x486ef8, 0x4 diff --git a/data/metatile_behavior.s b/data/metatile_behavior.s new file mode 100644 index 000000000..ea19a3031 --- /dev/null +++ b/data/metatile_behavior.s @@ -0,0 +1,8 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_08486EFC:: @ 8486EFC + .incbin "baserom.gba", 0x486efc, 0x10090 diff --git a/data/pokeball.s b/data/pokeball.s new file mode 100644 index 000000000..4e7b4315a --- /dev/null +++ b/data/pokeball.s @@ -0,0 +1,14 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0832C400:: @ 832C400 + .incbin "baserom.gba", 0x32c400, 0x60 + +gUnknown_0832C460:: @ 832C460 + .incbin "baserom.gba", 0x32c460, 0x128 + +gUnknown_0832C588:: @ 832C588 + .incbin "baserom.gba", 0x32c588, 0x138 diff --git a/data/rom4.s b/data/rom4.s new file mode 100644 index 000000000..aa57174d9 --- /dev/null +++ b/data/rom4.s @@ -0,0 +1,43 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 +gUnknown_08339D3C:: @ 8339D3C + .incbin "baserom.gba", 0x339d3c, 0x28 + +gUnknown_08339D64:: @ 8339D64 + .incbin "baserom.gba", 0x339d64, 0x48 + +gUnknown_08339DAC:: @ 8339DAC + .incbin "baserom.gba", 0x339dac, 0x10 + +gUnknown_08339DBC:: @ 8339DBC + .incbin "baserom.gba", 0x339dbc, 0xc + +gUnknown_08339DC8:: @ 8339DC8 + .incbin "baserom.gba", 0x339dc8, 0xc + +gUnknown_08339DD4:: @ 8339DD4 + .incbin "baserom.gba", 0x339dd4, 0x2c + +gUnknown_08339E00:: @ 8339E00 + .incbin "baserom.gba", 0x339e00, 0x8 + +@ 8339E08 + .include "data/tilesets/tileset_graphics.inc" + +@ 83960F0 + .include "data/tilesets/metatiles.inc" + +@ 83DF704 + .include "data/tilesets/tilesets.inc" + +@ 83DFE14 + .incbin "baserom.gba", 0x3dfe14, 0xa1fc0 + +gUnknown_08481DD4:: @ 8481DD4 + .incbin "baserom.gba", 0x481dd4, 0x47a4 + +gUnknown_08486578:: @ 8486578 + .incbin "baserom.gba", 0x486578, 0x980 diff --git a/data/trade.s b/data/trade.s new file mode 100644 index 000000000..601b597ed --- /dev/null +++ b/data/trade.s @@ -0,0 +1,200 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0832C6C0:: @ 832C6C0 + .incbin "baserom.gba", 0x32c6c0, 0x1fe + +gUnknown_0832C8BE:: @ 832C8BE + .incbin "baserom.gba", 0x32c8be, 0x1fe + +gUnknown_0832CABC:: @ 832CABC + .incbin "baserom.gba", 0x32cabc, 0x800 + +gUnknown_0832D2BC:: @ 832D2BC + .incbin "baserom.gba", 0x32d2bc, 0x800 + +gUnknown_0832DABC:: @ 832DABC + .incbin "baserom.gba", 0x32dabc, 0xb + +gUnknown_0832DAC7:: @ 832DAC7 + .incbin "baserom.gba", 0x32dac7, 0x2 + +gUnknown_0832DAC9:: @ 832DAC9 + .incbin "baserom.gba", 0x32dac9, 0x2 + +gUnknown_0832DACB:: @ 832DACB + .incbin "baserom.gba", 0x32dacb, 0x7 + +gUnknown_0832DAD2:: @ 832DAD2 + .incbin "baserom.gba", 0x32dad2, 0xd + +gUnknown_0832DADF:: @ 832DADF + .incbin "baserom.gba", 0x32dadf, 0x6 + +gUnknown_0832DAE5:: @ 832DAE5 + .incbin "baserom.gba", 0x32dae5, 0x157 + +gUnknown_0832DC3C:: @ 832DC3C + .incbin "baserom.gba", 0x32dc3c, 0x8 + +gUnknown_0832DC44:: @ 832DC44 + .incbin "baserom.gba", 0x32dc44, 0x50 + +gUnknown_0832DC94:: @ 832DC94 + .incbin "baserom.gba", 0x32dc94, 0x18 + +gUnknown_0832DCAC:: @ 832DCAC + .incbin "baserom.gba", 0x32dcac, 0x38 + +gUnknown_0832DCE4:: @ 832DCE4 + .incbin "baserom.gba", 0x32dce4, 0x8 + +gUnknown_0832DCEC:: @ 832DCEC + .incbin "baserom.gba", 0x32dcec, 0x138 + +gUnknown_0832DE24:: @ 832DE24 + .incbin "baserom.gba", 0x32de24, 0x1a + +gUnknown_0832DE3E:: @ 832DE3E + .incbin "baserom.gba", 0x32de3e, 0x18 + +gUnknown_0832DE56:: @ 832DE56 + .incbin "baserom.gba", 0x32de56, 0x3e + +gUnknown_0832DE94:: @ 832DE94 + .incbin "baserom.gba", 0x32de94, 0x18 + +gUnknown_0832DEAC:: @ 832DEAC + .incbin "baserom.gba", 0x32deac, 0x10 + +gUnknown_0832DEBC:: @ 832DEBC + .incbin "baserom.gba", 0x32debc, 0x24 + +gUnknown_0832DEE0:: @ 832DEE0 + .incbin "baserom.gba", 0x32dee0, 0x4 + +gUnknown_0832DEE4:: @ 832DEE4 + .incbin "baserom.gba", 0x32dee4, 0x10 + +gUnknown_0832DEF4:: @ 832DEF4 + .incbin "baserom.gba", 0x32def4, 0x98 + +gUnknown_0832DF8C:: @ 832DF8C + .incbin "baserom.gba", 0x32df8c, 0x8 + +gUnknown_0832DF94:: @ 832DF94 + .incbin "baserom.gba", 0x32df94, 0x5 + +gUnknown_0832DF99:: @ 832DF99 + .incbin "baserom.gba", 0x32df99, 0x2027 + +gUnknown_0832FFC0:: @ 832FFC0 + .incbin "baserom.gba", 0x32ffc0, 0x1fa0 + +gUnknown_08331F60:: @ 8331F60 + .incbin "baserom.gba", 0x331f60, 0x1000 + +gUnknown_08332F60:: @ 8332F60 + .incbin "baserom.gba", 0x332f60, 0x2840 + +gUnknown_083357A0:: @ 83357A0 + .incbin "baserom.gba", 0x3357a0, 0x100 + +gUnknown_083358A0:: @ 83358A0 + .incbin "baserom.gba", 0x3358a0, 0x100 + +gUnknown_083359A0:: @ 83359A0 + .incbin "baserom.gba", 0x3359a0, 0x1000 + +gUnknown_083369A0:: @ 83369A0 + .incbin "baserom.gba", 0x3369a0, 0x1000 + +gUnknown_083379A0:: @ 83379A0 + .incbin "baserom.gba", 0x3379a0, 0x100 + +gUnknown_08337AA0:: @ 8337AA0 + .incbin "baserom.gba", 0x337aa0, 0x200 + +gUnknown_08337CA0:: @ 8337CA0 + .incbin "baserom.gba", 0x337ca0, 0x200 + +gUnknown_08337EA0:: @ 8337EA0 + .incbin "baserom.gba", 0x337ea0, 0x20 + +gUnknown_08337EC0:: @ 8337EC0 + .incbin "baserom.gba", 0x337ec0, 0x690 + +gUnknown_08338550:: @ 8338550 + .incbin "baserom.gba", 0x338550, 0x7c8 + +gUnknown_08338D18:: @ 8338D18 + .incbin "baserom.gba", 0x338d18, 0x8 + +gUnknown_08338D20:: @ 8338D20 + .incbin "baserom.gba", 0x338d20, 0x8 + +gUnknown_08338D28:: @ 8338D28 + .incbin "baserom.gba", 0x338d28, 0x48 + +gUnknown_08338D70:: @ 8338D70 + .incbin "baserom.gba", 0x338d70, 0x8 + +gUnknown_08338D78:: @ 8338D78 + .incbin "baserom.gba", 0x338d78, 0x8 + +gUnknown_08338D80:: @ 8338D80 + .incbin "baserom.gba", 0x338d80, 0x8 + +gUnknown_08338D88:: @ 8338D88 + .incbin "baserom.gba", 0x338d88, 0x38 + +gUnknown_08338DC0:: @ 8338DC0 + .incbin "baserom.gba", 0x338dc0, 0x8 + +gUnknown_08338DC8:: @ 8338DC8 + .incbin "baserom.gba", 0x338dc8, 0x2c + +gUnknown_08338DF4:: @ 8338DF4 + .incbin "baserom.gba", 0x338df4, 0x8 + +gUnknown_08338DFC:: @ 8338DFC + .incbin "baserom.gba", 0x338dfc, 0x70 + +gUnknown_08338E6C:: @ 8338E6C + .incbin "baserom.gba", 0x338e6c, 0x8 + +gUnknown_08338E74:: @ 8338E74 + .incbin "baserom.gba", 0x338e74, 0x18 + +gUnknown_08338E8C:: @ 8338E8C + .incbin "baserom.gba", 0x338e8c, 0x18 + +gUnknown_08338EA4:: @ 8338EA4 + .incbin "baserom.gba", 0x338ea4, 0x28 + +gUnknown_08338ECC:: @ 8338ECC + .incbin "baserom.gba", 0x338ecc, 0x4 + +gUnknown_08338ED0:: @ 8338ED0 + .incbin "baserom.gba", 0x338ed0, 0xf0 + +gUnknown_08338FC0:: @ 8338FC0 + .incbin "baserom.gba", 0x338fc0, 0x3c + +gUnknown_08338FFC:: @ 8338FFC + .incbin "baserom.gba", 0x338ffc, 0x10 + +gUnknown_0833900C:: @ 833900C + .incbin "baserom.gba", 0x33900c, 0x8 + +gUnknown_08339014:: @ 8339014 + .incbin "baserom.gba", 0x339014, 0x10 + +gUnknown_08339024:: @ 8339024 + .incbin "baserom.gba", 0x339024, 0x6c + +gUnknown_08339090:: @ 8339090 + .incbin "baserom.gba", 0x339090, 0x44 diff --git a/ld_script.txt b/ld_script.txt index 754f18730..d65d29e4b 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -341,7 +341,17 @@ SECTIONS { src/util.o(.rodata); data/data3.o(.rodata); src/egg_hatch.o(.rodata); - data/data3_a0_A.o(.rodata); + data/battle_7.o(.rodata); + data/battle_interface.o(.rodata); + data/pokeball.o(.rodata); + data/trade.o(.rodata); + data/berry_blender.o(.rodata); + src/new_game.o(.rodata); + data/rom4.o(.rodata); + data/fieldmap.o(.rodata); + data/metatile_behavior.o(.rodata); + data/field_door.o(.rodata); + data/field_player_avatar.o(.rodata); data/field_map_obj.o(.rodata); data/data3_a0_B.o(.rodata); src/berry.o(.rodata); diff --git a/src/new_game.c b/src/new_game.c index 2bf774c69..5a482c593 100644 --- a/src/new_game.c +++ b/src/new_game.c @@ -18,6 +18,7 @@ #include "event_data.h" #include "money.h" #include "coins.h" +#include "text.h" extern u8 gPlayerPartyCount; extern u8 gDifferentSaveFile; @@ -104,7 +105,10 @@ void ClearPokedexFlags(void) memset(&gSaveBlock2Ptr->pokedex.seen, 0, sizeof(gSaveBlock2Ptr->pokedex.seen)); } -extern const struct ContestWinner gContestWinnerPicDummy; +const struct ContestWinner gContestWinnerPicDummy = { + .monName = _(""), + .trainerName = _("") +}; void ClearAllContestWinnerPics(void) { From 9cf6a0590519dbd849e4d4f94654a5c2b4f963b5 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 25 Sep 2017 16:09:44 -0400 Subject: [PATCH 289/342] Split data3_a0_B --- data/battle_anims.s | 352 +++++++ data/battle_setup.s | 47 + data/cable_club.s | 11 + data/contest.s | 104 ++ data/coord_event_weather.s | 8 + data/data3_a0_B.s | 1783 --------------------------------- data/fanfares.s | 8 + data/field_effect.s | 229 ++++- data/field_effect_misc.s | 55 + data/field_ground_effect.s | 38 + data/field_screen.s | 110 ++ data/field_tasks.s | 23 + data/fldeff_cut.s | 18 + data/fldeff_emotion.s | 11 + data/item_menu_icons.s | 62 ++ data/map_name_popup.s | 17 + data/map_obj_8097404.s | 45 + data/option_menu.s | 20 + data/palette.s | 18 + data/pokedex.s | 152 +++ data/pokemon_icon.s | 26 + data/pokemon_storage_system.s | 152 +++ data/reset_rtc_screen.s | 23 + data/scrcmd.s | 14 + data/shop.s | 57 ++ data/start_menu.s | 29 + data/text_window.s | 17 + data/tileset.s | 116 +++ data/title_screen.s | 46 + data/trainer_card.s | 167 +++ data/trainer_see.s | 14 + data/wild_encounter.s | 22 + ld_script.txt | 33 +- 33 files changed, 2003 insertions(+), 1824 deletions(-) create mode 100644 data/battle_anims.s create mode 100644 data/battle_setup.s create mode 100644 data/cable_club.s create mode 100644 data/contest.s create mode 100644 data/coord_event_weather.s delete mode 100644 data/data3_a0_B.s create mode 100644 data/fanfares.s create mode 100644 data/field_effect_misc.s create mode 100644 data/field_ground_effect.s create mode 100644 data/field_screen.s create mode 100644 data/field_tasks.s create mode 100644 data/fldeff_cut.s create mode 100644 data/fldeff_emotion.s create mode 100644 data/item_menu_icons.s create mode 100644 data/map_name_popup.s create mode 100644 data/map_obj_8097404.s create mode 100644 data/option_menu.s create mode 100644 data/palette.s create mode 100644 data/pokedex.s create mode 100644 data/pokemon_icon.s create mode 100644 data/pokemon_storage_system.s create mode 100644 data/reset_rtc_screen.s create mode 100644 data/scrcmd.s create mode 100644 data/shop.s create mode 100644 data/start_menu.s create mode 100644 data/text_window.s create mode 100644 data/tileset.s create mode 100644 data/title_screen.s create mode 100644 data/trainer_card.s create mode 100644 data/trainer_see.s create mode 100644 data/wild_encounter.s diff --git a/data/battle_anims.s b/data/battle_anims.s new file mode 100644 index 000000000..6b48bcd2a --- /dev/null +++ b/data/battle_anims.s @@ -0,0 +1,352 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_08524904:: @ 8524904 + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852490C:: @ 852490C + .byte 0x00, 0x00, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524914:: @ 8524914 + .byte 0x00, 0x00, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852491C:: @ 852491C + .byte 0x00, 0x00, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524924:: @ 8524924 + .byte 0x00, 0x40, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852492C:: @ 852492C + .byte 0x00, 0x40, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524934:: @ 8524934 + .byte 0x00, 0x40, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852493C:: @ 852493C + .byte 0x00, 0x40, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524944:: @ 8524944 + .byte 0x00, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852494C:: @ 852494C + .byte 0x00, 0x80, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524954:: @ 8524954 + .byte 0x00, 0x80, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852495C:: @ 852495C + .byte 0x00, 0x80, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524964:: @ 8524964 + .byte 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852496C:: @ 852496C + .byte 0x00, 0x01, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524974:: @ 8524974 + .byte 0x00, 0x01, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852497C:: @ 852497C + .byte 0x00, 0x01, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524984:: @ 8524984 + .byte 0x00, 0x41, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852498C:: @ 852498C + .byte 0x00, 0x41, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524994:: @ 8524994 + .byte 0x00, 0x41, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_0852499C:: @ 852499C + .byte 0x00, 0x41, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249A4:: @ 85249A4 + .byte 0x00, 0x81, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249AC:: @ 85249AC + .byte 0x00, 0x81, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249B4:: @ 85249B4 + .byte 0x00, 0x81, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249BC:: @ 85249BC + .byte 0x00, 0x81, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249C4:: @ 85249C4 + .byte 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249CC:: @ 85249CC + .byte 0x00, 0x03, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249D4:: @ 85249D4 + .byte 0x00, 0x03, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249DC:: @ 85249DC + .byte 0x00, 0x03, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249E4:: @ 85249E4 + .byte 0x00, 0x43, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249EC:: @ 85249EC + .byte 0x00, 0x43, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249F4:: @ 85249F4 + .byte 0x00, 0x43, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_085249FC:: @ 85249FC + .byte 0x00, 0x43, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A04:: @ 8524A04 + .byte 0x00, 0x83, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A0C:: @ 8524A0C + .byte 0x00, 0x83, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A14:: @ 8524A14 + .byte 0x00, 0x83, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A1C:: @ 8524A1C + .byte 0x00, 0x83, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A24:: @ 8524A24 + .byte 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A2C:: @ 8524A2C + .byte 0x00, 0x04, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A34:: @ 8524A34 + .byte 0x00, 0x04, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A3C:: @ 8524A3C + .byte 0x00, 0x04, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A44:: @ 8524A44 + .byte 0x00, 0x44, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A4C:: @ 8524A4C + .byte 0x00, 0x44, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A54:: @ 8524A54 + .byte 0x00, 0x44, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A5C:: @ 8524A5C + .byte 0x00, 0x44, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A64:: @ 8524A64 + .byte 0x00, 0x84, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A6C:: @ 8524A6C + .byte 0x00, 0x84, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A74:: @ 8524A74 + .byte 0x00, 0x84, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A7C:: @ 8524A7C + .byte 0x00, 0x84, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A84:: @ 8524A84 + .byte 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A8C:: @ 8524A8C + .byte 0x00, 0x05, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A94:: @ 8524A94 + .byte 0x00, 0x05, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524A9C:: @ 8524A9C + .byte 0x00, 0x05, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AA4:: @ 8524AA4 + .byte 0x00, 0x45, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AAC:: @ 8524AAC + .byte 0x00, 0x45, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AB4:: @ 8524AB4 + .byte 0x00, 0x45, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524ABC:: @ 8524ABC + .byte 0x00, 0x45, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AC4:: @ 8524AC4 + .byte 0x00, 0x85, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524ACC:: @ 8524ACC + .byte 0x00, 0x85, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AD4:: @ 8524AD4 + .byte 0x00, 0x85, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524ADC:: @ 8524ADC + .byte 0x00, 0x85, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AE4:: @ 8524AE4 + .byte 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AEC:: @ 8524AEC + .byte 0x00, 0x07, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AF4:: @ 8524AF4 + .byte 0x00, 0x07, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524AFC:: @ 8524AFC + .byte 0x00, 0x07, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B04:: @ 8524B04 + .byte 0x00, 0x47, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B0C:: @ 8524B0C + .byte 0x00, 0x47, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B14:: @ 8524B14 + .byte 0x00, 0x47, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B1C:: @ 8524B1C + .byte 0x00, 0x47, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B24:: @ 8524B24 + .byte 0x00, 0x87, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B2C:: @ 8524B2C + .byte 0x00, 0x87, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B34:: @ 8524B34 + .byte 0x00, 0x87, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 + + .align 2 +gUnknown_08524B3C:: @ 8524B3C + .byte 0x00, 0x87, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 + +gUnknown_08524B44:: @ 8524B44 + .incbin "baserom.gba", 0x524b44, 0x1d0 + +gUnknown_08524D14:: @ 8524D14 + .incbin "baserom.gba", 0x524d14, 0x270 + +gUnknown_08524F84:: @ 8524F84 + .incbin "baserom.gba", 0x524f84, 0x308 + +gUnknown_0852528C:: @ 852528C + .incbin "baserom.gba", 0x52528c, 0x120 + +gUnknown_085253AC:: @ 85253AC + .incbin "baserom.gba", 0x5253ac, 0x270 + +gUnknown_0852561C:: @ 852561C + .incbin "baserom.gba", 0x52561c, 0x270 + +gUnknown_0852588C:: @ 852588C + .incbin "baserom.gba", 0x52588c, 0x308 + +gUnknown_08525B94:: @ 8525B94 + .incbin "baserom.gba", 0x525b94, 0x120 + +gUnknown_08525CB4:: @ 8525CB4 + .incbin "baserom.gba", 0x525cb4, 0xa0 + +gUnknown_08525D54:: @ 8525D54 + .incbin "baserom.gba", 0x525d54, 0x144 + +gUnknown_08525E98:: @ 8525E98 + .incbin "baserom.gba", 0x525e98, 0xc0 + +gUnknown_08525F58:: @ 8525F58 + .incbin "baserom.gba", 0x525f58, 0x20 + +gUnknown_08525F78:: @ 8525F78 + .incbin "baserom.gba", 0x525f78, 0x10 + +gUnknown_08525F88:: @ 8525F88 + .incbin "baserom.gba", 0x525f88, 0x4 + +gUnknown_08525F8C:: @ 8525F8C + .incbin "baserom.gba", 0x525f8c, 0x4 + +gUnknown_08525F90:: @ 8525F90 + .incbin "baserom.gba", 0x525f90, 0x30 + +gUnknown_08525FC0:: @ 8525FC0 + .incbin "baserom.gba", 0x525fc0, 0x18f80 + +gUnknown_0853EF40:: @ 853EF40 + .incbin "baserom.gba", 0x53ef40, 0x8 + +gUnknown_0853EF48:: @ 853EF48 + .incbin "baserom.gba", 0x53ef48, 0x18 + +gUnknown_0853EF60:: @ 853EF60 + .incbin "baserom.gba", 0x53ef60, 0xf8 diff --git a/data/battle_setup.s b/data/battle_setup.s new file mode 100644 index 000000000..e4667dc9f --- /dev/null +++ b/data/battle_setup.s @@ -0,0 +1,47 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0854FE88:: @ 854FE88 + .incbin "baserom.gba", 0x54fe88, 0x8 + +gUnknown_0854FE90:: @ 854FE90 + .incbin "baserom.gba", 0x54fe90, 0x8 + +gUnknown_0854FE98:: @ 854FE98 + .incbin "baserom.gba", 0x54fe98, 0xc + +gUnknown_0854FEA4:: @ 854FEA4 + .incbin "baserom.gba", 0x54fea4, 0x3 + +gUnknown_0854FEA7:: @ 854FEA7 + .incbin "baserom.gba", 0x54fea7, 0x5 + +gUnknown_0854FEAC:: @ 854FEAC + .incbin "baserom.gba", 0x54feac, 0x48 + +gUnknown_0854FEF4:: @ 854FEF4 + .incbin "baserom.gba", 0x54fef4, 0x48 + +gUnknown_0854FF3C:: @ 854FF3C + .incbin "baserom.gba", 0x54ff3c, 0x48 + +gUnknown_0854FF84:: @ 854FF84 + .incbin "baserom.gba", 0x54ff84, 0x48 + +gUnknown_0854FFCC:: @ 854FFCC + .incbin "baserom.gba", 0x54ffcc, 0x48 + +gUnknown_08550014:: @ 8550014 + .incbin "baserom.gba", 0x550014, 0x48 + +gUnknown_0855005C:: @ 855005C + .incbin "baserom.gba", 0x55005c, 0x48 + +gUnknown_085500A4:: @ 85500A4 + .incbin "baserom.gba", 0x5500a4, 0x4e0 + +gUnknown_08550584:: @ 8550584 + .incbin "baserom.gba", 0x550584, 0x10 diff --git a/data/cable_club.s b/data/cable_club.s new file mode 100644 index 000000000..4961cb1cc --- /dev/null +++ b/data/cable_club.s @@ -0,0 +1,11 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_08550594:: @ 8550594 + .incbin "baserom.gba", 0x550594, 0x8 + +gUnknown_0855059C:: @ 855059C + .incbin "baserom.gba", 0x55059c, 0x190 diff --git a/data/contest.s b/data/contest.s new file mode 100644 index 000000000..09754327b --- /dev/null +++ b/data/contest.s @@ -0,0 +1,104 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_08587A6C:: @ 8587A6C + .incbin "baserom.gba", 0x587a6c, 0x4 + +gUnknown_08587A70:: @ 8587A70 + .incbin "baserom.gba", 0x587a70, 0x4 + +gUnknown_08587A74:: @ 8587A74 + .incbin "baserom.gba", 0x587a74, 0x5c + +gUnknown_08587AD0:: @ 8587AD0 + .incbin "baserom.gba", 0x587ad0, 0x18 + +gUnknown_08587AE8:: @ 8587AE8 + .incbin "baserom.gba", 0x587ae8, 0x20 + +gUnknown_08587B08:: @ 8587B08 + .incbin "baserom.gba", 0x587b08, 0x10 + +gUnknown_08587B18:: @ 8587B18 + .incbin "baserom.gba", 0x587b18, 0x68 + +gUnknown_08587B80:: @ 8587B80 + .incbin "baserom.gba", 0x587b80, 0x30 + +gUnknown_08587BB0:: @ 8587BB0 + .incbin "baserom.gba", 0x587bb0, 0x8 + +gUnknown_08587BB8:: @ 8587BB8 + .incbin "baserom.gba", 0x587bb8, 0x10 + +gUnknown_08587BC8:: @ 8587BC8 + .incbin "baserom.gba", 0x587bc8, 0x20 + +gUnknown_08587BE8:: @ 8587BE8 + .incbin "baserom.gba", 0x587be8, 0x18 + +gUnknown_08587C00:: @ 8587C00 + .incbin "baserom.gba", 0x587c00, 0x8 + +gUnknown_08587C08:: @ 8587C08 + .incbin "baserom.gba", 0x587c08, 0x8 + +gUnknown_08587C10:: @ 8587C10 + .incbin "baserom.gba", 0x587c10, 0x8 + +gUnknown_08587C18:: @ 8587C18 + .incbin "baserom.gba", 0x587c18, 0x18 + +gUnknown_08587C30:: @ 8587C30 + .incbin "baserom.gba", 0x587c30, 0x20 + +@ 8587C50 + .include "data/text/contest_text_pointers.inc" + +@ 8587D5C + .incbin "baserom.gba", 0x587d5c, 0x34 + +gUnknown_08587D90:: @ 8587D90 + .incbin "baserom.gba", 0x587d90, 0x80 + +gUnknown_08587E10:: @ 8587E10 + .incbin "baserom.gba", 0x587e10, 0xf8 + +gUnknown_08587F08:: @ 8587F08 + .incbin "baserom.gba", 0x587f08, 0x14 + +gUnknown_08587F1C:: @ 8587F1C + .incbin "baserom.gba", 0x587f1c, 0x18 + +gUnknown_08587F34:: @ 8587F34 + .incbin "baserom.gba", 0x587f34, 0x10 + +gUnknown_08587F44:: @ 8587F44 + .incbin "baserom.gba", 0x587f44, 0x60 + +gUnknown_08587FA4:: @ 8587FA4 + .incbin "baserom.gba", 0x587fa4, 0x100 + +gUnknown_085880A4:: @ 85880A4 + .incbin "baserom.gba", 0x5880a4, 0x1740 + +gUnknown_085897E4:: @ 85897E4 + .incbin "baserom.gba", 0x5897e4, 0xc0 + +gUnknown_085898A4:: @ 85898A4 + .incbin "baserom.gba", 0x5898a4, 0x60 + +gUnknown_08589904:: @ 8589904 + .incbin "baserom.gba", 0x589904, 0x20 + +gUnknown_08589924:: @ 8589924 + .incbin "baserom.gba", 0x589924, 0x68 + +gUnknown_0858998C:: @ 858998C + .incbin "baserom.gba", 0x58998c, 0x60 + +gUnknown_085899EC:: @ 85899EC + .incbin "baserom.gba", 0x5899ec, 0x1c diff --git a/data/coord_event_weather.s b/data/coord_event_weather.s new file mode 100644 index 000000000..907a7c09f --- /dev/null +++ b/data/coord_event_weather.s @@ -0,0 +1,8 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_085102E0:: @ 85102E0 + .incbin "baserom.gba", 0x5102e0, 0x68 diff --git a/data/data3_a0_B.s b/data/data3_a0_B.s deleted file mode 100644 index 75279e607..000000000 --- a/data/data3_a0_B.s +++ /dev/null @@ -1,1783 +0,0 @@ -@ the third big chunk of data - - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -gUnknown_0850E5DC:: @ 850E5DC - .incbin "baserom.gba", 0x50e5dc, 0x8 - -gUnknown_0850E5E4:: @ 850E5E4 - .incbin "baserom.gba", 0x50e5e4, 0x18 - -gUnknown_0850E5FC:: @ 850E5FC - .incbin "baserom.gba", 0x50e5fc, 0x18 - -gUnknown_0850E614:: @ 850E614 - .incbin "baserom.gba", 0x50e614, 0x10 - -gUnknown_0850E624:: @ 850E624 - .incbin "baserom.gba", 0x50e624, 0x10 - -gUnknown_0850E634:: @ 850E634 - .incbin "baserom.gba", 0x50e634, 0x10 - -gUnknown_0850E644:: @ 850E644 - .incbin "baserom.gba", 0x50e644, 0x10 - -gUnknown_0850E654:: @ 850E654 - .incbin "baserom.gba", 0x50e654, 0xc - -gUnknown_0850E660:: @ 850E660 - .incbin "baserom.gba", 0x50e660, 0x4 - -gUnknown_0850E664:: @ 850E664 - .incbin "baserom.gba", 0x50e664, 0x10 - -gUnknown_0850E674:: @ 850E674 - .incbin "baserom.gba", 0x50e674, 0xe0 - -gUnknown_0850E754:: @ 850E754 - .incbin "baserom.gba", 0x50e754, 0x14 - -gUnknown_0850E768:: @ 850E768 - .incbin "baserom.gba", 0x50e768, 0xa - -gUnknown_0850E772:: @ 850E772 - .incbin "baserom.gba", 0x50e772, 0x48 - -gUnknown_0850E7BA:: @ 850E7BA - .incbin "baserom.gba", 0x50e7ba, 0x7a - -gUnknown_0850E834:: @ 850E834 - .incbin "baserom.gba", 0x50e834, 0xc - -gUnknown_0850E840:: @ 850E840 - .incbin "baserom.gba", 0x50e840, 0x6 - -gUnknown_0850E846:: @ 850E846 - .incbin "baserom.gba", 0x50e846, 0x4 - -gUnknown_0850E84A:: @ 850E84A - .incbin "baserom.gba", 0x50e84a, 0x6 - -gUnknown_0850E850:: @ 850E850 - .incbin "baserom.gba", 0x50e850, 0x4 -gUnknown_0850E854:: - .incbin "baserom.gba", 0x50e854, 0x8 -gUnknown_0850E85C:: - .incbin "baserom.gba", 0x50e85C, 0x8 -gUnknown_0850E864:: - .incbin "baserom.gba", 0x50e864, 0xc -gUnknown_0850E870:: - .incbin "baserom.gba", 0x50e870, 0xc - -gUnknown_0850E87C:: @ 850E87C - .incbin "baserom.gba", 0x50e87c, 0x1680 - -gUnknown_0850FEFC:: @ 850FEFC - .incbin "baserom.gba", 0x50fefc, 0x280 - -gUnknown_0851017C:: @ 851017C - .incbin "baserom.gba", 0x51017c, 0xa0 - -gUnknown_0851021C:: @ 851021C - .incbin "baserom.gba", 0x51021c, 0xa0 - -gNullScriptPtr:: @ 85102BC - .incbin "baserom.gba", 0x5102bc, 0x4 - -gUnknown_085102C0:: @ 85102C0 - .incbin "baserom.gba", 0x5102c0, 0x14 - -gUnknown_085102D4:: @ 85102D4 - .incbin "baserom.gba", 0x5102d4, 0xc - -gUnknown_085102E0:: @ 85102E0 - .incbin "baserom.gba", 0x5102e0, 0x68 - -gUnknown_08510348:: @ 8510348 - .incbin "baserom.gba", 0x510348, 0x20 - -gUnknown_08510368:: @ 8510368 - .incbin "baserom.gba", 0x510368, 0x20 - -gUnknown_08510388:: @ 8510388 - .incbin "baserom.gba", 0x510388, 0x20 - -gUnknown_085103A8:: @ 85103A8 - .incbin "baserom.gba", 0x5103a8, 0x20 - -gUnknown_085103C8:: @ 85103C8 - .incbin "baserom.gba", 0x5103c8, 0x34 - -gUnknown_085103FC:: @ 85103FC - .incbin "baserom.gba", 0x5103fc, 0x8 - -gUnknown_08510404:: @ 8510404 - .incbin "baserom.gba", 0x510404, 0x4 - -gUnknown_08510408:: @ 8510408 - .incbin "baserom.gba", 0x510408, 0x14 - -gUnknown_0851041C:: @ 851041C - .incbin "baserom.gba", 0x51041c, 0x4 - -gUnknown_08510420:: @ 8510420 - .incbin "baserom.gba", 0x510420, 0xa4 - -gUnknown_085104C4:: @ 85104C4 - .incbin "baserom.gba", 0x5104c4, 0x2c - -gUnknown_085104F0:: @ 85104F0 - .incbin "baserom.gba", 0x5104f0, 0x18 - -gSafariBallsWindowTemplate:: @ 8510508 - .incbin "baserom.gba", 0x510508, 0x8 - -gUnknown_08510510:: @ 8510510 - .incbin "baserom.gba", 0x510510, 0x20 - -gPyramidFloorWindowTemplate_2:: @ 8510530 - .incbin "baserom.gba", 0x510530, 0x8 - -gPyramidFloorWindowTemplate_1:: @ 8510538 - .incbin "baserom.gba", 0x510538, 0x8 - -sStartMenuItems:: @ 8510540 - .incbin "baserom.gba", 0x510540, 0x68 - -gUnknown_085105A8:: @ 85105A8 - .incbin "baserom.gba", 0x5105a8, 0x4 - -gUnknown_085105AC:: @ 85105AC - .incbin "baserom.gba", 0x5105ac, 0x10 - -gUnknown_085105BC:: @ 85105BC - .incbin "baserom.gba", 0x5105bc, 0x1a8 - -gUnknown_08510764:: @ 8510764 - .incbin "baserom.gba", 0x510764, 0xb60 - -gUnknown_085112C4:: @ 85112C4 - .incbin "baserom.gba", 0x5112c4, 0x908 - -gUnknown_08511BCC:: @ 8511BCC - .incbin "baserom.gba", 0x511bcc, 0x9a8 - -gUnknown_08512574:: @ 8512574 - .incbin "baserom.gba", 0x512574, 0x8e0 - -gUnknown_08512E54:: @ 8512E54 - .incbin "baserom.gba", 0x512e54, 0x320 - -gUnknown_08513174:: @ 8513174 - .incbin "baserom.gba", 0x513174, 0x510 - -gUnknown_08513684:: @ 8513684 - .incbin "baserom.gba", 0x513684, 0x210 - -gUnknown_08513894:: @ 8513894 - .incbin "baserom.gba", 0x513894, 0xb50 - -gUnknown_085143E4:: @ 85143E4 - .incbin "baserom.gba", 0x5143e4, 0x210 - -gUnknown_085145F4:: @ 85145F4 - .incbin "baserom.gba", 0x5145f4, 0x810 - -gUnknown_08514E04:: @ 8514E04 - .incbin "baserom.gba", 0x514e04, 0x540 - -gUnknown_08515344:: @ 8515344 - .incbin "baserom.gba", 0x515344, 0x20 - -gUnknown_08515364:: @ 8515364 - .incbin "baserom.gba", 0x515364, 0x20 - -gUnknown_08515384:: @ 8515384 - .incbin "baserom.gba", 0x515384, 0x30 - -gUnknown_085153B4:: @ 85153B4 - .incbin "baserom.gba", 0x5153b4, 0x30 - -gUnknown_085153E4:: @ 85153E4 - .incbin "baserom.gba", 0x5153e4, 0x10 - -gUnknown_085153F4:: @ 85153F4 - .incbin "baserom.gba", 0x5153f4, 0x410 - -gUnknown_08515804:: @ 8515804 - .incbin "baserom.gba", 0x515804, 0x20 - -gUnknown_08515824:: @ 8515824 - .incbin "baserom.gba", 0x515824, 0x140 - -gUnknown_08515964:: @ 8515964 - .incbin "baserom.gba", 0x515964, 0x428 - -gUnknown_08515D8C:: @ 8515D8C - .incbin "baserom.gba", 0x515d8c, 0x430 - -gUnknown_085161BC:: @ 85161BC - .incbin "baserom.gba", 0x5161bc, 0x20 - -gUnknown_085161DC:: @ 85161DC - .incbin "baserom.gba", 0x5161dc, 0x320 - -gUnknown_085164FC:: @ 85164FC - .incbin "baserom.gba", 0x5164fc, 0x310 - -gUnknown_0851680C:: @ 851680C - .incbin "baserom.gba", 0x51680c, 0x310 - -gUnknown_08516B1C:: @ 8516B1C - .incbin "baserom.gba", 0x516b1c, 0x210 - -gUnknown_08516D2C:: @ 8516D2C - .incbin "baserom.gba", 0x516d2c, 0x110 - -gUnknown_08516E3C:: @ 8516E3C - .incbin "baserom.gba", 0x516e3c, 0xc08 - -gUnknown_08517A44:: @ 8517A44 - .incbin "baserom.gba", 0x517a44, 0xc - -gUnknown_08517A50:: @ 8517A50 - .incbin "baserom.gba", 0x517a50, 0x1ac - -gUnknown_08517BFC:: @ 8517BFC - .incbin "baserom.gba", 0x517bfc, 0x10 - -gUnknown_08517C0C:: @ 8517C0C - .incbin "baserom.gba", 0x517c0c, 0x428 - -gUnknown_08518034:: @ 8518034 - .incbin "baserom.gba", 0x518034, 0x268 - -gUnknown_0851829C:: @ 851829C - .incbin "baserom.gba", 0x51829c, 0x8028 - -gUnknown_085202C4:: @ 85202C4 - .incbin "baserom.gba", 0x5202c4, 0x45a0 - -gUnknown_08524864:: @ 8524864 - .incbin "baserom.gba", 0x524864, 0xc - -gUnknown_08524870:: @ 8524870 - .incbin "baserom.gba", 0x524870, 0xc - -gUnknown_0852487C:: @ 852487C - .incbin "baserom.gba", 0x52487c, 0x10 - -gDummyPaletteStructTemplate:: @ 852488C - .2byte 0xFFFF - .space 9 - .byte 0x20 - .space 4 - - .align 2 -gUnknown_0852489C:: @ 852489C - .incbin "baserom.gba", 0x52489c, 0x20 - -sFanfares:: @ 85248BC - .incbin "baserom.gba", 0x5248bc, 0x48 - -gUnknown_08524904:: @ 8524904 - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852490C:: @ 852490C - .byte 0x00, 0x00, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524914:: @ 8524914 - .byte 0x00, 0x00, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852491C:: @ 852491C - .byte 0x00, 0x00, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524924:: @ 8524924 - .byte 0x00, 0x40, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852492C:: @ 852492C - .byte 0x00, 0x40, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524934:: @ 8524934 - .byte 0x00, 0x40, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852493C:: @ 852493C - .byte 0x00, 0x40, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524944:: @ 8524944 - .byte 0x00, 0x80, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852494C:: @ 852494C - .byte 0x00, 0x80, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524954:: @ 8524954 - .byte 0x00, 0x80, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852495C:: @ 852495C - .byte 0x00, 0x80, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524964:: @ 8524964 - .byte 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852496C:: @ 852496C - .byte 0x00, 0x01, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524974:: @ 8524974 - .byte 0x00, 0x01, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852497C:: @ 852497C - .byte 0x00, 0x01, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524984:: @ 8524984 - .byte 0x00, 0x41, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852498C:: @ 852498C - .byte 0x00, 0x41, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524994:: @ 8524994 - .byte 0x00, 0x41, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_0852499C:: @ 852499C - .byte 0x00, 0x41, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249A4:: @ 85249A4 - .byte 0x00, 0x81, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249AC:: @ 85249AC - .byte 0x00, 0x81, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249B4:: @ 85249B4 - .byte 0x00, 0x81, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249BC:: @ 85249BC - .byte 0x00, 0x81, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249C4:: @ 85249C4 - .byte 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249CC:: @ 85249CC - .byte 0x00, 0x03, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249D4:: @ 85249D4 - .byte 0x00, 0x03, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249DC:: @ 85249DC - .byte 0x00, 0x03, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249E4:: @ 85249E4 - .byte 0x00, 0x43, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249EC:: @ 85249EC - .byte 0x00, 0x43, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249F4:: @ 85249F4 - .byte 0x00, 0x43, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_085249FC:: @ 85249FC - .byte 0x00, 0x43, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A04:: @ 8524A04 - .byte 0x00, 0x83, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A0C:: @ 8524A0C - .byte 0x00, 0x83, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A14:: @ 8524A14 - .byte 0x00, 0x83, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A1C:: @ 8524A1C - .byte 0x00, 0x83, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A24:: @ 8524A24 - .byte 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A2C:: @ 8524A2C - .byte 0x00, 0x04, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A34:: @ 8524A34 - .byte 0x00, 0x04, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A3C:: @ 8524A3C - .byte 0x00, 0x04, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A44:: @ 8524A44 - .byte 0x00, 0x44, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A4C:: @ 8524A4C - .byte 0x00, 0x44, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A54:: @ 8524A54 - .byte 0x00, 0x44, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A5C:: @ 8524A5C - .byte 0x00, 0x44, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A64:: @ 8524A64 - .byte 0x00, 0x84, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A6C:: @ 8524A6C - .byte 0x00, 0x84, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A74:: @ 8524A74 - .byte 0x00, 0x84, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A7C:: @ 8524A7C - .byte 0x00, 0x84, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A84:: @ 8524A84 - .byte 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A8C:: @ 8524A8C - .byte 0x00, 0x05, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A94:: @ 8524A94 - .byte 0x00, 0x05, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524A9C:: @ 8524A9C - .byte 0x00, 0x05, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AA4:: @ 8524AA4 - .byte 0x00, 0x45, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AAC:: @ 8524AAC - .byte 0x00, 0x45, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AB4:: @ 8524AB4 - .byte 0x00, 0x45, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524ABC:: @ 8524ABC - .byte 0x00, 0x45, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AC4:: @ 8524AC4 - .byte 0x00, 0x85, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524ACC:: @ 8524ACC - .byte 0x00, 0x85, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AD4:: @ 8524AD4 - .byte 0x00, 0x85, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524ADC:: @ 8524ADC - .byte 0x00, 0x85, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AE4:: @ 8524AE4 - .byte 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AEC:: @ 8524AEC - .byte 0x00, 0x07, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AF4:: @ 8524AF4 - .byte 0x00, 0x07, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524AFC:: @ 8524AFC - .byte 0x00, 0x07, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B04:: @ 8524B04 - .byte 0x00, 0x47, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B0C:: @ 8524B0C - .byte 0x00, 0x47, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B14:: @ 8524B14 - .byte 0x00, 0x47, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B1C:: @ 8524B1C - .byte 0x00, 0x47, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B24:: @ 8524B24 - .byte 0x00, 0x87, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B2C:: @ 8524B2C - .byte 0x00, 0x87, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B34:: @ 8524B34 - .byte 0x00, 0x87, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00 - - .align 2 -gUnknown_08524B3C:: @ 8524B3C - .byte 0x00, 0x87, 0x00, 0xc0, 0x00, 0x08, 0x00, 0x00 - -gUnknown_08524B44:: @ 8524B44 - .incbin "baserom.gba", 0x524b44, 0x1d0 - -gUnknown_08524D14:: @ 8524D14 - .incbin "baserom.gba", 0x524d14, 0x270 - -gUnknown_08524F84:: @ 8524F84 - .incbin "baserom.gba", 0x524f84, 0x308 - -gUnknown_0852528C:: @ 852528C - .incbin "baserom.gba", 0x52528c, 0x120 - -gUnknown_085253AC:: @ 85253AC - .incbin "baserom.gba", 0x5253ac, 0x270 - -gUnknown_0852561C:: @ 852561C - .incbin "baserom.gba", 0x52561c, 0x270 - -gUnknown_0852588C:: @ 852588C - .incbin "baserom.gba", 0x52588c, 0x308 - -gUnknown_08525B94:: @ 8525B94 - .incbin "baserom.gba", 0x525b94, 0x120 - -gUnknown_08525CB4:: @ 8525CB4 - .incbin "baserom.gba", 0x525cb4, 0xa0 - -gUnknown_08525D54:: @ 8525D54 - .incbin "baserom.gba", 0x525d54, 0x144 - -gUnknown_08525E98:: @ 8525E98 - .incbin "baserom.gba", 0x525e98, 0xc0 - -gUnknown_08525F58:: @ 8525F58 - .incbin "baserom.gba", 0x525f58, 0x20 - -gUnknown_08525F78:: @ 8525F78 - .incbin "baserom.gba", 0x525f78, 0x10 - -gUnknown_08525F88:: @ 8525F88 - .incbin "baserom.gba", 0x525f88, 0x4 - -gUnknown_08525F8C:: @ 8525F8C - .incbin "baserom.gba", 0x525f8c, 0x4 - -gUnknown_08525F90:: @ 8525F90 - .incbin "baserom.gba", 0x525f90, 0x30 - -gUnknown_08525FC0:: @ 8525FC0 - .incbin "baserom.gba", 0x525fc0, 0x18f80 - -gUnknown_0853EF40:: @ 853EF40 - .incbin "baserom.gba", 0x53ef40, 0x8 - -gUnknown_0853EF48:: @ 853EF48 - .incbin "baserom.gba", 0x53ef48, 0x18 - -gUnknown_0853EF60:: @ 853EF60 - .incbin "baserom.gba", 0x53ef60, 0xf8 - -gTitleScreenRayquazaTiles:: @ 853F058 - .incbin "graphics/title_screen/rayquaza.4bpp.lz" - - .align 2 -gUnknown_0853F83C:: @ 853F83C - .incbin "baserom.gba", 0x53f83c, 0x450 - -gTitleScreenCloudsTiles:: @ 853FC8C - .incbin "graphics/title_screen/clouds.4bpp.lz" - - .align 2 -gUnknown_0853FF70:: @ 853FF70 - .incbin "baserom.gba", 0x53ff70, 0xa8 - -gUnknown_08540018:: @ 8540018 - .incbin "baserom.gba", 0x540018, 0x18 - -gUnknown_08540030:: @ 8540030 - .incbin "baserom.gba", 0x540030, 0x18 - -gUnknown_08540048:: @ 8540048 - .incbin "baserom.gba", 0x540048, 0x90 - -gUnknown_085400D8:: @ 85400D8 - .incbin "baserom.gba", 0x5400d8, 0x18 - -gUnknown_085400F0:: @ 85400F0 - .incbin "baserom.gba", 0x5400f0, 0x10 - -gUnknown_08540100:: @ 8540100 - .incbin "baserom.gba", 0x540100, 0x24 - -gUnknown_08540124:: @ 8540124 - .incbin "baserom.gba", 0x540124, 0x18 - -gUnknown_0854013C:: @ 854013C - .incbin "baserom.gba", 0x54013c, 0x10 - -gUnknown_0854014C:: @ 854014C - .incbin "baserom.gba", 0x54014c, 0xc000 - -gUnknown_0854C14C:: @ 854C14C - .incbin "baserom.gba", 0x54c14c, 0x4 - -gUnknown_0854C150:: @ 854C150 - .incbin "baserom.gba", 0x54c150, 0xf0 - -gUnknown_0854C240:: @ 854C240 - .incbin "baserom.gba", 0x54c240, 0x10 - -gUnknown_0854C250:: @ 854C250 - .incbin "baserom.gba", 0x54c250, 0x20 - -gUnknown_0854C270:: @ 854C270 - .incbin "baserom.gba", 0x54c270, 0x20 - -gUnknown_0854C290:: @ 854C290 - .incbin "baserom.gba", 0x54c290, 0x20 - -gUnknown_0854C2B0:: @ 854C2B0 - .incbin "baserom.gba", 0x54c2b0, 0x820 - -gUnknown_0854CAD0:: @ 854CAD0 - .incbin "baserom.gba", 0x54cad0, 0x3080 - -gUnknown_0854FB50:: @ 854FB50 - .incbin "baserom.gba", 0x54fb50, 0xc - -gUnknown_0854FB5C:: @ 854FB5C - .incbin "baserom.gba", 0x54fb5c, 0x1c - -gUnknown_0854FB78:: @ 854FB78 - .incbin "baserom.gba", 0x54fb78, 0x18 - -gUnknown_0854FB90:: @ 854FB90 - .incbin "baserom.gba", 0x54fb90, 0x9c - -gUnknown_0854FC2C:: @ 854FC2C - .incbin "baserom.gba", 0x54fc2c, 0x18 - -gUnknown_0854FC44:: @ 854FC44 - .incbin "baserom.gba", 0x54fc44, 0x8 - -gUnknown_0854FC4C:: @ 854FC4C - .incbin "baserom.gba", 0x54fc4c, 0x8 - -gUnknown_0854FC54:: @ 854FC54 - .incbin "baserom.gba", 0x54fc54, 0x38 - -gUnknown_0854FC8C:: @ 854FC8C - .incbin "baserom.gba", 0x54fc8c, 0x8c - -gUnknown_0854FD18:: @ 854FD18 - .incbin "baserom.gba", 0x54fd18, 0x18 - -gUnknown_0854FD30:: @ 854FD30 - .incbin "baserom.gba", 0x54fd30, 0x8 - -gUnknown_0854FD38:: @ 854FD38 - .incbin "baserom.gba", 0x54fd38, 0x20 - -gUnknown_0854FD58:: @ 854FD58 - .incbin "baserom.gba", 0x54fd58, 0x18 - -gUnknown_0854FD70:: @ 854FD70 - .incbin "baserom.gba", 0x54fd70, 0x1c - -gUnknown_0854FD8C:: @ 854FD8C - .incbin "baserom.gba", 0x54fd8c, 0x38 - -gUnknown_0854FDC4:: @ 854FDC4 - .incbin "baserom.gba", 0x54fdc4, 0x18 - -gUnknown_0854FDDC:: @ 854FDDC - .incbin "baserom.gba", 0x54fddc, 0x8 - -gUnknown_0854FDE4:: @ 854FDE4 - .incbin "baserom.gba", 0x54fde4, 0xc - -gUnknown_0854FDF0:: @ 854FDF0 - .incbin "baserom.gba", 0x54fdf0, 0x8 - -gUnknown_0854FDF8:: @ 854FDF8 - .incbin "baserom.gba", 0x54fdf8, 0x8 - -gUnknown_0854FE00:: @ 854FE00 - .incbin "baserom.gba", 0x54fe00, 0x44 - -gUnknown_0854FE44:: @ 854FE44 - .incbin "baserom.gba", 0x54fe44, 0x18 - -gUnknown_0854FE5C:: @ 854FE5C - .incbin "baserom.gba", 0x54fe5c, 0x4 - -gUnknown_0854FE60:: @ 854FE60 - .incbin "baserom.gba", 0x54fe60, 0x4 - -gUnknown_0854FE64:: @ 854FE64 - .incbin "baserom.gba", 0x54fe64, 0x14 - -gUnknown_0854FE78:: @ 854FE78 - .incbin "baserom.gba", 0x54fe78, 0x4 - -gUnknown_0854FE7C:: @ 854FE7C - .incbin "baserom.gba", 0x54fe7c, 0xc - -gUnknown_0854FE88:: @ 854FE88 - .incbin "baserom.gba", 0x54fe88, 0x8 - -gUnknown_0854FE90:: @ 854FE90 - .incbin "baserom.gba", 0x54fe90, 0x8 - -gUnknown_0854FE98:: @ 854FE98 - .incbin "baserom.gba", 0x54fe98, 0xc - -gUnknown_0854FEA4:: @ 854FEA4 - .incbin "baserom.gba", 0x54fea4, 0x3 - -gUnknown_0854FEA7:: @ 854FEA7 - .incbin "baserom.gba", 0x54fea7, 0x5 - -gUnknown_0854FEAC:: @ 854FEAC - .incbin "baserom.gba", 0x54feac, 0x48 - -gUnknown_0854FEF4:: @ 854FEF4 - .incbin "baserom.gba", 0x54fef4, 0x48 - -gUnknown_0854FF3C:: @ 854FF3C - .incbin "baserom.gba", 0x54ff3c, 0x48 - -gUnknown_0854FF84:: @ 854FF84 - .incbin "baserom.gba", 0x54ff84, 0x48 - -gUnknown_0854FFCC:: @ 854FFCC - .incbin "baserom.gba", 0x54ffcc, 0x48 - -gUnknown_08550014:: @ 8550014 - .incbin "baserom.gba", 0x550014, 0x48 - -gUnknown_0855005C:: @ 855005C - .incbin "baserom.gba", 0x55005c, 0x48 - -gUnknown_085500A4:: @ 85500A4 - .incbin "baserom.gba", 0x5500a4, 0x4e0 - -gUnknown_08550584:: @ 8550584 - .incbin "baserom.gba", 0x550584, 0x10 - -gUnknown_08550594:: @ 8550594 - .incbin "baserom.gba", 0x550594, 0x8 - -gUnknown_0855059C:: @ 855059C - .incbin "baserom.gba", 0x55059c, 0x190 - -gUnknown_0855072C:: @ 855072C - .incbin "baserom.gba", 0x55072c, 0x10 - -gUnknown_0855073C:: @ 855073C - .incbin "baserom.gba", 0x55073c, 0x30 - -gUnknown_0855076C:: @ 855076C - .incbin "baserom.gba", 0x55076c, 0x48 - -gUnknown_085507B4:: @ 85507B4 - .incbin "baserom.gba", 0x5507b4, 0x18 - -gUnknown_085507CC:: @ 85507CC - .incbin "baserom.gba", 0x5507cc, 0x18 - -@ 85507E4 - .include "data/wild_mons.inc" - - .incbin "baserom.gba", 0x55370c, 0x188 - -gUnknown_08553894:: @ 8553894 - .incbin "baserom.gba", 0x553894, 0x180 - -gUnknown_08553A14:: @ 8553A14 - .incbin "baserom.gba", 0x553a14, 0x64 - -gUnknown_08553A78:: @ 8553A78 - .incbin "baserom.gba", 0x553a78, 0x4 - -gUnknown_08553A7C:: @ 8553A7C - .incbin "baserom.gba", 0x553a7c, 0x14 - - .align 2 -gNewGameBirchPic:: @ 8553A90 - .incbin "graphics/birch_speech/birch.4bpp" - - .incbin "baserom.gba", 0x554290, 0x66c0 - - .align 2 -gNewGameBirchPalette:: @ 855A950 - .incbin "graphics/birch_speech/birch.gbapal" - - .align 2 - .incbin "baserom.gba", 0x55a970, 0x20 - - .align 2 -gFieldEffectObjectPalette4:: @ 855A990 - .incbin "graphics/map_objects/palettes/field_effect_object_palette_04.gbapal" - - .incbin "baserom.gba", 0x55a9b0, 0x480 - - .align 2 -gFieldEffectObjectPalette5:: @ 855AE30 - .incbin "graphics/map_objects/palettes/field_effect_object_palette_05.gbapal" - -gUnknown_0855AE50:: @ 855AE50 - .incbin "baserom.gba", 0x55ae50, 0x200 - -gUnknown_0855B050:: @ 855B050 - .incbin "baserom.gba", 0x55b050, 0x20 - -gUnknown_0855B070:: @ 855B070 - .incbin "baserom.gba", 0x55b070, 0x280 - -gUnknown_0855B2F0:: @ 855B2F0 - .incbin "baserom.gba", 0x55b2f0, 0x80 - -gUnknown_0855B370:: @ 855B370 - .incbin "baserom.gba", 0x55b370, 0x20 - -gUnknown_0855B390:: @ 855B390 - .incbin "baserom.gba", 0x55b390, 0x280 - -gUnknown_0855B610:: @ 855B610 - .incbin "baserom.gba", 0x55b610, 0x20 - -gUnknown_0855B630:: @ 855B630 - .incbin "baserom.gba", 0x55b630, 0xbc0 - -gUnknown_0855C1F0:: @ 855C1F0 - .incbin "baserom.gba", 0x55c1f0, 0x20 - - .align 2 -@ TODO: something else uses these too -gNewGameBirchOamAttributes:: @ 855C210 - .4byte OAM_SIZE_64x64 - .2byte 0 - - .align 2 - .incbin "baserom.gba", 0x55c218, 0x10 - - .align 2 -gNewGameBirchPicTable:: @ 855C228 - obj_tiles gNewGameBirchPic, 0x800 - - .align 2 -gNewGameBirchObjectPaletteInfo:: @ 855C230 - obj_pal gNewGameBirchPalette, 0x1006 - - .align 2 -gNewGameBirchImageAnim:: @ 855C238 - obj_image_anim_frame 0, 1 - obj_image_anim_end - - .align 2 -gNewGameBirchImageAnimTable:: @ 855C240 - .4byte gNewGameBirchImageAnim - - .align 2 -gNewGameBirchObjectTemplate:: @ 855C244 - .2byte 0xFFFF @ tiles tag - .2byte 0x1006 @ palette tag - .4byte gNewGameBirchOamAttributes - .4byte gNewGameBirchImageAnimTable - .4byte gNewGameBirchPicTable - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy - - .align 2 -gFieldEffectObjectPaletteInfo4:: @ 855C25C - obj_pal gFieldEffectObjectPalette4, 0x1007 - - .align 2 -gFieldEffectObjectPaletteInfo5:: @ 855C264 - obj_pal gFieldEffectObjectPalette5, 0x1010 - - .incbin "baserom.gba", 0x55c26c, 0x40 - -gUnknown_0855C2AC:: @ 855C2AC - .incbin "baserom.gba", 0x55c2ac, 0x18 - -gUnknown_0855C2C4:: @ 855C2C4 - .incbin "baserom.gba", 0x55c2c4, 0x40 - -gUnknown_0855C304:: @ 855C304 - .incbin "baserom.gba", 0x55c304, 0x18 - -gUnknown_0855C31C:: @ 855C31C - .incbin "baserom.gba", 0x55c31c, 0x18 - -gUnknown_0855C334:: @ 855C334 - .incbin "baserom.gba", 0x55c334, 0x18 - -gUnknown_0855C34C:: @ 855C34C - .incbin "baserom.gba", 0x55c34c, 0x18 - -gUnknown_0855C364:: @ 855C364 - .incbin "baserom.gba", 0x55c364, 0x10 - -gUnknown_0855C374:: @ 855C374 - .incbin "baserom.gba", 0x55c374, 0x10 - -gUnknown_0855C384:: @ 855C384 - .incbin "baserom.gba", 0x55c384, 0x20 - -gUnknown_0855C3A4:: @ 855C3A4 - .incbin "baserom.gba", 0x55c3a4, 0x18 - -gUnknown_0855C3BC:: @ 855C3BC - .incbin "baserom.gba", 0x55c3bc, 0x4 - -gUnknown_0855C3C0:: @ 855C3C0 - .incbin "baserom.gba", 0x55c3c0, 0x4 - -gUnknown_0855C3C4:: @ 855C3C4 - .incbin "baserom.gba", 0x55c3c4, 0x4 - -gUnknown_0855C3C8:: @ 855C3C8 - .incbin "baserom.gba", 0x55c3c8, 0x1c - -gUnknown_0855C3E4:: @ 855C3E4 - .incbin "baserom.gba", 0x55c3e4, 0x18 - -gUnknown_0855C3FC:: @ 855C3FC - .incbin "baserom.gba", 0x55c3fc, 0x1c - -gUnknown_0855C418:: @ 855C418 - .incbin "baserom.gba", 0x55c418, 0x14 - -gUnknown_0855C42C:: @ 855C42C - .incbin "baserom.gba", 0x55c42c, 0xc - -gUnknown_0855C438:: @ 855C438 - .incbin "baserom.gba", 0x55c438, 0x18 - -gUnknown_0855C450:: @ 855C450 - .incbin "baserom.gba", 0x55c450, 0x10 - -gUnknown_0855C460:: @ 855C460 - .incbin "baserom.gba", 0x55c460, 0x14 - -gUnknown_0855C474:: @ 855C474 - .incbin "baserom.gba", 0x55c474, 0x8 - -gUnknown_0855C47C:: @ 855C47C - .incbin "baserom.gba", 0x55c47c, 0x8 - -gUnknown_0855C484:: @ 855C484 - .incbin "baserom.gba", 0x55c484, 0x8 - -gUnknown_0855C48C:: @ 855C48C - .incbin "baserom.gba", 0x55c48c, 0x10 - -gUnknown_0855C49C:: @ 855C49C - .incbin "baserom.gba", 0x55c49c, 0xc - -gUnknown_0855C4A8:: @ 855C4A8 - .incbin "baserom.gba", 0x55c4a8, 0x1c - -gUnknown_0855C4C4:: @ 855C4C4 - .incbin "baserom.gba", 0x55c4c4, 0x1c - -gUnknown_0855C4E0:: @ 855C4E0 - .incbin "baserom.gba", 0x55c4e0, 0x14 - -gUnknown_0855C4F4:: @ 855C4F4 - .incbin "baserom.gba", 0x55c4f4, 0x54 - -gUnknown_0855C548:: @ 855C548 - .incbin "baserom.gba", 0x55c548, 0x8 - -gUnknown_0855C550:: @ 855C550 - .incbin "baserom.gba", 0x55c550, 0x1c - -gUnknown_0855C56C:: @ 855C56C - .incbin "baserom.gba", 0x55c56c, 0x24 - -gUnknown_0855C590:: @ 855C590 - .incbin "baserom.gba", 0x55c590, 0x5c - -gUnknown_0855C5EC:: @ 855C5EC - .incbin "baserom.gba", 0x55c5ec, 0x18 - -gUnknown_0855C604:: @ 855C604 - .incbin "baserom.gba", 0x55c604, 0x60 - -gUnknown_0855C664:: @ 855C664 - .incbin "baserom.gba", 0x55c664, 0x1c - -gUnknown_0855C680:: @ 855C680 - .incbin "baserom.gba", 0x55c680, 0x18 - -gUnknown_0855C698:: @ 855C698 - .incbin "baserom.gba", 0x55c698, 0x8 - -gUnknown_0855C6A0:: @ 855C6A0 - .incbin "baserom.gba", 0x55c6a0, 0x4 - -gUnknown_0855C6A4:: @ 855C6A4 - .incbin "baserom.gba", 0x55c6a4, 0x336 - -gUnknown_0855C9DA:: @ 855C9DA - .incbin "baserom.gba", 0x55c9da, 0x304 - -gUnknown_0855CCDE:: @ 855CCDE - .incbin "baserom.gba", 0x55ccde, 0x4b6 - -gUnknown_0855D194:: @ 855D194 - .incbin "baserom.gba", 0x55d194, 0x18 - -gUnknown_0855D1AC:: @ 855D1AC - .incbin "baserom.gba", 0x55d1ac, 0x18 - -gUnknown_0855D1C4:: @ 855D1C4 - .incbin "baserom.gba", 0x55d1c4, 0x18 - -gUnknown_0855D1DC:: @ 855D1DC - .incbin "baserom.gba", 0x55d1dc, 0x18 - -gUnknown_0855D1F4:: @ 855D1F4 - .incbin "baserom.gba", 0x55d1f4, 0x18 - -gUnknown_0855D20C:: @ 855D20C - .incbin "baserom.gba", 0x55d20c, 0x18 - -gUnknown_0855D224:: @ 855D224 - .incbin "baserom.gba", 0x55d224, 0x18 - -gUnknown_0855D23C:: @ 855D23C - .incbin "baserom.gba", 0x55d23c, 0x18 - -gUnknown_0855D254:: @ 855D254 - .incbin "baserom.gba", 0x55d254, 0x18 - -gUnknown_0855D26C:: @ 855D26C - .incbin "baserom.gba", 0x55d26c, 0x10 - -gUnknown_0855D27C:: @ 855D27C - .incbin "baserom.gba", 0x55d27c, 0x10 - -gUnknown_0855D28C:: @ 855D28C - .incbin "baserom.gba", 0x55d28c, 0x5 - -gUnknown_0855D291:: @ 855D291 - .incbin "baserom.gba", 0x55d291, 0x7 - -gUnknown_0855D298:: @ 855D298 - .incbin "baserom.gba", 0x55d298, 0x10 - -gUnknown_0855D2A8:: @ 855D2A8 - .incbin "baserom.gba", 0x55d2a8, 0x10 - -gUnknown_0855D2B8:: @ 855D2B8 - .incbin "baserom.gba", 0x55d2b8, 0x6 - -gUnknown_0855D2BE:: @ 855D2BE - .incbin "baserom.gba", 0x55d2be, 0x40 - -gUnknown_0855D2FE:: @ 855D2FE - .incbin "baserom.gba", 0x55d2fe, 0xe - -gUnknown_0855D30C:: @ 855D30C - .string "$" - -@ 855D30D - .include "data/text/pokedex_text.inc" - -@ 856B5B0 - .include "data/pokedex_entries.inc" - -gUnknown_0856E610:: @ 856E610 - .incbin "baserom.gba", 0x56e610, 0x20 - -gUnknown_0856E630:: @ 856E630 - .incbin "baserom.gba", 0x56e630, 0x10 - -gUnknown_0856E640:: @ 856E640 - .incbin "baserom.gba", 0x56e640, 0x28 - -gUnknown_0856E668:: @ 856E668 - .incbin "baserom.gba", 0x56e668, 0x8 - -gUnknown_0856E670:: @ 856E670 - .incbin "baserom.gba", 0x56e670, 0x18 - -gUnknown_0856E688:: @ 856E688 - .incbin "baserom.gba", 0x56e688, 0xc - -@ 856E694 - .include "data/graphics/pokemon/mon_footprint_table.inc" - -gUnknown_0856ED08:: @ 856ED08 - .incbin "baserom.gba", 0x56ed08, 0x28 - -gUnknown_0856ED30:: @ 856ED30 - .incbin "baserom.gba", 0x56ed30, 0x18 - -gUnknown_0856ED48:: @ 856ED48 - .incbin "baserom.gba", 0x56ed48, 0x54 - -gUnknown_0856ED9C:: @ 856ED9C - .incbin "baserom.gba", 0x56ed9c, 0x1c - -gUnknown_0856EDB8:: @ 856EDB8 - .incbin "baserom.gba", 0x56edb8, 0x1c - -gUnknown_0856EDD4:: @ 856EDD4 - .incbin "baserom.gba", 0x56edd4, 0x1c - -gUnknown_0856EDF0:: @ 856EDF0 - .incbin "baserom.gba", 0x56edf0, 0x1c - -gUnknown_0856EE0C:: @ 856EE0C - .incbin "baserom.gba", 0x56ee0c, 0x18 - -gUnknown_0856EE24:: @ 856EE24 - .incbin "baserom.gba", 0x56ee24, 0x38 - -gUnknown_0856EE5C:: @ 856EE5C - .incbin "baserom.gba", 0x56ee5c, 0x58 - -gUnknown_0856EEB4:: @ 856EEB4 - .incbin "baserom.gba", 0x56eeb4, 0x60 - -gUnknown_0856EF14:: @ 856EF14 - .incbin "baserom.gba", 0x56ef14, 0x98 - -gUnknown_0856EFAC:: @ 856EFAC - .incbin "baserom.gba", 0x56efac, 0x2 - -gUnknown_0856EFAE:: @ 856EFAE - .incbin "baserom.gba", 0x56efae, 0x6 - -gUnknown_0856EFB4:: @ 856EFB4 - .incbin "baserom.gba", 0x56efb4, 0x14 - -gUnknown_0856EFC8:: @ 856EFC8 - .incbin "baserom.gba", 0x56efc8, 0x30 - -gUnknown_0856EFF8:: @ 856EFF8 - .incbin "baserom.gba", 0x56eff8, 0x10 - -gUnknown_0856F008:: @ 856F008 - .incbin "baserom.gba", 0x56f008, 0x10 - -gUnknown_0856F018:: @ 856F018 - .incbin "baserom.gba", 0x56f018, 0x494 - -gUnknown_0856F4AC:: @ 856F4AC - .incbin "baserom.gba", 0x56f4ac, 0x20 - -gUnknown_0856F4CC:: @ 856F4CC - .incbin "baserom.gba", 0x56f4cc, 0x20 - -gUnknown_0856F4EC:: @ 856F4EC - .incbin "baserom.gba", 0x56f4ec, 0x20 - -gUnknown_0856F50C:: @ 856F50C - .incbin "baserom.gba", 0x56f50c, 0x20 - -gUnknown_0856F52C:: @ 856F52C - .incbin "baserom.gba", 0x56f52c, 0x20 - -gUnknown_0856F54C:: @ 856F54C - .incbin "baserom.gba", 0x56f54c, 0x20 - -gUnknown_0856F56C:: @ 856F56C - .incbin "baserom.gba", 0x56f56c, 0x20 - -gUnknown_0856F58C:: @ 856F58C - .incbin "baserom.gba", 0x56f58c, 0x20 - -gUnknown_0856F5AC:: @ 856F5AC - .incbin "baserom.gba", 0x56f5ac, 0x20 - -gUnknown_0856F5CC:: @ 856F5CC - .incbin "baserom.gba", 0x56f5cc, 0x248 - -gUnknown_0856F814:: @ 856F814 - .incbin "baserom.gba", 0x56f814, 0x2a0 - -gUnknown_0856FAB4:: @ 856FAB4 - .incbin "baserom.gba", 0x56fab4, 0x10 - -gUnknown_0856FAC4:: @ 856FAC4 - .incbin "baserom.gba", 0x56fac4, 0x20 - -gUnknown_0856FAE4:: @ 856FAE4 - .incbin "baserom.gba", 0x56fae4, 0x14 - -gUnknown_0856FAF8:: @ 856FAF8 - .incbin "baserom.gba", 0x56faf8, 0x14 - -gUnknown_0856FB0C:: @ 856FB0C - .incbin "baserom.gba", 0x56fb0c, 0x3 - -gUnknown_0856FB0F:: @ 856FB0F - .incbin "baserom.gba", 0x56fb0f, 0x9 - -gUnknown_0856FB18:: @ 856FB18 - .incbin "baserom.gba", 0x56fb18, 0x8 - -gUnknown_0856FB20:: @ 856FB20 - .incbin "baserom.gba", 0x56fb20, 0x8 - -gUnknown_0856FB28:: @ 856FB28 - .incbin "baserom.gba", 0x56fb28, 0x18 - -gUnknown_0856FB40:: @ 856FB40 - .incbin "baserom.gba", 0x56fb40, 0x8 - -gUnknown_0856FB48:: @ 856FB48 - .incbin "baserom.gba", 0x56fb48, 0x2 - -gUnknown_0856FB4A:: @ 856FB4A - .incbin "baserom.gba", 0x56fb4a, 0x2 - -gUnknown_0856FB4C:: @ 856FB4C - .incbin "baserom.gba", 0x56fb4c, 0x9 - -gUnknown_0856FB55:: @ 856FB55 - .incbin "baserom.gba", 0x56fb55, 0x2 - -gUnknown_0856FB57:: @ 856FB57 - .incbin "baserom.gba", 0x56fb57, 0x5 - -gUnknown_0856FB5C:: @ 856FB5C - .incbin "baserom.gba", 0x56fb5c, 0xc - -gUnknown_0856FB68:: @ 856FB68 - .incbin "baserom.gba", 0x56fb68, 0x6 - -gUnknown_0856FB6E:: @ 856FB6E - .incbin "baserom.gba", 0x56fb6e, 0x6 - -gUnknown_0856FB74:: @ 856FB74 - .incbin "baserom.gba", 0x56fb74, 0x4 - -gUnknown_0856FB78:: @ 856FB78 - .incbin "baserom.gba", 0x56fb78, 0x44 - -gUnknown_0856FBBC:: @ 856FBBC - .incbin "baserom.gba", 0x56fbbc, 0x1244 - -gUnknown_08570E00:: @ 8570E00 - .incbin "baserom.gba", 0x570e00, 0x260 - -gUnknown_08571060:: @ 8571060 - .incbin "baserom.gba", 0x571060, 0x260 - -gUnknown_085712C0:: @ 85712C0 - .incbin "baserom.gba", 0x5712c0, 0x38 - -gUnknown_085712F8:: @ 85712F8 - .incbin "baserom.gba", 0x5712f8, 0xe8 - -gUnknown_085713E0:: @ 85713E0 - .incbin "baserom.gba", 0x5713e0, 0x8 - -gUnknown_085713E8:: @ 85713E8 - .incbin "baserom.gba", 0x5713e8, 0xc - -gUnknown_085713F4:: @ 85713F4 - .incbin "baserom.gba", 0x5713f4, 0xc - -gUnknown_08571400:: @ 8571400 - .incbin "baserom.gba", 0x571400, 0x28 - -gUnknown_08571428:: @ 8571428 - .incbin "baserom.gba", 0x571428, 0x20 - -gUnknown_08571448:: @ 8571448 - .incbin "baserom.gba", 0x571448, 0x3 - -gUnknown_0857144B:: @ 857144B - .incbin "baserom.gba", 0x57144b, 0x3 - -gUnknown_0857144E:: @ 857144E - .incbin "baserom.gba", 0x57144e, 0x6 - -gUnknown_08571454:: @ 8571454 - .incbin "baserom.gba", 0x571454, 0x68 - -gUnknown_085714BC:: @ 85714BC - .incbin "baserom.gba", 0x5714bc, 0x18 - -gUnknown_085714D4:: @ 85714D4 - .incbin "baserom.gba", 0x5714d4, 0x10 - -gUnknown_085714E4:: @ 85714E4 - .incbin "baserom.gba", 0x5714e4, 0xd0 - -gUnknown_085715B4:: @ 85715B4 - .incbin "baserom.gba", 0x5715b4, 0x30 - -gUnknown_085715E4:: @ 85715E4 - .incbin "baserom.gba", 0x5715e4, 0x18 - -gUnknown_085715FC:: @ 85715FC - .incbin "baserom.gba", 0x5715fc, 0x18 - -gUnknown_08571614:: @ 8571614 - .incbin "baserom.gba", 0x571614, 0x3c - -gUnknown_08571650:: @ 8571650 - .incbin "baserom.gba", 0x571650, 0x70 - -gUnknown_085716C0:: @ 85716C0 - .incbin "baserom.gba", 0x5716c0, 0x28 - -gUnknown_085716E8:: @ 85716E8 - .incbin "baserom.gba", 0x5716e8, 0x28 - -gUnknown_08571710:: @ 8571710 - .incbin "baserom.gba", 0x571710, 0x24 - -gUnknown_08571734:: @ 8571734 - .incbin "baserom.gba", 0x571734, 0x3 - -gUnknown_08571737:: @ 8571737 - .incbin "baserom.gba", 0x571737, 0x5 - -gUnknown_0857173C:: @ 857173C - .incbin "baserom.gba", 0x57173c, 0x20 - -gUnknown_0857175C:: @ 857175C - .incbin "baserom.gba", 0x57175c, 0x800 - -gUnknown_08571F5C:: @ 8571F5C - .incbin "baserom.gba", 0x571f5c, 0x180 - -gUnknown_085720DC:: @ 85720DC - .incbin "baserom.gba", 0x5720dc, 0x98 - -gUnknown_08572174:: @ 8572174 - .incbin "baserom.gba", 0x572174, 0x12c - -gUnknown_085722A0:: @ 85722A0 - .incbin "baserom.gba", 0x5722a0, 0xfc - -gUnknown_0857239C:: @ 857239C - .incbin "baserom.gba", 0x57239c, 0x40 - -gUnknown_085723DC:: @ 85723DC - .incbin "baserom.gba", 0x5723dc, 0x20 - -gUnknown_085723FC:: @ 85723FC - .incbin "baserom.gba", 0x5723fc, 0x20 - -gUnknown_0857241C:: @ 857241C - .incbin "baserom.gba", 0x57241c, 0x20 - -gUnknown_0857243C:: @ 857243C - .incbin "baserom.gba", 0x57243c, 0x20 - -gUnknown_0857245C:: @ 857245C - .incbin "baserom.gba", 0x57245c, 0x48 - -gUnknown_085724A4:: @ 85724A4 - .incbin "baserom.gba", 0x5724a4, 0x18 - -gUnknown_085724BC:: @ 85724BC - .incbin "baserom.gba", 0x5724bc, 0x238 - -gUnknown_085726F4:: @ 85726F4 - .incbin "baserom.gba", 0x5726f4, 0x20 - -gUnknown_08572714:: @ 8572714 - .incbin "baserom.gba", 0x572714, 0x20 - -gUnknown_08572734:: @ 8572734 - .incbin "baserom.gba", 0x572734, 0x10 - -gUnknown_08572744:: @ 8572744 - .incbin "baserom.gba", 0x572744, 0x8 - -gUnknown_0857274C:: @ 857274C - .incbin "baserom.gba", 0x57274c, 0x8 - -gUnknown_08572754:: @ 8572754 - .incbin "baserom.gba", 0x572754, 0x18 - -gUnknown_0857276C:: @ 857276C - .incbin "baserom.gba", 0x57276c, 0xf8 - -gUnknown_08572864:: @ 8572864 - .incbin "baserom.gba", 0x572864, 0x58 - -gUnknown_085728BC:: @ 85728BC - .incbin "baserom.gba", 0x5728bc, 0x18 - -gUnknown_085728D4:: @ 85728D4 - .incbin "baserom.gba", 0x5728d4, 0x48 - -gUnknown_0857291C:: @ 857291C - .incbin "baserom.gba", 0x57291c, 0x4c58 - -gUnknown_08577574:: @ 8577574 - .incbin "baserom.gba", 0x577574, 0x44 - -gUnknown_085775B8:: @ 85775B8 - .incbin "baserom.gba", 0x5775b8, 0x398c - -gUnknown_0857AF44:: @ 857AF44 - .incbin "baserom.gba", 0x57af44, 0xc0 - -gUnknown_0857B004:: @ 857B004 - .incbin "baserom.gba", 0x57b004, 0x7c - -gUnknown_0857B080:: @ 857B080 - .incbin "baserom.gba", 0x57b080, 0x28 - -gUnknown_0857B0A8:: @ 857B0A8 - .incbin "baserom.gba", 0x57b0a8, 0x38 - -gUnknown_0857B0E0:: @ 857B0E0 - .incbin "baserom.gba", 0x57b0e0, 0x8b8 - -gUnknown_0857B998:: @ 857B998 - .incbin "baserom.gba", 0x57b998, 0xc - -gUnknown_0857B9A4:: @ 857B9A4 - .incbin "baserom.gba", 0x57b9a4, 0x18 - -gUnknown_0857B9BC:: @ 857B9BC - .incbin "baserom.gba", 0x57b9bc, 0x28 - -gUnknown_0857B9E4:: @ 857B9E4 - .incbin "baserom.gba", 0x57b9e4, 0x18 - -gUnknown_0857B9FC:: @ 857B9FC - .incbin "baserom.gba", 0x57b9fc, 0x54 - -gUnknown_0857BA50:: @ 857BA50 - .incbin "baserom.gba", 0x57ba50, 0x18 - -gUnknown_0857BA68:: @ 857BA68 - .incbin "baserom.gba", 0x57ba68, 0x18 - -gUnknown_0857BA80:: @ 857BA80 - .incbin "baserom.gba", 0x57ba80, 0x9c - -gUnknown_0857BB1C:: @ 857BB1C - .incbin "baserom.gba", 0x57bb1c, 0x8 - -gUnknown_0857BB24:: @ 857BB24 - .incbin "baserom.gba", 0x57bb24, 0x14c - -gUnknown_0857BC70:: @ 857BC70 - .incbin "baserom.gba", 0x57bc70, 0x18 - -gUnknown_0857BC88:: @ 857BC88 - .incbin "baserom.gba", 0x57bc88, 0x20 - -@ 857BCA8 - .include "data/graphics/pokemon/mon_icon_table.inc" - -@ 857C388 - .include "data/graphics/pokemon/mon_icon_palette_indices.inc" - -@ 857C540 - .include "data/graphics/pokemon/mon_icon_palette_table.inc" - -gUnknown_0857C570:: @ 857C570 - .incbin "baserom.gba", 0x57c570, 0x44 - -gUnknown_0857C5B4:: @ 857C5B4 - .incbin "baserom.gba", 0x57c5b4, 0x34 - -gUnknown_0857C5E8:: @ 857C5E8 - .incbin "baserom.gba", 0x57c5e8, 0x8 - -gUnknown_0857C5F0:: @ 857C5F0 - .incbin "baserom.gba", 0x57c5f0, 0x18 - -gUnknown_0857C608:: @ 857C608 - .incbin "baserom.gba", 0x57c608, 0x2 - -gUnknown_0857C60A:: @ 857C60A - .incbin "baserom.gba", 0x57c60a, 0x5a - - .align 2 -gFieldEffectObjectPaletteInfo6:: @ 857C664 - obj_pal gFieldEffectObjectPalette6, 0x1000 - -gUnknown_0857C66C:: @ 857C66C - .incbin "baserom.gba", 0x57c66c, 0x18 - -gUnknown_0857C684:: @ 857C684 - .incbin "baserom.gba", 0x57c684, 0x1680 - -gUnknown_0857DD04:: @ 857DD04 - .incbin "baserom.gba", 0x57dd04, 0x1680 - -gUnknown_0857F384:: @ 857F384 - .incbin "baserom.gba", 0x57f384, 0xc0 - -gUnknown_0857F444:: @ 857F444 - .incbin "baserom.gba", 0x57f444, 0x20 - -gUnknown_0857F464:: @ 857F464 - .incbin "baserom.gba", 0x57f464, 0xe0 - -gUnknown_0857F544:: @ 857F544 - .incbin "baserom.gba", 0x57f544, 0x5f0 - -gUnknown_0857FB34:: @ 857FB34 - .incbin "baserom.gba", 0x57fb34, 0x8 - -gUnknown_0857FB3C:: @ 857FB3C - .incbin "baserom.gba", 0x57fb3c, 0x8 - -gUnknown_0857FB44:: @ 857FB44 - .incbin "baserom.gba", 0x57fb44, 0x8 - -gUnknown_0857FB4C:: @ 857FB4C - .incbin "baserom.gba", 0x57fb4c, 0x4c - -gUnknown_0857FB98:: @ 857FB98 - .incbin "baserom.gba", 0x57fb98, 0x4 - -gUnknown_0857FB9C:: @ 857FB9C - .incbin "baserom.gba", 0x57fb9c, 0x4 - -gUnknown_0857FBA0:: @ 857FBA0 - .incbin "baserom.gba", 0x57fba0, 0x8 - -gUnknown_0857FBA8:: @ 857FBA8 - .incbin "baserom.gba", 0x57fba8, 0x8 - -gUnknown_0857FBB0:: @ 857FBB0 - .incbin "baserom.gba", 0x57fbb0, 0x3c - -gUnknown_0857FBEC:: @ 857FBEC - .incbin "baserom.gba", 0x57fbec, 0x90 - -gUnknown_0857FC7C:: @ 857FC7C - .incbin "baserom.gba", 0x57fc7c, 0x18 - -@ 857FC94 - .include "data/graphics/berries/berry_pic_table.inc" - -gUnknown_0857FDEC:: @ 857FDEC - .incbin "baserom.gba", 0x57fdec, 0x8 - -gUnknown_0857FDF4:: @ 857FDF4 - .incbin "baserom.gba", 0x57fdf4, 0x1c - -gUnknown_0857FE10:: @ 857FE10 - .incbin "baserom.gba", 0x57fe10, 0x90 - -@ 857FEA0 - .include "data/text/item_descriptions.inc" - -@ 85839A0 - .include "data/items.inc" - -gUnknown_08587A6C:: @ 8587A6C - .incbin "baserom.gba", 0x587a6c, 0x4 - -gUnknown_08587A70:: @ 8587A70 - .incbin "baserom.gba", 0x587a70, 0x4 - -gUnknown_08587A74:: @ 8587A74 - .incbin "baserom.gba", 0x587a74, 0x5c - -gUnknown_08587AD0:: @ 8587AD0 - .incbin "baserom.gba", 0x587ad0, 0x18 - -gUnknown_08587AE8:: @ 8587AE8 - .incbin "baserom.gba", 0x587ae8, 0x20 - -gUnknown_08587B08:: @ 8587B08 - .incbin "baserom.gba", 0x587b08, 0x10 - -gUnknown_08587B18:: @ 8587B18 - .incbin "baserom.gba", 0x587b18, 0x68 - -gUnknown_08587B80:: @ 8587B80 - .incbin "baserom.gba", 0x587b80, 0x30 - -gUnknown_08587BB0:: @ 8587BB0 - .incbin "baserom.gba", 0x587bb0, 0x8 - -gUnknown_08587BB8:: @ 8587BB8 - .incbin "baserom.gba", 0x587bb8, 0x10 - -gUnknown_08587BC8:: @ 8587BC8 - .incbin "baserom.gba", 0x587bc8, 0x20 - -gUnknown_08587BE8:: @ 8587BE8 - .incbin "baserom.gba", 0x587be8, 0x18 - -gUnknown_08587C00:: @ 8587C00 - .incbin "baserom.gba", 0x587c00, 0x8 - -gUnknown_08587C08:: @ 8587C08 - .incbin "baserom.gba", 0x587c08, 0x8 - -gUnknown_08587C10:: @ 8587C10 - .incbin "baserom.gba", 0x587c10, 0x8 - -gUnknown_08587C18:: @ 8587C18 - .incbin "baserom.gba", 0x587c18, 0x18 - -gUnknown_08587C30:: @ 8587C30 - .incbin "baserom.gba", 0x587c30, 0x20 - -@ 8587C50 - .include "data/text/contest_text_pointers.inc" - -@ 8587D5C - .incbin "baserom.gba", 0x587d5c, 0x34 - -gUnknown_08587D90:: @ 8587D90 - .incbin "baserom.gba", 0x587d90, 0x80 - -gUnknown_08587E10:: @ 8587E10 - .incbin "baserom.gba", 0x587e10, 0xf8 - -gUnknown_08587F08:: @ 8587F08 - .incbin "baserom.gba", 0x587f08, 0x14 - -gUnknown_08587F1C:: @ 8587F1C - .incbin "baserom.gba", 0x587f1c, 0x18 - -gUnknown_08587F34:: @ 8587F34 - .incbin "baserom.gba", 0x587f34, 0x10 - -gUnknown_08587F44:: @ 8587F44 - .incbin "baserom.gba", 0x587f44, 0x60 - -gUnknown_08587FA4:: @ 8587FA4 - .incbin "baserom.gba", 0x587fa4, 0x100 - -gUnknown_085880A4:: @ 85880A4 - .incbin "baserom.gba", 0x5880a4, 0x1740 - -gUnknown_085897E4:: @ 85897E4 - .incbin "baserom.gba", 0x5897e4, 0xc0 - -gUnknown_085898A4:: @ 85898A4 - .incbin "baserom.gba", 0x5898a4, 0x60 - -gUnknown_08589904:: @ 8589904 - .incbin "baserom.gba", 0x589904, 0x20 - -gUnknown_08589924:: @ 8589924 - .incbin "baserom.gba", 0x589924, 0x68 - -gUnknown_0858998C:: @ 858998C - .incbin "baserom.gba", 0x58998c, 0x60 - -gUnknown_085899EC:: @ 85899EC - .incbin "baserom.gba", 0x5899ec, 0x1c - -gUnknown_08589A08:: @ 8589A08 - .incbin "baserom.gba", 0x589a08, 0x8 - -gUnknown_08589A10:: @ 8589A10 - .incbin "baserom.gba", 0x589a10, 0x18 - -gUnknown_08589A28:: @ 8589A28 - .incbin "baserom.gba", 0x589a28, 0x10 - -gUnknown_08589A38:: @ 8589A38 - .incbin "baserom.gba", 0x589a38, 0x10 - -gUnknown_08589A48:: @ 8589A48 - .incbin "baserom.gba", 0x589a48, 0x18 - -gUnknown_08589A60:: @ 8589A60 - .incbin "baserom.gba", 0x589a60, 0x10 - -gUnknown_08589A70:: @ 8589A70 - .incbin "baserom.gba", 0x589a70, 0x38 - -gUnknown_08589AA8:: @ 8589AA8 - .incbin "baserom.gba", 0x589aa8, 0x8 - -gUnknown_08589AB0:: @ 8589AB0 - .incbin "baserom.gba", 0x589ab0, 0x3 - -gUnknown_08589AB3:: @ 8589AB3 - .incbin "baserom.gba", 0x589ab3, 0x7 - -gUnknown_08589ABA:: @ 8589ABA - .incbin "baserom.gba", 0x589aba, 0x6 - -gUnknown_08589AC0:: @ 8589AC0 - .incbin "baserom.gba", 0x589ac0, 0x6 - -gUnknown_08589AC6:: @ 8589AC6 - .incbin "baserom.gba", 0x589ac6, 0x6 - -gUnknown_08589ACC:: @ 8589ACC - .incbin "baserom.gba", 0x589acc, 0x6 - -gUnknown_08589AD2:: @ 8589AD2 - .incbin "baserom.gba", 0x589ad2, 0x6 - -gUnknown_08589AD8:: @ 8589AD8 - .incbin "baserom.gba", 0x589ad8, 0x6 - -gUnknown_08589ADE:: @ 8589ADE - .incbin "baserom.gba", 0x589ade, 0x6 diff --git a/data/fanfares.s b/data/fanfares.s new file mode 100644 index 000000000..26d2d82d1 --- /dev/null +++ b/data/fanfares.s @@ -0,0 +1,8 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +sFanfares:: @ 85248BC + .incbin "baserom.gba", 0x5248bc, 0x48 diff --git a/data/field_effect.s b/data/field_effect.s index 88f9f1c94..a1ddcc247 100644 --- a/data/field_effect.s +++ b/data/field_effect.s @@ -1,55 +1,206 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" + .include "asm/macros.inc" + .include "constants/constants.inc" - .section .rodata - - .align 2 - .incbin "baserom.gba", 0x58d978, 0x2a0 + .section .rodata + .align 2, 0 .align 2 -gFieldEffectObjectPalette7:: @ 858DC18 - .incbin "graphics/map_objects/palettes/field_effect_object_palette_07.gbapal" +gNewGameBirchPic:: @ 8553A90 + .incbin "graphics/birch_speech/birch.4bpp" - .incbin "baserom.gba", 0x58dc38, 0x580 + .incbin "baserom.gba", 0x554290, 0x66c0 .align 2 -gFieldEffectObjectPalette8:: @ 858E1B8 - .incbin "graphics/map_objects/palettes/field_effect_object_palette_08.gbapal" - - .incbin "baserom.gba", 0x58e1d8, 0x428 - -gUnknown_0858E600:: @ 858E600 - .incbin "baserom.gba", 0x58e600, 0x18 - -gUnknown_0858E618:: @ 858E618 - .incbin "baserom.gba", 0x58e618, 0x18 - -gUnknown_0858E630:: @ 858E630 - .incbin "baserom.gba", 0x58e630, 0x18 +gNewGameBirchPalette:: @ 855A950 + .incbin "graphics/birch_speech/birch.gbapal" .align 2 -gFieldEffectObjectPaletteInfo7:: @ 858E648 - obj_pal gFieldEffectObjectPalette7, 0x1003 + .incbin "baserom.gba", 0x55a970, 0x20 .align 2 -gFieldEffectObjectPaletteInfo8:: @ 858E650 - obj_pal gFieldEffectObjectPalette8, 0x1008 +gFieldEffectObjectPalette4:: @ 855A990 + .incbin "graphics/map_objects/palettes/field_effect_object_palette_04.gbapal" - .incbin "baserom.gba", 0x58e658, 0x34 - -gUnknown_0858E68C:: @ 858E68C - .incbin "baserom.gba", 0x58e68c, 0x18 + .incbin "baserom.gba", 0x55a9b0, 0x480 .align 2 -@ This uses one of the secret base palettes, so there is no -@ "field_effect_object_palette_09.pal" file. -gFieldEffectObjectPaletteInfo9:: @ 858E6A4 - obj_pal gTilesetPalettes_SecretBase + 5 * 0x20, 0x100E +gFieldEffectObjectPalette5:: @ 855AE30 + .incbin "graphics/map_objects/palettes/field_effect_object_palette_05.gbapal" - .incbin "baserom.gba", 0x58e6ac, 0x1b8 +gUnknown_0855AE50:: @ 855AE50 + .incbin "baserom.gba", 0x55ae50, 0x200 -gUnknown_0858E864:: @ 858E864 - .incbin "baserom.gba", 0x58e864, 0x1c +gUnknown_0855B050:: @ 855B050 + .incbin "baserom.gba", 0x55b050, 0x20 -gUnknown_0858E880:: @ 858E880 - .incbin "baserom.gba", 0x58e880, 0x18 +gUnknown_0855B070:: @ 855B070 + .incbin "baserom.gba", 0x55b070, 0x280 + +gUnknown_0855B2F0:: @ 855B2F0 + .incbin "baserom.gba", 0x55b2f0, 0x80 + +gUnknown_0855B370:: @ 855B370 + .incbin "baserom.gba", 0x55b370, 0x20 + +gUnknown_0855B390:: @ 855B390 + .incbin "baserom.gba", 0x55b390, 0x280 + +gUnknown_0855B610:: @ 855B610 + .incbin "baserom.gba", 0x55b610, 0x20 + +gUnknown_0855B630:: @ 855B630 + .incbin "baserom.gba", 0x55b630, 0xbc0 + +gUnknown_0855C1F0:: @ 855C1F0 + .incbin "baserom.gba", 0x55c1f0, 0x20 + + .align 2 +@ TODO: something else uses these too +gNewGameBirchOamAttributes:: @ 855C210 + .4byte OAM_SIZE_64x64 + .2byte 0 + + .align 2 + .incbin "baserom.gba", 0x55c218, 0x10 + + .align 2 +gNewGameBirchPicTable:: @ 855C228 + obj_tiles gNewGameBirchPic, 0x800 + + .align 2 +gNewGameBirchObjectPaletteInfo:: @ 855C230 + obj_pal gNewGameBirchPalette, 0x1006 + + .align 2 +gNewGameBirchImageAnim:: @ 855C238 + obj_image_anim_frame 0, 1 + obj_image_anim_end + + .align 2 +gNewGameBirchImageAnimTable:: @ 855C240 + .4byte gNewGameBirchImageAnim + + .align 2 +gNewGameBirchObjectTemplate:: @ 855C244 + .2byte 0xFFFF @ tiles tag + .2byte 0x1006 @ palette tag + .4byte gNewGameBirchOamAttributes + .4byte gNewGameBirchImageAnimTable + .4byte gNewGameBirchPicTable + .4byte gDummySpriteAffineAnimTable + .4byte SpriteCallbackDummy + + .align 2 +gFieldEffectObjectPaletteInfo4:: @ 855C25C + obj_pal gFieldEffectObjectPalette4, 0x1007 + + .align 2 +gFieldEffectObjectPaletteInfo5:: @ 855C264 + obj_pal gFieldEffectObjectPalette5, 0x1010 + + .incbin "baserom.gba", 0x55c26c, 0x40 + +gUnknown_0855C2AC:: @ 855C2AC + .incbin "baserom.gba", 0x55c2ac, 0x18 + +gUnknown_0855C2C4:: @ 855C2C4 + .incbin "baserom.gba", 0x55c2c4, 0x40 + +gUnknown_0855C304:: @ 855C304 + .incbin "baserom.gba", 0x55c304, 0x18 + +gUnknown_0855C31C:: @ 855C31C + .incbin "baserom.gba", 0x55c31c, 0x18 + +gUnknown_0855C334:: @ 855C334 + .incbin "baserom.gba", 0x55c334, 0x18 + +gUnknown_0855C34C:: @ 855C34C + .incbin "baserom.gba", 0x55c34c, 0x18 + +gUnknown_0855C364:: @ 855C364 + .incbin "baserom.gba", 0x55c364, 0x10 + +gUnknown_0855C374:: @ 855C374 + .incbin "baserom.gba", 0x55c374, 0x10 + +gUnknown_0855C384:: @ 855C384 + .incbin "baserom.gba", 0x55c384, 0x20 + +gUnknown_0855C3A4:: @ 855C3A4 + .incbin "baserom.gba", 0x55c3a4, 0x18 + +gUnknown_0855C3BC:: @ 855C3BC + .incbin "baserom.gba", 0x55c3bc, 0x4 + +gUnknown_0855C3C0:: @ 855C3C0 + .incbin "baserom.gba", 0x55c3c0, 0x4 + +gUnknown_0855C3C4:: @ 855C3C4 + .incbin "baserom.gba", 0x55c3c4, 0x4 + +gUnknown_0855C3C8:: @ 855C3C8 + .incbin "baserom.gba", 0x55c3c8, 0x1c + +gUnknown_0855C3E4:: @ 855C3E4 + .incbin "baserom.gba", 0x55c3e4, 0x18 + +gUnknown_0855C3FC:: @ 855C3FC + .incbin "baserom.gba", 0x55c3fc, 0x1c + +gUnknown_0855C418:: @ 855C418 + .incbin "baserom.gba", 0x55c418, 0x14 + +gUnknown_0855C42C:: @ 855C42C + .incbin "baserom.gba", 0x55c42c, 0xc + +gUnknown_0855C438:: @ 855C438 + .incbin "baserom.gba", 0x55c438, 0x18 + +gUnknown_0855C450:: @ 855C450 + .incbin "baserom.gba", 0x55c450, 0x10 + +gUnknown_0855C460:: @ 855C460 + .incbin "baserom.gba", 0x55c460, 0x14 + +gUnknown_0855C474:: @ 855C474 + .incbin "baserom.gba", 0x55c474, 0x8 + +gUnknown_0855C47C:: @ 855C47C + .incbin "baserom.gba", 0x55c47c, 0x8 + +gUnknown_0855C484:: @ 855C484 + .incbin "baserom.gba", 0x55c484, 0x8 + +gUnknown_0855C48C:: @ 855C48C + .incbin "baserom.gba", 0x55c48c, 0x10 + +gUnknown_0855C49C:: @ 855C49C + .incbin "baserom.gba", 0x55c49c, 0xc + +gUnknown_0855C4A8:: @ 855C4A8 + .incbin "baserom.gba", 0x55c4a8, 0x1c + +gUnknown_0855C4C4:: @ 855C4C4 + .incbin "baserom.gba", 0x55c4c4, 0x1c + +gUnknown_0855C4E0:: @ 855C4E0 + .incbin "baserom.gba", 0x55c4e0, 0x14 + +gUnknown_0855C4F4:: @ 855C4F4 + .incbin "baserom.gba", 0x55c4f4, 0x54 + +gUnknown_0855C548:: @ 855C548 + .incbin "baserom.gba", 0x55c548, 0x8 + +gUnknown_0855C550:: @ 855C550 + .incbin "baserom.gba", 0x55c550, 0x1c + +gUnknown_0855C56C:: @ 855C56C + .incbin "baserom.gba", 0x55c56c, 0x24 + +gUnknown_0855C590:: @ 855C590 + .incbin "baserom.gba", 0x55c590, 0x5c + +gUnknown_0855C5EC:: @ 855C5EC + .incbin "baserom.gba", 0x55c5ec, 0x18 diff --git a/data/field_effect_misc.s b/data/field_effect_misc.s new file mode 100644 index 000000000..88f9f1c94 --- /dev/null +++ b/data/field_effect_misc.s @@ -0,0 +1,55 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + .align 2 + .incbin "baserom.gba", 0x58d978, 0x2a0 + + .align 2 +gFieldEffectObjectPalette7:: @ 858DC18 + .incbin "graphics/map_objects/palettes/field_effect_object_palette_07.gbapal" + + .incbin "baserom.gba", 0x58dc38, 0x580 + + .align 2 +gFieldEffectObjectPalette8:: @ 858E1B8 + .incbin "graphics/map_objects/palettes/field_effect_object_palette_08.gbapal" + + .incbin "baserom.gba", 0x58e1d8, 0x428 + +gUnknown_0858E600:: @ 858E600 + .incbin "baserom.gba", 0x58e600, 0x18 + +gUnknown_0858E618:: @ 858E618 + .incbin "baserom.gba", 0x58e618, 0x18 + +gUnknown_0858E630:: @ 858E630 + .incbin "baserom.gba", 0x58e630, 0x18 + + .align 2 +gFieldEffectObjectPaletteInfo7:: @ 858E648 + obj_pal gFieldEffectObjectPalette7, 0x1003 + + .align 2 +gFieldEffectObjectPaletteInfo8:: @ 858E650 + obj_pal gFieldEffectObjectPalette8, 0x1008 + + .incbin "baserom.gba", 0x58e658, 0x34 + +gUnknown_0858E68C:: @ 858E68C + .incbin "baserom.gba", 0x58e68c, 0x18 + + .align 2 +@ This uses one of the secret base palettes, so there is no +@ "field_effect_object_palette_09.pal" file. +gFieldEffectObjectPaletteInfo9:: @ 858E6A4 + obj_pal gTilesetPalettes_SecretBase + 5 * 0x20, 0x100E + + .incbin "baserom.gba", 0x58e6ac, 0x1b8 + +gUnknown_0858E864:: @ 858E864 + .incbin "baserom.gba", 0x58e864, 0x1c + +gUnknown_0858E880:: @ 858E880 + .incbin "baserom.gba", 0x58e880, 0x18 diff --git a/data/field_ground_effect.s b/data/field_ground_effect.s new file mode 100644 index 000000000..8b8b00cf9 --- /dev/null +++ b/data/field_ground_effect.s @@ -0,0 +1,38 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0850E5DC:: @ 850E5DC + .incbin "baserom.gba", 0x50e5dc, 0x8 + +gUnknown_0850E5E4:: @ 850E5E4 + .incbin "baserom.gba", 0x50e5e4, 0x18 + +gUnknown_0850E5FC:: @ 850E5FC + .incbin "baserom.gba", 0x50e5fc, 0x18 + +gUnknown_0850E614:: @ 850E614 + .incbin "baserom.gba", 0x50e614, 0x10 + +gUnknown_0850E624:: @ 850E624 + .incbin "baserom.gba", 0x50e624, 0x10 + +gUnknown_0850E634:: @ 850E634 + .incbin "baserom.gba", 0x50e634, 0x10 + +gUnknown_0850E644:: @ 850E644 + .incbin "baserom.gba", 0x50e644, 0x10 + +gUnknown_0850E654:: @ 850E654 + .incbin "baserom.gba", 0x50e654, 0xc + +gUnknown_0850E660:: @ 850E660 + .incbin "baserom.gba", 0x50e660, 0x4 + +gUnknown_0850E664:: @ 850E664 + .incbin "baserom.gba", 0x50e664, 0x10 + +gUnknown_0850E674:: @ 850E674 + .incbin "baserom.gba", 0x50e674, 0xe0 diff --git a/data/field_screen.s b/data/field_screen.s new file mode 100644 index 000000000..63d4f942c --- /dev/null +++ b/data/field_screen.s @@ -0,0 +1,110 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0854C14C:: @ 854C14C + .incbin "baserom.gba", 0x54c14c, 0x4 + +gUnknown_0854C150:: @ 854C150 + .incbin "baserom.gba", 0x54c150, 0xf0 + +gUnknown_0854C240:: @ 854C240 + .incbin "baserom.gba", 0x54c240, 0x10 + +gUnknown_0854C250:: @ 854C250 + .incbin "baserom.gba", 0x54c250, 0x20 + +gUnknown_0854C270:: @ 854C270 + .incbin "baserom.gba", 0x54c270, 0x20 + +gUnknown_0854C290:: @ 854C290 + .incbin "baserom.gba", 0x54c290, 0x20 + +gUnknown_0854C2B0:: @ 854C2B0 + .incbin "baserom.gba", 0x54c2b0, 0x820 + +gUnknown_0854CAD0:: @ 854CAD0 + .incbin "baserom.gba", 0x54cad0, 0x3080 + +gUnknown_0854FB50:: @ 854FB50 + .incbin "baserom.gba", 0x54fb50, 0xc + +gUnknown_0854FB5C:: @ 854FB5C + .incbin "baserom.gba", 0x54fb5c, 0x1c + +gUnknown_0854FB78:: @ 854FB78 + .incbin "baserom.gba", 0x54fb78, 0x18 + +gUnknown_0854FB90:: @ 854FB90 + .incbin "baserom.gba", 0x54fb90, 0x9c + +gUnknown_0854FC2C:: @ 854FC2C + .incbin "baserom.gba", 0x54fc2c, 0x18 + +gUnknown_0854FC44:: @ 854FC44 + .incbin "baserom.gba", 0x54fc44, 0x8 + +gUnknown_0854FC4C:: @ 854FC4C + .incbin "baserom.gba", 0x54fc4c, 0x8 + +gUnknown_0854FC54:: @ 854FC54 + .incbin "baserom.gba", 0x54fc54, 0x38 + +gUnknown_0854FC8C:: @ 854FC8C + .incbin "baserom.gba", 0x54fc8c, 0x8c + +gUnknown_0854FD18:: @ 854FD18 + .incbin "baserom.gba", 0x54fd18, 0x18 + +gUnknown_0854FD30:: @ 854FD30 + .incbin "baserom.gba", 0x54fd30, 0x8 + +gUnknown_0854FD38:: @ 854FD38 + .incbin "baserom.gba", 0x54fd38, 0x20 + +gUnknown_0854FD58:: @ 854FD58 + .incbin "baserom.gba", 0x54fd58, 0x18 + +gUnknown_0854FD70:: @ 854FD70 + .incbin "baserom.gba", 0x54fd70, 0x1c + +gUnknown_0854FD8C:: @ 854FD8C + .incbin "baserom.gba", 0x54fd8c, 0x38 + +gUnknown_0854FDC4:: @ 854FDC4 + .incbin "baserom.gba", 0x54fdc4, 0x18 + +gUnknown_0854FDDC:: @ 854FDDC + .incbin "baserom.gba", 0x54fddc, 0x8 + +gUnknown_0854FDE4:: @ 854FDE4 + .incbin "baserom.gba", 0x54fde4, 0xc + +gUnknown_0854FDF0:: @ 854FDF0 + .incbin "baserom.gba", 0x54fdf0, 0x8 + +gUnknown_0854FDF8:: @ 854FDF8 + .incbin "baserom.gba", 0x54fdf8, 0x8 + +gUnknown_0854FE00:: @ 854FE00 + .incbin "baserom.gba", 0x54fe00, 0x44 + +gUnknown_0854FE44:: @ 854FE44 + .incbin "baserom.gba", 0x54fe44, 0x18 + +gUnknown_0854FE5C:: @ 854FE5C + .incbin "baserom.gba", 0x54fe5c, 0x4 + +gUnknown_0854FE60:: @ 854FE60 + .incbin "baserom.gba", 0x54fe60, 0x4 + +gUnknown_0854FE64:: @ 854FE64 + .incbin "baserom.gba", 0x54fe64, 0x14 + +gUnknown_0854FE78:: @ 854FE78 + .incbin "baserom.gba", 0x54fe78, 0x4 + +gUnknown_0854FE7C:: @ 854FE7C + .incbin "baserom.gba", 0x54fe7c, 0xc diff --git a/data/field_tasks.s b/data/field_tasks.s new file mode 100644 index 000000000..8405c64d5 --- /dev/null +++ b/data/field_tasks.s @@ -0,0 +1,23 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_08510348:: @ 8510348 + .incbin "baserom.gba", 0x510348, 0x20 + +gUnknown_08510368:: @ 8510368 + .incbin "baserom.gba", 0x510368, 0x20 + +gUnknown_08510388:: @ 8510388 + .incbin "baserom.gba", 0x510388, 0x20 + +gUnknown_085103A8:: @ 85103A8 + .incbin "baserom.gba", 0x5103a8, 0x20 + +gUnknown_085103C8:: @ 85103C8 + .incbin "baserom.gba", 0x5103c8, 0x34 + +gUnknown_085103FC:: @ 85103FC + .incbin "baserom.gba", 0x5103fc, 0x8 diff --git a/data/fldeff_cut.s b/data/fldeff_cut.s new file mode 100644 index 000000000..96bdcede4 --- /dev/null +++ b/data/fldeff_cut.s @@ -0,0 +1,18 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0857C608:: @ 857C608 + .incbin "baserom.gba", 0x57c608, 0x2 + +gUnknown_0857C60A:: @ 857C60A + .incbin "baserom.gba", 0x57c60a, 0x5a + + .align 2 +gFieldEffectObjectPaletteInfo6:: @ 857C664 + obj_pal gFieldEffectObjectPalette6, 0x1000 + +gUnknown_0857C66C:: @ 857C66C + .incbin "baserom.gba", 0x57c66c, 0x18 diff --git a/data/fldeff_emotion.s b/data/fldeff_emotion.s new file mode 100644 index 000000000..f2c90d637 --- /dev/null +++ b/data/fldeff_emotion.s @@ -0,0 +1,11 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_085507B4:: @ 85507B4 + .incbin "baserom.gba", 0x5507b4, 0x18 + +gUnknown_085507CC:: @ 85507CC + .incbin "baserom.gba", 0x5507cc, 0x18 diff --git a/data/item_menu_icons.s b/data/item_menu_icons.s new file mode 100644 index 000000000..3b7b0ef89 --- /dev/null +++ b/data/item_menu_icons.s @@ -0,0 +1,62 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0857F464:: @ 857F464 + .incbin "baserom.gba", 0x57f464, 0xe0 + +gUnknown_0857F544:: @ 857F544 + .incbin "baserom.gba", 0x57f544, 0x5f0 + +gUnknown_0857FB34:: @ 857FB34 + .incbin "baserom.gba", 0x57fb34, 0x8 + +gUnknown_0857FB3C:: @ 857FB3C + .incbin "baserom.gba", 0x57fb3c, 0x8 + +gUnknown_0857FB44:: @ 857FB44 + .incbin "baserom.gba", 0x57fb44, 0x8 + +gUnknown_0857FB4C:: @ 857FB4C + .incbin "baserom.gba", 0x57fb4c, 0x4c + +gUnknown_0857FB98:: @ 857FB98 + .incbin "baserom.gba", 0x57fb98, 0x4 + +gUnknown_0857FB9C:: @ 857FB9C + .incbin "baserom.gba", 0x57fb9c, 0x4 + +gUnknown_0857FBA0:: @ 857FBA0 + .incbin "baserom.gba", 0x57fba0, 0x8 + +gUnknown_0857FBA8:: @ 857FBA8 + .incbin "baserom.gba", 0x57fba8, 0x8 + +gUnknown_0857FBB0:: @ 857FBB0 + .incbin "baserom.gba", 0x57fbb0, 0x3c + +gUnknown_0857FBEC:: @ 857FBEC + .incbin "baserom.gba", 0x57fbec, 0x90 + +gUnknown_0857FC7C:: @ 857FC7C + .incbin "baserom.gba", 0x57fc7c, 0x18 + +@ 857FC94 + .include "data/graphics/berries/berry_pic_table.inc" + +gUnknown_0857FDEC:: @ 857FDEC + .incbin "baserom.gba", 0x57fdec, 0x8 + +gUnknown_0857FDF4:: @ 857FDF4 + .incbin "baserom.gba", 0x57fdf4, 0x1c + +gUnknown_0857FE10:: @ 857FE10 + .incbin "baserom.gba", 0x57fe10, 0x90 + +@ 857FEA0 + .include "data/text/item_descriptions.inc" + +@ 85839A0 + .include "data/items.inc" diff --git a/data/map_name_popup.s b/data/map_name_popup.s new file mode 100644 index 000000000..ff7c3ea4e --- /dev/null +++ b/data/map_name_popup.s @@ -0,0 +1,17 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0857C684:: @ 857C684 + .incbin "baserom.gba", 0x57c684, 0x1680 + +gUnknown_0857DD04:: @ 857DD04 + .incbin "baserom.gba", 0x57dd04, 0x1680 + +gUnknown_0857F384:: @ 857F384 + .incbin "baserom.gba", 0x57f384, 0xc0 + +gUnknown_0857F444:: @ 857F444 + .incbin "baserom.gba", 0x57f444, 0x20 diff --git a/data/map_obj_8097404.s b/data/map_obj_8097404.s new file mode 100644 index 000000000..161796765 --- /dev/null +++ b/data/map_obj_8097404.s @@ -0,0 +1,45 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0850E754:: @ 850E754 + .incbin "baserom.gba", 0x50e754, 0x14 + +gUnknown_0850E768:: @ 850E768 + .incbin "baserom.gba", 0x50e768, 0xa + +gUnknown_0850E772:: @ 850E772 + .incbin "baserom.gba", 0x50e772, 0x48 + +gUnknown_0850E7BA:: @ 850E7BA + .incbin "baserom.gba", 0x50e7ba, 0x7a + +gUnknown_0850E834:: @ 850E834 + .incbin "baserom.gba", 0x50e834, 0xc + +gUnknown_0850E840:: @ 850E840 + .incbin "baserom.gba", 0x50e840, 0x6 + +gUnknown_0850E846:: @ 850E846 + .incbin "baserom.gba", 0x50e846, 0x4 + +gUnknown_0850E84A:: @ 850E84A + .incbin "baserom.gba", 0x50e84a, 0x6 + +gUnknown_0850E850:: @ 850E850 + .incbin "baserom.gba", 0x50e850, 0x4 + +// referenced in src/field_map_obj.o +gUnknown_0850E854:: + .incbin "baserom.gba", 0x50e854, 0x8 + +gUnknown_0850E85C:: + .incbin "baserom.gba", 0x50e85C, 0x8 + +gUnknown_0850E864:: + .incbin "baserom.gba", 0x50e864, 0xc + +gUnknown_0850E870:: + .incbin "baserom.gba", 0x50e870, 0xc diff --git a/data/option_menu.s b/data/option_menu.s new file mode 100644 index 000000000..05db7fddf --- /dev/null +++ b/data/option_menu.s @@ -0,0 +1,20 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0855C604:: @ 855C604 + .incbin "baserom.gba", 0x55c604, 0x60 + +gUnknown_0855C664:: @ 855C664 + .incbin "baserom.gba", 0x55c664, 0x1c + +gUnknown_0855C680:: @ 855C680 + .incbin "baserom.gba", 0x55c680, 0x18 + +gUnknown_0855C698:: @ 855C698 + .incbin "baserom.gba", 0x55c698, 0x8 + +gUnknown_0855C6A0:: @ 855C6A0 + .incbin "baserom.gba", 0x55c6a0, 0x4 diff --git a/data/palette.s b/data/palette.s new file mode 100644 index 000000000..2dbfed8d2 --- /dev/null +++ b/data/palette.s @@ -0,0 +1,18 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0852487C:: @ 852487C + .incbin "baserom.gba", 0x52487c, 0x10 + +gDummyPaletteStructTemplate:: @ 852488C + .2byte 0xFFFF + .space 9 + .byte 0x20 + .space 4 + + .align 2 +gUnknown_0852489C:: @ 852489C + .incbin "baserom.gba", 0x52489c, 0x20 diff --git a/data/pokedex.s b/data/pokedex.s new file mode 100644 index 000000000..e81a3d78a --- /dev/null +++ b/data/pokedex.s @@ -0,0 +1,152 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0855C6A4:: @ 855C6A4 + .incbin "baserom.gba", 0x55c6a4, 0x336 + +gUnknown_0855C9DA:: @ 855C9DA + .incbin "baserom.gba", 0x55c9da, 0x304 + +gUnknown_0855CCDE:: @ 855CCDE + .incbin "baserom.gba", 0x55ccde, 0x4b6 + +gUnknown_0855D194:: @ 855D194 + .incbin "baserom.gba", 0x55d194, 0x18 + +gUnknown_0855D1AC:: @ 855D1AC + .incbin "baserom.gba", 0x55d1ac, 0x18 + +gUnknown_0855D1C4:: @ 855D1C4 + .incbin "baserom.gba", 0x55d1c4, 0x18 + +gUnknown_0855D1DC:: @ 855D1DC + .incbin "baserom.gba", 0x55d1dc, 0x18 + +gUnknown_0855D1F4:: @ 855D1F4 + .incbin "baserom.gba", 0x55d1f4, 0x18 + +gUnknown_0855D20C:: @ 855D20C + .incbin "baserom.gba", 0x55d20c, 0x18 + +gUnknown_0855D224:: @ 855D224 + .incbin "baserom.gba", 0x55d224, 0x18 + +gUnknown_0855D23C:: @ 855D23C + .incbin "baserom.gba", 0x55d23c, 0x18 + +gUnknown_0855D254:: @ 855D254 + .incbin "baserom.gba", 0x55d254, 0x18 + +gUnknown_0855D26C:: @ 855D26C + .incbin "baserom.gba", 0x55d26c, 0x10 + +gUnknown_0855D27C:: @ 855D27C + .incbin "baserom.gba", 0x55d27c, 0x10 + +gUnknown_0855D28C:: @ 855D28C + .incbin "baserom.gba", 0x55d28c, 0x5 + +gUnknown_0855D291:: @ 855D291 + .incbin "baserom.gba", 0x55d291, 0x7 + +gUnknown_0855D298:: @ 855D298 + .incbin "baserom.gba", 0x55d298, 0x10 + +gUnknown_0855D2A8:: @ 855D2A8 + .incbin "baserom.gba", 0x55d2a8, 0x10 + +gUnknown_0855D2B8:: @ 855D2B8 + .incbin "baserom.gba", 0x55d2b8, 0x6 + +gUnknown_0855D2BE:: @ 855D2BE + .incbin "baserom.gba", 0x55d2be, 0x40 + +gUnknown_0855D2FE:: @ 855D2FE + .incbin "baserom.gba", 0x55d2fe, 0xe + +gUnknown_0855D30C:: @ 855D30C + .string "$" + +@ 855D30D + .include "data/text/pokedex_text.inc" + +@ 856B5B0 + .include "data/pokedex_entries.inc" + +gUnknown_0856E610:: @ 856E610 + .incbin "baserom.gba", 0x56e610, 0x20 + +gUnknown_0856E630:: @ 856E630 + .incbin "baserom.gba", 0x56e630, 0x10 + +gUnknown_0856E640:: @ 856E640 + .incbin "baserom.gba", 0x56e640, 0x28 + +gUnknown_0856E668:: @ 856E668 + .incbin "baserom.gba", 0x56e668, 0x8 + +gUnknown_0856E670:: @ 856E670 + .incbin "baserom.gba", 0x56e670, 0x18 + +gUnknown_0856E688:: @ 856E688 + .incbin "baserom.gba", 0x56e688, 0xc + +@ 856E694 + .include "data/graphics/pokemon/mon_footprint_table.inc" + +gUnknown_0856ED08:: @ 856ED08 + .incbin "baserom.gba", 0x56ed08, 0x28 + +gUnknown_0856ED30:: @ 856ED30 + .incbin "baserom.gba", 0x56ed30, 0x18 + +gUnknown_0856ED48:: @ 856ED48 + .incbin "baserom.gba", 0x56ed48, 0x54 + +gUnknown_0856ED9C:: @ 856ED9C + .incbin "baserom.gba", 0x56ed9c, 0x1c + +gUnknown_0856EDB8:: @ 856EDB8 + .incbin "baserom.gba", 0x56edb8, 0x1c + +gUnknown_0856EDD4:: @ 856EDD4 + .incbin "baserom.gba", 0x56edd4, 0x1c + +gUnknown_0856EDF0:: @ 856EDF0 + .incbin "baserom.gba", 0x56edf0, 0x1c + +gUnknown_0856EE0C:: @ 856EE0C + .incbin "baserom.gba", 0x56ee0c, 0x18 + +gUnknown_0856EE24:: @ 856EE24 + .incbin "baserom.gba", 0x56ee24, 0x38 + +gUnknown_0856EE5C:: @ 856EE5C + .incbin "baserom.gba", 0x56ee5c, 0x58 + +gUnknown_0856EEB4:: @ 856EEB4 + .incbin "baserom.gba", 0x56eeb4, 0x60 + +gUnknown_0856EF14:: @ 856EF14 + .incbin "baserom.gba", 0x56ef14, 0x98 + +gUnknown_0856EFAC:: @ 856EFAC + .incbin "baserom.gba", 0x56efac, 0x2 + +gUnknown_0856EFAE:: @ 856EFAE + .incbin "baserom.gba", 0x56efae, 0x6 + +gUnknown_0856EFB4:: @ 856EFB4 + .incbin "baserom.gba", 0x56efb4, 0x14 + +gUnknown_0856EFC8:: @ 856EFC8 + .incbin "baserom.gba", 0x56efc8, 0x30 + +gUnknown_0856EFF8:: @ 856EFF8 + .incbin "baserom.gba", 0x56eff8, 0x10 + +gUnknown_0856F008:: @ 856F008 + .incbin "baserom.gba", 0x56f008, 0x10 diff --git a/data/pokemon_icon.s b/data/pokemon_icon.s new file mode 100644 index 000000000..ab3824f35 --- /dev/null +++ b/data/pokemon_icon.s @@ -0,0 +1,26 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +@ 857BCA8 + .include "data/graphics/pokemon/mon_icon_table.inc" + +@ 857C388 + .include "data/graphics/pokemon/mon_icon_palette_indices.inc" + +@ 857C540 + .include "data/graphics/pokemon/mon_icon_palette_table.inc" + +gUnknown_0857C570:: @ 857C570 + .incbin "baserom.gba", 0x57c570, 0x44 + +gUnknown_0857C5B4:: @ 857C5B4 + .incbin "baserom.gba", 0x57c5b4, 0x34 + +gUnknown_0857C5E8:: @ 857C5E8 + .incbin "baserom.gba", 0x57c5e8, 0x8 + +gUnknown_0857C5F0:: @ 857C5F0 + .incbin "baserom.gba", 0x57c5f0, 0x18 diff --git a/data/pokemon_storage_system.s b/data/pokemon_storage_system.s new file mode 100644 index 000000000..4f2815713 --- /dev/null +++ b/data/pokemon_storage_system.s @@ -0,0 +1,152 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_085716C0:: @ 85716C0 + .incbin "baserom.gba", 0x5716c0, 0x28 + +gUnknown_085716E8:: @ 85716E8 + .incbin "baserom.gba", 0x5716e8, 0x28 + +gUnknown_08571710:: @ 8571710 + .incbin "baserom.gba", 0x571710, 0x24 + +gUnknown_08571734:: @ 8571734 + .incbin "baserom.gba", 0x571734, 0x3 + +gUnknown_08571737:: @ 8571737 + .incbin "baserom.gba", 0x571737, 0x5 + +gUnknown_0857173C:: @ 857173C + .incbin "baserom.gba", 0x57173c, 0x20 + +gUnknown_0857175C:: @ 857175C + .incbin "baserom.gba", 0x57175c, 0x800 + +gUnknown_08571F5C:: @ 8571F5C + .incbin "baserom.gba", 0x571f5c, 0x180 + +gUnknown_085720DC:: @ 85720DC + .incbin "baserom.gba", 0x5720dc, 0x98 + +gUnknown_08572174:: @ 8572174 + .incbin "baserom.gba", 0x572174, 0x12c + +gUnknown_085722A0:: @ 85722A0 + .incbin "baserom.gba", 0x5722a0, 0xfc + +gUnknown_0857239C:: @ 857239C + .incbin "baserom.gba", 0x57239c, 0x40 + +gUnknown_085723DC:: @ 85723DC + .incbin "baserom.gba", 0x5723dc, 0x20 + +gUnknown_085723FC:: @ 85723FC + .incbin "baserom.gba", 0x5723fc, 0x20 + +gUnknown_0857241C:: @ 857241C + .incbin "baserom.gba", 0x57241c, 0x20 + +gUnknown_0857243C:: @ 857243C + .incbin "baserom.gba", 0x57243c, 0x20 + +gUnknown_0857245C:: @ 857245C + .incbin "baserom.gba", 0x57245c, 0x48 + +gUnknown_085724A4:: @ 85724A4 + .incbin "baserom.gba", 0x5724a4, 0x18 + +gUnknown_085724BC:: @ 85724BC + .incbin "baserom.gba", 0x5724bc, 0x238 + +gUnknown_085726F4:: @ 85726F4 + .incbin "baserom.gba", 0x5726f4, 0x20 + +gUnknown_08572714:: @ 8572714 + .incbin "baserom.gba", 0x572714, 0x20 + +gUnknown_08572734:: @ 8572734 + .incbin "baserom.gba", 0x572734, 0x10 + +gUnknown_08572744:: @ 8572744 + .incbin "baserom.gba", 0x572744, 0x8 + +gUnknown_0857274C:: @ 857274C + .incbin "baserom.gba", 0x57274c, 0x8 + +gUnknown_08572754:: @ 8572754 + .incbin "baserom.gba", 0x572754, 0x18 + +gUnknown_0857276C:: @ 857276C + .incbin "baserom.gba", 0x57276c, 0xf8 + +gUnknown_08572864:: @ 8572864 + .incbin "baserom.gba", 0x572864, 0x58 + +gUnknown_085728BC:: @ 85728BC + .incbin "baserom.gba", 0x5728bc, 0x18 + +gUnknown_085728D4:: @ 85728D4 + .incbin "baserom.gba", 0x5728d4, 0x48 + +gUnknown_0857291C:: @ 857291C + .incbin "baserom.gba", 0x57291c, 0x4c58 + +gUnknown_08577574:: @ 8577574 + .incbin "baserom.gba", 0x577574, 0x44 + +gUnknown_085775B8:: @ 85775B8 + .incbin "baserom.gba", 0x5775b8, 0x398c + +gUnknown_0857AF44:: @ 857AF44 + .incbin "baserom.gba", 0x57af44, 0xc0 + +gUnknown_0857B004:: @ 857B004 + .incbin "baserom.gba", 0x57b004, 0x7c + +gUnknown_0857B080:: @ 857B080 + .incbin "baserom.gba", 0x57b080, 0x28 + +gUnknown_0857B0A8:: @ 857B0A8 + .incbin "baserom.gba", 0x57b0a8, 0x38 + +gUnknown_0857B0E0:: @ 857B0E0 + .incbin "baserom.gba", 0x57b0e0, 0x8b8 + +gUnknown_0857B998:: @ 857B998 + .incbin "baserom.gba", 0x57b998, 0xc + +gUnknown_0857B9A4:: @ 857B9A4 + .incbin "baserom.gba", 0x57b9a4, 0x18 + +gUnknown_0857B9BC:: @ 857B9BC + .incbin "baserom.gba", 0x57b9bc, 0x28 + +gUnknown_0857B9E4:: @ 857B9E4 + .incbin "baserom.gba", 0x57b9e4, 0x18 + +gUnknown_0857B9FC:: @ 857B9FC + .incbin "baserom.gba", 0x57b9fc, 0x54 + +gUnknown_0857BA50:: @ 857BA50 + .incbin "baserom.gba", 0x57ba50, 0x18 + +gUnknown_0857BA68:: @ 857BA68 + .incbin "baserom.gba", 0x57ba68, 0x18 + +gUnknown_0857BA80:: @ 857BA80 + .incbin "baserom.gba", 0x57ba80, 0x9c + +gUnknown_0857BB1C:: @ 857BB1C + .incbin "baserom.gba", 0x57bb1c, 0x8 + +gUnknown_0857BB24:: @ 857BB24 + .incbin "baserom.gba", 0x57bb24, 0x14c + +gUnknown_0857BC70:: @ 857BC70 + .incbin "baserom.gba", 0x57bc70, 0x18 + +gUnknown_0857BC88:: @ 857BC88 + .incbin "baserom.gba", 0x57bc88, 0x20 diff --git a/data/reset_rtc_screen.s b/data/reset_rtc_screen.s new file mode 100644 index 000000000..2ed5f746c --- /dev/null +++ b/data/reset_rtc_screen.s @@ -0,0 +1,23 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_08510404:: @ 8510404 + .incbin "baserom.gba", 0x510404, 0x4 + +gUnknown_08510408:: @ 8510408 + .incbin "baserom.gba", 0x510408, 0x14 + +gUnknown_0851041C:: @ 851041C + .incbin "baserom.gba", 0x51041c, 0x4 + +gUnknown_08510420:: @ 8510420 + .incbin "baserom.gba", 0x510420, 0xa4 + +gUnknown_085104C4:: @ 85104C4 + .incbin "baserom.gba", 0x5104c4, 0x2c + +gUnknown_085104F0:: @ 85104F0 + .incbin "baserom.gba", 0x5104f0, 0x18 diff --git a/data/scrcmd.s b/data/scrcmd.s new file mode 100644 index 000000000..dfa802684 --- /dev/null +++ b/data/scrcmd.s @@ -0,0 +1,14 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gNullScriptPtr:: @ 85102BC + .incbin "baserom.gba", 0x5102bc, 0x4 + +gUnknown_085102C0:: @ 85102C0 + .incbin "baserom.gba", 0x5102c0, 0x14 + +gUnknown_085102D4:: @ 85102D4 + .incbin "baserom.gba", 0x5102d4, 0xc diff --git a/data/shop.s b/data/shop.s new file mode 100644 index 000000000..8fd64c0bb --- /dev/null +++ b/data/shop.s @@ -0,0 +1,57 @@ +@ the third big chunk of data + + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_08589A08:: @ 8589A08 + .incbin "baserom.gba", 0x589a08, 0x8 + +gUnknown_08589A10:: @ 8589A10 + .incbin "baserom.gba", 0x589a10, 0x18 + +gUnknown_08589A28:: @ 8589A28 + .incbin "baserom.gba", 0x589a28, 0x10 + +gUnknown_08589A38:: @ 8589A38 + .incbin "baserom.gba", 0x589a38, 0x10 + +gUnknown_08589A48:: @ 8589A48 + .incbin "baserom.gba", 0x589a48, 0x18 + +gUnknown_08589A60:: @ 8589A60 + .incbin "baserom.gba", 0x589a60, 0x10 + +gUnknown_08589A70:: @ 8589A70 + .incbin "baserom.gba", 0x589a70, 0x38 + +gUnknown_08589AA8:: @ 8589AA8 + .incbin "baserom.gba", 0x589aa8, 0x8 + +gUnknown_08589AB0:: @ 8589AB0 + .incbin "baserom.gba", 0x589ab0, 0x3 + +gUnknown_08589AB3:: @ 8589AB3 + .incbin "baserom.gba", 0x589ab3, 0x7 + +gUnknown_08589ABA:: @ 8589ABA + .incbin "baserom.gba", 0x589aba, 0x6 + +gUnknown_08589AC0:: @ 8589AC0 + .incbin "baserom.gba", 0x589ac0, 0x6 + +gUnknown_08589AC6:: @ 8589AC6 + .incbin "baserom.gba", 0x589ac6, 0x6 + +gUnknown_08589ACC:: @ 8589ACC + .incbin "baserom.gba", 0x589acc, 0x6 + +gUnknown_08589AD2:: @ 8589AD2 + .incbin "baserom.gba", 0x589ad2, 0x6 + +gUnknown_08589AD8:: @ 8589AD8 + .incbin "baserom.gba", 0x589ad8, 0x6 + +gUnknown_08589ADE:: @ 8589ADE + .incbin "baserom.gba", 0x589ade, 0x6 diff --git a/data/start_menu.s b/data/start_menu.s new file mode 100644 index 000000000..eaba0b8e1 --- /dev/null +++ b/data/start_menu.s @@ -0,0 +1,29 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gSafariBallsWindowTemplate:: @ 8510508 + .incbin "baserom.gba", 0x510508, 0x8 + +gUnknown_08510510:: @ 8510510 + .incbin "baserom.gba", 0x510510, 0x20 + +gPyramidFloorWindowTemplate_2:: @ 8510530 + .incbin "baserom.gba", 0x510530, 0x8 + +gPyramidFloorWindowTemplate_1:: @ 8510538 + .incbin "baserom.gba", 0x510538, 0x8 + +sStartMenuItems:: @ 8510540 + .incbin "baserom.gba", 0x510540, 0x68 + +gUnknown_085105A8:: @ 85105A8 + .incbin "baserom.gba", 0x5105a8, 0x4 + +gUnknown_085105AC:: @ 85105AC + .incbin "baserom.gba", 0x5105ac, 0x10 + +gUnknown_085105BC:: @ 85105BC + .incbin "baserom.gba", 0x5105bc, 0x1a8 diff --git a/data/text_window.s b/data/text_window.s new file mode 100644 index 000000000..a7389572b --- /dev/null +++ b/data/text_window.s @@ -0,0 +1,17 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0850E87C:: @ 850E87C + .incbin "baserom.gba", 0x50e87c, 0x1680 + +gUnknown_0850FEFC:: @ 850FEFC + .incbin "baserom.gba", 0x50fefc, 0x280 + +gUnknown_0851017C:: @ 851017C + .incbin "baserom.gba", 0x51017c, 0xa0 + +gUnknown_0851021C:: @ 851021C + .incbin "baserom.gba", 0x51021c, 0xa0 diff --git a/data/tileset.s b/data/tileset.s new file mode 100644 index 000000000..1221d8967 --- /dev/null +++ b/data/tileset.s @@ -0,0 +1,116 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_08510764:: @ 8510764 + .incbin "baserom.gba", 0x510764, 0xb60 + +gUnknown_085112C4:: @ 85112C4 + .incbin "baserom.gba", 0x5112c4, 0x908 + +gUnknown_08511BCC:: @ 8511BCC + .incbin "baserom.gba", 0x511bcc, 0x9a8 + +gUnknown_08512574:: @ 8512574 + .incbin "baserom.gba", 0x512574, 0x8e0 + +gUnknown_08512E54:: @ 8512E54 + .incbin "baserom.gba", 0x512e54, 0x320 + +gUnknown_08513174:: @ 8513174 + .incbin "baserom.gba", 0x513174, 0x510 + +gUnknown_08513684:: @ 8513684 + .incbin "baserom.gba", 0x513684, 0x210 + +gUnknown_08513894:: @ 8513894 + .incbin "baserom.gba", 0x513894, 0xb50 + +gUnknown_085143E4:: @ 85143E4 + .incbin "baserom.gba", 0x5143e4, 0x210 + +gUnknown_085145F4:: @ 85145F4 + .incbin "baserom.gba", 0x5145f4, 0x810 + +gUnknown_08514E04:: @ 8514E04 + .incbin "baserom.gba", 0x514e04, 0x540 + +gUnknown_08515344:: @ 8515344 + .incbin "baserom.gba", 0x515344, 0x20 + +gUnknown_08515364:: @ 8515364 + .incbin "baserom.gba", 0x515364, 0x20 + +gUnknown_08515384:: @ 8515384 + .incbin "baserom.gba", 0x515384, 0x30 + +gUnknown_085153B4:: @ 85153B4 + .incbin "baserom.gba", 0x5153b4, 0x30 + +gUnknown_085153E4:: @ 85153E4 + .incbin "baserom.gba", 0x5153e4, 0x10 + +gUnknown_085153F4:: @ 85153F4 + .incbin "baserom.gba", 0x5153f4, 0x410 + +gUnknown_08515804:: @ 8515804 + .incbin "baserom.gba", 0x515804, 0x20 + +gUnknown_08515824:: @ 8515824 + .incbin "baserom.gba", 0x515824, 0x140 + +gUnknown_08515964:: @ 8515964 + .incbin "baserom.gba", 0x515964, 0x428 + +gUnknown_08515D8C:: @ 8515D8C + .incbin "baserom.gba", 0x515d8c, 0x430 + +gUnknown_085161BC:: @ 85161BC + .incbin "baserom.gba", 0x5161bc, 0x20 + +gUnknown_085161DC:: @ 85161DC + .incbin "baserom.gba", 0x5161dc, 0x320 + +gUnknown_085164FC:: @ 85164FC + .incbin "baserom.gba", 0x5164fc, 0x310 + +gUnknown_0851680C:: @ 851680C + .incbin "baserom.gba", 0x51680c, 0x310 + +gUnknown_08516B1C:: @ 8516B1C + .incbin "baserom.gba", 0x516b1c, 0x210 + +gUnknown_08516D2C:: @ 8516D2C + .incbin "baserom.gba", 0x516d2c, 0x110 + +gUnknown_08516E3C:: @ 8516E3C + .incbin "baserom.gba", 0x516e3c, 0xc08 + +gUnknown_08517A44:: @ 8517A44 + .incbin "baserom.gba", 0x517a44, 0xc + +gUnknown_08517A50:: @ 8517A50 + .incbin "baserom.gba", 0x517a50, 0x1ac + +gUnknown_08517BFC:: @ 8517BFC + .incbin "baserom.gba", 0x517bfc, 0x10 + +gUnknown_08517C0C:: @ 8517C0C + .incbin "baserom.gba", 0x517c0c, 0x428 + +gUnknown_08518034:: @ 8518034 + .incbin "baserom.gba", 0x518034, 0x268 + +gUnknown_0851829C:: @ 851829C + .incbin "baserom.gba", 0x51829c, 0x8028 + +gUnknown_085202C4:: @ 85202C4 + .incbin "baserom.gba", 0x5202c4, 0x45a0 + +gUnknown_08524864:: @ 8524864 + .incbin "baserom.gba", 0x524864, 0xc + +gUnknown_08524870:: @ 8524870 + .incbin "baserom.gba", 0x524870, 0xc diff --git a/data/title_screen.s b/data/title_screen.s new file mode 100644 index 000000000..281afe51f --- /dev/null +++ b/data/title_screen.s @@ -0,0 +1,46 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gTitleScreenRayquazaTiles:: @ 853F058 + .incbin "graphics/title_screen/rayquaza.4bpp.lz" + + .align 2 +gUnknown_0853F83C:: @ 853F83C + .incbin "baserom.gba", 0x53f83c, 0x450 + +gTitleScreenCloudsTiles:: @ 853FC8C + .incbin "graphics/title_screen/clouds.4bpp.lz" + + .align 2 +gUnknown_0853FF70:: @ 853FF70 + .incbin "baserom.gba", 0x53ff70, 0xa8 + +gUnknown_08540018:: @ 8540018 + .incbin "baserom.gba", 0x540018, 0x18 + +gUnknown_08540030:: @ 8540030 + .incbin "baserom.gba", 0x540030, 0x18 + +gUnknown_08540048:: @ 8540048 + .incbin "baserom.gba", 0x540048, 0x90 + +gUnknown_085400D8:: @ 85400D8 + .incbin "baserom.gba", 0x5400d8, 0x18 + +gUnknown_085400F0:: @ 85400F0 + .incbin "baserom.gba", 0x5400f0, 0x10 + +gUnknown_08540100:: @ 8540100 + .incbin "baserom.gba", 0x540100, 0x24 + +gUnknown_08540124:: @ 8540124 + .incbin "baserom.gba", 0x540124, 0x18 + +gUnknown_0854013C:: @ 854013C + .incbin "baserom.gba", 0x54013c, 0x10 + +gUnknown_0854014C:: @ 854014C + .incbin "baserom.gba", 0x54014c, 0xc000 diff --git a/data/trainer_card.s b/data/trainer_card.s new file mode 100644 index 000000000..0d48cd0b6 --- /dev/null +++ b/data/trainer_card.s @@ -0,0 +1,167 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0856F018:: @ 856F018 + .incbin "baserom.gba", 0x56f018, 0x494 + +gUnknown_0856F4AC:: @ 856F4AC + .incbin "baserom.gba", 0x56f4ac, 0x20 + +gUnknown_0856F4CC:: @ 856F4CC + .incbin "baserom.gba", 0x56f4cc, 0x20 + +gUnknown_0856F4EC:: @ 856F4EC + .incbin "baserom.gba", 0x56f4ec, 0x20 + +gUnknown_0856F50C:: @ 856F50C + .incbin "baserom.gba", 0x56f50c, 0x20 + +gUnknown_0856F52C:: @ 856F52C + .incbin "baserom.gba", 0x56f52c, 0x20 + +gUnknown_0856F54C:: @ 856F54C + .incbin "baserom.gba", 0x56f54c, 0x20 + +gUnknown_0856F56C:: @ 856F56C + .incbin "baserom.gba", 0x56f56c, 0x20 + +gUnknown_0856F58C:: @ 856F58C + .incbin "baserom.gba", 0x56f58c, 0x20 + +gUnknown_0856F5AC:: @ 856F5AC + .incbin "baserom.gba", 0x56f5ac, 0x20 + +gUnknown_0856F5CC:: @ 856F5CC + .incbin "baserom.gba", 0x56f5cc, 0x248 + +gUnknown_0856F814:: @ 856F814 + .incbin "baserom.gba", 0x56f814, 0x2a0 + +gUnknown_0856FAB4:: @ 856FAB4 + .incbin "baserom.gba", 0x56fab4, 0x10 + +gUnknown_0856FAC4:: @ 856FAC4 + .incbin "baserom.gba", 0x56fac4, 0x20 + +gUnknown_0856FAE4:: @ 856FAE4 + .incbin "baserom.gba", 0x56fae4, 0x14 + +gUnknown_0856FAF8:: @ 856FAF8 + .incbin "baserom.gba", 0x56faf8, 0x14 + +gUnknown_0856FB0C:: @ 856FB0C + .incbin "baserom.gba", 0x56fb0c, 0x3 + +gUnknown_0856FB0F:: @ 856FB0F + .incbin "baserom.gba", 0x56fb0f, 0x9 + +gUnknown_0856FB18:: @ 856FB18 + .incbin "baserom.gba", 0x56fb18, 0x8 + +gUnknown_0856FB20:: @ 856FB20 + .incbin "baserom.gba", 0x56fb20, 0x8 + +gUnknown_0856FB28:: @ 856FB28 + .incbin "baserom.gba", 0x56fb28, 0x18 + +gUnknown_0856FB40:: @ 856FB40 + .incbin "baserom.gba", 0x56fb40, 0x8 + +gUnknown_0856FB48:: @ 856FB48 + .incbin "baserom.gba", 0x56fb48, 0x2 + +gUnknown_0856FB4A:: @ 856FB4A + .incbin "baserom.gba", 0x56fb4a, 0x2 + +gUnknown_0856FB4C:: @ 856FB4C + .incbin "baserom.gba", 0x56fb4c, 0x9 + +gUnknown_0856FB55:: @ 856FB55 + .incbin "baserom.gba", 0x56fb55, 0x2 + +gUnknown_0856FB57:: @ 856FB57 + .incbin "baserom.gba", 0x56fb57, 0x5 + +gUnknown_0856FB5C:: @ 856FB5C + .incbin "baserom.gba", 0x56fb5c, 0xc + +gUnknown_0856FB68:: @ 856FB68 + .incbin "baserom.gba", 0x56fb68, 0x6 + +gUnknown_0856FB6E:: @ 856FB6E + .incbin "baserom.gba", 0x56fb6e, 0x6 + +gUnknown_0856FB74:: @ 856FB74 + .incbin "baserom.gba", 0x56fb74, 0x4 + +gUnknown_0856FB78:: @ 856FB78 + .incbin "baserom.gba", 0x56fb78, 0x44 + +gUnknown_0856FBBC:: @ 856FBBC + .incbin "baserom.gba", 0x56fbbc, 0x1244 + +gUnknown_08570E00:: @ 8570E00 + .incbin "baserom.gba", 0x570e00, 0x260 + +gUnknown_08571060:: @ 8571060 + .incbin "baserom.gba", 0x571060, 0x260 + +gUnknown_085712C0:: @ 85712C0 + .incbin "baserom.gba", 0x5712c0, 0x38 + +gUnknown_085712F8:: @ 85712F8 + .incbin "baserom.gba", 0x5712f8, 0xe8 + +gUnknown_085713E0:: @ 85713E0 + .incbin "baserom.gba", 0x5713e0, 0x8 + +gUnknown_085713E8:: @ 85713E8 + .incbin "baserom.gba", 0x5713e8, 0xc + +gUnknown_085713F4:: @ 85713F4 + .incbin "baserom.gba", 0x5713f4, 0xc + +gUnknown_08571400:: @ 8571400 + .incbin "baserom.gba", 0x571400, 0x28 + +gUnknown_08571428:: @ 8571428 + .incbin "baserom.gba", 0x571428, 0x20 + +gUnknown_08571448:: @ 8571448 + .incbin "baserom.gba", 0x571448, 0x3 + +gUnknown_0857144B:: @ 857144B + .incbin "baserom.gba", 0x57144b, 0x3 + +gUnknown_0857144E:: @ 857144E + .incbin "baserom.gba", 0x57144e, 0x6 + +gUnknown_08571454:: @ 8571454 + .incbin "baserom.gba", 0x571454, 0x68 + +gUnknown_085714BC:: @ 85714BC + .incbin "baserom.gba", 0x5714bc, 0x18 + +gUnknown_085714D4:: @ 85714D4 + .incbin "baserom.gba", 0x5714d4, 0x10 + +gUnknown_085714E4:: @ 85714E4 + .incbin "baserom.gba", 0x5714e4, 0xd0 + +gUnknown_085715B4:: @ 85715B4 + .incbin "baserom.gba", 0x5715b4, 0x30 + +gUnknown_085715E4:: @ 85715E4 + .incbin "baserom.gba", 0x5715e4, 0x18 + +gUnknown_085715FC:: @ 85715FC + .incbin "baserom.gba", 0x5715fc, 0x18 + +gUnknown_08571614:: @ 8571614 + .incbin "baserom.gba", 0x571614, 0x3c + +gUnknown_08571650:: @ 8571650 + .incbin "baserom.gba", 0x571650, 0x70 diff --git a/data/trainer_see.s b/data/trainer_see.s new file mode 100644 index 000000000..7480cb290 --- /dev/null +++ b/data/trainer_see.s @@ -0,0 +1,14 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +gUnknown_0855072C:: @ 855072C + .incbin "baserom.gba", 0x55072c, 0x10 + +gUnknown_0855073C:: @ 855073C + .incbin "baserom.gba", 0x55073c, 0x30 + +gUnknown_0855076C:: @ 855076C + .incbin "baserom.gba", 0x55076c, 0x48 diff --git a/data/wild_encounter.s b/data/wild_encounter.s new file mode 100644 index 000000000..ddb842a76 --- /dev/null +++ b/data/wild_encounter.s @@ -0,0 +1,22 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + .align 2, 0 + +@ 85507E4 + .include "data/wild_mons.inc" + + .incbin "baserom.gba", 0x55370c, 0x188 + +gUnknown_08553894:: @ 8553894 + .incbin "baserom.gba", 0x553894, 0x180 + +gUnknown_08553A14:: @ 8553A14 + .incbin "baserom.gba", 0x553a14, 0x64 + +gUnknown_08553A78:: @ 8553A78 + .incbin "baserom.gba", 0x553a78, 0x4 + +gUnknown_08553A7C:: @ 8553A7C + .incbin "baserom.gba", 0x553a7c, 0x14 diff --git a/ld_script.txt b/ld_script.txt index d65d29e4b..069b520c9 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -353,7 +353,36 @@ SECTIONS { data/field_door.o(.rodata); data/field_player_avatar.o(.rodata); data/field_map_obj.o(.rodata); - data/data3_a0_B.o(.rodata); + data/field_ground_effect.o(.rodata); + data/map_obj_8097404.o(.rodata); + data/text_window.o(.rodata); + data/scrcmd.o(.rodata); + data/coord_event_weather.o(.rodata); + data/field_tasks.o(.rodata); + data/reset_rtc_screen.o(.rodata); + data/start_menu.o(.rodata); + data/tileset.o(.rodata); + data/palette.o(.rodata); + data/fanfares.o(.rodata); + data/battle_anims.o(.rodata); + data/title_screen.o(.rodata); + data/field_screen.o(.rodata); + data/battle_setup.o(.rodata); + data/cable_club.o(.rodata); + data/trainer_see.o(.rodata); + data/fldeff_emotion.o(.rodata); + data/wild_encounter.o(.rodata); + data/field_effect.o(.rodata); + data/option_menu.o(.rodata); + data/pokedex.o(.rodata); + data/trainer_card.o(.rodata); + data/pokemon_storage_system.o(.rodata); + data/pokemon_icon.o(.rodata); + data/fldeff_cut.o(.rodata); + data/map_name_popup.o(.rodata); + data/item_menu_icons.o(.rodata); + data/contest.o(.rodata); + data/shop.o(.rodata); src/berry.o(.rodata); data/script_menu.o(.rodata); data/naming_screen.o(.rodata); @@ -365,7 +394,7 @@ SECTIONS { data/contest_link_80F57C4.o(.rodata); data/script_pokemon_util_80F87D8.o(.rodata); src/pokemon_size_record.o(.rodata) - data/field_effect.o(.rodata); + data/field_effect_misc.o(.rodata); data/truck_scene_porthole.o(.rodata); data/rotating_gate.o(.rodata); data/item_use.o(.rodata); From 1d5ec895af202aeb64cc4642586486b6098f5ba5 Mon Sep 17 00:00:00 2001 From: scnorton Date: Mon, 25 Sep 2017 16:13:32 -0400 Subject: [PATCH 290/342] Rename data/data3.s to data/daycare.s --- data/{data3.s => daycare.s} | 0 ld_script.txt | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename data/{data3.s => daycare.s} (100%) diff --git a/data/data3.s b/data/daycare.s similarity index 100% rename from data/data3.s rename to data/daycare.s diff --git a/ld_script.txt b/ld_script.txt index 069b520c9..64a43d573 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -339,7 +339,7 @@ SECTIONS { data/data2c.o(.rodata); src/trig.o(.rodata); src/util.o(.rodata); - data/data3.o(.rodata); + data/daycare.o(.rodata); src/egg_hatch.o(.rodata); data/battle_7.o(.rodata); data/battle_interface.o(.rodata); From d1efbcd282aa68634b275af25ca1bf187e85cb9e Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Mon, 25 Sep 2017 16:26:45 -0500 Subject: [PATCH 291/342] Extract scattered baseroms and cleanup --- asm/cable_car.s | 24 +- asm/macros.inc | 31 + asm/pokenav.s | 2 +- constants/constants.inc | 1 + constants/map_object_constants.inc | 230 +++ data/battle_4.s | 8 +- data/battle_ai_scripts.s | 75 +- data/battle_anim_8170478.s | 112 +- data/battle_controller_safari.s | 120 +- data/battle_scripts_2.s | 69 +- data/berry_fix.mb | Bin 0 -> 15348 bytes data/berry_tag_screen.s | 20 +- data/braille_puzzles.s | 11 +- data/cable_car.s | 108 +- data/clear_save_data_screen.s | 10 +- data/contest_ai.s | 139 +- data/credits.s | 1559 +++++++++++++++++++- data/graphics.s | 22 +- data/link.s | 506 +++---- data/multiboot_berry_glitch_fix.s | 9 +- data/multiboot_pokemon_colosseum.s | 2 +- data/pokemon_colosseum.mb | Bin 0 -> 163840 bytes graphics/credits/credits_1.pal | 19 + graphics/credits/credits_2.pal | 19 + graphics/credits/credits_3.pal | 19 + graphics/credits/credits_4.pal | 19 + graphics/credits/the_end_copyright.png | Bin 0 -> 962 bytes graphics/interface/berry_tag_screen.pal | 19 + graphics/misc/cable_car.pal | 19 + graphics/misc/cable_car.png | Bin 0 -> 556 bytes graphics/misc/cable_car_bg.pal | 67 + graphics/misc/cable_car_bg.png | Bin 0 -> 4982 bytes graphics/misc/cable_car_cord.png | Bin 0 -> 147 bytes graphics/misc/cable_car_door.png | Bin 0 -> 155 bytes graphics/misc/cable_car_mountain_map.bin | 1 + graphics/misc/cable_car_mt_chimney_map.bin | Bin 0 -> 360 bytes graphics/misc/cable_car_pylon_stem_map.bin | 2 + graphics/misc/cable_car_tree_map.bin | Bin 0 -> 960 bytes include/gba/defines.h | 2 + src/berry_fix_program.c | 7 +- 40 files changed, 2627 insertions(+), 624 deletions(-) create mode 100644 constants/map_object_constants.inc create mode 100644 data/berry_fix.mb create mode 100644 data/pokemon_colosseum.mb create mode 100644 graphics/credits/credits_1.pal create mode 100644 graphics/credits/credits_2.pal create mode 100644 graphics/credits/credits_3.pal create mode 100644 graphics/credits/credits_4.pal create mode 100644 graphics/credits/the_end_copyright.png create mode 100644 graphics/interface/berry_tag_screen.pal create mode 100644 graphics/misc/cable_car.pal create mode 100644 graphics/misc/cable_car.png create mode 100644 graphics/misc/cable_car_bg.pal create mode 100644 graphics/misc/cable_car_bg.png create mode 100644 graphics/misc/cable_car_cord.png create mode 100644 graphics/misc/cable_car_door.png create mode 100644 graphics/misc/cable_car_mountain_map.bin create mode 100644 graphics/misc/cable_car_mt_chimney_map.bin create mode 100644 graphics/misc/cable_car_pylon_stem_map.bin create mode 100644 graphics/misc/cable_car_tree_map.bin diff --git a/asm/cable_car.s b/asm/cable_car.s index ba228b729..092e9a75e 100644 --- a/asm/cable_car.s +++ b/asm/cable_car.s @@ -242,7 +242,7 @@ _0814FE96: bls _0814FE96 ldr r0, =gUnknown_085CDB74 bl LoadSpritePalettes - ldr r0, =gUnknown_085CD67C + ldr r0, =gCableCarMtChimneyTilemap adds r1, r5, 0 bl malloc_and_decompress ldr r4, =gUnknown_0203ABAC @@ -250,7 +250,7 @@ _0814FE96: ldr r2, =0x000040fc adds r1, r2 str r0, [r1] - ldr r0, =gUnknown_085CD7D4 + ldr r0, =gCableCarTreeTilemap adds r1, r5, 0 bl malloc_and_decompress ldr r1, [r4] @@ -258,14 +258,14 @@ _0814FE96: lsls r3, 7 adds r1, r3 str r0, [r1] - ldr r0, =gUnknown_085CD958 + ldr r0, =gCableCarMountainTilemap adds r1, r5, 0 bl malloc_and_decompress ldr r1, [r4] ldr r2, =0x00004104 adds r1, r2 str r0, [r1] - ldr r0, =gUnknown_085CDB30 + ldr r0, =gCableCarPylonStemTilemap adds r1, r5, 0 bl malloc_and_decompress ldr r1, [r4] @@ -274,7 +274,7 @@ _0814FE96: str r0, [r2] ldr r0, =0x00004108 adds r1, r0 - ldr r0, =gUnknown_085CDB1C + ldr r0, =gCableCarPylonHookTilemapEntries str r0, [r1] ldr r1, =gUnknown_08DBA5B8 movs r0, 0 @@ -1908,7 +1908,7 @@ sub_8150D28: @ 8150D28 mov r5, r8 push {r5-r7} sub sp, 0x28 - ldr r1, =gUnknown_085CDBE4 + ldr r1, =gCableCarPlayerGraphicsIDs add r0, sp, 0xC movs r2, 0x2 bl memcpy @@ -1917,17 +1917,17 @@ sub_8150D28: @ 8150D28 lsrs r0, 16 mov r9, r0 add r6, sp, 0x10 - ldr r1, =gUnknown_085CDBE6 + ldr r1, =gMtChimneyHikerGraphicsIDs adds r0, r6, 0 movs r2, 0x4 bl memcpy add r5, sp, 0x14 - ldr r1, =gUnknown_085CDBEA + ldr r1, =gMtChimneyHikerCoords adds r0, r5, 0 movs r2, 0x8 bl memcpy add r4, sp, 0x1C - ldr r1, =gUnknown_085CDBF2 + ldr r1, =gMtChimneyHikerMovementDelayTable adds r0, r4, 0 movs r2, 0x4 bl memcpy @@ -1982,7 +1982,7 @@ _08150D86: movs r0, 0x49 strh r0, [r1, 0x30] _08150DD0: - ldr r4, =gUnknown_085CDB9C + ldr r4, =gSpriteTemplate_85CDB9C adds r0, r4, 0 movs r1, 0xB0 movs r2, 0x2B @@ -2088,7 +2088,7 @@ _08150E68: movs r0, 0x27 strh r0, [r1, 0x30] _08150ED4: - ldr r4, =gUnknown_085CDB9C + ldr r4, =gSpriteTemplate_85CDB9C adds r0, r4, 0 movs r1, 0x68 movs r2, 0x9 @@ -2149,7 +2149,7 @@ _08150F3E: ldr r3, =0xfff80000 adds r2, r3 asrs r2, 16 - ldr r0, =gUnknown_085CDBCC + ldr r0, =gSpriteTemplate_85CDBCC movs r3, 0x68 bl CreateSprite lsls r0, 24 diff --git a/asm/macros.inc b/asm/macros.inc index 642b6a33f..135cfac61 100644 --- a/asm/macros.inc +++ b/asm/macros.inc @@ -20,12 +20,43 @@ .2byte \tag .endm + .macro null_obj_tiles + obj_tiles 0, 0, 0 + .endm + .macro obj_pal address, tag .4byte \address .2byte \tag .2byte 0@ padding .endm + .macro null_obj_pal + obj_pal 0, 0 + .endm + + .macro paired_pals tag, address + .2byte \tag + .2byte 0 @ padding + .4byte \address + .endm + +@ For object animation frames. + .macro obj_frame_tiles address, uncompressed_size + .4byte \address + .2byte \uncompressed_size + .2byte 0 @ padding + .endm + + .macro spr_template tile_tag, pal_tag, oam, anims, images, affine_anims, callback + .2byte \tile_tag + .2byte \pal_tag + .4byte \oam + .4byte \anims + .4byte \images + .4byte \affine_anims + .4byte \callback + .endm + @ Berry trees have a table defining the palette slot used for each of their 5 @ stages. However, the first 2 stages always use the same slots regardless of @ the type of tree and the slots of the last 3 stages always equal each other. diff --git a/asm/pokenav.s b/asm/pokenav.s index 6ae25b362..58e60c51d 100755 --- a/asm/pokenav.s +++ b/asm/pokenav.s @@ -28559,7 +28559,7 @@ _081D5268: ldr r0, =gUnknown_085EE097 bl sub_8018884 ldr r0, =gUnknown_03006370 - ldr r1, =gUnknown_089A6550 + ldr r1, =gMultiBootProgram_BerryGlitchFix_Start ldr r2, =gUnknown_089A3470 subs r1, r2 bl sub_81D4D50 diff --git a/constants/constants.inc b/constants/constants.inc index 650ba4703..3928d63d6 100644 --- a/constants/constants.inc +++ b/constants/constants.inc @@ -13,6 +13,7 @@ .include "constants/trainer_constants.inc" .include "constants/battle_frontier_constants.inc" .include "constants/map_constants.inc" + .include "constants/map_object_constants.inc" .include "constants/berry_constants.inc" .include "constants/field_object_constants.inc" .include "constants/contest_move_effects.inc" diff --git a/constants/map_object_constants.inc b/constants/map_object_constants.inc new file mode 100644 index 000000000..014eb05c8 --- /dev/null +++ b/constants/map_object_constants.inc @@ -0,0 +1,230 @@ + .set MAP_OBJ_GFX_BRENDAN_NORMAL, 0 + .set MAP_OBJ_GFX_BRENDAN_MACH_BIKE, 1 + .set MAP_OBJ_GFX_BRENDAN_SURFING, 2 + .set MAP_OBJ_GFX_BRENDAN_FIELD_MOVE, 3 + .set MAP_OBJ_GFX_QUINTY_PLUMP, 4 + .set MAP_OBJ_GFX_LITTLE_BOY_1, 5 + .set MAP_OBJ_GFX_LITTLE_GIRL_1, 6 + .set MAP_OBJ_GFX_BOY_1, 7 + .set MAP_OBJ_GFX_GIRL_1, 8 + .set MAP_OBJ_GFX_BOY_2, 9 + .set MAP_OBJ_GFX_GIRL_2, 10 + .set MAP_OBJ_GFX_LITTLE_BOY_2, 11 + .set MAP_OBJ_GFX_LITTLE_GIRL_2, 12 + .set MAP_OBJ_GFX_BOY_3, 13 + .set MAP_OBJ_GFX_GIRL_3, 14 + .set MAP_OBJ_GFX_BOY_4, 15 + .set MAP_OBJ_GFX_WOMAN_1, 16 + .set MAP_OBJ_GFX_FAT_MAN, 17 + .set MAP_OBJ_GFX_WOMAN_2, 18 + .set MAP_OBJ_GFX_MAN_1, 19 + .set MAP_OBJ_GFX_WOMAN_3, 20 + .set MAP_OBJ_GFX_OLD_MAN_1, 21 + .set MAP_OBJ_GFX_OLD_WOMAN_1, 22 + .set MAP_OBJ_GFX_MAN_2, 23 + .set MAP_OBJ_GFX_WOMAN_4, 24 + .set MAP_OBJ_GFX_MAN_3, 25 + .set MAP_OBJ_GFX_WOMAN_5, 26 + .set MAP_OBJ_GFX_COOK, 27 + .set MAP_OBJ_GFX_WOMAN_6, 28 + .set MAP_OBJ_GFX_OLD_MAN_2, 29 + .set MAP_OBJ_GFX_OLD_WOMAN_2, 30 + .set MAP_OBJ_GFX_CAMPER, 31 + .set MAP_OBJ_GFX_PICNICKER, 32 + .set MAP_OBJ_GFX_MAN_4, 33 + .set MAP_OBJ_GFX_WOMAN_7, 34 + .set MAP_OBJ_GFX_YOUNGSTER, 35 + .set MAP_OBJ_GFX_BUG_CATCHER, 36 + .set MAP_OBJ_GFX_PSYCHIC_M, 37 + .set MAP_OBJ_GFX_SCHOOL_KID_M, 38 + .set MAP_OBJ_GFX_MANIAC, 39 + .set MAP_OBJ_GFX_HEX_MANIAC, 40 + .set MAP_OBJ_GFX_RAYQUAZA, 41 + .set MAP_OBJ_GFX_SWIMMER_M, 42 + .set MAP_OBJ_GFX_SWIMMER_F, 43 + .set MAP_OBJ_GFX_BLACK_BELT, 44 + .set MAP_OBJ_GFX_BEAUTY, 45 + .set MAP_OBJ_GFX_SCIENTIST_1, 46 + .set MAP_OBJ_GFX_LASS, 47 + .set MAP_OBJ_GFX_GENTLEMAN, 48 + .set MAP_OBJ_GFX_SAILOR, 49 + .set MAP_OBJ_GFX_FISHERMAN, 50 + .set MAP_OBJ_GFX_RUNNING_TRIATHLETE_M, 51 + .set MAP_OBJ_GFX_RUNNING_TRIATHLETE_F, 52 + .set MAP_OBJ_GFX_TUBER_F, 53 + .set MAP_OBJ_GFX_TUBER_M, 54 + .set MAP_OBJ_GFX_HIKER, 55 + .set MAP_OBJ_GFX_CYCLING_TRIATHLETE_M, 56 + .set MAP_OBJ_GFX_CYCLING_TRIATHLETE_F, 57 + .set MAP_OBJ_GFX_NURSE, 58 + .set MAP_OBJ_GFX_ITEM_BALL, 59 + .set MAP_OBJ_GFX_BERRY_TREE, 60 + .set MAP_OBJ_GFX_BERRY_TREE_EARLY_STAGES, 61 + .set MAP_OBJ_GFX_BERRY_TREE_LATE_STAGES, 62 + .set MAP_OBJ_GFX_BRENDAN_ACRO_BIKE, 63 + .set MAP_OBJ_GFX_PROF_BIRCH, 64 + .set MAP_OBJ_GFX_MAN_5, 65 + .set MAP_OBJ_GFX_MAN_6, 66 + .set MAP_OBJ_GFX_REPORTER_M, 67 + .set MAP_OBJ_GFX_REPORTER_F, 68 + .set MAP_OBJ_GFX_BARD, 69 + .set MAP_OBJ_GFX_HIPSTER, 70 + .set MAP_OBJ_GFX_TRADER, 71 + .set MAP_OBJ_GFX_STORYTELLER, 72 + .set MAP_OBJ_GFX_GIDDY, 73 + .set MAP_OBJ_GFX_UNUSED_MAUVILLE_OLD_MAN_1, 74 + .set MAP_OBJ_GFX_UNUSED_MAUVILLE_OLD_MAN_2, 75 + .set MAP_OBJ_GFX_UNUSED_NATU_DOLL, 76 + .set MAP_OBJ_GFX_UNUSED_MAGNEMITE_DOLL, 77 + .set MAP_OBJ_GFX_UNUSED_SQUIRTLE_DOLL, 78 + .set MAP_OBJ_GFX_UNUSED_WOOPER_DOLL, 79 + .set MAP_OBJ_GFX_UNUSED_PIKACHU_DOLL, 80 + .set MAP_OBJ_GFX_UNUSED_PORYGON2_DOLL, 81 + .set MAP_OBJ_GFX_CUTTABLE_TREE, 82 + .set MAP_OBJ_GFX_MART_EMPLOYEE, 83 + .set MAP_OBJ_GFX_ROOFTOP_SALE_WOMAN, 84 + .set MAP_OBJ_GFX_TEALA, 85 + .set MAP_OBJ_GFX_BREAKABLE_ROCK, 86 + .set MAP_OBJ_GFX_PUSHABLE_BOULDER, 87 + .set MAP_OBJ_GFX_MR_BRINEYS_BOAT, 88 + .set MAP_OBJ_GFX_MAY_NORMAL, 89 + .set MAP_OBJ_GFX_MAY_MACH_BIKE, 90 + .set MAP_OBJ_GFX_MAY_ACRO_BIKE, 91 + .set MAP_OBJ_GFX_MAY_SURFING, 92 + .set MAP_OBJ_GFX_MAY_FIELD_MOVE, 93 + .set MAP_OBJ_GFX_TRUCK, 94 + .set MAP_OBJ_GFX_MACHOKE_CARRYING_BOX, 95 + .set MAP_OBJ_GFX_MACHOKE_FACING_AWAY, 96 + .set MAP_OBJ_GFX_BIRCHS_BAG, 97 + .set MAP_OBJ_GFX_ZIGZAGOON, 98 + .set MAP_OBJ_GFX_ARTIST, 99 + .set MAP_OBJ_GFX_RIVAL_BRENDAN_NORMAL, 100 + .set MAP_OBJ_GFX_RIVAL_BRENDAN_MACH_BIKE, 101 + .set MAP_OBJ_GFX_RIVAL_BRENDAN_ACRO_BIKE, 102 + .set MAP_OBJ_GFX_RIVAL_BRENDAN_SURFING, 103 + .set MAP_OBJ_GFX_RIVAL_BRENDAN_FIELD_MOVE, 104 + .set MAP_OBJ_GFX_RIVAL_MAY_NORMAL, 105 + .set MAP_OBJ_GFX_RIVAL_MAY_MACH_BIKE, 106 + .set MAP_OBJ_GFX_RIVAL_MAY_ACRO_BIKE, 107 + .set MAP_OBJ_GFX_RIVAL_MAY_SURFING, 108 + .set MAP_OBJ_GFX_RIVAL_MAY_FIELD_MOVE, 109 + .set MAP_OBJ_GFX_CAMERAMAN, 110 + .set MAP_OBJ_GFX_BRENDAN_UNDERWATER, 111 + .set MAP_OBJ_GFX_MAY_UNDERWATER, 112 + .set MAP_OBJ_GFX_MOVING_BOX, 113 + .set MAP_OBJ_GFX_CABLE_CAR, 114 + .set MAP_OBJ_GFX_SCIENTIST_2, 115 + .set MAP_OBJ_GFX_MAN_7, 116 + .set MAP_OBJ_GFX_AQUA_MEMBER_M, 117 + .set MAP_OBJ_GFX_AQUA_MEMBER_F, 118 + .set MAP_OBJ_GFX_MAGMA_MEMBER_M, 119 + .set MAP_OBJ_GFX_MAGMA_MEMBER_F, 120 + .set MAP_OBJ_GFX_SIDNEY, 121 + .set MAP_OBJ_GFX_PHOEBE, 122 + .set MAP_OBJ_GFX_GLACIA, 123 + .set MAP_OBJ_GFX_DRAKE, 124 + .set MAP_OBJ_GFX_ROXANNE, 125 + .set MAP_OBJ_GFX_BRAWLY, 126 + .set MAP_OBJ_GFX_WATTSON, 127 + .set MAP_OBJ_GFX_FLANNERY, 128 + .set MAP_OBJ_GFX_NORMAN, 129 + .set MAP_OBJ_GFX_WINONA, 130 + .set MAP_OBJ_GFX_LIZA, 131 + .set MAP_OBJ_GFX_TATE, 132 + .set MAP_OBJ_GFX_WALLACE, 133 + .set MAP_OBJ_GFX_STEVEN, 134 + .set MAP_OBJ_GFX_WALLY, 135 + .set MAP_OBJ_GFX_LITTLE_BOY_3, 136 + .set MAP_OBJ_GFX_BRENDAN_FISHING, 137 + .set MAP_OBJ_GFX_MAY_FISHING, 138 + .set MAP_OBJ_GFX_HOT_SPRINGS_OLD_WOMAN, 139 + .set MAP_OBJ_GFX_SS_TIDAL, 140 + .set MAP_OBJ_GFX_SUBMARINE_SHADOW, 141 + .set MAP_OBJ_GFX_PICHU_DOLL, 142 + .set MAP_OBJ_GFX_PIKACHU_DOLL, 143 + .set MAP_OBJ_GFX_MARILL_DOLL, 144 + .set MAP_OBJ_GFX_TOGEPI_DOLL, 145 + .set MAP_OBJ_GFX_CYNDAQUIL_DOLL, 146 + .set MAP_OBJ_GFX_CHIKORITA_DOLL, 147 + .set MAP_OBJ_GFX_TOTODILE_DOLL, 148 + .set MAP_OBJ_GFX_JIGGLYPUFF_DOLL, 149 + .set MAP_OBJ_GFX_MEOWTH_DOLL, 150 + .set MAP_OBJ_GFX_CLEFAIRY_DOLL, 151 + .set MAP_OBJ_GFX_DITTO_DOLL, 152 + .set MAP_OBJ_GFX_SMOOCHUM_DOLL, 153 + .set MAP_OBJ_GFX_TREECKO_DOLL, 154 + .set MAP_OBJ_GFX_TORCHIC_DOLL, 155 + .set MAP_OBJ_GFX_MUDKIP_DOLL, 156 + .set MAP_OBJ_GFX_DUSKULL_DOLL, 157 + .set MAP_OBJ_GFX_WYNAUT_DOLL, 158 + .set MAP_OBJ_GFX_BALTOY_DOLL, 159 + .set MAP_OBJ_GFX_KECLEON_DOLL, 160 + .set MAP_OBJ_GFX_AZURILL_DOLL, 161 + .set MAP_OBJ_GFX_SKITTY_DOLL, 162 + .set MAP_OBJ_GFX_SWABLU_DOLL, 163 + .set MAP_OBJ_GFX_GULPIN_DOLL, 164 + .set MAP_OBJ_GFX_LOTAD_DOLL, 165 + .set MAP_OBJ_GFX_SEEDOT_DOLL, 166 + .set MAP_OBJ_GFX_PIKA_CUSHION, 167 + .set MAP_OBJ_GFX_ROUND_CUSHION, 168 + .set MAP_OBJ_GFX_KISS_CUSHION, 169 + .set MAP_OBJ_GFX_ZIGZAG_CUSHION, 170 + .set MAP_OBJ_GFX_SPIN_CUSHION, 171 + .set MAP_OBJ_GFX_DIAMOND_CUSHION, 172 + .set MAP_OBJ_GFX_BALL_CUSHION, 173 + .set MAP_OBJ_GFX_GRASS_CUSHION, 174 + .set MAP_OBJ_GFX_FIRE_CUSHION, 175 + .set MAP_OBJ_GFX_WATER_CUSHION, 176 + .set MAP_OBJ_GFX_BIG_SNORLAX_DOLL, 177 + .set MAP_OBJ_GFX_BIG_RHYDON_DOLL, 178 + .set MAP_OBJ_GFX_BIG_LAPRAS_DOLL, 179 + .set MAP_OBJ_GFX_BIG_VENUSAUR_DOLL, 180 + .set MAP_OBJ_GFX_BIG_CHARIZARD_DOLL, 181 + .set MAP_OBJ_GFX_BIG_BLASTOISE_DOLL, 182 + .set MAP_OBJ_GFX_BIG_WAILMER_DOLL, 183 + .set MAP_OBJ_GFX_BIG_REGIROCK_DOLL, 184 + .set MAP_OBJ_GFX_BIG_REGICE_DOLL, 185 + .set MAP_OBJ_GFX_BIG_REGISTEEL_DOLL, 186 + .set MAP_OBJ_GFX_LATIAS, 187 + .set MAP_OBJ_GFX_LATIOS, 188 + .set MAP_OBJ_GFX_BOY_5, 189 + .set MAP_OBJ_GFX_CONTEST_JUDGE, 190 + .set MAP_OBJ_GFX_BRENDAN_WATERING, 191 + .set MAP_OBJ_GFX_MAY_WATERING, 192 + .set MAP_OBJ_GFX_BRENDAN_DECORATING, 193 + .set MAP_OBJ_GFX_MAY_DECORATING, 194 + .set MAP_OBJ_GFX_ARCHIE, 195 + .set MAP_OBJ_GFX_MAXIE, 196 + .set MAP_OBJ_GFX_KYOGRE_1, 197 + .set MAP_OBJ_GFX_GROUDON_1, 198 + .set MAP_OBJ_GFX_FOSSIL, 199 + .set MAP_OBJ_GFX_REGIROCK, 200 + .set MAP_OBJ_GFX_REGICE, 201 + .set MAP_OBJ_GFX_REGISTEEL, 202 + .set MAP_OBJ_GFX_SKITTY, 203 + .set MAP_OBJ_GFX_KECLEON_1, 204 + .set MAP_OBJ_GFX_KYOGRE_2, 205 + .set MAP_OBJ_GFX_GROUDON_2, 206 + .set MAP_OBJ_GFX_RAYQUAZA_2, 207 + .set MAP_OBJ_GFX_ZIGZAGOON_2, 208 + .set MAP_OBJ_GFX_PIKACHU, 209 + .set MAP_OBJ_GFX_AZUMARILL, 210 + .set MAP_OBJ_GFX_WINGULL, 211 + .set MAP_OBJ_GFX_KECLEON_2, 212 + .set MAP_OBJ_GFX_TUBER_M_SWIMMING, 213 + .set MAP_OBJ_GFX_AZURILL, 214 + .set MAP_OBJ_GFX_MOM, 215 + .set MAP_OBJ_GFX_LINK_BRENDAN, 216 + .set MAP_OBJ_GFX_LINK_MAY, 217 + + .set SHADOW_SIZE_S, 0 + .set SHADOW_SIZE_M, 1 + .set SHADOW_SIZE_L, 2 + .set SHADOW_SIZE_XL, 3 + + .set F_INANIMATE, 1 << 6 + .set F_DISABLE_REFLECTION_PALETTE_LOAD, 1 << 7 + + .set TRACKS_NONE, 0 + .set TRACKS_FOOT, 1 + .set TRACKS_BIKE_TIRE, 2 diff --git a/data/battle_4.s b/data/battle_4.s index 3300b25ee..b134db586 100644 --- a/data/battle_4.s +++ b/data/battle_4.s @@ -67,13 +67,7 @@ gUnknown_0831C3B8:: @ 831C3B8 .align 2 gUnknown_0831C3C0:: @ 831C3C0 - .2byte 0xd75a @ tileTag - .2byte 0xd75a @ paletteTag - .4byte gUnknown_0831C3B8 - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_804F450 + spr_template 0xd75a, 0xd75a, gUnknown_0831C3B8, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_804F450 .align 2 sProtectSuccessRates:: @ 831C3D8 diff --git a/data/battle_ai_scripts.s b/data/battle_ai_scripts.s index 0cb225ef5..abca5eba5 100644 --- a/data/battle_ai_scripts.s +++ b/data/battle_ai_scripts.s @@ -5,4 +5,77 @@ .align 2 gBattleAI_ScriptsTable:: @ 82DBEF8 - .incbin "baserom.gba", 0x2dbef8, 0x2458 + .4byte gBattleScript_82DBF78 + .4byte gBattleScript_82DDE3F + .4byte gBattleScript_82DC7B0 + .4byte gBattleScript_82DDE71 + .4byte gBattleScript_82DDEDD + .4byte gBattleScript_82DDEC8 + .4byte gBattleScript_82DDF09 + .4byte gBattleScript_82DDFB4 + .4byte gBattleScript_82DE193 + .4byte gBattleScript_82DE2ED + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE34E + .4byte gBattleScript_82DE309 + .4byte gBattleScript_82DE337 + .4byte gBattleScript_82DE33E + +gBattleScript_82DBF78:: @ 82DBF78 + .incbin "baserom.gba", 0x2dbf78, 0x838 + +gBattleScript_82DC7B0:: @ 82DC7B0 + .incbin "baserom.gba", 0x2dc7b0, 0x168F + +gBattleScript_82DDE3F:: @ 82DDE3F + .incbin "baserom.gba", 0x2dde3f, 0x32 + +gBattleScript_82DDE71:: @ 82DDE71 + .incbin "baserom.gba", 0x2dde71, 0x57 + +gBattleScript_82DDEC8:: @ 82DDEC8 + .incbin "baserom.gba", 0x2ddec8, 0x15 + +gBattleScript_82DDEDD:: @ 82DDEDD + .incbin "baserom.gba", 0x2ddedd, 0x2c + +gBattleScript_82DDF09:: @ 82DDF09 + .incbin "baserom.gba", 0x2ddf09, 0xab + +gBattleScript_82DDFB4:: @ 82DDFB4 + .incbin "baserom.gba", 0x2ddfb4, 0x1df + +gBattleScript_82DE193:: @ 82DE193 + .incbin "baserom.gba", 0x2de193, 0x15a + +gBattleScript_82DE2ED:: @ 82DE2ED + .incbin "baserom.gba", 0x2de2ed, 0x1c + +gBattleScript_82DE309:: @ 82DE309 + .incbin "baserom.gba", 0x2de309, 0x2e + +gBattleScript_82DE337:: @ 82DE337 + .incbin "baserom.gba", 0x2de337, 0x7 + +gBattleScript_82DE33E:: @ 82DE33E + .incbin "baserom.gba", 0x2de33e, 0x10 + +gBattleScript_82DE34E:: @ 82DE34E + .incbin "baserom.gba", 0x2de34e, 0x2 diff --git a/data/battle_anim_8170478.s b/data/battle_anim_8170478.s index dc50c99aa..0e0f749fe 100644 --- a/data/battle_anim_8170478.s +++ b/data/battle_anim_8170478.s @@ -97,113 +97,41 @@ gUnknown_085E51C0:: @ 85E51C0 .align 2 gUnknown_085E51F0:: @ 85E51F0 - .2byte 0xd6ec @ tileTag - .2byte 0xd6ec @ paletteTag - .4byte gUnknown_08524904 - .4byte gUnknown_085E519C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0xd6ec, 0xd6ec, gUnknown_08524904, gUnknown_085E519C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 - .2byte 0xd6ed @ tileTag - .2byte 0xd6ed @ paletteTag - .4byte gUnknown_08524904 - .4byte gUnknown_085E519C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0xd6ed, 0xd6ed, gUnknown_08524904, gUnknown_085E519C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 - .2byte 0xd6ee @ tileTag - .2byte 0xd6ee @ paletteTag - .4byte gUnknown_08524904 - .4byte gUnknown_085E519C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0xd6ee, 0xd6ee, gUnknown_08524904, gUnknown_085E519C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 - .2byte 0xd6ef @ tileTag - .2byte 0xd6ef @ paletteTag - .4byte gUnknown_08524904 - .4byte gUnknown_085E519C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0xd6ef, 0xd6ef, gUnknown_08524904, gUnknown_085E519C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_085E5250:: @ 85E5250 - .2byte 0xd6f0 @ tileTag - .2byte 0xd6f0 @ paletteTag - .4byte gUnknown_08524904 - .4byte gUnknown_085E519C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0xd6f0, 0xd6f0, gUnknown_08524904, gUnknown_085E519C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 - .2byte 0xd6f1 @ tileTag - .2byte 0xd6f1 @ paletteTag - .4byte gUnknown_08524904 - .4byte gUnknown_085E519C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0xd6f1, 0xd6f1, gUnknown_08524904, gUnknown_085E519C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 - .2byte 0xd6f2 @ tileTag - .2byte 0xd6f2 @ paletteTag - .4byte gUnknown_08524904 - .4byte gUnknown_085E519C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0xd6f2, 0xd6f2, gUnknown_08524904, gUnknown_085E519C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 - .2byte 0xd6f3 @ tileTag - .2byte 0xd6f3 @ paletteTag - .4byte gUnknown_08524904 - .4byte gUnknown_085E519C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0xd6f3, 0xd6f3, gUnknown_08524904, gUnknown_085E519C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 - .2byte 0xd6f4 @ tileTag - .2byte 0xd6f4 @ paletteTag - .4byte gUnknown_08524904 - .4byte gUnknown_085E519C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0xd6f4, 0xd6f4, gUnknown_08524904, gUnknown_085E519C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 - .2byte 0xd6f5 @ tileTag - .2byte 0xd6f5 @ paletteTag - .4byte gUnknown_08524904 - .4byte gUnknown_085E519C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0xd6f5, 0xd6f5, gUnknown_08524904, gUnknown_085E519C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 - .2byte 0xd6f6 @ tileTag - .2byte 0xd6f6 @ paletteTag - .4byte gUnknown_08524904 - .4byte gUnknown_085E519C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0xd6f6, 0xd6f6, gUnknown_08524904, gUnknown_085E519C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 - .2byte 0xd6f7 @ tileTag - .2byte 0xd6f7 @ paletteTag - .4byte gUnknown_08524904 - .4byte gUnknown_085E519C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0xd6f7, 0xd6f7, gUnknown_08524904, gUnknown_085E519C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_085E5310:: @ 85E5310 @@ -212,13 +140,7 @@ gUnknown_085E5310:: @ 85E5310 .2byte 0x0100, 0x0503, 0x0506, 0x0004 .align 2 - .2byte 0x281d @ tileTag - .2byte 0x281d @ paletteTag - .4byte gUnknown_0852490C - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_817330C + spr_template 0x281d, 0x281d, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_817330C .align 2 gUnknown_085E5350:: @ 8535350 @@ -229,11 +151,5 @@ gUnknown_085E5358:: @ 8535358 .4byte gUnknown_085E5350 .align 2 - .2byte 0x274a @ tileTag - .2byte 0x274a @ paletteTag - .4byte gUnknown_08524914 - .4byte gUnknown_085E5358 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_817330C + spr_template 0x274a, 0x274a, gUnknown_08524914, gUnknown_085E5358, NULL, gDummySpriteAffineAnimTable, sub_817330C diff --git a/data/battle_controller_safari.s b/data/battle_controller_safari.s index 8f8c0b70b..39d1d0de3 100644 --- a/data/battle_controller_safari.s +++ b/data/battle_controller_safari.s @@ -75,31 +75,13 @@ gUnknown_085CE01C:: @ 85CE01C .align 2 gUnknown_085CE020:: @ 85CE020 - .2byte 0x2799 @ tileTag - .2byte 0x2799 @ paletteTag - .4byte gUnknown_08524A34 - .4byte gUnknown_085CE01C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_80A77C8 + spr_template 0x2799, 0x2799, gUnknown_08524A34, gUnknown_085CE01C, NULL, gDummySpriteAffineAnimTable, sub_80A77C8 .align 2 - .2byte 0x2720 @ tileTag - .2byte 0x2720 @ paletteTag - .4byte gUnknown_08524934 - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_815A0D4 + spr_template 0x2720, 0x2720, gUnknown_08524934, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815A0D4 .align 2 - .2byte 0x2721 @ tileTag - .2byte 0x2721 @ paletteTag - .4byte gUnknown_08524904 - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_80A78AC + spr_template 0x2721, 0x2721, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80A78AC .align 2 gUnknown_085CE068:: @ 85CE068 @@ -112,31 +94,13 @@ gUnknown_085CE078:: @ 85CE078 .align 2 gUnknown_085CE07C:: @ 85CE07C - .2byte 0x27ce @ tileTag - .2byte 0x27ce @ paletteTag - .4byte gUnknown_08524914 - .4byte gUnknown_085CE078 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_80A77C8 + spr_template 0x27ce, 0x27ce, gUnknown_08524914, gUnknown_085CE078, NULL, gDummySpriteAffineAnimTable, sub_80A77C8 .align 2 - .2byte 0x27cf @ tileTag - .2byte 0x27cf @ paletteTag - .4byte gUnknown_08524A3C - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_815A1B0 + spr_template 0x27cf, 0x27cf, gUnknown_08524A3C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815A1B0 .align 2 - .2byte 0x27cd @ tileTag - .2byte 0x27cd @ paletteTag - .4byte gUnknown_08524974 - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_815A254 + spr_template 0x27cd, 0x27cd, gUnknown_08524974, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815A254 .align 2 gUnknown_085CE0C4:: @ 85CE0C4 @@ -158,22 +122,10 @@ gUnknown_085CE0FC:: @ 85CE0FC .align 2 gUnknown_085CE104:: @ 85CE104 - .2byte 0x27cb @ tileTag - .2byte 0x27cb @ paletteTag - .4byte gUnknown_08524AFC - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gUnknown_085CE0FC - .4byte sub_815A2F0 + spr_template 0x27cb, 0x27cb, gUnknown_08524AFC, gDummySpriteAnimTable, NULL, gUnknown_085CE0FC, sub_815A2F0 .align 2 - .2byte 0x27a8 @ tileTag - .2byte 0x27a8 @ paletteTag - .4byte gUnknown_0852490C - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_815A6C4 + spr_template 0x27a8, 0x27a8, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815A6C4 .align 2 gUnknown_085CE134:: @ 85CE134 @@ -187,13 +139,7 @@ gUnknown_085CE14C:: @ 85CE14C .align 2 gUnknown_085CE150:: @ 85CE150 - .2byte 0x272b @ tileTag - .2byte 0x272b @ paletteTag - .4byte gUnknown_08524914 - .4byte gUnknown_085CE14C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_815A7B0 + spr_template 0x272b, 0x272b, gUnknown_08524914, gUnknown_085CE14C, NULL, gDummySpriteAffineAnimTable, sub_815A7B0 .align 2 gUnknown_085CE168:: @ 85CE168 @@ -215,13 +161,7 @@ gUnknown_085CE18C:: @ 85CE18C .align 2 gUnknown_085CE190:: @ 85CE190 - .2byte 0x27f4 @ tileTag - .2byte 0x27f4 @ paletteTag - .4byte gUnknown_08524974 - .4byte gUnknown_085CE170 - .4byte NULL - .4byte gUnknown_085CE18C - .4byte sub_815A7EC + spr_template 0x27f4, 0x27f4, gUnknown_08524974, gUnknown_085CE170, NULL, gUnknown_085CE18C, sub_815A7EC .align 2 gUnknown_085CE1A8:: @ 85CE1A8 @@ -243,13 +183,7 @@ gUnknown_085CE1D8:: @ 85CE1D8 .align 2 gUnknown_085CE1DC:: @ 85CE1DC - .2byte 0x27d0 @ tileTag - .2byte 0x27d0 @ paletteTag - .4byte gUnknown_085249D4 - .4byte gUnknown_085CE1BC - .4byte NULL - .4byte gUnknown_085CE1D8 - .4byte sub_815A8AC + spr_template 0x27d0, 0x27d0, gUnknown_085249D4, gUnknown_085CE1BC, NULL, gUnknown_085CE1D8, sub_815A8AC .align 2 gUnknown_085CE1F4:: @ 85CE1F4 @@ -270,31 +204,13 @@ gUnknown_085CE224:: @ 85CE224 .align 2 gUnknown_085CE22C:: @ 85CE22C - .2byte 0x27f3 @ tileTag - .2byte 0x27f3 @ paletteTag - .4byte gUnknown_085249DC - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gUnknown_085CE224 - .4byte sub_815A934 + spr_template 0x27f3, 0x27f3, gUnknown_085249DC, gDummySpriteAnimTable, NULL, gUnknown_085CE224, sub_815A934 .align 2 - .2byte 0x2807 @ tileTag - .2byte 0x2807 @ paletteTag - .4byte gUnknown_08524914 - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_815AAA4 + spr_template 0x2807, 0x2807, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815AAA4 .align 2 - .2byte 0x2807 @ tileTag - .2byte 0x2807 @ paletteTag - .4byte gUnknown_08524914 - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_815ABD0 + spr_template 0x2807, 0x2807, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_815ABD0 .align 2 gUnknown_085CE274:: @ 85CE274 @@ -307,12 +223,6 @@ gUnknown_085CE284:: @ 85CE284 .align 2 gUnknown_085CE288:: @ 85CE288 - .2byte 0x27f5 @ tileTag - .2byte 0x27f5 @ paletteTag - .4byte gUnknown_08524934 - .4byte gUnknown_085CE284 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_815ACD0 + spr_template 0x27f5, 0x27f5, gUnknown_08524934, gUnknown_085CE284, NULL, gDummySpriteAffineAnimTable, sub_815ACD0 diff --git a/data/battle_scripts_2.s b/data/battle_scripts_2.s index e76bb397b..0fccf507a 100644 --- a/data/battle_scripts_2.s +++ b/data/battle_scripts_2.s @@ -5,16 +5,45 @@ .align 2 gUnknown_082DBD08:: @ 82DBD08 - .incbin "baserom.gba", 0x2dbd08, 0x34 + .4byte gUnknown_082DBD68 + .4byte gUnknown_082DBD68 + .4byte gUnknown_082DBD68 + .4byte gUnknown_082DBD68 + .4byte gUnknown_082DBD68 + .4byte gUnknown_082DBD7E + .4byte gUnknown_082DBD68 + .4byte gUnknown_082DBD68 + .4byte gUnknown_082DBD68 + .4byte gUnknown_082DBD68 + .4byte gUnknown_082DBD68 + .4byte gUnknown_082DBD68 + .4byte gUnknown_082DBD68 + .align 2 gUnknown_082DBD3C:: @ 82DBD3C - .incbin "baserom.gba", 0x2dbd3c, 0x18 + .4byte gUnknown_082DBE12 + .4byte gUnknown_082DBE1C + .4byte gUnknown_082DBE1C + .4byte gUnknown_082DBE4B + .4byte gUnknown_082DBE6F + .4byte gUnknown_082DBE91 + .align 2 gUnknown_082DBD54:: @ 82DBD54 - .incbin "baserom.gba", 0x2dbd54, 0x4 + .4byte gUnknown_082DBEB3 + .align 2 gUnknown_082DBD58:: @ 82DBD58 - .incbin "baserom.gba", 0x2dbd58, 0x2c + .4byte gUnknown_082DBEBD + .4byte gUnknown_082DBEC4 + .4byte gUnknown_082DBECD + .4byte gUnknown_082DBEE3 + +gUnknown_082DBD68:: @ 82DBD68 + .incbin "baserom.gba", 0x2dbd68, 0x16 + +gUnknown_082DBD7E:: @ 82DBD7E + .incbin "baserom.gba", 0x2dbd7e, 0x6 gUnknown_082DBD84:: @ 82DBD84 .incbin "baserom.gba", 0x2dbd84, 0x46 @@ -26,4 +55,34 @@ gUnknown_082DBDD4:: @ 82DBDD4 .incbin "baserom.gba", 0x2dbdd4, 0x2e gUnknown_082DBE02:: @ 82DBE02 - .incbin "baserom.gba", 0x2dbe02, 0xf6 + .incbin "baserom.gba", 0x2dbe02, 0x10 + +gUnknown_082DBE12:: @ 82DBE12 + .incbin "baserom.gba", 0x2dbe12, 0xa + +gUnknown_082DBE1C:: @ 82DBE1C + .incbin "baserom.gba", 0x2dbe1c, 0x2f + +gUnknown_082DBE4B:: @ 82DBE4B + .incbin "baserom.gba", 0x2dbe4b, 0x24 + +gUnknown_082DBE6F:: @ 82DBE6F + .incbin "baserom.gba", 0x2dbe6f, 0x22 + +gUnknown_082DBE91:: @ 82DBE91 + .incbin "baserom.gba", 0x2dbe91, 0x22 + +gUnknown_082DBEB3:: @ 82DBEB3 + .incbin "baserom.gba", 0x2dbeb3, 0xA + +gUnknown_082DBEBD:: @ 82DBEBD + .incbin "baserom.gba", 0x2dbebd, 0x7 + +gUnknown_082DBEC4:: @ 82DBEC4 + .incbin "baserom.gba", 0x2dbec4, 0x9 + +gUnknown_082DBECD:: @ 82DBECD + .incbin "baserom.gba", 0x2dbecd, 0x16 + +gUnknown_082DBEE3:: @ 82DBEE3 + .incbin "baserom.gba", 0x2dbee3, 0x15 diff --git a/data/berry_fix.mb b/data/berry_fix.mb new file mode 100644 index 0000000000000000000000000000000000000000..0afff07f5d2314e2bd35d99de518cbc114009b5e GIT binary patch literal 15348 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 literal 0 HcmV?d00001 diff --git a/data/berry_tag_screen.s b/data/berry_tag_screen.s index 89197d744..197f3c7d8 100644 --- a/data/berry_tag_screen.s +++ b/data/berry_tag_screen.s @@ -5,17 +5,27 @@ .align 2 gUnknown_085EFCF0:: @ 85EFCF0 - .incbin "baserom.gba", 0x5efcf0, 0x10 + .4byte 0x000001f0, 0x000011e1, 0x000021d2, 0x000031c3 + .align 2 gUnknown_085EFD00:: @ 85EFD00 - .incbin "baserom.gba", 0x5efd00, 0x20 + .incbin "graphics/interface/berry_tag_screen.gbapal" -gUnknown_085EFD20:: @ 85EFD20 - .incbin "baserom.gba", 0x5efd20, 0x8 + .align 2 +gUnknown_085EFD20:: @ 85EFD20 struct TextColor + .byte 0x00, 0x02, 0x03 + .byte 0x0F, 0x0E, 0x0D + + .align 2 gUnknown_085EFD28:: @ 85EFD28 - .incbin "baserom.gba", 0x5efd28, 0x28 + window_template 0x01, 0x0b, 0x04, 0x08, 0x02, 0x0f, 0x0045 + window_template 0x01, 0x0b, 0x07, 0x12, 0x04, 0x0f, 0x0055 + window_template 0x01, 0x04, 0x0e, 0x19, 0x04, 0x0f, 0x009d + window_template 0x00, 0x02, 0x00, 0x08, 0x02, 0x0f, 0x0101 + window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + .align 2 gBerryFirmnessStringPointers:: @ 85EFD50 .4byte gBerryFirmnessString_VerySoft .4byte gBerryFirmnessString_Soft diff --git a/data/braille_puzzles.s b/data/braille_puzzles.s index 36ebefb4f..55dcb3a26 100644 --- a/data/braille_puzzles.s +++ b/data/braille_puzzles.s @@ -3,5 +3,14 @@ .section .rodata + .align 2 gUnknown_085EFE74:: @ 85EFE74 - .incbin "baserom.gba", 0x5efe74, 0x48 + .byte 0x04, 0x15, 0x05, 0x15, 0x06, 0x15, 0x07, 0x15 + .byte 0x08, 0x15, 0x09, 0x15, 0x0a, 0x15, 0x0b, 0x15 + .byte 0x0c, 0x15, 0x0c, 0x16, 0x0c, 0x17, 0x0d, 0x17 + .byte 0x0d, 0x18, 0x0d, 0x19, 0x0d, 0x1a, 0x0d, 0x1b + .byte 0x0c, 0x1b, 0x0c, 0x1c, 0x04, 0x1d, 0x05, 0x1d + .byte 0x06, 0x1d, 0x07, 0x1d, 0x08, 0x1d, 0x09, 0x1d + .byte 0x0a, 0x1d, 0x0b, 0x1d, 0x0c, 0x1d, 0x04, 0x1c + .byte 0x04, 0x1b, 0x03, 0x1b, 0x03, 0x1a, 0x03, 0x19 + .byte 0x03, 0x18, 0x03, 0x17, 0x04, 0x17, 0x04, 0x16 diff --git a/data/cable_car.s b/data/cable_car.s index 5fe7568c0..23b81cba7 100644 --- a/data/cable_car.s +++ b/data/cable_car.s @@ -3,47 +3,103 @@ .section .rodata + .align 2 gUnknown_085CD66C:: @ 85CD66C - .incbin "baserom.gba", 0x5cd66c, 0x10 + .4byte 0x000011c0, 0x000021d1, 0x000031e2, 0x000001f3 -gUnknown_085CD67C:: @ 85CD67C - .incbin "baserom.gba", 0x5cd67c, 0x158 + .align 2 +gCableCarMtChimneyTilemap:: @ 85CD67C + .incbin "graphics/misc/cable_car_mt_chimney_map.bin.lz" -gUnknown_085CD7D4:: @ 85CD7D4 - .incbin "baserom.gba", 0x5cd7d4, 0x184 + .align 2 +gCableCarTreeTilemap:: @ 85CD7D4 + .incbin "graphics/misc/cable_car_tree_map.bin.lz" -gUnknown_085CD958:: @ 85CD958 - .incbin "baserom.gba", 0x5cd958, 0x1c4 + .align 2 +gCableCarMountainTilemap:: @ 85CD958 + .incbin "graphics/misc/cable_car_mountain_map.bin.lz" -gUnknown_085CDB1C:: @ 85CDB1C - .incbin "baserom.gba", 0x5cdb1c, 0x14 + .align 2 +gCableCarPylonHookTilemapEntries:: @ 85CDB1C + .2byte 0x3000 + .2byte 0x3001 + .2byte 0x3002 + .2byte 0x3003 + .2byte 0x3004 + .2byte 0x3005 + .2byte 0x3006 + .2byte 0x3007 + .2byte 0x3008 + .2byte 0x3009 -gUnknown_085CDB30:: @ 85CDB30 - .incbin "baserom.gba", 0x5cdb30, 0x24 + .align 2 +gCableCarPylonStemTilemap:: @ 85CDB30 + .incbin "graphics/misc/cable_car_pylon_stem_map.bin.lz" + .align 2 gUnknown_085CDB54:: @ 85CDB54 - .incbin "baserom.gba", 0x5cdb54, 0x20 + obj_tiles gCableCar_Gfx, 0x800, 1 + obj_tiles gCableCarDoor_Gfx, 0x40, 2 + obj_tiles gCableCarCord_Gfx, 0x80, 3 + null_obj_tiles + .align 2 gUnknown_085CDB74:: @ 85CDB74 - .incbin "baserom.gba", 0x5cdb74, 0x28 + obj_pal gCableCar_Pal, 1 + null_obj_pal -gUnknown_085CDB9C:: @ 85CDB9C - .incbin "baserom.gba", 0x5cdb9c, 0x30 + .align 2 +gOamData_85CDB84:: @ 85CDB84 + .2byte 0x0300 + .2byte 0xC000 + .2byte 0x0800 -gUnknown_085CDBCC:: @ 85CDBCC - .incbin "baserom.gba", 0x5cdbcc, 0x18 + .align 2 +gOamData_85CDB8C:: @ 85CDB8C + .2byte 0x4300 + .2byte 0x0000 + .2byte 0x0800 -gUnknown_085CDBE4:: @ 85CDBE4 - .incbin "baserom.gba", 0x5cdbe4, 0x2 + .align 2 +gOamData_85CDB94:: @ 85CDB94 + .2byte 0x0300 + .2byte 0x4000 + .2byte 0x0800 -gUnknown_085CDBE6:: @ 85CDBE6 - .incbin "baserom.gba", 0x5cdbe6, 0x4 + .align 2 +gSpriteTemplate_85CDB9C:: @ 85CDB9C + spr_template 1, 1, gOamData_85CDB84, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8150868 -gUnknown_085CDBEA:: @ 85CDBEA - .incbin "baserom.gba", 0x5cdbea, 0x8 + .align 2 +gSpriteTemplate_85CDBB4:: @ 85CDBB4 + spr_template 2, 1, gOamData_85CDB8C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8150868 -gUnknown_085CDBF2:: @ 85CDBF2 - .incbin "baserom.gba", 0x5cdbf2, 0x6 + .align 2 +gSpriteTemplate_85CDBCC:: @ 85CDBCC + spr_template 3, 1, gOamData_85CDB94, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, nullsub_58 +gCableCarPlayerGraphicsIDs:: @ 85CDBE4 + .byte MAP_OBJ_GFX_RIVAL_BRENDAN_NORMAL + .byte MAP_OBJ_GFX_RIVAL_MAY_NORMAL + +gMtChimneyHikerGraphicsIDs:: @ 85CDBE6 + .byte MAP_OBJ_GFX_HIKER + .byte MAP_OBJ_GFX_CAMPER + .byte MAP_OBJ_GFX_PICNICKER + .byte MAP_OBJ_GFX_ZIGZAGOON @ not used + + .align 1 +gMtChimneyHikerCoords:: @ 85CDBEA + .2byte 0, 80 + .2byte 240, 146 + +gMtChimneyHikerMovementDelayTable:: @ 85CDBF2 + .byte 0 + .byte 60 + .byte 120 + .byte 170 + + .align 2 gUnknown_085CDBF8:: @ 85CDBF8 - .incbin "baserom.gba", 0x5cdbf8, 0x8 + .4byte sub_8150A68 + .4byte sub_8150AF4 diff --git a/data/clear_save_data_screen.s b/data/clear_save_data_screen.s index a566152be..8e30a6303 100644 --- a/data/clear_save_data_screen.s +++ b/data/clear_save_data_screen.s @@ -3,11 +3,15 @@ .section .rodata + .align 2 gUnknown_085F06C0:: @ 85F06C0 - .incbin "baserom.gba", 0x5f06c0, 0x8 + .4byte 0x000001f0, 0x000011e3 + .align 2 gUnknown_085F06C8:: @ 85F06C8 - .incbin "baserom.gba", 0x5f06c8, 0x10 + window_template 0x00, 0x03, 0x0f, 0x1a, 0x04, 0x0f, 0x000b + window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + .align 2 gUnknown_085F06D8:: @ 85F06D8 - .incbin "baserom.gba", 0x5f06d8, 0x8 + window_template 0x00, 0x03, 0x02, 0x05, 0x04, 0x0f, 0x0073 diff --git a/data/contest_ai.s b/data/contest_ai.s index 724fbfbfc..c7cb848a7 100644 --- a/data/contest_ai.s +++ b/data/contest_ai.s @@ -3,5 +3,142 @@ .section .rodata + .align 2 gUnknown_085CDD00:: @ 85CDD00 - .incbin "baserom.gba", 0x5cdd00, 0x220 + .4byte sub_81564DC + .4byte sub_8156530 + .4byte sub_8156550 + .4byte sub_8156594 + .4byte sub_81565D8 + .4byte sub_815661C + .4byte sub_8156660 + .4byte sub_8156684 + .4byte sub_81566C8 + .4byte sub_815670C + .4byte sub_8156750 + .4byte sub_8156794 + .4byte sub_81567BC + .4byte sub_8156800 + .4byte sub_8156844 + .4byte sub_8156888 + .4byte sub_81568CC + .4byte sub_815690C + .4byte sub_8156950 + .4byte sub_8156994 + .4byte sub_81569D8 + .4byte sub_8156A1C + .4byte sub_8156A48 + .4byte sub_8156A98 + .4byte sub_8156AE8 + .4byte sub_8156B38 + .4byte sub_8156B88 + .4byte sub_8156BB4 + .4byte sub_8156C04 + .4byte sub_8156C54 + .4byte sub_8156CA4 + .4byte sub_8156CF4 + .4byte sub_8156D18 + .4byte sub_8156D5C + .4byte sub_8156DA0 + .4byte sub_8156DE4 + .4byte sub_8156E2C + .4byte sub_8156E74 + .4byte sub_8156EBC + .4byte sub_8156F04 + .4byte sub_8156F44 + .4byte sub_8156F88 + .4byte sub_8156FCC + .4byte sub_8157018 + .4byte sub_815705C + .4byte sub_81570A0 + .4byte sub_815712C + .4byte sub_8157174 + .4byte sub_8157200 + .4byte sub_8157248 + .4byte sub_81572A4 + .4byte sub_81572E8 + .4byte sub_815732C + .4byte sub_8157370 + .4byte sub_81573B4 + .4byte sub_8157410 + .4byte sub_8157454 + .4byte sub_8157498 + .4byte sub_81574DC + .4byte sub_8157520 + .4byte sub_8157578 + .4byte sub_81575BC + .4byte sub_8157600 + .4byte sub_8157644 + .4byte sub_8157688 + .4byte sub_8157700 + .4byte sub_8157748 + .4byte sub_8157790 + .4byte sub_8157808 + .4byte sub_8157850 + .4byte sub_8157898 + .4byte sub_81578F8 + .4byte sub_8157940 + .4byte sub_8157988 + .4byte sub_81579CC + .4byte sub_8157A10 + .4byte sub_8157A54 + .4byte sub_8157A98 + .4byte sub_8157ADC + .4byte sub_8157B38 + .4byte sub_8157B7C + .4byte sub_8157BC0 + .4byte sub_8157C04 + .4byte sub_8157C48 + .4byte sub_8157C94 + .4byte sub_8157CDC + .4byte sub_8157D24 + .4byte sub_8157D60 + .4byte sub_8157DA8 + .4byte sub_8157DF0 + .4byte sub_8157E3C + .4byte sub_8157E84 + .4byte sub_8157ECC + .4byte sub_8157F14 + .4byte sub_8157F5C + .4byte sub_8157FA0 + .4byte sub_8157FE8 + .4byte sub_8158030 + .4byte sub_8158078 + .4byte sub_81580C0 + .4byte sub_8158108 + .4byte sub_815814C + .4byte sub_8158190 + .4byte sub_81581D4 + .4byte sub_8158218 + .4byte sub_8158254 + .4byte sub_8158298 + .4byte sub_81582DC + .4byte sub_8158320 + .4byte sub_8158364 + .4byte sub_81583B8 + .4byte sub_81583FC + .4byte sub_8158440 + .4byte sub_815846C + .4byte sub_815849C + .4byte sub_81584D4 + .4byte sub_8158508 + .4byte sub_815853C + .4byte sub_815858C + .4byte sub_81585DC + .4byte sub_815862C + .4byte sub_815867C + .4byte sub_81586D0 + .4byte sub_8158724 + .4byte sub_8158778 + .4byte sub_81587CC + .4byte sub_815881C + .4byte sub_815886C + .4byte dp15_call + .4byte sub_81588BC + .4byte sub_8158948 + .4byte sub_81589A4 + .4byte sub_81589EC + .4byte sub_8158A34 + .4byte sub_8158AA0 + .4byte sub_8158AE8 + diff --git a/data/credits.s b/data/credits.s index 63565a24f..5e1e83c8b 100644 --- a/data/credits.s +++ b/data/credits.s @@ -3,50 +3,1575 @@ .section .rodata + .align 2 gUnknown_085E56F0:: @ 85E56F0 - .incbin "baserom.gba", 0x5e56f0, 0x80 + .incbin "graphics/credits/credits_1.gbapal" + .incbin "graphics/credits/credits_2.gbapal" + .incbin "graphics/credits/credits_3.gbapal" + .incbin "graphics/credits/credits_4.gbapal" + .align 2 gUnknown_085E5770:: @ 85E5770 - .incbin "baserom.gba", 0x5e5770, 0x43c + .incbin "graphics/credits/the_end_copyright.4bpp.lz" gUnknown_085E5BAC:: @ 85E5BAC - .incbin "baserom.gba", 0x5e5bac, 0xf + .byte 0x00, 0x01, 0x00, 0xff, 0x01, 0xff, 0xff, 0x01, 0xff, 0xff, 0x01, 0xff, 0xff, 0x01, 0xff gUnknown_085E5BBB:: @ 85E5BBB - .incbin "baserom.gba", 0x5e5bbb, 0xf + .byte 0x01, 0xff, 0x01, 0x01, 0xff, 0x01, 0x01, 0x02, 0x01, 0x01, 0xff, 0x01, 0x01, 0xff, 0x01 gUnknown_085E5BCA:: @ 85E5BCA - .incbin "baserom.gba", 0x5e5bca, 0xf + .byte 0x01, 0x00, 0x00, 0x01, 0xff, 0xff, 0x01, 0x02, 0x02, 0x01, 0xff, 0xff, 0x01, 0x80, 0x80 gUnknown_085E5BD9:: @ 85E5BD9 - .incbin "baserom.gba", 0x5e5bd9, 0xf + .byte 0x01, 0x03, 0x01, 0x01, 0x04, 0x01, 0x01, 0x05, 0x01, 0x01, 0xc4, 0x01, 0x01, 0xc3, 0x01 gUnknown_085E5BE8:: @ 85E5BE8 - .incbin "baserom.gba", 0x5e5be8, 0xf0c + .byte 0x01, 0x06, 0x07, 0x01, 0x08, 0x09, 0x01, 0xff, 0x01, 0x01, 0x88, 0x89, 0x01, 0x86, 0x87 +gCreditsText_EmptyString:: @ 85E5BF7 + .string "$" + +gCreditsText_PkmnEmeraldVersion:: @ 85E5BF8 + .string "POKéMON EMERALD VERSION$" + +gCreditsText_Credits:: @ 85E5C10 + .string "Credits$" + +gCreditsText_ExecutiveDirector:: @ 85E5C18 + .string "Executive Director$" + +gCreditsText_Director:: @ 85E5C2B + .string "Director$" + +gCreditsText_ArtDirector:: @ 85E5C34 + .string "Art Director$" + +gCreditsText_BattleDirector:: @ 85E5C41 + .string "Battle Director$" + +gCreditsText_MainProgrammer:: @ 85E5C51 + .string "Main Programmer$" + +gCreditsText_BattleSystemPgrms:: @ 85E5C61 + .string "Battle System Programmers$" + +gCreditsText_FieldSystemPgrms:: @ 85E5C7B + .string "Field System Programmer$" + +gCreditsText_Programmers:: @ 85E5C93 + .string "Programmers$" + +gCreditsText_MainGraphicDesigner:: @ 85E5C9F + .string "Main Graphic Designer$" + +gCreditsText_GraphicDesigners:: @ 85E5CB5 + .string "Graphic Designers$" + +gCreditsText_PkmnDesigners:: @ 85E5CC7 + .string "POKéMON Designers$" + +gCreditsText_MusicComposition:: @ 85E5CD9 + .string "Music Composition$" + +gCreditsText_SoundEffectsAndPkmnVoices:: @ 85E5CEB + .string "Sound Effects & POKéMON Voices$" + +gCreditsText_GameDesigners:: @ 85E5D0A + .string "Game Designers$" + +gCreditsText_ScenarioPlot:: @ 85E5D19 + .string "Scenario Plot$" + +gCreditsText_Scenario:: @ 85E5D27 + .string "Scenario$" + +gCreditsText_ScriptDesigners:: @ 85E5D30 + .string "Script Designers$" + +gCreditsText_MapDesigners:: @ 85E5D41 + .string "Map Designers$" + +gCreditsText_MapDataDesigners:: @ 85E5D4F + .string "Map Data Designers$" + +gCreditsText_ParametricDesigners:: @ 85E5D62 + .string "Parametric Designers$" + +gCreditsText_PokedexText:: @ 85E5D77 + .string "POKéDEX Text$" + +gCreditsText_EnvAndToolPgrms:: @ 85E5D84 + .string "Environment & Tool Programmers$" + +gCreditsText_NCLProductTesting:: @ 85E5DA3 + .string "NCL Product Testing$" + +gCreditsText_SpecialThanks:: @ 85E5DB7 + .string "Special Thanks$" + +gCreditsText_Coordinators:: @ 85E5DC6 + .string "Coordinators$" + +gCreditsText_Producers:: @ 85E5DD3 + .string "Producers$" + +gCreditsText_ExecProducers:: @ 85E5DDD + .string "Executive Producers$" + +gCreditsText_InfoSupervisors:: @ 85E5DF1 + .string "Information Supervisors$" + +gCreditsText_TaskManagers:: @ 85E5E09 + .string "Task Managers$" + +gCreditsText_BrailleCodeCheck:: @ 85E5E17 + .string "Braille Code Check$" + +gCreditsText_WorldDirector:: @ 85E5E2A + .string "World Director$" + +gCreditsText_BattleFrontierData:: @ 85E5E39 + .string "Battle Frontier Data$" + +gCreditsText_SupportProgrammers:: @ 85E5E4E + .string "Support Programmers$" + +gCreditsText_Artwork:: @ 85E5E62 + .string "Artwork$" + +gCreditsText_LeadProgrammer:: @ 85E5E6A + .string "Lead Programmer$" + +gCreditsText_LeadGraphicArtist:: @ 85E5E7A + .string "Lead Graphic Artist$" + +gCreditsText_SatoshiTajiri:: @ 85E5E8E + .string "Satoshi Tajiri$" + +gCreditsText_JunichiMasuda:: @ 85E5E9D + .string "Junichi Masuda$" + +gCreditsText_KenSugimori:: @ 85E5EAC + .string "Ken Sugimori$" + +gCreditsText_ShigekiMorimoto:: @ 85E5EB9 + .string "Shigeki Morimoto$" + +gCreditsText_TetsuyaWatanabe:: @ 85E5ECA + .string "Tetsuya Watanabe$" + +gCreditsText_HisashiSogabe:: @ 85E5EDB + .string "Hisashi Sogabe$" + +gCreditsText_SosukeTamada:: @ 85E5EEA + .string "Sosuke Tamada$" + +gCreditsText_AkitoMori:: @ 85E5EF8 + .string "Akito Mori$" + +gCreditsText_KeitaKagaya:: @ 85E5F03 + .string "Keita Kagaya$" + +gCreditsText_YoshinoriMatsuda:: @ 85E5F10 + .string "Yoshinori Matsuda$" + +gCreditsText_HiroyukiNakamura:: @ 85E5F22 + .string "Hiroyuki Nakamura$" + +gCreditsText_MasaoTaya:: @ 85E5F34 + .string "Masao Taya$" + +gCreditsText_SatoshiNohara:: @ 85E5F3F + .string "Satoshi Nohara$" + +gCreditsText_TomomichiOhta:: @ 85E5F4E + .string "Tomomichi Ohta$" + +gCreditsText_MiyukiIwasawa:: @ 85E5F5D + .string "Miyuki Iwasawa$" + +gCreditsText_TakenoriOhta:: @ 85E5F6C + .string "Takenori Ohta$" + +gCreditsText_HironobuYoshida:: @ 85E5F7A + .string "Hironobu Yoshida$" + +gCreditsText_MotofumiFujiwara:: @ 85E5F8B + .string "Motofumi Fujiwara$" + +gCreditsText_SatoshiOhta:: @ 85E5F9D + .string "Satoshi Ohta$" + +gCreditsText_AsukaIwashita:: @ 85E5FAA + .string "Asuka Iwashita$" + +gCreditsText_AimiTomita:: @ 85E5FB9 + .string "Aimi Tomita$" + +gCreditsText_TakaoUnno:: @ 85E5FC5 + .string "Takao Unno$" + +gCreditsText_KanakoEo:: @ 85E5FD0 + .string "Kanako Eo$" + +gCreditsText_JunOkutani:: @ 85E5FDA + .string "Jun Okutani$" + +gCreditsText_AtsukoNishida:: @ 85E5FE6 + .string "Atsuko Nishida$" + +gCreditsText_MuneoSaito:: @ 85E5FF5 + .string "Muneo Saito$" + +gCreditsText_RenaYoshikawa:: @ 85E6001 + .string "Rena Yoshikawa$" + +gCreditsText_GoIchinose:: @ 85E6010 + .string "Go Ichinose$" + +gCreditsText_MorikazuAoki:: @ 85E601C + .string "Morikazu Aoki$" + +gCreditsText_KojiNishino:: @ 85E602A + .string "Koji Nishino$" + +gCreditsText_KenjiMatsushima:: @ 85E6037 + .string "Kenji Matsushima$" + +gCreditsText_TetsujiOhta:: @ 85E6048 + .string "Tetsuji Ohta$" + +gCreditsText_HitomiSato:: @ 85E6055 + .string "Hitomi Sato$" + +gCreditsText_TakeshiKawachimaru:: @ 85E6061 + .string "Takeshi Kawachimaru$" + +gCreditsText_TeruyukiShimoyamada:: @ 85E6075 + .string "Teruyuki Shimoyamada$" + +gCreditsText_ShigeruOhmori:: @ 85E608A + .string "Shigeru Ohmori$" + +gCreditsText_TadashiTakahashi:: @ 85E6099 + .string "Tadashi Takahashi$" + +gCreditsText_ToshinobuMatsumiya:: @ 85E60AB + .string "Toshinobu Matsumiya$" + +gCreditsText_AkihitoTomisawa:: @ 85E60BF + .string "Akihito Tomisawa$" + +gCreditsText_HirokiEnomoto:: @ 85E60D0 + .string "Hiroki Enomoto$" + +gCreditsText_KazuyukiTerada:: @ 85E60DF + .string "Kazuyuki Terada$" + +gCreditsText_YuriSakurai:: @ 85E60EF + .string "Yuri Sakurai$" + +gCreditsText_HiromiSagawa:: @ 85E60FC + .string "Hiromi Sagawa$" + +gCreditsText_KenjiTominaga:: @ 85E610A + .string "Kenji Tominaga$" + +gCreditsText_YoshioTajiri:: @ 85E6119 + .string "Yoshio Tajiri$" + +gCreditsText_TeikoSasaki:: @ 85E6127 + .string "Teiko Sasaki$" + +gCreditsText_SachikoHamano:: @ 85E6134 + .string "Sachiko Hamano$" + +gCreditsText_ChieMatsumiya:: @ 85E6143 + .string "Chie Matsumiya$" + +gCreditsText_AkikoShinozaki:: @ 85E6152 + .string "Akiko Shinozaki$" + +gCreditsText_AstukoFujii:: @ 85E6162 + .string "Astuko Fujii$" + +gCreditsText_NozomuSaito:: @ 85E616F + .string "Nozomu Saito$" + +gCreditsText_KenkichiToyama:: @ 85E617C + .string "Kenkichi Toyama$" + +gCreditsText_SuguruNakatsui:: @ 85E618C + .string "Suguru Nakatsui$" + +gCreditsText_YumiFunasaka:: @ 85E619C + .string "Yumi Funasaka$" + +gCreditsText_NaokoYanase:: @ 85E61AA + .string "Naoko Yanase$" + +gCreditsText_NCLSuperMarioClub:: @ 85E61B7 + .string "NCL Super Mario Club$" + +gCreditsText_AtsushiTada:: @ 85E61CC + .string "Atsushi Tada$" + +gCreditsText_TakahiroOhnishi:: @ 85E61D9 + .string "Takahiro Ohnishi$" + +gCreditsText_NorihideOkamura:: @ 85E61EA + .string "Norihide Okamura$" + +gCreditsText_HiroNakamura:: @ 85E61FB + .string "Hiro Nakamura$" + +gCreditsText_HiroyukiUesugi:: @ 85E6209 + .string "Hiroyuki Uesugi$" + +gCreditsText_TerukiMurakawa:: @ 85E6219 + .string "Teruki Murakawa$" + +gCreditsText_AkiraKinashi:: @ 85E6229 + .string "Akira Kinashi$" + +gCreditsText_MichikoTakizawa:: @ 85E6237 + .string "Michiko Takizawa$" + +gCreditsText_MakikoTakada:: @ 85E6248 + .string "Makiko Takada$" + +gCreditsText_TakanaoKondo:: @ 85E6256 + .string "Takanao Kondo$" + +gCreditsText_AiMashima:: @ 85E6264 + .string "Ai Mashima$" + +gCreditsText_GakujiNomoto:: @ 85E626F + .string "Gakuji Nomoto$" + +gCreditsText_TakehiroIzushi:: @ 85E627D + .string "Takehiro Izushi$" + +gCreditsText_HitoshiYamagami:: @ 85E628D + .string "Hitoshi Yamagami$" + +gCreditsText_KyokoWatanabe:: @ 85E629E + .string "Kyoko Watanabe$" + +gCreditsText_TakaoNakano:: @ 85E62AD + .string "Takao Nakano$" + +gCreditsText_HiroyukiJinnai:: @ 85E62BA + .string "Hiroyuki Jinnai$" + +gCreditsText_HiroakiTsuru:: @ 85E62CA + .string "Hiroaki Tsuru$" + +gCreditsText_TsunekazIshihara:: @ 85E62D8 + .string "Tsunekaz Ishihara$" + +gCreditsText_SatoruIwata:: @ 85E62EA + .string "Satoru Iwata$" + +gCreditsText_KazuyaSuyama:: @ 85E62F7 + .string "Kazuya Suyama$" + +gCreditsText_SatoshiMitsuhara:: @ 85E6305 + .string "Satoshi Mitsuhara$" + +gCreditsText_JapanBrailleLibrary:: @ 85E6317 + .string "Japan Braille Library$" + +gCreditsText_TomotakaKomura:: @ 85E632D + .string "Tomotaka Komura$" + +gCreditsText_MikikoOhhashi:: @ 85E633D + .string "Mikiko Ohhashi$" + +gCreditsText_DaisukeHoshino:: @ 85E634C + .string "Daisuke Hoshino$" + +gCreditsText_KenjiroIto:: @ 85E635C + .string "Kenjiro Ito$" + +gCreditsText_RuiKawaguchi:: @ 85E6368 + .string "Rui Kawaguchi$" + +gCreditsText_ShunsukeKohori:: @ 85E6376 + .string "Shunsuke Kohori$" + +gCreditsText_SachikoNakamichi:: @ 85E6386 + .string "Sachiko Nakamichi$" + +gCreditsText_FujikoNomura:: @ 85E6398 + .string "Fujiko Nomura$" + +gCreditsText_KazukiYoshihara:: @ 85E63A6 + .string "Kazuki Yoshihara$" + +gCreditsText_RetsujiNomoto:: @ 85E63B7 + .string "Retsuji Nomoto$" + +gCreditsText_AzusaTajima:: @ 85E63C6 + .string "Azusa Tajima$" + +gCreditsText_ShusakuEgami:: @ 85E63D3 + .string "Shusaku Egami$" + +gCreditsText_PackageAndManual:: @ 85E63E1 + .string "Package & Manual Illustration$" + +gCreditsText_EnglishVersion:: @ 85E63FF + .string "English Version Coordinators$" + +gCreditsText_Translator:: @ 85E641C + .string "Translator$" + +gCreditsText_TextEditor:: @ 85E6427 + .string "Text Editor$" + +gCreditsText_NCLCoordinator:: @ 85E6433 + .string "NCL Coordinator$" + +gCreditsText_GraphicDesigner:: @ 85E6443 + .string "Graphic Designer$" + +gCreditsText_NOAProductTesting:: @ 85E6454 + .string "NOA Product Testing$" + +gCreditsText_HideyukiNakajima:: @ 85E6468 + .string "Hideyuki Nakajima$" + +gCreditsText_HidenoriSaeki:: @ 85E647A + .string "Hidenori Saeki$" + +gCreditsText_YokoWatanabe:: @ 85E6489 + .string "Yoko Watanabe$" + +gCreditsText_SakaeKimura:: @ 85E6497 + .string "Sakae Kimura$" + +gCreditsText_ChiakiShinkai:: @ 85E64A4 + .string "Chiaki Shinkai$" + +gCreditsText_SethMcMahill:: @ 85E64B3 + .string "Seth McMahill$" + +gCreditsText_NobOgasawara:: @ 85E64C1 + .string "Nob Ogasawara$" + +gCreditsText_TeresaLillygren:: @ 85E64CF + .string "Teresa Lillygren$" + +gCreditsText_KimikoNakamichi:: @ 85E64E0 + .string "Kimiko Nakamichi$" + +gCreditsText_SouichiYamamoto:: @ 85E64F1 + .string "Souichi Yamamoto$" + +gCreditsText_YuichiroIto:: @ 85E6502 + .string "Yuichiro Ito$" + +gCreditsText_ThomasHertzog:: @ 85E650F + .string "Thomas Hertzog$" + +gCreditsText_MikaKurosawa:: @ 85E651E + .string "Mika Kurosawa$" + +gCreditsText_NationalFederationBlind:: @ 85E652C + .string "National Federation of the Blind$" + +gCreditsText_PatriciaAMaurer:: @ 85E654D + .string "Patricia A. Maurer$" + +gCreditsText_EuropeanBlindUnion:: @ 85E6560 + .string "European Blind Union$" + +gCreditsText_AustralianBrailleAuthority:: @ 85E6575 + .string "Australian Braille Authority$" + +gCreditsText_RoyalNewZealandFederationBlind:: @ 85E6592 + .string "Royal New Zealand Federation for the Blind$" + +gCreditsText_MotoyasuTojima:: @ 85E65BD + .string "Motoyasu Tojima$" + +gCreditsText_NicolaPrattBarlow:: @ 85E65CD + .string "Nicola Pratt-Barlow$" + +gCreditsText_ShellieDow:: @ 85E65E1 + .string "Shellie Dow$" + +gCreditsText_ErikJohnson:: @ 85E65ED + .string "Erik Johnson$" + + .align 2 +gCreditsEntry_EmptyString:: @ 85E65FC + .4byte 0x00000000, gCreditsText_EmptyString + + .align 2 +gCreditsEntry_PkmnEmeraldVersion:: @ 85E6604 + .4byte 0x00000107, gCreditsText_PkmnEmeraldVersion + + .align 2 +gCreditsEntry_Credits:: @ 85E660C + .4byte 0x0000010b, gCreditsText_Credits + + .align 2 +gCreditsEntry_ExecutiveDirector:: @ 85E6614 + .4byte 0x00000108, gCreditsText_ExecutiveDirector + + .align 2 +gCreditsEntry_Director:: @ 85E661C + .4byte 0x0000010c, gCreditsText_Director + + .align 2 +gCreditsEntry_ArtDirector:: @ 85E6624 + .4byte 0x0000010a, gCreditsText_ArtDirector + + .align 2 +gCreditsEntry_BattleDirector:: @ 85E662C + .4byte 0x0000010a, gCreditsText_BattleDirector + + .align 2 +gCreditsEntry_MainProgrammer:: @ 85E6634 + .4byte 0x0000010a, gCreditsText_MainProgrammer + + .align 2 +gCreditsEntry_BattleSystemPgrms:: @ 85E663C + .4byte 0x00000108, gCreditsText_BattleSystemPgrms + + .align 2 +gCreditsEntry_FieldSystemPgrms:: @ 85E6644 + .4byte 0x00000107, gCreditsText_FieldSystemPgrms + + .align 2 +gCreditsEntry_Programmers:: @ 85E664C + .4byte 0x0000010c, gCreditsText_Programmers + + .align 2 +gCreditsEntry_MainGraphicDesigner:: @ 85E6654 + .4byte 0x00000107, gCreditsText_MainGraphicDesigner + + .align 2 +gCreditsEntry_GraphicDesigners:: @ 85E665C + .4byte 0x00000109, gCreditsText_GraphicDesigners + + .align 2 +gCreditsEntry_PkmnDesigners:: @ 85E6664 + .4byte 0x0000010a, gCreditsText_PkmnDesigners + + .align 2 +gCreditsEntry_MusicComposition:: @ 85E666C + .4byte 0x0000010d, gCreditsText_MusicComposition + + .align 2 +gCreditsEntry_SoundEffectsAndPkmnVoices:: @ 85E6674 + .4byte 0x00000104, gCreditsText_SoundEffectsAndPkmnVoices + + .align 2 +gCreditsEntry_GameDesigners:: @ 85E667C + .4byte 0x0000010b, gCreditsText_GameDesigners + + .align 2 +gCreditsEntry_ScenarioPlot:: @ 85E6684 + .4byte 0x0000010b, gCreditsText_ScenarioPlot + + .align 2 +gCreditsEntry_Scenario:: @ 85E668C + .4byte 0x0000010d, gCreditsText_Scenario + + .align 2 +gCreditsEntry_ScriptDesigners:: @ 85E6694 + .4byte 0x0000010a, gCreditsText_ScriptDesigners + + .align 2 +gCreditsEntry_MapDesigners:: @ 85E669C + .4byte 0x0000010b, gCreditsText_MapDesigners + + .align 2 +gCreditsEntry_MapDataDesigners:: @ 85E66A4 + .4byte 0x00000109, gCreditsText_MapDataDesigners + + .align 2 +gCreditsEntry_ParametricDesigners:: @ 85E66AC + .4byte 0x00000109, gCreditsText_ParametricDesigners + + .align 2 +gCreditsEntry_PokedexText:: @ 85E66B4 + .4byte 0x0000010b, gCreditsText_PokedexText + + .align 2 +gCreditsEntry_EnvAndToolPgrms:: @ 85E66BC + .4byte 0x00000106, gCreditsText_EnvAndToolPgrms + + .align 2 +gCreditsEntry_NCLProductTesting:: @ 85E66C4 + .4byte 0x0000010b, gCreditsText_NCLProductTesting + + .align 2 +gCreditsEntry_SpecialThanks:: @ 85E66CC + .4byte 0x0000010a, gCreditsText_SpecialThanks + + .align 2 +gCreditsEntry_Coordinators:: @ 85E66D4 + .4byte 0x0000010b, gCreditsText_Coordinators + + .align 2 +gCreditsEntry_Producers:: @ 85E66DC + .4byte 0x0000010b, gCreditsText_Producers + + .align 2 +gCreditsEntry_ExecProducers:: @ 85E66E4 + .4byte 0x00000107, gCreditsText_ExecProducers + + .align 2 +gCreditsEntry_InfoSupervisors:: @ 85E66EC + .4byte 0x0000010a, gCreditsText_InfoSupervisors + + .align 2 +gCreditsEntry_TaskManagers:: @ 85E66F4 + .4byte 0x00000108, gCreditsText_TaskManagers + + .align 2 +gCreditsEntry_BrailleCodeCheck:: @ 85E66FC + .4byte 0x0000010a, gCreditsText_BrailleCodeCheck + + .align 2 +gCreditsEntry_WorldDirector:: @ 85E6704 + .4byte 0x0000010a, gCreditsText_WorldDirector + + .align 2 +gCreditsEntry_BattleFrontierData:: @ 85E670C + .4byte 0x00000108, gCreditsText_BattleFrontierData + + .align 2 +gCreditsEntry_SupportProgrammers:: @ 85E6714 + .4byte 0x0000010a, gCreditsText_SupportProgrammers + + .align 2 +gCreditsEntry_Artwork:: @ 85E671C + .4byte 0x0000010c, gCreditsText_Artwork + + .align 2 +gCreditsEntry_LeadProgrammer:: @ 85E6724 + .4byte 0x0000010a, gCreditsText_LeadProgrammer + + .align 2 +gCreditsEntry_LeadGraphicArtist:: @ 85E672C + .4byte 0x00000109, gCreditsText_LeadGraphicArtist + + .align 2 +gCreditsEntry_SatoshiTajiri:: @ 85E6734 + .4byte 0x0000000b, gCreditsText_SatoshiTajiri + + .align 2 +gCreditsEntry_JunichiMasuda:: @ 85E673C + .4byte 0x0000000b, gCreditsText_JunichiMasuda + + .align 2 +gCreditsEntry_KenSugimori:: @ 85E6744 + .4byte 0x0000000b, gCreditsText_KenSugimori + + .align 2 +gCreditsEntry_ShigekiMorimoto:: @ 85E674C + .4byte 0x0000000b, gCreditsText_ShigekiMorimoto + + .align 2 +gCreditsEntry_TetsuyaWatanabe:: @ 85E6754 + .4byte 0x0000000b, gCreditsText_TetsuyaWatanabe + + .align 2 +gCreditsEntry_HisashiSogabe:: @ 85E675C + .4byte 0x0000000b, gCreditsText_HisashiSogabe + + .align 2 +gCreditsEntry_SosukeTamada:: @ 85E6764 + .4byte 0x0000000b, gCreditsText_SosukeTamada + + .align 2 +gCreditsEntry_AkitoMori:: @ 85E676C + .4byte 0x0000000b, gCreditsText_AkitoMori + + .align 2 +gCreditsEntry_KeitaKagaya:: @ 85E6774 + .4byte 0x0000000b, gCreditsText_KeitaKagaya + + .align 2 +gCreditsEntry_YoshinoriMatsuda:: @ 85E677C + .4byte 0x0000000b, gCreditsText_YoshinoriMatsuda + + .align 2 +gCreditsEntry_HiroyukiNakamura:: @ 85E6784 + .4byte 0x0000000b, gCreditsText_HiroyukiNakamura + + .align 2 +gCreditsEntry_MasaoTaya:: @ 85E678C + .4byte 0x0000000b, gCreditsText_MasaoTaya + + .align 2 +gCreditsEntry_SatoshiNohara:: @ 85E6794 + .4byte 0x0000000b, gCreditsText_SatoshiNohara + + .align 2 +gCreditsEntry_TomomichiOhta:: @ 85E679C + .4byte 0x0000000b, gCreditsText_TomomichiOhta + + .align 2 +gCreditsEntry_MiyukiIwasawa:: @ 85E67A4 + .4byte 0x0000000b, gCreditsText_MiyukiIwasawa + + .align 2 +gCreditsEntry_TakenoriOhta:: @ 85E67AC + .4byte 0x0000000b, gCreditsText_TakenoriOhta + + .align 2 +gCreditsEntry_HironobuYoshida:: @ 85E67B4 + .4byte 0x0000000b, gCreditsText_HironobuYoshida + + .align 2 +gCreditsEntry_MotofumiFujiwara:: @ 85E67BC + .4byte 0x0000000b, gCreditsText_MotofumiFujiwara + + .align 2 +gCreditsEntry_SatoshiOhta:: @ 85E67C4 + .4byte 0x0000000b, gCreditsText_SatoshiOhta + + .align 2 +gCreditsEntry_AsukaIwashita:: @ 85E67CC + .4byte 0x0000000b, gCreditsText_AsukaIwashita + + .align 2 +gCreditsEntry_AimiTomita:: @ 85E67D4 + .4byte 0x0000000b, gCreditsText_AimiTomita + + .align 2 +gCreditsEntry_TakaoUnno:: @ 85E67DC + .4byte 0x0000000b, gCreditsText_TakaoUnno + + .align 2 +gCreditsEntry_KanakoEo:: @ 85E67E4 + .4byte 0x0000000b, gCreditsText_KanakoEo + + .align 2 +gCreditsEntry_JunOkutani:: @ 85E67EC + .4byte 0x0000000b, gCreditsText_JunOkutani + + .align 2 +gCreditsEntry_AtsukoNishida:: @ 85E67F4 + .4byte 0x0000000b, gCreditsText_AtsukoNishida + + .align 2 +gCreditsEntry_MuneoSaito:: @ 85E67FC + .4byte 0x0000000b, gCreditsText_MuneoSaito + + .align 2 +gCreditsEntry_RenaYoshikawa:: @ 85E6804 + .4byte 0x0000000b, gCreditsText_RenaYoshikawa + + .align 2 +gCreditsEntry_GoIchinose:: @ 85E680C + .4byte 0x0000000b, gCreditsText_GoIchinose + + .align 2 +gCreditsEntry_MorikazuAoki:: @ 85E6814 + .4byte 0x0000000b, gCreditsText_MorikazuAoki + + .align 2 +gCreditsEntry_KojiNishino:: @ 85E681C + .4byte 0x0000000b, gCreditsText_KojiNishino + + .align 2 +gCreditsEntry_KenjiMatsushima:: @ 85E6824 + .4byte 0x0000000b, gCreditsText_KenjiMatsushima + + .align 2 +gCreditsEntry_TetsujiOhta:: @ 85E682C + .4byte 0x0000000b, gCreditsText_TetsujiOhta + + .align 2 +gCreditsEntry_HitomiSato:: @ 85E6834 + .4byte 0x0000000b, gCreditsText_HitomiSato + + .align 2 +gCreditsEntry_TakeshiKawachimaru:: @ 85E683C + .4byte 0x0000000b, gCreditsText_TakeshiKawachimaru + + .align 2 +gCreditsEntry_TeruyukiShimoyamada:: @ 85E6844 + .4byte 0x0000000b, gCreditsText_TeruyukiShimoyamada + + .align 2 +gCreditsEntry_ShigeruOhmori:: @ 85E684C + .4byte 0x0000000b, gCreditsText_ShigeruOhmori + + .align 2 +gCreditsEntry_TadashiTakahashi:: @ 85E6854 + .4byte 0x0000000b, gCreditsText_TadashiTakahashi + + .align 2 +gCreditsEntry_ToshinobuMatsumiya:: @ 85E685C + .4byte 0x0000000b, gCreditsText_ToshinobuMatsumiya + + .align 2 +gCreditsEntry_AkihitoTomisawa:: @ 85E6864 + .4byte 0x0000000b, gCreditsText_AkihitoTomisawa + + .align 2 +gCreditsEntry_HirokiEnomoto:: @ 85E686C + .4byte 0x0000000b, gCreditsText_HirokiEnomoto + + .align 2 +gCreditsEntry_KazuyukiTerada:: @ 85E6874 + .4byte 0x0000000b, gCreditsText_KazuyukiTerada + + .align 2 +gCreditsEntry_YuriSakurai:: @ 85E687C + .4byte 0x0000000b, gCreditsText_YuriSakurai + + .align 2 +gCreditsEntry_HiromiSagawa:: @ 85E6884 + .4byte 0x0000000b, gCreditsText_HiromiSagawa + + .align 2 +gCreditsEntry_KenjiTominaga:: @ 85E688C + .4byte 0x0000000b, gCreditsText_KenjiTominaga + + .align 2 +gCreditsEntry_YoshioTajiri:: @ 85E6894 + .4byte 0x0000000b, gCreditsText_YoshioTajiri + + .align 2 +gCreditsEntry_TeikoSasaki:: @ 85E689C + .4byte 0x0000000b, gCreditsText_TeikoSasaki + + .align 2 +gCreditsEntry_SachikoHamano:: @ 85E68A4 + .4byte 0x0000000b, gCreditsText_SachikoHamano + + .align 2 +gCreditsEntry_ChieMatsumiya:: @ 85E68AC + .4byte 0x0000000b, gCreditsText_ChieMatsumiya + + .align 2 +gCreditsEntry_AkikoShinozaki:: @ 85E68B4 + .4byte 0x0000000b, gCreditsText_AkikoShinozaki + + .align 2 +gCreditsEntry_AstukoFujii:: @ 85E68BC + .4byte 0x0000000b, gCreditsText_AstukoFujii + + .align 2 +gCreditsEntry_NozomuSaito:: @ 85E68C4 + .4byte 0x0000000b, gCreditsText_NozomuSaito + + .align 2 +gCreditsEntry_KenkichiToyama:: @ 85E68CC + .4byte 0x0000000b, gCreditsText_KenkichiToyama + + .align 2 +gCreditsEntry_SuguruNakatsui:: @ 85E68D4 + .4byte 0x0000000b, gCreditsText_SuguruNakatsui + + .align 2 +gCreditsEntry_YumiFunasaka:: @ 85E68DC + .4byte 0x0000000b, gCreditsText_YumiFunasaka + + .align 2 +gCreditsEntry_NaokoYanase:: @ 85E68E4 + .4byte 0x0000000b, gCreditsText_NaokoYanase + + .align 2 +gCreditsEntry_NCLSuperMarioClub:: @ 85E68EC + .4byte 0x0000000b, gCreditsText_NCLSuperMarioClub + + .align 2 +gCreditsEntry_AtsushiTada:: @ 85E68F4 + .4byte 0x0000000b, gCreditsText_AtsushiTada + + .align 2 +gCreditsEntry_TakahiroOhnishi:: @ 85E68FC + .4byte 0x0000000b, gCreditsText_TakahiroOhnishi + + .align 2 +gCreditsEntry_NorihideOkamura:: @ 85E6904 + .4byte 0x0000000b, gCreditsText_NorihideOkamura + + .align 2 +gCreditsEntry_HiroNakamura:: @ 85E690C + .4byte 0x0000000b, gCreditsText_HiroNakamura + + .align 2 +gCreditsEntry_HiroyukiUesugi:: @ 85E6914 + .4byte 0x0000000b, gCreditsText_HiroyukiUesugi + + .align 2 +gCreditsEntry_TerukiMurakawa:: @ 85E691C + .4byte 0x0000000b, gCreditsText_TerukiMurakawa + + .align 2 +gCreditsEntry_AkiraKinashi:: @ 85E6924 + .4byte 0x0000000b, gCreditsText_AkiraKinashi + + .align 2 +gCreditsEntry_MichikoTakizawa:: @ 85E692C + .4byte 0x0000000b, gCreditsText_MichikoTakizawa + + .align 2 +gCreditsEntry_MakikoTakada:: @ 85E6934 + .4byte 0x0000000b, gCreditsText_MakikoTakada + + .align 2 +gCreditsEntry_TakanaoKondo:: @ 85E693C + .4byte 0x0000000b, gCreditsText_TakanaoKondo + + .align 2 +gCreditsEntry_AiMashima:: @ 85E6944 + .4byte 0x0000000b, gCreditsText_AiMashima + + .align 2 +gCreditsEntry_GakujiNomoto:: @ 85E694C + .4byte 0x0000000b, gCreditsText_GakujiNomoto + + .align 2 +gCreditsEntry_TakehiroIzushi:: @ 85E6954 + .4byte 0x0000000b, gCreditsText_TakehiroIzushi + + .align 2 +gCreditsEntry_HitoshiYamagami:: @ 85E695C + .4byte 0x0000000b, gCreditsText_HitoshiYamagami + + .align 2 +gCreditsEntry_KyokoWatanabe:: @ 85E6964 + .4byte 0x0000000b, gCreditsText_KyokoWatanabe + + .align 2 +gCreditsEntry_TakaoNakano:: @ 85E696C + .4byte 0x0000000b, gCreditsText_TakaoNakano + + .align 2 +gCreditsEntry_HiroyukiJinnai:: @ 85E6974 + .4byte 0x0000000b, gCreditsText_HiroyukiJinnai + + .align 2 +gCreditsEntry_HiroakiTsuru:: @ 85E697C + .4byte 0x0000000b, gCreditsText_HiroakiTsuru + + .align 2 +gCreditsEntry_TsunekazIshihara:: @ 85E6984 + .4byte 0x0000000b, gCreditsText_TsunekazIshihara + + .align 2 +gCreditsEntry_SatoruIwata:: @ 85E698C + .4byte 0x0000000b, gCreditsText_SatoruIwata + + .align 2 +gCreditsEntry_KazuyaSuyama:: @ 85E6994 + .4byte 0x0000000b, gCreditsText_KazuyaSuyama + + .align 2 +gCreditsEntry_SatoshiMitsuhara:: @ 85E699C + .4byte 0x0000000b, gCreditsText_SatoshiMitsuhara + + .align 2 +gCreditsEntry_JapanBrailleLibrary:: @ 85E69A4 + .4byte 0x00000009, gCreditsText_JapanBrailleLibrary + + .align 2 +gCreditsEntry_TomotakaKomura:: @ 85E69AC + .4byte 0x0000000b, gCreditsText_TomotakaKomura + + .align 2 +gCreditsEntry_MikikoOhhashi:: @ 85E69B4 + .4byte 0x0000000b, gCreditsText_MikikoOhhashi + + .align 2 +gCreditsEntry_DaisukeHoshino:: @ 85E69BC + .4byte 0x0000000b, gCreditsText_DaisukeHoshino + + .align 2 +gCreditsEntry_KenjiroIto:: @ 85E69C4 + .4byte 0x0000000b, gCreditsText_KenjiroIto + + .align 2 +gCreditsEntry_RuiKawaguchi:: @ 85E69CC + .4byte 0x0000000b, gCreditsText_RuiKawaguchi + + .align 2 +gCreditsEntry_ShunsukeKohori:: @ 85E69D4 + .4byte 0x0000000b, gCreditsText_ShunsukeKohori + + .align 2 +gCreditsEntry_SachikoNakamichi:: @ 85E69DC + .4byte 0x0000000b, gCreditsText_SachikoNakamichi + + .align 2 +gCreditsEntry_FujikoNomura:: @ 85E69E4 + .4byte 0x0000000b, gCreditsText_FujikoNomura + + .align 2 +gCreditsEntry_KazukiYoshihara:: @ 85E69EC + .4byte 0x0000000b, gCreditsText_KazukiYoshihara + + .align 2 +gCreditsEntry_RetsujiNomoto:: @ 85E69F4 + .4byte 0x0000000b, gCreditsText_RetsujiNomoto + + .align 2 +gCreditsEntry_AzusaTajima:: @ 85E69FC + .4byte 0x0000000b, gCreditsText_AzusaTajima + + .align 2 +gCreditsEntry_ShusakuEgami:: @ 85E6A04 + .4byte 0x0000000b, gCreditsText_ShusakuEgami + + .align 2 +gCreditsEntry_PackageAndManual:: @ 85E6A0C + .4byte 0x00000100, gCreditsText_PackageAndManual + + .align 2 +gCreditsEntry_EnglishVersion:: @ 85E6A14 + .4byte 0x00000100, gCreditsText_EnglishVersion + + .align 2 +gCreditsEntry_Translator:: @ 85E6A1C + .4byte 0x00000100, gCreditsText_Translator + + .align 2 +gCreditsEntry_TextEditor:: @ 85E6A24 + .4byte 0x00000100, gCreditsText_TextEditor + + .align 2 +gCreditsEntry_NCLCoordinator:: @ 85E6A2C + .4byte 0x00000100, gCreditsText_NCLCoordinator + + .align 2 +gCreditsEntry_GraphicDesigner:: @ 85E6A34 + .4byte 0x00000100, gCreditsText_GraphicDesigner + + .align 2 +gCreditsEntry_NOAProductTesting:: @ 85E6A3C + .4byte 0x00000100, gCreditsText_NOAProductTesting + + .align 2 +gCreditsEntry_HideyukiNakajima:: @ 85E6A44 + .4byte 0x00000000, gCreditsText_HideyukiNakajima + + .align 2 +gCreditsEntry_HidenoriSaeki:: @ 85E6A4C + .4byte 0x00000000, gCreditsText_HidenoriSaeki + + .align 2 +gCreditsEntry_YokoWatanabe:: @ 85E6A54 + .4byte 0x00000000, gCreditsText_YokoWatanabe + + .align 2 +gCreditsEntry_SakaeKimura:: @ 85E6A5C + .4byte 0x00000000, gCreditsText_SakaeKimura + + .align 2 +gCreditsEntry_ChiakiShinkai:: @ 85E6A64 + .4byte 0x00000000, gCreditsText_ChiakiShinkai + + .align 2 +gCreditsEntry_SethMcMahill:: @ 85E6A6C + .4byte 0x00000000, gCreditsText_SethMcMahill + + .align 2 +gCreditsEntry_NobOgasawara:: @ 85E6A74 + .4byte 0x00000000, gCreditsText_NobOgasawara + + .align 2 +gCreditsEntry_TeresaLillygren:: @ 85E6A7C + .4byte 0x00000000, gCreditsText_TeresaLillygren + + .align 2 +gCreditsEntry_KimikoNakamichi:: @ 85E6A84 + .4byte 0x00000000, gCreditsText_KimikoNakamichi + + .align 2 +gCreditsEntry_SouichiYamamoto:: @ 85E6A8C + .4byte 0x00000000, gCreditsText_SouichiYamamoto + + .align 2 +gCreditsEntry_YuichiroIto:: @ 85E6A94 + .4byte 0x00000000, gCreditsText_YuichiroIto + + .align 2 +gCreditsEntry_ThomasHertzog:: @ 85E6A9C + .4byte 0x00000000, gCreditsText_ThomasHertzog + + .align 2 +gCreditsEntry_MikaKurosawa:: @ 85E6AA4 + .4byte 0x00000000, gCreditsText_MikaKurosawa + + .align 2 +gCreditsEntry_NationalFederationBlind:: @ 85E6AAC + .4byte 0x00000000, gCreditsText_NationalFederationBlind + + .align 2 +gCreditsEntry_PatriciaAMaurer:: @ 85E6AB4 + .4byte 0x00000000, gCreditsText_PatriciaAMaurer + + .align 2 +gCreditsEntry_EuropeanBlindUnion:: @ 85E6ABC + .4byte 0x00000000, gCreditsText_EuropeanBlindUnion + + .align 2 +gCreditsEntry_AustralianBrailleAuthority:: @ 85E6AC4 + .4byte 0x00000000, gCreditsText_AustralianBrailleAuthority + + .align 2 +gCreditsEntry_RoyalNewZealandFederationBlind:: @ 85E6ACC + .4byte 0x00000000, gCreditsText_RoyalNewZealandFederationBlind + + .align 2 +gCreditsEntry_MotoyasuTojima:: @ 85E6AD4 + .4byte 0x00000000, gCreditsText_MotoyasuTojima + + .align 2 +gCreditsEntry_NicolaPrattBarlow:: @ 85E6ADC + .4byte 0x00000000, gCreditsText_NicolaPrattBarlow + + .align 2 +gCreditsEntry_ShellieDow:: @ 85E6AE4 + .4byte 0x00000000, gCreditsText_ShellieDow + + .align 2 +gCreditsEntry_ErikJohnson:: @ 85E6AEC + .4byte 0x00000000, gCreditsText_ErikJohnson + + .align 2 gUnknown_085E6AF4:: @ 85E6AF4 - .incbin "baserom.gba", 0x5e6af4, 0x474 + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_PkmnEmeraldVersion + .4byte gCreditsEntry_Credits + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString -gUnknown_085E6F68:: @ 85E6F68 - .incbin "baserom.gba", 0x5e6f68, 0x4 + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_Director + .4byte gCreditsEntry_ShigekiMorimoto + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_ArtDirector + .4byte gCreditsEntry_KenSugimori + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_WorldDirector + .4byte gCreditsEntry_JunichiMasuda + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_LeadProgrammer + .4byte gCreditsEntry_HisashiSogabe + .4byte gCreditsEntry_LeadGraphicArtist + .4byte gCreditsEntry_MotofumiFujiwara + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_Programmers + .4byte gCreditsEntry_HisashiSogabe + .4byte gCreditsEntry_TomomichiOhta + .4byte gCreditsEntry_NozomuSaito + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_Programmers + .4byte gCreditsEntry_AkitoMori + .4byte gCreditsEntry_HiroyukiNakamura + .4byte gCreditsEntry_MasaoTaya + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_Programmers + .4byte gCreditsEntry_SatoshiNohara + .4byte gCreditsEntry_MiyukiIwasawa + .4byte gCreditsEntry_YoshinoriMatsuda + .4byte gCreditsEntry_KeitaKagaya + + .4byte gCreditsEntry_Programmers + .4byte gCreditsEntry_TetsuyaWatanabe + .4byte gCreditsEntry_SosukeTamada + .4byte gCreditsEntry_TakenoriOhta + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_GraphicDesigners + .4byte gCreditsEntry_MotofumiFujiwara + .4byte gCreditsEntry_SatoshiOhta + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_GraphicDesigners + .4byte gCreditsEntry_KenkichiToyama + .4byte gCreditsEntry_AsukaIwashita + .4byte gCreditsEntry_TakaoUnno + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_GraphicDesigners + .4byte gCreditsEntry_KenSugimori + .4byte gCreditsEntry_HironobuYoshida + .4byte gCreditsEntry_AimiTomita + .4byte gCreditsEntry_KanakoEo + + .4byte gCreditsEntry_MusicComposition + .4byte gCreditsEntry_GoIchinose + .4byte gCreditsEntry_JunichiMasuda + .4byte gCreditsEntry_MorikazuAoki + .4byte gCreditsEntry_HitomiSato + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_SoundEffectsAndPkmnVoices + .4byte gCreditsEntry_GoIchinose + .4byte gCreditsEntry_MorikazuAoki + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_GameDesigners + .4byte gCreditsEntry_ShigekiMorimoto + .4byte gCreditsEntry_TeruyukiShimoyamada + .4byte gCreditsEntry_TakeshiKawachimaru + .4byte gCreditsEntry_AkihitoTomisawa + + .4byte gCreditsEntry_GameDesigners + .4byte gCreditsEntry_SuguruNakatsui + .4byte gCreditsEntry_TetsujiOhta + .4byte gCreditsEntry_HitomiSato + .4byte gCreditsEntry_KenjiMatsushima + + .4byte gCreditsEntry_GameDesigners + .4byte gCreditsEntry_JunichiMasuda + .4byte gCreditsEntry_KojiNishino + .4byte gCreditsEntry_ShigeruOhmori + .4byte gCreditsEntry_TadashiTakahashi + + .4byte gCreditsEntry_ScenarioPlot + .4byte gCreditsEntry_AkihitoTomisawa + .4byte gCreditsEntry_JunichiMasuda + .4byte gCreditsEntry_KojiNishino + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_Scenario + .4byte gCreditsEntry_AkihitoTomisawa + .4byte gCreditsEntry_HitomiSato + .4byte gCreditsEntry_ToshinobuMatsumiya + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_ScriptDesigners + .4byte gCreditsEntry_TomomichiOhta + .4byte gCreditsEntry_SatoshiNohara + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_MapDesigners + .4byte gCreditsEntry_SuguruNakatsui + .4byte gCreditsEntry_TeruyukiShimoyamada + .4byte gCreditsEntry_ShigeruOhmori + .4byte gCreditsEntry_TetsujiOhta + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_BattleFrontierData + .4byte gCreditsEntry_TetsujiOhta + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_ParametricDesigners + .4byte gCreditsEntry_TeruyukiShimoyamada + .4byte gCreditsEntry_ShigekiMorimoto + .4byte gCreditsEntry_TetsujiOhta + .4byte gCreditsEntry_KojiNishino + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_PokedexText + .4byte gCreditsEntry_KenjiMatsushima + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_EnvAndToolPgrms + .4byte gCreditsEntry_HisashiSogabe + .4byte gCreditsEntry_SosukeTamada + .4byte gCreditsEntry_HiroyukiNakamura + .4byte gCreditsEntry_AkitoMori + + .4byte gCreditsEntry_PkmnDesigners + .4byte gCreditsEntry_KenSugimori + .4byte gCreditsEntry_MotofumiFujiwara + .4byte gCreditsEntry_ShigekiMorimoto + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_PkmnDesigners + .4byte gCreditsEntry_HironobuYoshida + .4byte gCreditsEntry_SatoshiOhta + .4byte gCreditsEntry_AsukaIwashita + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_PkmnDesigners + .4byte gCreditsEntry_TakaoUnno + .4byte gCreditsEntry_KanakoEo + .4byte gCreditsEntry_AimiTomita + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_PkmnDesigners + .4byte gCreditsEntry_AtsukoNishida + .4byte gCreditsEntry_MuneoSaito + .4byte gCreditsEntry_RenaYoshikawa + .4byte gCreditsEntry_JunOkutani + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_SupportProgrammers + .4byte gCreditsEntry_SatoshiMitsuhara + .4byte gCreditsEntry_DaisukeHoshino + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_NCLProductTesting + .4byte gCreditsEntry_NCLSuperMarioClub + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_PackageAndManual + .4byte gCreditsEntry_KenSugimori + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_SpecialThanks + .4byte gCreditsEntry_KenjiTominaga + .4byte gCreditsEntry_HirokiEnomoto + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_SpecialThanks + .4byte gCreditsEntry_KazuyaSuyama + .4byte gCreditsEntry_KenjiroIto + .4byte gCreditsEntry_MichikoTakizawa + .4byte gCreditsEntry_MakikoTakada + + .4byte gCreditsEntry_SpecialThanks + .4byte gCreditsEntry_MikikoOhhashi + .4byte gCreditsEntry_TakanaoKondo + .4byte gCreditsEntry_RuiKawaguchi + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_SpecialThanks + .4byte gCreditsEntry_TakahiroOhnishi + .4byte gCreditsEntry_NorihideOkamura + .4byte gCreditsEntry_ShunsukeKohori + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_InfoSupervisors + .4byte gCreditsEntry_KazuyukiTerada + .4byte gCreditsEntry_YuriSakurai + .4byte gCreditsEntry_YumiFunasaka + .4byte gCreditsEntry_NaokoYanase + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_Artwork + .4byte gCreditsEntry_SachikoNakamichi + .4byte gCreditsEntry_FujikoNomura + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_Artwork + .4byte gCreditsEntry_HideyukiNakajima + .4byte gCreditsEntry_HidenoriSaeki + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_Artwork + .4byte gCreditsEntry_YokoWatanabe + .4byte gCreditsEntry_SakaeKimura + .4byte gCreditsEntry_ChiakiShinkai + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_Coordinators + .4byte gCreditsEntry_KazukiYoshihara + .4byte gCreditsEntry_AkiraKinashi + .4byte gCreditsEntry_RetsujiNomoto + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EnglishVersion + .4byte gCreditsEntry_HiroNakamura + .4byte gCreditsEntry_SethMcMahill + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_Translator + .4byte gCreditsEntry_NobOgasawara + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_TextEditor + .4byte gCreditsEntry_TeresaLillygren + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_NCLCoordinator + .4byte gCreditsEntry_KimikoNakamichi + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_Programmers + .4byte gCreditsEntry_TerukiMurakawa + .4byte gCreditsEntry_SouichiYamamoto + .4byte gCreditsEntry_YuichiroIto + .4byte gCreditsEntry_AkiraKinashi + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_GraphicDesigner + .4byte gCreditsEntry_AkiraKinashi + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_EnvAndToolPgrms + .4byte gCreditsEntry_TerukiMurakawa + .4byte gCreditsEntry_SouichiYamamoto + .4byte gCreditsEntry_KimikoNakamichi + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_NOAProductTesting + .4byte gCreditsEntry_ThomasHertzog + .4byte gCreditsEntry_ErikJohnson + .4byte gCreditsEntry_MikaKurosawa + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_BrailleCodeCheck + .4byte gCreditsEntry_NationalFederationBlind + .4byte gCreditsEntry_PatriciaAMaurer + .4byte gCreditsEntry_JapanBrailleLibrary + .4byte gCreditsEntry_EuropeanBlindUnion + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_BrailleCodeCheck + .4byte gCreditsEntry_AustralianBrailleAuthority + .4byte gCreditsEntry_RoyalNewZealandFederationBlind + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_SpecialThanks + .4byte gCreditsEntry_HiroyukiUesugi + .4byte gCreditsEntry_MotoyasuTojima + .4byte gCreditsEntry_NicolaPrattBarlow + .4byte gCreditsEntry_ShellieDow + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_TaskManagers + .4byte gCreditsEntry_AzusaTajima + .4byte gCreditsEntry_ShusakuEgami + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_Producers + .4byte gCreditsEntry_HiroyukiJinnai + .4byte gCreditsEntry_HitoshiYamagami + .4byte gCreditsEntry_GakujiNomoto + .4byte gCreditsEntry_HiroakiTsuru + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_ExecutiveDirector + .4byte gCreditsEntry_SatoshiTajiri + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_ExecProducers + .4byte gCreditsEntry_SatoruIwata + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_ExecProducers + .4byte gCreditsEntry_TsunekazIshihara + .4byte gCreditsEntry_EmptyString + .4byte gCreditsEntry_EmptyString + + .align 2 +gUnknown_085E6F68:: @ 85E6F68 struct BgTemplate + .4byte 0x000001C8 + + .align 2 gUnknown_085E6F6C:: @ 85E6F6C - .incbin "baserom.gba", 0x5e6f6c, 0x10 + window_template 0x00, 0x00, 0x09, 0x1e, 0x0c, 0x08, 0x0001 + window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + .align 2 gUnknown_085E6F7C:: @ 85E6F7C - .incbin "baserom.gba", 0x5e6f7c, 0x54 + .byte 0x68, 0x24, 0x78, 0x24, 0x88, 0x24, 0x00, 0x00 + .align 2 +gUnknown_085E6F84:: @ 85E6F84 + .2byte 0x0000, 0x0008, 0x0040, 0x0008, 0x0080, 0x0008, 0x00c0, 0x0008, 0xfffe, 0x0000 + + .align 2 +gUnknown_085E6F98:: @ 85E6F98 + .2byte 0x0000, 0x0004, 0x0040, 0x0004, 0x0080, 0x0004, 0x00c0, 0x0004, 0xfffe, 0x0000 + + .align 2 +gUnknown_085E6FAC:: @ 85E6FAC + .2byte 0x0100, 0x0004, 0x0140, 0x0004, 0x0180, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_085E6FBC:: @ 85E6FBC + .2byte 0x0180, 0x001e, 0x0140, 0x001e, 0x0100, 0x001e, 0x0100, 0x001e, 0xffff, 0x0000 + + .align 2 gUnknown_085E6FD0:: @ 85E6FD0 - .incbin "baserom.gba", 0x5e6fd0, 0x40 + .4byte gUnknown_085E6F84 + .4byte gUnknown_085E6F98 + .4byte gUnknown_085E6FAC + .4byte gUnknown_085E6FBC + .align 2 +gUnknown_085E6FE0:: @ 85E6FE0 + .2byte 0x0000, 0x0008, 0x0040, 0x0008, 0x0080, 0x0008, 0x00c0, 0x0008, 0xfffe, 0x0000 + + .align 2 +gUnknown_085E6FF4:: @ 85E6FF4 + .2byte 0x0000, 0x0004, 0x0040, 0x0004, 0x0080, 0x0004, 0x00c0, 0x0004, 0xfffe, 0x0000 + + .align 2 +gUnknown_085E7008:: @ 85E7008 + .2byte 0x0000, 0x0004, 0xffff, 0x0000 + + .align 2 gUnknown_085E7010:: @ 85E7010 - .incbin "baserom.gba", 0x5e7010, 0xc + .4byte gUnknown_085E6FE0 + .4byte gUnknown_085E6FF4 + .4byte gUnknown_085E7008 + .align 2 gUnknown_085E701C:: @ 85E701C - .incbin "baserom.gba", 0x5e701c, 0x10 + obj_tiles gDecompressionBuffer, 0x1800, 0x03E9 + null_obj_tiles + .align 2 gUnknown_085E702C:: @ 85E702C - .incbin "baserom.gba", 0x5e702c, 0x3c + obj_pal gDecompressionBuffer + 0x1800, 0x03E9 + null_obj_pal + .align 2 +gUnknown_085E703C:: @ 85E703C + .2byte 0x00a0, 0xc000, 0x0400, 0x0000 + + .align 2 +gUnknown_085E7044:: @ 85E7044 + .2byte 0x0000, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E704C:: @ 85E704C + .2byte 0x0040, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E7054:: @ 85E7054 + .2byte 0x0080, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E705C:: @ 85E705C + .4byte gUnknown_085E7044 + .4byte gUnknown_085E704C + .4byte gUnknown_085E7054 + + .align 2 gUnknown_085E7068:: @ 85E7068 - .incbin "baserom.gba", 0x5e7068, 0x18 + spr_template 0x03e9, 0x03e9, gUnknown_085E703C, gUnknown_085E705C, NULL, gDummySpriteAffineAnimTable, sub_81772B8 diff --git a/data/graphics.s b/data/graphics.s index d9657a783..96aaf3911 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -645,11 +645,29 @@ gUnknown_08DAAFEC:: @ 8DAAFEC .incbin "baserom.gba", 0xdb7aa0, 0x2a78 gUnknown_08DBA518:: @ 8DBA518 - .incbin "baserom.gba", 0xdba518, 0xa0 + .incbin "baserom.gba", 0xdba518, 0x80 + .align 2 +gCableCar_Pal:: @ 8DBA598 + .incbin "graphics/misc/cable_car.gbapal" + + .align 2 gUnknown_08DBA5B8:: @ 8DBA5B8 - .incbin "baserom.gba", 0xdba5b8, 0x1d30 + .incbin "baserom.gba", 0xdba5b8, 0x19d8 + .align 2 +gCableCar_Gfx:: @ 8DBBF90 + .incbin "graphics/misc/cable_car.4bpp.lz" + + .align 2 +gCableCarDoor_Gfx:: @ 8DBC290 + .incbin "graphics/misc/cable_car_door.4bpp.lz" + + .align 2 +gCableCarCord_Gfx:: @ 8DBC2C0 + .incbin "graphics/misc/cable_car_cord.4bpp.lz" + + .align 2 gUnknown_08DBC2E8:: @ 8DBC2E8 .incbin "baserom.gba", 0xdbc2e8, 0x72c diff --git a/data/link.s b/data/link.s index 38be746d9..2ce6b49ba 100644 --- a/data/link.s +++ b/data/link.s @@ -54,6 +54,7 @@ gUnknown_082ED1FC:: @ 82ED1FC BgTemplate .4byte 0x000001F8 .4byte 0x00001081 + .align 2 gUnknown_082ED204:: @ 82ED204 window_template 0x00, 0x00, 0x00, 0x1E, 0x05, 0x0F, 0x0002 @@ -63,15 +64,19 @@ gUnknown_082ED204:: @ 82ED204 window_template 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + .align 2 gUnknown_082ED224:: @ 82ED224 .byte 0x00, 0x01, 0x02, 0x00, 0xff, 0xfe, 0xff, 0x00 + .align 2 gWirelessLinkIconPalette:: @ 82ED22C .incbin "graphics/interface/wireless_link_icon.gbapal" + .align 2 gWirelessLinkIconPic:: @ 82ED22C .incbin "graphics/interface/wireless_link_icon.4bpp.lz" + .align 2 gUnknown_082ED370:: @ 82ED370 .byte 0xff, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x37 .byte 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f @@ -106,6 +111,7 @@ gUnknown_082ED370:: @ 82ED370 .byte 0x2c, 0x2e, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c .byte 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94 + .align 2 gUnknown_082ED470:: @ 82ED470 .byte 0x20, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c .byte 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94 @@ -140,26 +146,33 @@ gUnknown_082ED470:: @ 82ED470 .byte 0x20, 0x2b, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x20 .byte 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00 + .align 2 gUnknown_082ED570:: @ 82ED570 .byte 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00 + .align 2 gUnknown_082ED578:: @ 82ED578 .2byte 0x0004, 0x0005, 0x0008, 0x0005, 0x000c, 0x0005, 0x0010, 0x000a .2byte 0x000c, 0x0005, 0x0008, 0x0005, 0xfffe, 0x0000 + .align 2 gUnknown_082ED594:: @ 82ED594 .2byte 0x0004, 0x0005, 0x0008, 0x0005, 0x000c, 0x000a, 0x0008, 0x0005 .2byte 0xfffe, 0x0000 + .align 2 gUnknown_082ED5A8:: @ 82ED5A8 .2byte 0x0004, 0x0005, 0x0008, 0x0005, 0xfffe, 0x0000 + .align 2 gUnknown_082ED5B4:: @ 82ED5B4 .2byte 0x0004, 0x000a, 0x0014, 0x000a, 0xfffe, 0x0000 + .align 2 gUnknown_082ED5C0:: @ 82ED5C0 .2byte 0x0018, 0x000a, 0x0004, 0x000a, 0xfffe, 0x0000 + .align 2 gUnknown_082ED5CC:: @ 82ED5CC .4byte gUnknown_082ED578 .4byte gUnknown_082ED594 @@ -167,33 +180,29 @@ gUnknown_082ED5CC:: @ 82ED5CC .4byte gUnknown_082ED5B4 .4byte gUnknown_082ED5C0 -gUnknown_082ED5E0:: @ 82ED5E0 struct CompressedSpriteSheet - .4byte gWirelessLinkIconPic - .2byte 0x0380 @ uncompressed size - .2byte 0xD431 @ tag + .align 2 +gUnknown_082ED5E0:: @ 82ED5E0 + obj_tiles gWirelessLinkIconPic, 0x0380, 0xD431 -gUnknown_082ED5E8:: @ 82ED5E8 struct SpritePalette - .4byte gWirelessLinkIconPalette - .2byte 0xD432 @ tag - .2byte 0x0000 @ padding + .align 2 +gUnknown_082ED5E8:: @ 82ED5E8 + obj_pal gWirelessLinkIconPalette, 0xD432 -gUnknown_082ED5F0:: @ 82ED5F0 struct SpriteTemplate - .2byte 0xD431 @ tileTag - .2byte 0xD432 @ paletteTag - .4byte gUnknown_082ED570 - .4byte gUnknown_082ED5CC - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + .align 2 +gUnknown_082ED5F0:: @ 82ED5F0 + spr_template 0xD431, 0xD432, gUnknown_082ED570, gUnknown_082ED5CC, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy + .align 2 gUnknown_082ED608:: @ 82ED608 .byte 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00 .byte 0x14, 0x2b, 0x02, 0x02, 0x22, 0x2b, 0x02, 0x02 .byte 0x01, 0x00, 0x58, 0x02, 0x2c, 0x01, 0x00, 0x00 + .align 2 gUnknown_082ED620:: @ 82ED620 .byte 0x00, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00 + .align 2 gUnknown_082ED628:: @ 82ED628 .4byte 0x00000000, 0x00000001, 0x00000003, 0x00000007 .4byte 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f @@ -216,6 +225,7 @@ gUnknown_082ED6A5:: @ 82ED6A5 .byte 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00 .byte 0x00, 0x00, 0x00 + .align 2 gUnknown_082ED6B8:: @ 82ED6B8 .4byte gUnknown_020228C4 .4byte 0x000000c8 @@ -228,6 +238,7 @@ gUnknown_082ED6B8:: @ 82ED6B8 .4byte gUnknown_020228C4 .4byte 0x00000028 + .align 2 gUnknown_082ED6E0:: @ 82ED6E0 .2byte 0x0002, 0x7f7d, 0x0000, 0xffff @@ -285,6 +296,7 @@ gUnknown_082ED7E0:: @ 82ED7E0 .4byte sub_8010AAC .4byte sub_8010D0C + .align 2 gUnknown_082ED7EC:: @ 82ED7EC .ascii "PokemonSioInfo" @@ -2268,14 +2280,8 @@ gUnknown_082F1D08:: @ 82F1D08 struct SpritePalette .2byte 0x8000 .align 2 -gUnknown_082F1D48:: @ 82F1D48 struct SpriteTemplate - .2byte 0x8000 - .2byte 0x8000 - .4byte gUnknown_08524934 - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy +gUnknown_082F1D48:: @ 82F1D48 + spr_template 0x8000, 0x8000, gUnknown_08524934, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_082F1D60:: @ 82F1D60 @@ -2895,13 +2901,7 @@ gUnknown_082F318C:: @ 82F318C .align 2 gUnknown_082F319C:: @ 82F319C - .2byte 0x0000 @ tileTag - .2byte 0x0000 @ paletteTag - .4byte gUnknown_082F3164 - .4byte gUnknown_082F318C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0x0000, 0x0000, gUnknown_082F3164, gUnknown_082F318C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_082F31B4:: @ 82F31B4 @@ -2909,23 +2909,11 @@ gUnknown_082F31B4:: @ 82F31B4 .align 2 gUnknown_082F31BC:: @ 82F31BC - .2byte 0x0002 @ tileTag - .2byte 0x0000 @ paletteTag - .4byte gUnknown_082F31B4 - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_8020ABC + spr_template 0x0002, 0x0000, gUnknown_082F31B4, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8020ABC .align 2 gUnknown_082F31D4:: @ 82F31D4 - .2byte 0x0001 @ tileTag - .2byte 0x0000 @ paletteTag - .4byte gUnknown_082F31B4 - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_8020AF4 + spr_template 0x0001, 0x0000, gUnknown_082F31B4, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8020AF4 .align 2 gUnknown_082F31EC:: @ 82F31EC @@ -2960,23 +2948,11 @@ gUnknown_082F321C:: @ 82F321C .align 2 gUnknown_082F322C:: @ 82F322C - .2byte 0x0003 @ tileTag - .2byte 0x0000 @ paletteTag - .4byte gUnknown_082F31EC - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0x0003, 0x0000, gUnknown_082F31EC, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_082F3244:: @ 82F3244 - .2byte 0x0004 @ tileTag - .2byte 0x0000 @ paletteTag - .4byte gUnknown_082F31F4 - .4byte gUnknown_082F321C - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0x0004, 0x0000, gUnknown_082F31F4, gUnknown_082F321C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_082F325C:: @ 82F325C @@ -3243,53 +3219,23 @@ gUnknown_082F4304:: @ 82F4304 .align 2 gUnknown_082F430C:: @ 82F430C - .2byte 0x0001 @ tileTag - .2byte 0x0001 @ paletteTag - .4byte gUnknown_0852491C - .4byte gUnknown_082F42E8 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0x0001, 0x0001, gUnknown_0852491C, gUnknown_082F42E8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_082F4324:: @ 82F4324 - .2byte 0x0002 @ tileTag - .2byte 0x0002 @ paletteTag - .4byte gUnknown_08524914 - .4byte gUnknown_082F42EC - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_8022A20 + spr_template 0x0002, 0x0002, gUnknown_08524914, gUnknown_082F42EC, NULL, gDummySpriteAffineAnimTable, sub_8022A20 .align 2 gUnknown_082F433C:: @ 82F433C - .2byte 0x0003 @ tileTag - .2byte 0x0002 @ paletteTag - .4byte gUnknown_0852490C - .4byte gUnknown_082F42F4 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0x0003, 0x0002, gUnknown_0852490C, gUnknown_082F42F4, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_082F4354:: @ 82F4354 - .2byte 0x0004 @ tileTag - .2byte 0x0004 @ paletteTag - .4byte gUnknown_08524944 - .4byte gUnknown_082F42FC - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0x0004, 0x0004, gUnknown_08524944, gUnknown_082F42FC, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_082F436C:: @ 82F436C - .2byte 0x0005 @ tileTag - .2byte 0x0005 @ paletteTag - .4byte gUnknown_085249D4 - .4byte gUnknown_082F4300 - .4byte NULL - .4byte gUnknown_082F4304 - .4byte SpriteCallbackDummy + spr_template 0x0005, 0x0005, gUnknown_085249D4, gUnknown_082F4300, NULL, gUnknown_082F4304, SpriteCallbackDummy .align 2 gUnknown_082F4384:: @ 82F4384 @@ -3915,28 +3861,19 @@ gUnknown_082FB2D4:: @ 82FB2D4 .align 2 gUnknown_082FB2D8:: @ 82FB2D8 - .4byte gDodrioBerryPkmnPal - .2byte 0x0000 + obj_pal gDodrioBerryPkmnPal, 0x0000 .align 2 gUnknown_082FB2E0:: @ 82FB2E0 - .4byte gDodrioBerryShinyPal - .2byte 0x0001 + obj_pal gDodrioBerryShinyPal, 0x0001 .align 2 gUnknown_082FB2E8:: @ 82FB2E8 - .4byte gDodrioBerryStatusPal - .2byte 0x0002 + obj_pal gDodrioBerryStatusPal, 0x0002 .align 2 -gUnknown_082FB2F0:: @ 82FB2F0 struct SpriteTemplate - .2byte 0x0001 @ tileTag - .2byte 0x0002 @ paletteTag - .4byte gUnknown_082FB1E8 - .4byte gUnknown_082FB254 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte nullsub_15 +gUnknown_082FB2F0:: @ 82FB2F0 + spr_template 0x0001, 0x0002, gUnknown_082FB1E8, gUnknown_082FB254, NULL, gDummySpriteAffineAnimTable, nullsub_15 .align 2 .byte 0xD4, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44 @@ -3944,32 +3881,19 @@ gUnknown_082FB2F0:: @ 82FB2F0 struct SpriteTemplate .align 2 gUnknown_082FB314:: @ 82FB314 - .4byte gDodrioBerrySpritesPal - .2byte 0x0003 + obj_pal gDodrioBerrySpritesPal, 0x0003 .align 2 gUnknown_082FB31C:: @ 82FB31C .2byte 0x0058, 0x0080, 0x00a8, 0x00d0 .align 2 -gUnknown_082FB324:: @ 82FB324 struct SpriteTemplate - .2byte 0x0002 @ tileTag - .2byte 0x0003 @ paletteTag - .4byte gUnknown_082FB1F0 - .4byte gUnknown_082FB2A8 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy +gUnknown_082FB324:: @ 82FB324 + spr_template 0x0002, 0x0003, gUnknown_082FB1F0, gUnknown_082FB2A8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 -gUnknown_082FB33C:: @ 82FB33C struct SpriteTemplate - .2byte 0x0002 @ tileTag - .2byte 0x0003 @ paletteTag - .4byte gUnknown_082FB1E8 - .4byte gUnknown_082FB2A8 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy +gUnknown_082FB33C:: @ 82FB33C + spr_template 0x0002, 0x0003, gUnknown_082FB1E8, gUnknown_082FB2A8, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_082FB354:: @ 82FB354 @@ -3984,18 +3908,11 @@ gUnknown_082FB358:: @ 82FB358 .align 2 gUnknown_082FB360:: @ 82FB360 - .4byte gDodrioBerryPlatformPal - .2byte 0x0006 + obj_pal gDodrioBerryPlatformPal, 0x0006 .align 2 -gUnknown_082FB368:: @ 82FB368 struct SpriteTemplate - .2byte 0x0005 @ tileTag - .2byte 0x0006 @ paletteTag - .4byte gUnknown_082FB1F8 - .4byte gUnknown_082FB2D4 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte sub_8028CF4 +gUnknown_082FB368:: @ 82FB368 + spr_template 0x0005, 0x0006, gUnknown_082FB1F8, gUnknown_082FB2D4, NULL, gDummySpriteAffineAnimTable, sub_8028CF4 .align 2 gUnknown_082FB380:: @ 82FB380 @@ -4075,106 +3992,106 @@ gUnknown_082FB45C:: @ 82FB45C .align 2 gPkmnJumpSpecies:: @ 82FB464 - .2byte SPECIES_BULBASAUR, 0x0002 - .2byte SPECIES_CHARMANDER, 0x0001 - .2byte SPECIES_SQUIRTLE, 0x0000 - .2byte SPECIES_CATERPIE, 0x0001 - .2byte SPECIES_METAPOD, 0x0001 - .2byte SPECIES_WEEDLE, 0x0001 - .2byte SPECIES_KAKUNA, 0x0001 - .2byte SPECIES_RATTATA, 0x0001 - .2byte SPECIES_RATICATE, 0x0001 - .2byte SPECIES_PIKACHU, 0x0000 - .2byte SPECIES_SANDSHREW, 0x0000 - .2byte SPECIES_NIDORAN_F, 0x0000 - .2byte SPECIES_NIDORAN_M, 0x0000 - .2byte SPECIES_CLEFAIRY, 0x0000 - .2byte SPECIES_VULPIX, 0x0000 - .2byte SPECIES_JIGGLYPUFF, 0x0002 - .2byte SPECIES_ODDISH, 0x0002 - .2byte SPECIES_PARAS, 0x0001 - .2byte SPECIES_MEOWTH, 0x0000 - .2byte SPECIES_PSYDUCK, 0x0002 - .2byte SPECIES_MANKEY, 0x0001 - .2byte SPECIES_GROWLITHE, 0x0001 - .2byte SPECIES_POLIWAG, 0x0002 - .2byte SPECIES_BELLSPROUT, 0x0002 - .2byte SPECIES_SHELLDER, 0x0001 - .2byte SPECIES_KRABBY, 0x0001 - .2byte SPECIES_EXEGGCUTE, 0x0002 - .2byte SPECIES_CUBONE, 0x0000 - .2byte SPECIES_DITTO, 0x0002 - .2byte SPECIES_EEVEE, 0x0000 - .2byte SPECIES_OMANYTE, 0x0001 - .2byte SPECIES_KABUTO, 0x0001 - .2byte SPECIES_CHIKORITA, 0x0002 - .2byte SPECIES_CYNDAQUIL, 0x0001 - .2byte SPECIES_TOTODILE, 0x0000 - .2byte SPECIES_SPINARAK, 0x0001 - .2byte SPECIES_PICHU, 0x0000 - .2byte SPECIES_CLEFFA, 0x0000 - .2byte SPECIES_IGGLYBUFF, 0x0002 - .2byte SPECIES_TOGEPI, 0x0002 - .2byte SPECIES_MAREEP, 0x0000 - .2byte SPECIES_BELLOSSOM, 0x0002 - .2byte SPECIES_MARILL, 0x0002 - .2byte SPECIES_SUNKERN, 0x0002 - .2byte SPECIES_WOOPER, 0x0002 - .2byte SPECIES_PINECO, 0x0002 - .2byte SPECIES_SNUBBULL, 0x0000 - .2byte SPECIES_SHUCKLE, 0x0002 - .2byte SPECIES_TEDDIURSA, 0x0000 - .2byte SPECIES_SLUGMA, 0x0002 - .2byte SPECIES_SWINUB, 0x0000 - .2byte SPECIES_HOUNDOUR, 0x0001 - .2byte SPECIES_PHANPY, 0x0000 - .2byte SPECIES_PORYGON2, 0x0000 - .2byte SPECIES_TYROGUE, 0x0001 - .2byte SPECIES_SMOOCHUM, 0x0002 - .2byte SPECIES_ELEKID, 0x0001 - .2byte SPECIES_MAGBY, 0x0001 - .2byte SPECIES_LARVITAR, 0x0001 - .2byte SPECIES_TREECKO, 0x0001 - .2byte SPECIES_TORCHIC, 0x0002 - .2byte SPECIES_MUDKIP, 0x0000 - .2byte SPECIES_MARSHTOMP, 0x0000 - .2byte SPECIES_POOCHYENA, 0x0001 - .2byte SPECIES_ZIGZAGOON, 0x0000 - .2byte SPECIES_LINOONE, 0x0000 - .2byte SPECIES_WURMPLE, 0x0001 - .2byte SPECIES_SILCOON, 0x0002 - .2byte SPECIES_CASCOON, 0x0002 - .2byte SPECIES_LOTAD, 0x0002 - .2byte SPECIES_SEEDOT, 0x0001 - .2byte SPECIES_RALTS, 0x0000 - .2byte SPECIES_KIRLIA, 0x0000 - .2byte SPECIES_SURSKIT, 0x0002 - .2byte SPECIES_SHROOMISH, 0x0002 - .2byte SPECIES_NINCADA, 0x0001 - .2byte SPECIES_WHISMUR, 0x0000 - .2byte SPECIES_AZURILL, 0x0002 - .2byte SPECIES_SKITTY, 0x0000 - .2byte SPECIES_SABLEYE, 0x0000 - .2byte SPECIES_MAWILE, 0x0000 - .2byte SPECIES_ARON, 0x0001 - .2byte SPECIES_MEDITITE, 0x0002 - .2byte SPECIES_ELECTRIKE, 0x0001 - .2byte SPECIES_PLUSLE, 0x0001 - .2byte SPECIES_MINUN, 0x0001 - .2byte SPECIES_VOLBEAT, 0x0000 - .2byte SPECIES_ILLUMISE, 0x0000 - .2byte SPECIES_ROSELIA, 0x0002 - .2byte SPECIES_GULPIN, 0x0002 - .2byte SPECIES_NUMEL, 0x0002 - .2byte SPECIES_TORKOAL, 0x0002 - .2byte SPECIES_SPOINK, 0x0000 - .2byte SPECIES_TRAPINCH, 0x0002 - .2byte SPECIES_CACNEA, 0x0002 - .2byte SPECIES_ANORITH, 0x0001 - .2byte SPECIES_WYNAUT, 0x0000 - .2byte SPECIES_SNORUNT, 0x0000 - .2byte SPECIES_CLAMPERL, 0x0001 - .2byte SPECIES_BAGON, 0x0001 + .2byte SPECIES_BULBASAUR, 0x0002 + .2byte SPECIES_CHARMANDER, 0x0001 + .2byte SPECIES_SQUIRTLE, 0x0000 + .2byte SPECIES_CATERPIE, 0x0001 + .2byte SPECIES_METAPOD, 0x0001 + .2byte SPECIES_WEEDLE, 0x0001 + .2byte SPECIES_KAKUNA, 0x0001 + .2byte SPECIES_RATTATA, 0x0001 + .2byte SPECIES_RATICATE, 0x0001 + .2byte SPECIES_PIKACHU, 0x0000 + .2byte SPECIES_SANDSHREW, 0x0000 + .2byte SPECIES_NIDORAN_F, 0x0000 + .2byte SPECIES_NIDORAN_M, 0x0000 + .2byte SPECIES_CLEFAIRY, 0x0000 + .2byte SPECIES_VULPIX, 0x0000 + .2byte SPECIES_JIGGLYPUFF, 0x0002 + .2byte SPECIES_ODDISH, 0x0002 + .2byte SPECIES_PARAS, 0x0001 + .2byte SPECIES_MEOWTH, 0x0000 + .2byte SPECIES_PSYDUCK, 0x0002 + .2byte SPECIES_MANKEY, 0x0001 + .2byte SPECIES_GROWLITHE, 0x0001 + .2byte SPECIES_POLIWAG, 0x0002 + .2byte SPECIES_BELLSPROUT, 0x0002 + .2byte SPECIES_SHELLDER, 0x0001 + .2byte SPECIES_KRABBY, 0x0001 + .2byte SPECIES_EXEGGCUTE, 0x0002 + .2byte SPECIES_CUBONE, 0x0000 + .2byte SPECIES_DITTO, 0x0002 + .2byte SPECIES_EEVEE, 0x0000 + .2byte SPECIES_OMANYTE, 0x0001 + .2byte SPECIES_KABUTO, 0x0001 + .2byte SPECIES_CHIKORITA, 0x0002 + .2byte SPECIES_CYNDAQUIL, 0x0001 + .2byte SPECIES_TOTODILE, 0x0000 + .2byte SPECIES_SPINARAK, 0x0001 + .2byte SPECIES_PICHU, 0x0000 + .2byte SPECIES_CLEFFA, 0x0000 + .2byte SPECIES_IGGLYBUFF, 0x0002 + .2byte SPECIES_TOGEPI, 0x0002 + .2byte SPECIES_MAREEP, 0x0000 + .2byte SPECIES_BELLOSSOM, 0x0002 + .2byte SPECIES_MARILL, 0x0002 + .2byte SPECIES_SUNKERN, 0x0002 + .2byte SPECIES_WOOPER, 0x0002 + .2byte SPECIES_PINECO, 0x0002 + .2byte SPECIES_SNUBBULL, 0x0000 + .2byte SPECIES_SHUCKLE, 0x0002 + .2byte SPECIES_TEDDIURSA, 0x0000 + .2byte SPECIES_SLUGMA, 0x0002 + .2byte SPECIES_SWINUB, 0x0000 + .2byte SPECIES_HOUNDOUR, 0x0001 + .2byte SPECIES_PHANPY, 0x0000 + .2byte SPECIES_PORYGON2, 0x0000 + .2byte SPECIES_TYROGUE, 0x0001 + .2byte SPECIES_SMOOCHUM, 0x0002 + .2byte SPECIES_ELEKID, 0x0001 + .2byte SPECIES_MAGBY, 0x0001 + .2byte SPECIES_LARVITAR, 0x0001 + .2byte SPECIES_TREECKO, 0x0001 + .2byte SPECIES_TORCHIC, 0x0002 + .2byte SPECIES_MUDKIP, 0x0000 + .2byte SPECIES_MARSHTOMP, 0x0000 + .2byte SPECIES_POOCHYENA, 0x0001 + .2byte SPECIES_ZIGZAGOON, 0x0000 + .2byte SPECIES_LINOONE, 0x0000 + .2byte SPECIES_WURMPLE, 0x0001 + .2byte SPECIES_SILCOON, 0x0002 + .2byte SPECIES_CASCOON, 0x0002 + .2byte SPECIES_LOTAD, 0x0002 + .2byte SPECIES_SEEDOT, 0x0001 + .2byte SPECIES_RALTS, 0x0000 + .2byte SPECIES_KIRLIA, 0x0000 + .2byte SPECIES_SURSKIT, 0x0002 + .2byte SPECIES_SHROOMISH, 0x0002 + .2byte SPECIES_NINCADA, 0x0001 + .2byte SPECIES_WHISMUR, 0x0000 + .2byte SPECIES_AZURILL, 0x0002 + .2byte SPECIES_SKITTY, 0x0000 + .2byte SPECIES_SABLEYE, 0x0000 + .2byte SPECIES_MAWILE, 0x0000 + .2byte SPECIES_ARON, 0x0001 + .2byte SPECIES_MEDITITE, 0x0002 + .2byte SPECIES_ELECTRIKE, 0x0001 + .2byte SPECIES_PLUSLE, 0x0001 + .2byte SPECIES_MINUN, 0x0001 + .2byte SPECIES_VOLBEAT, 0x0000 + .2byte SPECIES_ILLUMISE, 0x0000 + .2byte SPECIES_ROSELIA, 0x0002 + .2byte SPECIES_GULPIN, 0x0002 + .2byte SPECIES_NUMEL, 0x0002 + .2byte SPECIES_TORKOAL, 0x0002 + .2byte SPECIES_SPOINK, 0x0000 + .2byte SPECIES_TRAPINCH, 0x0002 + .2byte SPECIES_CACNEA, 0x0002 + .2byte SPECIES_ANORITH, 0x0001 + .2byte SPECIES_WYNAUT, 0x0000 + .2byte SPECIES_SNORUNT, 0x0000 + .2byte SPECIES_CLAMPERL, 0x0001 + .2byte SPECIES_BAGON, 0x0001 .align 2 gUnknown_082FB5F4:: @ 82FB5F4 @@ -4278,43 +4195,30 @@ gPkmnJumpStarGfx:: @ 82FBC9C .align 2 gUnknown_082FBE08:: @ 82FBE08 - .4byte gPkmnJumpRopeGfx1 - .2byte 0x0600, 0x0005 + obj_tiles gPkmnJumpRopeGfx1, 0x0600, 0x0005 .align 2 - .4byte gPkmnJumpRopeGfx2 - .2byte 0x0c00, 0x0006 + obj_tiles gPkmnJumpRopeGfx2, 0x0c00, 0x0006 .align 2 - .4byte gPkmnJumpRopeGfx3 - .2byte 0x0600, 0x0007 + obj_tiles gPkmnJumpRopeGfx3, 0x0600, 0x0007 .align 2 - .4byte gPkmnJumpRopeGfx4 - .2byte 0x0600, 0x0008 + obj_tiles gPkmnJumpRopeGfx4, 0x0600, 0x0008 .align 2 - .4byte gPkmnJumpStarGfx - .2byte 0x0200, 0x000a + obj_tiles gPkmnJumpStarGfx, 0x0200, 0x000a .align 2 gUnknown_082FBE30:: @ 82FBE30 - .4byte gPkmnJumpPal1 - .2byte 0x0005 + obj_pal gPkmnJumpPal1, 0x0005 .align 2 - .4byte gPkmnJumpPal2 - .2byte 0x0006 + obj_pal gPkmnJumpPal2, 0x0006 .align 2 gUnknown_082FBE40:: @ 82FBE40 - .2byte 0x0000 @ tileTag - .2byte 0x0000 @ paletteTag - .4byte gUnknown_082FBEC8 - .4byte gDummySpriteAnimTable - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0x0000, 0x0000, gUnknown_082FBEC8, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy gUnknown_082FBE58:: @ 82FBE58 .2byte 0x0060, 0x0060, 0x0060, 0x0072, 0x0078, 0x0078, 0x0078, 0x0072 @@ -4429,43 +4333,19 @@ gUnknown_082FBF60:: @ 82FBF60 .align 2 gUnknown_082FBF78:: @ 82FBF78 - .2byte 0x0005 @ tileTag - .2byte 0x0005 @ paletteTag - .4byte gUnknown_082FBED0 - .4byte gUnknown_082FBF48 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0x0005, 0x0005, gUnknown_082FBED0, gUnknown_082FBF48, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_082FBF90:: @ 82FBF90 - .2byte 0x0006 @ tileTag - .2byte 0x0005 @ paletteTag - .4byte gUnknown_082FBED8 - .4byte gUnknown_082FBF60 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0x0006, 0x0005, gUnknown_082FBED8, gUnknown_082FBF60, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_082FBFA8:: @ 82FBFA8 - .2byte 0x0007 @ tileTag - .2byte 0x0005 @ paletteTag - .4byte gUnknown_082FBEE0 - .4byte gUnknown_082FBF48 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0x0007, 0x0005, gUnknown_082FBEE0, gUnknown_082FBF48, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_082FBFC0:: @ 82FBFC0 - .2byte 0x0008 @ tileTag - .2byte 0x0005 @ paletteTag - .4byte gUnknown_082FBEE0 - .4byte gUnknown_082FBF48 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0x0008, 0x0005, gUnknown_082FBEE0, gUnknown_082FBF48, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_082FBFD8:: @ 82FBFD8 @@ -4493,13 +4373,7 @@ gUnknown_082FC004:: @ 82FC004 .align 2 gUnknown_082FC00C:: @ 82FC00C - .2byte 0x000a @ tileTag - .2byte 0x0005 @ paletteTag - .4byte gUnknown_082FBFD8 - .4byte gUnknown_082FC004 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0x000a, 0x0005, gUnknown_082FBFD8, gUnknown_082FC004, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gPkmnJumpPal3:: @ 82FC024 @@ -4574,13 +4448,11 @@ gUnknown_082FE1DF:: @ 82FE1DF .align 2 gUnknown_082FE1EC:: @ 82FE1EC - .4byte gUnknown_082FF1F8 - .2byte 0x0000, 0x0320 + obj_tiles gUnknown_082FF1F8, 0x0000, 0x0320 .align 2 gUnknown_082FE1F4:: @ 82FE1F4 - .4byte gUnknown_082FF1D8 - .2byte 0x0320, 0x0000 + obj_pal gUnknown_082FF1D8, 0x0320 .align 2 gUnknown_082FE1FC:: @ 82FE1FC @@ -4646,17 +4518,13 @@ gPkmnJump321StartGfx1:: @ 82FE2A4 .align 2 gUnknown_082FE6C8:: @ 82FE6C8 - .4byte gPkmnJump321StartGfx1 - .2byte 0x0c00, 0x2000 - - .4byte 0x00000000, 0x00000000 + obj_tiles gPkmnJump321StartGfx1, 0x0c00, 0x2000 + null_obj_tiles .align 2 gUnknown_082FE6D8:: @ 82FE6D8 - .4byte gPkmnJump321StartPal1 - .2byte 0x2000, 0x0000 - - .4byte 0x00000000, 0x00000000 + obj_pal gPkmnJump321StartPal1, 0x2000 + null_obj_pal .align 2 gUnknown_082FE6E8:: @ 82FE6E8 @@ -4699,13 +4567,7 @@ gUnknown_082FE718:: @ 82FE718 .align 2 gUnknown_082FE730:: @ 82FE730 - .2byte 0x2000 @ tileTag - .2byte 0x2000 @ paletteTag - .4byte gUnknown_08524914 - .4byte gUnknown_082FE718 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0x2000, 0x2000, gUnknown_08524914, gUnknown_082FE718, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy .align 2 gUnknown_082FE748:: @ 82FE748 @@ -4724,13 +4586,11 @@ gPkmnJump321StartGfx2:: @ 82FE778 .align 2 gUnknown_082FEBCC:: @ 82FEBCC - .4byte gPkmnJump321StartGfx2 - .2byte 0x0e00 + obj_tiles gPkmnJump321StartGfx2, 0x0e00, 0x0000 .align 2 gUnknown_082FEBD4:: @ 82FEBD4 - .4byte gPkmnJump321StartPal2 - .2byte 0x0000, 0x0000 + obj_pal gPkmnJump321StartPal2, 0x0000 .align 2 gUnknown_082FEBDC:: @ 82FEBDC @@ -4818,20 +4678,8 @@ gUnknown_082FEC80:: @ 82FEC80 .4byte gUnknown_082FEC60 gUnknown_082FEC90:: @ 82FEC90 - .2byte 0x0000 @ tileTag - .2byte 0x0000 @ paletteTag - .4byte gUnknown_082FEBDC - .4byte gUnknown_082FEC04 - .4byte NULL - .4byte gUnknown_082FEC80 - .4byte SpriteCallbackDummy + spr_template 0x0000, 0x0000, gUnknown_082FEBDC, gUnknown_082FEC04, NULL, gUnknown_082FEC80, SpriteCallbackDummy gUnknown_082FECA8:: @ 82FECA8 - .2byte 0x0000 @ tileTag - .2byte 0x0000 @ paletteTag - .4byte gUnknown_082FEBE4 - .4byte gUnknown_082FEC20 - .4byte NULL - .4byte gDummySpriteAffineAnimTable - .4byte SpriteCallbackDummy + spr_template 0x0000, 0x0000, gUnknown_082FEBE4, gUnknown_082FEC20, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy diff --git a/data/multiboot_berry_glitch_fix.s b/data/multiboot_berry_glitch_fix.s index bc97eb553..c77fc2c5e 100644 --- a/data/multiboot_berry_glitch_fix.s +++ b/data/multiboot_berry_glitch_fix.s @@ -1,8 +1,5 @@ .section .rodata -gUnknown_089A6550:: @ 89A6550 - .incbin "baserom.gba", 0x9a6550, 0xc0 - -gMultiBootProgram_BerryGlitchFix_Start:: @ 89A6610 - .incbin "baserom.gba", 0x9a6610, 0x3b34 -gMultiBootProgram_BerryGlitchFix_End:: +gMultiBootProgram_BerryGlitchFix_Start:: @ 89A6550 + .incbin "data/berry_fix.mb" +gMultiBootProgram_BerryGlitchFix_End:: @ 89AA144 diff --git a/data/multiboot_pokemon_colosseum.s b/data/multiboot_pokemon_colosseum.s index 4c0282068..59d0b430d 100644 --- a/data/multiboot_pokemon_colosseum.s +++ b/data/multiboot_pokemon_colosseum.s @@ -1,5 +1,5 @@ .section .rodata gMultiBootProgram_PokemonColosseum_Start:: @ 89AA144 - .incbin "baserom.gba", 0x9aa144, 0x28000 + .incbin "data/pokemon_colosseum.mb" gMultiBootProgram_PokemonColosseum_End:: diff --git a/data/pokemon_colosseum.mb b/data/pokemon_colosseum.mb new file mode 100644 index 0000000000000000000000000000000000000000..fdeb854a054ba02191f6a209ec5b649f21c4e335 GIT binary patch literal 163840 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 literal 0 HcmV?d00001 diff --git a/graphics/credits/credits_1.pal b/graphics/credits/credits_1.pal new file mode 100644 index 000000000..222be7101 --- /dev/null +++ b/graphics/credits/credits_1.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 255 255 +164 164 164 +255 230 123 +255 82 41 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/credits/credits_2.pal b/graphics/credits/credits_2.pal new file mode 100644 index 000000000..7dac48572 --- /dev/null +++ b/graphics/credits/credits_2.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 230 123 +255 82 41 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/credits/credits_3.pal b/graphics/credits/credits_3.pal new file mode 100644 index 000000000..cbd66ec0c --- /dev/null +++ b/graphics/credits/credits_3.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +131 65 32 +16 0 0 +8 139 65 +8 8 0 +8 8 0 +8 8 0 +148 131 32 +16 8 0 diff --git a/graphics/credits/credits_4.pal b/graphics/credits/credits_4.pal new file mode 100644 index 000000000..2df49dc85 --- /dev/null +++ b/graphics/credits/credits_4.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 74 65 +16 65 65 +131 131 32 +148 131 65 +8 139 65 +8 139 0 +8 8 32 +148 131 0 +148 65 65 +16 74 65 +0 139 65 +0 131 65 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/credits/the_end_copyright.png b/graphics/credits/the_end_copyright.png new file mode 100644 index 0000000000000000000000000000000000000000..e226adf5d0c06b781ac57ed0d8cd0d8c002d7003 GIT binary patch literal 962 zcmV;z13mnSP)UW;j0`d*6ORVzO2@-Kq?bRHdFV@U@c;;n>&L+ zAN8j@%}%TS(%r79NPh=%2*JYGm3>6T4xjW$V$N1K%G&r zuWvvIEj`LLjQt}JYyi|XfxuBWpsSGbo`}Iw_Y^heo1z_Jb(_3)i9vk1Cbc*vpFM{Ws<8no4h$wm*Qk5rd) zSgmA2Bwf+?GVmSbGBnD9R9g)RRM{Gr=E=E$u+Is^om|P5!BNh!{|Qt>?~OpcAhWq% z7a$3bDt#l+6d&hA6NsK;EwYB04Mf2!0BshkLG;GZLPqHktOAJik|XzsD!6a*dH5}l zWm?;t((Z5r!?(9J|K*x~+vGct%OQXwA!S6t0nmV0JnYVDG$0i}OL3s$c+nCil;s9} zLEY*;RI+9uG^<%#a0;Oi$z#qj?Ndroiw<*-fW|*5Hm5WFTIr=LPaA$@L|2x#|7kj(xc$0YN-44$f6g8%dNo{IjT|gP9SphmX=FZ zHxjBJiqcGf9w`>?o1`yIS+Hd1q3|f3Aseqi($>rC9!UHoAvQ$sOE!Ni3JNS;;nAI? z2U!SZK@F%)5MkVGu=`aHd(Ok|WOp!@}LNm_)Swd6!0fdct zakydh$GntS0p`7KwzF`gY!)DthIW=7{_8B^AvQTZYJ%ENpca=QfRZCoW{qlsM=U<% zD{i+TvnIhVYAizwj$X3yAFTlLaL8lHaao#Wn{&3;`gA9K=x8z2(Ju%R`Q2Ca4?t*G zi0i7`0icQWK)>LSZ@XBXV)+7u%~+?5Cw?Mr0c6Zj-!HM;0)a$#1}?N1`5oa-kL-}` z`~~v`XmAl-*kj~af!gq&L?AmW(>>5p^OA7q7TN-+=jGX_SbhLa!h4rd~5fi&j)U*^yQsl;d;0{{R307*qoM6N<$f>m$2KmY&$ literal 0 HcmV?d00001 diff --git a/graphics/interface/berry_tag_screen.pal b/graphics/interface/berry_tag_screen.pal new file mode 100644 index 000000000..a55550e8f --- /dev/null +++ b/graphics/interface/berry_tag_screen.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 255 255 +255 255 255 +98 98 98 +213 213 205 +230 8 8 +255 189 115 +32 156 8 +148 246 148 +49 82 205 +164 197 246 +0 0 0 +0 0 0 +0 0 0 +189 131 65 +65 32 0 +238 222 172 diff --git a/graphics/misc/cable_car.pal b/graphics/misc/cable_car.pal new file mode 100644 index 000000000..64985f6da --- /dev/null +++ b/graphics/misc/cable_car.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 255 255 +164 222 222 +98 139 139 +139 180 180 +131 131 139 +98 98 123 +65 74 106 +41 49 90 +139 205 246 +98 172 238 +255 255 148 +238 213 82 +213 172 16 +180 106 0 +139 65 0 diff --git a/graphics/misc/cable_car.png b/graphics/misc/cable_car.png new file mode 100644 index 0000000000000000000000000000000000000000..67f581fb978095c524a84e9317ec075a5eb2136a GIT binary patch literal 556 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 AQUCw| literal 0 HcmV?d00001 diff --git a/graphics/misc/cable_car_cord.png b/graphics/misc/cable_car_cord.png new file mode 100644 index 0000000000000000000000000000000000000000..b8176d3ca157e05ce97b07bd8c450a8a194c21ea GIT binary patch literal 147 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=9cj|6g+NUQ%~=_m(Zq z&D}{!)s9|Snubx`XTK$_dH4VSly_HyuC5W-lEu*N$Z+rE+CZQlIZqeI5RRG22@Q>W r5{Frj8MSS+I+1v=$Mo0+26+Ys@h3c%nn?+*K$Q%hu6{1-oD!MDT4r?5LY1m|Ns9b_wFTicXw~u z(%jsglvM5Lm8EGI)qVC`(wcYw|4(^$HR$RZfh}1K-Hr_RPOc3E>QVD_aSY*@nXJ*y z)b{G`?(Of{l2{ghdw2JBdZWa_9ejyblq6&W7#O6RbWUcy`BMzk!QkoY=d#Wzp$P!T CfI21s literal 0 HcmV?d00001 diff --git a/graphics/misc/cable_car_mountain_map.bin b/graphics/misc/cable_car_mountain_map.bin new file mode 100644 index 000000000..3d4e092bc --- /dev/null +++ b/graphics/misc/cable_car_mountain_map.bin @@ -0,0 +1 @@ +ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ð!ñ!ò!ñ!ò!ñ!ò!ñ!ò!ñ!ò!ñ!ò!ñ!ò!ñ!ò!ñ!ò!ñ!ò!ñ!ò!ñ!ò!ñ!ò!ñ!ò!ñ!ò!ó!ô!ó!ô!ó!ô!ó!ô!ó!ô!ó!ô!ó!ô!ó!ô!ó!ô!ó!ô!ó!ô!ó!ô!ó!ô!ó!ô!ó!ô!õ!ö!õ!ö!õ!ö!õ!ö!õ!ö!õ!ö!õ!ö!õ!ö!õ!ö!õ!ö!õ!ö!õ!ö!õ!ö!õ!ö!õ!ö!÷!ø!÷!ø!÷!ø!÷!ø!÷!ø!÷!ø!÷!ø!÷!ø!÷!ø!÷!ø!÷!ø!÷!ø!÷!ø!÷!ø!÷!ø!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!ù!a!b!c!d!e!f!g!h!i!j!k!l!m!n!o!¡!¢!£!¤!¥!¦!§!¨!©!ª!«!¬!­!®!¯!q!r!s!t!u!v!w!x!y!z!{!|!}!~!!±!²!³!´!µ!¶!·!¸!¹!º!»!¼!½!¾!¿!!‚!ƒ!„!…!†!‡!ˆ!‰!Š!‹!Œ!!Ž!!Á!Â!Ã!Ä!Å!Æ!Ç!È!É!Ê!Ë!Ì!Í!Î!Ï!‘!’!“!”!•!–!—!˜!™!š!›!œ!!ž!Ÿ!Ñ!Ò!Ó!Ô!Õ!Ö!×!Ø!Ù!Ú!Û!Ü!Ý!Þ!ß!°!À!°!À!°!À!°!À!°!À!°!À!°!À!°!À!°!À!°!À!°!À!°!À!°!À!°!À!°!À!Ð!à!Ð!à!Ð!à!Ð!à!Ð!à!Ð!à!Ð!à!Ð!à!Ð!à!Ð!à!Ð!à!Ð!à!Ð!à!Ð!à!Ð!à!á!â!á!â!á!â!á!â!á!â!á!â!á!â!á!â!á!â!á!â!á!â!á!â!á!â!á!â!á!â!ã!ä!ã!ä!ã!ä!ã!ä!ã!ä!ã!ä!ã!ä!ã!ä!ã!ä!ã!ä!ã!ä!ã!ä!ã!ä!ã!ä!ã!ä!å!æ!å!æ!å!æ!å!æ!å!æ!å!æ!å!æ!å!æ!å!æ!å!æ!å!æ!å!æ!å!æ!å!æ!å!æ!ç!è!ç!è!ç!è!ç!è!ç!è!ç!è!ç!è!ç!è!ç!è!ç!è!ç!è!ç!è!ç!è!ç!è!ç!è!é!ê!é!ê!é!ê!é!ê!é!ê!é!ê!é!ê!é!ê!é!ê!é!ê!é!ê!é!ê!é!ê!é!ê!é!ê!ë!ì!ë!ì!ë!ì!ë!ì!ë!ì!ë!ì!ë!ì!ë!ì!ë!ì!ë!ì!ë!ì!ë!ì!ë!ì!ë!ì!ë!ì! \ No newline at end of file diff --git a/graphics/misc/cable_car_mt_chimney_map.bin b/graphics/misc/cable_car_mt_chimney_map.bin new file mode 100644 index 0000000000000000000000000000000000000000..8ae7818bfbc7bd295752b8526559d973d5cef2ca GIT binary patch literal 360 zcmaLNNjDY%0EOY_Cm>2}h@xyrGHoc8Y7+OJ@?-C&64eoyK>xf-vhZGdgQSu^5iSd#EEy^4G9t@xhdH#DQ-)Z zCS8V1wd&Ms(5OkXx88ZLMXNR+wCnKEC!M-<>(T48KK%v^`eMki5u?V8`)b0ZDbv20 o@!b!z=FD5LXvwmlR;*g{%Wr@DwQj?vE!%eN+OzM#p?{A22a0z~IRF3v literal 0 HcmV?d00001 diff --git a/graphics/misc/cable_car_pylon_stem_map.bin b/graphics/misc/cable_car_pylon_stem_map.bin new file mode 100644 index 000000000..e6f12efc6 --- /dev/null +++ b/graphics/misc/cable_car_pylon_stem_map.bin @@ -0,0 +1,2 @@ + +0 0 0 000000000000000000000000000000000000000000000000000000000 \ No newline at end of file diff --git a/graphics/misc/cable_car_tree_map.bin b/graphics/misc/cable_car_tree_map.bin new file mode 100644 index 0000000000000000000000000000000000000000..1e9b7a8f819a09d3bf40bd1a7bc815ca3a976590 GIT binary patch literal 960 zcmd_f#a4o000v>Z;~l$E5WBm5Cu)FgTzQw=v%$e2WXIU#+)tc6|p-pXR zTRYm-o&pMLUw(rh=uk&G)`?DarjWuq*M%;1rEA^jRwlpGy&m+aCq3&$uX@wFKJ=+C zed|ZRGI<1%L=jC4vBVKi0*NG%ObV%_k&ej)WROV~+2oK*9{ChdND;-9V8i64lwrp~ zIZi65q>5^4sHKj28fe7iO*GR&D{ZvXK_^{w(?c(P^fQ19le-yYh+#$;#lsk0#+hIe YA5%;-gUM%^!^-nmYk@_qyu|mb.masterp = gUnknown_089A6550; + berry_fix_mb_manager->mb.masterp = gMultiBootProgram_BerryGlitchFix_Start; berry_fix_mb_manager->mb.server_type = 0; MultiBootInit(&berry_fix_mb_manager->mb); berry_fix_mb_manager->unk2 = 0; @@ -189,7 +188,7 @@ static void berry_fix_main(void) } else if (++ berry_fix_mb_manager->unk2 > 180) { - MultiBootStartMaster(&berry_fix_mb_manager->mb, gMultiBootProgram_BerryGlitchFix_Start, (u32)(gMultiBootProgram_BerryGlitchFix_End - gMultiBootProgram_BerryGlitchFix_Start), 4, 1); + MultiBootStartMaster(&berry_fix_mb_manager->mb, gMultiBootProgram_BerryGlitchFix_Start + ROM_HEADER_SIZE, (u32)(gMultiBootProgram_BerryGlitchFix_End - (gMultiBootProgram_BerryGlitchFix_Start + ROM_HEADER_SIZE)), 4, 1); berry_fix_mb_manager->state = 5; } break; From 3093d770ee66761ded30bbf66d85489507232984 Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Mon, 25 Sep 2017 16:42:01 -0500 Subject: [PATCH 292/342] Correct battle AI prefix --- data/battle_ai_scripts.s | 92 ++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/data/battle_ai_scripts.s b/data/battle_ai_scripts.s index abca5eba5..834c4bf9d 100644 --- a/data/battle_ai_scripts.s +++ b/data/battle_ai_scripts.s @@ -5,77 +5,77 @@ .align 2 gBattleAI_ScriptsTable:: @ 82DBEF8 - .4byte gBattleScript_82DBF78 - .4byte gBattleScript_82DDE3F - .4byte gBattleScript_82DC7B0 - .4byte gBattleScript_82DDE71 - .4byte gBattleScript_82DDEDD - .4byte gBattleScript_82DDEC8 - .4byte gBattleScript_82DDF09 - .4byte gBattleScript_82DDFB4 - .4byte gBattleScript_82DE193 - .4byte gBattleScript_82DE2ED - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE34E - .4byte gBattleScript_82DE309 - .4byte gBattleScript_82DE337 - .4byte gBattleScript_82DE33E + .4byte gBattleAIScript_82DBF78 + .4byte gBattleAIScript_82DDE3F + .4byte gBattleAIScript_82DC7B0 + .4byte gBattleAIScript_82DDE71 + .4byte gBattleAIScript_82DDEDD + .4byte gBattleAIScript_82DDEC8 + .4byte gBattleAIScript_82DDF09 + .4byte gBattleAIScript_82DDFB4 + .4byte gBattleAIScript_82DE193 + .4byte gBattleAIScript_82DE2ED + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE309 + .4byte gBattleAIScript_82DE337 + .4byte gBattleAIScript_82DE33E -gBattleScript_82DBF78:: @ 82DBF78 +gBattleAIScript_82DBF78:: @ 82DBF78 .incbin "baserom.gba", 0x2dbf78, 0x838 -gBattleScript_82DC7B0:: @ 82DC7B0 +gBattleAIScript_82DC7B0:: @ 82DC7B0 .incbin "baserom.gba", 0x2dc7b0, 0x168F -gBattleScript_82DDE3F:: @ 82DDE3F +gBattleAIScript_82DDE3F:: @ 82DDE3F .incbin "baserom.gba", 0x2dde3f, 0x32 -gBattleScript_82DDE71:: @ 82DDE71 +gBattleAIScript_82DDE71:: @ 82DDE71 .incbin "baserom.gba", 0x2dde71, 0x57 -gBattleScript_82DDEC8:: @ 82DDEC8 +gBattleAIScript_82DDEC8:: @ 82DDEC8 .incbin "baserom.gba", 0x2ddec8, 0x15 -gBattleScript_82DDEDD:: @ 82DDEDD +gBattleAIScript_82DDEDD:: @ 82DDEDD .incbin "baserom.gba", 0x2ddedd, 0x2c -gBattleScript_82DDF09:: @ 82DDF09 +gBattleAIScript_82DDF09:: @ 82DDF09 .incbin "baserom.gba", 0x2ddf09, 0xab -gBattleScript_82DDFB4:: @ 82DDFB4 +gBattleAIScript_82DDFB4:: @ 82DDFB4 .incbin "baserom.gba", 0x2ddfb4, 0x1df -gBattleScript_82DE193:: @ 82DE193 +gBattleAIScript_82DE193:: @ 82DE193 .incbin "baserom.gba", 0x2de193, 0x15a -gBattleScript_82DE2ED:: @ 82DE2ED +gBattleAIScript_82DE2ED:: @ 82DE2ED .incbin "baserom.gba", 0x2de2ed, 0x1c -gBattleScript_82DE309:: @ 82DE309 +gBattleAIScript_82DE309:: @ 82DE309 .incbin "baserom.gba", 0x2de309, 0x2e -gBattleScript_82DE337:: @ 82DE337 +gBattleAIScript_82DE337:: @ 82DE337 .incbin "baserom.gba", 0x2de337, 0x7 -gBattleScript_82DE33E:: @ 82DE33E +gBattleAIScript_82DE33E:: @ 82DE33E .incbin "baserom.gba", 0x2de33e, 0x10 -gBattleScript_82DE34E:: @ 82DE34E +gBattleAIScript_82DE34E:: @ 82DE34E .incbin "baserom.gba", 0x2de34e, 0x2 From 6f230848f62d1229ec46407b0a7411f1d41c6014 Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Mon, 25 Sep 2017 20:24:14 -0500 Subject: [PATCH 293/342] Add window_template_terminator macro --- asm/macros/window.inc | 4 ++++ data/berry_tag_screen.s | 2 +- data/clear_save_data_screen.s | 2 +- data/credits.s | 2 +- data/link.s | 20 +++++++++----------- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/asm/macros/window.inc b/asm/macros/window.inc index 04c148114..b7291138b 100644 --- a/asm/macros/window.inc +++ b/asm/macros/window.inc @@ -8,6 +8,10 @@ .2byte \vram_tile_offset .endm + .macro window_template_terminator + window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + .endm + .macro glyph_width_func font_id, func .4byte \font_id .4byte \func diff --git a/data/berry_tag_screen.s b/data/berry_tag_screen.s index 197f3c7d8..01a44bb14 100644 --- a/data/berry_tag_screen.s +++ b/data/berry_tag_screen.s @@ -23,7 +23,7 @@ gUnknown_085EFD28:: @ 85EFD28 window_template 0x01, 0x0b, 0x07, 0x12, 0x04, 0x0f, 0x0055 window_template 0x01, 0x04, 0x0e, 0x19, 0x04, 0x0f, 0x009d window_template 0x00, 0x02, 0x00, 0x08, 0x02, 0x0f, 0x0101 - window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + window_template_terminator .align 2 gBerryFirmnessStringPointers:: @ 85EFD50 diff --git a/data/clear_save_data_screen.s b/data/clear_save_data_screen.s index 8e30a6303..3abf9bf6d 100644 --- a/data/clear_save_data_screen.s +++ b/data/clear_save_data_screen.s @@ -10,7 +10,7 @@ gUnknown_085F06C0:: @ 85F06C0 .align 2 gUnknown_085F06C8:: @ 85F06C8 window_template 0x00, 0x03, 0x0f, 0x1a, 0x04, 0x0f, 0x000b - window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + window_template_terminator .align 2 gUnknown_085F06D8:: @ 85F06D8 diff --git a/data/credits.s b/data/credits.s index 5e1e83c8b..cc75915a0 100644 --- a/data/credits.s +++ b/data/credits.s @@ -1493,7 +1493,7 @@ gUnknown_085E6F68:: @ 85E6F68 struct BgTemplate .align 2 gUnknown_085E6F6C:: @ 85E6F6C window_template 0x00, 0x00, 0x09, 0x1e, 0x0c, 0x08, 0x0001 - window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + window_template_terminator .align 2 gUnknown_085E6F7C:: @ 85E6F7C diff --git a/data/link.s b/data/link.s index 2ce6b49ba..d9cf886c5 100644 --- a/data/link.s +++ b/data/link.s @@ -57,12 +57,9 @@ gUnknown_082ED1FC:: @ 82ED1FC BgTemplate .align 2 gUnknown_082ED204:: @ 82ED204 window_template 0x00, 0x00, 0x00, 0x1E, 0x05, 0x0F, 0x0002 - window_template 0x00, 0x00, 0x06, 0x1E, 0x07, 0x0F, 0x0098 - window_template 0x00, 0x00, 0x0D, 0x1E, 0x07, 0x0F, 0x016A - - window_template 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + window_template_terminator .align 2 gUnknown_082ED224:: @ 82ED224 @@ -1889,7 +1886,7 @@ gUnknown_082F05A8:: @ 82F05A8 window_template 0x00, 0x00, 0x00, 0x1e, 0x02, 0x0c, 0x0013 window_template 0x00, 0x01, 0x0f, 0x1c, 0x04, 0x0c, 0x004f window_template 0x00, 0x00, 0x0f, 0x1e, 0x05, 0x0d, 0x004f - window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + window_template_terminator .align 2 gUnknown_082F05C8:: @ 82F05C8 @@ -2073,7 +2070,7 @@ gUnknown_082F0D3C:: @ 82F0D3C window_template 0x00, 0x03, 0x00, 0x18, 0x03, 0x0f, 0x0001 window_template 0x00, 0x03, 0x04, 0x15, 0x0f, 0x0f, 0x0049 window_template 0x00, 0x18, 0x04, 0x03, 0x0f, 0x0f, 0x0184 - window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + window_template_terminator .align 2 gUnknown_082F0D5C:: @ 82F0D5C @@ -2105,7 +2102,7 @@ gUnknown_082F0DD0:: @ 82F0DD0 .align 2 gUnknown_082F0DD4:: @ 82F0DD4 window_template 0x00, 0x03, 0x0f, 0x18, 0x04, 0x0e, 0x0014 - window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + window_template_terminator .align 2 gUnknown_082F0DE4:: @ 82F0DE4 @@ -2758,7 +2755,7 @@ gUnknown_082F2C70:: @ 82F2C70 window_template 0x01, 0x09, 0x12, 0x0f, 0x02, 0x0c, 0x007a window_template 0x01, 0x00, 0x02, 0x06, 0x0f, 0x07, 0x0020 window_template 0x00, 0x01, 0x02, 0x07, 0x09, 0x0e, 0x0013 - window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + window_template_terminator .align 2 gUnknown_082F2C98:: @ 82F2C98 @@ -3025,11 +3022,12 @@ gUnknown_082F32F4:: @ 82F32F4 window_template 0x00, 0x00, 0x06, 0x09, 0x02, 0x08, 0x03c9 window_template 0x00, 0x15, 0x03, 0x09, 0x02, 0x08, 0x03b7 window_template 0x00, 0x15, 0x06, 0x09, 0x02, 0x08, 0x03a5 - window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + window_template_terminator + window_template 0x00, 0x05, 0x02, 0x14, 0x10, 0x0f, 0x0001 window_template 0x00, 0x05, 0x02, 0x14, 0x10, 0x0f, 0x0001 window_template 0x00, 0x04, 0x02, 0x16, 0x10, 0x0f, 0x0001 - window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + window_template_terminator .align 2 gUnknown_082F3344:: @ 82F3344 @@ -4423,7 +4421,7 @@ gUnknown_082FE164:: @ 82FE164 struct BgTemplate gUnknown_082FE174:: @ 82FE174 window_template 0x00, 0x13, 0x00, 0x06, 0x02, 0x02, 0x0013 window_template 0x00, 0x08, 0x00, 0x06, 0x02, 0x02, 0x001f - window_template 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 + window_template_terminator .align 2 gUnknown_082FE18C:: @ 82FE18C From 3db01d1867fc6c270298f385e1ee5f39a2c08b59 Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Mon, 25 Sep 2017 21:28:30 -0500 Subject: [PATCH 294/342] Correct battle AI prefix again --- data/battle_ai_scripts.s | 92 ++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/data/battle_ai_scripts.s b/data/battle_ai_scripts.s index 834c4bf9d..022664958 100644 --- a/data/battle_ai_scripts.s +++ b/data/battle_ai_scripts.s @@ -5,77 +5,77 @@ .align 2 gBattleAI_ScriptsTable:: @ 82DBEF8 - .4byte gBattleAIScript_82DBF78 - .4byte gBattleAIScript_82DDE3F - .4byte gBattleAIScript_82DC7B0 - .4byte gBattleAIScript_82DDE71 - .4byte gBattleAIScript_82DDEDD - .4byte gBattleAIScript_82DDEC8 - .4byte gBattleAIScript_82DDF09 - .4byte gBattleAIScript_82DDFB4 - .4byte gBattleAIScript_82DE193 - .4byte gBattleAIScript_82DE2ED - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE34E - .4byte gBattleAIScript_82DE309 - .4byte gBattleAIScript_82DE337 - .4byte gBattleAIScript_82DE33E + .4byte AIS_82DBF78 + .4byte AIS_82DDE3F + .4byte AIS_82DC7B0 + .4byte AIS_82DDE71 + .4byte AIS_82DDEDD + .4byte AIS_82DDEC8 + .4byte AIS_82DDF09 + .4byte AIS_82DDFB4 + .4byte AIS_82DE193 + .4byte AIS_82DE2ED + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE34E + .4byte AIS_82DE309 + .4byte AIS_82DE337 + .4byte AIS_82DE33E -gBattleAIScript_82DBF78:: @ 82DBF78 +AIS_82DBF78:: @ 82DBF78 .incbin "baserom.gba", 0x2dbf78, 0x838 -gBattleAIScript_82DC7B0:: @ 82DC7B0 +AIS_82DC7B0:: @ 82DC7B0 .incbin "baserom.gba", 0x2dc7b0, 0x168F -gBattleAIScript_82DDE3F:: @ 82DDE3F +AIS_82DDE3F:: @ 82DDE3F .incbin "baserom.gba", 0x2dde3f, 0x32 -gBattleAIScript_82DDE71:: @ 82DDE71 +AIS_82DDE71:: @ 82DDE71 .incbin "baserom.gba", 0x2dde71, 0x57 -gBattleAIScript_82DDEC8:: @ 82DDEC8 +AIS_82DDEC8:: @ 82DDEC8 .incbin "baserom.gba", 0x2ddec8, 0x15 -gBattleAIScript_82DDEDD:: @ 82DDEDD +AIS_82DDEDD:: @ 82DDEDD .incbin "baserom.gba", 0x2ddedd, 0x2c -gBattleAIScript_82DDF09:: @ 82DDF09 +AIS_82DDF09:: @ 82DDF09 .incbin "baserom.gba", 0x2ddf09, 0xab -gBattleAIScript_82DDFB4:: @ 82DDFB4 +AIS_82DDFB4:: @ 82DDFB4 .incbin "baserom.gba", 0x2ddfb4, 0x1df -gBattleAIScript_82DE193:: @ 82DE193 +AIS_82DE193:: @ 82DE193 .incbin "baserom.gba", 0x2de193, 0x15a -gBattleAIScript_82DE2ED:: @ 82DE2ED +AIS_82DE2ED:: @ 82DE2ED .incbin "baserom.gba", 0x2de2ed, 0x1c -gBattleAIScript_82DE309:: @ 82DE309 +AIS_82DE309:: @ 82DE309 .incbin "baserom.gba", 0x2de309, 0x2e -gBattleAIScript_82DE337:: @ 82DE337 +AIS_82DE337:: @ 82DE337 .incbin "baserom.gba", 0x2de337, 0x7 -gBattleAIScript_82DE33E:: @ 82DE33E +AIS_82DE33E:: @ 82DE33E .incbin "baserom.gba", 0x2de33e, 0x10 -gBattleAIScript_82DE34E:: @ 82DE34E +AIS_82DE34E:: @ 82DE34E .incbin "baserom.gba", 0x2de34e, 0x2 From 60b0fd8b39d1bc5a4692d0ed5610552a13cbf93e Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Tue, 26 Sep 2017 00:19:20 -0500 Subject: [PATCH 295/342] Rename battle AI prefix to something agreeable --- data/battle_ai_scripts.s | 92 ++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/data/battle_ai_scripts.s b/data/battle_ai_scripts.s index 022664958..834c4bf9d 100644 --- a/data/battle_ai_scripts.s +++ b/data/battle_ai_scripts.s @@ -5,77 +5,77 @@ .align 2 gBattleAI_ScriptsTable:: @ 82DBEF8 - .4byte AIS_82DBF78 - .4byte AIS_82DDE3F - .4byte AIS_82DC7B0 - .4byte AIS_82DDE71 - .4byte AIS_82DDEDD - .4byte AIS_82DDEC8 - .4byte AIS_82DDF09 - .4byte AIS_82DDFB4 - .4byte AIS_82DE193 - .4byte AIS_82DE2ED - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE34E - .4byte AIS_82DE309 - .4byte AIS_82DE337 - .4byte AIS_82DE33E + .4byte gBattleAIScript_82DBF78 + .4byte gBattleAIScript_82DDE3F + .4byte gBattleAIScript_82DC7B0 + .4byte gBattleAIScript_82DDE71 + .4byte gBattleAIScript_82DDEDD + .4byte gBattleAIScript_82DDEC8 + .4byte gBattleAIScript_82DDF09 + .4byte gBattleAIScript_82DDFB4 + .4byte gBattleAIScript_82DE193 + .4byte gBattleAIScript_82DE2ED + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE34E + .4byte gBattleAIScript_82DE309 + .4byte gBattleAIScript_82DE337 + .4byte gBattleAIScript_82DE33E -AIS_82DBF78:: @ 82DBF78 +gBattleAIScript_82DBF78:: @ 82DBF78 .incbin "baserom.gba", 0x2dbf78, 0x838 -AIS_82DC7B0:: @ 82DC7B0 +gBattleAIScript_82DC7B0:: @ 82DC7B0 .incbin "baserom.gba", 0x2dc7b0, 0x168F -AIS_82DDE3F:: @ 82DDE3F +gBattleAIScript_82DDE3F:: @ 82DDE3F .incbin "baserom.gba", 0x2dde3f, 0x32 -AIS_82DDE71:: @ 82DDE71 +gBattleAIScript_82DDE71:: @ 82DDE71 .incbin "baserom.gba", 0x2dde71, 0x57 -AIS_82DDEC8:: @ 82DDEC8 +gBattleAIScript_82DDEC8:: @ 82DDEC8 .incbin "baserom.gba", 0x2ddec8, 0x15 -AIS_82DDEDD:: @ 82DDEDD +gBattleAIScript_82DDEDD:: @ 82DDEDD .incbin "baserom.gba", 0x2ddedd, 0x2c -AIS_82DDF09:: @ 82DDF09 +gBattleAIScript_82DDF09:: @ 82DDF09 .incbin "baserom.gba", 0x2ddf09, 0xab -AIS_82DDFB4:: @ 82DDFB4 +gBattleAIScript_82DDFB4:: @ 82DDFB4 .incbin "baserom.gba", 0x2ddfb4, 0x1df -AIS_82DE193:: @ 82DE193 +gBattleAIScript_82DE193:: @ 82DE193 .incbin "baserom.gba", 0x2de193, 0x15a -AIS_82DE2ED:: @ 82DE2ED +gBattleAIScript_82DE2ED:: @ 82DE2ED .incbin "baserom.gba", 0x2de2ed, 0x1c -AIS_82DE309:: @ 82DE309 +gBattleAIScript_82DE309:: @ 82DE309 .incbin "baserom.gba", 0x2de309, 0x2e -AIS_82DE337:: @ 82DE337 +gBattleAIScript_82DE337:: @ 82DE337 .incbin "baserom.gba", 0x2de337, 0x7 -AIS_82DE33E:: @ 82DE33E +gBattleAIScript_82DE33E:: @ 82DE33E .incbin "baserom.gba", 0x2de33e, 0x10 -AIS_82DE34E:: @ 82DE34E +gBattleAIScript_82DE34E:: @ 82DE34E .incbin "baserom.gba", 0x2de34e, 0x2 From def827fcd48353d8a0292db249d26ac7a85b54ef Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 26 Sep 2017 08:30:12 -0400 Subject: [PATCH 296/342] Capitalize all gUnknown labels --- data/event_scripts.s | 190 ++--- data/script_menu.s | 992 +++++++++++------------ data/strings.s | 1820 +++++++++++++++++++++--------------------- 3 files changed, 1501 insertions(+), 1501 deletions(-) diff --git a/data/event_scripts.s b/data/event_scripts.s index b3aa055d8..e4293570d 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -184,23 +184,23 @@ gUnknown_0827266F:: @ 827266F .string "Which PC should be accessed?$" -gUnknown_0827268c:: @ 827268C +gUnknown_0827268C:: @ 827268C .string "Accessed SOMEONE’S PC.$" -gUnknown_082726a3:: @ 82726A3 +gUnknown_082726A3:: @ 82726A3 .string "POKéMON Storage System opened.$" -gUnknown_082726c2:: @ 82726C2 +gUnknown_082726C2:: @ 82726C2 .string "Accessed {PLAYER}’s PC.$" -gUnknown_082726d4:: @ 82726D4 +gUnknown_082726D4:: @ 82726D4 .string "Accessed LANETTE’s PC.$" -gUnknown_082726eb:: @ 82726EB +gUnknown_082726EB:: @ 82726EB .string "Hello, and welcome to\nthe POKéMON CENTER.\pWe restore your tired POKéMON\nto full health.\pWould you like to rest your POKéMON?$" @@ -212,11 +212,11 @@ gUnknown_08272798:: @ 8272798 .string "Thank you for waiting.\pWe’ve restored your POKéMON\nto full health.$" -gUnknown_082727db:: @ 82727DB +gUnknown_082727DB:: @ 82727DB .string "We hope to see you again!$" -gUnknown_082727f5:: @ 82727F5 +gUnknown_082727F5:: @ 82727F5 .string "Hello, and welcome to\nthe POKéMON CENTER.\pWe restore your tired POKéMON\nto full health.\pWould you like to…$" @@ -228,147 +228,147 @@ gUnknown_08272982:: @ 8272982 .string "I’m delighted to see you, {PLAYER}!\nYou want the usual, am I right?$" -gUnknown_082729c0:: @ 82729C0 +gUnknown_082729C0:: @ 82729C0 .string "Okay, I’ll take your POKéMON\nfor a few seconds.$" -gUnknown_082729f0:: @ 82729F0 +gUnknown_082729F0:: @ 82729F0 .string "Thank you for waiting.$" -gUnknown_08272a07:: @ 8272A07 +gUnknown_08272A07:: @ 8272A07 .string "We hope to see you again!$" -gUnknown_08272a21:: @ 8272A21 +gUnknown_08272A21:: @ 8272A21 .string "Welcome!\pHow may I serve you?$" -gUnknown_08272a3f:: @ 8272A3F +gUnknown_08272A3F:: @ 8272A3F .string "Please come again!$" -gUnknown_08272a52:: @ 8272A52 +gUnknown_08272A52:: @ 8272A52 .string "{PLAYER}{STRING 5}, welcome!\pWhat can I do for you?$" -gUnknown_08272a78:: @ 8272A78 +gUnknown_08272A78:: @ 8272A78 .string "Obtained the {STR_VAR_2}!$" -gUnknown_08272a89:: @ 8272A89 +gUnknown_08272A89:: @ 8272A89 .string "The BAG is full…$" -gUnknown_08272a9a:: @ 8272A9A +gUnknown_08272A9A:: @ 8272A9A .string "{PLAYER} put away the {STR_VAR_2}\nin the {STR_VAR_3} POCKET.$" -gUnknown_08272abf:: @ 8272ABF +gUnknown_08272ABF:: @ 8272ABF .string "{PLAYER} found one {STR_VAR_2}!$" -gUnknown_08272ad0:: @ 8272AD0 +gUnknown_08272AD0:: @ 8272AD0 .string "Too bad!\nThe BAG is full…$" -gUnknown_08272aea:: @ 8272AEA +gUnknown_08272AEA:: @ 8272AEA .string "{PLAYER} put away the {STR_VAR_2}\nin the BAG.$" -gUnknown_08272b09:: @ 8272B09 +gUnknown_08272B09:: @ 8272B09 .string "Obtained the {STR_VAR_2}!$" -gUnknown_08272b1a:: @ 8272B1A +gUnknown_08272B1A:: @ 8272B1A .string "Too bad! There’s no room left for\nanother {STR_VAR_2}…$" -gUnknown_08272b48:: @ 8272B48 +gUnknown_08272B48:: @ 8272B48 .string "The {STR_VAR_2} was transferred\nto the PC.$" -gUnknown_08272b6a:: @ 8272B6A +gUnknown_08272B6A:: @ 8272B6A .string "“Selected items for your convenience!â€\nPOKéMON MART$" -gUnknown_08272b9e:: @ 8272B9E +gUnknown_08272B9E:: @ 8272B9E .string "“Rejuvenate your tired partners!â€\nPOKéMON CENTER$" -gUnknown_08272bcf:: @ 8272BCF +gUnknown_08272BCF:: @ 8272BCF .string "{STR_VAR_1} might like this program.\n… … … … … … … … … … … … … … … …\pBetter get going!$" -gUnknown_08272c1d:: @ 8272C1D +gUnknown_08272C1D:: @ 8272C1D .string "Welcome to LILYCOVE DEPARTMENT STORE.\pWhich floor would you like?$" -gUnknown_08272c5f:: @ 8272C5F +gUnknown_08272C5F:: @ 8272C5F .string "The sandstorm is vicious.\nIt’s impossible to keep going.$" -gUnknown_08272c98:: @ 8272C98 +gUnknown_08272C98:: @ 8272C98 .string "An item in the BAG can be\nregistered to SELECT for easy use.$" -gUnknown_08272cd5:: @ 8272CD5 +gUnknown_08272CD5:: @ 8272CD5 .string "There’s an e-mail from POKéMON TRAINER\nSCHOOL.\p… … … … … …\pA POKéMON may learn up to four moves.\pA TRAINER’s expertise is tested on the\nmove sets chosen for POKéMON.\p… … … … … …$" -gUnknown_08272d87:: @ 8272D87 +gUnknown_08272D87:: @ 8272D87 .string "{PLAYER} booted up the PC.$" -gUnknown_08272d9c:: @ 8272D9C +gUnknown_08272D9C:: @ 8272D9C .string "The link was canceled.$" -gUnknown_08272db3:: @ 8272DB3 +gUnknown_08272DB3:: @ 8272DB3 .string "Want to give a nickname to\nthe {STR_VAR_2} you received?$" -gUnknown_08272de3:: @ 8272DE3 +gUnknown_08272DE3:: @ 8272DE3 .string "{PLAYER} is out of usable\nPOKéMON!\p{PLAYER} whited out!$" -gUnknown_08272e0f:: @ 8272E0F +gUnknown_08272E0F:: @ 8272E0F .string "Registered {STR_VAR_1} {STR_VAR_2}\nin the POKéNAV.$" -gUnknown_08272e30:: @ 8272E30 +gUnknown_08272E30:: @ 8272E30 .string "Do you know the TM SECRET POWER?\pOur group, we love the TM SECRET\nPOWER.\pOne of our members will give it to you.\nCome back and show me if you get it.\pWe’ll accept you as a member and sell\nyou good stuff in secrecy.$" -gUnknown_08272f07:: @ 8272F07 +gUnknown_08272F07:: @ 8272F07 .string "Your POKéMON may be infected with\nPOKéRUS.\pLittle is known about the POKéRUS\nexcept that they are microscopic life-\lforms that attach to POKéMON.\pWhile infected, POKéMON are said to\ngrow exceptionally well.$" -gUnknown_08272fd6:: @ 8272FD6 +gUnknown_08272FD6:: @ 8272FD6 .string "The water is dyed a deep blue…\nWould you like to SURF?$" -gUnknown_0827300d:: @ 827300D +gUnknown_0827300D:: @ 827300D .string "{STR_VAR_1} used SURF!$" -gUnknown_0827301b:: @ 827301B +gUnknown_0827301B:: @ 827301B .string "It sounded as if a door opened\nsomewhere far away.$" -gUnknown_0827304e:: @ 827304E +gUnknown_0827304E:: @ 827304E .string "There is a big hole in the wall.$" -gUnknown_0827306f:: @ 827306F +gUnknown_0827306F:: @ 827306F .string "I’m terribly sorry.\nThe POKéMON WIRELESS CLUB is\lundergoing adjustments now.$" -gUnknown_082730bc:: @ 82730BC +gUnknown_082730BC:: @ 82730BC .string "It appears to be undergoing\nadjustments…$" -gUnknown_082730e5:: @ 82730E5 +gUnknown_082730E5:: @ 82730E5 .string "I’m terribly sorry. The TRADE CENTER\nis undergoing inspections.$" @@ -384,11 +384,11 @@ gUnknown_08273178:: @ 8273178 .string "Thank you for accessing the\nMYSTERY GIFT System.$" -gUnknown_082731a9:: @ 82731A9 +gUnknown_082731A9:: @ 82731A9 .string "{PLAYER} found one {STR_VAR_1}\n{STR_VAR_2}!$" -gUnknown_082731bd:: @ 82731BD +gUnknown_082731BD:: @ 82731BD .string "The weird tree doesn’t like the\nWAILMER PAIL!\pThe weird tree attacked!$" @@ -408,7 +408,7 @@ gText_PkmnBoxLanettesPCFull:: @ 82732D9 .string "BOX “{STR_VAR_3}†on\nLANETTE’S PC was full.\p{STR_VAR_2} was transferred to\nBOX “{STR_VAR_1}.â€$" -gUnknown_0827331c:: @ 827331C +gUnknown_0827331C:: @ 827331C .string "There’s no more room for POKéMON!\pThe POKéMON BOXES are full and\ncan’t accept any more!$" @@ -416,11 +416,11 @@ gUnknown_08273374:: @ 8273374 .string "Do you want to give a nickname to\nthis {STR_VAR_1}?$" -gUnknown_0827339f:: @ 827339F +gUnknown_0827339F:: @ 827339F .string "There is a questionnaire.\nWould you like to fill it out?$" -gUnknown_082733d8:: @ 82733D8 +gUnknown_082733D8:: @ 82733D8 .string "Thank you for taking the time to\nfill out our questionnaire.\pYour feedback will be used for\nfuture reference.$" @@ -428,7 +428,7 @@ gUnknown_08273446:: @ 8273446 .string "Oh, hello!\nYou know those words?\pThat means you must know about\nthe MYSTERY GIFT.\pFrom now on, you should be\nreceiving MYSTERY GIFTS!$" -gUnknown_082734cc:: @ 82734CC +gUnknown_082734CC:: @ 82734CC .string "Once you save your game, you can\naccess the MYSTERY GIFT.$" @@ -444,7 +444,7 @@ gUnknown_08273594:: @ 8273594 .string "Thank you for using the MYSTERY\nEVENT System.\pYou must be {PLAYER}.\nThere is a ticket here for you.$" -gUnknown_082735f2:: @ 82735F2 +gUnknown_082735F2:: @ 82735F2 .string "It appears to be for use at\nthe LILYCOVE CITY port.\pWhy not give it a try and see what\nit is about?$" @@ -686,139 +686,139 @@ gUnknown_0827E8DA:: @ 827E8DA gUnknown_0827EA0C:: @ 827EA0C .incbin "baserom.gba", 0x27ea0c, 0x2b0 -gUnknown_0827ecbc:: @ 27ECBC +gUnknown_0827ECBC:: @ 27ECBC .incbin "baserom.gba", 0x27ecbc, 0x7 -gUnknown_0827ecc3:: @ 27ECC3 +gUnknown_0827ECC3:: @ 27ECC3 .incbin "baserom.gba", 0x27ecc3, 0xa -gUnknown_0827eccd:: @ 27ECCD +gUnknown_0827ECCD:: @ 27ECCD .incbin "baserom.gba", 0x27eccd, 0x8 -gUnknown_0827ecd5:: @ 27ECD5 +gUnknown_0827ECD5:: @ 27ECD5 .incbin "baserom.gba", 0x27ecd5, 0x8 -gUnknown_0827ecdd:: @ 27ECDD +gUnknown_0827ECDD:: @ 27ECDD .incbin "baserom.gba", 0x27ecdd, 0x6 -gUnknown_0827ece3:: @ 27ECE3 +gUnknown_0827ECE3:: @ 27ECE3 .incbin "baserom.gba", 0x27ece3, 0x8 -gUnknown_0827eceb:: @ 27ECEB +gUnknown_0827ECEB:: @ 27ECEB .incbin "baserom.gba", 0x27eceb, 0x7 -gUnknown_0827ecf2:: @ 27ECF2 +gUnknown_0827ECF2:: @ 27ECF2 .incbin "baserom.gba", 0x27ecf2, 0x6 -gUnknown_0827ecf8:: @ 27ECF8 +gUnknown_0827ECF8:: @ 27ECF8 .incbin "baserom.gba", 0x27ecf8, 0x8 -gUnknown_0827ed00:: @ 27ED00 +gUnknown_0827ED00:: @ 27ED00 .incbin "baserom.gba", 0x27ed00, 0x6 -gUnknown_0827ed06:: @ 27ED06 +gUnknown_0827ED06:: @ 27ED06 .incbin "baserom.gba", 0x27ed06, 0xa -gUnknown_0827ed10:: @ 27ED10 +gUnknown_0827ED10:: @ 27ED10 .incbin "baserom.gba", 0x27ed10, 0x8 -gUnknown_0827ed18:: @ 27ED18 +gUnknown_0827ED18:: @ 27ED18 .incbin "baserom.gba", 0x27ed18, 0xa -gUnknown_0827ed22:: @ 27ED22 +gUnknown_0827ED22:: @ 27ED22 .incbin "baserom.gba", 0x27ed22, 0xa -gUnknown_0827ed2c:: @ 27ED2C +gUnknown_0827ED2C:: @ 27ED2C .incbin "baserom.gba", 0x27ed2c, 0xa -gUnknown_0827ed36:: @ 27ED36 +gUnknown_0827ED36:: @ 27ED36 .incbin "baserom.gba", 0x27ed36, 0xa -gUnknown_0827ed40:: @ 27ED40 +gUnknown_0827ED40:: @ 27ED40 .incbin "baserom.gba", 0x27ed40, 0x6 -gUnknown_0827ed46:: @ 27ED46 +gUnknown_0827ED46:: @ 27ED46 .incbin "baserom.gba", 0x27ed46, 0x9 -gUnknown_0827ed4f:: @ 27ED4F +gUnknown_0827ED4F:: @ 27ED4F .incbin "baserom.gba", 0x27ed4f, 0xa -gUnknown_0827ed59:: @ 27ED59 +gUnknown_0827ED59:: @ 27ED59 .incbin "baserom.gba", 0x27ed59, 0xc -gUnknown_0827ed65:: @ 27ED65 +gUnknown_0827ED65:: @ 27ED65 .incbin "baserom.gba", 0x27ed65, 0xb -gUnknown_0827ed70:: @ 27ED70 +gUnknown_0827ED70:: @ 27ED70 .incbin "baserom.gba", 0x27ed70, 0x4 -gUnknown_0827ed74:: @ 27ED74 +gUnknown_0827ED74:: @ 27ED74 .incbin "baserom.gba", 0x27ed74, 0x4 -gUnknown_0827ed78:: @ 27ED78 +gUnknown_0827ED78:: @ 27ED78 .incbin "baserom.gba", 0x27ed78, 0x8 -gUnknown_0827ed80:: @ 27ED80 +gUnknown_0827ED80:: @ 27ED80 .incbin "baserom.gba", 0x27ed80, 0x15 -gUnknown_0827ed95:: @ 27ED95 +gUnknown_0827ED95:: @ 27ED95 .incbin "baserom.gba", 0x27ed95, 0x15 -gUnknown_0827edaa:: @ 27EDAA +gUnknown_0827EDAA:: @ 27EDAA .incbin "baserom.gba", 0x27edaa, 0xb -gUnknown_0827edb5:: @ 27EDB5 +gUnknown_0827EDB5:: @ 27EDB5 .incbin "baserom.gba", 0x27edb5, 0x5 -gUnknown_0827edba:: @ 27EDBA +gUnknown_0827EDBA:: @ 27EDBA .incbin "baserom.gba", 0x27edba, 0x7 -gUnknown_0827edc1:: @ 27EDC1 +gUnknown_0827EDC1:: @ 27EDC1 .incbin "baserom.gba", 0x27edc1, 0x8 -gUnknown_0827edc9:: @ 27EDC9 +gUnknown_0827EDC9:: @ 27EDC9 .incbin "baserom.gba", 0x27edc9, 0xc -gUnknown_0827edd5:: @ 27EDD5 +gUnknown_0827EDD5:: @ 27EDD5 .incbin "baserom.gba", 0x27edd5, 0xf -gUnknown_0827ede4:: @ 27EDE4 +gUnknown_0827EDE4:: @ 27EDE4 .incbin "baserom.gba", 0x27ede4, 0xc -gUnknown_0827edf0:: @ 27EDF0 +gUnknown_0827EDF0:: @ 27EDF0 .incbin "baserom.gba", 0x27edf0, 0x5 -gUnknown_0827edf5:: @ 27EDF5 +gUnknown_0827EDF5:: @ 27EDF5 .incbin "baserom.gba", 0x27edf5, 0x2 -gUnknown_0827edf7:: @ 27EDF7 +gUnknown_0827EDF7:: @ 27EDF7 .incbin "baserom.gba", 0x27edf7, 0x2 -gUnknown_0827edf9:: @ 27EDF9 +gUnknown_0827EDF9:: @ 27EDF9 .incbin "baserom.gba", 0x27edf9, 0x2 -gUnknown_0827edfb:: @ 27EDFB +gUnknown_0827EDFB:: @ 27EDFB .incbin "baserom.gba", 0x27edfb, 0x2 -gUnknown_0827edfd:: @ 27EDFD +gUnknown_0827EDFD:: @ 27EDFD .incbin "baserom.gba", 0x27edfd, 0x2 -gUnknown_0827edff:: @ 27EDFF +gUnknown_0827EDFF:: @ 27EDFF .incbin "baserom.gba", 0x27edff, 0x2 -gUnknown_0827ee01:: @ 27EE01 +gUnknown_0827EE01:: @ 27EE01 .incbin "baserom.gba", 0x27ee01, 0x2 -gUnknown_0827ee03:: @ 27EE03 +gUnknown_0827EE03:: @ 27EE03 .incbin "baserom.gba", 0x27ee03, 0x2 -gUnknown_0827ee05:: @ 27EE05 +gUnknown_0827EE05:: @ 27EE05 .incbin "baserom.gba", 0x27ee05, 0x2 -gUnknown_0827ee07:: @ 27EE07 +gUnknown_0827EE07:: @ 27EE07 .incbin "baserom.gba", 0x27ee07, 0x2 -gUnknown_0827ee09:: @ 27EE09 +gUnknown_0827EE09:: @ 27EE09 .incbin "baserom.gba", 0x27ee09, 0x2 gUnknown_0827EE0B:: @ 827EE0B diff --git a/data/script_menu.s b/data/script_menu.s index 3a98e2fa5..8cf395c04 100644 --- a/data/script_menu.s +++ b/data/script_menu.s @@ -5,24 +5,24 @@ gUnknown_0858ABD8:: @ 858ABD8 @ replacing .incbin "baserom.gba", 0x0058abd8, 0x18 - .4byte gUnknown_085ead37, 0 - .4byte gUnknown_085ead41, 0 + .4byte gUnknown_085EAD37, 0 + .4byte gUnknown_085EAD41, 0 .4byte gText_Exit, 0 -gUnknown_0858abf0:: @ 58ABF0 +gUnknown_0858ABF0:: @ 58ABF0 @ replacing .incbin "baserom.gba", 0x0058abf0, 0x18 - .4byte gUnknown_085ead67, 0 - .4byte gUnknown_085ead6d, 0 + .4byte gUnknown_085EAD67, 0 + .4byte gUnknown_085EAD6D, 0 .4byte gText_Exit, 0 -gUnknown_0858ac08:: @ 58AC08 +gUnknown_0858AC08:: @ 58AC08 @ replacing .incbin "baserom.gba", 0x0058ac08, 0x20 - .4byte gUnknown_085ead72, 0 - .4byte gUnknown_085ead84, 0 - .4byte gUnknown_085ead96, 0 + .4byte gUnknown_085EAD72, 0 + .4byte gUnknown_085EAD84, 0 + .4byte gUnknown_085EAD96, 0 .4byte gText_Cancel2, 0 -gUnknown_0858ac28:: @ 58AC28 +gUnknown_0858AC28:: @ 58AC28 @ replacing .incbin "baserom.gba", 0x0058ac28, 0x30 .4byte gUnknown_085EADA4, 0 .4byte gUnknown_085EADB5, 0 @@ -31,650 +31,650 @@ gUnknown_0858ac28:: @ 58AC28 .4byte gUnknown_085EADE7, 0 .4byte gText_Exit, 0 -gUnknown_0858ac58:: @ 58AC58 +gUnknown_0858AC58:: @ 58AC58 @ replacing .incbin "baserom.gba", 0x0058ac58, 0x20 - .4byte gUnknown_085eadf9, 0 - .4byte gUnknown_085eae04, 0 - .4byte gUnknown_085eae12, 0 + .4byte gUnknown_085EADF9, 0 + .4byte gUnknown_085EAE04, 0 + .4byte gUnknown_085EAE12, 0 .4byte gText_Exit, 0 -gUnknown_0858ac78:: @ 58AC78 +gUnknown_0858AC78:: @ 58AC78 @ replacing .incbin "baserom.gba", 0x0058ac78, 0x18 - .4byte gUnknown_085eadf9, 0 - .4byte gUnknown_085eae04, 0 + .4byte gUnknown_085EADF9, 0 + .4byte gUnknown_085EAE04, 0 .4byte gText_Exit, 0 -gUnknown_0858ac90:: @ 58AC90 +gUnknown_0858AC90:: @ 58AC90 @ replacing .incbin "baserom.gba", 0x0058ac90, 0x20 - .4byte gUnknown_085e8ccb, 0 - .4byte gUnknown_085eae12, 0 - .4byte gUnknown_085eae1b, 0 + .4byte gUnknown_085E8CCB, 0 + .4byte gUnknown_085EAE12, 0 + .4byte gUnknown_085EAE1B, 0 .4byte gText_Cancel2, 0 -gUnknown_0858acb0:: @ 58ACB0 +gUnknown_0858ACB0:: @ 58ACB0 @ replacing .incbin "baserom.gba", 0x0058acb0, 0x10 - .4byte gUnknown_085eae27, 0 - .4byte gUnknown_085eae2c, 0 + .4byte gUnknown_085EAE27, 0 + .4byte gUnknown_085EAE2C, 0 -gUnknown_0858acc0:: @ 58ACC0 +gUnknown_0858ACC0:: @ 58ACC0 @ replacing .incbin "baserom.gba", 0x0058acc0, 0x30 - .4byte gUnknown_085eae31, 0 - .4byte gUnknown_085eae35, 0 - .4byte gUnknown_085eae39, 0 - .4byte gUnknown_085eae3d, 0 - .4byte gUnknown_085eae41, 0 + .4byte gUnknown_085EAE31, 0 + .4byte gUnknown_085EAE35, 0 + .4byte gUnknown_085EAE39, 0 + .4byte gUnknown_085EAE3D, 0 + .4byte gUnknown_085EAE41, 0 .4byte gText_Exit, 0 -gUnknown_0858acf0:: @ 58ACF0 +gUnknown_0858ACF0:: @ 58ACF0 @ replacing .incbin "baserom.gba", 0x0058acf0, 0x10 - .4byte gUnknown_085ead5f, 0 + .4byte gUnknown_085EAD5F, 0 .4byte gText_Exit, 0 -gUnknown_0858ad00:: @ 58AD00 +gUnknown_0858AD00:: @ 58AD00 @ replacing .incbin "baserom.gba", 0x0058ad00, 0x10 - .4byte gUnknown_085eae53, 0 - .4byte gUnknown_085eae5a, 0 + .4byte gUnknown_085EAE53, 0 + .4byte gUnknown_085EAE5A, 0 -gUnknown_0858ad10:: @ 58AD10 +gUnknown_0858AD10:: @ 58AD10 @ replacing .incbin "baserom.gba", 0x0058ad10, 0x18 .4byte gText_Yes, 0 .4byte gText_No, 0 - .4byte gUnknown_085ead6d, 0 + .4byte gUnknown_085EAD6D, 0 -gUnknown_0858ad28:: @ 58AD28 +gUnknown_0858AD28:: @ 58AD28 @ replacing .incbin "baserom.gba", 0x0058ad28, 0x18 - .4byte gUnknown_085eaea2, 0 - .4byte gUnknown_085eaeac, 0 + .4byte gUnknown_085EAEA2, 0 + .4byte gUnknown_085EAEAC, 0 .4byte gText_Exit, 0 -gUnknown_0858ad40:: @ 58AD40 +gUnknown_0858AD40:: @ 58AD40 @ replacing .incbin "baserom.gba", 0x0058ad40, 0x18 .4byte gText_Lv50, 0 .4byte gText_OpenLevel, 0 .4byte gText_Exit, 0 -gUnknown_0858ad58:: @ 58AD58 +gUnknown_0858AD58:: @ 58AD58 @ replacing .incbin "baserom.gba", 0x0058ad58, 0x18 - .4byte gUnknown_0827ecbc, 0 - .4byte gUnknown_0827ecc3, 0 - .4byte gUnknown_0827eccd, 0 + .4byte gUnknown_0827ECBC, 0 + .4byte gUnknown_0827ECC3, 0 + .4byte gUnknown_0827ECCD, 0 -gUnknown_0858ad70:: @ 58AD70 +gUnknown_0858AD70:: @ 58AD70 @ replacing .incbin "baserom.gba", 0x0058ad70, 0x18 - .4byte gUnknown_0827ecd5, 0 - .4byte gUnknown_0827ecdd, 0 - .4byte gUnknown_0827ece3, 0 + .4byte gUnknown_0827ECD5, 0 + .4byte gUnknown_0827ECDD, 0 + .4byte gUnknown_0827ECE3, 0 -gUnknown_0858ad88:: @ 58AD88 +gUnknown_0858AD88:: @ 58AD88 @ replacing .incbin "baserom.gba", 0x0058ad88, 0x18 - .4byte gUnknown_0827eceb, 0 - .4byte gUnknown_0827ecf2, 0 - .4byte gUnknown_0827ecf8, 0 + .4byte gUnknown_0827ECEB, 0 + .4byte gUnknown_0827ECF2, 0 + .4byte gUnknown_0827ECF8, 0 -gUnknown_0858ada0:: @ 58ADA0 +gUnknown_0858ADA0:: @ 58ADA0 @ replacing .incbin "baserom.gba", 0x0058ada0, 0x18 - .4byte gUnknown_0827ed00, 0 - .4byte gUnknown_0827ed06, 0 - .4byte gUnknown_0827ed10, 0 + .4byte gUnknown_0827ED00, 0 + .4byte gUnknown_0827ED06, 0 + .4byte gUnknown_0827ED10, 0 -gUnknown_0858adb8:: @ 58ADB8 +gUnknown_0858ADB8:: @ 58ADB8 @ replacing .incbin "baserom.gba", 0x0058adb8, 0x18 - .4byte gUnknown_0827ed18, 0 - .4byte gUnknown_0827ed22, 0 - .4byte gUnknown_0827ed2c, 0 + .4byte gUnknown_0827ED18, 0 + .4byte gUnknown_0827ED22, 0 + .4byte gUnknown_0827ED2C, 0 -gUnknown_0858add0:: @ 58ADD0 +gUnknown_0858ADD0:: @ 58ADD0 @ replacing .incbin "baserom.gba", 0x0058add0, 0x18 - .4byte gUnknown_0827ed36, 0 - .4byte gUnknown_0827ed40, 0 - .4byte gUnknown_0827ed46, 0 + .4byte gUnknown_0827ED36, 0 + .4byte gUnknown_0827ED40, 0 + .4byte gUnknown_0827ED46, 0 -gUnknown_0858ade8:: @ 58ADE8 +gUnknown_0858ADE8:: @ 58ADE8 @ replacing .incbin "baserom.gba", 0x0058ade8, 0x18 - .4byte gUnknown_0827ed4f, 0 - .4byte gUnknown_0827ed59, 0 - .4byte gUnknown_0827ed65, 0 + .4byte gUnknown_0827ED4F, 0 + .4byte gUnknown_0827ED59, 0 + .4byte gUnknown_0827ED65, 0 -gUnknown_0858ae00:: @ 58AE00 +gUnknown_0858AE00:: @ 58AE00 @ replacing .incbin "baserom.gba", 0x0058ae00, 0x18 - .4byte gUnknown_0827ed70, 0 - .4byte gUnknown_0827ed74, 0 - .4byte gUnknown_0827ed78, 0 + .4byte gUnknown_0827ED70, 0 + .4byte gUnknown_0827ED74, 0 + .4byte gUnknown_0827ED78, 0 -gUnknown_0858ae18:: @ 58AE18 +gUnknown_0858AE18:: @ 58AE18 @ replacing .incbin "baserom.gba", 0x0058ae18, 0x18 - .4byte gUnknown_0827ed80, 0 - .4byte gUnknown_0827ed95, 0 - .4byte gUnknown_0827edaa, 0 + .4byte gUnknown_0827ED80, 0 + .4byte gUnknown_0827ED95, 0 + .4byte gUnknown_0827EDAA, 0 -gUnknown_0858ae30:: @ 58AE30 +gUnknown_0858AE30:: @ 58AE30 @ replacing .incbin "baserom.gba", 0x0058ae30, 0x18 - .4byte gUnknown_0827edb5, 0 - .4byte gUnknown_0827edba, 0 - .4byte gUnknown_0827edc1, 0 + .4byte gUnknown_0827EDB5, 0 + .4byte gUnknown_0827EDBA, 0 + .4byte gUnknown_0827EDC1, 0 -gUnknown_0858ae48:: @ 58AE48 +gUnknown_0858AE48:: @ 58AE48 @ replacing .incbin "baserom.gba", 0x0058ae48, 0x18 - .4byte gUnknown_0827edc9, 0 - .4byte gUnknown_0827edd5, 0 - .4byte gUnknown_0827ede4, 0 + .4byte gUnknown_0827EDC9, 0 + .4byte gUnknown_0827EDD5, 0 + .4byte gUnknown_0827EDE4, 0 -gUnknown_0858ae60:: @ 58AE60 +gUnknown_0858AE60:: @ 58AE60 @ replacing .incbin "baserom.gba", 0x0058ae60, 0x18 - .4byte gUnknown_0827edf0, 0 - .4byte gUnknown_0827edf5, 0 - .4byte gUnknown_0827edf7, 0 + .4byte gUnknown_0827EDF0, 0 + .4byte gUnknown_0827EDF5, 0 + .4byte gUnknown_0827EDF7, 0 -gUnknown_0858ae78:: @ 58AE78 +gUnknown_0858AE78:: @ 58AE78 @ replacing .incbin "baserom.gba", 0x0058ae78, 0x18 - .4byte gUnknown_0827edf9, 0 - .4byte gUnknown_0827edfb, 0 - .4byte gUnknown_0827edfd, 0 + .4byte gUnknown_0827EDF9, 0 + .4byte gUnknown_0827EDFB, 0 + .4byte gUnknown_0827EDFD, 0 -gUnknown_0858ae90:: @ 58AE90 +gUnknown_0858AE90:: @ 58AE90 @ replacing .incbin "baserom.gba", 0x0058ae90, 0x18 - .4byte gUnknown_0827edff, 0 - .4byte gUnknown_0827ee01, 0 - .4byte gUnknown_0827ee03, 0 + .4byte gUnknown_0827EDFF, 0 + .4byte gUnknown_0827EE01, 0 + .4byte gUnknown_0827EE03, 0 -gUnknown_0858aea8:: @ 58AEA8 +gUnknown_0858AEA8:: @ 58AEA8 @ replacing .incbin "baserom.gba", 0x0058aea8, 0x18 - .4byte gUnknown_0827ee05, 0 - .4byte gUnknown_0827ee07, 0 - .4byte gUnknown_0827ee09, 0 + .4byte gUnknown_0827EE05, 0 + .4byte gUnknown_0827EE07, 0 + .4byte gUnknown_0827EE09, 0 -gUnknown_0858aec0:: @ 58AEC0 +gUnknown_0858AEC0:: @ 58AEC0 @ replacing .incbin "baserom.gba", 0x0058aec0, 0x20 - .4byte gUnknown_085eaec3, 0 - .4byte gUnknown_085eaed6, 0 - .4byte gUnknown_085eaee6, 0 + .4byte gUnknown_085EAEC3, 0 + .4byte gUnknown_085EAED6, 0 + .4byte gUnknown_085EAEE6, 0 .4byte gText_Exit, 0 -gUnknown_0858aee0:: @ 58AEE0 +gUnknown_0858AEE0:: @ 58AEE0 @ replacing .incbin "baserom.gba", 0x0058aee0, 0x20 - .4byte gUnknown_085eaef6, 0 - .4byte gUnknown_085eaf02, 0 - .4byte gUnknown_085eaf0e, 0 + .4byte gUnknown_085EAEF6, 0 + .4byte gUnknown_085EAF02, 0 + .4byte gUnknown_085EAF0E, 0 .4byte gText_Exit, 0 -gUnknown_0858af00:: @ 58AF00 +gUnknown_0858AF00:: @ 58AF00 @ replacing .incbin "baserom.gba", 0x0058af00, 0x20 - .4byte gUnknown_085eaf1b, 0 - .4byte gUnknown_085eaf24, 0 - .4byte gUnknown_085eaf2f, 0 + .4byte gUnknown_085EAF1B, 0 + .4byte gUnknown_085EAF24, 0 + .4byte gUnknown_085EAF2F, 0 .4byte gText_Exit, 0 -gUnknown_0858af20:: @ 58AF20 +gUnknown_0858AF20:: @ 58AF20 @ replacing .incbin "baserom.gba", 0x0058af20, 0x10 - .4byte gUnknown_085eaf34, 0 - .4byte gUnknown_085eaf3e, 0 + .4byte gUnknown_085EAF34, 0 + .4byte gUnknown_085EAF3E, 0 -gUnknown_0858af30:: @ 58AF30 +gUnknown_0858AF30:: @ 58AF30 @ replacing .incbin "baserom.gba", 0x0058af30, 0x18 - .4byte gUnknown_085eaf4b, 0 - .4byte gUnknown_085eaf58, 0 + .4byte gUnknown_085EAF4B, 0 + .4byte gUnknown_085EAF58, 0 .4byte gText_Exit, 0 -gUnknown_0858af48:: @ 58AF48 +gUnknown_0858AF48:: @ 58AF48 @ replacing .incbin "baserom.gba", 0x0058af48, 0x40 - .4byte gUnknown_085eaf65, 0 - .4byte gUnknown_085eaf70, 0 - .4byte gUnknown_085eaf7d, 0 - .4byte gUnknown_085eaf87, 0 - .4byte gUnknown_085eaf93, 0 - .4byte gUnknown_085eaf9f, 0 - .4byte gUnknown_085eafab, 0 + .4byte gUnknown_085EAF65, 0 + .4byte gUnknown_085EAF70, 0 + .4byte gUnknown_085EAF7D, 0 + .4byte gUnknown_085EAF87, 0 + .4byte gUnknown_085EAF93, 0 + .4byte gUnknown_085EAF9F, 0 + .4byte gUnknown_085EAFAB, 0 .4byte gText_Cancel2, 0 -gUnknown_0858af88:: @ 58AF88 +gUnknown_0858AF88:: @ 58AF88 @ replacing .incbin "baserom.gba", 0x0058af88, 0x20 - .4byte gUnknown_085eafb6, 0 - .4byte gUnknown_085eafcf, 0 - .4byte gUnknown_085eafe8, 0 + .4byte gUnknown_085EAFB6, 0 + .4byte gUnknown_085EAFCF, 0 + .4byte gUnknown_085EAFE8, 0 .4byte gText_Exit, 0 -gUnknown_0858afa8:: @ 58AFA8 +gUnknown_0858AFA8:: @ 58AFA8 @ replacing .incbin "baserom.gba", 0x0058afa8, 0x30 - .4byte gUnknown_085eb089, 0 - .4byte gUnknown_085eb09c, 0 - .4byte gUnknown_085eb0af, 0 - .4byte gUnknown_085eb0c2, 0 - .4byte gUnknown_085eb0d5, 0 + .4byte gUnknown_085EB089, 0 + .4byte gUnknown_085EB09C, 0 + .4byte gUnknown_085EB0AF, 0 + .4byte gUnknown_085EB0C2, 0 + .4byte gUnknown_085EB0D5, 0 .4byte gText_Exit, 0 -gUnknown_0858afd8:: @ 58AFD8 +gUnknown_0858AFD8:: @ 58AFD8 @ replacing .incbin "baserom.gba", 0x0058afd8, 0x18 - .4byte gUnknown_085eb002, 0 - .4byte gUnknown_085eb017, 0 + .4byte gUnknown_085EB002, 0 + .4byte gUnknown_085EB017, 0 .4byte gText_Exit, 0 -gUnknown_0858aff0:: @ 58AFF0 +gUnknown_0858AFF0:: @ 58AFF0 @ replacing .incbin "baserom.gba", 0x0058aff0, 0x10 - .4byte gUnknown_085eb02a, 0 - .4byte gUnknown_085eb034, 0 + .4byte gUnknown_085EB02A, 0 + .4byte gUnknown_085EB034, 0 -gUnknown_0858b000:: @ 58B000 +gUnknown_0858B000:: @ 58B000 @ replacing .incbin "baserom.gba", 0x0058b000, 0x18 - .4byte gUnknown_085eb79b, 0 - .4byte gUnknown_085eb06e, 0 + .4byte gUnknown_085EB79B, 0 + .4byte gUnknown_085EB06E, 0 .4byte gText_Exit, 0 -gUnknown_0858b018:: @ 58B018 +gUnknown_0858B018:: @ 58B018 @ replacing .incbin "baserom.gba", 0x0058b018, 0x18 - .4byte gUnknown_085eb7a9, 0 - .4byte gUnknown_085eb79b, 0 + .4byte gUnknown_085EB7A9, 0 + .4byte gUnknown_085EB79B, 0 .4byte gText_Exit, 0 -gUnknown_0858b030:: @ 58B030 +gUnknown_0858B030:: @ 58B030 @ replacing .incbin "baserom.gba", 0x0058b030, 0x10 - .4byte gUnknown_085eb07e, 0 - .4byte gUnknown_085eb084, 0 + .4byte gUnknown_085EB07E, 0 + .4byte gUnknown_085EB084, 0 -gUnknown_0858b040:: @ 58B040 +gUnknown_0858B040:: @ 58B040 @ replacing .incbin "baserom.gba", 0x0058b040, 0x10 - .4byte gUnknown_085eb79b, 0 + .4byte gUnknown_085EB79B, 0 .4byte gText_Exit, 0 -gUnknown_0858b050:: @ 58B050 +gUnknown_0858B050:: @ 58B050 @ replacing .incbin "baserom.gba", 0x0058b050, 0x30 - .4byte gUnknown_085eb676, 0 - .4byte gUnknown_085eb673, 0 - .4byte gUnknown_085eb670, 0 - .4byte gUnknown_085eb66d, 0 - .4byte gUnknown_085eb66a, 0 + .4byte gUnknown_085EB676, 0 + .4byte gUnknown_085EB673, 0 + .4byte gUnknown_085EB670, 0 + .4byte gUnknown_085EB66D, 0 + .4byte gUnknown_085EB66A, 0 .4byte gText_Exit, 0 -gUnknown_0858b080:: @ 58B080 +gUnknown_0858B080:: @ 58B080 @ replacing .incbin "baserom.gba", 0x0058b080, 0x10 - .4byte gUnknown_085eb040, 0 + .4byte gUnknown_085EB040, 0 .4byte gText_Exit, 0 -gUnknown_0858b090:: @ 58B090 +gUnknown_0858B090:: @ 58B090 @ replacing .incbin "baserom.gba", 0x0058b090, 0x10 - .4byte gUnknown_085eb04a, 0 + .4byte gUnknown_085EB04A, 0 .4byte gText_Exit, 0 -gUnknown_0858b0a0:: @ 58B0A0 +gUnknown_0858B0A0:: @ 58B0A0 @ replacing .incbin "baserom.gba", 0x0058b0a0, 0x18 - .4byte gUnknown_085eb040, 0 - .4byte gUnknown_085eb04a, 0 + .4byte gUnknown_085EB040, 0 + .4byte gUnknown_085EB04A, 0 .4byte gText_Exit, 0 -gUnknown_0858b0b8:: @ 58B0B8 +gUnknown_0858B0B8:: @ 58B0B8 @ replacing .incbin "baserom.gba", 0x0058b0b8, 0x10 - .4byte gUnknown_085eb057, 0 + .4byte gUnknown_085EB057, 0 .4byte gText_Exit, 0 -gUnknown_0858b0c8:: @ 58B0C8 +gUnknown_0858B0C8:: @ 58B0C8 @ replacing .incbin "baserom.gba", 0x0058b0c8, 0x18 - .4byte gUnknown_085eb040, 0 - .4byte gUnknown_085eb057, 0 + .4byte gUnknown_085EB040, 0 + .4byte gUnknown_085EB057, 0 .4byte gText_Exit, 0 -gUnknown_0858b0e0:: @ 58B0E0 +gUnknown_0858B0E0:: @ 58B0E0 @ replacing .incbin "baserom.gba", 0x0058b0e0, 0x18 - .4byte gUnknown_085eb04a, 0 - .4byte gUnknown_085eb057, 0 + .4byte gUnknown_085EB04A, 0 + .4byte gUnknown_085EB057, 0 .4byte gText_Exit, 0 -gUnknown_0858b0f8:: @ 58B0F8 +gUnknown_0858B0F8:: @ 58B0F8 @ replacing .incbin "baserom.gba", 0x0058b0f8, 0x20 - .4byte gUnknown_085eb040, 0 - .4byte gUnknown_085eb04a, 0 - .4byte gUnknown_085eb057, 0 + .4byte gUnknown_085EB040, 0 + .4byte gUnknown_085EB04A, 0 + .4byte gUnknown_085EB057, 0 .4byte gText_Exit, 0 -gUnknown_0858b118:: @ 58B118 +gUnknown_0858B118:: @ 58B118 @ replacing .incbin "baserom.gba", 0x0058b118, 0x10 - .4byte gUnknown_085eb062, 0 + .4byte gUnknown_085EB062, 0 .4byte gText_Exit, 0 -gUnknown_0858b128:: @ 58B128 +gUnknown_0858B128:: @ 58B128 @ replacing .incbin "baserom.gba", 0x0058b128, 0x18 - .4byte gUnknown_085eb040, 0 - .4byte gUnknown_085eb062, 0 + .4byte gUnknown_085EB040, 0 + .4byte gUnknown_085EB062, 0 .4byte gText_Exit, 0 -gUnknown_0858b140:: @ 58B140 +gUnknown_0858B140:: @ 58B140 @ replacing .incbin "baserom.gba", 0x0058b140, 0x18 - .4byte gUnknown_085eb04a, 0 - .4byte gUnknown_085eb062, 0 + .4byte gUnknown_085EB04A, 0 + .4byte gUnknown_085EB062, 0 .4byte gText_Exit, 0 -gUnknown_0858b158:: @ 58B158 +gUnknown_0858B158:: @ 58B158 @ replacing .incbin "baserom.gba", 0x0058b158, 0x20 - .4byte gUnknown_085eb040, 0 - .4byte gUnknown_085eb04a, 0 - .4byte gUnknown_085eb062, 0 + .4byte gUnknown_085EB040, 0 + .4byte gUnknown_085EB04A, 0 + .4byte gUnknown_085EB062, 0 .4byte gText_Exit, 0 -gUnknown_0858b178:: @ 58B178 +gUnknown_0858B178:: @ 58B178 @ replacing .incbin "baserom.gba", 0x0058b178, 0x18 - .4byte gUnknown_085eb057, 0 - .4byte gUnknown_085eb062, 0 + .4byte gUnknown_085EB057, 0 + .4byte gUnknown_085EB062, 0 .4byte gText_Exit, 0 -gUnknown_0858b190:: @ 58B190 +gUnknown_0858B190:: @ 58B190 @ replacing .incbin "baserom.gba", 0x0058b190, 0x20 - .4byte gUnknown_085eb040, 0 - .4byte gUnknown_085eb057, 0 - .4byte gUnknown_085eb062, 0 + .4byte gUnknown_085EB040, 0 + .4byte gUnknown_085EB057, 0 + .4byte gUnknown_085EB062, 0 .4byte gText_Exit, 0 -gUnknown_0858b1b0:: @ 58B1B0 +gUnknown_0858B1B0:: @ 58B1B0 @ replacing .incbin "baserom.gba", 0x0058b1b0, 0x20 - .4byte gUnknown_085eb04a, 0 - .4byte gUnknown_085eb057, 0 - .4byte gUnknown_085eb062, 0 + .4byte gUnknown_085EB04A, 0 + .4byte gUnknown_085EB057, 0 + .4byte gUnknown_085EB062, 0 .4byte gText_Exit, 0 -gUnknown_0858b1d0:: @ 58B1D0 +gUnknown_0858B1D0:: @ 58B1D0 @ replacing .incbin "baserom.gba", 0x0058b1d0, 0x28 - .4byte gUnknown_085eb040, 0 - .4byte gUnknown_085eb04a, 0 - .4byte gUnknown_085eb057, 0 - .4byte gUnknown_085eb062, 0 + .4byte gUnknown_085EB040, 0 + .4byte gUnknown_085EB04A, 0 + .4byte gUnknown_085EB057, 0 + .4byte gUnknown_085EB062, 0 .4byte gText_Exit, 0 -gUnknown_0858b1f8:: @ 58B1F8 +gUnknown_0858B1F8:: @ 58B1F8 @ replacing .incbin "baserom.gba", 0x0058b1f8, 0x30 - .4byte gUnknown_085eb1a0, 0 - .4byte gUnknown_085eb1a9, 0 - .4byte gUnknown_085eb1b6, 0 - .4byte gUnknown_085eb5bc, 0 - .4byte gUnknown_085eb5c3, 0 - .4byte gUnknown_085eb5c8, 0 + .4byte gUnknown_085EB1A0, 0 + .4byte gUnknown_085EB1A9, 0 + .4byte gUnknown_085EB1B6, 0 + .4byte gUnknown_085EB5BC, 0 + .4byte gUnknown_085EB5C3, 0 + .4byte gUnknown_085EB5C8, 0 -gUnknown_0858b228:: @ 58B228 +gUnknown_0858B228:: @ 58B228 @ replacing .incbin "baserom.gba", 0x0058b228, 0x28 - .4byte gUnknown_085eb1a0, 0 - .4byte gUnknown_085eb1a9, 0 - .4byte gUnknown_085eb1b6, 0 - .4byte gUnknown_085eb5c3, 0 - .4byte gUnknown_085eb5c8, 0 + .4byte gUnknown_085EB1A0, 0 + .4byte gUnknown_085EB1A9, 0 + .4byte gUnknown_085EB1B6, 0 + .4byte gUnknown_085EB5C3, 0 + .4byte gUnknown_085EB5C8, 0 -gUnknown_0858b250:: @ 58B250 +gUnknown_0858B250:: @ 58B250 @ replacing .incbin "baserom.gba", 0x0058b250, 0x10 - .4byte gUnknown_085eb29a, 0 - .4byte gUnknown_085eb2a3, 0 + .4byte gUnknown_085EB29A, 0 + .4byte gUnknown_085EB2A3, 0 -gUnknown_0858b260:: @ 58B260 +gUnknown_0858B260:: @ 58B260 @ replacing .incbin "baserom.gba", 0x0058b260, 0x20 - .4byte gUnknown_085eb372, 0 - .4byte gUnknown_085eb37f, 0 - .4byte gUnknown_085eb389, 0 + .4byte gUnknown_085EB372, 0 + .4byte gUnknown_085EB37F, 0 + .4byte gUnknown_085EB389, 0 .4byte gText_Exit, 0 -gUnknown_0858b280:: @ 58B280 +gUnknown_0858B280:: @ 58B280 @ replacing .incbin "baserom.gba", 0x0058b280, 0x18 .4byte gText_Yes, 0 .4byte gText_No, 0 - .4byte gUnknown_085ead6d, 0 + .4byte gUnknown_085EAD6D, 0 -gUnknown_0858b298:: @ 58B298 +gUnknown_0858B298:: @ 58B298 @ replacing .incbin "baserom.gba", 0x0058b298, 0x28 - .4byte gUnknown_085eae6e, 0 - .4byte gUnknown_085eae7c, 0 - .4byte gUnknown_085eae8a, 0 - .4byte gUnknown_085ead6d, 0 + .4byte gUnknown_085EAE6E, 0 + .4byte gUnknown_085EAE7C, 0 + .4byte gUnknown_085EAE8A, 0 + .4byte gUnknown_085EAD6D, 0 .4byte gText_Exit, 0 -gUnknown_0858b2c0:: @ 58B2C0 +gUnknown_0858B2C0:: @ 58B2C0 @ replacing .incbin "baserom.gba", 0x0058b2c0, 0x20 - .4byte gUnknown_085eb372, 0 - .4byte gUnknown_085eb37f, 0 - .4byte gUnknown_085eb397, 0 + .4byte gUnknown_085EB372, 0 + .4byte gUnknown_085EB37F, 0 + .4byte gUnknown_085EB397, 0 .4byte gText_Exit, 0 -gUnknown_0858b2e0:: @ 58B2E0 +gUnknown_0858B2E0:: @ 58B2E0 @ replacing .incbin "baserom.gba", 0x0058b2e0, 0x28 - .4byte gUnknown_085eb372, 0 - .4byte gUnknown_085eb37f, 0 - .4byte gUnknown_085eb389, 0 - .4byte gUnknown_085eb397, 0 + .4byte gUnknown_085EB372, 0 + .4byte gUnknown_085EB37F, 0 + .4byte gUnknown_085EB389, 0 + .4byte gUnknown_085EB397, 0 .4byte gText_Exit, 0 -gUnknown_0858b308:: @ 58B308 +gUnknown_0858B308:: @ 58B308 @ replacing .incbin "baserom.gba", 0x0058b308, 0x18 - .4byte gUnknown_085eb372, 0 - .4byte gUnknown_085eb37f, 0 + .4byte gUnknown_085EB372, 0 + .4byte gUnknown_085EB37F, 0 .4byte gText_Exit, 0 -gUnknown_0858b320:: @ 58B320 +gUnknown_0858B320:: @ 58B320 @ replacing .incbin "baserom.gba", 0x0058b320, 0x18 - .4byte gUnknown_085eb3a4, 0 - .4byte gUnknown_085eb3b1, 0 + .4byte gUnknown_085EB3A4, 0 + .4byte gUnknown_085EB3B1, 0 .4byte gText_Exit, 0 -gUnknown_0858b338:: @ 58B338 +gUnknown_0858B338:: @ 58B338 @ replacing .incbin "baserom.gba", 0x0058b338, 0x18 - .4byte gUnknown_085eb3d4, 0 - .4byte gUnknown_085eb3c6, 0 + .4byte gUnknown_085EB3D4, 0 + .4byte gUnknown_085EB3C6, 0 .4byte gText_Exit, 0 -gUnknown_0858b350:: @ 58B350 +gUnknown_0858B350:: @ 58B350 @ replacing .incbin "baserom.gba", 0x0058b350, 0x28 - .4byte gUnknown_085eb1c5, 0 - .4byte gUnknown_085eb1d1, 0 - .4byte gUnknown_085eb1dc, 0 - .4byte gUnknown_085eb1e7, 0 + .4byte gUnknown_085EB1C5, 0 + .4byte gUnknown_085EB1D1, 0 + .4byte gUnknown_085EB1DC, 0 + .4byte gUnknown_085EB1E7, 0 .4byte gText_Exit, 0 -gUnknown_0858b378:: @ 58B378 +gUnknown_0858B378:: @ 58B378 @ replacing .incbin "baserom.gba", 0x0058b378, 0x18 - .4byte gUnknown_085eb212, 0 - .4byte gUnknown_085eb21d, 0 + .4byte gUnknown_085EB212, 0 + .4byte gUnknown_085EB21D, 0 .4byte gText_Exit, 0 -gUnknown_0858b390:: @ 58B390 +gUnknown_0858B390:: @ 58B390 @ replacing .incbin "baserom.gba", 0x0058b390, 0x20 - .4byte gUnknown_085eb227, 0 - .4byte gUnknown_085eb234, 0 - .4byte gUnknown_085eb241, 0 + .4byte gUnknown_085EB227, 0 + .4byte gUnknown_085EB234, 0 + .4byte gUnknown_085EB241, 0 .4byte gText_Cancel2, 0 -gUnknown_0858b3b0:: @ 58B3B0 +gUnknown_0858B3B0:: @ 58B3B0 @ replacing .incbin "baserom.gba", 0x0058b3b0, 0x18 - .4byte gUnknown_085eb24e, 0 - .4byte gUnknown_085eb255, 0 + .4byte gUnknown_085EB24E, 0 + .4byte gUnknown_085EB255, 0 .4byte gText_Exit, 0 -gUnknown_0858b3c8:: @ 58B3C8 +gUnknown_0858B3C8:: @ 58B3C8 @ replacing .incbin "baserom.gba", 0x0058b3c8, 0x40 .4byte gText_MenuOptionPokedex, 0 .4byte gText_MenuOptionPokemon, 0 .4byte gText_MenuOptionBag, 0 .4byte gText_MenuOptionPokenav, 0 - .4byte gUnknown_085eb278, 0 + .4byte gUnknown_085EB278, 0 .4byte gText_MenuOptionSave, 0 .4byte gText_MenuOptionOption, 0 .4byte gText_MenuOptionExit, 0 -gUnknown_0858b408:: @ 58B408 +gUnknown_0858B408:: @ 58B408 @ replacing .incbin "baserom.gba", 0x0058b408, 0x20 - .4byte gUnknown_085eb28a, 0 - .4byte gUnknown_085eb290, 0 - .4byte gUnknown_085eb295, 0 + .4byte gUnknown_085EB28A, 0 + .4byte gUnknown_085EB290, 0 + .4byte gUnknown_085EB295, 0 .4byte gText_Exit, 0 -gUnknown_0858b428:: @ 58B428 +gUnknown_0858B428:: @ 58B428 @ replacing .incbin "baserom.gba", 0x0058b428, 0x18 - .4byte gUnknown_085eb2ad, 0 - .4byte gUnknown_085eb2bd, 0 + .4byte gUnknown_085EB2AD, 0 + .4byte gUnknown_085EB2BD, 0 .4byte gText_Exit, 0 -gUnknown_0858b440:: @ 58B440 +gUnknown_0858B440:: @ 58B440 @ replacing .incbin "baserom.gba", 0x0058b440, 0x18 - .4byte gUnknown_085eb2ad, 0 - .4byte gUnknown_085eb2ca, 0 + .4byte gUnknown_085EB2AD, 0 + .4byte gUnknown_085EB2CA, 0 .4byte gText_Exit, 0 -gUnknown_0858b458:: @ 58B458 +gUnknown_0858B458:: @ 58B458 @ replacing .incbin "baserom.gba", 0x0058b458, 0x18 - .4byte gUnknown_085eb2bd, 0 - .4byte gUnknown_085eb2ca, 0 + .4byte gUnknown_085EB2BD, 0 + .4byte gUnknown_085EB2CA, 0 .4byte gText_Exit, 0 -gUnknown_0858b470:: @ 58B470 +gUnknown_0858B470:: @ 58B470 @ replacing .incbin "baserom.gba", 0x0058b470, 0x20 - .4byte gUnknown_085eb2ad, 0 - .4byte gUnknown_085eb2bd, 0 - .4byte gUnknown_085eb2ca, 0 + .4byte gUnknown_085EB2AD, 0 + .4byte gUnknown_085EB2BD, 0 + .4byte gUnknown_085EB2CA, 0 .4byte gText_Exit, 0 -gUnknown_0858b490:: @ 58B490 +gUnknown_0858B490:: @ 58B490 @ replacing .incbin "baserom.gba", 0x0058b490, 0x18 - .4byte gUnknown_085eb2e4, 0 - .4byte gUnknown_085eb2f0, 0 + .4byte gUnknown_085EB2E4, 0 + .4byte gUnknown_085EB2F0, 0 .4byte gText_Exit, 0 -gUnknown_0858b4a8:: @ 58B4A8 +gUnknown_0858B4A8:: @ 58B4A8 @ replacing .incbin "baserom.gba", 0x0058b4a8, 0x10 .4byte gText_Yes, 0 - .4byte gUnknown_085eb2fc, 0 + .4byte gUnknown_085EB2FC, 0 -gUnknown_0858b4b8:: @ 58B4B8 +gUnknown_0858B4B8:: @ 58B4B8 @ replacing .incbin "baserom.gba", 0x0058b4b8, 0x30 - .4byte gUnknown_085eb3df, 0 - .4byte gUnknown_085eb3ea, 0 - .4byte gUnknown_085eb3f1, 0 - .4byte gUnknown_085eb3fc, 0 - .4byte gUnknown_085eb40a, 0 + .4byte gUnknown_085EB3DF, 0 + .4byte gUnknown_085EB3EA, 0 + .4byte gUnknown_085EB3F1, 0 + .4byte gUnknown_085EB3FC, 0 + .4byte gUnknown_085EB40A, 0 .4byte gText_Exit, 0 -gUnknown_0858b4e8:: @ 58B4E8 +gUnknown_0858B4E8:: @ 58B4E8 @ replacing .incbin "baserom.gba", 0x0058b4e8, 0x20 - .4byte gUnknown_085eb415, 0 - .4byte gUnknown_085eb41d, 0 - .4byte gUnknown_085eb424, 0 + .4byte gUnknown_085EB415, 0 + .4byte gUnknown_085EB41D, 0 + .4byte gUnknown_085EB424, 0 .4byte gText_Exit, 0 -gUnknown_0858b508:: @ 58B508 +gUnknown_0858B508:: @ 58B508 @ replacing .incbin "baserom.gba", 0x0058b508, 0x28 - .4byte gUnknown_085eb45c, 0 - .4byte gUnknown_085eb469, 0 - .4byte gUnknown_085eb475, 0 - .4byte gUnknown_085eb482, 0 + .4byte gUnknown_085EB45C, 0 + .4byte gUnknown_085EB469, 0 + .4byte gUnknown_085EB475, 0 + .4byte gUnknown_085EB482, 0 .4byte gText_Exit, 0 -gUnknown_0858b530:: @ 58B530 +gUnknown_0858B530:: @ 58B530 @ replacing .incbin "baserom.gba", 0x0058b530, 0x28 - .4byte gUnknown_085eb42f, 0 - .4byte gUnknown_085eb43a, 0 - .4byte gUnknown_085eb444, 0 - .4byte gUnknown_085eb451, 0 + .4byte gUnknown_085EB42F, 0 + .4byte gUnknown_085EB43A, 0 + .4byte gUnknown_085EB444, 0 + .4byte gUnknown_085EB451, 0 .4byte gText_Exit, 0 -gUnknown_0858b558:: @ 58B558 +gUnknown_0858B558:: @ 58B558 @ replacing .incbin "baserom.gba", 0x0058b558, 0x20 - .4byte gUnknown_085eb48e, 0 - .4byte gUnknown_085eb496, 0 - .4byte gUnknown_085eb4a3, 0 + .4byte gUnknown_085EB48E, 0 + .4byte gUnknown_085EB496, 0 + .4byte gUnknown_085EB4A3, 0 .4byte gText_Exit, 0 -gUnknown_0858b578:: @ 58B578 +gUnknown_0858B578:: @ 58B578 @ replacing .incbin "baserom.gba", 0x0058b578, 0x30 - .4byte gUnknown_085eb4ad, 0 - .4byte gUnknown_085eb4b9, 0 - .4byte gUnknown_085eb4c7, 0 - .4byte gUnknown_085eb4d4, 0 - .4byte gUnknown_085eb4e0, 0 + .4byte gUnknown_085EB4AD, 0 + .4byte gUnknown_085EB4B9, 0 + .4byte gUnknown_085EB4C7, 0 + .4byte gUnknown_085EB4D4, 0 + .4byte gUnknown_085EB4E0, 0 .4byte gText_Exit, 0 -gUnknown_0858b5a8:: @ 58B5A8 +gUnknown_0858B5A8:: @ 58B5A8 @ replacing .incbin "baserom.gba", 0x0058b5a8, 0x30 - .4byte gUnknown_085eb4eb, 0 - .4byte gUnknown_085eb4f9, 0 - .4byte gUnknown_085eb508, 0 - .4byte gUnknown_085eb516, 0 - .4byte gUnknown_085eb523, 0 + .4byte gUnknown_085EB4EB, 0 + .4byte gUnknown_085EB4F9, 0 + .4byte gUnknown_085EB508, 0 + .4byte gUnknown_085EB516, 0 + .4byte gUnknown_085EB523, 0 .4byte gText_Exit, 0 -gUnknown_0858b5d8:: @ 58B5D8 +gUnknown_0858B5D8:: @ 58B5D8 @ replacing .incbin "baserom.gba", 0x0058b5d8, 0x28 - .4byte gUnknown_085eb532, 0 - .4byte gUnknown_085eb543, 0 - .4byte gUnknown_085eb555, 0 - .4byte gUnknown_085eb563, 0 + .4byte gUnknown_085EB532, 0 + .4byte gUnknown_085EB543, 0 + .4byte gUnknown_085EB555, 0 + .4byte gUnknown_085EB563, 0 .4byte gText_Exit, 0 -gUnknown_0858b600:: @ 58B600 +gUnknown_0858B600:: @ 58B600 @ replacing .incbin "baserom.gba", 0x0058b600, 0x20 - .4byte gUnknown_085eb56e, 0 - .4byte gUnknown_085eb57e, 0 - .4byte gUnknown_085eb589, 0 + .4byte gUnknown_085EB56E, 0 + .4byte gUnknown_085EB57E, 0 + .4byte gUnknown_085EB589, 0 .4byte gText_Exit, 0 -gUnknown_0858b620:: @ 58B620 +gUnknown_0858B620:: @ 58B620 @ replacing .incbin "baserom.gba", 0x0058b620, 0x20 - .4byte gUnknown_085eb5b6, 0 - .4byte gUnknown_085eb5bc, 0 - .4byte gUnknown_085eb5c3, 0 - .4byte gUnknown_085eb5c8, 0 + .4byte gUnknown_085EB5B6, 0 + .4byte gUnknown_085EB5BC, 0 + .4byte gUnknown_085EB5C3, 0 + .4byte gUnknown_085EB5C8, 0 -gUnknown_0858b640:: @ 58B640 +gUnknown_0858B640:: @ 58B640 @ replacing .incbin "baserom.gba", 0x0058b640, 0x18 - .4byte gUnknown_085eb5b6, 0 - .4byte gUnknown_085eb5c3, 0 - .4byte gUnknown_085eb5c8, 0 + .4byte gUnknown_085EB5B6, 0 + .4byte gUnknown_085EB5C3, 0 + .4byte gUnknown_085EB5C8, 0 -gUnknown_0858b658:: @ 58B658 +gUnknown_0858B658:: @ 58B658 @ replacing .incbin "baserom.gba", 0x0058b658, 0x18 - .4byte gUnknown_085eb5b6, 0 - .4byte gUnknown_085eb5bc, 0 - .4byte gUnknown_085eb5c8, 0 + .4byte gUnknown_085EB5B6, 0 + .4byte gUnknown_085EB5BC, 0 + .4byte gUnknown_085EB5C8, 0 -gUnknown_0858b670:: @ 58B670 +gUnknown_0858B670:: @ 58B670 @ replacing .incbin "baserom.gba", 0x0058b670, 0x10 - .4byte gUnknown_085eb5b6, 0 - .4byte gUnknown_085eb5c8, 0 + .4byte gUnknown_085EB5B6, 0 + .4byte gUnknown_085EB5C8, 0 -gUnknown_0858b680:: @ 58B680 +gUnknown_0858B680:: @ 58B680 @ replacing .incbin "baserom.gba", 0x0058b680, 0x10 - .4byte gUnknown_085ee14b, 0 - .4byte gUnknown_085ee14f, 0 + .4byte gUnknown_085EE14B, 0 + .4byte gUnknown_085EE14F, 0 -gUnknown_0858b690:: @ 58B690 +gUnknown_0858B690:: @ 58B690 @ replacing .incbin "baserom.gba", 0x0058b690, 0x20 - .4byte gUnknown_085eb2ff, 0 - .4byte gUnknown_085eb310, 0 - .4byte gUnknown_085eb317, 0 - .4byte gUnknown_085eb31f, 0 + .4byte gUnknown_085EB2FF, 0 + .4byte gUnknown_085EB310, 0 + .4byte gUnknown_085EB317, 0 + .4byte gUnknown_085EB31F, 0 -gUnknown_0858b6b0:: @ 58B6B0 +gUnknown_0858B6B0:: @ 58B6B0 @ replacing .incbin "baserom.gba", 0x0058b6b0, 0x20 - .4byte gUnknown_085eb7b8, 0 - .4byte gUnknown_085eb7c7, 0 - .4byte gUnknown_085eb7d0, 0 - .4byte gUnknown_085eb7db, 0 + .4byte gUnknown_085EB7B8, 0 + .4byte gUnknown_085EB7C7, 0 + .4byte gUnknown_085EB7D0, 0 + .4byte gUnknown_085EB7DB, 0 -gUnknown_0858b6d0:: @ 58B6D0 +gUnknown_0858B6D0:: @ 58B6D0 @ replacing .incbin "baserom.gba", 0x0058b6d0, 0x30 - .4byte gUnknown_085eb4ad, 0 - .4byte gUnknown_085eb4b9, 0 - .4byte gUnknown_085eb4c7, 0 - .4byte gUnknown_085eb4d4, 0 - .4byte gUnknown_085eb597, 0 + .4byte gUnknown_085EB4AD, 0 + .4byte gUnknown_085EB4B9, 0 + .4byte gUnknown_085EB4C7, 0 + .4byte gUnknown_085EB4D4, 0 + .4byte gUnknown_085EB597, 0 .4byte gText_Exit, 0 -gUnknown_0858b700:: @ 58B700 +gUnknown_0858B700:: @ 58B700 @ replacing .incbin "baserom.gba", 0x0058b700, 0x30 - .4byte gUnknown_085eb5a6, 0 - .4byte gUnknown_085eb45c, 0 - .4byte gUnknown_085eb469, 0 - .4byte gUnknown_085eb475, 0 - .4byte gUnknown_085eb482, 0 + .4byte gUnknown_085EB5A6, 0 + .4byte gUnknown_085EB45C, 0 + .4byte gUnknown_085EB469, 0 + .4byte gUnknown_085EB475, 0 + .4byte gUnknown_085EB482, 0 .4byte gText_Exit, 0 -gUnknown_0858b730:: @ 58B730 +gUnknown_0858B730:: @ 58B730 @ replacing .incbin "baserom.gba", 0x0058b730, 0x28 - .4byte gUnknown_085eb32d, 0 - .4byte gUnknown_085eb33e, 0 - .4byte gUnknown_085eb350, 0 - .4byte gUnknown_085eb361, 0 + .4byte gUnknown_085EB32D, 0 + .4byte gUnknown_085EB33E, 0 + .4byte gUnknown_085EB350, 0 + .4byte gUnknown_085EB361, 0 .4byte gText_Exit, 0 -gUnknown_0858b758:: @ 58B758 +gUnknown_0858B758:: @ 58B758 @ replacing .incbin "baserom.gba", 0x0058b758, 0x8 .4byte gText_Exit, 0 @@ -682,119 +682,119 @@ gUnknown_0858b758:: @ 58B758 gUnknown_0858B760:: @ 858B760 @ replacing .incbin "baserom.gba", 0x0058b760, 0x390 .4byte 0x0858abd8, 3 - .4byte gUnknown_0858b758, 1 - .4byte gUnknown_0858abf0, 3 - .4byte gUnknown_0858ac08, 4 - .4byte gUnknown_0858ac28, 6 - .4byte gUnknown_0858ac78, 3 - .4byte gUnknown_0858ac58, 4 - .4byte gUnknown_0858ac90, 4 - .4byte gUnknown_0858b758, 1 - .4byte gUnknown_0858b758, 1 - .4byte gUnknown_0858b758, 1 - .4byte gUnknown_0858b4e8, 4 - .4byte gUnknown_0858acb0, 2 - .4byte gUnknown_0858acc0, 6 - .4byte gUnknown_0858acf0, 2 - .4byte gUnknown_0858b758, 1 - .4byte gUnknown_0858ad00, 2 - .4byte gUnknown_0858b280, 3 - .4byte gUnknown_0858b298, 5 - .4byte gUnknown_0858b758, 1 - .4byte gUnknown_0858ad10, 3 - .4byte gUnknown_0858b758, 1 - .4byte gUnknown_0858b758, 1 - .4byte gUnknown_0858ad28, 3 - .4byte gUnknown_0858ad40, 3 - .4byte gUnknown_0858ad58, 3 - .4byte gUnknown_0858ad70, 3 - .4byte gUnknown_0858ad88, 3 - .4byte gUnknown_0858ada0, 3 - .4byte gUnknown_0858adb8, 3 - .4byte gUnknown_0858add0, 3 - .4byte gUnknown_0858ade8, 3 - .4byte gUnknown_0858ae00, 3 - .4byte gUnknown_0858ae18, 3 - .4byte gUnknown_0858ae30, 3 - .4byte gUnknown_0858ae48, 3 - .4byte gUnknown_0858ae60, 3 - .4byte gUnknown_0858ae78, 3 - .4byte gUnknown_0858ae90, 3 - .4byte gUnknown_0858aea8, 3 - .4byte gUnknown_0858b758, 1 - .4byte gUnknown_0858b758, 1 - .4byte gUnknown_0858aec0, 4 - .4byte gUnknown_0858aee0, 4 - .4byte gUnknown_0858af00, 4 - .4byte gUnknown_0858af20, 2 - .4byte gUnknown_0858af30, 3 - .4byte gUnknown_0858af48, 8 - .4byte gUnknown_0858af88, 4 - .4byte gUnknown_0858afd8, 3 - .4byte gUnknown_0858aff0, 2 - .4byte gUnknown_0858b758, 1 - .4byte gUnknown_0858b000, 3 - .4byte gUnknown_0858b018, 3 - .4byte gUnknown_0858b030, 2 - .4byte gUnknown_0858afa8, 6 - .4byte gUnknown_0858b040, 2 - .4byte gUnknown_0858b050, 6 - .4byte gUnknown_0858b080, 2 - .4byte gUnknown_0858b090, 2 - .4byte gUnknown_0858b0a0, 3 - .4byte gUnknown_0858b0b8, 2 - .4byte gUnknown_0858b0c8, 3 - .4byte gUnknown_0858b0e0, 3 - .4byte gUnknown_0858b0f8, 4 - .4byte gUnknown_0858b118, 2 - .4byte gUnknown_0858b128, 3 - .4byte gUnknown_0858b140, 3 - .4byte gUnknown_0858b158, 4 - .4byte gUnknown_0858b178, 3 - .4byte gUnknown_0858b190, 4 - .4byte gUnknown_0858b1b0, 4 - .4byte gUnknown_0858b1d0, 5 - .4byte gUnknown_0858b1f8, 6 - .4byte gUnknown_0858b308, 3 - .4byte gUnknown_0858b308, 3 - .4byte gUnknown_0858b260, 4 - .4byte gUnknown_0858b260, 4 - .4byte gUnknown_0858b2c0, 4 - .4byte gUnknown_0858b2e0, 5 - .4byte gUnknown_0858b320, 3 - .4byte gUnknown_0858b338, 3 - .4byte gUnknown_0858b350, 5 - .4byte gUnknown_0858b378, 3 - .4byte gUnknown_0858b390, 4 - .4byte gUnknown_0858b3b0, 3 - .4byte gUnknown_0858b3c8, 8 - .4byte gUnknown_0858b408, 4 - .4byte gUnknown_0858b250, 2 - .4byte gUnknown_0858b428, 3 - .4byte gUnknown_0858b440, 3 - .4byte gUnknown_0858b458, 3 - .4byte gUnknown_0858b470, 4 - .4byte gUnknown_0858b490, 3 - .4byte gUnknown_0858b4a8, 2 - .4byte gUnknown_0858b4b8, 6 - .4byte gUnknown_0858b508, 5 - .4byte gUnknown_0858b530, 5 - .4byte gUnknown_0858b558, 4 - .4byte gUnknown_0858b578, 6 - .4byte gUnknown_0858b5a8, 6 - .4byte gUnknown_0858b5d8, 5 - .4byte gUnknown_0858b600, 4 - .4byte gUnknown_0858b620, 4 - .4byte gUnknown_0858b640, 3 - .4byte gUnknown_0858b658, 3 - .4byte gUnknown_0858b670, 2 - .4byte gUnknown_0858b228, 5 - .4byte gUnknown_0858b680, 2 - .4byte gUnknown_0858b690, 4 - .4byte gUnknown_0858b6b0, 4 - .4byte gUnknown_0858b6d0, 6 - .4byte gUnknown_0858b700, 6 - .4byte gUnknown_0858b730, 5 + .4byte gUnknown_0858B758, 1 + .4byte gUnknown_0858ABF0, 3 + .4byte gUnknown_0858AC08, 4 + .4byte gUnknown_0858AC28, 6 + .4byte gUnknown_0858AC78, 3 + .4byte gUnknown_0858AC58, 4 + .4byte gUnknown_0858AC90, 4 + .4byte gUnknown_0858B758, 1 + .4byte gUnknown_0858B758, 1 + .4byte gUnknown_0858B758, 1 + .4byte gUnknown_0858B4E8, 4 + .4byte gUnknown_0858ACB0, 2 + .4byte gUnknown_0858ACC0, 6 + .4byte gUnknown_0858ACF0, 2 + .4byte gUnknown_0858B758, 1 + .4byte gUnknown_0858AD00, 2 + .4byte gUnknown_0858B280, 3 + .4byte gUnknown_0858B298, 5 + .4byte gUnknown_0858B758, 1 + .4byte gUnknown_0858AD10, 3 + .4byte gUnknown_0858B758, 1 + .4byte gUnknown_0858B758, 1 + .4byte gUnknown_0858AD28, 3 + .4byte gUnknown_0858AD40, 3 + .4byte gUnknown_0858AD58, 3 + .4byte gUnknown_0858AD70, 3 + .4byte gUnknown_0858AD88, 3 + .4byte gUnknown_0858ADA0, 3 + .4byte gUnknown_0858ADB8, 3 + .4byte gUnknown_0858ADD0, 3 + .4byte gUnknown_0858ADE8, 3 + .4byte gUnknown_0858AE00, 3 + .4byte gUnknown_0858AE18, 3 + .4byte gUnknown_0858AE30, 3 + .4byte gUnknown_0858AE48, 3 + .4byte gUnknown_0858AE60, 3 + .4byte gUnknown_0858AE78, 3 + .4byte gUnknown_0858AE90, 3 + .4byte gUnknown_0858AEA8, 3 + .4byte gUnknown_0858B758, 1 + .4byte gUnknown_0858B758, 1 + .4byte gUnknown_0858AEC0, 4 + .4byte gUnknown_0858AEE0, 4 + .4byte gUnknown_0858AF00, 4 + .4byte gUnknown_0858AF20, 2 + .4byte gUnknown_0858AF30, 3 + .4byte gUnknown_0858AF48, 8 + .4byte gUnknown_0858AF88, 4 + .4byte gUnknown_0858AFD8, 3 + .4byte gUnknown_0858AFF0, 2 + .4byte gUnknown_0858B758, 1 + .4byte gUnknown_0858B000, 3 + .4byte gUnknown_0858B018, 3 + .4byte gUnknown_0858B030, 2 + .4byte gUnknown_0858AFA8, 6 + .4byte gUnknown_0858B040, 2 + .4byte gUnknown_0858B050, 6 + .4byte gUnknown_0858B080, 2 + .4byte gUnknown_0858B090, 2 + .4byte gUnknown_0858B0A0, 3 + .4byte gUnknown_0858B0B8, 2 + .4byte gUnknown_0858B0C8, 3 + .4byte gUnknown_0858B0E0, 3 + .4byte gUnknown_0858B0F8, 4 + .4byte gUnknown_0858B118, 2 + .4byte gUnknown_0858B128, 3 + .4byte gUnknown_0858B140, 3 + .4byte gUnknown_0858B158, 4 + .4byte gUnknown_0858B178, 3 + .4byte gUnknown_0858B190, 4 + .4byte gUnknown_0858B1B0, 4 + .4byte gUnknown_0858B1D0, 5 + .4byte gUnknown_0858B1F8, 6 + .4byte gUnknown_0858B308, 3 + .4byte gUnknown_0858B308, 3 + .4byte gUnknown_0858B260, 4 + .4byte gUnknown_0858B260, 4 + .4byte gUnknown_0858B2C0, 4 + .4byte gUnknown_0858B2E0, 5 + .4byte gUnknown_0858B320, 3 + .4byte gUnknown_0858B338, 3 + .4byte gUnknown_0858B350, 5 + .4byte gUnknown_0858B378, 3 + .4byte gUnknown_0858B390, 4 + .4byte gUnknown_0858B3B0, 3 + .4byte gUnknown_0858B3C8, 8 + .4byte gUnknown_0858B408, 4 + .4byte gUnknown_0858B250, 2 + .4byte gUnknown_0858B428, 3 + .4byte gUnknown_0858B440, 3 + .4byte gUnknown_0858B458, 3 + .4byte gUnknown_0858B470, 4 + .4byte gUnknown_0858B490, 3 + .4byte gUnknown_0858B4A8, 2 + .4byte gUnknown_0858B4B8, 6 + .4byte gUnknown_0858B508, 5 + .4byte gUnknown_0858B530, 5 + .4byte gUnknown_0858B558, 4 + .4byte gUnknown_0858B578, 6 + .4byte gUnknown_0858B5A8, 6 + .4byte gUnknown_0858B5D8, 5 + .4byte gUnknown_0858B600, 4 + .4byte gUnknown_0858B620, 4 + .4byte gUnknown_0858B640, 3 + .4byte gUnknown_0858B658, 3 + .4byte gUnknown_0858B670, 2 + .4byte gUnknown_0858B228, 5 + .4byte gUnknown_0858B680, 2 + .4byte gUnknown_0858B690, 4 + .4byte gUnknown_0858B6B0, 4 + .4byte gUnknown_0858B6D0, 6 + .4byte gUnknown_0858B700, 6 + .4byte gUnknown_0858B730, 5 gUnknown_0858BAF0:: @ 858BAF0 .incbin "baserom.gba", 0x58baf0, 0x78 diff --git a/data/strings.s b/data/strings.s index 41cc64af8..bfe642915 100644 --- a/data/strings.s +++ b/data/strings.s @@ -51,7 +51,7 @@ gText_EggNickname:: @ 85E8264 gText_Pokemon:: @ 85E8268 .string "POKéMON$" -gUnknown_085e8270:: @ 85E8270 +gUnknown_085E8270:: @ 85E8270 .string "PROF. BIRCH$" gText_MainMenuNewGame:: @ 85E827C @@ -81,10 +81,10 @@ gText_MysteryGiftCantUse:: @ 85E82E5 gText_MysteryEventsCantUse:: @ 85E8328 .string "MYSTERY EVENTS can’t be used while\nthe Wireless Adapter is attached.$" -gUnknown_085e836d:: @ 85E836D +gUnknown_085E836D:: @ 85E836D .string "Updating save file using external\ndata. Please wait.$" -gUnknown_085e83a2:: @ 85E83A2 +gUnknown_085E83A2:: @ 85E83A2 .string "The save file has been updated.$" gText_SaveFileCorrupted:: @ 85E83C2 @@ -99,58 +99,58 @@ gJPText_No1MSubCircuit:: @ 85E8440 gText_BatteryRunDry:: @ 85E8453 .string "The internal battery has run dry.\nThe game can be played.\pHowever, clock-based events will\nno longer occur.$" -gUnknown_085e84bf:: @ 85E84BF +gUnknown_085E84BF:: @ 85E84BF .string "PLAYER$" -gUnknown_085e84c6:: @ 85E84C6 +gUnknown_085E84C6:: @ 85E84C6 .string "POKéDEX$" gText_MainMenuTime:: @ 85E84CE .string "TIME$" -gUnknown_085e84d3:: @ 85E84D3 +gUnknown_085E84D3:: @ 85E84D3 .string "BADGES$" -gUnknown_085e84da:: @ 85E84DA +gUnknown_085E84DA:: @ 85E84DA .string "A Button$" -gUnknown_085e84e3:: @ 85E84E3 +gUnknown_085E84E3:: @ 85E84E3 .string "B Button$" -gUnknown_085e84ec:: @ 85E84EC +gUnknown_085E84EC:: @ 85E84EC .string "R Button$" -gUnknown_085e84f5:: @ 85E84F5 +gUnknown_085E84F5:: @ 85E84F5 .string "L Button$" -gUnknown_085e84fe:: @ 85E84FE +gUnknown_085E84FE:: @ 85E84FE .string "START$" -gUnknown_085e8504:: @ 85E8504 +gUnknown_085E8504:: @ 85E8504 .string "SELECT$" -gUnknown_085e850b:: @ 85E850B +gUnknown_085E850B:: @ 85E850B .string "+ Control Pad$" -gUnknown_085e8519:: @ 85E8519 +gUnknown_085E8519:: @ 85E8519 .string "L Button R Button$" -gUnknown_085e852c:: @ 85E852C +gUnknown_085E852C:: @ 85E852C .string "CONTROLS$" .align 2 -gUnknown_085e8538:: @ 85E8538 +gUnknown_085E8538:: @ 85E8538 .string "{UNK_CTRL_F80A}PICK {UNK_CTRL_F800}OK$" .align 2 -gUnknown_085e8544:: @ 85E8544 +gUnknown_085E8544:: @ 85E8544 .string "{UNK_CTRL_F800}NEXT$" .align 2 -gUnknown_085e854c:: @ 85E854C +gUnknown_085E854C:: @ 85E854C .string "{UNK_CTRL_F800}NEXT {UNK_CTRL_F801}BACK$" .align 2 @@ -165,130 +165,130 @@ gText_PickCancel:: @ 85E8574 gText_UnkCtrlF800Exit:: @ 85E8588 .string "{UNK_CTRL_F800}EXIT$" -gUnknown_085e858f:: @ 85E858F +gUnknown_085E858F:: @ 85E858F .string "BOY$" -gUnknown_085e8593:: @ 85E8593 +gUnknown_085E8593:: @ 85E8593 .string "GIRL$" -gUnknown_085e8598:: @ 85E8598 +gUnknown_085E8598:: @ 85E8598 .string "STU$" -gUnknown_085e859c:: @ 85E859C +gUnknown_085E859C:: @ 85E859C .string "MILTON$" -gUnknown_085e85a3:: @ 85E85A3 +gUnknown_085E85A3:: @ 85E85A3 .string "TOM$" -gUnknown_085e85a7:: @ 85E85A7 +gUnknown_085E85A7:: @ 85E85A7 .string "KENNY$" -gUnknown_085e85ad:: @ 85E85AD +gUnknown_085E85AD:: @ 85E85AD .string "REID$" -gUnknown_085e85b2:: @ 85E85B2 +gUnknown_085E85B2:: @ 85E85B2 .string "JUDE$" -gUnknown_085e85b7:: @ 85E85B7 +gUnknown_085E85B7:: @ 85E85B7 .string "JAXSON$" -gUnknown_085e85be:: @ 85E85BE +gUnknown_085E85BE:: @ 85E85BE .string "EASTON$" -gUnknown_085e85c5:: @ 85E85C5 +gUnknown_085E85C5:: @ 85E85C5 .string "WALKER$" -gUnknown_085e85cc:: @ 85E85CC +gUnknown_085E85CC:: @ 85E85CC .string "TERU$" -gUnknown_085e85d1:: @ 85E85D1 +gUnknown_085E85D1:: @ 85E85D1 .string "JOHNNY$" -gUnknown_085e85d8:: @ 85E85D8 +gUnknown_085E85D8:: @ 85E85D8 .string "BRETT$" -gUnknown_085e85de:: @ 85E85DE +gUnknown_085E85DE:: @ 85E85DE .string "SETH$" -gUnknown_085e85e3:: @ 85E85E3 +gUnknown_085E85E3:: @ 85E85E3 .string "TERRY$" -gUnknown_085e85e9:: @ 85E85E9 +gUnknown_085E85E9:: @ 85E85E9 .string "CASEY$" -gUnknown_085e85ef:: @ 85E85EF +gUnknown_085E85EF:: @ 85E85EF .string "DARREN$" -gUnknown_085e85f6:: @ 85E85F6 +gUnknown_085E85F6:: @ 85E85F6 .string "LANDON$" -gUnknown_085e85fd:: @ 85E85FD +gUnknown_085E85FD:: @ 85E85FD .string "COLLIN$" -gUnknown_085e8604:: @ 85E8604 +gUnknown_085E8604:: @ 85E8604 .string "STANLEY$" -gUnknown_085e860c:: @ 85E860C +gUnknown_085E860C:: @ 85E860C .string "QUINCY$" -gUnknown_085e8613:: @ 85E8613 +gUnknown_085E8613:: @ 85E8613 .string "KIMMY$" -gUnknown_085e8619:: @ 85E8619 +gUnknown_085E8619:: @ 85E8619 .string "TIARA$" -gUnknown_085e861f:: @ 85E861F +gUnknown_085E861F:: @ 85E861F .string "BELLA$" -gUnknown_085e8625:: @ 85E8625 +gUnknown_085E8625:: @ 85E8625 .string "JAYLA$" -gUnknown_085e862b:: @ 85E862B +gUnknown_085E862B:: @ 85E862B .string "ALLIE$" -gUnknown_085e8631:: @ 85E8631 +gUnknown_085E8631:: @ 85E8631 .string "LIANNA$" -gUnknown_085e8638:: @ 85E8638 +gUnknown_085E8638:: @ 85E8638 .string "SARA$" -gUnknown_085e863d:: @ 85E863D +gUnknown_085E863D:: @ 85E863D .string "MONICA$" -gUnknown_085e8644:: @ 85E8644 +gUnknown_085E8644:: @ 85E8644 .string "CAMILA$" -gUnknown_085e864b:: @ 85E864B +gUnknown_085E864B:: @ 85E864B .string "AUBREE$" -gUnknown_085e8652:: @ 85E8652 +gUnknown_085E8652:: @ 85E8652 .string "RUTHIE$" -gUnknown_085e8659:: @ 85E8659 +gUnknown_085E8659:: @ 85E8659 .string "HAZEL$" -gUnknown_085e865f:: @ 85E865F +gUnknown_085E865F:: @ 85E865F .string "NADINE$" -gUnknown_085e8666:: @ 85E8666 +gUnknown_085E8666:: @ 85E8666 .string "TANJA$" -gUnknown_085e866c:: @ 85E866C +gUnknown_085E866C:: @ 85E866C .string "YASMIN$" -gUnknown_085e8673:: @ 85E8673 +gUnknown_085E8673:: @ 85E8673 .string "NICOLA$" -gUnknown_085e867a:: @ 85E867A +gUnknown_085E867A:: @ 85E867A .string "LILLIE$" -gUnknown_085e8681:: @ 85E8681 +gUnknown_085E8681:: @ 85E8681 .string "TERRA$" -gUnknown_085e8687:: @ 85E8687 +gUnknown_085E8687:: @ 85E8687 .string "LUCY$" -gUnknown_085e868c:: @ 85E868C +gUnknown_085E868C:: @ 85E868C .string "HALIE$" gText_ThisIsAPokemon:: @ 85E8692 @@ -303,22 +303,22 @@ gText_UnkHeight:: @ 85E86C6 gText_UnkWeight:: @ 85E86D0 .string "????.? lbs.$" -gUnknown_085e86dc:: @ 85E86DC +gUnknown_085E86DC:: @ 85E86DC .string " POKéMON$" -gUnknown_085e86fb:: @ 85E86FB +gUnknown_085E86FB:: @ 85E86FB .string "{CLEAR_TO 0x0C} ’ â€$" -gUnknown_085e8709:: @ 85E8709 +gUnknown_085E8709:: @ 85E8709 .string " . lbs.$" -gUnknown_085e871a:: @ 85E871A +gUnknown_085E871A:: @ 85E871A .string "$" gText_CryOf:: @ 85E871B .string "CRY OF$" -gUnknown_085e8722:: @ 85E8722 +gUnknown_085E8722:: @ 85E8722 .string "$" gText_SizeComparedTo:: @ 85E8723 @@ -342,160 +342,160 @@ gText_SearchCompleted:: @ 85E8773 gUnknown_085E8785:: @ 85E8785 .string "No matching POKéMON were found.$" -gUnknown_085e87a5:: @ 85E87A5 +gUnknown_085E87A5:: @ 85E87A5 .string "Search for POKéMON based on\nselected parameters.$" -gUnknown_085e87d6:: @ 85E87D6 +gUnknown_085E87D6:: @ 85E87D6 .string "Switch POKéDEX listings.$" -gUnknown_085e87ef:: @ 85E87EF +gUnknown_085E87EF:: @ 85E87EF .string "Return to the POKéDEX.$" -gUnknown_085e8806:: @ 85E8806 +gUnknown_085E8806:: @ 85E8806 .string "Select the POKéDEX mode.$" -gUnknown_085e881f:: @ 85E881F +gUnknown_085E881F:: @ 85E881F .string "Select the POKéDEX listing mode.$" -gUnknown_085e8840:: @ 85E8840 +gUnknown_085E8840:: @ 85E8840 .string "List by the first letter in the name.\nSpotted POKéMON only.$" -gUnknown_085e887c:: @ 85E887C +gUnknown_085E887C:: @ 85E887C .string "List by body color.\nSpotted POKéMON only.$" -gUnknown_085e88a6:: @ 85E88A6 +gUnknown_085E88A6:: @ 85E88A6 .string "List by type.\nOwned POKéMON only.$" -gUnknown_085e88c8:: @ 85E88C8 +gUnknown_085E88C8:: @ 85E88C8 .string "Execute search/switch.$" -gUnknown_085e88df:: @ 85E88DF +gUnknown_085E88DF:: @ 85E88DF .string "HOENN DEX$" -gUnknown_085e88e9:: @ 85E88E9 +gUnknown_085E88E9:: @ 85E88E9 .string "NATIONAL DEX$" -gUnknown_085e88f6:: @ 85E88F6 +gUnknown_085E88F6:: @ 85E88F6 .string "NUMERICAL MODE$" -gUnknown_085e8905:: @ 85E8905 +gUnknown_085E8905:: @ 85E8905 .string "A TO Z MODE$" -gUnknown_085e8911:: @ 85E8911 +gUnknown_085E8911:: @ 85E8911 .string "HEAVIEST MODE$" -gUnknown_085e891f:: @ 85E891F +gUnknown_085E891F:: @ 85E891F .string "LIGHTEST MODE$" -gUnknown_085e892d:: @ 85E892D +gUnknown_085E892D:: @ 85E892D .string "TALLEST MODE$" -gUnknown_085e893a:: @ 85E893A +gUnknown_085E893A:: @ 85E893A .string "SMALLEST MODE$" -gUnknown_085e8948:: @ 85E8948 +gUnknown_085E8948:: @ 85E8948 .string "ABC$" -gUnknown_085e894c:: @ 85E894C +gUnknown_085E894C:: @ 85E894C .string "DEF$" -gUnknown_085e8950:: @ 85E8950 +gUnknown_085E8950:: @ 85E8950 .string "GHI$" -gUnknown_085e8954:: @ 85E8954 +gUnknown_085E8954:: @ 85E8954 .string "JKL$" -gUnknown_085e8958:: @ 85E8958 +gUnknown_085E8958:: @ 85E8958 .string "MNO$" -gUnknown_085e895c:: @ 85E895C +gUnknown_085E895C:: @ 85E895C .string "PQR$" -gUnknown_085e8960:: @ 85E8960 +gUnknown_085E8960:: @ 85E8960 .string "STU$" -gUnknown_085e8964:: @ 85E8964 +gUnknown_085E8964:: @ 85E8964 .string "VWX$" -gUnknown_085e8968:: @ 85E8968 +gUnknown_085E8968:: @ 85E8968 .string "YZ$" -gUnknown_085e896b:: @ 85E896B +gUnknown_085E896B:: @ 85E896B .string "RED$" -gUnknown_085e896f:: @ 85E896F +gUnknown_085E896F:: @ 85E896F .string "BLUE$" -gUnknown_085e8974:: @ 85E8974 +gUnknown_085E8974:: @ 85E8974 .string "YELLOW$" -gUnknown_085e897b:: @ 85E897B +gUnknown_085E897B:: @ 85E897B .string "GREEN$" -gUnknown_085e8981:: @ 85E8981 +gUnknown_085E8981:: @ 85E8981 .string "BLACK$" -gUnknown_085e8987:: @ 85E8987 +gUnknown_085E8987:: @ 85E8987 .string "BROWN$" -gUnknown_085e898d:: @ 85E898D +gUnknown_085E898D:: @ 85E898D .string "PURPLE$" -gUnknown_085e8994:: @ 85E8994 +gUnknown_085E8994:: @ 85E8994 .string "GRAY$" -gUnknown_085e8999:: @ 85E8999 +gUnknown_085E8999:: @ 85E8999 .string "WHITE$" -gUnknown_085e899f:: @ 85E899F +gUnknown_085E899F:: @ 85E899F .string "PINK$" -gUnknown_085e89a4:: @ 85E89A4 +gUnknown_085E89A4:: @ 85E89A4 .string "HOENN region’s POKéDEX$" -gUnknown_085e89bb:: @ 85E89BB +gUnknown_085E89BB:: @ 85E89BB .string "National edition POKéDEX$" -gUnknown_085e89d4:: @ 85E89D4 +gUnknown_085E89D4:: @ 85E89D4 .string "POKéMON are listed according to their\nnumber.$" -gUnknown_085e8a02:: @ 85E8A02 +gUnknown_085E8A02:: @ 85E8A02 .string "Spotted and owned POKéMON are listed\nalphabetically.$" -gUnknown_085e8a37:: @ 85E8A37 +gUnknown_085E8A37:: @ 85E8A37 .string "Owned POKéMON are listed from the\nheaviest to the lightest.$" -gUnknown_085e8a73:: @ 85E8A73 +gUnknown_085E8A73:: @ 85E8A73 .string "Owned POKéMON are listed from the\nlightest to the heaviest.$" -gUnknown_085e8aaf:: @ 85E8AAF +gUnknown_085E8AAF:: @ 85E8AAF .string "Owned POKéMON are listed from the\ntallest to the smallest.$" -gUnknown_085e8aea:: @ 85E8AEA +gUnknown_085E8AEA:: @ 85E8AEA .string "Owned POKéMON are listed from the\nsmallest to the tallest.$" -gUnknown_085e8b25:: @ 85E8B25 +gUnknown_085E8B25:: @ 85E8B25 .string "$" -gUnknown_085e8b26:: @ 85E8B26 +gUnknown_085E8B26:: @ 85E8B26 .string "DON’T SPECIFY.$" -gUnknown_085e8b35:: @ 85E8B35 +gUnknown_085E8B35:: @ 85E8B35 .string "NONE$" gText_SelectorArrow:: @ 85E8B3A .string "â–¶$" -gUnknown_085e8b3c:: @ 85E8B3C +gUnknown_085E8B3C:: @ 85E8B3C .string " $" gText_WelcomeToHOF:: @ 85E8B3E .string "Welcome to the HALL OF FAME!$" -gUnknown_085e8b5b:: @ 85E8B5B +gUnknown_085E8B5B:: @ 85E8B5B .string "Spotted POKéMON: {STR_VAR_1}!\nOwned POKéMON: {STR_VAR_2}!\pPROF. BIRCH’s POKéDEX rating!\pPROF. BIRCH: Let’s see…\p$" -gUnknown_085e8bba:: @ 85E8BBA +gUnknown_085E8BBA:: @ 85E8BBA .string "SAVING…\nDON’T TURN OFF THE POWER.$" gText_HOFCorrupted:: @ 85E8BDC @@ -513,7 +513,7 @@ gText_Number:: @ 85E8C36 gText_Level:: @ 85E8C3B .string "Lv. $" -gUnknown_085e8c40:: @ 85E8C40 +gUnknown_085E8C40:: @ 85E8C40 .string "IDNo. /$" gText_Name:: @ 85E8C48 @@ -528,31 +528,31 @@ gText_BirchInTrouble:: @ 85E8C53 gText_ConfirmStarterChoice:: @ 85E8C90 .string "Do you choose this POKéMON?$" -gUnknown_085e8cac:: @ 85E8CAC +gUnknown_085E8CAC:: @ 85E8CAC .string "POKéMON$" gText_FlyToWhere:: @ 85E8CB4 .string "FLY to where?$" -gUnknown_085e8cc2:: @ 85E8CC2 +gUnknown_085E8CC2:: @ 85E8CC2 .string "USE$" -gUnknown_085e8cc6:: @ 85E8CC6 +gUnknown_085E8CC6:: @ 85E8CC6 .string "TOSS$" -gUnknown_085e8ccb:: @ 85E8CCB +gUnknown_085E8CCB:: @ 85E8CCB .string "REGISTER$" -gUnknown_085e8cd4:: @ 85E8CD4 +gUnknown_085E8CD4:: @ 85E8CD4 .string "GIVE$" -gUnknown_085e8cd9:: @ 85E8CD9 +gUnknown_085E8CD9:: @ 85E8CD9 .string "CHECK TAG$" gText_Confirm:: @ 85E8CE3 .string "CONFIRM$" -gUnknown_085e8ceb:: @ 85E8CEB +gUnknown_085E8CEB:: @ 85E8CEB .string "WALK$" gText_Cancel:: @ 85E8CF0 @@ -561,34 +561,34 @@ gText_Cancel:: @ 85E8CF0 gText_Cancel2:: @ 85E8CF7 .string "CANCEL$" -gUnknown_085e8cfe:: @ 85E8CFE +gUnknown_085E8CFE:: @ 85E8CFE .string "SHOW$" gText_EmptyString2:: @ 85E8D03 .string "$" -gUnknown_085e8d04:: @ 85E8D04 +gUnknown_085E8D04:: @ 85E8D04 .string "CANCEL$" -gUnknown_085e8d0b:: @ 85E8D0B +gUnknown_085E8D0B:: @ 85E8D0B .string "ITEM$" -gUnknown_085e8d10:: @ 85E8D10 +gUnknown_085E8D10:: @ 85E8D10 .string "MAIL$" -gUnknown_085e8d15:: @ 85E8D15 +gUnknown_085E8D15:: @ 85E8D15 .string "TAKE$" -gUnknown_085e8d1a:: @ 85E8D1A +gUnknown_085E8D1A:: @ 85E8D1A .string "STORE$" -gUnknown_085e8d20:: @ 85E8D20 +gUnknown_085E8D20:: @ 85E8D20 .string "CHECK$" gText_None:: @ 85E8D26 .string "NONE$" -gUnknown_085e8d2b:: @ 85E8D2B +gUnknown_085E8D2B:: @ 85E8D2B .string "DESELECT$" gText_ThreeMarks:: @ 85E8D34 @@ -621,10 +621,10 @@ gText_LevelSymbol:: @ 85E8D4D gText_UnkCtrlF908Clear01:: @ 85E8D4F .string "{UNK_CTRL_F908}{CLEAR 0x01}$" -gUnknown_085e8d55:: @ 85E8D55 +gUnknown_085E8D55:: @ 85E8D55 .string "+$" -gUnknown_085e8d57:: @ 85E8D57 +gUnknown_085E8D57:: @ 85E8D57 .string "{RIGHT_ARROW}$" gText_UnkCtrlF907F908:: @ 85E8D59 @@ -642,13 +642,13 @@ gText_GoBackPrevMenu:: @ 85E8D62 gText_WhatWouldYouLike:: @ 85E8D80 .string "What would you like to do?$" -gUnknown_085e8d9b:: @ 85E8D9B +gUnknown_085E8D9B:: @ 85E8D9B .string "GIVE$" gText_xVar1:: @ 85E8DA0 .string "×{STR_VAR_1}$" -gUnknown_085e8da4:: @ 85E8DA4 +gUnknown_085E8DA4:: @ 85E8DA4 .string " BERRY$" gText_Coins:: @ 85E8DAB @@ -834,46 +834,46 @@ gText_BerryTag:: @ 85E926B .string "BERRY TAG$" -gUnknown_085e9275:: @ 85E9275 +gUnknown_085E9275:: @ 85E9275 .string "RED {POKEBLOCK}$" -gUnknown_085e927f:: @ 85E927F +gUnknown_085E927F:: @ 85E927F .string "BLUE {POKEBLOCK}$" -gUnknown_085e928a:: @ 85E928A +gUnknown_085E928A:: @ 85E928A .string "PINK {POKEBLOCK}$" -gUnknown_085e9295:: @ 85E9295 +gUnknown_085E9295:: @ 85E9295 .string "GREEN {POKEBLOCK}$" -gUnknown_085e92a1:: @ 85E92A1 +gUnknown_085E92A1:: @ 85E92A1 .string "YELLOW {POKEBLOCK}$" -gUnknown_085e92ae:: @ 85E92AE +gUnknown_085E92AE:: @ 85E92AE .string "PURPLE {POKEBLOCK}$" -gUnknown_085e92bb:: @ 85E92BB +gUnknown_085E92BB:: @ 85E92BB .string "INDIGO {POKEBLOCK}$" -gUnknown_085e92c8:: @ 85E92C8 +gUnknown_085E92C8:: @ 85E92C8 .string "BROWN {POKEBLOCK}$" -gUnknown_085e92d4:: @ 85E92D4 +gUnknown_085E92D4:: @ 85E92D4 .string "LITEBLUE {POKEBLOCK}$" -gUnknown_085e92e3:: @ 85E92E3 +gUnknown_085E92E3:: @ 85E92E3 .string "OLIVE {POKEBLOCK}$" -gUnknown_085e92ef:: @ 85E92EF +gUnknown_085E92EF:: @ 85E92EF .string "GRAY {POKEBLOCK}$" -gUnknown_085e92fa:: @ 85E92FA +gUnknown_085E92FA:: @ 85E92FA .string "BLACK {POKEBLOCK}$" -gUnknown_085e9306:: @ 85E9306 +gUnknown_085E9306:: @ 85E9306 .string "WHITE {POKEBLOCK}$" -gUnknown_085e9312:: @ 85E9312 +gUnknown_085E9312:: @ 85E9312 .string "GOLD {POKEBLOCK}$" gText_Spicy:: @ 85E931D @@ -892,10 +892,10 @@ gText_Sour:: @ 85E9334 .string "SOUR$" -gUnknown_085e9339:: @ 85E9339 +gUnknown_085E9339:: @ 85E9339 .string "TASTY$" -gUnknown_085e933f:: @ 85E933F +gUnknown_085E933F:: @ 85E933F .string "FEEL$" gText_StowCase:: @ 85E9344 @@ -920,13 +920,13 @@ gText_Var1DisdainfullyAteVar2:: @ 85E93A9 .string "{STR_VAR_1} disdainfully ate the\n{STR_VAR_2}.{PAUSE_UNTIL_PRESS}$" -gUnknown_085e93c7:: @ 85E93C7 +gUnknown_085E93C7:: @ 85E93C7 .string "BUY$" -gUnknown_085e93cb:: @ 85E93CB +gUnknown_085E93CB:: @ 85E93CB .string "SELL$" -gUnknown_085e93d0:: @ 85E93D0 +gUnknown_085E93D0:: @ 85E93D0 .string "QUIT$" gText_InBagVar1:: @ 85E93D5 @@ -993,34 +993,34 @@ gText_PokedollarVar1:: @ 85E969C .string "Â¥{STR_VAR_1}$" -gUnknown_085e96a0:: @ 85E96A0 +gUnknown_085E96A0:: @ 85E96A0 .string "SHIFT$" -gUnknown_085e96a6:: @ 85E96A6 +gUnknown_085E96A6:: @ 85E96A6 .string "SEND OUT$" -gUnknown_085e96af:: @ 85E96AF +gUnknown_085E96AF:: @ 85E96AF .string "SWITCH$" -gUnknown_085e96b6:: @ 85E96B6 +gUnknown_085E96B6:: @ 85E96B6 .string "SUMMARY$" -gUnknown_085e96be:: @ 85E96BE +gUnknown_085E96BE:: @ 85E96BE .string "MOVES$" -gUnknown_085e96c4:: @ 85E96C4 +gUnknown_085E96C4:: @ 85E96C4 .string "ENTER$" -gUnknown_085e96ca:: @ 85E96CA +gUnknown_085E96CA:: @ 85E96CA .string "NO ENTRY$" -gUnknown_085e96d3:: @ 85E96D3 +gUnknown_085E96D3:: @ 85E96D3 .string "TAKE$" -gUnknown_085e96d8:: @ 85E96D8 +gUnknown_085E96D8:: @ 85E96D8 .string "READ$" -gUnknown_085e96dd:: @ 85E96DD +gUnknown_085E96DD:: @ 85E96DD .string "TRADE$" gText_HP3:: @ 85E96E3 @@ -1150,7 +1150,7 @@ gText_PPWasRestored:: @ 85E9CB7 .string "PP was restored.{PAUSE_UNTIL_PRESS}$" -gUnknown_085e9cca:: @ 85E9CCA +gUnknown_085E9CCA:: @ 85E9CCA .string "{STR_VAR_1} regained health.{PAUSE_UNTIL_PRESS}$" gText_PkmnBecameHealthy:: @ 85E9CE0 @@ -1187,124 +1187,124 @@ gText_ItemThrownAway:: @ 85E9E14 .string "The {STR_VAR_1}\nwas thrown away.{PAUSE_UNTIL_PRESS}$" -gUnknown_085e9e2e:: @ 85E9E2E +gUnknown_085E9E2E:: @ 85E9E2E .string "Teach which POKéMON?$" -gUnknown_085e9e43:: @ 85E9E43 +gUnknown_085E9E43:: @ 85E9E43 .string "Choose a POKéMON.$" -gUnknown_085e9e55:: @ 85E9E55 +gUnknown_085E9E55:: @ 85E9E55 .string "Move to where?$" -gUnknown_085e9e64:: @ 85E9E64 +gUnknown_085E9E64:: @ 85E9E64 .string "Teach which POKéMON?$" -gUnknown_085e9e79:: @ 85E9E79 +gUnknown_085E9E79:: @ 85E9E79 .string "Use on which POKéMON?$" -gUnknown_085e9e8f:: @ 85E9E8F +gUnknown_085E9E8F:: @ 85E9E8F .string "Give to which POKéMON?$" -gUnknown_085e9ea6:: @ 85E9EA6 +gUnknown_085E9EA6:: @ 85E9EA6 .string "Do what with this {PKMN}?$" -gUnknown_085e9ebc:: @ 85E9EBC +gUnknown_085E9EBC:: @ 85E9EBC .string "There’s nothing to CUT.$" -gUnknown_085e9ed4:: @ 85E9ED4 +gUnknown_085E9ED4:: @ 85E9ED4 .string "You can’t SURF here.$" -gUnknown_085e9ee9:: @ 85E9EE9 +gUnknown_085E9EE9:: @ 85E9EE9 .string "You’re already SURFING.$" -gUnknown_085e9f01:: @ 85E9F01 +gUnknown_085E9F01:: @ 85E9F01 .string "Can’t use that here.$" -gUnknown_085e9f16:: @ 85E9F16 +gUnknown_085E9F16:: @ 85E9F16 .string "Restore which move?$" -gUnknown_085e9f2a:: @ 85E9F2A +gUnknown_085E9F2A:: @ 85E9F2A .string "Boost PP of which move?$" -gUnknown_085e9f42:: @ 85E9F42 +gUnknown_085E9F42:: @ 85E9F42 .string "Do what with an item?$" -gUnknown_085e9f58:: @ 85E9F58 +gUnknown_085E9F58:: @ 85E9F58 .string "No POKéMON for battle!$" -gUnknown_085e9f6f:: @ 85E9F6F +gUnknown_085E9F6F:: @ 85E9F6F .string "Choose a POKéMON.$" -gUnknown_085e9f81:: @ 85E9F81 +gUnknown_085E9F81:: @ 85E9F81 .string "Not enough HP…$" -gUnknown_085e9f90:: @ 85E9F90 +gUnknown_085E9F90:: @ 85E9F90 .string "{STR_VAR_1} POKéMON are needed.$" -gUnknown_085e9fa7:: @ 85E9FA7 +gUnknown_085E9FA7:: @ 85E9FA7 .string "POKéMON can’t be the same.$" -gUnknown_085e9fc2:: @ 85E9FC2 +gUnknown_085E9FC2:: @ 85E9FC2 .string "No identical hold items.$" -gUnknown_085e9fdb:: @ 85E9FDB +gUnknown_085E9FDB:: @ 85E9FDB .string "The current is much too fast!$" -gUnknown_085e9ff9:: @ 85E9FF9 +gUnknown_085E9FF9:: @ 85E9FF9 .string "Do what with the MAIL?$" -gUnknown_085ea010:: @ 85EA010 +gUnknown_085EA010:: @ 85EA010 .string "Choose POKéMON or CANCEL.$" -gUnknown_085ea02a:: @ 85EA02A +gUnknown_085EA02A:: @ 85EA02A .string "Choose POKéMON and confirm.$" -gUnknown_085ea046:: @ 85EA046 +gUnknown_085EA046:: @ 85EA046 .string "Let’s enjoy cycling!$" -gUnknown_085ea05b:: @ 85EA05B +gUnknown_085EA05B:: @ 85EA05B .string "This is in use already.$" -gUnknown_085ea073:: @ 85EA073 +gUnknown_085EA073:: @ 85EA073 .string "{STR_VAR_1} is already holding\none {STR_VAR_2}.$" -gUnknown_085ea091:: @ 85EA091 +gUnknown_085EA091:: @ 85EA091 .string "No use.$" -gUnknown_085ea099:: @ 85EA099 +gUnknown_085EA099:: @ 85EA099 .string "ABLE$" -gUnknown_085ea09e:: @ 85EA09E +gUnknown_085EA09E:: @ 85EA09E .string "FIRST$" -gUnknown_085ea0a4:: @ 85EA0A4 +gUnknown_085EA0A4:: @ 85EA0A4 .string "SECOND$" -gUnknown_085ea0ab:: @ 85EA0AB +gUnknown_085EA0AB:: @ 85EA0AB .string "THIRD$" -gUnknown_085ea0b1:: @ 85EA0B1 +gUnknown_085EA0B1:: @ 85EA0B1 .string "ABLE$" -gUnknown_085ea0b6:: @ 85EA0B6 +gUnknown_085EA0B6:: @ 85EA0B6 .string "NOT ABLE$" -gUnknown_085ea0bf:: @ 85EA0BF +gUnknown_085EA0BF:: @ 85EA0BF .string "ABLE!$" -gUnknown_085ea0c5:: @ 85EA0C5 +gUnknown_085EA0C5:: @ 85EA0C5 .string "NOT ABLE!$" -gUnknown_085ea0cf:: @ 85EA0CF +gUnknown_085EA0CF:: @ 85EA0CF .string "LEARNED$" -gUnknown_085ea0d7:: @ 85EA0D7 +gUnknown_085EA0D7:: @ 85EA0D7 .string "HAVE$" -gUnknown_085ea0dc:: @ 85EA0DC +gUnknown_085EA0DC:: @ 85EA0DC .string "DON’T HAVE$" -gUnknown_085ea0e7:: @ 85EA0E7 +gUnknown_085EA0E7:: @ 85EA0E7 .string "FOURTH$" gText_PkmnCantParticipate:: @ 85EA0EE @@ -1348,27 +1348,27 @@ gText_EggCantBeTradedNow:: @ 85EA234 .align 2 -gUnknown_085ea250:: @ 85EA250 +gUnknown_085EA250:: @ 85EA250 .string "The other TRAINER’s POKéMON\ncan’t be traded now.$" .align 2 -gUnknown_085ea284:: @ 85EA284 +gUnknown_085EA284:: @ 85EA284 .string "The other TRAINER can’t accept\nthat POKéMON now.$" .align 2 -gUnknown_085ea2b8:: @ 85EA2B8 +gUnknown_085EA2B8:: @ 85EA2B8 .string "You can’t trade with that\nTRAINER now.$" .align 2 -gUnknown_085ea2e0:: @ 85EA2E0 +gUnknown_085EA2E0:: @ 85EA2E0 .string "That isn’t the type of POKéMON\nthat the other TRAINER wants.$" .align 2 -gUnknown_085ea320:: @ 85EA320 +gUnknown_085EA320:: @ 85EA320 .string "That isn’t an EGG.$" gText_Register:: @ 85EA333 @@ -1393,7 +1393,7 @@ gText_HP4:: @ 85EA361 .string "HP$" -gUnknown_085ea364:: @ 85EA364 +gUnknown_085EA364:: @ 85EA364 .string "$" gText_OTSlash:: @ 85EA365 @@ -1433,7 +1433,7 @@ gText_EmptyString5:: @ 85EA3C0 .string "$" -gUnknown_085ea3c1:: @ 85EA3C1 +gUnknown_085EA3C1:: @ 85EA3C1 .string "EVENTS$" gText_Switch:: @ 85EA3C8 @@ -1521,60 +1521,60 @@ gText_NoRegistry:: @ 85EA785 .string "There is no REGISTRY.{PAUSE_UNTIL_PRESS}$" -gUnknown_085ea79d:: @ 85EA79D +gUnknown_085EA79D:: @ 85EA79D .string "DEL REGIST.$" -gUnknown_085ea7a9:: @ 85EA7A9 +gUnknown_085EA7A9:: @ 85EA7A9 .string "{STR_VAR_3}{STR_VAR_1}/{STR_VAR_2}$" -gUnknown_085ea7b1:: @ 85EA7B1 +gUnknown_085EA7B1:: @ 85EA7B1 .string "DECORATE$" -gUnknown_085ea7ba:: @ 85EA7BA +gUnknown_085EA7BA:: @ 85EA7BA .string "PUT AWAY$" -gUnknown_085ea7c3:: @ 85EA7C3 +gUnknown_085EA7C3:: @ 85EA7C3 .string "TOSS$" gText_Color161Shadow161:: @ 85EA7C8 .string "{COLOR 161}{SHADOW 161}$" -gUnknown_085ea7cf:: @ 85EA7CF +gUnknown_085EA7CF:: @ 85EA7CF .string "Put out the selected decoration item.$" -gUnknown_085ea7f5:: @ 85EA7F5 +gUnknown_085EA7F5:: @ 85EA7F5 .string "Store the chosen decoration in the PC.$" -gUnknown_085ea81c:: @ 85EA81C +gUnknown_085EA81C:: @ 85EA81C .string "Throw away unwanted decorations.$" gText_NoDecorations:: @ 85EA83D .string "There are no decorations.{PAUSE_UNTIL_PRESS}$" -gUnknown_085ea859:: @ 85EA859 +gUnknown_085EA859:: @ 85EA859 .string "DESK$" -gUnknown_085ea85e:: @ 85EA85E +gUnknown_085EA85E:: @ 85EA85E .string "CHAIR$" -gUnknown_085ea864:: @ 85EA864 +gUnknown_085EA864:: @ 85EA864 .string "PLANT$" -gUnknown_085ea86a:: @ 85EA86A +gUnknown_085EA86A:: @ 85EA86A .string "ORNAMENT$" -gUnknown_085ea873:: @ 85EA873 +gUnknown_085EA873:: @ 85EA873 .string "MAT$" -gUnknown_085ea877:: @ 85EA877 +gUnknown_085EA877:: @ 85EA877 .string "POSTER$" -gUnknown_085ea87e:: @ 85EA87E +gUnknown_085EA87E:: @ 85EA87E .string "DOLL$" -gUnknown_085ea883:: @ 85EA883 +gUnknown_085EA883:: @ 85EA883 .string "CUSHION$" gText_Gold:: @ 85EA88B @@ -1602,7 +1602,7 @@ gText_NoMoreDecorations2:: @ 85EA931 .string "No more decorations can be placed.\nThe most that can be placed are {STR_VAR_1}.$" -gUnknown_085ea978:: @ 85EA978 +gUnknown_085EA978:: @ 85EA978 .string "This can’t be placed here.\nIt must be on a DESK, etc.$" gText_CantPlaceInRoom:: @ 85EA9AE @@ -1633,32 +1633,32 @@ gText_NoDecorationsInUse:: @ 85EAAEC .string "There are no decorations in use.{PAUSE_UNTIL_PRESS}$" -gUnknown_085eab0f:: @ 85EAB0F +gUnknown_085EAB0F:: @ 85EAB0F .string "TRISTAN$" -gUnknown_085eab17:: @ 85EAB17 +gUnknown_085EAB17:: @ 85EAB17 .string "PHILIP$" -gUnknown_085eab1e:: @ 85EAB1E +gUnknown_085EAB1E:: @ 85EAB1E .string "DENNIS$" -gUnknown_085eab25:: @ 85EAB25 +gUnknown_085EAB25:: @ 85EAB25 .string "ROBERTO$" -gUnknown_085eab2d:: @ 85EAB2D +gUnknown_085EAB2D:: @ 85EAB2D .string "TURN OFF$" -gUnknown_085eab36:: @ 85EAB36 +gUnknown_085EAB36:: @ 85EAB36 .string "DECORATION$" -gUnknown_085eab41:: @ 85EAB41 +gUnknown_085EAB41:: @ 85EAB41 .string "ITEM STORAGE$" gText_Mailbox:: @ 85EAB4E .string "MAILBOX$" -gUnknown_085eab56:: @ 85EAB56 +gUnknown_085EAB56:: @ 85EAB56 .string "DEPOSIT ITEM$" gText_WithdrawItem:: @ 85EAB63 @@ -1668,13 +1668,13 @@ gText_TossItem:: @ 85EAB71 .string "TOSS ITEM$" -gUnknown_085eab7b:: @ 85EAB7B +gUnknown_085EAB7B:: @ 85EAB7B .string "Store items in the PC.$" -gUnknown_085eab92:: @ 85EAB92 +gUnknown_085EAB92:: @ 85EAB92 .string "Take out items from the PC.$" -gUnknown_085eabae:: @ 85EABAE +gUnknown_085EABAE:: @ 85EABAE .string "Throw away items stored in the PC.$" gText_NoItems:: @ 85EABD1 @@ -1690,13 +1690,13 @@ gText_WithdrawXItems:: @ 85EAC22 .string "Withdrew {STR_VAR_2}\n{STR_VAR_1}(s).$" -gUnknown_085eac35:: @ 85EAC35 +gUnknown_085EAC35:: @ 85EAC35 .string "READ$" -gUnknown_085eac3a:: @ 85EAC3A +gUnknown_085EAC3A:: @ 85EAC3A .string "MOVE TO BAG$" -gUnknown_085eac46:: @ 85EAC46 +gUnknown_085EAC46:: @ 85EAC46 .string "GIVE$" gText_NoMailHere:: @ 85EAC4B @@ -1739,37 +1739,37 @@ gText_Glacia:: @ 85EAD30 .string "GLACIA$" -gUnknown_085ead37:: @ 85EAD37 +gUnknown_085EAD37:: @ 85EAD37 .string "PETALBURG$" -gUnknown_085ead41:: @ 85EAD41 +gUnknown_085EAD41:: @ 85EAD41 .string "SLATEPORT$" -gUnknown_085ead4b:: @ 85EAD4B +gUnknown_085EAD4B:: @ 85EAD4B .string "LITTLEROOT$" -gUnknown_085ead56:: @ 85EAD56 +gUnknown_085EAD56:: @ 85EAD56 .string "LILYCOVE$" -gUnknown_085ead5f:: @ 85EAD5F +gUnknown_085EAD5F:: @ 85EAD5F .string "DEWFORD$" -gUnknown_085ead67:: @ 85EAD67 +gUnknown_085EAD67:: @ 85EAD67 .string "ENTER$" -gUnknown_085ead6d:: @ 85EAD6D +gUnknown_085EAD6D:: @ 85EAD6D .string "INFO$" -gUnknown_085ead72:: @ 85EAD72 +gUnknown_085EAD72:: @ 85EAD72 .string "What’s a CONTEST?$" -gUnknown_085ead84:: @ 85EAD84 +gUnknown_085EAD84:: @ 85EAD84 .string "Types of CONTESTS$" -gUnknown_085ead96:: @ 85EAD96 +gUnknown_085EAD96:: @ 85EAD96 .string "Ranks$" -gUnknown_085ead9c:: @ 85EAD9C +gUnknown_085EAD9C:: @ 85EAD9C .string "Judging$" gUnknown_085EADA4:: @@ -1787,55 +1787,55 @@ gUnknown_085EADD5:: gUnknown_085EADE7:: .string "TOUGHNESS CONTEST$" -gUnknown_085eadf9:: @ 85EADF9 +gUnknown_085EADF9:: @ 85EADF9 .string "DECORATION$" -gUnknown_085eae04:: @ 85EAE04 +gUnknown_085EAE04:: @ 85EAE04 .string "PACK UP$" -gUnknown_085eae0c:: @ 85EAE0C +gUnknown_085EAE0C:: @ 85EAE0C .string "COUNT$" -gUnknown_085eae12:: @ 85EAE12 +gUnknown_085EAE12:: @ 85EAE12 .string "REGISTRY$" -gUnknown_085eae1b:: @ 85EAE1B +gUnknown_085EAE1B:: @ 85EAE1B .string "INFORMATION$" -gUnknown_085eae27:: @ 85EAE27 +gUnknown_085EAE27:: @ 85EAE27 .string "MACH$" -gUnknown_085eae2c:: @ 85EAE2C +gUnknown_085EAE2C:: @ 85EAE2C .string "ACRO$" -gUnknown_085eae31:: @ 85EAE31 +gUnknown_085EAE31:: @ 85EAE31 .string "PSN$" -gUnknown_085eae35:: @ 85EAE35 +gUnknown_085EAE35:: @ 85EAE35 .string "PAR$" -gUnknown_085eae39:: @ 85EAE39 +gUnknown_085EAE39:: @ 85EAE39 .string "SLP$" -gUnknown_085eae3d:: @ 85EAE3D +gUnknown_085EAE3D:: @ 85EAE3D .string "BRN$" -gUnknown_085eae41:: @ 85EAE41 +gUnknown_085EAE41:: @ 85EAE41 .string "FRZ$" -gUnknown_085eae45:: @ 85EAE45 +gUnknown_085EAE45:: @ 85EAE45 .string "TOXIC$" -gUnknown_085eae4b:: @ 85EAE4B +gUnknown_085EAE4B:: @ 85EAE4B .string "OK$" -gUnknown_085eae4e:: @ 85EAE4E +gUnknown_085EAE4E:: @ 85EAE4E .string "QUIT$" -gUnknown_085eae53:: @ 85EAE53 +gUnknown_085EAE53:: @ 85EAE53 .string "Saw it$" -gUnknown_085eae5a:: @ 85EAE5A +gUnknown_085EAE5A:: @ 85EAE5A .string "Not yet$" gText_Yes:: @ 85EAE62 @@ -1845,25 +1845,25 @@ gText_No:: @ 85EAE66 .string "NO$" -gUnknown_085eae69:: @ 85EAE69 +gUnknown_085EAE69:: @ 85EAE69 .string "INFO$" -gUnknown_085eae6e:: @ 85EAE6E +gUnknown_085EAE6E:: @ 85EAE6E .string "SINGLE BATTLE$" -gUnknown_085eae7c:: @ 85EAE7C +gUnknown_085EAE7C:: @ 85EAE7C .string "DOUBLE BATTLE$" -gUnknown_085eae8a:: @ 85EAE8A +gUnknown_085EAE8A:: @ 85EAE8A .string "MULTI BATTLE$" -gUnknown_085eae97:: @ 85EAE97 +gUnknown_085EAE97:: @ 85EAE97 .string "MR. BRINEY$" -gUnknown_085eaea2:: @ 85EAEA2 +gUnknown_085EAEA2:: @ 85EAEA2 .string "CHALLENGE$" -gUnknown_085eaeac:: @ 85EAEAC +gUnknown_085EAEAC:: @ 85EAEAC .string "INFO$" gText_Lv50:: @ 85EAEB1 @@ -1873,121 +1873,121 @@ gText_OpenLevel:: @ 85EAEB8 .string "OPEN LEVEL$" -gUnknown_085eaec3:: @ 85EAEC3 +gUnknown_085EAEC3:: @ 85EAEC3 .string "FRESH WATER{CLEAR_TO 0x48}Â¥200$" -gUnknown_085eaed6:: @ 85EAED6 +gUnknown_085EAED6:: @ 85EAED6 .string "SODA POP{CLEAR_TO 0x48}Â¥300$" -gUnknown_085eaee6:: @ 85EAEE6 +gUnknown_085EAEE6:: @ 85EAEE6 .string "LEMONADE{CLEAR_TO 0x48}Â¥350$" -gUnknown_085eaef6:: @ 85EAEF6 +gUnknown_085EAEF6:: @ 85EAEF6 .string "HOW TO RIDE$" -gUnknown_085eaf02:: @ 85EAF02 +gUnknown_085EAF02:: @ 85EAF02 .string "HOW TO TURN$" -gUnknown_085eaf0e:: @ 85EAF0E +gUnknown_085EAF0E:: @ 85EAF0E .string "SANDY SLOPES$" -gUnknown_085eaf1b:: @ 85EAF1B +gUnknown_085EAF1B:: @ 85EAF1B .string "WHEELIES$" -gUnknown_085eaf24:: @ 85EAF24 +gUnknown_085EAF24:: @ 85EAF24 .string "BUNNY-HOPS$" -gUnknown_085eaf2f:: @ 85EAF2F +gUnknown_085EAF2F:: @ 85EAF2F .string "JUMP$" -gUnknown_085eaf34:: @ 85EAF34 +gUnknown_085EAF34:: @ 85EAF34 .string "Satisfied$" -gUnknown_085eaf3e:: @ 85EAF3E +gUnknown_085EAF3E:: @ 85EAF3E .string "Dissatisfied$" -gUnknown_085eaf4b:: @ 85EAF4B +gUnknown_085EAF4B:: @ 85EAF4B .string "DEEPSEATOOTH$" -gUnknown_085eaf58:: @ 85EAF58 +gUnknown_085EAF58:: @ 85EAF58 .string "DEEPSEASCALE$" -gUnknown_085eaf65:: @ 85EAF65 +gUnknown_085EAF65:: @ 85EAF65 .string "BLUE FLUTE$" -gUnknown_085eaf70:: @ 85EAF70 +gUnknown_085EAF70:: @ 85EAF70 .string "YELLOW FLUTE$" -gUnknown_085eaf7d:: @ 85EAF7D +gUnknown_085EAF7D:: @ 85EAF7D .string "RED FLUTE$" -gUnknown_085eaf87:: @ 85EAF87 +gUnknown_085EAF87:: @ 85EAF87 .string "WHITE FLUTE$" -gUnknown_085eaf93:: @ 85EAF93 +gUnknown_085EAF93:: @ 85EAF93 .string "BLACK FLUTE$" -gUnknown_085eaf9f:: @ 85EAF9F +gUnknown_085EAF9F:: @ 85EAF9F .string "GLASS CHAIR$" -gUnknown_085eafab:: @ 85EAFAB +gUnknown_085EAFAB:: @ 85EAFAB .string "GLASS DESK$" -gUnknown_085eafb6:: @ 85EAFB6 +gUnknown_085EAFB6:: @ 85EAFB6 .string "TREECKO DOLL 1,000 COINS$" -gUnknown_085eafcf:: @ 85EAFCF +gUnknown_085EAFCF:: @ 85EAFCF .string "TORCHIC DOLL 1,000 COINS$" -gUnknown_085eafe8:: @ 85EAFE8 +gUnknown_085EAFE8:: @ 85EAFE8 .string "MUDKIP DOLL 1,000 COINS$" -gUnknown_085eb002:: @ 85EB002 +gUnknown_085EB002:: @ 85EB002 .string " 50 COINS Â¥1,000$" -gUnknown_085eb017:: @ 85EB017 +gUnknown_085EB017:: @ 85EB017 .string "500 COINS Â¥10,000$" -gUnknown_085eb02a:: @ 85EB02A +gUnknown_085EB02A:: @ 85EB02A .string "Excellent$" -gUnknown_085eb034:: @ 85EB034 +gUnknown_085EB034:: @ 85EB034 .string "Not so good$" -gUnknown_085eb040:: @ 85EB040 +gUnknown_085EB040:: @ 85EB040 .string "RED SHARD$" -gUnknown_085eb04a:: @ 85EB04A +gUnknown_085EB04A:: @ 85EB04A .string "YELLOW SHARD$" -gUnknown_085eb057:: @ 85EB057 +gUnknown_085EB057:: @ 85EB057 .string "BLUE SHARD$" -gUnknown_085eb062:: @ 85EB062 +gUnknown_085EB062:: @ 85EB062 .string "GREEN SHARD$" -gUnknown_085eb06e:: @ 85EB06E +gUnknown_085EB06E:: @ 85EB06E .string "BATTLE FRONTIER$" -gUnknown_085eb07e:: @ 85EB07E +gUnknown_085EB07E:: @ 85EB07E .string "Right$" -gUnknown_085eb084:: @ 85EB084 +gUnknown_085EB084:: @ 85EB084 .string "Left$" -gUnknown_085eb089:: @ 85EB089 +gUnknown_085EB089:: @ 85EB089 .string "TM32{CLEAR_TO 0x48}1,500 COINS$" -gUnknown_085eb09c:: @ 85EB09C +gUnknown_085EB09C:: @ 85EB09C .string "TM29{CLEAR_TO 0x48}3,500 COINS$" -gUnknown_085eb0af:: @ 85EB0AF +gUnknown_085EB0AF:: @ 85EB0AF .string "TM35{CLEAR_TO 0x48}4,000 COINS$" -gUnknown_085eb0c2:: @ 85EB0C2 +gUnknown_085EB0C2:: @ 85EB0C2 .string "TM24{CLEAR_TO 0x48}4,000 COINS$" -gUnknown_085eb0d5:: @ 85EB0D5 +gUnknown_085EB0D5:: @ 85EB0D5 .string "TM13{CLEAR_TO 0x48}4,000 COINS$" gText_Cool:: @ 85EB0E8 @@ -2006,46 +2006,46 @@ gText_Tough:: @ 85EB0FF .string "TOUGH$" -gUnknown_085eb105:: @ 85EB105 +gUnknown_085EB105:: @ 85EB105 .string "NORMAL$" -gUnknown_085eb10c:: @ 85EB10C +gUnknown_085EB10C:: @ 85EB10C .string "SUPER$" -gUnknown_085eb112:: @ 85EB112 +gUnknown_085EB112:: @ 85EB112 .string "HYPER$" -gUnknown_085eb118:: @ 85EB118 +gUnknown_085EB118:: @ 85EB118 .string "MASTER$" -gUnknown_085eb11f:: @ 85EB11F +gUnknown_085EB11F:: @ 85EB11F .string "COOL$" -gUnknown_085eb124:: @ 85EB124 +gUnknown_085EB124:: @ 85EB124 .string "BEAUTY$" -gUnknown_085eb12b:: @ 85EB12B +gUnknown_085EB12B:: @ 85EB12B .string "CUTE$" -gUnknown_085eb130:: @ 85EB130 +gUnknown_085EB130:: @ 85EB130 .string "SMART$" -gUnknown_085eb136:: @ 85EB136 +gUnknown_085EB136:: @ 85EB136 .string "TOUGH$" -gUnknown_085eb13c:: @ 85EB13C +gUnknown_085EB13C:: @ 85EB13C .string "ITEMS$" -gUnknown_085eb142:: @ 85EB142 +gUnknown_085EB142:: @ 85EB142 .string "KEY ITEMS$" -gUnknown_085eb14c:: @ 85EB14C +gUnknown_085EB14C:: @ 85EB14C .string "POKé BALLS$" -gUnknown_085eb157:: @ 85EB157 +gUnknown_085EB157:: @ 85EB157 .string "TMs & HMs$" -gUnknown_085eb161:: @ 85EB161 +gUnknown_085EB161:: @ 85EB161 .string "BERRIES$" gText_SomeonesPC:: @ 85EB169 @@ -2064,58 +2064,58 @@ gText_LogOff:: @ 85EB198 .string "LOG OFF$" -gUnknown_085eb1a0:: @ 85EB1A0 +gUnknown_085EB1A0:: @ 85EB1A0 .string "OPPONENT$" -gUnknown_085eb1a9:: @ 85EB1A9 +gUnknown_085EB1A9:: @ 85EB1A9 .string "TOURNEY TREE$" -gUnknown_085eb1b6:: @ 85EB1B6 +gUnknown_085EB1B6:: @ 85EB1B6 .string "READY TO START$" -gUnknown_085eb1c5:: @ 85EB1C5 +gUnknown_085EB1C5:: @ 85EB1C5 .string "NORMAL RANK$" -gUnknown_085eb1d1:: @ 85EB1D1 +gUnknown_085EB1D1:: @ 85EB1D1 .string "SUPER RANK$" -gUnknown_085eb1dc:: @ 85EB1DC +gUnknown_085EB1DC:: @ 85EB1DC .string "HYPER RANK$" -gUnknown_085eb1e7:: @ 85EB1E7 +gUnknown_085EB1E7:: @ 85EB1E7 .string "MASTER RANK$" -gUnknown_085eb1f3:: @ 85EB1F3 +gUnknown_085EB1F3:: @ 85EB1F3 .string "SINGLE$" -gUnknown_085eb1fa:: @ 85EB1FA +gUnknown_085EB1FA:: @ 85EB1FA .string "DOUBLE$" -gUnknown_085eb201:: @ 85EB201 +gUnknown_085EB201:: @ 85EB201 .string "MULTI$" -gUnknown_085eb207:: @ 85EB207 +gUnknown_085EB207:: @ 85EB207 .string "MULTI-LINK$" -gUnknown_085eb212:: @ 85EB212 +gUnknown_085EB212:: @ 85EB212 .string "BATTLE BAG$" -gUnknown_085eb21d:: @ 85EB21D +gUnknown_085EB21D:: @ 85EB21D .string "HELD ITEM$" -gUnknown_085eb227:: @ 85EB227 +gUnknown_085EB227:: @ 85EB227 .string "LINK CONTEST$" -gUnknown_085eb234:: @ 85EB234 +gUnknown_085EB234:: @ 85EB234 .string "ABOUT E-MODE$" -gUnknown_085eb241:: @ 85EB241 +gUnknown_085EB241:: @ 85EB241 .string "ABOUT G-MODE$" -gUnknown_085eb24e:: @ 85EB24E +gUnknown_085EB24E:: @ 85EB24E .string "E-MODE$" -gUnknown_085eb255:: @ 85EB255 +gUnknown_085EB255:: @ 85EB255 .string "G-MODE$" gText_MenuOptionPokedex:: @ 85EB25C @@ -2131,7 +2131,7 @@ gText_MenuOptionPokenav:: @ 85EB270 .string "POKéNAV$" -gUnknown_085eb278:: @ 85EB278 +gUnknown_085EB278:: @ 85EB278 .string "$" gText_MenuOptionSave:: @ 85EB279 @@ -2143,220 +2143,220 @@ gText_MenuOptionOption:: @ 85EB27E gText_MenuOptionExit:: @ 85EB285 .string "EXIT$" -gUnknown_085eb28a:: @ 85EB28A +gUnknown_085EB28A:: @ 85EB28A .string " " -gUnknown_085eb28c:: @ 85EB28C +gUnknown_085EB28C:: @ 85EB28C .string "5BP$" -gUnknown_085eb290:: @ 85EB290 +gUnknown_085EB290:: @ 85EB290 .string "10BP$" -gUnknown_085eb295:: @ 85EB295 +gUnknown_085EB295:: @ 85EB295 .string "15BP$" -gUnknown_085eb29a:: @ 85EB29A +gUnknown_085EB29A:: @ 85EB29A .string "RED TENT$" -gUnknown_085eb2a3:: @ 85EB2A3 +gUnknown_085EB2A3:: @ 85EB2A3 .string "BLUE TENT$" -gUnknown_085eb2ad:: @ 85EB2AD +gUnknown_085EB2AD:: @ 85EB2AD .string "SOUTHERN ISLAND$" -gUnknown_085eb2bd:: @ 85EB2BD +gUnknown_085EB2BD:: @ 85EB2BD .string "BIRTH ISLAND$" -gUnknown_085eb2ca:: @ 85EB2CA +gUnknown_085EB2CA:: @ 85EB2CA .string "FARAWAY ISLAND$" -gUnknown_085eb2d9:: @ 85EB2D9 +gUnknown_085EB2D9:: @ 85EB2D9 .string "NAVEL ROCK$" -gUnknown_085eb2e4:: @ 85EB2E4 +gUnknown_085EB2E4:: @ 85EB2E4 .string "CLAW FOSSIL$" -gUnknown_085eb2f0:: @ 85EB2F0 +gUnknown_085EB2F0:: @ 85EB2F0 .string "ROOT FOSSIL$" -gUnknown_085eb2fc:: @ 85EB2FC +gUnknown_085EB2FC:: @ 85EB2FC .string "NO$" -gUnknown_085eb2ff:: @ 85EB2FF +gUnknown_085EB2FF:: @ 85EB2FF .string "I’ll battle now!$" -gUnknown_085eb310:: @ 85EB310 +gUnknown_085EB310:: @ 85EB310 .string "I won!$" -gUnknown_085eb317:: @ 85EB317 +gUnknown_085EB317:: @ 85EB317 .string "I lost!$" -gUnknown_085eb31f:: @ 85EB31F +gUnknown_085EB31F:: @ 85EB31F .string "I won’t tell.$" -gUnknown_085eb32d:: @ 85EB32D +gUnknown_085EB32D:: @ 85EB32D .string "NORMAL TAG MATCH$" -gUnknown_085eb33e:: @ 85EB33E +gUnknown_085EB33E:: @ 85EB33E .string "VARIETY TAG MATCH$" -gUnknown_085eb350:: @ 85EB350 +gUnknown_085EB350:: @ 85EB350 .string "UNIQUE TAG MATCH$" -gUnknown_085eb361:: @ 85EB361 +gUnknown_085EB361:: @ 85EB361 .string "EXPERT TAG MATCH$" -gUnknown_085eb372:: @ 85EB372 +gUnknown_085EB372:: @ 85EB372 .string "TRADE CENTER$" -gUnknown_085eb37f:: @ 85EB37F +gUnknown_085EB37F:: @ 85EB37F .string "COLOSSEUM$" -gUnknown_085eb389:: @ 85EB389 +gUnknown_085EB389:: @ 85EB389 .string "RECORD CORNER$" -gUnknown_085eb397:: @ 85EB397 +gUnknown_085EB397:: @ 85EB397 .string "BERRY CRUSH$" -gUnknown_085eb3a3:: @ 85EB3A3 +gUnknown_085EB3A3:: @ 85EB3A3 .string "$" -gUnknown_085eb3a4:: @ 85EB3A4 +gUnknown_085EB3A4:: @ 85EB3A4 .string "POKéMON JUMP$" -gUnknown_085eb3b1:: @ 85EB3B1 +gUnknown_085EB3B1:: @ 85EB3B1 .string "DODRIO BERRY-PICKING$" -gUnknown_085eb3c6:: @ 85EB3C6 +gUnknown_085EB3C6:: @ 85EB3C6 .string "BECOME LEADER$" -gUnknown_085eb3d4:: @ 85EB3D4 +gUnknown_085EB3D4:: @ 85EB3D4 .string "JOIN GROUP$" -gUnknown_085eb3df:: @ 85EB3DF +gUnknown_085EB3DF:: @ 85EB3DF .string "TWO STYLES$" -gUnknown_085eb3ea:: @ 85EB3EA +gUnknown_085EB3EA:: @ 85EB3EA .string "LV. 50$" -gUnknown_085eb3f1:: @ 85EB3F1 +gUnknown_085EB3F1:: @ 85EB3F1 .string "OPEN LEVEL$" -gUnknown_085eb3fc:: @ 85EB3FC +gUnknown_085EB3FC:: @ 85EB3FC .string "{PKMN} TYPE & NO.$" -gUnknown_085eb40a:: @ 85EB40A +gUnknown_085EB40A:: @ 85EB40A .string "HOLD ITEMS$" -gUnknown_085eb415:: @ 85EB415 +gUnknown_085EB415:: @ 85EB415 .string "SYMBOLS$" -gUnknown_085eb41d:: @ 85EB41D +gUnknown_085EB41D:: @ 85EB41D .string "RECORD$" -gUnknown_085eb424:: @ 85EB424 +gUnknown_085EB424:: @ 85EB424 .string "BATTLE PTS$" -gUnknown_085eb42f:: @ 85EB42F +gUnknown_085EB42F:: @ 85EB42F .string "TOWER INFO$" -gUnknown_085eb43a:: @ 85EB43A +gUnknown_085EB43A:: @ 85EB43A .string "BATTLE {PKMN}$" -gUnknown_085eb444:: @ 85EB444 +gUnknown_085EB444:: @ 85EB444 .string "BATTLE SALON$" -gUnknown_085eb451:: @ 85EB451 +gUnknown_085EB451:: @ 85EB451 .string "MULTI-LINK$" -gUnknown_085eb45c:: @ 85EB45C +gUnknown_085EB45C:: @ 85EB45C .string "BATTLE RULES$" -gUnknown_085eb469:: @ 85EB469 +gUnknown_085EB469:: @ 85EB469 .string "JUDGE: MIND$" -gUnknown_085eb475:: @ 85EB475 +gUnknown_085EB475:: @ 85EB475 .string "JUDGE: SKILL$" -gUnknown_085eb482:: @ 85EB482 +gUnknown_085EB482:: @ 85EB482 .string "JUDGE: BODY$" -gUnknown_085eb48e:: @ 85EB48E +gUnknown_085EB48E:: @ 85EB48E .string "MATCHUP$" -gUnknown_085eb496:: @ 85EB496 +gUnknown_085EB496:: @ 85EB496 .string "TOURNEY TREE$" -gUnknown_085eb4a3:: @ 85EB4A3 +gUnknown_085EB4A3:: @ 85EB4A3 .string "DOUBLE KO$" -gUnknown_085eb4ad:: @ 85EB4AD +gUnknown_085EB4AD:: @ 85EB4AD .string "BASIC RULES$" -gUnknown_085eb4b9:: @ 85EB4B9 +gUnknown_085EB4B9:: @ 85EB4B9 .string "SWAP: PARTNER$" -gUnknown_085eb4c7:: @ 85EB4C7 +gUnknown_085EB4C7:: @ 85EB4C7 .string "SWAP: NUMBER$" -gUnknown_085eb4d4:: @ 85EB4D4 +gUnknown_085EB4D4:: @ 85EB4D4 .string "SWAP: NOTES$" -gUnknown_085eb4e0:: @ 85EB4E0 +gUnknown_085EB4E0:: @ 85EB4E0 .string "OPEN LEVEL$" -gUnknown_085eb4eb:: @ 85EB4EB +gUnknown_085EB4EB:: @ 85EB4EB .string "BATTLE BASICS$" -gUnknown_085eb4f9:: @ 85EB4F9 +gUnknown_085EB4F9:: @ 85EB4F9 .string "POKéMON NATURE$" -gUnknown_085eb508:: @ 85EB508 +gUnknown_085EB508:: @ 85EB508 .string "POKéMON MOVES$" -gUnknown_085eb516:: @ 85EB516 +gUnknown_085EB516:: @ 85EB516 .string "UNDERPOWERED$" -gUnknown_085eb523:: @ 85EB523 +gUnknown_085EB523:: @ 85EB523 .string "WHEN IN DANGER$" -gUnknown_085eb532:: @ 85EB532 +gUnknown_085EB532:: @ 85EB532 .string "PYRAMID: POKéMON$" -gUnknown_085eb543:: @ 85EB543 +gUnknown_085EB543:: @ 85EB543 .string "PYRAMID: TRAINERS$" -gUnknown_085eb555:: @ 85EB555 +gUnknown_085EB555:: @ 85EB555 .string "PYRAMID: MAZE$" -gUnknown_085eb563:: @ 85EB563 +gUnknown_085EB563:: @ 85EB563 .string "BATTLE BAG$" -gUnknown_085eb56e:: @ 85EB56E +gUnknown_085EB56E:: @ 85EB56E .string "POKéNAV AND BAG$" -gUnknown_085eb57e:: @ 85EB57E +gUnknown_085EB57E:: @ 85EB57E .string "HELD ITEMS$" -gUnknown_085eb589:: @ 85EB589 +gUnknown_085EB589:: @ 85EB589 .string "POKéMON ORDER$" -gUnknown_085eb597:: @ 85EB597 +gUnknown_085EB597:: @ 85EB597 .string "BATTLE POKéMON$" -gUnknown_085eb5a6:: @ 85EB5A6 +gUnknown_085EB5A6:: @ 85EB5A6 .string "BATTLE TRAINERS$" -gUnknown_085eb5b6:: @ 85EB5B6 +gUnknown_085EB5B6:: @ 85EB5B6 .string "GO ON$" -gUnknown_085eb5bc:: @ 85EB5BC +gUnknown_085EB5BC:: @ 85EB5BC .string "RECORD$" -gUnknown_085eb5c3:: @ 85EB5C3 +gUnknown_085EB5C3:: @ 85EB5C3 .string "REST$" -gUnknown_085eb5c8:: @ 85EB5C8 +gUnknown_085EB5C8:: @ 85EB5C8 .string "RETIRE$" gText_99TimesPlus:: @ 85EB5CF @@ -2372,7 +2372,7 @@ gText_SpaceTimes:: @ 85EB5EE .string " time(s)$" -gUnknown_085eb5f7:: @ 85EB5F7 +gUnknown_085EB5F7:: @ 85EB5F7 .string ".$" gText_BigGuy:: @ 85EB5F9 @@ -2388,73 +2388,73 @@ gText_Daughter:: @ 85EB60E .string "daughter$" -gUnknown_085eb617:: @ 85EB617 +gUnknown_085EB617:: @ 85EB617 .string "BLUE FLUTE$" -gUnknown_085eb622:: @ 85EB622 +gUnknown_085EB622:: @ 85EB622 .string "YELLOW FLUTE$" -gUnknown_085eb62f:: @ 85EB62F +gUnknown_085EB62F:: @ 85EB62F .string "RED FLUTE$" -gUnknown_085eb639:: @ 85EB639 +gUnknown_085EB639:: @ 85EB639 .string "WHITE FLUTE$" -gUnknown_085eb645:: @ 85EB645 +gUnknown_085EB645:: @ 85EB645 .string "BLACK FLUTE$" -gUnknown_085eb651:: @ 85EB651 +gUnknown_085EB651:: @ 85EB651 .string "PRETTY CHAIR$" -gUnknown_085eb65e:: @ 85EB65E +gUnknown_085EB65E:: @ 85EB65E .string "PRETTY DESK$" -gUnknown_085eb66a:: @ 85EB66A +gUnknown_085EB66A:: @ 85EB66A .string "1F$" -gUnknown_085eb66d:: @ 85EB66D +gUnknown_085EB66D:: @ 85EB66D .string "2F$" -gUnknown_085eb670:: @ 85EB670 +gUnknown_085EB670:: @ 85EB670 .string "3F$" -gUnknown_085eb673:: @ 85EB673 +gUnknown_085EB673:: @ 85EB673 .string "4F$" -gUnknown_085eb676:: @ 85EB676 +gUnknown_085EB676:: @ 85EB676 .string "5F$" -gUnknown_085eb679:: @ 85EB679 +gUnknown_085EB679:: @ 85EB679 .string "6F$" -gUnknown_085eb67c:: @ 85EB67C +gUnknown_085EB67C:: @ 85EB67C .string "7F$" -gUnknown_085eb67f:: @ 85EB67F +gUnknown_085EB67F:: @ 85EB67F .string "8F$" -gUnknown_085eb682:: @ 85EB682 +gUnknown_085EB682:: @ 85EB682 .string "9F$" -gUnknown_085eb685:: @ 85EB685 +gUnknown_085EB685:: @ 85EB685 .string "10F$" -gUnknown_085eb689:: @ 85EB689 +gUnknown_085EB689:: @ 85EB689 .string "11F$" -gUnknown_085eb68d:: @ 85EB68D +gUnknown_085EB68D:: @ 85EB68D .string "B1F$" -gUnknown_085eb691:: @ 85EB691 +gUnknown_085EB691:: @ 85EB691 .string "B2F$" -gUnknown_085eb695:: @ 85EB695 +gUnknown_085EB695:: @ 85EB695 .string "B3F$" -gUnknown_085eb699:: @ 85EB699 +gUnknown_085EB699:: @ 85EB699 .string "B4F$" -gUnknown_085eb69d:: @ 85EB69D +gUnknown_085EB69D:: @ 85EB69D .string "ROOFTOP$" gText_ElevatorNowOn:: @ 85EB6A5 @@ -2464,302 +2464,302 @@ gText_BP:: @ 85EB6AD .string "BP$" -gUnknown_085eb6b0:: @ 85EB6B0 +gUnknown_085EB6B0:: @ 85EB6B0 .string "ENERGYPOWDER{CLEAR_TO 0x72}{SIZE 0}50$" -gUnknown_085eb6c5:: @ 85EB6C5 +gUnknown_085EB6C5:: @ 85EB6C5 .string "ENERGY ROOT{CLEAR_TO 0x72}{SIZE 0}80$" -gUnknown_085eb6d9:: @ 85EB6D9 +gUnknown_085EB6D9:: @ 85EB6D9 .string "HEAL POWDER{CLEAR_TO 0x72}{SIZE 0}50$" -gUnknown_085eb6ed:: @ 85EB6ED +gUnknown_085EB6ED:: @ 85EB6ED .string "REVIVAL HERB{CLEAR_TO 0x6C}{SIZE 0}300$" -gUnknown_085eb703:: @ 85EB703 +gUnknown_085EB703:: @ 85EB703 .string "PROTEIN{CLEAR_TO 0x63}{SIZE 0}1,000$" -gUnknown_085eb716:: @ 85EB716 +gUnknown_085EB716:: @ 85EB716 .string "IRON{CLEAR_TO 0x63}{SIZE 0}1,000$" -gUnknown_085eb726:: @ 85EB726 +gUnknown_085EB726:: @ 85EB726 .string "CARBOS{CLEAR_TO 0x63}{SIZE 0}1,000$" -gUnknown_085eb738:: @ 85EB738 +gUnknown_085EB738:: @ 85EB738 .string "CALCIUM{CLEAR_TO 0x63}{SIZE 0}1,000$" -gUnknown_085eb74b:: @ 85EB74B +gUnknown_085EB74B:: @ 85EB74B .string "ZINC{CLEAR_TO 0x63}{SIZE 0}1,000$" -gUnknown_085eb75b:: @ 85EB75B +gUnknown_085EB75B:: @ 85EB75B .string "HP UP{CLEAR_TO 0x63}{SIZE 0}1,000$" -gUnknown_085eb76c:: @ 85EB76C +gUnknown_085EB76C:: @ 85EB76C .string "PP UP{CLEAR_TO 0x63}{SIZE 0}3,000$" -gUnknown_085eb77d:: @ 85EB77D +gUnknown_085EB77D:: @ 85EB77D .string "RANKING HALL$" -gUnknown_085eb78a:: @ 85EB78A +gUnknown_085EB78A:: @ 85EB78A .string "EXCHANGE SERVICE$" -gUnknown_085eb79b:: @ 85EB79B +gUnknown_085EB79B:: @ 85EB79B .string "LILYCOVE CITY$" -gUnknown_085eb7a9:: @ 85EB7A9 +gUnknown_085EB7A9:: @ 85EB7A9 .string "SLATEPORT CITY$" -gUnknown_085eb7b8:: @ 85EB7B8 +gUnknown_085EB7B8:: @ 85EB7B8 .string "CAVE OF ORIGIN$" -gUnknown_085eb7c7:: @ 85EB7C7 +gUnknown_085EB7C7:: @ 85EB7C7 .string "MT. PYRE$" -gUnknown_085eb7d0:: @ 85EB7D0 +gUnknown_085EB7D0:: @ 85EB7D0 .string "SKY PILLAR$" -gUnknown_085eb7db:: @ 85EB7DB +gUnknown_085EB7DB:: @ 85EB7DB .string "Don’t remember$" gText_Exit:: @ 85EB7EA .string "EXIT$" -gUnknown_085eb7ef:: @ 85EB7EF +gUnknown_085EB7EF:: @ 85EB7EF .string "Exit from the BOX?$" -gUnknown_085eb802:: @ 85EB802 +gUnknown_085EB802:: @ 85EB802 .string "What do you want to do?$" -gUnknown_085eb81a:: @ 85EB81A +gUnknown_085EB81A:: @ 85EB81A .string "Please pick a theme.$" -gUnknown_085eb82f:: @ 85EB82F +gUnknown_085EB82F:: @ 85EB82F .string "Pick the wallpaper.$" -gUnknown_085eb843:: @ 85EB843 +gUnknown_085EB843:: @ 85EB843 .string "{SPECIAL_F7 0x00} is selected.$" -gUnknown_085eb853:: @ 85EB853 +gUnknown_085EB853:: @ 85EB853 .string "Jump to which BOX?$" -gUnknown_085eb866:: @ 85EB866 +gUnknown_085EB866:: @ 85EB866 .string "Deposit in which BOX?$" -gUnknown_085eb87c:: @ 85EB87C +gUnknown_085EB87C:: @ 85EB87C .string "{SPECIAL_F7 0x00} was deposited.$" -gUnknown_085eb88e:: @ 85EB88E +gUnknown_085EB88E:: @ 85EB88E .string "The BOX is full.$" -gUnknown_085eb89f:: @ 85EB89F +gUnknown_085EB89F:: @ 85EB89F .string "Release this POKéMON?$" -gUnknown_085eb8b5:: @ 85EB8B5 +gUnknown_085EB8B5:: @ 85EB8B5 .string "{SPECIAL_F7 0x00} was released.$" -gUnknown_085eb8c6:: @ 85EB8C6 +gUnknown_085EB8C6:: @ 85EB8C6 .string "Bye-bye, {SPECIAL_F7 0x00}!$" -gUnknown_085eb8d3:: @ 85EB8D3 +gUnknown_085EB8D3:: @ 85EB8D3 .string "Mark your POKéMON.$" -gUnknown_085eb8e6:: @ 85EB8E6 +gUnknown_085EB8E6:: @ 85EB8E6 .string "That’s your last POKéMON!$" -gUnknown_085eb900:: @ 85EB900 +gUnknown_085EB900:: @ 85EB900 .string "Your party’s full!$" -gUnknown_085eb913:: @ 85EB913 +gUnknown_085EB913:: @ 85EB913 .string "You’re holding a POKéMON!$" -gUnknown_085eb92d:: @ 85EB92D +gUnknown_085EB92D:: @ 85EB92D .string "Which one will you take?$" -gUnknown_085eb946:: @ 85EB946 +gUnknown_085EB946:: @ 85EB946 .string "You can’t release an EGG.$" -gUnknown_085eb960:: @ 85EB960 +gUnknown_085EB960:: @ 85EB960 .string "Continue BOX operations?$" -gUnknown_085eb979:: @ 85EB979 +gUnknown_085EB979:: @ 85EB979 .string "{SPECIAL_F7 0x00} came back!$" -gUnknown_085eb987:: @ 85EB987 +gUnknown_085EB987:: @ 85EB987 .string "Was it worried about you?$" -gUnknown_085eb9a1:: @ 85EB9A1 +gUnknown_085EB9A1:: @ 85EB9A1 .string "… … … … !$" -gUnknown_085eb9ab:: @ 85EB9AB +gUnknown_085EB9AB:: @ 85EB9AB .string "Please remove the MAIL.$" -gUnknown_085eb9c3:: @ 85EB9C3 +gUnknown_085EB9C3:: @ 85EB9C3 .string "GIVE to a POKéMON?$" -gUnknown_085eb9d6:: @ 85EB9D6 +gUnknown_085EB9D6:: @ 85EB9D6 .string "Placed item in the BAG.$" -gUnknown_085eb9ee:: @ 85EB9EE +gUnknown_085EB9EE:: @ 85EB9EE .string "The BAG is full.$" -gUnknown_085eb9ff:: @ 85EB9FF +gUnknown_085EB9FF:: @ 85EB9FF .string "Put this item in the BAG?$" -gUnknown_085eba19:: @ 85EBA19 +gUnknown_085EBA19:: @ 85EBA19 .string "{SPECIAL_F7 0x00} is now held.$" -gUnknown_085eba29:: @ 85EBA29 +gUnknown_085EBA29:: @ 85EBA29 .string "Changed to {SPECIAL_F7 0x00}.$" -gUnknown_085eba38:: @ 85EBA38 +gUnknown_085EBA38:: @ 85EBA38 .string "MAIL can’t be stored!$" -gUnknown_085eba4e:: @ 85EBA4E +gUnknown_085EBA4E:: @ 85EBA4E .string "CANCEL$" -gUnknown_085eba55:: @ 85EBA55 +gUnknown_085EBA55:: @ 85EBA55 .string "STORE$" -gUnknown_085eba5b:: @ 85EBA5B +gUnknown_085EBA5B:: @ 85EBA5B .string "WITHDRAW$" -gUnknown_085eba64:: @ 85EBA64 +gUnknown_085EBA64:: @ 85EBA64 .string "SHIFT$" -gUnknown_085eba6a:: @ 85EBA6A +gUnknown_085EBA6A:: @ 85EBA6A .string "MOVE$" -gUnknown_085eba6f:: @ 85EBA6F +gUnknown_085EBA6F:: @ 85EBA6F .string "PLACE$" -gUnknown_085eba75:: @ 85EBA75 +gUnknown_085EBA75:: @ 85EBA75 .string "SUMMARY$" -gUnknown_085eba7d:: @ 85EBA7D +gUnknown_085EBA7D:: @ 85EBA7D .string "RELEASE$" -gUnknown_085eba85:: @ 85EBA85 +gUnknown_085EBA85:: @ 85EBA85 .string "MARK$" -gUnknown_085eba8a:: @ 85EBA8A +gUnknown_085EBA8A:: @ 85EBA8A .string "NAME$" -gUnknown_085eba8f:: @ 85EBA8F +gUnknown_085EBA8F:: @ 85EBA8F .string "JUMP$" -gUnknown_085eba94:: @ 85EBA94 +gUnknown_085EBA94:: @ 85EBA94 .string "WALLPAPER$" -gUnknown_085eba9e:: @ 85EBA9E +gUnknown_085EBA9E:: @ 85EBA9E .string "TAKE$" -gUnknown_085ebaa3:: @ 85EBAA3 +gUnknown_085EBAA3:: @ 85EBAA3 .string "GIVE$" -gUnknown_085ebaa8:: @ 85EBAA8 +gUnknown_085EBAA8:: @ 85EBAA8 .string "SWITCH$" -gUnknown_085ebaaf:: @ 85EBAAF +gUnknown_085EBAAF:: @ 85EBAAF .string "BAG$" -gUnknown_085ebab3:: @ 85EBAB3 +gUnknown_085EBAB3:: @ 85EBAB3 .string "INFO$" -gUnknown_085ebab8:: @ 85EBAB8 +gUnknown_085EBAB8:: @ 85EBAB8 .string "SCENERY 1$" -gUnknown_085ebac2:: @ 85EBAC2 +gUnknown_085EBAC2:: @ 85EBAC2 .string "SCENERY 2$" -gUnknown_085ebacc:: @ 85EBACC +gUnknown_085EBACC:: @ 85EBACC .string "SCENERY 3$" -gUnknown_085ebad6:: @ 85EBAD6 +gUnknown_085EBAD6:: @ 85EBAD6 .string "ETCETERA$" -gUnknown_085ebadf:: @ 85EBADF +gUnknown_085EBADF:: @ 85EBADF .string "FRIENDS$" -gUnknown_085ebae7:: @ 85EBAE7 +gUnknown_085EBAE7:: @ 85EBAE7 .string "FOREST$" -gUnknown_085ebaee:: @ 85EBAEE +gUnknown_085EBAEE:: @ 85EBAEE .string "CITY$" -gUnknown_085ebaf3:: @ 85EBAF3 +gUnknown_085EBAF3:: @ 85EBAF3 .string "DESERT$" -gUnknown_085ebafa:: @ 85EBAFA +gUnknown_085EBAFA:: @ 85EBAFA .string "SAVANNA$" -gUnknown_085ebb02:: @ 85EBB02 +gUnknown_085EBB02:: @ 85EBB02 .string "CRAG$" -gUnknown_085ebb07:: @ 85EBB07 +gUnknown_085EBB07:: @ 85EBB07 .string "VOLCANO$" -gUnknown_085ebb0f:: @ 85EBB0F +gUnknown_085EBB0F:: @ 85EBB0F .string "SNOW$" -gUnknown_085ebb14:: @ 85EBB14 +gUnknown_085EBB14:: @ 85EBB14 .string "CAVE$" -gUnknown_085ebb19:: @ 85EBB19 +gUnknown_085EBB19:: @ 85EBB19 .string "BEACH$" -gUnknown_085ebb1f:: @ 85EBB1F +gUnknown_085EBB1F:: @ 85EBB1F .string "SEAFLOOR$" -gUnknown_085ebb28:: @ 85EBB28 +gUnknown_085EBB28:: @ 85EBB28 .string "RIVER$" -gUnknown_085ebb2e:: @ 85EBB2E +gUnknown_085EBB2E:: @ 85EBB2E .string "SKY$" -gUnknown_085ebb32:: @ 85EBB32 +gUnknown_085EBB32:: @ 85EBB32 .string "POLKA-DOT$" -gUnknown_085ebb3c:: @ 85EBB3C +gUnknown_085EBB3C:: @ 85EBB3C .string "POKéCENTER$" -gUnknown_085ebb47:: @ 85EBB47 +gUnknown_085EBB47:: @ 85EBB47 .string "MACHINE$" -gUnknown_085ebb4f:: @ 85EBB4F +gUnknown_085EBB4F:: @ 85EBB4F .string "SIMPLE$" -gUnknown_085ebb56:: @ 85EBB56 +gUnknown_085EBB56:: @ 85EBB56 .string "What would you like to do?$" -gUnknown_085ebb71:: @ 85EBB71 +gUnknown_085EBB71:: @ 85EBB71 .string "WITHDRAW POKéMON$" -gUnknown_085ebb82:: @ 85EBB82 +gUnknown_085EBB82:: @ 85EBB82 .string "DEPOSIT POKéMON$" -gUnknown_085ebb92:: @ 85EBB92 +gUnknown_085EBB92:: @ 85EBB92 .string "MOVE POKéMON$" -gUnknown_085ebb9f:: @ 85EBB9F +gUnknown_085EBB9F:: @ 85EBB9F .string "MOVE ITEMS$" -gUnknown_085ebbaa:: @ 85EBBAA +gUnknown_085EBBAA:: @ 85EBBAA .string "SEE YA!$" -gUnknown_085ebbb2:: @ 85EBBB2 +gUnknown_085EBBB2:: @ 85EBBB2 .string "Move POKéMON stored in BOXES to\nyour party.$" -gUnknown_085ebbde:: @ 85EBBDE +gUnknown_085EBBDE:: @ 85EBBDE .string "Store POKéMON in your party in BOXES.$" -gUnknown_085ebc04:: @ 85EBC04 +gUnknown_085EBC04:: @ 85EBC04 .string "Organize the POKéMON in BOXES and\nin your party.$" -gUnknown_085ebc35:: @ 85EBC35 +gUnknown_085EBC35:: @ 85EBC35 .string "Move items held by any POKéMON\nin a BOX or your party.$" -gUnknown_085ebc6c:: @ 85EBC6C +gUnknown_085EBC6C:: @ 85EBC6C .string "Return to the previous menu.$" gText_JustOnePkmn:: @ 85EBC89 @@ -2772,53 +2772,53 @@ gText_Box:: @ 85EBCC1 .string "BOX$" -gUnknown_085ebcc5:: @ 85EBCC5 +gUnknown_085EBCC5:: @ 85EBCC5 .string "Check the map of the HOENN region.$" -gUnknown_085ebce8:: @ 85EBCE8 +gUnknown_085EBCE8:: @ 85EBCE8 .string "Check POKéMON in detail.$" -gUnknown_085ebd01:: @ 85EBD01 +gUnknown_085EBD01:: @ 85EBD01 .string "Call a registered TRAINER.$" -gUnknown_085ebd1c:: @ 85EBD1C +gUnknown_085EBD1C:: @ 85EBD1C .string "Check obtained RIBBONS.$" -gUnknown_085ebd34:: @ 85EBD34 +gUnknown_085EBD34:: @ 85EBD34 .string "Put away the POKéNAV.$" gText_NoRibbonWinners:: @ 85EBD4A .string "There are no RIBBON winners.$" -gUnknown_085ebd67:: @ 85EBD67 +gUnknown_085EBD67:: @ 85EBD67 .string "No TRAINERS are registered.$" -gUnknown_085ebd83:: @ 85EBD83 +gUnknown_085EBD83:: @ 85EBD83 .string "Check party POKéMON in detail.$" -gUnknown_085ebda2:: @ 85EBDA2 +gUnknown_085EBDA2:: @ 85EBDA2 .string "Check all POKéMON in detail.$" -gUnknown_085ebdbf:: @ 85EBDBF +gUnknown_085EBDBF:: @ 85EBDBF .string "Return to the POKéNAV menu.$" -gUnknown_085ebddb:: @ 85EBDDB +gUnknown_085EBDDB:: @ 85EBDDB .string "Find cool POKéMON.$" -gUnknown_085ebdee:: @ 85EBDEE +gUnknown_085EBDEE:: @ 85EBDEE .string "Find beautiful POKéMON.$" -gUnknown_085ebe06:: @ 85EBE06 +gUnknown_085EBE06:: @ 85EBE06 .string "Find cute POKéMON.$" -gUnknown_085ebe19:: @ 85EBE19 +gUnknown_085EBE19:: @ 85EBE19 .string "Find smart POKéMON.$" -gUnknown_085ebe2d:: @ 85EBE2D +gUnknown_085EBE2D:: @ 85EBE2D .string "Find tough POKéMON.$" -gUnknown_085ebe41:: @ 85EBE41 +gUnknown_085EBE41:: @ 85EBE41 .string "Return to the CONDITION menu.$" gText_NumberRegistered:: @ 85EBE5F @@ -2828,61 +2828,61 @@ gText_NumberOfBattles:: @ 85EBE6E .string "No. of battles$" -gUnknown_085ebe7d:: @ 85EBE7D +gUnknown_085EBE7D:: @ 85EBE7D .string "DETAIL$" -gUnknown_085ebe84:: @ 85EBE84 +gUnknown_085EBE84:: @ 85EBE84 .string "CALL$" -gUnknown_085ebe89:: @ 85EBE89 +gUnknown_085EBE89:: @ 85EBE89 .string "EXIT$" -gUnknown_085ebe8e:: @ 85EBE8E +gUnknown_085EBE8E:: @ 85EBE8E .string "Can’t call opponent here.$" -gUnknown_085ebea8:: @ 85EBEA8 +gUnknown_085EBEA8:: @ 85EBEA8 .string "STRATEGY$" -gUnknown_085ebeb1:: @ 85EBEB1 +gUnknown_085EBEB1:: @ 85EBEB1 .string "TRAINER’S POKéMON$" -gUnknown_085ebec3:: @ 85EBEC3 +gUnknown_085EBEC3:: @ 85EBEC3 .string "SELF-INTRODUCTION$" -gUnknown_085ebed5:: @ 85EBED5 +gUnknown_085EBED5:: @ 85EBED5 .string "{CLEAR 0x80}$" -gUnknown_085ebed9:: @ 85EBED9 +gUnknown_085EBED9:: @ 85EBED9 .string "{UNK_CTRL_F800}ZOOM {UNK_CTRL_F801}CANCEL$" -gUnknown_085ebee9:: @ 85EBEE9 +gUnknown_085EBEE9:: @ 85EBEE9 .string "{UNK_CTRL_F800}FULL {UNK_CTRL_F801}CANCEL$" -gUnknown_085ebef9:: @ 85EBEF9 +gUnknown_085EBEF9:: @ 85EBEF9 .string "{UNK_CTRL_F800}CONDITION {UNK_CTRL_F801}CANCEL$" -gUnknown_085ebf0e:: @ 85EBF0E +gUnknown_085EBF0E:: @ 85EBF0E .string "{UNK_CTRL_F800}MARKINGS {UNK_CTRL_F801}CANCEL$" -gUnknown_085ebf22:: @ 85EBF22 +gUnknown_085EBF22:: @ 85EBF22 .string "{UNK_CTRL_F800}SELECT MARK {UNK_CTRL_F801}CANCEL$" -gUnknown_085ebf39:: @ 85EBF39 +gUnknown_085EBF39:: @ 85EBF39 .string "{UNK_CTRL_F800}MENU {UNK_CTRL_F801}CANCEL$" -gUnknown_085ebf49:: @ 85EBF49 +gUnknown_085EBF49:: @ 85EBF49 .string "{UNK_CTRL_F800}OK {UNK_CTRL_F801}CANCEL$" -gUnknown_085ebf57:: @ 85EBF57 +gUnknown_085EBF57:: @ 85EBF57 .string "{UNK_CTRL_F801}CANCEL$" -gUnknown_085ebf60:: @ 85EBF60 +gUnknown_085EBF60:: @ 85EBF60 .string "{UNK_CTRL_F800}RIBBONS {UNK_CTRL_F801}CANCEL$" -gUnknown_085ebf73:: @ 85EBF73 +gUnknown_085EBF73:: @ 85EBF73 .string "{UNK_CTRL_F800}CHECK {UNK_CTRL_F801}CANCEL$" -gUnknown_085ebf84:: @ 85EBF84 +gUnknown_085EBF84:: @ 85EBF84 .string "{UNK_CTRL_F801}CANCEL$" gText_NatureSlash:: @ 85EBF8D @@ -2898,29 +2898,29 @@ gText_Number2:: @ 85EBFD7 .string "No. $" -gUnknown_085ebfdc:: @ 85EBFDC +gUnknown_085EBFDC:: @ 85EBFDC .string "RIBBONS$" -gUnknown_085ebfe4:: @ 85EBFE4 +gUnknown_085EBFE4:: @ 85EBFE4 .string "{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}$" -gUnknown_085ebff6:: @ 85EBFF6 +gUnknown_085EBFF6:: @ 85EBFF6 .string "{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}$" -gUnknown_085ec008:: @ 85EC008 +gUnknown_085EC008:: @ 85EC008 .string "{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}$" gText_Unknown:: @ 85EC00F .string "UNKNOWN$" -gUnknown_085ec017:: @ 85EC017 +gUnknown_085EC017:: @ 85EC017 .string "CALL$" -gUnknown_085ec01c:: @ 85EC01C +gUnknown_085EC01C:: @ 85EC01C .string "CHECK$" -gUnknown_085ec022:: @ 85EC022 +gUnknown_085EC022:: @ 85EC022 .string "CANCEL$" gText_NumberF700:: @ 85EC029 @@ -2930,121 +2930,121 @@ gText_RibbonsF700:: @ 85EC030 .string "RIBBONS {SPECIAL_F7 0x00}$" -gUnknown_085ec03b:: @ 85EC03B +gUnknown_085EC03B:: @ 85EC03B .string "{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}$" -gUnknown_085ec04f:: @ 85EC04F +gUnknown_085EC04F:: @ 85EC04F .string "{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}$" -gUnknown_085ec063:: @ 85EC063 +gUnknown_085EC063:: @ 85EC063 .string "{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}$" -gUnknown_085ec06c:: @ 85EC06C +gUnknown_085EC06C:: @ 85EC06C .string "Combine four words or phrases$" -gUnknown_085ec08a:: @ 85EC08A +gUnknown_085EC08A:: @ 85EC08A .string "and make your profile.$" -gUnknown_085ec0a1:: @ 85EC0A1 +gUnknown_085EC0A1:: @ 85EC0A1 .string "Combine six words or phrases$" -gUnknown_085ec0be:: @ 85EC0BE +gUnknown_085EC0BE:: @ 85EC0BE .string "and make a message.$" -gUnknown_085ec0d2:: @ 85EC0D2 +gUnknown_085EC0D2:: @ 85EC0D2 .string "Find words that describe your$" -gUnknown_085ec0f0:: @ 85EC0F0 +gUnknown_085EC0F0:: @ 85EC0F0 .string "feelings right now.$" -gUnknown_085ec104:: @ 85EC104 +gUnknown_085EC104:: @ 85EC104 .string "With four phrases,$" -gUnknown_085ec117:: @ 85EC117 +gUnknown_085EC117:: @ 85EC117 .string "Combine nine words or phrases$" -gUnknown_085ec135:: @ 85EC135 +gUnknown_085EC135:: @ 85EC135 .string "and make a message.$" -gUnknown_085ec149:: @ 85EC149 +gUnknown_085EC149:: @ 85EC149 .string "Change just one word or phrase$" -gUnknown_085ec168:: @ 85EC168 +gUnknown_085EC168:: @ 85EC168 .string "and improve the BARD’s song.$" -gUnknown_085ec185:: @ 85EC185 +gUnknown_085EC185:: @ 85EC185 .string "Your profile$" -gUnknown_085ec192:: @ 85EC192 +gUnknown_085EC192:: @ 85EC192 .string "Your feeling at the battle’s start$" -gUnknown_085ec1b5:: @ 85EC1B5 +gUnknown_085EC1B5:: @ 85EC1B5 .string "What you say if you win a battle$" -gUnknown_085ec1d6:: @ 85EC1D6 +gUnknown_085EC1D6:: @ 85EC1D6 .string "What you say if you lose a battle$" -gUnknown_085ec1f8:: @ 85EC1F8 +gUnknown_085EC1F8:: @ 85EC1F8 .string "The answer$" -gUnknown_085ec203:: @ 85EC203 +gUnknown_085EC203:: @ 85EC203 .string "The MAIL message$" -gUnknown_085ec214:: @ 85EC214 +gUnknown_085EC214:: @ 85EC214 .string "The MAIL salutation$" -gUnknown_085ec228:: @ 85EC228 +gUnknown_085EC228:: @ 85EC228 .string "The new song$" -gUnknown_085ec235:: @ 85EC235 +gUnknown_085EC235:: @ 85EC235 .string "Combine two words or phrases$" -gUnknown_085ec252:: @ 85EC252 +gUnknown_085EC252:: @ 85EC252 .string "and make a trendy saying.$" -gUnknown_085ec26c:: @ 85EC26C +gUnknown_085EC26C:: @ 85EC26C .string "The trendy saying$" -gUnknown_085ec27e:: @ 85EC27E +gUnknown_085EC27E:: @ 85EC27E .string "is as shown. Okay?$" -gUnknown_085ec291:: @ 85EC291 +gUnknown_085EC291:: @ 85EC291 .string "Combine two words or phrases$" -gUnknown_085ec2ae:: @ 85EC2AE +gUnknown_085EC2AE:: @ 85EC2AE .string "to teach her a good saying.$" -gUnknown_085ec2ca:: @ 85EC2CA +gUnknown_085EC2CA:: @ 85EC2CA .string "Find words which fit$" -gUnknown_085ec2df:: @ 85EC2DF +gUnknown_085EC2DF:: @ 85EC2DF .string "the TRAINER’s image.$" -gUnknown_085ec2f4:: @ 85EC2F4 +gUnknown_085EC2F4:: @ 85EC2F4 .string "The image:$" -gUnknown_085ec2ff:: @ 85EC2FF +gUnknown_085EC2FF:: @ 85EC2FF .string "Out of the listed choices,$" -gUnknown_085ec31a:: @ 85EC31A +gUnknown_085EC31A:: @ 85EC31A .string "select the answer to the quiz!$" -gUnknown_085ec339:: @ 85EC339 +gUnknown_085EC339:: @ 85EC339 .string "and create a quiz!$" -gUnknown_085ec34c:: @ 85EC34C +gUnknown_085EC34C:: @ 85EC34C .string "Pick a word or phrase and$" -gUnknown_085ec366:: @ 85EC366 +gUnknown_085EC366:: @ 85EC366 .string "set the quiz answer.$" -gUnknown_085ec37b:: @ 85EC37B +gUnknown_085EC37B:: @ 85EC37B .string "The answer:$" -gUnknown_085ec387:: @ 85EC387 +gUnknown_085EC387:: @ 85EC387 .string "The quiz:$" -gUnknown_085ec391:: @ 85EC391 +gUnknown_085EC391:: @ 85EC391 .string "Apprentice’s phrase:$" gText_QuitEditing:: @ 85EC3A6 @@ -3054,10 +3054,10 @@ gText_StopGivingPkmnMail:: @ 85EC3B4 .string "Stop giving the POKéMON MAIL?$" -gUnknown_085ec3d2:: @ 85EC3D2 +gUnknown_085EC3D2:: @ 85EC3D2 .string "and fill out the questionnaire.$" -gUnknown_085ec3f2:: @ 85EC3F2 +gUnknown_085EC3F2:: @ 85EC3F2 .string "Let’s reply to the interview!$" gText_AllTextBeingEditedWill:: @ 85EC410 @@ -3067,19 +3067,19 @@ gText_BeDeletedThatOkay:: @ 85EC42F .string "be deleted. Is that okay?$" -gUnknown_085ec449:: @ 85EC449 +gUnknown_085EC449:: @ 85EC449 .string "Quit editing?$" -gUnknown_085ec457:: @ 85EC457 +gUnknown_085EC457:: @ 85EC457 .string "The edited text will not be saved.$" -gUnknown_085ec47a:: @ 85EC47A +gUnknown_085EC47A:: @ 85EC47A .string "Is that okay?$" -gUnknown_085ec488:: @ 85EC488 +gUnknown_085EC488:: @ 85EC488 .string "Please enter a phrase or word.$" -gUnknown_085ec4a7:: @ 85EC4A7 +gUnknown_085EC4A7:: @ 85EC4A7 .string "The entire text can’t be deleted.$" gText_OnlyOnePhrase:: @ 85EC4C9 @@ -3089,62 +3089,62 @@ gText_OriginalSongWillBeUsed:: @ 85EC4E9 .string "The original song will be used.$" -gUnknown_085ec509:: @ 85EC509 +gUnknown_085EC509:: @ 85EC509 .string "That’s trendy already!$" gText_CombineTwoWordsOrPhrases:: @ 85EC520 .string "Combine two words or phrases.$" -gUnknown_085ec53e:: @ 85EC53E +gUnknown_085EC53E:: @ 85EC53E .string "Quit giving information?$" -gUnknown_085ec557:: @ 85EC557 +gUnknown_085EC557:: @ 85EC557 .string "Stop giving the POKéMON MAIL?$" -gUnknown_085ec575:: @ 85EC575 +gUnknown_085EC575:: @ 85EC575 .string "Create a quiz!$" -gUnknown_085ec584:: @ 85EC584 +gUnknown_085EC584:: @ 85EC584 .string "Set the answer!$" -gUnknown_085ec594:: @ 85EC594 +gUnknown_085EC594:: @ 85EC594 .string "Cancel the selection?$" -gUnknown_085ec5aa:: @ 85EC5AA +gUnknown_085EC5AA:: @ 85EC5AA .string "PROFILE$" -gUnknown_085ec5b2:: @ 85EC5B2 +gUnknown_085EC5B2:: @ 85EC5B2 .string "At the battle’s start:$" -gUnknown_085ec5c9:: @ 85EC5C9 +gUnknown_085EC5C9:: @ 85EC5C9 .string "Upon winning a battle:$" -gUnknown_085ec5e0:: @ 85EC5E0 +gUnknown_085EC5E0:: @ 85EC5E0 .string "Upon losing a battle:$" -gUnknown_085ec5f6:: @ 85EC5F6 +gUnknown_085EC5F6:: @ 85EC5F6 .string "The BARD’s Song$" -gUnknown_085ec606:: @ 85EC606 +gUnknown_085EC606:: @ 85EC606 .string "What’s hip and happening?$" -gUnknown_085ec620:: @ 85EC620 +gUnknown_085EC620:: @ 85EC620 .string "Interview$" -gUnknown_085ec62a:: @ 85EC62A +gUnknown_085EC62A:: @ 85EC62A .string "Good saying$" -gUnknown_085ec636:: @ 85EC636 +gUnknown_085EC636:: @ 85EC636 .string "Fan’s question$" -gUnknown_085ec645:: @ 85EC645 +gUnknown_085EC645:: @ 85EC645 .string "クイズ㮠ã“ãŸãˆã¯ï¼Ÿ$" @ "kuizuno kotaeha?" ("The quiz's answer is?" in Japanese) -gUnknown_085ec650:: @ 85EC650 +gUnknown_085EC650:: @ 85EC650 .string "Apprentice’s phrase$" -gUnknown_085ec664:: @ 85EC664 +gUnknown_085EC664:: @ 85EC664 .string "QUESTIONNAIRE$" gText_YouCannotQuitHere:: @ 85EC672 @@ -3160,13 +3160,13 @@ gText_Lady:: @ 85EC6B2 .string "Lady$" -gUnknown_085ec6b7:: @ 85EC6B7 +gUnknown_085EC6B7:: @ 85EC6B7 .string "After you have read the quiz$" -gUnknown_085ec6d4:: @ 85EC6D4 +gUnknown_085EC6D4:: @ 85EC6D4 .string "question, press the A Button.$" -gUnknown_085ec6f2:: @ 85EC6F2 +gUnknown_085EC6F2:: @ 85EC6F2 .string "The quiz answer is?$" gText_LikeToQuitQuiz:: @ 85EC706 @@ -3176,7 +3176,7 @@ gText_ChallengeQuestionMark:: @ 85EC727 .string "challenge?$" -gUnknown_085ec732:: @ 85EC732 +gUnknown_085EC732:: @ 85EC732 .string "Is this quiz OK?$" gText_CreateAQuiz:: @ 85EC743 @@ -3189,29 +3189,29 @@ gText_LyricsCantBeDeleted:: @ 85EC765 .string "The lyrics can’t be deleted.$" -gUnknown_085ec782:: @ 85EC782 +gUnknown_085EC782:: @ 85EC782 .string "POKéMON LEAGUE$" -gUnknown_085ec791:: @ 85EC791 +gUnknown_085EC791:: @ 85EC791 .string "POKéMON CENTER$" gText_GetsAPokeBlockQuestion:: @ 85EC7A0 .string " gets a {POKEBLOCK}?$" -gUnknown_085ec7af:: @ 85EC7AF +gUnknown_085EC7AF:: @ 85EC7AF .string "Coolness $" -gUnknown_085ec7b9:: @ 85EC7B9 +gUnknown_085EC7B9:: @ 85EC7B9 .string "Beauty $" -gUnknown_085ec7c1:: @ 85EC7C1 +gUnknown_085EC7C1:: @ 85EC7C1 .string "Cuteness $" -gUnknown_085ec7cb:: @ 85EC7CB +gUnknown_085EC7CB:: @ 85EC7CB .string "Smartness $" -gUnknown_085ec7d6:: @ 85EC7D6 +gUnknown_085EC7D6:: @ 85EC7D6 .string "Toughness $" gText_WasEnhanced:: @ 85EC7E1 @@ -3335,190 +3335,190 @@ gText_Third:: @ 85ECB87 .string "third$" -gUnknown_085ecb8d:: @ 85ECB8D +gUnknown_085ECB8D:: @ 85ECB8D .string "0 pts$" -gUnknown_085ecb93:: @ 85ECB93 +gUnknown_085ECB93:: @ 85ECB93 .string "10 pts$" -gUnknown_085ecb9a:: @ 85ECB9A +gUnknown_085ECB9A:: @ 85ECB9A .string "20 pts$" -gUnknown_085ecba1:: @ 85ECBA1 +gUnknown_085ECBA1:: @ 85ECBA1 .string "30 pts$" -gUnknown_085ecba8:: @ 85ECBA8 +gUnknown_085ECBA8:: @ 85ECBA8 .string "40 pts$" -gUnknown_085ecbaf:: @ 85ECBAF +gUnknown_085ECBAF:: @ 85ECBAF .string "50 pts$" -gUnknown_085ecbb6:: @ 85ECBB6 +gUnknown_085ECBB6:: @ 85ECBB6 .string "60 pts$" -gUnknown_085ecbbd:: @ 85ECBBD +gUnknown_085ECBBD:: @ 85ECBBD .string "70 pts$" -gUnknown_085ecbc4:: @ 85ECBC4 +gUnknown_085ECBC4:: @ 85ECBC4 .string "80 pts$" -gUnknown_085ecbcb:: @ 85ECBCB +gUnknown_085ECBCB:: @ 85ECBCB .string "90 pts$" -gUnknown_085ecbd2:: @ 85ECBD2 +gUnknown_085ECBD2:: @ 85ECBD2 .string "100 pts$" -gUnknown_085ecbda:: @ 85ECBDA +gUnknown_085ECBDA:: @ 85ECBDA .string "?$" -gUnknown_085ecbdc:: @ 85ECBDC +gUnknown_085ECBDC:: @ 85ECBDC .string "KISS POSTER{CLEAR_TO 0x5E}16BP$" -gUnknown_085ecbef:: @ 85ECBEF +gUnknown_085ECBEF:: @ 85ECBEF .string "KISS CUSHION{CLEAR_TO 0x5E}32BP$" -gUnknown_085ecc03:: @ 85ECC03 +gUnknown_085ECC03:: @ 85ECC03 .string "SMOOCHUM DOLL{CLEAR_TO 0x5E}32BP$" -gUnknown_085ecc18:: @ 85ECC18 +gUnknown_085ECC18:: @ 85ECC18 .string "TOGEPI DOLL{CLEAR_TO 0x5E}48BP$" -gUnknown_085ecc2b:: @ 85ECC2B +gUnknown_085ECC2B:: @ 85ECC2B .string "MEOWTH DOLL{CLEAR_TO 0x5E}48BP$" -gUnknown_085ecc3e:: @ 85ECC3E +gUnknown_085ECC3E:: @ 85ECC3E .string "CLEFAIRY DOLL{CLEAR_TO 0x5E}48BP$" -gUnknown_085ecc53:: @ 85ECC53 +gUnknown_085ECC53:: @ 85ECC53 .string "DITTO DOLL{CLEAR_TO 0x5E}48BP$" -gUnknown_085ecc65:: @ 85ECC65 +gUnknown_085ECC65:: @ 85ECC65 .string "CYNDAQUIL DOLL{CLEAR_TO 0x5E}80BP$" -gUnknown_085ecc7b:: @ 85ECC7B +gUnknown_085ECC7B:: @ 85ECC7B .string "CHIKORITA DOLL{CLEAR_TO 0x5E}80BP$" -gUnknown_085ecc91:: @ 85ECC91 +gUnknown_085ECC91:: @ 85ECC91 .string "TOTODILE DOLL{CLEAR_TO 0x5E}80BP$" -gUnknown_085ecca6:: @ 85ECCA6 +gUnknown_085ECCA6:: @ 85ECCA6 .string "LAPRAS DOLL{CLEAR_TO 0x58}128BP$" -gUnknown_085eccba:: @ 85ECCBA +gUnknown_085ECCBA:: @ 85ECCBA .string "SNORLAX DOLL{CLEAR_TO 0x58}128BP$" -gUnknown_085ecccf:: @ 85ECCCF +gUnknown_085ECCCF:: @ 85ECCCF .string "VENUSAUR DOLL{CLEAR_TO 0x58}256BP$" -gUnknown_085ecce5:: @ 85ECCE5 +gUnknown_085ECCE5:: @ 85ECCE5 .string "CHARIZARD DOLL{CLEAR_TO 0x58}256BP$" -gUnknown_085eccfc:: @ 85ECCFC +gUnknown_085ECCFC:: @ 85ECCFC .string "BLASTOISE DOLL{CLEAR_TO 0x58}256BP$" -gUnknown_085ecd13:: @ 85ECD13 +gUnknown_085ECD13:: @ 85ECD13 .string "PROTEIN{CLEAR_TO 0x64}1BP$" -gUnknown_085ecd21:: @ 85ECD21 +gUnknown_085ECD21:: @ 85ECD21 .string "CALCIUM{CLEAR_TO 0x64}1BP$" -gUnknown_085ecd2f:: @ 85ECD2F +gUnknown_085ECD2F:: @ 85ECD2F .string "IRON{CLEAR_TO 0x64}1BP$" -gUnknown_085ecd3a:: @ 85ECD3A +gUnknown_085ECD3A:: @ 85ECD3A .string "ZINC{CLEAR_TO 0x64}1BP$" -gUnknown_085ecd45:: @ 85ECD45 +gUnknown_085ECD45:: @ 85ECD45 .string "CARBOS{CLEAR_TO 0x64}1BP$" -gUnknown_085ecd52:: @ 85ECD52 +gUnknown_085ECD52:: @ 85ECD52 .string "HP UP{CLEAR_TO 0x64}1BP$" -gUnknown_085ecd5e:: @ 85ECD5E +gUnknown_085ECD5E:: @ 85ECD5E .string "LEFTOVERS{CLEAR_TO 0x5E}48BP$" -gUnknown_085ecd6f:: @ 85ECD6F +gUnknown_085ECD6F:: @ 85ECD6F .string "WHITE HERB{CLEAR_TO 0x5E}48BP$" -gUnknown_085ecd81:: @ 85ECD81 +gUnknown_085ECD81:: @ 85ECD81 .string "QUICK CLAW{CLEAR_TO 0x5E}48BP$" -gUnknown_085ecd93:: @ 85ECD93 +gUnknown_085ECD93:: @ 85ECD93 .string "MENTAL HERB{CLEAR_TO 0x5E}48BP$" -gUnknown_085ecda6:: @ 85ECDA6 +gUnknown_085ECDA6:: @ 85ECDA6 .string "BRIGHTPOWDER{CLEAR_TO 0x5E}64BP$" -gUnknown_085ecdba:: @ 85ECDBA +gUnknown_085ECDBA:: @ 85ECDBA .string "CHOICE BAND{CLEAR_TO 0x5E}64BP$" -gUnknown_085ecdcd:: @ 85ECDCD +gUnknown_085ECDCD:: @ 85ECDCD .string "KING’S ROCK{CLEAR_TO 0x5E}64BP$" -gUnknown_085ecde0:: @ 85ECDE0 +gUnknown_085ECDE0:: @ 85ECDE0 .string "FOCUS BAND{CLEAR_TO 0x5E}64BP$" -gUnknown_085ecdf2:: @ 85ECDF2 +gUnknown_085ECDF2:: @ 85ECDF2 .string "SCOPE LENS{CLEAR_TO 0x5E}64BP$" -gUnknown_085ece04:: @ 85ECE04 +gUnknown_085ECE04:: @ 85ECE04 .string "SOFTBOILED{CLEAR_TO 0x4E}16BP$" -gUnknown_085ece16:: @ 85ECE16 +gUnknown_085ECE16:: @ 85ECE16 .string "SEISMIC TOSS{CLEAR_TO 0x4E}24BP$" -gUnknown_085ece2a:: @ 85ECE2A +gUnknown_085ECE2A:: @ 85ECE2A .string "DREAM EATER{CLEAR_TO 0x4E}24BP$" -gUnknown_085ece3d:: @ 85ECE3D +gUnknown_085ECE3D:: @ 85ECE3D .string "MEGA PUNCH{CLEAR_TO 0x4E}24BP$" -gUnknown_085ece4f:: @ 85ECE4F +gUnknown_085ECE4F:: @ 85ECE4F .string "MEGA KICK{CLEAR_TO 0x4E}48BP$" -gUnknown_085ece60:: @ 85ECE60 +gUnknown_085ECE60:: @ 85ECE60 .string "BODY SLAM{CLEAR_TO 0x4E}48BP$" -gUnknown_085ece71:: @ 85ECE71 +gUnknown_085ECE71:: @ 85ECE71 .string "ROCK SLIDE{CLEAR_TO 0x4E}48BP$" -gUnknown_085ece83:: @ 85ECE83 +gUnknown_085ECE83:: @ 85ECE83 .string "COUNTER{CLEAR_TO 0x4E}48BP$" -gUnknown_085ece92:: @ 85ECE92 +gUnknown_085ECE92:: @ 85ECE92 .string "THUNDER WAVE{CLEAR_TO 0x4E}48BP$" -gUnknown_085ecea6:: @ 85ECEA6 +gUnknown_085ECEA6:: @ 85ECEA6 .string "SWORDS DANCE{CLEAR_TO 0x4E}48BP$" -gUnknown_085eceba:: @ 85ECEBA +gUnknown_085ECEBA:: @ 85ECEBA .string "DEFENSE CURL{CLEAR_TO 0x4E}16BP$" -gUnknown_085ecece:: @ 85ECECE +gUnknown_085ECECE:: @ 85ECECE .string "SNORE{CLEAR_TO 0x4E}24BP$" -gUnknown_085ecedb:: @ 85ECEDB +gUnknown_085ECEDB:: @ 85ECEDB .string "MUD-SLAP{CLEAR_TO 0x4E}24BP$" -gUnknown_085eceeb:: @ 85ECEEB +gUnknown_085ECEEB:: @ 85ECEEB .string "SWIFT{CLEAR_TO 0x4E}24BP$" -gUnknown_085ecef8:: @ 85ECEF8 +gUnknown_085ECEF8:: @ 85ECEF8 .string "ICY WIND{CLEAR_TO 0x4E}24BP$" -gUnknown_085ecf08:: @ 85ECF08 +gUnknown_085ECF08:: @ 85ECF08 .string "ENDURE{CLEAR_TO 0x4E}48BP$" -gUnknown_085ecf16:: @ 85ECF16 +gUnknown_085ECF16:: @ 85ECF16 .string "PSYCH UP{CLEAR_TO 0x4E}48BP$" -gUnknown_085ecf26:: @ 85ECF26 +gUnknown_085ECF26:: @ 85ECF26 .string "ICE PUNCH{CLEAR_TO 0x4E}48BP$" -gUnknown_085ecf37:: @ 85ECF37 +gUnknown_085ECF37:: @ 85ECF37 .string "THUNDERPUNCH{CLEAR_TO 0x4E}48BP$" -gUnknown_085ecf4b:: @ 85ECF4B +gUnknown_085ECF4B:: @ 85ECF4B .string "FIRE PUNCH{CLEAR_TO 0x4E}48BP$" gText_PkmnFainted3:: @ 85ECF5D @@ -3537,7 +3537,7 @@ gText_TrainerCardMoney:: @ 85ECF7E .string "MONEY$" -gUnknown_085ecf84:: @ 85ECF84 +gUnknown_085ECF84:: @ 85ECF84 .string "Â¥$" gText_TrainerCardPokedex:: @ 85ECF86 @@ -3550,14 +3550,14 @@ gText_Colon2:: @ 85ECF8F .string ":$" -gUnknown_085ecf91:: @ 85ECF91 +gUnknown_085ECF91:: @ 85ECF91 .string " points$" gText_TrainerCardTime:: @ 85ECF99 .string "TIME$" -gUnknown_085ecf9e:: @ 85ECF9E +gUnknown_085ECF9E:: @ 85ECF9E .string "ゲ-ムãƒã‚¤ãƒ³ãƒˆ$" @ "geemupointo" ("game point" in Japanese) gText_Var1sTrainerCard:: @ 85ECFA6 @@ -3567,10 +3567,10 @@ gText_HallOfFameDebut:: @ 85ECFB8 .string "HALL OF FAME DEBUT $" -gUnknown_085ecfcd:: @ 85ECFCD +gUnknown_085ECFCD:: @ 85ECFCD .string "LINK BATTLES$" -gUnknown_085ecfda:: @ 85ECFDA +gUnknown_085ECFDA:: @ 85ECFDA .string "LINK CABLE BATTLES$" gText_WinsLosses:: @ 85ECFED @@ -3610,50 +3610,50 @@ gText_WSlashStraightSlash:: @ 85ED0E0 .string "W/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY} STRAIGHT/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_2}$" -gUnknown_085ed104:: @ 85ED104 +gUnknown_085ED104:: @ 85ED104 .string "BATTLE TOWER$" -gUnknown_085ed111:: @ 85ED111 +gUnknown_085ED111:: @ 85ED111 .string "BATTLE DOME$" -gUnknown_085ed11d:: @ 85ED11D +gUnknown_085ED11D:: @ 85ED11D .string "BATTLE PALACE$" -gUnknown_085ed12b:: @ 85ED12B +gUnknown_085ED12B:: @ 85ED12B .string "BATTLE FACTORY$" -gUnknown_085ed13a:: @ 85ED13A +gUnknown_085ED13A:: @ 85ED13A .string "BATTLE ARENA$" -gUnknown_085ed147:: @ 85ED147 +gUnknown_085ED147:: @ 85ED147 .string "BATTLE PIKE$" -gUnknown_085ed153:: @ 85ED153 +gUnknown_085ED153:: @ 85ED153 .string "BATTLE PYRAMID$" .align 2 -gUnknown_085ed164:: @ 85ED164 +gUnknown_085ED164:: @ 85ED164 .string "{STR_VAR_1} SINGLE$" .align 2 -gUnknown_085ed170:: @ 85ED170 +gUnknown_085ED170:: @ 85ED170 .string "{STR_VAR_1} DOUBLE$" .align 2 -gUnknown_085ed17c:: @ 85ED17C +gUnknown_085ED17C:: @ 85ED17C .string "{STR_VAR_1} MULTI$" .align 2 -gUnknown_085ed188:: @ 85ED188 +gUnknown_085ED188:: @ 85ED188 .string "{STR_VAR_1} LINK$" .align 2 -gUnknown_085ed190:: @ 85ED190 +gUnknown_085ED190:: @ 85ED190 .string "{STR_VAR_1}$" gText_Give:: @ 85ED193 @@ -3696,14 +3696,14 @@ gText_ColorDarkGrey:: @ 85ED21E .string "{COLOR DARK_GREY}$" -gUnknown_085ed222:: @ 85ED222 +gUnknown_085ED222:: @ 85ED222 .string "{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR6 WHITE DYNAMIC_COLOR5}$" gText_HighlightDarkGrey:: @ 85ED228 .string "{HIGHLIGHT DARK_GREY}$" -gUnknown_085ed22c:: @ 85ED22C +gUnknown_085ED22C:: @ 85ED22C .string " $" gText_DynColor2Male:: @ 85ED22E @@ -3752,10 +3752,10 @@ gText_F700LeftChat:: @ 85ED2BD .string "{SPECIAL_F7 0x00} left the chat.$" -gUnknown_085ed2cf:: @ 85ED2CF +gUnknown_085ED2CF:: @ 85ED2CF .string "{SPECIAL_F7 0x00}ã®{SPECIAL_F7 0x01}ã²ãã‚:$" @ "{SPECIAL_F7 0x00}'s {SPECIAL_F7 0x01}hikime" -gUnknown_085ed2d9:: @ 85ED2D9 +gUnknown_085ED2D9:: @ 85ED2D9 .string "{SPECIAL_F7 0x00}ã®{SPECIAL_F7 0x01}ã²ãã‚㯠ã„ã¾ã›ã‚“$" @ "{SPECIAL_F7 0x00}'s {SPECIAL_F7 0x01}hikimeha imasen" gText_ExitingChat:: @ 85ED2E8 @@ -3810,46 +3810,46 @@ gText_ByeBye:: @ 85ED44A .string "BYE-BYE!$" -gUnknown_085ed453:: @ 85ED453 +gUnknown_085ED453:: @ 85ED453 .string "Attack the weak points!$" -gUnknown_085ed46b:: @ 85ED46B +gUnknown_085ED46B:: @ 85ED46B .string "Ultimate STEEL POKéMON.$" -gUnknown_085ed483:: @ 85ED483 +gUnknown_085ED483:: @ 85ED483 .string "I’d climb even waterfalls$" -gUnknown_085ed49d:: @ 85ED49D +gUnknown_085ED49D:: @ 85ED49D .string "to find a rare stone!$" -gUnknown_085ed4b3:: @ 85ED4B3 +gUnknown_085ED4B3:: @ 85ED4B3 .string "I’m the strongest and most$" -gUnknown_085ed4ce:: @ 85ED4CE +gUnknown_085ED4CE:: @ 85ED4CE .string "energetic after all!$" -gUnknown_085ed4e3:: @ 85ED4E3 +gUnknown_085ED4E3:: @ 85ED4E3 .string "Battle with knowledge!$" -gUnknown_085ed4fa:: @ 85ED4FA +gUnknown_085ED4FA:: @ 85ED4FA .string "I will use various POKéMON.$" -gUnknown_085ed516:: @ 85ED516 +gUnknown_085ED516:: @ 85ED516 .string "I’ll be a better POKéMON$" -gUnknown_085ed52f:: @ 85ED52F +gUnknown_085ED52F:: @ 85ED52F .string "prof than my father is!$" -gUnknown_085ed547:: @ 85ED547 +gUnknown_085ED547:: @ 85ED547 .string "I’m not so good at battles.$" -gUnknown_085ed563:: @ 85ED563 +gUnknown_085ED563:: @ 85ED563 .string "I’ll use any POKéMON!$" -gUnknown_085ed579:: @ 85ED579 +gUnknown_085ED579:: @ 85ED579 .string "My POKéMON and I help$" -gUnknown_085ed58f:: @ 85ED58F +gUnknown_085ED58F:: @ 85ED58F .string "my father’s research.$" gText_HatchedFromEgg:: @ 85ED5A5 @@ -3993,94 +3993,94 @@ gText_BattlePoints:: @ 85ED91C .string "Battle Points$" -gUnknown_085ed92a:: @ 85ED92A +gUnknown_085ED92A:: @ 85ED92A .string "CANCEL$" -gUnknown_085ed931:: @ 85ED931 +gUnknown_085ED931:: @ 85ED931 .string "$" -gUnknown_085ed932:: @ 85ED932 +gUnknown_085ED932:: @ 85ED932 .string "Check BATTLE FRONTIER MAP.$" -gUnknown_085ed94d:: @ 85ED94D +gUnknown_085ED94D:: @ 85ED94D .string "Check TRAINER CARD.$" -gUnknown_085ed961:: @ 85ED961 +gUnknown_085ED961:: @ 85ED961 .string "View recorded battle.$" -gUnknown_085ed977:: @ 85ED977 +gUnknown_085ED977:: @ 85ED977 .string "Put away the FRONTIER PASS.$" -gUnknown_085ed993:: @ 85ED993 +gUnknown_085ED993:: @ 85ED993 .string "Your current Battle Points.$" -gUnknown_085ed9af:: @ 85ED9AF +gUnknown_085ED9AF:: @ 85ED9AF .string "Your collected Symbols.$" -gUnknown_085ed9c7:: @ 85ED9C7 +gUnknown_085ED9C7:: @ 85ED9C7 .string "Battle Tower - Ability Symbol$" -gUnknown_085ed9e5:: @ 85ED9E5 +gUnknown_085ED9E5:: @ 85ED9E5 .string "Battle Dome - Tactics Symbol$" -gUnknown_085eda02:: @ 85EDA02 +gUnknown_085EDA02:: @ 85EDA02 .string "Battle Palace - Spirits Symbol$" -gUnknown_085eda21:: @ 85EDA21 +gUnknown_085EDA21:: @ 85EDA21 .string "Battle Arena - Guts Symbol$" -gUnknown_085eda3c:: @ 85EDA3C +gUnknown_085EDA3C:: @ 85EDA3C .string "Battle Factory - Knowledge Symbol$" -gUnknown_085eda5e:: @ 85EDA5E +gUnknown_085EDA5E:: @ 85EDA5E .string "Battle Pike - Luck Symbol$" -gUnknown_085eda78:: @ 85EDA78 +gUnknown_085EDA78:: @ 85EDA78 .string "Battle Pyramid - Brave Symbol$" -gUnknown_085eda96:: @ 85EDA96 +gUnknown_085EDA96:: @ 85EDA96 .string "There is no Battle Record.$" -gUnknown_085edab1:: @ 85EDAB1 +gUnknown_085EDAB1:: @ 85EDAB1 .string "BATTLE TOWER$" -gUnknown_085edabe:: @ 85EDABE +gUnknown_085EDABE:: @ 85EDABE .string "BATTLE DOME$" -gUnknown_085edaca:: @ 85EDACA +gUnknown_085EDACA:: @ 85EDACA .string "BATTLE PALACE$" -gUnknown_085edad8:: @ 85EDAD8 +gUnknown_085EDAD8:: @ 85EDAD8 .string "BATTLE ARENA$" -gUnknown_085edae5:: @ 85EDAE5 +gUnknown_085EDAE5:: @ 85EDAE5 .string "BATTLE FACTORY$" -gUnknown_085edaf4:: @ 85EDAF4 +gUnknown_085EDAF4:: @ 85EDAF4 .string "BATTLE PIKE$" -gUnknown_085edb00:: @ 85EDB00 +gUnknown_085EDB00:: @ 85EDB00 .string "BATTLE PYRAMID$" -gUnknown_085edb0f:: @ 85EDB0F +gUnknown_085EDB0F:: @ 85EDB0F .string "KO opponents and aim for the top!\nYour ability will be tested.$" -gUnknown_085edb4e:: @ 85EDB4E +gUnknown_085EDB4E:: @ 85EDB4E .string "Keep winning at the tournament!\nYour tactics will be tested.$" -gUnknown_085edb8b:: @ 85EDB8B +gUnknown_085EDB8B:: @ 85EDB8B .string "Watch your POKéMON battle!\nYour spirit will be tested.$" -gUnknown_085edbc2:: @ 85EDBC2 +gUnknown_085EDBC2:: @ 85EDBC2 .string "Win battles with teamed-up POKéMON!\nYour guts will be tested.$" -gUnknown_085edc00:: @ 85EDC00 +gUnknown_085EDC00:: @ 85EDC00 .string "Aim for victory using rental POKéMON!\nYour knowledge will be tested.$" -gUnknown_085edc45:: @ 85EDC45 +gUnknown_085EDC45:: @ 85EDC45 .string "Select one of three paths to battle!\nYour luck will be tested.$" -gUnknown_085edc84:: @ 85EDC84 +gUnknown_085EDC84:: @ 85EDC84 .string "Aim for the top with exploration!\nYour bravery will be tested.$" gText_ContinueMenuPlayer:: @ 85EDCC3 @@ -4213,7 +4213,7 @@ gText_Friend:: @ 85EDFB0 .string "Friend$" -gUnknown_085edfb7:: @ 85EDFB7 +gUnknown_085EDFB7:: @ 85EDFB7 .string "POKeMON$" gJPText_MysteryGift:: @ 85EDFBF @@ -4265,13 +4265,13 @@ gUnknown_085EE120:: @ 85EE120 gUnknown_085EE12D:: @ 85EE12D .byte 0x06, 0x07, 0x0a, 0x20, 0x00, 0x54, 0x77, 0xae, 0x00, 0x44, 0x0d, 0xfe, 0x94, 0xae, 0x60, 0x37, 0x00, 0x1e, 0x40, 0x2e, 0x00, 0x44, 0x07, 0x1f, 0x0e, 0x2e, 0x44, 0x0c, 0x10, 0xff -gUnknown_085ee14b:: @ 85EE14B +gUnknown_085EE14B:: @ 85EE14B .string "RED$" -gUnknown_085ee14f:: @ 85EE14F +gUnknown_085EE14F:: @ 85EE14F .string "BLUE$" -gUnknown_085ee154:: @ 85EE154 +gUnknown_085EE154:: @ 85EE154 .string "---$" gText_SingleBattleRoomResults:: @ 85EE158 @@ -4360,37 +4360,37 @@ gText_FloorsCleared:: @ 85EE39C .align 2 -gUnknown_085ee3b0:: @ 85EE3B0 +gUnknown_085EE3B0:: @ 85EE3B0 .string "LV. 50$" .align 2 -gUnknown_085ee3b8:: @ 85EE3B8 +gUnknown_085EE3B8:: @ 85EE3B8 .string "OPEN LEVEL$" .align 2 -gUnknown_085ee3c4:: @ 85EE3C4 +gUnknown_085EE3C4:: @ 85EE3C4 .string "Win streak: {STR_VAR_2}$" .align 2 -gUnknown_085ee3d4:: @ 85EE3D4 +gUnknown_085EE3D4:: @ 85EE3D4 .string "Clear streak: {STR_VAR_2}$" .align 2 -gUnknown_085ee3e8:: @ 85EE3E8 +gUnknown_085EE3E8:: @ 85EE3E8 .string "Rooms cleared: {STR_VAR_2}$" .align 2 -gUnknown_085ee3fc:: @ 85EE3FC +gUnknown_085EE3FC:: @ 85EE3FC .string "KOs in a row: {STR_VAR_2}$" .align 2 -gUnknown_085ee410:: @ 85EE410 +gUnknown_085EE410:: @ 85EE410 .string "Floors cleared: {STR_VAR_2}$" .align 2 @@ -4398,10 +4398,10 @@ gText_1Dot:: @ 85EE424 .string "1.$" -gUnknown_085ee427:: @ 85EE427 +gUnknown_085EE427:: @ 85EE427 .string "2.$" -gUnknown_085ee42a:: @ 85EE42A +gUnknown_085EE42A:: @ 85EE42A .string "3.$" gText_SavingDontTurnOff2:: @ 85EE42D @@ -4441,25 +4441,25 @@ gText_Option:: @ 85EE589 .string "OPTION$" -gUnknown_085ee590:: @ 85EE590 +gUnknown_085EE590:: @ 85EE590 .string "TEXT SPEED$" -gUnknown_085ee59b:: @ 85EE59B +gUnknown_085EE59B:: @ 85EE59B .string "BATTLE SCENE$" -gUnknown_085ee5a8:: @ 85EE5A8 +gUnknown_085EE5A8:: @ 85EE5A8 .string "BATTLE STYLE$" -gUnknown_085ee5b5:: @ 85EE5B5 +gUnknown_085EE5B5:: @ 85EE5B5 .string "SOUND$" -gUnknown_085ee5bb:: @ 85EE5BB +gUnknown_085EE5BB:: @ 85EE5BB .string "FRAME$" -gUnknown_085ee5c1:: @ 85EE5C1 +gUnknown_085EE5C1:: @ 85EE5C1 .string "CANCEL$" -gUnknown_085ee5c8:: @ 85EE5C8 +gUnknown_085EE5C8:: @ 85EE5C8 .string "BUTTON MODE$" gText_TextSpeedSlow:: @ 85EE5D4 @@ -4508,16 +4508,16 @@ gText_XPLink:: @ 85EE667 .string "{STR_VAR_1}P LINK$" -gUnknown_085ee670:: @ 85EE670 +gUnknown_085EE670:: @ 85EE670 .string "BRONZE$" -gUnknown_085ee677:: @ 85EE677 +gUnknown_085EE677:: @ 85EE677 .string "COPPER$" -gUnknown_085ee67e:: @ 85EE67E +gUnknown_085EE67E:: @ 85EE67E .string "SILVER$" -gUnknown_085ee685:: @ 85EE685 +gUnknown_085EE685:: @ 85EE685 .string "GOLD$" gText_Day:: @ 85EE68A @@ -4530,49 +4530,49 @@ gText_Confirm2:: @ 85EE690 .string "CONFIRM$" -gUnknown_085ee698:: @ 85EE698 +gUnknown_085EE698:: @ 85EE698 .string "Days$" -gUnknown_085ee69d:: @ 85EE69D +gUnknown_085EE69D:: @ 85EE69D .string "Time:$" -gUnknown_085ee6a3:: @ 85EE6A3 +gUnknown_085EE6A3:: @ 85EE6A3 .string "Game time$" -gUnknown_085ee6ad:: @ 85EE6AD +gUnknown_085EE6AD:: @ 85EE6AD .string "RTC time$" -gUnknown_085ee6b6:: @ 85EE6B6 +gUnknown_085EE6B6:: @ 85EE6B6 .string "Updated time$" -gUnknown_085ee6c3:: @ 85EE6C3 +gUnknown_085EE6C3:: @ 85EE6C3 .string "POKéDEX$" -gUnknown_085ee6cb:: @ 85EE6CB +gUnknown_085EE6CB:: @ 85EE6CB .string "POKéMON$" -gUnknown_085ee6d3:: @ 85EE6D3 +gUnknown_085EE6D3:: @ 85EE6D3 .string "BAG$" -gUnknown_085ee6d7:: @ 85EE6D7 +gUnknown_085EE6D7:: @ 85EE6D7 .string "POKéNAV$" -gUnknown_085ee6df:: @ 85EE6DF +gUnknown_085EE6DF:: @ 85EE6DF .string "{PLAYER}$" -gUnknown_085ee6e2:: @ 85EE6E2 +gUnknown_085EE6E2:: @ 85EE6E2 .string "SAVE$" -gUnknown_085ee6e7:: @ 85EE6E7 +gUnknown_085EE6E7:: @ 85EE6E7 .string "OPTION$" -gUnknown_085ee6ee:: @ 85EE6EE +gUnknown_085EE6EE:: @ 85EE6EE .string "EXIT$" -gUnknown_085ee6f3:: @ 85EE6F3 +gUnknown_085EE6F3:: @ 85EE6F3 .string "RETIRE$" -gUnknown_085ee6fa:: @ 85EE6FA +gUnknown_085EE6FA:: @ 85EE6FA .string "REST$" gText_SafariBallStock:: @ 85EE6FF @@ -4582,28 +4582,28 @@ gText_BattlePyramidFloor:: @ 85EE716 .string "Battle Pyramid\n{STR_VAR_1}$" -gUnknown_085ee728:: @ 85EE728 +gUnknown_085EE728:: @ 85EE728 .string "Floor 1$" -gUnknown_085ee730:: @ 85EE730 +gUnknown_085EE730:: @ 85EE730 .string "Floor 2$" -gUnknown_085ee738:: @ 85EE738 +gUnknown_085EE738:: @ 85EE738 .string "Floor 3$" -gUnknown_085ee740:: @ 85EE740 +gUnknown_085EE740:: @ 85EE740 .string "Floor 4$" -gUnknown_085ee748:: @ 85EE748 +gUnknown_085EE748:: @ 85EE748 .string "Floor 5$" -gUnknown_085ee750:: @ 85EE750 +gUnknown_085EE750:: @ 85EE750 .string "Floor 6$" -gUnknown_085ee758:: @ 85EE758 +gUnknown_085EE758:: @ 85EE758 .string "Floor 7$" -gUnknown_085ee760:: @ 85EE760 +gUnknown_085EE760:: @ 85EE760 .string "Peak$" gText_LinkStandby2:: @ 85EE765 @@ -4625,10 +4625,10 @@ gText_LoadErrorEndingSession:: @ 85EE827 .string "Loading error.\nEnding session.$" -gUnknown_085ee846:: @ 85EE846 +gUnknown_085EE846:: @ 85EE846 .string "プレイヤー$" @ "pureiyaa" ("player" in Japanese) -gUnknown_085ee84c:: @ 85EE84C +gUnknown_085EE84C:: @ 85EE84C .string "ã•ã¾$" @ "sama" (a very high honorific) gText_DexHoenn:: @ 85EE84F @@ -4641,10 +4641,10 @@ gText_PokedexDiploma:: @ 85EE85E .string "PLAYER: {CLEAR 0x10}{COLOR RED}{SHADOW LIGHT_RED}{PLAYER}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}\n\nThis document certifies\nthat you have successfully\ncompleted your\n{STR_VAR_1} POKéDEX.\n\n{CLEAR_TO 0x42}{COLOR RED}{SHADOW LIGHT_RED}GAME FREAK$" -gUnknown_085ee8dc:: @ 85EE8DC +gUnknown_085EE8DC:: @ 85EE8DC .string "{COLOR RED}{SHADOW LIGHT_RED}ゲ-ムフリ-ク$" @ geemufuriku ("Game Freak" in Japanese) -gUnknown_085ee8ea:: @ 85EE8EA +gUnknown_085EE8EA:: @ 85EE8EA .string "{COLOR RED}{SHADOW LIGHT_RED}$" gText_Hoenn:: @ 85EE8F1 @@ -4681,22 +4681,22 @@ gText_ThreeQuestionMarks:: @ 85EEA42 .string "???$" -gUnknown_085eea46:: @ 85EEA46 +gUnknown_085EEA46:: @ 85EEA46 .string "MAX. HP$" -gUnknown_085eea4e:: @ 85EEA4E +gUnknown_085EEA4E:: @ 85EEA4E .string "ATTACK$" -gUnknown_085eea55:: @ 85EEA55 +gUnknown_085EEA55:: @ 85EEA55 .string "DEFENSE$" -gUnknown_085eea5d:: @ 85EEA5D +gUnknown_085EEA5D:: @ 85EEA5D .string "SPEED$" -gUnknown_085eea63:: @ 85EEA63 +gUnknown_085EEA63:: @ 85EEA63 .string "SP. ATK$" -gUnknown_085eea6b:: @ 85EEA6B +gUnknown_085EEA6B:: @ 85EEA6B .string "SP. DEF$" gText_UnkCtrlF904:: @ 85EEA73 @@ -4715,16 +4715,16 @@ gText_RecordMixingComplete:: @ 85EEA8E .string "Record mixing completed.\nThank you for waiting.$" -gUnknown_085eeabe:: @ 85EEABE +gUnknown_085EEABE:: @ 85EEABE .string "YOUR NAME?$" -gUnknown_085eeac9:: @ 85EEAC9 +gUnknown_085EEAC9:: @ 85EEAC9 .string "BOX NAME?$" -gUnknown_085eead3:: @ 85EEAD3 +gUnknown_085EEAD3:: @ 85EEAD3 .string "{STR_VAR_1}’s nickname?$" -gUnknown_085eeae2:: @ 85EEAE2 +gUnknown_085EEAE2:: @ 85EEAE2 .string "Tell him the words.$" gText_MoveOkBack:: @ 85EEAF6 @@ -4854,17 +4854,17 @@ gText_Cancel3:: @ 85EECDD .string "CANCEL$" -gUnknown_085eece4:: @ 85EECE4 +gUnknown_085EECE4:: @ 85EECE4 .string "SWAP$" -gUnknown_085eece9:: @ 85EECE9 +gUnknown_085EECE9:: @ 85EECE9 .string "ACCEPT$" gText_AcceptThisPkmn:: @ 85EECF0 .string "Accept this POKéMON?$" -gUnknown_085eed05:: @ 85EED05 +gUnknown_085EED05:: @ 85EED05 .string " $" gText_SamePkmnInPartyAlready:: @ 85EED0A @@ -4984,7 +4984,7 @@ gText_WhereShouldNewsBeAccessed:: @ 85EEF94 .align 2 -gUnknown_085eefc0:: @ 85EEFC0 +gUnknown_085EEFC0:: @ 85EEFC0 .string "Communication standby…\nB Button: Cancel$" .align 2 @@ -5187,16 +5187,16 @@ gText_ReelTimeHelp:: @ 85EF750 .string "REEL TIME\nHere’s your chance to take\naim and nail marks!\nReel Time continues for the\nawarded number of spins.\nIt all ends on a Big Bonus.$" -gUnknown_085ef7da:: @ 85EF7DA +gUnknown_085EF7DA:: @ 85EF7DA .string "The two seem to get along\nvery well.$" -gUnknown_085ef7ff:: @ 85EF7FF +gUnknown_085EF7FF:: @ 85EF7FF .string "The two seem to get along.$" -gUnknown_085ef81a:: @ 85EF81A +gUnknown_085EF81A:: @ 85EF81A .string "The two don’t seem to like\neach other much.$" -gUnknown_085ef846:: @ 85EF846 +gUnknown_085EF846:: @ 85EF846 .string "The two prefer to play with other\nPOKéMON than each other.$" gText_NewLine2:: @ 85EF881 @@ -5218,16 +5218,16 @@ gText_XMinYDotZSec:: @ 85EF8A3 .string "{STR_VAR_1} min. {STR_VAR_2}.{STR_VAR_3} sec.$" -gUnknown_085ef8b6:: @ 85EF8B6 +gUnknown_085EF8B6:: @ 85EF8B6 .string "1F$" -gUnknown_085ef8b9:: @ 85EF8B9 +gUnknown_085EF8B9:: @ 85EF8B9 .string "2F$" -gUnknown_085ef8bc:: @ 85EF8BC +gUnknown_085EF8BC:: @ 85EF8BC .string "3F$" -gUnknown_085ef8bf:: @ 85EF8BF +gUnknown_085EF8BF:: @ 85EF8BF .string "4F$" gText_TeachWhichMoveToPkmn:: @ 85EF8C2 @@ -5252,7 +5252,7 @@ gText_PkmnForgotMoveAndLearnedNew:: @ 85EF9A6 .string "{STR_VAR_1} forgot {STR_VAR_3}.\pAnd…\p{STR_VAR_1} learned {STR_VAR_2}.$" -gUnknown_085ef9c8:: @ 85EF9C8 +gUnknown_085EF9C8:: @ 85EF9C8 .string "{STR_VAR_1} did not learn the\nmove {STR_VAR_2}.$" gText_GiveUpTeachingNewMove:: @ 85EF9E6 @@ -5268,7 +5268,7 @@ gText_ContestMoves2:: @ 85EFA3E .string "CONTEST MOVES$" -gUnknown_085efa4c:: @ 85EFA4C +gUnknown_085EFA4C:: @ 85EFA4C .string "TYPE/$" gText_PPSlash:: @ 85EFA52 @@ -5287,22 +5287,22 @@ gText_Jam2:: @ 85EFA6E .string "JAM$" -gUnknown_085efa72:: @ 85EFA72 +gUnknown_085EFA72:: @ 85EFA72 .string "KIRA$" -gUnknown_085efa77:: @ 85EFA77 +gUnknown_085EFA77:: @ 85EFA77 .string "AMY$" -gUnknown_085efa7b:: @ 85EFA7B +gUnknown_085EFA7B:: @ 85EFA7B .string "JOHN$" -gUnknown_085efa80:: @ 85EFA80 +gUnknown_085EFA80:: @ 85EFA80 .string "ROY$" -gUnknown_085efa84:: @ 85EFA84 +gUnknown_085EFA84:: @ 85EFA84 .string "GABBY$" -gUnknown_085efa8a:: @ 85EFA8A +gUnknown_085EFA8A:: @ 85EFA8A .string "ANNA$" gText_ClearAllSaveData:: @ 85EFA8F @@ -5321,70 +5321,70 @@ gText_Cancel4:: @ 85EFAE8 .string "CANCEL$" -gUnknown_085efaef:: @ 85EFAEF +gUnknown_085EFAEF:: @ 85EFAEF .string "DEVON PRES$" -gUnknown_085efafa:: @ 85EFAFA +gUnknown_085EFAFA:: @ 85EFAFA .string "MR. STONE$" -gUnknown_085efb04:: @ 85EFB04 +gUnknown_085EFB04:: @ 85EFB04 .string "HARD AS ROCK$" -gUnknown_085efb11:: @ 85EFB11 +gUnknown_085EFB11:: @ 85EFB11 .string "STEVEN$" -gUnknown_085efb18:: @ 85EFB18 +gUnknown_085EFB18:: @ 85EFB18 .string "RAD NEIGHBOR$" -gUnknown_085efb25:: @ 85EFB25 +gUnknown_085EFB25:: @ 85EFB25 .string "RELIABLE ONE$" -gUnknown_085efb32:: @ 85EFB32 +gUnknown_085EFB32:: @ 85EFB32 .string "CALM & KIND$" -gUnknown_085efb3e:: @ 85EFB3E +gUnknown_085EFB3E:: @ 85EFB3E .string "{PKMN} LOVER$" -gUnknown_085efb47:: @ 85EFB47 +gUnknown_085EFB47:: @ 85EFB47 .string "DAD$" -gUnknown_085efb4b:: @ 85EFB4B +gUnknown_085EFB4B:: @ 85EFB4B .string "MOM$" -gUnknown_085efb4f:: @ 85EFB4F +gUnknown_085EFB4F:: @ 85EFB4F .string "ELUSIVE EYES$" -gUnknown_085efb5c:: @ 85EFB5C +gUnknown_085EFB5C:: @ 85EFB5C .string "SCOTT$" -gUnknown_085efb62:: @ 85EFB62 +gUnknown_085EFB62:: @ 85EFB62 .string "ROCKIN’ WHIZ$" -gUnknown_085efb6f:: @ 85EFB6F +gUnknown_085EFB6F:: @ 85EFB6F .string "THE BIG HIT$" -gUnknown_085efb7b:: @ 85EFB7B +gUnknown_085EFB7B:: @ 85EFB7B .string "SWELL SHOCK$" -gUnknown_085efb87:: @ 85EFB87 +gUnknown_085EFB87:: @ 85EFB87 .string "PASSION BURN$" -gUnknown_085efb94:: @ 85EFB94 +gUnknown_085EFB94:: @ 85EFB94 .string "SKY TAMER$" -gUnknown_085efb9e:: @ 85EFB9E +gUnknown_085EFB9E:: @ 85EFB9E .string "MYSTIC DUO$" -gUnknown_085efba9:: @ 85EFBA9 +gUnknown_085EFBA9:: @ 85EFBA9 .string "DANDY CHARM$" -gUnknown_085efbb5:: @ 85EFBB5 +gUnknown_085EFBB5:: @ 85EFBB5 .string "ELITE FOUR$" -gUnknown_085efbc0:: @ 85EFBC0 +gUnknown_085EFBC0:: @ 85EFBC0 .string "CHAMPION$" -gUnknown_085efbc9:: @ 85EFBC9 +gUnknown_085EFBC9:: @ 85EFBC9 .string "{PKMN} PROF.$" gText_CommStandbyAwaitingOtherPlayer:: @ 85EFBD2 @@ -5397,64 +5397,64 @@ gText_RefusedBattle:: @ 85EFC27 .string "Refused the battle.{PAUSE 60}$" -gUnknown_085efc3e:: @ 85EFC3E +gUnknown_085EFC3E:: @ 85EFC3E .string "NO WEATHER$" -gUnknown_085efc49:: @ 85EFC49 +gUnknown_085EFC49:: @ 85EFC49 .string "SUNNY$" -gUnknown_085efc4f:: @ 85EFC4F +gUnknown_085EFC4F:: @ 85EFC4F .string "SUNNY2$" -gUnknown_085efc56:: @ 85EFC56 +gUnknown_085EFC56:: @ 85EFC56 .string "RAIN$" -gUnknown_085efc5b:: @ 85EFC5B +gUnknown_085EFC5B:: @ 85EFC5B .string "SNOW$" -gUnknown_085efc60:: @ 85EFC60 +gUnknown_085EFC60:: @ 85EFC60 .string "LIGHTNING$" -gUnknown_085efc6a:: @ 85EFC6A +gUnknown_085EFC6A:: @ 85EFC6A .string "FOG$" -gUnknown_085efc6e:: @ 85EFC6E +gUnknown_085EFC6E:: @ 85EFC6E .string "VOLCANO ASH$" -gUnknown_085efc7a:: @ 85EFC7A +gUnknown_085EFC7A:: @ 85EFC7A .string "SANDSTORM$" -gUnknown_085efc84:: @ 85EFC84 +gUnknown_085EFC84:: @ 85EFC84 .string "FOG2$" -gUnknown_085efc89:: @ 85EFC89 +gUnknown_085EFC89:: @ 85EFC89 .string "SEAFLOOR$" -gUnknown_085efc92:: @ 85EFC92 +gUnknown_085EFC92:: @ 85EFC92 .string "CLOUDY$" -gUnknown_085efc99:: @ 85EFC99 +gUnknown_085EFC99:: @ 85EFC99 .string "SUNNY3$" -gUnknown_085efca0:: @ 85EFCA0 +gUnknown_085EFCA0:: @ 85EFCA0 .string "HEAVY RAIN$" -gUnknown_085efcab:: @ 85EFCAB +gUnknown_085EFCAB:: @ 85EFCAB .string "SEAFLOOR2$" -gUnknown_085efcb5:: @ 85EFCB5 +gUnknown_085EFCB5:: @ 85EFCB5 .string "DEL. ALL$" -gUnknown_085efcbe:: @ 85EFCBE +gUnknown_085EFCBE:: @ 85EFCBE .string "CANCEL$" -gUnknown_085efcc5:: @ 85EFCC5 +gUnknown_085EFCC5:: @ 85EFCC5 .string "OK$" -gUnknown_085efcc8:: @ 85EFCC8 +gUnknown_085EFCC8:: @ 85EFCC8 .string "QUIZ$" -gUnknown_085efccd:: @ 85EFCCD +gUnknown_085EFCCD:: @ 85EFCCD .string "ANSWER$" gText_PokeBalls:: @ 85EFCD4 From d769ec137447c52062b48153851bd2824055b6df Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Tue, 26 Sep 2017 22:39:59 +0200 Subject: [PATCH 297/342] battle 4 up to a8 --- asm/battle_1.s | 20 +- asm/battle_2.s | 124 +- asm/battle_4.s | 7498 +----------------------- asm/battle_5.s | 8 +- asm/battle_7.s | 18 +- asm/battle_9.s | 34 +- asm/battle_anim.s | 34 +- asm/battle_anim_80D51AC.s | 2 +- asm/battle_anim_80FE840.s | 202 +- asm/battle_anim_815A0D4.s | 66 +- asm/battle_anim_8170478.s | 26 +- asm/battle_controller_opponent.s | 14 +- asm/battle_controller_player.s | 18 +- asm/battle_controller_player_partner.s | 8 +- asm/battle_controller_safari.s | 6 +- asm/battle_controller_wally.s | 6 +- asm/battle_frontier_1.s | 164 +- asm/battle_frontier_2.s | 8 +- asm/battle_message.s | 24 +- asm/contest.s | 56 +- asm/contest_link_80F57C4.s | 18 +- asm/evolution_scene.s | 114 +- asm/menu.s | 4 +- asm/party_menu.s | 12 +- asm/pokeball.s | 14 +- asm/pokemon_icon.s | 16 +- asm/pokemon_item_effect.s | 2 +- asm/pokemon_storage_system.s | 2 +- asm/reshow_battle_screen.s | 12 +- asm/rom3.s | 30 +- asm/rom_80A5C6C.s | 24 +- asm/title_screen.s | 6 +- asm/unknown_task.s | 8 +- data/battle_4.s | 51 +- data/battle_scripts_1.s | 38 +- include/battle.h | 108 +- include/battle_controllers.h | 29 +- include/battle_message.h | 29 +- include/moves.h | 4 +- include/pokemon.h | 7 +- include/pokemon_icon.h | 7 + include/pokemon_item_effects.h | 8 + include/text.h | 38 +- include/window.h | 2 +- src/battle_3.c | 52 +- src/battle_4.c | 2739 ++++++++- src/battle_ai.c | 2 +- src/calculate_base_damage.c | 1 - src/pokemon_2.c | 10 +- src/pokemon_3.c | 6 +- src/window.c | 2 +- sym_ewram.txt | 8 +- 52 files changed, 3497 insertions(+), 8242 deletions(-) create mode 100644 include/pokemon_icon.h create mode 100644 include/pokemon_item_effects.h diff --git a/asm/battle_1.s b/asm/battle_1.s index 3507f6a71..e74d12046 100644 --- a/asm/battle_1.s +++ b/asm/battle_1.s @@ -2236,7 +2236,7 @@ _08035F64: ldrsh r0, [r5, r1] cmp r0, 0 beq _08035FCC - ldr r4, =gUnknown_02022E18 + ldr r4, =gBattle_BG1_X ldrh r0, [r5, 0xA] bl Sin2 lsls r0, 16 @@ -2251,7 +2251,7 @@ _08035F7E: adds r0, r2, 0 subs r0, r1 strh r0, [r4] - ldr r4, =gUnknown_02022E1C + ldr r4, =gBattle_BG2_X ldrh r0, [r5, 0xC] bl Sin2 lsls r0, 16 @@ -2266,16 +2266,16 @@ _08035F9C: adds r0, r3, 0 subs r0, r1 strh r0, [r4] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y ldr r2, =0x0000ffdc adds r1, r2, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] b _08036038 .pool _08035FCC: - ldr r4, =gUnknown_02022E18 + ldr r4, =gBattle_BG1_X ldrh r0, [r5, 0xA] bl Sin2 lsls r0, 16 @@ -2290,7 +2290,7 @@ _08035FDE: adds r0, r3, 0 subs r0, r1 strh r0, [r4] - ldr r4, =gUnknown_02022E1A + ldr r4, =gBattle_BG1_Y ldrh r0, [r5, 0xA] bl Cos2 lsls r0, 16 @@ -2302,7 +2302,7 @@ _08035FFC: asrs r0, 5 subs r0, 0xA4 strh r0, [r4] - ldr r4, =gUnknown_02022E1C + ldr r4, =gBattle_BG2_X ldrh r0, [r5, 0xC] bl Sin2 lsls r0, 16 @@ -2317,7 +2317,7 @@ _08036014: adds r0, r2, 0 subs r0, r1 strh r0, [r4] - ldr r4, =gUnknown_02022E1E + ldr r4, =gBattle_BG2_Y ldrh r0, [r5, 0xC] bl Cos2 lsls r0, 16 @@ -2504,11 +2504,11 @@ sub_8036154: @ 8036154 movs r0, 0x4A movs r1, 0x36 bl SetGpuReg - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y ldr r2, =0x0000ff5c adds r1, r2, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] ldr r0, =gUnknown_0831AA00 bl LoadCompressedObjectPicUsingHeap diff --git a/asm/battle_2.s b/asm/battle_2.s index 14e332d7c..d1119619c 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -157,13 +157,13 @@ _080368BE: strh r1, [r0] ldr r0, =gUnknown_02022E16 strh r1, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] ldr r0, =gUnknown_02022E20 strh r1, [r0] @@ -3925,19 +3925,19 @@ _08038A3A: ldrh r1, [r0] movs r0, 0x12 bl SetGpuReg - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r1, [r0] movs r0, 0x14 bl SetGpuReg - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y ldrh r1, [r0] movs r0, 0x16 bl SetGpuReg - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X ldrh r1, [r0] movs r0, 0x18 bl SetGpuReg - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y ldrh r1, [r0] movs r0, 0x1A bl SetGpuReg @@ -4371,13 +4371,13 @@ _08038E1A: strh r4, [r0] ldr r0, =gUnknown_02022E16 strh r4, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r4, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r4, [r0] - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r4, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r4, [r0] ldr r0, =gUnknown_02022E20 strh r4, [r0] @@ -4842,13 +4842,13 @@ sub_80392A8: @ 80392A8 strh r4, [r0] ldr r0, =gUnknown_02022E16 strh r4, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r4, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r4, [r0] - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r4, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r4, [r0] ldr r0, =gUnknown_02022E20 strh r4, [r0] @@ -5215,7 +5215,7 @@ _08039678: bl PlaySE ldr r0, =gText_BattleRecordedOnPass _08039686: - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0 bl sub_814F9EC @@ -7806,7 +7806,7 @@ _0803ABD4: movs r0, 0 movs r1, 0 movs r2, 0 - bl EmitGetAttributes + bl EmitGetMonData ldrb r0, [r4] bl MarkBufferBankForExecution ldrb r0, [r5] @@ -7849,7 +7849,7 @@ bc_load_battlefield: @ 803AC34 cmp r5, 0 bne _0803AC64 movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r4, =gActiveBank strb r0, [r4] ldr r0, =gUnknown_02022FF0 @@ -8274,7 +8274,7 @@ _0803AFFA: cmp r7, 0x5 ble _0803AFAA movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r4, =gActiveBank strb r0, [r4] movs r0, 0 @@ -8326,7 +8326,7 @@ _0803B072: cmp r7, 0x5 ble _0803B026 movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r4, =gActiveBank strb r0, [r4] movs r0, 0 @@ -8404,7 +8404,7 @@ bc_battle_begin_message: @ 803B120 cmp r0, 0 bne _0803B142 movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gActiveBank strb r0, [r1] ldrb r1, [r1] @@ -8468,7 +8468,7 @@ sub_803B180: @ 803B180 _0803B1B8: movs r0, 0x1 _0803B1BA: - bl GetBankByPlayerAI + bl GetBankByIdentity adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -8738,7 +8738,7 @@ _0803B3F6: cmp r0, 0 bne _0803B412 adds r0, r3, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -9241,7 +9241,7 @@ _0803B7EA: ldr r1, =gBattleMainFunc ldr r0, =sub_803BE74 str r0, [r1] - bl sub_803F988 + bl ResetSentPokesToOpponentValue ldr r1, =gBattleCommunication movs r2, 0 adds r0, r1, 0x7 @@ -9588,8 +9588,8 @@ _0803BB78: .pool thumb_func_end BattleTurnPassed - thumb_func_start sub_803BB88 -sub_803BB88: @ 803BB88 + thumb_func_start IsRunningFromBattleImpossible +IsRunningFromBattleImpossible: @ 803BB88 push {r4-r7,lr} sub sp, 0x4 ldr r1, =gBattleMons @@ -9830,7 +9830,7 @@ _0803BD92: pop {r1} bx r1 .pool - thumb_func_end sub_803BB88 + thumb_func_end IsRunningFromBattleImpossible thumb_func_start sub_803BDA0 sub_803BDA0: @ 803BDA0 @@ -10013,7 +10013,7 @@ _0803BF0C: beq _0803BF68 eors r5, r1 adds r0, r5, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, [r4] adds r1, 0x91 ldrb r1, [r1] @@ -10027,7 +10027,7 @@ _0803BF0C: bne _0803BF68 ldr r4, =gBattleCommunication adds r0, r5, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 adds r0, r4 @@ -10612,7 +10612,7 @@ _0803C4B4: eors r0, r6 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 adds r0, r4 @@ -10625,7 +10625,7 @@ _0803C4B4: eors r0, r6 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBattleMons lsls r0, 24 lsrs r0, 24 @@ -10645,7 +10645,7 @@ _0803C4B4: eors r0, r6 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 muls r0, r7 @@ -10670,7 +10670,7 @@ _0803C550: eors r0, r6 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 adds r0, r4 @@ -10682,7 +10682,7 @@ _0803C550: eors r0, r6 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 movs r1, 0x2 @@ -10695,7 +10695,7 @@ _0803C590: eors r0, r6 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 adds r0, r4 @@ -10712,7 +10712,7 @@ _0803C5B6: eors r0, r6 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 adds r0, r4 @@ -10725,7 +10725,7 @@ _0803C5B6: eors r0, r6 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 20 adds r0, r4 @@ -10739,7 +10739,7 @@ _0803C5B6: eors r0, r6 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 lsls r1, r0, 3 @@ -10771,7 +10771,7 @@ _0803C628: eors r0, r5 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 adds r0, r4 @@ -10788,7 +10788,7 @@ _0803C628: _0803C668: lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 movs r1, 0x1 @@ -10803,7 +10803,7 @@ _0803C690: eors r0, r1 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 movs r1, 0x3 @@ -10873,7 +10873,7 @@ _0803C720: b _0803CC20 .pool _0803C760: - bl sub_803BB88 + bl IsRunningFromBattleImpossible lsls r0, 24 cmp r0, 0 beq _0803C7C4 @@ -11271,7 +11271,7 @@ _0803CAFA: bne _0803CB3C adds r0, r5, 0 eors r0, r1 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBattleStruct ldr r1, [r1] adds r1, 0x91 @@ -12870,7 +12870,7 @@ sub_803D8C0: @ 803D8C0 ldrb r0, [r4] strb r0, [r1] movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBankAttacker strb r0, [r1] ldr r1, =gBattlescriptCurrInstr @@ -13075,7 +13075,7 @@ _0803DB44: ldrb r0, [r4] strb r0, [r1] movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBankAttacker strb r0, [r1] ldr r1, =gBattlescriptCurrInstr @@ -14124,7 +14124,7 @@ _0803E548: _0803E558: movs r0, 0x2 _0803E55A: - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBankTarget strb r0, [r1] b _0803E578 @@ -14173,7 +14173,7 @@ _0803E5C4: eors r0, r1 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity strb r0, [r5] ldrb r1, [r7] ldrb r2, [r5] @@ -14257,7 +14257,7 @@ _0803E684: _0803E694: movs r0, 0x2 _0803E696: - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBankTarget strb r0, [r1] ldr r0, =gAbsentBankFlags @@ -14323,7 +14323,7 @@ _0803E730: eors r0, r1 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity strb r0, [r5] ldrb r1, [r6] ldrb r2, [r5] @@ -14341,7 +14341,7 @@ _0803E758: eors r0, r1 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity strb r0, [r5] _0803E76A: ldr r0, =gBattleTypeFlags @@ -14823,8 +14823,8 @@ _0803EBF6: .pool thumb_func_end sub_803E90C - thumb_func_start sub_803EC20 -sub_803EC20: @ 803EC20 + thumb_func_start CanRunFromBattle +CanRunFromBattle: @ 803EC20 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -15069,7 +15069,7 @@ _0803EE24: pop {r1} bx r1 .pool - thumb_func_end sub_803EC20 + thumb_func_end CanRunFromBattle thumb_func_start sub_803EE48 sub_803EE48: @ 803EE48 @@ -15157,7 +15157,7 @@ _0803EF0C: cmp r0, 0 bne _0803EF4C ldrb r0, [r4] - bl sub_803EC20 + bl CanRunFromBattle lsls r0, 24 cmp r0, 0 bne _0803EF98 @@ -15690,7 +15690,7 @@ _0803F46C: _0803F470: movs r0, 0x3 _0803F472: - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 _0803F47A: @@ -15786,7 +15786,7 @@ _0803F4DE: movs r0, 0 movs r2, 0 movs r3, 0x1 - bl EmitSetAttributes + bl EmitSetMonData ldrb r0, [r4] bl MarkBufferBankForExecution _0803F532: @@ -15933,7 +15933,7 @@ _0803F5F0: movs r0, 0 movs r2, 0 movs r3, 0x1 - bl EmitSetAttributes + bl EmitSetMonData ldrb r0, [r4] bl MarkBufferBankForExecution _0803F658: @@ -16065,7 +16065,7 @@ _0803F6FE: movs r0, 0 movs r2, 0 movs r3, 0x1 - bl EmitSetAttributes + bl EmitSetMonData ldrb r0, [r4] bl MarkBufferBankForExecution _0803F762: @@ -16319,8 +16319,8 @@ PrepareStringBattle: @ 803F964 .pool thumb_func_end PrepareStringBattle - thumb_func_start sub_803F988 -sub_803F988: @ 803F988 + thumb_func_start ResetSentPokesToOpponentValue +ResetSentPokesToOpponentValue: @ 803F988 push {r4-r6,lr} movs r3, 0 ldr r0, =gSentPokesToOpponent @@ -16368,7 +16368,7 @@ _0803F9D6: pop {r0} bx r0 .pool - thumb_func_end sub_803F988 + thumb_func_end ResetSentPokesToOpponentValue thumb_func_start sub_803F9EC sub_803F9EC: @ 803F9EC diff --git a/asm/battle_4.s b/asm/battle_4.s index 3a6558a86..0714a0c22 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -5,7476 +5,6 @@ .text - thumb_func_start atk6A_removeitem -atk6A_removeitem: @ 804EE58 - push {r4-r6,lr} - sub sp, 0x4 - ldr r6, =gBattlescriptCurrInstr - ldr r0, [r6] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r5, =gActiveBank - strb r0, [r5] - ldr r1, =gBattleStruct - ldrb r4, [r5] - lsls r0, r4, 1 - adds r0, 0xB8 - ldr r1, [r1] - adds r1, r0 - ldr r2, =gBattleMons - movs r3, 0x58 - adds r0, r4, 0 - muls r0, r3 - adds r0, r2 - ldrh r0, [r0, 0x2E] - strh r0, [r1] - ldrb r0, [r5] - muls r0, r3 - adds r0, r2 - movs r1, 0 - strh r1, [r0, 0x2E] - ldrb r0, [r5] - muls r0, r3 - adds r2, 0x2E - adds r0, r2 - str r0, [sp] - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - movs r3, 0x2 - bl EmitSetAttributes - ldrb r0, [r5] - bl MarkBufferBankForExecution - ldr r0, [r6] - adds r0, 0x2 - str r0, [r6] - add sp, 0x4 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atk6A_removeitem - - thumb_func_start atk6B_atknameinbuff1 -atk6B_atknameinbuff1: @ 804EEC8 - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x7 - strb r0, [r1, 0x1] - ldr r2, =gBankAttacker - ldrb r0, [r2] - strb r0, [r1, 0x2] - ldr r3, =gBattlePartyID - ldrb r0, [r2] - lsls r0, 1 - adds r0, r3 - ldrh r0, [r0] - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end atk6B_atknameinbuff1 - - thumb_func_start atk6C_lvlbox_display -atk6C_lvlbox_display: @ 804EF04 - push {r4,lr} - sub sp, 0x4 - ldr r0, =gBattleScripting - ldrb r1, [r0, 0x1E] - adds r4, r0, 0 - cmp r1, 0 - bne _0804EF28 - bl sub_804F498 - cmp r0, 0 - beq _0804EF24 - movs r0, 0x3 - b _0804EF26 - .pool -_0804EF24: - movs r0, 0x1 -_0804EF26: - strb r0, [r4, 0x1E] -_0804EF28: - ldrb r0, [r4, 0x1E] - subs r0, 0x1 - cmp r0, 0x9 - bls _0804EF32 - b _0804F0F2 -_0804EF32: - lsls r0, 2 - ldr r1, =_0804EF40 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0804EF40: - .4byte _0804EF68 - .4byte _0804EF94 - .4byte _0804EFAC - .4byte _0804F000 - .4byte _0804F014 - .4byte _0804F02C - .4byte _0804F014 - .4byte _0804F04C - .4byte _0804F07C - .4byte _0804F0C0 -_0804EF68: - ldr r1, =gUnknown_02022E1E - movs r0, 0x60 - strh r0, [r1] - movs r0, 0x2 - movs r1, 0x7 - movs r2, 0 - bl SetBgAttribute - movs r0, 0x2 - bl ShowBg - bl sub_804F17C - ldr r1, =gBattleScripting - movs r0, 0x2 - strb r0, [r1, 0x1E] - b _0804F0F2 - .pool -_0804EF94: - bl sub_804F1CC - lsls r0, 24 - cmp r0, 0 - beq _0804EFA0 - b _0804F0F2 -_0804EFA0: - ldr r1, =gBattleScripting - movs r0, 0x3 - strb r0, [r1, 0x1E] - b _0804F0F2 - .pool -_0804EFAC: - ldr r1, =gUnknown_02022E18 - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_02022E1A - movs r2, 0x80 - lsls r2, 1 - adds r0, r2, 0 - strh r0, [r1] - movs r0, 0 - movs r1, 0x7 - movs r2, 0x1 - bl SetBgAttribute - movs r0, 0x1 - movs r1, 0x7 - movs r2, 0 - bl SetBgAttribute - movs r0, 0 - bl ShowBg - movs r0, 0x1 - bl ShowBg - movs r0, 0x80 - str r0, [sp] - movs r0, 0x12 - movs r1, 0x7 - movs r2, 0x1D - movs r3, 0x13 - bl sub_8056A3C - ldr r1, =gBattleScripting - movs r0, 0x4 - strb r0, [r1, 0x1E] - b _0804F0F2 - .pool -_0804F000: - bl sub_804F100 - movs r0, 0xD - bl PutWindowTilemap - movs r0, 0xD - movs r1, 0x3 - bl CopyWindowToVram - b _0804F06A -_0804F014: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _0804F0F2 - ldr r0, =gUnknown_02022E1A - strh r1, [r0] - b _0804F06A - .pool -_0804F02C: - ldr r0, =gMain - ldrh r0, [r0, 0x2E] - cmp r0, 0 - beq _0804F0F2 - movs r0, 0x5 - bl PlaySE - bl sub_804F144 - movs r0, 0xD - movs r1, 0x2 - bl CopyWindowToVram - b _0804F06A - .pool -_0804F04C: - ldr r0, =gMain - ldrh r0, [r0, 0x2E] - cmp r0, 0 - beq _0804F0F2 - movs r0, 0x5 - bl PlaySE - movs r0, 0x81 - str r0, [sp] - movs r0, 0x12 - movs r1, 0x7 - movs r2, 0x1D - movs r3, 0x13 - bl sub_8056A3C -_0804F06A: - ldr r1, =gBattleScripting - ldrb r0, [r1, 0x1E] - adds r0, 0x1 - strb r0, [r1, 0x1E] - b _0804F0F2 - .pool -_0804F07C: - bl sub_804F344 - lsls r0, 24 - cmp r0, 0 - bne _0804F0F2 - movs r0, 0xE - bl ClearWindowTilemap - movs r0, 0xE - movs r1, 0x1 - bl CopyWindowToVram - movs r0, 0xD - bl ClearWindowTilemap - movs r0, 0xD - movs r1, 0x1 - bl CopyWindowToVram - movs r0, 0x2 - movs r1, 0x7 - movs r2, 0x2 - bl SetBgAttribute - movs r0, 0x2 - bl ShowBg - ldr r1, =gBattleScripting - movs r0, 0xA - strb r0, [r1, 0x1E] - b _0804F0F2 - .pool -_0804F0C0: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0804F0F2 - movs r0, 0 - movs r1, 0x7 - movs r2, 0 - bl SetBgAttribute - movs r0, 0x1 - movs r1, 0x7 - movs r2, 0x1 - bl SetBgAttribute - movs r0, 0 - bl ShowBg - movs r0, 0x1 - bl ShowBg - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] -_0804F0F2: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk6C_lvlbox_display - - thumb_func_start sub_804F100 -sub_804F100: @ 804F100 - push {lr} - sub sp, 0x14 - ldr r0, =gBattleStruct - ldr r0, [r0] - ldrb r1, [r0, 0x10] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - add r1, sp, 0x8 - bl sub_81D388C - ldr r0, =gBattleResources - ldr r0, [r0] - ldr r1, [r0, 0x10] - movs r0, 0xD - str r0, [sp] - movs r0, 0xF - str r0, [sp, 0x4] - movs r0, 0xD - add r2, sp, 0x8 - movs r3, 0xE - bl sub_81D3640 - add sp, 0x14 - pop {r0} - bx r0 - .pool - thumb_func_end sub_804F100 - - thumb_func_start sub_804F144 -sub_804F144: @ 804F144 - push {lr} - sub sp, 0x10 - ldr r0, =gBattleStruct - ldr r0, [r0] - ldrb r1, [r0, 0x10] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gPlayerParty - adds r0, r1 - add r1, sp, 0x4 - bl sub_81D388C - movs r0, 0xF - str r0, [sp] - movs r0, 0xD - add r1, sp, 0x4 - movs r2, 0xE - movs r3, 0xD - bl sub_81D3784 - add sp, 0x10 - pop {r0} - bx r0 - .pool - thumb_func_end sub_804F144 - - thumb_func_start sub_804F17C -sub_804F17C: @ 804F17C - push {lr} - ldr r1, =gUnknown_02022E1E - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_02022E1C - movs r2, 0xD0 - lsls r2, 1 - adds r0, r2, 0 - strh r0, [r1] - ldr r0, =gUnknown_0831C2C8 - movs r1, 0x60 - movs r2, 0x20 - bl LoadPalette - ldr r1, =gUnknown_0831C2E8 - movs r0, 0xE - movs r2, 0 - movs r3, 0 - bl CopyToWindowPixelBuffer - movs r0, 0xE - bl PutWindowTilemap - movs r0, 0xE - movs r1, 0x3 - bl CopyWindowToVram - bl sub_804F384 - pop {r0} - bx r0 - .pool - thumb_func_end sub_804F17C - - thumb_func_start sub_804F1CC -sub_804F1CC: @ 804F1CC - push {r4,r5,lr} - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - beq _0804F1DC - movs r0, 0x1 - b _0804F216 -_0804F1DC: - ldr r4, =gUnknown_02022E1C - ldrh r1, [r4] - movs r5, 0x80 - lsls r5, 2 - cmp r1, r5 - bne _0804F1F0 - movs r0, 0 - b _0804F216 - .pool -_0804F1F0: - movs r0, 0xD0 - lsls r0, 1 - cmp r1, r0 - bne _0804F1FC - bl sub_804F220 -_0804F1FC: - ldrh r0, [r4] - adds r0, 0x8 - strh r0, [r4] - lsls r0, 16 - ldr r1, =0x01ff0000 - cmp r0, r1 - bls _0804F20C - strh r5, [r4] -_0804F20C: - ldrh r1, [r4] - eors r1, r5 - negs r0, r1 - orrs r0, r1 - lsrs r0, 31 -_0804F216: - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_804F1CC - - thumb_func_start sub_804F220 -sub_804F220: @ 804F220 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x10 - ldr r6, =gBattleStruct - ldr r0, [r6] - ldrb r0, [r0, 0x10] - movs r5, 0x64 - muls r0, r5 - ldr r4, =gPlayerParty - adds r0, r4 - movs r1, 0x38 - bl GetMonData - mov r8, r0 - lsls r0, 16 - lsrs r0, 16 - mov r8, r0 - ldr r0, [r6] - ldrb r0, [r0, 0x10] - muls r0, r5 - adds r0, r4 - bl GetMonGender - lsls r0, 24 - lsrs r7, r0, 24 - ldr r0, [r6] - ldrb r0, [r0, 0x10] - muls r0, r5 - adds r0, r4 - ldr r5, =gStringVar4 - adds r1, r5, 0 - bl GetMonNickname - str r5, [sp] - mov r2, sp - movs r1, 0 - movs r0, 0xE - strb r0, [r2, 0x4] - mov r0, sp - strb r1, [r0, 0x5] - movs r4, 0x20 - strb r4, [r0, 0x6] - strb r1, [r0, 0x7] - strb r4, [r0, 0x8] - strb r1, [r0, 0x9] - strb r1, [r0, 0xA] - strb r1, [r0, 0xB] - mov r3, sp - ldrb r2, [r3, 0xC] - subs r1, 0x10 - adds r0, r1, 0 - ands r0, r2 - strb r0, [r3, 0xC] - mov r2, sp - movs r0, 0x10 - strb r0, [r2, 0xC] - ldrb r0, [r2, 0xD] - ands r1, r0 - strb r1, [r2, 0xD] - mov r0, sp - strb r4, [r0, 0xD] - movs r1, 0xFF - movs r2, 0 - bl AddTextPrinter - movs r0, 0xF9 - strb r0, [r5] - adds r5, 0x1 - movs r0, 0x5 - strb r0, [r5] - adds r5, 0x1 - adds r4, r5, 0 - adds r0, r4, 0 - mov r1, r8 - movs r2, 0 - movs r3, 0x3 - bl ConvertIntToDecimalStringN - adds r5, r0, 0 - subs r4, r5, r4 - movs r2, 0x4 - subs r2, r4 - lsls r2, 16 - lsrs r2, 16 - movs r1, 0x77 - bl StringFill - adds r5, r0, 0 - cmp r7, 0xFF - beq _0804F320 - cmp r7, 0 - bne _0804F300 - movs r1, 0 - movs r2, 0xC - bl WriteColorChangeControlCode - adds r5, r0, 0 - movs r1, 0x1 - movs r2, 0xD - bl WriteColorChangeControlCode - adds r5, r0, 0 - movs r0, 0xB5 - b _0804F318 - .pool -_0804F300: - adds r0, r5, 0 - movs r1, 0 - movs r2, 0xE - bl WriteColorChangeControlCode - adds r5, r0, 0 - movs r1, 0x1 - movs r2, 0xF - bl WriteColorChangeControlCode - adds r5, r0, 0 - movs r0, 0xB6 -_0804F318: - strb r0, [r5] - adds r5, 0x1 - movs r0, 0xFF - strb r0, [r5] -_0804F320: - mov r0, sp - movs r1, 0xA - strb r1, [r0, 0x7] - strb r1, [r0, 0x9] - movs r1, 0xFF - movs r2, 0 - bl AddTextPrinter - movs r0, 0xE - movs r1, 0x2 - bl CopyWindowToVram - add sp, 0x10 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_804F220 - - thumb_func_start sub_804F344 -sub_804F344: @ 804F344 - push {lr} - ldr r0, =gUnknown_02022E1C - ldrh r1, [r0] - movs r3, 0xD0 - lsls r3, 1 - adds r2, r0, 0 - cmp r1, r3 - bne _0804F35C - movs r0, 0 - b _0804F380 - .pool -_0804F35C: - ldrh r0, [r2] - adds r1, r0, 0 - subs r1, 0x10 - ldr r0, =0x0000019f - cmp r1, r0 - bgt _0804F370 - strh r3, [r2] - b _0804F372 - .pool -_0804F370: - strh r1, [r2] -_0804F372: - ldrh r1, [r2] - movs r0, 0xD0 - lsls r0, 1 - eors r1, r0 - negs r0, r1 - orrs r0, r1 - lsrs r0, 31 -_0804F380: - pop {r1} - bx r1 - thumb_func_end sub_804F344 - - thumb_func_start sub_804F384 -sub_804F384: @ 804F384 - push {r4-r6,lr} - mov r6, r8 - push {r6} - sub sp, 0x10 - ldr r0, =gBattleStruct - mov r8, r0 - ldr r0, [r0] - ldrb r0, [r0, 0x10] - movs r6, 0x64 - muls r0, r6 - ldr r5, =gPlayerParty - adds r0, r5 - movs r1, 0xB - bl GetMonData - adds r4, r0, 0 - lsls r4, 16 - lsrs r4, 16 - mov r1, r8 - ldr r0, [r1] - ldrb r0, [r0, 0x10] - muls r0, r6 - adds r0, r5 - movs r1, 0 - bl GetMonData - adds r1, r0, 0 - adds r0, r4, 0 - movs r2, 0x1 - bl sub_80D2EDC - str r0, [sp] - ldr r5, =0xffff0000 - ldr r0, [sp, 0x4] - ands r0, r5 - movs r1, 0x80 - lsls r1, 2 - orrs r0, r1 - ldr r1, =0x0000ffff - ands r0, r1 - ldr r1, =0xd75a0000 - orrs r0, r1 - str r0, [sp, 0x4] - adds r0, r4, 0 - bl sub_80D30B0 - str r0, [sp, 0x8] - add r4, sp, 0x8 - ldr r0, [r4, 0x4] - ands r0, r5 - ldr r1, =0x0000d75a - orrs r0, r1 - str r0, [r4, 0x4] - mov r0, sp - bl LoadSpriteSheet - adds r0, r4, 0 - bl LoadSpritePalette - ldr r0, =gUnknown_0831C3C0 - movs r1, 0x80 - lsls r1, 1 - movs r2, 0xA - movs r3, 0 - bl CreateSprite - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gSprites - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r2 - movs r0, 0 - strh r0, [r1, 0x2E] - ldr r0, =gUnknown_02022E1C - ldrh r0, [r0] - strh r0, [r1, 0x30] - add sp, 0x10 - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_804F384 - - thumb_func_start sub_804F450 -sub_804F450: @ 804F450 - push {r4,lr} - adds r2, r0, 0 - ldr r0, =gUnknown_02022E1C - ldrh r1, [r2, 0x30] - ldrh r0, [r0] - subs r1, r0 - strh r1, [r2, 0x24] - lsls r1, 16 - cmp r1, 0 - beq _0804F470 - movs r0, 0x1 - strh r0, [r2, 0x2E] - b _0804F48C - .pool -_0804F470: - movs r1, 0x2E - ldrsh r0, [r2, r1] - cmp r0, 0 - beq _0804F48C - adds r0, r2, 0 - bl DestroySprite - ldr r4, =0x0000d75a - adds r0, r4, 0 - bl FreeSpriteTilesByTag - adds r0, r4, 0 - bl FreeSpritePaletteByTag -_0804F48C: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_804F450 - - thumb_func_start sub_804F498 -sub_804F498: @ 804F498 - push {lr} - ldr r3, =gBattlePartyID - ldr r0, =gBattleStruct - ldr r0, [r0] - ldrh r1, [r3] - ldrb r2, [r0, 0x10] - cmp r1, r2 - beq _0804F4BA - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0804F4CC - ldrh r0, [r3, 0x4] - cmp r0, r2 - bne _0804F4CC -_0804F4BA: - movs r0, 0x1 - b _0804F4CE - .pool -_0804F4CC: - movs r0, 0 -_0804F4CE: - pop {r1} - bx r1 - thumb_func_end sub_804F498 - - thumb_func_start atk6D_set_sentpokes_values -atk6D_set_sentpokes_values: @ 804F4D4 - push {lr} - bl sub_803F988 - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atk6D_set_sentpokes_values - - thumb_func_start atk6E_set_atk_to_player0 -atk6E_set_atk_to_player0: @ 804F4EC - push {lr} - movs r0, 0 - bl GetBankByPlayerAI - ldr r1, =gBankAttacker - strb r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atk6E_set_atk_to_player0 - - thumb_func_start atk6F_set_visible -atk6F_set_visible: @ 804F50C - push {r4,r5,lr} - ldr r5, =gBattlescriptCurrInstr - ldr r0, [r5] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r4, =gActiveBank - strb r0, [r4] - movs r0, 0 - movs r1, 0 - bl EmitSpriteInvisibility - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r0, [r5] - adds r0, 0x2 - str r0, [r5] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk6F_set_visible - - thumb_func_start atk70_record_ability -atk70_record_ability: @ 804F540 - push {r4,lr} - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r1, =gActiveBank - strb r0, [r1] - ldrb r0, [r1] - ldr r1, =gLastUsedAbility - ldrb r1, [r1] - bl RecordAbilityBattle - ldr r0, [r4] - adds r0, 0x1 - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk70_record_ability - - thumb_func_start sub_804F574 -sub_804F574: @ 804F574 - ldr r2, =gBattleTextBuff2 - movs r0, 0xFD - strb r0, [r2] - movs r0, 0x2 - strb r0, [r2, 0x1] - ldr r0, =gMoveToLearn - ldrh r1, [r0] - strb r1, [r2, 0x2] - movs r0, 0xFF - lsls r0, 8 - ands r0, r1 - lsrs r0, 8 - strb r0, [r2, 0x3] - movs r0, 0xFF - strb r0, [r2, 0x4] - bx lr - .pool - thumb_func_end sub_804F574 - - thumb_func_start atk71_buffer_move_to_learn -atk71_buffer_move_to_learn: @ 804F59C - push {lr} - bl sub_804F574 - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atk71_buffer_move_to_learn - - thumb_func_start atk72_jump_if_can_run_frombattle -atk72_jump_if_can_run_frombattle: @ 804F5B4 - push {lr} - ldr r0, =gBank1 - ldrb r0, [r0] - bl sub_803EC20 - lsls r0, 24 - cmp r0, 0 - beq _0804F5E8 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _0804F5F0 - .pool -_0804F5E8: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_0804F5F0: - pop {r0} - bx r0 - .pool - thumb_func_end atk72_jump_if_can_run_frombattle - - thumb_func_start atk73_hp_thresholds -atk73_hp_thresholds: @ 804F5F8 - push {r4-r6,lr} - ldr r0, =gBattleTypeFlags - ldr r4, [r0] - movs r6, 0x1 - ands r4, r6 - cmp r4, 0 - bne _0804F68E - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r1, =gActiveBank - strb r0, [r1] - movs r1, 0x1 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gBattleMons - movs r1, 0x58 - muls r1, r0 - adds r1, r2 - ldrh r5, [r1, 0x28] - movs r0, 0x64 - muls r0, r5 - ldrh r1, [r1, 0x2C] - bl __divsi3 - cmp r0, 0 - bne _0804F636 - movs r0, 0x1 -_0804F636: - cmp r0, 0x45 - bgt _0804F63E - cmp r5, 0 - bne _0804F65C -_0804F63E: - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0xB1 - strb r4, [r0] - b _0804F68E - .pool -_0804F65C: - cmp r0, 0x27 - ble _0804F670 - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0xB1 - strb r6, [r0] - b _0804F68E - .pool -_0804F670: - cmp r0, 0x9 - ble _0804F684 - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0xB1 - movs r1, 0x2 - b _0804F68C - .pool -_0804F684: - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0xB1 - movs r1, 0x3 -_0804F68C: - strb r1, [r0] -_0804F68E: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atk73_hp_thresholds - - thumb_func_start atk74_hp_thresholds2 -atk74_hp_thresholds2: @ 804F6A4 - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r0, =gBattleTypeFlags - ldr r7, [r0] - movs r0, 0x1 - mov r8, r0 - ands r7, r0 - cmp r7, 0 - bne _0804F73E - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - bl GetBattleBank - adds r4, r0, 0 - ldr r0, =gActiveBank - strb r4, [r0] - movs r0, 0x1 - eors r4, r0 - lsls r4, 24 - lsrs r4, 24 - adds r0, r4, 0 - bl GetBankSide - lsls r0, 24 - ldr r1, =gBattleStruct - ldr r6, [r1] - lsrs r0, 23 - adds r0, r6 - adds r0, 0xA8 - ldrb r5, [r0] - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r4 - adds r0, r1 - ldrh r4, [r0, 0x28] - subs r1, r5, r4 - movs r0, 0x64 - muls r0, r1 - adds r1, r5, 0 - bl __divsi3 - adds r1, r0, 0 - cmp r4, r5 - bcc _0804F71C - adds r0, r6, 0 - adds r0, 0xB1 - strb r7, [r0] - b _0804F73E - .pool -_0804F71C: - cmp r0, 0x1D - bgt _0804F72A - adds r0, r6, 0 - adds r0, 0xB1 - mov r1, r8 - strb r1, [r0] - b _0804F73E -_0804F72A: - cmp r1, 0x45 - bgt _0804F736 - adds r1, r6, 0 - adds r1, 0xB1 - movs r0, 0x2 - b _0804F73C -_0804F736: - adds r1, r6, 0 - adds r1, 0xB1 - movs r0, 0x3 -_0804F73C: - strb r0, [r1] -_0804F73E: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk74_hp_thresholds2 - - thumb_func_start atk75_8026A58 -atk75_8026A58: @ 804F754 - push {lr} - sub sp, 0x4 - ldr r2, =gBankInMenu - ldr r1, =gBankAttacker - ldrb r0, [r1] - strb r0, [r2] - ldr r2, =gBattlePartyID - ldrb r0, [r1] - lsls r0, 1 - adds r0, r2 - ldrh r2, [r0] - movs r0, 0x64 - muls r0, r2 - ldr r1, =gEnemyParty - adds r0, r1 - ldr r1, =gLastUsedItem - ldrh r1, [r1] - lsls r2, 24 - lsrs r2, 24 - movs r3, 0x1 - str r3, [sp] - movs r3, 0 - bl ExecuteTableBasedItemEffect - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - add sp, 0x4 - pop {r0} - bx r0 - .pool - thumb_func_end atk75_8026A58 - - thumb_func_start atk76_various -atk76_various: @ 804F7AC - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r1, =gActiveBank - strb r0, [r1] - ldr r0, [r4] - ldrb r0, [r0, 0x2] - cmp r0, 0x1A - bls _0804F7CA - b _0804FD70 -_0804F7CA: - lsls r0, 2 - ldr r1, =_0804F7E0 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0804F7E0: - .4byte _0804F84C - .4byte _0804F85C - .4byte _0804F8BC - .4byte _0804F8CC - .4byte _0804F8E4 - .4byte _0804F920 - .4byte _0804F958 - .4byte _0804F9E0 - .4byte _0804FA20 - .4byte _0804FACC - .4byte _0804FAE8 - .4byte _0804FB3C - .4byte _0804FB94 - .4byte _0804FC18 - .4byte _0804FC2C - .4byte _0804FC32 - .4byte _0804FC38 - .4byte _0804FC60 - .4byte _0804FC6A - .4byte _0804FC78 - .4byte _0804FC8C - .4byte _0804FCC4 - .4byte _0804FCD8 - .4byte _0804FCF0 - .4byte _0804FD1C - .4byte _0804FD30 - .4byte _0804FD5C -_0804F84C: - ldr r0, =gActiveBank - ldrb r0, [r0] - bl CancelMultiTurnMoves - b _0804FD70 - .pool -_0804F85C: - ldr r1, =gBankAttacker - ldr r4, =gBankTarget - ldrb r0, [r4] - strb r0, [r1] - ldrb r0, [r1] - bl GetBankSide - movs r1, 0x1 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gSideTimers - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - adds r2, r1, r2 - ldrb r0, [r2, 0x8] - cmp r0, 0 - beq _0804F8A8 - ldr r1, =gBattleMons - ldrb r2, [r2, 0x9] - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _0804F8A8 - strb r2, [r4] - b _0804FD70 - .pool -_0804F8A8: - ldr r0, =gBankTarget - ldr r1, =gActiveBank - ldrb r1, [r1] - strb r1, [r0] - b _0804FD70 - .pool -_0804F8BC: - bl sub_803BB88 - ldr r1, =gBattleCommunication - strb r0, [r1] - b _0804FD70 - .pool -_0804F8CC: - ldr r0, =gCurrentMove - ldrh r0, [r0] - movs r1, 0 - bl GetMoveTarget - ldr r1, =gBankTarget - strb r0, [r1] - b _0804FD70 - .pool -_0804F8E4: - ldr r2, =gHitMarker - ldr r1, =gBitTable - ldr r0, =gActiveBank - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - lsls r0, 28 - ldr r2, [r2] - ands r2, r0 - cmp r2, 0 - beq _0804F914 - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1] - b _0804FD70 - .pool -_0804F914: - ldr r0, =gBattleCommunication - strb r2, [r0] - b _0804FD70 - .pool -_0804F920: - ldr r4, =gSpecialStatuses - ldr r3, =gActiveBank - ldrb r0, [r3] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 2 - adds r1, r4 - ldrb r2, [r1] - movs r0, 0x9 - negs r0, r0 - ands r0, r2 - strb r0, [r1] - ldrb r0, [r3] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 2 - adds r1, r4 - ldrb r2, [r1] - movs r0, 0x11 - negs r0, r0 - ands r0, r2 - strb r0, [r1] - b _0804FD70 - .pool -_0804F958: - ldr r4, =gBattlePartyID - ldr r1, =gBattleStruct - ldr r0, [r1] - ldrh r3, [r4] - ldrb r2, [r0, 0x10] - adds r6, r1, 0 - cmp r3, r2 - beq _0804F974 - ldrh r0, [r4, 0x4] - cmp r0, r2 - beq _0804F970 - b _0804FD70 -_0804F970: - cmp r3, r0 - bne _0804F988 -_0804F974: - ldr r1, =gActiveBank - movs r0, 0 - b _0804F98C - .pool -_0804F988: - ldr r1, =gActiveBank - movs r0, 0x2 -_0804F98C: - strb r0, [r1] - adds r5, r1, 0 - ldrb r2, [r5] - lsls r0, r2, 1 - adds r0, 0xC8 - ldr r1, [r6] - adds r4, r1, r0 - movs r3, 0 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r2 - adds r1, 0xC - adds r0, r1 - ldrh r0, [r0] - ldrh r2, [r4] - cmp r0, r2 - beq _0804F9CC - adds r6, r5, 0 - movs r5, 0x58 - adds r2, r1, 0 -_0804F9B4: - adds r3, 0x1 - cmp r3, 0x3 - bgt _0804F9CC - lsls r1, r3, 1 - ldrb r0, [r6] - muls r0, r5 - adds r1, r0 - adds r1, r2 - ldrh r0, [r1] - ldrh r1, [r4] - cmp r0, r1 - bne _0804F9B4 -_0804F9CC: - cmp r3, 0x4 - beq _0804F9D2 - b _0804FD70 -_0804F9D2: - movs r0, 0 - strh r0, [r4] - b _0804FD70 - .pool -_0804F9E0: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0xB - ands r0, r1 - cmp r0, 0x8 - beq _0804F9EE - b _0804FD70 -_0804F9EE: - ldr r1, =gBattleMons - ldrh r0, [r1, 0x28] - cmp r0, 0 - bne _0804F9F8 - b _0804FD70 -_0804F9F8: - adds r0, r1, 0 - adds r0, 0x80 - ldrh r0, [r0] - cmp r0, 0 - bne _0804FA04 - b _0804FD70 -_0804FA04: - ldr r0, =gHitMarker - ldr r1, [r0] - ldr r2, =0xffbfffff - ands r1, r2 - str r1, [r0] - b _0804FD70 - .pool -_0804FA20: - ldr r2, =gBattleCommunication - mov r8, r2 - movs r0, 0 - strb r0, [r2] - ldr r1, =gBattleScripting - ldr r6, =gActiveBank - ldrb r0, [r2, 0x1] - strb r0, [r6] - strb r0, [r1, 0x17] - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r7, r0, 0 - adds r7, 0x92 - ldrb r3, [r7] - ldr r1, =gBitTable - ldrb r2, [r6] - lsls r0, r2, 2 - adds r0, r1 - ldr r5, [r0] - adds r0, r3, 0 - ands r0, r5 - cmp r0, 0 - beq _0804FA50 - b _0804FD70 -_0804FA50: - ldr r4, =gBattleMons - movs r0, 0x58 - mov r12, r0 - mov r1, r12 - muls r1, r2 - adds r2, r1, 0 - adds r1, r2, r4 - ldrh r0, [r1, 0x2C] - lsrs r0, 1 - ldrh r1, [r1, 0x28] - cmp r0, r1 - bcs _0804FA6A - b _0804FD70 -_0804FA6A: - cmp r1, 0 - bne _0804FA70 - b _0804FD70 -_0804FA70: - adds r0, r4, 0 - adds r0, 0x4C - adds r0, r2, r0 - ldr r0, [r0] - movs r1, 0x7 - ands r0, r1 - cmp r0, 0 - beq _0804FA82 - b _0804FD70 -_0804FA82: - orrs r3, r5 - strb r3, [r7] - movs r0, 0x1 - mov r2, r8 - strb r0, [r2] - ldrb r0, [r6] - mov r1, r12 - muls r1, r0 - adds r0, r1, 0 - adds r1, r4, 0 - adds r1, 0x48 - adds r0, r1 - ldr r0, [r0] - bl GetNatureFromPersonality - ldr r1, =gUnknown_0831C4F8 - lsls r0, 24 - lsrs r0, 24 - adds r0, r1 - ldrb r0, [r0] - mov r2, r8 - strb r0, [r2, 0x5] - b _0804FD70 - .pool -_0804FACC: - ldr r4, =gBattleCommunication - adds r0, r4, 0 - bl sub_81A5258 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, 0 - bne _0804FADE - b _0804FD78 -_0804FADE: - strb r3, [r4, 0x1] - b _0804FD70 - .pool -_0804FAE8: - ldr r0, =gBattleMons - adds r0, 0x80 - movs r1, 0 - strh r1, [r0] - ldr r2, =gHitMarker - ldr r3, =gBitTable - ldr r1, [r3, 0x4] - lsls r1, 28 - ldr r0, [r2] - orrs r0, r1 - str r0, [r2] - ldr r0, =gBattleStruct - ldr r2, [r0] - ldr r0, =0x000002a1 - adds r2, r0 - ldr r0, =gBattlePartyID - ldrh r0, [r0, 0x2] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - ldr r1, =gDisableStructs - adds r1, 0x34 - ldrb r0, [r1] - movs r2, 0x2 - b _0804FBF4 - .pool -_0804FB3C: - ldr r1, =gBattleMons - movs r0, 0 - strh r0, [r1, 0x28] - ldr r2, =gHitMarker - ldr r3, =gBitTable - ldr r1, [r3] - lsls r1, 28 - ldr r0, [r2] - orrs r0, r1 - movs r1, 0x80 - lsls r1, 15 - orrs r0, r1 - str r0, [r2] - ldr r0, =gBattleStruct - ldr r2, [r0] - movs r1, 0xA8 - lsls r1, 2 - adds r2, r1 - ldr r0, =gBattlePartyID - ldrh r0, [r0] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - ldr r2, =gDisableStructs - ldrb r0, [r2, 0x18] - movs r1, 0x2 - orrs r0, r1 - strb r0, [r2, 0x18] - b _0804FD70 - .pool -_0804FB94: - ldr r0, =gBattleMons - movs r1, 0 - strh r1, [r0, 0x28] - adds r0, 0x80 - strh r1, [r0] - ldr r2, =gHitMarker - ldr r3, =gBitTable - ldr r0, [r3] - lsls r0, 28 - ldr r1, [r2] - orrs r1, r0 - ldr r0, [r3, 0x4] - lsls r0, 28 - orrs r1, r0 - movs r0, 0x80 - lsls r0, 15 - orrs r1, r0 - str r1, [r2] - ldr r5, =gBattleStruct - ldr r2, [r5] - movs r0, 0xA8 - lsls r0, 2 - adds r2, r0 - ldr r4, =gBattlePartyID - ldrh r0, [r4] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - ldr r2, [r5] - ldr r1, =0x000002a1 - adds r2, r1 - ldrh r0, [r4, 0x2] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - ldr r1, =gDisableStructs - ldrb r0, [r1, 0x18] - movs r2, 0x2 - orrs r0, r2 - strb r0, [r1, 0x18] - adds r1, 0x34 - ldrb r0, [r1] -_0804FBF4: - orrs r0, r2 - strb r0, [r1] - b _0804FD70 - .pool -_0804FC18: - movs r0, 0 - bl sub_8033E10 - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution - b _0804FD70 - .pool -_0804FC2C: - bl sub_81A5BF8 - b _0804FD70 -_0804FC32: - bl sub_81A5D44 - b _0804FD70 -_0804FC38: - ldr r1, =gRefereeStringsTable - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0, 0x1] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - bl StrCpyDecodeToDisplayedStringBattle - ldr r0, =gDisplayedStringBattle - movs r1, 0x16 - bl sub_814F9EC - b _0804FD70 - .pool -_0804FC60: - movs r0, 0x16 - bl IsTextPrinterActive - lsls r0, 16 - b _0804FD24 -_0804FC6A: - bl IsCryFinished - lsls r0, 24 - cmp r0, 0 - bne _0804FC76 - b _0804FD78 -_0804FC76: - b _0804FD70 -_0804FC78: - ldr r4, =gActiveBank - movs r0, 0x1 - strb r0, [r4] - ldr r0, =gBattleMons - adds r0, 0x58 - b _0804FCA2 - .pool -_0804FC8C: - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r0, 0x3 - bls _0804FD70 - ldr r4, =gActiveBank - movs r0, 0x3 - strb r0, [r4] - ldr r0, =gBattleMons - movs r2, 0x84 - lsls r2, 1 - adds r0, r2 -_0804FCA2: - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _0804FD70 - movs r0, 0 - movs r1, 0 - bl EmitReturnPokeToBall - ldrb r0, [r4] - bl MarkBufferBankForExecution - b _0804FD70 - .pool -_0804FCC4: - ldr r0, =gMPlay_BGM - ldr r1, =0x0000ffff - movs r2, 0x55 - bl m4aMPlayVolumeControl - b _0804FD70 - .pool -_0804FCD8: - ldr r0, =gMPlay_BGM - ldr r1, =0x0000ffff - movs r2, 0x80 - lsls r2, 1 - bl m4aMPlayVolumeControl - b _0804FD70 - .pool -_0804FCF0: - ldr r0, =gBattleStruct - ldr r2, [r0] - ldr r0, =0x000002a2 - adds r2, r0 - ldr r1, =gBitTable - ldr r0, =gActiveBank - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - b _0804FD70 - .pool -_0804FD1C: - ldr r0, =gActiveBank - ldrb r0, [r0] - bl sub_805725C -_0804FD24: - cmp r0, 0 - bne _0804FD78 - b _0804FD70 - .pool -_0804FD30: - ldr r0, =gActiveBank - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0804FD50 - ldr r1, =gBattleOutcome - movs r0, 0x5 - strb r0, [r1] - b _0804FD70 - .pool -_0804FD50: - ldr r1, =gBattleOutcome - movs r0, 0xA - strb r0, [r1] - b _0804FD70 - .pool -_0804FD5C: - movs r1, 0xCE - lsls r1, 1 - movs r0, 0 - movs r2, 0x1 - bl EmitPlaySound - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution -_0804FD70: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x3 - str r0, [r1] -_0804FD78: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk76_various - - thumb_func_start atk77_setprotect -atk77_setprotect: @ 804FD8C - push {r4-r7,lr} - mov r7, r8 - push {r7} - movs r6, 0x1 - ldr r2, =gUnknown_02024260 - ldr r1, =gBankAttacker - ldrb r3, [r1] - lsls r0, r3, 1 - adds r0, r2 - ldrh r0, [r0] - mov r8, r1 - ldr r7, =gDisableStructs - cmp r0, 0xB6 - beq _0804FDBC - cmp r0, 0xC5 - beq _0804FDBC - cmp r0, 0xCB - beq _0804FDBC - lsls r0, r3, 3 - subs r0, r3 - lsls r0, 2 - adds r0, r7 - movs r1, 0 - strb r1, [r0, 0x8] -_0804FDBC: - ldr r0, =gCurrentMoveTurn - ldrb r1, [r0] - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - subs r0, 0x1 - cmp r1, r0 - bne _0804FDCC - movs r6, 0 -_0804FDCC: - ldr r2, =sProtectSuccessRates - mov r5, r8 - ldrb r1, [r5] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r7 - ldrb r4, [r0, 0x8] - lsls r4, 1 - adds r4, r2 - bl Random - ldrh r1, [r4] - lsls r0, 16 - lsrs r0, 16 - cmp r1, r0 - bcc _0804FE80 - cmp r6, 0 - beq _0804FE80 - ldr r4, =gBattleMoves - ldr r3, =gCurrentMove - ldrh r0, [r3] - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - adds r1, r4 - ldrb r0, [r1] - cmp r0, 0x6F - bne _0804FE1C - ldr r0, =gProtectStructs - ldrb r1, [r5] - lsls r1, 4 - adds r1, r0 - ldrb r0, [r1] - movs r2, 0x1 - orrs r0, r2 - strb r0, [r1] - ldr r1, =gBattleCommunication - movs r0, 0 - strb r0, [r1, 0x5] -_0804FE1C: - ldrh r0, [r3] - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - adds r1, r4 - ldrb r0, [r1] - cmp r0, 0x74 - bne _0804FE42 - ldr r0, =gProtectStructs - ldrb r1, [r5] - lsls r1, 4 - adds r1, r0 - ldrb r0, [r1] - movs r2, 0x2 - orrs r0, r2 - strb r0, [r1] - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] -_0804FE42: - mov r1, r8 - ldrb r0, [r1] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r1, r7 - ldrb r0, [r1, 0x8] - adds r0, 0x1 - strb r0, [r1, 0x8] - b _0804FEA2 - .pool -_0804FE80: - ldr r2, =gDisableStructs - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - movs r1, 0 - strb r1, [r0, 0x8] - ldr r1, =gBattleCommunication - movs r0, 0x2 - strb r0, [r1, 0x5] - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] -_0804FEA2: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk77_setprotect - - thumb_func_start atk78_faintifabilitynotdamp -atk78_faintifabilitynotdamp: @ 804FEC8 - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r0, =gBattleExecBuffer - ldr r2, [r0] - cmp r2, 0 - bne _0804FFCC - ldr r1, =gBankTarget - strb r2, [r1] - ldr r0, =gNoOfAllBanks - ldrb r3, [r0] - adds r5, r1, 0 - mov r8, r0 - ldr r6, =gBattleMons - cmp r2, r3 - bcs _0804FF14 - adds r0, r6, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x6 - beq _0804FF14 - adds r2, r3, 0 - adds r4, r6, 0 - movs r3, 0x58 -_0804FEF8: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - lsls r0, 24 - lsrs r0, 24 - cmp r0, r2 - bcs _0804FF14 - ldrb r0, [r5] - muls r0, r3 - adds r0, r4 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x6 - bne _0804FEF8 -_0804FF14: - ldrb r0, [r5] - mov r1, r8 - ldrb r1, [r1] - cmp r0, r1 - bne _0804FFB0 - ldr r4, =gActiveBank - ldr r7, =gBankAttacker - ldrb r0, [r7] - strb r0, [r4] - ldr r2, =gBattleMoveDamage - ldrb r1, [r4] - movs r0, 0x58 - muls r0, r1 - adds r0, r6 - ldrh r0, [r0, 0x28] - str r0, [r2] - ldr r1, =0x00007fff - movs r0, 0 - bl EmitHealthBarUpdate - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - movs r0, 0 - strb r0, [r5] - mov r2, r8 - ldrb r0, [r2] - cmp r0, 0 - beq _0804FFCC - adds r3, r5, 0 - ldrb r5, [r7] - ldr r7, =gBitTable - adds r4, r0, 0 - ldr r6, =gAbsentBankFlags -_0804FF60: - ldrb r2, [r3] - cmp r2, r5 - beq _0804FF76 - ldrb r0, [r6] - ldrb r1, [r3] - lsls r1, 2 - adds r1, r7 - ldr r1, [r1] - ands r0, r1 - cmp r0, 0 - beq _0804FFCC -_0804FF76: - adds r0, r2, 0x1 - strb r0, [r3] - lsls r0, 24 - lsrs r0, 24 - cmp r0, r4 - bcc _0804FF60 - b _0804FFCC - .pool -_0804FFB0: - ldr r1, =gLastUsedAbility - movs r0, 0x6 - strb r0, [r1] - ldrb r0, [r5] - movs r1, 0x58 - muls r1, r0 - adds r1, r6 - adds r1, 0x20 - ldrb r1, [r1] - bl RecordAbilityBattle - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB560 - str r0, [r1] -_0804FFCC: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk78_faintifabilitynotdamp - - thumb_func_start atk79_setatkhptozero -atk79_setatkhptozero: @ 804FFE4 - push {r4,lr} - sub sp, 0x4 - ldr r0, =gBattleExecBuffer - ldr r3, [r0] - cmp r3, 0 - bne _08050028 - ldr r4, =gActiveBank - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r4] - ldr r1, =gBattleMons - ldrb r0, [r4] - movs r2, 0x58 - muls r0, r2 - adds r0, r1 - strh r3, [r0, 0x28] - ldrb r0, [r4] - muls r0, r2 - adds r1, 0x28 - adds r0, r1 - str r0, [sp] - movs r0, 0 - movs r1, 0x2A - movs r2, 0 - movs r3, 0x2 - bl EmitSetAttributes - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] -_08050028: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk79_setatkhptozero - - thumb_func_start atk7A_jumpwhiletargetvalid -atk7A_jumpwhiletargetvalid: @ 8050044 - push {r4-r7,lr} - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r4, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r4, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r4, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r4, r0 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - adds r7, r3, 0 - cmp r0, 0 - beq _080500DC - ldr r0, =gBankTarget - ldrb r1, [r0] - adds r1, 0x1 - strb r1, [r0] - ldr r2, =gBankAttacker - lsls r1, 24 - lsrs r1, 24 - adds r3, r0, 0 - ldr r6, =gAbsentBankFlags - ldr r5, =gBitTable - ldr r0, =gNoOfAllBanks - mov r12, r0 - ldrb r0, [r2] - cmp r1, r0 - bne _0805009A -_0805008A: - ldrb r0, [r3] - adds r0, 0x1 - strb r0, [r3] - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r2] - cmp r0, r1 - beq _0805008A -_0805009A: - ldrb r0, [r6] - ldrb r1, [r3] - lsls r1, 2 - adds r1, r5 - ldr r1, [r1] - ands r0, r1 - cmp r0, 0 - bne _0805008A - ldrb r0, [r3] - mov r2, r12 - ldrb r2, [r2] - cmp r0, r2 - bcc _080500D8 - ldr r0, [r7] - adds r0, 0x5 - str r0, [r7] - b _080500E0 - .pool -_080500D8: - str r4, [r7] - b _080500E0 -_080500DC: - adds r0, r2, 0x5 - str r0, [r3] -_080500E0: - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end atk7A_jumpwhiletargetvalid - - thumb_func_start atk7B_healhalfHP_if_possible -atk7B_healhalfHP_if_possible: @ 80500E8 - push {r4-r6,lr} - ldr r4, =gBattlescriptCurrInstr - ldr r1, [r4] - ldrb r2, [r1, 0x1] - ldrb r0, [r1, 0x2] - lsls r0, 8 - orrs r2, r0 - ldrb r0, [r1, 0x3] - lsls r0, 16 - orrs r2, r0 - ldrb r0, [r1, 0x4] - lsls r0, 24 - orrs r2, r0 - ldrb r0, [r1, 0x5] - ldr r3, =gBankTarget - cmp r0, 0x1 - bne _08050110 - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r3] -_08050110: - ldr r1, =gBattleMoveDamage - ldr r6, =gBattleMons - ldrb r0, [r3] - movs r5, 0x58 - muls r0, r5 - adds r0, r6 - ldrh r0, [r0, 0x2C] - lsrs r0, 1 - str r0, [r1] - cmp r0, 0 - bne _0805012A - movs r0, 0x1 - str r0, [r1] -_0805012A: - ldr r0, [r1] - negs r0, r0 - str r0, [r1] - ldrb r0, [r3] - muls r0, r5 - adds r0, r6 - ldrh r1, [r0, 0x28] - ldrh r0, [r0, 0x2C] - cmp r1, r0 - bne _08050158 - str r2, [r4] - b _0805015E - .pool -_08050158: - ldr r0, [r4] - adds r0, 0x6 - str r0, [r4] -_0805015E: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end atk7B_healhalfHP_if_possible - - thumb_func_start atk7C_8025508 -atk7C_8025508: @ 8050164 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x8 - ldr r2, =gNoOfAllBanks - ldr r0, =gBankAttacker - mov r10, r0 - movs r1, 0 - add r0, sp, 0x4 -_0805017A: - strh r1, [r0] - subs r0, 0x2 - cmp r0, sp - bge _0805017A - movs r1, 0 - mov r8, r1 - movs r5, 0 - ldrb r1, [r2] - cmp r5, r1 - bge _080501D0 - ldr r0, =gBankAttacker - ldrb r6, [r0] - ldr r2, =0x0000ffff - mov r9, r2 - lsls r4, r6, 3 - mov r2, sp - ldr r0, =gBattleStruct - mov r12, r0 - adds r7, r1, 0 -_080501A0: - cmp r5, r6 - beq _080501C8 - mov r1, r12 - ldr r0, [r1] - adds r0, r4, r0 - adds r1, r0, 0 - adds r1, 0xE0 - ldrb r3, [r1] - adds r0, 0xE1 - ldrb r0, [r0] - lsls r0, 8 - orrs r3, r0 - cmp r3, 0 - beq _080501C8 - cmp r3, r9 - beq _080501C8 - strh r3, [r2] - adds r2, 0x2 - movs r0, 0x1 - add r8, r0 -_080501C8: - adds r4, 0x2 - adds r5, 0x1 - cmp r5, r7 - blt _080501A0 -_080501D0: - mov r1, r10 - ldrb r0, [r1] - ldr r2, =gBattleStruct - ldr r1, [r2] - lsls r0, 1 - adds r0, r1 - adds r1, r0, 0 - adds r1, 0x98 - ldrb r3, [r1] - adds r0, 0x99 - ldrb r0, [r0] - lsls r0, 8 - orrs r3, r0 - cmp r3, 0 - beq _08050220 - ldr r0, =0x0000ffff - cmp r3, r0 - beq _08050220 - ldr r2, =gHitMarker - ldr r0, [r2] - ldr r1, =0xfffffbff - ands r0, r1 - str r0, [r2] - ldr r4, =gCurrentMove - strh r3, [r4] - b _0805024A - .pool -_08050220: - mov r0, r8 - cmp r0, 0 - beq _08050290 - ldr r2, =gHitMarker - ldr r0, [r2] - ldr r1, =0xfffffbff - ands r0, r1 - str r0, [r2] - bl Random - lsls r0, 16 - lsrs r0, 16 - mov r1, r8 - bl __modsi3 - adds r5, r0, 0 - ldr r4, =gCurrentMove - lsls r0, r5, 1 - add r0, sp - ldrh r0, [r0] - strh r0, [r4] -_0805024A: - ldrh r0, [r4] - movs r1, 0 - bl GetMoveTarget - ldr r1, =gBankTarget - strb r0, [r1] - ldr r5, =gBattlescriptCurrInstr - ldr r3, =gBattleScriptsForMoveEffects - ldr r2, =gBattleMoves - ldrh r1, [r4] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - str r0, [r5] - b _080502AE - .pool -_08050290: - ldr r2, =gSpecialStatuses - mov r0, r10 - ldrb r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0] - movs r2, 0x20 - orrs r1, r2 - strb r1, [r0] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] -_080502AE: - add sp, 0x8 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk7C_8025508 - - thumb_func_start atk7D_set_rain -atk7D_set_rain: @ 80502C8 - push {lr} - ldr r2, =gBattleWeather - ldrh r0, [r2] - movs r1, 0x7 - ands r1, r0 - cmp r1, 0 - beq _080502F4 - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0x2 - strb r0, [r1, 0x5] - b _08050304 - .pool -_080502F4: - movs r0, 0x1 - strh r0, [r2] - ldr r0, =gBattleCommunication - strb r1, [r0, 0x5] - ldr r0, =gWishFutureKnock - adds r0, 0x28 - movs r1, 0x5 - strb r1, [r0] -_08050304: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atk7D_set_rain - - thumb_func_start atk7E_setreflect -atk7E_setreflect: @ 805031C - push {r4-r6,lr} - ldr r6, =gBankAttacker - ldrb r0, [r6] - bl GetBankIdentity - ldr r4, =gSideAffecting - movs r5, 0x1 - adds r1, r5, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - ldrh r1, [r1] - adds r0, r5, 0 - ands r0, r1 - cmp r0, 0 - beq _0805035C - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0 - b _080503D0 - .pool -_0805035C: - ldrb r0, [r6] - bl GetBankIdentity - adds r1, r5, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - ldrh r0, [r1] - movs r2, 0x1 - orrs r0, r2 - strh r0, [r1] - ldrb r0, [r6] - bl GetBankIdentity - ldr r4, =gSideTimers - adds r1, r5, 0 - ands r1, r0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - movs r1, 0x5 - strb r1, [r0] - ldrb r0, [r6] - bl GetBankIdentity - adds r1, r5, 0 - ands r1, r0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r1, [r6] - strb r1, [r0, 0x1] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ands r0, r5 - cmp r0, 0 - beq _080503CC - movs r0, 0x1 - bl CountAliveMonsInBattle - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0x2 - bne _080503CC - ldr r0, =gBattleCommunication - strb r1, [r0, 0x5] - b _080503D2 - .pool -_080503CC: - ldr r1, =gBattleCommunication - movs r0, 0x1 -_080503D0: - strb r0, [r1, 0x5] -_080503D2: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atk7E_setreflect - - thumb_func_start atk7F_setseeded -atk7F_setseeded: @ 80503E8 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - ldr r7, =gBattleMoveFlags - ldrb r5, [r7] - movs r0, 0x29 - ands r0, r5 - cmp r0, 0 - bne _0805041A - ldr r0, =gStatuses3 - mov r9, r0 - ldr r1, =gBankTarget - mov r8, r1 - ldrb r4, [r1] - lsls r0, r4, 2 - mov r2, r9 - adds r6, r0, r2 - ldr r2, [r6] - movs r0, 0x4 - mov r12, r0 - adds r3, r2, 0 - ands r3, r0 - cmp r3, 0 - beq _08050438 -_0805041A: - movs r0, 0x1 - orrs r0, r5 - strb r0, [r7] - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] - b _08050488 - .pool -_08050438: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r4 - adds r1, r0, r1 - adds r0, r1, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0xC - beq _08050454 - adds r0, r1, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0xC - bne _0805046C -_08050454: - movs r0, 0x1 - orrs r0, r5 - strb r0, [r7] - ldr r1, =gBattleCommunication - movs r0, 0x2 - strb r0, [r1, 0x5] - b _08050488 - .pool -_0805046C: - ldr r0, =gBankAttacker - ldrb r0, [r0] - orrs r2, r0 - str r2, [r6] - mov r2, r8 - ldrb r1, [r2] - lsls r1, 2 - add r1, r9 - ldr r0, [r1] - mov r2, r12 - orrs r0, r2 - str r0, [r1] - ldr r0, =gBattleCommunication - strb r3, [r0, 0x5] -_08050488: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk7F_setseeded - - thumb_func_start atk80_manipulatedamage -atk80_manipulatedamage: @ 80504A8 - push {r4,lr} - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - ldrb r2, [r0, 0x1] - adds r4, r1, 0 - cmp r2, 0x1 - beq _080504D8 - cmp r2, 0x1 - bgt _080504C4 - cmp r2, 0 - beq _080504CA - b _08050518 - .pool -_080504C4: - cmp r2, 0x2 - beq _08050510 - b _08050518 -_080504CA: - ldr r1, =gBattleMoveDamage - ldr r0, [r1] - negs r0, r0 - b _08050516 - .pool -_080504D8: - ldr r3, =gBattleMoveDamage - ldr r0, [r3] - lsrs r1, r0, 31 - adds r0, r1 - asrs r0, 1 - str r0, [r3] - cmp r0, 0 - bne _080504EA - str r2, [r3] -_080504EA: - ldr r2, =gBattleMons - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r0, [r0, 0x2C] - lsrs r1, r0, 1 - ldr r0, [r3] - cmp r1, r0 - bge _08050518 - str r1, [r3] - b _08050518 - .pool -_08050510: - ldr r1, =gBattleMoveDamage - ldr r0, [r1] - lsls r0, 1 -_08050516: - str r0, [r1] -_08050518: - ldr r0, [r4] - adds r0, 0x2 - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk80_manipulatedamage - - thumb_func_start atk81_setrest -atk81_setrest: @ 8050528 - push {r4-r7,lr} - sub sp, 0x4 - ldr r0, =gBattlescriptCurrInstr - mov r12, r0 - ldr r1, [r0] - ldrb r6, [r1, 0x1] - ldrb r0, [r1, 0x2] - lsls r0, 8 - orrs r6, r0 - ldrb r0, [r1, 0x3] - lsls r0, 16 - orrs r6, r0 - ldrb r0, [r1, 0x4] - lsls r0, 24 - orrs r6, r0 - ldr r5, =gActiveBank - ldr r2, =gBankTarget - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r2] - strb r0, [r5] - ldr r4, =gBattleMoveDamage - ldr r1, =gBattleMons - ldrb r0, [r2] - movs r3, 0x58 - muls r0, r3 - adds r0, r1 - ldrh r0, [r0, 0x2C] - negs r0, r0 - str r0, [r4] - ldrb r0, [r2] - adds r4, r0, 0 - muls r4, r3 - adds r0, r4, r1 - ldrh r3, [r0, 0x28] - adds r7, r5, 0 - adds r5, r2, 0 - adds r2, r1, 0 - ldrh r0, [r0, 0x2C] - cmp r3, r0 - bne _08050598 - mov r0, r12 - str r6, [r0] - b _080505E8 - .pool -_08050598: - adds r0, r2, 0 - adds r0, 0x4C - adds r0, r4, r0 - ldr r1, [r0] - movs r0, 0xF8 - ands r1, r0 - cmp r1, 0 - beq _080505B4 - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] - b _080505B8 - .pool -_080505B4: - ldr r0, =gBattleCommunication - strb r1, [r0, 0x5] -_080505B8: - ldrb r0, [r5] - movs r3, 0x58 - muls r0, r3 - adds r2, 0x4C - adds r0, r2 - movs r1, 0x3 - str r1, [r0] - ldrb r0, [r7] - muls r0, r3 - adds r0, r2 - str r0, [sp] - movs r0, 0 - movs r1, 0x28 - movs r2, 0 - movs r3, 0x4 - bl EmitSetAttributes - ldrb r0, [r7] - bl MarkBufferBankForExecution - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_080505E8: - add sp, 0x4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk81_setrest - - thumb_func_start atk82_jumpifnotfirstturn -atk82_jumpifnotfirstturn: @ 80505F8 - push {r4,r5,lr} - ldr r5, =gBattlescriptCurrInstr - ldr r4, [r5] - ldrb r3, [r4, 0x1] - ldrb r0, [r4, 0x2] - lsls r0, 8 - orrs r3, r0 - ldrb r0, [r4, 0x3] - lsls r0, 16 - orrs r3, r0 - ldrb r0, [r4, 0x4] - lsls r0, 24 - orrs r3, r0 - ldr r2, =gDisableStructs - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x16] - cmp r0, 0 - beq _08050638 - adds r0, r4, 0x5 - str r0, [r5] - b _0805063A - .pool -_08050638: - str r3, [r5] -_0805063A: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end atk82_jumpifnotfirstturn - - thumb_func_start atk83_nop -atk83_nop: @ 8050640 - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end atk83_nop - - thumb_func_start UproarWakeUpCheck -UproarWakeUpCheck: @ 8050650 - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 24 - lsrs r3, r0, 24 - movs r2, 0 - ldr r0, =gNoOfAllBanks - ldrb r1, [r0] - mov r8, r0 - cmp r2, r1 - bge _080506C4 - ldr r0, =gBattleMons - mov r12, r0 - movs r0, 0x58 - muls r0, r3 - add r0, r12 - adds r5, r0, 0 - adds r5, 0x20 - adds r4, r1, 0 - movs r3, 0 - ldr r6, =gBattleScripting - ldr r7, =gBattleCommunication -_0805067C: - mov r0, r12 - adds r0, 0x50 - adds r0, r3, r0 - ldr r0, [r0] - movs r1, 0x70 - ands r0, r1 - cmp r0, 0 - beq _080506BC - ldrb r0, [r5] - cmp r0, 0x2B - beq _080506BC - movs r3, 0 - strb r2, [r6, 0x17] - ldr r1, =gBankTarget - ldrb r0, [r1] - cmp r0, 0xFF - beq _080506DC - cmp r0, r2 - beq _080506D0 - movs r0, 0x1 - strb r0, [r7, 0x5] - b _080506C4 - .pool -_080506BC: - adds r3, 0x58 - adds r2, 0x1 - cmp r2, r4 - blt _0805067C -_080506C4: - mov r1, r8 - ldrb r1, [r1] - cmp r2, r1 - beq _080506E0 - movs r0, 0x1 - b _080506E2 -_080506D0: - ldr r0, =gBattleCommunication - strb r3, [r0, 0x5] - b _080506C4 - .pool -_080506DC: - strb r2, [r1] - b _080506C4 -_080506E0: - movs r0, 0 -_080506E2: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end UproarWakeUpCheck - - thumb_func_start atk84_jump_if_cant_sleep -atk84_jump_if_cant_sleep: @ 80506EC - push {r4-r6,lr} - ldr r5, =gBattlescriptCurrInstr - ldr r1, [r5] - ldrb r4, [r1, 0x1] - ldrb r0, [r1, 0x2] - lsls r0, 8 - orrs r4, r0 - ldrb r0, [r1, 0x3] - lsls r0, 16 - orrs r4, r0 - ldrb r0, [r1, 0x4] - lsls r0, 24 - orrs r4, r0 - ldr r6, =gBankTarget - ldrb r0, [r6] - bl UproarWakeUpCheck - lsls r0, 24 - cmp r0, 0 - beq _08050720 - str r4, [r5] - b _08050762 - .pool -_08050720: - ldr r1, =gBattleMons - ldrb r3, [r6] - movs r0, 0x58 - muls r0, r3 - adds r0, r1 - adds r0, 0x20 - ldrb r0, [r0] - adds r1, r0, 0 - cmp r1, 0xF - beq _08050738 - cmp r1, 0x48 - bne _0805075C -_08050738: - ldr r2, =gLastUsedAbility - strb r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0x2 - strb r0, [r1, 0x5] - str r4, [r5] - ldrb r1, [r2] - adds r0, r3, 0 - bl RecordAbilityBattle - b _08050762 - .pool -_0805075C: - ldr r0, [r5] - adds r0, 0x5 - str r0, [r5] -_08050762: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end atk84_jump_if_cant_sleep - - thumb_func_start atk85_stockpile -atk85_stockpile: @ 8050768 - push {r4,r5,lr} - ldr r5, =gDisableStructs - ldr r4, =gBankAttacker - ldrb r1, [r4] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r1, r0, r5 - ldrb r0, [r1, 0x9] - cmp r0, 0x3 - bne _080507A0 - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] - b _080507CA - .pool -_080507A0: - adds r0, 0x1 - movs r3, 0 - strb r0, [r1, 0x9] - ldr r2, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r2] - movs r0, 0x1 - strb r0, [r2, 0x1] - strb r0, [r2, 0x2] - strb r0, [r2, 0x3] - ldrb r1, [r4] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r5 - ldrb r0, [r0, 0x9] - strb r0, [r2, 0x4] - movs r0, 0xFF - strb r0, [r2, 0x5] - ldr r0, =gBattleCommunication - strb r3, [r0, 0x5] -_080507CA: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk85_stockpile - - thumb_func_start atk86_stockpiletobasedamage -atk86_stockpiletobasedamage: @ 80507E4 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x10 - ldr r3, =gBattlescriptCurrInstr - ldr r1, [r3] - ldrb r2, [r1, 0x1] - ldrb r0, [r1, 0x2] - lsls r0, 8 - orrs r2, r0 - ldrb r0, [r1, 0x3] - lsls r0, 16 - orrs r2, r0 - ldrb r0, [r1, 0x4] - lsls r0, 24 - orrs r2, r0 - ldr r7, =gDisableStructs - ldr r6, =gBankAttacker - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r7 - ldrb r0, [r0, 0x9] - cmp r0, 0 - bne _08050828 - str r2, [r3] - b _080508CA - .pool -_08050828: - ldr r0, =gBattleCommunication - ldrb r0, [r0, 0x6] - cmp r0, 0x1 - beq _080508B0 - ldr r0, =gBattleMoveDamage - mov r8, r0 - ldr r4, =gSideAffecting - ldr r5, =gBankTarget - ldrb r0, [r5] - bl GetBankIdentity - movs r1, 0x1 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - ldrh r3, [r1] - ldrb r0, [r6] - movs r4, 0x58 - muls r0, r4 - ldr r2, =gBattleMons - adds r0, r2 - ldrb r1, [r5] - muls r1, r4 - adds r1, r2 - ldr r2, =gCurrentMove - ldrh r2, [r2] - movs r4, 0 - str r4, [sp] - str r4, [sp, 0x4] - ldrb r4, [r6] - str r4, [sp, 0x8] - ldrb r4, [r5] - str r4, [sp, 0xC] - bl CalculateBaseDamage - ldrb r2, [r6] - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - adds r1, r7 - ldrb r1, [r1, 0x9] - adds r3, r0, 0 - muls r3, r1 - mov r1, r8 - str r3, [r1] - ldr r2, =gBattleScripting - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r7 - ldrb r0, [r0, 0x9] - strb r0, [r2, 0x18] - ldr r1, =gProtectStructs - ldrb r0, [r6] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 28 - cmp r0, 0 - bge _080508B0 - lsls r0, r3, 4 - subs r0, r3 - movs r1, 0xA - bl __divsi3 - mov r1, r8 - str r0, [r1] -_080508B0: - ldr r2, =gDisableStructs - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - movs r1, 0 - strb r1, [r0, 0x9] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_080508CA: - add sp, 0x10 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk86_stockpiletobasedamage - - thumb_func_start atk87_stockpiletohpheal -atk87_stockpiletohpheal: @ 8050904 - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r7, =gBattlescriptCurrInstr - ldr r1, [r7] - ldrb r2, [r1, 0x1] - ldrb r0, [r1, 0x2] - lsls r0, 8 - orrs r2, r0 - ldrb r0, [r1, 0x3] - lsls r0, 16 - orrs r2, r0 - ldrb r0, [r1, 0x4] - lsls r0, 24 - orrs r2, r0 - ldr r0, =gDisableStructs - mov r8, r0 - ldr r6, =gBankAttacker - ldrb r3, [r6] - lsls r0, r3, 3 - subs r0, r3 - lsls r0, 2 - mov r1, r8 - adds r4, r0, r1 - ldrb r1, [r4, 0x9] - cmp r1, 0 - bne _08050954 - str r2, [r7] - ldr r0, =gBattleCommunication - strb r1, [r0, 0x5] - b _080509D0 - .pool -_08050954: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r3 - adds r1, r0, r1 - ldrh r0, [r1, 0x2C] - ldrh r3, [r1, 0x28] - cmp r0, r3 - bne _08050984 - movs r0, 0 - strb r0, [r4, 0x9] - str r2, [r7] - ldr r1, =gBankTarget - ldrb r0, [r6] - strb r0, [r1] - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] - b _080509D0 - .pool -_08050984: - ldr r5, =gBattleMoveDamage - ldrh r0, [r1, 0x2C] - ldrb r1, [r4, 0x9] - movs r2, 0x3 - subs r2, r1 - movs r4, 0x1 - adds r1, r4, 0 - lsls r1, r2 - bl __divsi3 - str r0, [r5] - cmp r0, 0 - bne _080509A0 - str r4, [r5] -_080509A0: - ldr r0, [r5] - negs r0, r0 - str r0, [r5] - ldr r3, =gBattleScripting - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r8 - ldrb r0, [r0, 0x9] - movs r2, 0 - strb r0, [r3, 0x18] - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r8 - strb r2, [r0, 0x9] - ldr r0, [r7] - adds r0, 0x5 - str r0, [r7] - ldr r1, =gBankTarget - ldrb r0, [r6] - strb r0, [r1] -_080509D0: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk87_stockpiletohpheal - - thumb_func_start atk88_negativedamage -atk88_negativedamage: @ 80509E8 - push {lr} - ldr r2, =gBattleMoveDamage - ldr r0, =gHpDealt - ldr r0, [r0] - lsrs r1, r0, 31 - adds r0, r1 - asrs r0, 1 - negs r0, r0 - str r0, [r2] - cmp r0, 0 - bne _08050A04 - movs r0, 0x1 - negs r0, r0 - str r0, [r2] -_08050A04: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atk88_negativedamage - - thumb_func_start ChangeStatBuffs -ChangeStatBuffs: @ 8050A1C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - mov r8, r3 - lsls r0, 24 - lsrs r6, r0, 24 - lsls r1, 24 - lsrs r7, r1, 24 - lsls r2, 24 - lsrs r5, r2, 24 - movs r0, 0 - mov r9, r0 - mov r10, r0 - movs r0, 0x40 - ands r0, r5 - cmp r0, 0 - beq _08050A50 - ldr r0, =gActiveBank - ldr r1, =gBankAttacker - b _08050A54 - .pool -_08050A50: - ldr r0, =gActiveBank - ldr r1, =gBankTarget -_08050A54: - ldrb r1, [r1] - strb r1, [r0] - movs r0, 0xBF - ands r5, r0 - movs r0, 0x80 - ands r0, r5 - cmp r0, 0 - beq _08050A6E - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_08050A6E: - movs r0, 0x7F - ands r5, r0 - movs r0, 0x20 - ands r0, r5 - cmp r0, 0 - beq _08050A84 - mov r0, r10 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r10, r0 -_08050A84: - movs r0, 0xDF - ands r5, r0 - ldr r1, =gBattleTextBuff1 - movs r4, 0 - movs r2, 0xFD - strb r2, [r1] - movs r0, 0x5 - strb r0, [r1, 0x1] - strb r7, [r1, 0x2] - movs r3, 0x1 - negs r3, r3 - mov r12, r3 - movs r0, 0xFF - strb r0, [r1, 0x3] - lsls r0, r6, 24 - cmp r0, 0 - blt _08050AA8 - b _08050D8C -_08050AA8: - ldr r4, =gSideTimers - ldr r1, =gActiveBank - ldrb r0, [r1] - bl GetBankIdentity - movs r1, 0x1 - ands r1, r0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r0, [r0, 0x4] - cmp r0, 0 - beq _08050B48 - mov r2, r9 - cmp r2, 0 - bne _08050B48 - ldr r0, =gCurrentMove - ldrh r0, [r0] - cmp r0, 0xAE - beq _08050B78 - cmp r5, 0x1 - bne _08050B68 - ldr r4, =gSpecialStatuses - ldr r3, =gActiveBank - ldrb r0, [r3] - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 2 - adds r1, r4 - ldrb r0, [r1] - lsls r0, 31 - cmp r0, 0 - beq _08050B10 - ldr r0, =gBattlescriptCurrInstr - mov r4, r8 - str r4, [r0] - b _08050B68 - .pool -_08050B10: - mov r0, r8 - bl BattleScriptPush - ldr r1, =gBattleScripting - ldr r6, =gActiveBank - ldrb r0, [r6] - strb r0, [r1, 0x17] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAE03 - str r0, [r1] - ldrb r1, [r6] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r1, [r0] - movs r2, 0x1 - orrs r1, r2 - strb r1, [r0] - b _08050B68 - .pool -_08050B48: - ldr r0, =gCurrentMove - ldrh r0, [r0] - cmp r0, 0xAE - beq _08050B78 - mov r0, r10 - cmp r0, 0x1 - beq _08050B78 - movs r0, 0 - bl JumpIfMoveAffectedByProtect - lsls r0, 24 - cmp r0, 0 - beq _08050B78 - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082D9F1C - str r0, [r1] -_08050B68: - movs r0, 0x1 - b _08050E80 - .pool -_08050B78: - ldr r2, =gBattleMons - ldr r1, =gActiveBank - ldrb r3, [r1] - movs r4, 0x58 - adds r0, r3, 0 - muls r0, r4 - adds r0, r2 - adds r0, 0x20 - ldrb r0, [r0] - mov r10, r2 - cmp r0, 0x1D - beq _08050B94 - cmp r0, 0x49 - bne _08050C2C -_08050B94: - mov r0, r9 - cmp r0, 0 - bne _08050C2C - ldr r0, =gCurrentMove - ldrh r0, [r0] - cmp r0, 0xAE - beq _08050C2C - cmp r5, 0x1 - bne _08050B68 - ldr r4, =gSpecialStatuses - lsls r0, r3, 2 - adds r0, r3 - lsls r0, 2 - adds r0, r4 - ldrb r0, [r0] - lsls r0, 31 - cmp r0, 0 - beq _08050BD4 - ldr r0, =gBattlescriptCurrInstr - mov r1, r8 - str r1, [r0] - b _08050B68 - .pool -_08050BD4: - mov r0, r8 - bl BattleScriptPush - ldr r1, =gBattleScripting - ldr r2, =gActiveBank - ldrb r0, [r2] - strb r0, [r1, 0x17] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB5C7 - str r0, [r1] - ldr r1, =gLastUsedAbility - ldrb r0, [r2] - movs r3, 0x58 - muls r0, r3 - add r0, r10 - adds r0, 0x20 - ldrb r0, [r0] - strb r0, [r1] - ldrb r0, [r2] - ldrb r1, [r1] - bl RecordAbilityBattle - ldr r6, =gActiveBank - ldrb r1, [r6] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r1, [r0] - movs r2, 0x1 - orrs r1, r2 - strb r1, [r0] - b _08050B68 - .pool -_08050C2C: - ldr r1, =gActiveBank - ldrb r0, [r1] - movs r4, 0x58 - muls r0, r4 - add r0, r10 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x33 - bne _08050C8C - mov r2, r9 - cmp r2, 0 - bne _08050C8C - cmp r7, 0x6 - bne _08050C8C - cmp r5, 0x1 - bne _08050B68 - mov r0, r8 - bl BattleScriptPush - ldr r1, =gBattleScripting - ldr r3, =gActiveBank - ldrb r0, [r3] - strb r0, [r1, 0x17] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB62F - str r0, [r1] - ldr r1, =gLastUsedAbility - ldrb r0, [r3] - muls r0, r4 - add r0, r10 - adds r0, 0x20 - ldrb r0, [r0] - strb r0, [r1] - ldrb r0, [r3] - ldrb r1, [r1] - bl RecordAbilityBattle - b _08050B68 - .pool -_08050C8C: - ldr r4, =gActiveBank - ldrb r0, [r4] - movs r4, 0x58 - muls r0, r4 - add r0, r10 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x34 - bne _08050CF0 - mov r0, r9 - cmp r0, 0 - bne _08050CF0 - cmp r7, 0x1 - bne _08050CF0 - cmp r5, 0x1 - beq _08050CAE - b _08050B68 -_08050CAE: - mov r0, r8 - bl BattleScriptPush - ldr r1, =gBattleScripting - ldr r2, =gActiveBank - ldrb r0, [r2] - strb r0, [r1, 0x17] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB62F - str r0, [r1] - ldr r1, =gLastUsedAbility - ldrb r0, [r2] - muls r0, r4 - add r0, r10 - adds r0, 0x20 - ldrb r0, [r0] - strb r0, [r1] - ldrb r0, [r2] - ldrb r1, [r1] - bl RecordAbilityBattle - b _08050B68 - .pool -_08050CF0: - ldr r3, =gActiveBank - ldrb r1, [r3] - movs r0, 0x58 - muls r0, r1 - add r0, r10 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x13 - bne _08050D08 - cmp r5, 0 - bne _08050D08 - b _08050B68 -_08050D08: - lsls r0, r6, 24 - asrs r0, 28 - movs r1, 0x7 - ands r0, r1 - negs r0, r0 - lsls r0, 24 - ldr r3, =gBattleTextBuff2 - movs r4, 0 - movs r1, 0xFD - strb r1, [r3] - movs r2, 0x1 - lsrs r6, r0, 24 - asrs r0, 24 - subs r1, 0xFF - cmp r0, r1 - bne _08050D32 - strb r4, [r3, 0x1] - movs r0, 0xD3 - strb r0, [r3, 0x2] - strb r4, [r3, 0x3] - movs r2, 0x4 -_08050D32: - adds r0, r2, r3 - strb r4, [r0] - adds r2, 0x1 - adds r1, r2, r3 - movs r0, 0xD4 - strb r0, [r1] - adds r2, 0x1 - adds r0, r2, r3 - strb r4, [r0] - adds r2, 0x1 - adds r1, r2, r3 - movs r0, 0xFF - strb r0, [r1] - ldr r4, =gActiveBank - ldrb r2, [r4] - movs r0, 0x58 - muls r0, r2 - adds r0, r7, r0 - mov r1, r10 - adds r1, 0x18 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - cmp r0, 0 - beq _08050DE2 - movs r1, 0 - ldr r0, =gBankTarget - ldrb r0, [r0] - ldr r3, =gBattleCommunication - mov r8, r3 - cmp r0, r2 - bne _08050D76 - movs r1, 0x1 -_08050D76: - mov r4, r8 - strb r1, [r4, 0x5] - b _08050E10 - .pool -_08050D8C: - asrs r6, r0, 28 - movs r0, 0x7 - ands r6, r0 - ldr r3, =gBattleTextBuff2 - strb r2, [r3] - movs r2, 0x1 - cmp r6, 0x2 - bne _08050DA6 - strb r4, [r3, 0x1] - movs r0, 0xD1 - strb r0, [r3, 0x2] - strb r4, [r3, 0x3] - movs r2, 0x4 -_08050DA6: - adds r0, r2, r3 - strb r4, [r0] - adds r2, 0x1 - adds r1, r2, r3 - movs r0, 0xD2 - strb r0, [r1] - adds r2, 0x1 - adds r0, r2, r3 - strb r4, [r0] - adds r2, 0x1 - adds r1, r2, r3 - ldrb r0, [r1] - mov r2, r12 - orrs r0, r2 - strb r0, [r1] - ldr r2, =gBattleMons - ldr r4, =gActiveBank - ldrb r3, [r4] - movs r0, 0x58 - muls r0, r3 - adds r0, r7, r0 - adds r1, r2, 0 - adds r1, 0x18 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - mov r10, r2 - cmp r0, 0xC - bne _08050DFC -_08050DE2: - ldr r1, =gBattleCommunication - movs r0, 0x2 - strb r0, [r1, 0x5] - mov r8, r1 - b _08050E10 - .pool -_08050DFC: - movs r1, 0 - ldr r0, =gBankTarget - ldrb r0, [r0] - ldr r2, =gBattleCommunication - mov r8, r2 - cmp r0, r3 - bne _08050E0C - movs r1, 0x1 -_08050E0C: - mov r3, r8 - strb r1, [r3, 0x5] -_08050E10: - ldr r2, =gActiveBank - ldrb r0, [r2] - movs r4, 0x58 - adds r1, r0, 0 - muls r1, r4 - adds r1, r7, r1 - mov r3, r10 - adds r3, 0x18 - adds r1, r3 - lsls r0, r6, 24 - asrs r0, 24 - ldrb r6, [r1] - adds r0, r6 - strb r0, [r1] - ldrb r0, [r2] - muls r0, r4 - adds r0, r7, r0 - adds r1, r0, r3 - movs r0, 0 - ldrsb r0, [r1, r0] - cmp r0, 0 - bge _08050E40 - movs r0, 0 - strb r0, [r1] -_08050E40: - ldr r1, =gActiveBank - ldrb r0, [r1] - muls r0, r4 - adds r0, r7, r0 - adds r1, r0, r3 - movs r0, 0 - ldrsb r0, [r1, r0] - cmp r0, 0xC - ble _08050E56 - movs r0, 0xC - strb r0, [r1] -_08050E56: - mov r2, r8 - ldrb r0, [r2, 0x5] - cmp r0, 0x2 - bne _08050E7E - movs r3, 0x1 - ands r3, r5 - cmp r3, 0 - beq _08050E70 - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r2, 0x1 - orrs r1, r2 - strb r1, [r0] -_08050E70: - mov r4, r8 - ldrb r0, [r4, 0x5] - cmp r0, 0x2 - bne _08050E7E - cmp r3, 0 - bne _08050E7E - b _08050B68 -_08050E7E: - movs r0, 0 -_08050E80: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end ChangeStatBuffs - - thumb_func_start atk89_statbuffchange -atk89_statbuffchange: @ 8050EA0 - push {r4,r5,lr} - ldr r5, =gBattlescriptCurrInstr - ldr r2, [r5] - ldrb r3, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r3, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r3, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r3, r0 - ldr r0, =gBattleScripting - ldrb r4, [r0, 0x1A] - movs r0, 0xF0 - ands r0, r4 - lsls r0, 24 - asrs r0, 24 - movs r1, 0xF - ands r1, r4 - ldrb r2, [r2, 0x1] - bl ChangeStatBuffs - lsls r0, 24 - cmp r0, 0 - bne _08050EDC - ldr r0, [r5] - adds r0, 0x6 - str r0, [r5] -_08050EDC: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk89_statbuffchange - - thumb_func_start atk8A_normalisebuffs -atk8A_normalisebuffs: @ 8050EEC - push {r4-r7,lr} - movs r2, 0 - ldr r0, =gNoOfAllBanks - ldrb r1, [r0] - ldr r0, =gBattlescriptCurrInstr - mov r12, r0 - cmp r2, r1 - bge _08050F24 - ldr r0, =gBattleMons - movs r4, 0x6 - adds r5, r1, 0 - movs r7, 0x58 - adds r6, r0, 0 - adds r6, 0x18 -_08050F08: - adds r3, r2, 0x1 - movs r1, 0x7 - adds r0, r2, 0 - muls r0, r7 - adds r0, r6 - adds r0, 0x7 -_08050F14: - strb r4, [r0] - subs r0, 0x1 - subs r1, 0x1 - cmp r1, 0 - bge _08050F14 - adds r2, r3, 0 - cmp r2, r5 - blt _08050F08 -_08050F24: - mov r1, r12 - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk8A_normalisebuffs - - thumb_func_start atk8B_setbide -atk8B_setbide: @ 8050F40 - push {r4,r5,lr} - ldr r4, =gBattleMons - ldr r3, =gBankAttacker - ldrb r0, [r3] - movs r5, 0x58 - adds r2, r0, 0 - muls r2, r5 - adds r4, 0x50 - adds r2, r4 - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 5 - orrs r0, r1 - str r0, [r2] - ldr r1, =gLockedMoves - ldrb r0, [r3] - lsls r0, 1 - adds r0, r1 - ldr r1, =gCurrentMove - ldrh r1, [r1] - movs r2, 0 - strh r1, [r0] - ldr r1, =gTakenDmg - ldrb r0, [r3] - lsls r0, 2 - adds r0, r1 - str r2, [r0] - ldrb r0, [r3] - adds r1, r0, 0 - muls r1, r5 - adds r1, r4 - ldr r0, [r1] - movs r2, 0x80 - lsls r2, 2 - orrs r0, r2 - str r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk8B_setbide - - thumb_func_start atk8C_confuseifrepeatingattackends -atk8C_confuseifrepeatingattackends: @ 8050FB0 - push {lr} - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0xC0 - lsls r1, 4 - ands r0, r1 - cmp r0, 0 - bne _08050FD2 - ldr r1, =gBattleCommunication - movs r0, 0x75 - strb r0, [r1, 0x3] -_08050FD2: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atk8C_confuseifrepeatingattackends - - thumb_func_start atk8D_setmultihit_counter -atk8D_setmultihit_counter: @ 8050FF0 - push {r4,r5,lr} - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r1, [r0, 0x1] - cmp r1, 0 - beq _0805100C - ldr r0, =gMultiHitCounter - strb r1, [r0] - b _08051026 - .pool -_0805100C: - ldr r4, =gMultiHitCounter - bl Random - movs r5, 0x3 - ands r0, r5 - strb r0, [r4] - cmp r0, 0x1 - bls _08051022 - bl Random - ands r0, r5 -_08051022: - adds r0, 0x2 - strb r0, [r4] -_08051026: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk8D_setmultihit_counter - - thumb_func_start atk8E_prepare_multihit -atk8E_prepare_multihit: @ 805103C - ldr r1, =gBattleScripting - movs r2, 0 - movs r0, 0xFD - strb r0, [r1, 0x8] - movs r0, 0x1 - strb r0, [r1, 0x9] - strb r0, [r1, 0xA] - strb r0, [r1, 0xB] - strb r2, [r1, 0xC] - movs r0, 0xFF - strb r0, [r1, 0xD] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end atk8E_prepare_multihit - - thumb_func_start sub_8051064 -sub_8051064: @ 8051064 - push {r4-r7,lr} - ldr r6, =gBattleMons - ldr r7, =gBankAttacker - ldrb r0, [r7] - movs r5, 0x58 - adds r1, r0, 0 - muls r1, r5 - adds r1, r6 - adds r1, 0x2A - ldr r4, =gBankTarget - ldrb r3, [r4] - adds r0, r3, 0 - muls r0, r5 - adds r0, r6 - adds r0, 0x2A - ldrb r1, [r1] - ldrb r0, [r0] - cmp r1, r0 - bcc _080510AC - ldr r0, =gBattleStruct - ldr r1, [r0] - adds r1, r3, r1 - adds r1, 0x58 - ldr r2, =gBattlePartyID - lsls r0, r3, 1 - b _08051108 - .pool -_080510AC: - bl Random - movs r3, 0xFF - ands r3, r0 - ldrb r0, [r7] - muls r0, r5 - adds r0, r6 - adds r0, 0x2A - ldrb r2, [r0] - ldrb r4, [r4] - adds r0, r4, 0 - muls r0, r5 - adds r0, r6 - adds r0, 0x2A - ldrb r1, [r0] - adds r2, r1 - adds r0, r3, 0 - muls r0, r2 - asrs r0, 8 - adds r0, 0x1 - lsrs r1, 2 - cmp r0, r1 - bhi _080510FC - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - movs r0, 0 - b _08051116 - .pool -_080510FC: - ldr r0, =gBattleStruct - ldr r1, [r0] - adds r1, r4, r1 - adds r1, 0x58 - ldr r2, =gBattlePartyID - lsls r0, r4, 1 -_08051108: - adds r0, r2 - ldrh r0, [r0] - strb r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DADD8 - str r0, [r1] - movs r0, 0x1 -_08051116: - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8051064 - - thumb_func_start atk8F_forcerandomswitch -atk8F_forcerandomswitch: @ 805112C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0xC - movs r0, 0 - str r0, [sp, 0x4] - ldr r5, =gBattleTypeFlags - ldr r0, [r5] - movs r1, 0x8 - ands r0, r1 - cmp r0, 0 - bne _0805114A - b _08051410 -_0805114A: - ldr r4, =gBankTarget - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - ldr r1, =gEnemyParty - str r1, [sp] - cmp r0, 0 - bne _08051160 - ldr r0, =gPlayerParty - str r0, [sp] -_08051160: - ldr r2, [r5] - movs r1, 0x81 - lsls r1, 1 - adds r0, r2, 0 - ands r0, r1 - cmp r0, r1 - beq _08051182 - ldr r1, =0x02000100 - adds r0, r2, 0 - ands r0, r1 - cmp r0, r1 - beq _08051182 - movs r0, 0x80 - lsls r0, 15 - ands r0, r2 - cmp r0, 0 - beq _080511C8 -_08051182: - ldr r2, =gBankTarget - ldrb r1, [r2] - movs r0, 0x2 - ands r0, r1 - adds r1, r2, 0 - cmp r0, 0 - beq _080511AC - movs r0, 0x3 - mov r9, r0 - movs r0, 0x6 - b _080511B2 - .pool -_080511AC: - movs r0, 0 - mov r9, r0 - movs r0, 0x3 -_080511B2: - mov r8, r0 - movs r0, 0x3 - mov r10, r0 - movs r0, 0x1 - str r0, [sp, 0x8] - ldr r2, =gBattlePartyID - ldrb r1, [r1] - b _0805128E - .pool -_080511C8: - movs r0, 0x42 - ands r0, r2 - cmp r0, 0x42 - beq _080511DA - ldr r1, =0x02000040 - adds r0, r2, 0 - ands r0, r1 - cmp r0, r1 - bne _0805121C -_080511DA: - ldrb r0, [r4] - bl sub_806D864 - lsls r0, 24 - lsrs r0, 24 - bl sub_806D82C - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0x1 - bne _080511FC - movs r1, 0x3 - mov r9, r1 - movs r0, 0x6 - b _08051202 - .pool -_080511FC: - movs r1, 0 - mov r9, r1 - movs r0, 0x3 -_08051202: - mov r8, r0 - movs r1, 0x3 - mov r10, r1 - movs r0, 0x1 - str r0, [sp, 0x8] - ldr r2, =gBattlePartyID - ldr r0, =gBankTarget - ldrb r1, [r0] - b _0805128E - .pool -_0805121C: - movs r0, 0x80 - lsls r0, 8 - ands r0, r2 - cmp r0, 0 - beq _08051274 - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _08051240 - movs r1, 0 - mov r9, r1 - movs r0, 0x6 - mov r8, r0 - mov r10, r0 - movs r1, 0x2 - b _08051260 -_08051240: - ldrb r1, [r4] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _08051252 - movs r0, 0x3 - mov r9, r0 - movs r1, 0x6 - b _08051258 -_08051252: - movs r0, 0 - mov r9, r0 - movs r1, 0x3 -_08051258: - mov r8, r1 - movs r0, 0x3 - mov r10, r0 - movs r1, 0x1 -_08051260: - str r1, [sp, 0x8] - ldr r2, =gBattlePartyID - ldr r0, =gBankTarget - ldrb r1, [r0] - b _0805128E - .pool -_08051274: - movs r0, 0x1 - ands r2, r0 - cmp r2, 0 - beq _080512A4 - movs r0, 0 - mov r9, r0 - movs r1, 0x6 - mov r8, r1 - mov r10, r1 - movs r0, 0x2 - str r0, [sp, 0x8] - ldr r2, =gBattlePartyID - ldrb r1, [r4] -_0805128E: - lsls r0, r1, 1 - adds r0, r2 - ldrh r7, [r0] - movs r0, 0x2 - eors r1, r0 - lsls r1, 1 - adds r1, r2 - ldrh r5, [r1] - b _080512BE - .pool -_080512A4: - movs r1, 0 - mov r9, r1 - movs r0, 0x6 - mov r8, r0 - mov r10, r0 - movs r1, 0x1 - str r1, [sp, 0x8] - ldr r1, =gBattlePartyID - ldrb r0, [r4] - lsls r0, 1 - adds r0, r1 - ldrh r5, [r0] - adds r7, r5, 0 -_080512BE: - mov r6, r9 - cmp r6, r8 - bge _080512FC -_080512C4: - movs r0, 0x64 - muls r0, r6 - ldr r1, [sp] - adds r4, r1, r0 - adds r0, r4, 0 - movs r1, 0xB - bl GetMonData - cmp r0, 0 - beq _080512F6 - adds r0, r4, 0 - movs r1, 0x2D - bl GetMonData - cmp r0, 0 - bne _080512F6 - adds r0, r4, 0 - movs r1, 0x39 - bl GetMonData - cmp r0, 0 - beq _080512F6 - ldr r0, [sp, 0x4] - adds r0, 0x1 - str r0, [sp, 0x4] -_080512F6: - adds r6, 0x1 - cmp r6, r8 - blt _080512C4 -_080512FC: - ldr r1, [sp, 0x4] - ldr r0, [sp, 0x8] - cmp r1, r0 - bgt _08051328 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08051414 - .pool -_08051328: - bl sub_8051064 - lsls r0, 24 - cmp r0, 0 - beq _08051378 -_08051332: - bl Random - lsls r0, 16 - lsrs r0, 16 - mov r1, r10 - bl __modsi3 - adds r6, r0, 0 - add r6, r9 - cmp r6, r7 - beq _08051332 - cmp r6, r5 - beq _08051332 - movs r0, 0x64 - muls r0, r6 - ldr r1, [sp] - adds r4, r1, r0 - adds r0, r4, 0 - movs r1, 0xB - bl GetMonData - cmp r0, 0 - beq _08051332 - adds r0, r4, 0 - movs r1, 0x2D - bl GetMonData - cmp r0, 0x1 - beq _08051332 - adds r0, r4, 0 - movs r1, 0x39 - bl GetMonData - cmp r0, 0 - beq _08051332 -_08051378: - ldr r4, =gBankTarget - ldrb r0, [r4] - ldr r1, =gBattleStruct - ldr r1, [r1] - adds r0, r1 - adds r0, 0x5C - strb r6, [r0] - bl sub_81B1250 - lsls r0, 24 - cmp r0, 0 - bne _08051396 - ldrb r0, [r4] - bl sub_803BDA0 -_08051396: - ldr r0, =gBattleTypeFlags - ldr r2, [r0] - movs r1, 0x81 - lsls r1, 1 - adds r0, r2, 0 - ands r0, r1 - cmp r0, r1 - beq _080513C0 - movs r0, 0x42 - ands r0, r2 - cmp r0, 0x42 - beq _080513C0 - ldr r1, =0x02000100 - adds r0, r2, 0 - ands r0, r1 - cmp r0, r1 - beq _080513C0 - ldr r0, =0x02000040 - ands r2, r0 - cmp r2, r0 - bne _080513DE -_080513C0: - ldr r5, =gBankTarget - ldrb r0, [r5] - lsls r4, r6, 24 - lsrs r4, 24 - adds r1, r4, 0 - movs r2, 0 - bl sub_81B8E80 - ldrb r1, [r5] - movs r0, 0x2 - eors r0, r1 - adds r1, r4, 0 - movs r2, 0x1 - bl sub_81B8E80 -_080513DE: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 15 - ands r0, r1 - cmp r0, 0 - beq _08051414 - ldr r0, =gBankTarget - ldrb r0, [r0] - lsls r1, r6, 24 - lsrs r1, 24 - bl sub_80571DC - b _08051414 - .pool -_08051410: - bl sub_8051064 -_08051414: - add sp, 0xC - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end atk8F_forcerandomswitch - - thumb_func_start atk90_conversion_type_change -atk90_conversion_type_change: @ 8051424 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - movs r6, 0 - ldr r2, =gBattleMons - ldr r3, =gBankAttacker - ldrb r1, [r3] - movs r0, 0x58 - muls r0, r1 - adds r1, r2, 0 - adds r1, 0xC - adds r0, r1 - ldrh r0, [r0] - mov r8, r2 - cmp r0, 0 - beq _08051466 - movs r5, 0x58 - adds r2, r1, 0 -_0805144C: - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, 0x3 - bhi _08051466 - lsls r1, r6, 1 - ldrb r0, [r3] - muls r0, r5 - adds r1, r0 - adds r1, r2 - ldrh r0, [r1] - cmp r0, 0 - bne _0805144C -_08051466: - movs r3, 0 - cmp r3, r6 - bcs _080514E8 - ldr r0, =gBattleMoves - mov r10, r0 - ldr r5, =gBattleMons - mov r12, r5 - ldr r7, =gBankAttacker - ldrb r0, [r7] - movs r4, 0x58 - adds r5, r0, 0 - muls r5, r4 - movs r0, 0xC - add r0, r12 - mov r9, r0 -_08051484: - lsls r0, r3, 1 - adds r0, r5 - add r0, r9 - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - add r0, r10 - ldrb r2, [r0, 0x2] - cmp r2, 0x9 - bne _080514C6 - mov r0, r8 - adds r1, r5, r0 - adds r0, r1, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0x7 - beq _080514B2 - adds r0, r1, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0x7 - bne _080514C4 -_080514B2: - movs r2, 0x7 - b _080514C6 - .pool -_080514C4: - movs r2, 0 -_080514C6: - ldrb r0, [r7] - muls r0, r4 - add r0, r12 - adds r1, r0, 0 - adds r1, 0x21 - ldrb r1, [r1] - cmp r2, r1 - beq _080514DE - adds r0, 0x22 - ldrb r0, [r0] - cmp r2, r0 - bne _080514E8 -_080514DE: - adds r0, r3, 0x1 - lsls r0, 24 - lsrs r3, r0, 24 - cmp r3, r6 - bcc _08051484 -_080514E8: - cmp r3, r6 - bne _0805150C - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _080515B0 - .pool -_0805150C: - movs r7, 0x3 - ldr r5, =gBattleMoves - mov r9, r5 -_08051512: - bl Random - adds r3, r0, 0 - ands r3, r7 - cmp r3, r6 - bcs _08051512 - ldr r4, =gBattleMons - lsls r1, r3, 1 - ldr r3, =gBankAttacker - ldrb r2, [r3] - movs r0, 0x58 - adds r5, r2, 0 - muls r5, r0 - adds r1, r5 - adds r0, r4, 0 - adds r0, 0xC - adds r1, r0 - ldrh r1, [r1] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - add r0, r9 - ldrb r2, [r0, 0x2] - mov r8, r4 - adds r4, r3, 0 - cmp r2, 0x9 - bne _08051572 - mov r0, r8 - adds r2, r5, r0 - adds r0, r2, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0x7 - beq _08051560 - adds r0, r2, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0x7 - bne _08051570 -_08051560: - movs r2, 0x7 - b _08051572 - .pool -_08051570: - movs r2, 0 -_08051572: - ldrb r0, [r4] - movs r3, 0x58 - muls r0, r3 - add r0, r8 - adds r1, r0, 0 - adds r1, 0x21 - ldrb r5, [r1] - cmp r2, r5 - beq _08051512 - adds r0, 0x22 - ldrb r0, [r0] - cmp r2, r0 - beq _08051512 - strb r2, [r1] - ldrb r0, [r4] - muls r0, r3 - add r0, r8 - adds r0, 0x22 - strb r2, [r0] - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x3 - strb r0, [r1, 0x1] - strb r2, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_080515B0: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk90_conversion_type_change - - thumb_func_start atk91_givepaydaymoney -atk91_givepaydaymoney: @ 80515C8 - push {r4,lr} - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ldr r1, =0x02000002 - ands r0, r1 - cmp r0, 0 - bne _08051650 - ldr r1, =gPaydayMoney - ldrh r0, [r1] - cmp r0, 0 - beq _08051650 - adds r1, r0, 0 - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x4A - ldrb r0, [r0] - adds r4, r1, 0 - muls r4, r0 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - movs r1, 0x92 - lsls r1, 3 - adds r0, r1 - adds r1, r4, 0 - bl AddMoney - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x1 - strb r0, [r1, 0x1] - movs r0, 0x2 - strb r0, [r1, 0x2] - movs r0, 0x5 - strb r0, [r1, 0x3] - strb r4, [r1, 0x4] - movs r0, 0xFF - lsls r0, 8 - ands r4, r0 - lsrs r4, 8 - strb r4, [r1, 0x5] - movs r0, 0xFF - strb r0, [r1, 0x6] - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - adds r0, 0x1 - bl BattleScriptPush - ldr r0, =gUnknown_082DB307 - str r0, [r4] - b _08051658 - .pool -_08051650: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] -_08051658: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atk91_givepaydaymoney - - thumb_func_start atk92_setlightscreen -atk92_setlightscreen: @ 8051664 - push {r4-r6,lr} - ldr r5, =gBankAttacker - ldrb r0, [r5] - bl GetBankIdentity - ldr r4, =gSideAffecting - movs r6, 0x1 - adds r1, r6, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - ldrh r1, [r1] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _080516A4 - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0 - b _08051718 - .pool -_080516A4: - ldrb r0, [r5] - bl GetBankIdentity - adds r1, r6, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - ldrh r0, [r1] - movs r2, 0x2 - orrs r0, r2 - strh r0, [r1] - ldrb r0, [r5] - bl GetBankIdentity - ldr r4, =gSideTimers - adds r1, r6, 0 - ands r1, r0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - movs r1, 0x5 - strb r1, [r0, 0x2] - ldrb r0, [r5] - bl GetBankIdentity - adds r1, r6, 0 - ands r1, r0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r1, [r5] - strb r1, [r0, 0x3] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ands r0, r6 - cmp r0, 0 - beq _08051714 - movs r0, 0x1 - bl CountAliveMonsInBattle - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - bne _08051714 - ldr r1, =gBattleCommunication - movs r0, 0x4 - b _08051718 - .pool -_08051714: - ldr r1, =gBattleCommunication - movs r0, 0x3 -_08051718: - strb r0, [r1, 0x5] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atk92_setlightscreen - - thumb_func_start atk93_ko_move -atk93_ko_move: @ 8051730 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - ldr r7, =gBattleMons - ldr r6, =gBankTarget - ldrb r2, [r6] - movs r5, 0x58 - adds r0, r2, 0 - muls r0, r5 - adds r1, r0, r7 - ldrh r0, [r1, 0x2E] - cmp r0, 0xAF - bne _08051768 - ldr r1, =gEnigmaBerries - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r1 - ldrb r4, [r0, 0x7] - ldrb r6, [r0, 0x1A] - b _08051782 - .pool -_08051768: - ldrh r0, [r1, 0x2E] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r4, r0, 24 - ldrb r0, [r6] - muls r0, r5 - adds r0, r7 - ldrh r0, [r0, 0x2E] - bl ItemId_GetHoldEffectParam - lsls r0, 24 - lsrs r6, r0, 24 -_08051782: - ldr r1, =gStringBank - ldr r5, =gBankTarget - ldrb r0, [r5] - strb r0, [r1] - cmp r4, 0x27 - bne _080517C0 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x64 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - cmp r0, r6 - bcs _080517C0 - ldrb r0, [r5] - movs r1, 0x27 - bl RecordItemEffectBattle - ldr r2, =gSpecialStatuses - ldrb r1, [r5] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0] - movs r2, 0x80 - orrs r1, r2 - strb r1, [r0] -_080517C0: - ldr r1, =gBattleMons - ldr r2, =gBankTarget - ldrb r3, [r2] - movs r6, 0x58 - adds r0, r3, 0 - muls r0, r6 - adds r5, r0, r1 - adds r0, r5, 0 - adds r0, 0x20 - ldrb r4, [r0] - mov r8, r1 - mov r9, r2 - cmp r4, 0x5 - bne _0805181C - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - ldr r0, =gLastUsedAbility - strb r4, [r0] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB552 - str r0, [r1] - mov r1, r9 - ldrb r0, [r1] - movs r1, 0x5 - bl RecordAbilityBattle - b _08051A70 - .pool -_0805181C: - ldr r1, =gStatuses3 - lsls r0, r3, 2 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x18 - ands r0, r1 - cmp r0, 0 - bne _080518A0 - ldr r1, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r0, [r0] - lsls r2, r0, 1 - adds r2, r0 - lsls r2, 2 - adds r2, r1 - ldr r7, =gBankAttacker - ldrb r0, [r7] - muls r0, r6 - add r0, r8 - adds r0, 0x2A - ldrb r0, [r0] - adds r1, r5, 0 - adds r1, 0x2A - ldrb r1, [r1] - subs r0, r1 - ldrb r2, [r2, 0x3] - adds r0, r2 - lsls r0, 16 - lsrs r4, r0, 16 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x64 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - adds r0, 0x1 - cmp r0, r4 - blt _08051870 - b _08051A08 -_08051870: - ldrb r0, [r7] - adds r1, r0, 0 - muls r1, r6 - add r1, r8 - adds r1, 0x2A - mov r2, r9 - ldrb r0, [r2] - muls r0, r6 - add r0, r8 - adds r0, 0x2A - ldrb r1, [r1] - movs r4, 0x1 - ldrb r0, [r0] - cmp r1, r0 - bcs _08051936 - b _08051A08 - .pool -_080518A0: - ldr r1, =gDisableStructs - lsls r0, r3, 3 - subs r0, r3 - lsls r0, 2 - adds r0, r1 - ldr r1, =gBankAttacker - ldrb r0, [r0, 0x15] - adds r7, r1, 0 - ldrb r3, [r7] - cmp r0, r3 - bne _080518CA - ldrb r0, [r7] - muls r0, r6 - add r0, r8 - adds r0, 0x2A - adds r1, r5, 0 - adds r1, 0x2A - ldrb r0, [r0] - ldrb r1, [r1] - cmp r0, r1 - bcs _08051942 -_080518CA: - ldr r1, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r0, [r0] - lsls r2, r0, 1 - adds r2, r0 - lsls r2, 2 - adds r2, r1 - ldr r6, =gBattleMons - ldrb r0, [r7] - movs r5, 0x58 - muls r0, r5 - adds r0, r6 - adds r0, 0x2A - ldrb r1, [r0] - ldr r0, =gBankTarget - mov r8, r0 - ldrb r0, [r0] - muls r0, r5 - adds r0, r6 - adds r0, 0x2A - ldrb r0, [r0] - subs r1, r0 - ldrb r2, [r2, 0x3] - adds r1, r2 - lsls r1, 16 - lsrs r4, r1, 16 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x64 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - adds r0, 0x1 - cmp r0, r4 - bge _08051934 - ldrb r0, [r7] - adds r1, r0, 0 - muls r1, r5 - adds r1, r6 - adds r1, 0x2A - mov r2, r8 - ldrb r0, [r2] - muls r0, r5 - adds r0, r6 - adds r0, 0x2A - ldrb r1, [r1] - movs r4, 0x1 - ldrb r0, [r0] - cmp r1, r0 - bcs _08051936 -_08051934: - movs r4, 0 -_08051936: - ldr r3, =gBattleMons - mov r8, r3 - ldr r0, =gBankTarget - mov r9, r0 - cmp r4, 0 - beq _08051A08 -_08051942: - ldr r0, =gProtectStructs - mov r1, r9 - ldrb r2, [r1] - lsls r1, r2, 4 - adds r1, r0 - ldrb r0, [r1] - lsls r0, 30 - cmp r0, 0 - bge _08051990 - ldr r1, =gBattleMoveDamage - movs r0, 0x58 - muls r0, r2 - add r0, r8 - ldrh r0, [r0, 0x28] - subs r0, 0x1 - str r0, [r1] - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x40 - b _080519EE - .pool -_08051990: - ldr r0, =gSpecialStatuses - lsls r1, r2, 2 - adds r1, r2 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1] - lsrs r0, 7 - cmp r0, 0 - beq _080519DC - ldr r1, =gBattleMoveDamage - movs r3, 0x58 - adds r0, r2, 0 - muls r0, r3 - add r0, r8 - ldrh r0, [r0, 0x28] - subs r0, 0x1 - str r0, [r1] - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gLastUsedItem - mov r2, r9 - ldrb r0, [r2] - muls r0, r3 - add r0, r8 - ldrh r0, [r0, 0x2E] - strh r0, [r1] - b _080519F2 - .pool -_080519DC: - ldr r1, =gBattleMoveDamage - movs r0, 0x58 - muls r0, r2 - add r0, r8 - ldrh r0, [r0, 0x28] - str r0, [r1] - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x10 -_080519EE: - orrs r0, r1 - strb r0, [r2] -_080519F2: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _08051A70 - .pool -_08051A08: - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - ldr r3, =gBattleMons - ldr r0, =gBankAttacker - ldrb r0, [r0] - movs r2, 0x58 - adds r1, r0, 0 - muls r1, r2 - adds r1, r3 - adds r1, 0x2A - ldr r0, =gBankTarget - ldrb r0, [r0] - muls r0, r2 - adds r0, r3 - adds r0, 0x2A - ldrb r1, [r1] - ldrb r0, [r0] - cmp r1, r0 - bcc _08051A50 - ldr r1, =gBattleCommunication - movs r0, 0 - b _08051A54 - .pool -_08051A50: - ldr r1, =gBattleCommunication - movs r0, 0x1 -_08051A54: - strb r0, [r1, 0x5] - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_08051A70: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk93_ko_move - - thumb_func_start atk94_gethalfcurrentenemyhp -atk94_gethalfcurrentenemyhp: @ 8051A84 - push {lr} - ldr r3, =gBattleMoveDamage - ldr r2, =gBattleMons - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r0, [r0, 0x28] - lsrs r0, 1 - str r0, [r3] - cmp r0, 0 - bne _08051AA2 - movs r0, 0x1 - str r0, [r3] -_08051AA2: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atk94_gethalfcurrentenemyhp - - thumb_func_start atk95_setsandstorm -atk95_setsandstorm: @ 8051AC0 - push {lr} - ldr r2, =gBattleWeather - ldrh r1, [r2] - movs r0, 0x18 - ands r0, r1 - cmp r0, 0 - beq _08051AEC - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0x2 - strb r0, [r1, 0x5] - b _08051AFE - .pool -_08051AEC: - movs r0, 0x8 - strh r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0x3 - strb r0, [r1, 0x5] - ldr r0, =gWishFutureKnock - adds r0, 0x28 - movs r1, 0x5 - strb r1, [r0] -_08051AFE: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atk95_setsandstorm - - thumb_func_start atk96_weatherdamage -atk96_weatherdamage: @ 8051B18 - push {r4,r5,lr} - sub sp, 0x4 - movs r0, 0 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0xD - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - beq _08051B36 - b _08051C48 -_08051B36: - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0x4D - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _08051B4C - b _08051C48 -_08051B4C: - ldr r2, =gBattleWeather - ldrh r1, [r2] - movs r0, 0x18 - ands r0, r1 - adds r4, r2, 0 - ldr r5, =gBankAttacker - cmp r0, 0 - beq _08051BDA - ldr r0, =gBattleMons - ldrb r2, [r5] - movs r1, 0x58 - muls r1, r2 - adds r3, r1, r0 - adds r0, r3, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0x5 - beq _08051BD4 - cmp r0, 0x8 - beq _08051BD4 - cmp r0, 0x4 - beq _08051BD4 - adds r0, r3, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0x5 - beq _08051BD4 - cmp r0, 0x8 - beq _08051BD4 - cmp r0, 0x4 - beq _08051BD4 - adds r0, r3, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x8 - beq _08051BD4 - ldr r0, =gStatuses3 - lsls r1, r2, 2 - adds r1, r0 - ldr r1, [r1] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08051BD4 - movs r0, 0x80 - lsls r0, 11 - ands r1, r0 - cmp r1, 0 - bne _08051BD4 - ldr r1, =gBattleMoveDamage - ldrh r0, [r3, 0x2C] - lsrs r0, 4 - str r0, [r1] - cmp r0, 0 - bne _08051BDA - movs r0, 0x1 - b _08051BD8 - .pool -_08051BD4: - ldr r1, =gBattleMoveDamage - movs r0, 0 -_08051BD8: - str r0, [r1] -_08051BDA: - ldrh r1, [r4] - movs r4, 0x80 - adds r0, r4, 0 - ands r0, r1 - cmp r0, 0 - beq _08051C50 - ldr r1, =gBattleMons - ldrb r3, [r5] - movs r0, 0x58 - muls r0, r3 - adds r2, r0, r1 - adds r0, r2, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0xF - beq _08051C3C - adds r0, r2, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0xF - beq _08051C3C - ldr r0, =gStatuses3 - lsls r1, r3, 2 - adds r1, r0 - ldr r1, [r1] - adds r0, r1, 0 - ands r0, r4 - cmp r0, 0 - bne _08051C3C - movs r0, 0x80 - lsls r0, 11 - ands r1, r0 - cmp r1, 0 - bne _08051C3C - ldr r1, =gBattleMoveDamage - ldrh r0, [r2, 0x2C] - lsrs r0, 4 - str r0, [r1] - cmp r0, 0 - bne _08051C50 - movs r0, 0x1 - str r0, [r1] - b _08051C50 - .pool -_08051C3C: - ldr r1, =gBattleMoveDamage - movs r0, 0 - str r0, [r1] - b _08051C50 - .pool -_08051C48: - ldr r1, =gBattleMoveDamage - movs r0, 0 - str r0, [r1] - ldr r5, =gBankAttacker -_08051C50: - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r2, =gBitTable - ldrb r0, [r5] - lsls r0, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _08051C6A - ldr r1, =gBattleMoveDamage - movs r0, 0 - str r0, [r1] -_08051C6A: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atk96_weatherdamage - - thumb_func_start atk97_try_infatuation -atk97_try_infatuation: @ 8051C90 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r4, =gBankAttacker - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _08051CC8 - ldr r1, =gBattlePartyID - ldrb r0, [r4] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r1, r0 - ldr r0, =gPlayerParty - b _08051CD8 - .pool -_08051CC8: - ldr r1, =gBattlePartyID - ldrb r0, [r4] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r1, r0 - ldr r0, =gEnemyParty -_08051CD8: - adds r5, r1, r0 - ldr r4, =gBankTarget - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _08051D0C - ldr r1, =gBattlePartyID - ldrb r0, [r4] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r1, r0 - ldr r0, =gPlayerParty - b _08051D1C - .pool -_08051D0C: - ldr r1, =gBattlePartyID - ldrb r0, [r4] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r1, r0 - ldr r0, =gEnemyParty -_08051D1C: - adds r4, r1, r0 - adds r0, r5, 0 - movs r1, 0xB - bl GetMonData - lsls r0, 16 - lsrs r0, 16 - mov r10, r0 - adds r0, r5, 0 - movs r1, 0 - bl GetMonData - mov r9, r0 - adds r0, r4, 0 - movs r1, 0xB - bl GetMonData - lsls r0, 16 - lsrs r0, 16 - mov r8, r0 - adds r0, r4, 0 - movs r1, 0 - bl GetMonData - adds r7, r0, 0 - ldr r5, =gBankTarget - ldrb r0, [r5] - movs r6, 0x58 - muls r0, r6 - ldr r1, =gBattleMons - adds r0, r1 - adds r0, 0x20 - ldrb r2, [r0] - cmp r2, 0xC - bne _08051D94 - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB5F5 - str r0, [r1] - ldr r0, =gLastUsedAbility - strb r2, [r0] - ldrb r0, [r5] - movs r1, 0xC - bl RecordAbilityBattle - b _08051E2C - .pool -_08051D94: - mov r0, r10 - mov r1, r9 - bl GetGenderFromSpeciesAndPersonality - adds r4, r0, 0 - mov r0, r8 - adds r1, r7, 0 - bl GetGenderFromSpeciesAndPersonality - lsls r4, 24 - lsls r0, 24 - cmp r4, r0 - beq _08051DE4 - ldrb r0, [r5] - muls r0, r6 - ldr r4, =gBattleMons - adds r4, 0x50 - adds r0, r4 - ldr r0, [r0] - movs r1, 0xF0 - lsls r1, 12 - ands r0, r1 - cmp r0, 0 - bne _08051DE4 - mov r0, r10 - mov r1, r9 - bl GetGenderFromSpeciesAndPersonality - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - beq _08051DE4 - mov r0, r8 - adds r1, r7, 0 - bl GetGenderFromSpeciesAndPersonality - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xFF - bne _08051E08 -_08051DE4: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08051E2C - .pool -_08051E08: - ldrb r0, [r5] - adds r2, r0, 0 - muls r2, r6 - adds r2, r4 - ldr r1, =gBitTable - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - lsls r1, 16 - ldr r0, [r2] - orrs r0, r1 - str r0, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_08051E2C: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk97_try_infatuation - - thumb_func_start atk98_status_icon_update -atk98_status_icon_update: @ 8051E48 - push {r4-r7,lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _08051F34 - ldr r5, =gBattlescriptCurrInstr - ldr r1, [r5] - ldrb r0, [r1, 0x1] - cmp r0, 0x4 - beq _08051EA0 - bl GetBattleBank - ldr r4, =gActiveBank - strb r0, [r4] - ldr r3, =gBattleMons - ldrb r1, [r4] - movs r0, 0x58 - adds r2, r1, 0 - muls r2, r0 - adds r0, r3, 0 - adds r0, 0x4C - adds r0, r2, r0 - ldr r1, [r0] - adds r3, 0x50 - adds r2, r3 - ldr r2, [r2] - movs r0, 0 - bl dp01_build_cmdbuf_x1A_aaaa_bbbb - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r0, [r5] - adds r0, 0x2 - str r0, [r5] - b _08051F34 - .pool -_08051EA0: - ldr r4, =gActiveBank - ldr r5, =gBankAttacker - ldrb r0, [r5] - strb r0, [r4] - ldr r6, =gAbsentBankFlags - ldrb r1, [r6] - ldr r7, =gBitTable - ldrb r2, [r4] - lsls r0, r2, 2 - adds r0, r7 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _08051EDC - ldr r3, =gBattleMons - movs r0, 0x58 - muls r2, r0 - adds r0, r3, 0 - adds r0, 0x4C - adds r0, r2, r0 - ldr r1, [r0] - adds r3, 0x50 - adds r2, r3 - ldr r2, [r2] - movs r0, 0 - bl dp01_build_cmdbuf_x1A_aaaa_bbbb - ldrb r0, [r4] - bl MarkBufferBankForExecution -_08051EDC: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08051F2C - ldrb r0, [r5] - bl GetBankIdentity - movs r1, 0x2 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByPlayerAI - strb r0, [r4] - ldrb r1, [r6] - ldrb r2, [r4] - lsls r0, r2, 2 - adds r0, r7 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _08051F2C - ldr r3, =gBattleMons - movs r0, 0x58 - muls r2, r0 - adds r0, r3, 0 - adds r0, 0x4C - adds r0, r2, r0 - ldr r1, [r0] - adds r3, 0x50 - adds r2, r3 - ldr r2, [r2] - movs r0, 0 - bl dp01_build_cmdbuf_x1A_aaaa_bbbb - ldrb r0, [r4] - bl MarkBufferBankForExecution -_08051F2C: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x2 - str r0, [r1] -_08051F34: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk98_status_icon_update - - thumb_func_start atk99_setmist -atk99_setmist: @ 8051F58 - push {r4-r6,lr} - ldr r6, =gSideTimers - ldr r4, =gBankAttacker - ldrb r0, [r4] - bl GetBankIdentity - movs r5, 0x1 - adds r1, r5, 0 - ands r1, r0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - ldrb r0, [r0, 0x4] - cmp r0, 0 - beq _08051F98 - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x20 - orrs r0, r1 - strb r0, [r2] - ldr r0, =gBattleCommunication - strb r5, [r0, 0x5] - b _08051FE6 - .pool -_08051F98: - ldrb r0, [r4] - bl GetBankIdentity - adds r1, r5, 0 - ands r1, r0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - movs r1, 0x5 - strb r1, [r0, 0x4] - ldrb r0, [r4] - bl GetBankIdentity - adds r1, r5, 0 - ands r1, r0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r6 - ldrb r1, [r4] - strb r1, [r0, 0x5] - ldrb r0, [r4] - bl GetBankIdentity - ldr r2, =gSideAffecting - adds r1, r5, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r2 - ldrh r2, [r1] - movs r3, 0x80 - lsls r3, 1 - adds r0, r3, 0 - movs r3, 0 - orrs r0, r2 - strh r0, [r1] - ldr r0, =gBattleCommunication - strb r3, [r0, 0x5] -_08051FE6: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atk99_setmist - - thumb_func_start atk9A_set_focusenergy -atk9A_set_focusenergy: @ 8052000 - push {lr} - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r1, [r0] - movs r3, 0x80 - lsls r3, 13 - adds r2, r1, 0 - ands r2, r3 - cmp r2, 0 - beq _08052040 - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x20 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] - b _08052048 - .pool -_08052040: - orrs r1, r3 - str r1, [r0] - ldr r0, =gBattleCommunication - strb r2, [r0, 0x5] -_08052048: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atk9A_set_focusenergy - - thumb_func_start atk9B_transformdataexecution -atk9B_transformdataexecution: @ 805205C - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r1, =gLastUsedMove - ldr r2, =0x0000ffff - adds r0, r2, 0 - strh r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - ldr r7, =gBattleMons - ldr r0, =gBankTarget - mov r12, r0 - ldrb r1, [r0] - movs r6, 0x58 - adds r0, r1, 0 - muls r0, r6 - adds r5, r7, 0 - adds r5, 0x50 - adds r0, r5 - ldr r0, [r0] - movs r4, 0x80 - lsls r4, 14 - ands r0, r4 - cmp r0, 0 - bne _080520A2 - ldr r0, =gStatuses3 - lsls r1, 2 - adds r1, r0 - ldr r2, [r1] - ldr r0, =0x000400c0 - ands r2, r0 - cmp r2, 0 - beq _080520D8 -_080520A2: - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x20 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0x1 - b _080521EC - .pool -_080520D8: - ldr r3, =gBankAttacker - ldrb r0, [r3] - adds r1, r0, 0 - muls r1, r6 - adds r1, r5 - ldr r0, [r1] - orrs r0, r4 - str r0, [r1] - ldr r4, =gDisableStructs - ldrb r1, [r3] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r4 - strh r2, [r0, 0x4] - ldrb r0, [r3] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r1, r4 - ldrb r2, [r1, 0xB] - movs r0, 0x10 - negs r0, r0 - ands r0, r2 - strb r0, [r1, 0xB] - ldrb r1, [r3] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r4 - mov r2, r12 - ldrb r1, [r2] - muls r1, r6 - adds r2, r7, 0 - adds r2, 0x48 - adds r1, r2 - ldr r1, [r1] - str r1, [r0] - ldrb r0, [r3] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r1, r4 - ldrb r2, [r1, 0x18] - movs r0, 0xF - ands r0, r2 - strb r0, [r1, 0x18] - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x6 - strb r0, [r1, 0x1] - mov r2, r12 - ldrb r0, [r2] - muls r0, r6 - adds r0, r7 - ldrh r0, [r0] - strb r0, [r1, 0x2] - ldrb r0, [r2] - muls r0, r6 - adds r0, r7 - ldrh r0, [r0] - lsrs r0, 8 - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldrb r0, [r3] - muls r0, r6 - adds r5, r0, r7 - ldrb r0, [r2] - muls r0, r6 - adds r2, r0, r7 - movs r4, 0 - adds r6, r3, 0 - ldr r0, =gActiveBank - mov r8, r0 -_08052170: - adds r0, r5, r4 - adds r1, r2, r4 - ldrb r1, [r1] - strb r1, [r0] - adds r4, 0x1 - cmp r4, 0x23 - bls _08052170 - movs r4, 0 - ldr r7, =gBattleMoves - ldr r3, =gBattleMons + 0xC - adds r5, r3, 0 - adds r5, 0x18 -_08052188: - lsls r1, r4, 1 - ldrb r2, [r6] - movs r0, 0x58 - muls r2, r0 - adds r1, r2 - adds r1, r3 - ldrh r1, [r1] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r7 - ldrb r1, [r0, 0x4] - cmp r1, 0x4 - bhi _080521C4 - adds r0, r4, r2 - adds r0, r5 - b _080521CA - .pool -_080521C4: - adds r0, r4, r2 - adds r0, r5 - movs r1, 0x5 -_080521CA: - strb r1, [r0] - adds r4, 0x1 - cmp r4, 0x3 - ble _08052188 - ldrb r0, [r6] - mov r1, r8 - strb r0, [r1] - movs r0, 0 - movs r1, 0x2 - bl dp01_build_cmdbuf_x38_a - mov r2, r8 - ldrb r0, [r2] - bl MarkBufferBankForExecution - ldr r1, =gBattleCommunication - movs r0, 0 -_080521EC: - strb r0, [r1, 0x5] - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk9B_transformdataexecution - - thumb_func_start atk9C_set_substitute -atk9C_set_substitute: @ 80521FC - push {r4-r7,lr} - ldr r7, =gBattleMons - ldr r6, =gBankAttacker - ldrb r0, [r6] - movs r5, 0x58 - muls r0, r5 - adds r3, r0, r7 - ldrh r0, [r3, 0x2C] - lsrs r1, r0, 2 - adds r2, r1, 0 - cmp r1, 0 - bne _08052216 - movs r2, 0x1 -_08052216: - ldrh r0, [r3, 0x28] - cmp r0, r2 - bhi _0805223C - ldr r1, =gBattleMoveDamage - movs r0, 0 - str r0, [r1] - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] - b _08052290 - .pool -_0805223C: - ldr r4, =gBattleMoveDamage - str r1, [r4] - cmp r1, 0 - bne _08052248 - movs r0, 0x1 - str r0, [r4] -_08052248: - ldrb r0, [r6] - adds r2, r0, 0 - muls r2, r5 - adds r3, r7, 0 - adds r3, 0x50 - adds r2, r3 - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 17 - orrs r0, r1 - str r0, [r2] - ldrb r0, [r6] - adds r1, r0, 0 - muls r1, r5 - adds r1, r3 - ldr r0, [r1] - ldr r2, =0xffff1fff - ands r0, r2 - str r0, [r1] - ldr r2, =gDisableStructs - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - ldr r1, [r4] - movs r2, 0 - strb r1, [r0, 0xA] - ldr r0, =gBattleCommunication - strb r2, [r0, 0x5] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 1 - orrs r0, r1 - str r0, [r2] -_08052290: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk9C_set_substitute - - thumb_func_start sub_80522B8 -sub_80522B8: @ 80522B8 - push {r4,r5,lr} - lsls r0, 16 - lsrs r2, r0, 16 - movs r3, 0 - ldr r0, =gUnknown_0831C3E0 - ldrh r1, [r0] - ldr r4, =0x0000fffe - adds r5, r0, 0 - cmp r1, r4 - beq _080522E0 - cmp r1, r2 - beq _080522E0 - adds r1, r5, 0 -_080522D2: - adds r1, 0x2 - adds r3, 0x1 - ldrh r0, [r1] - cmp r0, r4 - beq _080522E0 - cmp r0, r2 - bne _080522D2 -_080522E0: - lsls r0, r3, 1 - adds r0, r5 - ldrh r1, [r0] - ldr r0, =0x0000fffe - eors r1, r0 - negs r0, r1 - orrs r0, r1 - lsrs r0, 31 - pop {r4,r5} - pop {r1} - bx r1 - .pool - thumb_func_end sub_80522B8 - - thumb_func_start atk9D_copyattack -atk9D_copyattack: @ 8052300 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r0, =gLastUsedMove - ldr r1, =0x0000ffff - adds r7, r1, 0 - strh r7, [r0] - ldr r5, =gLastUsedMovesByBanks - ldr r6, =gBankTarget - ldrb r0, [r6] - lsls r0, 1 - adds r0, r5 - ldrh r0, [r0] - bl sub_80522B8 - lsls r0, 24 - cmp r0, 0 - bne _0805235A - ldr r3, =gBattleMons - ldr r2, =gBankAttacker - ldrb r1, [r2] - movs r0, 0x58 - adds r4, r1, 0 - muls r4, r0 - adds r0, r3, 0 - adds r0, 0x50 - adds r0, r4, r0 - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 14 - ands r1, r0 - mov r12, r3 - mov r9, r2 - cmp r1, 0 - bne _0805235A - ldrb r0, [r6] - lsls r0, 1 - adds r0, r5 - ldrh r1, [r0] - cmp r1, 0 - beq _0805235A - cmp r1, r7 - bne _08052394 -_0805235A: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _080524CC - .pool -_08052394: - movs r2, 0 - mov r3, r12 - adds r3, 0xC - adds r0, r4, r3 - ldrh r0, [r0] - ldr r4, =gBattlescriptCurrInstr - mov r10, r4 - cmp r0, r1 - beq _080523CE - mov r8, r3 - adds r7, r5, 0 - adds r5, r6, 0 - mov r4, r9 - movs r3, 0x58 -_080523B0: - adds r2, 0x1 - cmp r2, 0x3 - bgt _080523CE - lsls r1, r2, 1 - ldrb r0, [r4] - muls r0, r3 - adds r1, r0 - add r1, r8 - ldrb r0, [r5] - lsls r0, 1 - adds r0, r7 - ldrh r1, [r1] - ldrh r0, [r0] - cmp r1, r0 - bne _080523B0 -_080523CE: - cmp r2, 0x4 - bne _080524B0 - ldr r5, =gCurrMovePos - ldrb r1, [r5] - lsls r1, 1 - mov r2, r9 - ldrb r0, [r2] - movs r6, 0x58 - muls r0, r6 - adds r1, r0 - mov r0, r12 - adds r0, 0xC - adds r1, r0 - ldr r2, =gLastUsedMovesByBanks - ldr r3, =gBankTarget - ldrb r0, [r3] - lsls r0, 1 - adds r0, r2 - ldrh r0, [r0] - strh r0, [r1] - ldr r4, =gBattleMoves - ldrb r0, [r3] - lsls r0, 1 - adds r0, r2 - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r4, [r0, 0x4] - cmp r4, 0x4 - bhi _08052438 - mov r1, r9 - ldrb r0, [r1] - muls r0, r6 - ldrb r1, [r5] - adds r0, r1 - mov r1, r12 - adds r1, 0x24 - adds r0, r1 - strb r4, [r0] - b _0805244C - .pool -_08052438: - mov r4, r9 - ldrb r0, [r4] - muls r0, r6 - ldrb r1, [r5] - adds r0, r1 - mov r1, r12 - adds r1, 0x24 - adds r0, r1 - movs r1, 0x5 - strb r1, [r0] -_0805244C: - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x2 - strb r0, [r1, 0x1] - ldrb r0, [r3] - lsls r0, 1 - adds r0, r2 - ldrh r0, [r0] - strb r0, [r1, 0x2] - ldrb r0, [r3] - lsls r0, 1 - adds r0, r2 - ldrh r0, [r0] - lsrs r0, 8 - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r1, =gDisableStructs - mov r2, r9 - ldrb r0, [r2] - lsls r2, r0, 3 - subs r2, r0 - lsls r2, 2 - adds r2, r1 - ldrb r4, [r2, 0x18] - lsrs r3, r4, 4 - ldr r1, =gBitTable - ldrb r0, [r5] - lsls r0, 2 - adds r0, r1 - ldr r1, [r0] - orrs r1, r3 - lsls r1, 4 - movs r0, 0xF - ands r0, r4 - orrs r0, r1 - strb r0, [r2, 0x18] - mov r4, r10 - ldr r0, [r4] - adds r0, 0x5 - str r0, [r4] - b _080524CC - .pool -_080524B0: - mov r0, r10 - ldr r2, [r0] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - mov r2, r10 - str r1, [r2] -_080524CC: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end atk9D_copyattack - - thumb_func_start atk9E_metronome -atk9E_metronome: @ 80524DC - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r7, =gCurrentMove - movs r6, 0xB1 - lsls r6, 1 - ldr r5, =gUnknown_0831C3E0 - ldr r0, =gBattlescriptCurrInstr - mov r8, r0 -_080524EE: - bl Random - ldr r2, =0x000001ff - adds r1, r2, 0 - ands r0, r1 - adds r0, 0x1 - strh r0, [r7] - cmp r0, r6 - bhi _080524EE - movs r0, 0x3 -_08052502: - subs r0, 0x1 - cmp r0, 0 - bge _08052502 - ldr r4, =gCurrentMove - ldrh r2, [r4] - ldr r3, =0x0000ffff - subs r0, r5, 0x2 -_08052510: - adds r0, 0x2 - ldrh r1, [r0] - cmp r1, r2 - beq _0805251C - cmp r1, r3 - bne _08052510 -_0805251C: - ldr r0, =0x0000ffff - cmp r1, r0 - bne _080524EE - ldr r2, =gHitMarker - ldr r0, [r2] - ldr r1, =0xfffffbff - ands r0, r1 - str r0, [r2] - ldr r3, =gBattleScriptsForMoveEffects - ldr r2, =gBattleMoves - ldrh r1, [r4] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - mov r1, r8 - str r0, [r1] - ldrh r0, [r4] - movs r1, 0 - bl GetMoveTarget - ldr r1, =gBankTarget - strb r0, [r1] - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atk9E_metronome - - thumb_func_start atk9F_dmgtolevel -atk9F_dmgtolevel: @ 8052584 - ldr r3, =gBattleMoveDamage - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x2A - ldrb r0, [r0] - str r0, [r3] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end atk9F_dmgtolevel - - thumb_func_start atkA0_psywavedamageeffect -atkA0_psywavedamageeffect: @ 80525B4 - push {r4,lr} - movs r4, 0xF -_080525B8: - bl Random - adds r3, r4, 0 - ands r3, r0 - cmp r3, 0xA - bgt _080525B8 - lsls r0, r3, 2 - adds r0, r3 - lsls r3, r0, 1 - ldr r4, =gBattleMoveDamage - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x2A - ldrb r1, [r0] - adds r0, r3, 0 - adds r0, 0x32 - muls r0, r1 - movs r1, 0x64 - bl __divsi3 - str r0, [r4] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkA0_psywavedamageeffect - - thumb_func_start atkA1_counterdamagecalculator -atkA1_counterdamagecalculator: @ 8052608 - push {r4-r6,lr} - ldr r4, =gBankAttacker - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - lsrs r6, r0, 24 - ldr r5, =gProtectStructs - ldrb r0, [r4] - lsls r0, 4 - adds r0, r5 - ldrb r0, [r0, 0xC] - bl GetBankSide - lsls r0, 24 - lsrs r2, r0, 24 - ldrb r0, [r4] - lsls r1, r0, 4 - adds r0, r5, 0x4 - adds r0, r1, r0 - ldr r3, [r0] - cmp r3, 0 - beq _080526BC - cmp r6, r2 - beq _080526BC - ldr r6, =gBattleMons - adds r0, r1, r5 - ldrb r0, [r0, 0xC] - movs r4, 0x58 - muls r0, r4 - adds r0, r6 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _080526BC - ldr r1, =gBattleMoveDamage - lsls r0, r3, 1 - str r0, [r1] - ldr r1, =gSideTimers - lsls r0, r2, 1 - adds r0, r2 - lsls r0, 2 - adds r1, r0, r1 - ldrb r0, [r1, 0x8] - cmp r0, 0 - beq _08052690 - ldrb r1, [r1, 0x9] - adds r0, r1, 0 - muls r0, r4 - adds r0, r6 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _08052690 - ldr r0, =gBankTarget - strb r1, [r0] - b _080526A0 - .pool -_08052690: - ldr r2, =gBankTarget - ldr r1, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0, 0xC] - strb r0, [r2] -_080526A0: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _080526EC - .pool -_080526BC: - ldr r2, =gSpecialStatuses - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0] - movs r2, 0x20 - orrs r1, r2 - strb r1, [r0] - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_080526EC: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atkA1_counterdamagecalculator - - thumb_func_start atkA2_mirrorcoatdamagecalculator -atkA2_mirrorcoatdamagecalculator: @ 8052700 - push {r4-r6,lr} - ldr r4, =gBankAttacker - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - lsrs r6, r0, 24 - ldr r5, =gProtectStructs - ldrb r0, [r4] - lsls r0, 4 - adds r0, r5 - ldrb r0, [r0, 0xD] - bl GetBankSide - lsls r0, 24 - lsrs r2, r0, 24 - ldrb r0, [r4] - lsls r1, r0, 4 - adds r0, r5, 0 - adds r0, 0x8 - adds r0, r1, r0 - ldr r3, [r0] - cmp r3, 0 - beq _080527B4 - cmp r6, r2 - beq _080527B4 - ldr r6, =gBattleMons - adds r0, r1, r5 - ldrb r0, [r0, 0xD] - movs r4, 0x58 - muls r0, r4 - adds r0, r6 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _080527B4 - ldr r1, =gBattleMoveDamage - lsls r0, r3, 1 - str r0, [r1] - ldr r1, =gSideTimers - lsls r0, r2, 1 - adds r0, r2 - lsls r0, 2 - adds r1, r0, r1 - ldrb r0, [r1, 0x8] - cmp r0, 0 - beq _08052788 - ldrb r1, [r1, 0x9] - adds r0, r1, 0 - muls r0, r4 - adds r0, r6 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _08052788 - ldr r0, =gBankTarget - strb r1, [r0] - b _08052798 - .pool -_08052788: - ldr r2, =gBankTarget - ldr r1, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0, 0xD] - strb r0, [r2] -_08052798: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _080527E4 - .pool -_080527B4: - ldr r2, =gSpecialStatuses - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0] - movs r2, 0x20 - orrs r1, r2 - strb r1, [r0] - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_080527E4: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atkA2_mirrorcoatdamagecalculator - - thumb_func_start atkA3_disablelastusedattack -atkA3_disablelastusedattack: @ 80527F8 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - movs r4, 0 - ldr r2, =gBattleMons - ldr r3, =gBankTarget - ldrb r1, [r3] - movs r0, 0x58 - muls r0, r1 - adds r7, r2, 0 - adds r7, 0xC - adds r0, r7 - ldr r5, =gLastUsedMovesByBanks - lsls r1, 1 - adds r1, r5 - ldrh r0, [r0] - mov r9, r2 - adds r6, r3, 0 - ldr r2, =gDisableStructs - mov r8, r2 - ldrh r1, [r1] - cmp r0, r1 - beq _0805284C - mov r12, r6 - movs r3, 0x58 -_0805282C: - adds r4, 0x1 - cmp r4, 0x3 - bgt _0805284C - lsls r2, r4, 1 - mov r0, r12 - ldrb r1, [r0] - adds r0, r1, 0 - muls r0, r3 - adds r2, r0 - adds r2, r7 - lsls r1, 1 - adds r1, r5 - ldrh r0, [r2] - ldrh r1, [r1] - cmp r0, r1 - bne _0805282C -_0805284C: - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r8 - ldrh r0, [r0, 0x4] - cmp r0, 0 - bne _08052910 - cmp r4, 0x4 - beq _08052910 - movs r5, 0x58 - adds r0, r1, 0 - muls r0, r5 - adds r0, r4, r0 - mov r1, r9 - adds r1, 0x24 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - beq _08052910 - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x2 - strb r0, [r1, 0x1] - lsls r2, r4, 1 - ldrb r0, [r6] - muls r0, r5 - adds r0, r2, r0 - mov r3, r9 - adds r3, 0xC - adds r0, r3 - ldrh r0, [r0] - strb r0, [r1, 0x2] - ldrb r0, [r6] - muls r0, r5 - adds r0, r2, r0 - adds r0, r3 - ldrh r0, [r0] - lsrs r0, 8 - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r8 - muls r1, r5 - adds r2, r1 - adds r2, r3 - ldrh r1, [r2] - strh r1, [r0, 0x4] - bl Random - ldrb r2, [r6] - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - add r1, r8 - movs r2, 0x3 - ands r2, r0 - adds r2, 0x2 - ldrb r3, [r1, 0xB] - movs r0, 0x10 - negs r0, r0 - ands r0, r3 - orrs r0, r2 - strb r0, [r1, 0xB] - ldrb r0, [r6] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - add r1, r8 - ldrb r3, [r1, 0xB] - lsls r2, r3, 28 - lsrs r2, 24 - movs r0, 0xF - ands r0, r3 - orrs r0, r2 - strb r0, [r1, 0xB] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _0805292A - .pool -_08052910: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_0805292A: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkA3_disablelastusedattack - - thumb_func_start atkA4_setencore -atkA4_setencore: @ 805293C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - movs r5, 0 - ldr r3, =gBattleMons - ldr r4, =gBankTarget - ldrb r1, [r4] - movs r0, 0x58 - muls r0, r1 - adds r6, r3, 0 - adds r6, 0xC - adds r0, r6 - ldr r2, =gLastUsedMovesByBanks - lsls r1, 1 - adds r1, r2 - ldrh r0, [r0] - mov r10, r3 - mov r8, r2 - ldr r2, =gDisableStructs - mov r9, r2 - ldrh r1, [r1] - cmp r0, r1 - beq _08052996 - mov r12, r4 - adds r7, r6, 0 - mov r6, r8 - movs r3, 0x58 -_08052976: - adds r5, 0x1 - cmp r5, 0x3 - bgt _08052996 - lsls r2, r5, 1 - mov r0, r12 - ldrb r1, [r0] - adds r0, r1, 0 - muls r0, r3 - adds r2, r0 - adds r2, r7 - lsls r1, 1 - adds r1, r6 - ldrh r0, [r2] - ldrh r1, [r1] - cmp r0, r1 - bne _08052976 -_08052996: - ldrb r0, [r4] - lsls r0, 1 - add r0, r8 - ldrh r2, [r0] - cmp r2, 0xA5 - beq _080529AA - cmp r2, 0xE3 - beq _080529AA - cmp r2, 0x77 - bne _080529AC -_080529AA: - movs r5, 0x4 -_080529AC: - ldrb r1, [r4] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - mov r2, r9 - adds r3, r0, r2 - ldrh r0, [r3, 0x6] - cmp r0, 0 - bne _08052A44 - cmp r5, 0x4 - beq _08052A44 - movs r0, 0x58 - adds r2, r1, 0 - muls r2, r0 - adds r0, r5, r2 - mov r1, r10 - adds r1, 0x24 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - beq _08052A44 - lsls r0, r5, 1 - adds r0, r2 - subs r1, 0x18 - adds r0, r1 - ldrh r0, [r0] - strh r0, [r3, 0x6] - ldrb r1, [r4] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r9 - strb r5, [r0, 0xC] - bl Random - ldrb r2, [r4] - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - add r1, r9 - movs r2, 0x3 - ands r2, r0 - adds r2, 0x3 - ldrb r3, [r1, 0xE] - movs r0, 0x10 - negs r0, r0 - ands r0, r3 - orrs r0, r2 - strb r0, [r1, 0xE] - ldrb r0, [r4] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - add r1, r9 - ldrb r3, [r1, 0xE] - lsls r2, r3, 28 - lsrs r2, 24 - movs r0, 0xF - ands r0, r3 - orrs r0, r2 - strb r0, [r1, 0xE] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _08052A5E - .pool -_08052A44: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_08052A5E: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkA4_setencore - - thumb_func_start atkA5_painsplitdmgcalc -atkA5_painsplitdmgcalc: @ 8052A70 - push {r4-r7,lr} - ldr r6, =gBattleMons - ldr r0, =gBankTarget - mov r12, r0 - ldrb r0, [r0] - movs r7, 0x58 - adds r2, r0, 0 - muls r2, r7 - adds r0, r6, 0 - adds r0, 0x50 - adds r0, r2, r0 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 17 - ands r0, r1 - cmp r0, 0 - bne _08052B10 - ldr r5, =gBankAttacker - ldrb r0, [r5] - muls r0, r7 - adds r0, r6 - ldrh r3, [r0, 0x28] - adds r0, r2, r6 - ldrh r1, [r0, 0x28] - adds r3, r1 - asrs r3, 1 - ldr r4, =gBattleMoveDamage - subs r1, r3 - str r1, [r4] - ldr r2, =gBattleScripting - strb r1, [r2] - movs r0, 0xFF - lsls r0, 8 - ands r0, r1 - asrs r0, 8 - strb r0, [r2, 0x1] - movs r0, 0xFF - lsls r0, 16 - ands r0, r1 - asrs r0, 16 - strb r0, [r2, 0x2] - lsrs r1, 24 - strb r1, [r2, 0x3] - ldrb r0, [r5] - muls r0, r7 - adds r0, r6 - ldrh r0, [r0, 0x28] - subs r0, r3 - str r0, [r4] - ldr r2, =gSpecialStatuses - mov r0, r12 - ldrb r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r2, 0x4 - adds r0, r2 - ldr r1, =0x0000ffff - str r1, [r0] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _08052B2A - .pool -_08052B10: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_08052B2A: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkA5_painsplitdmgcalc - - thumb_func_start atkA6_settypetorandomresistance -atkA6_settypetorandomresistance: @ 8052B34 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r1, =gUnknown_02024250 - ldr r4, =gBankAttacker - ldrb r0, [r4] - lsls r0, 1 - adds r2, r0, r1 - ldrh r1, [r2] - cmp r1, 0 - beq _08052B7E - ldr r0, =0x0000ffff - cmp r1, r0 - beq _08052B7E - ldrh r0, [r2] - bl IsTwoTurnsMove - lsls r0, 24 - cmp r0, 0 - beq _08052C1C - ldr r1, =gBattleMons - ldr r2, =gUnknown_02024270 - ldrb r0, [r4] - adds r0, r2 - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 5 - ands r0, r1 - cmp r0, 0 - beq _08052C1C -_08052B7E: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08052D08 - .pool -_08052BB4: - mov r0, r12 - strb r5, [r0] - mov r1, r10 - ldrb r0, [r1] - muls r0, r2 - adds r0, r7 - adds r0, 0x22 - strb r5, [r0] - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x3 - strb r0, [r1, 0x1] - strb r5, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - ldr r1, =gBattlescriptCurrInstr - b _08052C0A - .pool -_08052BE0: - mov r0, r8 - adds r0, 0x1 - adds r0, r3 - ldrb r2, [r0] - strb r2, [r4] - mov r4, r10 - ldrb r0, [r4] - muls r0, r6 - ldr r7, =gBattleMons - adds r0, r7 - adds r0, 0x22 - strb r2, [r0] - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x3 - strb r0, [r1, 0x1] - strb r2, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - mov r1, r12 -_08052C0A: - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _08052D08 - .pool -_08052C1C: - movs r4, 0 - mov r8, r4 - movs r7, 0x7F - mov r9, r7 -_08052C24: - bl Random - mov r4, r9 - ands r4, r0 - cmp r4, 0x70 - bhi _08052C24 - lsls r0, r4, 1 - adds r4, r0, r4 - ldr r6, =gTypeEffectiveness - adds r3, r4, r6 - ldr r1, =gUnknown_02024258 - ldr r2, =gBankAttacker - ldrb r5, [r2] - lsls r0, r5, 1 - adds r0, r1 - ldrb r1, [r3] - mov r10, r2 - ldrh r0, [r0] - cmp r1, r0 - bne _08052C80 - adds r0, r4, 0x2 - adds r0, r6 - ldrb r0, [r0] - cmp r0, 0x5 - bhi _08052C80 - ldr r7, =gBattleMons - movs r2, 0x58 - adds r0, r5, 0 - muls r0, r2 - adds r3, r0, r7 - movs r0, 0x21 - adds r0, r3 - mov r12, r0 - adds r0, r4, 0x1 - adds r0, r6 - ldrb r5, [r0] - mov r1, r12 - ldrb r0, [r1] - adds r1, r5, 0 - cmp r0, r1 - beq _08052C80 - adds r0, r3, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, r1 - bne _08052BB4 -_08052C80: - movs r7, 0x1 - add r8, r7 - ldr r0, =0x000003e7 - cmp r8, r0 - ble _08052C24 - movs r0, 0 - mov r8, r0 - ldr r1, =gBattlescriptCurrInstr - mov r12, r1 - ldr r3, =gTypeEffectiveness - adds r0, r4, 0x1 - adds r0, r3 - mov r9, r0 - adds r5, r3, 0 -_08052C9C: - ldrb r1, [r5] - cmp r1, 0xFF - bgt _08052CA6 - cmp r1, 0xFE - bge _08052CE0 -_08052CA6: - mov r4, r10 - ldrb r2, [r4] - lsls r0, r2, 1 - ldr r7, =gUnknown_02024258 - adds r0, r7 - ldrh r0, [r0] - cmp r1, r0 - bne _08052CE0 - ldrb r0, [r5, 0x2] - cmp r0, 0x5 - bhi _08052CE0 - movs r6, 0x58 - adds r0, r2, 0 - muls r0, r6 - ldr r1, =gBattleMons - adds r2, r0, r1 - adds r4, r2, 0 - adds r4, 0x21 - ldrb r0, [r4] - mov r7, r9 - ldrb r1, [r7] - cmp r0, r1 - beq _08052CE0 - adds r0, r2, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, r1 - beq _08052CE0 - b _08052BE0 -_08052CE0: - adds r5, 0x3 - movs r0, 0x3 - add r8, r0 - ldr r0, =0x0000014f - cmp r8, r0 - bls _08052C9C - mov r1, r12 - ldr r2, [r1] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - mov r4, r12 - str r1, [r4] -_08052D08: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkA6_settypetorandomresistance - - thumb_func_start atkA7_setalwayshitflag -atkA7_setalwayshitflag: @ 8052D34 - push {r4,lr} - ldr r4, =gStatuses3 - ldr r3, =gBankTarget - ldrb r1, [r3] - lsls r1, 2 - adds r1, r4 - ldr r0, [r1] - movs r2, 0x19 - negs r2, r2 - ands r0, r2 - str r0, [r1] - ldrb r1, [r3] - lsls r1, 2 - adds r1, r4 - ldr r0, [r1] - movs r2, 0x10 - orrs r0, r2 - str r0, [r1] - ldr r2, =gDisableStructs - ldrb r1, [r3] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - ldr r1, =gBankAttacker - ldrb r1, [r1] - strb r1, [r0, 0x15] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkA7_setalwayshitflag - - thumb_func_start atkA8_copymovepermanently -atkA8_copymovepermanently: @ 8052D8C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x14 - ldr r0, =gLastUsedMove - ldr r1, =0x0000ffff - adds r5, r1, 0 - strh r5, [r0] - ldr r3, =gBattleMons - ldr r2, =gBankAttacker - ldrb r1, [r2] - movs r0, 0x58 - adds r4, r1, 0 - muls r4, r0 - adds r0, r3, 0 - adds r0, 0x50 - adds r0, r4, r0 - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 14 - ands r1, r0 - mov r12, r3 - mov r10, r2 - cmp r1, 0 - beq _08052DC4 - b _08052F18 -_08052DC4: - ldr r0, =gUnknownMovesUsedByBanks - ldr r2, =gBankTarget - ldrb r1, [r2] - lsls r1, 1 - adds r1, r0 - ldrh r1, [r1] - mov r9, r0 - mov r8, r2 - cmp r1, 0xA5 - bne _08052DDA - b _08052F18 -_08052DDA: - cmp r1, 0 - bne _08052DE0 - b _08052F18 -_08052DE0: - cmp r1, r5 - bne _08052DE6 - b _08052F18 -_08052DE6: - cmp r1, 0xA6 - bne _08052DEC - b _08052F18 -_08052DEC: - movs r7, 0 - mov r5, r9 - mov r0, r12 - adds r0, 0xC - adds r1, r4, r0 - mov r3, r8 -_08052DF8: - ldrh r2, [r1] - cmp r2, 0xA6 - beq _08052E0A - ldrb r0, [r3] - lsls r0, 1 - adds r0, r5 - ldrh r0, [r0] - cmp r2, r0 - beq _08052E12 -_08052E0A: - adds r1, 0x2 - adds r7, 0x1 - cmp r7, 0x3 - ble _08052DF8 -_08052E12: - cmp r7, 0x4 - beq _08052E18 - b _08052F18 -_08052E18: - ldr r4, =gCurrMovePos - ldrb r1, [r4] - lsls r1, 1 - mov r2, r10 - ldrb r0, [r2] - movs r3, 0x58 - muls r0, r3 - adds r1, r0 - mov r6, r12 - adds r6, 0xC - adds r1, r6 - mov r2, r8 - ldrb r0, [r2] - lsls r0, 1 - add r0, r9 - ldrh r0, [r0] - strh r0, [r1] - mov r1, r10 - ldrb r0, [r1] - adds r2, r0, 0 - muls r2, r3 - ldrb r4, [r4] - adds r2, r4 - mov r5, r12 - adds r5, 0x24 - adds r2, r5 - ldr r4, =gBattleMoves - mov r1, r8 - ldrb r0, [r1] - lsls r0, 1 - add r0, r9 - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r0, [r0, 0x4] - strb r0, [r2] - ldr r1, =gActiveBank - mov r2, r10 - ldrb r0, [r2] - strb r0, [r1] - movs r7, 0 - ldrb r0, [r2] - muls r0, r3 - adds r4, r0, r5 - adds r3, r0, 0 - add r2, sp, 0x4 - add r5, sp, 0xC -_08052E7A: - adds r0, r3, r6 - ldrh r0, [r0] - strh r0, [r2] - adds r1, r5, r7 - ldrb r0, [r4] - strb r0, [r1] - adds r4, 0x1 - adds r3, 0x2 - adds r2, 0x2 - adds r7, 0x1 - cmp r7, 0x3 - ble _08052E7A - add r2, sp, 0x4 - mov r0, r10 - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - add r0, r12 - adds r0, 0x3B - ldrb r0, [r0] - strb r0, [r2, 0xC] - str r2, [sp] - movs r0, 0 - movs r1, 0x3 - movs r2, 0 - movs r3, 0x10 - bl EmitSetAttributes - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x2 - strb r0, [r1, 0x1] - ldr r3, =gUnknownMovesUsedByBanks - ldr r2, =gBankTarget - ldrb r0, [r2] - lsls r0, 1 - adds r0, r3 - ldrh r0, [r0] - strb r0, [r1, 0x2] - ldrb r0, [r2] - lsls r0, 1 - adds r0, r3 - ldrh r0, [r0] - lsrs r0, 8 - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _08052F32 - .pool -_08052F18: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_08052F32: - add sp, 0x14 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkA8_copymovepermanently - thumb_func_start IsTwoTurnsMove IsTwoTurnsMove: @ 8052F48 push {lr} @@ -8028,7 +558,7 @@ _08053304: movs r0, 0 movs r2, 0 movs r3, 0x1 - bl EmitSetAttributes + bl EmitSetMonData ldrb r0, [r4] bl MarkBufferBankForExecution _080533B8: @@ -8155,7 +685,7 @@ _080534D4: eors r0, r1 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBattleScripting strb r0, [r1, 0x17] strb r0, [r7] @@ -8330,7 +860,7 @@ _0805363E: eors r0, r1 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r4, =gActiveBank strb r0, [r4] ldr r0, =gBattleTypeFlags @@ -8373,7 +903,7 @@ _080536BC: movs r0, 0 movs r1, 0x28 movs r3, 0x4 - bl EmitSetAttributes + bl EmitSetMonData ldrb r0, [r4] bl MarkBufferBankForExecution _080536DE: @@ -9311,7 +1841,7 @@ _08053EF8: _08053F10: movs r0, 0x2 _08053F12: - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBankTarget strb r0, [r1] ldr r0, =gUnknown_0202421C @@ -10852,7 +3382,7 @@ atkCD_cureifburnedparalysedorpoisoned: @ 8054C60 movs r1, 0x28 movs r2, 0 movs r3, 0x4 - bl EmitSetAttributes + bl EmitSetMonData ldrb r0, [r4] bl MarkBufferBankForExecution b _08054CD6 @@ -11035,7 +3565,7 @@ atkD1_set_helpinghand: @ 8054E0C eors r0, r1 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r3, =gBankTarget strb r0, [r3] ldr r0, =gBattleTypeFlags @@ -11283,7 +3813,7 @@ _08055010: movs r1, 0x2 movs r2, 0 movs r3, 0x2 - bl EmitSetAttributes + bl EmitSetMonData ldr r1, =gBankAttacker ldrb r0, [r1] bl MarkBufferBankForExecution @@ -11299,7 +3829,7 @@ _08055010: movs r1, 0x2 movs r2, 0 movs r3, 0x2 - bl EmitSetAttributes + bl EmitSetMonData ldrb r0, [r7] bl MarkBufferBankForExecution ldrb r0, [r7] @@ -12179,7 +4709,7 @@ _08055798: adds r1, r5, 0x1 cmp r0, 0 bne _080557EE - ldr r0, =gUnknown_0831C3E0 + ldr r0, =gMovesForbiddenToCopy ldrh r2, [r0] adds r3, r0, 0 cmp r2, r8 @@ -12525,7 +5055,7 @@ atkE2_switchout_abilities: @ 8055A78 movs r0, 0 movs r1, 0x28 movs r3, 0x4 - bl EmitSetAttributes + bl EmitSetMonData ldrb r0, [r4] bl MarkBufferBankForExecution _08055AD2: @@ -13179,7 +5709,7 @@ atkEA_recycleitem: @ 8056014 movs r1, 0x2 movs r2, 0 movs r3, 0x2 - bl EmitSetAttributes + bl EmitSetMonData ldrb r0, [r7] bl MarkBufferBankForExecution ldr r1, =gBattlescriptCurrInstr @@ -13302,7 +5832,7 @@ atkEC_pursuit_sth: @ 805616C eors r0, r1 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r4, =gActiveBank strb r0, [r4] ldr r0, =gBattleTypeFlags @@ -14790,7 +7320,7 @@ sub_8056EF8: @ 8056EF8 ldr r5, =gBattlescriptCurrInstr ldr r0, [r5] ldrb r0, [r0, 0x1] - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r4, =gActiveBank strb r0, [r4] movs r0, 0 diff --git a/asm/battle_5.s b/asm/battle_5.s index 9c35a8913..bb5b406e5 100644 --- a/asm/battle_5.s +++ b/asm/battle_5.s @@ -195,11 +195,11 @@ AdjustFriendshipOnBattleFaint: @ 80570F4 cmp r0, 0 beq _08057140 movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r4, r0, 24 movs r0, 0x3 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r3, r0, 24 ldr r2, =gBattleMons @@ -220,7 +220,7 @@ AdjustFriendshipOnBattleFaint: @ 80570F4 .pool _08057140: movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r4, r0, 24 _0805714A: @@ -562,7 +562,7 @@ _08057406: movs r1, 0x28 movs r2, 0 movs r3, 0x4 - bl EmitSetAttributes + bl EmitSetMonData ldrb r0, [r4] bl MarkBufferBankForExecution _08057430: diff --git a/asm/battle_7.s b/asm/battle_7.s index 10fabc389..011559819 100644 --- a/asm/battle_7.s +++ b/asm/battle_7.s @@ -428,7 +428,7 @@ _0805D470: movs r0, 0x1 ands r0, r1 eors r0, r2 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 16 _0805D48A: @@ -579,7 +579,7 @@ sub_805D5F4: @ 805D5F4 cmp r0, 0 bne _0805D630 movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 mov r8, r0 @@ -588,13 +588,13 @@ sub_805D5F4: @ 805D5F4 .pool _0805D630: movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 mov r8, r0 movs r0, 0x2 _0805D63E: - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r7, r0, 24 ldr r1, =gBattleMons @@ -2941,7 +2941,7 @@ _0805EA5A: BattleMusicStop: @ 805EA60 push {r4-r6,lr} movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r4, r0, 24 ldr r5, =gUnknown_020244D0 @@ -3020,12 +3020,12 @@ sub_805EAE8: @ 805EAE8 cmp r0, 0 beq _0805EB7E movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 mov r8, r0 movs r0, 0x2 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 mov r9, r0 @@ -3203,7 +3203,7 @@ sub_805EC84: @ 805EC84 ldr r0, =gUnknown_0831C6A0 bl LoadCompressedObjectPic movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity adds r5, r0, 0 lsls r5, 24 lsrs r5, 24 @@ -3252,7 +3252,7 @@ sub_805EC84: @ 805EC84 cmp r0, 0 beq _0805ED56 movs r0, 0x3 - bl GetBankByPlayerAI + bl GetBankByIdentity adds r5, r0, 0 lsls r5, 24 lsrs r5, 24 diff --git a/asm/battle_9.s b/asm/battle_9.s index 401584bce..0dfc105ec 100644 --- a/asm/battle_9.s +++ b/asm/battle_9.s @@ -74,7 +74,7 @@ _08062C72: lsrs r0, 24 mov r10, r0 ldr r4, =gBattleMons - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 movs r1, 0x58 @@ -87,7 +87,7 @@ _08062C72: b _08062E2C _08062C9E: mov r0, r10 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r2, r0, 24 movs r6, 0 @@ -223,7 +223,7 @@ _08062D74: movs r1, 0x2E bl GetMonData mov r0, r10 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r2, r0, 24 movs r4, 0 @@ -347,7 +347,7 @@ _08062EB0: eors r0, r4 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gAbsentBankFlags ldrb r1, [r1] ldr r2, =gBitTable @@ -367,7 +367,7 @@ _08062F04: eors r0, r4 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r7, r0, 24 b _08062F1E @@ -705,7 +705,7 @@ ai_has_super_effective_move_on_field: @ 80631BC lsls r0, 24 lsrs r0, 24 mov r10, r0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r3, r0, 24 ldr r0, =gAbsentBankFlags @@ -779,7 +779,7 @@ _0806327C: movs r1, 0x2 mov r0, r10 eors r0, r1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r3, r0, 24 ldr r0, =gAbsentBankFlags @@ -951,7 +951,7 @@ _080633B8: eors r0, r4 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gAbsentBankFlags ldrb r1, [r1] ldr r2, =gBitTable @@ -972,7 +972,7 @@ _08063414: eors r0, r4 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 mov r10, r0 @@ -1308,7 +1308,7 @@ _080636C4: eors r0, r5 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gAbsentBankFlags ldrb r1, [r1] ldr r2, =gBitTable @@ -1328,7 +1328,7 @@ _08063718: eors r0, r5 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r6, r0, 24 b _08063732 @@ -1542,7 +1542,7 @@ _080638C2: cmp r0, 0 bne _08063910 adds r0, r6, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r5, r0, 24 adds r6, r5, 0 @@ -1550,13 +1550,13 @@ _080638C2: .pool _08063910: adds r0, r5, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r6, r0, 24 movs r0, 0x2 eors r5, r0 adds r0, r5, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r5, r0, 24 _08063928: @@ -1789,7 +1789,7 @@ _08063AE0: eors r0, r5 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gAbsentBankFlags ldrb r1, [r1] ldr r2, =gBitTable @@ -1810,7 +1810,7 @@ _08063B20: eors r0, r5 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 str r0, [sp, 0x14] @@ -1844,7 +1844,7 @@ _08063B6C: eors r0, r1 lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 str r0, [sp, 0x4] diff --git a/asm/battle_anim.s b/asm/battle_anim.s index 639be6b7d..9c0190214 100644 --- a/asm/battle_anim.s +++ b/asm/battle_anim.s @@ -949,17 +949,17 @@ _080A4148: ldrsh r0, [r6, r3] cmp r0, 0 bne _080A4190 - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r0, [r0] strh r0, [r1, 0xE] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y b _080A4198 .pool _080A4190: - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X ldrh r0, [r0] strh r0, [r1, 0xE] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y _080A4198: ldrh r0, [r0] strh r0, [r1, 0x10] @@ -1266,7 +1266,7 @@ _080A43F8: ldr r0, =gBankSpriteIds adds r0, r6, r0 ldrb r4, [r0] - ldr r5, =gUnknown_02022E18 + ldr r5, =gBattle_BG1_X ldr r0, =gSprites lsls r1, r4, 4 adds r1, r4 @@ -1294,7 +1294,7 @@ _080A43F8: subs r0, 0x1 strh r0, [r5] _080A447A: - ldr r5, =gUnknown_02022E1A + ldr r5, =gBattle_BG1_Y ldr r2, =gSprites lsls r1, r4, 4 adds r1, r4 @@ -1322,7 +1322,7 @@ _080A447A: orrs r1, r2 strb r1, [r0] _080A44B0: - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r1, [r0] movs r0, 0x14 bl SetGpuReg @@ -1431,7 +1431,7 @@ _080A455E: ldr r0, =gBankSpriteIds adds r2, r5, r0 ldrb r4, [r2] - ldr r5, =gUnknown_02022E1C + ldr r5, =gBattle_BG2_X ldr r3, =gSprites lsls r1, r4, 4 adds r1, r4 @@ -1443,7 +1443,7 @@ _080A455E: negs r0, r0 adds r0, 0x20 strh r0, [r5] - ldr r4, =gUnknown_02022E1E + ldr r4, =gBattle_BG2_Y ldrh r0, [r1, 0x26] ldrh r1, [r1, 0x22] adds r0, r1 @@ -1653,19 +1653,19 @@ sub_80A477C: @ 80A477C _080A479C: movs r0, 0x1 bl sub_80A6C68 - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] b _080A47C6 .pool _080A47B8: movs r0, 0x2 bl sub_80A6C68 - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r4, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r4, [r0] _080A47C6: add sp, 0x10 @@ -1714,13 +1714,13 @@ task_pA_ma0A_obj_to_bg_pal: @ 80A47D8 ldrsh r0, [r5, r1] cmp r0, 0 bne _080A4870 - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X lsls r0, r3, 16 asrs r0, 16 ldrh r3, [r5, 0xE] adds r0, r3 strh r0, [r1] - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y lsls r0, r2, 16 asrs r0, 16 ldrh r5, [r5, 0x10] @@ -1740,13 +1740,13 @@ task_pA_ma0A_obj_to_bg_pal: @ 80A47D8 b _080A4896 .pool _080A4870: - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X lsls r0, r3, 16 asrs r0, 16 ldrh r3, [r5, 0xE] adds r0, r3 strh r0, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y lsls r0, r2, 16 asrs r0, 16 ldrh r5, [r5, 0x10] diff --git a/asm/battle_anim_80D51AC.s b/asm/battle_anim_80D51AC.s index c2ea27485..52b599c4c 100755 --- a/asm/battle_anim_80D51AC.s +++ b/asm/battle_anim_80D51AC.s @@ -200,7 +200,7 @@ _080D5320: _080D5324: movs r0, 0x3 _080D5326: - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 diff --git a/asm/battle_anim_80FE840.s b/asm/battle_anim_80FE840.s index f35b2f7da..78abd6a85 100644 --- a/asm/battle_anim_80FE840.s +++ b/asm/battle_anim_80FE840.s @@ -12782,14 +12782,14 @@ sub_8104E74: @ 8104E74 lsrs r0, 24 cmp r0, 0x1 bne _08104ED4 - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r0, [r0] strh r0, [r5, 0x14] ldr r0, =0x04000014 b _08104EDC .pool _08104ED4: - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X ldrh r0, [r0] strh r0, [r5, 0x14] ldr r0, =0x04000018 @@ -15305,10 +15305,10 @@ sub_81062E8: @ 81062E8 movs r2, 0x1 bl lcd_bg_operations _0810632A: - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X movs r1, 0 strh r1, [r0] - ldr r4, =gUnknown_02022E1A + ldr r4, =gBattle_BG1_Y strh r1, [r4] movs r0, 0x14 movs r1, 0 @@ -15540,10 +15540,10 @@ sub_81064F8: @ 81064F8 movs r2, 0x1 bl lcd_bg_operations _0810653A: - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X movs r1, 0 strh r1, [r0] - ldr r4, =gUnknown_02022E1A + ldr r4, =gBattle_BG1_Y strh r1, [r4] movs r0, 0x14 movs r1, 0 @@ -18159,11 +18159,11 @@ _08107A32: beq _08107AB4 ldr r1, =0x0000ffb0 adds r0, r1, 0 - ldr r2, =gUnknown_02022E18 + ldr r2, =gBattle_BG1_X strh r0, [r2] adds r1, 0x20 adds r0, r1, 0 - ldr r2, =gUnknown_02022E1A + ldr r2, =gBattle_BG1_Y strh r0, [r2] movs r0, 0x2 strh r0, [r6, 0x8] @@ -18183,12 +18183,12 @@ _08107AB4: bne _08107AF8 ldr r2, =0x0000ff20 adds r0, r2, 0 - ldr r2, =gUnknown_02022E18 + ldr r2, =gBattle_BG1_X strh r0, [r2] movs r2, 0x80 lsls r2, 1 adds r0, r2, 0 - ldr r2, =gUnknown_02022E1A + ldr r2, =gBattle_BG1_Y strh r0, [r2] movs r0, 0x2 strh r0, [r6, 0x8] @@ -18198,11 +18198,11 @@ _08107AB4: b _08107B0E .pool _08107AF8: - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r4, [r0] ldr r1, =0x0000ffd0 adds r0, r1, 0 - ldr r2, =gUnknown_02022E1A + ldr r2, =gBattle_BG1_Y strh r0, [r2] ldr r0, =0x0000fffe strh r0, [r6, 0x8] @@ -18210,11 +18210,11 @@ _08107AF8: strh r0, [r6, 0xA] strh r4, [r7, 0xE] _08107B0E: - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r1, [r0] movs r0, 0x14 bl SetGpuReg - ldr r2, =gUnknown_02022E1A + ldr r2, =gBattle_BG1_Y ldrh r1, [r2] movs r0, 0x16 bl SetGpuReg @@ -18264,8 +18264,8 @@ sub_8107B84: @ 8107B84 sub sp, 0x10 lsls r0, 24 lsrs r5, r0, 24 - ldr r1, =gUnknown_02022E18 - ldr r2, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_X + ldr r2, =gBattle_BG1_Y ldr r0, =gTasks lsls r4, r5, 2 adds r4, r5 @@ -18425,8 +18425,8 @@ sub_8107CC4: @ 8107CC4 lsls r0, 24 lsrs r0, 24 adds r5, r0, 0 - ldr r7, =gUnknown_02022E18 - ldr r0, =gUnknown_02022E1A + ldr r7, =gBattle_BG1_X + ldr r0, =gBattle_BG1_Y mov r8, r0 ldr r6, =gTasks lsls r0, r5, 2 @@ -21049,14 +21049,14 @@ sub_8109198: @ 8109198 cmp r4, r0 bne _081091DE movs r0, 0x2 - bl GetBankByPlayerAI + bl GetBankByIdentity ldrb r1, [r5] lsls r0, 24 lsrs r0, 24 cmp r1, r0 beq _081091D6 movs r0, 0x3 - bl GetBankByPlayerAI + bl GetBankByIdentity ldrb r1, [r5] lsls r0, 24 lsrs r0, 24 @@ -26948,10 +26948,10 @@ sub_810C0A0: @ 810C0A0 movs r2, 0x1 bl lcd_bg_operations _0810C0E2: - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X movs r1, 0 strh r1, [r0] - ldr r4, =gUnknown_02022E1A + ldr r4, =gBattle_BG1_Y strh r1, [r4] movs r0, 0x14 movs r1, 0 @@ -26999,7 +26999,7 @@ sub_810C164: @ 810C164 sub sp, 0x10 lsls r0, 24 lsrs r4, r0, 24 - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldr r2, =0x0000ffff adds r0, r2, 0 ldrh r2, [r1] @@ -27150,10 +27150,10 @@ _0810C29C: movs r2, 0 bl lcd_bg_operations _0810C2B0: - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] movs r0, 0x50 movs r1, 0 @@ -27230,10 +27230,10 @@ sub_810C324: @ 810C324 movs r2, 0x1 bl lcd_bg_operations _0810C366: - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X movs r1, 0 strh r1, [r0] - ldr r4, =gUnknown_02022E1A + ldr r4, =gBattle_BG1_Y strh r1, [r4] movs r0, 0x14 movs r1, 0 @@ -27283,7 +27283,7 @@ sub_810C3F0: @ 810C3F0 sub sp, 0x10 lsls r0, 24 lsrs r4, r0, 24 - ldr r2, =gUnknown_02022E18 + ldr r2, =gBattle_BG1_X ldr r3, =gTasks lsls r1, r4, 2 adds r1, r4 @@ -27422,10 +27422,10 @@ _0810C50C: movs r2, 0 bl lcd_bg_operations _0810C520: - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] movs r0, 0x50 movs r1, 0 @@ -28050,7 +28050,7 @@ sub_810C9E4: @ 810C9E4 ldrh r0, [r4, 0x2] lsls r0, 20 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r5, r0, 24 adds r0, r5, 0 @@ -33064,7 +33064,7 @@ _0810F212: bne _0810F2B8 _0810F22E: movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r4, r0, 24 adds r7, r4, 0 @@ -33193,7 +33193,7 @@ sub_810F340: @ 810F340 push {r4,r5,lr} adds r5, r0, 0 movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r4, r0, 24 movs r1, 0x3C @@ -33370,7 +33370,7 @@ sub_810F46C: @ 810F46C cmp r0, 0 bne _0810F502 movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r4, r0, 24 adds r6, r4, 0 @@ -33441,7 +33441,7 @@ sub_810F524: @ 810F524 cmp r0, 0 bne _0810F57C movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 adds r4, r0, 0 @@ -34597,14 +34597,14 @@ _0810FE92: lsrs r0, 24 cmp r0, 0x1 bne _0810FEB8 - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r0, [r0] strh r0, [r4, 0x1C] ldr r0, =0x04000014 b _0810FEC0 .pool _0810FEB8: - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X ldrh r0, [r0] strh r0, [r4, 0x1C] ldr r0, =0x04000018 @@ -36221,9 +36221,9 @@ sub_8110BCC: @ 8110BCC movs r2, 0x1 bl lcd_bg_operations _08110C10: - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r5, [r0] - ldr r4, =gUnknown_02022E1A + ldr r4, =gBattle_BG1_Y strh r5, [r4] movs r0, 0x14 movs r1, 0 @@ -36293,7 +36293,7 @@ sub_8110CB0: @ 8110CB0 adds r2, r1, 0 cmp r0, 0 bne _08110CE4 - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldr r3, =0x0000fffa adds r0, r3, 0 ldrh r3, [r1] @@ -36301,12 +36301,12 @@ sub_8110CB0: @ 8110CB0 b _08110CEA .pool _08110CE4: - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldrh r0, [r1] adds r0, 0x6 _08110CEA: strh r0, [r1] - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y ldr r3, =0x0000ffff adds r0, r3, 0 ldrh r3, [r1] @@ -36442,10 +36442,10 @@ _08110DFC: movs r2, 0 bl lcd_bg_operations _08110E10: - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] movs r0, 0x50 movs r1, 0 @@ -41115,13 +41115,13 @@ sub_81133E8: @ 81133E8 bne _08113424 ldr r0, =0x04000014 str r0, [sp] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X b _0811342A .pool _08113424: ldr r0, =0x04000018 str r0, [sp] - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X _0811342A: ldrh r0, [r0] strh r0, [r4, 0xC] @@ -42107,7 +42107,7 @@ _08113C1E: add r4, sp, 0xC adds r0, r4, 0 bl sub_80A6B30 - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y ldrh r0, [r0] strh r0, [r5, 0x1C] ldr r1, =0x00003f42 @@ -42125,11 +42125,11 @@ _08113C1E: lsls r0, 24 cmp r0, 0 bne _08113CB0 - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X b _08113CAA .pool _08113C80: - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y ldrh r0, [r0] strh r0, [r5, 0x1C] ldr r1, =0x00003f44 @@ -42146,7 +42146,7 @@ _08113C80: lsls r0, 24 cmp r0, 0 bne _08113CB0 - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X _08113CAA: ldrh r0, [r1] adds r0, 0xF0 @@ -42426,14 +42426,14 @@ _08113EF8: ldr r1, =0x00003f42 movs r0, 0x50 bl SetGpuReg - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X b _08113F2E .pool _08113F24: ldr r1, =0x00003f44 movs r0, 0x50 bl SetGpuReg - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X _08113F2E: ldrh r0, [r1] adds r0, 0xF0 @@ -42447,7 +42447,7 @@ _08113F40: bne _08113F68 mov r0, sp bl sub_80A6B30 - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y ldrh r0, [r0] strh r0, [r5, 0x1C] mov r0, sp @@ -42459,7 +42459,7 @@ _08113F40: b _08113F78 .pool _08113F68: - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y ldrh r0, [r0] strh r0, [r5, 0x1C] movs r0, 0 @@ -43324,7 +43324,7 @@ _0811465C: lsls r1, 4 movs r2, 0x20 bl LoadCompressedPalette - ldr r2, =gUnknown_02022E18 + ldr r2, =gBattle_BG1_X ldr r0, =gSprites lsls r1, r4, 4 adds r1, r4 @@ -43334,7 +43334,7 @@ _0811465C: negs r0, r0 adds r0, 0x60 strh r0, [r2] - ldr r2, =gUnknown_02022E1A + ldr r2, =gBattle_BG1_Y ldrh r0, [r1, 0x22] negs r0, r0 adds r0, 0x20 @@ -43399,7 +43399,7 @@ sub_8114748: @ 8114748 adds r0, 0x4 movs r5, 0 strh r0, [r4, 0x1C] - ldr r2, =gUnknown_02022E18 + ldr r2, =gBattle_BG1_X ldrh r3, [r2] subs r1, r3, 0x4 strh r1, [r2] @@ -43586,7 +43586,7 @@ _08114902: beq _0811492E _08114908: adds r0, r4, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 @@ -44104,17 +44104,17 @@ _08114D3C: strh r0, [r4, 0x1E] cmp r0, 0x1 bne _08114D70 - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r0, [r0] strh r0, [r4, 0x20] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y b _08114D78 .pool _08114D70: - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X ldrh r0, [r0] strh r0, [r4, 0x20] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y _08114D78: ldrh r0, [r0] strh r0, [r4, 0x22] @@ -44189,11 +44189,11 @@ _08114DF6: ldrsh r0, [r4, r1] cmp r0, 0x1 bne _08114E20 - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y b _08114E22 .pool _08114E20: - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y _08114E22: ldrh r0, [r4, 0x22] subs r0, r2 @@ -44210,11 +44210,11 @@ _08114E22: ldrsh r0, [r4, r3] cmp r0, 0x1 bne _08114E4C - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y b _08114E4E .pool _08114E4C: - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y _08114E4E: ldrh r0, [r4, 0x22] subs r0, r2 @@ -44296,11 +44296,11 @@ sub_8114EB4: @ 8114EB4 lsrs r0, 24 cmp r0, 0x1 bne _08114F00 - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y b _08114F02 .pool _08114F00: - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y _08114F02: strh r4, [r0] adds r0, r5, 0 @@ -44450,11 +44450,11 @@ _08115018: strh r0, [r4, 0x1E] cmp r0, 0x1 bne _08115044 - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X b _08115046 .pool _08115044: - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X _08115046: ldrh r0, [r0] strh r0, [r4, 0x20] @@ -44540,13 +44540,13 @@ sub_81150E0: @ 81150E0 lsrs r4, r2, 16 cmp r0, 0x1 bne _08115104 - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r3, [r0] ldr r0, =0x04000014 b _0811510A .pool _08115104: - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X ldrh r3, [r0] ldr r0, =0x04000018 _0811510A: @@ -47996,7 +47996,7 @@ _08116CAC: adds r1, 0x1 movs r2, 0x2 bl LoadPalette - ldr r2, =gUnknown_02022E18 + ldr r2, =gBattle_BG1_X ldr r0, =gSprites lsls r1, r4, 4 adds r1, r4 @@ -48006,7 +48006,7 @@ _08116CAC: negs r0, r0 adds r0, 0x20 strh r0, [r2] - ldr r2, =gUnknown_02022E1A + ldr r2, =gBattle_BG1_Y ldrh r0, [r1, 0x22] negs r0, r0 adds r0, 0x20 @@ -48050,7 +48050,7 @@ sub_8116D64: @ 8116D64 movs r1, 0 mov r8, r1 strh r0, [r5, 0x1C] - ldr r7, =gUnknown_02022E1A + ldr r7, =gBattle_BG1_Y ldrh r2, [r7] subs r1, r2, 0x4 strh r1, [r7] @@ -48537,10 +48537,10 @@ _081171F8: movs r2, 0x20 bl LoadCompressedPalette _08117206: - ldr r3, =gUnknown_02022E18 + ldr r3, =gBattle_BG1_X movs r2, 0 strh r2, [r3] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r2, [r0] ldr r1, =gUnknown_0203A110 ldr r0, [r1] @@ -48645,7 +48645,7 @@ sub_81172EC: @ 81172EC push {r4-r6,lr} lsls r0, 24 lsrs r6, r0, 24 - ldr r2, =gUnknown_02022E1A + ldr r2, =gBattle_BG1_Y ldr r1, =gTasks lsls r0, r6, 2 adds r0, r6 @@ -49497,10 +49497,10 @@ _081179CC: ldr r0, [sp, 0x5C] movs r2, 0x20 bl LoadCompressedPalette - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] ldr r1, =gTasks mov r2, r9 @@ -49563,7 +49563,7 @@ _08117A7E: ldrsh r0, [r3, r1] cmp r0, 0 bge _08117AA4 - ldr r2, =gUnknown_02022E1A + ldr r2, =gBattle_BG1_Y lsls r1, r4, 16 asrs r1, 24 ldrh r0, [r2] @@ -49572,7 +49572,7 @@ _08117A7E: b _08117AB0 .pool _08117AA4: - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y lsls r0, r4, 16 asrs r0, 24 ldrh r2, [r1] @@ -50529,14 +50529,14 @@ sub_811828C: @ 811828C lsls r0, 24 lsrs r0, 24 bl DestroyTask - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] movs r0, 0x50 movs r1, 0 @@ -50569,7 +50569,7 @@ task_battle_intro_80BC47C: @ 81182EC sub sp, 0x4 lsls r0, 24 lsrs r4, r0, 24 - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldrh r0, [r1] adds r0, 0x6 strh r0, [r1] @@ -50697,7 +50697,7 @@ _08118400: ldrsh r0, [r2, r1] cmp r0, 0x1 bne _08118420 - ldr r2, =gUnknown_02022E1A + ldr r2, =gBattle_BG1_Y ldrh r1, [r2] ldr r0, =0x0000ffb0 cmp r1, r0 @@ -50706,7 +50706,7 @@ _08118400: b _0811842C .pool _08118420: - ldr r2, =gUnknown_02022E1A + ldr r2, =gBattle_BG1_Y ldrh r1, [r2] ldr r0, =0x0000ffc8 cmp r1, r0 @@ -50861,13 +50861,13 @@ _08118568: cmp r0, 0x4 bne _08118580 _0811856C: - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldrh r0, [r1] adds r0, 0x8 b _0811857E .pool _08118578: - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldrh r0, [r1] adds r0, 0x6 _0811857E: @@ -50882,7 +50882,7 @@ _08118580: adds r6, r0, 0 cmp r1, 0x4 bne _081185E4 - ldr r7, =gUnknown_02022E1A + ldr r7, =gBattle_BG1_Y ldrh r0, [r4, 0x14] bl Cos2 lsls r0, 16 @@ -51202,7 +51202,7 @@ task_battle_intro_anim: @ 8118844 sub sp, 0x4 lsls r0, 24 lsrs r5, r0, 24 - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldrh r0, [r1] adds r0, 0x8 strh r0, [r1] @@ -51505,7 +51505,7 @@ task00_battle_intro_wireless: @ 8118AC0 ldrsh r0, [r7, r2] cmp r0, 0 bne _08118B36 - ldr r2, =gUnknown_02022E18 + ldr r2, =gBattle_BG1_X ldrh r1, [r2] movs r0, 0x80 lsls r0, 8 @@ -51519,7 +51519,7 @@ task00_battle_intro_wireless: @ 8118AC0 _08118AFE: adds r0, r1, 0x3 strh r0, [r2] - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X ldrh r0, [r1] subs r0, 0x3 strh r0, [r1] @@ -51878,10 +51878,10 @@ _08118DD4: ldr r2, =0x0000ffd0 adds r0, r2, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X movs r0, 0xF0 strh r0, [r1] - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X subs r2, 0xC0 adds r0, r2, 0 strh r0, [r1] @@ -51958,10 +51958,10 @@ _08118EC2: subs r0, r1, 0x2 strh r0, [r3, 0xC] _08118ED8: - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldrh r0, [r3, 0xC] strh r0, [r1] - ldr r2, =gUnknown_02022E1C + ldr r2, =gBattle_BG2_X negs r1, r0 strh r1, [r2] lsls r0, 16 @@ -51977,7 +51977,7 @@ _08118F00: ldrh r0, [r1] adds r3, r0, 0x2 strh r3, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y ldrh r0, [r1] adds r0, 0x2 strh r0, [r1] @@ -52078,7 +52078,7 @@ sub_8118FBC: @ 8118FBC lsls r5, 16 lsrs r5, 16 adds r0, r4, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 ldr r1, =gBattleSpritesGfx diff --git a/asm/battle_anim_815A0D4.s b/asm/battle_anim_815A0D4.s index 46b09081d..f219c6988 100755 --- a/asm/battle_anim_815A0D4.s +++ b/asm/battle_anim_815A0D4.s @@ -1655,11 +1655,11 @@ _0815AE08: strh r2, [r5, 0x16] cmp r7, 0x1 bne _0815AE30 - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X b _0815AE32 .pool _0815AE30: - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X _0815AE32: ldrh r2, [r0] strh r2, [r5, 0x18] @@ -3385,7 +3385,7 @@ _0815BC02: lsls r0, 24 cmp r0, 0 beq _0815BC34 - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldr r3, =0x0000ffc8 b _0815BC5C .pool @@ -3396,19 +3396,19 @@ _0815BC34: lsls r0, 24 cmp r0, 0 beq _0815BC58 - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldr r2, =0x0000ff79 adds r0, r2, 0 b _0815BC5E .pool _0815BC58: - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldr r3, =0x0000fff6 _0815BC5C: adds r0, r3, 0 _0815BC5E: strh r0, [r1] - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y movs r0, 0 strh r0, [r1] mov r0, sp @@ -3428,10 +3428,10 @@ _0815BC5E: adds r1, r4 lsls r1, 3 adds r1, r0 - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r0, [r0] strh r0, [r1, 0x1C] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y ldrh r0, [r0] strh r0, [r1, 0x1E] ldrh r0, [r1, 0x8] @@ -3507,7 +3507,7 @@ _0815BD20: ldrsh r0, [r4, r2] cmp r0, 0 bne _0815BDF2 - ldr r2, =gUnknown_02022E18 + ldr r2, =gBattle_BG1_X ldr r1, =gUnknown_085CE460 movs r3, 0xC ldrsh r0, [r4, r3] @@ -3577,10 +3577,10 @@ _0815BDC8: movs r1, 0x4 movs r2, 0x1 bl lcd_bg_operations - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] movs r0, 0x50 movs r1, 0 @@ -3990,7 +3990,7 @@ _0815C124: lsls r0, 24 cmp r0, 0 beq _0815C15C - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldr r3, =0x0000ffc8 adds r0, r3, 0 b _0815C1CA @@ -4008,48 +4008,48 @@ _0815C15C: bne _0815C1B4 cmp r4, 0x1 bne _0815C180 - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldr r2, =0x0000ff65 adds r0, r2, 0 strh r0, [r1] _0815C180: cmp r4, 0x3 bne _0815C18C - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldr r3, =0x0000ff8d adds r0, r3, 0 strh r0, [r1] _0815C18C: cmp r4, 0 bne _0815C196 - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X movs r0, 0xE strh r0, [r1] _0815C196: cmp r4, 0x2 bne _0815C1CC - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldr r2, =0x0000ffec b _0815C1C8 .pool _0815C1B4: cmp r4, 0x1 bne _0815C1C0 - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldr r3, =0x0000ff79 adds r0, r3, 0 strh r0, [r1] _0815C1C0: cmp r4, 0 bne _0815C1CC - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldr r2, =0x0000fff6 _0815C1C8: adds r0, r2, 0 _0815C1CA: strh r0, [r1] _0815C1CC: - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y movs r0, 0 strh r0, [r1] mov r0, sp @@ -4069,10 +4069,10 @@ _0815C1CC: adds r1, r6 lsls r1, 3 adds r1, r0 - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r0, [r0] strh r0, [r1, 0x1C] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y ldrh r0, [r0] strh r0, [r1, 0x1E] b _0815C2A4 @@ -4092,7 +4092,7 @@ _0815C224: lsrs r0, 24 cmp r0, 0x1 bne _0815C268 - ldr r2, =gUnknown_02022E18 + ldr r2, =gBattle_BG1_X ldr r1, =gUnknown_085CE4A4 movs r3, 0xC ldrsh r0, [r5, r3] @@ -4105,7 +4105,7 @@ _0815C224: b _0815C27A .pool _0815C268: - ldr r2, =gUnknown_02022E18 + ldr r2, =gBattle_BG1_X ldr r1, =gUnknown_085CE4A4 movs r3, 0xC ldrsh r0, [r5, r3] @@ -4235,10 +4235,10 @@ _0815C36C: movs r1, 0x4 movs r2, 0x1 bl lcd_bg_operations - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] movs r0, 0x50 movs r1, 0 @@ -6133,9 +6133,9 @@ _0815D2B4: ldr r1, =0x00003f42 movs r0, 0x50 bl SetGpuReg - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r5, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y b _0815D316 .pool _0815D304: @@ -6144,9 +6144,9 @@ _0815D304: ldr r1, =0x00003f44 movs r0, 0x50 bl SetGpuReg - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X ldrh r5, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y _0815D316: ldrh r3, [r0] movs r7, 0 @@ -6223,17 +6223,17 @@ sub_815D398: @ 815D398 lsrs r0, 24 cmp r0, 0x1 bne _0815D3D8 - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r0, [r0] str r0, [sp, 0x4] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y b _0815D3E0 .pool _0815D3D8: - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X ldrh r0, [r0] str r0, [sp, 0x4] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y _0815D3E0: ldrh r0, [r0] str r0, [sp, 0x8] diff --git a/asm/battle_anim_8170478.s b/asm/battle_anim_8170478.s index abbca8ff7..85f94c20e 100644 --- a/asm/battle_anim_8170478.s +++ b/asm/battle_anim_8170478.s @@ -168,12 +168,12 @@ sub_8170478: @ 8170478 lsls r1, 4 movs r2, 0x20 bl LoadCompressedPalette - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldrh r0, [r7, 0x20] negs r0, r0 adds r0, 0x20 strh r0, [r1] - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y ldrh r0, [r7, 0x22] negs r0, r0 subs r0, 0x20 @@ -225,7 +225,7 @@ sub_8170660: @ 8170660 adds r1, r0 movs r3, 0 strh r1, [r5, 0x22] - ldr r2, =gUnknown_02022E1A + ldr r2, =gBattle_BG1_Y lsls r0, r1, 16 lsrs r0, 24 ldrh r4, [r2] @@ -1283,7 +1283,7 @@ _08170F54: lsls r4, 24 lsrs r4, 24 movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 bl sub_80A82E4 @@ -1335,7 +1335,7 @@ _08170F54: ldr r0, =SpriteCallbackDummy str r0, [r4] movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBankSpriteIds lsls r0, 24 lsrs r0, 24 @@ -1371,7 +1371,7 @@ sub_8171030: @ 8171030 lsrs r5, r0, 24 ldr r6, =gSprites movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBankSpriteIds lsls r0, 24 lsrs r0, 24 @@ -1422,7 +1422,7 @@ sub_81710A8: @ 81710A8 lsrs r5, r0, 24 ldr r6, =gSprites movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r4, =gBankSpriteIds lsls r0, 24 lsrs r0, 24 @@ -1438,7 +1438,7 @@ sub_81710A8: @ 81710A8 cmp r0, 0 bge _081710F4 movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 adds r0, r4 @@ -5575,7 +5575,7 @@ sub_817330C: @ 817330C movs r0, 0x1E strh r0, [r4, 0x2E] movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 movs r1, 0 @@ -5587,7 +5587,7 @@ sub_817330C: @ 817330C adds r0, r1 strh r0, [r4, 0x32] movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 movs r1, 0x1 @@ -5732,7 +5732,7 @@ sub_817345C: @ 817345C .pool _08173478: movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gAnimationBankAttacker strb r0, [r1] movs r0, 0x1 @@ -5740,12 +5740,12 @@ _08173478: .pool _0817348C: movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gAnimationBankAttacker strb r0, [r1] movs r0, 0 _08173498: - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gAnimationBankTarget strb r0, [r1] _081734A0: diff --git a/asm/battle_controller_opponent.s b/asm/battle_controller_opponent.s index 4400217ae..69d4776d4 100644 --- a/asm/battle_controller_opponent.s +++ b/asm/battle_controller_opponent.s @@ -5323,7 +5323,7 @@ _08062062: cmp r0, 0 beq _0806209C movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r5, =gBankTarget strb r0, [r5] ldr r0, =gAbsentBankFlags @@ -5337,7 +5337,7 @@ _08062062: cmp r1, 0 beq _0806209C movs r0, 0x2 - bl GetBankByPlayerAI + bl GetBankByIdentity strb r0, [r5] _0806209C: ldr r0, =gBankTarget @@ -5394,7 +5394,7 @@ _08062108: lsls r1, 24 lsrs r1, 24 adds r0, r1, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity adds r2, r0, 0 lsls r2, 24 lsrs r2, 16 @@ -5406,7 +5406,7 @@ _08062108: .pool _0806213C: movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity adds r2, r0, 0 lsls r2, 24 lsrs r2, 16 @@ -5468,7 +5468,7 @@ sub_8062188: @ 8062188 cmp r0, 0 bne _080621D4 movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r5, r0, 24 adds r7, r5, 0 @@ -5476,11 +5476,11 @@ sub_8062188: @ 8062188 .pool _080621D4: movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r7, r0, 24 movs r0, 0x3 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r5, r0, 24 _080621E8: diff --git a/asm/battle_controller_player.s b/asm/battle_controller_player.s index ddb739b72..5f7e1b954 100644 --- a/asm/battle_controller_player.s +++ b/asm/battle_controller_player.s @@ -358,7 +358,7 @@ _0805775A: cmp r0, 0x2 bne _080577E8 movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gAbsentBankFlags ldrb r1, [r1] ldr r2, =gBitTable @@ -622,7 +622,7 @@ _080579F0: mov r1, sp adds r0, r1, r4 ldrb r0, [r0] - bl GetBankByPlayerAI + bl GetBankByIdentity strb r0, [r5] ldr r1, =gNoOfAllBanks lsls r0, 24 @@ -750,7 +750,7 @@ _08057B14: mov r1, sp adds r0, r1, r4 ldrb r0, [r0] - bl GetBankByPlayerAI + bl GetBankByIdentity strb r0, [r5] ldr r1, =gNoOfAllBanks lsls r0, 24 @@ -942,7 +942,7 @@ _08057CC4: movs r0, 0x1 ands r0, r1 eors r0, r2 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gUnknown_03005D74 strb r0, [r1] _08057CDE: @@ -1035,7 +1035,7 @@ _08057D80: .pool _08057DA8: movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gAbsentBankFlags ldrb r1, [r1] ldr r2, =gBitTable @@ -1052,7 +1052,7 @@ _08057DA8: _08057DD0: movs r0, 0x1 _08057DD2: - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gUnknown_03005D74 _08057DD8: strb r0, [r1] @@ -8024,7 +8024,7 @@ sub_805BBC4: @ 805BBC4 ldr r5, =gActiveBank ldrb r4, [r5] movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity adds r2, r0, 0 lsls r2, 24 lsrs r2, 24 @@ -8063,7 +8063,7 @@ sub_805BC18: @ 805BC18 strb r0, [r1] ldrb r4, [r5] movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity adds r2, r0, 0 lsls r2, 24 lsrs r2, 24 @@ -8551,7 +8551,7 @@ _0805C062: movs r1, 0 bl sub_8059CB4 ldr r0, =gText_WhatWillPkmnDo - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0x1 bl sub_814F9EC diff --git a/asm/battle_controller_player_partner.s b/asm/battle_controller_player_partner.s index f14b5bc51..784eacab1 100644 --- a/asm/battle_controller_player_partner.s +++ b/asm/battle_controller_player_partner.s @@ -5045,7 +5045,7 @@ _081BDB02: cmp r0, 0 beq _081BDB3C movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r4, =gBankTarget strb r0, [r4] ldr r0, =gAbsentBankFlags @@ -5059,7 +5059,7 @@ _081BDB02: cmp r1, 0 beq _081BDB3C movs r0, 0x3 - bl GetBankByPlayerAI + bl GetBankByIdentity strb r0, [r4] _081BDB3C: ldr r0, =gBankTarget @@ -5093,11 +5093,11 @@ sub_81BDB7C: @ 81BDB7C cmp r4, 0x6 bne _081BDBD0 movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r6, r0, 24 movs r0, 0x2 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r5, r0, 24 movs r4, 0x3 diff --git a/asm/battle_controller_safari.s b/asm/battle_controller_safari.s index b02f95471..cc149ea4f 100644 --- a/asm/battle_controller_safari.s +++ b/asm/battle_controller_safari.s @@ -700,7 +700,7 @@ sub_8159910: @ 8159910 ldr r5, =gActiveBank ldrb r4, [r5] movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity adds r2, r0, 0 lsls r2, 24 lsrs r2, 24 @@ -739,7 +739,7 @@ sub_8159964: @ 8159964 strb r0, [r1] ldrb r4, [r5] movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity adds r2, r0, 0 lsls r2, 24 lsrs r2, 24 @@ -879,7 +879,7 @@ _08159AAE: movs r1, 0 bl sub_8059CB4 ldr r0, =gText_WhatWillPkmnDo2 - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0x1 bl sub_814F9EC diff --git a/asm/battle_controller_wally.s b/asm/battle_controller_wally.s index e723a522b..eab717466 100644 --- a/asm/battle_controller_wally.s +++ b/asm/battle_controller_wally.s @@ -3232,7 +3232,7 @@ sub_816A084: @ 816A084 ldr r5, =gActiveBank ldrb r4, [r5] movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity adds r2, r0, 0 lsls r2, 24 lsrs r2, 24 @@ -3271,7 +3271,7 @@ sub_816A0D8: @ 816A0D8 strb r0, [r1] ldrb r4, [r5] movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity adds r2, r0, 0 lsls r2, 24 lsrs r2, 24 @@ -3693,7 +3693,7 @@ _0816A48A: movs r1, 0 bl sub_8059CB4 ldr r0, =gText_WhatWillWallyDo - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0x1 bl sub_814F9EC diff --git a/asm/battle_frontier_1.s b/asm/battle_frontier_1.s index 8d39505ed..1a0b5ae3d 100755 --- a/asm/battle_frontier_1.s +++ b/asm/battle_frontier_1.s @@ -3165,9 +3165,9 @@ _0819044E: strh r4, [r0] ldr r0, =gUnknown_02022E16 strh r4, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r4, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r4, [r0] ldr r0, =gUnknown_02022E20 strh r4, [r0] @@ -3176,16 +3176,16 @@ _0819044E: mov r2, r9 cmp r2, 0x2 bne _081904DC - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r4, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r4, [r0] b _081904E6 .pool _081904DC: - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r4, [r0] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r0, 0xA0 strh r0, [r1] _081904E6: @@ -4371,9 +4371,9 @@ _08190E98: strh r1, [r0] ldr r0, =gUnknown_02022E16 strh r1, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r1, [r0] - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y movs r0, 0xA0 strh r0, [r1] b _08190EE6 @@ -4384,9 +4384,9 @@ _08190ED4: ldr r1, =gUnknown_02022E16 movs r0, 0xA0 strh r0, [r1] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r2, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r2, [r0] _08190EE6: cmp r6, 0x1 @@ -4396,9 +4396,9 @@ _08190EE6: ldrb r1, [r0, 0x10] cmp r1, 0 bne _08190F50 - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r1, [r0] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r6, 0xA0 lsls r6, 1 adds r0, r6, 0 @@ -4424,12 +4424,12 @@ _08190EE6: b _08191084 .pool _08190F50: - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X movs r6, 0x80 lsls r6, 1 adds r0, r6, 0 strh r0, [r1] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y movs r4, 0 strh r4, [r0] ldr r3, =gUnknown_0860D080 @@ -4473,9 +4473,9 @@ _08190F9C: lsrs r0, 24 adds r1, 0x11 bl sub_8192F08 - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r5, [r0] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r3, 0xA0 lsls r3, 1 adds r0, r3, 0 @@ -4508,10 +4508,10 @@ _08190FF8: lsrs r0, 24 adds r1, 0x11 bl sub_8192F08 - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X movs r0, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r2, 0xA0 lsls r2, 1 adds r0, r2, 0 @@ -4529,12 +4529,12 @@ _08190FF8: b _08191084 .pool _0819104C: - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X movs r3, 0x80 lsls r3, 1 adds r0, r3, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r0, 0xA0 strh r0, [r1] ldr r1, =gTasks @@ -4770,9 +4770,9 @@ _08191234: strh r1, [r0] ldr r0, =gUnknown_02022E16 strh r1, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r1, [r0] - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y ldr r2, =0x0000ff60 adds r0, r2, 0 strh r0, [r1] @@ -4785,9 +4785,9 @@ _08191278: ldr r3, =0x0000ff60 adds r0, r3, 0 strh r0, [r1] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r2, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r2, [r0] _0819128C: cmp r6, 0x2 @@ -4797,9 +4797,9 @@ _0819128C: ldrb r1, [r0, 0x10] cmp r1, 0 bne _081912F4 - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r1, [r0] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r0, 0xA0 strh r0, [r1] ldr r3, =gUnknown_0860D080 @@ -4823,10 +4823,10 @@ _0819128C: b _0819141C .pool _081912F4: - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X movs r4, 0 strh r4, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r4, [r0] ldr r3, =gUnknown_0860D080 ldr r2, =gTasks @@ -4869,9 +4869,9 @@ _0819133C: lsrs r0, 24 adds r1, 0x11 bl sub_8192F08 - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r5, [r0] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r0, 0xA0 strh r0, [r1] ldr r2, [r6] @@ -4902,10 +4902,10 @@ _08191394: lsrs r0, 24 adds r1, 0x11 bl sub_8192F08 - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X movs r0, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r0, 0xA0 strh r0, [r1] ldr r2, [r6] @@ -4921,12 +4921,12 @@ _08191394: b _0819141C .pool _081913E4: - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X movs r4, 0x80 lsls r4, 1 adds r0, r4, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r0, 0 strh r0, [r1] ldr r1, =gTasks @@ -5162,12 +5162,12 @@ _081915CC: strh r1, [r0] ldr r0, =gUnknown_02022E16 strh r1, [r0] - ldr r2, =gUnknown_02022E18 + ldr r2, =gBattle_BG1_X movs r6, 0x80 lsls r6, 1 adds r0, r6, 0 strh r0, [r2] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] b _08191622 .pool @@ -5179,9 +5179,9 @@ _0819160C: strh r0, [r1] ldr r0, =gUnknown_02022E16 strh r2, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r2, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r2, [r0] _08191622: ldr r0, =gUnknown_0203CD78 @@ -5189,12 +5189,12 @@ _08191622: ldrb r0, [r4, 0x10] cmp r0, 0 bne _08191688 - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X movs r4, 0x80 lsls r4, 1 adds r0, r4, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r0, 0xA0 strh r0, [r1] ldr r3, =gUnknown_0860D080 @@ -5218,12 +5218,12 @@ _08191622: b _081916C6 .pool _08191688: - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X movs r6, 0x80 lsls r6, 1 adds r0, r6, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r0, 0 strh r0, [r1] ldr r3, =gUnknown_0860D15C @@ -5462,12 +5462,12 @@ _0819187C: strh r1, [r0] ldr r0, =gUnknown_02022E16 strh r1, [r0] - ldr r2, =gUnknown_02022E18 + ldr r2, =gBattle_BG1_X movs r6, 0x80 lsls r6, 1 adds r0, r6, 0 strh r0, [r2] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] b _081918D2 .pool @@ -5479,9 +5479,9 @@ _081918BC: strh r0, [r1] ldr r0, =gUnknown_02022E16 strh r2, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r2, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r2, [r0] _081918D2: ldr r0, =gUnknown_0203CD78 @@ -5489,12 +5489,12 @@ _081918D2: ldrb r0, [r2, 0x10] cmp r0, 0 bne _08191924 - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X movs r4, 0x80 lsls r4, 1 adds r0, r4, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r0, 0xA0 strh r0, [r1] ldr r1, =gTasks @@ -5510,10 +5510,10 @@ _081918D2: b _08191958 .pool _08191924: - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X movs r0, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r0, 0xA0 strh r0, [r1] ldr r1, =gTasks @@ -5749,12 +5749,12 @@ _08191B08: strh r1, [r0] ldr r0, =gUnknown_02022E16 strh r1, [r0] - ldr r2, =gUnknown_02022E18 + ldr r2, =gBattle_BG1_X movs r6, 0xFF lsls r6, 8 adds r0, r6, 0 strh r0, [r2] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] b _08191B5E .pool @@ -5766,9 +5766,9 @@ _08191B48: strh r0, [r1] ldr r0, =gUnknown_02022E16 strh r2, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r2, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r2, [r0] _08191B5E: ldr r0, =gUnknown_0203CD78 @@ -5776,19 +5776,19 @@ _08191B5E: ldrb r0, [r0, 0x10] cmp r0, 0x1 bne _08191B94 - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X movs r0, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r0, 0xA0 strh r0, [r1] b _08191B9E .pool _08191B94: - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] _08191B9E: ldr r4, =gUnknown_0860D15C @@ -6016,12 +6016,12 @@ _08191D68: strh r1, [r0] ldr r0, =gUnknown_02022E16 strh r1, [r0] - ldr r2, =gUnknown_02022E18 + ldr r2, =gBattle_BG1_X movs r6, 0xFF lsls r6, 8 adds r0, r6, 0 strh r0, [r2] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] b _08191DBE .pool @@ -6033,9 +6033,9 @@ _08191DA8: strh r0, [r1] ldr r0, =gUnknown_02022E16 strh r2, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r2, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r2, [r0] _08191DBE: ldr r0, =gUnknown_0203CD78 @@ -6043,12 +6043,12 @@ _08191DBE: ldrb r0, [r2, 0x10] cmp r0, 0x2 bne _08191E10 - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X movs r4, 0x80 lsls r4, 1 adds r0, r4, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r0, 0xA0 strh r0, [r1] ldr r1, =gTasks @@ -6064,10 +6064,10 @@ _08191DBE: b _08191E44 .pool _08191E10: - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X movs r0, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y movs r0, 0xA0 strh r0, [r1] ldr r1, =gTasks @@ -6310,11 +6310,11 @@ _08191FF8: ldrh r0, [r1] subs r0, 0x4 strh r0, [r1] - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y ldrh r0, [r1] subs r0, 0x4 strh r0, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y b _081920A4 .pool _08192038: @@ -6335,11 +6335,11 @@ _08192038: ldrh r0, [r1] adds r0, 0x4 strh r0, [r1] - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y ldrh r0, [r1] adds r0, 0x4 strh r0, [r1] - ldr r1, =gUnknown_02022E1E + ldr r1, =gBattle_BG2_Y b _081920E8 .pool _08192078: @@ -6360,11 +6360,11 @@ _08192078: ldrh r0, [r1] subs r0, 0x4 strh r0, [r1] - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldrh r0, [r1] subs r0, 0x4 strh r0, [r1] - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X _081920A4: ldrh r0, [r1] subs r0, 0x4 @@ -6389,11 +6389,11 @@ _081920BC: ldrh r0, [r1] adds r0, 0x4 strh r0, [r1] - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X ldrh r0, [r1] adds r0, 0x4 strh r0, [r1] - ldr r1, =gUnknown_02022E1C + ldr r1, =gBattle_BG2_X _081920E8: ldrh r0, [r1] adds r0, 0x4 @@ -10404,9 +10404,9 @@ _0819427C: strh r4, [r0] ldr r0, =gUnknown_02022E16 strh r4, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r4, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r4, [r0] movs r0, 0x2 movs r1, 0 @@ -11366,19 +11366,19 @@ sub_8194B70: @ 8194B70 ldrh r1, [r0] movs r0, 0x12 bl SetGpuReg - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r1, [r0] movs r0, 0x14 bl SetGpuReg - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y ldrh r1, [r0] movs r0, 0x16 bl SetGpuReg - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X ldrh r1, [r0] movs r0, 0x18 bl SetGpuReg - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y ldrh r1, [r0] movs r0, 0x1A bl SetGpuReg @@ -11494,11 +11494,11 @@ sub_8194CE4: @ 8194CE4 ldrh r1, [r0] movs r0, 0x12 bl SetGpuReg - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r1, [r0] movs r0, 0x14 bl SetGpuReg - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y ldrh r1, [r0] movs r0, 0x16 bl SetGpuReg diff --git a/asm/battle_frontier_2.s b/asm/battle_frontier_2.s index bea4972e3..2e48fdd72 100755 --- a/asm/battle_frontier_2.s +++ b/asm/battle_frontier_2.s @@ -20578,7 +20578,7 @@ _081A5328: negs r0, r0 strb r0, [r1, 0x1] ldr r0, =gText_JapaneseHonorific - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r4, =gDisplayedStringBattle adds r0, r4, 0 movs r1, 0xF @@ -20587,7 +20587,7 @@ _081A5328: movs r1, 0x10 bl sub_814F9EC ldr r0, =gText_RivalBuffer - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString adds r0, r4, 0 movs r1, 0x11 bl sub_814F9EC @@ -20601,7 +20601,7 @@ _081A5328: movs r1, 0x14 bl sub_814F9EC ldr r0, =gText_Judgement - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString adds r0, r4, 0 movs r1, 0x15 bl sub_814F9EC @@ -20685,7 +20685,7 @@ _081A5464: movs r3, 0x1 bl sub_81A5558 ldr r0, =gText_Judgement - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0x15 bl sub_814F9EC diff --git a/asm/battle_message.s b/asm/battle_message.s index f1f2447aa..96869a350 100644 --- a/asm/battle_message.s +++ b/asm/battle_message.s @@ -687,7 +687,7 @@ _0814E6CC: ldr r7, [r0] _0814E6D8: adds r0, r7, 0 - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString _0814E6DE: pop {r3-r5} mov r8, r3 @@ -699,15 +699,15 @@ _0814E6DE: .pool thumb_func_end BufferStringBattle - thumb_func_start StrCpyDecodeToDisplayedStringBattle -StrCpyDecodeToDisplayedStringBattle: @ 814E6F0 + thumb_func_start BattleStringExpandPlaceholdersToDisplayedString +BattleStringExpandPlaceholdersToDisplayedString: @ 814E6F0 push {lr} ldr r1, =gDisplayedStringBattle bl BattleStringExpandPlaceholders pop {r1} bx r1 .pool - thumb_func_end StrCpyDecodeToDisplayedStringBattle + thumb_func_end BattleStringExpandPlaceholdersToDisplayedString thumb_func_start AppendStatusString AppendStatusString: @ 814E700 @@ -924,7 +924,7 @@ _0814E920: .pool _0814E92C: movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBattlePartyID lsls r0, 24 lsrs r0, 23 @@ -943,7 +943,7 @@ _0814E92C: .pool _0814E960: movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBattlePartyID lsls r0, 24 lsrs r0, 23 @@ -962,7 +962,7 @@ _0814E960: .pool _0814E994: movs r0, 0x2 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBattlePartyID lsls r0, 24 lsrs r0, 23 @@ -981,7 +981,7 @@ _0814E994: .pool _0814E9C8: movs r0, 0x3 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBattlePartyID lsls r0, 24 lsrs r0, 23 @@ -1126,7 +1126,7 @@ _0814EB36: adds r1, r0, 0 movs r0, 0x1 ands r0, r1 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBattlePartyID lsls r0, 24 lsrs r0, 23 @@ -1147,7 +1147,7 @@ _0814EB74: adds r1, r0, 0 movs r0, 0x1 ands r0, r1 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBattlePartyID lsls r0, 24 lsrs r0, 23 @@ -1177,7 +1177,7 @@ _0814EBB0: adds r1, r0, 0 movs r0, 0x1 ands r0, r1 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBattlePartyID lsls r0, 24 lsrs r0, 23 @@ -1199,7 +1199,7 @@ _0814EBF8: adds r1, r0, 0 movs r0, 0x1 ands r0, r1 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBattlePartyID lsls r0, 24 lsrs r0, 23 diff --git a/asm/contest.s b/asm/contest.s index 71e8ab058..7e0652222 100644 --- a/asm/contest.s +++ b/asm/contest.s @@ -50,13 +50,13 @@ sub_80D7678: @ 80D7678 strh r1, [r0] ldr r0, =gUnknown_02022E16 strh r1, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] ldr r0, =gUnknown_02022E20 strh r1, [r0] @@ -611,10 +611,10 @@ _080D7BF6: .pool _080D7C04: bl sub_80DE224 - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] movs r0, 0x2 bl BeginFastPaletteFade @@ -1190,7 +1190,7 @@ _080D814C: strh r0, [r4, 0x8] b _080D822C _080D8176: - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y ldrh r0, [r1] adds r0, 0x7 strh r0, [r1] @@ -1324,19 +1324,19 @@ vblank_cb_battle: @ 80D827C ldrh r1, [r0] movs r0, 0x12 bl SetGpuReg - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r1, [r0] movs r0, 0x14 bl SetGpuReg - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y ldrh r1, [r0] movs r0, 0x16 bl SetGpuReg - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X ldrh r1, [r0] movs r0, 0x18 bl SetGpuReg - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y ldrh r1, [r0] movs r0, 0x1A bl SetGpuReg @@ -1389,7 +1389,7 @@ sub_80D833C: @ 80D833C bne _080D840C ldr r0, =gUnknown_02022E16 strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] bl sub_80DCD48 ldr r1, =gPlttBufferUnfaded @@ -1520,7 +1520,7 @@ sub_80D8490: @ 80D8490 ldr r0, =gUnknown_02022E16 movs r1, 0xA0 strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] movs r6, 0 ldr r0, =gUnknown_02039F25 @@ -1773,7 +1773,7 @@ _080D86E4: ldr r0, =gUnknown_02022E16 movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] ldr r1, =gTasks lsls r0, r7, 2 @@ -2044,7 +2044,7 @@ sub_80D895C: @ 80D895C ldr r0, =gUnknown_02022E16 movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] movs r0, 0 bl sub_80DC490 @@ -5325,7 +5325,7 @@ sub_80DA5E8: @ 80DA5E8 ldr r0, =gUnknown_02022E16 movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] ldr r4, =gUnknown_02039F34 movs r3, 0 @@ -5404,9 +5404,9 @@ sub_80DA6B4: @ 80DA6B4 cmp r4, 0 bne _080DA6EA bl sub_80DE224 - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r4, [r0] - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y movs r0, 0xA0 strh r0, [r1] movs r0, 0x62 @@ -5432,7 +5432,7 @@ sub_80DA700: @ 80DA700 push {lr} lsls r0, 24 lsrs r3, r0, 24 - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y ldrh r0, [r1] subs r0, 0x7 strh r0, [r1] @@ -8519,7 +8519,7 @@ sub_80DBF68: @ 80DBF68 ldr r0, =gUnknown_02022E16 movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] bl sub_80DB89C ldr r0, =gUnknown_0827E8DA @@ -12881,10 +12881,10 @@ sub_80DE224: @ 80DE224 ldrh r1, [r5] movs r0, 0xC bl SetGpuReg - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X movs r0, 0xF0 strh r0, [r1] - ldr r4, =gUnknown_02022E1A + ldr r4, =gBattle_BG1_Y movs r0, 0xA0 strh r0, [r4] movs r0, 0x14 @@ -13004,9 +13004,9 @@ sub_80DE350: @ 80DE350 ldrh r1, [r3] movs r0, 0xA bl SetGpuReg - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r5, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r5, [r0] ldr r7, =gSprites _080DE3CA: @@ -13051,10 +13051,10 @@ sub_80DE424: @ 80DE424 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X movs r0, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y movs r0, 0xA0 strh r0, [r1] movs r0, 0x62 @@ -13078,7 +13078,7 @@ sub_80DE464: @ 80DE464 push {lr} lsls r0, 24 lsrs r3, r0, 24 - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y ldrh r0, [r1] subs r0, 0x7 strh r0, [r1] @@ -13233,7 +13233,7 @@ sub_80DE5C0: @ 80DE5C0 push {lr} lsls r0, 24 lsrs r2, r0, 24 - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y ldrh r0, [r1] adds r0, 0x7 strh r0, [r1] diff --git a/asm/contest_link_80F57C4.s b/asm/contest_link_80F57C4.s index 864f16c5e..8da1eccba 100644 --- a/asm/contest_link_80F57C4.s +++ b/asm/contest_link_80F57C4.s @@ -97,13 +97,13 @@ _080F57E0: strh r1, [r0] ldr r0, =gUnknown_02022E16 strh r1, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] ldr r0, =gUnknown_02022E20 strh r1, [r0] @@ -449,19 +449,19 @@ sub_80F5C24: @ 80F5C24 ldrh r1, [r0] movs r0, 0x12 bl SetGpuReg - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r1, [r0] movs r0, 0x14 bl SetGpuReg - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y ldrh r1, [r0] movs r0, 0x16 bl SetGpuReg - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X ldrh r1, [r0] movs r0, 0x18 bl SetGpuReg - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y ldrh r1, [r0] movs r0, 0x1A bl SetGpuReg @@ -1989,7 +1989,7 @@ sub_80F69B8: @ 80F69B8 _080F69DE: adds r0, r7, 0 ldr r1, [sp, 0x28] - bl sub_80D2EDC + bl GetMonIconPtr adds r3, r0, 0 lsls r0, r5, 9 adds r0, 0x80 diff --git a/asm/evolution_scene.s b/asm/evolution_scene.s index afc3c843b..f96a7355a 100644 --- a/asm/evolution_scene.s +++ b/asm/evolution_scene.s @@ -170,13 +170,13 @@ evolution_cutscene: @ 813DA8C strh r2, [r0] ldr r0, =gUnknown_02022E16 strh r2, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r2, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r2, [r0] - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r2, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r2, [r0] ldr r1, =gUnknown_02022E20 movs r2, 0x80 @@ -464,13 +464,13 @@ sub_813DD7C: @ 813DD7C strh r4, [r0] ldr r0, =gUnknown_02022E16 strh r4, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r4, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r4, [r0] - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r4, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r4, [r0] ldr r1, =gUnknown_02022E20 movs r2, 0x80 @@ -634,13 +634,13 @@ _0813DFE0: strh r1, [r0] ldr r0, =gUnknown_02022E16 strh r1, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] ldr r2, =gUnknown_02022E20 movs r3, 0x80 @@ -945,13 +945,13 @@ sub_813E1D4: @ 813E1D4 strh r4, [r0] ldr r0, =gUnknown_02022E16 strh r4, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r4, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r4, [r0] - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r4, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r4, [r0] ldr r1, =gUnknown_02022E20 movs r2, 0x80 @@ -1892,12 +1892,12 @@ _0813EC1E: beq _0813EC2A b _0813F1A4 _0813EC2A: - bl sub_804F574 + bl BufferMoveToLearnIntoBattleTextBuff2 ldr r0, =0x0000016f bl PlayFanfare ldr r0, =gBattleStringsTable ldr r0, [r0, 0xC] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0 bl sub_814F9EC @@ -1991,10 +1991,10 @@ _0813ED0A: beq _0813ED16 b _0813F1A4 _0813ED16: - bl sub_804F574 + bl BufferMoveToLearnIntoBattleTextBuff2 ldr r0, =gBattleStringsTable ldr r0, [r0, 0x10] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0 bl sub_814F9EC @@ -2023,7 +2023,7 @@ _0813ED56: _0813ED62: ldr r0, =gBattleStringsTable ldr r0, [r0, 0x14] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0 bl sub_814F9EC @@ -2048,7 +2048,7 @@ _0813ED90: bne _0813EDCE ldr r0, =gBattleStringsTable ldr r0, [r0, 0x18] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0 bl sub_814F9EC @@ -2289,7 +2289,7 @@ _0813EFC8: ldr r3, =0x000004cc adds r0, r3 ldr r0, [r0] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0 bl sub_814F9EC @@ -2338,7 +2338,7 @@ _0813F05C: lsls r1, 2 adds r0, r1 ldr r0, [r0] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0 bl sub_814F9EC @@ -2367,7 +2367,7 @@ _0813F09E: _0813F0AA: ldr r0, =gBattleStringsTable ldr r0, [r0, 0x1C] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0 bl sub_814F9EC @@ -2395,7 +2395,7 @@ _0813F0D8: lsls r1, 2 adds r0, r1 ldr r0, [r0] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0 bl sub_814F9EC @@ -2411,7 +2411,7 @@ _0813F0D8: _0813F120: ldr r0, =gBattleStringsTable ldr r0, [r0, 0x20] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0 bl sub_814F9EC @@ -2431,7 +2431,7 @@ _0813F120: _0813F154: ldr r0, =gBattleStringsTable ldr r0, [r0, 0x24] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r0, =gDisplayedStringBattle movs r1, 0 bl sub_814F9EC @@ -3059,12 +3059,12 @@ _0813F756: beq _0813F762 b _0813FCC4 _0813F762: - bl sub_804F574 + bl BufferMoveToLearnIntoBattleTextBuff2 ldr r0, =0x0000016f bl PlayFanfare ldr r0, =gBattleStringsTable ldr r0, [r0, 0xC] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r1, =gDisplayedStringBattle movs r0, 0 movs r2, 0x1 @@ -3160,10 +3160,10 @@ _0813F846: beq _0813F852 b _0813FCC4 _0813F852: - bl sub_804F574 + bl BufferMoveToLearnIntoBattleTextBuff2 ldr r0, =gBattleStringsTable ldr r0, [r0, 0x10] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r1, =gDisplayedStringBattle movs r0, 0 movs r2, 0x1 @@ -3193,7 +3193,7 @@ _0813F892: _0813F89E: ldr r0, =gBattleStringsTable ldr r0, [r0, 0x14] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r1, =gDisplayedStringBattle movs r0, 0 movs r2, 0x1 @@ -3219,7 +3219,7 @@ _0813F8CC: bne _0813F90C ldr r0, =gBattleStringsTable ldr r0, [r0, 0x18] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r1, =gDisplayedStringBattle movs r0, 0 movs r2, 0x1 @@ -3299,7 +3299,7 @@ _0813F98C: lsls r1, 3 adds r0, r1 ldr r0, [r0] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r1, =gDisplayedStringBattle movs r0, 0 movs r2, 0x1 @@ -3336,7 +3336,7 @@ _0813F9E4: lsls r1, 3 adds r0, r1 ldr r0, [r0] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r1, =gDisplayedStringBattle movs r0, 0 movs r2, 0x1 @@ -3441,7 +3441,7 @@ _0813FAEC: ldr r1, =0x000004cc adds r0, r1 ldr r0, [r0] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r1, =gDisplayedStringBattle movs r0, 0 movs r2, 0x1 @@ -3481,7 +3481,7 @@ _0813FB3C: lsls r1, 2 adds r0, r1 ldr r0, [r0] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r1, =gDisplayedStringBattle movs r0, 0 movs r2, 0x1 @@ -3511,7 +3511,7 @@ _0813FBB2: _0813FBBE: ldr r0, =gBattleStringsTable ldr r0, [r0, 0x1C] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r1, =gDisplayedStringBattle movs r0, 0 movs r2, 0x1 @@ -3540,7 +3540,7 @@ _0813FBEC: lsls r1, 2 adds r0, r1 ldr r0, [r0] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r1, =gDisplayedStringBattle movs r0, 0 movs r2, 0x1 @@ -3557,7 +3557,7 @@ _0813FBEC: _0813FC38: ldr r0, =gBattleStringsTable ldr r0, [r0, 0x20] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r1, =gDisplayedStringBattle movs r0, 0 movs r2, 0x1 @@ -3578,7 +3578,7 @@ _0813FC38: _0813FC70: ldr r0, =gBattleStringsTable ldr r0, [r0, 0x24] - bl StrCpyDecodeToDisplayedStringBattle + bl BattleStringExpandPlaceholdersToDisplayedString ldr r1, =gDisplayedStringBattle movs r0, 0 movs r2, 0x1 @@ -3638,19 +3638,19 @@ sub_813FCDC: @ 813FCDC ldrh r1, [r0] movs r0, 0x12 bl SetGpuReg - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r1, [r0] movs r0, 0x14 bl SetGpuReg - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y ldrh r1, [r0] movs r0, 0x16 bl SetGpuReg - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X ldrh r1, [r0] movs r0, 0x18 bl SetGpuReg - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y ldrh r1, [r0] movs r0, 0x1A bl SetGpuReg @@ -3682,19 +3682,19 @@ sub_813FD64: @ 813FD64 ldrh r1, [r0] movs r0, 0x12 bl SetGpuReg - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X ldrh r1, [r0] movs r0, 0x14 bl SetGpuReg - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y ldrh r1, [r0] movs r0, 0x16 bl SetGpuReg - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X ldrh r1, [r0] movs r0, 0x18 bl SetGpuReg - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y ldrh r1, [r0] movs r0, 0x1A bl SetGpuReg @@ -3852,9 +3852,9 @@ sub_813FEE8: @ 813FEE8 push {r6,r7} lsls r0, 24 lsrs r5, r0, 24 - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X mov r8, r0 - ldr r1, =gUnknown_02022E1A + ldr r1, =gBattle_BG1_Y mov r9, r1 ldr r1, =gTasks lsls r0, r5, 2 @@ -3865,8 +3865,8 @@ sub_813FEE8: @ 813FEE8 ldrsh r0, [r0, r2] cmp r0, 0 bne _0813FF28 - ldr r7, =gUnknown_02022E1C - ldr r6, =gUnknown_02022E1E + ldr r7, =gBattle_BG2_X + ldr r6, =gBattle_BG2_Y b _0813FF2C .pool _0813FF28: @@ -4130,12 +4130,12 @@ sub_8140174: @ 8140174 movs r0, 0x50 movs r1, 0 bl SetGpuReg - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r1, [r0] movs r0, 0x1 movs r1, 0x5 diff --git a/asm/menu.s b/asm/menu.s index 8bb9dc436..71ff9218c 100755 --- a/asm/menu.s +++ b/asm/menu.s @@ -5201,7 +5201,7 @@ sub_819A25C: @ 819A25C lsrs r4, 24 lsls r0, 16 lsrs r0, 16 - bl sub_80D30B0 + bl GetValidMonIconPalettePtr adds r1, r4, 0 movs r2, 0x20 bl LoadPalette @@ -5228,7 +5228,7 @@ sub_819A27C: @ 819A27C lsls r5, 16 lsrs r5, 16 movs r2, 0x1 - bl sub_80D2EDC + bl GetMonIconPtr adds r1, r0, 0 movs r0, 0x20 str r0, [sp] diff --git a/asm/party_menu.s b/asm/party_menu.s index 1e47701ae..2b320f86e 100755 --- a/asm/party_menu.s +++ b/asm/party_menu.s @@ -16228,7 +16228,7 @@ _081B8CBE: bne _081B8CFC movs r5, 0x1 movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity mov r2, sp ldr r1, =gBattlePartyID lsls r0, 24 @@ -16255,7 +16255,7 @@ _081B8CF0: _081B8CFC: movs r5, 0x2 movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity mov r1, sp ldr r4, =gBattlePartyID lsls r0, 24 @@ -16264,7 +16264,7 @@ _081B8CFC: ldrh r0, [r0] strb r0, [r1] movs r0, 0x2 - bl GetBankByPlayerAI + bl GetBankByIdentity mov r1, sp lsls r0, 24 lsrs r0, 23 @@ -16344,19 +16344,19 @@ sub_81B8D88: @ 81B8D88 cmp r0, 0 bne _081B8DB0 movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r4, r0, 24 movs r0, 0x2 b _081B8DBC _081B8DB0: movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r4, r0, 24 movs r0, 0x3 _081B8DBC: - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r6, r0, 24 bl sub_81B1250 diff --git a/asm/pokeball.s b/asm/pokeball.s index 06958d7d2..557813c19 100755 --- a/asm/pokeball.s +++ b/asm/pokeball.s @@ -185,7 +185,7 @@ _08075548: .pool _08075584: movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity ldr r1, =gBankTarget strb r0, [r1] movs r0, 0x1 @@ -1199,13 +1199,13 @@ _08075DD4: lsrs r0, 16 mov r9, r0 movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 cmp r5, r0 beq _08075E00 movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 cmp r5, r0 @@ -1261,13 +1261,13 @@ _08075E70: .pool _08075E80: movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 cmp r5, r0 beq _08075E9C movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 cmp r5, r0 @@ -1830,7 +1830,7 @@ _080762F8: movs r0, 0x3A ldrsh r4, [r5, r0] movs r0, 0x2 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 cmp r4, r0 @@ -1903,7 +1903,7 @@ sub_8076398: @ 8076398 movs r0, 0x3A ldrsh r4, [r5, r0] movs r0, 0x3 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 cmp r4, r0 diff --git a/asm/pokemon_icon.s b/asm/pokemon_icon.s index e90253ab0..6009bd3f3 100755 --- a/asm/pokemon_icon.s +++ b/asm/pokemon_icon.s @@ -32,7 +32,7 @@ sub_80D2CC4: @ 80D2CC4 str r0, [sp, 0x18] adds r0, r4, 0 adds r2, r5, 0 - bl sub_80D2EDC + bl GetMonIconPtr str r0, [sp, 0x1C] ldr r0, =gUnknown_0857C5B4 str r0, [sp, 0x20] @@ -271,9 +271,9 @@ _080D2ED2: bx r1 thumb_func_end sub_80D2E84 - thumb_func_start sub_80D2EDC -@ void *sub_80D2EDC(u16 speciesId, u32 personality, bool32) -sub_80D2EDC: @ 80D2EDC + thumb_func_start GetMonIconPtr +@ void *GetMonIconPtr(u16 speciesId, u32 personality, bool32) +GetMonIconPtr: @ 80D2EDC push {r4,lr} adds r4, r2, 0 lsls r0, 16 @@ -286,7 +286,7 @@ sub_80D2EDC: @ 80D2EDC pop {r4} pop {r1} bx r1 - thumb_func_end sub_80D2EDC + thumb_func_end GetMonIconPtr thumb_func_start sub_80D2EF8 sub_80D2EF8: @ 80D2EF8 @@ -534,8 +534,8 @@ sub_80D30A0: @ 80D30A0 .pool thumb_func_end sub_80D30A0 - thumb_func_start sub_80D30B0 -sub_80D30B0: @ 80D30B0 + thumb_func_start GetValidMonIconPalettePtr +GetValidMonIconPalettePtr: @ 80D30B0 push {lr} lsls r0, 16 lsrs r2, r0, 16 @@ -556,7 +556,7 @@ _080D30C2: pop {r1} bx r1 .pool - thumb_func_end sub_80D30B0 + thumb_func_end GetValidMonIconPalettePtr thumb_func_start sub_80D30DC sub_80D30DC: @ 80D30DC diff --git a/asm/pokemon_item_effect.s b/asm/pokemon_item_effect.s index 69895d5d0..5dc6452e9 100644 --- a/asm/pokemon_item_effect.s +++ b/asm/pokemon_item_effect.s @@ -1155,7 +1155,7 @@ _0806C6AE: movs r0, 0 movs r1, 0 movs r2, 0 - bl EmitGetAttributes + bl EmitGetMonData ldrb r0, [r4] bl MarkBufferBankForExecution strb r5, [r4] diff --git a/asm/pokemon_storage_system.s b/asm/pokemon_storage_system.s index 6cca9c144..d94da87b1 100755 --- a/asm/pokemon_storage_system.s +++ b/asm/pokemon_storage_system.s @@ -17910,7 +17910,7 @@ sub_80D07B0: @ 80D07B0 beq _080D0828 adds r0, r5, 0 movs r2, 0x1 - bl sub_80D2EDC + bl GetMonIconPtr adds r4, r0, 0 adds r0, r5, 0 bl sub_80D3080 diff --git a/asm/reshow_battle_screen.s b/asm/reshow_battle_screen.s index 97cc16c77..77d107f3d 100644 --- a/asm/reshow_battle_screen.s +++ b/asm/reshow_battle_screen.s @@ -103,13 +103,13 @@ _080A93B0: strh r1, [r0] ldr r0, =gUnknown_02022E16 strh r1, [r0] - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X strh r1, [r0] - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y strh r1, [r0] - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X strh r1, [r0] - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y strh r1, [r0] ldr r0, =gUnknown_02022E20 strh r1, [r0] @@ -223,7 +223,7 @@ _080A94F0: _080A94F8: bl sub_805EC84 movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -247,7 +247,7 @@ _080A94F8: cmp r0, 0 beq _080A955C movs r0, 0x3 - bl GetBankByPlayerAI + bl GetBankByIdentity adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 diff --git a/asm/rom3.s b/asm/rom3.s index bf68c86c8..131721493 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -2134,8 +2134,8 @@ _0803389C: .pool thumb_func_end sub_803375C - thumb_func_start EmitGetAttributes -EmitGetAttributes: @ 80338B4 + thumb_func_start EmitGetMonData +EmitGetMonData: @ 80338B4 push {r4,lr} adds r4, r1, 0 lsls r0, 24 @@ -2152,7 +2152,7 @@ EmitGetAttributes: @ 80338B4 pop {r0} bx r0 .pool - thumb_func_end EmitGetAttributes + thumb_func_end EmitGetMonData thumb_func_start dp01_build_cmdbuf_x01_a_b_0 dp01_build_cmdbuf_x01_a_b_0: @ 80338D8 @@ -2175,8 +2175,8 @@ dp01_build_cmdbuf_x01_a_b_0: @ 80338D8 .pool thumb_func_end dp01_build_cmdbuf_x01_a_b_0 - thumb_func_start EmitSetAttributes -EmitSetAttributes: @ 8033900 + thumb_func_start EmitSetMonData +EmitSetMonData: @ 8033900 push {r4-r6,lr} ldr r4, [sp, 0x10] lsls r0, 24 @@ -2209,7 +2209,7 @@ _0803392E: pop {r0} bx r0 .pool - thumb_func_end EmitSetAttributes + thumb_func_end EmitSetMonData thumb_func_start sub_8033940 sub_8033940: @ 8033940 @@ -2809,8 +2809,8 @@ dp01_build_cmdbuf_x12_a_bb: @ 8033DE4 .pool thumb_func_end dp01_build_cmdbuf_x12_a_bb - thumb_func_start sub_8033E10 -sub_8033E10: @ 8033E10 + thumb_func_start EmitCmd13 +EmitCmd13: @ 8033E10 push {lr} lsls r0, 24 lsrs r0, 24 @@ -2825,7 +2825,7 @@ sub_8033E10: @ 8033E10 pop {r0} bx r0 .pool - thumb_func_end sub_8033E10 + thumb_func_end EmitCmd13 thumb_func_start sub_8033E30 sub_8033E30: @ 8033E30 @@ -2995,8 +2995,8 @@ EmitExpUpdate: @ 8033F34 .pool thumb_func_end EmitExpUpdate - thumb_func_start dp01_build_cmdbuf_x1A_aaaa_bbbb -dp01_build_cmdbuf_x1A_aaaa_bbbb: @ 8033F68 + thumb_func_start EmitStatusIconUpdate +EmitStatusIconUpdate: @ 8033F68 push {r4-r6,lr} adds r4, r1, 0 lsls r0, 24 @@ -3036,7 +3036,7 @@ dp01_build_cmdbuf_x1A_aaaa_bbbb: @ 8033F68 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x1A_aaaa_bbbb + thumb_func_end EmitStatusIconUpdate thumb_func_start EmitStatusAnimation EmitStatusAnimation: @ 8033FBC @@ -3718,8 +3718,8 @@ _08034490: .pool thumb_func_end EmitLinkStandbyMsg - thumb_func_start dp01_build_cmdbuf_x38_a -dp01_build_cmdbuf_x38_a: @ 80344A8 + thumb_func_start EmitResetActionMoveSelection +EmitResetActionMoveSelection: @ 80344A8 push {lr} adds r3, r1, 0 lsls r0, 24 @@ -3733,7 +3733,7 @@ dp01_build_cmdbuf_x38_a: @ 80344A8 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x38_a + thumb_func_end EmitResetActionMoveSelection thumb_func_start Emit_x37 Emit_x37: @ 80344C8 diff --git a/asm/rom_80A5C6C.s b/asm/rom_80A5C6C.s index ea75d4e2b..267045179 100644 --- a/asm/rom_80A5C6C.s +++ b/asm/rom_80A5C6C.s @@ -1830,8 +1830,8 @@ GetBankIdentity: @ 80A6A44 .pool thumb_func_end GetBankIdentity - thumb_func_start GetBankByPlayerAI -GetBankByPlayerAI: @ 80A6A54 + thumb_func_start GetBankByIdentity +GetBankByIdentity: @ 80A6A54 push {r4,lr} lsls r0, 24 lsrs r3, r0, 24 @@ -1860,7 +1860,7 @@ _080A6A7E: pop {r1} bx r1 .pool - thumb_func_end GetBankByPlayerAI + thumb_func_end GetBankByIdentity thumb_func_start sub_80A6A90 sub_80A6A90: @ 80A6A90 @@ -3496,7 +3496,7 @@ _080A76F2: cmp r5, 0 beq _080A771A movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 bl b_side_obj__get_some_boolean @@ -3504,7 +3504,7 @@ _080A76F2: cmp r0, 0 beq _080A771A movs r0, 0 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 adds r0, 0x10 @@ -3514,7 +3514,7 @@ _080A771A: cmp r6, 0 beq _080A7746 movs r0, 0x2 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 bl b_side_obj__get_some_boolean @@ -3522,7 +3522,7 @@ _080A771A: cmp r0, 0 beq _080A7746 movs r0, 0x2 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 adds r1, r0, 0 @@ -3534,7 +3534,7 @@ _080A7746: cmp r7, 0 beq _080A7772 movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 bl b_side_obj__get_some_boolean @@ -3542,7 +3542,7 @@ _080A7746: cmp r0, 0 beq _080A7772 movs r0, 0x1 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 adds r1, r0, 0 @@ -3555,7 +3555,7 @@ _080A7772: cmp r0, 0 beq _080A77A0 movs r0, 0x3 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 bl b_side_obj__get_some_boolean @@ -3563,7 +3563,7 @@ _080A7772: cmp r0, 0 beq _080A77A0 movs r0, 0x3 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 adds r1, r0, 0 @@ -3592,7 +3592,7 @@ sub_80A77B4: @ 80A77B4 push {lr} lsls r0, 24 lsrs r0, 24 - bl GetBankByPlayerAI + bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 pop {r1} diff --git a/asm/title_screen.s b/asm/title_screen.s index 15037e80d..be102343b 100644 --- a/asm/title_screen.s +++ b/asm/title_screen.s @@ -468,7 +468,7 @@ title_screen_vblank_callback: @ 80AA780 bl LoadOam bl ProcessSpriteCopyRequests bl TransferPlttBuffer - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y ldrh r1, [r0] movs r0, 0x16 bl SetGpuReg @@ -1156,14 +1156,14 @@ _080AAE30: ldrh r0, [r3, 0x10] adds r0, 0x1 strh r0, [r3, 0x10] - ldr r2, =gUnknown_02022E1A + ldr r2, =gBattle_BG1_Y movs r1, 0x10 ldrsh r0, [r3, r1] lsrs r1, r0, 31 adds r0, r1 asrs r0, 1 strh r0, [r2] - ldr r1, =gUnknown_02022E18 + ldr r1, =gBattle_BG1_X movs r0, 0 strh r0, [r1] _080AAE72: diff --git a/asm/unknown_task.s b/asm/unknown_task.s index e3526c809..9c01afe93 100644 --- a/asm/unknown_task.s +++ b/asm/unknown_task.s @@ -275,19 +275,19 @@ _080BA21C: b _080BA24E .pool _080BA224: - ldr r0, =gUnknown_02022E18 + ldr r0, =gBattle_BG1_X b _080BA24E .pool _080BA22C: - ldr r0, =gUnknown_02022E1A + ldr r0, =gBattle_BG1_Y b _080BA24E .pool _080BA234: - ldr r0, =gUnknown_02022E1C + ldr r0, =gBattle_BG2_X b _080BA24E .pool _080BA23C: - ldr r0, =gUnknown_02022E1E + ldr r0, =gBattle_BG2_Y b _080BA24E .pool _080BA244: diff --git a/data/battle_4.s b/data/battle_4.s index 3300b25ee..8f1872733 100644 --- a/data/battle_4.s +++ b/data/battle_4.s @@ -5,51 +5,6 @@ .section .rodata - -gMoveEffectBS_Ptrs:: @ 831C224 - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB386 - .4byte gUnknown_082DB395 - .4byte gUnknown_082DB3A4 - .4byte gUnknown_082DB3B3 - .4byte gUnknown_082DB3C9 - .4byte gUnknown_082DB3E6 - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB3C2 - .4byte gUnknown_082DB3D6 - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB3DD - .4byte gUnknown_082DB3F4 - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB36A - .4byte gUnknown_082DB3F4 - - .align 2 - window_template 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x003f - .align 2 gUnknown_0831C2C8:: @ 831C2C8 .incbin "graphics/battle_interface/unk_battlebox.gbapal" @@ -66,21 +21,21 @@ gUnknown_0831C3B8:: @ 831C3B8 .byte 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00 .align 2 -gUnknown_0831C3C0:: @ 831C3C0 +SpriteTemplate_MonIconOnLvlUpBox:: @ 831C3C0 .2byte 0xd75a @ tileTag .2byte 0xd75a @ paletteTag .4byte gUnknown_0831C3B8 .4byte gDummySpriteAnimTable .4byte NULL .4byte gDummySpriteAffineAnimTable - .4byte sub_804F450 + .4byte SpriteCB_MonIconOnLvlUpBox .align 2 sProtectSuccessRates:: @ 831C3D8 .2byte 0xffff, 0x7fff, 0x3fff, 0x1fff .align 2 -gUnknown_0831C3E0:: @ 831C3E0 +gMovesForbiddenToCopy:: @ 831C3E0 .2byte MOVE_METRONOME, MOVE_STRUGGLE, MOVE_SKETCH, MOVE_MIMIC .2byte 0xfffe, MOVE_COUNTER, MOVE_MIRROR_COAT, MOVE_PROTECT .2byte MOVE_DETECT, MOVE_ENDURE, MOVE_DESTINY_BOND, MOVE_SLEEP_TALK diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 44d0e7ed5..1fb6b8189 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -30,7 +30,7 @@ gUnknown_082D9EE1:: @ 82D9EE1 gUnknown_082D9EFB:: @ 82D9EFB .incbin "baserom.gba", 0x2d9efb, 0x21 -gUnknown_082D9F1C:: @ 82D9F1C +BattleScript_ButItFailed:: @ 82D9F1C .incbin "baserom.gba", 0x2d9f1c, 0x88e BattleScript_FaintAttacker:: @ 82DA7AA @@ -135,7 +135,7 @@ BattleScript_BideNoEnergyToAttack:: @ 82DADC4 gUnknown_082DADD8:: @ 82DADD8 .incbin "baserom.gba", 0x2dadd8, 0x2b -gUnknown_082DAE03:: @ 82DAE03 +BattleScript_MistProtected:: @ 82DAE03 .incbin "baserom.gba", 0x2dae03, 0xa BattleScript_RageIsBuilding:: @ 82DAE0D @@ -300,7 +300,7 @@ BattleScript_MoveUsedIsConfused:: @ 82DB2BD BattleScript_MoveUsedIsConfusedNoMore:: @ 82DB300 .incbin "baserom.gba", 0x2db300, 0x7 -gUnknown_082DB307:: @ 82DB307 +BattleScript_PrintPayDayMoneyString:: @ 82DB307 .incbin "baserom.gba", 0x2db307, 0x7 BattleScript_WrapTurnDmg:: @ 82DB30E @@ -324,40 +324,40 @@ BattleScript_CurseTurnDmg:: @ 82DB350 BattleScript_TargetPRLZHeal:: @ 82DB361 .incbin "baserom.gba", 0x2db361, 0x9 -gUnknown_082DB36A:: @ 82DB36A +BattleScript_MoveEffectSleep:: @ 82DB36A .incbin "baserom.gba", 0x2db36A, 0xE BattleScript_YawnMakesAsleep:: @ 82DB378 .incbin "baserom.gba", 0x2db378, 0xE -gUnknown_082DB386:: @ 82DB386 +BattleScript_MoveEffectPoison:: @ 82DB386 .incbin "baserom.gba", 0x2db386, 0xF -gUnknown_082DB395:: @ 82DB395 +BattleScript_MoveEffectBurn:: @ 82DB395 .incbin "baserom.gba", 0x2db395, 0xF -gUnknown_082DB3A4:: @ 82DB3A4 +BattleScript_MoveEffectFreeze:: @ 82DB3A4 .incbin "baserom.gba", 0x2db3A4, 0xF -gUnknown_082DB3B3:: @ 82DB3B3 +BattleScript_MoveEffectParalysis:: @ 82DB3B3 .incbin "baserom.gba", 0x2db3B3, 0xF -gUnknown_082DB3C2:: @ 82DB3C2 +BattleScript_MoveEffectUproar:: @ 82DB3C2 .incbin "baserom.gba", 0x2db3C2, 0x7 -gUnknown_082DB3C9:: @ 82DB3C9 +BattleScript_MoveEffectToxic:: @ 82DB3C9 .incbin "baserom.gba", 0x2db3C9, 0xD -gUnknown_082DB3D6:: @ 82DB3D6 +BattleScript_MoveEffectPayDay:: @ 82DB3D6 .incbin "baserom.gba", 0x2db3D6, 0x7 -gUnknown_082DB3DD:: @ 82DB3DD +BattleScript_MoveEffectWrap:: @ 82DB3DD .incbin "baserom.gba", 0x2db3DD, 0x9 -gUnknown_082DB3E6:: @ 82DB3E6 +BattleScript_MoveEffectConfusion:: @ 82DB3E6 .incbin "baserom.gba", 0x2db3E6, 0xE -gUnknown_082DB3F4:: @ 82DB3F4 +BattleScript_MoveEffectRecoil33:: @ 82DB3F4 .incbin "baserom.gba", 0x2db3F4, 0x2e BattleScript_ItemSteal:: @ 82DB422 @@ -396,10 +396,10 @@ BattleScript_DroughtActivates:: @ 82DB52A BattleScript_TookAttack:: @ 82DB53E .incbin "baserom.gba", 0x2db53e, 0x14 -gUnknown_082DB552:: @ 82DB552 +BattleScript_SturdyPreventsOHKO:: @ 82DB552 .incbin "baserom.gba", 0x2db552, 0xe -gUnknown_082DB560:: @ 82DB560 +BattleScript_DampStopsExplosion:: @ 82DB560 .incbin "baserom.gba", 0x2db560, 0xe BattleScript_MoveHPDrain_PPLoss:: @ 82DB56E @@ -420,7 +420,7 @@ BattleScript_FlashFireBoost_PPLoss:: @ 82DB5A7 BattleScript_FlashFireBoost:: @ 82DB5A8 .incbin "baserom.gba", 0x2db5a8, 0x1f -gUnknown_082DB5C7:: @ 82DB5C7 +BattleScript_AbilityNoStatLoss:: @ 82DB5C7 .incbin "baserom.gba", 0x2db5c7, 0xa BattleScript_BRNPrevention:: @ 82DB5D1 @@ -432,7 +432,7 @@ BattleScript_PRLZPrevention:: @ 82DB5DD BattleScript_PSNPrevention:: @ 82DB5E9 .incbin "baserom.gba", 0x2db5e9, 0xc -gUnknown_082DB5F5:: @ 82DB5F5 +BattleScript_ObliviousPreventsAttraction:: @ 82DB5F5 .incbin "baserom.gba", 0x2db5f5, 0xe BattleScript_FlinchPrevention:: @ 82DB603 @@ -441,7 +441,7 @@ BattleScript_FlinchPrevention:: @ 82DB603 BattleScript_SoundproofProtected:: @ 82DB61F .incbin "baserom.gba", 0x2db61f, 0x10 -gUnknown_082DB62F:: @ 82DB62F +BattleScript_AbilityNoSpecificStatLoss:: @ 82DB62F .incbin "baserom.gba", 0x2db62f, 0x10 BattleScript_StickyHoldOnKnockOff:: @ 82DB63F diff --git a/include/battle.h b/include/battle.h index d45944274..f84a75cba 100644 --- a/include/battle.h +++ b/include/battle.h @@ -1,8 +1,28 @@ #ifndef GUARD_BATTLE_H #define GUARD_BATTLE_H +/* + Banks are a name given to what could be called a 'battlerId' or 'monControllerId'. + Each bank has a value consisting of two bits. + 0x1 bit is responsible for the side, 0 = player's side, 1 = opponent's side. + 0x2 bit is responsible for the id of sent out pokemon. 0 means it's the first sent out pokemon, 1 it's the second one. (Triple battle didn't exist at the time yet.) +*/ + #define BATTLE_BANKS_COUNT 4 +#define IDENTITY_PLAYER_MON1 0 +#define IDENTITY_OPPONENT_MON1 1 +#define IDENTITY_PLAYER_MON2 2 +#define IDENTITY_OPPONENT_MON2 3 + +#define SIDE_PLAYER 0x0 +#define SIDE_OPPONENT 0x1 + +#define BIT_SIDE 0x1 +#define BIT_MON 0x2 + +#define GET_BANK_SIDE(bank)((GetBankIdentity(bank) & BIT_SIDE)) + #define BATTLE_TYPE_DOUBLE 0x0001 #define BATTLE_TYPE_LINK 0x0002 #define BATTLE_TYPE_WILD 0x0004 @@ -40,9 +60,6 @@ #define BATTLE_TYPE_FRONTIER (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOME | BATTLE_TYPE_PALACE | BATTLE_TYPE_ARENA | BATTLE_TYPE_FACTORY | BATTLE_TYPE_x100000 | BATTLE_TYPE_PYRAMID) -#define SIDE_PLAYER 0x0 -#define SIDE_OPPONENT 0x1 - #define BATTLE_WON 0x1 #define BATTLE_LOST 0x2 #define BATTLE_DREW 0x3 @@ -66,11 +83,12 @@ #define STATUS2_CONFUSION 0x00000007 #define STATUS2_FLINCHED 0x00000008 #define STATUS2_UPROAR 0x00000070 -#define STATUS2_BIDE 0x00000300 //two bits 0x100 0x200 +#define STATUS2_BIDE 0x00000300 // two bits 0x100, 0x200 #define STATUS2_LOCK_CONFUSE 0x00000C00 #define STATUS2_MULTIPLETURNS 0x00001000 #define STATUS2_WRAPPED 0x0000E000 -#define STATUS2_INFATUATION 0x000F0000 +#define STATUS2_INFATUATION 0x000F0000 // 4 bits, one for every bank +#define STATUS2_INFATUATED_WITH(bank)((gBitTable[bank] << 16)) #define STATUS2_FOCUS_ENERGY 0x00100000 #define STATUS2_TRANSFORMED 0x00200000 #define STATUS2_RECHARGE 0x00400000 @@ -86,7 +104,7 @@ #define STATUS3_LEECHSEED_BANK 0x3 #define STATUS3_LEECHSEED 0x4 -#define STATUS3_ALWAYS_HITS 0x18 //two bits +#define STATUS3_ALWAYS_HITS 0x18 // two bits #define STATUS3_PERISH_SONG 0x20 #define STATUS3_ON_AIR 0x40 #define STATUS3_UNDERGROUND 0x80 @@ -188,17 +206,6 @@ #define WEATHER_HAIL (1 << 7) #define WEATHER_HAIL_ANY ((WEATHER_HAIL)) -#define REQUEST_ALL_BATTLE 0x0 -#define REQUEST_SPECIES_BATTLE 0x1 -#define REQUEST_HELDITEM_BATTLE 0x2 -#define REQUEST_MOVES_PP_BATTLE 0x3 -#define REQUEST_PPMOVE1_BATTLE 0x9 -#define REQUEST_PPMOVE2_BATTLE 0xA -#define REQUEST_PPMOVE3_BATTLE 0xB -#define REQUEST_PPMOVE4_BATTLE 0xC -#define REQUEST_STATUS_BATTLE 0x28 -#define REQUEST_HP_BATTLE 0x2A - // array entries for battle communication #define CURSOR_POSITION 0x1 #define MOVE_EFFECT_BYTE 0x3 @@ -222,6 +229,7 @@ #define BS_GET_TARGET 0 #define BS_GET_ATTACKER 1 #define BS_GET_EFFECT_BANK 2 +#define BS_ATTACKER_WITH_PARTNER 4 // for atk98_status_icon_update #define BS_GET_ATTACKER_SIDE 8 // for atk1E_jumpifability #define BS_GET_NOT_ATTACKER_SIDE 9 // for atk1E_jumpifability #define BS_GET_SCRIPTING_BANK 10 @@ -384,11 +392,11 @@ extern struct ProtectStruct gProtectStructs[BATTLE_BANKS_COUNT]; struct SpecialStatus { - u8 statLowered : 1; - u8 lightningRodRedirected : 1; - u8 restoredBankSprite: 1; - u8 intimidatedPoke : 1; - u8 traced : 1; + u8 statLowered : 1; // 0x1 + u8 lightningRodRedirected : 1; // 0x2 + u8 restoredBankSprite: 1; // 0x4 + u8 intimidatedPoke : 1; // 0x8 + u8 traced : 1; // 0x10 u8 flag20 : 1; u8 flag40 : 1; u8 focusBanded : 1; @@ -690,6 +698,7 @@ struct BattleStruct u8 field_298[8]; u8 field_2A0; u8 field_2A1; + u8 field_2A2; }; extern struct BattleStruct* gBattleStruct; @@ -709,6 +718,13 @@ extern struct BattleStruct* gBattleStruct; varName = (u16*)(((void*)(*memes1) + (u32)(memes2))); \ } +#define GET_USED_ITEM_PTR_VIA_MEME_ACCESS(bank, varName) \ +{ \ + void** memes1 = (void**)(&gBattleStruct); \ + void* memes2 = (void*)((u32)(bank * 2 + offsetof(struct BattleStruct, usedHeldItems))); \ + varName = (u16*)(((void*)(*memes1) + (u32)(memes2))); \ +} + #define GET_HP_SWITCHOUT_PTR_VIA_MEME_ACCESS(bank, varName) \ { \ void** memes1 = (void**)(&gBattleStruct); \ @@ -724,8 +740,6 @@ extern struct BattleStruct* gBattleStruct; typeArg = gBattleMoves[move].type; \ } -#define GET_BANK_SIDE(bank)((GetBankIdentity(bank) & 1)) - #define MOVE_EFFECT_SLEEP 0x1 #define MOVE_EFFECT_POISON 0x2 #define MOVE_EFFECT_BURN 0x3 @@ -832,26 +846,39 @@ extern struct BattleStruct* gBattleStruct; #define ATK4F_DONT_CHECK_STATUSES 0x80 +#define VARIOUS_CANCEL_MULTI_TURN_MOVES 0 +#define VARIOUS_SET_MAGIC_COAT_TARGET 1 +#define VARIOUS_GET_MOVE_TARGET 3 +#define VARIOUS_RESET_INTIMIDATE_TRACE_BITS 5 +#define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6 +#define VARIOUS_WAIT_CRY 18 +#define VARIOUS_RETURN_OPPONENT_MON1 19 +#define VARIOUS_RETURN_OPPONENT_MON2 20 +#define VARIOUS_SET_TELEPORT_OUTCOME 25 +#define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 26 + +#define ATK80_DMG_CHANGE_SIGN 0 +#define ATK80_DMG_HALF_BY_TWO_NOT_MORE_THAN_HALF_MAX_HP 1 +#define ATK80_DMG_DOUBLED 2 + #define GET_STAT_BUFF_ID(n)((n & 0xF)) // first four bits 0x1, 0x2, 0x4, 0x8 -#define GET_STAT_BUFF_VALUE(n)((n & 0xF0) >> 4) // 0x10, 0x20, 0x40 +#define GET_STAT_BUFF_VALUE(n)(((n >> 4) & 7)) // 0x10, 0x20, 0x40 #define STAT_BUFF_NEGATIVE 0x80 // 0x80, the sign bit +#define STAT_CHANGE_BS_PTR 0x1 +#define STAT_CHANGE_NOT_PROTECT_AFFECTED 0x20 + +#define STAT_CHANGE_WORKED 0 +#define STAT_CHANGE_DIDNT_WORK 1 + #define SET_STAT_BUFF_ID(n)((n & 0xF)) #define SET_STAT_BUFF_VALUE(n)(((s8)(((s8)(n) << 4)) & 0xF0)) struct BattleScripting { - u8 field_0; - u8 field_1; - u8 field_2; - u8 field_3; - u32 bideDmg; - u8 field_8; - u8 field_9; - u8 field_A; - u8 field_B; - u8 field_C; - u8 field_D; + s32 painSplitHp; + s32 bideDmg; + u8 multihitString[6]; u8 dmgMultiplier; u8 field_F; u8 animArg1; @@ -868,7 +895,7 @@ struct BattleScripting u8 field_1B; u8 atk23_state; u8 field_1D; - u8 field_1E; + u8 atk6C_state; u8 learnMoveState; }; @@ -887,6 +914,9 @@ void SwitchInClearStructs(void); void sub_803BDA0(u8 bank); void sub_803FA70(u8 bank); void BattleMainCB2(void); +void ResetSentPokesToOpponentValue(void); +bool8 CanRunFromBattle(u8 bank); +bool8 IsRunningFromBattleImpossible(void); // battle_3 void BattleScriptPush(const u8* bsPtr); @@ -920,10 +950,12 @@ u8 AI_TypeCalc(u16 move, u16 species, u8 ability); u8 BankGetTurnOrder(u8 bank); void BattleDestroyCursorAt(u8 cursorPosition); void BattleCreateCursorAt(u8 cursorPosition); +void BufferMoveToLearnIntoBattleTextBuff2(void); // battle_5 void AdjustFriendshipOnBattleFaint(u8 bank); void sub_80571DC(u8 bank, u8 arg1); +u32 sub_805725C(u8 bank); // battle 7 void BattleMusicStop(void); @@ -932,7 +964,7 @@ void sub_805E990(struct Pokemon* mon, u8 bank); // rom_80A5C6C u8 GetBankSide(u8 bank); u8 GetBankIdentity(u8 bank); -u8 GetBankByPlayerAI(u8 bank); +u8 GetBankByIdentity(u8 bank); // Move this somewhere else diff --git a/include/battle_controllers.h b/include/battle_controllers.h index b24aa9cc5..bb58cb699 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -7,8 +7,26 @@ struct HpAndStatus u32 status; }; +struct MovePpInfo +{ + u16 move[4]; + u8 pp[4]; + u8 ppBonuses; +}; + +#define REQUEST_ALL_BATTLE 0x0 +#define REQUEST_SPECIES_BATTLE 0x1 +#define REQUEST_HELDITEM_BATTLE 0x2 +#define REQUEST_MOVES_PP_BATTLE 0x3 +#define REQUEST_PPMOVE1_BATTLE 0x9 +#define REQUEST_PPMOVE2_BATTLE 0xA +#define REQUEST_PPMOVE3_BATTLE 0xB +#define REQUEST_PPMOVE4_BATTLE 0xC +#define REQUEST_STATUS_BATTLE 0x28 +#define REQUEST_HP_BATTLE 0x2A + // rom3.s, emitters -void EmitSetAttributes(u8 bufferId, u8 request, u8 c, u8 bytes, void *data); +void EmitSetMonData(u8 bufferId, u8 request, u8 c, u8 bytes, void *data); void EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 movePower, s32 dmg, u8 friendship, struct DisableStruct* disableStructPtr, u8 multihit); void EmitHealthBarUpdate(u8 bufferId, u16 hpValue); void EmitEffectivenessSound(u8 bufferId, u16 songId); @@ -20,7 +38,7 @@ void EmitExpUpdate(u8 bufferId, u8 partyId, u16 expPoints); void EmitBattleAnimation(u8 bufferId, u8 animationId, u16 argument); void EmitSpriteInvisibility(u8 bufferId, bool8 isInvisible); void EmitReturnPokeToBall(u8 bufferId, u8 arg1); -void EmitGetAttributes(u8 bufferId, u8 arg1, u8 arg2); +void EmitGetMonData(u8 bufferId, u8 arg1, u8 arg2); void EmitSwitchInAnim(u8 bufferId, u8 partyId, bool8 dontClearSubstituteBit); void EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, const u8* arg4); void EmitLinkStandbyMsg(u8 bufferId, u8 arg1, u8 arg2); @@ -31,6 +49,13 @@ void EmitHitAnimation(u8 bufferId); void EmitCmd48(u8 bufferId, struct HpAndStatus* hpAndStatus, u8 arg2); void EmitCmd49(u8 bufferId); void EmitStatusAnimation(u8 bufferId, bool8 status2, u32 status); +void EmitCmd13(u8 bufferId); +void EmitStatusIconUpdate(u8 bufferId, u32 status1, u32 status2); +void EmitResetActionMoveSelection(u8 bufferId, u8 caseId); + +#define RESET_ACTION_MOVE_SELECTION 0 +#define RESET_ACTION_SELECTION 1 +#define RESET_MOVE_SELECTION 2 void MarkBufferBankForExecution(u8 bank); diff --git a/include/battle_message.h b/include/battle_message.h index ad1ce3455..3e28fa5e5 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -74,6 +74,22 @@ #define B_BUFF_PLACEHOLDER_BEGIN 0xFD #define B_BUFF_EOS 0xFF +#define PREPARE_STAT_BUFFER(textVar, statId) \ +{ \ + textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ + textVar[1] = B_BUFF_STAT; \ + textVar[2] = statId; \ + textVar[3] = B_BUFF_EOS; \ +} + +#define PREPARE_TYPE_BUFFER(textVar, typeId) \ +{ \ + textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ + textVar[1] = B_BUFF_TYPE; \ + textVar[2] = typeId; \ + textVar[3] = B_BUFF_EOS; \ +} + #define PREPARE_BYTE_NUMBER_BUFFER(textVar, maxDigits, number) \ { \ textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ @@ -84,6 +100,17 @@ textVar[5] = B_BUFF_EOS; \ } +#define PREPARE_HWORD_NUMBER_BUFFER(textVar, maxDigits, number) \ +{ \ + textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ + textVar[1] = B_BUFF_NUMBER; \ + textVar[2] = 2; \ + textVar[3] = maxDigits; \ + textVar[4] = (number); \ + textVar[5] = (number & 0x0000FF00) >> 8; \ + textVar[6] = B_BUFF_EOS; \ +} + #define PREPARE_WORD_NUMBER_BUFFER(textVar, maxDigits, number) \ { \ textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ @@ -158,7 +185,7 @@ struct StringInfoBattle }; void BufferStringBattle(u16 stringID); -u32 StrCpyDecodeToDisplayedStringBattle(const u8* src); +u32 BattleStringExpandPlaceholdersToDisplayedString(const u8* src); u32 BattleStringExpandPlaceholders(const u8* src, u8* dst); void sub_814F9EC(const u8* text, u8 arg1); diff --git a/include/moves.h b/include/moves.h index e3b6d3113..bc213cbc7 100644 --- a/include/moves.h +++ b/include/moves.h @@ -360,4 +360,6 @@ enum MOVE_PSYCHO_BOOST, }; -#endif // GUARD_MOVES_H \ No newline at end of file +#define LAST_MOVE_INDEX MOVE_PSYCHO_BOOST + +#endif // GUARD_MOVES_H diff --git a/include/pokemon.h b/include/pokemon.h index 518d28e58..20e904f39 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -126,6 +126,8 @@ #define TYPE_DRAGON 0x10 #define TYPE_DARK 0x11 +#define NUMBER_OF_MON_TYPES 0x12 + #define PARTY_SIZE 6 #define MAX_TOTAL_EVS 510 #define NUM_STATS 6 @@ -333,6 +335,8 @@ struct UnknownPokemonStruct u8 friendship; }; +#define BATTLE_STATS_NO 8 + struct BattlePokemon { /*0x00*/ u16 species; @@ -350,7 +354,7 @@ struct BattlePokemon /*0x17*/ u32 spDefenseIV:5; /*0x17*/ u32 isEgg:1; /*0x17*/ u32 altAbility:1; - /*0x18*/ s8 statStages[8]; + /*0x18*/ s8 statStages[BATTLE_STATS_NO]; /*0x20*/ u8 ability; /*0x21*/ u8 type1; /*0x22*/ u8 type2; @@ -521,6 +525,7 @@ extern struct PokemonStorage* gPokemonStoragePtr; extern const u32 gExperienceTables[][MAX_MON_LEVEL + 1]; extern const u16 *const gLevelUpLearnsets[]; +u8 CountAliveMonsInBattle(u8 caseId); #define BATTLE_ALIVE_EXCEPT_ACTIVE 0 #define BATTLE_ALIVE_ATK_SIDE 1 #define BATTLE_ALIVE_DEF_SIDE 2 diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h new file mode 100644 index 000000000..b82334355 --- /dev/null +++ b/include/pokemon_icon.h @@ -0,0 +1,7 @@ +#ifndef GUARD_POKEMON_ICON_H +#define GUARD_POKEMON_ICON_H + +const u8 *GetMonIconPtr(u16 speciesId, u32 personality, u32 frameNo); +const u16 *GetValidMonIconPalettePtr(u16 speciesId); + +#endif // GUARD_POKEMON_ICON_H diff --git a/include/pokemon_item_effects.h b/include/pokemon_item_effects.h new file mode 100644 index 000000000..88f341317 --- /dev/null +++ b/include/pokemon_item_effects.h @@ -0,0 +1,8 @@ +#ifndef GUARD_POKEMON_ITEM_EFFECTS +#define GUARD_POKEMON_ITEM_EFFECTS + +#include "pokemon.h" + +bool8 ExecuteTableBasedItemEffect(struct Pokemon *mon, u16 itemId, u8 partyId, u8 monMoveIndex, u8 a5); + +#endif // GUARD_POKEMON_ITEM_EFFECTS diff --git a/include/text.h b/include/text.h index f0c85b978..88f2cc0e2 100644 --- a/include/text.h +++ b/include/text.h @@ -65,6 +65,7 @@ #define CHAR_x 0xEC #define CHAR_y 0xED #define CHAR_z 0xEE +#define CHAR_SPECIAL_F9 0xF9 #define CHAR_COLON 0xF0 #define CHAR_PROMPT_SCROLL 0xFA // waits for button press and scrolls dialog #define CHAR_PROMPT_CLEAR 0xFB // waits for button press and clears dialog @@ -73,6 +74,10 @@ #define CHAR_NEWLINE 0xFE #define EOS 0xFF // end of string +#define TEXT_COLOR_TRANSPARENT 0x0 +#define TEXT_COLOR_WHITE 0x1 +#define TEXT_COLOR_DARK_GREY 0x2 + // battle placeholders are located in battle_message.h #define EXT_CTRL_CODE_JPN 0x15 @@ -80,23 +85,26 @@ #define NUM_TEXT_PRINTERS 32 +struct TextSubPrinter // TODO: Better name +{ + u8* current_text_offset; + u8 windowId; + u8 fontId; + u8 x; + u8 y; + u8 currentX; // 0x8 + u8 currentY; + u8 letterSpacing; + u8 lineSpacing; + u8 fontColor_l:4; // 0xC + u8 fontColor_h:4; + u8 bgColor:4; + u8 shadowColor:4; +}; + struct TextPrinter { - struct TextSubPrinter { // TODO: Better name - u8* current_text_offset; - u8 windowId; - u8 fontId; - u8 x; - u8 y; - u8 currentX; // 0x8 - u8 currentY; - u8 letterSpacing; - u8 lineSpacing; - u8 fontColor_l:4; // 0xC - u8 fontColor_h:4; - u8 bgColor:4; - u8 shadowColor:4; - } subPrinter; + struct TextSubPrinter subPrinter; void (*callback)(struct TextSubPrinter *, u16); // 0x10 diff --git a/include/window.h b/include/window.h index e8af82e81..4e814ebc6 100644 --- a/include/window.h +++ b/include/window.h @@ -55,7 +55,7 @@ void PutWindowRectTilemap(u8 windowId, u8 x, u8 y, u8 width, u8 height); void BlitBitmapToWindow(u8 windowId, u8 *pixels, u16 x, u16 y, u16 width, u16 height); void BlitBitmapRectToWindow(u8 windowId, const u8 *pixels, u16 srcX, u16 srcY, u16 srcWidth, int srcHeight, u16 destX, u16 destY, u16 rectWidth, u16 rectHeight); void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height); -void CopyToWindowPixelBuffer(u8 windowId, u8 *src, u16 size, u16 tileOffset); +void CopyToWindowPixelBuffer(u8 windowId, const u8 *src, u16 size, u16 tileOffset); void FillWindowPixelBuffer(u8 windowId, u8 fillValue); void ScrollWindow(u8 windowId, u8 direction, u8 distance, u8 fillValue); void CallWindowFunction(u8 windowId, void ( *func)(u8, u8, u8, u8, u8, u8)); diff --git a/src/battle_3.c b/src/battle_3.c index 1b443118d..1fd84a61b 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -831,7 +831,7 @@ u8 TurnBasedEffects(void) gBattleCommunication[MULTISTRING_CHOOSER] = 1; b_call_bc_move_exec(gUnknown_082DB234); gActiveBank = gBankAttacker; - EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); + EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); MarkBufferBankForExecution(gActiveBank); break; } @@ -956,7 +956,7 @@ u8 TurnBasedEffects(void) { CancelMultiTurnMoves(gActiveBank); gBattleMons[gActiveBank].status1 |= (Random() & 3) + 2; - EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); + EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); MarkBufferBankForExecution(gActiveBank); gEffectBank = gActiveBank; b_call_bc_move_exec(BattleScript_YawnMakesAsleep); @@ -1446,7 +1446,7 @@ u8 AtkCanceller_UnableToUseMove(void) if (effect == 2) { gActiveBank = gBankAttacker; - EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); + EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); MarkBufferBankForExecution(gActiveBank); } return effect; @@ -1539,14 +1539,14 @@ bool8 sub_80423F4(u8 bank, u8 r1, u8 r2) { if (GetBankSide(bank) == SIDE_OPPONENT) { - r7 = GetBankByPlayerAI(1); - r6 = GetBankByPlayerAI(3); + r7 = GetBankByIdentity(1); + r6 = GetBankByIdentity(3); party = gEnemyParty; } else { - r7 = GetBankByPlayerAI(0); - r6 = GetBankByPlayerAI(2); + r7 = GetBankByIdentity(0); + r6 = GetBankByIdentity(2); party = gPlayerParty; } if (r1 == 6) @@ -1835,7 +1835,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) gBattleMons[bank].status2 &= ~(STATUS2_NIGHTMARE); // fix nighmare glitch gBattleScripting.bank = gActiveBank = bank; b_push_move_exec(BattleScript_ShedSkinActivates); - EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[bank].status1); + EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[bank].status1); MarkBufferBankForExecution(gActiveBank); effect++; } @@ -2156,7 +2156,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) gBattlescriptCurrInstr = gUnknown_082DB68C; gBattleScripting.bank = i; gActiveBank = i; - EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); + EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); MarkBufferBankForExecution(gActiveBank); return effect; } @@ -2235,14 +2235,14 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) if (gBattleMons[i].ability == ABILITY_TRACE && (gStatuses3[i] & STATUS3_TRACE)) { u8 opposite = (GetBankIdentity(i) ^ 1) & 1; - u8 target1 = GetBankByPlayerAI(opposite); - u8 target2 = GetBankByPlayerAI(opposite + 2); + u8 target1 = GetBankByIdentity(opposite); + u8 target2 = GetBankByIdentity(opposite + 2); if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) { if (gBattleMons[target1].ability != 0 && gBattleMons[target1].hp != 0 && gBattleMons[target2].ability != 0 && gBattleMons[target2].hp != 0) { - gActiveBank = GetBankByPlayerAI(((Random() & 1) * 2) | opposite); + gActiveBank = GetBankByIdentity(((Random() & 1) * 2) | opposite); gBattleMons[i].ability = gBattleMons[gActiveBank].ability; gLastUsedAbility = gBattleMons[gActiveBank].ability; effect++; @@ -3106,7 +3106,7 @@ _08042E24:\n\ movs r1, 0x28\n\ movs r2, 0\n\ movs r3, 0x4\n\ - bl EmitSetAttributes\n\ + bl EmitSetMonData\n\ ldrb r0, [r4]\n\ bl MarkBufferBankForExecution\n\ bl _080443D0\n\ @@ -4500,7 +4500,7 @@ _08043BFC:\n\ movs r1, 0x28\n\ movs r2, 0\n\ movs r3, 0x4\n\ - bl EmitSetAttributes\n\ + bl EmitSetMonData\n\ ldrb r0, [r4]\n\ bl MarkBufferBankForExecution\n\ bl _0804443A\n\ @@ -4744,11 +4744,11 @@ _08043E42:\n\ eors r5, r1\n\ ands r5, r1\n\ adds r0, r5, 0\n\ - bl GetBankByPlayerAI\n\ + bl GetBankByIdentity\n\ lsls r0, 24\n\ lsrs r6, r0, 24\n\ adds r0, r5, 0x2\n\ - bl GetBankByPlayerAI\n\ + bl GetBankByIdentity\n\ lsls r0, 24\n\ lsrs r7, r0, 24\n\ ldr r0, =gBattleTypeFlags\n\ @@ -4792,7 +4792,7 @@ _08043E74:\n\ lsls r1, 1\n\ orrs r5, r1\n\ adds r0, r5, 0\n\ - bl GetBankByPlayerAI\n\ + bl GetBankByIdentity\n\ mov r2, r8\n\ strb r0, [r2]\n\ ldrb r0, [r2]\n\ @@ -5609,7 +5609,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleTextBuff1[3] = move >> 8; gBattleTextBuff1[4] = 0xFF; b_call_bc_move_exec(BattleScript_BerryPPHealEnd2); - EmitSetAttributes(0, i + REQUEST_PPMOVE1_BATTLE, 0, 1, &changedPP); + EmitSetMonData(0, i + REQUEST_PPMOVE1_BATTLE, 0, 1, &changedPP); MarkBufferBankForExecution(gActiveBank); effect = ITEM_PP_CHANGE; } @@ -5993,7 +5993,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) switch (effect) { case ITEM_STATUS_CHANGE: - EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[bank].status1); + EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[bank].status1); MarkBufferBankForExecution(gActiveBank); break; case ITEM_PP_CHANGE: @@ -6148,7 +6148,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleScripting.bank = bank; gStringBank = bank; gActiveBank = bank; - EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); + EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); MarkBufferBankForExecution(gActiveBank); break; } @@ -6251,7 +6251,7 @@ u8 GetMoveTarget(u16 move, u8 useMoveTarget) case MOVE_TARGET_BOTH: case MOVE_TARGET_FOES_AND_ALLY: case MOVE_TARGET_OPPONENTS_FIELD: - targetBank = GetBankByPlayerAI((GetBankIdentity(gBankAttacker) & 1) ^ 1); + targetBank = GetBankByIdentity((GetBankIdentity(gBankAttacker) & 1) ^ 1); if (gAbsentBankFlags & gBitTable[targetBank]) targetBank ^= 2; break; @@ -6264,22 +6264,22 @@ u8 GetMoveTarget(u16 move, u8 useMoveTarget) if (GetBankSide(gBankAttacker) == SIDE_PLAYER) { if (Random() & 1) - targetBank = GetBankByPlayerAI(1); + targetBank = GetBankByIdentity(1); else - targetBank = GetBankByPlayerAI(3); + targetBank = GetBankByIdentity(3); } else { if (Random() & 1) - targetBank = GetBankByPlayerAI(0); + targetBank = GetBankByIdentity(0); else - targetBank = GetBankByPlayerAI(2); + targetBank = GetBankByIdentity(2); } if (gAbsentBankFlags & gBitTable[targetBank]) targetBank ^= 2; } else - targetBank = GetBankByPlayerAI((GetBankIdentity(gBankAttacker) & 1) ^ 1); + targetBank = GetBankByIdentity((GetBankIdentity(gBankAttacker) & 1) ^ 1); break; case MOVE_TARGET_USER: case MOVE_TARGET_x10: diff --git a/src/battle_4.c b/src/battle_4.c index 77a4393c4..0f52ee0dd 100644 --- a/src/battle_4.c +++ b/src/battle_4.c @@ -24,6 +24,11 @@ #include "main.h" #include "palette.h" #include "money.h" +#include "bg.h" +#include "string_util.h" +#include "pokemon_icon.h" +#include "pokemon_item_effects.h" +#include "m4a.h" // variables @@ -91,6 +96,7 @@ extern u16 gUnknownMovesUsedByBanks[BATTLE_BANKS_COUNT]; extern u16 gLastUsedMovesByBanks[BATTLE_BANKS_COUNT]; extern u16 gTrainerBattleOpponent_A; extern u16 gTrainerBattleOpponent_B; +extern struct MusicPlayerInfo gMPlay_BGM; struct TrainerMoney { @@ -112,6 +118,15 @@ extern void sub_81A56B4(void); // battle frontier 2 extern void sub_81BFA38(struct Pokemon* party, u8 monPartyId, u8 monCount, void (*callback)(void), u16 move); // pokemon summary screen extern u8 sub_81C1B94(void); // pokemon summary screen extern void IncrementGameStat(u8 statId); // rom_4 +extern void sub_81D388C(struct Pokemon* mon, void* statStoreLocation); // pokenav.s +extern void sub_81D3640(u8 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); // pokenav.s +extern void sub_81D3784(u8 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); // pokenav.s +extern u8* GetMonNickname(struct Pokemon* mon, u8* dst); // party_menu +extern u8 sub_81A5258(u8* arg0); // battle frontier 2 +extern void sub_81A5BF8(void); // battle frontier 2 +extern void sub_81A5D44(void); // battle frontier 2 +extern void sub_81B8E80(u8 bank, u8, u8); // party menu +extern bool8 sub_81B1250(void); // ? // BattleScripts extern const u8 BattleScript_MoveEnd[]; @@ -162,6 +177,26 @@ extern const u8 gUnknown_082DB87D[]; extern const u8 gUnknown_082DAE90[]; extern const u8 gUnknown_082DAE59[]; extern const u8 gUnknown_082DAEC7[]; +extern const u8 BattleScript_MoveEffectSleep[]; +extern const u8 BattleScript_MoveEffectPoison[]; +extern const u8 BattleScript_MoveEffectBurn[]; +extern const u8 BattleScript_MoveEffectFreeze[]; +extern const u8 BattleScript_MoveEffectParalysis[]; +extern const u8 BattleScript_MoveEffectToxic[]; +extern const u8 BattleScript_MoveEffectConfusion[]; +extern const u8 BattleScript_MoveEffectUproar[]; +extern const u8 BattleScript_MoveEffectPayDay[]; +extern const u8 BattleScript_MoveEffectWrap[]; +extern const u8 BattleScript_MoveEffectRecoil33[]; +extern const u8 BattleScript_DampStopsExplosion[]; +extern const u8 BattleScript_MistProtected[]; +extern const u8 BattleScript_AbilityNoStatLoss[]; +extern const u8 BattleScript_AbilityNoSpecificStatLoss[]; +extern const u8 BattleScript_ButItFailed[]; +extern const u8 gUnknown_082DADD8[]; +extern const u8 BattleScript_PrintPayDayMoneyString[]; +extern const u8 BattleScript_SturdyPreventsOHKO[]; +extern const u8 BattleScript_ObliviousPreventsAttraction[]; // strings extern const u8 gText_BattleYesNoChoice[]; @@ -187,6 +222,14 @@ u8 AttacksThisTurn(u8 bank, u16 move); // Note: returns 1 if it's a charging tur static void CheckWonderGuardAndLevitate(void); u8 ChangeStatBuffs(s8 statValue, u8 statId, u8, const u8* BS_ptr); void sub_8056A3C(u8 arg0, u8 arg1, u8 arg2, u8 arg3, u8 arg4); +bool32 IsMonGettingExpSentOut(void); +void sub_804F17C(void); +bool8 sub_804F1CC(void); +void sub_804F100(void); +void sub_804F144(void); +bool8 sub_804F344(void); +void PutMonIconOnLvlUpBox(void); +void PutLevelAndGenderOnLvlUpBox(void); void atk00_attackcanceler(void); void atk01_accuracycheck(void); @@ -296,23 +339,23 @@ void atk68_80246A0(void); void atk69_dmg_adjustment3(void); void atk6A_removeitem(void); void atk6B_atknameinbuff1(void); -void atk6C_lvlbox_display(void); -void atk6D_set_sentpokes_values(void); +void atk6C_draw_lvlupbox(void); +void atk6D_reset_sentpokes_value(void); void atk6E_set_atk_to_player0(void); void atk6F_set_visible(void); -void atk70_record_ability(void); +void atk70_record_last_used_ability(void); void atk71_buffer_move_to_learn(void); void atk72_jump_if_can_run_frombattle(void); void atk73_hp_thresholds(void); void atk74_hp_thresholds2(void); -void atk75_8026A58(void); +void atk75_item_effect_on_opponent(void); void atk76_various(void); -void atk77_setprotect(void); +void atk77_set_protect_like(void); void atk78_faintifabilitynotdamp(void); void atk79_setatkhptozero(void); void atk7A_jumpwhiletargetvalid(void); void atk7B_healhalfHP_if_possible(void); -void atk7C_8025508(void); +void atk7C_trymirrormove(void); void atk7D_set_rain(void); void atk7E_setreflect(void); void atk7F_setseeded(void); @@ -330,13 +373,13 @@ void atk8A_normalisebuffs(void); void atk8B_setbide(void); void atk8C_confuseifrepeatingattackends(void); void atk8D_setmultihit_counter(void); -void atk8E_prepare_multihit(void); +void atk8E_init_multihit_string(void); void atk8F_forcerandomswitch(void); void atk90_conversion_type_change(void); void atk91_givepaydaymoney(void); void atk92_setlightscreen(void); void atk93_ko_move(void); -void atk94_gethalfcurrentenemyhp(void); +void atk94_damagetohalftargethp(void); void atk95_setsandstorm(void); void atk96_weatherdamage(void); void atk97_try_infatuation(void); @@ -345,7 +388,7 @@ void atk99_setmist(void); void atk9A_set_focusenergy(void); void atk9B_transformdataexecution(void); void atk9C_set_substitute(void); -void atk9D_copyattack(void); +void atk9D_mimicattackcopy(void); void atk9E_metronome(void); void atk9F_dmgtolevel(void); void atkA0_psywavedamageeffect(void); @@ -548,23 +591,23 @@ void (* const gBattleScriptingCommandsTable[])(void) = atk69_dmg_adjustment3, atk6A_removeitem, atk6B_atknameinbuff1, - atk6C_lvlbox_display, - atk6D_set_sentpokes_values, + atk6C_draw_lvlupbox, + atk6D_reset_sentpokes_value, atk6E_set_atk_to_player0, atk6F_set_visible, - atk70_record_ability, + atk70_record_last_used_ability, atk71_buffer_move_to_learn, atk72_jump_if_can_run_frombattle, atk73_hp_thresholds, atk74_hp_thresholds2, - atk75_8026A58, + atk75_item_effect_on_opponent, atk76_various, - atk77_setprotect, + atk77_set_protect_like, atk78_faintifabilitynotdamp, atk79_setatkhptozero, atk7A_jumpwhiletargetvalid, atk7B_healhalfHP_if_possible, - atk7C_8025508, + atk7C_trymirrormove, atk7D_set_rain, atk7E_setreflect, atk7F_setseeded, @@ -582,13 +625,13 @@ void (* const gBattleScriptingCommandsTable[])(void) = atk8B_setbide, atk8C_confuseifrepeatingattackends, atk8D_setmultihit_counter, - atk8E_prepare_multihit, + atk8E_init_multihit_string, atk8F_forcerandomswitch, atk90_conversion_type_change, atk91_givepaydaymoney, atk92_setlightscreen, atk93_ko_move, - atk94_gethalfcurrentenemyhp, + atk94_damagetohalftargethp, atk95_setsandstorm, atk96_weatherdamage, atk97_try_infatuation, @@ -597,7 +640,7 @@ void (* const gBattleScriptingCommandsTable[])(void) = atk9A_set_focusenergy, atk9B_transformdataexecution, atk9C_set_substitute, - atk9D_copyattack, + atk9D_mimicattackcopy, atk9E_metronome, atk9F_dmgtolevel, atkA0_psywavedamageeffect, @@ -781,7 +824,53 @@ const u32 gStatusFlagsForMoveEffects[] = 0x00000000 }; -extern const u8* const gMoveEffectBS_Ptrs[]; +const u8* const gMoveEffectBS_Ptrs[] = +{ + BattleScript_MoveEffectSleep, // 0 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_SLEEP + BattleScript_MoveEffectPoison, // MOVE_EFFECT_POISON + BattleScript_MoveEffectBurn, // MOVE_EFFECT_BURN + BattleScript_MoveEffectFreeze, // MOVE_EFFECT_FREEZE + BattleScript_MoveEffectParalysis, // MOVE_EFFECT_PARALYSIS + BattleScript_MoveEffectToxic, // MOVE_EFFECT_TOXIC + BattleScript_MoveEffectConfusion, // MOVE_EFFECT_CONFUSION + BattleScript_MoveEffectSleep, // MOVE_EFFECT_FLINCH + BattleScript_MoveEffectSleep, // MOVE_EFFECT_TRI_ATTACK + BattleScript_MoveEffectUproar, // MOVE_EFFECT_UPROAR + BattleScript_MoveEffectPayDay, // MOVE_EFFECT_PAYDAY + BattleScript_MoveEffectSleep, // MOVE_EFFECT_CHARGING + BattleScript_MoveEffectWrap, // MOVE_EFFECT_WRAP + BattleScript_MoveEffectRecoil33, // MOVE_EFFECT_RECOIL_25 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_ATK_PLUS_1 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_DEF_PLUS_1 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_SPD_PLUS_1 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_SP_ATK_PLUS_1 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_SP_DEF_PLUS_1 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_ACC_PLUS_1 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_EVS_PLUS_1 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_ATK_MINUS_1 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_DEF_MINUS_1 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_SPD_MINUS_1 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_SP_ATK_MINUS_1 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_SP_DEF_MINUS_1 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_ACC_MINUS_1 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_EVS_MINUS_1 + BattleScript_MoveEffectSleep, // MOVE_EFFECT_RECHARGE + BattleScript_MoveEffectSleep, // MOVE_EFFECT_RAGE + BattleScript_MoveEffectSleep, // MOVE_EFFECT_STEAL_ITEM + BattleScript_MoveEffectSleep, // MOVE_EFFECT_PREVENT_ESCAPE + BattleScript_MoveEffectSleep, // MOVE_EFFECT_NIGHTMARE + BattleScript_MoveEffectSleep, // MOVE_EFFECT_ALL_STATS_UP + BattleScript_MoveEffectSleep, // MOVE_EFFECT_RAPIDSPIN + BattleScript_MoveEffectSleep, // MOVE_EFFECT_REMOVE_PARALYSIS + BattleScript_MoveEffectSleep, // MOVE_EFFECT_ATK_DEF_DOWN + BattleScript_MoveEffectRecoil33, // MOVE_EFFECT_RECOIL_33_PARALYSIS +}; + +static const struct WindowTemplate sUnusedWinTemplate = {0, 1, 3, 7, 0xF, 0x1F, 0x3F}; + +extern const struct SpriteTemplate SpriteTemplate_MonIconOnLvlUpBox; +extern const u16 sProtectSuccessRates[]; void atk00_attackcanceler(void) { @@ -1110,7 +1199,7 @@ void atk03_ppreduce(void) && !((gDisableStructs[gBankAttacker].unk18_b) & gBitTable[gCurrMovePos])) { gActiveBank = gBankAttacker; - EmitSetAttributes(0, REQUEST_PPMOVE1_BATTLE + gCurrMovePos, 0, 1, &gBattleMons[gBankAttacker].pp[gCurrMovePos]); + EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + gCurrMovePos, 0, 1, &gBattleMons[gBankAttacker].pp[gCurrMovePos]); MarkBufferBankForExecution(gBankAttacker); } } @@ -1828,7 +1917,7 @@ void atk0C_datahpupdate(void) } } gHitMarker &= ~(HITMARKER_x100000); - EmitSetAttributes(0, REQUEST_HP_BATTLE, 0, 2, &gBattleMons[gActiveBank].hp); + EmitSetMonData(0, REQUEST_HP_BATTLE, 0, 2, &gBattleMons[gActiveBank].hp); MarkBufferBankForExecution(gActiveBank); } } @@ -2351,7 +2440,7 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; gActiveBank = gEffectBank; - EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gEffectBank].status1); + EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gEffectBank].status1); MarkBufferBankForExecution(gActiveBank); if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) @@ -2660,11 +2749,11 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattleMons[gBankTarget].item = 0; gActiveBank = gBankAttacker; - EmitSetAttributes(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gLastUsedItem); + EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gLastUsedItem); MarkBufferBankForExecution(gBankAttacker); gActiveBank = gBankTarget; - EmitSetAttributes(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gBankTarget].item); + EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gBankTarget].item); MarkBufferBankForExecution(gBankTarget); BattleScriptPush(gBattlescriptCurrInstr + 1); @@ -2703,7 +2792,7 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattleMons[gBankTarget].status1 &= ~(STATUS_PARALYSIS); gActiveBank = gBankTarget; - EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); + EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); MarkBufferBankForExecution(gActiveBank); BattleScriptPush(gBattlescriptCurrInstr + 1); @@ -2910,7 +2999,7 @@ void atk19_faint_pokemon(void) BattleScriptPush(gBattlescriptCurrInstr); gBattlescriptCurrInstr = BattleScript_GrudgeTakesPp; gActiveBank = gBankAttacker; - EmitSetAttributes(0, moveIndex + REQUEST_PPMOVE1_BATTLE, 0, 1, &gBattleMons[gActiveBank].pp[moveIndex]); + EmitSetMonData(0, moveIndex + REQUEST_PPMOVE1_BATTLE, 0, 1, &gBattleMons[gActiveBank].pp[moveIndex]); MarkBufferBankForExecution(gActiveBank); PREPARE_MOVE_BUFFER(gBattleTextBuff1, gBattleMons[gBankAttacker].moves[moveIndex]) @@ -2943,7 +3032,7 @@ void atk1B_faint_effects_clear(void) if (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || gBattleMons[gActiveBank].hp == 0) { gBattleMons[gActiveBank].status1 = 0; - EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 0x4, &gBattleMons[gActiveBank].status1); + EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 0x4, &gBattleMons[gActiveBank].status1); MarkBufferBankForExecution(gActiveBank); } @@ -4672,7 +4761,7 @@ void atk49_moveend(void) { gBattleMons[gBankTarget].status1 &= ~(STATUS_FREEZE); gActiveBank = gBankTarget; - EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gBankTarget].status1); + EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gBankTarget].status1); MarkBufferBankForExecution(gActiveBank); BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_DefrostedViaFireMove; @@ -4871,7 +4960,7 @@ void atk49_moveend(void) && !gProtectStructs[gBankAttacker].chargingTurn && gBattleMoves[gCurrentMove].target == MOVE_TARGET_BOTH && !(gHitMarker & HITMARKER_NO_ATTACKSTRING)) { - u8 bank = GetBankByPlayerAI(GetBankIdentity(gBankTarget) ^ 2); + u8 bank = GetBankByIdentity(GetBankIdentity(gBankTarget) ^ BIT_MON); if (gBattleMons[bank].hp != 0) { gBankTarget = bank; @@ -5019,7 +5108,7 @@ void atk4C_copy_poke_data(void) gBattlePartyID[gActiveBank] = *(gBattleStruct->field_5C + gActiveBank); - EmitGetAttributes(0, 0, gBitTable[gBattlePartyID[gActiveBank]]); + EmitGetMonData(0, 0, gBitTable[gBattlePartyID[gActiveBank]]); MarkBufferBankForExecution(gActiveBank); gBattlescriptCurrInstr += 2; @@ -5225,10 +5314,10 @@ void atk4F_jump_if_cannot_switch(void) { if (GetBankSide(gActiveBank) == SIDE_OPPONENT) { - r7 = GetBankByPlayerAI(1); + r7 = GetBankByIdentity(1); if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) - compareVar = GetBankByPlayerAI(3); + compareVar = GetBankByIdentity(3); else compareVar = r7; @@ -5236,10 +5325,10 @@ void atk4F_jump_if_cannot_switch(void) } else { - r7 = GetBankByPlayerAI(0); + r7 = GetBankByIdentity(0); if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) - compareVar = GetBankByPlayerAI(2); + compareVar = GetBankByIdentity(2); else compareVar = r7; @@ -5550,9 +5639,9 @@ void atk50_openpartyscreen(void) } else { - gActiveBank = GetBankByPlayerAI(GetBankIdentity(bank) ^ 1); + gActiveBank = GetBankByIdentity(GetBankIdentity(bank) ^ BIT_SIDE); if (gAbsentBankFlags & gBitTable[gActiveBank]) - gActiveBank ^= 2; + gActiveBank ^= BIT_MON; EmitLinkStandbyMsg(0, 2, 0); MarkBufferBankForExecution(gActiveBank); @@ -5712,7 +5801,7 @@ void atk52_switch_in_effects(void) void atk53_trainer_slide(void) { - gActiveBank = GetBankByPlayerAI(gBattlescriptCurrInstr[1]); + gActiveBank = GetBankByIdentity(gBattlescriptCurrInstr[1]); EmitTrainerSlide(0); MarkBufferBankForExecution(gActiveBank); @@ -5748,7 +5837,7 @@ void atk56_fainting_cry(void) void atk57(void) { - gActiveBank = GetBankByPlayerAI(0); + gActiveBank = GetBankByIdentity(0); Emit_x37(0, gBattleOutcome); MarkBufferBankForExecution(gActiveBank); @@ -5783,7 +5872,7 @@ void atk59_learnmove_inbattle(void) } else { - gActiveBank = GetBankByPlayerAI(0); + gActiveBank = GetBankByIdentity(0); if (gBattlePartyID[gActiveBank] == gBattleStruct->expGetterId && !(gBattleMons[gActiveBank].status2 & STATUS2_TRANSFORMED)) @@ -5792,7 +5881,7 @@ void atk59_learnmove_inbattle(void) } if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) { - gActiveBank = GetBankByPlayerAI(2); + gActiveBank = GetBankByIdentity(2); if (gBattlePartyID[gActiveBank] == gBattleStruct->expGetterId && !(gBattleMons[gActiveBank].status2 & STATUS2_TRANSFORMED)) { @@ -6067,7 +6156,7 @@ void atk5E_8025A70(void) switch (gBattleCommunication[0]) { case 0: - EmitGetAttributes(0, REQUEST_ALL_BATTLE, 0); + EmitGetMonData(0, REQUEST_ALL_BATTLE, 0); MarkBufferBankForExecution(gActiveBank); gBattleCommunication[0]++; break; @@ -6317,3 +6406,2571 @@ void atk69_dmg_adjustment3(void) // The same as 0x7, except there's no random da END: gBattlescriptCurrInstr++; } + +void atk6A_removeitem(void) +{ + u16* usedHeldItem; + + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + GET_USED_ITEM_PTR_VIA_MEME_ACCESS(gActiveBank, usedHeldItem) + *usedHeldItem = gBattleMons[gActiveBank].item; + gBattleMons[gActiveBank].item = 0; + + EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gActiveBank].item); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 2; +} + +void atk6B_atknameinbuff1(void) +{ + PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gBankAttacker, gBattlePartyID[gBankAttacker]) + + gBattlescriptCurrInstr++; +} + +extern u16 gBattle_BG1_X; +extern u16 gBattle_BG1_Y; +extern u16 gBattle_BG2_X; +extern u16 gBattle_BG2_Y; + +void atk6C_draw_lvlupbox(void) +{ + if (gBattleScripting.atk6C_state == 0) + { + if (IsMonGettingExpSentOut()) + gBattleScripting.atk6C_state = 3; + else + gBattleScripting.atk6C_state = 1; + } + + switch (gBattleScripting.atk6C_state) + { + case 1: + gBattle_BG2_Y = 0x60; + SetBgAttribute(2, BG_CTRL_ATTR_MOSAIC, 0); + ShowBg(2); + sub_804F17C(); + gBattleScripting.atk6C_state = 2; + break; + case 2: + if (!sub_804F1CC()) + gBattleScripting.atk6C_state = 3; + break; + case 3: + gBattle_BG1_X = 0; + gBattle_BG1_Y = 0x100; + SetBgAttribute(0, BG_CTRL_ATTR_MOSAIC, 1); + SetBgAttribute(1, BG_CTRL_ATTR_MOSAIC, 0); + ShowBg(0); + ShowBg(1); + sub_8056A3C(0x12, 7, 0x1D, 0x13, 0x80); + gBattleScripting.atk6C_state = 4; + break; + case 4: + sub_804F100(); + PutWindowTilemap(13); + CopyWindowToVram(13, 3); + gBattleScripting.atk6C_state++; + break; + case 5: + case 7: + if (!IsDma3ManagerBusyWithBgCopy()) + { + gBattle_BG1_Y = 0; + gBattleScripting.atk6C_state++; + } + break; + case 6: + if (gMain.newKeys != 0) + { + PlaySE(SE_SELECT); + sub_804F144(); + CopyWindowToVram(13, 2); + gBattleScripting.atk6C_state++; + } + break; + case 8: + if (gMain.newKeys != 0) + { + PlaySE(SE_SELECT); + sub_8056A3C(0x12, 7, 0x1D, 0x13, 0x81); + gBattleScripting.atk6C_state++; + } + break; + case 9: + if (!sub_804F344()) + { + ClearWindowTilemap(14); + CopyWindowToVram(14, 1); + + ClearWindowTilemap(13); + CopyWindowToVram(13, 1); + + SetBgAttribute(2, BG_CTRL_ATTR_MOSAIC, 2); + ShowBg(2); + + gBattleScripting.atk6C_state = 10; + } + break; + case 10: + if (!IsDma3ManagerBusyWithBgCopy()) + { + SetBgAttribute(0, BG_CTRL_ATTR_MOSAIC, 0); + SetBgAttribute(1, BG_CTRL_ATTR_MOSAIC, 1); + ShowBg(0); + ShowBg(1); + gBattlescriptCurrInstr++; + } + break; + } +} + +void sub_804F100(void) +{ + struct StatsArray currentStats; + + sub_81D388C(&gPlayerParty[gBattleStruct->expGetterId], ¤tStats); + sub_81D3640(0xD, gBattleResources->statsBeforeLvlUp, ¤tStats, 0xE, 0xD, 0xF); +} + +void sub_804F144(void) +{ + struct StatsArray currentStats; + + sub_81D388C(&gPlayerParty[gBattleStruct->expGetterId], ¤tStats); + sub_81D3784(0xD, ¤tStats, 0xE, 0xD, 0xF); +} + +extern const u16 gUnknown_0831C2C8[]; +extern const u8 gUnknown_0831C2E8[]; + +void sub_804F17C(void) +{ + gBattle_BG2_Y = 0; + gBattle_BG2_X = 0x1A0; + + LoadPalette(gUnknown_0831C2C8, 0x60, 0x20); + CopyToWindowPixelBuffer(14, gUnknown_0831C2E8, 0, 0); + PutWindowTilemap(14); + CopyWindowToVram(14, 3); + + PutMonIconOnLvlUpBox(); +} + +bool8 sub_804F1CC(void) +{ + if (IsDma3ManagerBusyWithBgCopy()) + return TRUE; + + if (gBattle_BG2_X == 0x200) + return FALSE; + + if (gBattle_BG2_X == 0x1A0) + PutLevelAndGenderOnLvlUpBox(); + + gBattle_BG2_X += 8; + if (gBattle_BG2_X >= 0x200) + gBattle_BG2_X = 0x200; + + return (gBattle_BG2_X != 0x200); +} + +void PutLevelAndGenderOnLvlUpBox(void) +{ + u16 monLevel; + u8 monGender; + struct TextSubPrinter subPrinter; + u8 *txtPtr; + u32 var; + + monLevel = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_LEVEL); + monGender = GetMonGender(&gPlayerParty[gBattleStruct->expGetterId]); + GetMonNickname(&gPlayerParty[gBattleStruct->expGetterId], gStringVar4); + + subPrinter.current_text_offset = gStringVar4; + subPrinter.windowId = 14; + subPrinter.fontId = 0; + subPrinter.x = 32; + subPrinter.y = 0; + subPrinter.currentX = 32; + subPrinter.currentY = 0; + subPrinter.letterSpacing = 0; + subPrinter.lineSpacing = 0; + subPrinter.fontColor_l = TEXT_COLOR_TRANSPARENT; + subPrinter.fontColor_h = TEXT_COLOR_WHITE; + subPrinter.bgColor = TEXT_COLOR_TRANSPARENT; + subPrinter.shadowColor = TEXT_COLOR_DARK_GREY; + + AddTextPrinter(&subPrinter, 0xFF, NULL); + + txtPtr = gStringVar4; + gStringVar4[0] = CHAR_SPECIAL_F9; + txtPtr++; + txtPtr[0] = 5; + txtPtr++; + + var = (u32)(txtPtr); + txtPtr = ConvertIntToDecimalStringN(txtPtr, monLevel, STR_CONV_MODE_LEFT_ALIGN, 3); + var = (u32)(txtPtr) - var; + txtPtr = StringFill(txtPtr, 0x77, 4 - var); + + if (monGender != MON_GENDERLESS) + { + if (monGender == MON_MALE) + { + txtPtr = WriteColorChangeControlCode(txtPtr, 0, 0xC); + txtPtr = WriteColorChangeControlCode(txtPtr, 1, 0xD); + *(txtPtr++) = CHAR_MALE; + } + else + { + txtPtr = WriteColorChangeControlCode(txtPtr, 0, 0xE); + txtPtr = WriteColorChangeControlCode(txtPtr, 1, 0xF); + *(txtPtr++) = CHAR_FEMALE; + } + *(txtPtr++) = EOS; + } + + subPrinter.y = 10; + subPrinter.currentY = 10; + AddTextPrinter(&subPrinter, 0xFF, NULL); + + CopyWindowToVram(14, 2); +} + +bool8 sub_804F344(void) +{ + if (gBattle_BG2_X == 0x1A0) + return FALSE; + + if (gBattle_BG2_X - 16 < 0x1A0) + gBattle_BG2_X = 0x1A0; + else + gBattle_BG2_X -= 16; + + return (gBattle_BG2_X != 0x1A0); +} + +#define MON_ICON_LVLUP_BOX_TAG 0xD75A + +#define sDestroy data0 +#define sSavedLvlUpBoxXPosition data1 + +void PutMonIconOnLvlUpBox(void) +{ + u8 spriteId; + const u16* iconPal; + struct SpriteSheet iconSheet; + struct SpritePalette iconPalSheet; + + u16 species = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_SPECIES); + u32 personality = GetMonData(&gPlayerParty[gBattleStruct->expGetterId], MON_DATA_PERSONALITY); + + const u8* iconPtr = GetMonIconPtr(species, personality, 1); + iconSheet.data = iconPtr; + iconSheet.size = 0x200; + iconSheet.tag = MON_ICON_LVLUP_BOX_TAG; + + iconPal = GetValidMonIconPalettePtr(species); + iconPalSheet.data = iconPal; + iconPalSheet.tag = MON_ICON_LVLUP_BOX_TAG; + + LoadSpriteSheet(&iconSheet); + LoadSpritePalette(&iconPalSheet); + + spriteId = CreateSprite(&SpriteTemplate_MonIconOnLvlUpBox, 256, 10, 0); + gSprites[spriteId].sDestroy = FALSE; + gSprites[spriteId].sSavedLvlUpBoxXPosition = gBattle_BG2_X; +} + +void SpriteCB_MonIconOnLvlUpBox(struct Sprite* sprite) +{ + sprite->pos2.x = sprite->sSavedLvlUpBoxXPosition - gBattle_BG2_X; + + if (sprite->pos2.x != 0) + { + sprite->sDestroy = TRUE; + } + else if (sprite->sDestroy) + { + DestroySprite(sprite); + FreeSpriteTilesByTag(MON_ICON_LVLUP_BOX_TAG); + FreeSpritePaletteByTag(MON_ICON_LVLUP_BOX_TAG); + } +} + +#undef sDestroy +#undef sSavedLvlUpBoxXPosition + +bool32 IsMonGettingExpSentOut(void) +{ + if (gBattlePartyID[0] == gBattleStruct->expGetterId) + return TRUE; + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && gBattlePartyID[2] == gBattleStruct->expGetterId) + return TRUE; + + return FALSE; +} + +void atk6D_reset_sentpokes_value(void) +{ + ResetSentPokesToOpponentValue(); + gBattlescriptCurrInstr++; +} + +void atk6E_set_atk_to_player0(void) +{ + gBankAttacker = GetBankByIdentity(0); + gBattlescriptCurrInstr++; +} + +void atk6F_set_visible(void) +{ + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + EmitSpriteInvisibility(0, FALSE); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 2; +} + +void atk70_record_last_used_ability(void) +{ + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + RecordAbilityBattle(gActiveBank, gLastUsedAbility); + gBattlescriptCurrInstr += 1; // UB: Should be + 2, one byte for command and one byte for bank argument. +} + +void BufferMoveToLearnIntoBattleTextBuff2(void) +{ + PREPARE_MOVE_BUFFER(gBattleTextBuff2, gMoveToLearn); +} + +void atk71_buffer_move_to_learn(void) +{ + BufferMoveToLearnIntoBattleTextBuff2(); + gBattlescriptCurrInstr++; +} + +void atk72_jump_if_can_run_frombattle(void) +{ + if (CanRunFromBattle(gBank1)) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + else + gBattlescriptCurrInstr += 5; +} + +void atk73_hp_thresholds(void) +{ + u8 opposingBank; + s32 result; + + if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) + { + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + opposingBank = gActiveBank ^ BIT_SIDE; + + result = gBattleMons[opposingBank].hp * 100 / gBattleMons[opposingBank].maxHP; + if (result == 0) + result = 1; + + if (result > 69 || !gBattleMons[opposingBank].hp) + gBattleStruct->hpScale = 0; + else if (result > 39) + gBattleStruct->hpScale = 1; + else if (result > 9) + gBattleStruct->hpScale = 2; + else + gBattleStruct->hpScale = 3; + } + + gBattlescriptCurrInstr += 2; +} + +void atk74_hp_thresholds2(void) +{ + u8 opposingBank; + s32 result; + u8 hpSwitchout; + + if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) + { + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + opposingBank = gActiveBank ^ BIT_SIDE; + hpSwitchout = *(gBattleStruct->hpOnSwitchout + GetBankSide(opposingBank)); + result = (hpSwitchout - gBattleMons[opposingBank].hp) * 100 / hpSwitchout; + + if (gBattleMons[opposingBank].hp >= hpSwitchout) + gBattleStruct->hpScale = 0; + else if (result <= 29) + gBattleStruct->hpScale = 1; + else if (result <= 69) + gBattleStruct->hpScale = 2; + else + gBattleStruct->hpScale = 3; + } + + gBattlescriptCurrInstr += 2; +} + +void atk75_item_effect_on_opponent(void) +{ + gBankInMenu = gBankAttacker; + ExecuteTableBasedItemEffect(&gEnemyParty[gBattlePartyID[gBankAttacker]], gLastUsedItem, gBattlePartyID[gBankAttacker], 0, 1); + + gBattlescriptCurrInstr += 1; +} + +extern const u8 gUnknown_0831C4F8[]; +extern const u8* const gRefereeStringsTable[]; + +void atk76_various(void) +{ + u8 side; + s32 i; + + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); + + switch (gBattlescriptCurrInstr[2]) + { + case VARIOUS_CANCEL_MULTI_TURN_MOVES: + CancelMultiTurnMoves(gActiveBank); + break; + case VARIOUS_SET_MAGIC_COAT_TARGET: + gBankAttacker = gBankTarget; + side = GetBankSide(gBankAttacker) ^ 1; + if (gSideTimers[side].followmeTimer != 0 && gBattleMons[gSideTimers[side].followmeTarget].hp != 0) + gBankTarget = gSideTimers[side].followmeTarget; + else + gBankTarget = gActiveBank; + break; + case 2: + gBattleCommunication[0] = IsRunningFromBattleImpossible(); + break; + case VARIOUS_GET_MOVE_TARGET: + gBankTarget = GetMoveTarget(gCurrentMove, 0); + break; + case 4: + if (gHitMarker & HITMARKER_FAINTED(gActiveBank)) + gBattleCommunication[0] = 1; + else + gBattleCommunication[0] = 0; + break; + case VARIOUS_RESET_INTIMIDATE_TRACE_BITS: + gSpecialStatuses[gActiveBank].intimidatedPoke = 0; + gSpecialStatuses[gActiveBank].traced = 0; + break; + case VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP: + if (gBattlePartyID[0] == gBattleStruct->expGetterId || gBattlePartyID[2] == gBattleStruct->expGetterId) + { + u16 *choicedMove; + + if (gBattlePartyID[0] == gBattleStruct->expGetterId) + gActiveBank = 0; + else + gActiveBank = 2; + + choicedMove = &gBattleStruct->choicedMove[gActiveBank]; + + for (i = 0; i < 4; i++) + { + if (gBattleMons[gActiveBank].moves[i] == *choicedMove) + break; + } + if (i == 4) + *choicedMove = 0; + } + break; + case 7: + if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_DOUBLE)) + && gBattleTypeFlags & BATTLE_TYPE_TRAINER + && gBattleMons[0].hp != 0 + && gBattleMons[1].hp != 0) + { + gHitMarker &= ~(HITMARKER_x400000); + } + break; + case 8: + gBattleCommunication[0] = 0; + gBattleScripting.bank = gActiveBank = gBattleCommunication[1]; + if (!(gBattleStruct->field_92 & gBitTable[gActiveBank]) + && gBattleMons[gActiveBank].maxHP / 2 >= gBattleMons[gActiveBank].hp + && gBattleMons[gActiveBank].hp != 0 + && !(gBattleMons[gActiveBank].status1 & STATUS_SLEEP)) + { + gBattleStruct->field_92 |= gBitTable[gActiveBank]; + gBattleCommunication[0] = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = gUnknown_0831C4F8[GetNatureFromPersonality(gBattleMons[gActiveBank].personality)]; + } + break; + case 9: + i = sub_81A5258(gBattleCommunication); + if (i == 0) + return; + + gBattleCommunication[1] = i; + break; + case 10: + gBattleMons[1].hp = 0; + gHitMarker |= HITMARKER_FAINTED(1); + gBattleStruct->field_2A1 |= gBitTable[gBattlePartyID[1]]; + gDisableStructs[1].truantUnknownBit = 1; + break; + case 11: + gBattleMons[0].hp = 0; + gHitMarker |= HITMARKER_FAINTED(0); + gHitMarker |= HITMARKER_x400000; + gBattleStruct->field_2A0 |= gBitTable[gBattlePartyID[0]]; + gDisableStructs[0].truantUnknownBit = 1; + break; + case 12: + gBattleMons[0].hp = 0; + gBattleMons[1].hp = 0; + gHitMarker |= HITMARKER_FAINTED(0); + gHitMarker |= HITMARKER_FAINTED(1); + gHitMarker |= HITMARKER_x400000; + gBattleStruct->field_2A0 |= gBitTable[gBattlePartyID[0]]; + gBattleStruct->field_2A1 |= gBitTable[gBattlePartyID[1]]; + gDisableStructs[0].truantUnknownBit = 1; + gDisableStructs[1].truantUnknownBit = 1; + break; + case 13: + EmitCmd13(0); + MarkBufferBankForExecution(gActiveBank); + break; + case 14: + sub_81A5BF8(); + break; + case 15: + sub_81A5D44(); + break; + case 16: + BattleStringExpandPlaceholdersToDisplayedString(gRefereeStringsTable[gBattlescriptCurrInstr[1]]); + sub_814F9EC(gDisplayedStringBattle, 0x16); + break; + case 17: + if (IsTextPrinterActive(0x16)) + return; + break; + case VARIOUS_WAIT_CRY: + if (!IsCryFinished()) + return; + break; + case VARIOUS_RETURN_OPPONENT_MON1: + gActiveBank = 1; + if (gBattleMons[gActiveBank].hp != 0) + { + EmitReturnPokeToBall(0, 0); + MarkBufferBankForExecution(gActiveBank); + } + break; + case VARIOUS_RETURN_OPPONENT_MON2: + if (gNoOfAllBanks > 3) + { + gActiveBank = 3; + if (gBattleMons[gActiveBank].hp != 0) + { + EmitReturnPokeToBall(0, 0); + MarkBufferBankForExecution(gActiveBank); + } + } + break; + case 21: + m4aMPlayVolumeControl(&gMPlay_BGM, 0xFFFF, 0x55); + break; + case 22: + m4aMPlayVolumeControl(&gMPlay_BGM, 0xFFFF, 0x100); + break; + case 23: + gBattleStruct->field_2A2 |= gBitTable[gActiveBank]; + break; + case 24: + if (sub_805725C(gActiveBank)) + return; + break; + case VARIOUS_SET_TELEPORT_OUTCOME: + if (GetBankSide(gActiveBank) == SIDE_PLAYER) + gBattleOutcome = BATTLE_PLAYER_TELEPORTED; + else + gBattleOutcome = BATTLE_OPPONENT_TELEPORTED; + break; + case VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC: + EmitPlaySound(0, 0x19C, 1); + MarkBufferBankForExecution(gActiveBank); + break; + } + + gBattlescriptCurrInstr += 3; +} + +void atk77_set_protect_like(void) // protect and endure +{ + bool8 notLastTurn = TRUE; + u16 lastMove = gUnknown_02024260[gBankAttacker]; + + if (lastMove != MOVE_PROTECT && lastMove != MOVE_DETECT && lastMove != MOVE_ENDURE) + gDisableStructs[gBankAttacker].protectUses = 0; + + if (gCurrentMoveTurn == (gNoOfAllBanks - 1)) + notLastTurn = FALSE; + + if (sProtectSuccessRates[gDisableStructs[gBankAttacker].protectUses] >= Random() && notLastTurn) + { + if (gBattleMoves[gCurrentMove].effect == EFFECT_PROTECT) + { + gProtectStructs[gBankAttacker].protected = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + if (gBattleMoves[gCurrentMove].effect == EFFECT_ENDURE) + { + gProtectStructs[gBankAttacker].endured = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + gDisableStructs[gBankAttacker].protectUses++; + } + else + { + gDisableStructs[gBankAttacker].protectUses = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattleMoveFlags |= MOVESTATUS_MISSED; + } + + gBattlescriptCurrInstr++; +} + +void atk78_faintifabilitynotdamp(void) +{ + if (gBattleExecBuffer) + return; + + for (gBankTarget = 0; gBankTarget < gNoOfAllBanks; gBankTarget++) + { + if (gBattleMons[gBankTarget].ability == ABILITY_DAMP) + break; + } + + if (gBankTarget == gNoOfAllBanks) + { + gActiveBank = gBankAttacker; + gBattleMoveDamage = gBattleMons[gActiveBank].hp; + EmitHealthBarUpdate(0, 0x7FFF); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr++; + + for (gBankTarget = 0; gBankTarget < gNoOfAllBanks; gBankTarget++) + { + if (gBankTarget == gBankAttacker) + continue; + if (!(gAbsentBankFlags & gBitTable[gBankTarget])) + break; + } + } + else + { + gLastUsedAbility = ABILITY_DAMP; + RecordAbilityBattle(gBankTarget, gBattleMons[gBankTarget].ability); + gBattlescriptCurrInstr = BattleScript_DampStopsExplosion; + } +} + +void atk79_setatkhptozero(void) +{ + if (gBattleExecBuffer) + return; + + gActiveBank = gBankAttacker; + gBattleMons[gActiveBank].hp = 0; + EmitSetMonData(0, REQUEST_HP_BATTLE, 0, 2, &gBattleMons[gActiveBank].hp); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr++; +} + +void atk7A_jumpwhiletargetvalid(void) // Used by intimidate to loop through all targets. +{ + const u8* jumpPtr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + { + for (gBankTarget++; ; gBankTarget++) + { + if (gBankTarget == gBankAttacker) + continue; + if (!(gAbsentBankFlags & gBitTable[gBankTarget])) + break; + } + + if (gBankTarget >= gNoOfAllBanks) + gBattlescriptCurrInstr += 5; + else + gBattlescriptCurrInstr = jumpPtr; + } + else + gBattlescriptCurrInstr += 5; +} + +void atk7B_healhalfHP_if_possible(void) +{ + const u8* failPtr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + + if (BSScriptRead8(gBattlescriptCurrInstr + 5) == BS_GET_ATTACKER) + gBankTarget = gBankAttacker; + + gBattleMoveDamage = gBattleMons[gBankTarget].maxHP / 2; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + gBattleMoveDamage *= -1; + + if (gBattleMons[gBankTarget].hp == gBattleMons[gBankTarget].maxHP) + gBattlescriptCurrInstr = failPtr; + else + gBattlescriptCurrInstr += 6; +} + +void atk7C_trymirrormove(void) +{ + s32 validMovesCount; + s32 i; + u16 move; + u16 movesArray[4]; + + for (i = 0; i < 3; i++) + movesArray[i] = 0; + + for (validMovesCount = 0, i = 0; i < gNoOfAllBanks; i++) + { + if (i != gBankAttacker) + { + move = *(i * 2 + gBankAttacker * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) + | (*(i * 2 + gBankAttacker * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 1) << 8); + + if (move != 0 && move != 0xFFFF) + { + movesArray[validMovesCount] = move; + validMovesCount++; + } + } + } + + move = *(gBattleStruct->mirrorMoves + gBankAttacker * 2 + 0) + | (*(gBattleStruct->mirrorMoves + gBankAttacker * 2 + 1) << 8); + + if (move != 0 && move != 0xFFFF) + { + gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); + gCurrentMove = move; + gBankTarget = GetMoveTarget(gCurrentMove, 0); + gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; + } + else if (validMovesCount) + { + gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); + i = Random() % validMovesCount; + gCurrentMove = movesArray[i]; + gBankTarget = GetMoveTarget(gCurrentMove, 0); + gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; + } + else + { + gSpecialStatuses[gBankAttacker].flag20 = 1; + gBattlescriptCurrInstr++; + } +} + +void atk7D_set_rain(void) +{ + if (gBattleWeather & WEATHER_RAIN_ANY) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + } + else + { + gBattleWeather = WEATHER_RAIN_TEMPORARY; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gWishFutureKnock.weatherDuration = 5; + } + gBattlescriptCurrInstr++; +} + +void atk7E_setreflect(void) +{ + if (gSideAffecting[GET_BANK_SIDE(gBankAttacker)] & SIDE_STATUS_REFLECT) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + else + { + gSideAffecting[GET_BANK_SIDE(gBankAttacker)] |= SIDE_STATUS_REFLECT; + gSideTimers[GET_BANK_SIDE(gBankAttacker)].reflectTimer = 5; + gSideTimers[GET_BANK_SIDE(gBankAttacker)].reflectBank = gBankAttacker; + + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && CountAliveMonsInBattle(BATTLE_ALIVE_ATK_SIDE) == 2) + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + gBattlescriptCurrInstr++; +} + +void atk7F_setseeded(void) +{ + if (gBattleMoveFlags & MOVESTATUS_NOEFFECT || gStatuses3[gBankTarget] & STATUS3_LEECHSEED) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + else if (gBattleMons[gBankTarget].type1 == TYPE_GRASS || gBattleMons[gBankTarget].type2 == TYPE_GRASS) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + } + else + { + gStatuses3[gBankTarget] |= gBankAttacker; + gStatuses3[gBankTarget] |= STATUS3_LEECHSEED; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + + gBattlescriptCurrInstr++; +} + +void atk80_manipulatedamage(void) +{ + switch (BSScriptRead8(gBattlescriptCurrInstr + 1)) + { + case ATK80_DMG_CHANGE_SIGN: + gBattleMoveDamage *= -1; + break; + case ATK80_DMG_HALF_BY_TWO_NOT_MORE_THAN_HALF_MAX_HP: + gBattleMoveDamage /= 2; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + if ((gBattleMons[gBankTarget].maxHP / 2) < gBattleMoveDamage) + gBattleMoveDamage = gBattleMons[gBankTarget].maxHP / 2; + break; + case ATK80_DMG_DOUBLED: + gBattleMoveDamage *= 2; + break; + } + + gBattlescriptCurrInstr += 2; +} + +void atk81_setrest(void) +{ + const u8* failJump = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + gActiveBank = gBankTarget = gBankAttacker; + gBattleMoveDamage = gBattleMons[gBankTarget].maxHP * (-1); + + if (gBattleMons[gBankTarget].hp == gBattleMons[gBankTarget].maxHP) + { + gBattlescriptCurrInstr = failJump; + } + else + { + if (gBattleMons[gBankTarget].status1 & ((u8)(~STATUS_SLEEP))) + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + + gBattleMons[gBankTarget].status1 = 3; + EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr += 5; + } +} + +void atk82_jumpifnotfirstturn(void) +{ + const u8* failJump = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + + if (gDisableStructs[gBankAttacker].isFirstTurn) + gBattlescriptCurrInstr += 5; + else + gBattlescriptCurrInstr = failJump; +} + +void atk83_nop(void) +{ + gBattlescriptCurrInstr++; +} + +bool8 UproarWakeUpCheck(u8 bank) +{ + s32 i; + + for (i = 0; i < gNoOfAllBanks; i++) + { + if (!(gBattleMons[i].status2 & STATUS2_UPROAR) || gBattleMons[bank].ability == ABILITY_SOUNDPROOF) + continue; + + gBattleScripting.bank = i; + + if (gBankTarget == 0xFF) + gBankTarget = i; + else if (gBankTarget == i) + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + + break; + } + + if (i == gNoOfAllBanks) + return FALSE; + else + return TRUE; +} + +void atk84_jump_if_cant_sleep(void) +{ + const u8* jumpPtr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + + if (UproarWakeUpCheck(gBankTarget)) + { + gBattlescriptCurrInstr = jumpPtr; + } + else if (gBattleMons[gBankTarget].ability == ABILITY_INSOMNIA + || gBattleMons[gBankTarget].ability == ABILITY_VITAL_SPIRIT) + { + gLastUsedAbility = gBattleMons[gBankTarget].ability; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + gBattlescriptCurrInstr = jumpPtr; + RecordAbilityBattle(gBankTarget, gLastUsedAbility); + } + else + { + gBattlescriptCurrInstr += 5; + } +} + +void atk85_stockpile(void) +{ + if (gDisableStructs[gBankAttacker].stockpileCounter == 3) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + else + { + gDisableStructs[gBankAttacker].stockpileCounter++; + + PREPARE_BYTE_NUMBER_BUFFER(gBattleTextBuff1, 1, gDisableStructs[gBankAttacker].stockpileCounter) + + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + gBattlescriptCurrInstr++; +} + +void atk86_stockpiletobasedamage(void) +{ + const u8* jumpPtr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + if (gDisableStructs[gBankAttacker].stockpileCounter == 0) + { + gBattlescriptCurrInstr = jumpPtr; + } + else + { + if (gBattleCommunication[6] != 1) + { + gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[gBankAttacker], &gBattleMons[gBankTarget], gCurrentMove, + gSideAffecting[GET_BANK_SIDE(gBankTarget)], 0, + 0, gBankAttacker, gBankTarget) + * gDisableStructs[gBankAttacker].stockpileCounter; + gBattleScripting.animTurn = gDisableStructs[gBankAttacker].stockpileCounter; + + if (gProtectStructs[gBankAttacker].helpingHand) + gBattleMoveDamage = gBattleMoveDamage * 15 / 10; + } + + gDisableStructs[gBankAttacker].stockpileCounter = 0; + gBattlescriptCurrInstr += 5; + } +} + +void atk87_stockpiletohpheal(void) +{ + const u8* jumpPtr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + + if (gDisableStructs[gBankAttacker].stockpileCounter == 0) + { + gBattlescriptCurrInstr = jumpPtr; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + else if (gBattleMons[gBankAttacker].maxHP == gBattleMons[gBankAttacker].hp) + { + gDisableStructs[gBankAttacker].stockpileCounter = 0; + gBattlescriptCurrInstr = jumpPtr; + gBankTarget = gBankAttacker; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + else + { + gBattleMoveDamage = gBattleMons[gBankAttacker].maxHP / (1 << (3 - gDisableStructs[gBankAttacker].stockpileCounter)); + + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + gBattleMoveDamage *= -1; + + gBattleScripting.animTurn = gDisableStructs[gBankAttacker].stockpileCounter; + gDisableStructs[gBankAttacker].stockpileCounter = 0; + gBattlescriptCurrInstr += 5; + gBankTarget = gBankAttacker; + } +} + +void atk88_negativedamage(void) +{ + gBattleMoveDamage = -(gHpDealt / 2); + if (gBattleMoveDamage == 0) + gBattleMoveDamage = -1; + + gBattlescriptCurrInstr++; +} + +u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8* BS_ptr) +{ + bool8 certain = 0; + bool8 notProtectAffected = FALSE; + u32 index; + + if (flags & MOVE_EFFECT_AFFECTS_USER) + gActiveBank = gBankAttacker; + else + gActiveBank = gBankTarget; + + flags &= ~(MOVE_EFFECT_AFFECTS_USER); + + if (flags & MOVE_EFFECT_CERTAIN) + certain++; + flags &= ~(MOVE_EFFECT_CERTAIN); + + if (flags & STAT_CHANGE_NOT_PROTECT_AFFECTED) + notProtectAffected++; + flags &= ~(STAT_CHANGE_NOT_PROTECT_AFFECTED); + + PREPARE_STAT_BUFFER(gBattleTextBuff1, statId) + + if ((statValue << 0x18) < 0) // stat decrease + { + if (gSideTimers[GET_BANK_SIDE(gActiveBank)].mistTimer + && !certain && gCurrentMove != MOVE_CURSE) + { + if (flags == STAT_CHANGE_BS_PTR) + { + if (gSpecialStatuses[gActiveBank].statLowered) + { + gBattlescriptCurrInstr = BS_ptr; + } + else + { + BattleScriptPush(BS_ptr); + gBattleScripting.bank = gActiveBank; + gBattlescriptCurrInstr = BattleScript_MistProtected; + gSpecialStatuses[gActiveBank].statLowered = 1; + } + } + return STAT_CHANGE_DIDNT_WORK; + } + else if (gCurrentMove != MOVE_CURSE + && notProtectAffected != TRUE && JumpIfMoveAffectedByProtect(0)) + { + gBattlescriptCurrInstr = BattleScript_ButItFailed; + return STAT_CHANGE_DIDNT_WORK; + } + else if ((gBattleMons[gActiveBank].ability == ABILITY_CLEAR_BODY + || gBattleMons[gActiveBank].ability == ABILITY_WHITE_SMOKE) + && !certain && gCurrentMove != MOVE_CURSE) + { + if (flags == STAT_CHANGE_BS_PTR) + { + if (gSpecialStatuses[gActiveBank].statLowered) + { + gBattlescriptCurrInstr = BS_ptr; + } + else + { + BattleScriptPush(BS_ptr); + gBattleScripting.bank = gActiveBank; + gBattlescriptCurrInstr = BattleScript_AbilityNoStatLoss; + gLastUsedAbility = gBattleMons[gActiveBank].ability; + RecordAbilityBattle(gActiveBank, gLastUsedAbility); + gSpecialStatuses[gActiveBank].statLowered = 1; + } + } + return STAT_CHANGE_DIDNT_WORK; + } + else if (gBattleMons[gActiveBank].ability == ABILITY_KEEN_EYE + && !certain && statId == STAT_STAGE_ACC) + { + if (flags == STAT_CHANGE_BS_PTR) + { + BattleScriptPush(BS_ptr); + gBattleScripting.bank = gActiveBank; + gBattlescriptCurrInstr = BattleScript_AbilityNoSpecificStatLoss; + gLastUsedAbility = gBattleMons[gActiveBank].ability; + RecordAbilityBattle(gActiveBank, gLastUsedAbility); + } + return STAT_CHANGE_DIDNT_WORK; + } + else if (gBattleMons[gActiveBank].ability == ABILITY_HYPER_CUTTER + && !certain && statId == STAT_STAGE_ATK) + { + if (flags == STAT_CHANGE_BS_PTR) + { + BattleScriptPush(BS_ptr); + gBattleScripting.bank = gActiveBank; + gBattlescriptCurrInstr = BattleScript_AbilityNoSpecificStatLoss; + gLastUsedAbility = gBattleMons[gActiveBank].ability; + RecordAbilityBattle(gActiveBank, gLastUsedAbility); + } + return STAT_CHANGE_DIDNT_WORK; + } + else if (gBattleMons[gActiveBank].ability == ABILITY_SHIELD_DUST && flags == 0) + { + return STAT_CHANGE_DIDNT_WORK; + } + else // try to decrease + { + statValue = -GET_STAT_BUFF_VALUE(statValue); + gBattleTextBuff2[0] = B_BUFF_PLACEHOLDER_BEGIN; + index = 1; + if (statValue == -2) + { + gBattleTextBuff2[1] = B_BUFF_STRING; + gBattleTextBuff2[2] = 0xD3; // harshly + gBattleTextBuff2[3] = 0xD3 >> 8; + index = 4; + } + gBattleTextBuff2[index] = B_BUFF_STRING; + index++; + gBattleTextBuff2[index] = 0xD4; // fell + index++; + gBattleTextBuff2[index] = 0xD4 >> 8; + index++; + gBattleTextBuff2[index] = B_BUFF_EOS; + + if (gBattleMons[gActiveBank].statStages[statId] == 0) + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + else + gBattleCommunication[MULTISTRING_CHOOSER] = (gBankTarget == gActiveBank); + + } + } + else // stat increase + { + statValue = GET_STAT_BUFF_VALUE(statValue); + gBattleTextBuff2[0] = B_BUFF_PLACEHOLDER_BEGIN; + index = 1; + if (statValue == 2) + { + gBattleTextBuff2[1] = B_BUFF_STRING; + gBattleTextBuff2[2] = 0xD1; // sharply + gBattleTextBuff2[3] = 0xD1 >> 8; + index = 4; + } + gBattleTextBuff2[index] = B_BUFF_STRING; + index++; + gBattleTextBuff2[index] = 0xD2; // rose + index++; + gBattleTextBuff2[index] = 0xD2 >> 8; + index++; + gBattleTextBuff2[index] = B_BUFF_EOS; + + if (gBattleMons[gActiveBank].statStages[statId] == 0xC) + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + else + gBattleCommunication[MULTISTRING_CHOOSER] = (gBankTarget == gActiveBank); + } + + gBattleMons[gActiveBank].statStages[statId] += statValue; + if (gBattleMons[gActiveBank].statStages[statId] < 0) + gBattleMons[gActiveBank].statStages[statId] = 0; + if (gBattleMons[gActiveBank].statStages[statId] > 0xC) + gBattleMons[gActiveBank].statStages[statId] = 0xC; + + if (gBattleCommunication[MULTISTRING_CHOOSER] == 2 && flags & STAT_CHANGE_BS_PTR) + gBattleMoveFlags |= MOVESTATUS_MISSED; + + if (gBattleCommunication[MULTISTRING_CHOOSER] == 2 && !(flags & STAT_CHANGE_BS_PTR)) + return STAT_CHANGE_DIDNT_WORK; + + return STAT_CHANGE_WORKED; +} + +void atk89_statbuffchange(void) +{ + const u8* jumpPtr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); + if (ChangeStatBuffs(gBattleScripting.statChanger & 0xF0, GET_STAT_BUFF_ID(gBattleScripting.statChanger), BSScriptRead8(gBattlescriptCurrInstr + 1), jumpPtr) == STAT_CHANGE_WORKED) + gBattlescriptCurrInstr += 6; +} + +void atk8A_normalisebuffs(void) // haze +{ + s32 i, j; + + for (i = 0; i < gNoOfAllBanks; i++) + { + for (j = 0; j < BATTLE_STATS_NO; j++) + gBattleMons[i].statStages[j] = 6; + } + + gBattlescriptCurrInstr++; +} + +void atk8B_setbide(void) +{ + gBattleMons[gBankAttacker].status2 |= STATUS2_MULTIPLETURNS; + gLockedMoves[gBankAttacker] = gCurrentMove; + gTakenDmg[gBankAttacker] = 0; + gBattleMons[gBankAttacker].status2 |= (STATUS2_BIDE - 0x100); // 2 turns + + gBattlescriptCurrInstr++; +} + +void atk8C_confuseifrepeatingattackends(void) +{ + if (!(gBattleMons[gBankAttacker].status2 & STATUS2_LOCK_CONFUSE)) + gBattleCommunication[MOVE_EFFECT_BYTE] = (MOVE_EFFECT_THRASH | MOVE_EFFECT_AFFECTS_USER); + + gBattlescriptCurrInstr++; +} + +void atk8D_setmultihit_counter(void) +{ + if (BSScriptRead8(gBattlescriptCurrInstr + 1)) + { + gMultiHitCounter = BSScriptRead8(gBattlescriptCurrInstr + 1); + } + else + { + gMultiHitCounter = Random() & 3; + if (gMultiHitCounter > 1) + gMultiHitCounter = (Random() & 3) + 2; + else + gMultiHitCounter += 2; + } + + gBattlescriptCurrInstr += 2; +} + +void atk8E_init_multihit_string(void) +{ + PREPARE_BYTE_NUMBER_BUFFER(gBattleScripting.multihitString, 1, 0) + + gBattlescriptCurrInstr++; +} + +bool8 sub_8051064(void) +{ + if (gBattleMons[gBankAttacker].level >= gBattleMons[gBankTarget].level) + { + *(gBattleStruct->field_58 + gBankTarget) = gBattlePartyID[gBankTarget]; + } + else + { + u16 random = Random() & 0xFF; + if ((u32)((random * (gBattleMons[gBankAttacker].level + gBattleMons[gBankTarget].level) >> 8) + 1) <= (gBattleMons[gBankTarget].level / 4)) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + return FALSE; + } + *(gBattleStruct->field_58 + gBankTarget) = gBattlePartyID[gBankTarget]; + } + + gBattlescriptCurrInstr = gUnknown_082DADD8; + return TRUE; +} + +void atk8F_forcerandomswitch(void) +{ + s32 i; + s32 bank1PartyId = 0; + s32 bank2PartyId = 0; + + #ifdef NONMATCHING + s32 lastMonId = 0; // + 1 + #else + register s32 lastMonId asm("r8") = 0; // + 1 + #endif // NONMATCHING + + s32 firstMonId = 0; + s32 monsCount = 0; + struct Pokemon* party = NULL; + s32 validMons = 0; + s32 minNeeded = 0; + + if ((gBattleTypeFlags & BATTLE_TYPE_TRAINER)) + { + if (GetBankSide(gBankTarget) == SIDE_PLAYER) + party = gPlayerParty; + else + party = gEnemyParty; + + if ((gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER && gBattleTypeFlags & BATTLE_TYPE_LINK) + || (gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER && gBattleTypeFlags & BATTLE_TYPE_x2000000) + || (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER)) + { + if ((gBankTarget & BIT_MON) != 0) + { + firstMonId = 3; + lastMonId = 6; + } + else + { + firstMonId = 0; + lastMonId = 3; + } + monsCount = 3; + minNeeded = 1; + bank2PartyId = gBattlePartyID[gBankTarget]; + bank1PartyId = gBattlePartyID[gBankTarget ^ BIT_MON]; + } + else if ((gBattleTypeFlags & BATTLE_TYPE_MULTI && gBattleTypeFlags & BATTLE_TYPE_LINK) + || (gBattleTypeFlags & BATTLE_TYPE_MULTI && gBattleTypeFlags & BATTLE_TYPE_x2000000)) + { + if (sub_806D82C(sub_806D864(gBankTarget)) == 1) + { + firstMonId = 3; + lastMonId = 6; + } + else + { + firstMonId = 0; + lastMonId = 3; + } + monsCount = 3; + minNeeded = 1; + bank2PartyId = gBattlePartyID[gBankTarget]; + bank1PartyId = gBattlePartyID[gBankTarget ^ BIT_MON]; + } + else if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) + { + if (GetBankSide(gBankTarget) == SIDE_PLAYER) + { + firstMonId = 0; + lastMonId = 6; + monsCount = 6; + minNeeded = 2; // since there are two opponents, it has to be a double battle + } + else + { + if ((gBankTarget & BIT_MON) != 0) + { + firstMonId = 3; + lastMonId = 6; + } + else + { + firstMonId = 0; + lastMonId = 3; + } + monsCount = 3; + minNeeded = 1; + } + bank2PartyId = gBattlePartyID[gBankTarget]; + bank1PartyId = gBattlePartyID[gBankTarget ^ BIT_MON]; + } + else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + { + firstMonId = 0; + lastMonId = 6; + monsCount = 6; + minNeeded = 2; + bank2PartyId = gBattlePartyID[gBankTarget]; + bank1PartyId = gBattlePartyID[gBankTarget ^ BIT_MON]; + } + else + { + firstMonId = 0; + lastMonId = 6; + monsCount = 6; + minNeeded = 1; + bank2PartyId = gBattlePartyID[gBankTarget]; // there is only one pokemon out in single battles + bank1PartyId = gBattlePartyID[gBankTarget]; + } + + for (i = firstMonId; i < lastMonId; i++) + { + if (GetMonData(&party[i], MON_DATA_SPECIES) != SPECIES_NONE + && !GetMonData(&party[i], MON_DATA_IS_EGG) + && GetMonData(&party[i], MON_DATA_HP) != 0) + { + validMons++; + } + } + + if (validMons <= minNeeded) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + if (sub_8051064()) + { + do + { + i = Random() % monsCount; + i += firstMonId; + } + while (i == bank2PartyId + || i == bank1PartyId + || GetMonData(&party[i], MON_DATA_SPECIES) == SPECIES_NONE + || GetMonData(&party[i], MON_DATA_IS_EGG) == TRUE + || GetMonData(&party[i], MON_DATA_HP) == 0); + } + *(gBattleStruct->field_5C + gBankTarget) = i; + + if (!sub_81B1250()) + sub_803BDA0(gBankTarget); + + if ((gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER) + || (gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_MULTI) + || (gBattleTypeFlags & BATTLE_TYPE_x2000000 && gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER) + || (gBattleTypeFlags & BATTLE_TYPE_x2000000 && gBattleTypeFlags & BATTLE_TYPE_MULTI)) + { + sub_81B8E80(gBankTarget, i, 0); + sub_81B8E80(gBankTarget ^ BIT_MON, i, 1); + } + + if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) + sub_80571DC(gBankTarget, i); + } + } + else + { + sub_8051064(); + } +} + +void atk90_conversion_type_change(void) // randomly changes user's type to one of its moves' type +{ + u8 validMoves = 0; + u8 moveChecked; + u8 moveType; + + while (validMoves < 4) + { + if (gBattleMons[gBankAttacker].moves[validMoves] == 0) + break; + + validMoves++; + } + + for (moveChecked = 0; moveChecked < validMoves; moveChecked++) + { + moveType = gBattleMoves[gBattleMons[gBankAttacker].moves[moveChecked]].type; + + if (moveType == TYPE_MYSTERY) + { + if (gBattleMons[gBankAttacker].type1 == TYPE_GHOST || gBattleMons[gBankAttacker].type2 == TYPE_GHOST) + moveType = TYPE_GHOST; + else + moveType = TYPE_NORMAL; + } + if (moveType != gBattleMons[gBankAttacker].type1 + && moveType != gBattleMons[gBankAttacker].type2) + { + break; + } + } + + if (moveChecked == validMoves) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + do + { + + while ((moveChecked = Random() & 3) >= validMoves); + + moveType = gBattleMoves[gBattleMons[gBankAttacker].moves[moveChecked]].type; + + if (moveType == TYPE_MYSTERY) + { + if (gBattleMons[gBankAttacker].type1 == TYPE_GHOST || gBattleMons[gBankAttacker].type2 == TYPE_GHOST) + moveType = TYPE_GHOST; + else + moveType = TYPE_NORMAL; + } + } + while (moveType == gBattleMons[gBankAttacker].type1 || moveType == gBattleMons[gBankAttacker].type2); + + gBattleMons[gBankAttacker].type1 = moveType; + gBattleMons[gBankAttacker].type2 = moveType; + + PREPARE_TYPE_BUFFER(gBattleTextBuff1, moveType) + + gBattlescriptCurrInstr += 5; + } +} + +void atk91_givepaydaymoney(void) +{ + if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) && gPaydayMoney != 0) + { + u32 bonusMoney = gPaydayMoney * gBattleStruct->moneyMultiplier; + AddMoney(&gSaveBlock1Ptr->money, bonusMoney); + + PREPARE_HWORD_NUMBER_BUFFER(gBattleTextBuff1, 5, bonusMoney) + + BattleScriptPush(gBattlescriptCurrInstr + 1); + gBattlescriptCurrInstr = BattleScript_PrintPayDayMoneyString; + } + else + { + gBattlescriptCurrInstr++; + } +} + +void atk92_setlightscreen(void) +{ + if (gSideAffecting[GET_BANK_SIDE(gBankAttacker)] & SIDE_STATUS_LIGHTSCREEN) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + else + { + gSideAffecting[GET_BANK_SIDE(gBankAttacker)] |= SIDE_STATUS_LIGHTSCREEN; + gSideTimers[GET_BANK_SIDE(gBankAttacker)].lightscreenTimer = 5; + gSideTimers[GET_BANK_SIDE(gBankAttacker)].lightscreenBank = gBankAttacker; + + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && CountAliveMonsInBattle(BATTLE_ALIVE_ATK_SIDE) == 2) + gBattleCommunication[MULTISTRING_CHOOSER] = 4; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 3; + } + + gBattlescriptCurrInstr++; +} + +void atk93_ko_move(void) +{ + u8 holdEffect, param; + + if (gBattleMons[gBankTarget].item == ITEM_ENIGMA_BERRY) + { + holdEffect = gEnigmaBerries[gBankTarget].holdEffect; + param = gEnigmaBerries[gBankTarget].holdEffectParam; + } + else + { + holdEffect = ItemId_GetHoldEffect(gBattleMons[gBankTarget].item); + param = ItemId_GetHoldEffectParam(gBattleMons[gBankTarget].item); + } + + gStringBank = gBankTarget; + + if (holdEffect == HOLD_EFFECT_FOCUS_BAND && (Random() % 100) < param) + { + RecordItemEffectBattle(gBankTarget, HOLD_EFFECT_FOCUS_BAND); + gSpecialStatuses[gBankTarget].focusBanded = 1; + } + + if (gBattleMons[gBankTarget].ability == ABILITY_STURDY) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + gLastUsedAbility = ABILITY_STURDY; + gBattlescriptCurrInstr = BattleScript_SturdyPreventsOHKO; + RecordAbilityBattle(gBankTarget, ABILITY_STURDY); + } + else + { + u16 chance; + if (!(gStatuses3[gBankTarget] & STATUS3_ALWAYS_HITS)) + { + chance = gBattleMoves[gCurrentMove].accuracy + (gBattleMons[gBankAttacker].level - gBattleMons[gBankTarget].level); + if (Random() % 100 + 1 < chance && gBattleMons[gBankAttacker].level >= gBattleMons[gBankTarget].level) + chance = TRUE; + else + chance = FALSE; + } + else if (gDisableStructs[gBankTarget].bankWithSureHit == gBankAttacker + && gBattleMons[gBankAttacker].level >= gBattleMons[gBankTarget].level) + { + chance = TRUE; + } + else + { + chance = gBattleMoves[gCurrentMove].accuracy + (gBattleMons[gBankAttacker].level - gBattleMons[gBankTarget].level); + if (Random() % 100 + 1 < chance && gBattleMons[gBankAttacker].level >= gBattleMons[gBankTarget].level) + chance = TRUE; + else + chance = FALSE; + } + if (chance) + { + if (gProtectStructs[gBankTarget].endured) + { + gBattleMoveDamage = gBattleMons[gBankTarget].hp - 1; + gBattleMoveFlags |= MOVESTATUS_ENDURED; + } + else if (gSpecialStatuses[gBankTarget].focusBanded) + { + gBattleMoveDamage = gBattleMons[gBankTarget].hp - 1; + gBattleMoveFlags |= MOVESTATUS_HUNGON; + gLastUsedItem = gBattleMons[gBankTarget].item; + } + else + { + gBattleMoveDamage = gBattleMons[gBankTarget].hp; + gBattleMoveFlags |= MOVESTATUS_ONEHITKO; + } + gBattlescriptCurrInstr += 5; + } + else + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + if (gBattleMons[gBankAttacker].level >= gBattleMons[gBankTarget].level) + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + } +} + +void atk94_damagetohalftargethp(void) // super fang +{ + gBattleMoveDamage = gBattleMons[gBankTarget].hp / 2; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + + gBattlescriptCurrInstr++; +} + +void atk95_setsandstorm(void) +{ + if (gBattleWeather & WEATHER_SANDSTORM_ANY) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + } + else + { + gBattleWeather = WEATHER_SANDSTORM_TEMPORARY; + gBattleCommunication[MULTISTRING_CHOOSER] = 3; + gWishFutureKnock.weatherDuration = 5; + } + gBattlescriptCurrInstr++; +} + +void atk96_weatherdamage(void) +{ + if (WEATHER_HAS_EFFECT) + { + if (gBattleWeather & WEATHER_SANDSTORM_ANY) + { + if (gBattleMons[gBankAttacker].type1 != TYPE_ROCK + && gBattleMons[gBankAttacker].type1 != TYPE_STEEL + && gBattleMons[gBankAttacker].type1 != TYPE_GROUND + && gBattleMons[gBankAttacker].type2 != TYPE_ROCK + && gBattleMons[gBankAttacker].type2 != TYPE_STEEL + && gBattleMons[gBankAttacker].type2 != TYPE_GROUND + && gBattleMons[gBankAttacker].ability != ABILITY_SAND_VEIL + && !(gStatuses3[gBankAttacker] & STATUS3_UNDERGROUND) + && !(gStatuses3[gBankAttacker] & STATUS3_UNDERWATER)) + { + gBattleMoveDamage = gBattleMons[gBankAttacker].maxHP / 16; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + } + else + { + gBattleMoveDamage = 0; + } + } + if (gBattleWeather & WEATHER_HAIL) + { + if (gBattleMons[gBankAttacker].type1 != TYPE_ICE + && gBattleMons[gBankAttacker].type2 != TYPE_ICE + && !(gStatuses3[gBankAttacker] & STATUS3_UNDERGROUND) + && !(gStatuses3[gBankAttacker] & STATUS3_UNDERWATER)) + { + gBattleMoveDamage = gBattleMons[gBankAttacker].maxHP / 16; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + } + else + { + gBattleMoveDamage = 0; + } + } + } + else + { + gBattleMoveDamage = 0; + } + + if (gAbsentBankFlags & gBitTable[gBankAttacker]) + gBattleMoveDamage = 0; + + gBattlescriptCurrInstr++; +} + +void atk97_try_infatuation(void) +{ + struct Pokemon *monAttacker, *monTarget; + u16 speciesAttacker, speciesTarget; + u32 personalityAttacker, personalityTarget; + + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + monAttacker = &gPlayerParty[gBattlePartyID[gBankAttacker]]; + else + monAttacker = &gEnemyParty[gBattlePartyID[gBankAttacker]]; + + if (GetBankSide(gBankTarget) == SIDE_PLAYER) + monTarget = &gPlayerParty[gBattlePartyID[gBankTarget]]; + else + monTarget = &gEnemyParty[gBattlePartyID[gBankTarget]]; + + speciesAttacker = GetMonData(monAttacker, MON_DATA_SPECIES); + personalityAttacker = GetMonData(monAttacker, MON_DATA_PERSONALITY); + + speciesTarget = GetMonData(monTarget, MON_DATA_SPECIES); + personalityTarget = GetMonData(monTarget, MON_DATA_PERSONALITY); + + if (gBattleMons[gBankTarget].ability == ABILITY_OBLIVIOUS) + { + gBattlescriptCurrInstr = BattleScript_ObliviousPreventsAttraction; + gLastUsedAbility = ABILITY_OBLIVIOUS; + RecordAbilityBattle(gBankTarget, ABILITY_OBLIVIOUS); + } + else + { + if (GetGenderFromSpeciesAndPersonality(speciesAttacker, personalityAttacker) == GetGenderFromSpeciesAndPersonality(speciesTarget, personalityTarget) + || gBattleMons[gBankTarget].status2 & STATUS2_INFATUATION + || GetGenderFromSpeciesAndPersonality(speciesAttacker, personalityAttacker) == MON_GENDERLESS + || GetGenderFromSpeciesAndPersonality(speciesTarget, personalityTarget) == MON_GENDERLESS) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + gBattleMons[gBankTarget].status2 |= STATUS2_INFATUATED_WITH(gBankAttacker); + gBattlescriptCurrInstr += 5; + } + } +} + +void atk98_status_icon_update(void) +{ + if (gBattleExecBuffer) + return; + + if (BSScriptRead8(gBattlescriptCurrInstr + 1) != BS_ATTACKER_WITH_PARTNER) + { + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + EmitStatusIconUpdate(0, gBattleMons[gActiveBank].status1, gBattleMons[gActiveBank].status2); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr += 2; + } + else + { + gActiveBank = gBankAttacker; + if (!(gAbsentBankFlags & gBitTable[gActiveBank])) + { + EmitStatusIconUpdate(0, gBattleMons[gActiveBank].status1, gBattleMons[gActiveBank].status2); + MarkBufferBankForExecution(gActiveBank); + } + if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) + { + gActiveBank = GetBankByIdentity(GetBankIdentity(gBankAttacker) ^ BIT_MON); + if (!(gAbsentBankFlags & gBitTable[gActiveBank])) + { + EmitStatusIconUpdate(0, gBattleMons[gActiveBank].status1, gBattleMons[gActiveBank].status2); + MarkBufferBankForExecution(gActiveBank); + } + } + gBattlescriptCurrInstr += 2; + } +} + +void atk99_setmist(void) +{ + if (gSideTimers[GET_BANK_SIDE(gBankAttacker)].mistTimer) + { + gBattleMoveFlags |= MOVESTATUS_FAILED; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + else + { + gSideTimers[GET_BANK_SIDE(gBankAttacker)].mistTimer = 5; + gSideTimers[GET_BANK_SIDE(gBankAttacker)].mistBank = gBankAttacker; + gSideAffecting[GET_BANK_SIDE(gBankAttacker)] |= SIDE_STATUS_MIST; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + gBattlescriptCurrInstr++; +} + +void atk9A_set_focusenergy(void) +{ + if (gBattleMons[gBankAttacker].status2 & STATUS2_FOCUS_ENERGY) + { + gBattleMoveFlags |= MOVESTATUS_FAILED; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + else + { + gBattleMons[gBankAttacker].status2 |= STATUS2_FOCUS_ENERGY; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + gBattlescriptCurrInstr++; +} + +void atk9B_transformdataexecution(void) +{ + gLastUsedMove = 0xFFFF; + gBattlescriptCurrInstr++; + if (gBattleMons[gBankTarget].status2 & STATUS2_TRANSFORMED + || gStatuses3[gBankTarget] & STATUS3_SEMI_INVULNERABLE) + { + gBattleMoveFlags |= MOVESTATUS_FAILED; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + else + { + s32 i; + u8 *battleMonAttacker, *battleMonTarget; + + gBattleMons[gBankAttacker].status2 |= STATUS2_TRANSFORMED; + gDisableStructs[gBankAttacker].disabledMove = 0; + gDisableStructs[gBankAttacker].disableTimer1 = 0; + gDisableStructs[gBankAttacker].unk0 = gBattleMons[gBankTarget].personality; + gDisableStructs[gBankAttacker].unk18_b = 0; + + PREPARE_SPECIES_BUFFER(gBattleTextBuff1, gBattleMons[gBankTarget].species) + + battleMonAttacker = (u8*)(&gBattleMons[gBankAttacker]); + battleMonTarget = (u8*)(&gBattleMons[gBankTarget]); + + for (i = 0; i < offsetof(struct BattlePokemon, pp); i++) + battleMonAttacker[i] = battleMonTarget[i]; + + for (i = 0; i < 4; i++) + { + if (gBattleMoves[gBattleMons[gBankAttacker].moves[i]].pp < 5) + gBattleMons[gBankAttacker].pp[i] = gBattleMoves[gBattleMons[gBankAttacker].moves[i]].pp; + else + gBattleMons[gBankAttacker].pp[i] = 5; + } + + gActiveBank = gBankAttacker; + EmitResetActionMoveSelection(0, RESET_MOVE_SELECTION); + MarkBufferBankForExecution(gActiveBank); + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } +} + +void atk9C_set_substitute(void) +{ + u32 hp = gBattleMons[gBankAttacker].maxHP / 4; + if (gBattleMons[gBankAttacker].maxHP / 4 == 0) + hp = 1; + + if (gBattleMons[gBankAttacker].hp <= hp) + { + gBattleMoveDamage = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + else + { + gBattleMoveDamage = gBattleMons[gBankAttacker].maxHP / 4; // one bit value will only work for pokemon which max hp can go to 1020(which is more than possible in games) + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + + gBattleMons[gBankAttacker].status2 |= STATUS2_SUBSTITUTE; + gBattleMons[gBankAttacker].status2 &= ~(STATUS2_WRAPPED); + gDisableStructs[gBankAttacker].substituteHP = gBattleMoveDamage; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + gHitMarker |= HITMARKER_IGNORE_SUBSTITUTE; + } + + gBattlescriptCurrInstr++; +} + +extern const u16 gMovesForbiddenToCopy[]; +#define MIMIC_FORBIDDEN_END 0xFFFE +#define METRONOME_SLEEPTALK_FORBIDDEN_END 0xFFFF + +static bool8 IsMoveUncopyableByMimic(u16 move) +{ + s32 i; + for (i = 0; gMovesForbiddenToCopy[i] != MIMIC_FORBIDDEN_END + && gMovesForbiddenToCopy[i] != move; i++); + + return (gMovesForbiddenToCopy[i] != MIMIC_FORBIDDEN_END); +} + +void atk9D_mimicattackcopy(void) +{ + gLastUsedMove = 0xFFFF; + + if (IsMoveUncopyableByMimic(gLastUsedMovesByBanks[gBankTarget]) + || gBattleMons[gBankAttacker].status2 & STATUS2_TRANSFORMED + || gLastUsedMovesByBanks[gBankTarget] == 0 + || gLastUsedMovesByBanks[gBankTarget] == 0xFFFF) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + s32 i; + + for (i = 0; i < 4; i++) + { + if (gBattleMons[gBankAttacker].moves[i] == gLastUsedMovesByBanks[gBankTarget]) + break; + } + + if (i == 4) + { + gBattleMons[gBankAttacker].moves[gCurrMovePos] = gLastUsedMovesByBanks[gBankTarget]; + if (gBattleMoves[gLastUsedMovesByBanks[gBankTarget]].pp < 5) + gBattleMons[gBankAttacker].pp[gCurrMovePos] = gBattleMoves[gLastUsedMovesByBanks[gBankTarget]].pp; + else + gBattleMons[gBankAttacker].pp[gCurrMovePos] = 5; + + + PREPARE_MOVE_BUFFER(gBattleTextBuff1, gLastUsedMovesByBanks[gBankTarget]) + + gDisableStructs[gBankAttacker].unk18_b |= gBitTable[gCurrMovePos]; + gBattlescriptCurrInstr += 5; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + } +} + +#ifdef NONMATCHING +void atk9E_metronome(void) +{ + while (1) + { + const u16 *move; + s32 i, j; + + gCurrentMove = (Random() & 0x1FF) + 1; + if (gCurrentMove > LAST_MOVE_INDEX) + continue; + + for (i = 0; i < 4; i++); // ? + + for (move = gMovesForbiddenToCopy; ; move++) + { + if (*move == gCurrentMove) + break; + if (*move == METRONOME_SLEEPTALK_FORBIDDEN_END) + break; + } + + if (*move == METRONOME_SLEEPTALK_FORBIDDEN_END) + break; + } + + gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); + gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; + gBankTarget = GetMoveTarget(gCurrentMove, 0); +} + +#else +__attribute__((naked)) +void atk9E_metronome(void) +{ + asm( + "\n\ + .syntax unified\n\ + push {r4-r7,lr}\n\ + mov r7, r8\n\ + push {r7}\n\ + ldr r7, =gCurrentMove\n\ + movs r6, 0xB1\n\ + lsls r6, 1\n\ + ldr r5, =gMovesForbiddenToCopy\n\ + ldr r0, =gBattlescriptCurrInstr\n\ + mov r8, r0\n\ +_080524EE:\n\ + bl Random\n\ + ldr r2, =0x000001ff\n\ + adds r1, r2, 0\n\ + ands r0, r1\n\ + adds r0, 0x1\n\ + strh r0, [r7]\n\ + cmp r0, r6\n\ + bhi _080524EE\n\ + movs r0, 0x3\n\ +_08052502:\n\ + subs r0, 0x1\n\ + cmp r0, 0\n\ + bge _08052502\n\ + ldr r4, =gCurrentMove\n\ + ldrh r2, [r4]\n\ + ldr r3, =0x0000ffff\n\ + subs r0, r5, 0x2\n\ +_08052510:\n\ + adds r0, 0x2\n\ + ldrh r1, [r0]\n\ + cmp r1, r2\n\ + beq _0805251C\n\ + cmp r1, r3\n\ + bne _08052510\n\ +_0805251C:\n\ + ldr r0, =0x0000ffff\n\ + cmp r1, r0\n\ + bne _080524EE\n\ + ldr r2, =gHitMarker\n\ + ldr r0, [r2]\n\ + ldr r1, =0xfffffbff\n\ + ands r0, r1\n\ + str r0, [r2]\n\ + ldr r3, =gBattleScriptsForMoveEffects\n\ + ldr r2, =gBattleMoves\n\ + ldrh r1, [r4]\n\ + lsls r0, r1, 1\n\ + adds r0, r1\n\ + lsls r0, 2\n\ + adds r0, r2\n\ + ldrb r0, [r0]\n\ + lsls r0, 2\n\ + adds r0, r3\n\ + ldr r0, [r0]\n\ + mov r1, r8\n\ + str r0, [r1]\n\ + ldrh r0, [r4]\n\ + movs r1, 0\n\ + bl GetMoveTarget\n\ + ldr r1, =gBankTarget\n\ + strb r0, [r1]\n\ + pop {r3}\n\ + mov r8, r3\n\ + pop {r4-r7}\n\ + pop {r0}\n\ + bx r0\n\ + .pool\n\ + .syntax divided"); +} + +#endif // NONMATCHING + +void atk9F_dmgtolevel(void) +{ + gBattleMoveDamage = gBattleMons[gBankAttacker].level; + gBattlescriptCurrInstr++; +} + +void atkA0_psywavedamageeffect(void) +{ + s32 randDamage; + + while ((randDamage = (Random() & 0xF)) > 10); + + randDamage *= 10; + gBattleMoveDamage = gBattleMons[gBankAttacker].level * (randDamage + 50) / 100; + gBattlescriptCurrInstr++; +} + +void atkA1_counterdamagecalculator(void) +{ + u8 sideAttacker = GetBankSide(gBankAttacker); + u8 sideTarget = GetBankSide(gProtectStructs[gBankAttacker].physicalBank); + + if (gProtectStructs[gBankAttacker].physicalDmg + && sideAttacker != sideTarget + && gBattleMons[gProtectStructs[gBankAttacker].physicalBank].hp) + { + gBattleMoveDamage = gProtectStructs[gBankAttacker].physicalDmg * 2; + + if (gSideTimers[sideTarget].followmeTimer && gBattleMons[gSideTimers[sideTarget].followmeTarget].hp) + gBankTarget = gSideTimers[sideTarget].followmeTarget; + else + gBankTarget = gProtectStructs[gBankAttacker].physicalBank; + + gBattlescriptCurrInstr += 5; + } + else + { + gSpecialStatuses[gBankAttacker].flag20 = 1; + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +void atkA2_mirrorcoatdamagecalculator(void) // a copy of atkA1 with the physical -> special field changes +{ + u8 sideAttacker = GetBankSide(gBankAttacker); + u8 sideTarget = GetBankSide(gProtectStructs[gBankAttacker].specialBank); + + if (gProtectStructs[gBankAttacker].specialDmg && sideAttacker != sideTarget && gBattleMons[gProtectStructs[gBankAttacker].specialBank].hp) + { + gBattleMoveDamage = gProtectStructs[gBankAttacker].specialDmg * 2; + + if (gSideTimers[sideTarget].followmeTimer && gBattleMons[gSideTimers[sideTarget].followmeTarget].hp) + gBankTarget = gSideTimers[sideTarget].followmeTarget; + else + gBankTarget = gProtectStructs[gBankAttacker].specialBank; + + gBattlescriptCurrInstr += 5; + } + else + { + gSpecialStatuses[gBankAttacker].flag20 = 1; + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +void atkA3_disablelastusedattack(void) +{ + s32 i; + + for (i = 0; i < 4; i++) + { + if (gBattleMons[gBankTarget].moves[i] == gLastUsedMovesByBanks[gBankTarget]) + break; + } + if (gDisableStructs[gBankTarget].disabledMove == 0 + && i != 4 && gBattleMons[gBankTarget].pp[i] != 0) + { + PREPARE_MOVE_BUFFER(gBattleTextBuff1, gBattleMons[gBankTarget].moves[i]) + + gDisableStructs[gBankTarget].disabledMove = gBattleMons[gBankTarget].moves[i]; + gDisableStructs[gBankTarget].disableTimer1 = (Random() & 3) + 2; + gDisableStructs[gBankTarget].disableTimer2 = gDisableStructs[gBankTarget].disableTimer1; // used to save the random amount of turns? + gBattlescriptCurrInstr += 5; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +void atkA4_setencore(void) +{ + s32 i; + + for (i = 0; i < 4; i++) + { + if (gBattleMons[gBankTarget].moves[i] == gLastUsedMovesByBanks[gBankTarget]) + break; + } + + if (gLastUsedMovesByBanks[gBankTarget] == MOVE_STRUGGLE + || gLastUsedMovesByBanks[gBankTarget] == MOVE_ENCORE + || gLastUsedMovesByBanks[gBankTarget] == MOVE_MIRROR_MOVE) + { + i = 4; + } + + if (gDisableStructs[gBankTarget].encoredMove == 0 + && i != 4 && gBattleMons[gBankTarget].pp[i] != 0) + { + gDisableStructs[gBankTarget].encoredMove = gBattleMons[gBankTarget].moves[i]; + gDisableStructs[gBankTarget].encoredMovePos = i; + gDisableStructs[gBankTarget].encoreTimer1 = (Random() & 3) + 3; + gDisableStructs[gBankTarget].encoreTimer2 = gDisableStructs[gBankTarget].encoreTimer1; + gBattlescriptCurrInstr += 5; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +void atkA5_painsplitdmgcalc(void) +{ + if (!(gBattleMons[gBankTarget].status2 & STATUS2_SUBSTITUTE)) + { + s32 hpDiff = (gBattleMons[gBankAttacker].hp + gBattleMons[gBankTarget].hp) / 2; + s32 painSplitHp = gBattleMoveDamage = gBattleMons[gBankTarget].hp - hpDiff; + u8* storeLoc = (void*)(&gBattleScripting.painSplitHp); + + storeLoc[0] = (painSplitHp); + storeLoc[1] = (painSplitHp & 0x0000FF00) >> 8; + storeLoc[2] = (painSplitHp & 0x00FF0000) >> 16; + storeLoc[3] = (painSplitHp & 0xFF000000) >> 24; + + gBattleMoveDamage = gBattleMons[gBankAttacker].hp - hpDiff; + gSpecialStatuses[gBankTarget].moveturnLostHP = 0xFFFF; + + gBattlescriptCurrInstr += 5; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +#ifdef NONMATCHING +void atkA6_settypetorandomresistance(void) // conversion 2 +{ + if (gUnknown_02024250[gBankAttacker] == 0 + || gUnknown_02024250[gBankAttacker] == 0xFFFF) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else if (IsTwoTurnsMove(gUnknown_02024250[gBankAttacker]) + && gBattleMons[gUnknown_02024270[gBankAttacker]].status2 & STATUS2_MULTIPLETURNS) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + s32 type = 0, rands = 0; + do + { + while (((type = (Random() & 0x7F)) > 0x70)); + + type *= 3; + + if (gTypeEffectiveness[type] == gUnknown_02024258[gBankAttacker] + && gTypeEffectiveness[type + 2] <= 5 + && gBattleMons[gBankAttacker].type1 != gTypeEffectiveness[type + 1] + && gBattleMons[gBankAttacker].type2 != gTypeEffectiveness[type + 1]) + { + gBattleMons[gBankAttacker].type1 = type; + gBattleMons[gBankAttacker].type2 = type; + + PREPARE_TYPE_BUFFER(gBattleTextBuff1, type) + + gBattlescriptCurrInstr += 5; + return; + } + + rands++; + } while (rands <= 999); + + type = 0, rands = 0; + do + { + s8 var = (s8)(gTypeEffectiveness[type]); + if (var > -1 || var < -2) + { + if (gTypeEffectiveness[type] == gUnknown_02024258[gBankAttacker] + && gTypeEffectiveness[type + 2] <= 5 + && gBattleMons[gBankAttacker].type1 != gTypeEffectiveness[type + 1] + && gBattleMons[gBankAttacker].type2 != gTypeEffectiveness[type + 1]) + { + gBattleMons[gBankAttacker].type1 = gTypeEffectiveness[rands + 1]; + gBattleMons[gBankAttacker].type2 = gTypeEffectiveness[rands + 1]; + + PREPARE_TYPE_BUFFER(gBattleTextBuff1, gTypeEffectiveness[rands + 1]) + + gBattlescriptCurrInstr += 5; + return; + } + } + type += 3, rands += 3; + } while (rands < 336); + + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +#else +__attribute__((naked)) +void atkA6_settypetorandomresistance(void) // conversion 2 +{ + asm(".syntax unified\n\ + push {r4-r7,lr}\n\ + mov r7, r10\n\ + mov r6, r9\n\ + mov r5, r8\n\ + push {r5-r7}\n\ + ldr r1, =gUnknown_02024250\n\ + ldr r4, =gBankAttacker\n\ + ldrb r0, [r4]\n\ + lsls r0, 1\n\ + adds r2, r0, r1\n\ + ldrh r1, [r2]\n\ + cmp r1, 0\n\ + beq _08052B7E\n\ + ldr r0, =0x0000ffff\n\ + cmp r1, r0\n\ + beq _08052B7E\n\ + ldrh r0, [r2]\n\ + bl IsTwoTurnsMove\n\ + lsls r0, 24\n\ + cmp r0, 0\n\ + beq _08052C1C\n\ + ldr r1, =gBattleMons\n\ + ldr r2, =gUnknown_02024270\n\ + ldrb r0, [r4]\n\ + adds r0, r2\n\ + ldrb r2, [r0]\n\ + movs r0, 0x58\n\ + muls r0, r2\n\ + adds r1, 0x50\n\ + adds r0, r1\n\ + ldr r0, [r0]\n\ + movs r1, 0x80\n\ + lsls r1, 5\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + beq _08052C1C\n\ +_08052B7E:\n\ + ldr r3, =gBattlescriptCurrInstr\n\ + ldr r2, [r3]\n\ + ldrb r1, [r2, 0x1]\n\ + ldrb r0, [r2, 0x2]\n\ + lsls r0, 8\n\ + orrs r1, r0\n\ + ldrb r0, [r2, 0x3]\n\ + lsls r0, 16\n\ + orrs r1, r0\n\ + ldrb r0, [r2, 0x4]\n\ + lsls r0, 24\n\ + orrs r1, r0\n\ + str r1, [r3]\n\ + b _08052D08\n\ + .pool\n\ +_08052BB4:\n\ + mov r0, r12\n\ + strb r5, [r0]\n\ + mov r1, r10\n\ + ldrb r0, [r1]\n\ + muls r0, r2\n\ + adds r0, r7\n\ + adds r0, 0x22\n\ + strb r5, [r0]\n\ + ldr r1, =gBattleTextBuff1\n\ + movs r0, 0xFD\n\ + strb r0, [r1]\n\ + movs r0, 0x3\n\ + strb r0, [r1, 0x1]\n\ + strb r5, [r1, 0x2]\n\ + movs r0, 0xFF\n\ + strb r0, [r1, 0x3]\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + b _08052C0A\n\ + .pool\n\ +_08052BE0:\n\ + mov r0, r8\n\ + adds r0, 0x1\n\ + adds r0, r3\n\ + ldrb r2, [r0]\n\ + strb r2, [r4]\n\ + mov r4, r10\n\ + ldrb r0, [r4]\n\ + muls r0, r6\n\ + ldr r7, =gBattleMons\n\ + adds r0, r7\n\ + adds r0, 0x22\n\ + strb r2, [r0]\n\ + ldr r1, =gBattleTextBuff1\n\ + movs r0, 0xFD\n\ + strb r0, [r1]\n\ + movs r0, 0x3\n\ + strb r0, [r1, 0x1]\n\ + strb r2, [r1, 0x2]\n\ + movs r0, 0xFF\n\ + strb r0, [r1, 0x3]\n\ + mov r1, r12\n\ +_08052C0A:\n\ + ldr r0, [r1]\n\ + adds r0, 0x5\n\ + str r0, [r1]\n\ + b _08052D08\n\ + .pool\n\ +_08052C1C:\n\ + movs r4, 0\n\ + mov r8, r4\n\ + movs r7, 0x7F\n\ + mov r9, r7\n\ +_08052C24:\n\ + bl Random\n\ + mov r4, r9\n\ + ands r4, r0\n\ + cmp r4, 0x70\n\ + bhi _08052C24\n\ + lsls r0, r4, 1\n\ + adds r4, r0, r4\n\ + ldr r6, =gTypeEffectiveness\n\ + adds r3, r4, r6\n\ + ldr r1, =gUnknown_02024258\n\ + ldr r2, =gBankAttacker\n\ + ldrb r5, [r2]\n\ + lsls r0, r5, 1\n\ + adds r0, r1\n\ + ldrb r1, [r3]\n\ + mov r10, r2\n\ + ldrh r0, [r0]\n\ + cmp r1, r0\n\ + bne _08052C80\n\ + adds r0, r4, 0x2\n\ + adds r0, r6\n\ + ldrb r0, [r0]\n\ + cmp r0, 0x5\n\ + bhi _08052C80\n\ + ldr r7, =gBattleMons\n\ + movs r2, 0x58\n\ + adds r0, r5, 0\n\ + muls r0, r2\n\ + adds r3, r0, r7\n\ + movs r0, 0x21\n\ + adds r0, r3\n\ + mov r12, r0\n\ + adds r0, r4, 0x1\n\ + adds r0, r6\n\ + ldrb r5, [r0]\n\ + mov r1, r12\n\ + ldrb r0, [r1]\n\ + adds r1, r5, 0\n\ + cmp r0, r1\n\ + beq _08052C80\n\ + adds r0, r3, 0\n\ + adds r0, 0x22\n\ + ldrb r0, [r0]\n\ + cmp r0, r1\n\ + bne _08052BB4\n\ +_08052C80:\n\ + movs r7, 0x1\n\ + add r8, r7\n\ + ldr r0, =0x000003e7\n\ + cmp r8, r0\n\ + ble _08052C24\n\ + movs r0, 0\n\ + mov r8, r0\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + mov r12, r1\n\ + ldr r3, =gTypeEffectiveness\n\ + adds r0, r4, 0x1\n\ + adds r0, r3\n\ + mov r9, r0\n\ + adds r5, r3, 0\n\ +_08052C9C:\n\ + ldrb r1, [r5]\n\ + cmp r1, 0xFF\n\ + bgt _08052CA6\n\ + cmp r1, 0xFE\n\ + bge _08052CE0\n\ +_08052CA6:\n\ + mov r4, r10\n\ + ldrb r2, [r4]\n\ + lsls r0, r2, 1\n\ + ldr r7, =gUnknown_02024258\n\ + adds r0, r7\n\ + ldrh r0, [r0]\n\ + cmp r1, r0\n\ + bne _08052CE0\n\ + ldrb r0, [r5, 0x2]\n\ + cmp r0, 0x5\n\ + bhi _08052CE0\n\ + movs r6, 0x58\n\ + adds r0, r2, 0\n\ + muls r0, r6\n\ + ldr r1, =gBattleMons\n\ + adds r2, r0, r1\n\ + adds r4, r2, 0\n\ + adds r4, 0x21\n\ + ldrb r0, [r4]\n\ + mov r7, r9\n\ + ldrb r1, [r7]\n\ + cmp r0, r1\n\ + beq _08052CE0\n\ + adds r0, r2, 0\n\ + adds r0, 0x22\n\ + ldrb r0, [r0]\n\ + cmp r0, r1\n\ + beq _08052CE0\n\ + b _08052BE0\n\ +_08052CE0:\n\ + adds r5, 0x3\n\ + movs r0, 0x3\n\ + add r8, r0\n\ + ldr r0, =0x0000014f\n\ + cmp r8, r0\n\ + bls _08052C9C\n\ + mov r1, r12\n\ + ldr r2, [r1]\n\ + ldrb r1, [r2, 0x1]\n\ + ldrb r0, [r2, 0x2]\n\ + lsls r0, 8\n\ + orrs r1, r0\n\ + ldrb r0, [r2, 0x3]\n\ + lsls r0, 16\n\ + orrs r1, r0\n\ + ldrb r0, [r2, 0x4]\n\ + lsls r0, 24\n\ + orrs r1, r0\n\ + mov r4, r12\n\ + str r1, [r4]\n\ +_08052D08:\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\ + .pool\n\ + .syntax divided"); +} +#endif // NONMATCHING + +void atkA7_setalwayshitflag(void) +{ + gStatuses3[gBankTarget] &= ~(STATUS3_ALWAYS_HITS); + gStatuses3[gBankTarget] |= 0x10; + gDisableStructs[gBankTarget].bankWithSureHit = gBankAttacker; + gBattlescriptCurrInstr++; +} + +void atkA8_copymovepermanently(void) // sketch +{ + gLastUsedMove = 0xFFFF; + + if (!(gBattleMons[gBankAttacker].status2 & STATUS2_TRANSFORMED) + && gUnknownMovesUsedByBanks[gBankTarget] != MOVE_STRUGGLE + && gUnknownMovesUsedByBanks[gBankTarget] != 0 + && gUnknownMovesUsedByBanks[gBankTarget] != 0xFFFF + && gUnknownMovesUsedByBanks[gBankTarget] != MOVE_SKETCH) + { + s32 i; + + for (i = 0; i < 4; i++) + { + if (gBattleMons[gBankAttacker].moves[i] == MOVE_SKETCH) + continue; + if (gBattleMons[gBankAttacker].moves[i] == gUnknownMovesUsedByBanks[gBankTarget]) + break; + } + + if (i != 4) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else // sketch worked + { + struct MovePpInfo movePpData; + + gBattleMons[gBankAttacker].moves[gCurrMovePos] = gUnknownMovesUsedByBanks[gBankTarget]; + gBattleMons[gBankAttacker].pp[gCurrMovePos] = gBattleMoves[gUnknownMovesUsedByBanks[gBankTarget]].pp; + gActiveBank = gBankAttacker; + + for (i = 0; i < 4; i++) + { + movePpData.move[i] = gBattleMons[gBankAttacker].moves[i]; + movePpData.pp[i] = gBattleMons[gBankAttacker].pp[i]; + } + movePpData.ppBonuses = gBattleMons[gBankAttacker].ppBonuses; + + EmitSetMonData(0, REQUEST_MOVES_PP_BATTLE, 0, sizeof(struct MovePpInfo), &movePpData); + MarkBufferBankForExecution(gActiveBank); + + PREPARE_MOVE_BUFFER(gBattleTextBuff1, gUnknownMovesUsedByBanks[gBankTarget]) + + gBattlescriptCurrInstr += 5; + } + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + diff --git a/src/battle_ai.c b/src/battle_ai.c index 75b5eb2ed..8590b0f03 100644 --- a/src/battle_ai.c +++ b/src/battle_ai.c @@ -1802,7 +1802,7 @@ static void BattleAICmd_count_alive_pokemon(void) u32 status; bankOnField1 = gBattlePartyID[index]; status = GetBankIdentity(index) ^ 2; - bankOnField2 = gBattlePartyID[GetBankByPlayerAI(status)]; + bankOnField2 = gBattlePartyID[GetBankByIdentity(status)]; } else // in singles there's only one bank by side { diff --git a/src/calculate_base_damage.c b/src/calculate_base_damage.c index 105b334f2..8996059f9 100644 --- a/src/calculate_base_damage.c +++ b/src/calculate_base_damage.c @@ -19,7 +19,6 @@ extern struct BattleEnigmaBerry gEnigmaBerries[]; extern u16 gBattleMovePower; extern u16 gTrainerBattleOpponent_A; -u8 CountAliveMonsInBattle(u8); bool8 ShouldGetStatBadgeBoost(u16 flagId, u8 bank); extern const struct BattleMove gBattleMoves[]; diff --git a/src/pokemon_2.c b/src/pokemon_2.c index cf073570d..b6359f76a 100644 --- a/src/pokemon_2.c +++ b/src/pokemon_2.c @@ -35,7 +35,7 @@ extern const u8 gText_BadEgg[]; extern const u8 gText_EggNickname[]; extern u8 GetBankSide(u8 bank); -extern u8 GetBankByPlayerAI(u8 bank); +extern u8 GetBankByIdentity(u8 bank); extern u8 GetBankIdentity(u8 bank); u8 CountAliveMonsInBattle(u8 caseId) @@ -90,7 +90,7 @@ u8 sub_8069F34(u8 bank) status ^= 1; if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) - return GetBankByPlayerAI(status); + return GetBankByIdentity(status); if (CountAliveMonsInBattle(BATTLE_ALIVE_EXCEPT_ACTIVE) > 1) { u8 val; @@ -99,14 +99,14 @@ u8 sub_8069F34(u8 bank) val = status ^ 2; else val = status; - return GetBankByPlayerAI(val); + return GetBankByIdentity(val); } else { if ((gAbsentBankFlags & gBitTable[status])) - return GetBankByPlayerAI(status ^ 2); + return GetBankByIdentity(status ^ 2); else - return GetBankByPlayerAI(status); + return GetBankByIdentity(status); } } diff --git a/src/pokemon_3.c b/src/pokemon_3.c index aaa02c5d4..d381c7544 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -216,7 +216,7 @@ void sub_806CF24(s32 stat) gBankTarget = gBankInMenu; StringCopy(gBattleTextBuff1, gStatNamesTable[gUnknown_08329EC8[stat]]); StringCopy(gBattleTextBuff2, gText_StatRose); - StrCpyDecodeToDisplayedStringBattle(gText_PkmnsStatChanged2); + BattleStringExpandPlaceholdersToDisplayedString(gText_PkmnsStatChanged2); } u8 *sub_806CF78(u16 itemId) @@ -251,7 +251,7 @@ u8 *sub_806CF78(u16 itemId) else { gBankAttacker = gBankInMenu; - StrCpyDecodeToDisplayedStringBattle(gText_PkmnGettingPumped); + BattleStringExpandPlaceholdersToDisplayedString(gText_PkmnGettingPumped); } } } @@ -259,7 +259,7 @@ u8 *sub_806CF78(u16 itemId) if (itemEffect[3] & 0x80) { gBankAttacker = gBankInMenu; - StrCpyDecodeToDisplayedStringBattle(gText_PkmnShroudedInMist); + BattleStringExpandPlaceholdersToDisplayedString(gText_PkmnShroudedInMist); } return gDisplayedStringBattle; diff --git a/src/window.c b/src/window.c index 164031bee..704060b9d 100644 --- a/src/window.c +++ b/src/window.c @@ -451,7 +451,7 @@ void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 FillBitmapRect4Bit(&pixelRect, x, y, width, height, fillValue); } -void CopyToWindowPixelBuffer(u8 windowId, u8 *src, u16 size, u16 tileOffset) +void CopyToWindowPixelBuffer(u8 windowId, const u8 *src, u16 size, u16 tileOffset) { if (size != 0) CpuCopy16(src, gWindows[windowId].tileData + (0x20 * tileOffset), size); diff --git a/sym_ewram.txt b/sym_ewram.txt index ef2080e22..7c18d8225 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -211,16 +211,16 @@ gUnknown_02022E14: @ 2022E14 gUnknown_02022E16: @ 2022E16 .space 0x2 -gUnknown_02022E18: @ 2022E18 +gBattle_BG1_X: @ 2022E18 .space 0x2 -gUnknown_02022E1A: @ 2022E1A +gBattle_BG1_Y: @ 2022E1A .space 0x2 -gUnknown_02022E1C: @ 2022E1C +gBattle_BG2_X: @ 2022E1C .space 0x2 -gUnknown_02022E1E: @ 2022E1E +gBattle_BG2_Y: @ 2022E1E .space 0x2 gUnknown_02022E20: @ 2022E20 From d18eaa350297d14c82cee68a67fcb827e6bd685c Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Tue, 26 Sep 2017 18:13:58 -0500 Subject: [PATCH 298/342] Extract baserom calls from intro.s --- asm/intro.s | 18 +- data/graphics.s | 45 ++- data/intro.s | 503 +++++++++++++++++++++++--- data/player_pc.s | 2 +- graphics/intro/battle_circle.png | Bin 0 -> 610 bytes graphics/intro/battle_circle_1.pal | 19 + graphics/intro/battle_circle_2.pal | 19 + graphics/intro/battle_pokeball.bin | Bin 0 -> 1024 bytes graphics/intro/battle_pokeball.pal | 259 +++++++++++++ graphics/intro/battle_pokeball.png | Bin 0 -> 2197 bytes graphics/intro/battle_streaks.bin | Bin 0 -> 2048 bytes graphics/intro/battle_streaks.pal | 19 + graphics/intro/battle_streaks.png | Bin 0 -> 202 bytes graphics/intro/flying_shadow.pal | 19 + graphics/intro/latis.png | Bin 0 -> 258 bytes graphics/intro/leaves.pal | 259 +++++++++++++ graphics/intro/leaves_bg.png | Bin 0 -> 6611 bytes graphics/intro/leaves_bgleaves.bin | Bin 0 -> 2048 bytes graphics/intro/leaves_bgmountains.bin | Bin 0 -> 2048 bytes graphics/intro/leaves_drops.pal | 19 + graphics/intro/leaves_foreground.bin | Bin 0 -> 2048 bytes graphics/intro/leaves_gflogo.pal | 19 + graphics/intro/leaves_gflogo.png | Bin 0 -> 1113 bytes graphics/intro/leaves_midground.bin | Bin 0 -> 2048 bytes 24 files changed, 1138 insertions(+), 62 deletions(-) create mode 100644 graphics/intro/battle_circle.png create mode 100644 graphics/intro/battle_circle_1.pal create mode 100644 graphics/intro/battle_circle_2.pal create mode 100644 graphics/intro/battle_pokeball.bin create mode 100644 graphics/intro/battle_pokeball.pal create mode 100644 graphics/intro/battle_pokeball.png create mode 100644 graphics/intro/battle_streaks.bin create mode 100644 graphics/intro/battle_streaks.pal create mode 100644 graphics/intro/battle_streaks.png create mode 100644 graphics/intro/flying_shadow.pal create mode 100644 graphics/intro/latis.png create mode 100644 graphics/intro/leaves.pal create mode 100644 graphics/intro/leaves_bg.png create mode 100644 graphics/intro/leaves_bgleaves.bin create mode 100644 graphics/intro/leaves_bgmountains.bin create mode 100644 graphics/intro/leaves_drops.pal create mode 100644 graphics/intro/leaves_foreground.bin create mode 100644 graphics/intro/leaves_gflogo.pal create mode 100644 graphics/intro/leaves_gflogo.png create mode 100644 graphics/intro/leaves_midground.bin diff --git a/asm/intro.s b/asm/intro.s index efd52e7fd..01ac2204b 100644 --- a/asm/intro.s +++ b/asm/intro.s @@ -376,11 +376,11 @@ task_intro_1: @ 816CF18 movs r0, 0x12 movs r1, 0x28 bl SetGpuReg - ldr r0, =gUnknown_085E13B4 + ldr r0, =gIntroLeavesBgGfx movs r1, 0xC0 lsls r1, 19 bl LZ77UnCompVram - ldr r0, =gUnknown_085E07C4 + ldr r0, =gIntroLeavesForegroundTilemap ldr r1, =0x06008000 bl LZ77UnCompVram ldr r1, =0x06008800 @@ -393,7 +393,7 @@ task_intro_1: @ 816CF18 ldr r5, =0x81000400 str r5, [r4, 0x8] ldr r0, [r4, 0x8] - ldr r0, =gUnknown_085E0B78 + ldr r0, =gIntroLeavesMidgroundTilemap ldr r1, =0x06009000 bl LZ77UnCompVram ldr r1, =0x06009800 @@ -403,7 +403,7 @@ task_intro_1: @ 816CF18 str r1, [r4, 0x4] str r5, [r4, 0x8] ldr r0, [r4, 0x8] - ldr r0, =gUnknown_085E0EAC + ldr r0, =gIntroLeavesBgLeavesTilemap ldr r1, =0x0600a000 bl LZ77UnCompVram ldr r1, =0x0600a800 @@ -413,7 +413,7 @@ task_intro_1: @ 816CF18 str r1, [r4, 0x4] str r5, [r4, 0x8] ldr r0, [r4, 0x8] - ldr r0, =gUnknown_085E119C + ldr r0, =gIntroLeavesBgMountainsTilemap ldr r1, =0x0600b000 bl LZ77UnCompVram ldr r1, =0x0600b800 @@ -423,7 +423,7 @@ task_intro_1: @ 816CF18 str r1, [r4, 0x4] str r5, [r4, 0x8] ldr r0, [r4, 0x8] - ldr r0, =gUnknown_085E05C4 + ldr r0, =gIntroLeavesPal movs r5, 0x80 lsls r5, 2 movs r1, 0 @@ -1779,14 +1779,14 @@ task_intro_10: @ 816DBAC lsls r5, 24 lsrs r5, 24 bl intro_reset_and_hide_bgs - ldr r0, =gUnknown_085E3854 + ldr r0, =gIntroBattlePokeBallGfx movs r1, 0xC0 lsls r1, 19 bl LZ77UnCompVram - ldr r0, =gUnknown_085E3724 + ldr r0, =gIntroBattlePokeBallTilemap ldr r1, =0x06004000 bl LZ77UnCompVram - ldr r0, =gUnknown_085E3524 + ldr r0, =gIntroBattlePokeBallPal movs r2, 0x80 lsls r2, 2 movs r1, 0 diff --git a/data/graphics.s b/data/graphics.s index 96aaf3911..dc29f6bcb 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -348,7 +348,28 @@ gUnknown_08D85E72:: @ 8D85E72 .incbin "baserom.gba", 0xd85e72, 0xa gUnknown_08D85E7C:: @ 8D85E7C - .incbin "baserom.gba", 0xd85e7c, 0x2618 + .incbin "baserom.gba", 0xd85e7c, 0x54 + +gUnknown_08D85ED0:: @ 8D85ED0 + .incbin "baserom.gba", 0xd85ed0, 0x20 + +gUnknown_08D85EF0:: @ 8D85EF0 + .incbin "baserom.gba", 0xd85ef0, 0x20 + +gUnknown_08D85F10:: @ 8D85ED0 + .incbin "baserom.gba", 0xd85f10, 0x20 + +gUnknown_08D85F30:: @ 8D85ED0 + .incbin "baserom.gba", 0xd85f30, 0x20 + +gUnknown_08D85F50:: @ 8D85F50 + .incbin "baserom.gba", 0xd85f50, 0x1e0 + +gUnknown_08D86130:: @ 8D86130 + .incbin "baserom.gba", 0xd86130, 0x420 + +gUnknown_08D86550:: @ 8D86550 + .incbin "baserom.gba", 0xd86550, 0x1f44 gUnknown_08D88494:: @ 8D88494 .incbin "baserom.gba", 0xd88494, 0x8ac @@ -381,7 +402,13 @@ gUnknown_08D8B440:: @ 8D8B440 .incbin "baserom.gba", 0xd8b440, 0x2a8 gUnknown_08D8B6E8:: @ 8D8B6E8 - .incbin "baserom.gba", 0xd8b6e8, 0x38c + .incbin "baserom.gba", 0xd8b6e8, 0x124 + +gUnknown_08D8B80C:: @ 8D8B80C + .incbin "baserom.gba", 0xd8b80c, 0x248 + +gUnknown_08D8BA54:: @ 8D8BA54 + .incbin "baserom.gba", 0xd8ba54, 0x20 gUnknown_08D8BA74:: @ 8D8BA74 .incbin "baserom.gba", 0xd8ba74, 0x6f8 @@ -393,7 +420,19 @@ gUnknown_08D8C838:: @ 8D8C838 .incbin "baserom.gba", 0xd8c838, 0x490 gUnknown_08D8CCC8:: @ 8D8CCC8 - .incbin "baserom.gba", 0xd8ccc8, 0x748 + .incbin "baserom.gba", 0xd8ccc8, 0x27c + +gUnknown_08D8CF44:: @ 8D8CF44 + .incbin "baserom.gba", 0xd8cf44, 0x1cc + +gUnknown_08D8D110:: @ 8D8D110 + .incbin "baserom.gba", 0xd8d110, 0x20 + +gUnknown_08D8D130:: @ 8D8D130 + .incbin "baserom.gba", 0xd8d130, 0xd8 + +gUnknown_08D8D208:: @ 8D8D208 + .incbin "baserom.gba", 0xd8d208, 0x208 gUnknown_08D8D410:: @ 8D8D410 .incbin "baserom.gba", 0xd8d410, 0x17c diff --git a/data/intro.s b/data/intro.s index 552799951..acd1164b6 100644 --- a/data/intro.s +++ b/data/intro.s @@ -3,122 +3,527 @@ .section .rodata -gUnknown_085E05C4:: @ 85E05C4 - .incbin "baserom.gba", 0x5e05c4, 0x200 + .align 2 +gIntroLeavesDropsPal:: @ 85DFF90 + .incbin "graphics/intro/leaves_drops.gbapal" -gUnknown_085E07C4:: @ 85E07C4 - .incbin "baserom.gba", 0x5e07c4, 0x3b4 + .align 2 +gIntroLeavesGFLogoPal:: @ 85DFFB0 + .incbin "graphics/intro/leaves_gflogo.gbapal" -gUnknown_085E0B78:: @ 85E0B78 - .incbin "baserom.gba", 0x5e0b78, 0x334 + .align 2 +gIntroLeavesGFLogoGfx:: @ 85DFFD0 + .incbin "graphics/intro/leaves_gflogo.4bpp.lz" -gUnknown_085E0EAC:: @ 85E0EAC - .incbin "baserom.gba", 0x5e0eac, 0x2f0 + .align 2 +gIntroLeavesPal:: @ 85E05C4 + .incbin "graphics/intro/leaves.gbapal" -gUnknown_085E119C:: @ 85E119C - .incbin "baserom.gba", 0x5e119c, 0x218 + .align 2 +gIntroLeavesForegroundTilemap:: @ 85E07C4 + .incbin "graphics/intro/leaves_foreground.bin.lz" -gUnknown_085E13B4:: @ 85E13B4 - .incbin "baserom.gba", 0x5e13b4, 0x2170 + .align 2 +gIntroLeavesMidgroundTilemap:: @ 85E0B78 + .incbin "graphics/intro/leaves_midground.bin.lz" -gUnknown_085E3524:: @ 85E3524 - .incbin "baserom.gba", 0x5e3524, 0x200 + .align 2 +gIntroLeavesBgLeavesTilemap:: @ 85E0EAC + .incbin "graphics/intro/leaves_bgleaves.bin.lz" -gUnknown_085E3724:: @ 85E3724 - .incbin "baserom.gba", 0x5e3724, 0x130 + .align 2 +gIntroLeavesBgMountainsTilemap:: @ 85E119C + .incbin "graphics/intro/leaves_bgmountains.bin.lz" -gUnknown_085E3854:: @ 85E3854 - .incbin "baserom.gba", 0x5e3854, 0x1220 + .align 2 +gIntroLeavesBgGfx:: @ 85E13B4 + .incbin "graphics/intro/leaves_bg.4bpp.lz" + .align 2 +gIntroBattlePokeBallPal:: @ 85E3524 + .incbin "graphics/intro/battle_pokeball.gbapal" + + .align 2 +gIntroBattlePokeBallTilemap:: @ 85E3724 + .incbin "graphics/intro/battle_pokeball.bin.lz" + + .align 2 +gIntroBattlePokeBallGfx:: @ 85E3854 + .incbin "graphics/intro/battle_pokeball.8bpp.lz" + + .align 2 + .incbin "graphics/intro/battle_streaks.gbapal" + + .align 2 + .incbin "graphics/intro/battle_streaks.4bpp.lz" + + .align 2 + .incbin "graphics/intro/battle_streaks.bin.lz" + + .align 2 +gIntroBattleCirclePal:: @ 85E4570 + .incbin "graphics/intro/battle_circle_1.gbapal" + + .align 2 + .incbin "graphics/intro/battle_circle_2.gbapal" + + .align 2 +gIntroBattleCircleGfx:: @ 85E45B0 + .incbin "graphics/intro/battle_circle.4bpp.lz" + + .align 2 +gIntroFlyingPkmnShadowPal:: @ 85E492C + .incbin "graphics/intro/flying_shadow.gbapal" + + .align 2 + .incbin "graphics/intro/latis.4bpp.lz" + + .align 2 + .byte 0x02, 0x03, 0x04, 0x05, 0x01, 0x01, 0x01, 0x06 + .byte 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x02, 0x0d + .byte 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15 + .byte 0x16, 0x17, 0x18, 0x19, 0x02, 0x0d, 0x0e, 0x0f + .byte 0x10, 0x11, 0x12, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e + .byte 0x1f, 0x20, 0x21, 0x02, 0x0d, 0x0e, 0x0f, 0x10 + .byte 0x11, 0x12, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27 + .byte 0x28, 0x29, 0x2a, 0x00 + + .align 2 gUnknown_085E4A74:: @ 85E4A74 - .incbin "baserom.gba", 0x5e4a74, 0x10 + obj_tiles gUnknown_08D8D208, 0x0400, 0x05e1 + null_obj_tiles + .align 2 gUnknown_085E4A84:: @ 85E4A84 - .incbin "baserom.gba", 0x5e4a84, 0x34 + obj_pal gUnknown_08D8BA54, 0x05e1 + null_obj_pal + .align 2 +gUnknown_085E4A94:: @ 85E4A94 + .byte 0xa0, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00 + + .align 2 +gUnknown_085E4A9C:: @ 85E4A9C + .2byte 0x0000, 0x0002, 0x0004, 0x0002, 0x0008, 0x0002, 0x000c, 0x0002, 0x0010, 0x0002, 0xfffe, 0x0000 + + .align 2 +gUnknown_085E4AB4:: @ 85E4AB4 + .4byte gUnknown_085E4A9C + + .align 2 gUnknown_085E4AB8:: @ 85E4AB8 - .incbin "baserom.gba", 0x5e4ab8, 0x18 + spr_template 0x05e1, 0x05e1, gUnknown_085E4A94, gUnknown_085E4AB4, NULL, gDummySpriteAffineAnimTable, sub_816D338 + .align 2 gUnknown_085E4AD0:: @ 85E4AD0 - .incbin "baserom.gba", 0x5e4ad0, 0x18 + .byte 0x7c, 0x28, 0x66, 0x1e, 0x4d, 0x1e, 0x36, 0x0f + .byte 0x94, 0x09, 0x3f, 0x1c, 0x5d, 0x28, 0x94, 0x20 + .byte 0xad, 0x29, 0x5e, 0x14, 0xd0, 0x26, 0x00, 0x00 + .align 2 gUnknown_085E4AE8:: @ 85E4AE8 - .incbin "baserom.gba", 0x5e4ae8, 0x20 + obj_tiles gUnknown_08D85F50, 0x0400, 0x05dc + obj_tiles gUnknown_08D86130, 0x0c00, 0x05dd + obj_tiles gUnknown_08D86550, 0x2000, 0x05de + null_obj_tiles + .align 2 gUnknown_085E4B08:: @ 85E4B08 - .incbin "baserom.gba", 0x5e4b08, 0x38 + obj_pal gUnknown_08D85ED0, 0x05dc + obj_pal gUnknown_08D85EF0, 0x05dd + obj_pal gUnknown_08D85F10, 0x05de + null_obj_pal + .align 2 +gUnknown_085E4B28:: @ 85E4B28 + .byte 0xa0, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00 + + .align 2 +gUnknown_085E4B30:: @ 85E4B30 + .2byte 0x0000, 0x0002, 0x0010, 0x0002, 0xfffe, 0x0000 + + .align 2 +gUnknown_085E4B3C:: @ 85E4B3C + .4byte gUnknown_085E4B30 + + .align 2 gUnknown_085E4B40:: @ 85E4B40 - .incbin "baserom.gba", 0x5e4b40, 0x64 + spr_template 0x05dc, 0x05dc, gUnknown_085E4B28, gUnknown_085E4B3C, NULL, gDummySpriteAffineAnimTable, sub_816D81C + .align 2 +gUnknown_085E4B58:: @ 85E4B58 + .byte 0xa0, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00 + + .align 2 +gUnknown_085E4B60:: @ 85E4B60 + .2byte 0x0000, 0x0005, 0x0010, 0x0005, 0x0020, 0x0005, 0x0010, 0x0005, 0xfffe, 0x0000 + + .align 2 +gUnknown_085E4B74:: @ 85E4B74 + .2byte 0x0000, 0x0003, 0x0010, 0x0003, 0x0020, 0x0003, 0x0010, 0x0003, 0xfffe, 0x0000 + + .align 2 +gUnknown_085E4B88:: @ 85E4B88 + .2byte 0x0030, 0x0004, 0x0040, 0x0006, 0x0050, 0x0000, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4B98:: @ 85E4B98 + .4byte gUnknown_085E4B60 + .4byte gUnknown_085E4B74 + .4byte gUnknown_085E4B88 + + .align 2 gUnknown_085E4BA4:: @ 85E4BA4 - .incbin "baserom.gba", 0x5e4ba4, 0x38 + spr_template 0x05dd, 0x05dd, gUnknown_085E4B58, gUnknown_085E4B98, NULL, gDummySpriteAffineAnimTable, sub_816D9C0 + .align 2 +gUnknown_085E4BBC:: @ 85E4BBC + .byte 0xa0, 0x00, 0x00, 0xc0, 0x00, 0x04, 0x00, 0x00 + + .align 2 +gUnknown_085E4BC4:: @ 85E4BC4 + .2byte 0x0000, 0x0004, 0x0040, 0x0004, 0x0080, 0x0004, 0x00c0, 0x0004, 0xfffe, 0x0000 + + .align 2 +gUnknown_085E4BD8:: @ 85E4BD8 + .4byte gUnknown_085E4BC4 + + .align 2 gUnknown_085E4BDC:: @ 85E4BDC - .incbin "baserom.gba", 0x5e4bdc, 0x18 + spr_template 0x05de, 0x05de, gUnknown_085E4BBC, gUnknown_085E4BD8, NULL, gDummySpriteAffineAnimTable, sub_816DAE8 + .align 2 gUnknown_085E4BF4:: @ 85E4BF4 - .incbin "baserom.gba", 0x5e4bf4, 0x10 + obj_tiles gUnknown_08D8B80C, 0x0c00, 0x05df + null_obj_tiles + .align 2 gUnknown_085E4C04:: @ 85E4C04 - .incbin "baserom.gba", 0x5e4c04, 0x48 + obj_pal gUnknown_08D8BA54, 0x05df + null_obj_pal + .align 2 +gUnknown_085E4C14:: @ 85E4C14 + .byte 0xa0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00 + + .align 2 +gUnknown_085E4C1C:: @ 85E4C1C + .2byte 0x0000, 0x0002, 0x0030, 0x0002, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4C28:: @ 85E4C28 + .2byte 0x0010, 0x0002, 0x0040, 0x0002, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4C34:: @ 85E4C34 + .2byte 0x0020, 0x0002, 0x0050, 0x0002, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4C40:: @ 85E4C40 + .4byte gUnknown_085E4C1C + .4byte gUnknown_085E4C28 + .4byte gUnknown_085E4C34 + + .align 2 gUnknown_085E4C4C:: @ 85E4C4C - .incbin "baserom.gba", 0x5e4c4c, 0x18 + spr_template 0x05df, 0x05df, gUnknown_085E4C14, gUnknown_085E4C40, NULL, gDummySpriteAffineAnimTable, sub_816EC6C + .align 2 gUnknown_085E4C64:: @ 85E4C64 - .incbin "baserom.gba", 0x5e4c64, 0x24 + .2byte 0x0068, 0x0000, 0x00c0, 0x008e, 0x0003, 0x0280, 0x0053, 0x0001 + .2byte 0x0180, 0x009b, 0x0000, 0x0080, 0x0038, 0x0002, 0x0200, 0x00ae + .2byte 0x0001, 0x0100 + .align 2 gUnknown_085E4C88:: @ 85E4C88 - .incbin "baserom.gba", 0x5e4c88, 0x10 + obj_tiles gUnknown_08D8CF44, 0x0600, 0x05e0 + null_obj_tiles + .align 2 gUnknown_085E4C98:: @ 85E4C98 - .incbin "baserom.gba", 0x5e4c98, 0x10 + obj_pal gUnknown_08D8D110, 0x05e0 + null_obj_pal + .align 2 gUnknown_085E4CA8:: @ 85E4CA8 - .incbin "baserom.gba", 0x5e4ca8, 0x6c + .2byte 0x0042, 0x0040, 0x0001, 0x0060, 0x0060, 0x0008, 0x0080, 0x0040 + .2byte 0x0001, 0x0090, 0x0030, 0x0008, 0x00a0, 0x0048, 0x0001, 0x00b0 + .2byte 0x0060, 0x0008, 0x0060, 0x0060, 0x0004, 0x0070, 0x0068, 0x0008 + .2byte 0x0080, 0x0060, 0x0004, 0x0058, 0x0020, 0x0004, 0x0068, 0x0018 + .2byte 0x0008, 0x0078, 0x0020, 0x0004 + .align 2 +gUnknown_085E4CF0:: @ 85E4CF0 + .byte 0xa0, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00 + + .align 2 +gUnknown_085E4CF8:: @ 85E4CF8 + .2byte 0x0000, 0x0004, 0x0008, 0x0004, 0x0010, 0x0004, 0x0018, 0x0004 + .2byte 0x0020, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4D10:: @ 85E4D10 + .4byte gUnknown_085E4CF8 + + .align 2 gUnknown_085E4D14:: @ 85E4D14 - .incbin "baserom.gba", 0x5e4d14, 0x50 + spr_template 0x05e0, 0x05e0, gUnknown_085E4CF0, gUnknown_085E4D10, NULL, gDummySpriteAffineAnimTable, sub_816E7B4 + .align 2 +gUnknown_085E4D2C:: @ 85E4D2C + .byte 0xa0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00 + + .align 2 +gUnknown_085E4D34:: @ 85E4D34 + .2byte 0x0010, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4D3C:: @ 85E4D3C + .2byte 0x0018, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4D44:: @ 85E4D44 + .2byte 0x0000, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4D4C:: @ 85E4D4C + .2byte 0x0030, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4D54:: @ 85E4D54 + .4byte gUnknown_085E4D34 + .4byte gUnknown_085E4D3C + .4byte gUnknown_085E4D44 + .4byte gUnknown_085E4D4C + + .align 2 gUnknown_085E4D64:: @ 85E4D64 - .incbin "baserom.gba", 0x5e4d64, 0x60 + spr_template 0x07d0, 0x07d0, gUnknown_085E4D2C, gUnknown_085E4D54, NULL, gDummySpriteAffineAnimTable, sub_816F454 + .align 2 +gUnknown_085E4D7C:: @ 85E4D7C + .byte 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x04, 0x00 + + .align 2 +gUnknown_085E4D84:: @ 85E4D84 + .2byte 0x0080, 0x0004, 0x00c0, 0x0004, 0xfffe, 0x0000 + + .align 2 +gUnknown_085E4D90:: @ 85E4D90 + .2byte 0x0000, 0x0008, 0x0040, 0x0008, 0x0080, 0x0008, 0x00c0, 0x0008, 0xfffe, 0x0000 + + .align 2 +gUnknown_085E4DA4:: @ 85E4DA4 + .2byte 0x0100, 0x0004, 0x0140, 0x0004, 0x0180, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4DB4:: @ 85E4DB4 + .2byte 0x0180, 0x0010, 0x0140, 0x0010, 0x0100, 0x0010, 0xffff, 0x0000 + + .align 2 gUnknown_085E4DC4:: @ 85E4DC4 - .incbin "baserom.gba", 0x5e4dc4, 0xd0 + .4byte gUnknown_085E4D7C + .4byte gUnknown_085E4D90 + .4byte gUnknown_085E4DA4 + .4byte gUnknown_085E4DB4 + .align 2 +gUnknown_085E4DD4:: @ 85E4DD4 + .2byte 0x03a0, 0x4000, 0x0000, 0x0000 + + .align 2 +gUnknown_085E4DDC:: @ 85E4DDC + .2byte 0x00a0, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085E4DE4:: @ 85E4DE4 + .2byte 0x87a0, 0xc000, 0x0000, 0x0000 + + .align 2 +gUnknown_085E4DEC:: @ 85E4DEC + .2byte 0x0050, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4DF4:: @ 85E4DF4 + .2byte 0x0054, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4DFC:: @ 85E4DFC + .2byte 0x0058, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4E04:: @ 85E4E04 + .2byte 0x005c, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4E0C:: @ 85E4E0C + .2byte 0x0060, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4E14:: @ 85E4E14 + .2byte 0x0064, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4E1C:: @ 85E4E1C + .2byte 0x0068, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4E24:: @ 85E4E24 + .2byte 0x0070, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4E2C:: @ 85E4E2C + .2byte 0x0071, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4E34:: @ 85E4E34 + .2byte 0x0072, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4E3C:: @ 85E4E3C + .2byte 0x0073, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4E44:: @ 85E4E44 + .2byte 0x0074, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4E4C:: @ 85E4E4C + .2byte 0x0075, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4E54:: @ 85E4E54 + .2byte 0x0080, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E4E5C:: @ 85E4E5C + .4byte gUnknown_085E4DEC + .4byte gUnknown_085E4DF4 + .4byte gUnknown_085E4DFC + .4byte gUnknown_085E4E04 + .4byte gUnknown_085E4E0C + .4byte gUnknown_085E4E14 + .4byte gUnknown_085E4E1C + + .align 2 +gUnknown_085E4E78:: @ 85E4E78 + .4byte gUnknown_085E4E24 + .4byte gUnknown_085E4E2C + .4byte gUnknown_085E4E34 + .4byte gUnknown_085E4E3C + .4byte gUnknown_085E4E44 + .4byte gUnknown_085E4E4C + + .align 2 +gUnknown_085E4E90:: @ 85E4E90 + .4byte gUnknown_085E4E54 + + .align 2 gUnknown_085E4E94:: @ 85E4E94 - .incbin "baserom.gba", 0x5e4e94, 0xb4 + .2byte 0x0000, 0xffb8, 0x0001, 0xffc8, 0x0002, 0xffd8, 0x0003, 0xffe8 + .2byte 0x0004, 0x0008, 0x0005, 0x0018, 0x0003, 0x0028, 0x0001, 0x0038 + .2byte 0x0006, 0x0048, 0x0000, 0xffe4, 0x0001, 0xffec, 0x0002, 0xfff4 + .2byte 0x0003, 0xfffc, 0x0002, 0x0004, 0x0004, 0x000c, 0x0005, 0x0014 + .2byte 0x0003, 0x001c + .align 2 +gUnknown_085E4ED8:: @ 85E4ED8 + .2byte 0x0080, 0x0080, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085E4EE8:: @ 85E4EE8 + .2byte 0x0080, 0x0080, 0x0000, 0x0000, 0x0010, 0x0010, 0x1000, 0x0000 + .2byte 0xfff0, 0xfff0, 0x0800, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085E4F08:: @ 85E4F08 + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x0008, 0x0008, 0x3000, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085E4F20:: @ 85E4F20 + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x0002, 0x0002, 0x3000, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085E4F38:: @ 85E4F38 + .4byte gUnknown_085E4ED8 + .4byte gUnknown_085E4EE8 + .4byte gUnknown_085E4F08 + .4byte gUnknown_085E4F20 + + .align 2 gUnknown_085E4F48:: @ 85E4F48 - .incbin "baserom.gba", 0x5e4f48, 0x14 + .2byte 0x0100, 0x00c0, 0x0080, 0x0040, 0x0000, 0x0040, 0x0080, 0x00c0 + .2byte 0x0100, 0x0000 + .align 2 gUnknown_085E4F5C:: @ 85E4F5C - .incbin "baserom.gba", 0x5e4f5c, 0x30 + spr_template 0x07d0, 0x07d1, gUnknown_085E4DD4, gUnknown_085E4E5C, NULL, gUnknown_085E4F38, sub_816FB38 + spr_template 0x07d0, 0x07d1, gUnknown_085E4DDC, gUnknown_085E4E78, NULL, gDummySpriteAffineAnimTable, sub_816FB38 + .align 2 gUnknown_085E4F8C:: @ 85E4F8C - .incbin "baserom.gba", 0x5e4f8c, 0x18 + spr_template 0x07d0, 0x07d1, gUnknown_085E4DE4, gUnknown_085E4E90, NULL, gUnknown_085E4F38, sub_816FD44 + .align 2 gUnknown_085E4FA4:: @ 85E4FA4 - .incbin "baserom.gba", 0x5e4fa4, 0x20 + .byte 0x00, 0x17, 0x17, 0x31, 0x3e, 0x24, 0x24, 0x0a, 0x0a, 0x00, 0x00, 0x00 + .align 2 +gUnknown_085E4FB0:: @ 85E4FB0 + .byte 0xa0, 0x40, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00 + + .align 2 +gUnknown_085E4FB8:: @ 85E4FB8 + .2byte 0x0000, 0x000a, 0xfffe, 0x0000 + + .align 2 +gUnknown_085E4FC0:: @ 85E4FC0 + .4byte gUnknown_085E4FB8 + + .align 2 gUnknown_085E4FC4:: @ 85E4FC4 - .incbin "baserom.gba", 0x5e4fc4, 0x18 + spr_template 0x07d2, 0x07d2, gUnknown_085E4FB0, gUnknown_085E4FC0, NULL, gDummySpriteAffineAnimTable, sub_816FEDC + .align 2 gUnknown_085E4FDC:: @ 85E4FDC - .incbin "baserom.gba", 0x5e4fdc, 0x10 + obj_tiles gIntroLeavesGFLogoGfx, 0x1400, 0x07d0 + null_obj_tiles gUnknown_085E4FEC:: @ 85E4FEC - .incbin "baserom.gba", 0x5e4fec, 0x10 + obj_tiles gUnknown_08D8D130, 0x0400, 0x07d2 + null_obj_tiles + .align 2 gUnknown_085E4FFC:: @ 85E4FFC - .incbin "baserom.gba", 0x5e4ffc, 0x34 + obj_pal gIntroLeavesDropsPal, 0x07d0 + obj_pal gIntroLeavesGFLogoPal, 0x07d1 + obj_pal gIntroFlyingPkmnShadowPal, 0x07d2 + null_obj_pal + .align 2 +gUnknown_085E501C:: @ 85E501C + .byte 0xa0, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00 + + .align 2 +gUnknown_085E5024:: @ 85E5024 + .2byte 0x0010, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_085E502C:: @ 85E502C + .4byte gUnknown_085E5024 + + .align 2 gUnknown_085E5030:: @ 85E5030 - .incbin "baserom.gba", 0x5e5030, 0x18 + spr_template 0x07d3, 0x07d3, gUnknown_085E501C, gUnknown_085E502C, NULL, gDummySpriteAffineAnimTable, sub_8170040 + .align 2 gUnknown_085E5048:: @ 85E5048 - .incbin "baserom.gba", 0x5e5048, 0x10 + obj_tiles gIntroBattleCircleGfx, 0x0a00, 0x07d3 + null_obj_tiles gUnknown_085E5058:: @ 85E5058 - .incbin "baserom.gba", 0x5e5058, 0x10 + obj_pal gIntroBattleCirclePal, 0x07d3 + null_obj_pal + diff --git a/data/player_pc.s b/data/player_pc.s index 1a4f62b4f..4fd2913dd 100644 --- a/data/player_pc.s +++ b/data/player_pc.s @@ -40,4 +40,4 @@ gUnknown_085DFF84:: @ 85DFF84 .incbin "baserom.gba", 0x5dff84, 0x8 gUnknown_085DFF8C:: @ 85DFF8C - .incbin "baserom.gba", 0x5dff8c, 0x638 + .incbin "baserom.gba", 0x5dff8c, 0x4 diff --git a/graphics/intro/battle_circle.png b/graphics/intro/battle_circle.png new file mode 100644 index 0000000000000000000000000000000000000000..26be33c0188ca119789414f99da32c358630ce8b GIT binary patch literal 610 zcmeAS@N?(olHy`uVBq!ia0vp^4nQ2h!VDy%C+3v_DT4r?5ZC|z{{xvo;{R2K|63UT zPXY4K!T)>B|DUb-|L!VK@r$U&ghyi;|8LQu^)-XMn~ zK@Fn$+{>7|v;FLT?^wd*!`di3=VT+(0_MkjJhBdHWx0Qv-*&o837&U^%W(elvsG^; zC7kc>e{`#={b=zV!@38n6E}uPefV&F+Vj3U7bPMmGTQcCuTDO5u}C((r7$g8srS1@ z`|G=c&ps$LcJE{nKg{wVro&r-m3Q{%#H>TE)2y}%$xNxTiTL>_WaF7<%pMaNcfMWu zwuyNPn;e_`m#W&nv|Rb=3ELvhFwZZY_A80m!9j3>R73;Qe(817G!OSX6<<8AXdc_T%}cb=WKZ}iX9XEq2SbIcA72#M zH2XD#2;APwm;Gc`!w<{l+KZxlls9TJ?0yjwBqPSNC|T0t=xw&#6E+V+ZHf-ueg28A@0Gf3V}E`@3(;e~I5)bNhbYuEq(v9XUxQ(kjxLce_re`SmeZ uEx4fEDUGoVR*XwxvXckBew`}U*DGaNhwl7N7-=P;xhE?&9}lfHBJ9;Q6QqsLDm3SPf? Xi$xkJ^yTZf?>~P2`i)(7WQqa+n{{3< literal 0 HcmV?d00001 diff --git a/graphics/intro/battle_pokeball.pal b/graphics/intro/battle_pokeball.pal new file mode 100644 index 000000000..d520a5e82 --- /dev/null +++ b/graphics/intro/battle_pokeball.pal @@ -0,0 +1,259 @@ +JASC-PAL +0100 +256 +255 255 255 +0 0 0 +49 41 24 +106 90 57 +164 139 90 +222 98 57 +131 131 189 +255 255 255 +74 32 16 +148 65 32 +41 41 57 +82 82 123 +82 82 82 +164 164 164 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/intro/battle_pokeball.png b/graphics/intro/battle_pokeball.png new file mode 100644 index 0000000000000000000000000000000000000000..4af0187f826d47df7f24f0bf611b9633498f6208 GIT binary patch literal 2197 zcmeHI`!|#c7=FKR#@wXFs7!L1vB;%Zw-7PIq)=$qEs4=>i_}C#hUPPd?orCo1yegN z$ue@8jcAswO;VJNm?pKAIJuNAT9;YZuK-gBP!dCv1bKRv&^M+5y=Yf>Eh9+5NHq^j82J1g;HQrB0@AJKZ|5*c58Sk$HXaxFj*g;8`+AnU%{hKjoRol52CcIH$L!7tYi2!=T zh02k$r>z4}{88Z{LSLP=^w+-9{Kpl0?l@l(HrYICDs*MsOdP4l_G+b%MNnwxi-`JyFkegt%*E?;e_`dorDOjB-b4+yn~dCFb2{nuuGoWHNOkqe}-36WeOv zAJZIMMo4PRJ zxvVi2ynqv(<>9A33Y9k5Lp=ssXEaD&m{4QEFTd=u@W@M zn+ZxZ+mEV21%0{k8T3tXE<6|8jgoOa9;f@Mu+I3vyN}(vR}elKA1q5KtTef3vyBbb zY1%NnMtRuE{zKHw3)^XQgoW)fugGa@o?zdi z48h{aIZ3s}?Ym~7p4-4{NP`6hBL_K8&sm2DgX^XgiYMICbZ$)K;uYq#U+0U#uns3v zq``564jp1rcq?YALdSC5>F%4hLR)9G@`?wEXMlv+LQN}TCU1ioH@uonYueyvHN|WVRuM601?HM(4y?(R z8WdE6o#mANtnH41u8R191jBSa%y({yBM6;?Nh~*mAAlK|wVdT#5IVd7l4wD$J6bg| zDtejF8x^=~ttgq85!G2*Z-7!OTNhfge@XYWxf;~+AUfdB&Cx~U5~QD8-@UIrZbDY_ z($U~JTa)o|XH-y~)8!V!8%v9AccAa^&#v`8py?0qqS{N&QZOkb9oS~6B9j*V-_2N24ekfCYkFc(Z>bpF%wn0!tnEwzl z)ni%0IdD+W=gYF+&s+r#sxMK>z6sGrh(}DUdhl2T<|T3kU({qH_jz{B`aV%j-xQLtA=OCXjrht)P^FJha9{amF+e_wEwB5%MFVlqdM71}|qJ@06(YhS`Y_8};) zo>vq~=l*OKy!T5`#F0-|K#_5!>S`^W!?{uIO6n@I-rc#G*I&AV=3L<(9aT;3pLh4@ zC>XOQ`p{!Uh~OAJ-`g|tEoBGa^b?vK`wT$2DIhw%yZL7Orn1gi+=KJEDOUq4yKv4s zepFKttn6|>8C})yDEgsG-0^4yT`3nXaH29!t(aY5Zk$>@Rj41jfOF4kue__D&ed$M z_4liDt6T1)D^+e+<375QvZ;b-s9_)OS>KpsQw7yeYL!hDRQp`+P1$`T=)kk8F*AGo wRn0x(AL(B;xJfUVtB71)n_$ivR!s literal 0 HcmV?d00001 diff --git a/graphics/intro/battle_streaks.pal b/graphics/intro/battle_streaks.pal new file mode 100644 index 000000000..21ae1e434 --- /dev/null +++ b/graphics/intro/battle_streaks.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 255 255 +0 0 0 +255 230 74 +255 230 98 +255 238 123 +255 238 148 +255 246 172 +255 255 197 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +255 255 255 diff --git a/graphics/intro/battle_streaks.png b/graphics/intro/battle_streaks.png new file mode 100644 index 0000000000000000000000000000000000000000..a19fa39c4d6425060eac7f22a7628980f6e31a3b GIT binary patch literal 202 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 literal 0 HcmV?d00001 diff --git a/graphics/intro/leaves_bgleaves.bin b/graphics/intro/leaves_bgleaves.bin new file mode 100644 index 0000000000000000000000000000000000000000..7781e8b0876af7b5c8a29149fc3e0c5dff39c22e GIT binary patch literal 2048 zcmeH_w`wFo6h(VBoUeEny^DTBHkw2>m(68!*<3c4&1Lhk@(W|-7i5tKf%XG-st3`9 zW@}l&!X~Q6>nf`6Io(vZ=l$Q2l;2lWViK2xeAffr*FD|U9o^O~O=(gS8rPUc)x5b) z@5-K--j@SOOGdJilOKAnXL_n9daOr!s0GbyPP3ZPw9jwJw(R&+UQgsyOrOcQT*#$d z$+f)bvp(sgKIpyPX;^OcMz8fsFZIIb59LUXedkMoTJNS=M6uHc`RTNOIXGxH@MC6fhkfE oxQe@0{%?8P^+(=v+d0>|?D=2(r%vGO{675upE|ur<-a(;UzD8olK=n! literal 0 HcmV?d00001 diff --git a/graphics/intro/leaves_bgmountains.bin b/graphics/intro/leaves_bgmountains.bin new file mode 100644 index 0000000000000000000000000000000000000000..1af02a02519788cf7176f1d9980bc3c8d8ee982d GIT binary patch literal 2048 zcmeH`M^3{)7)EJP!~tk)Kmu0461W2BCHWFay+eQ{EJE+1mo0Uhg!IDM@E9DB5JH+I zil5|fJmWXx`8D?8v!=tjda%d%-PmLNF6=RWCmwzDGr%B2tsZaWxBT*l8DSK^!x-aC zkY?p`mNd&wd)0X|eI^ZStUGt(Pcp@{Ya0858D^Oy!)hZbw;Zl9O=wCpn$v=ow4ya_e(`T}hr8V4 zJ`Z@vBOddFr+DIpH_sf-g*zZR;X!ANE_D5N-#stmIWKt0D_-M+FK_U}p8x_0BAB-h z)0;l@r62tnz(58um>~>hSe_q3C}D&XK_pQ`6GJR<#FIcG?;K`0BN)jjMl*)7jAJ|# zn8>6&KZ#^gNF|MQGRP#0Y;yR(M?Ue{VJ0($sZ3)!GxD5#TcKhqt`aJ#QYx)7DywoT zuL`QDN~)~yoy7-e3GGs;X+Lt{SSTTB@x&s;hdcuLf$UMvlLn6|7_xt69U^ zKN1?NiJGdJnyZCcs+C%+joPZ6+N*;)I)1)x|M&?mxeH01WmXaVMLe&14j&F3FkujM0Oy^){%6`()`DcJE7 zEy3a~&SEXbqAkiIEyBVr%t9^1-g~@v4^gPX6s`zGDoW9cQLN$=uLLDJevai++em8NuMC{tO=R*pXCqdw*Hf8-SA{64k9@V~P~zMJbS D0O~c@ literal 0 HcmV?d00001 diff --git a/graphics/intro/leaves_gflogo.pal b/graphics/intro/leaves_gflogo.pal new file mode 100644 index 000000000..aef9152e4 --- /dev/null +++ b/graphics/intro/leaves_gflogo.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +156 246 0 +65 90 156 +49 115 255 +82 82 82 +98 98 98 +115 115 115 +131 131 131 +148 148 148 +164 164 164 +180 180 180 +197 197 197 +213 213 213 +230 230 230 +255 255 255 +255 255 255 diff --git a/graphics/intro/leaves_gflogo.png b/graphics/intro/leaves_gflogo.png new file mode 100644 index 0000000000000000000000000000000000000000..e0f28c8413a9dc7b9488ca83e13819323226ea5d GIT binary patch literal 1113 zcmV-f1g86mP)~Jh|u}?gp2|5T0sL^xr`+i;F&NY)`%)f{~sKKQMsI z$D=_pz4FjHI652uRzQOS-M&65rU0#@vnhH#_&UAejj;^&9ZLpMMpTAY##jdXc|FNG#}01I z+|9}+Gyf+DzXLdTa}E37*757u3{^-Xi1LlCb>w2@YXYB=gft=^QJUv;YimZoPuraS zh<~tVS1kCzK>q#mUHd~=(YX{rOa79J=3A1lPfrq*Yf=QcCWVUhM=~>`sMP=6;`AgJ zDFWxqh2qqxm{ED-7v%h*10f}<%{#nA%}~=6mbMld?Bg0S1zm4rg2EmVkUJ%RzFJLIz+K zq60I(uh;7v=#?QO|78KZ;{H6q9u}d%YUHW}@RtzuJk0@8r(v%5_ng}dRyMbDsH`h> zsolE&>+&f$NICVUHo&H6M6hY=)$luc?T%Olowp?^bH~$_>r{&ebRHVdFLpf_vPN>>DplC@^njA0wV8U7gNL_^6KB*a@Eq;HVRh!sqx4fj?TN)7d%pALakS2TYGa8Sc{& zg1-n(m*@oVpaUU*7{dkwi^-km^|UMN;7k7=yL`7>N%a_HldgH- zGcm~cEQvK(Fm~RnJ8!Xbfs7RhGWM2{NaZ70X53?shECY5rhH2>m?aD?jx=k42_`5L zp5V0(y#|;ja8-gJLSiTlfmQ>u26#yktRSI)43q(YnrygK{vNhKKm_lCrgsjk7lT(P z8N<|SiMB4<3>;#A%8Hwn$VMj0^b|i_d2?rn@fENxx zIsoYuk2W64(nCH0s>Nu&`oF(tM&tePKBlsG_3sPUYF(u(bwF3>YUNK!&hxwq6;PF` z>U}HRXZ5DR)ahEyx<>o#z2&p>UH57ft6Ej3>Y>5-XZfttcGz|s)*&6VJ}d2Xe$a$e zShYh3bbg*yWTwL;Y~03lR7bQh>2!WXMO942ApydR%p}Z|owO4)PGclYI-NfT<1hh} zW~$^YVOg88X`8Z1TVya*(&_vpq)ggmO!k9Ycb2dmZO}Tc(P{~kPUo+}8mz+xhrGBROS+(Q%7dSit$Y4+a{-rd1=k=6v2NfO{Dwd97tX=Y$=3Nd=KsVaJ2&^+@e^SVagf`%m0P%( zo4Ap?sT&%x37fG6Td@s;7{V}0r}IYw!#u;|Mx`HZa4}oaGFsImJm{<|SU_1)k?QUZEA3!+Bi5MO?yVOkxVt zn87Sg;|$Ig{O!ONZ*q=z=*xkfFD8eZxP{vV|0wWPqR6Ps4vq@`jwzQZzjN>Z?U(;X M<+k77@B9Dx2Yc9yDF6Tf literal 0 HcmV?d00001 From 825b8dffe12b6bf447f53237f8cb54fe874bfa69 Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Tue, 26 Sep 2017 21:48:26 -0500 Subject: [PATCH 299/342] Extract baserom calls from data2b_2.s and rename --- data/battle_7.s | 64 +++++++++++++++++++++++++++++++++ data/battle_controller_player.s | 4 +++ data/data2b_2.s | 30 ---------------- data/graphics.s | 13 +++++-- ld_script.txt | 2 +- 5 files changed, 80 insertions(+), 33 deletions(-) create mode 100644 data/battle_7.s delete mode 100644 data/data2b_2.s diff --git a/data/battle_7.s b/data/battle_7.s new file mode 100644 index 000000000..6f2478842 --- /dev/null +++ b/data/battle_7.s @@ -0,0 +1,64 @@ +@ data used in battle_7.s and smokescreen.s, can't split because they're interleaved + + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + + .align 2 +gUnknown_0831C604:: @ 831C604 + .byte 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x02, 0x00 + .byte 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x02, 0x01 + .byte 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01 + .byte 0x00, 0x00, 0x00, 0x00 + + .align 2 +gUnknown_0831C620:: @ 831C620 + obj_tiles gUnknown_08C01644, 0x0180, 0xd6eb + + .align 2 +gUnknown_0831C628:: @ 831C628 + obj_pal gUnknown_08C01724, 0xd6eb + + .align 2 +gUnknown_0831C630:: @ 831C630 + .byte 0x00, 0x00, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00 + + .align 2 +gUnknown_0831C638:: @ 831C638 + .2byte 0x0000, 0x0004, 0x0004, 0x0004, 0x0008, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_0831C648:: @ 831C648 + .2byte 0x0000, 0x0044, 0x0004, 0x0044, 0x0008, 0x0044, 0xffff, 0x0000 + + .align 2 +gUnknown_0831C658:: @ 831C658 + .2byte 0x0000, 0x0084, 0x0004, 0x0084, 0x0008, 0x0084, 0xffff, 0x0000 + + .align 2 +gUnknown_0831C668:: @ 831C668 + .2byte 0x0000, 0x00c4, 0x0004, 0x00c4, 0x0008, 0x00c4, 0xffff, 0x0000 + + .align 2 +gUnknown_0831C678:: @ 831C678 + .4byte gUnknown_0831C638 + .4byte gUnknown_0831C648 + .4byte gUnknown_0831C658 + .4byte gUnknown_0831C668 + + .align 2 +gUnknown_0831C688:: @ 831C688 + spr_template 0xd6eb, 0xd6eb, gUnknown_0831C630, gUnknown_0831C678, NULL, gDummySpriteAffineAnimTable, sub_80753B4 + + .align 2 +gUnknown_0831C6A0:: @ 831C6A0 + obj_tiles gUnknown_08D8FBC0, 0x0080, 0xd759 + + .align 2 +gUnknown_0831C6A8:: @ 831C6A8 + .byte 0x00, 0x40, 0x00, 0x40, 0x00, 0x0c, 0x00, 0x00 + + .align 2 +gUnknown_0831C6B0:: @ 831C6B0 + spr_template 0xd759, 0xd6ff, gUnknown_0831C6A8, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_805EE48 diff --git a/data/battle_controller_player.s b/data/battle_controller_player.s index 37c877dfd..bc2a18edb 100644 --- a/data/battle_controller_player.s +++ b/data/battle_controller_player.s @@ -63,3 +63,7 @@ gPlayerBufferCommands:: @ 831C514 .4byte sub_805D094 .4byte nullsub_22 + .align 2 +gUnknown_0831C5F8:: @ 831C5F8 + .byte 0x00, 0x02, 0x03, 0x01, 0x48, 0x48, 0x20, 0x5a + .byte 0x50, 0x50, 0x50, 0x58 diff --git a/data/data2b_2.s b/data/data2b_2.s deleted file mode 100644 index a1088768e..000000000 --- a/data/data2b_2.s +++ /dev/null @@ -1,30 +0,0 @@ -@ the second big chunk of data - - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - - .align 2 - - -gUnknown_0831C5F8:: @ 831C5F8 - .incbin "baserom.gba", 0x31c5f8, 0xc - -gUnknown_0831C604:: @ 831C604 - .incbin "baserom.gba", 0x31c604, 0x1c - -gUnknown_0831C620:: @ 831C620 - .incbin "baserom.gba", 0x31c620, 0x8 - -gUnknown_0831C628:: @ 831C628 - .incbin "baserom.gba", 0x31c628, 0x60 - -gUnknown_0831C688:: @ 831C688 - .incbin "baserom.gba", 0x31c688, 0x18 - -gUnknown_0831C6A0:: @ 831C6A0 - .incbin "baserom.gba", 0x31c6a0, 0x10 - -gUnknown_0831C6B0:: @ 831C6B0 - .incbin "baserom.gba", 0x31c6b0, 0x18 diff --git a/data/graphics.s b/data/graphics.s index dc29f6bcb..4bff14d97 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -13,7 +13,13 @@ gUnknown_08C00524:: @ 8C00524 .include "data/graphics/pokemon/circled_question_mark_graphics.inc" @ 8C00C10 - .incbin "baserom.gba", 0xc00c10, 0x16f0 + .incbin "baserom.gba", 0xc00c10, 0xa34 + +gUnknown_08C01644:: @ 8C01644 + .incbin "baserom.gba", 0xc01644, 0xE0 + +gUnknown_08C01724:: @ 8C01724 + .incbin "baserom.gba", 0xc01724, 0xBDC gUnknown_08C02300:: @ 8C02300 .incbin "baserom.gba", 0xc02300, 0x70f0 @@ -453,7 +459,10 @@ gUnknown_08D8EC24:: @ 8D8EC24 .incbin "baserom.gba", 0xd8ec24, 0xf78 gUnknown_08D8FB9C:: @ 8D8FB9C - .incbin "baserom.gba", 0xd8fb9c, 0xd8 + .incbin "baserom.gba", 0xd8fb9c, 0x24 + +gUnknown_08D8FBC0:: @ 8D8FBC0 + .incbin "baserom.gba", 0xd8fbc0, 0xb4 .align 2 gMonIcon_Egg:: @ 8D8FC74 diff --git a/ld_script.txt b/ld_script.txt index b2e996ff5..b2470ebc5 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -333,7 +333,7 @@ SECTIONS { src/battle_4.o(.rodata); data/battle_4.o(.rodata); data/battle_controller_player.o(.rodata); - data/data2b_2.o(.rodata); + data/battle_7.o(.rodata); data/battle_controller_opponent.o(.rodata); data/battle_controller_link_opponent.o(.rodata); data/data2c.o(.rodata); From 6cc1ec7bb160a32052930465e58c38ff0e0230df Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Tue, 26 Sep 2017 23:06:25 -0500 Subject: [PATCH 300/342] Extract intro gfx from graphics.s --- data/graphics.s | 68 +++++++++++------- data/intro.s | 32 ++++----- graphics/intro/droplet_sparkle.png | Bin 0 -> 206 bytes graphics/intro/flygon_silhouette.png | Bin 0 -> 234 bytes ...lying_shadow.pal => flying_silhouette.pal} | 0 graphics/intro/kyogre_bubbles.pal | 19 +++++ graphics/intro/kyogre_bubbles.png | Bin 0 -> 402 bytes graphics/intro/manectric.pal | 19 +++++ graphics/intro/manectric.png | Bin 0 -> 1670 bytes graphics/intro/rayquaza_lightning.pal | 19 +++++ graphics/intro/rayquaza_lightning.png | Bin 0 -> 476 bytes graphics/intro/torchic.pal | 19 +++++ graphics/intro/torchic.png | Bin 0 -> 742 bytes graphics/intro/volbeat.pal | 19 +++++ graphics/intro/volbeat.png | Bin 0 -> 500 bytes 15 files changed, 155 insertions(+), 40 deletions(-) create mode 100644 graphics/intro/droplet_sparkle.png create mode 100644 graphics/intro/flygon_silhouette.png rename graphics/intro/{flying_shadow.pal => flying_silhouette.pal} (100%) create mode 100644 graphics/intro/kyogre_bubbles.pal create mode 100644 graphics/intro/kyogre_bubbles.png create mode 100644 graphics/intro/manectric.pal create mode 100644 graphics/intro/manectric.png create mode 100644 graphics/intro/rayquaza_lightning.pal create mode 100644 graphics/intro/rayquaza_lightning.png create mode 100644 graphics/intro/torchic.pal create mode 100644 graphics/intro/torchic.png create mode 100644 graphics/intro/volbeat.pal create mode 100644 graphics/intro/volbeat.png diff --git a/data/graphics.s b/data/graphics.s index 4bff14d97..79ef25aeb 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -356,26 +356,36 @@ gUnknown_08D85E72:: @ 8D85E72 gUnknown_08D85E7C:: @ 8D85E7C .incbin "baserom.gba", 0xd85e7c, 0x54 -gUnknown_08D85ED0:: @ 8D85ED0 - .incbin "baserom.gba", 0xd85ed0, 0x20 + .align 2 +gIntroVolbeatPal:: @ 8D85ED0 + .incbin "graphics/intro/volbeat.gbapal" -gUnknown_08D85EF0:: @ 8D85EF0 - .incbin "baserom.gba", 0xd85ef0, 0x20 + .align 2 +gIntroTorchicPal:: @ 8D85EF0 + .incbin "graphics/intro/torchic.gbapal" -gUnknown_08D85F10:: @ 8D85ED0 - .incbin "baserom.gba", 0xd85f10, 0x20 + .align 2 +gIntroManectricPal:: @ 8D85ED0 + .incbin "graphics/intro/manectric.gbapal" + .align 2 gUnknown_08D85F30:: @ 8D85ED0 .incbin "baserom.gba", 0xd85f30, 0x20 -gUnknown_08D85F50:: @ 8D85F50 - .incbin "baserom.gba", 0xd85f50, 0x1e0 + .align 2 +gIntroVolbeatGfx:: @ 8D85F50 + .incbin "graphics/intro/volbeat.4bpp.lz" -gUnknown_08D86130:: @ 8D86130 - .incbin "baserom.gba", 0xd86130, 0x420 + .align 2 +gIntroTorchicGfx:: @ 8D86130 + .incbin "graphics/intro/torchic.4bpp.lz" -gUnknown_08D86550:: @ 8D86550 - .incbin "baserom.gba", 0xd86550, 0x1f44 + .align 2 +gIntroManectricGfx:: @ 8D86550 + .incbin "graphics/intro/manectric.4bpp.lz" + + .align 2 + .incbin "baserom.gba", 0xd8702c, 0x1468 gUnknown_08D88494:: @ 8D88494 .incbin "baserom.gba", 0xd88494, 0x8ac @@ -410,12 +420,15 @@ gUnknown_08D8B440:: @ 8D8B440 gUnknown_08D8B6E8:: @ 8D8B6E8 .incbin "baserom.gba", 0xd8b6e8, 0x124 -gUnknown_08D8B80C:: @ 8D8B80C - .incbin "baserom.gba", 0xd8b80c, 0x248 + .align 2 +gIntroRayquazaLightningGfx:: @ 8D8B80C + .incbin "graphics/intro/rayquaza_lightning.4bpp.lz" -gUnknown_08D8BA54:: @ 8D8BA54 - .incbin "baserom.gba", 0xd8ba54, 0x20 + .align 2 +gIntroRayquazaLightningPal:: @ 8D8BA54 + .incbin "graphics/intro/rayquaza_lightning.gbapal" + .align 2 gUnknown_08D8BA74:: @ 8D8BA74 .incbin "baserom.gba", 0xd8ba74, 0x6f8 @@ -428,17 +441,24 @@ gUnknown_08D8C838:: @ 8D8C838 gUnknown_08D8CCC8:: @ 8D8CCC8 .incbin "baserom.gba", 0xd8ccc8, 0x27c -gUnknown_08D8CF44:: @ 8D8CF44 - .incbin "baserom.gba", 0xd8cf44, 0x1cc + .align 2 +gIntroKyogreBubblesGfx:: @ 8D8CF44 + .incbin "graphics/intro/kyogre_bubbles.4bpp.lz" -gUnknown_08D8D110:: @ 8D8D110 - .incbin "baserom.gba", 0xd8d110, 0x20 + .align 2 +gIntroKyogreBubblesPal:: @ 8D8D110 + .incbin "graphics/intro/kyogre_bubbles.gbapal" -gUnknown_08D8D130:: @ 8D8D130 - .incbin "baserom.gba", 0xd8d130, 0xd8 + .align 2 +gIntroFlygonSilhouette:: @ 8D8D130 + .incbin "graphics/intro/flygon_silhouette.4bpp.lz" -gUnknown_08D8D208:: @ 8D8D208 - .incbin "baserom.gba", 0xd8d208, 0x208 + .align 2 +gIntroLeavesDropletSparkleGfx:: @ 8D8D208 + .incbin "graphics/intro/droplet_sparkle.4bpp.lz" + + .align 2 + .incbin "baserom.gba", 0xd8d2a4, 0x16c gUnknown_08D8D410:: @ 8D8D410 .incbin "baserom.gba", 0xd8d410, 0x17c diff --git a/data/intro.s b/data/intro.s index acd1164b6..ea6223c7e 100644 --- a/data/intro.s +++ b/data/intro.s @@ -72,8 +72,8 @@ gIntroBattleCircleGfx:: @ 85E45B0 .incbin "graphics/intro/battle_circle.4bpp.lz" .align 2 -gIntroFlyingPkmnShadowPal:: @ 85E492C - .incbin "graphics/intro/flying_shadow.gbapal" +gIntroFlyingPkmnSilhouettePal:: @ 85E492C + .incbin "graphics/intro/flying_silhouette.gbapal" .align 2 .incbin "graphics/intro/latis.4bpp.lz" @@ -90,12 +90,12 @@ gIntroFlyingPkmnShadowPal:: @ 85E492C .align 2 gUnknown_085E4A74:: @ 85E4A74 - obj_tiles gUnknown_08D8D208, 0x0400, 0x05e1 + obj_tiles gIntroLeavesDropletSparkleGfx, 0x0400, 0x05e1 null_obj_tiles .align 2 gUnknown_085E4A84:: @ 85E4A84 - obj_pal gUnknown_08D8BA54, 0x05e1 + obj_pal gIntroRayquazaLightningPal, 0x05e1 null_obj_pal .align 2 @@ -122,16 +122,16 @@ gUnknown_085E4AD0:: @ 85E4AD0 .align 2 gUnknown_085E4AE8:: @ 85E4AE8 - obj_tiles gUnknown_08D85F50, 0x0400, 0x05dc - obj_tiles gUnknown_08D86130, 0x0c00, 0x05dd - obj_tiles gUnknown_08D86550, 0x2000, 0x05de + obj_tiles gIntroVolbeatGfx, 0x0400, 0x05dc + obj_tiles gIntroTorchicGfx, 0x0c00, 0x05dd + obj_tiles gIntroManectricGfx, 0x2000, 0x05de null_obj_tiles .align 2 gUnknown_085E4B08:: @ 85E4B08 - obj_pal gUnknown_08D85ED0, 0x05dc - obj_pal gUnknown_08D85EF0, 0x05dd - obj_pal gUnknown_08D85F10, 0x05de + obj_pal gIntroVolbeatPal, 0x05dc + obj_pal gIntroTorchicPal, 0x05dd + obj_pal gIntroManectricPal, 0x05de null_obj_pal .align 2 @@ -194,12 +194,12 @@ gUnknown_085E4BDC:: @ 85E4BDC .align 2 gUnknown_085E4BF4:: @ 85E4BF4 - obj_tiles gUnknown_08D8B80C, 0x0c00, 0x05df + obj_tiles gIntroRayquazaLightningGfx, 0x0c00, 0x05df null_obj_tiles .align 2 gUnknown_085E4C04:: @ 85E4C04 - obj_pal gUnknown_08D8BA54, 0x05df + obj_pal gIntroRayquazaLightningPal, 0x05df null_obj_pal .align 2 @@ -236,12 +236,12 @@ gUnknown_085E4C64:: @ 85E4C64 .align 2 gUnknown_085E4C88:: @ 85E4C88 - obj_tiles gUnknown_08D8CF44, 0x0600, 0x05e0 + obj_tiles gIntroKyogreBubblesGfx, 0x0600, 0x05e0 null_obj_tiles .align 2 gUnknown_085E4C98:: @ 85E4C98 - obj_pal gUnknown_08D8D110, 0x05e0 + obj_pal gIntroKyogreBubblesPal, 0x05e0 null_obj_pal .align 2 @@ -492,14 +492,14 @@ gUnknown_085E4FDC:: @ 85E4FDC null_obj_tiles gUnknown_085E4FEC:: @ 85E4FEC - obj_tiles gUnknown_08D8D130, 0x0400, 0x07d2 + obj_tiles gIntroFlygonSilhouette, 0x0400, 0x07d2 null_obj_tiles .align 2 gUnknown_085E4FFC:: @ 85E4FFC obj_pal gIntroLeavesDropsPal, 0x07d0 obj_pal gIntroLeavesGFLogoPal, 0x07d1 - obj_pal gIntroFlyingPkmnShadowPal, 0x07d2 + obj_pal gIntroFlyingPkmnSilhouettePal, 0x07d2 null_obj_pal .align 2 diff --git a/graphics/intro/droplet_sparkle.png b/graphics/intro/droplet_sparkle.png new file mode 100644 index 0000000000000000000000000000000000000000..f8db885ec00007231c1274162e89ca2f0e0e9788 GIT binary patch literal 206 zcmeAS@N?(olHy`uVBq!ia0vp^0zllr!VDxo?EWGMqznRlLR`J}uKE9e%KxhjXZITZ z|NlS8%d0pmXi9g|mMz6suQmf!p@Hk`^9q4Nk)AG&Ar`&K2@51PSS&EkV2nuMVV7az zGhp=jeqc$#Y)97z4d)uHnp=+^J$jJwYGT1}LrE4!v8f!2>=Nvr9R)uO4#>Q9I8gD4 oky~ls11F2ShntpUiST$cFs!}F!5MF|;Vj5rPgg&ebxsLQ0B6`mo&W#< literal 0 HcmV?d00001 diff --git a/graphics/intro/flygon_silhouette.png b/graphics/intro/flygon_silhouette.png new file mode 100644 index 0000000000000000000000000000000000000000..080ab1a65aa563a46f119fc10d88202cb359dff2 GIT binary patch literal 234 zcmeAS@N?(olHy`uVBq!ia0vp^4nVBH!VDw>HYaZfQU(D&A+A8$%L^n;BgnPbV$pkcaw1=Y0!QmZwu1ks*>Y7>7Tvsd$o|*8_65NW|5+~;GekDsYRa>Uo|83W zMow@RL))5c&#*(BvI{-uzE@=wx-WQU<@;NY?z9(dd!(dpcE;?$qCZjm@(h<$g03#v qqb{3V&w4?L^}+ooY8$@l-#f-AZ^UnwdNX({$gQ5PelF{r5}E*srAGz; literal 0 HcmV?d00001 diff --git a/graphics/intro/flying_shadow.pal b/graphics/intro/flying_silhouette.pal similarity index 100% rename from graphics/intro/flying_shadow.pal rename to graphics/intro/flying_silhouette.pal diff --git a/graphics/intro/kyogre_bubbles.pal b/graphics/intro/kyogre_bubbles.pal new file mode 100644 index 000000000..85c483666 --- /dev/null +++ b/graphics/intro/kyogre_bubbles.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +106 148 98 +0 41 82 +255 255 255 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +139 172 255 +106 148 222 +82 123 189 +49 98 156 +24 74 123 +0 49 98 +180 0 0 diff --git a/graphics/intro/kyogre_bubbles.png b/graphics/intro/kyogre_bubbles.png new file mode 100644 index 0000000000000000000000000000000000000000..d1f18701c414bbf69693297d6c7376c342633ed8 GIT binary patch literal 402 zcmeAS@N?(olHy`uVBq!ia0vp^0ziC#g&9cxfBdf&NErn9gt%r+Nn+3p`v3nwPyh{d zulb)fgw*)T9L%6hsuhFJ8zo#dUzV#wiAefsUqX?Mgk zZ;EHkbY^wFIWym+Gi{>B$E0VbHyjvmfBW69u~0@_AT02L?$qsS2V#Go4L`a|h)3Z~ z;%95!xfk}Hcc=*eYhUFex=vKkS(eSw#d^`Jv@*T|*=vp)lo?w#zhiv6Ms=%Hn+s!B zulv^-ZzFh>*4)cget6|$-@X%FhblYy3a;8k=Wsq?5%qk;8m?u}Rr-x}v*z6Cy+;=t z@p(Pd;(0u8r^@_UPfqUJIOXH&+uF}B-pF?mR?K6%|d)1PK9zJ5O4 p@n?Bhty&fD$`@;&{{PeXnK7*S*z$;#D;9tP)YH|^Wt~$(69Cuks;dA1 literal 0 HcmV?d00001 diff --git a/graphics/intro/manectric.pal b/graphics/intro/manectric.pal new file mode 100644 index 000000000..c6bf97aa3 --- /dev/null +++ b/graphics/intro/manectric.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +74 189 172 +82 74 74 +139 139 123 +197 189 222 +255 255 255 +230 49 0 +246 148 0 +0 0 0 +255 255 180 +246 246 90 +205 213 49 +148 123 8 +131 164 255 +106 106 255 +41 74 213 +0 0 0 diff --git a/graphics/intro/manectric.png b/graphics/intro/manectric.png new file mode 100644 index 0000000000000000000000000000000000000000..bcb054d7b381fb49a2bb25024a35474f571cef13 GIT binary patch literal 1670 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 Date: Tue, 26 Sep 2017 23:21:27 -0500 Subject: [PATCH 301/342] Extract baserom includes from battle_7 and field_region_map --- data/battle_7.s | 32 +++++++++++++++++++++++--------- data/field_region_map.s | 10 +++++++--- data/graphics.s | 30 +++++++++++++++++++++++++++--- 3 files changed, 57 insertions(+), 15 deletions(-) diff --git a/data/battle_7.s b/data/battle_7.s index a64a39dc2..4b0eea65a 100644 --- a/data/battle_7.s +++ b/data/battle_7.s @@ -5,28 +5,42 @@ .align 2, 0 gUnknown_0832C0D0:: @ 832C0D0 - .incbin "baserom.gba", 0x32c0d0, 0x8 + obj_tiles gUnknown_08C1F1C8, 0x1000, 0xd6ff + .align 2 gUnknown_0832C0D8:: @ 832C0D8 - .incbin "baserom.gba", 0x32c0d8, 0x8 + obj_tiles gUnknown_08C1F46C, 0x1000, 0xd701 + .align 2 gUnknown_0832C0E0:: @ 832C0E0 - .incbin "baserom.gba", 0x32c0e0, 0x8 + obj_tiles gUnknown_08C1F5E8, 0x0800, 0xd6ff + .align 2 gUnknown_0832C0E8:: @ 832C0E8 - .incbin "baserom.gba", 0x32c0e8, 0x8 + obj_tiles gUnknown_08C1F5E8, 0x0800, 0xd700 + .align 2 gUnknown_0832C0F0:: @ 832C0F0 - .incbin "baserom.gba", 0x32c0f0, 0x8 + obj_tiles gUnknown_08C1F76C, 0x0800, 0xd701 + .align 2 gUnknown_0832C0F8:: @ 832C0F8 - .incbin "baserom.gba", 0x32c0f8, 0x8 + obj_tiles gUnknown_08C1F76C, 0x0800, 0xd702 + .align 2 gUnknown_0832C100:: @ 832C100 - .incbin "baserom.gba", 0x32c100, 0x8 + obj_tiles gUnknown_08C1F8E8, 0x1000, 0xd70b + .align 2 gUnknown_0832C108:: @ 832C108 - .incbin "baserom.gba", 0x32c108, 0x20 + obj_tiles gUnknown_08C0237C, 0x0100, 0xd704 + obj_tiles gUnknown_08C0237C, 0x0120, 0xd705 + obj_tiles gUnknown_08C0237C, 0x0100, 0xd706 + obj_tiles gUnknown_08C0237C, 0x0120, 0xd707 + .align 2 gUnknown_0832C128:: @ 832C128 - .incbin "baserom.gba", 0x32c128, 0x18 + obj_pal gUnknown_08C11B9C, 0xd6ff + obj_pal gUnknown_08C11BBC, 0xd704 + + .byte 0x00, 0x40, 0x00, 0xc0, 0x00, 0x04, 0x00, 0x00 diff --git a/data/field_region_map.s b/data/field_region_map.s index 2ddc65739..f179ba8ce 100644 --- a/data/field_region_map.s +++ b/data/field_region_map.s @@ -3,8 +3,12 @@ .section .rodata -gUnknown_085E5068:: @ 85E5068 - .incbin "baserom.gba", 0x5e5068, 0x8 + .align 2 +gUnknown_085E5068:: @ 85E5068 struct BgTemplate + .4byte 0x000001f0, 0x00002dca + .align 2 gUnknown_085E5070:: @ 85E5070 - .incbin "baserom.gba", 0x5e5070, 0x18 + window_template 0x00, 0x11, 0x11, 0x0c, 0x02, 0x0f, 0x0001 + window_template 0x00, 0x16, 0x01, 0x07, 0x02, 0x0f, 0x0019 + window_template 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0000 diff --git a/data/graphics.s b/data/graphics.s index 79ef25aeb..a06c05217 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -22,10 +22,19 @@ gUnknown_08C01724:: @ 8C01724 .incbin "baserom.gba", 0xc01724, 0xBDC gUnknown_08C02300:: @ 8C02300 - .incbin "baserom.gba", 0xc02300, 0x70f0 + .incbin "baserom.gba", 0xc02300, 0x7c + +gUnknown_08C0237C:: @ 8C0237C + .incbin "baserom.gba", 0xc0237c, 0x7074 gUnknown_08C093F0:: @ 8C093F0 - .incbin "baserom.gba", 0xc093f0, 0x87ec + .incbin "baserom.gba", 0xc093f0, 0x87ac + +gUnknown_08C11B9C:: @ 8C11B9C + .incbin "baserom.gba", 0xc11b9c, 0x20 + +gUnknown_08C11BBC:: @ 8C11BBC + .incbin "baserom.gba", 0xc11bbc, 0x20 gUnknown_08C11BDC:: @ 8C11BDC .incbin "baserom.gba", 0xc11bdc, 0x52b4 @@ -79,7 +88,22 @@ gUnknown_08C1D1E8:: @ 8C1D1E8 .incbin "baserom.gba", 0xc1d1e8, 0x28 gUnknown_08C1D210:: @ 8C1D210 - .incbin "baserom.gba", 0xc1d210, 0x3458 + .incbin "baserom.gba", 0xc1d210, 0x1fb8 + +gUnknown_08C1F1C8:: @ 8C1F1C8 + .incbin "baserom.gba", 0xc1f1c8, 0x2a4 + +gUnknown_08C1F46C:: @ 8C1F46C + .incbin "baserom.gba", 0xc1f46c, 0x17c + +gUnknown_08C1F5E8:: @ 8C1F5E8 + .incbin "baserom.gba", 0xc1f5e8, 0x184 + +gUnknown_08C1F76C:: @ 8C1F76C + .incbin "baserom.gba", 0xc1f76c, 0x17c + +gUnknown_08C1F8E8:: @ 8C1F8E8 + .incbin "baserom.gba", 0xc1f8e8, 0xd80 gUnknown_08C20668:: @ 8C20668 .incbin "baserom.gba", 0xc20668, 0x1c From ee777d7b175369b824ac27e1b5343c74defc7919 Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Wed, 27 Sep 2017 00:51:09 -0500 Subject: [PATCH 302/342] Extract baseroms from title_screen --- asm/title_screen.s | 10 +- data/field_screen.s | 3 + data/graphics.s | 20 ++- data/title_screen.s | 146 +++++++++++++++++++--- graphics/title_screen/emerald_version.pal | 19 +++ graphics/title_screen/emerald_version.png | Bin 0 -> 1138 bytes graphics/title_screen/logo_shine.png | Bin 0 -> 172 bytes graphics/title_screen/press_start.pal | 19 +++ graphics/title_screen/press_start.png | Bin 0 -> 473 bytes graphics/title_screen/rayquaza.bin | Bin 0 -> 2048 bytes 10 files changed, 191 insertions(+), 26 deletions(-) create mode 100644 graphics/title_screen/emerald_version.pal create mode 100644 graphics/title_screen/emerald_version.png create mode 100644 graphics/title_screen/logo_shine.png create mode 100644 graphics/title_screen/press_start.pal create mode 100644 graphics/title_screen/press_start.png create mode 100644 graphics/title_screen/rayquaza.bin diff --git a/asm/title_screen.s b/asm/title_screen.s index 15037e80d..b2c0a4995 100644 --- a/asm/title_screen.s +++ b/asm/title_screen.s @@ -590,7 +590,7 @@ _080AA7E0: b _080AAB1E .pool _080AA8C4: - ldr r0, =gTitleScreenPokemonLogoTiles + ldr r0, =gTitleScreenPokemonLogoGfx movs r1, 0xC0 lsls r1, 19 bl LZ77UnCompVram @@ -602,13 +602,13 @@ _080AA8C4: lsls r2, 1 movs r1, 0 bl LoadPalette - ldr r0, =gTitleScreenRayquazaTiles + ldr r0, =gTitleScreenRayquazaGfx ldr r1, =0x06008000 bl LZ77UnCompVram - ldr r0, =gUnknown_0853F83C + ldr r0, =gTitleScreenRayquazaTilemap ldr r1, =0x0600d000 bl LZ77UnCompVram - ldr r0, =gTitleScreenCloudsTiles + ldr r0, =gTitleScreenCloudsGfx ldr r1, =0x0600c000 bl LZ77UnCompVram ldr r0, =gUnknown_08DDE458 @@ -627,7 +627,7 @@ _080AA8C4: bl LoadCompressedObjectPic ldr r0, =gUnknown_0854013C bl LoadCompressedObjectPic - ldr r0, =gUnknown_08DDE438 + ldr r0, =gTitleScreenEmeraldVersionPal movs r1, 0x80 lsls r1, 1 movs r2, 0x20 diff --git a/data/field_screen.s b/data/field_screen.s index 63d4f942c..fd1b1f466 100644 --- a/data/field_screen.s +++ b/data/field_screen.s @@ -4,6 +4,9 @@ .section .rodata .align 2, 0 +gUnknown_0854014C:: @ 854014C + .incbin "baserom.gba", 0x54014c, 0xc000 + gUnknown_0854C14C:: @ 854C14C .incbin "baserom.gba", 0x54c14c, 0x4 diff --git a/data/graphics.s b/data/graphics.s index a06c05217..9c3034c91 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -1199,19 +1199,29 @@ gTitleScreenBgPalettes:: @ 8DDE258 .incbin "graphics/title_screen/rayquaza_and_clouds.gbapal" .align 2 -gUnknown_08DDE438:: @ 8DDE438 - .incbin "baserom.gba", 0xdde438, 0x20 +gTitleScreenEmeraldVersionPal:: @ 8DDE438 + .incbin "graphics/title_screen/emerald_version.gbapal" + .align 2 gUnknown_08DDE458:: @ 8DDE458 .incbin "baserom.gba", 0xdde458, 0x238 -gTitleScreenPokemonLogoTiles:: @ 8DDE690 +gTitleScreenPokemonLogoGfx:: @ 8DDE690 .incbin "graphics/title_screen/pokemon_logo.8bpp.lz" .align 2 -@ 8DDFD94 - .incbin "baserom.gba", 0xddfd94, 0x8b0 +gTitleScreenEmeraldVersionGfx:: @ 8DDFD94 + .incbin "graphics/title_screen/emerald_version.8bpp.lz" + .align 2 +gTitleScreenPressStartPal:: @ 8DE03C8 + .incbin "graphics/title_screen/press_start.gbapal" + + .align 2 +gTitleScreenPressStartGfx:: @ 8DE03E8 + .incbin "graphics/title_screen/press_start.4bpp.lz" + + .align 2 gUnknown_08DE0644:: @ 8DE0644 .incbin "baserom.gba", 0xde0644, 0x184 diff --git a/data/title_screen.s b/data/title_screen.s index 281afe51f..525790271 100644 --- a/data/title_screen.s +++ b/data/title_screen.s @@ -4,43 +4,157 @@ .section .rodata .align 2, 0 -gTitleScreenRayquazaTiles:: @ 853F058 +gTitleScreenRayquazaGfx:: @ 853F058 .incbin "graphics/title_screen/rayquaza.4bpp.lz" .align 2 -gUnknown_0853F83C:: @ 853F83C - .incbin "baserom.gba", 0x53f83c, 0x450 +gTitleScreenRayquazaTilemap:: @ 853F83C + .incbin "graphics/title_screen/rayquaza.bin.lz" -gTitleScreenCloudsTiles:: @ 853FC8C + .align 2 +gTitleScreenLogoShineGfx:: @ 853FB3C + .incbin "graphics/title_screen/logo_shine.4bpp.lz" + + .align 2 +gTitleScreenCloudsGfx:: @ 853FC8C .incbin "graphics/title_screen/clouds.4bpp.lz" .align 2 gUnknown_0853FF70:: @ 853FF70 - .incbin "baserom.gba", 0x53ff70, 0xa8 + .2byte 0x0010, 0x0110, 0x0210, 0x0310, 0x0410, 0x0510, 0x0610, 0x0710 + .2byte 0x0810, 0x0910, 0x0a10, 0x0b10, 0x0c10, 0x0d10, 0x0e10, 0x0f10 + .2byte 0x100f, 0x100e, 0x100d, 0x100c, 0x100b, 0x100a, 0x1009, 0x1008 + .2byte 0x1007, 0x1006, 0x1005, 0x1004, 0x1003, 0x1002, 0x1001, 0x1000 + .2byte 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000 + .2byte 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000 + .2byte 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000 + .2byte 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000 + .align 2 +gUnknown_0853FFF0:: @ 853FFF0 + .byte 0xa0, 0x60, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00 + + .align 2 +gUnknown_0853FFF8:: @ 853FFF8 + .byte 0xa0, 0x60, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00 + + .align 2 +gUnknown_08540000:: @ 8540000 + .2byte 0x0000, 0x001e, 0xffff, 0x0000 + + .align 2 +gUnknown_08540008:: @ 8540008 + .2byte 0x0040, 0x001e, 0xffff, 0x0000 + + .align 2 +gUnknown_08540010:: @ 8540010 + .4byte gUnknown_08540000 + + .align 2 +gUnknown_08540014:: @ 8540014 + .4byte gUnknown_08540008 + + .align 2 gUnknown_08540018:: @ 8540018 - .incbin "baserom.gba", 0x540018, 0x18 + spr_template 0x03e8, 0x03e8, gUnknown_0853FFF0, gUnknown_08540010, NULL, gDummySpriteAffineAnimTable, sub_80AA40C + .align 2 gUnknown_08540030:: @ 8540030 - .incbin "baserom.gba", 0x540030, 0x18 + spr_template 0x03e8, 0x03e8, gUnknown_0853FFF8, gUnknown_08540014, NULL, gDummySpriteAffineAnimTable, sub_80AA474 + .align 2 gUnknown_08540048:: @ 8540048 - .incbin "baserom.gba", 0x540048, 0x90 + obj_tiles gTitleScreenEmeraldVersionGfx, 0x1000, 0x03e8 + null_obj_tiles + .align 2 +gUnknown_08540058:: @ 8540058 + .byte 0xa0, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00 + + .align 2 +gUnknown_08540060:: @ 8540060 + .2byte 0x0001, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08540068:: @ 8540068 + .2byte 0x0005, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08540070:: @ 8540070 + .2byte 0x0009, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08540078:: @ 8540078 + .2byte 0x000d, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08540080:: @ 8540080 + .2byte 0x0011, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08540088:: @ 8540088 + .2byte 0x0015, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08540090:: @ 8540090 + .2byte 0x0019, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08540098:: @ 8540098 + .2byte 0x001d, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_085400A0:: @ 85400A0 + .2byte 0x0021, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_085400A8:: @ 85400A8 + .2byte 0x0025, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_085400B0:: @ 85400B0 + .4byte gUnknown_08540060 + .4byte gUnknown_08540068 + .4byte gUnknown_08540070 + .4byte gUnknown_08540078 + .4byte gUnknown_08540080 + .4byte gUnknown_08540088 + .4byte gUnknown_08540090 + .4byte gUnknown_08540098 + .4byte gUnknown_085400A0 + .4byte gUnknown_085400A8 + + .align 2 gUnknown_085400D8:: @ 85400D8 - .incbin "baserom.gba", 0x5400d8, 0x18 + spr_template 0x03e9, 0x03e9, gUnknown_08540058, gUnknown_085400B0, NULL, gDummySpriteAffineAnimTable, sub_80AA4B4 + .align 2 gUnknown_085400F0:: @ 85400F0 - .incbin "baserom.gba", 0x5400f0, 0x10 + obj_tiles gTitleScreenPressStartGfx, 0x0520, 0x03e9 + null_obj_tiles + .align 2 gUnknown_08540100:: @ 8540100 - .incbin "baserom.gba", 0x540100, 0x24 + obj_pal gTitleScreenPressStartPal, 0x03e9 + null_obj_pal + .align 2 +gUnknown_08540110:: @ 8540110 + .byte 0xa0, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00 + + .align 2 +gUnknown_08540118:: @ 8540118 + .2byte 0x0000, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08540120:: @ 8540120 + .4byte gUnknown_08540118 + + .align 2 gUnknown_08540124:: @ 8540124 - .incbin "baserom.gba", 0x540124, 0x18 + spr_template 0x03ea, 0x03e9, gUnknown_08540110, gUnknown_08540120, NULL, gDummySpriteAffineAnimTable, title_screen_logo_shine_obj_callback_type1 + .align 2 gUnknown_0854013C:: @ 854013C - .incbin "baserom.gba", 0x54013c, 0x10 - -gUnknown_0854014C:: @ 854014C - .incbin "baserom.gba", 0x54014c, 0xc000 + obj_tiles gTitleScreenLogoShineGfx, 0x0800, 0x03ea + null_obj_tiles diff --git a/graphics/title_screen/emerald_version.pal b/graphics/title_screen/emerald_version.pal new file mode 100644 index 000000000..c5ed9a582 --- /dev/null +++ b/graphics/title_screen/emerald_version.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 74 238 +156 156 156 +90 90 90 +222 222 222 +24 16 24 +74 74 74 +238 238 238 +41 41 41 +172 172 172 +106 106 106 +189 189 189 +139 139 139 +205 205 205 +123 123 123 +65 57 57 +255 255 255 diff --git a/graphics/title_screen/emerald_version.png b/graphics/title_screen/emerald_version.png new file mode 100644 index 0000000000000000000000000000000000000000..2e8b32da988fe9471126f94bd0fed4bf8a0dedc0 GIT binary patch literal 1138 zcmV-&1daQNP);80K5y-OW5lL*yu1a@)$;5X6e)pqdx?rML zX@=QlQ&|9`wPF^41HQBcFj?4lWPoDk*-fH1Dx{H%iaPZtm1c1)N%kDUsay_l*=c4E zNRaiuWt3lnX)mx`JhCc2F{jgfuxKdkdkoM3@Os@SGok4N@Xnz^7Z!)+70^*bFb~x0 zNIMN+kOWzhs`{V+-TN5c0GuS7R#a~>cIXrh*6P#@m`Qw408jb#7R06=SP(645)}hb zJx$Dc#gjL9wN@O829Q^!k&m*u2+Y|vJXN3G0E*@q=2Zn2!%jYC5Y>Wd2DcA@1Sz=? z6EC;`OkeO$1Jcx!NpNWt47FpW5YCw?(7b|N=CVMl7Fy!KB#nhn!_mH(!`-q<&SB-I zna+^kBuVX@F?vokeXx{*Id{Z(9fen=xGXwVI%jGGt_*kODOEP@)TFZ4>nt@3V!l+; z>1Z&fZUzC+Q_4XeSenEa7XU){*+j98Bn%8zYK~C>+%_8hfUUbBbVGAIASGj8hYXnV0kj@7P z%1K?#C2zZilivu70;(N;mkw1!G$~!m8i~wWO3cN6Dm#FFzAd9v?nJb%8A8G`b^ww! z0JR`xH3*7BW4mZ++5$*}WTIBpd0B%Z$3vo1<2C@)7^_%}WQI*HvZCaJXiW>f-wxJB zsN80Ip>dKWu5nS9mevj+e>Ps~+O@m4GCE~i-2zme2@{no@$EZOj zc|F9>WB5_ZzV<1D!M<>B7xg0&x4$^ZZW literal 0 HcmV?d00001 diff --git a/graphics/title_screen/logo_shine.png b/graphics/title_screen/logo_shine.png new file mode 100644 index 0000000000000000000000000000000000000000..4e17d2877b12ea319c8b6900576bb1513b2685eb GIT binary patch literal 172 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0J3?w7mbKU|eg8-ip*Wx)zK<1P=OSbIYd+*-6 z|3JXNfCn)iefJQk!Q9iuF~p-YIpF}yIzAqrGwT*EJQwk#Bj|t-lZua%vop_$P=i-3 rf$BY0iB~um`$?1@S|QA~QJ7(|XI`V`<*4gGBN#kg{an^LB{Ts5KR`N~ literal 0 HcmV?d00001 diff --git a/graphics/title_screen/press_start.pal b/graphics/title_screen/press_start.pal new file mode 100644 index 000000000..561ab8f8f --- /dev/null +++ b/graphics/title_screen/press_start.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +115 156 98 +0 0 0 +148 156 164 +180 189 189 +222 222 238 +255 255 255 +255 0 0 +255 0 0 +255 0 0 +255 0 0 +255 0 0 +255 0 0 +255 0 0 +255 0 0 +255 0 0 +255 0 0 diff --git a/graphics/title_screen/press_start.png b/graphics/title_screen/press_start.png new file mode 100644 index 0000000000000000000000000000000000000000..63a5c23d045f1af021481b0c5d80d7a402a1c436 GIT binary patch literal 473 zcmeAS@N?(olHy`uVBq!ia0vp^4L~fx!VDx2sJ^%cqznRlLR^dIBmtRI<}BH=ckjJ> z@BRY;0|Oq!c=X*v1_s6yPZ!4!i{7%=AK^c* zk0)n#?)tnfnNqtO!){#nX0F~S+^F1IvS6}J?Zbzs{pXl;Tx_WL#LsJ2U0<+q_DcVa z&lwG;GC#bqKthkrf!VaxJyGEM3+tyB5+b7>^B>+O;SrvFzl@3b2E#=Izf*=MbBZ2kb2jyKt{G`TT0<66PN+QzZf?sJ9l!Nc_?M)~@2ndoi^z z=4f)6Ua8vhKi;ja>NDm>KTupD{@~g4_zB<6iT<_>7dajEsJ{C^!t0pyHGR@=^QL}! yB$)9!=4f8(7L6{J7oW4)($_8c5O%8m82=jG3_I1e_uc{{h{4m<&t;ucLK6Vch|=r; literal 0 HcmV?d00001 diff --git a/graphics/title_screen/rayquaza.bin b/graphics/title_screen/rayquaza.bin new file mode 100644 index 0000000000000000000000000000000000000000..b112237a3d115893e432a3854c811becffcc4274 GIT binary patch literal 2048 zcmeH{M`%=06o#K&P(e3VgebO+5KAnG3ifUgdj(OWVg)tLwi437m763+UAQobf{K!+ zU?R3evDfIQ9xLeByN>s~GMUT-#OFc~@5k`&yXXJTy>k~Yk38R4X6(d2>L0*AR=gFz zAOEO-9RH|)jA)wLYt3j*i#n<`dG#+)o7S|UE$wJe2jb`$QLUYg^t;fNZgi)IF&%pT z(m#(!ANm@rAN?7?KrsKZwIY4sqD@ zIKol0QbaK&lxj~Yl@ckIBJq+z-tx}2!u=DJQ^84NoZ__Gvyv*Rq%zEOdR*jElpo|W zSGdYGu5*K%rhc0{R8t*g!+jpq;Xg!p#ABZDlxIA*@8bn8-Lur3{uQrz6Y}*x{O1pD Xz_Ma}qMv^qf7{nH#QX-D|7XTectY=K literal 0 HcmV?d00001 From 22211c08f1f62c0003db7b1c96d899ccd149d049 Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Wed, 27 Sep 2017 01:36:29 -0500 Subject: [PATCH 303/342] Extract baseroms from player_pc --- data/player_pc.s | 57 +++++++++++++++++++++++------- data/strings.s | 92 ++++++------------------------------------------ 2 files changed, 54 insertions(+), 95 deletions(-) diff --git a/data/player_pc.s b/data/player_pc.s index 4fd2913dd..c3422db30 100644 --- a/data/player_pc.s +++ b/data/player_pc.s @@ -3,41 +3,72 @@ .section .rodata + .align 2 gUnknown_085DFEA4:: @ 85DFEA4 - .incbin "baserom.gba", 0x5dfea4, 0x10 + .4byte gText_TakeOutItemsFromPC + .4byte gText_StoreItemsInPC + .4byte gText_ThrowAwayItemsInPC + .4byte gText_GoBackPrevMenu + .align 2 gUnknown_085DFEB4:: @ 85DFEB4 - .incbin "baserom.gba", 0x5dfeb4, 0x20 + .4byte gText_ItemStorage, task_pc_itemstorage + .4byte gText_Mailbox, sub_816B0A8 + .4byte gText_Decoration, sub_816B138 + .4byte gText_TurnOff, sub_816B148 + .align 2 gUnknown_085DFED4:: @ 85DFED4 - .incbin "baserom.gba", 0x5dfed4, 0x4 + .byte 0x00, 0x01, 0x02, 0x03 + .align 2 gUnknown_085DFED8:: @ 85DFED8 - .incbin "baserom.gba", 0x5dfed8, 0x4 + .byte 0x00, 0x01, 0x03, 0x00 + .align 2 gUnknown_085DFEDC:: @ 85DFEDC - .incbin "baserom.gba", 0x5dfedc, 0x20 + .4byte gText_WithdrawItem, sub_816B398 + .4byte gText_DepositItem, sub_816B2C8 + .4byte gText_TossItem, sub_816B3E4 + .4byte gText_Cancel, sub_816B4A4 + .align 2 gUnknown_085DFEFC:: @ 85DFEFC - .incbin "baserom.gba", 0x5dfefc, 0x8 + .2byte ITEM_POTION, 0x0001 + .2byte 0x0000, 0x0000 + .align 2 gUnknown_085DFF04:: @ 85DFF04 - .incbin "baserom.gba", 0x5dff04, 0x20 + .4byte gText_Read, sub_816B878 + .4byte gText_MoveToBag, sub_816B994 + .4byte gText_Give2, sub_816BABC + .4byte gText_Cancel2, sub_816BBD4 + .align 2 gUnknown_085DFF24:: @ 85DFF24 - .incbin "baserom.gba", 0x5dff24, 0x18 + .4byte 0x09010100, 0x00010f06, 0x09010100, 0x00010f08, 0x0a010100, 0x00010f08 + .align 2 gUnknown_085DFF3C:: @ 85DFF3C - .incbin "baserom.gba", 0x5dff3c, 0x8 + .4byte sub_816CA94 + .4byte sub_816CAC8 + .align 2 gUnknown_085DFF44:: @ 85DFF44 - .incbin "baserom.gba", 0x5dff44, 0x18 + .4byte 0x00000000, sub_816BDDC, fish4_goto_x5_or_x6, 0x00000000, 0x00080000, 0x07003129 + .align 2 gUnknown_085DFF5C:: @ 85DFF5C - .incbin "baserom.gba", 0x5dff5c, 0x28 + window_template 0x00, 0x10, 0x01, 0x0d, 0x12, 0x0f, 0x0001 + window_template 0x00, 0x01, 0x0d, 0x0d, 0x06, 0x0f, 0x00eb + window_template 0x00, 0x01, 0x08, 0x03, 0x03, 0x0f, 0x0153 + window_template 0x00, 0x01, 0x01, 0x0d, 0x02, 0x0f, 0x0139 + window_template 0x00, 0x08, 0x09, 0x06, 0x02, 0x0f, 0x015c + .align 2 gUnknown_085DFF84:: @ 85DFF84 - .incbin "baserom.gba", 0x5dff84, 0x8 + window_template 0x00, 0x09, 0x07, 0x05, 0x04, 0x0f, 0x0168 + .align 2 gUnknown_085DFF8C:: @ 85DFF8C - .incbin "baserom.gba", 0x5dff8c, 0x4 + .byte 0x01, 0x03, 0x02, 0x00 diff --git a/data/strings.s b/data/strings.s index bfe642915..5fb8ca902 100644 --- a/data/strings.s +++ b/data/strings.s @@ -824,7 +824,6 @@ gText_FirmSlash:: @ 85E922C gText_Var1DotVar2:: @ 85E9233 .string "{STR_VAR_1}.{STR_VAR_2}â€$" - .include "data/text/berry_firmness_strings.inc" gText_UnkF908Var1Var2:: @ 85E9263 @@ -833,7 +832,6 @@ gText_UnkF908Var1Var2:: @ 85E9263 gText_BerryTag:: @ 85E926B .string "BERRY TAG$" - gUnknown_085E9275:: @ 85E9275 .string "RED {POKEBLOCK}$" @@ -891,7 +889,6 @@ gText_Bitter:: @ 85E932D gText_Sour:: @ 85E9334 .string "SOUR$" - gUnknown_085E9339:: @ 85E9339 .string "TASTY$" @@ -919,7 +916,6 @@ gText_Var1HappilyAteVar2:: @ 85E9390 gText_Var1DisdainfullyAteVar2:: @ 85E93A9 .string "{STR_VAR_1} disdainfully ate the\n{STR_VAR_2}.{PAUSE_UNTIL_PRESS}$" - gUnknown_085E93C7:: @ 85E93C7 .string "BUY$" @@ -992,7 +988,6 @@ gText_TurnedOverVar1ForVar2:: @ 85E9677 gText_PokedollarVar1:: @ 85E969C .string "Â¥{STR_VAR_1}$" - gUnknown_085E96A0:: @ 85E96A0 .string "SHIFT$" @@ -1149,7 +1144,6 @@ gText_PkmnThawedOut:: @ 85E9CA2 gText_PPWasRestored:: @ 85E9CB7 .string "PP was restored.{PAUSE_UNTIL_PRESS}$" - gUnknown_085E9CCA:: @ 85E9CCA .string "{STR_VAR_1} regained health.{PAUSE_UNTIL_PRESS}$" @@ -1186,7 +1180,6 @@ gText_ThrowAwayItem:: @ 85E9E00 gText_ItemThrownAway:: @ 85E9E14 .string "The {STR_VAR_1}\nwas thrown away.{PAUSE_UNTIL_PRESS}$" - gUnknown_085E9E2E:: @ 85E9E2E .string "Teach which POKéMON?$" @@ -1392,7 +1385,6 @@ gText_Speed2:: @ 85EA35B gText_HP4:: @ 85EA361 .string "HP$" - gUnknown_085EA364:: @ 85EA364 .string "$" @@ -1432,7 +1424,6 @@ gText_RibbonsVar1:: @ 85EA3B4 gText_EmptyString5:: @ 85EA3C0 .string "$" - gUnknown_085EA3C1:: @ 85EA3C1 .string "EVENTS$" @@ -1520,7 +1511,6 @@ gText_RegisteredDataDeleted:: @ 85EA762 gText_NoRegistry:: @ 85EA785 .string "There is no REGISTRY.{PAUSE_UNTIL_PRESS}$" - gUnknown_085EA79D:: @ 85EA79D .string "DEL REGIST.$" @@ -1539,7 +1529,6 @@ gUnknown_085EA7C3:: @ 85EA7C3 gText_Color161Shadow161:: @ 85EA7C8 .string "{COLOR 161}{SHADOW 161}$" - gUnknown_085EA7CF:: @ 85EA7CF .string "Put out the selected decoration item.$" @@ -1552,7 +1541,6 @@ gUnknown_085EA81C:: @ 85EA81C gText_NoDecorations:: @ 85EA83D .string "There are no decorations.{PAUSE_UNTIL_PRESS}$" - gUnknown_085EA859:: @ 85EA859 .string "DESK$" @@ -1601,7 +1589,6 @@ gText_NoMoreDecorations:: @ 85EA8EA gText_NoMoreDecorations2:: @ 85EA931 .string "No more decorations can be placed.\nThe most that can be placed are {STR_VAR_1}.$" - gUnknown_085EA978:: @ 85EA978 .string "This can’t be placed here.\nIt must be on a DESK, etc.$" @@ -1632,7 +1619,6 @@ gText_DecorationReturnedToPC:: @ 85EAAC5 gText_NoDecorationsInUse:: @ 85EAAEC .string "There are no decorations in use.{PAUSE_UNTIL_PRESS}$" - gUnknown_085EAB0F:: @ 85EAB0F .string "TRISTAN$" @@ -1645,20 +1631,19 @@ gUnknown_085EAB1E:: @ 85EAB1E gUnknown_085EAB25:: @ 85EAB25 .string "ROBERTO$" -gUnknown_085EAB2D:: @ 85EAB2D +gText_TurnOff:: @ 85EAB2D .string "TURN OFF$" -gUnknown_085EAB36:: @ 85EAB36 +gText_Decoration:: @ 85EAB36 .string "DECORATION$" -gUnknown_085EAB41:: @ 85EAB41 +gText_ItemStorage:: @ 85EAB41 .string "ITEM STORAGE$" gText_Mailbox:: @ 85EAB4E .string "MAILBOX$" - -gUnknown_085EAB56:: @ 85EAB56 +gText_DepositItem:: @ 85EAB56 .string "DEPOSIT ITEM$" gText_WithdrawItem:: @ 85EAB63 @@ -1667,14 +1652,13 @@ gText_WithdrawItem:: @ 85EAB63 gText_TossItem:: @ 85EAB71 .string "TOSS ITEM$" - -gUnknown_085EAB7B:: @ 85EAB7B +gText_StoreItemsInPC:: @ 85EAB7B .string "Store items in the PC.$" -gUnknown_085EAB92:: @ 85EAB92 +gText_TakeOutItemsFromPC:: @ 85EAB92 .string "Take out items from the PC.$" -gUnknown_085EABAE:: @ 85EABAE +gText_ThrowAwayItemsInPC:: @ 85EABAE .string "Throw away items stored in the PC.$" gText_NoItems:: @ 85EABD1 @@ -1689,14 +1673,13 @@ gText_WithdrawHowManyItems:: @ 85EAC09 gText_WithdrawXItems:: @ 85EAC22 .string "Withdrew {STR_VAR_2}\n{STR_VAR_1}(s).$" - -gUnknown_085EAC35:: @ 85EAC35 +gText_Read:: @ 85EAC35 .string "READ$" -gUnknown_085EAC3A:: @ 85EAC3A +gText_MoveToBag:: @ 85EAC3A .string "MOVE TO BAG$" -gUnknown_085EAC46:: @ 85EAC46 +gText_Give2:: @ 85EAC46 .string "GIVE$" gText_NoMailHere:: @ 85EAC4B @@ -1738,7 +1721,6 @@ gText_Phoebe:: @ 85EAD29 gText_Glacia:: @ 85EAD30 .string "GLACIA$" - gUnknown_085EAD37:: @ 85EAD37 .string "PETALBURG$" @@ -1844,7 +1826,6 @@ gText_Yes:: @ 85EAE62 gText_No:: @ 85EAE66 .string "NO$" - gUnknown_085EAE69:: @ 85EAE69 .string "INFO$" @@ -1872,7 +1853,6 @@ gText_Lv50:: @ 85EAEB1 gText_OpenLevel:: @ 85EAEB8 .string "OPEN LEVEL$" - gUnknown_085EAEC3:: @ 85EAEC3 .string "FRESH WATER{CLEAR_TO 0x48}Â¥200$" @@ -2005,7 +1985,6 @@ gText_Smart:: @ 85EB0F9 gText_Tough:: @ 85EB0FF .string "TOUGH$" - gUnknown_085EB105:: @ 85EB105 .string "NORMAL$" @@ -2063,7 +2042,6 @@ gText_HallOfFame:: @ 85EB18B gText_LogOff:: @ 85EB198 .string "LOG OFF$" - gUnknown_085EB1A0:: @ 85EB1A0 .string "OPPONENT$" @@ -2130,7 +2108,6 @@ gText_MenuOptionBag:: @ 85EB26C gText_MenuOptionPokenav:: @ 85EB270 .string "POKéNAV$" - gUnknown_085EB278:: @ 85EB278 .string "$" @@ -2371,7 +2348,6 @@ gText_SpaceSeconds:: @ 85EB5E5 gText_SpaceTimes:: @ 85EB5EE .string " time(s)$" - gUnknown_085EB5F7:: @ 85EB5F7 .string ".$" @@ -2387,7 +2363,6 @@ gText_Son:: @ 85EB60A gText_Daughter:: @ 85EB60E .string "daughter$" - gUnknown_085EB617:: @ 85EB617 .string "BLUE FLUTE$" @@ -2463,7 +2438,6 @@ gText_ElevatorNowOn:: @ 85EB6A5 gText_BP:: @ 85EB6AD .string "BP$" - gUnknown_085EB6B0:: @ 85EB6B0 .string "ENERGYPOWDER{CLEAR_TO 0x72}{SIZE 0}50$" @@ -2524,7 +2498,6 @@ gUnknown_085EB7DB:: @ 85EB7DB gText_Exit:: @ 85EB7EA .string "EXIT$" - gUnknown_085EB7EF:: @ 85EB7EF .string "Exit from the BOX?$" @@ -2771,7 +2744,6 @@ gText_PartyFull:: @ 85EBCAD gText_Box:: @ 85EBCC1 .string "BOX$" - gUnknown_085EBCC5:: @ 85EBCC5 .string "Check the map of the HOENN region.$" @@ -2790,7 +2762,6 @@ gUnknown_085EBD34:: @ 85EBD34 gText_NoRibbonWinners:: @ 85EBD4A .string "There are no RIBBON winners.$" - gUnknown_085EBD67:: @ 85EBD67 .string "No TRAINERS are registered.$" @@ -2827,7 +2798,6 @@ gText_NumberRegistered:: @ 85EBE5F gText_NumberOfBattles:: @ 85EBE6E .string "No. of battles$" - gUnknown_085EBE7D:: @ 85EBE7D .string "DETAIL$" @@ -2897,7 +2867,6 @@ gText_InParty:: @ 85EBFCE gText_Number2:: @ 85EBFD7 .string "No. $" - gUnknown_085EBFDC:: @ 85EBFDC .string "RIBBONS$" @@ -2913,7 +2882,6 @@ gUnknown_085EC008:: @ 85EC008 gText_Unknown:: @ 85EC00F .string "UNKNOWN$" - gUnknown_085EC017:: @ 85EC017 .string "CALL$" @@ -2929,7 +2897,6 @@ gText_NumberF700:: @ 85EC029 gText_RibbonsF700:: @ 85EC030 .string "RIBBONS {SPECIAL_F7 0x00}$" - gUnknown_085EC03B:: @ 85EC03B .string "{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}$" @@ -3053,7 +3020,6 @@ gText_QuitEditing:: @ 85EC3A6 gText_StopGivingPkmnMail:: @ 85EC3B4 .string "Stop giving the POKéMON MAIL?$" - gUnknown_085EC3D2:: @ 85EC3D2 .string "and fill out the questionnaire.$" @@ -3066,7 +3032,6 @@ gText_AllTextBeingEditedWill:: @ 85EC410 gText_BeDeletedThatOkay:: @ 85EC42F .string "be deleted. Is that okay?$" - gUnknown_085EC449:: @ 85EC449 .string "Quit editing?$" @@ -3088,14 +3053,12 @@ gText_OnlyOnePhrase:: @ 85EC4C9 gText_OriginalSongWillBeUsed:: @ 85EC4E9 .string "The original song will be used.$" - gUnknown_085EC509:: @ 85EC509 .string "That’s trendy already!$" gText_CombineTwoWordsOrPhrases:: @ 85EC520 .string "Combine two words or phrases.$" - gUnknown_085EC53E:: @ 85EC53E .string "Quit giving information?$" @@ -3159,7 +3122,6 @@ gText_F700sQuiz:: @ 85EC6A8 gText_Lady:: @ 85EC6B2 .string "Lady$" - gUnknown_085EC6B7:: @ 85EC6B7 .string "After you have read the quiz$" @@ -3175,7 +3137,6 @@ gText_LikeToQuitQuiz:: @ 85EC706 gText_ChallengeQuestionMark:: @ 85EC727 .string "challenge?$" - gUnknown_085EC732:: @ 85EC732 .string "Is this quiz OK?$" @@ -3188,7 +3149,6 @@ gText_SelectTheAnswer:: @ 85EC752 gText_LyricsCantBeDeleted:: @ 85EC765 .string "The lyrics can’t be deleted.$" - gUnknown_085EC782:: @ 85EC782 .string "POKéMON LEAGUE$" @@ -3198,7 +3158,6 @@ gUnknown_085EC791:: @ 85EC791 gText_GetsAPokeBlockQuestion:: @ 85EC7A0 .string " gets a {POKEBLOCK}?$" - gUnknown_085EC7AF:: @ 85EC7AF .string "Coolness $" @@ -3334,7 +3293,6 @@ gText_Second:: @ 85ECB80 gText_Third:: @ 85ECB87 .string "third$" - gUnknown_085ECB8D:: @ 85ECB8D .string "0 pts$" @@ -3536,7 +3494,6 @@ gText_TrainerCardIDNo:: @ 85ECF78 gText_TrainerCardMoney:: @ 85ECF7E .string "MONEY$" - gUnknown_085ECF84:: @ 85ECF84 .string "Â¥$" @@ -3549,14 +3506,12 @@ gText_EmptyString6:: @ 85ECF8E gText_Colon2:: @ 85ECF8F .string ":$" - gUnknown_085ECF91:: @ 85ECF91 .string " points$" gText_TrainerCardTime:: @ 85ECF99 .string "TIME$" - gUnknown_085ECF9E:: @ 85ECF9E .string "ゲ-ムãƒã‚¤ãƒ³ãƒˆ$" @ "geemupointo" ("game point" in Japanese) @@ -3566,7 +3521,6 @@ gText_Var1sTrainerCard:: @ 85ECFA6 gText_HallOfFameDebut:: @ 85ECFB8 .string "HALL OF FAME DEBUT $" - gUnknown_085ECFCD:: @ 85ECFCD .string "LINK BATTLES$" @@ -3609,7 +3563,6 @@ gText_BattleTower:: @ 85ED0D3 gText_WSlashStraightSlash:: @ 85ED0E0 .string "W/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_1}{COLOR DARK_GREY}{SHADOW LIGHT_GREY} STRAIGHT/{COLOR RED}{SHADOW LIGHT_RED}{STR_VAR_2}$" - gUnknown_085ED104:: @ 85ED104 .string "BATTLE TOWER$" @@ -3695,14 +3648,12 @@ gText_CommunicationStandby:: @ 85ED207 gText_ColorDarkGrey:: @ 85ED21E .string "{COLOR DARK_GREY}$" - gUnknown_085ED222:: @ 85ED222 .string "{COLOR_HIGHLIGHT_SHADOW DYNAMIC_COLOR6 WHITE DYNAMIC_COLOR5}$" gText_HighlightDarkGrey:: @ 85ED228 .string "{HIGHLIGHT DARK_GREY}$" - gUnknown_085ED22C:: @ 85ED22C .string " $" @@ -3751,7 +3702,6 @@ gText_F700JoinedChat:: @ 85ED2A9 gText_F700LeftChat:: @ 85ED2BD .string "{SPECIAL_F7 0x00} left the chat.$" - gUnknown_085ED2CF:: @ 85ED2CF .string "{SPECIAL_F7 0x00}ã®{SPECIAL_F7 0x01}ã²ãã‚:$" @ "{SPECIAL_F7 0x00}'s {SPECIAL_F7 0x01}hikime" @@ -3809,7 +3759,6 @@ gText_ThankYou:: @ 85ED440 gText_ByeBye:: @ 85ED44A .string "BYE-BYE!$" - gUnknown_085ED453:: @ 85ED453 .string "Attack the weak points!$" @@ -3992,7 +3941,6 @@ gText_BattleRecord:: @ 85ED90E gText_BattlePoints:: @ 85ED91C .string "Battle Points$" - gUnknown_085ED92A:: @ 85ED92A .string "CANCEL$" @@ -4212,7 +4160,6 @@ gText_4th:: @ 85EDFAC gText_Friend:: @ 85EDFB0 .string "Friend$" - gUnknown_085EDFB7:: @ 85EDFB7 .string "POKeMON$" @@ -4397,7 +4344,6 @@ gUnknown_085EE410:: @ 85EE410 gText_1Dot:: @ 85EE424 .string "1.$" - gUnknown_085EE427:: @ 85EE427 .string "2.$" @@ -4440,7 +4386,6 @@ gText_ABtnTitleScreen:: @ 85EE572 gText_Option:: @ 85EE589 .string "OPTION$" - gUnknown_085EE590:: @ 85EE590 .string "TEXT SPEED$" @@ -4507,7 +4452,6 @@ gText_ButtonTypeLEqualsA:: @ 85EE65D gText_XPLink:: @ 85EE667 .string "{STR_VAR_1}P LINK$" - gUnknown_085EE670:: @ 85EE670 .string "BRONZE$" @@ -4529,7 +4473,6 @@ gText_Colon3:: @ 85EE68E gText_Confirm2:: @ 85EE690 .string "CONFIRM$" - gUnknown_085EE698:: @ 85EE698 .string "Days$" @@ -4581,7 +4524,6 @@ gText_SafariBallStock:: @ 85EE6FF gText_BattlePyramidFloor:: @ 85EE716 .string "Battle Pyramid\n{STR_VAR_1}$" - gUnknown_085EE728:: @ 85EE728 .string "Floor 1$" @@ -4624,7 +4566,6 @@ gText_EventSafelyLoaded:: @ 85EE80A gText_LoadErrorEndingSession:: @ 85EE827 .string "Loading error.\nEnding session.$" - gUnknown_085EE846:: @ 85EE846 .string "プレイヤー$" @ "pureiyaa" ("player" in Japanese) @@ -4640,7 +4581,6 @@ gText_DexNational:: @ 85EE855 gText_PokedexDiploma:: @ 85EE85E .string "PLAYER: {CLEAR 0x10}{COLOR RED}{SHADOW LIGHT_RED}{PLAYER}{COLOR DARK_GREY}{SHADOW LIGHT_GREY}\n\nThis document certifies\nthat you have successfully\ncompleted your\n{STR_VAR_1} POKéDEX.\n\n{CLEAR_TO 0x42}{COLOR RED}{SHADOW LIGHT_RED}GAME FREAK$" - gUnknown_085EE8DC:: @ 85EE8DC .string "{COLOR RED}{SHADOW LIGHT_RED}ゲ-ムフリ-ク$" @ geemufuriku ("Game Freak" in Japanese) @@ -4674,13 +4614,11 @@ gText_XSentOverY:: @ 85EE966 gText_TakeGoodCareOfX:: @ 85EE977 .string "Take good care of {STR_VAR_3}!$" - .include "data/text/easy_chat/easy_chat_group_names.inc" gText_ThreeQuestionMarks:: @ 85EEA42 .string "???$" - gUnknown_085EEA46:: @ 85EEA46 .string "MAX. HP$" @@ -4714,7 +4652,6 @@ gText_MixingRecords:: @ 85EEA7E gText_RecordMixingComplete:: @ 85EEA8E .string "Record mixing completed.\nThank you for waiting.$" - gUnknown_085EEABE:: @ 85EEABE .string "YOUR NAME?$" @@ -4853,7 +4790,6 @@ gText_PkmnForSwap:: @ 85EECD1 gText_Cancel3:: @ 85EECDD .string "CANCEL$" - gUnknown_085EECE4:: @ 85EECE4 .string "SWAP$" @@ -4863,7 +4799,6 @@ gUnknown_085EECE9:: @ 85EECE9 gText_AcceptThisPkmn:: @ 85EECF0 .string "Accept this POKéMON?$" - gUnknown_085EED05:: @ 85EED05 .string " $" @@ -5186,7 +5121,6 @@ gText_YouDontHaveThreeCoins:: @ 85EF734 gText_ReelTimeHelp:: @ 85EF750 .string "REEL TIME\nHere’s your chance to take\naim and nail marks!\nReel Time continues for the\nawarded number of spins.\nIt all ends on a Big Bonus.$" - gUnknown_085EF7DA:: @ 85EF7DA .string "The two seem to get along\nvery well.$" @@ -5217,7 +5151,6 @@ gText_TimeCleared:: @ 85EF895 gText_XMinYDotZSec:: @ 85EF8A3 .string "{STR_VAR_1} min. {STR_VAR_2}.{STR_VAR_3} sec.$" - gUnknown_085EF8B6:: @ 85EF8B6 .string "1F$" @@ -5251,7 +5184,6 @@ gText_12AndPoof:: @ 85EF979 gText_PkmnForgotMoveAndLearnedNew:: @ 85EF9A6 .string "{STR_VAR_1} forgot {STR_VAR_3}.\pAnd…\p{STR_VAR_1} learned {STR_VAR_2}.$" - gUnknown_085EF9C8:: @ 85EF9C8 .string "{STR_VAR_1} did not learn the\nmove {STR_VAR_2}.$" @@ -5267,7 +5199,6 @@ gText_BattleMoves2:: @ 85EFA31 gText_ContestMoves2:: @ 85EFA3E .string "CONTEST MOVES$" - gUnknown_085EFA4C:: @ 85EFA4C .string "TYPE/$" @@ -5286,7 +5217,6 @@ gText_Appeal2:: @ 85EFA67 gText_Jam2:: @ 85EFA6E .string "JAM$" - gUnknown_085EFA72:: @ 85EFA72 .string "KIRA$" @@ -5320,7 +5250,6 @@ gText_Confirm3:: @ 85EFAE0 gText_Cancel4:: @ 85EFAE8 .string "CANCEL$" - gUnknown_085EFAEF:: @ 85EFAEF .string "DEVON PRES$" @@ -5396,7 +5325,6 @@ gText_BattleWasRefused:: @ 85EFC0C gText_RefusedBattle:: @ 85EFC27 .string "Refused the battle.{PAUSE 60}$" - gUnknown_085EFC3E:: @ 85EFC3E .string "NO WEATHER$" From 69928d3904a610791d5e34e32364d9ee5f9392ee Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 27 Sep 2017 23:43:45 +0200 Subject: [PATCH 304/342] battle 4 up to 0xE5 --- asm/battle_1.s | 10 +- asm/battle_2.s | 58 +- asm/battle_4.s | 5421 +------------------------------------ asm/battle_anim_80FE840.s | 4 +- asm/battle_frontier_2.s | 6 +- asm/battle_interface.s | 8 +- asm/evolution_scene.s | 4 +- asm/party_menu.s | 2 +- data/battle_4.s | 6 +- data/battle_scripts_1.s | 16 +- include/battle.h | 87 +- include/battle_message.h | 17 + include/mail.h | 19 + src/battle_3.c | 21 +- src/battle_4.c | 1756 +++++++++++- src/pokemon_3.c | 20 +- sym_ewram.txt | 4 +- 17 files changed, 1845 insertions(+), 5614 deletions(-) create mode 100644 include/mail.h diff --git a/asm/battle_1.s b/asm/battle_1.s index e74d12046..636bafbea 100644 --- a/asm/battle_1.s +++ b/asm/battle_1.s @@ -1548,7 +1548,7 @@ _080358E0: .4byte _08035A70 _08035904: ldr r4, =gUnknown_0831ABA8 - ldr r5, =gUnknown_02022FF0 + ldr r5, =gBattleTerrain ldrb r1, [r5] lsls r0, r1, 2 adds r0, r1 @@ -2633,7 +2633,7 @@ _08036350: cmp r0, 0 bne _0803639C ldr r4, =gUnknown_0831ABA8 - ldr r5, =gUnknown_02022FF0 + ldr r5, =gBattleTerrain ldrb r1, [r5] lsls r0, r1, 2 adds r0, r1 @@ -2779,7 +2779,7 @@ _080364A8: .4byte _08036518 _080364CC: ldr r2, =gUnknown_0831ABA8 - ldr r0, =gUnknown_02022FF0 + ldr r0, =gBattleTerrain ldrb r1, [r0] lsls r0, r1, 2 adds r0, r1 @@ -2889,7 +2889,7 @@ _080365B4: .4byte _08036624 _080365D8: ldr r2, =gUnknown_0831ABA8 - ldr r0, =gUnknown_02022FF0 + ldr r0, =gBattleTerrain ldrb r1, [r0] lsls r0, r1, 2 adds r0, r1 @@ -3004,7 +3004,7 @@ _080366C8: .4byte _08036740 _080366EC: ldr r2, =gUnknown_0831ABA8 - ldr r0, =gUnknown_02022FF0 + ldr r0, =gBattleTerrain ldrb r1, [r0] lsls r0, r1, 2 adds r0, r1 diff --git a/asm/battle_2.s b/asm/battle_2.s index d1119619c..c96b80b1c 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -170,7 +170,7 @@ _080368BE: ldr r0, =gUnknown_02022E22 strh r1, [r0] bl sub_80B0BD0 - ldr r2, =gUnknown_02022FF0 + ldr r2, =gBattleTerrain strb r0, [r2] ldr r4, =gBattleTypeFlags ldr r0, [r4] @@ -7852,7 +7852,7 @@ bc_load_battlefield: @ 803AC34 bl GetBankByIdentity ldr r4, =gActiveBank strb r0, [r4] - ldr r0, =gUnknown_02022FF0 + ldr r0, =gBattleTerrain ldrb r1, [r0] movs r0, 0 bl dp01_build_cmdbuf_x2E_a @@ -9207,7 +9207,7 @@ _0803B7DA: ldr r1, =gBattleStruct mov r8, r1 movs r7, 0x6 - ldr r6, =gUnknown_0202421C + ldr r6, =gActionForBanks ldr r2, =gChosenMovesByBanks movs r4, 0xFF movs r3, 0 @@ -9511,7 +9511,7 @@ _0803BAB2: ldrb r0, [r4] cmp r2, r0 bge _0803BAE0 - ldr r7, =gUnknown_0202421C + ldr r7, =gActionForBanks movs r6, 0xFF movs r5, 0 ldr r3, =gChosenMovesByBanks @@ -10049,7 +10049,7 @@ _0803BF68: ands r3, r0 cmp r3, 0 beq _0803BFD0 - ldr r0, =gUnknown_0202421C + ldr r0, =gActionForBanks adds r0, r2, r0 movs r1, 0xD strb r1, [r0] @@ -10092,7 +10092,7 @@ _0803BFD0: cmp r1, 0 beq _0803C00C _0803BFF0: - ldr r0, =gUnknown_0202421C + ldr r0, =gActionForBanks adds r0, r2, r0 strb r3, [r0] ldr r1, =gBattleCommunication @@ -10100,7 +10100,7 @@ _0803BFF0: bl _0803CC72 .pool _0803C00C: - ldr r0, =gUnknown_0202421C + ldr r0, =gActionForBanks ldrb r1, [r0] ldr r0, =gBattleBufferB ldrb r2, [r0, 0x1] @@ -10141,7 +10141,7 @@ _0803C058: ldrb r1, [r0] adds r0, r5, 0 bl RecordedBattle_SetBankAction - ldr r1, =gUnknown_0202421C + ldr r1, =gActionForBanks ldrb r0, [r6] adds r1, r0, r1 lsls r0, 9 @@ -10497,7 +10497,7 @@ _0803C3B0: adds r4, r0, 0 cmp r1, 0x2 bne _0803C3D8 - ldr r0, =gUnknown_0202421C + ldr r0, =gActionForBanks ldrb r0, [r0] cmp r0, 0x2 bne _0803C3D8 @@ -10511,7 +10511,7 @@ _0803C3D8: ldrb r0, [r4] cmp r0, 0x3 bne _0803C410 - ldr r0, =gUnknown_0202421C + ldr r0, =gActionForBanks ldrb r0, [r0, 0x1] cmp r0, 0x2 bne _0803C410 @@ -10664,7 +10664,7 @@ _0803C532: bl _0803CD70 .pool _0803C550: - ldr r4, =gUnknown_0202421C + ldr r4, =gActionForBanks ldrb r0, [r5] bl GetBankIdentity eors r0, r6 @@ -10763,7 +10763,7 @@ _0803C628: ands r0, r1 cmp r0, 0 beq _0803C690 - ldr r4, =gUnknown_0202421C + ldr r4, =gActionForBanks ldr r6, =gActiveBank ldrb r0, [r6] bl GetBankIdentity @@ -10945,7 +10945,7 @@ _0803C7D8: beq _0803C804 b _0803CD04 _0803C804: - ldr r1, =gUnknown_0202421C + ldr r1, =gActionForBanks adds r0, r5, r1 ldrb r0, [r0] adds r2, r1, 0 @@ -11410,7 +11410,7 @@ _0803CC38: lsls r1, 8 orrs r0, r1 str r0, [r2] - ldr r1, =gUnknown_0202421C + ldr r1, =gActionForBanks ldrb r0, [r5] adds r0, r1 movs r1, 0x3 @@ -11515,7 +11515,7 @@ _0803CD1E: cmp r4, r5 bge _0803CD70 _0803CD4A: - ldr r0, =gUnknown_0202421C + ldr r0, =gActionForBanks adds r0, r4, r0 ldrb r0, [r0] cmp r0, 0x2 @@ -12033,7 +12033,7 @@ _0803D198: b _0803D254 .pool _0803D1B8: - ldr r0, =gUnknown_0202421C + ldr r0, =gActionForBanks mov r3, r9 adds r1, r3, r0 ldrb r1, [r1] @@ -12209,7 +12209,7 @@ sub_803D2E8: @ 803D2E8 b _0803D54A _0803D310: ldr r7, =gUnknown_0202407A - ldr r6, =gUnknown_0202421C + ldr r6, =gActionForBanks mov r2, r8 ldr r5, =gTurnOrder _0803D318: @@ -12245,7 +12245,7 @@ _0803D354: ldrb r2, [r2] cmp r3, r2 bcs _0803D3C0 - ldr r0, =gUnknown_0202421C + ldr r0, =gActionForBanks ldrb r1, [r0] adds r4, r0, 0 cmp r1, 0x3 @@ -12269,7 +12269,7 @@ _0803D376: b _0803D3BE .pool _0803D3A4: - ldr r1, =gUnknown_0202421C + ldr r1, =gActionForBanks ldrb r0, [r1] ldr r4, =gActiveBank mov r8, r4 @@ -12289,7 +12289,7 @@ _0803D3C0: cmp r3, 0x5 bne _0803D448 ldr r6, =gUnknown_0202407A - ldr r1, =gUnknown_0202421C + ldr r1, =gActionForBanks mov r2, r8 ldrb r0, [r2] adds r0, r1 @@ -12349,7 +12349,7 @@ _0803D448: ldrb r0, [r1] cmp r0, 0 beq _0803D48E - ldr r6, =gUnknown_0202421C + ldr r6, =gActionForBanks mov r2, r8 ldr r5, =gUnknown_0202407A ldr r4, =gTurnOrder @@ -12387,7 +12387,7 @@ _0803D48E: ldrb r0, [r4] cmp r0, 0 beq _0803D4D2 - ldr r6, =gUnknown_0202421C + ldr r6, =gActionForBanks ldr r5, =gUnknown_0202407A ldr r4, =gTurnOrder _0803D4A2: @@ -15097,7 +15097,7 @@ sub_803EE48: @ 803EE48 cmp r1, 0 beq _0803EEE0 adds r4, r2, 0 - ldr r6, =gUnknown_0202421C + ldr r6, =gActionForBanks ldr r5, =gBattleOutcome _0803EE7C: ldrb r0, [r4] @@ -15797,8 +15797,8 @@ _0803F532: .pool thumb_func_end PressurePPLose - thumb_func_start sub_803F548 -sub_803F548: @ 803F548 + thumb_func_start PressurePPLoseOnUsingImprision +PressurePPLoseOnUsingImprision: @ 803F548 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -15946,10 +15946,10 @@ _0803F658: pop {r0} bx r0 .pool - thumb_func_end sub_803F548 + thumb_func_end PressurePPLoseOnUsingImprision - thumb_func_start sub_803F67C -sub_803F67C: @ 803F67C + thumb_func_start PressurePPLoseOnUsingPerishSong +PressurePPLoseOnUsingPerishSong: @ 803F67C push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -16078,7 +16078,7 @@ _0803F762: pop {r0} bx r0 .pool - thumb_func_end sub_803F67C + thumb_func_end PressurePPLoseOnUsingPerishSong thumb_func_start sub_803F790 sub_803F790: @ 803F790 diff --git a/asm/battle_4.s b/asm/battle_4.s index 0714a0c22..096c195b0 100644 --- a/asm/battle_4.s +++ b/asm/battle_4.s @@ -5,5423 +5,6 @@ .text - thumb_func_start IsTwoTurnsMove -IsTwoTurnsMove: @ 8052F48 - push {lr} - lsls r0, 16 - lsrs r0, 16 - ldr r2, =gBattleMoves - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - adds r1, r2 - ldrb r0, [r1] - cmp r0, 0x91 - beq _08052F72 - cmp r0, 0x27 - beq _08052F72 - cmp r0, 0x4B - beq _08052F72 - cmp r0, 0x97 - beq _08052F72 - cmp r0, 0x9B - beq _08052F72 - cmp r0, 0x1A - bne _08052F7C -_08052F72: - movs r0, 0x1 - b _08052F7E - .pool -_08052F7C: - movs r0, 0 -_08052F7E: - pop {r1} - bx r1 - thumb_func_end IsTwoTurnsMove - - thumb_func_start sub_8052F84 -sub_8052F84: @ 8052F84 - push {lr} - lsls r0, 16 - lsrs r1, r0, 16 - cmp r1, 0 - beq _08052FA2 - cmp r1, 0xD6 - beq _08052FA2 - movs r0, 0x89 - lsls r0, 1 - cmp r1, r0 - beq _08052FA2 - cmp r1, 0x77 - beq _08052FA2 - cmp r1, 0x76 - bne _08052FA6 -_08052FA2: - movs r0, 0x1 - b _08052FA8 -_08052FA6: - movs r0, 0 -_08052FA8: - pop {r1} - bx r1 - thumb_func_end sub_8052F84 - - thumb_func_start AttacksThisTurn -AttacksThisTurn: @ 8052FAC - push {lr} - lsls r1, 16 - lsrs r2, r1, 16 - ldr r1, =gBattleMoves - lsls r0, r2, 1 - adds r0, r2 - lsls r0, 2 - adds r0, r1 - ldrb r0, [r0] - adds r3, r1, 0 - cmp r0, 0x97 - bne _08052FD0 - ldr r0, =gBattleWeather - ldrh r1, [r0] - movs r0, 0x60 - ands r0, r1 - cmp r0, 0 - bne _08053010 -_08052FD0: - lsls r0, r2, 1 - adds r0, r2 - lsls r0, 2 - adds r0, r3 - ldrb r0, [r0] - cmp r0, 0x91 - beq _08052FF2 - cmp r0, 0x27 - beq _08052FF2 - cmp r0, 0x4B - beq _08052FF2 - cmp r0, 0x97 - beq _08052FF2 - cmp r0, 0x9B - beq _08052FF2 - cmp r0, 0x1A - bne _08053010 -_08052FF2: - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 20 - ands r0, r1 - cmp r0, 0 - beq _08053010 - movs r0, 0x1 - b _08053012 - .pool -_08053010: - movs r0, 0x2 -_08053012: - pop {r1} - bx r1 - thumb_func_end AttacksThisTurn - - thumb_func_start atkA9_sleeptalk_choose_move -atkA9_sleeptalk_choose_move: @ 8053018 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - movs r6, 0 - movs r5, 0 - ldr r0, =gBankAttacker - mov r9, r0 - movs r1, 0x58 - mov r8, r1 - ldr r7, =gBattleMons + 0xC - movs r0, 0x84 - lsls r0, 1 - mov r10, r0 -_08053036: - lsls r4, r5, 1 - mov r1, r9 - ldrb r0, [r1] - mov r1, r8 - muls r1, r0 - adds r0, r1, 0 - adds r0, r4, r0 - adds r0, r7 - ldrh r0, [r0] - bl sub_8052F84 - lsls r0, 24 - cmp r0, 0 - bne _08053076 - mov r1, r9 - ldrb r0, [r1] - mov r1, r8 - muls r1, r0 - adds r0, r1, 0 - adds r0, r4, r0 - adds r0, r7 - ldrh r1, [r0] - cmp r1, r10 - beq _08053076 - cmp r1, 0xFD - beq _08053076 - adds r0, r1, 0 - bl IsTwoTurnsMove - lsls r0, 24 - cmp r0, 0 - beq _08053084 -_08053076: - ldr r1, =gBitTable - lsls r0, r5, 2 - adds r0, r1 - ldr r0, [r0] - orrs r6, r0 - lsls r0, r6, 24 - lsrs r6, r0, 24 -_08053084: - adds r5, 0x1 - cmp r5, 0x3 - ble _08053036 - ldr r0, =gBankAttacker - ldrb r0, [r0] - adds r1, r6, 0 - movs r2, 0xFD - bl CheckMoveLimitations - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, 0xF - bne _080530B8 - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _0805311C - .pool -_080530B8: - movs r7, 0x3 - ldr r4, =gBitTable -_080530BC: - bl Random - adds r5, r7, 0 - ands r5, r0 - lsls r0, r5, 2 - adds r0, r4 - ldr r0, [r0] - ands r0, r6 - cmp r0, 0 - bne _080530BC - ldr r4, =gRandomMove - ldr r2, =gBattleMons - lsls r1, r5, 1 - ldr r0, =gBankAttacker - ldrb r3, [r0] - movs r0, 0x58 - muls r0, r3 - adds r1, r0 - adds r2, 0xC - adds r1, r2 - ldrh r0, [r1] - strh r0, [r4] - ldr r0, =gCurrMovePos - strb r5, [r0] - ldr r2, =gHitMarker - ldr r0, [r2] - ldr r1, =0xfffffbff - ands r0, r1 - str r0, [r2] - ldrh r0, [r4] - movs r1, 0 - bl GetMoveTarget - ldr r1, =gBankTarget - strb r0, [r1] - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_0805311C: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkA9_sleeptalk_choose_move - - thumb_func_start atkAA_set_destinybond -atkAA_set_destinybond: @ 8053150 - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r2, r0 - adds r1, 0x50 - adds r2, r1 - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 18 - orrs r0, r1 - str r0, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end atkAA_set_destinybond - - thumb_func_start DestinyBondFlagUpdate -DestinyBondFlagUpdate: @ 8053180 - push {r4,r5,lr} - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - lsrs r5, r0, 24 - ldr r4, =gBankTarget - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - lsrs r3, r0, 24 - ldr r1, =gBattleMons - ldrb r2, [r4] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 18 - ands r0, r1 - cmp r0, 0 - beq _080531CA - cmp r5, r3 - beq _080531CA - ldr r2, =gHitMarker - ldr r1, [r2] - movs r0, 0x80 - lsls r0, 17 - ands r0, r1 - cmp r0, 0 - bne _080531CA - movs r0, 0x40 - orrs r1, r0 - str r1, [r2] -_080531CA: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end DestinyBondFlagUpdate - - thumb_func_start atkAB_DestinyBondFlagUpdate -atkAB_DestinyBondFlagUpdate: @ 80531E0 - push {lr} - bl DestinyBondFlagUpdate - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atkAB_DestinyBondFlagUpdate - - thumb_func_start atkAC_remaininghptopower -atkAC_remaininghptopower: @ 80531F8 - push {lr} - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r1, r0 - adds r1, r2 - movs r2, 0x28 - ldrsh r0, [r1, r2] - movs r2, 0x2C - ldrsh r1, [r1, r2] - movs r2, 0x30 - bl sub_8075034 - lsls r0, 24 - lsrs r1, r0, 24 - movs r3, 0 - ldr r0, =gUnknown_0831C408 - ldrb r2, [r0] - cmp r1, r2 - ble _08053232 - adds r2, r0, 0 -_08053224: - adds r3, 0x2 - cmp r3, 0xB - bgt _08053232 - adds r0, r3, r2 - ldrb r0, [r0] - cmp r1, r0 - bgt _08053224 -_08053232: - ldr r2, =gDynamicBasePower - ldr r1, =gUnknown_0831C408 - adds r0, r3, 0x1 - adds r0, r1 - ldrb r0, [r0] - strh r0, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atkAC_remaininghptopower - - thumb_func_start atkAD_spite_ppreduce -atkAD_spite_ppreduce: @ 8053260 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - ldr r4, =gLastUsedMovesByBanks - ldr r1, =gBankTarget - ldrb r3, [r1] - lsls r0, r3, 1 - adds r0, r4 - ldrh r2, [r0] - mov r8, r1 - cmp r2, 0 - bne _08053280 - b _08053408 -_08053280: - ldr r0, =0x0000ffff - cmp r2, r0 - bne _08053288 - b _08053408 -_08053288: - movs r7, 0 - ldr r0, =gBattleMons - movs r1, 0x58 - muls r1, r3 - adds r3, r0, 0 - adds r3, 0xC - adds r1, r3 - ldrh r1, [r1] - cmp r2, r1 - beq _080532C0 - adds r6, r4, 0 - mov r5, r8 - adds r4, r3, 0 - movs r3, 0x58 -_080532A4: - adds r7, 0x1 - cmp r7, 0x3 - bgt _080532C0 - ldrb r0, [r5] - lsls r2, r0, 1 - adds r2, r6 - lsls r1, r7, 1 - muls r0, r3 - adds r1, r0 - adds r1, r4 - ldrh r0, [r2] - ldrh r1, [r1] - cmp r0, r1 - bne _080532A4 -_080532C0: - cmp r7, 0x4 - bne _080532C6 - b _08053408 -_080532C6: - mov r4, r8 - ldrb r0, [r4] - movs r1, 0x58 - mov r9, r1 - mov r3, r9 - muls r3, r0 - adds r0, r3, 0 - adds r0, r7, r0 - ldr r1, =gBattleMons - adds r1, 0x24 - mov r10, r1 - add r0, r10 - ldrb r0, [r0] - cmp r0, 0x1 - bhi _080532E6 - b _08053408 -_080532E6: - bl Random - movs r1, 0x3 - ands r1, r0 - adds r6, r1, 0x2 - ldrb r0, [r4] - mov r3, r9 - muls r3, r0 - adds r0, r3, 0 - adds r0, r7, r0 - add r0, r10 - ldrb r0, [r0] - cmp r0, r6 - bge _08053304 - adds r6, r0, 0 -_08053304: - ldr r1, =gBattleTextBuff1 - movs r5, 0xFD - strb r5, [r1] - movs r0, 0x2 - strb r0, [r1, 0x1] - ldr r2, =gLastUsedMovesByBanks - mov r3, r8 - ldrb r0, [r3] - lsls r0, 1 - adds r0, r2 - ldrh r0, [r0] - strb r0, [r1, 0x2] - ldrb r0, [r3] - lsls r0, 1 - adds r0, r2 - ldrh r0, [r0] - lsrs r0, 8 - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r4, =gBattleTextBuff2 - adds r0, r4, 0 - adds r1, r6, 0 - movs r2, 0 - movs r3, 0x1 - bl ConvertIntToDecimalStringN - strb r5, [r4] - movs r0, 0x1 - strb r0, [r4, 0x1] - strb r0, [r4, 0x2] - strb r0, [r4, 0x3] - strb r6, [r4, 0x4] - subs r0, 0x2 - strb r0, [r4, 0x5] - mov r1, r8 - ldrb r0, [r1] - mov r1, r9 - muls r1, r0 - adds r1, r7, r1 - add r1, r10 - ldrb r0, [r1] - subs r0, r6 - strb r0, [r1] - ldr r4, =gActiveBank - mov r3, r8 - ldrb r0, [r3] - strb r0, [r4] - ldr r1, =gDisableStructs - ldrb r3, [r4] - lsls r0, r3, 3 - subs r0, r3 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x18] - lsrs r1, 4 - ldr r2, =gBitTable - lsls r0, r7, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _080533B8 - mov r2, r9 - muls r2, r3 - ldr r0, =gBattleMons - adds r0, 0x50 - adds r0, r2, r0 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 14 - ands r0, r1 - cmp r0, 0 - bne _080533B8 - adds r1, r7, 0 - adds r1, 0x9 - lsls r1, 24 - lsrs r1, 24 - mov r3, r10 - adds r0, r2, r3 - adds r0, r7 - str r0, [sp] - movs r0, 0 - movs r2, 0 - movs r3, 0x1 - bl EmitSetMonData - ldrb r0, [r4] - bl MarkBufferBankForExecution -_080533B8: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - ldr r1, =gBattleMons - ldr r0, =gBankTarget - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r0, r7, r0 - adds r1, 0x24 - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - bne _08053422 - adds r0, r2, 0 - bl CancelMultiTurnMoves - b _08053422 - .pool -_08053408: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_08053422: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkAD_spite_ppreduce - - thumb_func_start atkAE_heal_party_status -atkAE_heal_party_status: @ 8053438 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x8 - movs r4, 0 - str r4, [sp, 0x4] - mov r8, r4 - ldr r0, =gCurrentMove - ldrh r0, [r0] - cmp r0, 0xD7 - beq _08053454 - b _0805363E -_08053454: - ldr r6, =gBattleCommunication - mov r0, r8 - strb r0, [r6, 0x5] - ldr r5, =gBankAttacker - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - ldr r1, =gEnemyParty - mov r10, r1 - cmp r0, 0 - bne _08053470 - ldr r2, =gPlayerParty - mov r10, r2 -_08053470: - ldr r4, =gBattleMons - ldrb r3, [r5] - movs r7, 0x58 - adds r2, r3, 0 - muls r2, r7 - adds r0, r2, r4 - adds r1, r0, 0 - adds r1, 0x20 - ldrb r0, [r1] - cmp r0, 0x2B - beq _080534C4 - adds r0, r4, 0 - adds r0, 0x4C - adds r0, r2, r0 - mov r1, r8 - str r1, [r0] - ldrb r0, [r5] - adds r2, r0, 0 - muls r2, r7 - adds r0, r4, 0 - adds r0, 0x50 - adds r2, r0 - ldr r0, [r2] - ldr r1, =0xf7ffffff - ands r0, r1 - str r0, [r2] - b _080534D4 - .pool -_080534C4: - ldrb r1, [r1] - adds r0, r3, 0 - bl RecordAbilityBattle - ldrb r0, [r6, 0x5] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r6, 0x5] -_080534D4: - ldr r7, =gActiveBank - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankIdentity - movs r2, 0x2 - mov r9, r2 - mov r1, r9 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - ldr r1, =gBattleScripting - strb r0, [r1, 0x17] - strb r0, [r7] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0805357A - ldr r0, =gAbsentBankFlags - ldrb r2, [r0] - ldr r1, =gBitTable - ldrb r3, [r7] - lsls r0, r3, 2 - adds r0, r1 - ldr r0, [r0] - ands r2, r0 - cmp r2, 0 - bne _0805357A - ldr r5, =gBattleMons - movs r6, 0x58 - adds r4, r3, 0 - muls r4, r6 - adds r0, r4, r5 - adds r1, r0, 0 - adds r1, 0x20 - ldrb r0, [r1] - cmp r0, 0x2B - beq _08053568 - adds r0, r5, 0 - adds r0, 0x4C - adds r0, r4, r0 - str r2, [r0] - ldrb r0, [r7] - adds r2, r0, 0 - muls r2, r6 - adds r0, r5, 0 - adds r0, 0x50 - adds r2, r0 - ldr r0, [r2] - ldr r1, =0xf7ffffff - ands r0, r1 - str r0, [r2] - b _0805357A - .pool -_08053568: - ldrb r1, [r1] - adds r0, r3, 0 - bl RecordAbilityBattle - ldr r1, =gBattleCommunication - ldrb r0, [r1, 0x5] - mov r2, r9 - orrs r0, r2 - strb r0, [r1, 0x5] -_0805357A: - movs r6, 0 - ldr r7, =gBattleMons -_0805357E: - movs r0, 0x64 - adds r4, r6, 0 - muls r4, r0 - add r4, r10 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - lsls r0, 16 - lsrs r5, r0, 16 - adds r0, r4, 0 - movs r1, 0x2E - bl GetMonData - lsls r0, 24 - lsrs r4, r0, 24 - cmp r5, 0 - beq _08053636 - movs r0, 0xCE - lsls r0, 1 - cmp r5, r0 - beq _08053636 - ldr r2, =gBattlePartyID - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r0, r1, 1 - adds r0, r2 - ldrh r0, [r0] - cmp r0, r6 - bne _080535D0 - movs r0, 0x58 - muls r0, r1 - b _08053600 - .pool -_080535D0: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08053618 - ldr r0, =gActiveBank - ldrb r3, [r0] - lsls r0, r3, 1 - adds r0, r2 - ldrh r0, [r0] - cmp r0, r6 - bne _08053618 - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r2, =gBitTable - lsls r0, r3, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _08053618 - movs r0, 0x58 - muls r0, r3 -_08053600: - adds r0, r7 - adds r0, 0x20 - ldrb r0, [r0] - b _08053624 - .pool -_08053618: - adds r0, r5, 0 - adds r1, r4, 0 - bl GetAbilityBySpecies - lsls r0, 24 - lsrs r0, 24 -_08053624: - cmp r0, 0x2B - beq _08053636 - movs r0, 0x1 - lsls r0, r6 - mov r1, r8 - orrs r1, r0 - lsls r0, r1, 24 - lsrs r0, 24 - mov r8, r0 -_08053636: - adds r6, 0x1 - cmp r6, 0x5 - ble _0805357E - b _080536BC -_0805363E: - ldr r1, =gBattleCommunication - movs r0, 0x4 - strb r0, [r1, 0x5] - movs r2, 0x3F - mov r8, r2 - ldr r3, =gBattleMons - ldr r2, =gBankAttacker - ldrb r0, [r2] - movs r5, 0x58 - muls r0, r5 - movs r1, 0x4C - adds r1, r3 - mov r9, r1 - add r0, r9 - str r4, [r0] - ldrb r0, [r2] - adds r1, r0, 0 - muls r1, r5 - adds r7, r3, 0 - adds r7, 0x50 - adds r1, r7 - ldr r0, [r1] - ldr r6, =0xf7ffffff - ands r0, r6 - str r0, [r1] - ldrb r0, [r2] - bl GetBankIdentity - movs r1, 0x2 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - ldr r4, =gActiveBank - strb r0, [r4] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _080536BC - ldr r0, =gAbsentBankFlags - ldrb r2, [r0] - ldr r1, =gBitTable - ldrb r3, [r4] - lsls r0, r3, 2 - adds r0, r1 - ldr r0, [r0] - ands r2, r0 - cmp r2, 0 - bne _080536BC - adds r0, r3, 0 - muls r0, r5 - add r0, r9 - str r2, [r0] - ldrb r0, [r4] - adds r1, r0, 0 - muls r1, r5 - adds r1, r7 - ldr r0, [r1] - ands r0, r6 - str r0, [r1] -_080536BC: - mov r2, r8 - cmp r2, 0 - beq _080536DE - ldr r4, =gActiveBank - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r4] - add r0, sp, 0x4 - str r0, [sp] - movs r0, 0 - movs r1, 0x28 - movs r3, 0x4 - bl EmitSetMonData - ldrb r0, [r4] - bl MarkBufferBankForExecution -_080536DE: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - add sp, 0x8 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkAE_heal_party_status - - thumb_func_start atkAF_cursetarget -atkAF_cursetarget: @ 805371C - push {r4,r5,lr} - ldr r5, =gBattleMons - ldr r0, =gBankTarget - ldrb r0, [r0] - movs r4, 0x58 - adds r1, r0, 0 - muls r1, r4 - adds r0, r5, 0 - adds r0, 0x50 - adds r1, r0 - ldr r2, [r1] - movs r3, 0x80 - lsls r3, 21 - adds r0, r2, 0 - ands r0, r3 - cmp r0, 0 - beq _08053768 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _0805378C - .pool -_08053768: - orrs r2, r3 - str r2, [r1] - ldr r1, =gBattleMoveDamage - ldr r0, =gBankAttacker - ldrb r0, [r0] - muls r0, r4 - adds r0, r5 - ldrh r0, [r0, 0x2C] - lsrs r0, 1 - str r0, [r1] - cmp r0, 0 - bne _08053784 - movs r0, 0x1 - str r0, [r1] -_08053784: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_0805378C: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atkAF_cursetarget - - thumb_func_start atkB0_set_spikes -atkB0_set_spikes: @ 80537A0 - push {r4,lr} - ldr r4, =gBankAttacker - ldrb r0, [r4] - bl GetBankSide - movs r1, 0x1 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gSideTimers - lsls r2, r0, 1 - adds r0, r2, r0 - lsls r0, 2 - adds r3, r0, r1 - ldrb r0, [r3, 0xA] - cmp r0, 0x3 - bne _08053804 - ldr r2, =gSpecialStatuses - ldrb r1, [r4] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0] - movs r2, 0x20 - orrs r1, r2 - strb r1, [r0] - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _0805381E - .pool -_08053804: - ldr r1, =gSideAffecting - adds r1, r2, r1 - ldrh r2, [r1] - movs r0, 0x10 - orrs r0, r2 - strh r0, [r1] - ldrb r0, [r3, 0xA] - adds r0, 0x1 - strb r0, [r3, 0xA] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_0805381E: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkB0_set_spikes - - thumb_func_start atkB1_set_foresight -atkB1_set_foresight: @ 805382C - ldr r1, =gBattleMons - ldr r0, =gBankTarget - ldrb r2, [r0] - movs r0, 0x58 - muls r2, r0 - adds r1, 0x50 - adds r2, r1 - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 22 - orrs r0, r1 - str r0, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end atkB1_set_foresight - - thumb_func_start atkB2_setperishsong -atkB2_setperishsong: @ 805385C - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - movs r6, 0 - movs r3, 0 - ldr r0, =gNoOfAllBanks - adds r7, r0, 0 - ldr r0, =gBankAttacker - mov r8, r0 - ldrb r1, [r7] - cmp r6, r1 - bge _080538C8 - movs r5, 0x20 - ldr r0, =gBattleMons - mov r12, r0 - ldr r0, =gDisableStructs - adds r4, r0, 0 - adds r4, 0xF - ldr r2, =gStatuses3 -_08053884: - ldr r1, [r2] - adds r0, r1, 0 - ands r0, r5 - cmp r0, 0 - bne _0805389C - movs r0, 0x58 - muls r0, r3 - add r0, r12 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x2B - bne _080538B4 -_0805389C: - adds r6, 0x1 - b _080538BC - .pool -_080538B4: - orrs r1, r5 - str r1, [r2] - movs r0, 0x33 - strb r0, [r4] -_080538BC: - adds r4, 0x1C - adds r2, 0x4 - adds r3, 0x1 - ldrb r0, [r7] - cmp r3, r0 - blt _08053884 -_080538C8: - mov r1, r8 - ldrb r0, [r1] - bl sub_803F67C - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r6, r0 - bne _080538FC - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08053904 - .pool -_080538FC: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_08053904: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkB2_setperishsong - - thumb_func_start atkB3_rolloutdamagecalculation -atkB3_rolloutdamagecalculation: @ 8053914 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _08053948 - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl CancelMultiTurnMoves - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082D8A60 - str r0, [r1] - b _08053A60 - .pool -_08053948: - ldr r2, =gBattleMons - ldr r1, =gBankAttacker - ldrb r3, [r1] - movs r5, 0x58 - adds r0, r3, 0 - muls r0, r5 - adds r4, r2, 0 - adds r4, 0x50 - adds r0, r4 - ldr r0, [r0] - movs r7, 0x80 - lsls r7, 5 - ands r0, r7 - adds r6, r1, 0 - mov r9, r2 - ldr r1, =gDisableStructs - mov r12, r1 - ldr r2, =gCurrentMove - mov r8, r2 - cmp r0, 0 - bne _080539BA - lsls r0, r3, 3 - subs r0, r3 - lsls r0, 2 - add r0, r12 - ldrb r2, [r0, 0x11] - movs r1, 0x10 - negs r1, r1 - ands r1, r2 - movs r2, 0x5 - orrs r1, r2 - strb r1, [r0, 0x11] - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r12 - ldrb r2, [r0, 0x11] - movs r1, 0xF - ands r1, r2 - movs r2, 0x50 - orrs r1, r2 - strb r1, [r0, 0x11] - ldrb r0, [r6] - adds r1, r0, 0 - muls r1, r5 - adds r1, r4 - ldr r0, [r1] - orrs r0, r7 - str r0, [r1] - ldr r1, =gLockedMoves - ldrb r0, [r6] - lsls r0, 1 - adds r0, r1 - mov r2, r8 - ldrh r1, [r2] - strh r1, [r0] -_080539BA: - ldrb r0, [r6] - lsls r2, r0, 3 - subs r2, r0 - lsls r2, 2 - add r2, r12 - ldrb r3, [r2, 0x11] - lsls r1, r3, 28 - lsrs r1, 28 - subs r1, 0x1 - movs r0, 0xF - ands r1, r0 - movs r0, 0x10 - negs r0, r0 - ands r0, r3 - orrs r0, r1 - strb r0, [r2, 0x11] - cmp r1, 0 - bne _080539EE - ldrb r0, [r6] - adds r1, r0, 0 - muls r1, r5 - adds r1, r4 - ldr r0, [r1] - ldr r2, =0xffffefff - ands r0, r2 - str r0, [r1] -_080539EE: - ldr r3, =gDynamicBasePower - ldr r2, =gBattleMoves - mov r0, r8 - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - strh r0, [r3] - movs r2, 0x1 - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - mov r1, r12 - adds r4, r0, r1 - ldrb r0, [r4, 0x11] - lsls r0, 28 - lsrs r0, 28 - movs r1, 0x5 - subs r1, r0 - ldr r7, =gBattlescriptCurrInstr - adds r5, r3, 0 - cmp r2, r1 - bge _08053A3C - adds r1, r5, 0 - adds r3, r4, 0 - movs r4, 0x5 -_08053A28: - ldrh r0, [r1] - lsls r0, 1 - strh r0, [r1] - adds r2, 0x1 - ldrb r0, [r3, 0x11] - lsls r0, 28 - lsrs r0, 28 - subs r0, r4, r0 - cmp r2, r0 - blt _08053A28 -_08053A3C: - ldrb r1, [r6] - movs r0, 0x58 - muls r0, r1 - mov r1, r9 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 23 - ands r0, r1 - cmp r0, 0 - beq _08053A5A - ldrh r0, [r5] - lsls r0, 1 - strh r0, [r5] -_08053A5A: - ldr r0, [r7] - adds r0, 0x1 - str r0, [r7] -_08053A60: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkB3_rolloutdamagecalculation - - thumb_func_start atkB4_jumpifconfusedandstatmaxed -atkB4_jumpifconfusedandstatmaxed: @ 8053A90 - push {r4,r5,lr} - ldr r5, =gBattleMons - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - adds r3, r1, 0 - muls r3, r0 - adds r0, r5, 0 - adds r0, 0x50 - adds r0, r3, r0 - ldr r0, [r0] - movs r1, 0x7 - ands r0, r1 - ldr r4, =gBattlescriptCurrInstr - cmp r0, 0 - beq _08053AEC - ldr r2, [r4] - ldrb r0, [r2, 0x1] - adds r0, r3 - adds r1, r5, 0 - adds r1, 0x18 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 24 - asrs r0, 24 - cmp r0, 0xC - bne _08053AEC - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _08053AF2 - .pool -_08053AEC: - ldr r0, [r4] - adds r0, 0x6 - str r0, [r4] -_08053AF2: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end atkB4_jumpifconfusedandstatmaxed - - thumb_func_start atkB5_furycuttercalc -atkB5_furycuttercalc: @ 8053AF8 - push {r4,r5,lr} - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _08053B34 - ldr r2, =gDisableStructs - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - movs r1, 0 - strb r1, [r0, 0x10] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082D8A60 - str r0, [r1] - b _08053B8C - .pool -_08053B34: - ldr r5, =gDisableStructs - ldr r4, =gBankAttacker - ldrb r1, [r4] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r1, r0, r5 - ldrb r0, [r1, 0x10] - cmp r0, 0x5 - beq _08053B4C - adds r0, 0x1 - strb r0, [r1, 0x10] -_08053B4C: - ldr r3, =gDynamicBasePower - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - strh r0, [r3] - movs r2, 0x1 - ldrb r1, [r4] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r5 - ldr r4, =gBattlescriptCurrInstr - ldrb r1, [r0, 0x10] - cmp r2, r1 - bge _08053B86 - adds r1, r3, 0 - adds r3, r0, 0 -_08053B78: - ldrh r0, [r1] - lsls r0, 1 - strh r0, [r1] - adds r2, 0x1 - ldrb r0, [r3, 0x10] - cmp r2, r0 - blt _08053B78 -_08053B86: - ldr r0, [r4] - adds r0, 0x1 - str r0, [r4] -_08053B8C: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atkB5_furycuttercalc - - thumb_func_start atkB6_happinesstodamagecalculation -atkB6_happinesstodamagecalculation: @ 8053BAC - push {r4,lr} - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - cmp r0, 0x79 - bne _08053BEC - ldr r4, =gDynamicBasePower - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x2B - ldrb r1, [r0] - b _08053C02 - .pool -_08053BEC: - ldr r4, =gDynamicBasePower - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x2B - ldrb r0, [r0] - movs r1, 0xFF - subs r1, r0 -_08053C02: - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 1 - movs r1, 0x19 - bl __divsi3 - strh r0, [r4] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkB6_happinesstodamagecalculation - - thumb_func_start atkB7_presentdamagecalculation -atkB7_presentdamagecalculation: @ 8053C30 - push {r4,lr} - bl Random - movs r4, 0xFF - ands r4, r0 - cmp r4, 0x65 - bgt _08053C4C - ldr r1, =gDynamicBasePower - movs r0, 0x28 - strh r0, [r1] - b _08053C8E - .pool -_08053C4C: - cmp r4, 0xB1 - bgt _08053C5C - ldr r1, =gDynamicBasePower - movs r0, 0x50 - strh r0, [r1] - b _08053C8E - .pool -_08053C5C: - cmp r4, 0xCB - bgt _08053C6C - ldr r1, =gDynamicBasePower - movs r0, 0x78 - strh r0, [r1] - b _08053C8E - .pool -_08053C6C: - ldr r3, =gBattleMoveDamage - ldr r2, =gBattleMons - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r0, [r0, 0x2C] - lsrs r0, 2 - str r0, [r3] - cmp r0, 0 - bne _08053C88 - movs r0, 0x1 - str r0, [r3] -_08053C88: - ldr r0, [r3] - negs r0, r0 - str r0, [r3] -_08053C8E: - cmp r4, 0xCB - bgt _08053CAC - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082D8A30 - b _08053CE6 - .pool -_08053CAC: - ldr r2, =gBattleMons - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r1, [r0, 0x2C] - ldrh r0, [r0, 0x28] - cmp r1, r0 - bne _08053CD8 - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082D9EFB - b _08053CE6 - .pool -_08053CD8: - ldr r2, =gBattleMoveFlags - ldrb r1, [r2] - movs r0, 0xF7 - ands r0, r1 - strb r0, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082D9EE1 -_08053CE6: - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkB7_presentdamagecalculation - - thumb_func_start atkB8_set_safeguard -atkB8_set_safeguard: @ 8053CFC - push {r4-r7,lr} - ldr r7, =gBankAttacker - ldrb r0, [r7] - bl GetBankIdentity - ldr r4, =gSideAffecting - movs r6, 0x1 - adds r1, r6, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - ldrh r1, [r1] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _08053D40 - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0 - strb r0, [r1, 0x5] - b _08053D88 - .pool -_08053D40: - ldrb r0, [r7] - bl GetBankIdentity - adds r1, r6, 0 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - ldrh r0, [r1] - movs r2, 0x20 - orrs r0, r2 - strh r0, [r1] - ldrb r0, [r7] - bl GetBankIdentity - ldr r5, =gSideTimers - adds r1, r6, 0 - ands r1, r0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - movs r4, 0x5 - strb r4, [r0, 0x6] - ldrb r0, [r7] - bl GetBankIdentity - adds r1, r6, 0 - ands r1, r0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r5 - ldrb r1, [r7] - strb r1, [r0, 0x7] - ldr r0, =gBattleCommunication - strb r4, [r0, 0x5] -_08053D88: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkB8_set_safeguard - - thumb_func_start atkB9_magnitudedamagecalculation -atkB9_magnitudedamagecalculation: @ 8053DA4 - push {r4-r7,lr} - mov r7, r8 - push {r7} - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x64 - bl __umodsi3 - lsls r0, 16 - lsrs r3, r0, 16 - cmp r3, 0x4 - bgt _08053DD0 - ldr r1, =gDynamicBasePower - movs r0, 0xA - strh r0, [r1] - movs r3, 0x4 - b _08053E3C - .pool -_08053DD0: - cmp r3, 0xE - bgt _08053DE4 - ldr r1, =gDynamicBasePower - movs r0, 0x1E - strh r0, [r1] - movs r3, 0x5 - b _08053E3C - .pool -_08053DE4: - cmp r3, 0x22 - bgt _08053DF8 - ldr r1, =gDynamicBasePower - movs r0, 0x32 - strh r0, [r1] - movs r3, 0x6 - b _08053E3C - .pool -_08053DF8: - cmp r3, 0x40 - bgt _08053E0C - ldr r1, =gDynamicBasePower - movs r0, 0x46 - strh r0, [r1] - movs r3, 0x7 - b _08053E3C - .pool -_08053E0C: - cmp r3, 0x54 - bgt _08053E20 - ldr r1, =gDynamicBasePower - movs r0, 0x5A - strh r0, [r1] - movs r3, 0x8 - b _08053E3C - .pool -_08053E20: - cmp r3, 0x5E - bgt _08053E34 - ldr r1, =gDynamicBasePower - movs r0, 0x6E - strh r0, [r1] - movs r3, 0x9 - b _08053E3C - .pool -_08053E34: - ldr r1, =gDynamicBasePower - movs r0, 0x96 - strh r0, [r1] - movs r3, 0xA -_08053E3C: - ldr r1, =gBattleTextBuff1 - movs r2, 0 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x1 - strb r0, [r1, 0x1] - strb r0, [r1, 0x2] - movs r0, 0x2 - strb r0, [r1, 0x3] - strb r3, [r1, 0x4] - movs r0, 0xFF - strb r0, [r1, 0x5] - ldr r1, =gBankTarget - strb r2, [r1] - ldr r0, =gNoOfAllBanks - ldrb r3, [r0] - adds r6, r1, 0 - ldr r0, =gBattlescriptCurrInstr - mov r8, r0 - cmp r2, r3 - bcs _08053E94 - adds r4, r6, 0 - ldr r0, =gBankAttacker - ldrb r5, [r0] - ldr r1, =gBitTable - mov r12, r1 - ldr r7, =gAbsentBankFlags -_08053E72: - ldrb r2, [r4] - cmp r2, r5 - beq _08053E88 - ldrb r0, [r7] - ldrb r1, [r6] - lsls r1, 2 - add r1, r12 - ldr r1, [r1] - ands r0, r1 - cmp r0, 0 - beq _08053E94 -_08053E88: - adds r0, r2, 0x1 - strb r0, [r4] - lsls r0, 24 - lsrs r0, 24 - cmp r0, r3 - bcc _08053E72 -_08053E94: - mov r1, r8 - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkB9_magnitudedamagecalculation - - thumb_func_start atkBA_jumpifnopursuitswitchdmg -atkBA_jumpifnopursuitswitchdmg: @ 8053EC8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r0, =gMultiHitCounter - ldrb r0, [r0] - cmp r0, 0x1 - bne _08053EF8 - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _08053EF4 - movs r0, 0x1 - b _08053F12 - .pool -_08053EF4: - movs r0, 0 - b _08053F12 -_08053EF8: - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _08053F10 - movs r0, 0x3 - b _08053F12 - .pool -_08053F10: - movs r0, 0x2 -_08053F12: - bl GetBankByIdentity - ldr r1, =gBankTarget - strb r0, [r1] - ldr r0, =gUnknown_0202421C - ldr r1, =gBankTarget - ldrb r3, [r1] - adds r0, r3, r0 - ldrb r0, [r0] - cmp r0, 0 - beq _08053F2A - b _08054030 -_08053F2A: - ldr r5, =gBankAttacker - ldr r0, =gBattleStruct - ldr r1, [r0] - adds r1, r3, r1 - ldrb r2, [r5] - ldrb r1, [r1, 0xC] - cmp r2, r1 - bne _08054030 - ldr r4, =gBattleMons - movs r2, 0x58 - adds r0, r3, 0 - muls r0, r2 - adds r1, r4, 0 - adds r1, 0x4C - adds r0, r1 - ldr r0, [r0] - movs r1, 0x27 - ands r0, r1 - cmp r0, 0 - bne _08054030 - ldrb r0, [r5] - muls r0, r2 - adds r0, r4 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _08054030 - ldr r0, =gDisableStructs - lsls r1, r3, 3 - subs r1, r3 - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x18] - lsls r0, 31 - cmp r0, 0 - bne _08054030 - ldr r0, =gChosenMovesByBanks - lsls r1, r3, 1 - adds r1, r0 - ldrh r0, [r1] - cmp r0, 0xE4 - bne _08054030 - movs r1, 0 - ldr r0, =gNoOfAllBanks - ldr r2, =gCurrentMove - mov r8, r2 - ldr r7, =gCurrMovePos - mov r10, r7 - ldr r2, =gUnknown_020241E9 - mov r9, r2 - ldr r7, =gHitMarker - mov r12, r7 - ldrb r2, [r0] - cmp r1, r2 - bge _08053FB6 - ldr r6, =gTurnOrder - ldr r5, =gBankTarget - ldr r4, =gUnknown_0202407A - movs r3, 0xB - adds r2, r0, 0 -_08053FA0: - adds r0, r1, r6 - ldrb r0, [r0] - ldrb r7, [r5] - cmp r0, r7 - bne _08053FAE - adds r0, r1, r4 - strb r3, [r0] -_08053FAE: - adds r1, 0x1 - ldrb r0, [r2] - cmp r1, r0 - blt _08053FA0 -_08053FB6: - movs r0, 0xE4 - mov r1, r8 - strh r0, [r1] - ldr r2, =gBankTarget - ldrb r0, [r2] - ldr r7, =gBattleStruct - ldr r1, [r7] - adds r0, r1 - adds r0, 0x80 - ldrb r0, [r0] - mov r1, r9 - strb r0, [r1] - mov r2, r10 - strb r0, [r2] - ldr r7, =gBattlescriptCurrInstr - ldr r0, [r7] - adds r0, 0x5 - str r0, [r7] - movs r0, 0x1 - ldr r1, =gBattleScripting - strb r0, [r1, 0x18] - mov r2, r12 - ldr r0, [r2] - ldr r1, =0xfffffbff - ands r0, r1 - str r0, [r2] - b _0805404A - .pool -_08054030: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_0805404A: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkBA_jumpifnopursuitswitchdmg - - thumb_func_start atkBB_setsunny -atkBB_setsunny: @ 805405C - push {lr} - ldr r2, =gBattleWeather - ldrh r1, [r2] - movs r0, 0x60 - ands r0, r1 - cmp r0, 0 - beq _08054088 - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0x2 - strb r0, [r1, 0x5] - b _0805409A - .pool -_08054088: - movs r0, 0x20 - strh r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0x4 - strb r0, [r1, 0x5] - ldr r0, =gWishFutureKnock - adds r0, 0x28 - movs r1, 0x5 - strb r1, [r0] -_0805409A: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atkBB_setsunny - - thumb_func_start atkBC_maxattackhalvehp -atkBC_maxattackhalvehp: @ 80540B4 - push {r4,r5,lr} - ldr r5, =gBattleMons - ldr r4, =gBankAttacker - ldrb r0, [r4] - movs r3, 0x58 - muls r0, r3 - adds r2, r0, r5 - ldrh r0, [r2, 0x2C] - lsrs r1, r0, 1 - cmp r1, 0 - bne _080540CC - movs r1, 0x1 -_080540CC: - movs r0, 0x19 - ldrsb r0, [r2, r0] - cmp r0, 0xB - bgt _08054110 - ldrh r0, [r2, 0x28] - cmp r0, r1 - bls _08054110 - movs r0, 0xC - strb r0, [r2, 0x19] - ldr r1, =gBattleMoveDamage - ldrb r0, [r4] - muls r0, r3 - adds r0, r5 - ldrh r0, [r0, 0x2C] - lsrs r0, 1 - str r0, [r1] - cmp r0, 0 - bne _080540F4 - movs r0, 0x1 - str r0, [r1] -_080540F4: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _0805412A - .pool -_08054110: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_0805412A: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atkBC_maxattackhalvehp - - thumb_func_start atkBD_copyfoestats -atkBD_copyfoestats: @ 8054134 - push {r4-r7,lr} - movs r2, 0 - ldr r7, =gBattlescriptCurrInstr - ldr r6, =gBankAttacker - movs r4, 0x58 - ldr r3, =gBattleMons + 0x18 - ldr r5, =gBankTarget -_08054142: - ldrb r0, [r6] - adds r1, r0, 0 - muls r1, r4 - adds r1, r2, r1 - adds r1, r3 - ldrb r0, [r5] - muls r0, r4 - adds r0, r2, r0 - adds r0, r3 - ldrb r0, [r0] - strb r0, [r1] - adds r2, 0x1 - cmp r2, 0x7 - ble _08054142 - ldr r0, [r7] - adds r0, 0x5 - str r0, [r7] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkBD_copyfoestats - - thumb_func_start atkBE_breakfree -atkBE_breakfree: @ 805417C - push {r4-r6,lr} - ldr r1, =gBattleMons - ldr r5, =gBankAttacker - ldrb r2, [r5] - movs r6, 0x58 - adds r0, r2, 0 - muls r0, r6 - adds r4, r1, 0 - adds r4, 0x50 - adds r0, r4 - ldr r0, [r0] - movs r1, 0xE0 - lsls r1, 8 - ands r0, r1 - cmp r0, 0 - beq _08054210 - ldr r1, =gBattleScripting - ldr r3, =gBankTarget - ldrb r0, [r3] - strb r0, [r1, 0x17] - ldrb r0, [r5] - adds r1, r0, 0 - muls r1, r6 - adds r1, r4 - ldr r0, [r1] - ldr r2, =0xffff1fff - ands r0, r2 - str r0, [r1] - ldrb r0, [r5] - ldr r1, =gBattleStruct - ldr r2, [r1] - adds r0, r2 - ldrb r0, [r0, 0x14] - strb r0, [r3] - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x2 - strb r0, [r1, 0x1] - ldrb r0, [r5] - lsls r0, 1 - adds r0, r2 - ldrb r0, [r0, 0x4] - strb r0, [r1, 0x2] - ldrb r0, [r5] - lsls r0, 1 - adds r0, r2 - ldrb r0, [r0, 0x5] - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - bl BattleScriptPushCursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAFC5 - b _080542BA - .pool -_08054210: - ldr r4, =gStatuses3 - lsls r0, r2, 2 - adds r3, r0, r4 - ldr r1, [r3] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _08054250 - movs r0, 0x5 - negs r0, r0 - ands r1, r0 - str r1, [r3] - ldrb r1, [r5] - lsls r1, 2 - adds r1, r4 - ldr r0, [r1] - movs r2, 0x4 - negs r2, r2 - ands r0, r2 - str r0, [r1] - bl BattleScriptPushCursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAFD6 - b _080542BA - .pool -_08054250: - adds r0, r2, 0 - bl GetBankSide - ldr r4, =gSideAffecting - lsls r0, 24 - lsrs r0, 23 - adds r0, r4 - ldrh r1, [r0] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _080542B4 - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - lsrs r0, 23 - adds r0, r4 - ldrh r2, [r0] - ldr r1, =0x0000ffef - ands r1, r2 - movs r4, 0 - strh r1, [r0] - ldrb r0, [r5] - bl GetBankSide - ldr r2, =gSideTimers - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - adds r1, r2 - strb r4, [r1, 0xA] - bl BattleScriptPushCursor - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAFDD - b _080542BA - .pool -_080542B4: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 -_080542BA: - str r0, [r1] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atkBE_breakfree - - thumb_func_start atkBF_set_defense_curl -atkBF_set_defense_curl: @ 80542C8 - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r2, r0 - adds r1, 0x50 - adds r2, r1 - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 23 - orrs r0, r1 - str r0, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end atkBF_set_defense_curl - - thumb_func_start atkC0_recoverbasedonsunlight -atkC0_recoverbasedonsunlight: @ 80542F8 - push {r4-r7,lr} - sub sp, 0x4 - ldr r1, =gBankTarget - ldr r5, =gBankAttacker - ldrb r0, [r5] - strb r0, [r1] - ldr r7, =gBattleMons - ldrb r0, [r5] - movs r6, 0x58 - muls r0, r6 - adds r0, r7 - ldrh r1, [r0, 0x28] - ldrh r0, [r0, 0x2C] - cmp r1, r0 - beq _080543D8 - ldr r4, =gBattleWeather - ldrh r0, [r4] - cmp r0, 0 - beq _0805434A - movs r0, 0 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0xD - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - bne _0805434A - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0x4D - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _08054378 -_0805434A: - ldr r3, =gBattleMoveDamage - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r0, [r0, 0x2C] - lsrs r0, 1 - str r0, [r3] - adds r1, r3, 0 - b _080543B2 - .pool -_08054378: - ldrh r1, [r4] - movs r0, 0x60 - ands r0, r1 - cmp r0, 0 - beq _080543A4 - ldr r4, =gBattleMoveDamage - ldrb r0, [r5] - muls r0, r6 - adds r0, r7 - ldrh r1, [r0, 0x2C] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - movs r1, 0x1E - bl __divsi3 - str r0, [r4] - adds r1, r4, 0 - b _080543B2 - .pool -_080543A4: - ldr r1, =gBattleMoveDamage - ldrb r0, [r5] - muls r0, r6 - adds r0, r7 - ldrh r0, [r0, 0x2C] - lsrs r0, 2 - str r0, [r1] -_080543B2: - adds r2, r1, 0 - ldr r0, [r2] - cmp r0, 0 - bne _080543BE - movs r0, 0x1 - str r0, [r2] -_080543BE: - ldr r0, [r1] - negs r0, r0 - str r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _080543F2 - .pool -_080543D8: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_080543F2: - add sp, 0x4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkC0_recoverbasedonsunlight - - thumb_func_start atkC1_hidden_power -atkC1_hidden_power: @ 8054400 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - adds r4, r1, 0 - muls r4, r0 - adds r4, r2 - ldrb r0, [r4, 0x14] - mov r10, r0 - mov r7, r10 - lsls r7, 27 - adds r0, r7, 0 - lsrs r0, 27 - mov r10, r0 - movs r1, 0x2 - mov r2, r10 - ands r2, r1 - asrs r2, 1 - ldrh r7, [r4, 0x14] - mov r9, r7 - mov r0, r9 - lsls r0, 22 - mov r9, r0 - lsrs r3, r0, 27 - adds r0, r1, 0 - ands r0, r3 - orrs r2, r0 - ldrb r7, [r4, 0x15] - mov r8, r7 - mov r0, r8 - lsls r0, 25 - mov r8, r0 - lsrs r3, r0, 27 - adds r0, r1, 0 - ands r0, r3 - lsls r0, 1 - orrs r2, r0 - ldr r6, [r4, 0x14] - lsls r6, 12 - lsrs r3, r6, 27 - adds r0, r1, 0 - ands r0, r3 - lsls r0, 2 - orrs r2, r0 - ldrh r5, [r4, 0x16] - lsls r5, 23 - lsrs r3, r5, 27 - adds r0, r1, 0 - ands r0, r3 - lsls r0, 3 - orrs r2, r0 - ldrb r3, [r4, 0x17] - lsls r3, 26 - lsrs r0, r3, 27 - ands r1, r0 - lsls r1, 4 - orrs r2, r1 - movs r1, 0x1 - adds r4, r1, 0 - mov r7, r10 - ands r4, r7 - mov r0, r9 - lsrs r0, 27 - mov r9, r0 - adds r0, r1, 0 - mov r7, r9 - ands r0, r7 - lsls r0, 1 - orrs r4, r0 - mov r0, r8 - lsrs r0, 27 - mov r8, r0 - adds r0, r1, 0 - mov r7, r8 - ands r0, r7 - lsls r0, 2 - orrs r4, r0 - lsrs r6, 27 - adds r0, r1, 0 - ands r0, r6 - lsls r0, 3 - orrs r4, r0 - lsrs r5, 27 - adds r0, r1, 0 - ands r0, r5 - lsls r0, 4 - orrs r4, r0 - lsrs r3, 27 - ands r1, r3 - lsls r1, 5 - orrs r4, r1 - ldr r5, =gDynamicBasePower - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - movs r1, 0x3F - bl __divsi3 - adds r0, 0x1E - strh r0, [r5] - ldr r6, =gBattleStruct - ldr r5, [r6] - lsls r0, r4, 4 - subs r0, r4 - movs r1, 0x3F - bl __divsi3 - adds r0, 0x1 - strb r0, [r5, 0x13] - ldr r1, [r6] - ldrb r0, [r1, 0x13] - cmp r0, 0x8 - bls _080544F0 - adds r0, 0x1 - strb r0, [r1, 0x13] -_080544F0: - ldr r2, [r6] - ldrb r0, [r2, 0x13] - movs r1, 0xC0 - orrs r0, r1 - strb r0, [r2, 0x13] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkC1_hidden_power - - thumb_func_start atkC2_selectnexttarget -atkC2_selectnexttarget: @ 8054524 - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r0, =gBankTarget - movs r1, 0 - strb r1, [r0] - ldr r1, =gNoOfAllBanks - ldrb r1, [r1] - adds r6, r0, 0 - ldr r0, =gBattlescriptCurrInstr - mov r8, r0 - cmp r1, 0 - beq _0805456E - adds r3, r6, 0 - ldr r0, =gBankAttacker - ldrb r5, [r0] - ldr r0, =gBitTable - mov r12, r0 - adds r4, r1, 0 - ldr r7, =gAbsentBankFlags -_0805454C: - ldrb r2, [r3] - cmp r2, r5 - beq _08054562 - ldrb r0, [r7] - ldrb r1, [r6] - lsls r1, 2 - add r1, r12 - ldr r1, [r1] - ands r0, r1 - cmp r0, 0 - beq _0805456E -_08054562: - adds r0, r2, 0x1 - strb r0, [r3] - lsls r0, 24 - lsrs r0, 24 - cmp r0, r4 - bcc _0805454C -_0805456E: - mov r1, r8 - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkC2_selectnexttarget - - thumb_func_start atkC3_setfutureattack -atkC3_setfutureattack: @ 8054598 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x14 - ldr r0, =gWishFutureKnock - mov r8, r0 - ldr r6, =gBankTarget - ldrb r1, [r6] - adds r0, r1, r0 - ldrb r7, [r0] - cmp r7, 0 - beq _080545DC - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _080546CC - .pool -_080545DC: - adds r0, r1, 0 - bl GetBankIdentity - ldr r4, =gSideAffecting - lsls r0, 24 - lsrs r0, 24 - movs r1, 0x1 - mov r10, r1 - ands r0, r1 - lsls r0, 1 - adds r0, r4 - ldrh r2, [r0] - movs r1, 0x40 - movs r5, 0 - mov r3, sp - strh r5, [r3, 0x10] - orrs r1, r2 - strh r1, [r0] - ldrb r0, [r6] - lsls r0, 1 - mov r1, r8 - adds r1, 0x18 - adds r0, r1 - ldr r1, =gCurrentMove - mov r9, r1 - ldrh r1, [r1] - strh r1, [r0] - mov r0, r8 - adds r0, 0x4 - ldrb r2, [r6] - adds r0, r2 - ldr r5, =gBankAttacker - ldrb r1, [r5] - strb r1, [r0] - ldrb r0, [r6] - add r0, r8 - movs r1, 0x3 - strb r1, [r0] - ldrb r0, [r6] - bl GetBankIdentity - mov r1, r10 - ands r1, r0 - lsls r1, 1 - adds r1, r4 - ldrh r3, [r1] - ldrb r0, [r5] - movs r4, 0x58 - muls r0, r4 - ldr r2, =gBattleMons - adds r0, r2 - ldrb r1, [r6] - muls r1, r4 - adds r1, r2 - mov r4, r9 - ldrh r2, [r4] - str r7, [sp] - str r7, [sp, 0x4] - ldrb r4, [r5] - str r4, [sp, 0x8] - ldrb r4, [r6] - str r4, [sp, 0xC] - bl CalculateBaseDamage - ldrb r1, [r6] - lsls r1, 2 - mov r2, r8 - adds r2, 0x8 - adds r1, r2 - str r0, [r1] - ldr r1, =gProtectStructs - ldrb r0, [r5] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 28 - cmp r0, 0 - bge _0805468C - ldrb r4, [r6] - lsls r4, 2 - adds r4, r2 - ldr r1, [r4] - lsls r0, r1, 4 - subs r0, r1 - movs r1, 0xA - bl __divsi3 - str r0, [r4] -_0805468C: - mov r5, r9 - ldrh r1, [r5] - ldr r0, =0x00000161 - cmp r1, r0 - bne _080546BC - ldr r0, =gBattleCommunication - mov r1, r10 - strb r1, [r0, 0x5] - b _080546C4 - .pool -_080546BC: - ldr r0, =gBattleCommunication - mov r2, sp - ldrb r2, [r2, 0x10] - strb r2, [r0, 0x5] -_080546C4: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_080546CC: - add sp, 0x14 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkC3_setfutureattack - - thumb_func_start atkC4_beat_up -atkC4_beat_up: @ 80546E4 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - ldr r7, =gEnemyParty - cmp r0, 0 - bne _080546FE - ldr r7, =gPlayerParty -_080546FE: - ldr r2, =gBattleMons - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _08054740 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - b _080548DC - .pool -_08054740: - ldr r6, =gBattleCommunication - ldrb r0, [r6] - mov r8, r0 - cmp r0, 0x5 - bls _0805474C - b _080548A8 -_0805474C: - adds r4, r6, 0 - movs r5, 0x64 -_08054750: - ldrb r0, [r4] - muls r0, r5 - adds r0, r7, r0 - movs r1, 0x39 - bl GetMonData - cmp r0, 0 - beq _08054794 - ldrb r0, [r6] - muls r0, r5 - adds r0, r7, r0 - movs r1, 0x41 - bl GetMonData - cmp r0, 0 - beq _08054794 - ldrb r0, [r4] - muls r0, r5 - adds r0, r7, r0 - movs r1, 0x41 - bl GetMonData - movs r1, 0xCE - lsls r1, 1 - cmp r0, r1 - beq _08054794 - ldrb r0, [r4] - muls r0, r5 - adds r0, r7, r0 - movs r1, 0x37 - bl GetMonData - cmp r0, 0 - beq _080547A4 -_08054794: - ldrb r0, [r4] - adds r0, 0x1 - strb r0, [r4] - adds r6, r4, 0 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x5 - bls _08054750 -_080547A4: - ldr r1, =gBattleCommunication - mov r9, r1 - ldrb r2, [r1] - cmp r2, 0x5 - bhi _080548A8 - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x4 - strb r0, [r1, 0x1] - ldr r6, =gBankAttacker - ldrb r0, [r6] - strb r0, [r1, 0x2] - strb r2, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x9 - str r0, [r1] - ldr r2, =gBattleMoveDamage - mov r8, r2 - ldr r5, =gBaseStats - mov r1, r9 - ldrb r0, [r1] - movs r4, 0x64 - muls r0, r4 - adds r0, r7, r0 - movs r1, 0xB - bl GetMonData - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r1, r5 - ldrb r3, [r1, 0x1] - mov r2, r8 - str r3, [r2] - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x1] - muls r0, r3 - mov r1, r8 - str r0, [r1] - mov r2, r9 - ldrb r0, [r2] - muls r0, r4 - adds r0, r7, r0 - movs r1, 0x38 - bl GetMonData - lsls r0, 1 - movs r1, 0x5 - bl __udivsi3 - adds r0, 0x2 - mov r2, r8 - ldr r1, [r2] - muls r0, r1 - str r0, [r2] - ldr r3, =gBattleMons - ldr r1, =gBankTarget - ldrb r2, [r1] - movs r1, 0x58 - muls r1, r2 - adds r1, r3 - ldrh r2, [r1] - lsls r1, r2, 3 - subs r1, r2 - lsls r1, 2 - adds r1, r5 - ldrb r1, [r1, 0x2] - bl __divsi3 - mov r1, r8 - str r0, [r1] - movs r1, 0x32 - bl __divsi3 - adds r2, r0, 0x2 - mov r0, r8 - str r2, [r0] - ldr r1, =gProtectStructs - ldrb r0, [r6] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 28 - cmp r0, 0 - bge _08054870 - lsls r0, r2, 4 - subs r0, r2 - movs r1, 0xA - bl __divsi3 - mov r1, r8 - str r0, [r1] -_08054870: - mov r2, r9 - ldrb r0, [r2] - adds r0, 0x1 - strb r0, [r2] - b _080548E2 - .pool -_080548A8: - mov r0, r8 - cmp r0, 0 - beq _080548C8 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - b _080548DC - .pool -_080548C8: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x5] - ldrb r0, [r2, 0x6] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x7] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x8] -_080548DC: - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_080548E2: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkC4_beat_up - - thumb_func_start atkC5_hidepreattack -atkC5_hidepreattack: @ 80548F4 - push {lr} - ldr r0, =gCurrentMove - ldrh r1, [r0] - cmp r1, 0x5B - beq _08054934 - cmp r1, 0x5B - bgt _0805490C - cmp r1, 0x13 - beq _08054918 - b _08054960 - .pool -_0805490C: - ldr r0, =0x00000123 - cmp r1, r0 - beq _0805494C - adds r0, 0x31 - cmp r1, r0 - bne _08054960 -_08054918: - ldr r2, =gStatuses3 - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r1, 2 - adds r1, r2 - ldr r0, [r1] - movs r2, 0x40 - b _0805495C - .pool -_08054934: - ldr r2, =gStatuses3 - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r1, 2 - adds r1, r2 - ldr r0, [r1] - movs r2, 0x80 - b _0805495C - .pool -_0805494C: - ldr r2, =gStatuses3 - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r1, 2 - adds r1, r2 - ldr r0, [r1] - movs r2, 0x80 - lsls r2, 11 -_0805495C: - orrs r0, r2 - str r0, [r1] -_08054960: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atkC5_hidepreattack - - thumb_func_start atkC6_unhidepostattack -atkC6_unhidepostattack: @ 8054978 - push {lr} - ldr r0, =gCurrentMove - ldrh r1, [r0] - cmp r1, 0x5B - beq _080549BC - cmp r1, 0x5B - bgt _08054990 - cmp r1, 0x13 - beq _0805499C - b _080549EA - .pool -_08054990: - ldr r0, =0x00000123 - cmp r1, r0 - beq _080549D8 - adds r0, 0x31 - cmp r1, r0 - bne _080549EA -_0805499C: - ldr r2, =gStatuses3 - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r1, 2 - adds r1, r2 - ldr r0, [r1] - movs r2, 0x41 - negs r2, r2 - b _080549E6 - .pool -_080549BC: - ldr r2, =gStatuses3 - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r1, 2 - adds r1, r2 - ldr r0, [r1] - movs r2, 0x81 - negs r2, r2 - b _080549E6 - .pool -_080549D8: - ldr r2, =gStatuses3 - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r1, 2 - adds r1, r2 - ldr r0, [r1] - ldr r2, =0xfffbffff -_080549E6: - ands r0, r2 - str r0, [r1] -_080549EA: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atkC6_unhidepostattack - - thumb_func_start atkC7_setminimize -atkC7_setminimize: @ 8054A08 - push {lr} - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 18 - ands r0, r1 - cmp r0, 0 - beq _08054A2C - ldr r2, =gStatuses3 - ldr r0, =gBankAttacker - ldrb r1, [r0] - lsls r1, 2 - adds r1, r2 - ldr r0, [r1] - movs r2, 0x80 - lsls r2, 1 - orrs r0, r2 - str r0, [r1] -_08054A2C: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atkC7_setminimize - - thumb_func_start atkC8_sethail -atkC8_sethail: @ 8054A48 - push {lr} - ldr r3, =gBattleWeather - ldrh r1, [r3] - movs r2, 0x80 - adds r0, r2, 0 - ands r0, r1 - cmp r0, 0 - beq _08054A78 - ldr r2, =gBattleMoveFlags - ldrb r0, [r2] - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0x2 - strb r0, [r1, 0x5] - b _08054A86 - .pool -_08054A78: - strh r2, [r3] - ldr r0, =gBattleCommunication - movs r1, 0x5 - strb r1, [r0, 0x5] - ldr r0, =gWishFutureKnock - adds r0, 0x28 - strb r1, [r0] -_08054A86: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atkC8_sethail - - thumb_func_start atkC9_jumpifattackandspecialattackcannotfall -atkC9_jumpifattackandspecialattackcannotfall: @ 8054AA0 - push {r4,lr} - ldr r2, =gBattleMons - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r1, r0, r2 - movs r0, 0x19 - ldrsb r0, [r1, r0] - adds r3, r2, 0 - cmp r0, 0 - bne _08054AF4 - movs r0, 0x1C - ldrsb r0, [r1, r0] - cmp r0, 0 - bne _08054AF4 - ldr r0, =gBattleCommunication - ldrb r0, [r0, 0x6] - cmp r0, 0x1 - beq _08054AF4 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08054B20 - .pool -_08054AF4: - ldr r4, =gActiveBank - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r4] - ldr r2, =gBattleMoveDamage - ldrb r1, [r4] - movs r0, 0x58 - muls r0, r1 - adds r0, r3 - ldrh r0, [r0, 0x28] - str r0, [r2] - ldr r1, =0x00007fff - movs r0, 0 - bl EmitHealthBarUpdate - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_08054B20: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkC9_jumpifattackandspecialattackcannotfall - - thumb_func_start atkCA_setforcedtarget -atkCA_setforcedtarget: @ 8054B3C - push {r4,r5,lr} - ldr r4, =gBankAttacker - ldrb r0, [r4] - bl GetBankSide - ldr r5, =gSideTimers - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - adds r1, r5 - movs r0, 0x1 - strb r0, [r1, 0x8] - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - adds r1, r5 - ldrb r0, [r4] - strb r0, [r1, 0x9] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atkCA_setforcedtarget - - thumb_func_start atkCB_setcharge -atkCB_setcharge: @ 8054B88 - push {r4,lr} - ldr r0, =gStatuses3 - ldr r3, =gBankAttacker - ldrb r1, [r3] - lsls r1, 2 - adds r1, r0 - ldr r0, [r1] - movs r2, 0x80 - lsls r2, 2 - orrs r0, r2 - str r0, [r1] - ldr r4, =gDisableStructs - ldrb r1, [r3] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r2, [r0, 0x12] - movs r1, 0x10 - negs r1, r1 - ands r1, r2 - movs r2, 0x2 - orrs r1, r2 - strb r1, [r0, 0x12] - ldrb r1, [r3] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r2, [r0, 0x12] - movs r1, 0xF - ands r1, r2 - movs r2, 0x20 - orrs r1, r2 - strb r1, [r0, 0x12] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkCB_setcharge - - thumb_func_start atkCC_callterrainattack -atkCC_callterrainattack: @ 8054BEC - push {r4,lr} - ldr r2, =gHitMarker - ldr r0, [r2] - ldr r1, =0xfffffbff - ands r0, r1 - str r0, [r2] - ldr r4, =gCurrentMove - ldr r1, =gUnknown_0831C414 - ldr r0, =gUnknown_02022FF0 - ldrb r0, [r0] - lsls r0, 1 - adds r0, r1 - ldrh r0, [r0] - strh r0, [r4] - ldrh r0, [r4] - movs r1, 0 - bl GetMoveTarget - ldr r1, =gBankTarget - strb r0, [r1] - ldr r3, =gBattleScriptsForMoveEffects - ldr r2, =gBattleMoves - ldrh r1, [r4] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - bl BattleScriptPush - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkCC_callterrainattack - - thumb_func_start atkCD_cureifburnedparalysedorpoisoned -atkCD_cureifburnedparalysedorpoisoned: @ 8054C60 - push {r4-r6,lr} - sub sp, 0x4 - ldr r1, =gBattleMons - ldr r3, =gBankAttacker - ldrb r0, [r3] - movs r6, 0x58 - muls r0, r6 - adds r5, r1, 0 - adds r5, 0x4C - adds r2, r0, r5 - ldr r0, [r2] - movs r1, 0xD8 - ands r0, r1 - cmp r0, 0 - beq _08054CBC - movs r0, 0 - str r0, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - ldr r4, =gActiveBank - ldrb r0, [r3] - strb r0, [r4] - ldrb r0, [r4] - muls r0, r6 - adds r0, r5 - str r0, [sp] - movs r0, 0 - movs r1, 0x28 - movs r2, 0 - movs r3, 0x4 - bl EmitSetMonData - ldrb r0, [r4] - bl MarkBufferBankForExecution - b _08054CD6 - .pool -_08054CBC: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_08054CD6: - add sp, 0x4 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atkCD_cureifburnedparalysedorpoisoned - - thumb_func_start atkCE_settorment -atkCE_settorment: @ 8054CE4 - push {lr} - ldr r1, =gBattleMons - ldr r0, =gBankTarget - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r1, [r0] - movs r2, 0x80 - lsls r2, 24 - cmp r1, 0 - bge _08054D28 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08054D34 - .pool -_08054D28: - orrs r1, r2 - str r1, [r0] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_08054D34: - pop {r0} - bx r0 - .pool - thumb_func_end atkCE_settorment - - thumb_func_start atkCF_jumpifnodamage -atkCF_jumpifnodamage: @ 8054D3C - push {lr} - ldr r2, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r1, r0, 4 - adds r0, r2, 0x4 - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - bne _08054D5C - adds r0, r2, 0 - adds r0, 0x8 - adds r0, r1, r0 - ldr r0, [r0] - cmp r0, 0 - beq _08054D74 -_08054D5C: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _08054D8E - .pool -_08054D74: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_08054D8E: - pop {r0} - bx r0 - .pool - thumb_func_end atkCF_jumpifnodamage - - thumb_func_start atkD0_settaunt -atkD0_settaunt: @ 8054D98 - push {r4,lr} - ldr r4, =gDisableStructs - ldr r3, =gBankTarget - ldrb r0, [r3] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r2, r1, r4 - ldrb r1, [r2, 0x13] - lsls r0, r1, 28 - cmp r0, 0 - bne _08054DE8 - movs r0, 0x10 - negs r0, r0 - ands r0, r1 - movs r1, 0x2 - orrs r0, r1 - strb r0, [r2, 0x13] - ldrb r1, [r3] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r4 - ldrb r2, [r0, 0x13] - movs r1, 0xF - ands r1, r2 - movs r2, 0x20 - orrs r1, r2 - strb r1, [r0, 0x13] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _08054E02 - .pool -_08054DE8: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_08054E02: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkD0_settaunt - - thumb_func_start atkD1_set_helpinghand -atkD1_set_helpinghand: @ 8054E0C - push {r4,lr} - ldr r4, =gBankAttacker - ldrb r0, [r4] - bl GetBankIdentity - movs r1, 0x2 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - ldr r3, =gBankTarget - strb r0, [r3] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08054E90 - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r2, =gBitTable - ldrb r3, [r3] - lsls r0, r3, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _08054E90 - ldr r1, =gProtectStructs - ldrb r0, [r4] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0] - lsls r0, 28 - cmp r0, 0 - blt _08054E90 - lsls r0, r3, 4 - adds r2, r0, r1 - ldrb r1, [r2] - lsls r0, r1, 28 - cmp r0, 0 - blt _08054E90 - movs r0, 0x8 - orrs r0, r1 - strb r0, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _08054EAA - .pool -_08054E90: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_08054EAA: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkD1_set_helpinghand - - thumb_func_start atkD2_swap_items -atkD2_swap_items: @ 8054EB4 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - ldr r4, =gBattleTypeFlags - ldr r0, [r4] - movs r1, 0x80 - lsls r1, 19 - ands r0, r1 - cmp r0, 0 - bne _08054F9A - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _08054EE8 - ldr r0, [r4] - ldr r1, =0x0a3f0902 - ands r0, r1 - cmp r0, 0 - beq _08054F9A -_08054EE8: - ldr r6, =gBankAttacker - ldrb r0, [r6] - bl GetBankSide - lsls r0, 24 - lsrs r4, r0, 24 - ldr r7, =gBankTarget - ldrb r0, [r7] - bl GetBankSide - lsls r0, 24 - lsrs r5, r0, 24 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ldr r1, =0x0a3f0902 - ands r0, r1 - cmp r0, 0 - bne _08054F46 - ldr r0, =gWishFutureKnock - adds r2, r0, 0 - adds r2, 0x29 - adds r0, r4, r2 - ldrb r1, [r0] - ldr r4, =gBitTable - ldr r3, =gBattlePartyID - ldrb r0, [r6] - lsls r0, 1 - adds r0, r3 - ldrh r0, [r0] - lsls r0, 2 - adds r0, r4 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _08054F9A - adds r0, r5, r2 - ldrb r1, [r0] - ldrb r0, [r7] - lsls r0, 1 - adds r0, r3 - ldrh r0, [r0] - lsls r0, 2 - adds r0, r4 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _08054F9A -_08054F46: - ldr r0, =gBattleMons - mov r8, r0 - ldr r1, =gBankAttacker - ldrb r4, [r1] - movs r5, 0x58 - adds r0, r4, 0 - muls r0, r5 - add r0, r8 - mov r9, r0 - ldrh r3, [r0, 0x2E] - adds r1, r3, 0 - cmp r1, 0 - bne _08054F6E - ldr r0, =gBankTarget - ldrb r0, [r0] - muls r0, r5 - add r0, r8 - ldrh r0, [r0, 0x2E] - cmp r0, 0 - beq _08054F9A -_08054F6E: - cmp r1, 0xAF - beq _08054F9A - ldr r7, =gBankTarget - ldrb r0, [r7] - muls r0, r5 - mov r2, r8 - adds r1, r0, r2 - ldrh r2, [r1, 0x2E] - cmp r2, 0xAF - beq _08054F9A - adds r0, r3, 0 - subs r0, 0x79 - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0xB - bls _08054F9A - adds r0, r2, 0 - subs r0, 0x79 - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0xB - bhi _08054FDC -_08054F9A: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08055132 - .pool -_08054FDC: - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x3C - bne _08055010 - ldr r1, =gBattlescriptCurrInstr - ldr r0, =BattleScript_StickyHoldOnKnockOff - str r0, [r1] - ldr r1, =gLastUsedAbility - ldrb r0, [r7] - muls r0, r5 - add r0, r8 - adds r0, 0x20 - ldrb r0, [r0] - strb r0, [r1] - ldrb r0, [r7] - ldrb r1, [r1] - bl RecordAbilityBattle - b _08055132 - .pool -_08055010: - ldr r3, =gBattleStruct - mov r10, r3 - lsls r0, r4, 1 - adds r0, 0xD0 - ldr r1, [r3] - adds r6, r1, r0 - mov r0, r9 - ldrh r0, [r0, 0x2E] - mov r9, r0 - strh r2, [r6] - ldr r1, =gBankAttacker - ldrb r0, [r1] - muls r0, r5 - add r0, r8 - movs r1, 0 - strh r1, [r0, 0x2E] - ldrb r0, [r7] - muls r0, r5 - add r0, r8 - mov r2, r9 - strh r2, [r0, 0x2E] - ldr r4, =gActiveBank - ldr r3, =gBankAttacker - ldrb r0, [r3] - strb r0, [r4] - str r6, [sp] - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - movs r3, 0x2 - bl EmitSetMonData - ldr r1, =gBankAttacker - ldrb r0, [r1] - bl MarkBufferBankForExecution - ldrb r0, [r7] - strb r0, [r4] - ldrb r0, [r7] - muls r0, r5 - mov r1, r8 - adds r1, 0x2E - adds r0, r1 - str r0, [sp] - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - movs r3, 0x2 - bl EmitSetMonData - ldrb r0, [r7] - bl MarkBufferBankForExecution - ldrb r0, [r7] - mov r2, r10 - ldr r1, [r2] - lsls r0, 1 - adds r0, r1 - adds r0, 0xC8 - movs r3, 0 - strb r3, [r0] - ldrb r0, [r7] - ldr r1, [r2] - lsls r0, 1 - adds r0, r1 - adds r0, 0xC9 - strb r3, [r0] - ldr r1, =gBankAttacker - ldrb r0, [r1] - ldr r1, [r2] - lsls r0, 1 - adds r0, r1 - adds r0, 0xC8 - strb r3, [r0] - ldr r2, =gBankAttacker - ldrb r0, [r2] - mov r3, r10 - ldr r1, [r3] - lsls r0, 1 - adds r0, r1 - adds r0, 0xC9 - movs r1, 0 - strb r1, [r0] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - ldr r1, =gBattleTextBuff1 - movs r3, 0xFD - strb r3, [r1] - movs r2, 0xA - strb r2, [r1, 0x1] - ldrh r0, [r6] - strb r0, [r1, 0x2] - ldrh r0, [r6] - lsrs r0, 8 - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r1, =gBattleTextBuff2 - strb r3, [r1] - strb r2, [r1, 0x1] - mov r2, r9 - strb r2, [r1, 0x2] - mov r3, r9 - lsrs r0, r3, 8 - strb r0, [r1, 0x3] - movs r0, 0x1 - negs r0, r0 - strb r0, [r1, 0x4] - cmp r3, 0 - beq _08055118 - ldrh r0, [r6] - cmp r0, 0 - beq _0805512C - ldr r1, =gBattleCommunication - movs r0, 0x2 - b _08055130 - .pool -_08055118: - ldrh r0, [r6] - cmp r0, 0 - beq _0805512C - ldr r0, =gBattleCommunication - movs r1, 0 - strb r1, [r0, 0x5] - b _08055132 - .pool -_0805512C: - ldr r1, =gBattleCommunication - movs r0, 0x1 -_08055130: - strb r0, [r1, 0x5] -_08055132: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkD2_swap_items - - thumb_func_start atkD3_copy_ability -atkD3_copy_ability: @ 8055148 - push {r4,lr} - ldr r3, =gBattleMons - ldr r4, =gBankTarget - ldrb r0, [r4] - movs r2, 0x58 - muls r0, r2 - adds r0, r3 - adds r0, 0x20 - ldrb r1, [r0] - adds r0, r1, 0 - cmp r0, 0 - beq _0805519C - cmp r0, 0x19 - beq _0805519C - ldr r0, =gBankAttacker - ldrb r0, [r0] - muls r0, r2 - adds r0, r3 - adds r0, 0x20 - strb r1, [r0] - ldr r1, =gLastUsedAbility - ldrb r0, [r4] - muls r0, r2 - adds r0, r3 - adds r0, 0x20 - ldrb r0, [r0] - strb r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _080551B6 - .pool -_0805519C: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_080551B6: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkD3_copy_ability - - thumb_func_start atkD4_wish_effect -atkD4_wish_effect: @ 80551C0 - push {r4-r7,lr} - ldr r7, =gBattlescriptCurrInstr - ldr r2, [r7] - ldrb r3, [r2, 0x1] - cmp r3, 0 - beq _080551D8 - cmp r3, 0x1 - beq _08055210 - b _0805528C - .pool -_080551D8: - ldr r1, =gWishFutureKnock - ldr r4, =gBankAttacker - adds r0, r1, 0 - adds r0, 0x20 - ldrb r5, [r4] - adds r3, r0, r5 - ldrb r0, [r3] - cmp r0, 0 - bne _0805525C - movs r0, 0x2 - strb r0, [r3] - ldrb r0, [r4] - adds r1, 0x24 - adds r1, r0, r1 - ldr r2, =gBattlePartyID - lsls r0, 1 - adds r0, r2 - ldrh r0, [r0] - strb r0, [r1] - ldr r0, [r7] - adds r0, 0x6 - b _0805528A - .pool -_08055210: - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x4 - strb r0, [r1, 0x1] - ldr r4, =gBankTarget - ldrb r0, [r4] - strb r0, [r1, 0x2] - ldr r0, =gWishFutureKnock - adds r0, 0x24 - ldrb r5, [r4] - adds r0, r5 - ldrb r0, [r0] - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r1, =gBattleMoveDamage - ldr r6, =gBattleMons - ldrb r0, [r4] - movs r5, 0x58 - muls r0, r5 - adds r0, r6 - ldrh r0, [r0, 0x2C] - lsrs r0, 1 - str r0, [r1] - cmp r0, 0 - bne _08055248 - str r3, [r1] -_08055248: - ldr r0, [r1] - negs r0, r0 - str r0, [r1] - ldrb r0, [r4] - muls r0, r5 - adds r0, r6 - ldrh r1, [r0, 0x28] - ldrh r0, [r0, 0x2C] - cmp r1, r0 - bne _08055288 -_0805525C: - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r7] - b _0805528C - .pool -_08055288: - adds r0, r2, 0x6 -_0805528A: - str r0, [r7] -_0805528C: - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end atkD4_wish_effect - - thumb_func_start atkD5_setroots -atkD5_setroots: @ 8055294 - push {lr} - ldr r1, =gStatuses3 - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 2 - adds r2, r0, r1 - ldr r1, [r2] - movs r3, 0x80 - lsls r3, 3 - adds r0, r1, 0 - ands r0, r3 - cmp r0, 0 - beq _080552D8 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _080552E4 - .pool -_080552D8: - orrs r1, r3 - str r1, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_080552E4: - pop {r0} - bx r0 - .pool - thumb_func_end atkD5_setroots - - thumb_func_start atkD6_doubledamagedealtifdamaged -atkD6_doubledamagedealtifdamaged: @ 80552EC - push {lr} - ldr r3, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r2, r0, 4 - adds r0, r3, 0x4 - adds r0, r2, r0 - ldr r0, [r0] - cmp r0, 0 - beq _0805530C - adds r0, r2, r3 - ldr r1, =gBankTarget - ldrb r0, [r0, 0xC] - ldrb r1, [r1] - cmp r0, r1 - beq _08055324 -_0805530C: - adds r0, r3, 0 - adds r0, 0x8 - adds r0, r2, r0 - ldr r0, [r0] - cmp r0, 0 - beq _0805532A - adds r0, r2, r3 - ldr r1, =gBankTarget - ldrb r0, [r0, 0xD] - ldrb r1, [r1] - cmp r0, r1 - bne _0805532A -_08055324: - ldr r1, =gBattleScripting - movs r0, 0x2 - strb r0, [r1, 0xE] -_0805532A: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atkD6_doubledamagedealtifdamaged - - thumb_func_start atkD7_setyawn -atkD7_setyawn: @ 805534C - push {r4,lr} - ldr r1, =gStatuses3 - ldr r0, =gBankTarget - ldrb r3, [r0] - lsls r0, r3, 2 - adds r4, r0, r1 - ldr r2, [r4] - movs r0, 0xC0 - lsls r0, 5 - ands r0, r2 - cmp r0, 0 - bne _08055374 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r3 - adds r1, 0x4C - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0 - beq _080553A0 -_08055374: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _080553B0 - .pool -_080553A0: - movs r0, 0x80 - lsls r0, 5 - orrs r2, r0 - str r2, [r4] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_080553B0: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkD7_setyawn - - thumb_func_start atkD8_setdamagetohealthdifference -atkD8_setdamagetohealthdifference: @ 80553BC - push {lr} - ldr r2, =gBattleMons - ldr r0, =gBankTarget - ldrb r0, [r0] - movs r1, 0x58 - muls r0, r1 - adds r3, r0, r2 - ldr r0, =gBankAttacker - ldrb r0, [r0] - muls r0, r1 - adds r1, r0, r2 - ldrh r0, [r3, 0x28] - ldrh r2, [r1, 0x28] - cmp r0, r2 - bhi _08055408 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _0805541A - .pool -_08055408: - ldr r2, =gBattleMoveDamage - ldrh r0, [r3, 0x28] - ldrh r1, [r1, 0x28] - subs r0, r1 - str r0, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_0805541A: - pop {r0} - bx r0 - .pool - thumb_func_end atkD8_setdamagetohealthdifference - - thumb_func_start atkD9_scaledamagebyhealthratio -atkD9_scaledamagebyhealthratio: @ 8055428 - push {r4,lr} - ldr r4, =gDynamicBasePower - ldrh r0, [r4] - cmp r0, 0 - bne _08055464 - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r3, [r0, 0x1] - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r1, r0 - adds r1, r2 - ldrh r0, [r1, 0x28] - muls r0, r3 - ldrh r1, [r1, 0x2C] - bl __divsi3 - strh r0, [r4] - lsls r0, 16 - cmp r0, 0 - bne _08055464 - movs r0, 0x1 - strh r0, [r4] -_08055464: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkD9_scaledamagebyhealthratio - - thumb_func_start atkDA_abilityswap -atkDA_abilityswap: @ 805548C - push {r4-r6,lr} - ldr r5, =gBattleMons - ldr r0, =gBankAttacker - ldrb r0, [r0] - movs r4, 0x58 - muls r0, r4 - adds r0, r5 - adds r2, r0, 0 - adds r2, 0x20 - ldrb r1, [r2] - cmp r1, 0 - bne _080554B4 - ldr r0, =gBankTarget - ldrb r0, [r0] - muls r0, r4 - adds r0, r5 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0 - beq _080554D4 -_080554B4: - cmp r1, 0x19 - beq _080554D4 - ldr r6, =gBankTarget - ldrb r0, [r6] - muls r0, r4 - adds r0, r5 - adds r0, 0x20 - ldrb r3, [r0] - cmp r3, 0x19 - beq _080554D4 - ldr r0, =gBattleMoveFlags - ldrb r1, [r0] - movs r0, 0x29 - ands r0, r1 - cmp r0, 0 - beq _08055504 -_080554D4: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _0805551A - .pool -_08055504: - ldrb r1, [r2] - strb r3, [r2] - ldrb r0, [r6] - muls r0, r4 - adds r0, r5 - adds r0, 0x20 - strb r1, [r0] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_0805551A: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atkDA_abilityswap - - thumb_func_start atkDB_imprisoneffect -atkDB_imprisoneffect: @ 8055524 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - ldr r1, =gStatuses3 - ldr r4, =gBankAttacker - ldrb r2, [r4] - lsls r0, r2, 2 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 6 - ands r0, r1 - cmp r0, 0 - beq _08055574 - b _080555F6 - .pool -_0805554C: - ldr r0, =gStatuses3 - mov r2, r9 - ldrb r1, [r2] - lsls r1, 2 - adds r1, r0 - ldr r0, [r1] - movs r2, 0x80 - lsls r2, 6 - orrs r0, r2 - str r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _080555EE - .pool -_08055574: - adds r0, r2, 0 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - ldrb r0, [r4] - bl sub_803F548 - movs r6, 0 - b _080555E6 -_0805558A: - adds r0, r6, 0 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r8, r0 - beq _080555E0 - movs r4, 0 - ldr r7, =gBankAttacker - mov r9, r7 - ldr r0, =gBattleMons - mov r12, r0 - mov r1, r9 - ldrb r0, [r1] - mov r2, r12 - adds r2, 0xC - movs r1, 0x58 - muls r0, r1 - adds r3, r0, r2 - adds r5, r6, 0 - muls r5, r1 -_080555B4: - movs r2, 0 - ldrh r1, [r3] - mov r0, r12 - adds r0, 0xC - adds r0, r5, r0 -_080555BE: - ldrh r7, [r0] - cmp r1, r7 - bne _080555C8 - cmp r1, 0 - bne _080555D0 -_080555C8: - adds r0, 0x2 - adds r2, 0x1 - cmp r2, 0x3 - ble _080555BE -_080555D0: - cmp r2, 0x4 - bne _080555DC - adds r3, 0x2 - adds r4, 0x1 - cmp r4, 0x3 - ble _080555B4 -_080555DC: - cmp r4, 0x4 - bne _0805554C -_080555E0: - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 -_080555E6: - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r6, r0 - bcc _0805558A -_080555EE: - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r6, r0 - bne _08055610 -_080555F6: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_08055610: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkDB_imprisoneffect - - thumb_func_start atkDC_setgrudge -atkDC_setgrudge: @ 805562C - push {lr} - ldr r1, =gStatuses3 - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 2 - adds r2, r0, r1 - ldr r1, [r2] - movs r3, 0x80 - lsls r3, 7 - adds r0, r1, 0 - ands r0, r3 - cmp r0, 0 - beq _08055670 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _0805567C - .pool -_08055670: - orrs r1, r3 - str r1, [r2] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_0805567C: - pop {r0} - bx r0 - .pool - thumb_func_end atkDC_setgrudge - - thumb_func_start atkDD_weightdamagecalculation -atkDD_weightdamagecalculation: @ 8055684 - push {r4-r7,lr} - mov r7, r8 - push {r7} - movs r5, 0 - ldr r2, =gUnknown_0831C428 - ldrh r0, [r2] - ldr r1, =0x0000ffff - cmp r0, r1 - beq _080556FC - adds r6, r2, 0 - ldr r0, =gBattleMons - mov r8, r0 - adds r7, r1, 0 - adds r4, r6, 0 -_080556A0: - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - add r0, r8 - ldrh r0, [r0] - bl SpeciesToNationalPokedexNum - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - bl GetPokedexHeightWeight - ldrh r1, [r4] - lsls r0, 16 - lsrs r0, 16 - cmp r1, r0 - bhi _080556CE - adds r4, 0x4 - adds r5, 0x2 - ldrh r0, [r4] - cmp r0, r7 - bne _080556A0 -_080556CE: - lsls r0, r5, 1 - adds r0, r6 - ldrh r1, [r0] - ldr r0, =0x0000ffff - cmp r1, r0 - beq _080556FC - ldr r0, =gDynamicBasePower - adds r1, r5, 0x1 - lsls r1, 1 - adds r1, r6 - ldrh r1, [r1] - strh r1, [r0] - b _08055702 - .pool -_080556FC: - ldr r1, =gDynamicBasePower - movs r0, 0x78 - strh r0, [r1] -_08055702: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkDD_weightdamagecalculation - - thumb_func_start atkDE_asistattackselect -atkDE_asistattackselect: @ 805571C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0xC - movs r0, 0 - mov r10, r0 - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x18 - str r0, [sp, 0x4] - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankIdentity - movs r1, 0x1 - ands r1, r0 - ldr r0, =gPlayerParty - str r0, [sp] - cmp r1, 0 - beq _0805574C - ldr r1, =gEnemyParty - str r1, [sp] -_0805574C: - movs r2, 0 -_0805574E: - ldr r1, =gBattlePartyID - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 1 - adds r0, r1 - adds r1, r2, 0x1 - str r1, [sp, 0x8] - ldrh r0, [r0] - cmp r2, r0 - beq _080557F4 - movs r0, 0x64 - adds r6, r2, 0 - muls r6, r0 - ldr r0, [sp] - adds r4, r0, r6 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - cmp r0, 0 - beq _080557F4 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - movs r1, 0xCE - lsls r1, 1 - cmp r0, r1 - beq _080557F4 - movs r5, 0 - ldr r1, =0x0000ffff - mov r8, r1 - mov r9, r6 - mov r1, r10 - lsls r0, r1, 1 - ldr r1, [sp, 0x4] - adds r6, r0, r1 -_08055798: - movs r7, 0 - adds r1, r5, 0 - adds r1, 0xD - ldr r0, [sp] - add r0, r9 - bl GetMonData - lsls r0, 16 - lsrs r4, r0, 16 - adds r0, r4, 0 - bl sub_8052F84 - lsls r0, 24 - adds r1, r5, 0x1 - cmp r0, 0 - bne _080557EE - ldr r0, =gMovesForbiddenToCopy - ldrh r2, [r0] - adds r3, r0, 0 - cmp r2, r8 - beq _080557E2 - cmp r4, r2 - beq _080557D8 - ldr r5, =0x0000ffff - adds r2, r3, 0 -_080557CA: - adds r2, 0x2 - adds r7, 0x1 - ldrh r0, [r2] - cmp r0, r5 - beq _080557E2 - cmp r4, r0 - bne _080557CA -_080557D8: - lsls r0, r7, 1 - adds r0, r3 - ldrh r0, [r0] - cmp r0, r8 - bne _080557EE -_080557E2: - cmp r4, 0 - beq _080557EE - strh r4, [r6] - adds r6, 0x2 - movs r0, 0x1 - add r10, r0 -_080557EE: - adds r5, r1, 0 - cmp r5, 0x3 - ble _08055798 -_080557F4: - ldr r2, [sp, 0x8] - cmp r2, 0x5 - ble _0805574E - mov r1, r10 - cmp r1, 0 - beq _0805586C - ldr r2, =gHitMarker - ldr r0, [r2] - ldr r1, =0xfffffbff - ands r0, r1 - str r0, [r2] - ldr r4, =gRandomMove - bl Random - movs r1, 0xFF - ands r1, r0 - mov r0, r10 - muls r0, r1 - asrs r0, 8 - lsls r0, 1 - ldr r1, [sp, 0x4] - adds r0, r1 - ldrh r0, [r0] - strh r0, [r4] - ldrh r0, [r4] - movs r1, 0 - bl GetMoveTarget - ldr r1, =gBankTarget - strb r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _08055886 - .pool -_0805586C: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_08055886: - add sp, 0xC - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkDE_asistattackselect - - thumb_func_start atkDF_setmagiccoat -atkDF_setmagiccoat: @ 805589C - push {lr} - ldr r1, =gBankTarget - ldr r3, =gBankAttacker - ldrb r0, [r3] - strb r0, [r1] - ldr r2, =gSpecialStatuses - ldrb r1, [r3] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0] - movs r2, 0x20 - orrs r1, r2 - strb r1, [r0] - ldr r0, =gCurrentMoveTurn - ldrb r1, [r0] - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - subs r0, 0x1 - cmp r1, r0 - bne _080558FC - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08055914 - .pool -_080558FC: - ldr r0, =gProtectStructs - ldrb r1, [r3] - lsls r1, 4 - adds r1, r0 - ldrb r0, [r1] - movs r2, 0x10 - orrs r0, r2 - strb r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_08055914: - pop {r0} - bx r0 - .pool - thumb_func_end atkDF_setmagiccoat - - thumb_func_start atkE0_setstealstatchange -atkE0_setstealstatchange: @ 8055920 - push {lr} - ldr r2, =gSpecialStatuses - ldr r3, =gBankAttacker - ldrb r1, [r3] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0] - movs r2, 0x20 - orrs r1, r2 - strb r1, [r0] - ldr r0, =gCurrentMoveTurn - ldrb r1, [r0] - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - subs r0, 0x1 - cmp r1, r0 - bne _08055978 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _0805598E - .pool -_08055978: - ldr r0, =gProtectStructs - ldrb r1, [r3] - lsls r1, 4 - adds r1, r0 - ldrb r0, [r1] - orrs r0, r2 - strb r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_0805598E: - pop {r0} - bx r0 - .pool - thumb_func_end atkE0_setstealstatchange - - thumb_func_start atkE1_intimidate_string_loader -atkE1_intimidate_string_loader: @ 805599C - push {r4-r6,lr} - ldr r4, =gBattleScripting - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0xD8 - ldrb r0, [r0] - strb r0, [r4, 0x17] - ldrb r0, [r4, 0x17] - bl GetBankSide - lsls r0, 24 - lsrs r5, r0, 24 - ldr r2, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r2] - movs r0, 0x9 - strb r0, [r2, 0x1] - ldr r3, =gBattleMons - ldrb r1, [r4, 0x17] - movs r0, 0x58 - muls r0, r1 - adds r0, r3 - adds r0, 0x20 - ldrb r0, [r0] - strb r0, [r2, 0x2] - movs r0, 0xFF - strb r0, [r2, 0x3] - ldr r2, =gBankTarget - ldr r1, =gNoOfAllBanks - ldrb r0, [r2] - ldrb r1, [r1] - cmp r0, r1 - bcs _08055A22 - adds r4, r2, 0 - ldr r6, =gBitTable -_080559E2: - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, r5 - beq _08055A04 - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldrb r0, [r4] - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - ands r1, r0 - ldr r2, =gNoOfAllBanks - cmp r1, 0 - beq _08055A18 -_08055A04: - ldrb r0, [r4] - adds r0, 0x1 - strb r0, [r4] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - adds r2, r1, 0 - ldrb r1, [r2] - cmp r0, r1 - bcc _080559E2 -_08055A18: - ldr r0, =gBankTarget - ldrb r0, [r0] - ldrb r2, [r2] - cmp r0, r2 - bcc _08055A64 -_08055A22: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _08055A6C - .pool -_08055A64: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_08055A6C: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atkE1_intimidate_string_loader - - thumb_func_start atkE2_switchout_abilities -atkE2_switchout_abilities: @ 8055A78 - push {r4-r6,lr} - sub sp, 0x4 - ldr r5, =gBattlescriptCurrInstr - ldr r0, [r5] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r4, =gActiveBank - strb r0, [r4] - ldr r3, =gBattleMons - ldrb r0, [r4] - movs r6, 0x58 - adds r1, r0, 0 - muls r1, r6 - adds r0, r1, r3 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x1E - bne _08055AD2 - adds r3, 0x4C - adds r1, r3 - movs r0, 0 - str r0, [r1] - ldr r2, =gBitTable - ldrb r1, [r4] - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, r1, r0 - adds r0, 0x58 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r2 - ldrb r2, [r0] - adds r0, r1, 0 - muls r0, r6 - adds r0, r3 - str r0, [sp] - movs r0, 0 - movs r1, 0x28 - movs r3, 0x4 - bl EmitSetMonData - ldrb r0, [r4] - bl MarkBufferBankForExecution -_08055AD2: - ldr r0, [r5] - adds r0, 0x2 - str r0, [r5] - add sp, 0x4 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atkE2_switchout_abilities - - thumb_func_start atkE3_jumpiffainted -atkE3_jumpiffainted: @ 8055AF4 - push {r4,lr} - ldr r4, =gBattlescriptCurrInstr - ldr r0, [r4] - ldrb r0, [r0, 0x1] - bl GetBattleBank - ldr r1, =gActiveBank - strb r0, [r1] - ldr r2, =gBattleMons - ldrb r1, [r1] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _08055B3C - ldr r2, [r4] - ldrb r1, [r2, 0x2] - ldrb r0, [r2, 0x3] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x5] - lsls r0, 24 - orrs r1, r0 - str r1, [r4] - b _08055B42 - .pool -_08055B3C: - ldr r0, [r4] - adds r0, 0x6 - str r0, [r4] -_08055B42: - pop {r4} - pop {r0} - bx r0 - thumb_func_end atkE3_jumpiffainted - - thumb_func_start atkE4_getsecretpowereffect -atkE4_getsecretpowereffect: @ 8055B48 - push {lr} - ldr r0, =gUnknown_02022FF0 - ldrb r0, [r0] - cmp r0, 0x7 - bhi _08055BE4 - lsls r0, 2 - ldr r1, =_08055B64 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08055B64: - .4byte _08055B84 - .4byte _08055B90 - .4byte _08055B9C - .4byte _08055BA8 - .4byte _08055BB4 - .4byte _08055BC0 - .4byte _08055BCC - .4byte _08055BD8 -_08055B84: - ldr r1, =gBattleCommunication - movs r0, 0x2 - b _08055BE8 - .pool -_08055B90: - ldr r1, =gBattleCommunication - movs r0, 0x1 - b _08055BE8 - .pool -_08055B9C: - ldr r1, =gBattleCommunication - movs r0, 0x1B - b _08055BE8 - .pool -_08055BA8: - ldr r1, =gBattleCommunication - movs r0, 0x17 - b _08055BE8 - .pool -_08055BB4: - ldr r1, =gBattleCommunication - movs r0, 0x16 - b _08055BE8 - .pool -_08055BC0: - ldr r1, =gBattleCommunication - movs r0, 0x18 - b _08055BE8 - .pool -_08055BCC: - ldr r1, =gBattleCommunication - movs r0, 0x7 - b _08055BE8 - .pool -_08055BD8: - ldr r1, =gBattleCommunication - movs r0, 0x8 - b _08055BE8 - .pool -_08055BE4: - ldr r1, =gBattleCommunication - movs r0, 0x5 -_08055BE8: - strb r0, [r1, 0x3] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end atkE4_getsecretpowereffect - - thumb_func_start atkE5_pickup -atkE5_pickup: @ 8055C00 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - bl InBattlePike - lsls r0, 24 - cmp r0, 0 - beq _08055C18 - b _08055DD8 -_08055C18: - bl InBattlePyramid - lsls r0, 24 - cmp r0, 0 - beq _08055CC4 - movs r6, 0 - mov r7, sp - ldr r0, =gBaseStats - mov r8, r0 -_08055C2A: - movs r0, 0x64 - adds r4, r6, 0 - muls r4, r0 - ldr r0, =gPlayerParty - adds r4, r0 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - lsls r0, 16 - lsrs r5, r0, 16 - adds r0, r4, 0 - movs r1, 0xC - bl GetMonData - strh r0, [r7] - adds r0, r4, 0 - movs r1, 0x2E - bl GetMonData - cmp r0, 0 - beq _08055C6C - lsls r0, r5, 3 - subs r0, r5 - lsls r0, 2 - add r0, r8 - ldrb r0, [r0, 0x17] - b _08055C76 - .pool -_08055C6C: - lsls r0, r5, 3 - subs r0, r5 - lsls r0, 2 - add r0, r8 - ldrb r0, [r0, 0x16] -_08055C76: - cmp r0, 0x35 - bne _08055CB6 - cmp r5, 0 - beq _08055CB6 - movs r0, 0xCE - lsls r0, 1 - cmp r5, r0 - beq _08055CB6 - ldrh r0, [r7] - cmp r0, 0 - bne _08055CB6 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0xA - bl __umodsi3 - lsls r0, 16 - cmp r0, 0 - bne _08055CB6 - bl CalculateBattlePyramidPickupItemId - strh r0, [r7] - movs r0, 0x64 - muls r0, r6 - ldr r1, =gPlayerParty - adds r0, r1 - movs r1, 0xC - mov r2, sp - bl SetMonData -_08055CB6: - adds r6, 0x1 - cmp r6, 0x5 - ble _08055C2A - b _08055DD8 - .pool -_08055CC4: - movs r6, 0 - movs r1, 0x64 - mov r8, r1 - ldr r7, =gPlayerParty - mov r10, sp -_08055CCE: - mov r4, r8 - muls r4, r6 - adds r4, r7 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - lsls r0, 16 - lsrs r5, r0, 16 - adds r0, r4, 0 - movs r1, 0xC - bl GetMonData - mov r1, r10 - strh r0, [r1] - adds r0, r4, 0 - movs r1, 0x2E - bl GetMonData - cmp r0, 0 - beq _08055D30 - lsls r0, r5, 3 - subs r0, r5 - lsls r0, 2 - ldr r1, =gBaseStats - adds r0, r1 - ldrb r0, [r0, 0x17] - b _08055D3C - .pool -_08055D10: - mov r0, r8 - muls r0, r6 - adds r0, r7 - adds r2, r1, 0 - adds r2, 0x63 - subs r2, r4 - lsls r2, 1 - ldr r1, =gRarePickupItems - adds r2, r1 - movs r1, 0xC - bl SetMonData - b _08055DD0 - .pool -_08055D30: - lsls r0, r5, 3 - subs r0, r5 - lsls r0, 2 - ldr r1, =gBaseStats - adds r0, r1 - ldrb r0, [r0, 0x16] -_08055D3C: - adds r1, r6, 0x1 - mov r9, r1 - cmp r0, 0x35 - bne _08055DD0 - cmp r5, 0 - beq _08055DD0 - movs r0, 0xCE - lsls r0, 1 - cmp r5, r0 - beq _08055DD0 - mov r1, r10 - ldrh r0, [r1] - cmp r0, 0 - bne _08055DD0 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0xA - bl __umodsi3 - lsls r0, 16 - cmp r0, 0 - bne _08055DD0 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x64 - bl __umodsi3 - lsls r0, 16 - lsrs r4, r0, 16 - mov r0, r8 - muls r0, r6 - adds r0, r7 - movs r1, 0x38 - bl GetMonData - subs r0, 0x1 - movs r1, 0xA - bl __udivsi3 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0x9 - bls _08055D9C - movs r1, 0x9 -_08055D9C: - movs r2, 0 - b _08055DAE - .pool -_08055DA4: - adds r0, r4, 0 - subs r0, 0x62 - cmp r0, 0x1 - bls _08055D10 - adds r2, 0x1 -_08055DAE: - cmp r2, 0x8 - bgt _08055DD0 - ldr r0, =gPickupProbabilities - adds r0, r2, r0 - ldrb r0, [r0] - cmp r0, r4 - ble _08055DA4 - mov r0, r8 - muls r0, r6 - adds r0, r7 - adds r2, r1, r2 - lsls r2, 1 - ldr r1, =gPickupItems - adds r2, r1 - movs r1, 0xC - bl SetMonData -_08055DD0: - mov r6, r9 - cmp r6, 0x5 - bgt _08055DD8 - b _08055CCE -_08055DD8: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkE5_pickup - thumb_func_start atkE6_castform_change_animation atkE6_castform_change_animation: @ 8055DFC push {r4,lr} @@ -5757,7 +340,7 @@ atkEB_settypetoterrain: @ 80560BC adds r0, r3 mov r12, r0 ldr r5, =sTerrainToType - ldr r4, =gUnknown_02022FF0 + ldr r4, =gBattleTerrain ldrb r0, [r4] adds r0, r5 ldrb r2, [r0] @@ -5851,7 +434,7 @@ atkEC_pursuit_sth: @ 805616C ands r1, r0 cmp r1, 0 bne _0805620C - ldr r0, =gUnknown_0202421C + ldr r0, =gActionForBanks adds r0, r3, r0 ldrb r0, [r0] cmp r0, 0 diff --git a/asm/battle_anim_80FE840.s b/asm/battle_anim_80FE840.s index 78abd6a85..c6761bd9a 100644 --- a/asm/battle_anim_80FE840.s +++ b/asm/battle_anim_80FE840.s @@ -47348,7 +47348,7 @@ sub_811675C: @ 811675C ldrsh r0, [r0, r1] bl sub_811583C adds r2, r0, 0 - ldr r0, =gUnknown_02022FF0 + ldr r0, =gBattleTerrain ldrb r0, [r0] cmp r0, 0x9 bhi _08116832 @@ -49759,7 +49759,7 @@ sub_8117C24: @ 8117C24 lsls r0, 24 lsrs r0, 24 ldr r2, =gBattleAnimArgs - ldr r1, =gUnknown_02022FF0 + ldr r1, =gBattleTerrain ldrb r1, [r1] strh r1, [r2] bl move_anim_task_del diff --git a/asm/battle_frontier_2.s b/asm/battle_frontier_2.s index 2e48fdd72..36898e456 100755 --- a/asm/battle_frontier_2.s +++ b/asm/battle_frontier_2.s @@ -31263,8 +31263,8 @@ _081AAA9E: .pool thumb_func_end sub_81AAA7C - thumb_func_start CalculateBattlePyramidPickupItemId -CalculateBattlePyramidPickupItemId: @ 81AAAE0 + thumb_func_start GetBattlePyramidPickupItemId +GetBattlePyramidPickupItemId: @ 81AAAE0 push {r4-r6,lr} ldr r0, =gSaveBlock2Ptr ldr r1, [r0] @@ -31331,6 +31331,6 @@ _081AAB5A: pop {r1} bx r1 .pool - thumb_func_end CalculateBattlePyramidPickupItemId + thumb_func_end GetBattlePyramidPickupItemId .align 2, 0 @ Don't pad with nop. diff --git a/asm/battle_interface.s b/asm/battle_interface.s index 489366fe8..31ad9a330 100755 --- a/asm/battle_interface.s +++ b/asm/battle_interface.s @@ -5476,8 +5476,8 @@ _08075028: bx r1 thumb_func_end sub_8074FE8 - thumb_func_start sub_8075034 -sub_8075034: @ 8075034 + thumb_func_start GetScaledHPFraction +GetScaledHPFraction: @ 8075034 push {r4,lr} lsls r2, 24 lsrs r2, 24 @@ -5499,7 +5499,7 @@ _08075058: pop {r4} pop {r1} bx r1 - thumb_func_end sub_8075034 + thumb_func_end GetScaledHPFraction thumb_func_start sub_8075060 sub_8075060: @ 8075060 @@ -5514,7 +5514,7 @@ sub_8075060: @ 8075060 b _0807508E _08075072: movs r2, 0x30 - bl sub_8075034 + bl GetScaledHPFraction lsls r0, 24 lsrs r1, r0, 24 movs r0, 0x3 diff --git a/asm/evolution_scene.s b/asm/evolution_scene.s index f96a7355a..55a843b92 100644 --- a/asm/evolution_scene.s +++ b/asm/evolution_scene.s @@ -186,7 +186,7 @@ evolution_cutscene: @ 813DA8C ldr r0, =gUnknown_02022E22 movs r1, 0 strh r1, [r0] - ldr r1, =gUnknown_02022FF0 + ldr r1, =gBattleTerrain movs r0, 0x9 strb r0, [r1] bl c2_berry_program_update_menu @@ -479,7 +479,7 @@ sub_813DD7C: @ 813DD7C strh r0, [r1] ldr r0, =gUnknown_02022E22 strh r4, [r0] - ldr r1, =gUnknown_02022FF0 + ldr r1, =gBattleTerrain movs r0, 0x9 strb r0, [r1] bl c2_berry_program_update_menu diff --git a/asm/party_menu.s b/asm/party_menu.s index 2b320f86e..4eb080b13 100755 --- a/asm/party_menu.s +++ b/asm/party_menu.s @@ -5495,7 +5495,7 @@ _081B2F04: asrs r1, 16 ldr r2, [r6] ldrb r2, [r2, 0x1A] - bl sub_8075034 + bl GetScaledHPFraction lsls r0, 24 lsrs r5, r0, 24 ldrb r0, [r6, 0x8] diff --git a/data/battle_4.s b/data/battle_4.s index 8f1872733..0b8bd6e7e 100644 --- a/data/battle_4.s +++ b/data/battle_4.s @@ -43,18 +43,18 @@ gMovesForbiddenToCopy:: @ 831C3E0 .2byte MOVE_COVET, MOVE_TRICK, MOVE_FOCUS_PUNCH, 0xffff .align 2 -gUnknown_0831C408:: @ 831C408 +sFlailHpScaleToPowerTable:: @ 831C408 .byte 0x01, 0xc8, 0x04, 0x96, 0x09, 0x64, 0x10, 0x50 .byte 0x20, 0x28, 0x30, 0x14 .align 2 -gUnknown_0831C414:: @ 831C414 +sNaturePowerMoves:: @ 831C414 .2byte 0x004e, 0x004b, 0x0059, 0x0038 .2byte 0x0039, 0x003d, 0x009d, 0x00f7 .2byte 0x0081, 0x0081 .align 2 -gUnknown_0831C428:: @ 831C428 +sWeightToDamageTable:: @ 831C428 .2byte 0x0064, 0x0014, 0x00fa, 0x0028 .2byte 0x01f4, 0x003c, 0x03e8, 0x0050 .2byte 0x07d0, 0x0064, 0xffff, 0xffff diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 1fb6b8189..206519f40 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -6,13 +6,13 @@ gBattleScriptsForMoveEffects:: @ 82D86A8 .incbin "baserom.gba", 0x2d86a8, 0x388 -gUnknown_082D8A30:: @ 82D8A30 +BattleScript_PresentDamageTarget:: @ 82D8A30 .incbin "baserom.gba", 0x2d8a30, 0x1e BattleScript_MoveEnd:: @ 82D8A4E .incbin "baserom.gba", 0x2d8a4e, 0x12 -gUnknown_082D8A60:: @ 82D8A60 +BattleScript_PauseEffectivenessSoundResultMsgEndMove:: @ 82D8A60 .incbin "baserom.gba", 0x2d8a60, 0x274 BattleScript_StatUp:: @ 82D8CD4 @@ -24,10 +24,10 @@ BattleScript_StatDown:: @ 82D8D65 BattleScript_MoveUsedMustRecharge:: @ 82D9462 .incbin "baserom.gba", 0x2d9462, 0xa7f -gUnknown_082D9EE1:: @ 82D9EE1 +BattleScript_PresentHealTarget:: @ 82D9EE1 .incbin "baserom.gba", 0x2d9ee1, 0x1a -gUnknown_082D9EFB:: @ 82D9EFB +BattleScript_AlreadyAtFullHp:: @ 82D9EFB .incbin "baserom.gba", 0x2d9efb, 0x21 BattleScript_ButItFailed:: @ 82D9F1C @@ -180,13 +180,13 @@ BattleScript_AllStatsUp:: @ 82DAF27 BattleScript_RapidSpinAway:: @ 82DAFC3 .incbin "baserom.gba", 0x2dafc3, 0x2 -gUnknown_082DAFC5:: @ 82DAFC5 +BattleScript_WrapFree:: @ 82DAFC5 .incbin "baserom.gba", 0x2dafc5, 0x11 -gUnknown_082DAFD6:: @ 82DAFD6 +BattleScript_LeechSeedFree:: @ 82DAFD6 .incbin "baserom.gba", 0x2dafd6, 0x7 -gUnknown_082DAFDD:: @ 82DAFDD +BattleScript_SpikesFree:: @ 82DAFDD .incbin "baserom.gba", 0x2dafdd, 0x7 gUnknown_082DAFE4:: @ 82DAFE4 @@ -444,7 +444,7 @@ BattleScript_SoundproofProtected:: @ 82DB61F BattleScript_AbilityNoSpecificStatLoss:: @ 82DB62F .incbin "baserom.gba", 0x2db62f, 0x10 -BattleScript_StickyHoldOnKnockOff:: @ 82DB63F +BattleScript_StickyHoldActivates:: @ 82DB63F .incbin "baserom.gba", 0x2db63f, 0xe BattleScript_ColorChangeActivates:: @ 82DB64D diff --git a/include/battle.h b/include/battle.h index f84a75cba..a0a50faf7 100644 --- a/include/battle.h +++ b/include/battle.h @@ -112,7 +112,7 @@ #define STATUS3_ROOTED 0x400 #define STATUS3_CHARGED_UP 0x200 #define STATUS3_YAWN 0x1800 //two bits -#define STATUS3_IMPRISIONED 0x2000 +#define STATUS3_IMPRISONED_OTHERS 0x2000 #define STATUS3_GRUDGE 0x4000 #define STATUS3_CANT_SCORE_A_CRIT 0x8000 #define STATUS3_MUDSPORT 0x10000 @@ -172,7 +172,7 @@ #define ABILITYEFFECT_CHECK_BANK_SIDE 0xD #define ABILITYEFFECT_FIELD_SPORT 0xE #define ABILITYEFFECT_CHECK_FIELD_EXCEPT_BANK 0xF -#define ABILITYEFFECT_COUNT_OTHER_SIZE 0x10 +#define ABILITYEFFECT_COUNT_OTHER_SIDE 0x10 #define ABILITYEFFECT_COUNT_BANK_SIDE 0x11 #define ABILITYEFFECT_COUNT_ON_FIELD 0x12 #define ABILITYEFFECT_CHECK_ON_FIELD 0x13 @@ -206,6 +206,15 @@ #define WEATHER_HAIL (1 << 7) #define WEATHER_HAIL_ANY ((WEATHER_HAIL)) +#define BATTLE_TERRAIN_GRASS 0 +#define BATTLE_TERRAIN_LONG_GRASS 1 +#define BATTLE_TERRAIN_SAND 2 +#define BATTLE_TERRAIN_UNDERWATER 3 +#define BATTLE_TERRAIN_WATER 4 +#define BATTLE_TERRAIN_POND 5 +#define BATTLE_TERRAIN_ROCK 6 +#define BATTLE_TERRAIN_CAVE 7 + // array entries for battle communication #define CURSOR_POSITION 0x1 #define MOVE_EFFECT_BYTE 0x3 @@ -554,46 +563,7 @@ struct BattleStruct u8 wildVictorySong; u8 dynamicMoveType; u8 wrappedBy[4]; - u8 field_18; - u8 field_19; - u8 field_1A; - u8 field_1B; - u8 field_1C; - u8 field_1D; - u8 field_1E; - u8 field_1F; - u8 field_20; - u8 field_21; - u8 field_22; - u8 field_23; - u8 field_24; - u8 field_25; - u8 field_26; - u8 field_27; - u8 field_28; - u8 field_29; - u8 field_2A; - u8 field_2B; - u8 field_2C; - u8 field_2D; - u8 field_2E; - u8 field_2F; - u8 field_30; - u8 field_31; - u8 field_32; - u8 field_33; - u8 field_34; - u8 field_35; - u8 field_36; - u8 field_37; - u8 field_38; - u8 field_39; - u8 field_3A; - u8 field_3B; - u8 field_3C; - u8 field_3D; - u8 field_3E; - u8 field_3F; + u16 assistPossibleMoves[5 * 4]; // 5 mons, each of them knowing 4 moves u8 field_40; u8 field_41; u8 field_42; @@ -710,28 +680,6 @@ extern struct BattleStruct* gBattleStruct; var2[offsetof(struct structName, offsetField)] = value; \ } -// This is a leftover from R/S direct use of ewram addresses -#define GET_CHANGED_ITEM_PTR_VIA_MEME_ACCESS(bank, varName) \ -{ \ - void** memes1 = (void**)(&gBattleStruct); \ - void* memes2 = (void*)((u32)(bank * 2 + offsetof(struct BattleStruct, changedItems))); \ - varName = (u16*)(((void*)(*memes1) + (u32)(memes2))); \ -} - -#define GET_USED_ITEM_PTR_VIA_MEME_ACCESS(bank, varName) \ -{ \ - void** memes1 = (void**)(&gBattleStruct); \ - void* memes2 = (void*)((u32)(bank * 2 + offsetof(struct BattleStruct, usedHeldItems))); \ - varName = (u16*)(((void*)(*memes1) + (u32)(memes2))); \ -} - -#define GET_HP_SWITCHOUT_PTR_VIA_MEME_ACCESS(bank, varName) \ -{ \ - void** memes1 = (void**)(&gBattleStruct); \ - void* memes2 = (void*)((u32)(bank * 2 + offsetof(struct BattleStruct, hpOnSwitchout))); \ - varName = (u16*)(((void*)(*memes1) + (u32)(memes2))); \ -} - #define GET_MOVE_TYPE(move, typeArg) \ { \ if (gBattleStruct->dynamicMoveType) \ @@ -917,15 +865,24 @@ void BattleMainCB2(void); void ResetSentPokesToOpponentValue(void); bool8 CanRunFromBattle(u8 bank); bool8 IsRunningFromBattleImpossible(void); +void PressurePPLoseOnUsingPerishSong(u8 bankAtk); +void PressurePPLoseOnUsingImprision(u8 bankAtk); // battle_3 +#define MOVE_LIMITATION_ZEROMOVE (1 << 0) +#define MOVE_LIMITATION_PP (1 << 1) +#define MOVE_LIMITATION_DISABLED (1 << 2) +#define MOVE_LIMITATION_TORMENTED (1 << 3) +#define MOVE_LIMITATION_TAUNT (1 << 4) +#define MOVE_LIMITATION_IMPRISION (1 << 5) + void BattleScriptPush(const u8* bsPtr); void BattleScriptPushCursor(void); void BattleScriptPop(void); u8 sub_803FB4C(void); // msg, can't select a move u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check); bool8 AreAllMovesUnusable(void); -u8 IsImprisoned(u8 bank, u16 move); +u8 GetImprisonedMovesCount(u8 bank, u16 move); u8 UpdateTurnCounters(void); u8 TurnBasedEffects(void); bool8 sub_8041364(void); diff --git a/include/battle_message.h b/include/battle_message.h index 3e28fa5e5..6e6616cf0 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -82,6 +82,14 @@ textVar[3] = B_BUFF_EOS; \ } +#define PREPARE_ABILITY_BUFFER(textVar, abilityId) \ +{ \ + textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ + textVar[1] = B_BUFF_ABILITY; \ + textVar[2] = abilityId; \ + textVar[3] = B_BUFF_EOS; \ +} + #define PREPARE_TYPE_BUFFER(textVar, typeId) \ { \ textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ @@ -142,6 +150,15 @@ textVar[4] = B_BUFF_EOS; \ } +#define PREPARE_ITEM_BUFFER(textVar, item) \ +{ \ + textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ + textVar[1] = B_BUFF_ITEM; \ + textVar[2] = item; \ + textVar[3] = (item & 0xFF00) >> 8; \ + textVar[4] = B_BUFF_EOS; \ +} + #define PREPARE_SPECIES_BUFFER(textVar, species) \ { \ textVar[0] = B_BUFF_PLACEHOLDER_BEGIN; \ diff --git a/include/mail.h b/include/mail.h new file mode 100644 index 000000000..16ca1f676 --- /dev/null +++ b/include/mail.h @@ -0,0 +1,19 @@ +#ifndef GUARD_MAIL_H +#define GUARD_MAIL_H + +#include "items.h" + +#define IS_ITEM_MAIL(itemId)((itemId == ITEM_ORANGE_MAIL \ + || itemId == ITEM_HARBOR_MAIL \ + || itemId == ITEM_GLITTER_MAIL \ + || itemId == ITEM_MECH_MAIL \ + || itemId == ITEM_WOOD_MAIL \ + || itemId == ITEM_WAVE_MAIL \ + || itemId == ITEM_BEAD_MAIL \ + || itemId == ITEM_SHADOW_MAIL \ + || itemId == ITEM_TROPIC_MAIL \ + || itemId == ITEM_DREAM_MAIL \ + || itemId == ITEM_FAB_MAIL \ + || itemId == ITEM_RETRO_MAIL)) + +#endif // GUARD_MAIL_H diff --git a/src/battle_3.c b/src/battle_3.c index 1fd84a61b..9ac439390 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -261,7 +261,7 @@ u8 sub_803FB4C(void) // msg, can't select a move } } - if (IsImprisoned(gActiveBank, move)) + if (GetImprisonedMovesCount(gActiveBank, move)) { gCurrentMove = move; if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -314,13 +314,6 @@ u8 sub_803FB4C(void) // msg, can't select a move return limitations; } -#define MOVE_LIMITATION_ZEROMOVE (1 << 0) -#define MOVE_LIMITATION_PP (1 << 1) -#define MOVE_LIMITATION_DISABLED (1 << 2) -#define MOVE_LIMITATION_TORMENTED (1 << 3) -#define MOVE_LIMITATION_TAUNT (1 << 4) -#define MOVE_LIMITATION_IMPRISION (1 << 5) - u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check) { u8 holdEffect; @@ -346,7 +339,7 @@ u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check) unusableMoves |= gBitTable[i]; if (gDisableStructs[bank].tauntTimer1 && check & MOVE_LIMITATION_TAUNT && gBattleMoves[gBattleMons[bank].moves[i]].power == 0) unusableMoves |= gBitTable[i]; - if (IsImprisoned(bank, gBattleMons[bank].moves[i]) && check & MOVE_LIMITATION_IMPRISION) + if (GetImprisonedMovesCount(bank, gBattleMons[bank].moves[i]) && check & MOVE_LIMITATION_IMPRISION) unusableMoves |= gBitTable[i]; if (gDisableStructs[bank].encoreTimer1 && gDisableStructs[bank].encoredMove != gBattleMons[bank].moves[i]) unusableMoves |= gBitTable[i]; @@ -374,7 +367,7 @@ bool8 AreAllMovesUnusable(void) return (unusable == 0xF); } -u8 IsImprisoned(u8 bank, u16 move) +u8 GetImprisonedMovesCount(u8 bank, u16 move) { s32 i; u8 imprisionedMoves = 0; @@ -382,7 +375,7 @@ u8 IsImprisoned(u8 bank, u16 move) for (i = 0; i < gNoOfAllBanks; i++) { - if (bankSide != GetBankSide(i) && gStatuses3[i] & STATUS3_IMPRISIONED) + if (bankSide != GetBankSide(i) && gStatuses3[i] & STATUS3_IMPRISONED_OTHERS) { s32 j; for (j = 0; j < 4; j++) @@ -1327,7 +1320,7 @@ u8 AtkCanceller_UnableToUseMove(void) gBattleStruct->atkCancellerTracker++; break; case 8: // imprisoned - if (IsImprisoned(gBankAttacker, gCurrentMove)) + if (GetImprisonedMovesCount(gBankAttacker, gCurrentMove)) { gProtectStructs[gBankAttacker].usedImprisionedMove = 1; CancelMultiTurnMoves(gBankAttacker); @@ -2379,7 +2372,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) } } break; - case ABILITYEFFECT_COUNT_OTHER_SIZE: // 16 + case ABILITYEFFECT_COUNT_OTHER_SIDE: // 16 side = GetBankSide(bank); for (i = 0; i < gNoOfAllBanks; i++) { @@ -6238,7 +6231,7 @@ u8 GetMoveTarget(u16 move, u8 useMoveTarget) targetBank = Random() % gNoOfAllBanks; } while (targetBank == gBankAttacker || side == GetBankSide(targetBank) || gAbsentBankFlags & gBitTable[targetBank]); if (gBattleMoves[move].type == TYPE_ELECTRIC - && AbilityBattleEffects(ABILITYEFFECT_COUNT_OTHER_SIZE, gBankAttacker, ABILITY_LIGHTNING_ROD, 0, 0) + && AbilityBattleEffects(ABILITYEFFECT_COUNT_OTHER_SIDE, gBankAttacker, ABILITY_LIGHTNING_ROD, 0, 0) && gBattleMons[targetBank].ability != ABILITY_LIGHTNING_ROD) { targetBank ^= 2; diff --git a/src/battle_4.c b/src/battle_4.c index 0f52ee0dd..9ef443b70 100644 --- a/src/battle_4.c +++ b/src/battle_4.c @@ -29,6 +29,7 @@ #include "pokemon_icon.h" #include "pokemon_item_effects.h" #include "m4a.h" +#include "mail.h" // variables @@ -96,6 +97,7 @@ extern u16 gUnknownMovesUsedByBanks[BATTLE_BANKS_COUNT]; extern u16 gLastUsedMovesByBanks[BATTLE_BANKS_COUNT]; extern u16 gTrainerBattleOpponent_A; extern u16 gTrainerBattleOpponent_B; +extern u8 gUnknown_020241E9; extern struct MusicPlayerInfo gMPlay_BGM; struct TrainerMoney @@ -127,6 +129,7 @@ extern void sub_81A5BF8(void); // battle frontier 2 extern void sub_81A5D44(void); // battle frontier 2 extern void sub_81B8E80(u8 bank, u8, u8); // party menu extern bool8 sub_81B1250(void); // ? +extern u8 GetScaledHPFraction(s16 hp, s16 maxhp, u8 scale); // battle interface // BattleScripts extern const u8 BattleScript_MoveEnd[]; @@ -150,7 +153,7 @@ extern const u8 BattleScript_ItemSteal[]; extern const u8 BattleScript_RapidSpinAway[]; extern const u8 BattleScript_TargetPRLZHeal[]; extern const u8 BattleScript_KnockedOff[]; -extern const u8 BattleScript_StickyHoldOnKnockOff[]; +extern const u8 BattleScript_StickyHoldActivates[]; extern const u8 BattleScript_AllStatsUp[]; extern const u8 BattleScript_AtkDefDown[]; extern const u8 BattleScript_SAtkDown2[]; @@ -197,6 +200,7 @@ extern const u8 gUnknown_082DADD8[]; extern const u8 BattleScript_PrintPayDayMoneyString[]; extern const u8 BattleScript_SturdyPreventsOHKO[]; extern const u8 BattleScript_ObliviousPreventsAttraction[]; +extern const u8 BattleScript_PauseEffectivenessSoundResultMsgEndMove[]; // strings extern const u8 gText_BattleYesNoChoice[]; @@ -252,7 +256,7 @@ void atk11_printstring_playeronly(void); void atk12_waitmessage(void); void atk13_printfromtable(void); void atk14_printfromtable_playeronly(void); -void atk15_seteffectwithchancetarget(void); +void atk15_seteffectwithchance(void); void atk16_seteffectprimary(void); void atk17_seteffectsecondary(void); void atk18_status_effect_clear(void); @@ -421,15 +425,15 @@ void atkBA_jumpifnopursuitswitchdmg(void); void atkBB_setsunny(void); void atkBC_maxattackhalvehp(void); void atkBD_copyfoestats(void); -void atkBE_breakfree(void); +void atkBE_rapidspinfree(void); void atkBF_set_defense_curl(void); void atkC0_recoverbasedonsunlight(void); void atkC1_hidden_power(void); void atkC2_selectnexttarget(void); void atkC3_setfutureattack(void); void atkC4_beat_up(void); -void atkC5_hidepreattack(void); -void atkC6_unhidepostattack(void); +void atkC5_setsemiinvulnerablebit(void); +void atkC6_clearsemiinvulnerablebit(void); void atkC7_setminimize(void); void atkC8_sethail(void); void atkC9_jumpifattackandspecialattackcannotfall(void); @@ -458,7 +462,7 @@ void atkDF_setmagiccoat(void); void atkE0_setstealstatchange(void); void atkE1_intimidate_string_loader(void); void atkE2_switchout_abilities(void); -void atkE3_jumpiffainted(void); +void atkE3_jumpifhasnohp(void); void atkE4_getsecretpowereffect(void); void atkE5_pickup(void); void atkE6_castform_change_animation(void); @@ -504,7 +508,7 @@ void (* const gBattleScriptingCommandsTable[])(void) = atk12_waitmessage, atk13_printfromtable, atk14_printfromtable_playeronly, - atk15_seteffectwithchancetarget, + atk15_seteffectwithchance, atk16_seteffectprimary, atk17_seteffectsecondary, atk18_status_effect_clear, @@ -673,15 +677,15 @@ void (* const gBattleScriptingCommandsTable[])(void) = atkBB_setsunny, atkBC_maxattackhalvehp, atkBD_copyfoestats, - atkBE_breakfree, + atkBE_rapidspinfree, atkBF_set_defense_curl, atkC0_recoverbasedonsunlight, atkC1_hidden_power, atkC2_selectnexttarget, atkC3_setfutureattack, atkC4_beat_up, - atkC5_hidepreattack, - atkC6_unhidepostattack, + atkC5_setsemiinvulnerablebit, + atkC6_clearsemiinvulnerablebit, atkC7_setminimize, atkC8_sethail, atkC9_jumpifattackandspecialattackcannotfall, @@ -710,7 +714,7 @@ void (* const gBattleScriptingCommandsTable[])(void) = atkE0_setstealstatchange, atkE1_intimidate_string_loader, atkE2_switchout_abilities, - atkE3_jumpiffainted, + atkE3_jumpifhasnohp, atkE4_getsecretpowereffect, atkE5_pickup, atkE6_castform_change_animation, @@ -871,6 +875,8 @@ static const struct WindowTemplate sUnusedWinTemplate = {0, 1, 3, 7, 0xF, 0x1F, extern const struct SpriteTemplate SpriteTemplate_MonIconOnLvlUpBox; extern const u16 sProtectSuccessRates[]; +extern const u16 sNaturePowerMoves[]; +extern const u16 sWeightToDamageTable[]; void atk00_attackcanceler(void) { @@ -1163,7 +1169,7 @@ void atk02_attackstring(void) void atk03_ppreduce(void) { - s32 to_deduct = 1; + s32 ppToDeduct = 1; if (gBattleExecBuffer) return; @@ -1173,15 +1179,15 @@ void atk03_ppreduce(void) switch (gBattleMoves[gCurrentMove].target) { case MOVE_TARGET_FOES_AND_ALLY: - to_deduct += AbilityBattleEffects(ABILITYEFFECT_COUNT_ON_FIELD, gBankAttacker, ABILITY_PRESSURE, 0, 0); + ppToDeduct += AbilityBattleEffects(ABILITYEFFECT_COUNT_ON_FIELD, gBankAttacker, ABILITY_PRESSURE, 0, 0); break; case MOVE_TARGET_BOTH: case MOVE_TARGET_OPPONENTS_FIELD: - to_deduct += AbilityBattleEffects(ABILITYEFFECT_COUNT_OTHER_SIZE, gBankAttacker, ABILITY_PRESSURE, 0, 0); + ppToDeduct += AbilityBattleEffects(ABILITYEFFECT_COUNT_OTHER_SIDE, gBankAttacker, ABILITY_PRESSURE, 0, 0); break; default: if (gBankAttacker != gBankTarget && gBattleMons[gBankTarget].ability == ABILITY_PRESSURE) - to_deduct++; + ppToDeduct++; break; } } @@ -1190,8 +1196,8 @@ void atk03_ppreduce(void) { gProtectStructs[gBankAttacker].notFirstStrike = 1; - if (gBattleMons[gBankAttacker].pp[gCurrMovePos] > to_deduct) - gBattleMons[gBankAttacker].pp[gCurrMovePos] -= to_deduct; + if (gBattleMons[gBankAttacker].pp[gCurrMovePos] > ppToDeduct) + gBattleMons[gBankAttacker].pp[gCurrMovePos] -= ppToDeduct; else gBattleMons[gBankAttacker].pp[gCurrMovePos] = 0; @@ -2126,10 +2132,10 @@ void atk13_printfromtable(void) { if (gBattleExecBuffer == 0) { - u16 *ptr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + const u16 *ptr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); ptr += gBattleCommunication[MULTISTRING_CHOOSER]; - PrepareStringBattle(*(u16*)ptr, gBankAttacker); + PrepareStringBattle(*ptr, gBankAttacker); gBattlescriptCurrInstr += 5; gBattleCommunication[MSG_DISPLAY] = 1; @@ -2140,11 +2146,11 @@ void atk14_printfromtable_playeronly(void) { if (gBattleExecBuffer == 0) { - u16 *ptr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + const u16 *ptr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); ptr += gBattleCommunication[MULTISTRING_CHOOSER]; gActiveBank = gBankAttacker; - EmitPrintStringPlayerOnly(0, *(u16*)ptr); + EmitPrintStringPlayerOnly(0, *ptr); MarkBufferBankForExecution(gActiveBank); gBattlescriptCurrInstr += 5; @@ -2729,23 +2735,17 @@ void SetMoveEffect(bool8 primary, u8 certain) gLastUsedAbility = gBattleMons[gBankTarget].ability; RecordAbilityBattle(gBankTarget, gLastUsedAbility); } - else if (gBattleMons[gBankAttacker].item + else if (gBattleMons[gBankAttacker].item != 0 || gBattleMons[gBankTarget].item == ITEM_ENIGMA_BERRY - || (gBattleMons[gBankTarget].item > 0x78 && gBattleMons[gBankTarget].item < 0x85) + || IS_ITEM_MAIL(gBattleMons[gBankTarget].item) || gBattleMons[gBankTarget].item == 0) { gBattlescriptCurrInstr++; } else { - // This is a leftover from R/S direct use of ewram addresses - u16* changedItem; - GET_CHANGED_ITEM_PTR_VIA_MEME_ACCESS(gBankAttacker, changedItem); + u16* changedItem = &gBattleStruct->changedItems[gBankAttacker]; gLastUsedItem = *changedItem = gBattleMons[gBankTarget].item; - - // A sane representation of this would simply be: - // gLastUsedItem = gBattleStruct->changedItems[gBankAttacker] = gBattleMons[gBankTarget].item; - gBattleMons[gBankTarget].item = 0; gActiveBank = gBankAttacker; @@ -2833,7 +2833,7 @@ void SetMoveEffect(bool8 primary, u8 certain) else { gLastUsedAbility = ABILITY_STICKY_HOLD; - gBattlescriptCurrInstr = BattleScript_StickyHoldOnKnockOff; + gBattlescriptCurrInstr = BattleScript_StickyHoldActivates; RecordAbilityBattle(gEffectBank, ABILITY_STICKY_HOLD); } break; @@ -2868,7 +2868,7 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattleCommunication[MOVE_EFFECT_BYTE] = 0; } -void atk15_seteffectwithchancetarget(void) +void atk15_seteffectwithchance(void) { u32 percentChance; @@ -3351,8 +3351,8 @@ void atk23_getexp(void) } else { - i = 0x149; - } + i = 0x149; + } // get exp getter bank if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) @@ -4816,8 +4816,7 @@ void atk49_moveend(void) case 7: // changed held items for (i = 0; i < gNoOfAllBanks; i++) { - u16* changedItem; - GET_CHANGED_ITEM_PTR_VIA_MEME_ACCESS(i, changedItem); + u16* changedItem = &gBattleStruct->changedItems[i]; if (*changedItem != 0) { gBattleMons[i].item = *changedItem; @@ -5775,8 +5774,7 @@ void atk52_switch_in_effects(void) for (i = 0; i < gNoOfAllBanks; i++) { - u16* hpOnSwitchout; - GET_HP_SWITCHOUT_PTR_VIA_MEME_ACCESS(GetBankSide(i), hpOnSwitchout) + u16* hpOnSwitchout = &gBattleStruct->hpOnSwitchout[GetBankSide(i)]; *hpOnSwitchout = gBattleMons[i].hp; } @@ -6413,7 +6411,7 @@ void atk6A_removeitem(void) gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); - GET_USED_ITEM_PTR_VIA_MEME_ACCESS(gActiveBank, usedHeldItem) + usedHeldItem = &gBattleStruct->usedHeldItems[gActiveBank]; *usedHeldItem = gBattleMons[gActiveBank].item; gBattleMons[gActiveBank].item = 0; @@ -6653,7 +6651,7 @@ bool8 sub_804F344(void) return (gBattle_BG2_X != 0x1A0); } -#define MON_ICON_LVLUP_BOX_TAG 0xD75A +#define MON_ICON_LVLUP_BOX_TAG 0xD75A #define sDestroy data0 #define sSavedLvlUpBoxXPosition data1 @@ -8148,9 +8146,9 @@ void atk97_try_infatuation(void) || gBattleMons[gBankTarget].status2 & STATUS2_INFATUATION || GetGenderFromSpeciesAndPersonality(speciesAttacker, personalityAttacker) == MON_GENDERLESS || GetGenderFromSpeciesAndPersonality(speciesTarget, personalityTarget) == MON_GENDERLESS) - { - gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); - } + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } else { gBattleMons[gBankTarget].status2 |= STATUS2_INFATUATED_WITH(gBankAttacker); @@ -8296,8 +8294,9 @@ void atk9C_set_substitute(void) } extern const u16 gMovesForbiddenToCopy[]; -#define MIMIC_FORBIDDEN_END 0xFFFE -#define METRONOME_SLEEPTALK_FORBIDDEN_END 0xFFFF +#define MIMIC_FORBIDDEN_END 0xFFFE +#define METRONOME_FORBIDDEN_END 0xFFFF +#define ASSIST_FORBIDDEN_END 0xFFFF static bool8 IsMoveUncopyableByMimic(u16 move) { @@ -8368,11 +8367,11 @@ void atk9E_metronome(void) { if (*move == gCurrentMove) break; - if (*move == METRONOME_SLEEPTALK_FORBIDDEN_END) + if (*move == METRONOME_FORBIDDEN_END) break; } - if (*move == METRONOME_SLEEPTALK_FORBIDDEN_END) + if (*move == METRONOME_FORBIDDEN_END) break; } @@ -8974,3 +8973,1666 @@ void atkA8_copymovepermanently(void) // sketch } } +bool8 IsTwoTurnsMove(u16 move) +{ + if (gBattleMoves[move].effect == EFFECT_SKULL_BASH + || gBattleMoves[move].effect == EFFECT_RAZOR_WIND + || gBattleMoves[move].effect == EFFECT_SKY_ATTACK + || gBattleMoves[move].effect == EFFECT_SOLARBEAM + || gBattleMoves[move].effect == EFFECT_FLY + || gBattleMoves[move].effect == EFFECT_BIDE) + return TRUE; + else + return FALSE; +} + +static bool8 IsInvalidForSleepTalkOrAssist(u16 move) +{ + if (move == 0 || move == MOVE_SLEEP_TALK || move == MOVE_ASSIST + || move == MOVE_MIRROR_MOVE || move == MOVE_METRONOME) + return TRUE; + else + return FALSE; +} + +u8 AttacksThisTurn(u8 bank, u16 move) // Note: returns 1 if it's a charging turn, otherwise 2 +{ + // first argument is unused + if (gBattleMoves[move].effect == EFFECT_SOLARBEAM + && (gBattleWeather & WEATHER_SUN_ANY)) + return 2; + + if (gBattleMoves[move].effect == EFFECT_SKULL_BASH + || gBattleMoves[move].effect == EFFECT_RAZOR_WIND + || gBattleMoves[move].effect == EFFECT_SKY_ATTACK + || gBattleMoves[move].effect == EFFECT_SOLARBEAM + || gBattleMoves[move].effect == EFFECT_FLY + || gBattleMoves[move].effect == EFFECT_BIDE) + { + if ((gHitMarker & HITMARKER_x8000000)) + return 1; + } + return 2; +} + +void atkA9_sleeptalk_choose_move(void) +{ + s32 i; + u8 unusableMovesBits = 0; + + for (i = 0; i < 4; i++) + { + if (IsInvalidForSleepTalkOrAssist(gBattleMons[gBankAttacker].moves[i]) + || gBattleMons[gBankAttacker].moves[i] == MOVE_FOCUS_PUNCH + || gBattleMons[gBankAttacker].moves[i] == MOVE_UPROAR + || IsTwoTurnsMove(gBattleMons[gBankAttacker].moves[i])) + { + unusableMovesBits |= gBitTable[i]; + } + + } + + unusableMovesBits = CheckMoveLimitations(gBankAttacker, unusableMovesBits, ~(MOVE_LIMITATION_PP)); + if (unusableMovesBits == 0xF) // all 4 moves cannot be chosen + { + gBattlescriptCurrInstr += 5; + } + else // at least one move can be chosen + { + u32 movePosition; + + do + { + movePosition = Random() & 3; + } while ((gBitTable[movePosition] & unusableMovesBits)); + + gRandomMove = gBattleMons[gBankAttacker].moves[movePosition]; + gCurrMovePos = movePosition; + gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); + gBankTarget = GetMoveTarget(gRandomMove, 0); + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +void atkAA_set_destinybond(void) +{ + gBattleMons[gBankAttacker].status2 |= STATUS2_DESTINY_BOND; + gBattlescriptCurrInstr++; +} + +void DestinyBondFlagUpdate(void) +{ + u8 sideAttacker = GetBankSide(gBankAttacker); + u8 sideTarget = GetBankSide(gBankTarget); + if (gBattleMons[gBankTarget].status2 & STATUS2_DESTINY_BOND + && sideAttacker != sideTarget + && !(gHitMarker & HITMARKER_GRUDGE)) + { + gHitMarker |= HITMARKER_DESTINYBOND; + } +} + +void atkAB_DestinyBondFlagUpdate(void) +{ + DestinyBondFlagUpdate(); + gBattlescriptCurrInstr++; +} + +extern const u8 sFlailHpScaleToPowerTable[12]; + +void atkAC_remaininghptopower(void) +{ + s32 i; + s32 hpFraction = GetScaledHPFraction(gBattleMons[gBankAttacker].hp, gBattleMons[gBankAttacker].maxHP, 48); + + for (i = 0; i < (s32) sizeof(sFlailHpScaleToPowerTable); i += 2) + { + if (hpFraction <= sFlailHpScaleToPowerTable[i]) + break; + } + + gDynamicBasePower = sFlailHpScaleToPowerTable[i + 1]; + gBattlescriptCurrInstr++; +} + +void atkAD_spite_ppreduce(void) +{ + if (gLastUsedMovesByBanks[gBankTarget] != 0 + && gLastUsedMovesByBanks[gBankTarget] != 0xFFFF) + { + s32 i; + + for (i = 0; i < 4; i++) + { + if (gLastUsedMovesByBanks[gBankTarget] == gBattleMons[gBankTarget].moves[i]) + break; + } + + if (i != 4 && gBattleMons[gBankTarget].pp[i] > 1) + { + s32 ppToDeduct = (Random() & 3) + 2; + if (gBattleMons[gBankTarget].pp[i] < ppToDeduct) + ppToDeduct = gBattleMons[gBankTarget].pp[i]; + + PREPARE_MOVE_BUFFER(gBattleTextBuff1, gLastUsedMovesByBanks[gBankTarget]) + + ConvertIntToDecimalStringN(gBattleTextBuff2, ppToDeduct, 0, 1); + + PREPARE_BYTE_NUMBER_BUFFER(gBattleTextBuff2, 1, ppToDeduct) + + gBattleMons[gBankTarget].pp[i] -= ppToDeduct; + gActiveBank = gBankTarget; + + if (!(gDisableStructs[gActiveBank].unk18_b & gBitTable[i]) + && !(gBattleMons[gActiveBank].status2 & STATUS2_TRANSFORMED)) + { + EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + i, 0, 1, &gBattleMons[gActiveBank].pp[i]); + MarkBufferBankForExecution(gActiveBank); + } + + gBattlescriptCurrInstr += 5; + + if (gBattleMons[gBankTarget].pp[i] == 0) + CancelMultiTurnMoves(gBankTarget); + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +void atkAE_heal_party_status(void) +{ + u32 zero = 0; + u8 toHeal = 0; + + if (gCurrentMove == MOVE_HEAL_BELL) + { + struct Pokemon* party; + s32 i; + + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + party = gPlayerParty; + else + party = gEnemyParty; + + if (gBattleMons[gBankAttacker].ability != ABILITY_SOUNDPROOF) + { + gBattleMons[gBankAttacker].status1 = 0; + gBattleMons[gBankAttacker].status2 &= ~(STATUS2_NIGHTMARE); + } + else + { + RecordAbilityBattle(gBankAttacker, gBattleMons[gBankAttacker].ability); + gBattleCommunication[MULTISTRING_CHOOSER] |= 1; + } + + gActiveBank = gBattleScripting.bank = GetBankByIdentity(GetBankIdentity(gBankAttacker) ^ BIT_MON); + + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE + && !(gAbsentBankFlags & gBitTable[gActiveBank])) + { + if (gBattleMons[gActiveBank].ability != ABILITY_SOUNDPROOF) + { + gBattleMons[gActiveBank].status1 = 0; + gBattleMons[gActiveBank].status2 &= ~(STATUS2_NIGHTMARE); + } + else + { + RecordAbilityBattle(gActiveBank, gBattleMons[gActiveBank].ability); + gBattleCommunication[MULTISTRING_CHOOSER] |= 2; + } + } + + for (i = 0; i < 6; i++) + { + u16 species = GetMonData(&party[i], MON_DATA_SPECIES2); + u8 abilityBit = GetMonData(&party[i], MON_DATA_ALT_ABILITY); + + if (species != 0 && species != SPECIES_EGG) + { + u8 ability; + + if (gBattlePartyID[gBankAttacker] == i) + ability = gBattleMons[gBankAttacker].ability; + else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE + && gBattlePartyID[gActiveBank] == i + && !(gAbsentBankFlags & gBitTable[gActiveBank])) + ability = gBattleMons[gActiveBank].ability; + else + ability = GetAbilityBySpecies(species, abilityBit); + + if (ability != ABILITY_SOUNDPROOF) + toHeal |= (1 << i); + } + } + } + else // Aromatherapy + { + gBattleCommunication[MULTISTRING_CHOOSER] = 4; + toHeal = 0x3F; + + gBattleMons[gBankAttacker].status1 = 0; + gBattleMons[gBankAttacker].status2 &= ~(STATUS2_NIGHTMARE); + + gActiveBank = GetBankByIdentity(GetBankIdentity(gBankAttacker) ^ 2); + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE + && !(gAbsentBankFlags & gBitTable[gActiveBank])) + { + gBattleMons[gActiveBank].status1 = 0; + gBattleMons[gActiveBank].status2 &= ~(STATUS2_NIGHTMARE); + } + + } + + if (toHeal) + { + gActiveBank = gBankAttacker; + EmitSetMonData(0, REQUEST_STATUS_BATTLE, toHeal, 4, &zero); + MarkBufferBankForExecution(gActiveBank); + } + + gBattlescriptCurrInstr++; +} + +void atkAF_cursetarget(void) +{ + if (gBattleMons[gBankTarget].status2 & STATUS2_CURSED) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + gBattleMons[gBankTarget].status2 |= STATUS2_CURSED; + gBattleMoveDamage = gBattleMons[gBankAttacker].maxHP / 2; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + + gBattlescriptCurrInstr += 5; + } +} + +void atkB0_set_spikes(void) +{ + u8 targetSide = GetBankSide(gBankAttacker) ^ BIT_SIDE; + + if (gSideTimers[targetSide].spikesAmount == 3) + { + gSpecialStatuses[gBankAttacker].flag20 = 1; + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + gSideAffecting[targetSide] |= SIDE_STATUS_SPIKES; + gSideTimers[targetSide].spikesAmount++; + gBattlescriptCurrInstr += 5; + } +} + +void atkB1_set_foresight(void) +{ + gBattleMons[gBankTarget].status2 |= STATUS2_FORESIGHT; + gBattlescriptCurrInstr++; +} + +void atkB2_setperishsong(void) +{ + s32 i; + s32 notAffectedCount = 0; + + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gStatuses3[i] & STATUS3_PERISH_SONG + || gBattleMons[i].ability == ABILITY_SOUNDPROOF) + { + notAffectedCount++; + } + else + { + gStatuses3[i] |= STATUS3_PERISH_SONG; + gDisableStructs[i].perishSong1 = 3; + gDisableStructs[i].perishSong2 = 3; + } + } + + PressurePPLoseOnUsingPerishSong(gBankAttacker); + + if (notAffectedCount == gNoOfAllBanks) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + else + gBattlescriptCurrInstr += 5; +} + +void atkB3_rolloutdamagecalculation(void) +{ + if (gBattleMoveFlags & MOVESTATUS_NOEFFECT) + { + CancelMultiTurnMoves(gBankAttacker); + gBattlescriptCurrInstr = BattleScript_PauseEffectivenessSoundResultMsgEndMove; + } + else + { + s32 i; + + if (!(gBattleMons[gBankAttacker].status2 & STATUS2_MULTIPLETURNS)) // first hit + { + gDisableStructs[gBankAttacker].rolloutTimer1 = 5; + gDisableStructs[gBankAttacker].rolloutTimer2 = 5; + gBattleMons[gBankAttacker].status2 |= STATUS2_MULTIPLETURNS; + gLockedMoves[gBankAttacker] = gCurrentMove; + } + if (--gDisableStructs[gBankAttacker].rolloutTimer1 == 0) // last hit + { + gBattleMons[gBankAttacker].status2 &= ~(STATUS2_MULTIPLETURNS); + } + + gDynamicBasePower = gBattleMoves[gCurrentMove].power; + + for (i = 1; i < (5 - gDisableStructs[gBankAttacker].rolloutTimer1); i++) + gDynamicBasePower *= 2; + + if (gBattleMons[gBankAttacker].status2 & STATUS2_DEFENSE_CURL) + gDynamicBasePower *= 2; + + gBattlescriptCurrInstr++; + } +} + +void atkB4_jumpifconfusedandstatmaxed(void) +{ + if (gBattleMons[gBankTarget].status2 & STATUS2_CONFUSION + && gBattleMons[gBankTarget].statStages[gBattlescriptCurrInstr[1]] == 0xC) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); + else + gBattlescriptCurrInstr += 6; +} + +void atkB5_furycuttercalc(void) +{ + if (gBattleMoveFlags & MOVESTATUS_NOEFFECT) + { + gDisableStructs[gBankAttacker].furyCutterCounter = 0; + gBattlescriptCurrInstr = BattleScript_PauseEffectivenessSoundResultMsgEndMove; + } + else + { + s32 i; + + if (gDisableStructs[gBankAttacker].furyCutterCounter != 5) + gDisableStructs[gBankAttacker].furyCutterCounter++; + + gDynamicBasePower = gBattleMoves[gCurrentMove].power; + + for (i = 1; i < gDisableStructs[gBankAttacker].furyCutterCounter; i++) + gDynamicBasePower *= 2; + + gBattlescriptCurrInstr++; + } +} + +void atkB6_happinesstodamagecalculation(void) +{ + if (gBattleMoves[gCurrentMove].effect == EFFECT_RETURN) + gDynamicBasePower = 10 * (gBattleMons[gBankAttacker].friendship) / 25; + else // EFFECT_FRUSTRATION + gDynamicBasePower = 10 * (255 - gBattleMons[gBankAttacker].friendship) / 25; + + gBattlescriptCurrInstr++; +} + +extern const u8 BattleScript_PresentDamageTarget[]; +extern const u8 BattleScript_AlreadyAtFullHp[]; +extern const u8 BattleScript_PresentHealTarget[]; + +void atkB7_presentdamagecalculation(void) +{ + s32 rand = Random() & 0xFF; + + if (rand < 102) + gDynamicBasePower = 40; + else if (rand < 178) + gDynamicBasePower = 80; + else if (rand < 204) + gDynamicBasePower = 120; + else + { + gBattleMoveDamage = gBattleMons[gBankTarget].maxHP / 4; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + gBattleMoveDamage *= -1; + } + if (rand < 204) + gBattlescriptCurrInstr = BattleScript_PresentDamageTarget; + else if (gBattleMons[gBankTarget].maxHP == gBattleMons[gBankTarget].hp) + gBattlescriptCurrInstr = BattleScript_AlreadyAtFullHp; + else + { + gBattleMoveFlags &= ~(MOVESTATUS_NOTAFFECTED); + gBattlescriptCurrInstr = BattleScript_PresentHealTarget; + } +} + +void atkB8_set_safeguard(void) +{ + if (gSideAffecting[GET_BANK_SIDE(gBankAttacker)] & SIDE_STATUS_SAFEGUARD) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + else + { + gSideAffecting[GET_BANK_SIDE(gBankAttacker)] |= SIDE_STATUS_SAFEGUARD; + gSideTimers[GET_BANK_SIDE(gBankAttacker)].safeguardTimer = 5; + gSideTimers[GET_BANK_SIDE(gBankAttacker)].safeguardBank = gBankAttacker; + gBattleCommunication[MULTISTRING_CHOOSER] = 5; + } + + gBattlescriptCurrInstr++; +} + +void atkB9_magnitudedamagecalculation(void) +{ + s32 magnitude = Random() % 100; + + if (magnitude < 5) + { + gDynamicBasePower = 10; + magnitude = 4; + } + else if (magnitude < 15) + { + gDynamicBasePower = 30; + magnitude = 5; + } + else if (magnitude < 35) + { + gDynamicBasePower = 50; + magnitude = 6; + } + else if (magnitude < 65) + { + gDynamicBasePower = 70; + magnitude = 7; + } + else if (magnitude < 85) + { + gDynamicBasePower = 90; + magnitude = 8; + } + else if (magnitude < 95) + { + gDynamicBasePower = 110; + magnitude = 9; + } + else + { + gDynamicBasePower = 150; + magnitude = 10; + } + + + PREPARE_BYTE_NUMBER_BUFFER(gBattleTextBuff1, 2, magnitude) + + for (gBankTarget = 0; gBankTarget < gNoOfAllBanks; gBankTarget++) + { + if (gBankTarget == gBankAttacker) + continue; + if (!(gAbsentBankFlags & gBitTable[gBankTarget])) // a valid target was found + break; + } + + gBattlescriptCurrInstr++; +} + +void atkBA_jumpifnopursuitswitchdmg(void) +{ + if (gMultiHitCounter == 1) + { + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + gBankTarget = GetBankByIdentity(IDENTITY_OPPONENT_MON1); + else + gBankTarget = GetBankByIdentity(IDENTITY_PLAYER_MON1); + } + else + { + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + gBankTarget = GetBankByIdentity(IDENTITY_OPPONENT_MON2); + else + gBankTarget = GetBankByIdentity(IDENTITY_PLAYER_MON2); + } + + if (gActionForBanks[gBankTarget] == 0 + && gBankAttacker == *(gBattleStruct->moveTarget + gBankTarget) + && !(gBattleMons[gBankTarget].status1 & (STATUS_SLEEP | STATUS_FREEZE)) + && gBattleMons[gBankAttacker].hp + && !gDisableStructs[gBankTarget].truantCounter + && gChosenMovesByBanks[gBankTarget] == MOVE_PURSUIT) + { + s32 i; + + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gTurnOrder[i] == gBankTarget) + gUnknown_0202407A[i] = 11; + } + + gCurrentMove = MOVE_PURSUIT; + gCurrMovePos = gUnknown_020241E9 = *(gBattleStruct->chosenMovesIds + gBankTarget); + gBattlescriptCurrInstr += 5; + gBattleScripting.animTurn = 1; + gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +void atkBB_setsunny(void) +{ + if (gBattleWeather & WEATHER_SUN_ANY) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + } + else + { + gBattleWeather = WEATHER_SUN_TEMPORARY; + gBattleCommunication[MULTISTRING_CHOOSER] = 4; + gWishFutureKnock.weatherDuration = 5; + } + + gBattlescriptCurrInstr++; +} + +void atkBC_maxattackhalvehp(void) // belly drum +{ + u32 halfHp = gBattleMons[gBankAttacker].maxHP / 2; + + if (!(gBattleMons[gBankAttacker].maxHP / 2)) + halfHp = 1; + + if (gBattleMons[gBankAttacker].statStages[STAT_STAGE_ATK] < 12 + && gBattleMons[gBankAttacker].hp > halfHp) + { + gBattleMons[gBankAttacker].statStages[STAT_STAGE_ATK] = 12; + gBattleMoveDamage = gBattleMons[gBankAttacker].maxHP / 2; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + + gBattlescriptCurrInstr += 5; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +void atkBD_copyfoestats(void) // psych up +{ + s32 i; + + for (i = 0; i < BATTLE_STATS_NO; i++) + { + gBattleMons[gBankAttacker].statStages[i] = gBattleMons[gBankTarget].statStages[i]; + } + + gBattlescriptCurrInstr += 5; // Has an unused jump ptr(possibly for a failed attempt) parameter. +} + +extern const u8 BattleScript_WrapFree[]; +extern const u8 BattleScript_LeechSeedFree[]; +extern const u8 BattleScript_SpikesFree[]; + +void atkBE_rapidspinfree(void) +{ + if (gBattleMons[gBankAttacker].status2 & STATUS2_WRAPPED) + { + gBattleScripting.bank = gBankTarget; + gBattleMons[gBankAttacker].status2 &= ~(STATUS2_WRAPPED); + gBankTarget = *(gBattleStruct->wrappedBy + gBankAttacker); + + gBattleTextBuff1[0] = B_BUFF_PLACEHOLDER_BEGIN; + gBattleTextBuff1[1] = B_BUFF_MOVE; + gBattleTextBuff1[2] = *(gBattleStruct->wrappedMove + gBankAttacker * 2 + 0); + gBattleTextBuff1[3] = *(gBattleStruct->wrappedMove + gBankAttacker * 2 + 1); + gBattleTextBuff1[4] = B_BUFF_EOS; + + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_WrapFree; + } + else if (gStatuses3[gBankAttacker] & STATUS3_LEECHSEED) + { + gStatuses3[gBankAttacker] &= ~(STATUS3_LEECHSEED); + gStatuses3[gBankAttacker] &= ~(STATUS3_LEECHSEED_BANK); + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_LeechSeedFree; + } + else if (gSideAffecting[GetBankSide(gBankAttacker)] & SIDE_STATUS_SPIKES) + { + gSideAffecting[GetBankSide(gBankAttacker)] &= ~(SIDE_STATUS_SPIKES); + gSideTimers[GetBankSide(gBankAttacker)].spikesAmount = 0; + BattleScriptPushCursor(); + gBattlescriptCurrInstr = BattleScript_SpikesFree; + } + else + { + gBattlescriptCurrInstr++; + } +} + +void atkBF_set_defense_curl(void) +{ + gBattleMons[gBankAttacker].status2 |= STATUS2_DEFENSE_CURL; + gBattlescriptCurrInstr++; +} + +void atkC0_recoverbasedonsunlight(void) +{ + gBankTarget = gBankAttacker; + + if (gBattleMons[gBankAttacker].hp != gBattleMons[gBankAttacker].maxHP) + { + if (gBattleWeather == 0 || !WEATHER_HAS_EFFECT) + gBattleMoveDamage = gBattleMons[gBankAttacker].maxHP / 2; + else if (gBattleWeather & WEATHER_SUN_ANY) + gBattleMoveDamage = 20 * gBattleMons[gBankAttacker].maxHP / 30; + else // not sunny weather + gBattleMoveDamage = gBattleMons[gBankAttacker].maxHP / 4; + + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + gBattleMoveDamage *= -1; + + gBattlescriptCurrInstr += 5; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +#ifdef NONMATCHING +void atkC1_hidden_power(void) +{ + s32 powerBits; + s32 typeBits; + + powerBits = ((gBattleMons[gBankAttacker].hpIV & 2) >> 1) + | ((gBattleMons[gBankAttacker].attackIV & 2) << 0) + | ((gBattleMons[gBankAttacker].defenseIV & 2) << 1) + | ((gBattleMons[gBankAttacker].speedIV & 2) << 2) + | ((gBattleMons[gBankAttacker].spAttackIV & 2) << 3) + | ((gBattleMons[gBankAttacker].spDefenseIV & 2) << 4); + + typeBits = ((gBattleMons[gBankAttacker].hpIV & 1) << 0) + | ((gBattleMons[gBankAttacker].attackIV & 1) << 1) + | ((gBattleMons[gBankAttacker].defenseIV & 1) << 2) + | ((gBattleMons[gBankAttacker].speedIV & 1) << 3) + | ((gBattleMons[gBankAttacker].spAttackIV & 1) << 4) + | ((gBattleMons[gBankAttacker].spDefenseIV & 1) << 5); + + gDynamicBasePower = (40 * powerBits) / 63 + 30; + + gBattleStruct->dynamicMoveType = (15 * typeBits) / 63 + 1; + if (gBattleStruct->dynamicMoveType > 8) + gBattleStruct->dynamicMoveType++; + gBattleStruct->dynamicMoveType |= 0xC0; + + gBattlescriptCurrInstr++; +} + +#else +__attribute__((naked)) +void atkC1_hidden_power(void) +{ + asm(".syntax unified\n\ + push {r4-r7,lr}\n\ + mov r7, r10\n\ + mov r6, r9\n\ + mov r5, r8\n\ + push {r5-r7}\n\ + ldr r2, =gBattleMons\n\ + ldr r0, =gBankAttacker\n\ + ldrb r1, [r0]\n\ + movs r0, 0x58\n\ + adds r4, r1, 0\n\ + muls r4, r0\n\ + adds r4, r2\n\ + ldrb r0, [r4, 0x14]\n\ + mov r10, r0\n\ + mov r7, r10\n\ + lsls r7, 27\n\ + adds r0, r7, 0\n\ + lsrs r0, 27\n\ + mov r10, r0\n\ + movs r1, 0x2\n\ + mov r2, r10\n\ + ands r2, r1\n\ + asrs r2, 1\n\ + ldrh r7, [r4, 0x14]\n\ + mov r9, r7\n\ + mov r0, r9\n\ + lsls r0, 22\n\ + mov r9, r0\n\ + lsrs r3, r0, 27\n\ + adds r0, r1, 0\n\ + ands r0, r3\n\ + orrs r2, r0\n\ + ldrb r7, [r4, 0x15]\n\ + mov r8, r7\n\ + mov r0, r8\n\ + lsls r0, 25\n\ + mov r8, r0\n\ + lsrs r3, r0, 27\n\ + adds r0, r1, 0\n\ + ands r0, r3\n\ + lsls r0, 1\n\ + orrs r2, r0\n\ + ldr r6, [r4, 0x14]\n\ + lsls r6, 12\n\ + lsrs r3, r6, 27\n\ + adds r0, r1, 0\n\ + ands r0, r3\n\ + lsls r0, 2\n\ + orrs r2, r0\n\ + ldrh r5, [r4, 0x16]\n\ + lsls r5, 23\n\ + lsrs r3, r5, 27\n\ + adds r0, r1, 0\n\ + ands r0, r3\n\ + lsls r0, 3\n\ + orrs r2, r0\n\ + ldrb r3, [r4, 0x17]\n\ + lsls r3, 26\n\ + lsrs r0, r3, 27\n\ + ands r1, r0\n\ + lsls r1, 4\n\ + orrs r2, r1\n\ + movs r1, 0x1\n\ + adds r4, r1, 0\n\ + mov r7, r10\n\ + ands r4, r7\n\ + mov r0, r9\n\ + lsrs r0, 27\n\ + mov r9, r0\n\ + adds r0, r1, 0\n\ + mov r7, r9\n\ + ands r0, r7\n\ + lsls r0, 1\n\ + orrs r4, r0\n\ + mov r0, r8\n\ + lsrs r0, 27\n\ + mov r8, r0\n\ + adds r0, r1, 0\n\ + mov r7, r8\n\ + ands r0, r7\n\ + lsls r0, 2\n\ + orrs r4, r0\n\ + lsrs r6, 27\n\ + adds r0, r1, 0\n\ + ands r0, r6\n\ + lsls r0, 3\n\ + orrs r4, r0\n\ + lsrs r5, 27\n\ + adds r0, r1, 0\n\ + ands r0, r5\n\ + lsls r0, 4\n\ + orrs r4, r0\n\ + lsrs r3, 27\n\ + ands r1, r3\n\ + lsls r1, 5\n\ + orrs r4, r1\n\ + ldr r5, =gDynamicBasePower\n\ + lsls r0, r2, 2\n\ + adds r0, r2\n\ + lsls r0, 3\n\ + movs r1, 0x3F\n\ + bl __divsi3\n\ + adds r0, 0x1E\n\ + strh r0, [r5]\n\ + ldr r6, =gBattleStruct\n\ + ldr r5, [r6]\n\ + lsls r0, r4, 4\n\ + subs r0, r4\n\ + movs r1, 0x3F\n\ + bl __divsi3\n\ + adds r0, 0x1\n\ + strb r0, [r5, 0x13]\n\ + ldr r1, [r6]\n\ + ldrb r0, [r1, 0x13]\n\ + cmp r0, 0x8\n\ + bls _080544F0\n\ + adds r0, 0x1\n\ + strb r0, [r1, 0x13]\n\ +_080544F0:\n\ + ldr r2, [r6]\n\ + ldrb r0, [r2, 0x13]\n\ + movs r1, 0xC0\n\ + orrs r0, r1\n\ + strb r0, [r2, 0x13]\n\ + ldr r1, =gBattlescriptCurrInstr\n\ + ldr r0, [r1]\n\ + adds r0, 0x1\n\ + str r0, [r1]\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\ + .pool\n\ + .syntax divided"); +} +#endif // NONMATCHING + +void atkC2_selectnexttarget(void) +{ + for (gBankTarget = 0; gBankTarget < gNoOfAllBanks; gBankTarget++) + { + if (gBankTarget == gBankAttacker) + continue; + if (!(gAbsentBankFlags & gBitTable[gBankTarget])) + break; + } + gBattlescriptCurrInstr++; +} + +void atkC3_setfutureattack(void) +{ + if (gWishFutureKnock.futureSightCounter[gBankTarget] != 0) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + gSideAffecting[GET_BANK_SIDE(gBankTarget)] |= SIDE_STATUS_FUTUREATTACK; + gWishFutureKnock.futureSightMove[gBankTarget] = gCurrentMove; + gWishFutureKnock.futureSightAttacker[gBankTarget] = gBankAttacker; + gWishFutureKnock.futureSightCounter[gBankTarget] = 3; + gWishFutureKnock.futureSightDmg[gBankTarget] = CalculateBaseDamage(&gBattleMons[gBankAttacker], &gBattleMons[gBankTarget], gCurrentMove, + gSideAffecting[GET_BANK_SIDE(gBankTarget)], 0, + 0, gBankAttacker, gBankTarget); + + if (gProtectStructs[gBankAttacker].helpingHand) + gWishFutureKnock.futureSightDmg[gBankTarget] = gWishFutureKnock.futureSightDmg[gBankTarget] * 15 / 10; + + if (gCurrentMove == MOVE_DOOM_DESIRE) + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + + gBattlescriptCurrInstr += 5; + } +} + +void atkC4_beat_up(void) +{ + struct Pokemon* party; + + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + party = gPlayerParty; + else + party = gEnemyParty; + + if (gBattleMons[gBankTarget].hp == 0) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + u8 beforeLoop = gBattleCommunication[0]; + for (;gBattleCommunication[0] < 6; gBattleCommunication[0]++) + { + if (GetMonData(&party[gBattleCommunication[0]], MON_DATA_HP) + && GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES2) + && GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES2) != SPECIES_EGG + && !GetMonData(&party[gBattleCommunication[0]], MON_DATA_STATUS)) + break; + } + if (gBattleCommunication[0] < 6) + { + PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gBankAttacker, gBattleCommunication[0]) + + gBattlescriptCurrInstr += 9; + + gBattleMoveDamage = gBaseStats[GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES)].baseAttack; + gBattleMoveDamage *= gBattleMoves[gCurrentMove].power; + gBattleMoveDamage *= (GetMonData(&party[gBattleCommunication[0]], MON_DATA_LEVEL) * 2 / 5 + 2); + gBattleMoveDamage /= gBaseStats[gBattleMons[gBankTarget].species].baseDefense; + gBattleMoveDamage = (gBattleMoveDamage / 50) + 2; + if (gProtectStructs[gBankAttacker].helpingHand) + gBattleMoveDamage = gBattleMoveDamage * 15 / 10; + + gBattleCommunication[0]++; + } + else if (beforeLoop != 0) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + else + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 5); + } +} + +void atkC5_setsemiinvulnerablebit(void) +{ + switch (gCurrentMove) + { + case MOVE_FLY: + case MOVE_BOUNCE: + gStatuses3[gBankAttacker] |= STATUS3_ON_AIR; + break; + case MOVE_DIG: + gStatuses3[gBankAttacker] |= STATUS3_UNDERGROUND; + break; + case MOVE_DIVE: + gStatuses3[gBankAttacker] |= STATUS3_UNDERWATER; + break; + } + + gBattlescriptCurrInstr++; +} + +void atkC6_clearsemiinvulnerablebit(void) +{ + switch (gCurrentMove) + { + case MOVE_FLY: + case MOVE_BOUNCE: + gStatuses3[gBankAttacker] &= ~STATUS3_ON_AIR; + break; + case MOVE_DIG: + gStatuses3[gBankAttacker] &= ~STATUS3_UNDERGROUND; + break; + case MOVE_DIVE: + gStatuses3[gBankAttacker] &= ~STATUS3_UNDERWATER; + break; + } + + gBattlescriptCurrInstr++; +} + +void atkC7_setminimize(void) +{ + if (gHitMarker & HITMARKER_OBEYS) + gStatuses3[gBankAttacker] |= STATUS3_MINIMIZED; + + gBattlescriptCurrInstr++; +} + +void atkC8_sethail(void) +{ + if (gBattleWeather & WEATHER_HAIL_ANY) + { + gBattleMoveFlags |= MOVESTATUS_MISSED; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + } + else + { + gBattleWeather = WEATHER_HAIL; + gBattleCommunication[MULTISTRING_CHOOSER] = 5; + gWishFutureKnock.weatherDuration = 5; + } + + gBattlescriptCurrInstr++; +} + +void atkC9_jumpifattackandspecialattackcannotfall(void) // memento +{ + if (gBattleMons[gBankTarget].statStages[STAT_STAGE_ATK] == 0 + && gBattleMons[gBankTarget].statStages[STAT_STAGE_SPATK] == 0 + && gBattleCommunication[6] != 1) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + gActiveBank = gBankAttacker; + gBattleMoveDamage = gBattleMons[gActiveBank].hp; + EmitHealthBarUpdate(0, 0x7FFF); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr += 5; + } +} + +void atkCA_setforcedtarget(void) // follow me +{ + gSideTimers[GetBankSide(gBankAttacker)].followmeTimer = 1; + gSideTimers[GetBankSide(gBankAttacker)].followmeTarget = gBankAttacker; + gBattlescriptCurrInstr++; +} + +void atkCB_setcharge(void) +{ + gStatuses3[gBankAttacker] |= STATUS3_CHARGED_UP; + gDisableStructs[gBankAttacker].chargeTimer1 = 2; + gDisableStructs[gBankAttacker].chargeTimer2 = 2; + gBattlescriptCurrInstr++; +} + +void atkCC_callterrainattack(void) // nature power +{ + gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); + gCurrentMove = sNaturePowerMoves[gBattleTerrain]; + gBankTarget = GetMoveTarget(gCurrentMove, 0); + BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]); + gBattlescriptCurrInstr++; +} + +void atkCD_cureifburnedparalysedorpoisoned(void) // refresh +{ + if (gBattleMons[gBankAttacker].status1 & (STATUS_POISON | STATUS_BURN | STATUS_PARALYSIS | STATUS_TOXIC_POISON)) + { + gBattleMons[gBankAttacker].status1 = 0; + gBattlescriptCurrInstr += 5; + gActiveBank = gBankAttacker; + EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); + MarkBufferBankForExecution(gActiveBank); + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +void atkCE_settorment(void) +{ + if (gBattleMons[gBankTarget].status2 & STATUS2_TORMENT) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + gBattleMons[gBankTarget].status2 |= STATUS2_TORMENT; + gBattlescriptCurrInstr += 5; + } +} + +void atkCF_jumpifnodamage(void) +{ + if (gProtectStructs[gBankAttacker].physicalDmg || gProtectStructs[gBankAttacker].specialDmg) + gBattlescriptCurrInstr += 5; + else + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); +} + +void atkD0_settaunt(void) +{ + if (gDisableStructs[gBankTarget].tauntTimer1 == 0) + { + gDisableStructs[gBankTarget].tauntTimer1 = 2; + gDisableStructs[gBankTarget].tauntTimer2 = 2; + gBattlescriptCurrInstr += 5; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +void atkD1_set_helpinghand(void) +{ + gBankTarget = GetBankByIdentity(GetBankIdentity(gBankAttacker) ^ BIT_MON); + + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE + && !(gAbsentBankFlags & gBitTable[gBankTarget]) + && !gProtectStructs[gBankAttacker].helpingHand + && !gProtectStructs[gBankTarget].helpingHand) + { + gProtectStructs[gBankTarget].helpingHand = 1; + gBattlescriptCurrInstr += 5; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +void atkD2_swap_items(void) // trick +{ + // opponent can't swap items with player in regular battles + if (gBattleTypeFlags & BATTLE_TYPE_x4000000 + || (GetBankSide(gBankAttacker) == SIDE_OPPONENT + && !(gBattleTypeFlags & (BATTLE_TYPE_LINK + | BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_FRONTIER + | BATTLE_TYPE_SECRET_BASE + | BATTLE_TYPE_x2000000)))) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + u8 sideAttacker = GetBankSide(gBankAttacker); + u8 sideTarget = GetBankSide(gBankTarget); + + // you can't swap items if they were knocked off in regular battles + if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK + | BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_FRONTIER + | BATTLE_TYPE_SECRET_BASE + | BATTLE_TYPE_x2000000)) + && (gWishFutureKnock.knockedOffPokes[sideAttacker] & gBitTable[gBattlePartyID[gBankAttacker]] + || gWishFutureKnock.knockedOffPokes[sideTarget] & gBitTable[gBattlePartyID[gBankTarget]])) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + // can't swap if two pokemon don't have an item + // or if either of them is an enigma berry or a mail + else if ((gBattleMons[gBankAttacker].item == 0 && gBattleMons[gBankTarget].item == 0) + || gBattleMons[gBankAttacker].item == ITEM_ENIGMA_BERRY + || gBattleMons[gBankTarget].item == ITEM_ENIGMA_BERRY + || IS_ITEM_MAIL(gBattleMons[gBankAttacker].item) + || IS_ITEM_MAIL(gBattleMons[gBankTarget].item)) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + // check if ability prevents swapping + else if (gBattleMons[gBankTarget].ability == ABILITY_STICKY_HOLD) + { + gBattlescriptCurrInstr = BattleScript_StickyHoldActivates; + gLastUsedAbility = gBattleMons[gBankTarget].ability; + RecordAbilityBattle(gBankTarget, gLastUsedAbility); + } + // took a while, but all checks passed and items can be safely swapped + else + { + u16 oldItemAtk, *newItemAtk; + + newItemAtk = &gBattleStruct->changedItems[gBankAttacker]; + oldItemAtk = gBattleMons[gBankAttacker].item; + *newItemAtk = gBattleMons[gBankTarget].item; + + gBattleMons[gBankAttacker].item = 0; + gBattleMons[gBankTarget].item = oldItemAtk; + + gActiveBank = gBankAttacker; + EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, newItemAtk); + MarkBufferBankForExecution(gBankAttacker); + + gActiveBank = gBankTarget; + EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gBankTarget].item); + MarkBufferBankForExecution(gBankTarget); + + *(u8*)((u8*)(&gBattleStruct->choicedMove[gBankTarget]) + 0) = 0; + *(u8*)((u8*)(&gBattleStruct->choicedMove[gBankTarget]) + 1) = 0; + + *(u8*)((u8*)(&gBattleStruct->choicedMove[gBankAttacker]) + 0) = 0; + *(u8*)((u8*)(&gBattleStruct->choicedMove[gBankAttacker]) + 1) = 0; + + gBattlescriptCurrInstr += 5; + + PREPARE_ITEM_BUFFER(gBattleTextBuff1, *newItemAtk) + PREPARE_ITEM_BUFFER(gBattleTextBuff2, oldItemAtk) + + if (oldItemAtk != 0 && *newItemAtk != 0) + gBattleCommunication[MULTISTRING_CHOOSER] = 2; // attacker's item -> <- target's item + else if (oldItemAtk == 0 && *newItemAtk != 0) + gBattleCommunication[MULTISTRING_CHOOSER] = 0; // nothing -> <- target's item + else + gBattleCommunication[MULTISTRING_CHOOSER] = 1; // attacker's item -> <- nothing + } + } +} + +void atkD3_copy_ability(void) // role play +{ + if (gBattleMons[gBankTarget].ability != 0 + && gBattleMons[gBankTarget].ability != ABILITY_WONDER_GUARD) + { + gBattleMons[gBankAttacker].ability = gBattleMons[gBankTarget].ability; + gLastUsedAbility = gBattleMons[gBankTarget].ability; + gBattlescriptCurrInstr += 5; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +void atkD4_wish_effect(void) +{ + switch (BSScriptRead8(gBattlescriptCurrInstr + 1)) + { + case 0: // use wish + if (gWishFutureKnock.wishCounter[gBankAttacker] == 0) + { + gWishFutureKnock.wishCounter[gBankAttacker] = 2; + gWishFutureKnock.wishUserID[gBankAttacker] = gBattlePartyID[gBankAttacker]; + gBattlescriptCurrInstr += 6; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); + } + break; + case 1: // heal effect + PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff1, gBankTarget, gWishFutureKnock.wishUserID[gBankTarget]) + + gBattleMoveDamage = gBattleMons[gBankTarget].maxHP / 2; + if (gBattleMoveDamage == 0) + gBattleMoveDamage = 1; + gBattleMoveDamage *= -1; + + if (gBattleMons[gBankTarget].hp == gBattleMons[gBankTarget].maxHP) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); + else + gBattlescriptCurrInstr += 6; + + break; + } +} + +void atkD5_setroots(void) // ingrain +{ + if (gStatuses3[gBankAttacker] & STATUS3_ROOTED) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + gStatuses3[gBankAttacker] |= STATUS3_ROOTED; + gBattlescriptCurrInstr += 5; + } +} + +void atkD6_doubledamagedealtifdamaged(void) +{ + if ((gProtectStructs[gBankAttacker].physicalDmg + && gProtectStructs[gBankAttacker].physicalBank == gBankTarget) + || (gProtectStructs[gBankAttacker].specialDmg + && gProtectStructs[gBankAttacker].specialBank == gBankTarget)) + { + gBattleScripting.dmgMultiplier = 2; + } + + gBattlescriptCurrInstr++; +} + +void atkD7_setyawn(void) +{ + if (gStatuses3[gBankTarget] & STATUS3_YAWN + || gBattleMons[gBankTarget].status1 & STATUS_ANY) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + gStatuses3[gBankTarget] |= 0x1000; + gBattlescriptCurrInstr += 5; + } +} + +void atkD8_setdamagetohealthdifference(void) +{ + if (gBattleMons[gBankTarget].hp <= gBattleMons[gBankAttacker].hp) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + gBattleMoveDamage = gBattleMons[gBankTarget].hp - gBattleMons[gBankAttacker].hp; + gBattlescriptCurrInstr += 5; + } +} + +void atkD9_scaledamagebyhealthratio(void) +{ + if (gDynamicBasePower == 0) + { + u8 power = gBattleMoves[gCurrentMove].power; + gDynamicBasePower = gBattleMons[gBankAttacker].hp * power / gBattleMons[gBankAttacker].maxHP; + if (gDynamicBasePower == 0) + gDynamicBasePower = 1; + } + gBattlescriptCurrInstr++; +} + +void atkDA_abilityswap(void) // skill swap +{ + if ((gBattleMons[gBankAttacker].ability == 0 + && gBattleMons[gBankTarget].ability == 0) + || gBattleMons[gBankAttacker].ability == ABILITY_WONDER_GUARD + || gBattleMons[gBankTarget].ability == ABILITY_WONDER_GUARD + || gBattleMoveFlags & MOVESTATUS_NOEFFECT) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + u8 abilityAtk = gBattleMons[gBankAttacker].ability; + gBattleMons[gBankAttacker].ability = gBattleMons[gBankTarget].ability; + gBattleMons[gBankTarget].ability = abilityAtk; + + gBattlescriptCurrInstr += 5; + } +} + +void atkDB_imprisoneffect(void) +{ + if ((gStatuses3[gBankAttacker] & STATUS3_IMPRISONED_OTHERS)) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + u8 bank, sideAttacker; + + sideAttacker = GetBankSide(gBankAttacker); + PressurePPLoseOnUsingImprision(gBankAttacker); + for (bank = 0; bank < gNoOfAllBanks; bank++) + { + if (sideAttacker != GetBankSide(bank)) + { + s32 attackerMoveId; + for (attackerMoveId = 0; attackerMoveId < 4; attackerMoveId++) + { + s32 i; + for (i = 0; i < 4; i++) + { + if (gBattleMons[gBankAttacker].moves[attackerMoveId] == gBattleMons[bank].moves[i] + && gBattleMons[gBankAttacker].moves[attackerMoveId] != MOVE_NONE) + break; + } + if (i != 4) + break; + } + if (attackerMoveId != 4) + { + gStatuses3[gBankAttacker] |= STATUS3_IMPRISONED_OTHERS; + gBattlescriptCurrInstr += 5; + break; + } + } + } + if (bank == gNoOfAllBanks) // In Generation 3 games, Imprison fails if the user doesn't share any moves with any of the foes + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +void atkDC_setgrudge(void) +{ + if (gStatuses3[gBankAttacker] & STATUS3_GRUDGE) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + gStatuses3[gBankAttacker] |= STATUS3_GRUDGE; + gBattlescriptCurrInstr += 5; + } +} + +void atkDD_weightdamagecalculation(void) +{ + s32 i; + for (i = 0; sWeightToDamageTable[i] != 0xFFFF; i += 2) + { + if (sWeightToDamageTable[i] > GetPokedexHeightWeight(SpeciesToNationalPokedexNum(gBattleMons[gBankTarget].species), 1)) + break; + } + + if (sWeightToDamageTable[i] != 0xFFFF) + gDynamicBasePower = sWeightToDamageTable[i + 1]; + else + gDynamicBasePower = 120; + + gBattlescriptCurrInstr++; +} + +void atkDE_asistattackselect(void) +{ + s32 chooseableMovesNo = 0; + struct Pokemon* party; + s32 monId, moveId; + u16* movesArray = gBattleStruct->assistPossibleMoves; + + if (GET_BANK_SIDE(gBankAttacker) != SIDE_PLAYER) + party = gEnemyParty; + else + party = gPlayerParty; + + for (monId = 0; monId < 6; monId++) + { + if (monId == gBattlePartyID[gBankAttacker]) + continue; + if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_NONE) + continue; + if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_EGG) + continue; + + for (moveId = 0; moveId < 4; moveId++) + { + s32 i = 0; + u16 move = GetMonData(&party[monId], MON_DATA_MOVE1 + moveId); + + if (IsInvalidForSleepTalkOrAssist(move)) + continue; + + for (; gMovesForbiddenToCopy[i] != ASSIST_FORBIDDEN_END && move != gMovesForbiddenToCopy[i]; i++); + + if (gMovesForbiddenToCopy[i] != ASSIST_FORBIDDEN_END) + continue; + if (move == MOVE_NONE) + continue; + + movesArray[chooseableMovesNo] = move; + chooseableMovesNo++; + } + } + if (chooseableMovesNo) + { + gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); + gRandomMove = movesArray[((Random() & 0xFF) * chooseableMovesNo) >> 8]; + gBankTarget = GetMoveTarget(gRandomMove, 0); + gBattlescriptCurrInstr += 5; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +void atkDF_setmagiccoat(void) +{ + gBankTarget = gBankAttacker; + gSpecialStatuses[gBankAttacker].flag20 = 1; + if (gCurrentMoveTurn == gNoOfAllBanks - 1) // moves last turn + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + gProtectStructs[gBankAttacker].bounceMove = 1; + gBattlescriptCurrInstr += 5; + } +} + +void atkE0_setstealstatchange(void) // snatch +{ + gSpecialStatuses[gBankAttacker].flag20 = 1; + if (gCurrentMoveTurn == gNoOfAllBanks - 1) // moves last turn + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + gProtectStructs[gBankAttacker].stealMove = 1; + gBattlescriptCurrInstr += 5; + } +} + +void atkE1_intimidate_string_loader(void) +{ + u8 side; + + gBattleScripting.bank = gBattleStruct->intimidateBank; + side = GetBankSide(gBattleScripting.bank); + + PREPARE_ABILITY_BUFFER(gBattleTextBuff1, gBattleMons[gBattleScripting.bank].ability) + + for (;gBankTarget < gNoOfAllBanks; gBankTarget++) + { + if (GetBankSide(gBankTarget) == side) + continue; + if (!(gAbsentBankFlags & gBitTable[gBankTarget])) + break; + } + + if (gBankTarget >= gNoOfAllBanks) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + else + gBattlescriptCurrInstr += 5; +} + +void atkE2_switchout_abilities(void) +{ + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + switch (gBattleMons[gActiveBank].ability) + { + case ABILITY_NATURAL_CURE: + gBattleMons[gActiveBank].status1 = 0; + EmitSetMonData(0, REQUEST_STATUS_BATTLE, gBitTable[*(gBattleStruct->field_58 + gActiveBank)], 4, &gBattleMons[gActiveBank].status1); + MarkBufferBankForExecution(gActiveBank); + break; + } + + gBattlescriptCurrInstr += 2; +} + +void atkE3_jumpifhasnohp(void) +{ + gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + + if (gBattleMons[gActiveBank].hp == 0) + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); + else + gBattlescriptCurrInstr += 6; +} + +void atkE4_getsecretpowereffect(void) +{ + switch (gBattleTerrain) + { + case BATTLE_TERRAIN_GRASS: + gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_POISON; + break; + case BATTLE_TERRAIN_LONG_GRASS: + gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_SLEEP; + break; + case BATTLE_TERRAIN_SAND: + gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_ACC_MINUS_1; + break; + case BATTLE_TERRAIN_UNDERWATER: + gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_DEF_MINUS_1; + break; + case BATTLE_TERRAIN_WATER: + gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_ATK_MINUS_1; + break; + case BATTLE_TERRAIN_POND: + gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_SPD_MINUS_1; + break; + case BATTLE_TERRAIN_ROCK: + gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_CONFUSION; + break; + case BATTLE_TERRAIN_CAVE: + gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_FLINCH; + break; + default: + gBattleCommunication[MOVE_EFFECT_BYTE] = MOVE_EFFECT_PARALYSIS; + break; + } + gBattlescriptCurrInstr++; +} + +extern bool8 InBattlePike(void); +extern bool8 InBattlePyramid(void); +extern u16 GetBattlePyramidPickupItemId(void); + +extern const u16 gRarePickupItems[]; +extern const u16 gPickupItems[]; +extern const u8 gPickupProbabilities[]; + +void atkE5_pickup(void) +{ + if (!InBattlePike()) + { + s32 i; + u16 species, heldItem; + u8 ability; + + if (InBattlePyramid()) + { + for (i = 0; i < 6; i++) + { + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); + + if (GetMonData(&gPlayerParty[i], MON_DATA_ALT_ABILITY)) + ability = gBaseStats[species].ability2; + else + ability = gBaseStats[species].ability1; + + if (ability == ABILITY_PICKUP + && species != 0 + && species != SPECIES_EGG + && heldItem == ITEM_NONE + && (Random() % 10) == 0) + { + heldItem = GetBattlePyramidPickupItemId(); + SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &heldItem); + } + } + } + else + { + for (i = 0; i < 6; i++) + { + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); + + if (GetMonData(&gPlayerParty[i], MON_DATA_ALT_ABILITY)) + ability = gBaseStats[species].ability2; + else + ability = gBaseStats[species].ability1; + + if (ability == ABILITY_PICKUP + && species != 0 + && species != SPECIES_EGG + && heldItem == ITEM_NONE + && (Random() % 10) == 0) + { + s32 j; + s32 rand = Random() % 100; + u8 lvlDivBy10 = (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL) - 1) / 10; + if (lvlDivBy10 > 9) + lvlDivBy10 = 9; + + for (j = 0; j < 9; j++) + { + if (gPickupProbabilities[j] > rand) + { + SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &gPickupItems[lvlDivBy10 + j]); + break; + } + else if (rand == 99 || rand == 98) + { + SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &gRarePickupItems[lvlDivBy10 + (99 - rand)]); + break; + } + } + } + } + } + } + + gBattlescriptCurrInstr++; +} diff --git a/src/pokemon_3.c b/src/pokemon_3.c index d381c7544..d44c0cb2f 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -1361,20 +1361,20 @@ void BoxMonRestorePP(struct BoxPokemon *boxMon) void sub_806E994(void) { gLastUsedAbility = gBattleStruct->field_B0; - gBattleTextBuff1[0] = 0xFD; - gBattleTextBuff1[1] = 4; + + gBattleTextBuff1[0] = B_BUFF_PLACEHOLDER_BEGIN; + gBattleTextBuff1[1] = B_BUFF_MON_NICK_WITH_PREFIX; gBattleTextBuff1[2] = gBattleStruct->field_49; - gBattleTextBuff1[4] = EOS; + gBattleTextBuff1[4] = B_BUFF_EOS; + if (!GetBankSide(gBattleStruct->field_49)) gBattleTextBuff1[3] = pokemon_order_func(gBattlePartyID[gBattleStruct->field_49]); else gBattleTextBuff1[3] = gBattlePartyID[gBattleStruct->field_49]; - gBattleTextBuff2[0] = 0xFD; - gBattleTextBuff2[1] = 4; - gBattleTextBuff2[2] = gBankInMenu; - gBattleTextBuff2[3] = pokemon_order_func(gBattlePartyID[gBankInMenu]); - gBattleTextBuff2[4] = EOS; - BattleStringExpandPlaceholders(gText_PkmnsXPreventsSwitching, gStringVar4); + + PREPARE_MON_NICK_WITH_PREFIX_BUFFER(gBattleTextBuff2, gBankInMenu, pokemon_order_func(gBattlePartyID[gBankInMenu])) + + BattleStringExpandPlaceholders(gText_PkmnsXPreventsSwitching, gStringVar4); } struct PokeItem @@ -1388,7 +1388,7 @@ extern const struct PokeItem gAlteringCaveWildMonHeldItems[9]; static s32 GetWildMonTableIdInAlteringCave(u16 species) { s32 i; - for (i = 0; i < 9; i++) + for (i = 0; i < (s32) ARRAY_COUNT(gAlteringCaveWildMonHeldItems); i++) if (gAlteringCaveWildMonHeldItems[i].species == species) return i; return 0; diff --git a/sym_ewram.txt b/sym_ewram.txt index 7c18d8225..227f83385 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -268,7 +268,7 @@ gUnknown_02022F88: @ 2022F88 gBattleTypeFlags: @ 2022FEC .space 0x4 -gUnknown_02022FF0: @ 2022FF0 +gBattleTerrain: @ 2022FF0 .space 0x4 gUnknown_02022FF4: @ 2022FF4 @@ -382,7 +382,7 @@ gMultiHitCounter: @ 2024212 gBattlescriptCurrInstr: @ 2024214 .space 0x8 -gUnknown_0202421C: @ 202421C +gActionForBanks: @ 202421C .space 0x4 gUnknown_02024220: @ 2024220 From bc3b4b4d9ae6ab59c9ce3892b7d287ebd0ee13fa Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 28 Sep 2017 15:34:21 +0200 Subject: [PATCH 305/342] battle 4 commands are decompiled --- asm/battle_2.s | 30 +- asm/battle_4.s | 1923 ------------------------------ asm/battle_anim_80FE840.s | 30 +- asm/battle_frontier_1.s | 2 +- asm/contest.s | 4 +- asm/contest_link_80F57C4.s | 6 +- asm/evolution_scene.s | 14 +- asm/naming_screen.s | 6 +- asm/pokedex.s | 6 +- asm/pokemon_storage_system.s | 20 +- asm/pokenav.s | 4 +- asm/reshow_battle_screen.s | 4 +- asm/rom3.s | 12 +- asm/scrcmd.s | 2 +- asm/unknown_task.s | 2 +- data/battle_scripts_2.s | 8 +- include/battle.h | 33 +- include/battle_controllers.h | 13 +- include/battle_message.h | 2 + include/naming_screen.h | 12 + include/pokedex.h | 1 + include/pokemon_storage_system.h | 6 + ld_script.txt | 1 - src/battle_3.c | 172 ++- src/battle_4.c | 1888 +++++++++++++++++++---------- sym_ewram.txt | 2 +- 26 files changed, 1456 insertions(+), 2747 deletions(-) delete mode 100644 asm/battle_4.s create mode 100644 include/naming_screen.h create mode 100644 include/pokemon_storage_system.h diff --git a/asm/battle_2.s b/asm/battle_2.s index c96b80b1c..996579313 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -165,7 +165,7 @@ _080368BE: strh r1, [r0] ldr r0, =gBattle_BG2_Y strh r1, [r0] - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X strh r1, [r0] ldr r0, =gUnknown_02022E22 strh r1, [r0] @@ -191,7 +191,7 @@ _080368FE: ldr r1, =gReservedSpritePaletteCount movs r0, 0x4 strb r0, [r1] - ldr r0, =vblank_cb_08078BB4 + ldr r0, =VBlankCB_Battle bl SetVBlankCallback bl sub_803269C ldr r2, [r4] @@ -3906,8 +3906,8 @@ _08038A1E: .pool thumb_func_end sub_8038A04 - thumb_func_start vblank_cb_08078BB4 -vblank_cb_08078BB4: @ 8038A28 + thumb_func_start VBlankCB_Battle +VBlankCB_Battle: @ 8038A28 push {lr} ldr r0, =gBattleTypeFlags ldr r0, [r0] @@ -3941,7 +3941,7 @@ _08038A3A: ldrh r1, [r0] movs r0, 0x1A bl SetGpuReg - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X ldrh r1, [r0] movs r0, 0x1C bl SetGpuReg @@ -3972,7 +3972,7 @@ _08038A3A: pop {r0} bx r0 .pool - thumb_func_end vblank_cb_08078BB4 + thumb_func_end VBlankCB_Battle thumb_func_start nullsub_17 nullsub_17: @ 8038B00 @@ -4379,7 +4379,7 @@ _08038E1A: strh r4, [r0] ldr r0, =gBattle_BG2_Y strh r4, [r0] - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X strh r4, [r0] ldr r0, =gUnknown_02022E22 strh r4, [r0] @@ -4399,7 +4399,7 @@ _08038E1A: ldr r1, =gReservedSpritePaletteCount movs r0, 0x4 strb r0, [r1] - ldr r0, =vblank_cb_08078BB4 + ldr r0, =VBlankCB_Battle bl SetVBlankCallback ldr r0, =task00_0800F6FC movs r1, 0 @@ -4850,7 +4850,7 @@ sub_80392A8: @ 80392A8 strh r4, [r0] ldr r0, =gBattle_BG2_Y strh r4, [r0] - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X strh r4, [r0] ldr r0, =gUnknown_02022E22 strh r4, [r0] @@ -4873,7 +4873,7 @@ _080392FE: ldr r1, =gReservedSpritePaletteCount movs r0, 0x4 strb r0, [r1] - ldr r0, =vblank_cb_08078BB4 + ldr r0, =VBlankCB_Battle bl SetVBlankCallback ldr r0, =sub_803937C bl SetMainCallback2 @@ -9307,7 +9307,7 @@ _0803B866: beq _0803B8B2 bl StopCryAndClearCrySongs ldr r0, =gUnknown_082DB8BE - bl b_call_bc_move_exec + bl BattleScriptExecute _0803B8B2: add sp, 0x4 pop {r3-r5} @@ -9561,7 +9561,7 @@ _0803BAE6: cmp r0, 0 beq _0803BB5C ldr r0, =gUnknown_082DB881 - bl b_call_bc_move_exec + bl BattleScriptExecute b _0803BB78 .pool _0803BB5C: @@ -9577,7 +9577,7 @@ _0803BB5C: cmp r0, 0 bne _0803BB78 ldr r0, =gUnknown_082DB8BE - bl b_call_bc_move_exec + bl BattleScriptExecute _0803BB78: pop {r3,r4} mov r8, r3 @@ -10866,7 +10866,7 @@ _0803C720: cmp r0, 0x3 bne _0803C760 ldr r0, =gUnknown_082DAAFE - bl b_call_bc_move_exec + bl BattleScriptExecute ldr r1, =gBattleCommunication ldrb r0, [r4] adds r0, r1 @@ -12739,7 +12739,7 @@ _0803D71C: cmp r0, 0 blt _0803D7A0 ldr r0, =gUnknown_082DB1FF - bl b_call_bc_move_exec + bl BattleScriptExecute b _0803D7E8 .pool _0803D7A0: diff --git a/asm/battle_4.s b/asm/battle_4.s deleted file mode 100644 index 096c195b0..000000000 --- a/asm/battle_4.s +++ /dev/null @@ -1,1923 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start atkE6_castform_change_animation -atkE6_castform_change_animation: @ 8055DFC - push {r4,lr} - ldr r4, =gActiveBank - ldr r0, =gBattleScripting - ldrb r0, [r0, 0x17] - strb r0, [r4] - ldr r1, =gBattleMons - ldrb r2, [r4] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 17 - ands r0, r1 - ldr r3, =gBattleStruct - cmp r0, 0 - beq _08055E2C - ldr r0, [r3] - adds r0, 0x7F - ldrb r1, [r0] - movs r2, 0x80 - orrs r1, r2 - strb r1, [r0] -_08055E2C: - ldr r0, [r3] - adds r0, 0x7F - ldrb r2, [r0] - movs r0, 0 - movs r1, 0 - bl EmitBattleAnimation - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkE6_castform_change_animation - - thumb_func_start atkE7_castform_data_change -atkE7_castform_data_change: @ 8055E64 - push {r4,lr} - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - ldr r0, =gBattleScripting - ldrb r0, [r0, 0x17] - bl CastformDataTypeChange - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - beq _08055E8E - ldr r0, =BattleScript_CastformChange - bl b_push_move_exec - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x7F - subs r1, r4, 0x1 - strb r1, [r0] -_08055E8E: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkE7_castform_data_change - - thumb_func_start atkE8_settypebasedhalvers -atkE8_settypebasedhalvers: @ 8055EA4 - push {r4,lr} - movs r4, 0 - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - cmp r0, 0xC9 - bne _08055EF4 - ldr r1, =gStatuses3 - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 2 - adds r2, r0, r1 - ldr r1, [r2] - movs r3, 0x80 - lsls r3, 9 - adds r0, r1, 0 - ands r0, r3 - cmp r0, 0 - bne _08055F18 - orrs r1, r3 - str r1, [r2] - ldr r0, =gBattleCommunication - strb r4, [r0, 0x5] - b _08055F1C - .pool -_08055EF4: - ldr r1, =gStatuses3 - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 2 - adds r2, r0, r1 - ldr r1, [r2] - movs r3, 0x80 - lsls r3, 10 - adds r0, r1, 0 - ands r0, r3 - cmp r0, 0 - bne _08055F18 - orrs r1, r3 - str r1, [r2] - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] - movs r4, 0x1 -_08055F18: - cmp r4, 0 - beq _08055F38 -_08055F1C: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _08055F52 - .pool -_08055F38: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_08055F52: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkE8_settypebasedhalvers - - thumb_func_start atkE9_setweatherballtype -atkE9_setweatherballtype: @ 8055F5C - push {lr} - sub sp, 0x4 - movs r0, 0 - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0xD - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - bne _08055FFC - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0x4D - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _08055FFC - ldr r2, =gBattleWeather - ldrb r0, [r2] - cmp r0, 0 - beq _08055F9A - ldr r1, =gBattleScripting - movs r0, 0x2 - strb r0, [r1, 0xE] -_08055F9A: - ldrh r1, [r2] - movs r0, 0x7 - ands r0, r1 - cmp r0, 0 - beq _08055FB8 - ldr r0, =gBattleStruct - ldr r1, [r0] - movs r0, 0x8B - b _08055FFA - .pool -_08055FB8: - movs r0, 0x18 - ands r0, r1 - cmp r0, 0 - beq _08055FCC - ldr r0, =gBattleStruct - ldr r1, [r0] - movs r0, 0x85 - b _08055FFA - .pool -_08055FCC: - movs r0, 0x60 - ands r0, r1 - cmp r0, 0 - beq _08055FE0 - ldr r0, =gBattleStruct - ldr r1, [r0] - movs r0, 0x8A - b _08055FFA - .pool -_08055FE0: - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08055FF4 - ldr r0, =gBattleStruct - ldr r1, [r0] - movs r0, 0x8F - b _08055FFA - .pool -_08055FF4: - ldr r0, =gBattleStruct - ldr r1, [r0] - movs r0, 0x80 -_08055FFA: - strb r0, [r1, 0x13] -_08055FFC: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - add sp, 0x4 - pop {r0} - bx r0 - .pool - thumb_func_end atkE9_setweatherballtype - - thumb_func_start atkEA_recycleitem -atkEA_recycleitem: @ 8056014 - push {r4-r7,lr} - sub sp, 0x4 - ldr r7, =gActiveBank - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r7] - ldr r1, =gBattleStruct - ldrb r2, [r7] - lsls r0, r2, 1 - adds r0, 0xB8 - ldr r1, [r1] - adds r6, r1, r0 - ldrh r5, [r6] - cmp r5, 0 - beq _08056094 - ldr r4, =gBattleMons - movs r3, 0x58 - adds r0, r2, 0 - muls r0, r3 - adds r0, r4 - ldrh r0, [r0, 0x2E] - cmp r0, 0 - bne _08056094 - ldr r1, =gLastUsedItem - strh r5, [r1] - strh r0, [r6] - ldrb r0, [r7] - muls r0, r3 - adds r0, r4 - ldrh r1, [r1] - strh r1, [r0, 0x2E] - ldrb r0, [r7] - muls r0, r3 - adds r1, r4, 0 - adds r1, 0x2E - adds r0, r1 - str r0, [sp] - movs r0, 0 - movs r1, 0x2 - movs r2, 0 - movs r3, 0x2 - bl EmitSetMonData - ldrb r0, [r7] - bl MarkBufferBankForExecution - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _080560AE - .pool -_08056094: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_080560AE: - add sp, 0x4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkEA_recycleitem - - thumb_func_start atkEB_settypetoterrain -atkEB_settypetoterrain: @ 80560BC - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r0, =gBattleMons - mov r8, r0 - ldr r7, =gBankAttacker - ldrb r0, [r7] - movs r6, 0x58 - muls r0, r6 - mov r1, r8 - adds r3, r0, r1 - movs r0, 0x21 - adds r0, r3 - mov r12, r0 - ldr r5, =sTerrainToType - ldr r4, =gBattleTerrain - ldrb r0, [r4] - adds r0, r5 - ldrb r2, [r0] - mov r1, r12 - ldrb r0, [r1] - adds r1, r2, 0 - cmp r0, r1 - beq _08056144 - adds r0, r3, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, r1 - beq _08056144 - mov r0, r12 - strb r2, [r0] - ldrb r0, [r7] - adds r1, r0, 0 - muls r1, r6 - add r1, r8 - ldrb r0, [r4] - adds r0, r5 - ldrb r0, [r0] - adds r1, 0x22 - strb r0, [r1] - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x3 - strb r0, [r1, 0x1] - ldrb r0, [r4] - adds r0, r5 - ldrb r0, [r0] - strb r0, [r1, 0x2] - movs r0, 0xFF - strb r0, [r1, 0x3] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _0805615E - .pool -_08056144: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_0805615E: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkEB_settypetoterrain - - thumb_func_start atkEC_pursuit_sth -atkEC_pursuit_sth: @ 805616C - push {r4-r6,lr} - ldr r5, =gBankAttacker - ldrb r0, [r5] - bl GetBankIdentity - movs r1, 0x2 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - ldr r4, =gActiveBank - strb r0, [r4] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r6, 0x1 - ands r0, r6 - cmp r0, 0 - beq _0805620C - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r2, =gBitTable - ldrb r3, [r4] - lsls r0, r3, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _0805620C - ldr r0, =gActionForBanks - adds r0, r3, r0 - ldrb r0, [r0] - cmp r0, 0 - bne _0805620C - ldr r1, =gChosenMovesByBanks - lsls r0, r3, 1 - adds r0, r1 - ldrh r2, [r0] - cmp r2, 0xE4 - bne _0805620C - ldr r0, =gUnknown_0202407A - adds r0, r3, r0 - movs r1, 0xB - strb r1, [r0] - ldr r0, =gCurrentMove - strh r2, [r0] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - ldr r0, =gBattleScripting - strb r6, [r0, 0x18] - ldrb r1, [r5] - adds r0, 0x20 - strb r1, [r0] - ldrb r0, [r4] - strb r0, [r5] - b _08056226 - .pool -_0805620C: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_08056226: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atkEC_pursuit_sth - - thumb_func_start atkED_802B4B4 -atkED_802B4B4: @ 8056230 - push {r4,lr} - ldr r1, =gEffectBank - ldr r3, =gBankAttacker - ldrb r0, [r3] - strb r0, [r1] - ldr r2, =gBankTarget - lsls r0, 24 - lsrs r0, 24 - adds r4, r1, 0 - ldrb r1, [r2] - cmp r0, r1 - bne _08056264 - ldr r1, =gBattleScripting - ldrb r0, [r1, 0x17] - strb r0, [r2] - strb r0, [r3] - b _0805626A - .pool -_08056264: - ldr r1, =gBattleScripting - ldrb r0, [r1, 0x17] - strb r0, [r2] -_0805626A: - ldrb r0, [r4] - strb r0, [r1, 0x17] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkED_802B4B4 - - thumb_func_start atkEE_removelightscreenreflect -atkEE_removelightscreenreflect: @ 8056284 - push {r4,lr} - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankSide - movs r1, 0x1 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gSideTimers - lsls r3, r0, 1 - adds r0, r3, r0 - lsls r0, 2 - adds r4, r0, r1 - ldrb r0, [r4] - cmp r0, 0 - bne _080562AC - ldrb r1, [r4, 0x2] - cmp r1, 0 - beq _080562E4 -_080562AC: - ldr r2, =gSideAffecting - adds r2, r3, r2 - ldrh r1, [r2] - ldr r0, =0x0000fffe - ands r0, r1 - movs r3, 0 - ldr r1, =0x0000fffd - ands r0, r1 - strh r0, [r2] - strb r3, [r4] - strb r3, [r4, 0x2] - ldr r1, =gBattleScripting - movs r0, 0x1 - strb r0, [r1, 0x18] - strb r0, [r1, 0x19] - b _080562EA - .pool -_080562E4: - ldr r0, =gBattleScripting - strb r1, [r0, 0x18] - strb r1, [r0, 0x19] -_080562EA: - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkEE_removelightscreenreflect - - thumb_func_start atkEF_pokeball_catch_calculation -atkEF_pokeball_catch_calculation: @ 8056300 - push {r4-r6,lr} - movs r4, 0 - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - beq _0805630E - b _08056696 -_0805630E: - ldr r5, =gActiveBank - ldr r0, =gBankAttacker - ldrb r0, [r0] - strb r0, [r5] - ldr r6, =gBankTarget - movs r1, 0x1 - eors r0, r1 - strb r0, [r6] - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x8 - ands r0, r1 - cmp r0, 0 - beq _0805635C - movs r0, 0 - movs r1, 0x5 - bl dp01_build_cmdbuf_x0D_a - ldrb r0, [r5] - bl MarkBufferBankForExecution - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DBE02 - b _08056694 - .pool -_0805635C: - movs r0, 0x80 - lsls r0, 2 - ands r1, r0 - cmp r1, 0 - beq _08056384 - movs r0, 0 - movs r1, 0x4 - bl dp01_build_cmdbuf_x0D_a - ldrb r0, [r5] - bl MarkBufferBankForExecution - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DBDCA - b _08056694 - .pool -_08056384: - ldr r0, =gLastUsedItem - ldrh r0, [r0] - cmp r0, 0x5 - bne _080563B0 - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x7C - ldrb r0, [r0] - lsls r1, r0, 2 - adds r1, r0 - lsls r0, r1, 8 - subs r0, r1 - movs r1, 0x64 - bl __divsi3 - lsls r0, 24 - lsrs r5, r0, 24 - b _080563C8 - .pool -_080563B0: - ldr r3, =gBaseStats - ldr r2, =gBattleMons - ldrb r1, [r6] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r1, [r0] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r3 - ldrb r5, [r0, 0x8] -_080563C8: - ldr r2, =gLastUsedItem - ldrh r0, [r2] - cmp r0, 0x5 - bhi _080563D2 - b _080564C8 -_080563D2: - subs r0, 0x6 - cmp r0, 0x6 - bls _080563DA - b _080564D2 -_080563DA: - lsls r0, 2 - ldr r1, =_080563F4 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_080563F4: - .4byte _08056410 - .4byte _08056440 - .4byte _08056452 - .4byte _08056480 - .4byte _080564B0 - .4byte _08056472 - .4byte _08056472 -_08056410: - ldr r2, =gBattleMons - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r1, r0, 0 - adds r1, 0x21 - ldrb r1, [r1] - cmp r1, 0xB - beq _080564A4 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0xB - beq _080564A4 - cmp r1, 0x6 - beq _080564A4 - cmp r0, 0x6 - beq _080564A4 - b _08056472 - .pool -_08056440: - bl sav1_map_get_light_level - lsls r0, 24 - lsrs r0, 24 - movs r4, 0xA - cmp r0, 0x5 - bne _080564D2 - movs r4, 0x23 - b _080564D2 -_08056452: - ldr r2, =gBattleMons - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - adds r0, 0x2A - ldrb r1, [r0] - cmp r1, 0x27 - bhi _08056472 - movs r0, 0x28 - subs r0, r1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x9 - bhi _080564D2 -_08056472: - movs r4, 0xA - b _080564D2 - .pool -_08056480: - ldr r2, =gBattleMons - ldr r0, =gBankTarget - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r0, r2 - ldrh r0, [r0] - bl SpeciesToNationalPokedexNum - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - bl GetSetPokedexFlag - lsls r0, 24 - movs r4, 0xA - cmp r0, 0 - beq _080564D2 -_080564A4: - movs r4, 0x1E - b _080564D2 - .pool -_080564B0: - ldr r0, =gBattleResults - ldrb r0, [r0, 0x13] - adds r0, 0xA - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x28 - bls _080564D2 - movs r4, 0x28 - b _080564D2 - .pool -_080564C8: - ldr r1, =sBallCatchBonuses - ldrh r0, [r2] - subs r0, 0x2 - adds r0, r1 - ldrb r4, [r0] -_080564D2: - adds r0, r5, 0 - muls r0, r4 - movs r1, 0xA - bl __divsi3 - ldr r5, =gBattleMons - ldr r1, =gBankTarget - ldrb r2, [r1] - movs r1, 0x58 - adds r4, r2, 0 - muls r4, r1 - adds r3, r4, r5 - ldrh r2, [r3, 0x2C] - lsls r1, r2, 1 - adds r1, r2 - ldrh r2, [r3, 0x28] - lsls r2, 1 - subs r2, r1, r2 - muls r0, r2 - bl __divsi3 - adds r6, r0, 0 - adds r5, 0x4C - adds r4, r5 - ldr r4, [r4] - movs r0, 0x27 - ands r0, r4 - cmp r0, 0 - beq _0805650E - lsls r6, 1 -_0805650E: - movs r0, 0xD8 - ands r4, r0 - cmp r4, 0 - beq _08056522 - lsls r0, r6, 4 - subs r0, r6 - movs r1, 0xA - bl __udivsi3 - adds r6, r0, 0 -_08056522: - ldr r1, =gLastUsedItem - ldrh r0, [r1] - cmp r0, 0x5 - beq _08056564 - cmp r0, 0x1 - bne _08056550 - ldr r0, =gBattleResults - ldrb r1, [r0, 0x5] - movs r2, 0x2 - orrs r1, r2 - strb r1, [r0, 0x5] - b _08056564 - .pool -_08056550: - ldr r0, =gBattleResults - ldrh r1, [r1] - adds r0, r1 - adds r1, r0, 0 - adds r1, 0x34 - ldrb r0, [r1] - cmp r0, 0xFE - bhi _08056564 - adds r0, 0x1 - strb r0, [r1] -_08056564: - cmp r6, 0xFE - bls _080565C8 - movs r0, 0 - movs r1, 0x4 - bl dp01_build_cmdbuf_x0D_a - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DBD84 - str r0, [r1] - ldr r1, =gBattlePartyID - ldr r0, =gBankTarget - ldrb r0, [r0] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gEnemyParty - adds r0, r1 - ldr r2, =gLastUsedItem - movs r1, 0x26 - bl SetMonData - bl CalculatePlayerPartyCount - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x6 - beq _08056656 - b _08056680 - .pool -_080565C8: - movs r0, 0xFF - lsls r0, 16 - adds r1, r6, 0 - bl __udivsi3 - bl Sqrt - lsls r0, 16 - lsrs r0, 16 - bl Sqrt - lsls r0, 16 - lsrs r6, r0, 16 - ldr r0, =0x000ffff0 - adds r1, r6, 0 - bl __udivsi3 - adds r6, r0, 0 - movs r4, 0 - b _080565FA - .pool -_080565F4: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 -_080565FA: - cmp r4, 0x3 - bhi _0805660A - bl Random - lsls r0, 16 - lsrs r0, 16 - cmp r0, r6 - bcc _080565F4 -_0805660A: - ldr r5, =gLastUsedItem - ldrh r0, [r5] - cmp r0, 0x1 - bne _08056614 - movs r4, 0x4 -_08056614: - movs r0, 0 - adds r1, r4, 0 - bl dp01_build_cmdbuf_x0D_a - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution - cmp r4, 0x4 - bne _0805668C - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DBD84 - str r0, [r1] - ldr r1, =gBattlePartyID - ldr r0, =gBankTarget - ldrb r0, [r0] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gEnemyParty - adds r0, r1 - movs r1, 0x26 - adds r2, r5, 0 - bl SetMonData - bl CalculatePlayerPartyCount - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x6 - bne _08056680 -_08056656: - ldr r1, =gBattleCommunication - movs r0, 0 - strb r0, [r1, 0x5] - b _08056696 - .pool -_08056680: - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] - b _08056696 - .pool -_0805668C: - ldr r0, =gBattleCommunication - strb r4, [r0, 0x5] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DBDD4 -_08056694: - str r0, [r1] -_08056696: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end atkEF_pokeball_catch_calculation - - thumb_func_start atkF0_copy_caught_poke -atkF0_copy_caught_poke: @ 80566A8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r0, =gBattlePartyID - mov r9, r0 - ldr r5, =gBankAttacker - ldrb r0, [r5] - movs r6, 0x1 - eors r0, r6 - lsls r0, 1 - add r0, r9 - ldrh r0, [r0] - movs r7, 0x64 - muls r0, r7 - ldr r1, =gEnemyParty - mov r8, r1 - add r0, r8 - bl GiveMonToPlayer - lsls r0, 24 - cmp r0, 0 - beq _08056792 - bl sub_813B21C - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _08056734 - ldr r0, =gBattleCommunication - strb r1, [r0, 0x5] - ldr r4, =gStringVar1 - ldr r0, =0x00004036 - bl VarGet - lsls r0, 24 - lsrs r0, 24 - bl sav3_get_box_name - adds r1, r0, 0 - adds r0, r4, 0 - bl StringCopy - ldrb r0, [r5] - eors r0, r6 - lsls r0, 1 - add r0, r9 - ldrh r0, [r0] - muls r0, r7 - add r0, r8 - ldr r2, =gStringVar2 - movs r1, 0x2 - bl GetMonData - b _0805677E - .pool -_08056734: - ldr r4, =gStringVar1 - ldr r0, =0x00004036 - bl VarGet - lsls r0, 24 - lsrs r0, 24 - bl sav3_get_box_name - adds r1, r0, 0 - adds r0, r4, 0 - bl StringCopy - ldrb r0, [r5] - eors r0, r6 - lsls r0, 1 - add r0, r9 - ldrh r0, [r0] - muls r0, r7 - add r0, r8 - ldr r2, =gStringVar2 - movs r1, 0x2 - bl GetMonData - ldr r4, =gStringVar3 - bl get_unknown_box_id - lsls r0, 24 - lsrs r0, 24 - bl sav3_get_box_name - adds r1, r0, 0 - adds r0, r4, 0 - bl StringCopy - ldr r1, =gBattleCommunication - movs r0, 0x2 - strb r0, [r1, 0x5] -_0805677E: - ldr r0, =0x000008ab - bl FlagGet - lsls r0, 24 - cmp r0, 0 - beq _08056792 - ldr r1, =gBattleCommunication - ldrb r0, [r1, 0x5] - adds r0, 0x1 - strb r0, [r1, 0x5] -_08056792: - ldr r0, =gBattlePartyID - mov r10, r0 - ldr r1, =gBankAttacker - mov r9, r1 - ldrb r0, [r1] - movs r4, 0x1 - eors r0, r4 - lsls r0, 1 - add r0, r10 - ldrh r0, [r0] - movs r1, 0x64 - mov r8, r1 - mov r1, r8 - muls r1, r0 - adds r0, r1, 0 - ldr r6, =gEnemyParty - adds r0, r6 - movs r1, 0xB - movs r2, 0 - bl GetMonData - ldr r5, =gBattleResults - strh r0, [r5, 0x28] - mov r1, r9 - ldrb r0, [r1] - eors r0, r4 - lsls r0, 1 - add r0, r10 - ldrh r0, [r0] - mov r1, r8 - muls r1, r0 - adds r0, r1, 0 - adds r0, r6 - adds r2, r5, 0 - adds r2, 0x2A - movs r1, 0x2 - bl GetMonData - mov r1, r9 - ldrb r0, [r1] - eors r4, r0 - lsls r4, 1 - add r4, r10 - ldrh r0, [r4] - mov r1, r8 - muls r1, r0 - adds r0, r1, 0 - adds r0, r6 - movs r1, 0x26 - movs r2, 0 - bl GetMonData - movs r1, 0xF - ands r0, r1 - lsls r0, 2 - ldrb r2, [r5, 0x5] - movs r1, 0x3D - negs r1, r1 - ands r1, r2 - orrs r1, r0 - strb r1, [r5, 0x5] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkF0_copy_caught_poke - - thumb_func_start atkF1_setpoke_as_caught -atkF1_setpoke_as_caught: @ 8056850 - push {r4,r5,lr} - ldr r4, =gEnemyParty - adds r0, r4, 0 - movs r1, 0xB - movs r2, 0 - bl GetMonData - lsls r0, 16 - lsrs r5, r0, 16 - adds r0, r4, 0 - movs r1, 0 - movs r2, 0 - bl GetMonData - adds r4, r0, 0 - adds r0, r5, 0 - bl SpeciesToNationalPokedexNum - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - bl GetSetPokedexFlag - lsls r0, 24 - cmp r0, 0 - beq _080568A8 - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] - b _080568C2 - .pool -_080568A8: - adds r0, r5, 0 - bl SpeciesToNationalPokedexNum - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - adds r2, r4, 0 - bl HandleSetPokedexFlag - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] -_080568C2: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end atkF1_setpoke_as_caught - - thumb_func_start atkF2_display_dex_info -atkF2_display_dex_info: @ 80568CC - push {r4,lr} - sub sp, 0x4 - ldr r0, =gEnemyParty - movs r1, 0xB - movs r2, 0 - bl GetMonData - lsls r0, 16 - lsrs r4, r0, 16 - ldr r0, =gBattleCommunication - ldrb r0, [r0] - cmp r0, 0x5 - bls _080568E8 - b _08056A2C -_080568E8: - lsls r0, 2 - ldr r1, =_08056900 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08056900: - .4byte _08056918 - .4byte _0805692A - .4byte _08056978 - .4byte _080569C8 - .4byte _080569E0 - .4byte _08056A18 -_08056918: - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - b _08056A06 -_0805692A: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08056938 - b _08056A2C -_08056938: - bl FreeAllWindowBuffers - adds r0, r4, 0 - bl SpeciesToNationalPokedexNum - lsls r0, 16 - lsrs r0, 16 - ldr r3, =gBattleMons - ldr r1, =gBankTarget - ldrb r2, [r1] - movs r1, 0x58 - muls r2, r1 - adds r1, r3, 0 - adds r1, 0x54 - adds r1, r2, r1 - ldr r1, [r1] - adds r3, 0x48 - adds r2, r3 - ldr r2, [r2] - bl sub_80BFDF4 - ldr r1, =gBattleCommunication - strb r0, [r1, 0x1] - b _08056A08 - .pool -_08056978: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08056A2C - ldr r0, =gMain - ldr r1, [r0, 0x4] - ldr r0, =BattleMainCB2 - cmp r1, r0 - bne _08056A2C - ldr r2, =gTasks - ldr r4, =gBattleCommunication - ldrb r1, [r4, 0x1] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r2 - ldrb r0, [r0, 0x4] - cmp r0, 0 - bne _08056A2C - ldr r0, =vblank_cb_08078BB4 - bl SetVBlankCallback - ldrb r0, [r4] - adds r0, 0x1 - strb r0, [r4] - b _08056A2C - .pool -_080569C8: - bl c2_berry_program_update_menu - bl sub_8035AA4 - ldr r1, =gUnknown_02022E20 - movs r2, 0x80 - lsls r2, 1 - adds r0, r2, 0 - strh r0, [r1] - b _08056A06 - .pool -_080569E0: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _08056A2C - ldr r0, =0x0000ffff - str r1, [sp] - movs r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - movs r0, 0 - bl ShowBg - movs r0, 0x3 - bl ShowBg -_08056A06: - ldr r1, =gBattleCommunication -_08056A08: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _08056A2C - .pool -_08056A18: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08056A2C - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] -_08056A2C: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end atkF2_display_dex_info - - thumb_func_start sub_8056A3C -sub_8056A3C: @ 8056A3C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x20 - ldr r4, [sp, 0x40] - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - lsls r1, 24 - lsrs r1, 24 - str r1, [sp, 0x10] - lsls r2, 24 - lsrs r2, 24 - str r2, [sp, 0x1C] - lsls r3, 24 - lsrs r3, 24 - str r3, [sp, 0x14] - lsls r4, 24 - lsrs r4, 24 - mov r10, r4 - movs r1, 0 - add r0, sp, 0xC - strh r1, [r0] - ldr r6, [sp, 0x10] - cmp r6, r3 - ble _08056A76 - b _08056B62 -_08056A76: - mov r4, r8 - adds r0, r6, 0x1 - str r0, [sp, 0x18] - ldr r2, [sp, 0x1C] - cmp r4, r2 - bgt _08056B58 - add r5, sp, 0xC - lsls r7, r6, 24 - mov r9, r7 -_08056A88: - ldr r0, [sp, 0x10] - cmp r6, r0 - bne _08056AB4 - cmp r4, r8 - bne _08056A9C - ldr r0, =0x00001022 - b _08056AFE - .pool -_08056A9C: - ldr r2, [sp, 0x1C] - cmp r4, r2 - bne _08056AAC - ldr r0, =0x00001024 - b _08056AFE - .pool -_08056AAC: - ldr r0, =0x00001023 - b _08056AFE - .pool -_08056AB4: - ldr r7, [sp, 0x14] - cmp r6, r7 - bne _08056AE0 - cmp r4, r8 - bne _08056AC8 - ldr r0, =0x00001028 - b _08056AFE - .pool -_08056AC8: - ldr r0, [sp, 0x1C] - cmp r4, r0 - bne _08056AD8 - ldr r0, =0x0000102a - b _08056AFE - .pool -_08056AD8: - ldr r0, =0x00001029 - b _08056AFE - .pool -_08056AE0: - cmp r4, r8 - bne _08056AEC - ldr r0, =0x00001025 - b _08056AFE - .pool -_08056AEC: - ldr r2, [sp, 0x1C] - cmp r4, r2 - bne _08056AFC - ldr r0, =0x00001027 - b _08056AFE - .pool -_08056AFC: - ldr r0, =0x00001026 -_08056AFE: - strh r0, [r5] - movs r1, 0x1 - mov r0, r10 - ands r0, r1 - cmp r0, 0 - beq _08056B0E - movs r0, 0 - strh r0, [r5] -_08056B0E: - movs r0, 0x80 - mov r7, r10 - ands r0, r7 - cmp r0, 0 - beq _08056B38 - lsls r2, r4, 24 - lsrs r2, 24 - str r1, [sp] - str r1, [sp, 0x4] - movs r0, 0x11 - str r0, [sp, 0x8] - movs r0, 0x1 - add r1, sp, 0xC - mov r7, r9 - lsrs r3, r7, 24 - bl CopyToBgTilemapBufferRect_ChangePalette - b _08056B50 - .pool -_08056B38: - lsls r2, r4, 24 - lsrs r2, 24 - str r1, [sp] - str r1, [sp, 0x4] - movs r0, 0x11 - str r0, [sp, 0x8] - movs r0, 0 - add r1, sp, 0xC - mov r7, r9 - lsrs r3, r7, 24 - bl CopyToBgTilemapBufferRect_ChangePalette -_08056B50: - adds r4, 0x1 - ldr r0, [sp, 0x1C] - cmp r4, r0 - ble _08056A88 -_08056B58: - ldr r6, [sp, 0x18] - ldr r2, [sp, 0x14] - cmp r6, r2 - bgt _08056B62 - b _08056A76 -_08056B62: - add sp, 0x20 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8056A3C - - thumb_func_start BattleCreateCursorAt -BattleCreateCursorAt: @ 8056B74 - push {lr} - sub sp, 0x10 - adds r3, r0, 0 - add r0, sp, 0xC - movs r2, 0x1 - strh r2, [r0] - movs r1, 0x2 - strh r1, [r0, 0x2] - lsls r3, 25 - movs r0, 0x90 - lsls r0, 20 - adds r3, r0 - lsrs r3, 24 - str r2, [sp] - str r1, [sp, 0x4] - movs r0, 0x11 - str r0, [sp, 0x8] - movs r0, 0 - add r1, sp, 0xC - movs r2, 0x19 - bl CopyToBgTilemapBufferRect_ChangePalette - movs r0, 0 - bl CopyBgTilemapBufferToVram - add sp, 0x10 - pop {r0} - bx r0 - thumb_func_end BattleCreateCursorAt - - thumb_func_start BattleDestroyCursorAt -BattleDestroyCursorAt: @ 8056BAC - push {lr} - sub sp, 0x10 - adds r3, r0, 0 - add r0, sp, 0xC - ldr r1, =0x00001016 - strh r1, [r0] - strh r1, [r0, 0x2] - lsls r3, 25 - movs r0, 0x90 - lsls r0, 20 - adds r3, r0 - lsrs r3, 24 - movs r0, 0x1 - str r0, [sp] - movs r0, 0x2 - str r0, [sp, 0x4] - movs r0, 0x11 - str r0, [sp, 0x8] - movs r0, 0 - add r1, sp, 0xC - movs r2, 0x19 - bl CopyToBgTilemapBufferRect_ChangePalette - movs r0, 0 - bl CopyBgTilemapBufferToVram - add sp, 0x10 - pop {r0} - bx r0 - .pool - thumb_func_end BattleDestroyCursorAt - - thumb_func_start atkF3_nickname_caught_poke -atkF3_nickname_caught_poke: @ 8056BEC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x8 - ldr r0, =gBattleCommunication - ldrb r1, [r0] - adds r4, r0, 0 - cmp r1, 0x4 - bls _08056C04 - b _08056E62 -_08056C04: - lsls r0, r1, 2 - ldr r1, =_08056C18 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08056C18: - .4byte _08056C2C - .4byte _08056C60 - .4byte _08056CFC - .4byte _08056DD4 - .4byte _08056E2C -_08056C2C: - movs r4, 0 - str r4, [sp] - movs r0, 0x18 - movs r1, 0x8 - movs r2, 0x1D - movs r3, 0xD - bl sub_8056A3C - ldr r0, =gText_BattleYesNoChoice - movs r1, 0xC - bl sub_814F9EC - ldr r1, =gBattleCommunication - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - strb r4, [r1, 0x1] - movs r0, 0 - bl BattleCreateCursorAt - b _08056E62 - .pool -_08056C60: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _08056C86 - ldrb r0, [r4, 0x1] - cmp r0, 0 - beq _08056C86 - movs r0, 0x5 - bl PlaySE - ldrb r0, [r4, 0x1] - bl BattleDestroyCursorAt - movs r0, 0 - strb r0, [r4, 0x1] - bl BattleCreateCursorAt -_08056C86: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08056CAE - ldr r4, =gBattleCommunication - ldrb r0, [r4, 0x1] - cmp r0, 0 - bne _08056CAE - movs r0, 0x5 - bl PlaySE - ldrb r0, [r4, 0x1] - bl BattleDestroyCursorAt - movs r0, 0x1 - strb r0, [r4, 0x1] - bl BattleCreateCursorAt -_08056CAE: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08056CE0 - movs r0, 0x5 - bl PlaySE - ldr r1, =gBattleCommunication - ldrb r0, [r1, 0x1] - cmp r0, 0 - bne _08056CF2 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - movs r0, 0x3 - bl BeginFastPaletteFade - b _08056E62 - .pool -_08056CE0: - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - bne _08056CEA - b _08056E62 -_08056CEA: - movs r0, 0x5 - bl PlaySE - ldr r1, =gBattleCommunication -_08056CF2: - movs r0, 0x4 - strb r0, [r1] - b _08056E62 - .pool -_08056CFC: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08056D0A - b _08056E62 -_08056D0A: - ldr r7, =gBattlePartyID - ldr r0, =gBankAttacker - mov r10, r0 - ldrb r0, [r0] - movs r4, 0x1 - eors r0, r4 - lsls r0, 1 - adds r0, r7 - ldrh r0, [r0] - movs r1, 0x64 - mov r9, r1 - mov r2, r9 - muls r2, r0 - adds r0, r2, 0 - ldr r1, =gEnemyParty - mov r8, r1 - add r0, r8 - ldr r1, =gBattleStruct - ldr r2, [r1] - adds r2, 0x6D - movs r1, 0x2 - bl GetMonData - bl FreeAllWindowBuffers - mov r2, r10 - ldrb r0, [r2] - eors r0, r4 - lsls r0, 1 - adds r0, r7 - ldrh r0, [r0] - mov r1, r9 - muls r1, r0 - adds r0, r1, 0 - add r0, r8 - movs r1, 0xB - bl GetMonData - adds r6, r0, 0 - lsls r6, 16 - lsrs r6, 16 - mov r2, r10 - ldrb r0, [r2] - eors r0, r4 - lsls r0, 1 - adds r0, r7 - ldrh r0, [r0] - mov r1, r9 - muls r1, r0 - adds r0, r1, 0 - add r0, r8 - bl GetMonGender - adds r5, r0, 0 - lsls r5, 24 - lsrs r5, 24 - mov r2, r10 - ldrb r0, [r2] - eors r4, r0 - lsls r4, 1 - adds r4, r7 - ldrh r0, [r4] - mov r1, r9 - muls r1, r0 - adds r0, r1, 0 - add r0, r8 - movs r1, 0 - movs r2, 0 - bl GetMonData - ldr r2, =gBattleStruct - ldr r1, [r2] - adds r1, 0x6D - str r0, [sp] - ldr r0, =BattleMainCB2 - str r0, [sp, 0x4] - movs r0, 0x2 - adds r2, r6, 0 - adds r3, r5, 0 - bl DoNamingScreen - ldr r1, =gBattleCommunication - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _08056E62 - .pool -_08056DD4: - ldr r0, =gMain - ldr r1, [r0, 0x4] - ldr r0, =BattleMainCB2 - cmp r1, r0 - bne _08056E62 - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08056E62 - ldr r2, =gBattlePartyID - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x1 - eors r0, r1 - lsls r0, 1 - adds r0, r2 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gEnemyParty - adds r0, r1 - ldr r1, =gBattleStruct - ldr r2, [r1] - adds r2, 0x6D - movs r1, 0x2 - bl SetMonData - b _08056E48 - .pool -_08056E2C: - bl CalculatePlayerPartyCount - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x6 - bne _08056E48 - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x5 - str r0, [r1] - b _08056E62 - .pool -_08056E48: - ldr r3, =gBattlescriptCurrInstr - ldr r2, [r3] - ldrb r1, [r2, 0x1] - ldrb r0, [r2, 0x2] - lsls r0, 8 - orrs r1, r0 - ldrb r0, [r2, 0x3] - lsls r0, 16 - orrs r1, r0 - ldrb r0, [r2, 0x4] - lsls r0, 24 - orrs r1, r0 - str r1, [r3] -_08056E62: - add sp, 0x8 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end atkF3_nickname_caught_poke - - thumb_func_start atkF4_802BEF0 -atkF4_802BEF0: @ 8056E78 - ldr r2, =gBattleMons - ldr r0, =gBankAttacker - ldrb r1, [r0] - movs r0, 0x58 - muls r1, r0 - adds r1, r2 - ldr r0, =gBattleMoveDamage - ldr r2, [r0] - ldrh r0, [r1, 0x28] - subs r0, r2 - strh r0, [r1, 0x28] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end atkF4_802BEF0 - - thumb_func_start atkF5_removeattackerstatus1 -atkF5_removeattackerstatus1: @ 8056EA8 - ldr r1, =gBattleMons - ldr r0, =gBankAttacker - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x4C - adds r0, r1 - movs r1, 0 - str r1, [r0] - ldr r1, =gBattlescriptCurrInstr - ldr r0, [r1] - adds r0, 0x1 - str r0, [r1] - bx lr - .pool - thumb_func_end atkF5_removeattackerstatus1 - - thumb_func_start atkF6_802BF48 -atkF6_802BF48: @ 8056ED0 - ldr r1, =gFightStateTracker - movs r0, 0xC - strb r0, [r1] - bx lr - .pool - thumb_func_end atkF6_802BF48 - - thumb_func_start atkF7_802BF54 -atkF7_802BF54: @ 8056EDC - ldr r1, =gFightStateTracker - movs r0, 0xC - strb r0, [r1] - ldr r1, =gCurrentMoveTurn - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - strb r0, [r1] - bx lr - .pool - thumb_func_end atkF7_802BF54 - - thumb_func_start sub_8056EF8 -sub_8056EF8: @ 8056EF8 - push {r4,r5,lr} - ldr r5, =gBattlescriptCurrInstr - ldr r0, [r5] - ldrb r0, [r0, 0x1] - bl GetBankByIdentity - ldr r4, =gActiveBank - strb r0, [r4] - movs r0, 0 - bl dp01_build_cmdbuf_x09_9_9_9 - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r0, [r5] - adds r0, 0x2 - str r0, [r5] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8056EF8 - - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/battle_anim_80FE840.s b/asm/battle_anim_80FE840.s index c6761bd9a..24a553f94 100644 --- a/asm/battle_anim_80FE840.s +++ b/asm/battle_anim_80FE840.s @@ -30134,7 +30134,7 @@ _0810DB1A: lsls r0, 24 cmp r0, 0 bne _0810DB50 - ldr r1, =gUnknown_02022E20 + ldr r1, =gBattle_BG3_X ldrh r0, [r4, 0x1A] lsls r0, 16 asrs r0, 24 @@ -30145,7 +30145,7 @@ _0810DB1A: b _0810DB60 .pool _0810DB50: - ldr r2, =gUnknown_02022E20 + ldr r2, =gBattle_BG3_X ldrh r1, [r4, 0x1A] lsls r1, 16 asrs r1, 24 @@ -44805,7 +44805,7 @@ _08115314: beq _08115340 cmp r0, 0x5 bne _08115380 - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X ldrh r0, [r0] strh r0, [r4, 0x22] ldr r0, =sub_81153AC @@ -44907,7 +44907,7 @@ _081153DA: ands r0, r1 cmp r0, 0 bne _08115404 - ldr r1, =gUnknown_02022E20 + ldr r1, =gBattle_BG3_X ldrh r0, [r3, 0x26] ldrh r2, [r3, 0x22] adds r0, r2 @@ -44915,7 +44915,7 @@ _081153DA: b _0811540E .pool _08115404: - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X ldrh r1, [r3, 0x22] ldrh r2, [r3, 0x26] subs r1, r2 @@ -44951,7 +44951,7 @@ _08115430: ands r1, r0 cmp r1, 0 bne _0811545C - ldr r1, =gUnknown_02022E20 + ldr r1, =gBattle_BG3_X ldrh r0, [r3, 0x24] ldrh r2, [r3, 0x22] adds r0, r2 @@ -44959,7 +44959,7 @@ _08115430: b _08115466 .pool _0811545C: - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X ldrh r1, [r3, 0x22] ldrh r2, [r3, 0x24] subs r1, r2 @@ -44987,7 +44987,7 @@ _08115484: b _0811549C .pool _08115490: - ldr r1, =gUnknown_02022E20 + ldr r1, =gBattle_BG3_X ldrh r0, [r3, 0x22] strh r0, [r1] adds r0, r2, 0 @@ -45263,7 +45263,7 @@ _0811565A: movs r0, 0xFF ands r1, r0 strh r1, [r4, 0xC] - ldr r2, =gUnknown_02022E20 + ldr r2, =gBattle_BG3_X ldrh r0, [r4, 0xA] strh r0, [r2] ldr r0, =gUnknown_02022E22 @@ -45295,7 +45295,7 @@ sub_81156D0: @ 81156D0 ldrsh r0, [r2, r4] cmp r1, r0 bne _08115710 - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X movs r1, 0 strh r1, [r0] ldr r0, =gUnknown_02022E22 @@ -45305,7 +45305,7 @@ sub_81156D0: @ 81156D0 b _0811571C .pool _08115710: - ldr r1, =gUnknown_02022E20 + ldr r1, =gBattle_BG3_X ldrh r0, [r2, 0xA] strh r0, [r1] ldr r1, =gUnknown_02022E22 @@ -46553,7 +46553,7 @@ _081160DC: beq _081160F4 b _08116104 _081160E2: - ldr r1, =gUnknown_02022E20 + ldr r1, =gBattle_BG3_X b _081160F6 .pool _081160EC: @@ -46793,7 +46793,7 @@ sub_81162A4: @ 81162A4 strh r1, [r2, 0xE] ldrh r1, [r3, 0x6] strh r1, [r2, 0x18] - ldr r4, =gUnknown_02022E20 + ldr r4, =gBattle_BG3_X ldrh r1, [r3] strh r1, [r4] ldr r4, =gUnknown_02022E22 @@ -46824,7 +46824,7 @@ sub_81162F8: @ 81162F8 mov r12, r1 cmp r0, 0 bne _0811637E - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X ldrh r2, [r0] movs r7, 0x8 ldrsh r1, [r3, r7] @@ -49152,7 +49152,7 @@ sub_81176D8: @ 81176D8 ldrh r7, [r1, 0x1E] adds r2, r7 strh r2, [r1, 0x1E] - ldr r6, =gUnknown_02022E20 + ldr r6, =gBattle_BG3_X lsls r0, r3, 16 asrs r0, 24 ldrh r4, [r6] diff --git a/asm/battle_frontier_1.s b/asm/battle_frontier_1.s index 1a0b5ae3d..e870c8798 100755 --- a/asm/battle_frontier_1.s +++ b/asm/battle_frontier_1.s @@ -3169,7 +3169,7 @@ _0819044E: strh r4, [r0] ldr r0, =gBattle_BG1_Y strh r4, [r0] - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X strh r4, [r0] ldr r0, =gUnknown_02022E22 strh r4, [r0] diff --git a/asm/contest.s b/asm/contest.s index 7e0652222..023c6ebef 100644 --- a/asm/contest.s +++ b/asm/contest.s @@ -58,7 +58,7 @@ sub_80D7678: @ 80D7678 strh r1, [r0] ldr r0, =gBattle_BG2_Y strh r1, [r0] - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X strh r1, [r0] ldr r0, =gUnknown_02022E22 strh r1, [r0] @@ -1340,7 +1340,7 @@ vblank_cb_battle: @ 80D827C ldrh r1, [r0] movs r0, 0x1A bl SetGpuReg - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X ldrh r1, [r0] movs r0, 0x1C bl SetGpuReg diff --git a/asm/contest_link_80F57C4.s b/asm/contest_link_80F57C4.s index 8da1eccba..8e2e2c61c 100644 --- a/asm/contest_link_80F57C4.s +++ b/asm/contest_link_80F57C4.s @@ -105,7 +105,7 @@ _080F57E0: strh r1, [r0] ldr r0, =gBattle_BG2_Y strh r1, [r0] - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X strh r1, [r0] ldr r0, =gUnknown_02022E22 strh r1, [r0] @@ -465,7 +465,7 @@ sub_80F5C24: @ 80F5C24 ldrh r1, [r0] movs r0, 0x1A bl SetGpuReg - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X ldrh r1, [r0] movs r0, 0x1C bl SetGpuReg @@ -1838,7 +1838,7 @@ _080F68A8: thumb_func_start sub_80F68B4 sub_80F68B4: @ 80F68B4 push {r4,r5,lr} - ldr r2, =gUnknown_02022E20 + ldr r2, =gBattle_BG3_X ldrh r3, [r2] adds r0, r3, 0x2 strh r0, [r2] diff --git a/asm/evolution_scene.s b/asm/evolution_scene.s index 55a843b92..5d0268173 100644 --- a/asm/evolution_scene.s +++ b/asm/evolution_scene.s @@ -178,7 +178,7 @@ evolution_cutscene: @ 813DA8C strh r2, [r0] ldr r0, =gBattle_BG2_Y strh r2, [r0] - ldr r1, =gUnknown_02022E20 + ldr r1, =gBattle_BG3_X movs r2, 0x80 lsls r2, 1 adds r0, r2, 0 @@ -472,7 +472,7 @@ sub_813DD7C: @ 813DD7C strh r4, [r0] ldr r0, =gBattle_BG2_Y strh r4, [r0] - ldr r1, =gUnknown_02022E20 + ldr r1, =gBattle_BG3_X movs r2, 0x80 lsls r2, 1 adds r0, r2, 0 @@ -642,7 +642,7 @@ _0813DFE0: strh r1, [r0] ldr r0, =gBattle_BG2_Y strh r1, [r0] - ldr r2, =gUnknown_02022E20 + ldr r2, =gBattle_BG3_X movs r3, 0x80 lsls r3, 1 adds r0, r3, 0 @@ -953,7 +953,7 @@ sub_813E1D4: @ 813E1D4 strh r4, [r0] ldr r0, =gBattle_BG2_Y strh r4, [r0] - ldr r1, =gUnknown_02022E20 + ldr r1, =gBattle_BG3_X movs r2, 0x80 lsls r2, 1 adds r0, r2, 0 @@ -3654,7 +3654,7 @@ sub_813FCDC: @ 813FCDC ldrh r1, [r0] movs r0, 0x1A bl SetGpuReg - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X ldrh r1, [r0] movs r0, 0x1C bl SetGpuReg @@ -3698,7 +3698,7 @@ sub_813FD64: @ 813FD64 ldrh r1, [r0] movs r0, 0x1A bl SetGpuReg - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X ldrh r1, [r0] movs r0, 0x1C bl SetGpuReg @@ -3870,7 +3870,7 @@ sub_813FEE8: @ 813FEE8 b _0813FF2C .pool _0813FF28: - ldr r7, =gUnknown_02022E20 + ldr r7, =gBattle_BG3_X ldr r6, =gUnknown_02022E22 _0813FF2C: lsls r4, r5, 2 diff --git a/asm/naming_screen.s b/asm/naming_screen.s index 1839a7568..22d7b260e 100644 --- a/asm/naming_screen.s +++ b/asm/naming_screen.s @@ -840,7 +840,7 @@ pokemon_transfer_to_pc_with_message: @ 80E34E4 bl VarGet lsls r0, 24 lsrs r0, 24 - bl sav3_get_box_name + bl GetBoxNamePtr adds r1, r0, 0 adds r0, r4, 0 bl StringCopy @@ -859,7 +859,7 @@ _080E3534: bl VarGet lsls r0, 24 lsrs r0, 24 - bl sav3_get_box_name + bl GetBoxNamePtr adds r1, r0, 0 adds r0, r4, 0 bl StringCopy @@ -874,7 +874,7 @@ _080E3534: bl get_unknown_box_id lsls r0, 24 lsrs r0, 24 - bl sav3_get_box_name + bl GetBoxNamePtr adds r1, r0, 0 adds r0, r4, 0 bl StringCopy diff --git a/asm/pokedex.s b/asm/pokedex.s index fdaacde2c..f9ee0eeab 100644 --- a/asm/pokedex.s +++ b/asm/pokedex.s @@ -8429,8 +8429,8 @@ _080BFDB4: .pool thumb_func_end sub_80BFD7C - thumb_func_start sub_80BFDF4 -sub_80BFDF4: @ 80BFDF4 + thumb_func_start CreateDexDisplayMonDataTask +CreateDexDisplayMonDataTask: @ 80BFDF4 push {r4-r6,lr} adds r4, r0, 0 adds r5, r1, 0 @@ -8460,7 +8460,7 @@ sub_80BFDF4: @ 80BFDF4 pop {r1} bx r1 .pool - thumb_func_end sub_80BFDF4 + thumb_func_end CreateDexDisplayMonDataTask thumb_func_start sub_80BFE38 sub_80BFE38: @ 80BFE38 diff --git a/asm/pokemon_storage_system.s b/asm/pokemon_storage_system.s index d94da87b1..6c4c7ff13 100755 --- a/asm/pokemon_storage_system.s +++ b/asm/pokemon_storage_system.s @@ -1019,7 +1019,7 @@ _080C777E: _080C779E: lsls r0, r5, 24 lsrs r0, 24 - bl sav3_get_box_name + bl GetBoxNamePtr ldr r1, =gText_Box bl StringCopy adds r4, r5, 0x1 @@ -1566,7 +1566,7 @@ sub_80C7BE4: @ 80C7BE4 lsls r4, 2 adds r0, r4 ldrb r0, [r0] - bl sav3_get_box_name + bl GetBoxNamePtr mov r10, r0 mov r1, r9 ldr r0, [r1] @@ -5424,7 +5424,7 @@ _080C9F1C: bl StorageGetCurrentBox lsls r0, 24 lsrs r0, 24 - bl sav3_get_box_name + bl GetBoxNamePtr adds r1, r0, 0 movs r0, 0 str r0, [sp] @@ -10831,7 +10831,7 @@ sub_80CCB50: @ 80CCB50 ldr r5, =0x000021b8 adds r4, r5 mov r0, r8 - bl sav3_get_box_name + bl GetBoxNamePtr adds r1, r0, 0 adds r0, r4, 0 movs r2, 0 @@ -10852,7 +10852,7 @@ sub_80CCB50: @ 80CCB50 ldr r0, [sp, 0x2C] bl LoadSpriteSheet mov r0, r8 - bl sav3_get_box_name + bl GetBoxNamePtr bl sub_80CD00C movs r4, 0 lsls r0, 16 @@ -10997,7 +10997,7 @@ _080CCDB0: ldr r5, =0x000021b8 adds r4, r5 ldr r0, [sp, 0x28] - bl sav3_get_box_name + bl GetBoxNamePtr adds r1, r0, 0 adds r0, r4, 0 movs r2, 0 @@ -11027,7 +11027,7 @@ _080CCDB0: movs r2, 0x4 bl LoadPalette ldr r0, [sp, 0x28] - bl sav3_get_box_name + bl GetBoxNamePtr bl sub_80CD00C lsls r0, 16 mov r1, r10 @@ -21085,8 +21085,8 @@ _080D20CA: bx r1 thumb_func_end GetBoxedMonPtr - thumb_func_start sav3_get_box_name -sav3_get_box_name: @ 80D20D0 + thumb_func_start GetBoxNamePtr +GetBoxNamePtr: @ 80D20D0 push {lr} lsls r0, 24 lsrs r2, r0, 24 @@ -21106,7 +21106,7 @@ _080D20EC: pop {r1} bx r1 .pool - thumb_func_end sav3_get_box_name + thumb_func_end GetBoxNamePtr thumb_func_start sub_80D20F8 sub_80D20F8: @ 80D20F8 diff --git a/asm/pokenav.s b/asm/pokenav.s index 6ae25b362..6f47df54c 100755 --- a/asm/pokenav.s +++ b/asm/pokenav.s @@ -13136,7 +13136,7 @@ _081CD8E4: ldr r2, =0x00006325 adds r4, r2 adds r0, r3, 0 - bl sav3_get_box_name + bl GetBoxNamePtr adds r1, r0, 0 adds r0, r4, 0 _081CD8F4: @@ -24164,7 +24164,7 @@ _081D2F2C: adds r4, r5, 0x5 lsls r0, r7, 24 lsrs r0, 24 - bl sav3_get_box_name + bl GetBoxNamePtr adds r1, r0, 0 adds r0, r4, 0 _081D2F3A: diff --git a/asm/reshow_battle_screen.s b/asm/reshow_battle_screen.s index 77d107f3d..42ba43ec0 100644 --- a/asm/reshow_battle_screen.s +++ b/asm/reshow_battle_screen.s @@ -111,7 +111,7 @@ _080A93B0: strh r1, [r0] ldr r0, =gBattle_BG2_Y strh r1, [r0] - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X strh r1, [r0] ldr r0, =gUnknown_02022E22 strh r1, [r0] @@ -286,7 +286,7 @@ _080A955C: b _080A95D2 .pool _080A95A4: - ldr r0, =vblank_cb_08078BB4 + ldr r0, =VBlankCB_Battle bl SetVBlankCallback bl sub_80A95F4 movs r0, 0x1 diff --git a/asm/rom3.s b/asm/rom3.s index 131721493..9bd95c252 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -2337,8 +2337,8 @@ EmitTrainerSlide: @ 8033A04 .pool thumb_func_end EmitTrainerSlide - thumb_func_start dp01_build_cmdbuf_x09_9_9_9 -dp01_build_cmdbuf_x09_9_9_9: @ 8033A24 + thumb_func_start EmitTrainerSlideBack +EmitTrainerSlideBack: @ 8033A24 push {lr} lsls r0, 24 lsrs r0, 24 @@ -2353,7 +2353,7 @@ dp01_build_cmdbuf_x09_9_9_9: @ 8033A24 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x09_9_9_9 + thumb_func_end EmitTrainerSlideBack thumb_func_start EmitFaintAnimation EmitFaintAnimation: @ 8033A44 @@ -2409,8 +2409,8 @@ dp01_build_cmdbuf_x0C_C_C_C: @ 8033A84 .pool thumb_func_end dp01_build_cmdbuf_x0C_C_C_C - thumb_func_start dp01_build_cmdbuf_x0D_a -dp01_build_cmdbuf_x0D_a: @ 8033AA4 + thumb_func_start EmitBallThrow +EmitBallThrow: @ 8033AA4 push {lr} adds r3, r1, 0 lsls r0, 24 @@ -2424,7 +2424,7 @@ dp01_build_cmdbuf_x0D_a: @ 8033AA4 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x0D_a + thumb_func_end EmitBallThrow thumb_func_start sub_8033AC4 sub_8033AC4: @ 8033AC4 diff --git a/asm/scrcmd.s b/asm/scrcmd.s index 39366d29f..9a3505b4f 100644 --- a/asm/scrcmd.s +++ b/asm/scrcmd.s @@ -4183,7 +4183,7 @@ sC6_load_textvar_box_label: @ 809B2C8 ldr r4, [r4] lsls r0, 24 lsrs r0, 24 - bl sav3_get_box_name + bl GetBoxNamePtr adds r1, r0, 0 adds r0, r4, 0 bl StringCopy diff --git a/asm/unknown_task.s b/asm/unknown_task.s index 9c01afe93..99a614e37 100644 --- a/asm/unknown_task.s +++ b/asm/unknown_task.s @@ -291,7 +291,7 @@ _080BA23C: b _080BA24E .pool _080BA244: - ldr r0, =gUnknown_02022E20 + ldr r0, =gBattle_BG3_X b _080BA24E .pool _080BA24C: diff --git a/data/battle_scripts_2.s b/data/battle_scripts_2.s index e76bb397b..938531a57 100644 --- a/data/battle_scripts_2.s +++ b/data/battle_scripts_2.s @@ -16,14 +16,14 @@ gUnknown_082DBD54:: @ 82DBD54 gUnknown_082DBD58:: @ 82DBD58 .incbin "baserom.gba", 0x2dbd58, 0x2c -gUnknown_082DBD84:: @ 82DBD84 +BattleScript_SuccessBallThrow:: @ 82DBD84 .incbin "baserom.gba", 0x2dbd84, 0x46 -gUnknown_082DBDCA:: @ 82DBDCA +BattleScript_WallyBallThrow:: @ 82DBDCA .incbin "baserom.gba", 0x2dbdca, 0xa -gUnknown_082DBDD4:: @ 82DBDD4 +BattleScript_ShakeBallThrow:: @ 82DBDD4 .incbin "baserom.gba", 0x2dbdd4, 0x2e -gUnknown_082DBE02:: @ 82DBE02 +BattleScript_TrainerBallBlock:: @ 82DBE02 .incbin "baserom.gba", 0x2dbe02, 0xf6 diff --git a/include/battle.h b/include/battle.h index a0a50faf7..7b164caf4 100644 --- a/include/battle.h +++ b/include/battle.h @@ -205,6 +205,7 @@ #define WEATHER_SUN_ANY ((WEATHER_SUN_TEMPORARY | WEATHER_SUN_PERMANENT)) #define WEATHER_HAIL (1 << 7) #define WEATHER_HAIL_ANY ((WEATHER_HAIL)) +#define WEATHER_ANY ((WEATHER_RAIN_ANY | WEATHER_SANDSTORM_ANY | WEATHER_SUN_ANY | WEATHER_HAIL_ANY)) #define BATTLE_TERRAIN_GRASS 0 #define BATTLE_TERRAIN_LONG_GRASS 1 @@ -216,7 +217,9 @@ #define BATTLE_TERRAIN_CAVE 7 // array entries for battle communication +#define MULTIUSE_STATE 0x0 #define CURSOR_POSITION 0x1 +#define TASK_ID 0x1 // task Id and cursor position share the same field #define MOVE_EFFECT_BYTE 0x3 #define MULTISTRING_CHOOSER 0x5 #define MSG_DISPLAY 0x7 @@ -531,6 +534,9 @@ struct BattleResults u8 unk4; // 0x4 u8 unk5_0:1; // 0x5 u8 unk5_1:1; // 0x5 + u8 caughtMonBall:4; // 0x5 + u8 unk5_6:1; // 0x5 + u8 unk5_7:1; // 0x5 u16 poke1Species; // 0x6 u8 pokeString1[10]; // 0x8 u8 unk12; @@ -542,10 +548,10 @@ struct BattleResults u16 lastUsedMove; // 0x22 u16 opponentMove; // 0x24 u16 opponentSpecies; // 0x26 - u16 caughtPoke; // 0x28 - u8 caughtNick[10]; // 0x2A + u16 caughtMonSpecies; // 0x28 + u8 caughtMonNick[10]; // 0x2A u8 filler34[2]; - u8 unk36[10]; // usedBalls? + u8 catchAttempts[10]; // 0x36 }; extern struct BattleResults gBattleResults; @@ -588,17 +594,7 @@ struct BattleStruct u8 field_5C[4]; u8 field_60[4][3]; u8 field_6C; - u8 field_6D; - u8 field_6E; - u8 field_6F; - u8 field_70; - u8 field_71; - u8 field_72; - u8 field_73; - u8 field_74; - u8 field_75; - u8 field_76; - u8 field_77; + u8 caughtMonNick[11]; u8 field_78; u8 field_79; u8 field_7A; @@ -845,6 +841,7 @@ struct BattleScripting u8 field_1D; u8 atk6C_state; u8 learnMoveState; + u8 field_20; }; extern struct BattleScripting gBattleScripting; @@ -862,6 +859,7 @@ void SwitchInClearStructs(void); void sub_803BDA0(u8 bank); void sub_803FA70(u8 bank); void BattleMainCB2(void); +void VBlankCB_Battle(void); void ResetSentPokesToOpponentValue(void); bool8 CanRunFromBattle(u8 bank); bool8 IsRunningFromBattleImpossible(void); @@ -892,8 +890,8 @@ u8 AtkCanceller_UnableToUseMove(void); bool8 sub_80423F4(u8 bank, u8 r1, u8 r2); u8 CastformDataTypeChange(u8 bank); u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg); -void b_call_bc_move_exec(const u8* BS_ptr); -void b_push_move_exec(const u8* BS_ptr); +void BattleScriptExecute(const u8* BS_ptr); +void BattleScriptPushCursorAndCallback(const u8* BS_ptr); u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn); void sub_8045868(u8 bank); void sub_80458B4(void); @@ -905,9 +903,12 @@ void AI_CalcDmg(u8 bankAtk, u8 bankDef); u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef); u8 AI_TypeCalc(u16 move, u16 species, u8 ability); u8 BankGetTurnOrder(u8 bank); +void SetMoveEffect(bool8 primary, u8 certain); void BattleDestroyCursorAt(u8 cursorPosition); void BattleCreateCursorAt(u8 cursorPosition); void BufferMoveToLearnIntoBattleTextBuff2(void); +void sub_8056A3C(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags); +bool8 UproarWakeUpCheck(u8 bank); // battle_5 void AdjustFriendshipOnBattleFaint(u8 bank); diff --git a/include/battle_controllers.h b/include/battle_controllers.h index bb58cb699..b2846d7cf 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -43,6 +43,7 @@ void EmitSwitchInAnim(u8 bufferId, u8 partyId, bool8 dontClearSubstituteBit); void EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, const u8* arg4); void EmitLinkStandbyMsg(u8 bufferId, u8 arg1, u8 arg2); void EmitTrainerSlide(u8 bufferId); +void EmitTrainerSlideBack(u8 bufferId); void EmitFaintingCry(u8 bufferId); void Emit_x37(u8 bufferId, u8 arg1); void EmitHitAnimation(u8 bufferId); @@ -51,12 +52,22 @@ void EmitCmd49(u8 bufferId); void EmitStatusAnimation(u8 bufferId, bool8 status2, u32 status); void EmitCmd13(u8 bufferId); void EmitStatusIconUpdate(u8 bufferId, u32 status1, u32 status2); -void EmitResetActionMoveSelection(u8 bufferId, u8 caseId); #define RESET_ACTION_MOVE_SELECTION 0 #define RESET_ACTION_SELECTION 1 #define RESET_MOVE_SELECTION 2 +void EmitResetActionMoveSelection(u8 bufferId, u8 caseId); + +#define BALL_NO_SHAKES 0 +#define BALL_1_SHAKE 1 +#define BALL_2_SHAKES 2 +#define BALL_3_SHAKES_FAIL 3 +#define BALL_3_SHAKES_SUCCESS 4 +#define BALL_TRAINER_BLOCK 5 + +void EmitBallThrow(u8 bufferId, u8 caseId); + void MarkBufferBankForExecution(u8 bank); #endif // GUARD_BATTLE_CONTROLLERS_H diff --git a/include/battle_message.h b/include/battle_message.h index 6e6616cf0..3bc7117bb 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -211,4 +211,6 @@ extern u8 gBattleTextBuff2[]; extern u8 gBattleTextBuff3[]; extern u8 gDisplayedStringBattle[]; +extern const u8* const gRefereeStringsTable[]; + #endif // GUARD_BATTLE_MESSAGE_H diff --git a/include/naming_screen.h b/include/naming_screen.h new file mode 100644 index 000000000..55a8e75a3 --- /dev/null +++ b/include/naming_screen.h @@ -0,0 +1,12 @@ +#ifndef GUARD_NAMING_SCREEN_H +#define GUARD_NAMING_SCREEN_H + +#define NAMING_SCREEN_PLAYER 0 +#define NAMING_SCREEN_BOX 1 +#define NAMING_SCREEN_CAUGHT_MON 2 +#define NAMING_SCREEN_3 3 +#define NAMING_SCREEN_WANDA 4 + +void DoNamingScreen(u8 caseId, u8* dst, u16 monSpecies, u8 monGender, u32 monPersonality, void (*callback)(void)); + +#endif // GUARD_NAMING_SCREEN_H diff --git a/include/pokedex.h b/include/pokedex.h index 15f819a2a..38aca0915 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -6,6 +6,7 @@ const u8 *GetPokemonCategory(u16); u16 GetPokedexHeightWeight(u16 dexNum, u8 data); u16 GetNationalPokedexCount(u8); u16 GetHoennPokedexCount(u8); +u8 CreateDexDisplayMonDataTask(u16 dexNum, u32 trainerId, u32 personality); enum { diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h new file mode 100644 index 000000000..5216e8450 --- /dev/null +++ b/include/pokemon_storage_system.h @@ -0,0 +1,6 @@ +#ifndef GUARD_POKEMON_STORAGE_SYSTEM_H +#define GUARD_POKEMON_STORAGE_SYSTEM_H + +u8* GetBoxNamePtr(u8 boxNumber); + +#endif // GUARD_POKEMON_STORAGE_SYSTEM_H diff --git a/ld_script.txt b/ld_script.txt index b2e996ff5..ffa8baba6 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -60,7 +60,6 @@ SECTIONS { asm/battle_2.o(.text); src/battle_3.o(.text); src/battle_4.o(.text); - asm/battle_4.o(.text); asm/battle_5.o(.text); asm/battle_controller_player.o(.text); asm/battle_7.o(.text); diff --git a/src/battle_3.c b/src/battle_3.c index 9ac439390..e81d527d0 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -179,13 +179,9 @@ extern const u8 gStatusConditionString_ConfusionJpn[]; extern const u8 gStatusConditionString_LoveJpn[]; extern const u16 gSoundMovesTable[]; -extern void CancelMultiTurnMoves(u8 bank); extern u8 b_first_side(u8, u8, u8); extern void sub_803CEDC(u8, u8); -extern void b_call_bc_move_exec(const u8 *); extern void BattleTurnPassed(void); -extern void SetMoveEffect(bool8 primary, u8 certainArg); -extern bool8 UproarWakeUpCheck(u8 bank); extern void sub_803F9EC(); extern bool8 sub_80423F4(u8 bank, u8, u8); extern u8 weather_get_current(void); @@ -441,7 +437,7 @@ u8 UpdateTurnCounters(void) if (--gSideTimers[sideBank].reflectTimer == 0) { gSideAffecting[sideBank] &= ~SIDE_STATUS_REFLECT; - b_call_bc_move_exec(gUnknown_082DACFA); + BattleScriptExecute(gUnknown_082DACFA); gBattleTextBuff1[0] = 0xFD; gBattleTextBuff1[1] = 2; gBattleTextBuff1[2] = MOVE_REFLECT; @@ -470,7 +466,7 @@ u8 UpdateTurnCounters(void) if (--gSideTimers[sideBank].lightscreenTimer == 0) { gSideAffecting[sideBank] &= ~SIDE_STATUS_LIGHTSCREEN; - b_call_bc_move_exec(gUnknown_082DACFA); + BattleScriptExecute(gUnknown_082DACFA); gBattleCommunication[MULTISTRING_CHOOSER] = sideBank; gBattleTextBuff1[0] = 0xFD; gBattleTextBuff1[1] = 2; @@ -499,7 +495,7 @@ u8 UpdateTurnCounters(void) && --gSideTimers[sideBank].mistTimer == 0) { gSideAffecting[sideBank] &= ~SIDE_STATUS_MIST; - b_call_bc_move_exec(gUnknown_082DACFA); + BattleScriptExecute(gUnknown_082DACFA); gBattleCommunication[MULTISTRING_CHOOSER] = sideBank; gBattleTextBuff1[0] = 0xFD; gBattleTextBuff1[1] = 2; @@ -528,7 +524,7 @@ u8 UpdateTurnCounters(void) if (--gSideTimers[sideBank].safeguardTimer == 0) { gSideAffecting[sideBank] &= ~SIDE_STATUS_SAFEGUARD; - b_call_bc_move_exec(gUnknown_082DAD0B); + BattleScriptExecute(gUnknown_082DAD0B); effect++; } } @@ -551,7 +547,7 @@ u8 UpdateTurnCounters(void) && gBattleMons[gActiveBank].hp != 0) { gBankTarget = gActiveBank; - b_call_bc_move_exec(BattleScript_WishComesTrue); + BattleScriptExecute(BattleScript_WishComesTrue); effect++; } gBattleStruct->turnSideTracker++; @@ -583,7 +579,7 @@ u8 UpdateTurnCounters(void) gBattleCommunication[MULTISTRING_CHOOSER] = 1; else gBattleCommunication[MULTISTRING_CHOOSER] = 0; - b_call_bc_move_exec(gUnknown_082DAC2C); + BattleScriptExecute(gUnknown_082DAC2C); effect++; } gBattleStruct->turncountersTracker++; @@ -601,7 +597,7 @@ u8 UpdateTurnCounters(void) gBattleScripting.animArg1 = 0xC; gBattleCommunication[MULTISTRING_CHOOSER] = 0; - b_call_bc_move_exec(gBattlescriptCurrInstr); + BattleScriptExecute(gBattlescriptCurrInstr); effect++; } gBattleStruct->turncountersTracker++; @@ -617,7 +613,7 @@ u8 UpdateTurnCounters(void) else gBattlescriptCurrInstr = gUnknown_082DACD2; - b_call_bc_move_exec(gBattlescriptCurrInstr); + BattleScriptExecute(gBattlescriptCurrInstr); effect++; } gBattleStruct->turncountersTracker++; @@ -635,7 +631,7 @@ u8 UpdateTurnCounters(void) gBattleScripting.animArg1 = 0xD; gBattleCommunication[MULTISTRING_CHOOSER] = 1; - b_call_bc_move_exec(gBattlescriptCurrInstr); + BattleScriptExecute(gBattlescriptCurrInstr); effect++; } gBattleStruct->turncountersTracker++; @@ -675,7 +671,7 @@ u8 TurnBasedEffects(void) if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; gBattleMoveDamage *= -1; - b_call_bc_move_exec(BattleScript_IngrainTurnHeal); + BattleScriptExecute(BattleScript_IngrainTurnHeal); effect++; } gBattleStruct->turnEffectsTracker++; @@ -706,7 +702,7 @@ u8 TurnBasedEffects(void) gBattleMoveDamage = 1; gBattleScripting.animArg1 = gBankTarget; gBattleScripting.animArg2 = gBankAttacker; - b_call_bc_move_exec(BattleScript_LeechSeedTurnDrain); + BattleScriptExecute(BattleScript_LeechSeedTurnDrain); effect++; } gBattleStruct->turnEffectsTracker++; @@ -717,7 +713,7 @@ u8 TurnBasedEffects(void) gBattleMoveDamage = gBattleMons[gActiveBank].maxHP / 8; if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; - b_call_bc_move_exec(BattleScript_PoisonTurnDmg); + BattleScriptExecute(BattleScript_PoisonTurnDmg); effect++; } gBattleStruct->turnEffectsTracker++; @@ -731,7 +727,7 @@ u8 TurnBasedEffects(void) if ((gBattleMons[gActiveBank].status1 & 0xF00) != 0xF00) //not 16 turns gBattleMons[gActiveBank].status1 += 0x100; gBattleMoveDamage *= (gBattleMons[gActiveBank].status1 & 0xF00) >> 8; - b_call_bc_move_exec(BattleScript_PoisonTurnDmg); + BattleScriptExecute(BattleScript_PoisonTurnDmg); effect++; } gBattleStruct->turnEffectsTracker++; @@ -742,7 +738,7 @@ u8 TurnBasedEffects(void) gBattleMoveDamage = gBattleMons[gActiveBank].maxHP / 8; if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; - b_call_bc_move_exec(BattleScript_BurnTurnDmg); + BattleScriptExecute(BattleScript_BurnTurnDmg); effect++; } gBattleStruct->turnEffectsTracker++; @@ -757,7 +753,7 @@ u8 TurnBasedEffects(void) gBattleMoveDamage = gBattleMons[gActiveBank].maxHP / 4; if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; - b_call_bc_move_exec(BattleScript_NightmareTurnDmg); + BattleScriptExecute(BattleScript_NightmareTurnDmg); effect++; } else @@ -773,7 +769,7 @@ u8 TurnBasedEffects(void) gBattleMoveDamage = gBattleMons[gActiveBank].maxHP / 4; if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; - b_call_bc_move_exec(BattleScript_CurseTurnDmg); + BattleScriptExecute(BattleScript_CurseTurnDmg); effect++; } gBattleStruct->turnEffectsTracker++; @@ -806,7 +802,7 @@ u8 TurnBasedEffects(void) gBattleTextBuff1[4] = EOS; gBattlescriptCurrInstr = BattleScript_WrapEnds; } - b_call_bc_move_exec(gBattlescriptCurrInstr); + BattleScriptExecute(gBattlescriptCurrInstr); effect++; } gBattleStruct->turnEffectsTracker++; @@ -822,7 +818,7 @@ u8 TurnBasedEffects(void) gBattleMons[gBankAttacker].status1 &= ~(STATUS_SLEEP); gBattleMons[gBankAttacker].status2 &= ~(STATUS2_NIGHTMARE); gBattleCommunication[MULTISTRING_CHOOSER] = 1; - b_call_bc_move_exec(gUnknown_082DB234); + BattleScriptExecute(gUnknown_082DB234); gActiveBank = gBankAttacker; EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); MarkBufferBankForExecution(gActiveBank); @@ -853,7 +849,7 @@ u8 TurnBasedEffects(void) gBattleCommunication[MULTISTRING_CHOOSER] = 1; CancelMultiTurnMoves(gActiveBank); } - b_call_bc_move_exec(gUnknown_082DB2A6); + BattleScriptExecute(gUnknown_082DB2A6); effect = 1; } } @@ -875,7 +871,7 @@ u8 TurnBasedEffects(void) gBattleCommunication[MOVE_EFFECT_BYTE] = 0x47; SetMoveEffect(1, 0); if (gBattleMons[gActiveBank].status2 & STATUS2_CONFUSION) - b_call_bc_move_exec(BattleScript_ThrashConfuses); + BattleScriptExecute(BattleScript_ThrashConfuses); effect++; } } @@ -899,7 +895,7 @@ u8 TurnBasedEffects(void) else if (--gDisableStructs[gActiveBank].disableTimer1 == 0) // disable ends { gDisableStructs[gActiveBank].disabledMove = 0; - b_call_bc_move_exec(BattleScript_DisabledNoMore); + BattleScriptExecute(BattleScript_DisabledNoMore); effect++; } } @@ -918,7 +914,7 @@ u8 TurnBasedEffects(void) { gDisableStructs[gActiveBank].encoredMove = 0; gDisableStructs[gActiveBank].encoreTimer1 = 0; - b_call_bc_move_exec(BattleScript_EncoredNoMore); + BattleScriptExecute(BattleScript_EncoredNoMore); effect++; } } @@ -952,7 +948,7 @@ u8 TurnBasedEffects(void) EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBank].status1); MarkBufferBankForExecution(gActiveBank); gEffectBank = gActiveBank; - b_call_bc_move_exec(BattleScript_YawnMakesAsleep); + BattleScriptExecute(BattleScript_YawnMakesAsleep); effect++; } } @@ -1006,7 +1002,7 @@ bool8 sub_8041364(void) gBankAttacker = gWishFutureKnock.futureSightAttacker[gActiveBank]; gBattleMoveDamage = gWishFutureKnock.futureSightDmg[gActiveBank]; gSpecialStatuses[gBankTarget].moveturnLostHP = 0xFFFF; - b_call_bc_move_exec(gUnknown_082DAFE4); + BattleScriptExecute(gUnknown_082DAFE4); if (gWishFutureKnock.futureSightCounter[gActiveBank] == 0 && gWishFutureKnock.futureSightCounter[gActiveBank ^ 2] == 0) @@ -1052,7 +1048,7 @@ bool8 sub_8041364(void) gDisableStructs[gActiveBank].perishSong1--; gBattlescriptCurrInstr = gUnknown_082DAF20; } - b_call_bc_move_exec(gBattlescriptCurrInstr); + BattleScriptExecute(gBattlescriptCurrInstr); return 1; } } @@ -1074,7 +1070,7 @@ bool8 sub_8041364(void) CancelMultiTurnMoves(i); gBattlescriptCurrInstr = gUnknown_082DB8F3; - b_call_bc_move_exec(gUnknown_082DB8F3); + BattleScriptExecute(gUnknown_082DB8F3); gBattleStruct->field_1A0++; return 1; } @@ -1114,7 +1110,7 @@ bool8 sub_8041728(void) && !(gBattleStruct->field_DF & gBitTable[gBattlePartyID[gBattleStruct->field_4E]]) && !(gAbsentBankFlags & gBitTable[gBattleStruct->field_4E])) { - b_call_bc_move_exec(gUnknown_082DA7C4); + BattleScriptExecute(gUnknown_082DA7C4); gBattleStruct->field_4D = 2; return TRUE; } @@ -1139,7 +1135,7 @@ bool8 sub_8041728(void) if (gBattleMons[gBattleStruct->field_4E].hp == 0 && !(gAbsentBankFlags & gBitTable[gBattleStruct->field_4E])) { - b_call_bc_move_exec(gUnknown_082DA7CD); + BattleScriptExecute(gUnknown_082DA7CD); gBattleStruct->field_4D = 5; return TRUE; } @@ -1709,7 +1705,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) if (effect) { gBattleCommunication[MULTISTRING_CHOOSER] = weather_get_current(); - b_push_move_exec(gUnknown_082DACE7); + BattleScriptPushCursorAndCallback(gUnknown_082DACE7); } break; case ABILITY_DRIZZLE: @@ -1717,7 +1713,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) if (!(gBattleWeather & WEATHER_RAIN_PERMANENT)) { gBattleWeather = (WEATHER_RAIN_PERMANENT | WEATHER_RAIN_TEMPORARY); - b_push_move_exec(BattleScript_DrizzleActivates); + BattleScriptPushCursorAndCallback(BattleScript_DrizzleActivates); gBattleScripting.bank = bank; effect++; } @@ -1727,7 +1723,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) if (!(gBattleWeather & WEATHER_SANDSTORM_PERMANENT)) { gBattleWeather = (WEATHER_SANDSTORM_PERMANENT | WEATHER_SANDSTORM_TEMPORARY); - b_push_move_exec(BattleScript_SandstreamActivates); + BattleScriptPushCursorAndCallback(BattleScript_SandstreamActivates); gBattleScripting.bank = bank; effect++; } @@ -1737,7 +1733,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) if (!(gBattleWeather & WEATHER_SUN_PERMANENT)) { gBattleWeather = (WEATHER_SUN_PERMANENT | WEATHER_SUN_TEMPORARY); - b_push_move_exec(BattleScript_DroughtActivates); + BattleScriptPushCursorAndCallback(BattleScript_DroughtActivates); gBattleScripting.bank = bank; effect++; } @@ -1755,7 +1751,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) effect = CastformDataTypeChange(bank); if (effect != 0) { - b_push_move_exec(BattleScript_CastformChange); + BattleScriptPushCursorAndCallback(BattleScript_CastformChange); gBattleScripting.bank = bank; gBattleStruct->formToChangeInto = effect - 1; } @@ -1779,7 +1775,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) effect = CastformDataTypeChange(i); if (effect != 0) { - b_push_move_exec(BattleScript_CastformChange); + BattleScriptPushCursorAndCallback(BattleScript_CastformChange); gBattleScripting.bank = i; gBattleStruct->formToChangeInto = effect - 1; break; @@ -1802,7 +1798,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) && gBattleMons[bank].maxHP > gBattleMons[bank].hp) { gLastUsedAbility = ABILITY_RAIN_DISH; //why - b_push_move_exec(BattleScript_RainDishActivates); + BattleScriptPushCursorAndCallback(BattleScript_RainDishActivates); gBattleMoveDamage = gBattleMons[bank].maxHP / 16; if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; @@ -1827,7 +1823,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) gBattleMons[bank].status1 = 0; gBattleMons[bank].status2 &= ~(STATUS2_NIGHTMARE); // fix nighmare glitch gBattleScripting.bank = gActiveBank = bank; - b_push_move_exec(BattleScript_ShedSkinActivates); + BattleScriptPushCursorAndCallback(BattleScript_ShedSkinActivates); EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[bank].status1); MarkBufferBankForExecution(gActiveBank); effect++; @@ -1840,7 +1836,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) gBattleMons[bank].statStages[STAT_STAGE_SPEED]++; gBattleScripting.animArg1 = 0x11; gBattleScripting.animArg2 = 0; - b_push_move_exec(BattleScript_SpeedBoostActivates); + BattleScriptPushCursorAndCallback(BattleScript_SpeedBoostActivates); gBattleScripting.bank = bank; effect++; } @@ -2167,7 +2163,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) effect = CastformDataTypeChange(i); if (effect) { - b_push_move_exec(BattleScript_CastformChange); + BattleScriptPushCursorAndCallback(BattleScript_CastformChange); gBattleScripting.bank = i; gBattleStruct->formToChangeInto = effect - 1; return effect; @@ -2215,7 +2211,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) { gLastUsedAbility = ABILITY_INTIMIDATE; gStatuses3[i] &= ~(STATUS3_INTIMIDATE_POKES); - b_push_move_exec(gUnknown_082DB4B8); + BattleScriptPushCursorAndCallback(gUnknown_082DB4B8); gBattleStruct->intimidateBank = i; effect++; break; @@ -2267,7 +2263,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) } if (effect) { - b_push_move_exec(BattleScript_TraceActivates); + BattleScriptPushCursorAndCallback(BattleScript_TraceActivates); gStatuses3[i] &= ~(STATUS3_TRACE); gBattleScripting.bank = i; @@ -2774,7 +2770,7 @@ _08042B56:\n\ ldr r1, =gBattleCommunication\n\ strb r0, [r1, 0x5]\n\ ldr r0, =gUnknown_082DACE7\n\ - bl b_push_move_exec\n\ + bl BattleScriptPushCursorAndCallback\n\ bl _0804441E\n\ .pool\n\ _08042B78:\n\ @@ -2789,7 +2785,7 @@ _08042B88:\n\ movs r0, 0x5\n\ strh r0, [r2]\n\ ldr r0, =BattleScript_DrizzleActivates\n\ - bl b_push_move_exec\n\ + bl BattleScriptPushCursorAndCallback\n\ ldr r0, =gBattleScripting\n\ mov r1, r10\n\ strb r1, [r0, 0x17]\n\ @@ -2807,7 +2803,7 @@ _08042BB8:\n\ movs r0, 0x18\n\ strh r0, [r2]\n\ ldr r0, =BattleScript_SandstreamActivates\n\ - bl b_push_move_exec\n\ + bl BattleScriptPushCursorAndCallback\n\ ldr r0, =gBattleScripting\n\ mov r2, r10\n\ strb r2, [r0, 0x17]\n\ @@ -2825,7 +2821,7 @@ _08042BE8:\n\ movs r0, 0x60\n\ strh r0, [r2]\n\ ldr r0, =BattleScript_DroughtActivates\n\ - bl b_push_move_exec\n\ + bl BattleScriptPushCursorAndCallback\n\ ldr r0, =gBattleScripting\n\ mov r3, r10\n\ strb r3, [r0, 0x17]\n\ @@ -2866,7 +2862,7 @@ _08042C3C:\n\ bl _0804443A\n\ _08042C50:\n\ ldr r0, =BattleScript_CastformChange\n\ - bl b_push_move_exec\n\ + bl BattleScriptPushCursorAndCallback\n\ ldr r0, =gBattleScripting\n\ mov r1, r10\n\ strb r1, [r0, 0x17]\n\ @@ -2999,7 +2995,7 @@ _08042D66:\n\ _08042D72:\n\ strb r5, [r7]\n\ ldr r0, =BattleScript_RainDishActivates\n\ - bl b_push_move_exec\n\ + bl BattleScriptPushCursorAndCallback\n\ ldr r1, =gBattleMoveDamage\n\ ldrh r0, [r4, 0x2C]\n\ lsrs r0, 4\n\ @@ -3093,7 +3089,7 @@ _08042E24:\n\ strb r3, [r4]\n\ strb r3, [r0, 0x17]\n\ ldr r0, =BattleScript_ShedSkinActivates\n\ - bl b_push_move_exec\n\ + bl BattleScriptPushCursorAndCallback\n\ str r5, [sp]\n\ movs r0, 0\n\ movs r1, 0x28\n\ @@ -3131,7 +3127,7 @@ _08042EA8:\n\ strb r0, [r4, 0x10]\n\ strb r1, [r4, 0x11]\n\ ldr r0, =BattleScript_SpeedBoostActivates\n\ - bl b_push_move_exec\n\ + bl BattleScriptPushCursorAndCallback\n\ strb r5, [r4, 0x17]\n\ bl _080443D0\n\ .pool\n\ @@ -5288,7 +5284,7 @@ _080442C0:\n\ .pool\n\ _080442D8:\n\ ldr r0, =BattleScript_CastformChange\n\ - bl b_push_move_exec\n\ + bl BattleScriptPushCursorAndCallback\n\ ldr r0, =gBattleScripting\n\ strb r6, [r0, 0x17]\n\ _080442E2:\n\ @@ -5302,7 +5298,7 @@ _080442E2:\n\ .pool\n\ _080442FC:\n\ ldr r0, =BattleScript_CastformChange\n\ - bl b_push_move_exec\n\ + bl BattleScriptPushCursorAndCallback\n\ ldr r0, =gBattleScripting\n\ mov r5, r10\n\ strb r5, [r0, 0x17]\n\ @@ -5321,12 +5317,12 @@ _08044324:\n\ ands r0, r1\n\ str r0, [r2]\n\ ldr r0, =gUnknown_082DB4B8\n\ - bl b_push_move_exec\n\ + bl BattleScriptPushCursorAndCallback\n\ b _080443C8\n\ .pool\n\ _08044340:\n\ ldr r0, =BattleScript_TraceActivates\n\ - bl b_push_move_exec\n\ + bl BattleScriptPushCursorAndCallback\n\ ldr r1, =gStatuses3\n\ ldr r0, [sp, 0x18]\n\ adds r1, r0, r1\n\ @@ -5445,7 +5441,7 @@ _0804443A:\n\ } #endif // NONMATCHING -void b_call_bc_move_exec(const u8* BS_ptr) +void BattleScriptExecute(const u8* BS_ptr) { gBattlescriptCurrInstr = BS_ptr; BATTLE_CALLBACKS_STACK->function[BATTLE_CALLBACKS_STACK->size++] = gBattleMainFunc; @@ -5453,7 +5449,7 @@ void b_call_bc_move_exec(const u8* BS_ptr) gFightStateTracker = 0; } -void b_push_move_exec(const u8* BS_ptr) +void BattleScriptPushCursorAndCallback(const u8* BS_ptr) { BattleScriptPushCursor(); gBattlescriptCurrInstr = BS_ptr; @@ -5549,7 +5545,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleScripting.bank = bank; gStringBank = bank; gActiveBank = gBankAttacker = bank; - b_call_bc_move_exec(BattleScript_WhiteHerbEnd2); + BattleScriptExecute(BattleScript_WhiteHerbEnd2); } break; } @@ -5566,7 +5562,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) if (gBattleMons[bank].hp + bankQuality > gBattleMons[bank].maxHP) gBattleMoveDamage = gBattleMons[bank].maxHP - gBattleMons[bank].hp; gBattleMoveDamage *= -1; - b_call_bc_move_exec(BattleScript_ItemHealHP_RemoveItem); + BattleScriptExecute(BattleScript_ItemHealHP_RemoveItem); effect = 4; } break; @@ -5601,7 +5597,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleTextBuff1[2] = move; gBattleTextBuff1[3] = move >> 8; gBattleTextBuff1[4] = 0xFF; - b_call_bc_move_exec(BattleScript_BerryPPHealEnd2); + BattleScriptExecute(BattleScript_BerryPPHealEnd2); EmitSetMonData(0, i + REQUEST_PPMOVE1_BATTLE, 0, 1, &changedPP); MarkBufferBankForExecution(gActiveBank); effect = ITEM_PP_CHANGE; @@ -5622,7 +5618,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleScripting.bank = bank; gStringBank = bank; gActiveBank = gBankAttacker = bank; - b_call_bc_move_exec(BattleScript_WhiteHerbEnd2); + BattleScriptExecute(BattleScript_WhiteHerbEnd2); } break; case HOLD_EFFECT_LEFTOVERS: @@ -5634,7 +5630,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) if (gBattleMons[bank].hp + gBattleMoveDamage > gBattleMons[bank].maxHP) gBattleMoveDamage = gBattleMons[bank].maxHP - gBattleMons[bank].hp; gBattleMoveDamage *= -1; - b_call_bc_move_exec(BattleScript_ItemHealHP_End2); + BattleScriptExecute(BattleScript_ItemHealHP_End2); effect = ITEM_HP_CHANGE; RecordItemEffectBattle(bank, bankHoldEffect); } @@ -5654,9 +5650,9 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleMoveDamage = gBattleMons[bank].maxHP - gBattleMons[bank].hp; gBattleMoveDamage *= -1; if (GetFlavourRelationByPersonality(gBattleMons[bank].personality, FLAVOR_SPICY) < 0) - b_call_bc_move_exec(BattleScript_BerryConfuseHealEnd2); + BattleScriptExecute(BattleScript_BerryConfuseHealEnd2); else - b_call_bc_move_exec(BattleScript_ItemHealHP_RemoveItem); + BattleScriptExecute(BattleScript_ItemHealHP_RemoveItem); effect = ITEM_HP_CHANGE; } break; @@ -5674,9 +5670,9 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleMoveDamage = gBattleMons[bank].maxHP - gBattleMons[bank].hp; gBattleMoveDamage *= -1; if (GetFlavourRelationByPersonality(gBattleMons[bank].personality, FLAVOR_DRY) < 0) - b_call_bc_move_exec(BattleScript_BerryConfuseHealEnd2); + BattleScriptExecute(BattleScript_BerryConfuseHealEnd2); else - b_call_bc_move_exec(BattleScript_ItemHealHP_RemoveItem); + BattleScriptExecute(BattleScript_ItemHealHP_RemoveItem); effect = ITEM_HP_CHANGE; } break; @@ -5694,9 +5690,9 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleMoveDamage = gBattleMons[bank].maxHP - gBattleMons[bank].hp; gBattleMoveDamage *= -1; if (GetFlavourRelationByPersonality(gBattleMons[bank].personality, FLAVOR_SWEET) < 0) - b_call_bc_move_exec(BattleScript_BerryConfuseHealEnd2); + BattleScriptExecute(BattleScript_BerryConfuseHealEnd2); else - b_call_bc_move_exec(BattleScript_ItemHealHP_RemoveItem); + BattleScriptExecute(BattleScript_ItemHealHP_RemoveItem); effect = ITEM_HP_CHANGE; } break; @@ -5714,9 +5710,9 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleMoveDamage = gBattleMons[bank].maxHP - gBattleMons[bank].hp; gBattleMoveDamage *= -1; if (GetFlavourRelationByPersonality(gBattleMons[bank].personality, FLAVOR_BITTER) < 0) - b_call_bc_move_exec(BattleScript_BerryConfuseHealEnd2); + BattleScriptExecute(BattleScript_BerryConfuseHealEnd2); else - b_call_bc_move_exec(BattleScript_ItemHealHP_RemoveItem); + BattleScriptExecute(BattleScript_ItemHealHP_RemoveItem); effect = ITEM_HP_CHANGE; } break; @@ -5734,9 +5730,9 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleMoveDamage = gBattleMons[bank].maxHP - gBattleMons[bank].hp; gBattleMoveDamage *= -1; if (GetFlavourRelationByPersonality(gBattleMons[bank].personality, FLAVOR_SOUR) < 0) - b_call_bc_move_exec(BattleScript_BerryConfuseHealEnd2); + BattleScriptExecute(BattleScript_BerryConfuseHealEnd2); else - b_call_bc_move_exec(BattleScript_ItemHealHP_RemoveItem); + BattleScriptExecute(BattleScript_ItemHealHP_RemoveItem); effect = ITEM_HP_CHANGE; } break; @@ -5759,7 +5755,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleScripting.statChanger = 0x10 + STAT_STAGE_ATK; gBattleScripting.animArg1 = 0xE + STAT_STAGE_ATK; gBattleScripting.animArg2 = 0; - b_call_bc_move_exec(BattleScript_BerryStatRaiseEnd2); + BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); effect = ITEM_STATS_CHANGE; } break; @@ -5775,7 +5771,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleScripting.statChanger = 0x10 + STAT_STAGE_DEF; gBattleScripting.animArg1 = 0xE + STAT_STAGE_DEF; gBattleScripting.animArg2 = 0; - b_call_bc_move_exec(BattleScript_BerryStatRaiseEnd2); + BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); effect = ITEM_STATS_CHANGE; } break; @@ -5791,7 +5787,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleScripting.statChanger = 0x10 + STAT_STAGE_SPEED; gBattleScripting.animArg1 = 0xE + STAT_STAGE_SPEED; gBattleScripting.animArg2 = 0; - b_call_bc_move_exec(BattleScript_BerryStatRaiseEnd2); + BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); effect = ITEM_STATS_CHANGE; } break; @@ -5807,7 +5803,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleScripting.statChanger = 0x10 + STAT_STAGE_SPATK; gBattleScripting.animArg1 = 0xE + STAT_STAGE_SPATK; gBattleScripting.animArg2 = 0; - b_call_bc_move_exec(BattleScript_BerryStatRaiseEnd2); + BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); effect = ITEM_STATS_CHANGE; } break; @@ -5823,7 +5819,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleScripting.statChanger = 0x10 + STAT_STAGE_SPDEF; gBattleScripting.animArg1 = 0xE + STAT_STAGE_SPDEF; gBattleScripting.animArg2 = 0; - b_call_bc_move_exec(BattleScript_BerryStatRaiseEnd2); + BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); effect = ITEM_STATS_CHANGE; } break; @@ -5831,7 +5827,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) if (gBattleMons[bank].hp <= gBattleMons[bank].maxHP / bankQuality && !moveTurn && !(gBattleMons[bank].status2 & STATUS2_FOCUS_ENERGY)) { gBattleMons[bank].status2 |= STATUS2_FOCUS_ENERGY; - b_call_bc_move_exec(BattleScript_BerryFocusEnergyEnd2); + BattleScriptExecute(BattleScript_BerryFocusEnergyEnd2); effect = ITEM_EFFECT_OTHER; } break; @@ -5868,7 +5864,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleScripting.statChanger = 0x21 + i; gBattleScripting.animArg1 = 0x21 + i + 6; gBattleScripting.animArg2 = 0; - b_call_bc_move_exec(BattleScript_BerryStatRaiseEnd2); + BattleScriptExecute(BattleScript_BerryStatRaiseEnd2); effect = ITEM_STATS_CHANGE; } } @@ -5877,7 +5873,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) if (gBattleMons[bank].status1 & STATUS_PARALYSIS) { gBattleMons[bank].status1 &= ~(STATUS_PARALYSIS); - b_call_bc_move_exec(BattleScript_BerryCurePrlzEnd2); + BattleScriptExecute(BattleScript_BerryCurePrlzEnd2); effect = ITEM_STATUS_CHANGE; } break; @@ -5885,7 +5881,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) if (gBattleMons[bank].status1 & STATUS_PSN_ANY) { gBattleMons[bank].status1 &= ~(STATUS_PSN_ANY | STATUS_TOXIC_COUNTER); - b_call_bc_move_exec(BattleScript_BerryCurePsnEnd2); + BattleScriptExecute(BattleScript_BerryCurePsnEnd2); effect = ITEM_STATUS_CHANGE; } break; @@ -5893,7 +5889,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) if (gBattleMons[bank].status1 & STATUS_BURN) { gBattleMons[bank].status1 &= ~(STATUS_BURN); - b_call_bc_move_exec(BattleScript_BerryCureBrnEnd2); + BattleScriptExecute(BattleScript_BerryCureBrnEnd2); effect = ITEM_STATUS_CHANGE; } break; @@ -5901,7 +5897,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) if (gBattleMons[bank].status1 & STATUS_FREEZE) { gBattleMons[bank].status1 &= ~(STATUS_FREEZE); - b_call_bc_move_exec(BattleScript_BerryCureFrzEnd2); + BattleScriptExecute(BattleScript_BerryCureFrzEnd2); effect = ITEM_STATUS_CHANGE; } break; @@ -5910,7 +5906,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) { gBattleMons[bank].status1 &= ~(STATUS_SLEEP); gBattleMons[bank].status2 &= ~(STATUS2_NIGHTMARE); - b_call_bc_move_exec(BattleScript_BerryCureSlpEnd2); + BattleScriptExecute(BattleScript_BerryCureSlpEnd2); effect = ITEM_STATUS_CHANGE; } break; @@ -5918,7 +5914,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) if (gBattleMons[bank].status2 & STATUS2_CONFUSION) { gBattleMons[bank].status2 &= ~(STATUS2_CONFUSION); - b_call_bc_move_exec(BattleScript_BerryCureConfusionEnd2); + BattleScriptExecute(BattleScript_BerryCureConfusionEnd2); effect = ITEM_EFFECT_OTHER; } break; @@ -5963,7 +5959,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) gBattleCommunication[MULTISTRING_CHOOSER] = 1; gBattleMons[bank].status1 = 0; gBattleMons[bank].status2 &= ~(STATUS2_CONFUSION); - b_call_bc_move_exec(BattleScript_BerryCureChosenStatusEnd2); + BattleScriptExecute(BattleScript_BerryCureChosenStatusEnd2); effect = ITEM_STATUS_CHANGE; } break; @@ -5972,7 +5968,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) { gBattleMons[bank].status2 &= ~(STATUS2_INFATUATION); StringCopy(gBattleTextBuff1, gStatusConditionString_LoveJpn); - b_call_bc_move_exec(BattleScript_BerryCureChosenStatusEnd2); + BattleScriptExecute(BattleScript_BerryCureChosenStatusEnd2); gBattleCommunication[MULTISTRING_CHOOSER] = 0; effect = ITEM_EFFECT_OTHER; } diff --git a/src/battle_4.c b/src/battle_4.c index 9ef443b70..33ac48261 100644 --- a/src/battle_4.c +++ b/src/battle_4.c @@ -30,6 +30,10 @@ #include "pokemon_item_effects.h" #include "m4a.h" #include "mail.h" +#include "event_data.h" +#include "pokemon_storage_system.h" +#include "task.h" +#include "naming_screen.h" // variables @@ -98,6 +102,11 @@ extern u16 gLastUsedMovesByBanks[BATTLE_BANKS_COUNT]; extern u16 gTrainerBattleOpponent_A; extern u16 gTrainerBattleOpponent_B; extern u8 gUnknown_020241E9; +extern u16 gBattle_BG1_X; +extern u16 gBattle_BG1_Y; +extern u16 gBattle_BG2_X; +extern u16 gBattle_BG2_Y; +extern u16 gBattle_BG3_X; extern struct MusicPlayerInfo gMPlay_BGM; struct TrainerMoney @@ -130,6 +139,14 @@ extern void sub_81A5D44(void); // battle frontier 2 extern void sub_81B8E80(u8 bank, u8, u8); // party menu extern bool8 sub_81B1250(void); // ? extern u8 GetScaledHPFraction(s16 hp, s16 maxhp, u8 scale); // battle interface +extern bool8 InBattlePike(void); +extern bool8 InBattlePyramid(void); +extern u16 GetBattlePyramidPickupItemId(void); +extern u8 sav1_map_get_light_level(void); +extern u8 sub_813B21C(void); +extern u16 get_unknown_box_id(void); +extern void c2_berry_program_update_menu(void); +extern void sub_8035AA4(void); // BattleScripts extern const u8 BattleScript_MoveEnd[]; @@ -201,13 +218,24 @@ extern const u8 BattleScript_PrintPayDayMoneyString[]; extern const u8 BattleScript_SturdyPreventsOHKO[]; extern const u8 BattleScript_ObliviousPreventsAttraction[]; extern const u8 BattleScript_PauseEffectivenessSoundResultMsgEndMove[]; +extern const u8 BattleScript_CastformChange[]; +extern const u8 BattleScript_TrainerBallBlock[]; +extern const u8 BattleScript_WallyBallThrow[]; +extern const u8 BattleScript_SuccessBallThrow[]; +extern const u8 BattleScript_ShakeBallThrow[]; +extern const u8 BattleScript_PresentDamageTarget[]; +extern const u8 BattleScript_AlreadyAtFullHp[]; +extern const u8 BattleScript_PresentHealTarget[]; +extern const u8 BattleScript_WrapFree[]; +extern const u8 BattleScript_LeechSeedFree[]; +extern const u8 BattleScript_SpikesFree[]; // strings extern const u8 gText_BattleYesNoChoice[]; // read via orr #define BSScriptRead32(ptr) ((ptr)[0] | (ptr)[1] << 8 | (ptr)[2] << 16 | (ptr)[3] << 24) -#define BSScriptRead8(ptr) (((u8)((ptr)[0]))) +#define BSScriptRead16(ptr) ((ptr)[0] | ((ptr)[1] << 8)) #define BSScriptReadPtr(ptr) ((void *)BSScriptRead32(ptr)) // read via add @@ -220,270 +248,269 @@ extern const u8 gText_BattleYesNoChoice[]; #define TARGET_TURN_DAMAGED (((gSpecialStatuses[gBankTarget].moveturnLostHP_physical || gSpecialStatuses[gBankTarget].moveturnLostHP_special))) // this file's functions -bool8 IsTwoTurnsMove(u16 move); -void DestinyBondFlagUpdate(void); -u8 AttacksThisTurn(u8 bank, u16 move); // Note: returns 1 if it's a charging turn, otherwise 2. +static bool8 IsTwoTurnsMove(u16 move); +static void DestinyBondFlagUpdate(void); +static u8 AttacksThisTurn(u8 bank, u16 move); // Note: returns 1 if it's a charging turn, otherwise 2. static void CheckWonderGuardAndLevitate(void); -u8 ChangeStatBuffs(s8 statValue, u8 statId, u8, const u8* BS_ptr); -void sub_8056A3C(u8 arg0, u8 arg1, u8 arg2, u8 arg3, u8 arg4); -bool32 IsMonGettingExpSentOut(void); -void sub_804F17C(void); -bool8 sub_804F1CC(void); -void sub_804F100(void); -void sub_804F144(void); -bool8 sub_804F344(void); -void PutMonIconOnLvlUpBox(void); -void PutLevelAndGenderOnLvlUpBox(void); +static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8, const u8* BS_ptr); +static bool32 IsMonGettingExpSentOut(void); +static void sub_804F17C(void); +static bool8 sub_804F1CC(void); +static void sub_804F100(void); +static void sub_804F144(void); +static bool8 sub_804F344(void); +static void PutMonIconOnLvlUpBox(void); +static void PutLevelAndGenderOnLvlUpBox(void); -void atk00_attackcanceler(void); -void atk01_accuracycheck(void); -void atk02_attackstring(void); -void atk03_ppreduce(void); -void atk04_critcalc(void); -void atk05_damagecalc1(void); -void atk06_typecalc(void); -void atk07_dmg_adjustment(void); -void atk08_dmg_adjustment2(void); -void atk09_attackanimation(void); -void atk0A_waitanimation(void); -void atk0B_healthbarupdate(void); -void atk0C_datahpupdate(void); -void atk0D_critmessage(void); -void atk0E_effectiveness_sound(void); -void atk0F_resultmessage(void); -void atk10_printstring(void); -void atk11_printstring_playeronly(void); -void atk12_waitmessage(void); -void atk13_printfromtable(void); -void atk14_printfromtable_playeronly(void); -void atk15_seteffectwithchance(void); -void atk16_seteffectprimary(void); -void atk17_seteffectsecondary(void); -void atk18_status_effect_clear(void); -void atk19_faint_pokemon(void); -void atk1A_faint_animation(void); -void atk1B_faint_effects_clear(void); -void atk1C_jumpifstatus(void); -void atk1D_jumpifstatus2(void); -void atk1E_jumpifability(void); -void atk1F_jumpifsideaffecting(void); -void atk20_jumpifstat(void); -void atk21_jumpifstatus3(void); -void atk22_jumpiftype(void); -void atk23_getexp(void); -void atk24(void); -void atk25_move_values_cleanup(void); -void atk26_set_multihit(void); -void atk27_decrement_multihit(void); -void atk28_goto(void); -void atk29_jumpifbyte(void); -void atk2A_jumpifhalfword(void); -void atk2B_jumpifword(void); -void atk2C_jumpifarrayequal(void); -void atk2D_jumpifarraynotequal(void); -void atk2E_setbyte(void); -void atk2F_addbyte(void); -void atk30_subbyte(void); -void atk31_copyarray(void); -void atk32_copyarray_withindex(void); -void atk33_orbyte(void); -void atk34_orhalfword(void); -void atk35_orword(void); -void atk36_bicbyte(void); -void atk37_bichalfword(void); -void atk38_bicword(void); -void atk39_pause(void); -void atk3A_waitstate(void); -void atk3B_healthbar_update(void); -void atk3C_return(void); -void atk3D_end(void); -void atk3E_end2(void); -void atk3F_end3(void); -void atk40_jump_if_move_affected_by_protect(void); -void atk41_call(void); -void atk42_jumpiftype2(void); -void atk43_jumpifabilitypresent(void); -void atk44(void); -void atk45_playanimation(void); -void atk46_playanimation2(void); -void atk47_setgraphicalstatchangevalues(void); -void atk48_playstatchangeanimation(void); -void atk49_moveend(void); -void atk4A_typecalc2(void); -void atk4B_return_atk_to_ball(void); -void atk4C_copy_poke_data(void); -void atk4D_switch_data_update(void); -void atk4E_switchin_anim(void); -void atk4F_jump_if_cannot_switch(void); -void atk50_openpartyscreen(void); -void atk51_switch_handle_order(void); -void atk52_switch_in_effects(void); -void atk53_trainer_slide(void); -void atk54_effectiveness_sound(void); -void atk55_play_sound(void); -void atk56_fainting_cry(void); -void atk57(void); -void atk58_return_to_ball(void); -void atk59_learnmove_inbattle(void); -void atk5A_yesnoboxlearnmove(void); -void atk5B_yesnoboxstoplearningmove(void); -void atk5C_hitanimation(void); -void atk5D_getmoneyreward(void); -void atk5E_8025A70(void); -void atk5F_8025B24(void); -void atk60_increment_gamestat(void); -void atk61_8025BA4(void); -void atk62_08025C6C(void); -void atk63_jumptorandomattack(void); -void atk64_statusanimation(void); -void atk65_status2animation(void); -void atk66_chosenstatusanimation(void); -void atk67_yesnobox(void); -void atk68_80246A0(void); -void atk69_dmg_adjustment3(void); -void atk6A_removeitem(void); -void atk6B_atknameinbuff1(void); -void atk6C_draw_lvlupbox(void); -void atk6D_reset_sentpokes_value(void); -void atk6E_set_atk_to_player0(void); -void atk6F_set_visible(void); -void atk70_record_last_used_ability(void); -void atk71_buffer_move_to_learn(void); -void atk72_jump_if_can_run_frombattle(void); -void atk73_hp_thresholds(void); -void atk74_hp_thresholds2(void); -void atk75_item_effect_on_opponent(void); -void atk76_various(void); -void atk77_set_protect_like(void); -void atk78_faintifabilitynotdamp(void); -void atk79_setatkhptozero(void); -void atk7A_jumpwhiletargetvalid(void); -void atk7B_healhalfHP_if_possible(void); -void atk7C_trymirrormove(void); -void atk7D_set_rain(void); -void atk7E_setreflect(void); -void atk7F_setseeded(void); -void atk80_manipulatedamage(void); -void atk81_setrest(void); -void atk82_jumpifnotfirstturn(void); -void atk83_nop(void); -void atk84_jump_if_cant_sleep(void); -void atk85_stockpile(void); -void atk86_stockpiletobasedamage(void); -void atk87_stockpiletohpheal(void); -void atk88_negativedamage(void); -void atk89_statbuffchange(void); -void atk8A_normalisebuffs(void); -void atk8B_setbide(void); -void atk8C_confuseifrepeatingattackends(void); -void atk8D_setmultihit_counter(void); -void atk8E_init_multihit_string(void); -void atk8F_forcerandomswitch(void); -void atk90_conversion_type_change(void); -void atk91_givepaydaymoney(void); -void atk92_setlightscreen(void); -void atk93_ko_move(void); -void atk94_damagetohalftargethp(void); -void atk95_setsandstorm(void); -void atk96_weatherdamage(void); -void atk97_try_infatuation(void); -void atk98_status_icon_update(void); -void atk99_setmist(void); -void atk9A_set_focusenergy(void); -void atk9B_transformdataexecution(void); -void atk9C_set_substitute(void); -void atk9D_mimicattackcopy(void); -void atk9E_metronome(void); -void atk9F_dmgtolevel(void); -void atkA0_psywavedamageeffect(void); -void atkA1_counterdamagecalculator(void); -void atkA2_mirrorcoatdamagecalculator(void); -void atkA3_disablelastusedattack(void); -void atkA4_setencore(void); -void atkA5_painsplitdmgcalc(void); -void atkA6_settypetorandomresistance(void); -void atkA7_setalwayshitflag(void); -void atkA8_copymovepermanently(void); -void atkA9_sleeptalk_choose_move(void); -void atkAA_set_destinybond(void); -void atkAB_DestinyBondFlagUpdate(void); -void atkAC_remaininghptopower(void); -void atkAD_spite_ppreduce(void); -void atkAE_heal_party_status(void); -void atkAF_cursetarget(void); -void atkB0_set_spikes(void); -void atkB1_set_foresight(void); -void atkB2_setperishsong(void); -void atkB3_rolloutdamagecalculation(void); -void atkB4_jumpifconfusedandstatmaxed(void); -void atkB5_furycuttercalc(void); -void atkB6_happinesstodamagecalculation(void); -void atkB7_presentdamagecalculation(void); -void atkB8_set_safeguard(void); -void atkB9_magnitudedamagecalculation(void); -void atkBA_jumpifnopursuitswitchdmg(void); -void atkBB_setsunny(void); -void atkBC_maxattackhalvehp(void); -void atkBD_copyfoestats(void); -void atkBE_rapidspinfree(void); -void atkBF_set_defense_curl(void); -void atkC0_recoverbasedonsunlight(void); -void atkC1_hidden_power(void); -void atkC2_selectnexttarget(void); -void atkC3_setfutureattack(void); -void atkC4_beat_up(void); -void atkC5_setsemiinvulnerablebit(void); -void atkC6_clearsemiinvulnerablebit(void); -void atkC7_setminimize(void); -void atkC8_sethail(void); -void atkC9_jumpifattackandspecialattackcannotfall(void); -void atkCA_setforcedtarget(void); -void atkCB_setcharge(void); -void atkCC_callterrainattack(void); -void atkCD_cureifburnedparalysedorpoisoned(void); -void atkCE_settorment(void); -void atkCF_jumpifnodamage(void); -void atkD0_settaunt(void); -void atkD1_set_helpinghand(void); -void atkD2_swap_items(void); -void atkD3_copy_ability(void); -void atkD4_wish_effect(void); -void atkD5_setroots(void); -void atkD6_doubledamagedealtifdamaged(void); -void atkD7_setyawn(void); -void atkD8_setdamagetohealthdifference(void); -void atkD9_scaledamagebyhealthratio(void); -void atkDA_abilityswap(void); -void atkDB_imprisoneffect(void); -void atkDC_setgrudge(void); -void atkDD_weightdamagecalculation(void); -void atkDE_asistattackselect(void); -void atkDF_setmagiccoat(void); -void atkE0_setstealstatchange(void); -void atkE1_intimidate_string_loader(void); -void atkE2_switchout_abilities(void); -void atkE3_jumpifhasnohp(void); -void atkE4_getsecretpowereffect(void); -void atkE5_pickup(void); -void atkE6_castform_change_animation(void); -void atkE7_castform_data_change(void); -void atkE8_settypebasedhalvers(void); -void atkE9_setweatherballtype(void); -void atkEA_recycleitem(void); -void atkEB_settypetoterrain(void); -void atkEC_pursuit_sth(void); -void atkED_802B4B4(void); -void atkEE_removelightscreenreflect(void); -void atkEF_pokeball_catch_calculation(void); -void atkF0_copy_caught_poke(void); -void atkF1_setpoke_as_caught(void); -void atkF2_display_dex_info(void); -void atkF3_nickname_caught_poke(void); -void atkF4_802BEF0(void); -void atkF5_removeattackerstatus1(void); -void atkF6_802BF48(void); -void atkF7_802BF54(void); -void sub_8056EF8(void); +static void atk00_attackcanceler(void); +static void atk01_accuracycheck(void); +static void atk02_attackstring(void); +static void atk03_ppreduce(void); +static void atk04_critcalc(void); +static void atk05_damagecalc1(void); +static void atk06_typecalc(void); +static void atk07_dmg_adjustment(void); +static void atk08_dmg_adjustment2(void); +static void atk09_attackanimation(void); +static void atk0A_waitanimation(void); +static void atk0B_healthbarupdate(void); +static void atk0C_datahpupdate(void); +static void atk0D_critmessage(void); +static void atk0E_effectiveness_sound(void); +static void atk0F_resultmessage(void); +static void atk10_printstring(void); +static void atk11_printstring_playeronly(void); +static void atk12_waitmessage(void); +static void atk13_printfromtable(void); +static void atk14_printfromtable_playeronly(void); +static void atk15_seteffectwithchance(void); +static void atk16_seteffectprimary(void); +static void atk17_seteffectsecondary(void); +static void atk18_status_effect_clear(void); +static void atk19_faint_pokemon(void); +static void atk1A_faint_animation(void); +static void atk1B_faint_effects_clear(void); +static void atk1C_jumpifstatus(void); +static void atk1D_jumpifstatus2(void); +static void atk1E_jumpifability(void); +static void atk1F_jumpifsideaffecting(void); +static void atk20_jumpifstat(void); +static void atk21_jumpifstatus3(void); +static void atk22_jumpiftype(void); +static void atk23_getexp(void); +static void atk24(void); +static void atk25_move_values_cleanup(void); +static void atk26_set_multihit(void); +static void atk27_decrement_multihit(void); +static void atk28_goto(void); +static void atk29_jumpifbyte(void); +static void atk2A_jumpifhalfword(void); +static void atk2B_jumpifword(void); +static void atk2C_jumpifarrayequal(void); +static void atk2D_jumpifarraynotequal(void); +static void atk2E_setbyte(void); +static void atk2F_addbyte(void); +static void atk30_subbyte(void); +static void atk31_copyarray(void); +static void atk32_copyarray_withindex(void); +static void atk33_orbyte(void); +static void atk34_orhalfword(void); +static void atk35_orword(void); +static void atk36_bicbyte(void); +static void atk37_bichalfword(void); +static void atk38_bicword(void); +static void atk39_pause(void); +static void atk3A_waitstate(void); +static void atk3B_healthbar_update(void); +static void atk3C_return(void); +static void atk3D_end(void); +static void atk3E_end2(void); +static void atk3F_end3(void); +static void atk40_jump_if_move_affected_by_protect(void); +static void atk41_call(void); +static void atk42_jumpiftype2(void); +static void atk43_jumpifabilitypresent(void); +static void atk44(void); +static void atk45_playanimation(void); +static void atk46_playanimation2(void); +static void atk47_setgraphicalstatchangevalues(void); +static void atk48_playstatchangeanimation(void); +static void atk49_moveend(void); +static void atk4A_typecalc2(void); +static void atk4B_return_atk_to_ball(void); +static void atk4C_copy_poke_data(void); +static void atk4D_switch_data_update(void); +static void atk4E_switchin_anim(void); +static void atk4F_jump_if_cannot_switch(void); +static void atk50_openpartyscreen(void); +static void atk51_switch_handle_order(void); +static void atk52_switch_in_effects(void); +static void atk53_trainer_slide(void); +static void atk54_effectiveness_sound(void); +static void atk55_play_sound(void); +static void atk56_fainting_cry(void); +static void atk57(void); +static void atk58_return_to_ball(void); +static void atk59_learnmove_inbattle(void); +static void atk5A_yesnoboxlearnmove(void); +static void atk5B_yesnoboxstoplearningmove(void); +static void atk5C_hitanimation(void); +static void atk5D_getmoneyreward(void); +static void atk5E_8025A70(void); +static void atk5F_8025B24(void); +static void atk60_increment_gamestat(void); +static void atk61_8025BA4(void); +static void atk62_08025C6C(void); +static void atk63_jumptorandomattack(void); +static void atk64_statusanimation(void); +static void atk65_status2animation(void); +static void atk66_chosenstatusanimation(void); +static void atk67_yesnobox(void); +static void atk68_80246A0(void); +static void atk69_dmg_adjustment3(void); +static void atk6A_removeitem(void); +static void atk6B_atknameinbuff1(void); +static void atk6C_draw_lvlupbox(void); +static void atk6D_reset_sentpokes_value(void); +static void atk6E_set_atk_to_player0(void); +static void atk6F_set_visible(void); +static void atk70_record_last_used_ability(void); +static void atk71_buffer_move_to_learn(void); +static void atk72_jump_if_can_run_frombattle(void); +static void atk73_hp_thresholds(void); +static void atk74_hp_thresholds2(void); +static void atk75_item_effect_on_opponent(void); +static void atk76_various(void); +static void atk77_set_protect_like(void); +static void atk78_faintifabilitynotdamp(void); +static void atk79_setatkhptozero(void); +static void atk7A_jumpwhiletargetvalid(void); +static void atk7B_healhalfHP_if_possible(void); +static void atk7C_trymirrormove(void); +static void atk7D_set_rain(void); +static void atk7E_setreflect(void); +static void atk7F_setseeded(void); +static void atk80_manipulatedamage(void); +static void atk81_setrest(void); +static void atk82_jumpifnotfirstturn(void); +static void atk83_nop(void); +static void atk84_jump_if_cant_sleep(void); +static void atk85_stockpile(void); +static void atk86_stockpiletobasedamage(void); +static void atk87_stockpiletohpheal(void); +static void atk88_negativedamage(void); +static void atk89_statbuffchange(void); +static void atk8A_normalisebuffs(void); +static void atk8B_setbide(void); +static void atk8C_confuseifrepeatingattackends(void); +static void atk8D_setmultihit_counter(void); +static void atk8E_init_multihit_string(void); +static void atk8F_forcerandomswitch(void); +static void atk90_conversion_type_change(void); +static void atk91_givepaydaymoney(void); +static void atk92_setlightscreen(void); +static void atk93_ko_move(void); +static void atk94_damagetohalftargethp(void); +static void atk95_setsandstorm(void); +static void atk96_weatherdamage(void); +static void atk97_try_infatuation(void); +static void atk98_status_icon_update(void); +static void atk99_setmist(void); +static void atk9A_set_focusenergy(void); +static void atk9B_transformdataexecution(void); +static void atk9C_set_substitute(void); +static void atk9D_mimicattackcopy(void); +static void atk9E_metronome(void); +static void atk9F_dmgtolevel(void); +static void atkA0_psywavedamageeffect(void); +static void atkA1_counterdamagecalculator(void); +static void atkA2_mirrorcoatdamagecalculator(void); +static void atkA3_disablelastusedattack(void); +static void atkA4_setencore(void); +static void atkA5_painsplitdmgcalc(void); +static void atkA6_settypetorandomresistance(void); +static void atkA7_setalwayshitflag(void); +static void atkA8_copymovepermanently(void); +static void atkA9_sleeptalk_choose_move(void); +static void atkAA_set_destinybond(void); +static void atkAB_DestinyBondFlagUpdate(void); +static void atkAC_remaininghptopower(void); +static void atkAD_spite_ppreduce(void); +static void atkAE_heal_party_status(void); +static void atkAF_cursetarget(void); +static void atkB0_set_spikes(void); +static void atkB1_set_foresight(void); +static void atkB2_setperishsong(void); +static void atkB3_rolloutdamagecalculation(void); +static void atkB4_jumpifconfusedandstatmaxed(void); +static void atkB5_furycuttercalc(void); +static void atkB6_happinesstodamagecalculation(void); +static void atkB7_presentdamagecalculation(void); +static void atkB8_set_safeguard(void); +static void atkB9_magnitudedamagecalculation(void); +static void atkBA_jumpifnopursuitswitchdmg(void); +static void atkBB_setsunny(void); +static void atkBC_maxattackhalvehp(void); +static void atkBD_copyfoestats(void); +static void atkBE_rapidspinfree(void); +static void atkBF_set_defense_curl(void); +static void atkC0_recoverbasedonsunlight(void); +static void atkC1_hidden_power(void); +static void atkC2_selectnexttarget(void); +static void atkC3_setfutureattack(void); +static void atkC4_beat_up(void); +static void atkC5_setsemiinvulnerablebit(void); +static void atkC6_clearsemiinvulnerablebit(void); +static void atkC7_setminimize(void); +static void atkC8_sethail(void); +static void atkC9_jumpifattackandspecialattackcannotfall(void); +static void atkCA_setforcedtarget(void); +static void atkCB_setcharge(void); +static void atkCC_callterrainattack(void); +static void atkCD_cureifburnedparalysedorpoisoned(void); +static void atkCE_settorment(void); +static void atkCF_jumpifnodamage(void); +static void atkD0_settaunt(void); +static void atkD1_set_helpinghand(void); +static void atkD2_swap_items(void); +static void atkD3_copy_ability(void); +static void atkD4_wish_effect(void); +static void atkD5_setroots(void); +static void atkD6_doubledamagedealtifdamaged(void); +static void atkD7_setyawn(void); +static void atkD8_setdamagetohealthdifference(void); +static void atkD9_scaledamagebyhealthratio(void); +static void atkDA_abilityswap(void); +static void atkDB_imprisoneffect(void); +static void atkDC_setgrudge(void); +static void atkDD_weightdamagecalculation(void); +static void atkDE_asistattackselect(void); +static void atkDF_setmagiccoat(void); +static void atkE0_setstealstatchange(void); +static void atkE1_intimidate_string_loader(void); +static void atkE2_switchout_abilities(void); +static void atkE3_jumpifhasnohp(void); +static void atkE4_getsecretpowereffect(void); +static void atkE5_pickup(void); +static void atkE6_castform_change_animation(void); +static void atkE7_castform_data_change(void); +static void atkE8_settypebasedhalvers(void); +static void atkE9_setweatherballtype(void); +static void atkEA_recycleitem(void); +static void atkEB_settypetoterrain(void); +static void atkEC_pursuit_sth(void); +static void atkED_802B4B4(void); +static void atkEE_removelightscreenreflect(void); +static void atkEF_pokeball_catch_calculation(void); +static void atkF0_give_caught_mon(void); +static void atkF1_set_caught_mon_dex_flags(void); +static void atkF2_display_dex_info(void); +static void atkF3_nickname_caught_poke(void); +static void atkF4_subattackerhpbydmg(void); +static void atkF5_removeattackerstatus1(void); +static void atkF6_802BF48(void); +static void atkF7_802BF54(void); +static void atkF8_trainer_slide_back(void); void (* const gBattleScriptingCommandsTable[])(void) = { @@ -727,15 +754,15 @@ void (* const gBattleScriptingCommandsTable[])(void) = atkED_802B4B4, atkEE_removelightscreenreflect, atkEF_pokeball_catch_calculation, - atkF0_copy_caught_poke, - atkF1_setpoke_as_caught, + atkF0_give_caught_mon, + atkF1_set_caught_mon_dex_flags, atkF2_display_dex_info, atkF3_nickname_caught_poke, - atkF4_802BEF0, + atkF4_subattackerhpbydmg, atkF5_removeattackerstatus1, atkF6_802BF48, atkF7_802BF54, - sub_8056EF8 + atkF8_trainer_slide_back }; struct StatFractions @@ -877,8 +904,22 @@ extern const struct SpriteTemplate SpriteTemplate_MonIconOnLvlUpBox; extern const u16 sProtectSuccessRates[]; extern const u16 sNaturePowerMoves[]; extern const u16 sWeightToDamageTable[]; +extern const u8 sTerrainToType[]; +extern const u8 sBallCatchBonuses[]; +extern const u16 gUnknown_0831C2C8[]; +extern const u8 gUnknown_0831C2E8[]; +extern const u8 gUnknown_0831C4F8[]; +extern const u8 sFlailHpScaleToPowerTable[12]; +extern const u16 gRarePickupItems[]; +extern const u16 gPickupItems[]; +extern const u8 gPickupProbabilities[]; -void atk00_attackcanceler(void) +extern const u16 gMovesForbiddenToCopy[]; +#define MIMIC_FORBIDDEN_END 0xFFFE +#define METRONOME_FORBIDDEN_END 0xFFFF +#define ASSIST_FORBIDDEN_END 0xFFFF + +static void atk00_attackcanceler(void) { s32 i; @@ -972,7 +1013,7 @@ void atk00_attackcanceler(void) } } -void JumpIfMoveFailed(u8 adder, u16 move) +static void JumpIfMoveFailed(u8 adder, u16 move) { const void* BS_ptr = gBattlescriptCurrInstr + adder; if (gBattleMoveFlags & MOVESTATUS_NOEFFECT) @@ -990,7 +1031,7 @@ void JumpIfMoveFailed(u8 adder, u16 move) gBattlescriptCurrInstr = BS_ptr; } -void atk40_jump_if_move_affected_by_protect(void) +static void atk40_jump_if_move_affected_by_protect(void) { if (TARGET_PROTECT_AFFECTED) { @@ -1062,7 +1103,7 @@ bool8 AccuracyCalcHelper(u16 move) return FALSE; } -void atk01_accuracycheck(void) +static void atk01_accuracycheck(void) { u16 move = BS2ScriptRead16(gBattlescriptCurrInstr + 5); @@ -1154,7 +1195,7 @@ void atk01_accuracycheck(void) } } -void atk02_attackstring(void) +static void atk02_attackstring(void) { if (gBattleExecBuffer) return; @@ -1167,7 +1208,7 @@ void atk02_attackstring(void) gBattleCommunication[MSG_DISPLAY] = 0; } -void atk03_ppreduce(void) +static void atk03_ppreduce(void) { s32 ppToDeduct = 1; @@ -1214,7 +1255,7 @@ void atk03_ppreduce(void) gBattlescriptCurrInstr++; } -void atk04_critcalc(void) +static void atk04_critcalc(void) { u8 holdEffect; u16 item, critChance; @@ -1251,7 +1292,7 @@ void atk04_critcalc(void) gBattlescriptCurrInstr++; } -void atk05_damagecalc1(void) +static void atk05_damagecalc1(void) { u16 sideStatus = gSideAffecting[GET_BANK_SIDE(gBankTarget)]; gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[gBankAttacker], &gBattleMons[gBankTarget], gCurrentMove, @@ -1282,7 +1323,7 @@ void AI_CalcDmg(u8 bankAtk, u8 bankDef) gBattleMoveDamage = gBattleMoveDamage * 15 / 10; } -void ModulateDmgByType(u8 multiplier) +static void ModulateDmgByType(u8 multiplier) { gBattleMoveDamage = gBattleMoveDamage * multiplier / 10; if (gBattleMoveDamage == 0 && multiplier != 0) @@ -1319,7 +1360,7 @@ void ModulateDmgByType(u8 multiplier) #define TYPE_FORESIGHT 0xFE #define TYPE_ENDTABLE 0xFF -void atk06_typecalc(void) +static void atk06_typecalc(void) { s32 i = 0; u8 moveType; @@ -1464,7 +1505,7 @@ static void CheckWonderGuardAndLevitate(void) } } -void ModulateDmgByType2(u8 multiplier, u16 move, u8* flags) // same as ModulateDmgByType except different arguments +static void ModulateDmgByType2(u8 multiplier, u16 move, u8* flags) // same as ModulateDmgByType except different arguments { gBattleMoveDamage = gBattleMoveDamage * multiplier / 10; if (gBattleMoveDamage == 0 && multiplier != 0) @@ -1615,12 +1656,12 @@ static inline void ApplyRandomDmgMultiplier(void) } } -void Unused_ApplyRandomDmgMultiplier(void) +static void Unused_ApplyRandomDmgMultiplier(void) { ApplyRandomDmgMultiplier(); } -void atk07_dmg_adjustment(void) +static void atk07_dmg_adjustment(void) { u8 holdEffect, quality; @@ -1668,7 +1709,7 @@ void atk07_dmg_adjustment(void) gBattlescriptCurrInstr++; } -void atk08_dmg_adjustment2(void) // The same as 0x7 except it doesn't check for false swipe move effect. +static void atk08_dmg_adjustment2(void) // The same as 0x7 except it doesn't check for false swipe move effect. { u8 holdEffect, quality; @@ -1714,7 +1755,7 @@ void atk08_dmg_adjustment2(void) // The same as 0x7 except it doesn't check for gBattlescriptCurrInstr++; } -void atk09_attackanimation(void) +static void atk09_attackanimation(void) { if (gBattleExecBuffer) return; @@ -1768,20 +1809,20 @@ void atk09_attackanimation(void) } } -void atk0A_waitanimation(void) +static void atk0A_waitanimation(void) { if (gBattleExecBuffer == 0) gBattlescriptCurrInstr++; } -void atk0B_healthbarupdate(void) +static void atk0B_healthbarupdate(void) { if (gBattleExecBuffer) return; if (!(gBattleMoveFlags & MOVESTATUS_NOEFFECT)) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); if (gBattleMons[gActiveBank].status2 & STATUS2_SUBSTITUTE && gDisableStructs[gActiveBank].substituteHP && !(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE)) { @@ -1810,7 +1851,7 @@ void atk0B_healthbarupdate(void) gBattlescriptCurrInstr += 2; } -void atk0C_datahpupdate(void) +static void atk0C_datahpupdate(void) { u32 moveType; @@ -1826,7 +1867,7 @@ void atk0C_datahpupdate(void) if (!(gBattleMoveFlags & MOVESTATUS_NOEFFECT)) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); if (gBattleMons[gActiveBank].status2 & STATUS2_SUBSTITUTE && gDisableStructs[gActiveBank].substituteHP && !(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE)) { if (gDisableStructs[gActiveBank].substituteHP >= gBattleMoveDamage) @@ -1871,7 +1912,7 @@ void atk0C_datahpupdate(void) else { gTakenDmg[gActiveBank] += gBattleMoveDamage; - if (BSScriptRead8(gBattlescriptCurrInstr + 1) == BS_GET_TARGET) + if (gBattlescriptCurrInstr[1] == BS_GET_TARGET) gTakenDmgBanks[gActiveBank] = gBankAttacker; else gTakenDmgBanks[gActiveBank] = gBankTarget; @@ -1895,7 +1936,7 @@ void atk0C_datahpupdate(void) { gProtectStructs[gActiveBank].physicalDmg = gHpDealt; gSpecialStatuses[gActiveBank].moveturnLostHP_physical = gHpDealt; - if (BSScriptRead8(gBattlescriptCurrInstr + 1) == BS_GET_TARGET) + if (gBattlescriptCurrInstr[1] == BS_GET_TARGET) { gProtectStructs[gActiveBank].physicalBank = gBankAttacker; gSpecialStatuses[gActiveBank].moveturnPhysicalBank = gBankAttacker; @@ -1910,7 +1951,7 @@ void atk0C_datahpupdate(void) { gProtectStructs[gActiveBank].specialDmg = gHpDealt; gSpecialStatuses[gActiveBank].moveturnLostHP_special = gHpDealt; - if (BSScriptRead8(gBattlescriptCurrInstr + 1) == BS_GET_TARGET) + if (gBattlescriptCurrInstr[1] == BS_GET_TARGET) { gProtectStructs[gActiveBank].specialBank = gBankAttacker; gSpecialStatuses[gActiveBank].moveturnSpecialBank = gBankAttacker; @@ -1929,14 +1970,14 @@ void atk0C_datahpupdate(void) } else { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); if (gSpecialStatuses[gActiveBank].moveturnLostHP == 0) gSpecialStatuses[gActiveBank].moveturnLostHP = 0xFFFF; } gBattlescriptCurrInstr += 2; } -void atk0D_critmessage(void) +static void atk0D_critmessage(void) { if (gBattleExecBuffer == 0) { @@ -1949,7 +1990,7 @@ void atk0D_critmessage(void) } } -void atk0E_effectiveness_sound(void) +static void atk0E_effectiveness_sound(void) { if (gBattleExecBuffer) return; @@ -1996,7 +2037,7 @@ void atk0E_effectiveness_sound(void) gBattlescriptCurrInstr++; } -void atk0F_resultmessage(void) +static void atk0F_resultmessage(void) { u32 stringId = 0; @@ -2085,7 +2126,7 @@ void atk0F_resultmessage(void) gBattlescriptCurrInstr++; } -void atk10_printstring(void) +static void atk10_printstring(void) { if (gBattleExecBuffer == 0) { @@ -2096,7 +2137,7 @@ void atk10_printstring(void) } } -void atk11_printstring_playeronly(void) +static void atk11_printstring_playeronly(void) { gActiveBank = gBankAttacker; @@ -2107,7 +2148,7 @@ void atk11_printstring_playeronly(void) gBattleCommunication[MSG_DISPLAY] = 1; } -void atk12_waitmessage(void) +static void atk12_waitmessage(void) { if (gBattleExecBuffer == 0) { @@ -2128,7 +2169,7 @@ void atk12_waitmessage(void) } } -void atk13_printfromtable(void) +static void atk13_printfromtable(void) { if (gBattleExecBuffer == 0) { @@ -2142,7 +2183,7 @@ void atk13_printfromtable(void) } } -void atk14_printfromtable_playeronly(void) +static void atk14_printfromtable_playeronly(void) { if (gBattleExecBuffer == 0) { @@ -2868,7 +2909,7 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattleCommunication[MOVE_EFFECT_BYTE] = 0; } -void atk15_seteffectwithchance(void) +static void atk15_seteffectwithchance(void) { u32 percentChance; @@ -2901,19 +2942,19 @@ void atk15_seteffectwithchance(void) gBattleScripting.field_16 = 0; } -void atk16_seteffectprimary(void) +static void atk16_seteffectprimary(void) { SetMoveEffect(TRUE, 0); } -void atk17_seteffectsecondary(void) +static void atk17_seteffectsecondary(void) { SetMoveEffect(FALSE, 0); } -void atk18_status_effect_clear(void) +static void atk18_status_effect_clear(void) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); if (gBattleCommunication[MOVE_EFFECT_BYTE] <= MOVE_EFFECT_TOXIC) gBattleMons[gActiveBank].status1 &= (~gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]); @@ -2925,7 +2966,7 @@ void atk18_status_effect_clear(void) gBattleScripting.field_16 = 0; } -void atk19_faint_pokemon(void) +static void atk19_faint_pokemon(void) { const u8 *BS_ptr; @@ -3012,22 +3053,22 @@ void atk19_faint_pokemon(void) } } -void atk1A_faint_animation(void) +static void atk1A_faint_animation(void) { if (gBattleExecBuffer == 0) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); EmitFaintAnimation(0); MarkBufferBankForExecution(gActiveBank); gBattlescriptCurrInstr += 2; } } -void atk1B_faint_effects_clear(void) +static void atk1B_faint_effects_clear(void) { if (gBattleExecBuffer == 0) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); if (!(gBattleTypeFlags & BATTLE_TYPE_ARENA) || gBattleMons[gActiveBank].hp == 0) { @@ -3041,9 +3082,9 @@ void atk1B_faint_effects_clear(void) } } -void atk1C_jumpifstatus(void) +static void atk1C_jumpifstatus(void) { - u8 bank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + u8 bank = GetBattleBank(gBattlescriptCurrInstr[1]); u32 flags = BS2ScriptRead32(gBattlescriptCurrInstr + 2); const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 6); @@ -3053,9 +3094,9 @@ void atk1C_jumpifstatus(void) gBattlescriptCurrInstr += 10; } -void atk1D_jumpifstatus2(void) +static void atk1D_jumpifstatus2(void) { - u8 bank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + u8 bank = GetBattleBank(gBattlescriptCurrInstr[1]); u32 flags = BS2ScriptRead32(gBattlescriptCurrInstr + 2); const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 6); @@ -3065,13 +3106,13 @@ void atk1D_jumpifstatus2(void) gBattlescriptCurrInstr += 10; } -void atk1E_jumpifability(void) +static void atk1E_jumpifability(void) { u8 bank; - u8 ability = BSScriptRead8(gBattlescriptCurrInstr + 2); + u8 ability = gBattlescriptCurrInstr[2]; const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 3); - if (BSScriptRead8(gBattlescriptCurrInstr + 1) == BS_GET_ATTACKER_SIDE) + if (gBattlescriptCurrInstr[1] == BS_GET_ATTACKER_SIDE) { bank = AbilityBattleEffects(ABILITYEFFECT_CHECK_BANK_SIDE, gBankAttacker, ability, 0, 0); if (bank) @@ -3084,7 +3125,7 @@ void atk1E_jumpifability(void) else gBattlescriptCurrInstr += 7; } - else if (BSScriptRead8(gBattlescriptCurrInstr + 1) == BS_GET_NOT_ATTACKER_SIDE) + else if (gBattlescriptCurrInstr[1] == BS_GET_NOT_ATTACKER_SIDE) { bank = AbilityBattleEffects(ABILITYEFFECT_CHECK_OTHER_SIDE, gBankAttacker, ability, 0, 0); if (bank) @@ -3099,7 +3140,7 @@ void atk1E_jumpifability(void) } else { - bank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + bank = GetBattleBank(gBattlescriptCurrInstr[1]); if (gBattleMons[bank].ability == ability) { gLastUsedAbility = ability; @@ -3112,13 +3153,13 @@ void atk1E_jumpifability(void) } } -void atk1F_jumpifsideaffecting(void) +static void atk1F_jumpifsideaffecting(void) { u8 side; u16 flags; const u8* jumpPtr; - if (BSScriptRead8(gBattlescriptCurrInstr + 1) == BS_GET_ATTACKER) + if (gBattlescriptCurrInstr[1] == BS_GET_ATTACKER) side = GET_BANK_SIDE(gBankAttacker); else side = GET_BANK_SIDE(gBankTarget); @@ -3132,36 +3173,36 @@ void atk1F_jumpifsideaffecting(void) gBattlescriptCurrInstr += 8; } -void atk20_jumpifstat(void) +static void atk20_jumpifstat(void) { u8 ret = 0; - u8 bank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); - u8 value = gBattleMons[bank].statStages[BSScriptRead8(gBattlescriptCurrInstr + 3)]; + u8 bank = GetBattleBank(gBattlescriptCurrInstr[1]); + u8 value = gBattleMons[bank].statStages[gBattlescriptCurrInstr[3]]; - switch (BSScriptRead8(gBattlescriptCurrInstr + 2)) + switch (gBattlescriptCurrInstr[2]) { case CMP_EQUAL: - if (value == BSScriptRead8(gBattlescriptCurrInstr + 4)) + if (value == gBattlescriptCurrInstr[4]) ret++; break; case CMP_NOT_EQUAL: - if (value != BSScriptRead8(gBattlescriptCurrInstr + 4)) + if (value != gBattlescriptCurrInstr[4]) ret++; break; case CMP_GREATER_THAN: - if (value > BSScriptRead8(gBattlescriptCurrInstr + 4)) + if (value > gBattlescriptCurrInstr[4]) ret++; break; case CMP_LESS_THAN: - if (value < BSScriptRead8(gBattlescriptCurrInstr + 4)) + if (value < gBattlescriptCurrInstr[4]) ret++; break; case CMP_COMMON_BITS: - if (value & BSScriptRead8(gBattlescriptCurrInstr + 4)) + if (value & gBattlescriptCurrInstr[4]) ret++; break; case CMP_NO_COMMON_BITS: - if (!(value & BSScriptRead8(gBattlescriptCurrInstr + 4))) + if (!(value & gBattlescriptCurrInstr[4])) ret++; break; } @@ -3172,16 +3213,16 @@ void atk20_jumpifstat(void) gBattlescriptCurrInstr += 9; } -void atk21_jumpifstatus3(void) +static void atk21_jumpifstatus3(void) { u32 flags; const u8* jumpPtr; - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); flags = BS2ScriptRead32(gBattlescriptCurrInstr + 2); jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 7); - if (BSScriptRead8(gBattlescriptCurrInstr + 6)) + if (gBattlescriptCurrInstr[6]) { if ((gStatuses3[gActiveBank] & flags) != 0) gBattlescriptCurrInstr += 11; @@ -3197,10 +3238,10 @@ void atk21_jumpifstatus3(void) } } -void atk22_jumpiftype(void) +static void atk22_jumpiftype(void) { - u8 bank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); - u8 type = BSScriptRead8(gBattlescriptCurrInstr + 2); + u8 bank = GetBattleBank(gBattlescriptCurrInstr[1]); + u8 type = gBattlescriptCurrInstr[2]; const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 3); if (gBattleMons[bank].type1 == type || gBattleMons[bank].type2 == type) @@ -3209,7 +3250,7 @@ void atk22_jumpiftype(void) gBattlescriptCurrInstr += 7; } -void atk23_getexp(void) +static void atk23_getexp(void) { u16 item; s32 i; // also used as stringId @@ -3219,7 +3260,7 @@ void atk23_getexp(void) s32 viaExpShare = 0; u16* exp = &gBattleStruct->expValue; - gBank1 = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gBank1 = GetBattleBank(gBattlescriptCurrInstr[1]); sentIn = gSentPokesToOpponent[(gBank1 & 2) >> 1]; switch (gBattleScripting.atk23_state) @@ -3487,7 +3528,7 @@ void atk23_getexp(void) } #ifdef NONMATCHING -void atk24(void) +static void atk24(void) { u16 HP_count = 0; s32 i; @@ -3570,7 +3611,7 @@ void atk24(void) } #else __attribute__((naked)) -void atk24(void) +static void atk24(void) { asm("\n\ .syntax unified\n\ @@ -3864,7 +3905,7 @@ void atk24(void) #endif // NONMATCHING -void MoveValuesCleanUp(void) +static void MoveValuesCleanUp(void) { gBattleMoveFlags = 0; gBattleScripting.dmgMultiplier = 1; @@ -3875,19 +3916,19 @@ void MoveValuesCleanUp(void) gHitMarker &= ~(HITMARKER_SYNCHRONISE_EFFECT); } -void atk25_move_values_cleanup(void) +static void atk25_move_values_cleanup(void) { MoveValuesCleanUp(); gBattlescriptCurrInstr += 1; } -void atk26_set_multihit(void) +static void atk26_set_multihit(void) { - gMultiHitCounter = BSScriptRead8(gBattlescriptCurrInstr + 1); + gMultiHitCounter = gBattlescriptCurrInstr[1]; gBattlescriptCurrInstr += 2; } -void atk27_decrement_multihit(void) +static void atk27_decrement_multihit(void) { if (--gMultiHitCounter == 0) gBattlescriptCurrInstr += 5; @@ -3895,16 +3936,16 @@ void atk27_decrement_multihit(void) gBattlescriptCurrInstr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); } -void atk28_goto(void) +static void atk28_goto(void) { gBattlescriptCurrInstr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); } -void atk29_jumpifbyte(void) +static void atk29_jumpifbyte(void) { - u8 caseID = BSScriptRead8(gBattlescriptCurrInstr + 1); + u8 caseID = gBattlescriptCurrInstr[1]; const u8* memByte = BS2ScriptReadPtr(gBattlescriptCurrInstr + 2); - u8 value = BSScriptRead8(gBattlescriptCurrInstr + 6); + u8 value = gBattlescriptCurrInstr[6]; const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 7); gBattlescriptCurrInstr += 11; @@ -3938,9 +3979,9 @@ void atk29_jumpifbyte(void) } } -void atk2A_jumpifhalfword(void) +static void atk2A_jumpifhalfword(void) { - u8 caseID = BSScriptRead8(gBattlescriptCurrInstr + 1); + u8 caseID = gBattlescriptCurrInstr[1]; const u16* memHword = BS2ScriptReadPtr(gBattlescriptCurrInstr + 2); u16 value = BS2ScriptRead16(gBattlescriptCurrInstr + 6); const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 8); @@ -3976,9 +4017,9 @@ void atk2A_jumpifhalfword(void) } } -void atk2B_jumpifword(void) +static void atk2B_jumpifword(void) { - u8 caseID = BSScriptRead8(gBattlescriptCurrInstr + 1); + u8 caseID = gBattlescriptCurrInstr[1]; const u32* memWord = BS2ScriptReadPtr(gBattlescriptCurrInstr + 2); u32 value = BSScriptRead32(gBattlescriptCurrInstr + 6); const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 10); @@ -4014,11 +4055,11 @@ void atk2B_jumpifword(void) } } -void atk2C_jumpifarrayequal(void) +static void atk2C_jumpifarrayequal(void) { const u8* mem1 = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); const u8* mem2 = BS2ScriptReadPtr(gBattlescriptCurrInstr + 5); - u32 size = BSScriptRead8(gBattlescriptCurrInstr + 9); + u32 size = gBattlescriptCurrInstr[9]; const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 10); u8 i; @@ -4036,12 +4077,12 @@ void atk2C_jumpifarrayequal(void) gBattlescriptCurrInstr = jumpPtr; } -void atk2D_jumpifarraynotequal(void) +static void atk2D_jumpifarraynotequal(void) { u8 equalBytes = 0; const u8* mem1 = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); const u8* mem2 = BS2ScriptReadPtr(gBattlescriptCurrInstr + 5); - u32 size = BSScriptRead8(gBattlescriptCurrInstr + 9); + u32 size = gBattlescriptCurrInstr[9]; const u8* jumpPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 10); u8 i; @@ -4060,33 +4101,33 @@ void atk2D_jumpifarraynotequal(void) gBattlescriptCurrInstr += 14; } -void atk2E_setbyte(void) +static void atk2E_setbyte(void) { u8* memByte = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); - *memByte = BSScriptRead8(gBattlescriptCurrInstr + 5); + *memByte = gBattlescriptCurrInstr[5]; gBattlescriptCurrInstr += 6; } -void atk2F_addbyte(void) +static void atk2F_addbyte(void) { u8* memByte = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); - *memByte += BSScriptRead8(gBattlescriptCurrInstr + 5); + *memByte += gBattlescriptCurrInstr[5]; gBattlescriptCurrInstr += 6; } -void atk30_subbyte(void) +static void atk30_subbyte(void) { u8* memByte = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); - *memByte -= BSScriptRead8(gBattlescriptCurrInstr + 5); + *memByte -= gBattlescriptCurrInstr[5]; gBattlescriptCurrInstr += 6; } -void atk31_copyarray(void) +static void atk31_copyarray(void) { u8* dest = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); const u8* src = BS2ScriptReadPtr(gBattlescriptCurrInstr + 5); - s32 size = BSScriptRead8(gBattlescriptCurrInstr + 9); + s32 size = gBattlescriptCurrInstr[9]; s32 i; for (i = 0; i < size; i++) @@ -4097,12 +4138,12 @@ void atk31_copyarray(void) gBattlescriptCurrInstr += 10; } -void atk32_copyarray_withindex(void) +static void atk32_copyarray_withindex(void) { u8* dest = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); const u8* src = BS2ScriptReadPtr(gBattlescriptCurrInstr + 5); const u8* index = BS2ScriptReadPtr(gBattlescriptCurrInstr + 9); - s32 size = BSScriptRead8(gBattlescriptCurrInstr + 13); + s32 size = gBattlescriptCurrInstr[13]; s32 i; for (i = 0; i < size; i++) @@ -4113,14 +4154,14 @@ void atk32_copyarray_withindex(void) gBattlescriptCurrInstr += 14; } -void atk33_orbyte(void) +static void atk33_orbyte(void) { u8* memByte = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); - *memByte |= BSScriptRead8(gBattlescriptCurrInstr + 5); + *memByte |= gBattlescriptCurrInstr[5]; gBattlescriptCurrInstr += 6; } -void atk34_orhalfword(void) +static void atk34_orhalfword(void) { u16* memHword = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); u16 val = BS2ScriptRead16(gBattlescriptCurrInstr + 5); @@ -4129,7 +4170,7 @@ void atk34_orhalfword(void) gBattlescriptCurrInstr += 7; } -void atk35_orword(void) +static void atk35_orword(void) { u32* memWord = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); u32 val = BS2ScriptRead32(gBattlescriptCurrInstr + 5); @@ -4138,14 +4179,14 @@ void atk35_orword(void) gBattlescriptCurrInstr += 9; } -void atk36_bicbyte(void) +static void atk36_bicbyte(void) { u8* memByte = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); - *memByte &= ~(BSScriptRead8(gBattlescriptCurrInstr + 5)); + *memByte &= ~(gBattlescriptCurrInstr[5]); gBattlescriptCurrInstr += 6; } -void atk37_bichalfword(void) +static void atk37_bichalfword(void) { u16* memHword = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); u16 val = BS2ScriptRead16(gBattlescriptCurrInstr + 5); @@ -4154,7 +4195,7 @@ void atk37_bichalfword(void) gBattlescriptCurrInstr += 7; } -void atk38_bicword(void) +static void atk38_bicword(void) { u32* memWord = BS2ScriptReadPtr(gBattlescriptCurrInstr + 1); u32 val = BS2ScriptRead32(gBattlescriptCurrInstr + 5); @@ -4163,7 +4204,7 @@ void atk38_bicword(void) gBattlescriptCurrInstr += 9; } -void atk39_pause(void) +static void atk39_pause(void) { if (gBattleExecBuffer == 0) { @@ -4176,15 +4217,15 @@ void atk39_pause(void) } } -void atk3A_waitstate(void) +static void atk3A_waitstate(void) { if (gBattleExecBuffer == 0) gBattlescriptCurrInstr++; } -void atk3B_healthbar_update(void) +static void atk3B_healthbar_update(void) { - if (BSScriptRead8(gBattlescriptCurrInstr + 1) == BS_GET_TARGET) + if (gBattlescriptCurrInstr[1] == BS_GET_TARGET) gActiveBank = gBankTarget; else gActiveBank = gBankAttacker; @@ -4194,12 +4235,12 @@ void atk3B_healthbar_update(void) gBattlescriptCurrInstr += 2; } -void atk3C_return(void) +static void atk3C_return(void) { BattleScriptPop(); } -void atk3D_end(void) +static void atk3D_end(void) { if (gBattleTypeFlags & BATTLE_TYPE_ARENA) sub_81A5718(gBankAttacker); @@ -4209,13 +4250,13 @@ void atk3D_end(void) gFightStateTracker = 0xB; } -void atk3E_end2(void) +static void atk3E_end2(void) { gActiveBank = 0; gFightStateTracker = 0xB; } -void atk3F_end3(void) // pops the main function stack +static void atk3F_end3(void) // pops the main function stack { BattleScriptPop(); if (BATTLE_CALLBACKS_STACK->size) @@ -4223,40 +4264,40 @@ void atk3F_end3(void) // pops the main function stack gBattleMainFunc = BATTLE_CALLBACKS_STACK->function[BATTLE_CALLBACKS_STACK->size]; } -void atk41_call(void) +static void atk41_call(void) { BattleScriptPush(gBattlescriptCurrInstr + 5); gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); } -void atk42_jumpiftype2(void) +static void atk42_jumpiftype2(void) { - u8 bank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + u8 bank = GetBattleBank(gBattlescriptCurrInstr[1]); - if (BSScriptRead8(gBattlescriptCurrInstr + 2) == gBattleMons[bank].type1 || BSScriptRead8(gBattlescriptCurrInstr + 2) == gBattleMons[bank].type2) + if (gBattlescriptCurrInstr[2] == gBattleMons[bank].type1 || gBattlescriptCurrInstr[2] == gBattleMons[bank].type2) gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 3); else gBattlescriptCurrInstr += 7; } -void atk43_jumpifabilitypresent(void) +static void atk43_jumpifabilitypresent(void) { - if (AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, BSScriptRead8(gBattlescriptCurrInstr + 1), 0, 0)) + if (AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, gBattlescriptCurrInstr[1], 0, 0)) gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); else gBattlescriptCurrInstr += 6; } -void atk44(void) +static void atk44(void) { *(gBankAttacker + gBattleStruct->field_54) = 1; } -void atk45_playanimation(void) +static void atk45_playanimation(void) { const u16* argumentPtr; - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); argumentPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 3); if (gBattlescriptCurrInstr[2] == B_ANIM_STATS_CHANGE @@ -4293,12 +4334,12 @@ void atk45_playanimation(void) } } -void atk46_playanimation2(void) // animation Id is stored in the first pointer +static void atk46_playanimation2(void) // animation Id is stored in the first pointer { const u16* argumentPtr; const u8* animationIdPtr; - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); animationIdPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 2); argumentPtr = BS2ScriptReadPtr(gBattlescriptCurrInstr + 6); @@ -4335,7 +4376,7 @@ void atk46_playanimation2(void) // animation Id is stored in the first pointer } } -void atk47_setgraphicalstatchangevalues(void) +static void atk47_setgraphicalstatchangevalues(void) { u8 value = 0; switch (gBattleScripting.statChanger & 0xF0) @@ -4359,7 +4400,7 @@ void atk47_setgraphicalstatchangevalues(void) } #ifdef NONMATCHING -void atk48_playstatchangeanimation(void) +static void atk48_playstatchangeanimation(void) { u32 currStat = 0; s16 statAnimId = 0; @@ -4450,7 +4491,7 @@ void atk48_playstatchangeanimation(void) } #else __attribute__((naked)) -void atk48_playstatchangeanimation(void) +static void atk48_playstatchangeanimation(void) { asm("\n\ .syntax unified\n\ @@ -4706,7 +4747,7 @@ _0804BBBA:\n\ #define ATK49_LAST_CASE 17 -void atk49_moveend(void) +static void atk49_moveend(void) { s32 i; bool32 effect; @@ -4992,7 +5033,7 @@ void atk49_moveend(void) gBattlescriptCurrInstr += 3; } -void atk4A_typecalc2(void) +static void atk4A_typecalc2(void) { u8 flags = 0; s32 i = 0; @@ -5087,7 +5128,7 @@ void atk4A_typecalc2(void) gBattlescriptCurrInstr++; } -void atk4B_return_atk_to_ball(void) +static void atk4B_return_atk_to_ball(void) { gActiveBank = gBankAttacker; if (!(gHitMarker & HITMARKER_FAINTED(gActiveBank))) @@ -5098,12 +5139,12 @@ void atk4B_return_atk_to_ball(void) gBattlescriptCurrInstr++; } -void atk4C_copy_poke_data(void) +static void atk4C_copy_poke_data(void) { if (gBattleExecBuffer) return; - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); gBattlePartyID[gActiveBank] = *(gBattleStruct->field_5C + gActiveBank); @@ -5113,7 +5154,7 @@ void atk4C_copy_poke_data(void) gBattlescriptCurrInstr += 2; } -void atk4D_switch_data_update(void) +static void atk4D_switch_data_update(void) { struct BattlePokemon oldData; s32 i; @@ -5122,7 +5163,7 @@ void atk4D_switch_data_update(void) if (gBattleExecBuffer) return; - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); oldData = gBattleMons[gActiveBank]; monData = (u8*)(&gBattleMons[gActiveBank]); @@ -5169,12 +5210,12 @@ void atk4D_switch_data_update(void) gBattlescriptCurrInstr += 2; } -void atk4E_switchin_anim(void) +static void atk4E_switchin_anim(void) { if (gBattleExecBuffer) return; - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); if (GetBankSide(gActiveBank) == SIDE_OPPONENT && !(gBattleTypeFlags & (BATTLE_TYPE_LINK @@ -5195,7 +5236,7 @@ void atk4E_switchin_anim(void) sub_81A56B4(); } -void atk4F_jump_if_cannot_switch(void) +static void atk4F_jump_if_cannot_switch(void) { s32 val = 0; s32 compareVar = 0; @@ -5349,7 +5390,7 @@ void atk4F_jump_if_cannot_switch(void) } } -void sub_804CF10(u8 arg0) +static void sub_804CF10(u8 arg0) { *(gBattleStruct->field_58 + gActiveBank) = gBattlePartyID[gActiveBank]; *(gBattleStruct->field_5C + gActiveBank) = 6; @@ -5359,7 +5400,7 @@ void sub_804CF10(u8 arg0) MarkBufferBankForExecution(gActiveBank); } -void atk50_openpartyscreen(void) +static void atk50_openpartyscreen(void) { u32 flags; u8 hitmarkerFaintBits; @@ -5649,15 +5690,15 @@ void atk50_openpartyscreen(void) } } -void atk51_switch_handle_order(void) +static void atk51_switch_handle_order(void) { s32 i; if (gBattleExecBuffer) return; - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); - switch (BSScriptRead8(gBattlescriptCurrInstr + 2)) + switch (gBattlescriptCurrInstr[2]) { case 0: for (i = 0; i < gNoOfAllBanks; i++) @@ -5716,11 +5757,11 @@ void atk51_switch_handle_order(void) gBattlescriptCurrInstr += 3; } -void atk52_switch_in_effects(void) +static void atk52_switch_in_effects(void) { s32 i; - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); sub_803FA70(gActiveBank); gHitMarker &= ~(HITMARKER_FAINTED(gActiveBank)); @@ -5747,9 +5788,9 @@ void atk52_switch_in_effects(void) gBattleScripting.bank = gActiveBank; BattleScriptPushCursor(); - if (BSScriptRead8(gBattlescriptCurrInstr + 1) == 0) + if (gBattlescriptCurrInstr[1] == 0) gBattlescriptCurrInstr = gUnknown_082DAE90; - else if (BSScriptRead8(gBattlescriptCurrInstr + 1) == 1) + else if (gBattlescriptCurrInstr[1] == 1) gBattlescriptCurrInstr = gUnknown_082DAE59; else gBattlescriptCurrInstr = gUnknown_082DAEC7; @@ -5778,7 +5819,7 @@ void atk52_switch_in_effects(void) *hpOnSwitchout = gBattleMons[i].hp; } - if (BSScriptRead8(gBattlescriptCurrInstr + 1) == 5) + if (gBattlescriptCurrInstr[1] == 5) { u32 hitmarkerFaintBits = gHitMarker >> 0x1C; @@ -5797,7 +5838,7 @@ void atk52_switch_in_effects(void) } } -void atk53_trainer_slide(void) +static void atk53_trainer_slide(void) { gActiveBank = GetBankByIdentity(gBattlescriptCurrInstr[1]); EmitTrainerSlide(0); @@ -5806,7 +5847,7 @@ void atk53_trainer_slide(void) gBattlescriptCurrInstr += 2; } -void atk54_effectiveness_sound(void) +static void atk54_effectiveness_sound(void) { gActiveBank = gBankAttacker; EmitEffectivenessSound(0, BS2ScriptRead16(gBattlescriptCurrInstr + 1)); @@ -5815,7 +5856,7 @@ void atk54_effectiveness_sound(void) gBattlescriptCurrInstr += 3; } -void atk55_play_sound(void) +static void atk55_play_sound(void) { gActiveBank = gBankAttacker; EmitPlaySound(0, BS2ScriptRead16(gBattlescriptCurrInstr + 1), 0); @@ -5824,16 +5865,16 @@ void atk55_play_sound(void) gBattlescriptCurrInstr += 3; } -void atk56_fainting_cry(void) +static void atk56_fainting_cry(void) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); EmitFaintingCry(0); MarkBufferBankForExecution(gActiveBank); gBattlescriptCurrInstr += 2; } -void atk57(void) +static void atk57(void) { gActiveBank = GetBankByIdentity(0); Emit_x37(0, gBattleOutcome); @@ -5842,21 +5883,21 @@ void atk57(void) gBattlescriptCurrInstr += 1; } -void atk58_return_to_ball(void) +static void atk58_return_to_ball(void) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); EmitReturnPokeToBall(0, 1); MarkBufferBankForExecution(gActiveBank); gBattlescriptCurrInstr += 2; } -void atk59_learnmove_inbattle(void) +static void atk59_learnmove_inbattle(void) { const u8* jumpPtr1 = BSScriptReadPtr(gBattlescriptCurrInstr + 1); const u8* jumpPtr2 = BSScriptReadPtr(gBattlescriptCurrInstr + 5); - u16 ret = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterId], BSScriptRead8(gBattlescriptCurrInstr + 9)); + u16 ret = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterId], gBattlescriptCurrInstr[9]); while (ret == 0xFFFE) ret = MonTryLearningNewMove(&gPlayerParty[gBattleStruct->expGetterId], 0); @@ -5891,7 +5932,7 @@ void atk59_learnmove_inbattle(void) } } -void atk5A_yesnoboxlearnmove(void) +static void atk5A_yesnoboxlearnmove(void) { gActiveBank = 0; @@ -6010,7 +6051,7 @@ void atk5A_yesnoboxlearnmove(void) } } -void atk5B_yesnoboxstoplearningmove(void) +static void atk5B_yesnoboxstoplearningmove(void) { switch (gBattleScripting.learnMoveState) { @@ -6057,9 +6098,9 @@ void atk5B_yesnoboxstoplearningmove(void) } } -void atk5C_hitanimation(void) +static void atk5C_hitanimation(void) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); if (gBattleMoveFlags & MOVESTATUS_NOEFFECT) { @@ -6134,7 +6175,7 @@ static u32 GetTrainerMoneyToGive(u16 trainerId) return moneyReward; } -void atk5D_getmoneyreward(void) +static void atk5D_getmoneyreward(void) { u32 moneyReward = GetTrainerMoneyToGive(gTrainerBattleOpponent_A); if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) @@ -6147,9 +6188,9 @@ void atk5D_getmoneyreward(void) gBattlescriptCurrInstr++; } -void atk5E_8025A70(void) +static void atk5E_8025A70(void) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); switch (gBattleCommunication[0]) { @@ -6174,7 +6215,7 @@ void atk5E_8025A70(void) } } -void atk5F_8025B24(void) +static void atk5F_8025B24(void) { gActiveBank = gBankAttacker; gBankAttacker = gBankTarget; @@ -6188,15 +6229,15 @@ void atk5F_8025B24(void) gBattlescriptCurrInstr++; } -void atk60_increment_gamestat(void) +static void atk60_increment_gamestat(void) { if (GetBankSide(gBankAttacker) == SIDE_PLAYER) - IncrementGameStat(BSScriptRead8(gBattlescriptCurrInstr + 1)); + IncrementGameStat(gBattlescriptCurrInstr[1]); gBattlescriptCurrInstr += 2; } -void atk61_8025BA4(void) +static void atk61_8025BA4(void) { s32 i; struct Pokemon* party; @@ -6205,7 +6246,7 @@ void atk61_8025BA4(void) if (gBattleExecBuffer) return; - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); if (GetBankSide(gActiveBank) == SIDE_PLAYER) party = gPlayerParty; @@ -6233,18 +6274,18 @@ void atk61_8025BA4(void) gBattlescriptCurrInstr += 2; } -void atk62_08025C6C(void) +static void atk62_08025C6C(void) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); EmitCmd49(0); MarkBufferBankForExecution(gActiveBank); gBattlescriptCurrInstr += 2; } -void atk63_jumptorandomattack(void) +static void atk63_jumptorandomattack(void) { - if (BSScriptRead8(gBattlescriptCurrInstr + 1) != 0) + if (gBattlescriptCurrInstr[1] != 0) gCurrentMove = gRandomMove; else gLastUsedMove = gCurrentMove = gRandomMove; @@ -6252,11 +6293,11 @@ void atk63_jumptorandomattack(void) gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; } -void atk64_statusanimation(void) +static void atk64_statusanimation(void) { if (gBattleExecBuffer == 0) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); if (!(gStatuses3[gActiveBank] & STATUS3_SEMI_INVULNERABLE) && gDisableStructs[gActiveBank].substituteHP == 0 && !(gHitMarker & HITMARKER_NO_ANIMATIONS)) @@ -6268,13 +6309,13 @@ void atk64_statusanimation(void) } } -void atk65_status2animation(void) +static void atk65_status2animation(void) { u32 wantedToAnimate; if (gBattleExecBuffer == 0) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); wantedToAnimate = BSScriptRead32(gBattlescriptCurrInstr + 2); if (!(gStatuses3[gActiveBank] & STATUS3_SEMI_INVULNERABLE) && gDisableStructs[gActiveBank].substituteHP == 0 @@ -6287,26 +6328,26 @@ void atk65_status2animation(void) } } -void atk66_chosenstatusanimation(void) +static void atk66_chosenstatusanimation(void) { u32 wantedStatus; if (gBattleExecBuffer == 0) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); wantedStatus = BSScriptRead32(gBattlescriptCurrInstr + 3); if (!(gStatuses3[gActiveBank] & STATUS3_SEMI_INVULNERABLE) && gDisableStructs[gActiveBank].substituteHP == 0 && !(gHitMarker & HITMARKER_NO_ANIMATIONS)) { - EmitStatusAnimation(0, BSScriptRead8(gBattlescriptCurrInstr + 2), wantedStatus); + EmitStatusAnimation(0, gBattlescriptCurrInstr[2], wantedStatus); MarkBufferBankForExecution(gActiveBank); } gBattlescriptCurrInstr += 7; } } -void atk67_yesnobox(void) +static void atk67_yesnobox(void) { switch (gBattleCommunication[0]) { @@ -6349,7 +6390,7 @@ void atk67_yesnobox(void) } } -void atk68_80246A0(void) +static void atk68_80246A0(void) { s32 i; @@ -6359,7 +6400,7 @@ void atk68_80246A0(void) gBattlescriptCurrInstr++; } -void atk69_dmg_adjustment3(void) // The same as 0x7, except there's no random damage multiplier. +static void atk69_dmg_adjustment3(void) // The same as 0x7, except there's no random damage multiplier. { u8 holdEffect, quality; @@ -6405,11 +6446,11 @@ void atk69_dmg_adjustment3(void) // The same as 0x7, except there's no random da gBattlescriptCurrInstr++; } -void atk6A_removeitem(void) +static void atk6A_removeitem(void) { u16* usedHeldItem; - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); usedHeldItem = &gBattleStruct->usedHeldItems[gActiveBank]; *usedHeldItem = gBattleMons[gActiveBank].item; @@ -6421,19 +6462,14 @@ void atk6A_removeitem(void) gBattlescriptCurrInstr += 2; } -void atk6B_atknameinbuff1(void) +static void atk6B_atknameinbuff1(void) { PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gBankAttacker, gBattlePartyID[gBankAttacker]) gBattlescriptCurrInstr++; } -extern u16 gBattle_BG1_X; -extern u16 gBattle_BG1_Y; -extern u16 gBattle_BG2_X; -extern u16 gBattle_BG2_Y; - -void atk6C_draw_lvlupbox(void) +static void atk6C_draw_lvlupbox(void) { if (gBattleScripting.atk6C_state == 0) { @@ -6525,7 +6561,7 @@ void atk6C_draw_lvlupbox(void) } } -void sub_804F100(void) +static void sub_804F100(void) { struct StatsArray currentStats; @@ -6533,7 +6569,7 @@ void sub_804F100(void) sub_81D3640(0xD, gBattleResources->statsBeforeLvlUp, ¤tStats, 0xE, 0xD, 0xF); } -void sub_804F144(void) +static void sub_804F144(void) { struct StatsArray currentStats; @@ -6541,10 +6577,7 @@ void sub_804F144(void) sub_81D3784(0xD, ¤tStats, 0xE, 0xD, 0xF); } -extern const u16 gUnknown_0831C2C8[]; -extern const u8 gUnknown_0831C2E8[]; - -void sub_804F17C(void) +static void sub_804F17C(void) { gBattle_BG2_Y = 0; gBattle_BG2_X = 0x1A0; @@ -6557,7 +6590,7 @@ void sub_804F17C(void) PutMonIconOnLvlUpBox(); } -bool8 sub_804F1CC(void) +static bool8 sub_804F1CC(void) { if (IsDma3ManagerBusyWithBgCopy()) return TRUE; @@ -6575,7 +6608,7 @@ bool8 sub_804F1CC(void) return (gBattle_BG2_X != 0x200); } -void PutLevelAndGenderOnLvlUpBox(void) +static void PutLevelAndGenderOnLvlUpBox(void) { u16 monLevel; u8 monGender; @@ -6638,7 +6671,7 @@ void PutLevelAndGenderOnLvlUpBox(void) CopyWindowToVram(14, 2); } -bool8 sub_804F344(void) +static bool8 sub_804F344(void) { if (gBattle_BG2_X == 0x1A0) return FALSE; @@ -6656,7 +6689,7 @@ bool8 sub_804F344(void) #define sDestroy data0 #define sSavedLvlUpBoxXPosition data1 -void PutMonIconOnLvlUpBox(void) +static void PutMonIconOnLvlUpBox(void) { u8 spriteId; const u16* iconPal; @@ -6702,7 +6735,7 @@ void SpriteCB_MonIconOnLvlUpBox(struct Sprite* sprite) #undef sDestroy #undef sSavedLvlUpBoxXPosition -bool32 IsMonGettingExpSentOut(void) +static bool32 IsMonGettingExpSentOut(void) { if (gBattlePartyID[0] == gBattleStruct->expGetterId) return TRUE; @@ -6712,30 +6745,30 @@ bool32 IsMonGettingExpSentOut(void) return FALSE; } -void atk6D_reset_sentpokes_value(void) +static void atk6D_reset_sentpokes_value(void) { ResetSentPokesToOpponentValue(); gBattlescriptCurrInstr++; } -void atk6E_set_atk_to_player0(void) +static void atk6E_set_atk_to_player0(void) { gBankAttacker = GetBankByIdentity(0); gBattlescriptCurrInstr++; } -void atk6F_set_visible(void) +static void atk6F_set_visible(void) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); EmitSpriteInvisibility(0, FALSE); MarkBufferBankForExecution(gActiveBank); gBattlescriptCurrInstr += 2; } -void atk70_record_last_used_ability(void) +static void atk70_record_last_used_ability(void) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); RecordAbilityBattle(gActiveBank, gLastUsedAbility); gBattlescriptCurrInstr += 1; // UB: Should be + 2, one byte for command and one byte for bank argument. } @@ -6745,13 +6778,13 @@ void BufferMoveToLearnIntoBattleTextBuff2(void) PREPARE_MOVE_BUFFER(gBattleTextBuff2, gMoveToLearn); } -void atk71_buffer_move_to_learn(void) +static void atk71_buffer_move_to_learn(void) { BufferMoveToLearnIntoBattleTextBuff2(); gBattlescriptCurrInstr++; } -void atk72_jump_if_can_run_frombattle(void) +static void atk72_jump_if_can_run_frombattle(void) { if (CanRunFromBattle(gBank1)) gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); @@ -6759,14 +6792,14 @@ void atk72_jump_if_can_run_frombattle(void) gBattlescriptCurrInstr += 5; } -void atk73_hp_thresholds(void) +static void atk73_hp_thresholds(void) { u8 opposingBank; s32 result; if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); opposingBank = gActiveBank ^ BIT_SIDE; result = gBattleMons[opposingBank].hp * 100 / gBattleMons[opposingBank].maxHP; @@ -6786,7 +6819,7 @@ void atk73_hp_thresholds(void) gBattlescriptCurrInstr += 2; } -void atk74_hp_thresholds2(void) +static void atk74_hp_thresholds2(void) { u8 opposingBank; s32 result; @@ -6794,7 +6827,7 @@ void atk74_hp_thresholds2(void) if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); opposingBank = gActiveBank ^ BIT_SIDE; hpSwitchout = *(gBattleStruct->hpOnSwitchout + GetBankSide(opposingBank)); result = (hpSwitchout - gBattleMons[opposingBank].hp) * 100 / hpSwitchout; @@ -6812,7 +6845,7 @@ void atk74_hp_thresholds2(void) gBattlescriptCurrInstr += 2; } -void atk75_item_effect_on_opponent(void) +static void atk75_item_effect_on_opponent(void) { gBankInMenu = gBankAttacker; ExecuteTableBasedItemEffect(&gEnemyParty[gBattlePartyID[gBankAttacker]], gLastUsedItem, gBattlePartyID[gBankAttacker], 0, 1); @@ -6820,10 +6853,7 @@ void atk75_item_effect_on_opponent(void) gBattlescriptCurrInstr += 1; } -extern const u8 gUnknown_0831C4F8[]; -extern const u8* const gRefereeStringsTable[]; - -void atk76_various(void) +static void atk76_various(void) { u8 side; s32 i; @@ -7002,7 +7032,7 @@ void atk76_various(void) gBattlescriptCurrInstr += 3; } -void atk77_set_protect_like(void) // protect and endure +static void atk77_set_protect_like(void) // protect and endure { bool8 notLastTurn = TRUE; u16 lastMove = gUnknown_02024260[gBankAttacker]; @@ -7037,7 +7067,7 @@ void atk77_set_protect_like(void) // protect and endure gBattlescriptCurrInstr++; } -void atk78_faintifabilitynotdamp(void) +static void atk78_faintifabilitynotdamp(void) { if (gBattleExecBuffer) return; @@ -7072,7 +7102,7 @@ void atk78_faintifabilitynotdamp(void) } } -void atk79_setatkhptozero(void) +static void atk79_setatkhptozero(void) { if (gBattleExecBuffer) return; @@ -7085,7 +7115,7 @@ void atk79_setatkhptozero(void) gBattlescriptCurrInstr++; } -void atk7A_jumpwhiletargetvalid(void) // Used by intimidate to loop through all targets. +static void atk7A_jumpwhiletargetvalid(void) // Used by intimidate to loop through all targets. { const u8* jumpPtr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); @@ -7108,11 +7138,11 @@ void atk7A_jumpwhiletargetvalid(void) // Used by intimidate to loop through all gBattlescriptCurrInstr += 5; } -void atk7B_healhalfHP_if_possible(void) +static void atk7B_healhalfHP_if_possible(void) { const u8* failPtr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); - if (BSScriptRead8(gBattlescriptCurrInstr + 5) == BS_GET_ATTACKER) + if (gBattlescriptCurrInstr[5] == BS_GET_ATTACKER) gBankTarget = gBankAttacker; gBattleMoveDamage = gBattleMons[gBankTarget].maxHP / 2; @@ -7126,7 +7156,7 @@ void atk7B_healhalfHP_if_possible(void) gBattlescriptCurrInstr += 6; } -void atk7C_trymirrormove(void) +static void atk7C_trymirrormove(void) { s32 validMovesCount; s32 i; @@ -7176,7 +7206,7 @@ void atk7C_trymirrormove(void) } } -void atk7D_set_rain(void) +static void atk7D_set_rain(void) { if (gBattleWeather & WEATHER_RAIN_ANY) { @@ -7192,7 +7222,7 @@ void atk7D_set_rain(void) gBattlescriptCurrInstr++; } -void atk7E_setreflect(void) +static void atk7E_setreflect(void) { if (gSideAffecting[GET_BANK_SIDE(gBankAttacker)] & SIDE_STATUS_REFLECT) { @@ -7213,7 +7243,7 @@ void atk7E_setreflect(void) gBattlescriptCurrInstr++; } -void atk7F_setseeded(void) +static void atk7F_setseeded(void) { if (gBattleMoveFlags & MOVESTATUS_NOEFFECT || gStatuses3[gBankTarget] & STATUS3_LEECHSEED) { @@ -7235,9 +7265,9 @@ void atk7F_setseeded(void) gBattlescriptCurrInstr++; } -void atk80_manipulatedamage(void) +static void atk80_manipulatedamage(void) { - switch (BSScriptRead8(gBattlescriptCurrInstr + 1)) + switch (gBattlescriptCurrInstr[1]) { case ATK80_DMG_CHANGE_SIGN: gBattleMoveDamage *= -1; @@ -7257,7 +7287,7 @@ void atk80_manipulatedamage(void) gBattlescriptCurrInstr += 2; } -void atk81_setrest(void) +static void atk81_setrest(void) { const u8* failJump = BSScriptReadPtr(gBattlescriptCurrInstr + 1); gActiveBank = gBankTarget = gBankAttacker; @@ -7281,7 +7311,7 @@ void atk81_setrest(void) } } -void atk82_jumpifnotfirstturn(void) +static void atk82_jumpifnotfirstturn(void) { const u8* failJump = BSScriptReadPtr(gBattlescriptCurrInstr + 1); @@ -7291,7 +7321,7 @@ void atk82_jumpifnotfirstturn(void) gBattlescriptCurrInstr = failJump; } -void atk83_nop(void) +static void atk83_nop(void) { gBattlescriptCurrInstr++; } @@ -7323,7 +7353,7 @@ bool8 UproarWakeUpCheck(u8 bank) return TRUE; } -void atk84_jump_if_cant_sleep(void) +static void atk84_jump_if_cant_sleep(void) { const u8* jumpPtr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); @@ -7345,7 +7375,7 @@ void atk84_jump_if_cant_sleep(void) } } -void atk85_stockpile(void) +static void atk85_stockpile(void) { if (gDisableStructs[gBankAttacker].stockpileCounter == 3) { @@ -7363,7 +7393,7 @@ void atk85_stockpile(void) gBattlescriptCurrInstr++; } -void atk86_stockpiletobasedamage(void) +static void atk86_stockpiletobasedamage(void) { const u8* jumpPtr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); if (gDisableStructs[gBankAttacker].stockpileCounter == 0) @@ -7389,7 +7419,7 @@ void atk86_stockpiletobasedamage(void) } } -void atk87_stockpiletohpheal(void) +static void atk87_stockpiletohpheal(void) { const u8* jumpPtr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); @@ -7420,7 +7450,7 @@ void atk87_stockpiletohpheal(void) } } -void atk88_negativedamage(void) +static void atk88_negativedamage(void) { gBattleMoveDamage = -(gHpDealt / 2); if (gBattleMoveDamage == 0) @@ -7429,7 +7459,7 @@ void atk88_negativedamage(void) gBattlescriptCurrInstr++; } -u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8* BS_ptr) +static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8* BS_ptr) { bool8 certain = 0; bool8 notProtectAffected = FALSE; @@ -7599,14 +7629,14 @@ u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8* BS_ptr) return STAT_CHANGE_WORKED; } -void atk89_statbuffchange(void) +static void atk89_statbuffchange(void) { const u8* jumpPtr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); - if (ChangeStatBuffs(gBattleScripting.statChanger & 0xF0, GET_STAT_BUFF_ID(gBattleScripting.statChanger), BSScriptRead8(gBattlescriptCurrInstr + 1), jumpPtr) == STAT_CHANGE_WORKED) + if (ChangeStatBuffs(gBattleScripting.statChanger & 0xF0, GET_STAT_BUFF_ID(gBattleScripting.statChanger), gBattlescriptCurrInstr[1], jumpPtr) == STAT_CHANGE_WORKED) gBattlescriptCurrInstr += 6; } -void atk8A_normalisebuffs(void) // haze +static void atk8A_normalisebuffs(void) // haze { s32 i, j; @@ -7619,7 +7649,7 @@ void atk8A_normalisebuffs(void) // haze gBattlescriptCurrInstr++; } -void atk8B_setbide(void) +static void atk8B_setbide(void) { gBattleMons[gBankAttacker].status2 |= STATUS2_MULTIPLETURNS; gLockedMoves[gBankAttacker] = gCurrentMove; @@ -7629,7 +7659,7 @@ void atk8B_setbide(void) gBattlescriptCurrInstr++; } -void atk8C_confuseifrepeatingattackends(void) +static void atk8C_confuseifrepeatingattackends(void) { if (!(gBattleMons[gBankAttacker].status2 & STATUS2_LOCK_CONFUSE)) gBattleCommunication[MOVE_EFFECT_BYTE] = (MOVE_EFFECT_THRASH | MOVE_EFFECT_AFFECTS_USER); @@ -7637,11 +7667,11 @@ void atk8C_confuseifrepeatingattackends(void) gBattlescriptCurrInstr++; } -void atk8D_setmultihit_counter(void) +static void atk8D_setmultihit_counter(void) { - if (BSScriptRead8(gBattlescriptCurrInstr + 1)) + if (gBattlescriptCurrInstr[1]) { - gMultiHitCounter = BSScriptRead8(gBattlescriptCurrInstr + 1); + gMultiHitCounter = gBattlescriptCurrInstr[1]; } else { @@ -7655,14 +7685,14 @@ void atk8D_setmultihit_counter(void) gBattlescriptCurrInstr += 2; } -void atk8E_init_multihit_string(void) +static void atk8E_init_multihit_string(void) { PREPARE_BYTE_NUMBER_BUFFER(gBattleScripting.multihitString, 1, 0) gBattlescriptCurrInstr++; } -bool8 sub_8051064(void) +static bool8 sub_8051064(void) { if (gBattleMons[gBankAttacker].level >= gBattleMons[gBankTarget].level) { @@ -7683,7 +7713,7 @@ bool8 sub_8051064(void) return TRUE; } -void atk8F_forcerandomswitch(void) +static void atk8F_forcerandomswitch(void) { s32 i; s32 bank1PartyId = 0; @@ -7844,7 +7874,7 @@ void atk8F_forcerandomswitch(void) } } -void atk90_conversion_type_change(void) // randomly changes user's type to one of its moves' type +static void atk90_conversion_type_change(void) // randomly changes user's type to one of its moves' type { u8 validMoves = 0; u8 moveChecked; @@ -7908,7 +7938,7 @@ void atk90_conversion_type_change(void) // randomly changes user's type to one o } } -void atk91_givepaydaymoney(void) +static void atk91_givepaydaymoney(void) { if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) && gPaydayMoney != 0) { @@ -7926,7 +7956,7 @@ void atk91_givepaydaymoney(void) } } -void atk92_setlightscreen(void) +static void atk92_setlightscreen(void) { if (gSideAffecting[GET_BANK_SIDE(gBankAttacker)] & SIDE_STATUS_LIGHTSCREEN) { @@ -7948,7 +7978,7 @@ void atk92_setlightscreen(void) gBattlescriptCurrInstr++; } -void atk93_ko_move(void) +static void atk93_ko_move(void) { u8 holdEffect, param; @@ -8034,7 +8064,7 @@ void atk93_ko_move(void) } } -void atk94_damagetohalftargethp(void) // super fang +static void atk94_damagetohalftargethp(void) // super fang { gBattleMoveDamage = gBattleMons[gBankTarget].hp / 2; if (gBattleMoveDamage == 0) @@ -8043,7 +8073,7 @@ void atk94_damagetohalftargethp(void) // super fang gBattlescriptCurrInstr++; } -void atk95_setsandstorm(void) +static void atk95_setsandstorm(void) { if (gBattleWeather & WEATHER_SANDSTORM_ANY) { @@ -8059,7 +8089,7 @@ void atk95_setsandstorm(void) gBattlescriptCurrInstr++; } -void atk96_weatherdamage(void) +static void atk96_weatherdamage(void) { if (WEATHER_HAS_EFFECT) { @@ -8112,7 +8142,7 @@ void atk96_weatherdamage(void) gBattlescriptCurrInstr++; } -void atk97_try_infatuation(void) +static void atk97_try_infatuation(void) { struct Pokemon *monAttacker, *monTarget; u16 speciesAttacker, speciesTarget; @@ -8157,14 +8187,14 @@ void atk97_try_infatuation(void) } } -void atk98_status_icon_update(void) +static void atk98_status_icon_update(void) { if (gBattleExecBuffer) return; - if (BSScriptRead8(gBattlescriptCurrInstr + 1) != BS_ATTACKER_WITH_PARTNER) + if (gBattlescriptCurrInstr[1] != BS_ATTACKER_WITH_PARTNER) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); EmitStatusIconUpdate(0, gBattleMons[gActiveBank].status1, gBattleMons[gActiveBank].status2); MarkBufferBankForExecution(gActiveBank); gBattlescriptCurrInstr += 2; @@ -8190,7 +8220,7 @@ void atk98_status_icon_update(void) } } -void atk99_setmist(void) +static void atk99_setmist(void) { if (gSideTimers[GET_BANK_SIDE(gBankAttacker)].mistTimer) { @@ -8207,7 +8237,7 @@ void atk99_setmist(void) gBattlescriptCurrInstr++; } -void atk9A_set_focusenergy(void) +static void atk9A_set_focusenergy(void) { if (gBattleMons[gBankAttacker].status2 & STATUS2_FOCUS_ENERGY) { @@ -8222,7 +8252,7 @@ void atk9A_set_focusenergy(void) gBattlescriptCurrInstr++; } -void atk9B_transformdataexecution(void) +static void atk9B_transformdataexecution(void) { gLastUsedMove = 0xFFFF; gBattlescriptCurrInstr++; @@ -8266,7 +8296,7 @@ void atk9B_transformdataexecution(void) } } -void atk9C_set_substitute(void) +static void atk9C_set_substitute(void) { u32 hp = gBattleMons[gBankAttacker].maxHP / 4; if (gBattleMons[gBankAttacker].maxHP / 4 == 0) @@ -8293,11 +8323,6 @@ void atk9C_set_substitute(void) gBattlescriptCurrInstr++; } -extern const u16 gMovesForbiddenToCopy[]; -#define MIMIC_FORBIDDEN_END 0xFFFE -#define METRONOME_FORBIDDEN_END 0xFFFF -#define ASSIST_FORBIDDEN_END 0xFFFF - static bool8 IsMoveUncopyableByMimic(u16 move) { s32 i; @@ -8307,7 +8332,7 @@ static bool8 IsMoveUncopyableByMimic(u16 move) return (gMovesForbiddenToCopy[i] != MIMIC_FORBIDDEN_END); } -void atk9D_mimicattackcopy(void) +static void atk9D_mimicattackcopy(void) { gLastUsedMove = 0xFFFF; @@ -8350,7 +8375,7 @@ void atk9D_mimicattackcopy(void) } #ifdef NONMATCHING -void atk9E_metronome(void) +static void atk9E_metronome(void) { while (1) { @@ -8382,7 +8407,7 @@ void atk9E_metronome(void) #else __attribute__((naked)) -void atk9E_metronome(void) +static void atk9E_metronome(void) { asm( "\n\ @@ -8459,13 +8484,13 @@ _0805251C:\n\ #endif // NONMATCHING -void atk9F_dmgtolevel(void) +static void atk9F_dmgtolevel(void) { gBattleMoveDamage = gBattleMons[gBankAttacker].level; gBattlescriptCurrInstr++; } -void atkA0_psywavedamageeffect(void) +static void atkA0_psywavedamageeffect(void) { s32 randDamage; @@ -8476,7 +8501,7 @@ void atkA0_psywavedamageeffect(void) gBattlescriptCurrInstr++; } -void atkA1_counterdamagecalculator(void) +static void atkA1_counterdamagecalculator(void) { u8 sideAttacker = GetBankSide(gBankAttacker); u8 sideTarget = GetBankSide(gProtectStructs[gBankAttacker].physicalBank); @@ -8501,7 +8526,7 @@ void atkA1_counterdamagecalculator(void) } } -void atkA2_mirrorcoatdamagecalculator(void) // a copy of atkA1 with the physical -> special field changes +static void atkA2_mirrorcoatdamagecalculator(void) // a copy of atkA1 with the physical -> special field changes { u8 sideAttacker = GetBankSide(gBankAttacker); u8 sideTarget = GetBankSide(gProtectStructs[gBankAttacker].specialBank); @@ -8524,7 +8549,7 @@ void atkA2_mirrorcoatdamagecalculator(void) // a copy of atkA1 with the physical } } -void atkA3_disablelastusedattack(void) +static void atkA3_disablelastusedattack(void) { s32 i; @@ -8549,7 +8574,7 @@ void atkA3_disablelastusedattack(void) } } -void atkA4_setencore(void) +static void atkA4_setencore(void) { s32 i; @@ -8581,7 +8606,7 @@ void atkA4_setencore(void) } } -void atkA5_painsplitdmgcalc(void) +static void atkA5_painsplitdmgcalc(void) { if (!(gBattleMons[gBankTarget].status2 & STATUS2_SUBSTITUTE)) { @@ -8606,7 +8631,7 @@ void atkA5_painsplitdmgcalc(void) } #ifdef NONMATCHING -void atkA6_settypetorandomresistance(void) // conversion 2 +static void atkA6_settypetorandomresistance(void) // conversion 2 { if (gUnknown_02024250[gBankAttacker] == 0 || gUnknown_02024250[gBankAttacker] == 0xFFFF) @@ -8673,7 +8698,7 @@ void atkA6_settypetorandomresistance(void) // conversion 2 #else __attribute__((naked)) -void atkA6_settypetorandomresistance(void) // conversion 2 +static void atkA6_settypetorandomresistance(void) // conversion 2 { asm(".syntax unified\n\ push {r4-r7,lr}\n\ @@ -8912,7 +8937,7 @@ _08052D08:\n\ } #endif // NONMATCHING -void atkA7_setalwayshitflag(void) +static void atkA7_setalwayshitflag(void) { gStatuses3[gBankTarget] &= ~(STATUS3_ALWAYS_HITS); gStatuses3[gBankTarget] |= 0x10; @@ -8920,7 +8945,7 @@ void atkA7_setalwayshitflag(void) gBattlescriptCurrInstr++; } -void atkA8_copymovepermanently(void) // sketch +static void atkA8_copymovepermanently(void) // sketch { gLastUsedMove = 0xFFFF; @@ -8973,7 +8998,7 @@ void atkA8_copymovepermanently(void) // sketch } } -bool8 IsTwoTurnsMove(u16 move) +static bool8 IsTwoTurnsMove(u16 move) { if (gBattleMoves[move].effect == EFFECT_SKULL_BASH || gBattleMoves[move].effect == EFFECT_RAZOR_WIND @@ -8995,7 +9020,7 @@ static bool8 IsInvalidForSleepTalkOrAssist(u16 move) return FALSE; } -u8 AttacksThisTurn(u8 bank, u16 move) // Note: returns 1 if it's a charging turn, otherwise 2 +static u8 AttacksThisTurn(u8 bank, u16 move) // Note: returns 1 if it's a charging turn, otherwise 2 { // first argument is unused if (gBattleMoves[move].effect == EFFECT_SOLARBEAM @@ -9015,7 +9040,7 @@ u8 AttacksThisTurn(u8 bank, u16 move) // Note: returns 1 if it's a charging turn return 2; } -void atkA9_sleeptalk_choose_move(void) +static void atkA9_sleeptalk_choose_move(void) { s32 i; u8 unusableMovesBits = 0; @@ -9054,13 +9079,13 @@ void atkA9_sleeptalk_choose_move(void) } } -void atkAA_set_destinybond(void) +static void atkAA_set_destinybond(void) { gBattleMons[gBankAttacker].status2 |= STATUS2_DESTINY_BOND; gBattlescriptCurrInstr++; } -void DestinyBondFlagUpdate(void) +static void DestinyBondFlagUpdate(void) { u8 sideAttacker = GetBankSide(gBankAttacker); u8 sideTarget = GetBankSide(gBankTarget); @@ -9072,15 +9097,13 @@ void DestinyBondFlagUpdate(void) } } -void atkAB_DestinyBondFlagUpdate(void) +static void atkAB_DestinyBondFlagUpdate(void) { DestinyBondFlagUpdate(); gBattlescriptCurrInstr++; } -extern const u8 sFlailHpScaleToPowerTable[12]; - -void atkAC_remaininghptopower(void) +static void atkAC_remaininghptopower(void) { s32 i; s32 hpFraction = GetScaledHPFraction(gBattleMons[gBankAttacker].hp, gBattleMons[gBankAttacker].maxHP, 48); @@ -9095,7 +9118,7 @@ void atkAC_remaininghptopower(void) gBattlescriptCurrInstr++; } -void atkAD_spite_ppreduce(void) +static void atkAD_spite_ppreduce(void) { if (gLastUsedMovesByBanks[gBankTarget] != 0 && gLastUsedMovesByBanks[gBankTarget] != 0xFFFF) @@ -9146,7 +9169,7 @@ void atkAD_spite_ppreduce(void) } } -void atkAE_heal_party_status(void) +static void atkAE_heal_party_status(void) { u32 zero = 0; u8 toHeal = 0; @@ -9242,7 +9265,7 @@ void atkAE_heal_party_status(void) gBattlescriptCurrInstr++; } -void atkAF_cursetarget(void) +static void atkAF_cursetarget(void) { if (gBattleMons[gBankTarget].status2 & STATUS2_CURSED) { @@ -9259,7 +9282,7 @@ void atkAF_cursetarget(void) } } -void atkB0_set_spikes(void) +static void atkB0_set_spikes(void) { u8 targetSide = GetBankSide(gBankAttacker) ^ BIT_SIDE; @@ -9276,13 +9299,13 @@ void atkB0_set_spikes(void) } } -void atkB1_set_foresight(void) +static void atkB1_set_foresight(void) { gBattleMons[gBankTarget].status2 |= STATUS2_FORESIGHT; gBattlescriptCurrInstr++; } -void atkB2_setperishsong(void) +static void atkB2_setperishsong(void) { s32 i; s32 notAffectedCount = 0; @@ -9310,7 +9333,7 @@ void atkB2_setperishsong(void) gBattlescriptCurrInstr += 5; } -void atkB3_rolloutdamagecalculation(void) +static void atkB3_rolloutdamagecalculation(void) { if (gBattleMoveFlags & MOVESTATUS_NOEFFECT) { @@ -9345,7 +9368,7 @@ void atkB3_rolloutdamagecalculation(void) } } -void atkB4_jumpifconfusedandstatmaxed(void) +static void atkB4_jumpifconfusedandstatmaxed(void) { if (gBattleMons[gBankTarget].status2 & STATUS2_CONFUSION && gBattleMons[gBankTarget].statStages[gBattlescriptCurrInstr[1]] == 0xC) @@ -9354,7 +9377,7 @@ void atkB4_jumpifconfusedandstatmaxed(void) gBattlescriptCurrInstr += 6; } -void atkB5_furycuttercalc(void) +static void atkB5_furycuttercalc(void) { if (gBattleMoveFlags & MOVESTATUS_NOEFFECT) { @@ -9377,7 +9400,7 @@ void atkB5_furycuttercalc(void) } } -void atkB6_happinesstodamagecalculation(void) +static void atkB6_happinesstodamagecalculation(void) { if (gBattleMoves[gCurrentMove].effect == EFFECT_RETURN) gDynamicBasePower = 10 * (gBattleMons[gBankAttacker].friendship) / 25; @@ -9387,11 +9410,7 @@ void atkB6_happinesstodamagecalculation(void) gBattlescriptCurrInstr++; } -extern const u8 BattleScript_PresentDamageTarget[]; -extern const u8 BattleScript_AlreadyAtFullHp[]; -extern const u8 BattleScript_PresentHealTarget[]; - -void atkB7_presentdamagecalculation(void) +static void atkB7_presentdamagecalculation(void) { s32 rand = Random() & 0xFF; @@ -9419,7 +9438,7 @@ void atkB7_presentdamagecalculation(void) } } -void atkB8_set_safeguard(void) +static void atkB8_set_safeguard(void) { if (gSideAffecting[GET_BANK_SIDE(gBankAttacker)] & SIDE_STATUS_SAFEGUARD) { @@ -9437,7 +9456,7 @@ void atkB8_set_safeguard(void) gBattlescriptCurrInstr++; } -void atkB9_magnitudedamagecalculation(void) +static void atkB9_magnitudedamagecalculation(void) { s32 magnitude = Random() % 100; @@ -9491,7 +9510,7 @@ void atkB9_magnitudedamagecalculation(void) gBattlescriptCurrInstr++; } -void atkBA_jumpifnopursuitswitchdmg(void) +static void atkBA_jumpifnopursuitswitchdmg(void) { if (gMultiHitCounter == 1) { @@ -9535,7 +9554,7 @@ void atkBA_jumpifnopursuitswitchdmg(void) } } -void atkBB_setsunny(void) +static void atkBB_setsunny(void) { if (gBattleWeather & WEATHER_SUN_ANY) { @@ -9552,7 +9571,7 @@ void atkBB_setsunny(void) gBattlescriptCurrInstr++; } -void atkBC_maxattackhalvehp(void) // belly drum +static void atkBC_maxattackhalvehp(void) // belly drum { u32 halfHp = gBattleMons[gBankAttacker].maxHP / 2; @@ -9575,7 +9594,7 @@ void atkBC_maxattackhalvehp(void) // belly drum } } -void atkBD_copyfoestats(void) // psych up +static void atkBD_copyfoestats(void) // psych up { s32 i; @@ -9587,11 +9606,7 @@ void atkBD_copyfoestats(void) // psych up gBattlescriptCurrInstr += 5; // Has an unused jump ptr(possibly for a failed attempt) parameter. } -extern const u8 BattleScript_WrapFree[]; -extern const u8 BattleScript_LeechSeedFree[]; -extern const u8 BattleScript_SpikesFree[]; - -void atkBE_rapidspinfree(void) +static void atkBE_rapidspinfree(void) { if (gBattleMons[gBankAttacker].status2 & STATUS2_WRAPPED) { @@ -9628,13 +9643,13 @@ void atkBE_rapidspinfree(void) } } -void atkBF_set_defense_curl(void) +static void atkBF_set_defense_curl(void) { gBattleMons[gBankAttacker].status2 |= STATUS2_DEFENSE_CURL; gBattlescriptCurrInstr++; } -void atkC0_recoverbasedonsunlight(void) +static void atkC0_recoverbasedonsunlight(void) { gBankTarget = gBankAttacker; @@ -9660,7 +9675,7 @@ void atkC0_recoverbasedonsunlight(void) } #ifdef NONMATCHING -void atkC1_hidden_power(void) +static void atkC1_hidden_power(void) { s32 powerBits; s32 typeBits; @@ -9691,7 +9706,7 @@ void atkC1_hidden_power(void) #else __attribute__((naked)) -void atkC1_hidden_power(void) +static void atkC1_hidden_power(void) { asm(".syntax unified\n\ push {r4-r7,lr}\n\ @@ -9834,7 +9849,7 @@ _080544F0:\n\ } #endif // NONMATCHING -void atkC2_selectnexttarget(void) +static void atkC2_selectnexttarget(void) { for (gBankTarget = 0; gBankTarget < gNoOfAllBanks; gBankTarget++) { @@ -9846,7 +9861,7 @@ void atkC2_selectnexttarget(void) gBattlescriptCurrInstr++; } -void atkC3_setfutureattack(void) +static void atkC3_setfutureattack(void) { if (gWishFutureKnock.futureSightCounter[gBankTarget] != 0) { @@ -9874,7 +9889,7 @@ void atkC3_setfutureattack(void) } } -void atkC4_beat_up(void) +static void atkC4_beat_up(void) { struct Pokemon* party; @@ -9921,7 +9936,7 @@ void atkC4_beat_up(void) } } -void atkC5_setsemiinvulnerablebit(void) +static void atkC5_setsemiinvulnerablebit(void) { switch (gCurrentMove) { @@ -9940,7 +9955,7 @@ void atkC5_setsemiinvulnerablebit(void) gBattlescriptCurrInstr++; } -void atkC6_clearsemiinvulnerablebit(void) +static void atkC6_clearsemiinvulnerablebit(void) { switch (gCurrentMove) { @@ -9959,7 +9974,7 @@ void atkC6_clearsemiinvulnerablebit(void) gBattlescriptCurrInstr++; } -void atkC7_setminimize(void) +static void atkC7_setminimize(void) { if (gHitMarker & HITMARKER_OBEYS) gStatuses3[gBankAttacker] |= STATUS3_MINIMIZED; @@ -9967,7 +9982,7 @@ void atkC7_setminimize(void) gBattlescriptCurrInstr++; } -void atkC8_sethail(void) +static void atkC8_sethail(void) { if (gBattleWeather & WEATHER_HAIL_ANY) { @@ -9984,7 +9999,7 @@ void atkC8_sethail(void) gBattlescriptCurrInstr++; } -void atkC9_jumpifattackandspecialattackcannotfall(void) // memento +static void atkC9_jumpifattackandspecialattackcannotfall(void) // memento { if (gBattleMons[gBankTarget].statStages[STAT_STAGE_ATK] == 0 && gBattleMons[gBankTarget].statStages[STAT_STAGE_SPATK] == 0 @@ -10002,14 +10017,14 @@ void atkC9_jumpifattackandspecialattackcannotfall(void) // memento } } -void atkCA_setforcedtarget(void) // follow me +static void atkCA_setforcedtarget(void) // follow me { gSideTimers[GetBankSide(gBankAttacker)].followmeTimer = 1; gSideTimers[GetBankSide(gBankAttacker)].followmeTarget = gBankAttacker; gBattlescriptCurrInstr++; } -void atkCB_setcharge(void) +static void atkCB_setcharge(void) { gStatuses3[gBankAttacker] |= STATUS3_CHARGED_UP; gDisableStructs[gBankAttacker].chargeTimer1 = 2; @@ -10017,7 +10032,7 @@ void atkCB_setcharge(void) gBattlescriptCurrInstr++; } -void atkCC_callterrainattack(void) // nature power +static void atkCC_callterrainattack(void) // nature power { gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); gCurrentMove = sNaturePowerMoves[gBattleTerrain]; @@ -10026,7 +10041,7 @@ void atkCC_callterrainattack(void) // nature power gBattlescriptCurrInstr++; } -void atkCD_cureifburnedparalysedorpoisoned(void) // refresh +static void atkCD_cureifburnedparalysedorpoisoned(void) // refresh { if (gBattleMons[gBankAttacker].status1 & (STATUS_POISON | STATUS_BURN | STATUS_PARALYSIS | STATUS_TOXIC_POISON)) { @@ -10042,7 +10057,7 @@ void atkCD_cureifburnedparalysedorpoisoned(void) // refresh } } -void atkCE_settorment(void) +static void atkCE_settorment(void) { if (gBattleMons[gBankTarget].status2 & STATUS2_TORMENT) { @@ -10055,7 +10070,7 @@ void atkCE_settorment(void) } } -void atkCF_jumpifnodamage(void) +static void atkCF_jumpifnodamage(void) { if (gProtectStructs[gBankAttacker].physicalDmg || gProtectStructs[gBankAttacker].specialDmg) gBattlescriptCurrInstr += 5; @@ -10063,7 +10078,7 @@ void atkCF_jumpifnodamage(void) gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); } -void atkD0_settaunt(void) +static void atkD0_settaunt(void) { if (gDisableStructs[gBankTarget].tauntTimer1 == 0) { @@ -10077,7 +10092,7 @@ void atkD0_settaunt(void) } } -void atkD1_set_helpinghand(void) +static void atkD1_set_helpinghand(void) { gBankTarget = GetBankByIdentity(GetBankIdentity(gBankAttacker) ^ BIT_MON); @@ -10095,7 +10110,7 @@ void atkD1_set_helpinghand(void) } } -void atkD2_swap_items(void) // trick +static void atkD2_swap_items(void) // trick { // opponent can't swap items with player in regular battles if (gBattleTypeFlags & BATTLE_TYPE_x4000000 @@ -10182,7 +10197,7 @@ void atkD2_swap_items(void) // trick } } -void atkD3_copy_ability(void) // role play +static void atkD3_copy_ability(void) // role play { if (gBattleMons[gBankTarget].ability != 0 && gBattleMons[gBankTarget].ability != ABILITY_WONDER_GUARD) @@ -10197,9 +10212,9 @@ void atkD3_copy_ability(void) // role play } } -void atkD4_wish_effect(void) +static void atkD4_wish_effect(void) { - switch (BSScriptRead8(gBattlescriptCurrInstr + 1)) + switch (gBattlescriptCurrInstr[1]) { case 0: // use wish if (gWishFutureKnock.wishCounter[gBankAttacker] == 0) @@ -10230,7 +10245,7 @@ void atkD4_wish_effect(void) } } -void atkD5_setroots(void) // ingrain +static void atkD5_setroots(void) // ingrain { if (gStatuses3[gBankAttacker] & STATUS3_ROOTED) { @@ -10243,7 +10258,7 @@ void atkD5_setroots(void) // ingrain } } -void atkD6_doubledamagedealtifdamaged(void) +static void atkD6_doubledamagedealtifdamaged(void) { if ((gProtectStructs[gBankAttacker].physicalDmg && gProtectStructs[gBankAttacker].physicalBank == gBankTarget) @@ -10256,7 +10271,7 @@ void atkD6_doubledamagedealtifdamaged(void) gBattlescriptCurrInstr++; } -void atkD7_setyawn(void) +static void atkD7_setyawn(void) { if (gStatuses3[gBankTarget] & STATUS3_YAWN || gBattleMons[gBankTarget].status1 & STATUS_ANY) @@ -10270,7 +10285,7 @@ void atkD7_setyawn(void) } } -void atkD8_setdamagetohealthdifference(void) +static void atkD8_setdamagetohealthdifference(void) { if (gBattleMons[gBankTarget].hp <= gBattleMons[gBankAttacker].hp) { @@ -10283,7 +10298,7 @@ void atkD8_setdamagetohealthdifference(void) } } -void atkD9_scaledamagebyhealthratio(void) +static void atkD9_scaledamagebyhealthratio(void) { if (gDynamicBasePower == 0) { @@ -10295,7 +10310,7 @@ void atkD9_scaledamagebyhealthratio(void) gBattlescriptCurrInstr++; } -void atkDA_abilityswap(void) // skill swap +static void atkDA_abilityswap(void) // skill swap { if ((gBattleMons[gBankAttacker].ability == 0 && gBattleMons[gBankTarget].ability == 0) @@ -10315,7 +10330,7 @@ void atkDA_abilityswap(void) // skill swap } } -void atkDB_imprisoneffect(void) +static void atkDB_imprisoneffect(void) { if ((gStatuses3[gBankAttacker] & STATUS3_IMPRISONED_OTHERS)) { @@ -10357,7 +10372,7 @@ void atkDB_imprisoneffect(void) } } -void atkDC_setgrudge(void) +static void atkDC_setgrudge(void) { if (gStatuses3[gBankAttacker] & STATUS3_GRUDGE) { @@ -10370,7 +10385,7 @@ void atkDC_setgrudge(void) } } -void atkDD_weightdamagecalculation(void) +static void atkDD_weightdamagecalculation(void) { s32 i; for (i = 0; sWeightToDamageTable[i] != 0xFFFF; i += 2) @@ -10387,7 +10402,7 @@ void atkDD_weightdamagecalculation(void) gBattlescriptCurrInstr++; } -void atkDE_asistattackselect(void) +static void atkDE_asistattackselect(void) { s32 chooseableMovesNo = 0; struct Pokemon* party; @@ -10440,7 +10455,7 @@ void atkDE_asistattackselect(void) } } -void atkDF_setmagiccoat(void) +static void atkDF_setmagiccoat(void) { gBankTarget = gBankAttacker; gSpecialStatuses[gBankAttacker].flag20 = 1; @@ -10455,7 +10470,7 @@ void atkDF_setmagiccoat(void) } } -void atkE0_setstealstatchange(void) // snatch +static void atkE0_setstealstatchange(void) // snatch { gSpecialStatuses[gBankAttacker].flag20 = 1; if (gCurrentMoveTurn == gNoOfAllBanks - 1) // moves last turn @@ -10469,7 +10484,7 @@ void atkE0_setstealstatchange(void) // snatch } } -void atkE1_intimidate_string_loader(void) +static void atkE1_intimidate_string_loader(void) { u8 side; @@ -10492,9 +10507,9 @@ void atkE1_intimidate_string_loader(void) gBattlescriptCurrInstr += 5; } -void atkE2_switchout_abilities(void) +static void atkE2_switchout_abilities(void) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); switch (gBattleMons[gActiveBank].ability) { @@ -10508,9 +10523,9 @@ void atkE2_switchout_abilities(void) gBattlescriptCurrInstr += 2; } -void atkE3_jumpifhasnohp(void) +static void atkE3_jumpifhasnohp(void) { - gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); if (gBattleMons[gActiveBank].hp == 0) gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 2); @@ -10518,7 +10533,7 @@ void atkE3_jumpifhasnohp(void) gBattlescriptCurrInstr += 6; } -void atkE4_getsecretpowereffect(void) +static void atkE4_getsecretpowereffect(void) { switch (gBattleTerrain) { @@ -10553,15 +10568,7 @@ void atkE4_getsecretpowereffect(void) gBattlescriptCurrInstr++; } -extern bool8 InBattlePike(void); -extern bool8 InBattlePyramid(void); -extern u16 GetBattlePyramidPickupItemId(void); - -extern const u16 gRarePickupItems[]; -extern const u16 gPickupItems[]; -extern const u8 gPickupProbabilities[]; - -void atkE5_pickup(void) +static void atkE5_pickup(void) { if (!InBattlePike()) { @@ -10636,3 +10643,600 @@ void atkE5_pickup(void) gBattlescriptCurrInstr++; } + +static void atkE6_castform_change_animation(void) +{ + gActiveBank = gBattleScripting.bank; + + if (gBattleMons[gActiveBank].status2 & STATUS2_SUBSTITUTE) + *(&gBattleStruct->formToChangeInto) |= 0x80; + + EmitBattleAnimation(0, B_ANIM_CASTFORM_CHANGE, gBattleStruct->formToChangeInto); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr++; +} + +static void atkE7_castform_data_change(void) +{ + u8 form; + + gBattlescriptCurrInstr++; + form = CastformDataTypeChange(gBattleScripting.bank); + if (form) + { + BattleScriptPushCursorAndCallback(BattleScript_CastformChange); + *(&gBattleStruct->formToChangeInto) = form - 1; + } +} + +static void atkE8_settypebasedhalvers(void) // water and mud sport +{ + bool8 worked = FALSE; + + if (gBattleMoves[gCurrentMove].effect == EFFECT_MUD_SPORT) + { + if (!(gStatuses3[gBankAttacker] & STATUS3_MUDSPORT)) + { + gStatuses3[gBankAttacker] |= STATUS3_MUDSPORT; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + worked = TRUE; + } + } + else // water sport + { + if (!(gStatuses3[gBankAttacker] & STATUS3_WATERSPORT)) + { + gStatuses3[gBankAttacker] |= STATUS3_WATERSPORT; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + worked = TRUE; + } + } + + if (worked) + gBattlescriptCurrInstr += 5; + else + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); +} + +static void atkE9_setweatherballtype(void) +{ + if (WEATHER_HAS_EFFECT) + { + if (gBattleWeather & WEATHER_ANY) + gBattleScripting.dmgMultiplier = 2; + if (gBattleWeather & WEATHER_RAIN_ANY) + *(&gBattleStruct->dynamicMoveType) = TYPE_WATER | 0x80; + else if (gBattleWeather & WEATHER_SANDSTORM_ANY) + *(&gBattleStruct->dynamicMoveType) = TYPE_ROCK | 0x80; + else if (gBattleWeather & WEATHER_SUN_ANY) + *(&gBattleStruct->dynamicMoveType) = TYPE_FIRE | 0x80; + else if (gBattleWeather & WEATHER_HAIL_ANY) + *(&gBattleStruct->dynamicMoveType) = TYPE_ICE | 0x80; + else + *(&gBattleStruct->dynamicMoveType) = TYPE_NORMAL | 0x80; + } + + gBattlescriptCurrInstr++; +} + +static void atkEA_recycleitem(void) +{ + u16 *usedHeldItem; + + gActiveBank = gBankAttacker; + usedHeldItem = &gBattleStruct->usedHeldItems[gActiveBank]; + if (*usedHeldItem != 0 && gBattleMons[gActiveBank].item == 0) + { + gLastUsedItem = *usedHeldItem; + *usedHeldItem = 0; + gBattleMons[gActiveBank].item = gLastUsedItem; + + EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gActiveBank].item); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 5; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +static void atkEB_settypetoterrain(void) +{ + if (gBattleMons[gBankAttacker].type1 != sTerrainToType[gBattleTerrain] + && gBattleMons[gBankAttacker].type2 != sTerrainToType[gBattleTerrain]) + { + gBattleMons[gBankAttacker].type1 = sTerrainToType[gBattleTerrain]; + gBattleMons[gBankAttacker].type2 = sTerrainToType[gBattleTerrain]; + + PREPARE_TYPE_BUFFER(gBattleTextBuff1, sTerrainToType[gBattleTerrain]) + + gBattlescriptCurrInstr += 5; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +static void atkEC_pursuit_sth(void) +{ + gActiveBank = GetBankByIdentity(GetBankIdentity(gBankAttacker) ^ BIT_MON); + + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE + && !(gAbsentBankFlags & gBitTable[gActiveBank]) + && gActionForBanks[gActiveBank] == 0 + && gChosenMovesByBanks[gActiveBank] == MOVE_PURSUIT) + { + gUnknown_0202407A[gActiveBank] = 11; + gCurrentMove = MOVE_PURSUIT; + gBattlescriptCurrInstr += 5; + gBattleScripting.animTurn = 1; + gBattleScripting.field_20 = gBankAttacker; + gBankAttacker = gActiveBank; + } + else + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } +} + +static void atkED_802B4B4(void) +{ + gEffectBank = gBankAttacker; + + if (gBankAttacker == gBankTarget) + gBankAttacker = gBankTarget = gBattleScripting.bank; + else + gBankTarget = gBattleScripting.bank; + + gBattleScripting.bank = gEffectBank; + gBattlescriptCurrInstr++; +} + +static void atkEE_removelightscreenreflect(void) // brick break +{ + u8 opposingSide = GetBankSide(gBankAttacker) ^ BIT_SIDE; + + if (gSideTimers[opposingSide].reflectTimer || gSideTimers[opposingSide].lightscreenTimer) + { + gSideAffecting[opposingSide] &= ~(SIDE_STATUS_REFLECT); + gSideAffecting[opposingSide] &= ~(SIDE_STATUS_LIGHTSCREEN); + gSideTimers[opposingSide].reflectTimer = 0; + gSideTimers[opposingSide].lightscreenTimer = 0; + gBattleScripting.animTurn = 1; + gBattleScripting.animTargetsHit = 1; + } + else + { + gBattleScripting.animTurn = 0; + gBattleScripting.animTargetsHit = 0; + } + + gBattlescriptCurrInstr++; +} + +static void atkEF_pokeball_catch_calculation(void) +{ + u8 ballMultiplier = 0; + + if (gBattleExecBuffer) + return; + + gActiveBank = gBankAttacker; + gBankTarget = gBankAttacker ^ BIT_SIDE; + + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) + { + EmitBallThrow(0, BALL_TRAINER_BLOCK); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr = BattleScript_TrainerBallBlock; + } + else if (gBattleTypeFlags & BATTLE_TYPE_WALLY_TUTORIAL) + { + EmitBallThrow(0, BALL_3_SHAKES_SUCCESS); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr = BattleScript_WallyBallThrow; + } + else + { + u32 odds; + u8 catchRate; + + if (gLastUsedItem == ITEM_SAFARI_BALL) + catchRate = gBattleStruct->field_7C * 1275 / 100; + else + catchRate = gBaseStats[gBattleMons[gBankTarget].species].catchRate; + + if (gLastUsedItem > ITEM_SAFARI_BALL) + { + switch (gLastUsedItem) + { + case ITEM_NET_BALL: + if (gBattleMons[gBankTarget].type1 == TYPE_WATER + || gBattleMons[gBankTarget].type2 == TYPE_WATER + || gBattleMons[gBankTarget].type1 == TYPE_BUG + || gBattleMons[gBankTarget].type2 == TYPE_BUG) + ballMultiplier = 30; + else + ballMultiplier = 10; + break; + case ITEM_DIVE_BALL: + if (sav1_map_get_light_level() == 5) + ballMultiplier = 35; + else + ballMultiplier = 10; + break; + case ITEM_NEST_BALL: + if (gBattleMons[gBankTarget].level <= 39) + { + ballMultiplier = 40 - gBattleMons[gBankTarget].level; + if (ballMultiplier <= 9) + ballMultiplier = 10; + } + else + { + ballMultiplier = 10; + } + break; + case ITEM_REPEAT_BALL: + if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gBankTarget].species), FLAG_GET_CAUGHT)) + ballMultiplier = 30; + else + ballMultiplier = 10; + break; + case ITEM_TIMER_BALL: + ballMultiplier = gBattleResults.battleTurnCounter + 10; + if (ballMultiplier > 40) + ballMultiplier = 40; + break; + case ITEM_LUXURY_BALL: + case ITEM_PREMIER_BALL: + ballMultiplier = 10; + break; + } + } + else + ballMultiplier = sBallCatchBonuses[gLastUsedItem - 2]; + + odds = (catchRate * ballMultiplier / 10) + * (gBattleMons[gBankTarget].maxHP * 3 - gBattleMons[gBankTarget].hp * 2) + / (3 * gBattleMons[gBankTarget].maxHP); + + if (gBattleMons[gBankTarget].status1 & (STATUS_SLEEP | STATUS_FREEZE)) + odds *= 2; + if (gBattleMons[gBankTarget].status1 & (STATUS_POISON | STATUS_BURN | STATUS_PARALYSIS | STATUS_TOXIC_POISON)) + odds = (odds * 15) / 10; + + if (gLastUsedItem != ITEM_SAFARI_BALL) + { + if (gLastUsedItem == ITEM_MASTER_BALL) + { + gBattleResults.unk5_1 = 1; + } + else + { + if (gBattleResults.catchAttempts[gLastUsedItem - ITEM_ULTRA_BALL] < 0xFF) + gBattleResults.catchAttempts[gLastUsedItem - ITEM_ULTRA_BALL]++; + } + } + + if (odds > 254) // mon caught + { + EmitBallThrow(0, BALL_3_SHAKES_SUCCESS); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; + SetMonData(&gEnemyParty[gBattlePartyID[gBankTarget]], MON_DATA_POKEBALL, &gLastUsedItem); + + if (CalculatePlayerPartyCount() == 6) + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + else // mon may be caught, calculate shakes + { + u8 shakes; + + odds = Sqrt(Sqrt(16711680 / odds)); + odds = 1048560 / odds; + + for (shakes = 0; shakes < 4 && Random() < odds; shakes++); + + if (gLastUsedItem == ITEM_MASTER_BALL) + shakes = BALL_3_SHAKES_SUCCESS; // why calculate the shakes before that check? + + EmitBallThrow(0, shakes); + MarkBufferBankForExecution(gActiveBank); + + if (shakes == BALL_3_SHAKES_SUCCESS) // mon caught, copy of the code above + { + gBattlescriptCurrInstr = BattleScript_SuccessBallThrow; + SetMonData(&gEnemyParty[gBattlePartyID[gBankTarget]], MON_DATA_POKEBALL, &gLastUsedItem); + + if (CalculatePlayerPartyCount() == 6) + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + else // not caught + { + gBattleCommunication[MULTISTRING_CHOOSER] = shakes; + gBattlescriptCurrInstr = BattleScript_ShakeBallThrow; + } + } + } +} + +static void atkF0_give_caught_mon(void) +{ + if (GiveMonToPlayer(&gEnemyParty[gBattlePartyID[gBankAttacker ^ BIT_SIDE]]) != MON_GIVEN_TO_PARTY) + { + if (!sub_813B21C()) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_STORAGE_UNKNOWN))); + GetMonData(&gEnemyParty[gBattlePartyID[gBankAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gStringVar2); + } + else + { + StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_STORAGE_UNKNOWN))); + GetMonData(&gEnemyParty[gBattlePartyID[gBankAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gStringVar2); + StringCopy(gStringVar3, GetBoxNamePtr(get_unknown_box_id())); + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + } + + if (FlagGet(SYS_PC_LANETTE)) + gBattleCommunication[MULTISTRING_CHOOSER]++; + } + + gBattleResults.caughtMonSpecies = GetMonData(&gEnemyParty[gBattlePartyID[gBankAttacker ^ BIT_SIDE]], MON_DATA_SPECIES, NULL); + GetMonData(&gEnemyParty[gBattlePartyID[gBankAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gBattleResults.caughtMonNick); + gBattleResults.caughtMonBall = GetMonData(&gEnemyParty[gBattlePartyID[gBankAttacker ^ BIT_SIDE]], MON_DATA_POKEBALL, NULL); + + gBattlescriptCurrInstr++; +} + +static void atkF1_set_caught_mon_dex_flags(void) +{ + u16 species = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL); + u32 personality = GetMonData(&gEnemyParty[0], MON_DATA_PERSONALITY, NULL); + + if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_CAUGHT)) + { + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + else + { + HandleSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_SET_CAUGHT, personality); + gBattlescriptCurrInstr += 5; + } +} + +static void atkF2_display_dex_info(void) +{ + u16 species = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL); + + switch (gBattleCommunication[0]) + { + case 0: + BeginNormalPaletteFade(-1, 0, 0, 0x10, 0); + gBattleCommunication[0]++; + break; + case 1: + if (!gPaletteFade.active) + { + FreeAllWindowBuffers(); + gBattleCommunication[TASK_ID] = CreateDexDisplayMonDataTask(SpeciesToNationalPokedexNum(species), + gBattleMons[gBankTarget].otId, + gBattleMons[gBankTarget].personality); + gBattleCommunication[0]++; + } + break; + case 2: + if (!gPaletteFade.active + && gMain.callback2 == BattleMainCB2 + && !gTasks[gBattleCommunication[TASK_ID]].isActive) + { + SetVBlankCallback(VBlankCB_Battle); + gBattleCommunication[0]++; + } + break; + case 3: + c2_berry_program_update_menu(); + sub_8035AA4(); + gBattle_BG3_X = 0x100; + gBattleCommunication[0]++; + break; + case 4: + if (!IsDma3ManagerBusyWithBgCopy()) + { + BeginNormalPaletteFade(0xFFFF, 0, 0x10, 0, 0); + ShowBg(0); + ShowBg(3); + gBattleCommunication[0]++; + } + break; + case 5: + if (!gPaletteFade.active) + gBattlescriptCurrInstr++; + break; + } +} + +void sub_8056A3C(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags) +{ + s32 destY, destX; + u16 var = 0; + + for (destY = yStart; destY <= yEnd; destY++) + { + for (destX = xStart; destX <= xEnd; destX++) + { + if (destY == yStart) + { + if (destX == xStart) + var = 0x1022; + else if (destX == xEnd) + var = 0x1024; + else + var = 0x1023; + } + else if (destY == yEnd) + { + if (destX == xStart) + var = 0x1028; + else if (destX == xEnd) + var = 0x102A; + else + var = 0x1029; + } + else + { + if (destX == xStart) + var = 0x1025; + else if (destX == xEnd) + var = 0x1027; + else + var = 0x1026; + } + + if (flags & 1) + var = 0; + + if (flags & 0x80) + CopyToBgTilemapBufferRect_ChangePalette(1, &var, destX, destY, 1, 1, 0x11); + else + CopyToBgTilemapBufferRect_ChangePalette(0, &var, destX, destY, 1, 1, 0x11); + } + } +} + +void BattleCreateCursorAt(u8 cursorPosition) +{ + u16 src[2]; + src[0] = 1; + src[1] = 2; + + CopyToBgTilemapBufferRect_ChangePalette(0, src, 0x19, 9 + (2 * cursorPosition), 1, 2, 0x11); + CopyBgTilemapBufferToVram(0); +} + +void BattleDestroyCursorAt(u8 cursorPosition) +{ + u16 src[2]; + src[0] = 0x1016; + src[1] = 0x1016; + + CopyToBgTilemapBufferRect_ChangePalette(0, src, 0x19, 9 + (2 * cursorPosition), 1, 2, 0x11); + CopyBgTilemapBufferToVram(0); +} + +static void atkF3_nickname_caught_poke(void) +{ + switch (gBattleCommunication[MULTIUSE_STATE]) + { + case 0: + sub_8056A3C(0x18, 8, 0x1D, 0xD, 0); + sub_814F9EC(gText_BattleYesNoChoice, 0xC); + gBattleCommunication[MULTIUSE_STATE]++; + gBattleCommunication[CURSOR_POSITION] = 0; + BattleCreateCursorAt(0); + break; + case 1: + if (gMain.newKeys & DPAD_UP && gBattleCommunication[CURSOR_POSITION] != 0) + { + PlaySE(SE_SELECT); + BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]); + gBattleCommunication[CURSOR_POSITION] = 0; + BattleCreateCursorAt(0); + } + if (gMain.newKeys & DPAD_DOWN && gBattleCommunication[CURSOR_POSITION] == 0) + { + PlaySE(SE_SELECT); + BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]); + gBattleCommunication[CURSOR_POSITION] = 1; + BattleCreateCursorAt(1); + } + if (gMain.newKeys & A_BUTTON) + { + PlaySE(SE_SELECT); + if (gBattleCommunication[CURSOR_POSITION] == 0) + { + gBattleCommunication[MULTIUSE_STATE]++; + BeginFastPaletteFade(3); + } + else + { + gBattleCommunication[MULTIUSE_STATE] = 4; + } + } + else if (gMain.newKeys & B_BUTTON) + { + PlaySE(SE_SELECT); + gBattleCommunication[MULTIUSE_STATE] = 4; + } + break; + case 2: + if (!gPaletteFade.active) + { + GetMonData(&gEnemyParty[gBattlePartyID[gBankAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gBattleStruct->caughtMonNick); + FreeAllWindowBuffers(); + + DoNamingScreen(NAMING_SCREEN_CAUGHT_MON, gBattleStruct->caughtMonNick, + GetMonData(&gEnemyParty[gBattlePartyID[gBankAttacker ^ BIT_SIDE]], MON_DATA_SPECIES), + GetMonGender(&gEnemyParty[gBattlePartyID[gBankAttacker ^ BIT_SIDE]]), + GetMonData(&gEnemyParty[gBattlePartyID[gBankAttacker ^ BIT_SIDE]], MON_DATA_PERSONALITY, NULL), + BattleMainCB2); + + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 3: + if (gMain.callback2 == BattleMainCB2 && !gPaletteFade.active ) + { + SetMonData(&gEnemyParty[gBattlePartyID[gBankAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gBattleStruct->caughtMonNick); + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + } + break; + case 4: + if (CalculatePlayerPartyCount() == 6) + gBattlescriptCurrInstr += 5; + else + gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); + break; + } +} + +static void atkF4_subattackerhpbydmg(void) +{ + gBattleMons[gBankAttacker].hp -= gBattleMoveDamage; + gBattlescriptCurrInstr++; +} + +static void atkF5_removeattackerstatus1(void) +{ + gBattleMons[gBankAttacker].status1 = 0; + gBattlescriptCurrInstr++; +} + +static void atkF6_802BF48(void) +{ + gFightStateTracker = 0xC; +} + +static void atkF7_802BF54(void) +{ + gFightStateTracker = 0xC; + gCurrentMoveTurn = gNoOfAllBanks; +} + +static void atkF8_trainer_slide_back(void) +{ + gActiveBank = GetBankByIdentity(gBattlescriptCurrInstr[1]); + EmitTrainerSlideBack(0); + MarkBufferBankForExecution(gActiveBank); + + gBattlescriptCurrInstr += 2; +} diff --git a/sym_ewram.txt b/sym_ewram.txt index 227f83385..fa655f5ea 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -223,7 +223,7 @@ gBattle_BG2_X: @ 2022E1C gBattle_BG2_Y: @ 2022E1E .space 0x2 -gUnknown_02022E20: @ 2022E20 +gBattle_BG3_X: @ 2022E20 .space 0x2 gUnknown_02022E22: @ 2022E22 From 7273b8f26277e3f9a1b562454e2e7f88e5523731 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 28 Sep 2017 16:51:24 +0200 Subject: [PATCH 306/342] battle 4 is all done --- data/battle_4.s | 30 ------------ include/battle.h | 2 + ld_script.txt | 1 - src/battle_4.c | 120 ++++++++++++++++++++++++++++------------------- 4 files changed, 74 insertions(+), 79 deletions(-) delete mode 100644 data/battle_4.s diff --git a/data/battle_4.s b/data/battle_4.s deleted file mode 100644 index 2831f212a..000000000 --- a/data/battle_4.s +++ /dev/null @@ -1,30 +0,0 @@ -@ the second big chunk of data - - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - - -gUnknown_0831C494:: @ 831C494 - .byte 0x3d, 0x44, 0x3d, 0x44, 0x14, 0x2d, 0x54, 0x5c - .byte 0x46, 0x55, 0x20, 0x5c, 0x26, 0x45, 0x46, 0x55 - .byte 0x14, 0x5a, 0x46, 0x5c, 0x1e, 0x32, 0x20, 0x5a - .byte 0x38, 0x4e, 0x38, 0x4e, 0x19, 0x28, 0x4b, 0x5a - .byte 0x45, 0x4b, 0x1c, 0x53, 0x23, 0x2d, 0x1d, 0x23 - .byte 0x3e, 0x48, 0x1e, 0x32, 0x3a, 0x5f, 0x58, 0x5e - .byte 0x22, 0x2d, 0x1d, 0x28, 0x23, 0x28, 0x23, 0x5f - .byte 0x38, 0x4e, 0x38, 0x4e, 0x23, 0x50, 0x22, 0x5e - .byte 0x2c, 0x5e, 0x22, 0x28, 0x38, 0x4e, 0x38, 0x4e - .byte 0x1e, 0x58, 0x1e, 0x58, 0x1e, 0x2b, 0x1b, 0x21 - .byte 0x28, 0x5a, 0x19, 0x57, 0x12, 0x58, 0x5a, 0x5f - .byte 0x58, 0x5e, 0x16, 0x2a, 0x2a, 0x5c, 0x2a, 0x2f - .byte 0x38, 0x4e, 0x38, 0x4e - - .align 2 -gUnknown_0831C4F8:: @ 831C4F8 - .byte 0x03, 0x00, 0x01, 0x00, 0x00, 0x01, 0x03, 0x00 - .byte 0x01, 0x02, 0x02, 0x00, 0x03, 0x01, 0x03, 0x01 - .byte 0x02, 0x03, 0x03, 0x02, 0x01, 0x00, 0x02, 0x02 - .byte 0x03, 0x00, 0x00, 0x00 - diff --git a/include/battle.h b/include/battle.h index 7b164caf4..158ae46b2 100644 --- a/include/battle.h +++ b/include/battle.h @@ -910,6 +910,8 @@ void BufferMoveToLearnIntoBattleTextBuff2(void); void sub_8056A3C(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags); bool8 UproarWakeUpCheck(u8 bank); +extern const u8 gUnknown_0831C494[]; + // battle_5 void AdjustFriendshipOnBattleFaint(u8 bank); void sub_80571DC(u8 bank, u8 arg1); diff --git a/ld_script.txt b/ld_script.txt index c668f32ff..5adacecf6 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -330,7 +330,6 @@ SECTIONS { src/rtc.o(.rodata); data/data2b.o(.rodata); src/battle_4.o(.rodata); - data/battle_4.o(.rodata); data/battle_controller_player.o(.rodata); data/data2b_2.o(.rodata); data/battle_controller_opponent.o(.rodata); diff --git a/src/battle_4.c b/src/battle_4.c index 414025695..e82f78570 100644 --- a/src/battle_4.c +++ b/src/battle_4.c @@ -773,7 +773,7 @@ struct StatFractions u8 divisor; }; -const struct StatFractions gAccuracyStageRatios[] = +static const struct StatFractions sAccuracyStageRatios[] = { { 33, 100}, // -6 { 36, 100}, // -5 @@ -791,9 +791,9 @@ const struct StatFractions gAccuracyStageRatios[] = }; // The chance is 1/N for each stage. -const u16 gCriticalHitChance[] = {16, 8, 4, 3, 2}; +static const u16 sCriticalHitChance[] = {16, 8, 4, 3, 2}; -const u32 gStatusFlagsForMoveEffects[] = +static const u32 sStatusFlagsForMoveEffects[] = { 0x00000000, STATUS_SLEEP, @@ -857,7 +857,7 @@ const u32 gStatusFlagsForMoveEffects[] = 0x00000000 }; -const u8* const gMoveEffectBS_Ptrs[] = +static const u8* const sMoveEffectBS_Ptrs[] = { BattleScript_MoveEffectSleep, // 0 BattleScript_MoveEffectSleep, // MOVE_EFFECT_SLEEP @@ -902,8 +902,8 @@ const u8* const gMoveEffectBS_Ptrs[] = static const struct WindowTemplate sUnusedWinTemplate = {0, 1, 3, 7, 0xF, 0x1F, 0x3F}; -const u16 gUnknown_0831C2C8[] = INCBIN_U16("graphics/battle_interface/unk_battlebox.gbapal"); -const u8 gUnknown_0831C2E8[] = INCBIN_U8("graphics/battle_interface/unk_battlebox.4bpp.lz"); +static const u16 sUnknown_0831C2C8[] = INCBIN_U16("graphics/battle_interface/unk_battlebox.gbapal"); +static const u8 sUnknown_0831C2E8[] = INCBIN_U8("graphics/battle_interface/unk_battlebox.4bpp.lz"); // unused static const u8 sRubyLevelUpStatBoxStats[] = @@ -914,7 +914,7 @@ static const u8 sRubyLevelUpStatBoxStats[] = #define MON_ICON_LVLUP_BOX_TAG 0xD75A -const struct OamData gUnknown_0831C3B8 = +static const struct OamData sOamData_MonIconOnLvlUpBox = { .y = 0, .affineMode = 0, @@ -931,24 +931,24 @@ const struct OamData gUnknown_0831C3B8 = .affineParam = 0, }; -const struct SpriteTemplate SpriteTemplate_MonIconOnLvlUpBox = +static const struct SpriteTemplate sSpriteTemplate_MonIconOnLvlUpBox = { .tileTag = MON_ICON_LVLUP_BOX_TAG, .paletteTag = MON_ICON_LVLUP_BOX_TAG, - .oam = &gUnknown_0831C3B8, + .oam = &sOamData_MonIconOnLvlUpBox, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCB_MonIconOnLvlUpBox }; -const u16 sProtectSuccessRates[] = {0xFFFF, 0x7FFF, 0x3FFF, 0x1FFF}; +static const u16 sProtectSuccessRates[] = {USHRT_MAX, USHRT_MAX / 2, USHRT_MAX / 4, USHRT_MAX / 8}; #define MIMIC_FORBIDDEN_END 0xFFFE #define METRONOME_FORBIDDEN_END 0xFFFF #define ASSIST_FORBIDDEN_END 0xFFFF -static const u16 gMovesForbiddenToCopy[] = +static const u16 sMovesForbiddenToCopy[] = { MOVE_METRONOME, MOVE_STRUGGLE, @@ -1007,7 +1007,7 @@ static const u16 sWeightToDamageTable[] = 0xFFFF, 0xFFFF }; -static const u16 gPickupItems[] = +static const u16 sPickupItems[] = { ITEM_POTION, ITEM_ANTIDOTE, @@ -1029,7 +1029,7 @@ static const u16 gPickupItems[] = ITEM_MAX_ELIXIR, }; -static const u16 gRarePickupItems[] = +static const u16 sRarePickupItems[] = { ITEM_HYPER_POTION, ITEM_NUGGET, @@ -1044,7 +1044,7 @@ static const u16 gRarePickupItems[] = ITEM_TM26, }; -static const u8 gPickupProbabilities[] = +static const u8 sPickupProbabilities[] = { 30, 40, 50, 60, 70, 80, 90, 94, 98 }; @@ -1057,8 +1057,8 @@ static const u8 sTerrainToType[] = TYPE_WATER, // underwater TYPE_WATER, // water TYPE_WATER, // pond water - TYPE_ROCK , // rock - TYPE_ROCK , // cave + TYPE_ROCK, // rock + TYPE_ROCK, // cave TYPE_NORMAL, // building TYPE_NORMAL, // plain }; @@ -1068,7 +1068,31 @@ static const u8 sBallCatchBonuses[] = 20, 15, 10, 15 // Ultra, Great, Poke, Safari }; -extern const u8 gUnknown_0831C4F8[]; +// could be a 2d array or a struct +const ALIGNED(4) u8 gUnknown_0831C494[] = +{ + 0x3d, 0x44, 0x3d, 0x44, 0x14, 0x2d, 0x54, 0x5c, + 0x46, 0x55, 0x20, 0x5c, 0x26, 0x45, 0x46, 0x55, + 0x14, 0x5a, 0x46, 0x5c, 0x1e, 0x32, 0x20, 0x5a, + 0x38, 0x4e, 0x38, 0x4e, 0x19, 0x28, 0x4b, 0x5a, + 0x45, 0x4b, 0x1c, 0x53, 0x23, 0x2d, 0x1d, 0x23, + 0x3e, 0x48, 0x1e, 0x32, 0x3a, 0x5f, 0x58, 0x5e, + 0x22, 0x2d, 0x1d, 0x28, 0x23, 0x28, 0x23, 0x5f, + 0x38, 0x4e, 0x38, 0x4e, 0x23, 0x50, 0x22, 0x5e, + 0x2c, 0x5e, 0x22, 0x28, 0x38, 0x4e, 0x38, 0x4e, + 0x1e, 0x58, 0x1e, 0x58, 0x1e, 0x2b, 0x1b, 0x21, + 0x28, 0x5a, 0x19, 0x57, 0x12, 0x58, 0x5a, 0x5f, + 0x58, 0x5e, 0x16, 0x2a, 0x2a, 0x5c, 0x2a, 0x2f, + 0x38, 0x4e, 0x38, 0x4e +}; + +static const u8 sUnknown_0831C4F8[] = +{ + 0x03, 0x00, 0x01, 0x00, 0x00, 0x01, 0x03, 0x00, + 0x01, 0x02, 0x02, 0x00, 0x03, 0x01, 0x03, 0x01, + 0x02, 0x03, 0x03, 0x02, 0x01, 0x00, 0x02, 0x02, + 0x03, 0x00, 0x00, 0x00 +}; static void atk00_attackcanceler(void) { @@ -1304,8 +1328,8 @@ static void atk01_accuracycheck(void) if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SUN_ANY && gBattleMoves[move].effect == EFFECT_THUNDER) moveAcc = 50; - calc = gAccuracyStageRatios[buff].dividend * moveAcc; - calc /= gAccuracyStageRatios[buff].divisor; + calc = sAccuracyStageRatios[buff].dividend * moveAcc; + calc /= sAccuracyStageRatios[buff].divisor; if (gBattleMons[gBankAttacker].ability == ABILITY_COMPOUND_EYES) calc = (calc * 130) / 100; // 1.3 compound eyes boost @@ -1435,7 +1459,7 @@ static void atk04_critcalc(void) if ((gBattleMons[gBankTarget].ability != ABILITY_BATTLE_ARMOR && gBattleMons[gBankTarget].ability != ABILITY_SHELL_ARMOR) && !(gStatuses3[gBankAttacker] & STATUS3_CANT_SCORE_A_CRIT) && !(gBattleTypeFlags & (BATTLE_TYPE_WALLY_TUTORIAL | BATTLE_TYPE_FIRST_BATTLE)) - && !(Random() % gCriticalHitChance[critChance])) + && !(Random() % sCriticalHitChance[critChance])) gCritMultiplier = 2; else gCritMultiplier = 1; @@ -2411,7 +2435,7 @@ void SetMoveEffect(bool8 primary, u8 certain) if (gBattleCommunication[MOVE_EFFECT_BYTE] <= 6) // status change { - switch (gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]) + switch (sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]) { case STATUS_SLEEP: // check active uproar @@ -2630,12 +2654,12 @@ void SetMoveEffect(bool8 primary, u8 certain) { BattleScriptPush(gBattlescriptCurrInstr + 1); - if (gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]] == STATUS_SLEEP) + if (sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]] == STATUS_SLEEP) gBattleMons[gEffectBank].status1 |= ((Random() & 3) + 2); else - gBattleMons[gEffectBank].status1 |= gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattleMons[gEffectBank].status1 |= sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]; - gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattlescriptCurrInstr = sMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; gActiveBank = gEffectBank; EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gEffectBank].status1); @@ -2674,7 +2698,7 @@ void SetMoveEffect(bool8 primary, u8 certain) } else { - if (gBattleMons[gEffectBank].status2 & gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]) + if (gBattleMons[gEffectBank].status2 & sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]) { gBattlescriptCurrInstr++; } @@ -2694,7 +2718,7 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattleMons[gEffectBank].status2 |= (((Random()) % 0x4)) + 2; BattleScriptPush(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattlescriptCurrInstr = sMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; } break; case MOVE_EFFECT_FLINCH: @@ -2714,7 +2738,7 @@ void SetMoveEffect(bool8 primary, u8 certain) else { if (BankGetTurnOrder(gEffectBank) > gCurrentMoveTurn) - gBattleMons[gEffectBank].status2 |= gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattleMons[gEffectBank].status2 |= sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]; gBattlescriptCurrInstr++; } break; @@ -2727,7 +2751,7 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattleMons[gEffectBank].status2 |= ((Random() & 3) + 2) << 4; BattleScriptPush(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattlescriptCurrInstr = sMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; } else { @@ -2743,7 +2767,7 @@ void SetMoveEffect(bool8 primary, u8 certain) gPaydayMoney = 0xFFFF; } BattleScriptPush(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattlescriptCurrInstr = sMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; break; case MOVE_EFFECT_TRI_ATTACK: if (gBattleMons[gEffectBank].status1) @@ -2776,7 +2800,7 @@ void SetMoveEffect(bool8 primary, u8 certain) *(gBattleStruct->wrappedBy + gEffectBank) = gBankAttacker; BattleScriptPush(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattlescriptCurrInstr = sMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; for (gBattleCommunication[MULTISTRING_CHOOSER] = 0; ; gBattleCommunication[MULTISTRING_CHOOSER]++) { @@ -2793,7 +2817,7 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattleMoveDamage = 1; BattleScriptPush(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattlescriptCurrInstr = sMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; break; case MOVE_EFFECT_ATK_PLUS_1: case MOVE_EFFECT_DEF_PLUS_1: @@ -3001,7 +3025,7 @@ void SetMoveEffect(bool8 primary, u8 certain) gBattleMoveDamage = 1; BattleScriptPush(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattlescriptCurrInstr = sMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; break; case MOVE_EFFECT_THRASH: if (gBattleMons[gEffectBank].status2 & STATUS2_LOCK_CONFUSE) @@ -3108,9 +3132,9 @@ static void atk18_status_effect_clear(void) gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); if (gBattleCommunication[MOVE_EFFECT_BYTE] <= MOVE_EFFECT_TOXIC) - gBattleMons[gActiveBank].status1 &= (~gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]); + gBattleMons[gActiveBank].status1 &= (~sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]); else - gBattleMons[gActiveBank].status2 &= (~gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]); + gBattleMons[gActiveBank].status2 &= (~sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]); gBattleCommunication[MOVE_EFFECT_BYTE] = 0; gBattlescriptCurrInstr += 2; @@ -6733,8 +6757,8 @@ static void sub_804F17C(void) gBattle_BG2_Y = 0; gBattle_BG2_X = 0x1A0; - LoadPalette(gUnknown_0831C2C8, 0x60, 0x20); - CopyToWindowPixelBuffer(14, gUnknown_0831C2E8, 0, 0); + LoadPalette(sUnknown_0831C2C8, 0x60, 0x20); + CopyToWindowPixelBuffer(14, sUnknown_0831C2E8, 0, 0); PutWindowTilemap(14); CopyWindowToVram(14, 3); @@ -6860,7 +6884,7 @@ static void PutMonIconOnLvlUpBox(void) LoadSpriteSheet(&iconSheet); LoadSpritePalette(&iconPalSheet); - spriteId = CreateSprite(&SpriteTemplate_MonIconOnLvlUpBox, 256, 10, 0); + spriteId = CreateSprite(&sSpriteTemplate_MonIconOnLvlUpBox, 256, 10, 0); gSprites[spriteId].sDestroy = FALSE; gSprites[spriteId].sSavedLvlUpBoxXPosition = gBattle_BG2_X; } @@ -7078,7 +7102,7 @@ static void atk76_various(void) { gBattleStruct->field_92 |= gBitTable[gActiveBank]; gBattleCommunication[0] = 1; - gBattleCommunication[MULTISTRING_CHOOSER] = gUnknown_0831C4F8[GetNatureFromPersonality(gBattleMons[gActiveBank].personality)]; + gBattleCommunication[MULTISTRING_CHOOSER] = sUnknown_0831C4F8[GetNatureFromPersonality(gBattleMons[gActiveBank].personality)]; } break; case 9: @@ -8475,10 +8499,10 @@ static void atk9C_set_substitute(void) static bool8 IsMoveUncopyableByMimic(u16 move) { s32 i; - for (i = 0; gMovesForbiddenToCopy[i] != MIMIC_FORBIDDEN_END - && gMovesForbiddenToCopy[i] != move; i++); + for (i = 0; sMovesForbiddenToCopy[i] != MIMIC_FORBIDDEN_END + && sMovesForbiddenToCopy[i] != move; i++); - return (gMovesForbiddenToCopy[i] != MIMIC_FORBIDDEN_END); + return (sMovesForbiddenToCopy[i] != MIMIC_FORBIDDEN_END); } static void atk9D_mimicattackcopy(void) @@ -8537,7 +8561,7 @@ static void atk9E_metronome(void) for (i = 0; i < 4; i++); // ? - for (move = gMovesForbiddenToCopy; ; move++) + for (move = sMovesForbiddenToCopy; ; move++) { if (*move == gCurrentMove) break; @@ -8567,7 +8591,7 @@ static void atk9E_metronome(void) ldr r7, =gCurrentMove\n\ movs r6, 0xB1\n\ lsls r6, 1\n\ - ldr r5, =gMovesForbiddenToCopy\n\ + ldr r5, =sMovesForbiddenToCopy\n\ ldr r0, =gBattlescriptCurrInstr\n\ mov r8, r0\n\ _080524EE:\n\ @@ -10580,9 +10604,9 @@ static void atkDE_asistattackselect(void) if (IsInvalidForSleepTalkOrAssist(move)) continue; - for (; gMovesForbiddenToCopy[i] != ASSIST_FORBIDDEN_END && move != gMovesForbiddenToCopy[i]; i++); + for (; sMovesForbiddenToCopy[i] != ASSIST_FORBIDDEN_END && move != sMovesForbiddenToCopy[i]; i++); - if (gMovesForbiddenToCopy[i] != ASSIST_FORBIDDEN_END) + if (sMovesForbiddenToCopy[i] != ASSIST_FORBIDDEN_END) continue; if (move == MOVE_NONE) continue; @@ -10774,14 +10798,14 @@ static void atkE5_pickup(void) for (j = 0; j < 9; j++) { - if (gPickupProbabilities[j] > rand) + if (sPickupProbabilities[j] > rand) { - SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &gPickupItems[lvlDivBy10 + j]); + SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &sPickupItems[lvlDivBy10 + j]); break; } else if (rand == 99 || rand == 98) { - SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &gRarePickupItems[lvlDivBy10 + (99 - rand)]); + SetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM, &sRarePickupItems[lvlDivBy10 + (99 - rand)]); break; } } From 6d4d58a8a7759517b327a4017e05332888662e84 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 28 Sep 2017 17:38:07 +0200 Subject: [PATCH 307/342] rename battle4 and battleai --- include/battle.h | 3 ++- include/{battle_ai.h => battle_ai_script_commands.h} | 6 +++--- ld_script.txt | 8 ++++---- src/battle_3.c | 3 +-- src/{battle_ai.c => battle_ai_script_commands.c} | 2 +- src/{battle_4.c => battle_script_commands.c} | 2 +- sym_ewram.txt | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) rename include/{battle_ai.h => battle_ai_script_commands.h} (74%) rename src/{battle_ai.c => battle_ai_script_commands.c} (99%) rename src/{battle_4.c => battle_script_commands.c} (99%) diff --git a/include/battle.h b/include/battle.h index 158ae46b2..67d3d873d 100644 --- a/include/battle.h +++ b/include/battle.h @@ -898,7 +898,7 @@ void sub_80458B4(void); u8 GetMoveTarget(u16 move, u8 useMoveTarget); u8 IsPokeDisobedient(void); -// battle_4 +// battle_script_commands void AI_CalcDmg(u8 bankAtk, u8 bankDef); u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef); u8 AI_TypeCalc(u16 move, u16 species, u8 ability); @@ -910,6 +910,7 @@ void BufferMoveToLearnIntoBattleTextBuff2(void); void sub_8056A3C(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags); bool8 UproarWakeUpCheck(u8 bank); +extern void (* const gBattleScriptingCommandsTable[])(void); extern const u8 gUnknown_0831C494[]; // battle_5 diff --git a/include/battle_ai.h b/include/battle_ai_script_commands.h similarity index 74% rename from include/battle_ai.h rename to include/battle_ai_script_commands.h index 2a315059b..5fb422b41 100644 --- a/include/battle_ai.h +++ b/include/battle_ai_script_commands.h @@ -1,5 +1,5 @@ -#ifndef GUARD_BATTLE_AI_H -#define GUARD_BATTLE_AI_H +#ifndef GUARD_BATTLE_AI_SCRIPT_COMMANDS_H +#define GUARD_BATTLE_AI_SCRIPT_COMMANDS_H void BattleAI_HandleItemUseBeforeAISetup(u8 defaultScoreMoves); void BattleAI_SetupAIData(u8 defaultScoreMoves); @@ -10,4 +10,4 @@ void ClearBankAbilityHistory(u8 bank); void RecordItemEffectBattle(u8 bank, u8 itemEffect); void ClearBankItemEffectHistory(u8 bank); -#endif // GUARD_BATTLE_AI_H +#endif // GUARD_BATTLE_AI_SCRIPT_COMMANDS_H diff --git a/ld_script.txt b/ld_script.txt index 5adacecf6..5e273c049 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -59,7 +59,7 @@ SECTIONS { asm/battle_1.o(.text); asm/battle_2.o(.text); src/battle_3.o(.text); - src/battle_4.o(.text); + src/battle_script_commands.o(.text); asm/battle_5.o(.text); asm/battle_controller_player.o(.text); asm/battle_7.o(.text); @@ -177,7 +177,7 @@ SECTIONS { asm/decoration.o(.text); asm/slot_machine.o(.text); asm/contest_painting.o(.text); - src/battle_ai.o(.text); + src/battle_ai_script_commands.o(.text); asm/trader.o(.text); asm/starter_choose.o(.text); asm/wallclock.o(.text); @@ -329,7 +329,7 @@ SECTIONS { data/link.o(.rodata); src/rtc.o(.rodata); data/data2b.o(.rodata); - src/battle_4.o(.rodata); + src/battle_script_commands.o(.rodata); data/battle_controller_player.o(.rodata); data/data2b_2.o(.rodata); data/battle_controller_opponent.o(.rodata); @@ -409,7 +409,7 @@ SECTIONS { data/decoration.o(.rodata); data/slot_machine.o(.rodata); data/contest_painting.o(.rodata); - src/battle_ai.o(.rodata); + src/battle_ai_script_commands.o(.rodata); data/data4.o(.rodata); data/battle_controller_link_partner.o(.rodata); data/battle_message.o(.rodata); diff --git a/src/battle_3.c b/src/battle_3.c index e81d527d0..e42d9317d 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -13,7 +13,7 @@ #include "text.h" #include "string_util.h" #include "battle_message.h" -#include "battle_ai.h" +#include "battle_ai_script_commands.h" #include "battle_controllers.h" #include "event_data.h" #include "calculate_base_damage.h" @@ -57,7 +57,6 @@ extern u8 gCurrMovePos; extern u8 gUnknown_020241E9; extern const struct BattleMove gBattleMoves[]; -extern void (* const gBattleScriptingCommandsTable[])(void); // scripts extern const u8 gUnknown_082DAE2A[]; diff --git a/src/battle_ai.c b/src/battle_ai_script_commands.c similarity index 99% rename from src/battle_ai.c rename to src/battle_ai_script_commands.c index 8590b0f03..dae43f13c 100644 --- a/src/battle_ai.c +++ b/src/battle_ai_script_commands.c @@ -1,5 +1,5 @@ #include "global.h" -#include "battle_ai.h" +#include "battle_ai_script_commands.h" #include "pokemon.h" #include "battle.h" #include "species.h" diff --git a/src/battle_4.c b/src/battle_script_commands.c similarity index 99% rename from src/battle_4.c rename to src/battle_script_commands.c index e82f78570..2e6b3dbae 100644 --- a/src/battle_4.c +++ b/src/battle_script_commands.c @@ -2,7 +2,7 @@ #include "battle.h" #include "battle_move_effects.h" #include "battle_message.h" -#include "battle_ai.h" +#include "battle_ai_script_commands.h" #include "moves.h" #include "abilities.h" #include "item.h" diff --git a/sym_ewram.txt b/sym_ewram.txt index fa655f5ea..3a1747889 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -1405,7 +1405,7 @@ gUnknown_0203AB30: @ 203AB30 gUnknown_0203AB34: @ 203AB34 .space 0x4 - .include "src/battle_ai.o" + .include "src/battle_ai_script_commands.o" .align 2 gUnknown_0203AB40: @ 203AB40 From 4dad58648fe65b7df90da45972518222853b2e98 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 28 Sep 2017 19:34:13 +0200 Subject: [PATCH 308/342] take revo suggestion --- src/battle_script_commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 2e6b3dbae..e0cb3e941 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -11043,7 +11043,7 @@ static void atkEF_pokeball_catch_calculation(void) ballMultiplier = 10; break; case ITEM_NEST_BALL: - if (gBattleMons[gBankTarget].level <= 39) + if (gBattleMons[gBankTarget].level < 40) { ballMultiplier = 40 - gBattleMons[gBankTarget].level; if (ballMultiplier <= 9) From f1fe0c217d5366123c057da85b28b5c10ac9798d Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Thu, 28 Sep 2017 20:52:36 +0200 Subject: [PATCH 309/342] decompile roamer --- asm/roamer.s | 502 --------------------------------------------- data/rom_8158B30.s | 153 -------------- data/rom_85CECB0.s | 154 ++++++++++++++ include/roamer.h | 8 +- ld_script.txt | 4 +- src/roamer.c | 218 ++++++++++++++++++++ sym_ewram.txt | 6 +- 7 files changed, 383 insertions(+), 662 deletions(-) delete mode 100644 asm/roamer.s create mode 100644 data/rom_85CECB0.s create mode 100644 src/roamer.c diff --git a/asm/roamer.s b/asm/roamer.s deleted file mode 100644 index f6b48f10f..000000000 --- a/asm/roamer.s +++ /dev/null @@ -1,502 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - - thumb_func_start ClearRoamerData -ClearRoamerData: @ 8161B34 - push {r4,r5,lr} - ldr r5, =gSaveBlock1Ptr - ldr r0, [r5] - ldr r4, =0x000031dc - adds r0, r4 - movs r1, 0 - movs r2, 0x1C - bl memset - ldr r0, [r5] - adds r0, r4 - ldr r1, =0x00000197 - strh r1, [r0, 0x8] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end ClearRoamerData - - thumb_func_start ClearRoamerLocationData -ClearRoamerLocationData: @ 8161B60 - push {r4-r6,lr} - movs r2, 0 - ldr r6, =sRoamerLocation - ldr r4, =sLocationHistory - movs r3, 0 - adds r5, r4, 0x1 -_08161B6C: - lsls r1, r2, 1 - adds r0, r1, r4 - strb r3, [r0] - adds r1, r5 - strb r3, [r1] - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0x2 - bls _08161B6C - movs r0, 0 - strb r0, [r6] - strb r0, [r6, 0x1] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end ClearRoamerLocationData - - thumb_func_start CreateInitialRoamerMon -CreateInitialRoamerMon: @ 8161B94 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x10 - lsls r0, 16 - cmp r0, 0 - bne _08161BBC - ldr r0, =gSaveBlock1Ptr - ldr r1, [r0] - ldr r2, =0x000031dc - adds r1, r2 - ldr r2, =0x00000197 - b _08161BC8 - .pool -_08161BBC: - ldr r0, =gSaveBlock1Ptr - ldr r1, [r0] - ldr r2, =0x000031dc - adds r1, r2 - movs r2, 0xCC - lsls r2, 1 -_08161BC8: - strh r2, [r1, 0x8] - adds r7, r0, 0 - ldr r6, =gEnemyParty - ldr r0, [r7] - ldr r5, =0x000031dc - adds r0, r5 - ldrh r1, [r0, 0x8] - movs r4, 0 - str r4, [sp] - str r4, [sp, 0x4] - str r4, [sp, 0x8] - str r4, [sp, 0xC] - adds r0, r6, 0 - movs r2, 0x28 - movs r3, 0x20 - bl CreateMon - ldr r0, [r7] - adds r0, r5 - movs r1, 0x28 - strb r1, [r0, 0xC] - ldr r0, [r7] - adds r0, r5 - strb r4, [r0, 0xD] - ldr r0, [r7] - adds r0, r5 - movs r1, 0x1 - strb r1, [r0, 0x13] - adds r0, r6, 0 - movs r1, 0x42 - bl GetMonData - ldr r1, [r7] - adds r1, r5 - str r0, [r1] - adds r0, r6, 0 - movs r1, 0 - bl GetMonData - ldr r1, [r7] - adds r1, r5 - str r0, [r1, 0x4] - adds r0, r6, 0 - movs r1, 0x3A - bl GetMonData - ldr r1, [r7] - adds r1, r5 - movs r2, 0 - mov r8, r2 - strh r0, [r1, 0xA] - adds r0, r6, 0 - movs r1, 0x16 - bl GetMonData - ldr r1, [r7] - adds r1, r5 - strb r0, [r1, 0xE] - adds r0, r6, 0 - movs r1, 0x17 - bl GetMonData - ldr r1, [r7] - adds r1, r5 - strb r0, [r1, 0xF] - adds r0, r6, 0 - movs r1, 0x18 - bl GetMonData - ldr r1, [r7] - adds r1, r5 - strb r0, [r1, 0x10] - adds r0, r6, 0 - movs r1, 0x21 - bl GetMonData - ldr r1, [r7] - adds r1, r5 - strb r0, [r1, 0x11] - adds r0, r6, 0 - movs r1, 0x2F - bl GetMonData - ldr r1, [r7] - adds r1, r5 - strb r0, [r1, 0x12] - ldr r4, =sRoamerLocation - mov r0, r8 - strb r0, [r4] - bl Random - ldr r5, =sRoamerLocations - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x14 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 1 - adds r1, r5 - ldrb r0, [r1] - strb r0, [r4, 0x1] - add sp, 0x10 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end CreateInitialRoamerMon - - thumb_func_start InitRoamer -InitRoamer: @ 8161CBC - push {lr} - bl ClearRoamerData - bl ClearRoamerLocationData - ldr r0, =gSpecialVar_0x8004 - ldrh r0, [r0] - bl CreateInitialRoamerMon - pop {r0} - bx r0 - .pool - thumb_func_end InitRoamer - - thumb_func_start UpdateLocationHistoryForRoamer -UpdateLocationHistoryForRoamer: @ 8161CD8 - ldr r0, =sLocationHistory - ldrb r1, [r0, 0x2] - strb r1, [r0, 0x4] - ldrb r1, [r0, 0x3] - strb r1, [r0, 0x5] - ldrb r1, [r0] - strb r1, [r0, 0x2] - ldrb r1, [r0, 0x1] - strb r1, [r0, 0x3] - ldr r1, =gSaveBlock1Ptr - ldr r2, [r1] - ldrb r1, [r2, 0x4] - strb r1, [r0] - ldrb r1, [r2, 0x5] - strb r1, [r0, 0x1] - bx lr - .pool - thumb_func_end UpdateLocationHistoryForRoamer - - thumb_func_start RoamerMoveToOtherLocationSet -RoamerMoveToOtherLocationSet: @ 8161D00 - push {r4,r5,lr} - movs r1, 0 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r2, =0x000031dc - adds r0, r2 - ldrb r0, [r0, 0x13] - cmp r0, 0 - beq _08161D3E - ldr r0, =sRoamerLocation - strb r1, [r0] - ldr r5, =sRoamerLocations - adds r4, r0, 0 -_08161D1A: - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x14 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 1 - adds r1, r5 - ldrb r1, [r1] - ldrb r0, [r4, 0x1] - cmp r0, r1 - beq _08161D1A - strb r1, [r4, 0x1] -_08161D3E: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end RoamerMoveToOtherLocationSet - - thumb_func_start RoamerMove -RoamerMove: @ 8161D54 - push {r4-r7,lr} - movs r4, 0 - bl Random - lsls r0, 16 - movs r1, 0xF0 - lsls r1, 12 - ands r1, r0 - cmp r1, 0 - bne _08161D6E - bl RoamerMoveToOtherLocationSet - b _08161DE2 -_08161D6E: - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x000031dc - adds r0, r1 - ldrb r0, [r0, 0x13] - cmp r0, 0 - beq _08161DE2 - ldr r7, =sRoamerLocation - ldr r3, =sRoamerLocations -_08161D80: - lsls r0, r4, 1 - adds r0, r4 - lsls r2, r0, 1 - adds r1, r2, r3 - ldrb r0, [r7, 0x1] - ldrb r1, [r1] - cmp r0, r1 - bne _08161DD8 - ldr r6, =sRoamerLocations - adds r5, r2, 0x1 - ldr r4, =sLocationHistory -_08161D96: - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x5 - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - adds r0, r5 - adds r0, r6 - ldrb r1, [r0] - ldrb r0, [r4, 0x4] - cmp r0, 0 - bne _08161DBA - ldrb r0, [r4, 0x5] - cmp r0, r1 - beq _08161D96 -_08161DBA: - cmp r1, 0xFF - beq _08161D96 - strb r1, [r7, 0x1] - b _08161DE2 - .pool -_08161DD8: - adds r0, r4, 0x1 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0x13 - bls _08161D80 -_08161DE2: - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end RoamerMove - - thumb_func_start IsRoamerAt -IsRoamerAt: @ 8161DE8 - push {lr} - lsls r0, 24 - lsrs r2, r0, 24 - lsls r1, 24 - lsrs r1, 24 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r3, =0x000031dc - adds r0, r3 - ldrb r0, [r0, 0x13] - cmp r0, 0 - beq _08161E20 - ldr r0, =sRoamerLocation - ldrb r3, [r0] - cmp r2, r3 - bne _08161E20 - ldrb r0, [r0, 0x1] - cmp r1, r0 - bne _08161E20 - movs r0, 0x1 - b _08161E22 - .pool -_08161E20: - movs r0, 0 -_08161E22: - pop {r1} - bx r1 - thumb_func_end IsRoamerAt - - thumb_func_start CreateRoamerMonInstance -CreateRoamerMonInstance: @ 8161E28 - push {r4,r5,lr} - sub sp, 0x4 - ldr r5, =gEnemyParty - bl ZeroEnemyPartyMons - ldr r4, =gSaveBlock1Ptr - ldr r0, [r4] - ldr r1, =0x000031dc - adds r0, r1 - ldrh r1, [r0, 0x8] - ldrb r2, [r0, 0xC] - ldr r3, [r0] - ldr r0, [r0, 0x4] - str r0, [sp] - adds r0, r5, 0 - bl CreateMonWithIVsPersonality - ldr r2, [r4] - ldr r0, =0x000031e9 - adds r2, r0 - adds r0, r5, 0 - movs r1, 0x37 - bl SetMonData - ldr r2, [r4] - ldr r1, =0x000031e6 - adds r2, r1 - adds r0, r5, 0 - movs r1, 0x39 - bl SetMonData - ldr r2, [r4] - ldr r0, =0x000031ea - adds r2, r0 - adds r0, r5, 0 - movs r1, 0x16 - bl SetMonData - ldr r2, [r4] - ldr r1, =0x000031eb - adds r2, r1 - adds r0, r5, 0 - movs r1, 0x17 - bl SetMonData - ldr r2, [r4] - ldr r0, =0x000031ec - adds r2, r0 - adds r0, r5, 0 - movs r1, 0x18 - bl SetMonData - ldr r2, [r4] - ldr r1, =0x000031ed - adds r2, r1 - adds r0, r5, 0 - movs r1, 0x21 - bl SetMonData - ldr r2, [r4] - ldr r0, =0x000031ee - adds r2, r0 - adds r0, r5, 0 - movs r1, 0x2F - bl SetMonData - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end CreateRoamerMonInstance - - thumb_func_start TryStartRoamerEncounter -TryStartRoamerEncounter: @ 8161EDC - push {lr} - ldr r0, =gSaveBlock1Ptr - ldr r1, [r0] - ldrb r0, [r1, 0x4] - ldrb r1, [r1, 0x5] - bl IsRoamerAt - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _08161F10 - bl Random - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - cmp r1, 0 - bne _08161F10 - bl CreateRoamerMonInstance - movs r0, 0x1 - b _08161F12 - .pool -_08161F10: - movs r0, 0 -_08161F12: - pop {r1} - bx r1 - thumb_func_end TryStartRoamerEncounter - - thumb_func_start UpdateRoamerHPStatus -UpdateRoamerHPStatus: @ 8161F18 - push {r4-r6,lr} - adds r6, r0, 0 - movs r1, 0x39 - bl GetMonData - ldr r5, =gSaveBlock1Ptr - ldr r1, [r5] - ldr r4, =0x000031dc - adds r1, r4 - strh r0, [r1, 0xA] - adds r0, r6, 0 - movs r1, 0x37 - bl GetMonData - ldr r1, [r5] - adds r1, r4 - strb r0, [r1, 0xD] - bl RoamerMoveToOtherLocationSet - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end UpdateRoamerHPStatus - - thumb_func_start SetRoamerInactive -SetRoamerInactive: @ 8161F4C - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, =0x000031dc - adds r0, r1 - movs r1, 0 - strb r1, [r0, 0x13] - bx lr - .pool - thumb_func_end SetRoamerInactive - - thumb_func_start GetRoamerLocation -GetRoamerLocation: @ 8161F64 - ldr r3, =sRoamerLocation - ldrb r2, [r3] - strb r2, [r0] - ldrb r0, [r3, 0x1] - strb r0, [r1] - bx lr - .pool - thumb_func_end GetRoamerLocation - - - .align 2, 0 @ Don't pad with nop. diff --git a/data/rom_8158B30.s b/data/rom_8158B30.s index c8d9baa1a..72cff0b33 100644 --- a/data/rom_8158B30.s +++ b/data/rom_8158B30.s @@ -81,156 +81,3 @@ gUnknown_085CEC10:: @ 85CEC10 gUnknown_085CEC28:: @ 85CEC28 .incbin "baserom.gba", 0x5cec28, 0x8 - -sRoamerLocations:: @ 85CEC30 - .incbin "baserom.gba", 0x5cec30, 0x80 - -@ 85CECB0 - .include "data/battle_frontier/battle_frontier_held_items.inc" - -@ 85CED2E - .include "data/battle_frontier/battle_frontier_trainer_mons.inc" - -@ 85D5ACC - .include "data/battle_frontier/battle_frontier_trainers.inc" - -@ 85D97BC - .include "data/battle_frontier/battle_frontier_mons.inc" - -gUnknown_085DCEDC:: @ 85DCEDC - .incbin "baserom.gba", 0x5dcedc, 0x1e - -gUnknown_085DCEFA:: @ 85DCEFA - .incbin "baserom.gba", 0x5dcefa, 0x14 - -gUnknown_085DCF0E:: @ 85DCF0E - .incbin "baserom.gba", 0x5dcf0e, 0x1e - -gUnknown_085DCF2C:: @ 85DCF2C - .incbin "baserom.gba", 0x5dcf2c, 0x14 - -gUnknown_085DCF40:: @ 85DCF40 - .incbin "baserom.gba", 0x5dcf40, 0x5c0 - -gUnknown_085DD500:: @ 85DD500 - .incbin "baserom.gba", 0x5dd500, 0x190 - -gUnknown_085DD690:: @ 85DD690 - .incbin "baserom.gba", 0x5dd690, 0x40 - -gUnknown_085DD6D0:: @ 85DD6D0 - .incbin "baserom.gba", 0x5dd6d0, 0x5 - -gUnknown_085DD6D5:: @ 85DD6D5 - .incbin "baserom.gba", 0x5dd6d5, 0x7 - -gUnknown_085DD6DC:: @ 85DD6DC - .incbin "baserom.gba", 0x5dd6dc, 0x30 - -@ 85DD70C - .include "data/battle_frontier/slateport_battle_tent_trainer_mons.inc" - -@ 85DDA14 - .include "data/battle_frontier/slateport_battle_tent_trainers.inc" - -@ 85DE02C - .include "data/battle_frontier/slateport_battle_tent_mons.inc" - -@ 85DE48C - .include "data/battle_frontier/verdanturf_battle_tent_trainer_mons.inc" - -@ 85DE610 - .include "data/battle_frontier/verdanturf_battle_tent_trainers.inc" - -@ 85DEC28 - .include "data/battle_frontier/verdanturf_battle_tent_mons.inc" - -@ 85DEEF8 - .include "data/battle_frontier/fallarbor_battle_tent_trainer_mons.inc" - -@ 85DF084 - .include "data/battle_frontier/fallarbor_battle_tent_trainers.inc" - -@ 85DF69C - .include "data/battle_frontier/fallarbor_battle_tent_mons.inc" - -gUnknown_085DF96C:: @ 85DF96C - .incbin "baserom.gba", 0x5df96c, 0x40 - -gUnknown_085DF9AC:: @ 85DF9AC - .incbin "baserom.gba", 0x5df9ac, 0x20 - -gUnknown_085DF9CC:: @ 85DF9CC - .incbin "baserom.gba", 0x5df9cc, 0x20 - -gUnknown_085DF9EC:: @ 85DF9EC - .incbin "baserom.gba", 0x5df9ec, 0xa - -gUnknown_085DF9F6:: @ 85DF9F6 - .incbin "baserom.gba", 0x5df9f6, 0x4 - -gUnknown_085DF9FA:: @ 85DF9FA - .incbin "baserom.gba", 0x5df9fa, 0x20 - -gUnknown_085DFA1A:: @ 85DFA1A - .incbin "baserom.gba", 0x5dfa1a, 0x28 - -gUnknown_085DFA42:: @ 85DFA42 - .incbin "baserom.gba", 0x5dfa42, 0x4 - -gUnknown_085DFA46:: @ 85DFA46 - .incbin "baserom.gba", 0x5dfa46, 0xc - -gUnknown_085DFA52:: @ 85DFA52 - .incbin "baserom.gba", 0x5dfa52, 0xe - -gUnknown_085DFA60:: @ 85DFA60 - .incbin "baserom.gba", 0x5dfa60, 0x20 - -gUnknown_085DFA80:: @ 85DFA80 - .incbin "baserom.gba", 0x5dfa80, 0xe0 - -gUnknown_085DFB60:: @ 85DFB60 - .incbin "baserom.gba", 0x5dfb60, 0xac - -gUnknown_085DFC0C:: @ 85DFC0C - .incbin "baserom.gba", 0x5dfc0c, 0xa4 - -gUnknown_085DFCB0:: @ 85DFCB0 - .incbin "baserom.gba", 0x5dfcb0, 0x14 - -gUnknown_085DFCC4:: @ 85DFCC4 - .incbin "baserom.gba", 0x5dfcc4, 0x5 - -gUnknown_085DFCC9:: @ 85DFCC9 - .incbin "baserom.gba", 0x5dfcc9, 0x3 - -gUnknown_085DFCCC:: @ 85DFCCC - .incbin "baserom.gba", 0x5dfccc, 0x10 - -gUnknown_085DFCDC:: @ 85DFCDC - .incbin "baserom.gba", 0x5dfcdc, 0x20 - -gUnknown_085DFCFC:: @ 85DFCFC - .incbin "baserom.gba", 0x5dfcfc, 0x8 - -gUnknown_085DFD04:: @ 85DFD04 - .incbin "baserom.gba", 0x5dfd04, 0x14 - -gUnknown_085DFD18:: @ 85DFD18 - .incbin "baserom.gba", 0x5dfd18, 0x8 - -gUnknown_085DFD20:: @ 85DFD20 - .incbin "baserom.gba", 0x5dfd20, 0x8 - -gUnknown_085DFD28:: @ 85DFD28 - .incbin "baserom.gba", 0x5dfd28, 0x34 - -gUnknown_085DFD5C:: @ 85DFD5C - .incbin "baserom.gba", 0x5dfd5c, 0x44 - -gUnknown_085DFDA0:: @ 85DFDA0 - .incbin "baserom.gba", 0x5dfda0, 0x18 - -gUnknown_085DFDB8:: @ 85DFDB8 - .incbin "baserom.gba", 0x5dfdb8, 0x8 diff --git a/data/rom_85CECB0.s b/data/rom_85CECB0.s new file mode 100644 index 000000000..c0233bb8c --- /dev/null +++ b/data/rom_85CECB0.s @@ -0,0 +1,154 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +@ 85CECB0 + .include "data/battle_frontier/battle_frontier_held_items.inc" + +@ 85CED2E + .include "data/battle_frontier/battle_frontier_trainer_mons.inc" + +@ 85D5ACC + .include "data/battle_frontier/battle_frontier_trainers.inc" + +@ 85D97BC + .include "data/battle_frontier/battle_frontier_mons.inc" + +gUnknown_085DCEDC:: @ 85DCEDC + .incbin "baserom.gba", 0x5dcedc, 0x1e + +gUnknown_085DCEFA:: @ 85DCEFA + .incbin "baserom.gba", 0x5dcefa, 0x14 + +gUnknown_085DCF0E:: @ 85DCF0E + .incbin "baserom.gba", 0x5dcf0e, 0x1e + +gUnknown_085DCF2C:: @ 85DCF2C + .incbin "baserom.gba", 0x5dcf2c, 0x14 + +gUnknown_085DCF40:: @ 85DCF40 + .incbin "baserom.gba", 0x5dcf40, 0x5c0 + +gUnknown_085DD500:: @ 85DD500 + .incbin "baserom.gba", 0x5dd500, 0x190 + +gUnknown_085DD690:: @ 85DD690 + .incbin "baserom.gba", 0x5dd690, 0x40 + +gUnknown_085DD6D0:: @ 85DD6D0 + .incbin "baserom.gba", 0x5dd6d0, 0x5 + +gUnknown_085DD6D5:: @ 85DD6D5 + .incbin "baserom.gba", 0x5dd6d5, 0x7 + +gUnknown_085DD6DC:: @ 85DD6DC + .incbin "baserom.gba", 0x5dd6dc, 0x30 + +@ 85DD70C + .include "data/battle_frontier/slateport_battle_tent_trainer_mons.inc" + +@ 85DDA14 + .include "data/battle_frontier/slateport_battle_tent_trainers.inc" + +@ 85DE02C + .include "data/battle_frontier/slateport_battle_tent_mons.inc" + +@ 85DE48C + .include "data/battle_frontier/verdanturf_battle_tent_trainer_mons.inc" + +@ 85DE610 + .include "data/battle_frontier/verdanturf_battle_tent_trainers.inc" + +@ 85DEC28 + .include "data/battle_frontier/verdanturf_battle_tent_mons.inc" + +@ 85DEEF8 + .include "data/battle_frontier/fallarbor_battle_tent_trainer_mons.inc" + +@ 85DF084 + .include "data/battle_frontier/fallarbor_battle_tent_trainers.inc" + +@ 85DF69C + .include "data/battle_frontier/fallarbor_battle_tent_mons.inc" + +gUnknown_085DF96C:: @ 85DF96C + .incbin "baserom.gba", 0x5df96c, 0x40 + +gUnknown_085DF9AC:: @ 85DF9AC + .incbin "baserom.gba", 0x5df9ac, 0x20 + +gUnknown_085DF9CC:: @ 85DF9CC + .incbin "baserom.gba", 0x5df9cc, 0x20 + +gUnknown_085DF9EC:: @ 85DF9EC + .incbin "baserom.gba", 0x5df9ec, 0xa + +gUnknown_085DF9F6:: @ 85DF9F6 + .incbin "baserom.gba", 0x5df9f6, 0x4 + +gUnknown_085DF9FA:: @ 85DF9FA + .incbin "baserom.gba", 0x5df9fa, 0x20 + +gUnknown_085DFA1A:: @ 85DFA1A + .incbin "baserom.gba", 0x5dfa1a, 0x28 + +gUnknown_085DFA42:: @ 85DFA42 + .incbin "baserom.gba", 0x5dfa42, 0x4 + +gUnknown_085DFA46:: @ 85DFA46 + .incbin "baserom.gba", 0x5dfa46, 0xc + +gUnknown_085DFA52:: @ 85DFA52 + .incbin "baserom.gba", 0x5dfa52, 0xe + +gUnknown_085DFA60:: @ 85DFA60 + .incbin "baserom.gba", 0x5dfa60, 0x20 + +gUnknown_085DFA80:: @ 85DFA80 + .incbin "baserom.gba", 0x5dfa80, 0xe0 + +gUnknown_085DFB60:: @ 85DFB60 + .incbin "baserom.gba", 0x5dfb60, 0xac + +gUnknown_085DFC0C:: @ 85DFC0C + .incbin "baserom.gba", 0x5dfc0c, 0xa4 + +gUnknown_085DFCB0:: @ 85DFCB0 + .incbin "baserom.gba", 0x5dfcb0, 0x14 + +gUnknown_085DFCC4:: @ 85DFCC4 + .incbin "baserom.gba", 0x5dfcc4, 0x5 + +gUnknown_085DFCC9:: @ 85DFCC9 + .incbin "baserom.gba", 0x5dfcc9, 0x3 + +gUnknown_085DFCCC:: @ 85DFCCC + .incbin "baserom.gba", 0x5dfccc, 0x10 + +gUnknown_085DFCDC:: @ 85DFCDC + .incbin "baserom.gba", 0x5dfcdc, 0x20 + +gUnknown_085DFCFC:: @ 85DFCFC + .incbin "baserom.gba", 0x5dfcfc, 0x8 + +gUnknown_085DFD04:: @ 85DFD04 + .incbin "baserom.gba", 0x5dfd04, 0x14 + +gUnknown_085DFD18:: @ 85DFD18 + .incbin "baserom.gba", 0x5dfd18, 0x8 + +gUnknown_085DFD20:: @ 85DFD20 + .incbin "baserom.gba", 0x5dfd20, 0x8 + +gUnknown_085DFD28:: @ 85DFD28 + .incbin "baserom.gba", 0x5dfd28, 0x34 + +gUnknown_085DFD5C:: @ 85DFD5C + .incbin "baserom.gba", 0x5dfd5c, 0x44 + +gUnknown_085DFDA0:: @ 85DFDA0 + .incbin "baserom.gba", 0x5dfda0, 0x18 + +gUnknown_085DFDB8:: @ 85DFDB8 + .incbin "baserom.gba", 0x5dfdb8, 0x8 diff --git a/include/roamer.h b/include/roamer.h index af7f86e79..ba1b09b54 100644 --- a/include/roamer.h +++ b/include/roamer.h @@ -3,9 +3,15 @@ void ClearRoamerData(void); void ClearRoamerLocationData(void); +void InitRoamer(void); void UpdateLocationHistoryForRoamer(void); void RoamerMoveToOtherLocationSet(void); -void RoamerMove(); +void RoamerMove(void); +bool8 IsRoamerAt(u8 mapGroup, u8 mapNum); +void CreateRoamerMonInstance(void); u8 TryStartRoamerEncounter(void); +void UpdateRoamerHPStatus(struct Pokemon *mon); +void SetRoamerInactive(void); +void GetRoamerLocation(u8 *mapGroup, u8 *mapNum); #endif // GUARD_ROAMER_H diff --git a/ld_script.txt b/ld_script.txt index 64a43d573..77e8ac4f4 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -211,7 +211,7 @@ SECTIONS { asm/learn_move.o(.text); asm/fldeff_softboiled.o(.text); asm/decoration_inventory.o(.text); - asm/roamer.o(.text); + src/roamer.o(.text); asm/battle_tower.o(.text); asm/use_pokeblock.o(.text); asm/battle_controller_wally.o(.text); @@ -421,6 +421,8 @@ SECTIONS { data/contest_ai.o(.rodata); data/battle_controller_safari.o(.rodata); data/rom_8158B30.o(.rodata); + src/roamer.o(.rodata); + data/rom_85CECB0.o(.rodata); data/battle_controller_wally.o(.rodata); data/player_pc.o(.rodata); data/intro.o(.rodata); diff --git a/src/roamer.c b/src/roamer.c new file mode 100644 index 000000000..cbe1b6312 --- /dev/null +++ b/src/roamer.c @@ -0,0 +1,218 @@ +#include "global.h" +#include "roamer.h" +#include "pokemon.h" +#include "rng.h" +#include "species.h" +#include "event_data.h" + +enum +{ + MAP_GRP = 0, // map group + MAP_NUM = 1, // map number +}; + +EWRAM_DATA static u8 sLocationHistory[3][2] = {0}; +EWRAM_DATA static u8 sRoamerLocation[2] = {0}; + +static const u8 sRoamerLocations[][6] = +{ + { 0x19, 0x1A, 0x20, 0x21, 0x31, 0xFF }, + { 0x1A, 0x19, 0x20, 0x21, 0xFF, 0xFF }, + { 0x20, 0x1A, 0x19, 0x21, 0xFF, 0xFF }, + { 0x21, 0x20, 0x19, 0x1A, 0x22, 0x26 }, + { 0x22, 0x21, 0x23, 0xFF, 0xFF, 0xFF }, + { 0x23, 0x22, 0x24, 0xFF, 0xFF, 0xFF }, + { 0x24, 0x23, 0x25, 0x26, 0xFF, 0xFF }, + { 0x25, 0x24, 0x26, 0xFF, 0xFF, 0xFF }, + { 0x26, 0x25, 0x21, 0xFF, 0xFF, 0xFF }, + { 0x27, 0x24, 0x28, 0x29, 0xFF, 0xFF }, + { 0x28, 0x27, 0x2A, 0xFF, 0xFF, 0xFF }, + { 0x29, 0x27, 0x2A, 0xFF, 0xFF, 0xFF }, + { 0x2A, 0x28, 0x29, 0x2B, 0xFF, 0xFF }, + { 0x2B, 0x2A, 0x2C, 0xFF, 0xFF, 0xFF }, + { 0x2C, 0x2B, 0x2D, 0xFF, 0xFF, 0xFF }, + { 0x2D, 0x2C, 0x2E, 0xFF, 0xFF, 0xFF }, + { 0x2E, 0x2D, 0x2F, 0xFF, 0xFF, 0xFF }, + { 0x2F, 0x2E, 0x30, 0xFF, 0xFF, 0xFF }, + { 0x30, 0x2F, 0x31, 0xFF, 0xFF, 0xFF }, + { 0x31, 0x30, 0x19, 0xFF, 0xFF, 0xFF }, + { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }, +}; + +void ClearRoamerData(void) +{ + memset(&gSaveBlock1Ptr->roamer, 0, sizeof(struct Roamer)); + (&gSaveBlock1Ptr->roamer)->species = SPECIES_LATIAS; +} + +void ClearRoamerLocationData(void) +{ + u8 i; + + for (i = 0; i < 3; i++) + { + sLocationHistory[i][MAP_GRP] = 0; + sLocationHistory[i][MAP_NUM] = 0; + } + + sRoamerLocation[MAP_GRP] = 0; + sRoamerLocation[MAP_NUM] = 0; +} + +static void CreateInitialRoamerMon(bool16 createLatios) +{ + if (!createLatios) + (&gSaveBlock1Ptr->roamer)->species = SPECIES_LATIAS; + else + (&gSaveBlock1Ptr->roamer)->species = SPECIES_LATIOS; + + CreateMon(&gEnemyParty[0], (&gSaveBlock1Ptr->roamer)->species, 40, 0x20, 0, 0, 0, 0); + (&gSaveBlock1Ptr->roamer)->level = 40; + (&gSaveBlock1Ptr->roamer)->status = 0; + (&gSaveBlock1Ptr->roamer)->active = TRUE; + (&gSaveBlock1Ptr->roamer)->ivs = GetMonData(&gEnemyParty[0], MON_DATA_IVS); + (&gSaveBlock1Ptr->roamer)->personality = GetMonData(&gEnemyParty[0], MON_DATA_PERSONALITY); + (&gSaveBlock1Ptr->roamer)->hp = GetMonData(&gEnemyParty[0], MON_DATA_MAX_HP); + (&gSaveBlock1Ptr->roamer)->cool = GetMonData(&gEnemyParty[0], MON_DATA_COOL); + (&gSaveBlock1Ptr->roamer)->beauty = GetMonData(&gEnemyParty[0], MON_DATA_BEAUTY); + (&gSaveBlock1Ptr->roamer)->cute = GetMonData(&gEnemyParty[0], MON_DATA_CUTE); + (&gSaveBlock1Ptr->roamer)->smart = GetMonData(&gEnemyParty[0], MON_DATA_SMART); + (&gSaveBlock1Ptr->roamer)->tough = GetMonData(&gEnemyParty[0], MON_DATA_TOUGH); + sRoamerLocation[MAP_GRP] = 0; + sRoamerLocation[MAP_NUM] = sRoamerLocations[Random() % 20][0]; +} + +void InitRoamer(void) +{ + ClearRoamerData(); + ClearRoamerLocationData(); + CreateInitialRoamerMon(gSpecialVar_0x8004); +} + +void UpdateLocationHistoryForRoamer(void) +{ + sLocationHistory[2][MAP_GRP] = sLocationHistory[1][MAP_GRP]; + sLocationHistory[2][MAP_NUM] = sLocationHistory[1][MAP_NUM]; + + sLocationHistory[1][MAP_GRP] = sLocationHistory[0][MAP_GRP]; + sLocationHistory[1][MAP_NUM] = sLocationHistory[0][MAP_NUM]; + + sLocationHistory[0][MAP_GRP] = gSaveBlock1Ptr->location.mapGroup; + sLocationHistory[0][MAP_NUM] = gSaveBlock1Ptr->location.mapNum; +} + +void RoamerMoveToOtherLocationSet(void) +{ + u8 val = 0; + struct Roamer *roamer = &gSaveBlock1Ptr->roamer; + + if (!roamer->active) + return; + + sRoamerLocation[MAP_GRP] = val; + + while (1) + { + val = sRoamerLocations[Random() % 20][0]; + if (sRoamerLocation[MAP_NUM] != val) + { + sRoamerLocation[MAP_NUM] = val; + return; + } + } +} + +void RoamerMove(void) +{ + u8 locSet = 0; + + if ((Random() % 16) == 0) + { + RoamerMoveToOtherLocationSet(); + } + else + { + struct Roamer *roamer = &gSaveBlock1Ptr->roamer; + + if (!roamer->active) + return; + + while (locSet < 20) + { + if (sRoamerLocation[MAP_NUM] == sRoamerLocations[locSet][0]) + { + u8 mapNum; + while (1) + { + mapNum = sRoamerLocations[locSet][(Random() % 5) + 1]; + if (!(sLocationHistory[2][MAP_GRP] == 0 && sLocationHistory[2][MAP_NUM] == mapNum) && mapNum != 0xFF) + break; + } + sRoamerLocation[MAP_NUM] = mapNum; + return; + } + locSet++; + } + } +} + +bool8 IsRoamerAt(u8 mapGroup, u8 mapNum) +{ + struct Roamer *roamer = &gSaveBlock1Ptr->roamer; + + if (roamer->active && mapGroup == sRoamerLocation[MAP_GRP] && mapNum == sRoamerLocation[MAP_NUM]) + return TRUE; + else + return FALSE; +} + +void CreateRoamerMonInstance(void) +{ + struct Pokemon *mon; + struct Roamer *roamer; + + mon = &gEnemyParty[0]; + ZeroEnemyPartyMons(); + roamer = &gSaveBlock1Ptr->roamer; + CreateMonWithIVsPersonality(mon, roamer->species, roamer->level, roamer->ivs, roamer->personality); + SetMonData(mon, MON_DATA_STATUS, &gSaveBlock1Ptr->roamer.status); + SetMonData(mon, MON_DATA_HP, &gSaveBlock1Ptr->roamer.hp); + SetMonData(mon, MON_DATA_COOL, &gSaveBlock1Ptr->roamer.cool); + SetMonData(mon, MON_DATA_BEAUTY, &gSaveBlock1Ptr->roamer.beauty); + SetMonData(mon, MON_DATA_CUTE, &gSaveBlock1Ptr->roamer.cute); + SetMonData(mon, MON_DATA_SMART, &gSaveBlock1Ptr->roamer.smart); + SetMonData(mon, MON_DATA_TOUGH, &gSaveBlock1Ptr->roamer.tough); +} + +bool8 TryStartRoamerEncounter(void) +{ + if (IsRoamerAt(gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum) == TRUE && (Random() % 4) == 0) + { + CreateRoamerMonInstance(); + return TRUE; + } + else + { + return FALSE; + } +} + +void UpdateRoamerHPStatus(struct Pokemon *mon) +{ + (&gSaveBlock1Ptr->roamer)->hp = GetMonData(mon, MON_DATA_HP); + (&gSaveBlock1Ptr->roamer)->status = GetMonData(mon, MON_DATA_STATUS); + + RoamerMoveToOtherLocationSet(); +} + +void SetRoamerInactive(void) +{ + struct Roamer *roamer = &gSaveBlock1Ptr->roamer; + roamer->active = FALSE; +} + +void GetRoamerLocation(u8 *mapGroup, u8 *mapNum) +{ + *mapGroup = sRoamerLocation[MAP_GRP]; + *mapNum = sRoamerLocation[MAP_NUM]; +} diff --git a/sym_ewram.txt b/sym_ewram.txt index d8cc646db..149e8fd1a 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -1550,11 +1550,7 @@ gUnknown_0203BC38: @ 203BC38 gDecorationInventories: @ 203BC40 .space 0x40 -sLocationHistory: @ 203BC80 - .space 0x6 - -sRoamerLocation: @ 203BC86 - .space 0x2 + .include "src/roamer.o" gUnknown_0203BC88: @ 203BC88 .space 0x4 From e41b9cbbb37c908f77a9ce440f33b76b35139311 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Fri, 29 Sep 2017 00:11:42 +0200 Subject: [PATCH 310/342] decompile money --- asm/item_menu.s | 2 +- asm/money.s | 311 ------------------------------------------- asm/scrcmd.s | 6 +- asm/shop.s | 8 +- data/graphics.s | 11 +- data/money.s | 13 -- data/naming_screen.s | 2 +- include/menu.h | 5 +- include/money.h | 10 ++ ld_script.txt | 3 +- src/coins.c | 3 +- src/money.c | 145 ++++++++++++++++++++ sym_ewram.txt | 9 +- 13 files changed, 180 insertions(+), 348 deletions(-) delete mode 100644 asm/money.s delete mode 100644 data/money.s diff --git a/asm/item_menu.s b/asm/item_menu.s index abac409bc..c1f94b4e9 100755 --- a/asm/item_menu.s +++ b/asm/item_menu.s @@ -6237,7 +6237,7 @@ bag_menu_AddMoney_window: @ 81AE268 adds r0, r4, 0 movs r1, 0x1 movs r2, 0xE - bl set_window_border_style_and_print_money_box + bl PrintMoneyAmountInMoneyBoxWithBorder movs r0, 0x13 movs r1, 0xB bl AddMoneyLabelObject diff --git a/asm/money.s b/asm/money.s deleted file mode 100644 index 53e795714..000000000 --- a/asm/money.s +++ /dev/null @@ -1,311 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - - - - - thumb_func_start sub_80E51B0 -sub_80E51B0: @ 80E51B0 - push {lr} - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - movs r1, 0x92 - lsls r1, 3 - adds r0, r1 - ldr r1, =gSpecialVar_0x8005 - ldrh r1, [r1] - bl IsEnoughMoney - lsls r0, 24 - lsrs r0, 24 - pop {r1} - bx r1 - .pool - thumb_func_end sub_80E51B0 - - thumb_func_start sub_80E51D4 -sub_80E51D4: @ 80E51D4 - push {lr} - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - movs r1, 0x92 - lsls r1, 3 - adds r0, r1 - ldr r1, =gSpecialVar_0x8005 - ldrh r1, [r1] - bl SubtractMoney - pop {r0} - bx r0 - .pool - thumb_func_end sub_80E51D4 - - thumb_func_start PrintMoneyAmountInMoneyBox -@ void PrintMoneyAmountInMoneyBox(u8 windowId, int amount, s8 a3) -PrintMoneyAmountInMoneyBox: @ 80E51F4 - push {lr} - sub sp, 0x4 - adds r3, r1, 0 - lsls r0, 24 - lsrs r0, 24 - lsls r2, 24 - lsrs r2, 24 - str r2, [sp] - movs r1, 0x26 - movs r2, 0x1 - bl PrintMoneyAmount - add sp, 0x4 - pop {r0} - bx r0 - thumb_func_end PrintMoneyAmountInMoneyBox - - thumb_func_start PrintMoneyAmount -@ void PrintMoneyAmount(u8 windowId, char x, char y, int amount, u8 a5) -PrintMoneyAmount: @ 80E5214 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0xC - ldr r4, [sp, 0x24] - lsls r0, 24 - lsrs r7, r0, 24 - lsls r1, 24 - lsrs r1, 24 - mov r8, r1 - lsls r2, 24 - lsrs r6, r2, 24 - lsls r4, 24 - lsrs r5, r4, 24 - ldr r4, =gStringVar1 - adds r0, r4, 0 - adds r1, r3, 0 - movs r2, 0 - movs r3, 0x6 - bl ConvertIntToDecimalStringN - adds r0, r4, 0 - bl StringLength - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x6 - subs r1, r0 - ldr r2, =gStringVar4 - adds r0, r1, 0 - subs r1, 0x1 - cmp r0, 0 - ble _080E5264 - movs r3, 0x77 -_080E5258: - strb r3, [r2] - adds r2, 0x1 - adds r0, r1, 0 - subs r1, 0x1 - cmp r0, 0 - bgt _080E5258 -_080E5264: - ldr r1, =gText_PokedollarVar1 - adds r0, r2, 0 - bl StringExpandPlaceholders - ldr r2, =gStringVar4 - str r6, [sp] - str r5, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x8] - adds r0, r7, 0 - movs r1, 0x1 - mov r3, r8 - bl PrintTextOnWindow - add sp, 0xC - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end PrintMoneyAmount - - thumb_func_start set_window_border_style_and_print_money_box -@ void set_window_border_style_and_print_money_box(u8 windowId, u16 tileStart, u8 palette, int amount) -set_window_border_style_and_print_money_box: @ 80E5298 - push {r4-r6,lr} - mov r6, r8 - push {r6} - adds r6, r0, 0 - adds r4, r1, 0 - adds r5, r2, 0 - mov r8, r3 - lsls r6, 24 - lsrs r6, 24 - lsls r4, 16 - lsrs r4, 16 - lsls r5, 24 - lsrs r5, 24 - adds r0, r6, 0 - movs r1, 0 - adds r2, r4, 0 - adds r3, r5, 0 - bl SetWindowBorderStyle - adds r0, r6, 0 - mov r1, r8 - movs r2, 0 - bl PrintMoneyAmountInMoneyBox - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end set_window_border_style_and_print_money_box - - thumb_func_start sub_80E52D4 -sub_80E52D4: @ 80E52D4 - push {lr} - adds r1, r0, 0 - ldr r0, =gUnknown_02039F98 - ldrb r0, [r0] - movs r2, 0 - bl PrintMoneyAmountInMoneyBox - pop {r0} - bx r0 - .pool - thumb_func_end sub_80E52D4 - - thumb_func_start sub_80E52EC -@ void sub_80E52EC(int money, int x, int y) -sub_80E52EC: @ 80E52EC - push {r4-r6,lr} - mov r6, r8 - push {r6} - sub sp, 0x18 - mov r8, r0 - adds r4, r1, 0 - adds r3, r2, 0 - lsls r4, 24 - lsls r3, 24 - lsrs r6, r4, 24 - movs r0, 0x80 - lsls r0, 17 - adds r4, r0 - lsrs r4, 24 - lsrs r5, r3, 24 - adds r3, r0 - lsrs r3, 24 - movs r0, 0xA - str r0, [sp] - movs r0, 0x2 - str r0, [sp, 0x4] - movs r0, 0xF - str r0, [sp, 0x8] - movs r0, 0x8 - str r0, [sp, 0xC] - add r0, sp, 0x10 - movs r1, 0 - adds r2, r4, 0 - bl SetWindowTemplateFields - ldr r4, =gUnknown_02039F98 - add r0, sp, 0x10 - bl AddWindow - strb r0, [r4] - ldrb r0, [r4] - movs r1, 0 - bl FillWindowPixelBuffer - ldrb r0, [r4] - bl PutWindowTilemap - ldrb r0, [r4] - movs r1, 0x1 - bl CopyWindowToVram - ldrb r0, [r4] - movs r1, 0x85 - lsls r1, 2 - movs r2, 0xE - mov r3, r8 - bl set_window_border_style_and_print_money_box - lsls r6, 19 - movs r0, 0x98 - lsls r0, 13 - adds r6, r0 - lsrs r6, 16 - lsls r5, 19 - movs r0, 0xB0 - lsls r0, 12 - adds r5, r0 - lsrs r5, 16 - adds r0, r6, 0 - adds r1, r5, 0 - bl AddMoneyLabelObject - add sp, 0x18 - pop {r3} - mov r8, r3 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80E52EC - - thumb_func_start sub_80E5384 -sub_80E5384: @ 80E5384 - push {r4,lr} - bl RemoveMoneyLabelObject - ldr r4, =gUnknown_02039F98 - ldrb r0, [r4] - movs r1, 0 - bl sub_8198070 - ldrb r0, [r4] - movs r1, 0x2 - bl CopyWindowToVram - ldrb r0, [r4] - bl RemoveWindow - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80E5384 - - thumb_func_start AddMoneyLabelObject -AddMoneyLabelObject: @ 80E53AC - push {r4,r5,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r4, 16 - lsrs r4, 16 - lsls r5, 16 - lsrs r5, 16 - ldr r0, =gUnknown_0858C2A4 - bl LoadCompressedObjectPic - ldr r0, =gUnknown_0858C2AC - bl LoadCompressedObjectPalette - ldr r0, =gUnknown_0858C28C - lsls r4, 16 - asrs r4, 16 - lsls r5, 16 - asrs r5, 16 - adds r1, r4, 0 - adds r2, r5, 0 - movs r3, 0 - bl CreateSprite - ldr r1, =gUnknown_02039F99 - strb r0, [r1] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end AddMoneyLabelObject - - thumb_func_start RemoveMoneyLabelObject -RemoveMoneyLabelObject: @ 80E53F4 - push {lr} - ldr r0, =gUnknown_02039F99 - ldrb r1, [r0] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - ldr r1, =gSprites - adds r0, r1 - bl DestroySpriteAndFreeResources - pop {r0} - bx r0 - .pool - thumb_func_end RemoveMoneyLabelObject - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/scrcmd.s b/asm/scrcmd.s index 7980ba564..1772c563f 100644 --- a/asm/scrcmd.s +++ b/asm/scrcmd.s @@ -4468,7 +4468,7 @@ s93_display_money: @ 809B500 bl GetMoney adds r1, r5, 0 adds r2, r4, 0 - bl sub_80E52EC + bl DrawMoneyBox _0809B530: movs r0, 0 pop {r4,r5} @@ -4480,7 +4480,7 @@ _0809B530: thumb_func_start s94_hide_money s94_hide_money: @ 809B53C push {lr} - bl sub_80E5384 + bl HideMoneyBox movs r0, 0 pop {r1} bx r1 @@ -4505,7 +4505,7 @@ s95_update_money: @ 809B548 lsls r1, 3 adds r0, r1 bl GetMoney - bl sub_80E52D4 + bl ChangeAmountInMoneyBox _0809B56E: movs r0, 0 pop {r1} diff --git a/asm/shop.s b/asm/shop.s index f4dacaa76..08e935bb1 100644 --- a/asm/shop.s +++ b/asm/shop.s @@ -1125,7 +1125,7 @@ BuyMenuInitBgs: @ 80E036C BuyMenuDecompressBgGraphics: @ 80E0424 push {lr} sub sp, 0x4 - ldr r1, =gUnknown_08D9AFBC + ldr r1, =gBuyMenuFrame_Gfx movs r2, 0xE8 lsls r2, 2 ldr r3, =0x000003e3 @@ -1133,11 +1133,11 @@ BuyMenuDecompressBgGraphics: @ 80E0424 str r0, [sp] movs r0, 0x1 bl decompress_and_copy_tile_data_to_vram - ldr r0, =gUnknown_08D9B0F0 + ldr r0, =gBuyMenuFrame_Tilemap ldr r1, =gUnknown_02039F70 ldr r1, [r1] bl LZDecompressWram - ldr r0, =gUnknown_08D9B0C8 + ldr r0, =gMenuMoneyPal movs r1, 0xC0 movs r2, 0x20 bl LoadCompressedPalette @@ -1259,7 +1259,7 @@ BuyMenuDrawGraphics: @ 80E0524 movs r0, 0 movs r1, 0x1 movs r2, 0xD - bl set_window_border_style_and_print_money_box + bl PrintMoneyAmountInMoneyBoxWithBorder movs r0, 0 bl schedule_bg_copy_tilemap_to_vram movs r0, 0x1 diff --git a/data/graphics.s b/data/graphics.s index 96aaf3911..26842d4ba 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -512,14 +512,17 @@ gUnknown_08D9AE04:: @ 8D9AE04 gUnknown_08D9AF44:: @ 8D9AF44 .incbin "baserom.gba", 0xd9af44, 0x78 -gUnknown_08D9AFBC:: @ 8D9AFBC +gBuyMenuFrame_Gfx:: @ 8D9AFBC .incbin "baserom.gba", 0xd9afbc, 0x10c -gUnknown_08D9B0C8:: @ 8D9B0C8 +gMenuMoneyPal:: @ 8D9B0C8 .incbin "baserom.gba", 0xd9b0c8, 0x28 -gUnknown_08D9B0F0:: @ 8D9B0F0 - .incbin "baserom.gba", 0xd9b0f0, 0x1c4 +gBuyMenuFrame_Tilemap:: @ 8D9B0F0 + .incbin "baserom.gba", 0xd9b0f0, 0x140 + +gMenuMoneyGfx:: @ 8D9B230 + .incbin "baserom.gba", 0xd9b230, 0x84 gUnknown_08D9B2B4:: @ 8D9B2B4 .incbin "baserom.gba", 0xd9b2b4, 0x1bc diff --git a/data/money.s b/data/money.s deleted file mode 100644 index d7457be46..000000000 --- a/data/money.s +++ /dev/null @@ -1,13 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -gUnknown_0858C28C:: @ 858C28C - .incbin "baserom.gba", 0x58c28c, 0x18 - -gUnknown_0858C2A4:: @ 858C2A4 - .incbin "baserom.gba", 0x58c2a4, 0x8 - -gUnknown_0858C2AC:: @ 858C2AC - .incbin "baserom.gba", 0x58c2ac, 0x8 diff --git a/data/naming_screen.s b/data/naming_screen.s index 352fac8e4..80cbd0b09 100644 --- a/data/naming_screen.s +++ b/data/naming_screen.s @@ -148,4 +148,4 @@ gUnknown_0858C1C8:: @ 858C1C8 .incbin "baserom.gba", 0x58c1c8, 0x68 gUnknown_0858C230:: @ 858C230 - .incbin "baserom.gba", 0x58c230, 0x5c + .incbin "baserom.gba", 0x58c230, 0x48 diff --git a/include/menu.h b/include/menu.h index 9a23401e0..766aa9d39 100644 --- a/include/menu.h +++ b/include/menu.h @@ -1,7 +1,7 @@ #ifndef GUARD_MENU_H #define GUARD_MENU_H -#include "text.h" +#include "window.h" struct MenuAction { @@ -16,5 +16,8 @@ struct MenuAction2 }; void box_print(u8, u8, u8, u8, const void *, s8, const u8 *); +void sub_8198070(u8 windowId, bool8 copyToVram); +void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock); +void SetWindowBorderStyle(u8 windowId, bool8 copyToVram, u16 tileStart, u8 palette); #endif // GUARD_MENU_H diff --git a/include/money.h b/include/money.h index 316dbd697..22a3657f6 100644 --- a/include/money.h +++ b/include/money.h @@ -6,5 +6,15 @@ void SetMoney(u32* moneyPtr, u32 newValue); bool8 IsEnoughMoney(u32* moneyPtr, u32 cost); void AddMoney(u32* moneyPtr, u32 toAdd); void SubtractMoney(u32* moneyPtr, u32 toSub); +bool8 IsEnoughForCostInVar0x8005(void); +void SubtractMoneyFromVar0x8005(void); +void PrintMoneyAmountInMoneyBox(u8 windowId, int amount, u8 speed); +void PrintMoneyAmount(u8 windowId, u8 x, u8 y, int amount, u8 speed); +void PrintMoneyAmountInMoneyBoxWithBorder(u8 windowId, u16 tileStart, u8 pallete, int amount); +void ChangeAmountInMoneyBox(int amount); +void DrawMoneyBox(int amount, u8 x, u8 y); +void HideMoneyBox(void); +void AddMoneyLabelObject(u16 x, u16 y); +void RemoveMoneyLabelObject(void); #endif // GUARD_MONEY_H diff --git a/ld_script.txt b/ld_script.txt index 64a43d573..37c8a3933 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -148,7 +148,6 @@ SECTIONS { asm/script_menu.o(.text); asm/naming_screen.o(.text); src/money.o(.text); - asm/money.o(.text); asm/contest_effect.o(.text); asm/record_mixing.o(.text); asm/secret_base.o(.text); @@ -386,7 +385,7 @@ SECTIONS { src/berry.o(.rodata); data/script_menu.o(.rodata); data/naming_screen.o(.rodata); - data/money.o(.rodata); + src/money.o(.rodata); data/contest_effect.o(.rodata); data/record_mixing.o(.rodata); data/secret_base.o(.rodata); diff --git a/src/coins.c b/src/coins.c index 84a79f5f2..4ee601b22 100644 --- a/src/coins.c +++ b/src/coins.c @@ -4,14 +4,13 @@ #include "window.h" #include "text_window.h" #include "string_util.h" +#include "menu.h" #define MAX_COINS 9999 EWRAM_DATA u8 sCoinsWindowId = 0; extern s32 GetStringRightAlignXOffset(u8 fontId, u8 *str, s32 totalWidth); -extern void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock); -extern void SetWindowBorderStyle(u8 windowId, bool8 copyToVram, s16 tileStart, s8 palette); extern void sub_819746C(u8 windowId, bool8 copyToVram); extern const u8 gText_Coins[]; diff --git a/src/money.c b/src/money.c index be64d9633..65a45b158 100644 --- a/src/money.c +++ b/src/money.c @@ -1,8 +1,77 @@ #include "global.h" #include "money.h" +#include "event_data.h" +#include "string_util.h" +#include "text.h" +#include "menu.h" +#include "window.h" +#include "sprite.h" +#include "decompress.h" + +extern const u8 gText_PokedollarVar1[]; + +extern const u8 gMenuMoneyGfx[]; +extern const u8 gMenuMoneyPal[]; #define MAX_MONEY 999999 +EWRAM_DATA static u8 sMoneyBoxWindowId = 0; +EWRAM_DATA static u8 sMoneyLabelSpriteId = 0; + +#define MONEY_LABEL_TAG 0x2722 + +static const struct OamData sOamData_MoneyLabel = +{ + .y = 0, + .affineMode = 0, + .objMode = 0, + .mosaic = 0, + .bpp = 0, + .shape = 1, + .x = 0, + .matrixNum = 0, + .size = 2, + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; + +static const union AnimCmd sSpriteAnim_MoneyLabel[] = +{ + ANIMCMD_FRAME(0, 0), + ANIMCMD_END +}; + +static const union AnimCmd *const sSpriteAnimTable_MoneyLabel[] = +{ + sSpriteAnim_MoneyLabel, +}; + +static const struct SpriteTemplate sSpriteTemplate_MoneyLabel = +{ + .tileTag = MONEY_LABEL_TAG, + .paletteTag = MONEY_LABEL_TAG, + .oam = &sOamData_MoneyLabel, + .anims = sSpriteAnimTable_MoneyLabel, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy +}; + +static const struct CompressedSpriteSheet sSpriteSheet_MoneyLabel = +{ + .data = gMenuMoneyGfx, + .size = 256, + .tag = MONEY_LABEL_TAG, +}; + +static const struct CompressedSpritePalette sSpritePalette_MoneyLabel = +{ + .data = gMenuMoneyPal, + .tag = MONEY_LABEL_TAG +}; + u32 GetMoney(u32* moneyPtr) { return *moneyPtr ^ gSaveBlock2Ptr->encryptionKey; @@ -53,3 +122,79 @@ void SubtractMoney(u32* moneyPtr, u32 toSub) SetMoney(moneyPtr, toSet); } + +bool8 IsEnoughForCostInVar0x8005(void) +{ + return IsEnoughMoney(&gSaveBlock1Ptr->money, gSpecialVar_0x8005); +} + +void SubtractMoneyFromVar0x8005(void) +{ + SubtractMoney(&gSaveBlock1Ptr->money, gSpecialVar_0x8005); +} + +void PrintMoneyAmountInMoneyBox(u8 windowId, int amount, u8 speed) +{ + PrintMoneyAmount(windowId, 0x26, 1, amount, speed); +} + +void PrintMoneyAmount(u8 windowId, u8 x, u8 y, int amount, u8 speed) +{ + u8 *txtPtr; + s32 strLength; + + ConvertIntToDecimalStringN(gStringVar1, amount, STR_CONV_MODE_LEFT_ALIGN, 6); + + strLength = 6 - StringLength(gStringVar1); + txtPtr = gStringVar4; + + while (strLength-- > 0) + *(txtPtr++) = 0x77; + + StringExpandPlaceholders(txtPtr, gText_PokedollarVar1); + PrintTextOnWindow(windowId, 1, gStringVar4, x, y, speed, NULL); +} + +void PrintMoneyAmountInMoneyBoxWithBorder(u8 windowId, u16 tileStart, u8 pallete, int amount) +{ + SetWindowBorderStyle(windowId, FALSE, tileStart, pallete); + PrintMoneyAmountInMoneyBox(windowId, amount, 0); +} + +void ChangeAmountInMoneyBox(int amount) +{ + PrintMoneyAmountInMoneyBox(sMoneyBoxWindowId, amount, 0); +} + +void DrawMoneyBox(int amount, u8 x, u8 y) +{ + struct WindowTemplate template; + + SetWindowTemplateFields(&template, 0, x + 1, y + 1, 10, 2, 15, 8); + sMoneyBoxWindowId = AddWindow(&template); + FillWindowPixelBuffer(sMoneyBoxWindowId, 0); + PutWindowTilemap(sMoneyBoxWindowId); + CopyWindowToVram(sMoneyBoxWindowId, 1); + PrintMoneyAmountInMoneyBoxWithBorder(sMoneyBoxWindowId, 0x214, 14, amount); + AddMoneyLabelObject((8 * x) + 19, (8 * y) + 11); +} + +void HideMoneyBox(void) +{ + RemoveMoneyLabelObject(); + sub_8198070(sMoneyBoxWindowId, FALSE); + CopyWindowToVram(sMoneyBoxWindowId, 2); + RemoveWindow(sMoneyBoxWindowId); +} + +void AddMoneyLabelObject(u16 x, u16 y) +{ + LoadCompressedObjectPic(&sSpriteSheet_MoneyLabel); + LoadCompressedObjectPalette(&sSpritePalette_MoneyLabel); + sMoneyLabelSpriteId = CreateSprite(&sSpriteTemplate_MoneyLabel, x, y, 0); +} + +void RemoveMoneyLabelObject(void) +{ + DestroySpriteAndFreeResources(&gSprites[sMoneyLabelSpriteId]); +} diff --git a/sym_ewram.txt b/sym_ewram.txt index d8cc646db..1cd5a1a60 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -1148,12 +1148,9 @@ gUnknown_02039F90: @ 2039F90 gUnknown_02039F94: @ 2039F94 .space 0x4 -gUnknown_02039F98: @ 2039F98 - .space 0x1 - -gUnknown_02039F99: @ 2039F99 - .space 0x3 - + .include "src/money.o" + + .align 2 gUnknown_02039F9C: @ 2039F9C .space 0x78 From eb4f195c19ecd8aa39f033146879707dc76298bf Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Fri, 29 Sep 2017 08:37:15 +0200 Subject: [PATCH 311/342] Update songs.h Thanks to Jughead Jones, Wobb, Lunos, Bela and anyone else who helped. --- include/songs.h | 98 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 95 insertions(+), 3 deletions(-) diff --git a/include/songs.h b/include/songs.h index afd26d683..d828e4068 100644 --- a/include/songs.h +++ b/include/songs.h @@ -15,8 +15,8 @@ enum /*0x09*/ SE_KAIDAN, /*0x0A*/ SE_DANSA, /*0x0B*/ SE_JITENSYA, - /*0x0C*/ SE_KOUKA_L, - /*0x0D*/ SE_KOUKA_M, + /*0x0C*/ SE_KOUKA_L, // Goggle told me Kouka means 'effectiveness' which makes sense, because + /*0x0D*/ SE_KOUKA_M, // those three sounds play whenever you use a move /*0x0E*/ SE_KOUKA_H, /*0x0F*/ SE_BOWA2, /*0x10*/ SE_POKE_DEAD, @@ -359,7 +359,24 @@ enum BGM_DAIGO, BGM_THANKFOR, BGM_END, - BGM_BATTLE27, // wild + /*0x1C9*/ BGM_BATTLE_FRONTIER, // human-readable names start here because we don't know the actual filenames + BGM_BATTLE_ARENA, + BGM_ME_BATTLE_POINTS, // ME_ as in messagebox? Used for KINOMI (berries) and stuff above + BGM_ME_MATCH_CALL, + BGM_BATTLE_PYRAMID, + BGM_BATTLE_PYRAMID_SUMMIT, + BGM_BATTLE_PALACE, + BGM_FANFA_RAYQUAZA, + BGM_BATTLE_TOWER, + BGM_ME_BATTLE_SYMBOL, + BGM_BATTLE_DOME_TOURNAMENT, + BGM_BATTLE_PIKE, + BGM_BATTLE_FACTORY, + BGM_BATTLE_LEGENDARY, + BGM_BATTLE_FRONTIER_BRAIN, + BGM_BATTLE_MEW, + BGM_BATTLE_DOME, // end of the human-readable names + /*0x1DA*/ BGM_BATTLE27, // wild BGM_BATTLE31, // aqua/magma grunt BGM_BATTLE20, // trainer BGM_BATTLE32, // gym leader @@ -369,6 +386,81 @@ enum BGM_BATTLE35, // rival BGM_BATTLE38, // elite four BGM_BATTLE30, // aqua/magma leader + /*0x1E4*/ BGM_FRLG_FOLLOW_ME, // FR/LG names not known, human-readable again! + BGM_FRLG_GAMECORNER, + BGM_FRLG_ROCKET_HIDEOUT, + BGM_FRLG_GYM, + BGM_FRLG_JIGGLYPUFF, + BGM_FRLG_OPENING, + BGM_FRLG_TITLE, + BGM_FRLG_CINNABAR_ISLAND, + BGM_FRLG_LAVENDER_TOWN, + BGM_FRLG_HEALING_TEST, + BGM_FRLG_BICYCLE, + BGM_FRLG_SUSPICIOUS_EYE, + BGM_FRLG_GIRL_EYE, + BGM_FRLG_BOY_EYE, + BGM_FRLG_CONGRATULATIONS_HALL_OF_FAME, + BGM_FRLG_VIRIDIAN_FOREST, + BGM_FRLG_MT_MOON, + BGM_FRLG_POKEMON_MANSION, + BGM_FRLG_CREDITS, + BGM_FRLG_ROUTE_1, + BGM_FRLG_ROUTE_24, + BGM_FRLG_ROUTE_3, + BGM_FRLG_ROUTE_11, + BGM_FRLG_INDIGO_PLATEAU, + BGM_FRLG_BATTLE_LEADER, + BGM_FRLG_BATTLE_TRAINER, + BGM_FRLG_BATTLE_WILD_POKEMON, + BGM_FRLG_BATTLE_CHAMPION, + BGM_FRLG_PALLET_TOWN, + BGM_FRLG_OAK_LAB, + BGM_FRLG_PROF_OAK, + BGM_FRLG_POKEMON_CENTER, + BGM_FRLG_SS_ANNE, + BGM_FRLG_SURF, + BGM_FRLG_POKEMON_TOWER, + BGM_FRLG_SILPH, + BGM_FRLG_CERULEAN_CITY, + BGM_FRLG_CELADON_CITY, + BGM_FRLG_KACHI_TRAINER, // KACHI used in RS test - victory + BGM_FRLG_KACHI_WILD_POKEMON, + BGM_FRLG_KACHI_LEADER, + BGM_FRLG_VERMILION_CITY, + BGM_FRLG_VIRIDIAN_CITY, + BGM_FRLG_RIVAL, + BGM_FRLG_RIVAL_POSTBATTLE, + BGM_FRLG_ME_POKEDEX_EVAL, + BGM_FRLG_ME_KEYITEM, + BGM_FRLG_FANFA_POKEMON_CAUGHT, + BGM_FRLG_FANFA_TRAINERCARD_PHOTO, + BGM_FRLG_GAMEFREAK_LOGO, + BGM_FRLG_CAUGHT_POKEMON, + BGM_FRLG_GAME_EXPLANATION_START, + BGM_FRLG_GAME_EXPLANATION_MIDDLE, + BGM_FRLG_GAME_EXPLANATION_END, + BGM_FRLG_POKEMON_JUMP, + BGM_FRLG_UNION_ROOM, + BGM_FRLG_POKEMON_NETWORK_CENTER, + BGM_FRLG_MYSTERY_GIFT, + BGM_FRLG_DODRIO_BERRY_PICK, + BGM_FRLG_MT_EMBER, + BGM_FRLG_TEACHY_TV_EPISODE, + BGM_FRLG_SEVII_ISLANDS, + BGM_FRLG_TANOBY_RUINS, + BGM_FRLG_ISLAND_ONE, + BGM_FRLG_ISLAND_FOUR, + BGM_FRLG_ISLAND_SIX, + BGM_FRLG_FLUTE, + BGM_FRLG_BATTLE_DEOXYS, + BGM_FRLG_BATTLE_MEWTWO, + BGM_FRLG_BATTLE_LEGENDARY, + BGM_FRLG_LEADER_EYE, + BGM_FRLG_DEOXYS_EYE, + BGM_FRLG_TRAINER_TOWER, + BGM_FRLG_HALL_OF_FAME_PALLET_TOWN, + /*0x22E*/BGM_FRLG_TEACHY_TV, }; #endif // GUARD_SONGS_H From 7b72c8376250f1f417f21fda34348fd1268e23f7 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Fri, 29 Sep 2017 10:06:36 +0200 Subject: [PATCH 312/342] finish save.c --- asm/save.s | 164 -------------------------------------------------- ld_script.txt | 1 - src/save.c | 162 ++++++++++++++++++++++++++++--------------------- 3 files changed, 95 insertions(+), 232 deletions(-) delete mode 100644 asm/save.s diff --git a/asm/save.s b/asm/save.s deleted file mode 100644 index 825da0756..000000000 --- a/asm/save.s +++ /dev/null @@ -1,164 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - - thumb_func_start sub_8153688 -sub_8153688: @ 8153688 - push {r4,lr} - lsls r0, 24 - lsrs r2, r0, 24 - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - ldr r1, =gTasks + 0x8 - adds r4, r0, r1 - movs r1, 0 - ldrsh r0, [r4, r1] - cmp r0, 0xB - bls _081536A2 - b _081537C2 -_081536A2: - lsls r0, 2 - ldr r1, =_081536B4 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081536B4: - .4byte _081536E4 - .4byte _081536F4 - .4byte _081536FE - .4byte _0815371A - .4byte _0815372C - .4byte _08153742 - .4byte _08153758 - .4byte _08153762 - .4byte _08153778 - .4byte _0815378C - .4byte _08153796 - .4byte _081537A8 -_081536E4: - ldr r0, =gSoftResetDisabled - movs r1, 0x1 - strb r1, [r0] - movs r0, 0x1 - strh r0, [r4] - b _081537C2 - .pool -_081536F4: - bl sub_800ADF8 - movs r0, 0x2 - strh r0, [r4] - b _081537C2 -_081536FE: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - beq _081537C2 - movs r1, 0x4 - ldrsh r0, [r4, r1] - cmp r0, 0 - bne _08153714 - bl save_serialize_map -_08153714: - movs r0, 0x3 - strh r0, [r4] - b _081537C2 -_0815371A: - movs r1, 0x4 - ldrsh r0, [r4, r1] - cmp r0, 0 - bne _08153726 - bl sub_8076D5C -_08153726: - bl sub_8153380 - b _08153752 -_0815372C: - ldrh r0, [r4, 0x2] - adds r0, 0x1 - strh r0, [r4, 0x2] - lsls r0, 16 - asrs r1, r0, 16 - cmp r1, 0x5 - bne _081537C2 - movs r0, 0 - strh r0, [r4, 0x2] - strh r1, [r4] - b _081537C2 -_08153742: - bl sub_81533AC - lsls r0, 24 - cmp r0, 0 - beq _08153752 - movs r0, 0x6 - strh r0, [r4] - b _081537C2 -_08153752: - movs r0, 0x4 - strh r0, [r4] - b _081537C2 -_08153758: - bl sub_81533E0 - movs r0, 0x7 - strh r0, [r4] - b _081537C2 -_08153762: - movs r1, 0x4 - ldrsh r0, [r4, r1] - cmp r0, 0 - bne _0815376E - bl sav2_gender2_inplace_and_xFE -_0815376E: - bl sub_800ADF8 - movs r0, 0x8 - strh r0, [r4] - b _081537C2 -_08153778: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - beq _081537C2 - bl sub_8153408 - movs r0, 0x9 - strh r0, [r4] - b _081537C2 -_0815378C: - bl sub_800ADF8 - movs r0, 0xA - strh r0, [r4] - b _081537C2 -_08153796: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - beq _081537C2 - ldrh r0, [r4] - adds r0, 0x1 - strh r0, [r4] - b _081537C2 -_081537A8: - ldrh r0, [r4, 0x2] - adds r0, 0x1 - strh r0, [r4, 0x2] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x5 - ble _081537C2 - ldr r1, =gSoftResetDisabled - movs r0, 0 - strb r0, [r1] - adds r0, r2, 0 - bl DestroyTask -_081537C2: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8153688 - - .align 2, 0 @ Don't pad with nop. diff --git a/ld_script.txt b/ld_script.txt index 64a43d573..964a73667 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -200,7 +200,6 @@ SECTIONS { asm/roulette_util.o(.text); asm/cable_car_util.o(.text); src/save.o(.text); - asm/save.o(.text); asm/mystery_event_script.o(.text); asm/field_effect_helpers.o(.text); asm/contest_ai.o(.text); diff --git a/src/save.c b/src/save.c index 5ca855247..aee20d451 100644 --- a/src/save.c +++ b/src/save.c @@ -2,12 +2,15 @@ #include "gba/flash_internal.h" #include "save.h" #include "game_stat.h" +#include "task.h" -extern struct SaveSectionOffsets gSaveSectionOffsets[0xE]; extern struct SaveSectionLocation gRamSaveSectionLocations[0xE]; extern u8 gDecompressionBuffer[]; extern u32 gFlashMemoryPresent; extern u16 gUnknown_03006294; +extern bool8 gSoftResetDisabled; + +extern const struct SaveSectionOffsets gSaveSectionOffsets[0xE]; extern void DoSaveFailedScreen(u8); // save_failed_screen extern void LoadSerializedGame(void); // load_save @@ -576,84 +579,27 @@ u16 CalculateChecksum(void *data, u16 size) return ((checksum >> 16) + checksum); } -#ifdef NONMATCHING -// the initial allocation of the pointer and toAdd variable doesnt match up with the original function. however, forcing it is impossible since gRamSaveSectionLocations is loaded first. void UpdateSaveAddresses(void) { int i = 0; - gRamSaveSectionLocations[i].data = gSaveBlock2Ptr + gSaveSectionOffsets[0].toAdd; - gRamSaveSectionLocations[i].size = gSaveSectionOffsets[0].size; - for(i = 1; i < 5; i++) + gRamSaveSectionLocations[i].data = (void*)(gSaveBlock2Ptr) + gSaveSectionOffsets[i].toAdd; + gRamSaveSectionLocations[i].size = gSaveSectionOffsets[i].size; + + for (i = 1; i < 5; i++) { - gRamSaveSectionLocations[i].data = gSaveBlock1Ptr + gSaveSectionOffsets[i].toAdd; + gRamSaveSectionLocations[i].data = (void*)(gSaveBlock1Ptr) + gSaveSectionOffsets[i].toAdd; gRamSaveSectionLocations[i].size = gSaveSectionOffsets[i].size; } - for(i = 5; i < 14; i++) + for (i = 5; i < 14; i++) { - gRamSaveSectionLocations[i].data = gPokemonStoragePtr + gSaveSectionOffsets[i].toAdd; + gRamSaveSectionLocations[i].data = (void*)(gPokemonStoragePtr) + gSaveSectionOffsets[i].toAdd; gRamSaveSectionLocations[i].size = gSaveSectionOffsets[i].size; + + i++;i--; // needed to match } } -#else -__attribute__((naked)) -void UpdateSaveAddresses(void) -{ - asm(".syntax unified\n\ - push {r4,r5,lr}\n\ - ldr r3, =gRamSaveSectionLocations\n\ - ldr r0, =gSaveBlock2Ptr\n\ - ldr r2, =gSaveSectionOffsets\n\ - ldrh r1, [r2]\n\ - ldr r0, [r0]\n\ - adds r0, r1\n\ - str r0, [r3]\n\ - ldrh r0, [r2, 0x2]\n\ - strh r0, [r3, 0x4]\n\ - ldr r5, =gSaveBlock1Ptr\n\ - adds r3, 0x8\n\ - adds r2, 0x4\n\ - movs r4, 0x3\n\ -_081531AC:\n\ - ldrh r0, [r2]\n\ - ldr r1, [r5]\n\ - adds r1, r0\n\ - str r1, [r3]\n\ - ldrh r0, [r2, 0x2]\n\ - strh r0, [r3, 0x4]\n\ - adds r3, 0x8\n\ - adds r2, 0x4\n\ - subs r4, 0x1\n\ - cmp r4, 0\n\ - bge _081531AC\n\ - movs r4, 0x5\n\ - ldr r1, =gRamSaveSectionLocations\n\ - ldr r5, =gPokemonStoragePtr\n\ - ldr r0, =gSaveSectionOffsets\n\ - adds r3, r1, 0\n\ - adds r3, 0x28\n\ - adds r2, r0, 0\n\ - adds r2, 0x14\n\ -_081531D2:\n\ - ldrh r0, [r2]\n\ - ldr r1, [r5]\n\ - adds r1, r0\n\ - str r1, [r3]\n\ - ldrh r0, [r2, 0x2]\n\ - strh r0, [r3, 0x4]\n\ - adds r3, 0x8\n\ - adds r2, 0x4\n\ - adds r4, 0x1\n\ - cmp r4, 0xD\n\ - ble _081531D2\n\ - pop {r4,r5}\n\ - pop {r0}\n\ - bx r0\n\ - .pool\n\ - .syntax divided"); -} -#endif extern u32 GetGameStat(u8 index); // rom4 extern void IncrementGameStat(u8 index); // rom4 @@ -894,3 +840,85 @@ u32 sub_8153634(u8 sector, u8* src) return 0xFF; return 1; } + +extern void save_serialize_map(void); +extern void sub_8076D5C(void); +extern void sav2_gender2_inplace_and_xFE(void); +extern void sub_800ADF8(void); +extern bool8 sub_800A520(void); + +void sub_8153688(u8 taskId) +{ + s16* taskData = gTasks[taskId].data; + + switch (taskData[0]) + { + case 0: + gSoftResetDisabled = TRUE; + taskData[0] = 1; + break; + case 1: + sub_800ADF8(); + taskData[0] = 2; + break; + case 2: + if (sub_800A520()) + { + if (taskData[2] == 0) + save_serialize_map(); + taskData[0] = 3; + } + break; + case 3: + if (taskData[2] == 0) + sub_8076D5C(); + sub_8153380(); + taskData[0] = 4; + break; + case 4: + if (++taskData[1] == 5) + { + taskData[1] = 0; + taskData[0] = 5; + } + break; + case 5: + if (sub_81533AC()) + taskData[0] = 6; + else + taskData[0] = 4; + break; + case 6: + sub_81533E0(); + taskData[0] = 7; + break; + case 7: + if (taskData[2] == 0) + sav2_gender2_inplace_and_xFE(); + sub_800ADF8(); + taskData[0] = 8; + break; + case 8: + if (sub_800A520()) + { + sub_8153408(); + taskData[0] = 9; + } + break; + case 9: + sub_800ADF8(); + taskData[0] = 10; + break; + case 10: + if (sub_800A520()) + taskData[0]++; + break; + case 11: + if (++taskData[1] > 5) + { + gSoftResetDisabled = FALSE; + DestroyTask(taskId); + } + break; + } +} From 5d56361973de99d20e099e787da6d587ffb8d35f Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Fri, 29 Sep 2017 11:02:18 +0200 Subject: [PATCH 313/342] finish pokemon 2 file --- asm/pokemon_2.s | 356 ------------------------------------------------ ld_script.txt | 1 - src/pokemon_2.c | 16 +-- 3 files changed, 4 insertions(+), 369 deletions(-) delete mode 100644 asm/pokemon_2.s diff --git a/asm/pokemon_2.s b/asm/pokemon_2.s deleted file mode 100644 index 17856f6d3..000000000 --- a/asm/pokemon_2.s +++ /dev/null @@ -1,356 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start CopyPlayerPartyMonToBattleData -CopyPlayerPartyMonToBattleData: @ 806B9FC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x18 - lsls r0, 24 - lsrs r0, 24 - str r0, [sp, 0x14] - lsls r1, 24 - lsrs r1, 24 - mov r9, r1 - movs r0, 0x64 - mov r5, r9 - muls r5, r0 - ldr r0, =gPlayerParty - adds r5, r0 - adds r0, r5, 0 - movs r1, 0xB - movs r2, 0 - bl GetMonData - ldr r1, =gBattleMons - mov r8, r1 - movs r1, 0x58 - ldr r2, [sp, 0x14] - adds r4, r2, 0 - muls r4, r1 - mov r3, r8 - adds r6, r4, r3 - strh r0, [r6] - adds r0, r5, 0 - movs r1, 0xC - movs r2, 0 - bl GetMonData - strh r0, [r6, 0x2E] - movs r6, 0 - mov r0, r8 - adds r0, 0x24 - adds r7, r4, r0 -_0806BA4E: - adds r1, r6, 0 - adds r1, 0xD - adds r0, r5, 0 - movs r2, 0 - bl GetMonData - movs r1, 0xC - add r1, r8 - mov r10, r1 - adds r1, r4, r1 - strh r0, [r1] - adds r1, r6, 0 - adds r1, 0x11 - adds r0, r5, 0 - movs r2, 0 - bl GetMonData - strb r0, [r7] - adds r7, 0x1 - adds r4, 0x2 - adds r6, 0x1 - cmp r6, 0x3 - ble _0806BA4E - movs r0, 0x64 - mov r4, r9 - muls r4, r0 - ldr r0, =gPlayerParty - adds r4, r0 - adds r0, r4, 0 - movs r1, 0x15 - movs r2, 0 - bl GetMonData - movs r2, 0xC - negs r2, r2 - add r2, r10 - mov r9, r2 - movs r1, 0x58 - ldr r3, [sp, 0x14] - adds r5, r3, 0 - muls r5, r1 - adds r7, r5, r2 - adds r1, r7, 0 - adds r1, 0x3B - strb r0, [r1] - adds r0, r4, 0 - movs r1, 0x20 - movs r2, 0 - bl GetMonData - adds r1, r7, 0 - adds r1, 0x2B - strb r0, [r1] - adds r0, r4, 0 - movs r1, 0x19 - movs r2, 0 - bl GetMonData - mov r1, r10 - adds r1, 0x38 - adds r1, r5, r1 - str r0, [r1] - adds r0, r4, 0 - movs r1, 0x27 - movs r2, 0 - bl GetMonData - movs r6, 0x1F - ands r0, r6 - ldrb r2, [r7, 0x14] - movs r1, 0x20 - negs r1, r1 - ands r1, r2 - orrs r1, r0 - strb r1, [r7, 0x14] - adds r0, r4, 0 - movs r1, 0x28 - movs r2, 0 - bl GetMonData - movs r1, 0x1F - mov r8, r1 - mov r2, r8 - ands r0, r2 - lsls r0, 5 - ldrh r2, [r7, 0x14] - ldr r1, =0xfffffc1f - ands r1, r2 - orrs r1, r0 - strh r1, [r7, 0x14] - adds r0, r4, 0 - movs r1, 0x29 - movs r2, 0 - bl GetMonData - ands r0, r6 - lsls r0, 2 - ldrb r2, [r7, 0x15] - movs r1, 0x7D - negs r1, r1 - ands r1, r2 - orrs r1, r0 - strb r1, [r7, 0x15] - adds r0, r4, 0 - movs r1, 0x2A - movs r2, 0 - bl GetMonData - movs r1, 0x1F - ands r1, r0 - lsls r1, 15 - ldr r0, [r7, 0x14] - ldr r2, =0xfff07fff - ands r0, r2 - orrs r0, r1 - str r0, [r7, 0x14] - adds r0, r4, 0 - movs r1, 0x2B - movs r2, 0 - bl GetMonData - mov r3, r8 - ands r0, r3 - lsls r0, 4 - ldrh r2, [r7, 0x16] - ldr r1, =0xfffffe0f - ands r1, r2 - orrs r1, r0 - strh r1, [r7, 0x16] - adds r0, r4, 0 - movs r1, 0x2C - movs r2, 0 - bl GetMonData - ands r0, r6 - lsls r0, 1 - ldrb r2, [r7, 0x17] - movs r1, 0x3F - negs r1, r1 - ands r1, r2 - orrs r1, r0 - strb r1, [r7, 0x17] - adds r0, r4, 0 - movs r1, 0 - movs r2, 0 - bl GetMonData - mov r1, r10 - adds r1, 0x3C - adds r1, r5, r1 - str r0, [r1] - adds r0, r4, 0 - movs r1, 0x37 - movs r2, 0 - bl GetMonData - mov r1, r10 - adds r1, 0x40 - adds r1, r5, r1 - str r0, [r1] - adds r0, r4, 0 - movs r1, 0x38 - movs r2, 0 - bl GetMonData - adds r1, r7, 0 - adds r1, 0x2A - strb r0, [r1] - adds r0, r4, 0 - movs r1, 0x39 - movs r2, 0 - bl GetMonData - strh r0, [r7, 0x28] - adds r0, r4, 0 - movs r1, 0x3A - movs r2, 0 - bl GetMonData - strh r0, [r7, 0x2C] - adds r0, r4, 0 - movs r1, 0x3B - movs r2, 0 - bl GetMonData - strh r0, [r7, 0x2] - adds r0, r4, 0 - movs r1, 0x3C - movs r2, 0 - bl GetMonData - strh r0, [r7, 0x4] - adds r0, r4, 0 - movs r1, 0x3D - movs r2, 0 - bl GetMonData - strh r0, [r7, 0x6] - adds r0, r4, 0 - movs r1, 0x3E - movs r2, 0 - bl GetMonData - strh r0, [r7, 0x8] - adds r0, r4, 0 - movs r1, 0x3F - movs r2, 0 - bl GetMonData - strh r0, [r7, 0xA] - adds r0, r4, 0 - movs r1, 0x2D - movs r2, 0 - bl GetMonData - movs r1, 0x1 - ands r0, r1 - lsls r0, 6 - ldrb r2, [r7, 0x17] - movs r1, 0x41 - negs r1, r1 - ands r1, r2 - orrs r1, r0 - strb r1, [r7, 0x17] - adds r0, r4, 0 - movs r1, 0x2E - movs r2, 0 - bl GetMonData - lsls r0, 7 - ldrb r2, [r7, 0x17] - movs r1, 0x7F - ands r1, r2 - orrs r1, r0 - strb r1, [r7, 0x17] - adds r0, r4, 0 - movs r1, 0x1 - movs r2, 0 - bl GetMonData - mov r1, r10 - adds r1, 0x48 - adds r1, r5, r1 - str r0, [r1] - ldr r2, =gBaseStats - ldrh r1, [r7] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x6] - adds r1, r7, 0 - adds r1, 0x21 - strb r0, [r1] - ldrh r1, [r7] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x7] - adds r1, r7, 0 - adds r1, 0x22 - strb r0, [r1] - ldrh r0, [r7] - ldrb r1, [r7, 0x17] - lsrs r1, 7 - bl GetAbilityBySpecies - adds r1, r7, 0 - adds r1, 0x20 - strb r0, [r1] - adds r0, r4, 0 - movs r1, 0x2 - mov r2, sp - bl GetMonData - mov r0, r10 - adds r0, 0x24 - adds r0, r5, r0 - mov r1, sp - bl StringCopy10 - mov r2, r10 - adds r2, 0x30 - adds r2, r5, r2 - adds r0, r4, 0 - movs r1, 0x7 - bl GetMonData - ldr r0, [sp, 0x14] - bl GetBankSide - ldr r1, =gBattleStruct - lsls r0, 24 - lsrs r0, 23 - adds r0, 0xA8 - ldr r1, [r1] - adds r1, r0 - ldrh r0, [r7, 0x28] - strh r0, [r1] - movs r2, 0x6 - mov r1, r9 - movs r6, 0x7 - add r5, r10 - adds r0, r5, 0 - adds r0, 0x13 -_0806BCB2: - strb r2, [r0] - subs r0, 0x1 - subs r6, 0x1 - cmp r6, 0 - bge _0806BCB2 - movs r2, 0 - movs r0, 0x58 - ldr r3, [sp, 0x14] - muls r0, r3 - adds r1, 0x50 - adds r0, r1 - str r2, [r0] - ldr r0, [sp, 0x14] - bl sub_803FA70 - ldr r0, [sp, 0x14] - movs r1, 0 - bl sub_805EF84 - add sp, 0x18 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end CopyPlayerPartyMonToBattleData - - .align 2, 0 @ Don't pad with nop. diff --git a/ld_script.txt b/ld_script.txt index 64a43d573..f2cbf5db1 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -71,7 +71,6 @@ SECTIONS { asm/pokemon_1.o(.text); src/calculate_base_damage.o(.text); src/pokemon_2.o(.text); - asm/pokemon_2.o(.text); asm/pokemon_item_effect.o(.text); src/pokemon_3.o(.text); asm/pokemon_3.o(.text); diff --git a/src/pokemon_2.c b/src/pokemon_2.c index cf073570d..1f5098830 100644 --- a/src/pokemon_2.c +++ b/src/pokemon_2.c @@ -1308,10 +1308,9 @@ void sub_805EF84(u8 bank, bool8); extern struct BattlePokemon gBattleMons[4]; -/* - void CopyPlayerPartyMonToBattleData(u8 bank, u8 partyIndex) { + u16* hpSwitchout; s32 i; u8 nickname[POKEMON_NAME_LENGTH * 2]; @@ -1352,15 +1351,9 @@ void CopyPlayerPartyMonToBattleData(u8 bank, u8 partyIndex) GetMonData(&gPlayerParty[partyIndex], MON_DATA_NICKNAME, nickname); StringCopy10(gBattleMons[bank].nickname, nickname); GetMonData(&gPlayerParty[partyIndex], MON_DATA_OT_NAME, gBattleMons[bank].otName); - // ewram memes from Ruby return - #ifdef NONMATCHING - gBattleStruct->hpOnSwitchout[GetBankSide(bank)] = gBattleMons[bank].hp; - #else - { - u32 side = GetBankSide(bank); - *(u16*)((void*)(gBattleStruct) + side) = gBattleMons[bank].hp; - } - #endif // NONMATCHING + + hpSwitchout = &gBattleStruct->hpOnSwitchout[GetBankSide(bank)]; + *hpSwitchout = gBattleMons[bank].hp; for (i = 0; i < 8; i++) gBattleMons[bank].statStages[i] = 6; @@ -1369,4 +1362,3 @@ void CopyPlayerPartyMonToBattleData(u8 bank, u8 partyIndex) sub_803FA70(bank); sub_805EF84(bank, FALSE); } -*/ From f5387cf6b18b57f3620c05d652a9cf5b8bc2f347 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Fri, 29 Sep 2017 19:03:50 +0200 Subject: [PATCH 314/342] decompile metatile behav --- asm/battle_setup.s | 10 +- asm/decoration.s | 28 +- asm/field_control_avatar.s | 96 +- asm/field_door.s | 8 +- asm/field_effect_helpers.s | 6 +- asm/field_player_avatar.s | 4 +- asm/field_screen.s | 4 +- asm/field_tasks.s | 32 +- asm/fldeff_80F9BCC.s | 6 +- asm/fldeff_cut.s | 10 +- asm/item_use.s | 2 +- asm/metatile_behavior.s | 2610 ------------------- asm/pokenav.s | 2 +- asm/rom4.s | 6 +- asm/secret_base.s | 16 +- asm/wild_encounter.s | 12 +- data/{metatile_behavior.s => rom_8486FEC.s} | 4 +- include/metatile_behavior.h | 156 +- include/metatile_behaviors.h | 179 ++ ld_script.txt | 5 +- src/field_map_obj.c | 2 +- src/metatile_behavior.c | 1436 ++++++++++ 22 files changed, 1889 insertions(+), 2745 deletions(-) delete mode 100644 asm/metatile_behavior.s rename data/{metatile_behavior.s => rom_8486FEC.s} (60%) create mode 100644 include/metatile_behaviors.h create mode 100644 src/metatile_behavior.c diff --git a/asm/battle_setup.s b/asm/battle_setup.s index 752e4adf1..c2c762e96 100644 --- a/asm/battle_setup.s +++ b/asm/battle_setup.s @@ -704,7 +704,7 @@ _080B0C64: lsls r0, r5, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl sub_8089588 + bl MetatileBehavior_IsMB_0B lsls r0, 24 cmp r0, 0 beq _080B0C78 @@ -734,7 +734,7 @@ _080B0C9C: lsls r0, r5, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl sub_808962C + bl MetatileBehavior_IsDeepOrOceanWater lsls r0, 24 cmp r0, 0 bne _080B0CF2 @@ -744,7 +744,7 @@ _080B0C9C: cmp r0, 0 bne _080B0CE0 adds r0, r4, 0 - bl sub_808959C + bl MetatileBehavior_IsMountain lsls r0, 24 cmp r0, 0 beq _080B0CC8 @@ -757,7 +757,7 @@ _080B0CC8: cmp r0, 0 beq _080B0CF6 adds r0, r4, 0 - bl sub_80894D4 + bl MetatileBehavior_GetBridgeSth lsls r0, 24 cmp r0, 0 beq _080B0CE4 @@ -766,7 +766,7 @@ _080B0CE0: b _080B0D1A _080B0CE4: adds r0, r4, 0 - bl sub_80894AC + bl MetatileBehavior_IsBridge lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 diff --git a/asm/decoration.s b/asm/decoration.s index 9b65c7c79..89bfbe3bf 100644 --- a/asm/decoration.s +++ b/asm/decoration.s @@ -2222,7 +2222,7 @@ _08127C0A: lsls r4, r0, 16 lsls r0, r4, 8 lsrs r0, 24 - bl sub_80892D8 + bl MetatileBehavior_IsMB_B9 lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -2257,7 +2257,7 @@ _08127C64: bl MapGridGetMetatileBehaviorAt lsls r0, 24 lsrs r0, 24 - bl sub_8089328 + bl MetatileBehavior_IsMB_B7 lsls r0, 24 lsrs r0, 24 movs r6, 0x1 @@ -3189,7 +3189,7 @@ sub_8128484: @ 8128484 lsrs r0, 24 lsls r1, 16 lsrs r4, r1, 16 - bl sub_80892C4 + bl MetatileBehavior_IsMB_B3 lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -3257,7 +3257,7 @@ sub_81284F4: @ 81284F4 lsls r0, r6, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl sub_80892C4 + bl MetatileBehavior_IsMB_B3 lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -3266,7 +3266,7 @@ sub_81284F4: @ 81284F4 cmp r0, 0x21 bne _08128522 adds r0, r4, 0 - bl sub_8089378 + bl MetatileBehavior_IsMB_C2 lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -3274,7 +3274,7 @@ sub_81284F4: @ 81284F4 _08128522: lsls r0, r6, 24 lsrs r0, 24 - bl sub_8089314 + bl MetatileBehavior_IsNormal lsls r0, 24 cmp r0, 0 beq _08128534 @@ -3520,7 +3520,7 @@ _081286B8: adds r5, r1, 0 ands r5, r0 adds r0, r4, 0 - bl sub_8089314 + bl MetatileBehavior_IsNormal lsls r0, 24 cmp r0, 0 bne _08128724 @@ -3625,12 +3625,12 @@ _08128790: adds r5, r1, 0 ands r5, r0 adds r0, r4, 0 - bl sub_8089314 + bl MetatileBehavior_IsNormal lsls r0, 24 cmp r0, 0 bne _081287F2 adds r0, r4, 0 - bl sub_8089328 + bl MetatileBehavior_IsMB_B7 lsls r0, 24 cmp r0, 0 bne _081287F2 @@ -3707,7 +3707,7 @@ _08128868: bl MapGridGetMetatileBehaviorAt lsls r0, 24 lsrs r0, 24 - bl sub_8089328 + bl MetatileBehavior_IsMB_B7 lsls r0, 24 cmp r0, 0 beq _0812890C @@ -3772,7 +3772,7 @@ _081288D8: bne _08128910 _08128900: adds r0, r4, 0 - bl sub_8089364 + bl MetatileBehavior_IsMB_C3 lsls r0, 24 cmp r0, 0 bne _0812891C @@ -3781,7 +3781,7 @@ _0812890C: b _0812893E _08128910: adds r0, r4, 0 - bl sub_8089350 + bl MetatileBehavior_IsMB_B5 lsls r0, 24 cmp r0, 0 beq _08128900 @@ -6182,13 +6182,13 @@ _08129CA8: lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl sub_8089288 + bl MetatileBehavior_IsSecretBasePC lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 beq _08129CDE adds r0, r4, 0 - bl sub_8089404 + bl MetatileBehavior_IsMB_C5 lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 diff --git a/asm/field_control_avatar.s b/asm/field_control_avatar.s index 5c515ae3d..0a71a6f49 100644 --- a/asm/field_control_avatar.s +++ b/asm/field_control_avatar.s @@ -51,7 +51,7 @@ process_overworld_input: @ 809BF08 bl cur_mapdata_block_role_at_player_pos lsls r0, 24 lsrs r0, 24 - bl sub_808904C + bl MetatileBehavior_IsMoveTile lsls r0, 24 lsrs r7, r0, 24 cmp r6, 0x2 @@ -831,7 +831,7 @@ _0809C55C: .pool _0809C574: adds r0, r5, 0 - bl is_tile_x8B + bl MetatileBehavior_IsClosedSootopolisGymDoor lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -841,7 +841,7 @@ _0809C574: .pool _0809C58C: adds r0, r5, 0 - bl is_tile_xEA + bl MetatileBehavior_IsUnknownClosedDoor lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -851,7 +851,7 @@ _0809C58C: .pool _0809C5A4: adds r0, r5, 0 - bl is_tile_x84 + bl MetatileBehavior_IsCableBoxResults1 lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -859,7 +859,7 @@ _0809C5A4: b _0809C6E4 _0809C5B4: adds r0, r5, 0 - bl is_tile_x87 + bl MetatileBehavior_IsPokeblockFeeder lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -869,7 +869,7 @@ _0809C5B4: .pool _0809C5CC: adds r0, r5, 0 - bl is_tile_x8C + bl MetatileBehavior_IsTrickHousePuzzleDoor lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -879,7 +879,7 @@ _0809C5CC: .pool _0809C5E4: adds r0, r5, 0 - bl is_tile_x85 + bl MetatileBehavior_IsRegionMap lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -889,7 +889,7 @@ _0809C5E4: .pool _0809C5FC: adds r0, r5, 0 - bl sub_8089A1C + bl MetatileBehavior_IsRunningShoesInstruction lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -899,7 +899,7 @@ _0809C5FC: .pool _0809C614: adds r0, r5, 0 - bl sub_8089A30 + bl MetatileBehavior_IsPictureBookShelf lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -909,7 +909,7 @@ _0809C614: .pool _0809C62C: adds r0, r5, 0 - bl sub_8089A44 + bl MetatileBehavior_IsBookShelf lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -919,7 +919,7 @@ _0809C62C: .pool _0809C644: adds r0, r5, 0 - bl sub_8089A58 + bl MetatileBehavior_IsPokeCenterBookShelf lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -929,7 +929,7 @@ _0809C644: .pool _0809C65C: adds r0, r5, 0 - bl sub_8089A6C + bl MetatileBehavior_IsVase lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -939,7 +939,7 @@ _0809C65C: .pool _0809C674: adds r0, r5, 0 - bl sub_8089A80 + bl MetatileBehavior_IsTrashCan lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -949,7 +949,7 @@ _0809C674: .pool _0809C68C: adds r0, r5, 0 - bl sub_8089A94 + bl MetatileBehavior_IsShopShelf lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -959,7 +959,7 @@ _0809C68C: .pool _0809C6A4: adds r0, r5, 0 - bl sub_8089AA8 + bl MetatileBehavior_IsBlueprint lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -970,7 +970,7 @@ _0809C6A4: _0809C6BC: adds r0, r5, 0 adds r1, r4, 0 - bl sub_8089AD0 + bl MetatileBehavior_IsPlayerFacingWirelessBoxResults lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -981,7 +981,7 @@ _0809C6BC: _0809C6D4: adds r0, r5, 0 adds r1, r4, 0 - bl sub_8089AEC + bl MetatileBehavior_IsCableBoxResults2 lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1023,7 +1023,7 @@ _0809C71C: cmp r4, r0 bne _0809C7D0 adds r0, r5, 0 - bl sub_8089288 + bl MetatileBehavior_IsSecretBasePC lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1033,7 +1033,7 @@ _0809C71C: .pool _0809C74C: adds r0, r5, 0 - bl sub_808929C + bl MetatileBehavior_IsSecretBaseRegisterPC lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1043,7 +1043,7 @@ _0809C74C: .pool _0809C764: adds r0, r5, 0 - bl sub_80893DC + bl MetatileBehavior_IsMB_BF lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1053,7 +1053,7 @@ _0809C764: .pool _0809C77C: adds r0, r5, 0 - bl sub_80893F0 + bl MetatileBehavior_IsSecretBaseTvOrShield lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1063,7 +1063,7 @@ _0809C77C: .pool _0809C794: adds r0, r5, 0 - bl sub_80892EC + bl MetatileBehavior_IsMB_C6 lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1072,7 +1072,7 @@ _0809C794: b _0809C7E2 _0809C7A8: adds r0, r5, 0 - bl sub_8089364 + bl MetatileBehavior_IsMB_C3 lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1081,7 +1081,7 @@ _0809C7A8: b _0809C7E2 _0809C7BC: adds r0, r5, 0 - bl sub_8089350 + bl MetatileBehavior_IsMB_B5 lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1090,7 +1090,7 @@ _0809C7BC: b _0809C7E2 _0809C7D0: adds r0, r5, 0 - bl sub_8089300 + bl MetatileBehavior_IsSecretBasePoster lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1297,7 +1297,7 @@ sub_809C96C: @ 809C96C lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl sub_8089918 + bl MetatileBehavior_IsCrackedFloorHole lsls r0, 24 cmp r0, 0 beq _0809C988 @@ -1306,7 +1306,7 @@ sub_809C96C: @ 809C96C .pool _0809C988: adds r0, r4, 0 - bl sub_8089ABC + bl MetatileBehavior_IsBattlePyramidWarp lsls r0, 24 cmp r0, 0 beq _0809C9A4 @@ -1318,7 +1318,7 @@ _0809C996: .pool _0809C9A4: adds r0, r4, 0 - bl sub_80893C8 + bl MetatileBehavior_IsSecretBaseGlitterMat lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1327,7 +1327,7 @@ _0809C9A4: b _0809C9E8 _0809C9B8: adds r0, r4, 0 - bl sub_80893B4 + bl MetatileBehavior_IsSecretBaseSoundMat lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1376,7 +1376,7 @@ _0809CA04: bne _0809CAF8 lsls r0, r4, 24 lsrs r0, 24 - bl sub_808904C + bl MetatileBehavior_IsMoveTile lsls r0, 24 cmp r0, 0 bne _0809CAF8 @@ -1719,7 +1719,7 @@ sub_809CC9C: @ 809CC9C .pool _0809CCF8: adds r0, r4, 0 - bl sub_8089870 + bl MetatileBehavior_IsLavaridgeB1FWarp lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1729,7 +1729,7 @@ _0809CCF8: b _0809CD8C _0809CD0E: adds r0, r4, 0 - bl is_role_x68 + bl MetatileBehavior_IsLavaridge1FWarp lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1749,7 +1749,7 @@ _0809CD24: b _0809CD8C _0809CD3A: adds r0, r4, 0 - bl sub_80898AC + bl MetatileBehavior_IsWarpOrBridge lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1759,7 +1759,7 @@ _0809CD3A: b _0809CD8C _0809CD50: adds r0, r4, 0 - bl sub_8089904 + bl MetatileBehavior_IsMtPyreHole lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1771,7 +1771,7 @@ _0809CD50: .pool _0809CD6C: adds r0, r4, 0 - bl sub_80898C0 + bl MetatileBehavior_IsMossdeepGymWarp lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1797,7 +1797,7 @@ is_warp_tile: @ 809CD94 lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl is_tile_x69_2_warp_door + bl MetatileBehavior_IsWarpDoor lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1815,19 +1815,19 @@ is_warp_tile: @ 809CD94 cmp r0, 0x1 beq _0809CE2A adds r0, r4, 0 - bl sub_8088F58 + bl MetatileBehavior_IsNonAnimDoor lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 beq _0809CE2A adds r0, r4, 0 - bl sub_8089870 + bl MetatileBehavior_IsLavaridgeB1FWarp lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 beq _0809CE2A adds r0, r4, 0 - bl is_role_x68 + bl MetatileBehavior_IsLavaridge1FWarp lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1839,19 +1839,19 @@ is_warp_tile: @ 809CD94 cmp r0, 0x1 beq _0809CE2A adds r0, r4, 0 - bl sub_8089904 + bl MetatileBehavior_IsMtPyreHole lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 beq _0809CE2A adds r0, r4, 0 - bl sub_80898C0 + bl MetatileBehavior_IsMossdeepGymWarp lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 beq _0809CE2A adds r0, r4, 0 - bl sub_80898AC + bl MetatileBehavior_IsWarpOrBridge lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -2048,7 +2048,7 @@ map_warp_consider_2_to_inside: @ 809CF78 lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl sub_8089210 + bl MetatileBehavior_IsSecretBaseOpen lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -2062,7 +2062,7 @@ map_warp_consider_2_to_inside: @ 809CF78 .pool _0809CFB0: adds r0, r4, 0 - bl is_tile_x69_2_warp_door + bl MetatileBehavior_IsWarpDoor lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -2322,7 +2322,7 @@ dive_warp: @ 809D16C bne _0809D1A4 lsls r0, r5, 24 lsrs r0, 24 - bl sub_80895D0 + bl MetatileBehavior_IsUnableToEmerge lsls r0, 24 cmp r0, 0 bne _0809D1A4 @@ -2340,7 +2340,7 @@ dive_warp: @ 809D16C _0809D1A4: lsls r0, r5, 24 lsrs r0, 24 - bl sub_80895B0 + bl MetatileBehavior_IsDiveable lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -2394,7 +2394,7 @@ sub_809D1E8: @ 809D1E8 cmp r0, 0x5 bne _0809D244 adds r0, r5, 0 - bl sub_80895D0 + bl MetatileBehavior_IsUnableToEmerge lsls r0, 24 cmp r0, 0 bne _0809D244 @@ -2417,7 +2417,7 @@ sub_809D1E8: @ 809D1E8 .pool _0809D244: adds r0, r5, 0 - bl sub_80895B0 + bl MetatileBehavior_IsDiveable lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 diff --git a/asm/field_door.s b/asm/field_door.s index 987f0bd8c..4602158df 100644 --- a/asm/field_door.s +++ b/asm/field_door.s @@ -589,7 +589,7 @@ sub_808A854: @ 808A854 bl MapGridGetMetatileBehaviorAt lsls r0, 24 lsrs r0, 24 - bl sub_8088EFC + bl MetatileBehavior_IsDoor lsls r0, 24 cmp r0, 0 beq _0808A876 @@ -612,7 +612,7 @@ sub_808A880: @ 808A880 bl MapGridGetMetatileBehaviorAt lsls r0, 24 lsrs r0, 24 - bl sub_8088EFC + bl MetatileBehavior_IsDoor lsls r0, 24 cmp r0, 0 beq _0808A8A2 @@ -635,7 +635,7 @@ sub_808A8AC: @ 808A8AC bl MapGridGetMetatileBehaviorAt lsls r0, 24 lsrs r0, 24 - bl sub_8088EFC + bl MetatileBehavior_IsDoor lsls r0, 24 cmp r0, 0 beq _0808A8D8 @@ -664,7 +664,7 @@ task_overworld_door_add_if_role_69_for_opening_door_at: @ 808A8E4 bl MapGridGetMetatileBehaviorAt lsls r0, 24 lsrs r0, 24 - bl sub_8088EFC + bl MetatileBehavior_IsDoor lsls r0, 24 cmp r0, 0 beq _0808A910 diff --git a/asm/field_effect_helpers.s b/asm/field_effect_helpers.s index 76ba35fd2..223a27937 100644 --- a/asm/field_effect_helpers.s +++ b/asm/field_effect_helpers.s @@ -130,13 +130,13 @@ npc_pal_op: @ 8153FAC cmp r0, 0 bne _08154008 ldrb r0, [r5, 0x1F] - bl sub_80894D4 + bl MetatileBehavior_GetBridgeSth lsls r0, 24 lsrs r0, 24 cmp r0, 0 bne _08153FEE ldrb r0, [r5, 0x1E] - bl sub_80894D4 + bl MetatileBehavior_GetBridgeSth lsls r0, 24 lsrs r0, 24 cmp r0, 0 @@ -702,7 +702,7 @@ _08154412: cmp r0, r1 bne _08154490 ldrb r0, [r4, 0x1E] - bl sub_8088E64 + bl MetatileBehavior_IsPokeGrass lsls r0, 24 cmp r0, 0 bne _08154490 diff --git a/asm/field_player_avatar.s b/asm/field_player_avatar.s index aaca9b2ba..9f47c0a55 100644 --- a/asm/field_player_avatar.s +++ b/asm/field_player_avatar.s @@ -1223,7 +1223,7 @@ sub_808B238: @ 808B238 bl MapGridGetMetatileBehaviorAt lsls r0, 24 lsrs r0, 24 - bl sub_8088F58 + bl MetatileBehavior_IsNonAnimDoor lsls r0, 24 cmp r0, 0 bne _0808B2D8 @@ -2255,7 +2255,7 @@ PlayCollisionSoundIfNotFacingWarp: @ 808B9EC bl MapGridGetMetatileBehaviorAt lsls r0, 24 lsrs r0, 24 - bl is_tile_x69_2_warp_door + bl MetatileBehavior_IsWarpDoor lsls r0, 24 cmp r0, 0 bne _0808BA54 diff --git a/asm/field_screen.s b/asm/field_screen.s index 13f418f17..0de68b86b 100644 --- a/asm/field_screen.s +++ b/asm/field_screen.s @@ -8248,7 +8248,7 @@ sub_80AF334: @ 80AF334 lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl sub_8088EFC + bl MetatileBehavior_IsDoor lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -8258,7 +8258,7 @@ sub_80AF334: @ 80AF334 .pool _080AF36C: adds r0, r4, 0 - bl sub_8088F58 + bl MetatileBehavior_IsNonAnimDoor lsls r0, 24 lsrs r0, 24 ldr r1, =task_map_chg_seq_0807E2CC diff --git a/asm/field_tasks.s b/asm/field_tasks.s index 26761b8d1..6f8174fd8 100644 --- a/asm/field_tasks.s +++ b/asm/field_tasks.s @@ -221,7 +221,7 @@ sub_809DA30: @ 809DA30 lsls r1, 24 lsrs r4, r1, 24 adds r0, r4, 0 - bl sub_8089764 + bl MetatileBehavior_IsPacifilogVerticalLog1 lsls r0, 24 cmp r0, 0 beq _0809DA48 @@ -229,7 +229,7 @@ sub_809DA30: @ 809DA30 b _0809DA80 _0809DA48: adds r0, r4, 0 - bl sub_8089778 + bl MetatileBehavior_IsPacifilogVerticalLog2 lsls r0, 24 cmp r0, 0 beq _0809DA5A @@ -238,7 +238,7 @@ _0809DA48: b _0809DA80 _0809DA5A: adds r0, r4, 0 - bl sub_808978C + bl MetatileBehavior_IsPacifilogHorizontalLog1 lsls r0, 24 cmp r0, 0 beq _0809DA6C @@ -247,7 +247,7 @@ _0809DA5A: b _0809DA80 _0809DA6C: adds r0, r4, 0 - bl sub_80897A0 + bl MetatileBehavior_IsPacifilogHorizontalLog2 lsls r0, 24 cmp r0, 0 bne _0809DA7C @@ -414,7 +414,7 @@ sub_809DB7C: @ 809DB7C lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl sub_8089764 + bl MetatileBehavior_IsPacifilogVerticalLog1 lsls r0, 24 cmp r0, 0 beq _0809DBC0 @@ -427,7 +427,7 @@ _0809DBBC: b _0809DC08 _0809DBC0: adds r0, r4, 0 - bl sub_8089778 + bl MetatileBehavior_IsPacifilogVerticalLog2 lsls r0, 24 cmp r0, 0 beq _0809DBD8 @@ -439,7 +439,7 @@ _0809DBC0: b _0809DBBC _0809DBD8: adds r0, r4, 0 - bl sub_808978C + bl MetatileBehavior_IsPacifilogHorizontalLog1 lsls r0, 24 cmp r0, 0 beq _0809DBF0 @@ -451,7 +451,7 @@ _0809DBD8: b _0809DBBC _0809DBF0: adds r0, r4, 0 - bl sub_80897A0 + bl MetatileBehavior_IsPacifilogHorizontalLog2 lsls r0, 24 cmp r0, 0 beq _0809DC06 @@ -496,7 +496,7 @@ sub_809DC18: @ 809DC18 lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl sub_8089764 + bl MetatileBehavior_IsPacifilogVerticalLog1 lsls r0, 24 cmp r0, 0 beq _0809DC5C @@ -509,7 +509,7 @@ _0809DC58: b _0809DCA4 _0809DC5C: adds r0, r4, 0 - bl sub_8089778 + bl MetatileBehavior_IsPacifilogVerticalLog2 lsls r0, 24 cmp r0, 0 beq _0809DC74 @@ -521,7 +521,7 @@ _0809DC5C: b _0809DC58 _0809DC74: adds r0, r4, 0 - bl sub_808978C + bl MetatileBehavior_IsPacifilogHorizontalLog1 lsls r0, 24 cmp r0, 0 beq _0809DC8C @@ -533,7 +533,7 @@ _0809DC74: b _0809DC58 _0809DC8C: adds r0, r4, 0 - bl sub_80897A0 + bl MetatileBehavior_IsPacifilogHorizontalLog2 lsls r0, 24 cmp r0, 0 beq _0809DCA2 @@ -1326,7 +1326,7 @@ _0809E29A: lsls r4, 24 lsrs r4, 24 adds r0, r4, 0 - bl sub_8089604 + bl MetatileBehavior_IsThinIce lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1341,7 +1341,7 @@ _0809E29A: .pool _0809E2E0: adds r0, r4, 0 - bl sub_8089618 + bl MetatileBehavior_IsCrackedIce lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1630,7 +1630,7 @@ _0809E53E: lsls r0, r6, 24 lsrs r6, r0, 24 adds r0, r6, 0 - bl sub_8089918 + bl MetatileBehavior_IsCrackedFloorHole lsls r0, 24 cmp r0, 0 beq _0809E556 @@ -1658,7 +1658,7 @@ _0809E572: ldrh r0, [r4] strh r0, [r5, 0x6] adds r0, r6, 0 - bl sub_808992C + bl MetatileBehavior_IsCrackedFloor lsls r0, 24 cmp r0, 0 beq _0809E5D2 diff --git a/asm/fldeff_80F9BCC.s b/asm/fldeff_80F9BCC.s index 3bc667754..3ad2a398b 100644 --- a/asm/fldeff_80F9BCC.s +++ b/asm/fldeff_80F9BCC.s @@ -584,7 +584,7 @@ sub_80FA004: @ 80FA004 lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl sub_808923C + bl MetatileBehavior_IsSecretBaseCave lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -599,7 +599,7 @@ sub_80FA004: @ 80FA004 .pool _080FA070: adds r0, r4, 0 - bl sub_808925C + bl MetatileBehavior_IsSecretBaseTree lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -614,7 +614,7 @@ _080FA070: .pool _080FA0A0: adds r0, r4, 0 - bl is_tile_x98 + bl MetatileBehavior_IsSecretBaseShrub lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 diff --git a/asm/fldeff_cut.s b/asm/fldeff_cut.s index ce7e79de8..7f67185a9 100755 --- a/asm/fldeff_cut.s +++ b/asm/fldeff_cut.s @@ -130,7 +130,7 @@ _080D37F6: lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl sub_8088E64 + bl MetatileBehavior_IsPokeGrass lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -175,7 +175,7 @@ _080D3890: movs r0, 0x1 strb r0, [r1] adds r0, r4, 0 - bl sub_80899F8 + bl MetatileBehavior_IsCuttableGrass lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0x1 @@ -309,7 +309,7 @@ _080D395A: lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl sub_8088E64 + bl MetatileBehavior_IsPokeGrass lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -339,7 +339,7 @@ _080D39F4: b _080D395A _080D39F8: adds r0, r4, 0 - bl sub_80899F8 + bl MetatileBehavior_IsCuttableGrass lsls r0, 24 lsrs r1, r0, 24 cmp r1, 0x1 @@ -1344,7 +1344,7 @@ sub_80D423C: @ 80D423C bl MapGridGetMetatileBehaviorAt lsls r0, 24 lsrs r0, 24 - bl MetatileBehavior_IsLongGrass2 + bl MetatileBehavior_IsLongGrass_Duplicate lsls r0, 24 cmp r0, 0 beq _080D42AE diff --git a/asm/item_use.s b/asm/item_use.s index 200b0e62f..42b2d8bc0 100644 --- a/asm/item_use.s +++ b/asm/item_use.s @@ -464,7 +464,7 @@ _080FD3EC: _080FD40C: lsls r0, r6, 24 lsrs r0, 24 - bl sub_8089510 + bl MetatileBehavior_8089510 lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 diff --git a/asm/metatile_behavior.s b/asm/metatile_behavior.s deleted file mode 100644 index 30b0f4348..000000000 --- a/asm/metatile_behavior.s +++ /dev/null @@ -1,2610 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start ShouldDoJumpLandingDustEffect -ShouldDoJumpLandingDustEffect: @ 8088DEC - movs r0, 0x1 - bx lr - thumb_func_end ShouldDoJumpLandingDustEffect - - thumb_func_start sub_8088DF0 -sub_8088DF0: @ 8088DF0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_08486EFC - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _08088E0C - movs r0, 0 - b _08088E0E - .pool -_08088E0C: - movs r0, 0x1 -_08088E0E: - pop {r1} - bx r1 - thumb_func_end sub_8088DF0 - - thumb_func_start MetatileBehavior_IsJumpEast -MetatileBehavior_IsJumpEast: @ 8088E14 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x38 - beq _08088E22 - movs r0, 0 - b _08088E24 -_08088E22: - movs r0, 0x1 -_08088E24: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsJumpEast - - thumb_func_start MetatileBehavior_IsJumpWest -MetatileBehavior_IsJumpWest: @ 8088E28 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x39 - beq _08088E36 - movs r0, 0 - b _08088E38 -_08088E36: - movs r0, 0x1 -_08088E38: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsJumpWest - - thumb_func_start MetatileBehavior_IsJumpNorth -MetatileBehavior_IsJumpNorth: @ 8088E3C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3A - beq _08088E4A - movs r0, 0 - b _08088E4C -_08088E4A: - movs r0, 0x1 -_08088E4C: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsJumpNorth - - thumb_func_start MetatileBehavior_IsJumpSouth -MetatileBehavior_IsJumpSouth: @ 8088E50 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3B - beq _08088E5E - movs r0, 0 - b _08088E60 -_08088E5E: - movs r0, 0x1 -_08088E60: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsJumpSouth - - thumb_func_start sub_8088E64 -sub_8088E64: @ 8088E64 - push {lr} - lsls r0, 24 - movs r1, 0xFE - lsls r1, 24 - adds r0, r1 - lsrs r0, 24 - cmp r0, 0x1 - bls _08088E78 - movs r0, 0 - b _08088E7A -_08088E78: - movs r0, 0x1 -_08088E7A: - pop {r1} - bx r1 - thumb_func_end sub_8088E64 - - thumb_func_start MetatileBehavior_IsSandOrDeepSand -MetatileBehavior_IsSandOrDeepSand: @ 8088E80 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x21 - beq _08088E8E - cmp r0, 0x6 - bne _08088E92 -_08088E8E: - movs r0, 0x1 - b _08088E94 -_08088E92: - movs r0, 0 -_08088E94: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsSandOrDeepSand - - thumb_func_start MetatileBehavior_IsDeepSand -MetatileBehavior_IsDeepSand: @ 8088E98 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x6 - beq _08088EA6 - movs r0, 0 - b _08088EA8 -_08088EA6: - movs r0, 0x1 -_08088EA8: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsDeepSand - - thumb_func_start MetatileBehavior_IsReflective -MetatileBehavior_IsReflective: @ 8088EAC - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x10 - beq _08088ECA - cmp r0, 0x16 - beq _08088ECA - cmp r0, 0x1A - beq _08088ECA - cmp r0, 0x20 - beq _08088ECA - cmp r0, 0x14 - beq _08088ECA - cmp r0, 0x2B - bne _08088ECE -_08088ECA: - movs r0, 0x1 - b _08088ED0 -_08088ECE: - movs r0, 0 -_08088ED0: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsReflective - - thumb_func_start MetatileBehavior_IsIce -MetatileBehavior_IsIce: @ 8088ED4 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x20 - beq _08088EE2 - movs r0, 0 - b _08088EE4 -_08088EE2: - movs r0, 0x1 -_08088EE4: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsIce - - thumb_func_start is_tile_x69_2_warp_door -is_tile_x69_2_warp_door: @ 8088EE8 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x69 - beq _08088EF6 - movs r0, 0 - b _08088EF8 -_08088EF6: - movs r0, 0x1 -_08088EF8: - pop {r1} - bx r1 - thumb_func_end is_tile_x69_2_warp_door - - thumb_func_start sub_8088EFC -sub_8088EFC: @ 8088EFC - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x8D - beq _08088F0A - cmp r0, 0x69 - bne _08088F0E -_08088F0A: - movs r0, 0x1 - b _08088F10 -_08088F0E: - movs r0, 0 -_08088F10: - pop {r1} - bx r1 - thumb_func_end sub_8088EFC - - thumb_func_start MetatileBehavior_IsEscalator -MetatileBehavior_IsEscalator: @ 8088F14 - push {lr} - lsls r0, 24 - movs r1, 0x96 - lsls r1, 24 - adds r0, r1 - lsrs r0, 24 - cmp r0, 0x1 - bls _08088F28 - movs r0, 0 - b _08088F2A -_08088F28: - movs r0, 0x1 -_08088F2A: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsEscalator - - thumb_func_start sub_8088F30 -sub_8088F30: @ 8088F30 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x4 - beq _08088F3E - movs r0, 0 - b _08088F40 -_08088F3E: - movs r0, 0x1 -_08088F40: - pop {r1} - bx r1 - thumb_func_end sub_8088F30 - - thumb_func_start MetatileBehavior_IsLadder -MetatileBehavior_IsLadder: @ 8088F44 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x61 - beq _08088F52 - movs r0, 0 - b _08088F54 -_08088F52: - movs r0, 0x1 -_08088F54: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsLadder - - thumb_func_start sub_8088F58 -sub_8088F58: @ 8088F58 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x60 - beq _08088F6A - cmp r0, 0x6C - beq _08088F6A - cmp r0, 0x6E - bne _08088F6E -_08088F6A: - movs r0, 0x1 - b _08088F70 -_08088F6E: - movs r0, 0 -_08088F70: - pop {r1} - bx r1 - thumb_func_end sub_8088F58 - - thumb_func_start sub_8088F74 -sub_8088F74: @ 8088F74 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x6E - beq _08088F82 - movs r0, 0 - b _08088F84 -_08088F82: - movs r0, 0x1 -_08088F84: - pop {r1} - bx r1 - thumb_func_end sub_8088F74 - - thumb_func_start MetatileBehavior_IsSurfableWaterOrUnderwater -MetatileBehavior_IsSurfableWaterOrUnderwater: @ 8088F88 - push {lr} - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_08486EFC - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - bne _08088FA4 - movs r0, 0 - b _08088FA6 - .pool -_08088FA4: - movs r0, 0x1 -_08088FA6: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsSurfableWaterOrUnderwater - - thumb_func_start MetatileBehavior_IsEastArrowWarp -MetatileBehavior_IsEastArrowWarp: @ 8088FAC - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x62 - beq _08088FBA - movs r0, 0 - b _08088FBC -_08088FBA: - movs r0, 0x1 -_08088FBC: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsEastArrowWarp - - thumb_func_start MetatileBehavior_IsWestArrowWarp -MetatileBehavior_IsWestArrowWarp: @ 8088FC0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x63 - beq _08088FCE - movs r0, 0 - b _08088FD0 -_08088FCE: - movs r0, 0x1 -_08088FD0: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsWestArrowWarp - - thumb_func_start MetatileBehavior_IsNorthArrowWarp -MetatileBehavior_IsNorthArrowWarp: @ 8088FD4 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x64 - beq _08088FE2 - cmp r0, 0x1B - bne _08088FE6 -_08088FE2: - movs r0, 0x1 - b _08088FE8 -_08088FE6: - movs r0, 0 -_08088FE8: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsNorthArrowWarp - - thumb_func_start MetatileBehavior_IsSouthArrowWarp -MetatileBehavior_IsSouthArrowWarp: @ 8088FEC - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x65 - beq _08088FFE - cmp r0, 0x6D - beq _08088FFE - cmp r0, 0x1C - bne _08089002 -_08088FFE: - movs r0, 0x1 - b _08089004 -_08089002: - movs r0, 0 -_08089004: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsSouthArrowWarp - - thumb_func_start sub_8089008 -sub_8089008: @ 8089008 - push {r4,r5,lr} - lsls r0, 24 - lsrs r4, r0, 24 - movs r5, 0 - adds r0, r4, 0 - bl MetatileBehavior_IsEastArrowWarp - lsls r0, 24 - cmp r0, 0 - bne _08089040 - adds r0, r4, 0 - bl MetatileBehavior_IsWestArrowWarp - lsls r0, 24 - cmp r0, 0 - bne _08089040 - adds r0, r4, 0 - bl MetatileBehavior_IsNorthArrowWarp - lsls r0, 24 - cmp r0, 0 - bne _08089040 - adds r0, r4, 0 - bl MetatileBehavior_IsSouthArrowWarp - lsls r0, 24 - cmp r0, 0 - beq _08089042 -_08089040: - movs r5, 0x1 -_08089042: - adds r0, r5, 0 - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_8089008 - - thumb_func_start sub_808904C -sub_808904C: @ 808904C - push {lr} - lsls r0, 24 - lsrs r1, r0, 24 - movs r2, 0xC0 - lsls r2, 24 - adds r0, r2 - lsrs r0, 24 - cmp r0, 0x8 - bls _08089082 - adds r0, r1, 0 - subs r0, 0x50 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3 - bls _08089082 - cmp r1, 0xD0 - beq _08089082 - cmp r1, 0xD2 - beq _08089082 - cmp r1, 0x13 - beq _08089082 - cmp r1, 0x20 - beq _08089082 - cmp r1, 0xBB - beq _08089082 - cmp r1, 0xBC - bne _08089086 -_08089082: - movs r0, 0x1 - b _08089088 -_08089086: - movs r0, 0 -_08089088: - pop {r1} - bx r1 - thumb_func_end sub_808904C - - thumb_func_start MetatileBehavior_IsIce_2 -@ bool8 MetatileBehavior_IsIce_2(u8 metatileBehavior) -MetatileBehavior_IsIce_2: @ 808908C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x20 - beq _0808909A - movs r0, 0 - b _0808909C -_0808909A: - movs r0, 0x1 -_0808909C: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsIce_2 - - thumb_func_start MetatileBehavior_IsTrickHouseSlipperyFloor -@ bool8 MetatileBehavior_IsTrickHouseSlipperyFloor(u8 metatileBehavior) -MetatileBehavior_IsTrickHouseSlipperyFloor: @ 80890A0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x48 - beq _080890AE - movs r0, 0 - b _080890B0 -_080890AE: - movs r0, 0x1 -_080890B0: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsTrickHouseSlipperyFloor - - thumb_func_start MetatileBehavior_0x05 -MetatileBehavior_0x05: @ 80890B4 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x5 - beq _080890C2 - movs r0, 0 - b _080890C4 -_080890C2: - movs r0, 0x1 -_080890C4: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_0x05 - - thumb_func_start MetatileBehavior_IsWalkNorth -@ bool8 MetatileBehavior_IsWalkNorth(u8 metatileBehavior) -MetatileBehavior_IsWalkNorth: @ 80890C8 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x42 - beq _080890D6 - movs r0, 0 - b _080890D8 -_080890D6: - movs r0, 0x1 -_080890D8: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsWalkNorth - - thumb_func_start MetatileBehavior_IsWalkSouth -@ bool8 MetatileBehavior_IsWalkSouth(u8 metatileBehavior) -MetatileBehavior_IsWalkSouth: @ 80890DC - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x43 - beq _080890EA - movs r0, 0 - b _080890EC -_080890EA: - movs r0, 0x1 -_080890EC: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsWalkSouth - - thumb_func_start MetatileBehavior_IsWalkWest -@ bool8 MetatileBehavior_IsWalkWest(u8 metatileBehavior) -MetatileBehavior_IsWalkWest: @ 80890F0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x41 - beq _080890FE - movs r0, 0 - b _08089100 -_080890FE: - movs r0, 0x1 -_08089100: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsWalkWest - - thumb_func_start MetatileBehavior_IsWalkEast -@ bool8 MetatileBehavior_IsWalkEast(u8 metatileBehavior) -MetatileBehavior_IsWalkEast: @ 8089104 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x40 - beq _08089112 - movs r0, 0 - b _08089114 -_08089112: - movs r0, 0x1 -_08089114: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsWalkEast - - thumb_func_start MetatileBehavior_IsNorthwardCurrent -@ bool8 MetatileBehavior_IsNorthwardCurrent(u8 metatileBehavior) -MetatileBehavior_IsNorthwardCurrent: @ 8089118 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x52 - beq _08089126 - movs r0, 0 - b _08089128 -_08089126: - movs r0, 0x1 -_08089128: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsNorthwardCurrent - - thumb_func_start MetatileBehavior_IsSouthwardCurrent -@ bool8 MetatileBehavior_IsSouthwardCurrent(u8 metatileBehavior) -MetatileBehavior_IsSouthwardCurrent: @ 808912C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x53 - beq _0808913A - movs r0, 0 - b _0808913C -_0808913A: - movs r0, 0x1 -_0808913C: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsSouthwardCurrent - - thumb_func_start MetatileBehavior_IsWestwardCurrent -@ bool8 MetatileBehavior_IsWestwardCurrent(u8 metatileBehavior) -MetatileBehavior_IsWestwardCurrent: @ 8089140 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x51 - beq _0808914E - movs r0, 0 - b _08089150 -_0808914E: - movs r0, 0x1 -_08089150: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsWestwardCurrent - - thumb_func_start MetatileBehavior_IsEastwardCurrent -@ bool8 MetatileBehavior_IsEastwardCurrent(u8 metatileBehavior) -MetatileBehavior_IsEastwardCurrent: @ 8089154 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x50 - beq _08089162 - movs r0, 0 - b _08089164 -_08089162: - movs r0, 0x1 -_08089164: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsEastwardCurrent - - thumb_func_start MetatileBehavior_IsSlideNorth -@ bool8 MetatileBehavior_IsSlideNorth(u8 metatileBehavior) -MetatileBehavior_IsSlideNorth: @ 8089168 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x46 - beq _08089176 - movs r0, 0 - b _08089178 -_08089176: - movs r0, 0x1 -_08089178: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsSlideNorth - - thumb_func_start MetatileBehavior_IsSlideSouth -@ bool8 MetatileBehavior_IsSlideSouth(u8 metatileBehavior) -MetatileBehavior_IsSlideSouth: @ 808917C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x47 - beq _0808918A - movs r0, 0 - b _0808918C -_0808918A: - movs r0, 0x1 -_0808918C: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsSlideSouth - - thumb_func_start MetatileBehavior_IsSlideWest -@ bool8 MetatileBehavior_IsSlideWest(u8 metatileBehavior) -MetatileBehavior_IsSlideWest: @ 8089190 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x45 - beq _0808919E - movs r0, 0 - b _080891A0 -_0808919E: - movs r0, 0x1 -_080891A0: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsSlideWest - - thumb_func_start MetatileBehavior_IsSlideEast -@ bool8 MetatileBehavior_IsSlideEast(u8 metatileBehavior) -MetatileBehavior_IsSlideEast: @ 80891A4 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x44 - beq _080891B2 - movs r0, 0 - b _080891B4 -_080891B2: - movs r0, 0x1 -_080891B4: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsSlideEast - - thumb_func_start MetatileBehavior_IsCounter -MetatileBehavior_IsCounter: @ 80891B8 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x80 - beq _080891C6 - movs r0, 0 - b _080891C8 -_080891C6: - movs r0, 0x1 -_080891C8: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsCounter - - thumb_func_start MetatileBehavior_IsPlayerFacingTVScreen -@ bool8 MetatileBehavior_IsPlayerFacingTVScreen(u8 behavior, u8 direction) -MetatileBehavior_IsPlayerFacingTVScreen: @ 80891CC - push {lr} - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - cmp r1, 0x2 - bne _080891DE - cmp r0, 0x86 - beq _080891E2 -_080891DE: - movs r0, 0 - b _080891E4 -_080891E2: - movs r0, 0x1 -_080891E4: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsPlayerFacingTVScreen - - thumb_func_start MetatileBehavior_IsPC -MetatileBehavior_IsPC: @ 80891E8 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x83 - beq _080891F6 - movs r0, 0 - b _080891F8 -_080891F6: - movs r0, 0x1 -_080891F8: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsPC - - thumb_func_start is_tile_x84 -is_tile_x84: @ 80891FC - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x84 - beq _0808920A - movs r0, 0 - b _0808920C -_0808920A: - movs r0, 0x1 -_0808920C: - pop {r1} - bx r1 - thumb_func_end is_tile_x84 - - thumb_func_start sub_8089210 -sub_8089210: @ 8089210 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x91 - beq _08089232 - cmp r0, 0x93 - beq _08089232 - cmp r0, 0x95 - beq _08089232 - cmp r0, 0x97 - beq _08089232 - cmp r0, 0x99 - beq _08089232 - cmp r0, 0x9B - beq _08089232 - cmp r0, 0x9D - bne _08089236 -_08089232: - movs r0, 0x1 - b _08089238 -_08089236: - movs r0, 0 -_08089238: - pop {r1} - bx r1 - thumb_func_end sub_8089210 - - thumb_func_start sub_808923C -sub_808923C: @ 808923C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x90 - beq _08089252 - cmp r0, 0x92 - beq _08089252 - cmp r0, 0x94 - beq _08089252 - cmp r0, 0x9A - bne _08089256 -_08089252: - movs r0, 0x1 - b _08089258 -_08089256: - movs r0, 0 -_08089258: - pop {r1} - bx r1 - thumb_func_end sub_808923C - - thumb_func_start sub_808925C -sub_808925C: @ 808925C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x96 - beq _0808926A - cmp r0, 0x9C - bne _0808926E -_0808926A: - movs r0, 0x1 - b _08089270 -_0808926E: - movs r0, 0 -_08089270: - pop {r1} - bx r1 - thumb_func_end sub_808925C - - thumb_func_start is_tile_x98 -is_tile_x98: @ 8089274 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x98 - beq _08089282 - movs r0, 0 - b _08089284 -_08089282: - movs r0, 0x1 -_08089284: - pop {r1} - bx r1 - thumb_func_end is_tile_x98 - - thumb_func_start sub_8089288 -sub_8089288: @ 8089288 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xB0 - beq _08089296 - movs r0, 0 - b _08089298 -_08089296: - movs r0, 0x1 -_08089298: - pop {r1} - bx r1 - thumb_func_end sub_8089288 - - thumb_func_start sub_808929C -sub_808929C: @ 808929C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xB1 - beq _080892AA - movs r0, 0 - b _080892AC -_080892AA: - movs r0, 0x1 -_080892AC: - pop {r1} - bx r1 - thumb_func_end sub_808929C - - thumb_func_start sub_80892B0 -sub_80892B0: @ 80892B0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xB2 - beq _080892BE - movs r0, 0 - b _080892C0 -_080892BE: - movs r0, 0x1 -_080892C0: - pop {r1} - bx r1 - thumb_func_end sub_80892B0 - - thumb_func_start sub_80892C4 -sub_80892C4: @ 80892C4 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xB3 - beq _080892D2 - movs r0, 0 - b _080892D4 -_080892D2: - movs r0, 0x1 -_080892D4: - pop {r1} - bx r1 - thumb_func_end sub_80892C4 - - thumb_func_start sub_80892D8 -sub_80892D8: @ 80892D8 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xB9 - beq _080892E6 - movs r0, 0 - b _080892E8 -_080892E6: - movs r0, 0x1 -_080892E8: - pop {r1} - bx r1 - thumb_func_end sub_80892D8 - - thumb_func_start sub_80892EC -sub_80892EC: @ 80892EC - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xC6 - beq _080892FA - movs r0, 0 - b _080892FC -_080892FA: - movs r0, 0x1 -_080892FC: - pop {r1} - bx r1 - thumb_func_end sub_80892EC - - thumb_func_start sub_8089300 -sub_8089300: @ 8089300 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xC7 - beq _0808930E - movs r0, 0 - b _08089310 -_0808930E: - movs r0, 0x1 -_08089310: - pop {r1} - bx r1 - thumb_func_end sub_8089300 - - thumb_func_start sub_8089314 -sub_8089314: @ 8089314 - push {lr} - lsls r0, 24 - cmp r0, 0 - beq _08089320 - movs r0, 0 - b _08089322 -_08089320: - movs r0, 0x1 -_08089322: - pop {r1} - bx r1 - thumb_func_end sub_8089314 - - thumb_func_start sub_8089328 -sub_8089328: @ 8089328 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xB7 - beq _08089336 - movs r0, 0 - b _08089338 -_08089336: - movs r0, 0x1 -_08089338: - pop {r1} - bx r1 - thumb_func_end sub_8089328 - - thumb_func_start sub_808933C -sub_808933C: @ 808933C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xB2 - beq _0808934A - movs r0, 0 - b _0808934C -_0808934A: - movs r0, 0x1 -_0808934C: - pop {r1} - bx r1 - thumb_func_end sub_808933C - - thumb_func_start sub_8089350 -sub_8089350: @ 8089350 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xB5 - beq _0808935E - movs r0, 0 - b _08089360 -_0808935E: - movs r0, 0x1 -_08089360: - pop {r1} - bx r1 - thumb_func_end sub_8089350 - - thumb_func_start sub_8089364 -sub_8089364: @ 8089364 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xC3 - beq _08089372 - movs r0, 0 - b _08089374 -_08089372: - movs r0, 0x1 -_08089374: - pop {r1} - bx r1 - thumb_func_end sub_8089364 - - thumb_func_start sub_8089378 -sub_8089378: @ 8089378 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xC2 - beq _08089386 - movs r0, 0 - b _08089388 -_08089386: - movs r0, 0x1 -_08089388: - pop {r1} - bx r1 - thumb_func_end sub_8089378 - - thumb_func_start sub_808938C -sub_808938C: @ 808938C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xB8 - beq _0808939A - movs r0, 0 - b _0808939C -_0808939A: - movs r0, 0x1 -_0808939C: - pop {r1} - bx r1 - thumb_func_end sub_808938C - - thumb_func_start sub_80893A0 -sub_80893A0: @ 80893A0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xBE - beq _080893AE - movs r0, 0 - b _080893B0 -_080893AE: - movs r0, 0x1 -_080893B0: - pop {r1} - bx r1 - thumb_func_end sub_80893A0 - - thumb_func_start sub_80893B4 -sub_80893B4: @ 80893B4 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xBD - beq _080893C2 - movs r0, 0 - b _080893C4 -_080893C2: - movs r0, 0x1 -_080893C4: - pop {r1} - bx r1 - thumb_func_end sub_80893B4 - - thumb_func_start sub_80893C8 -sub_80893C8: @ 80893C8 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xBA - beq _080893D6 - movs r0, 0 - b _080893D8 -_080893D6: - movs r0, 0x1 -_080893D8: - pop {r1} - bx r1 - thumb_func_end sub_80893C8 - - thumb_func_start sub_80893DC -sub_80893DC: @ 80893DC - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xBF - beq _080893EA - movs r0, 0 - b _080893EC -_080893EA: - movs r0, 0x1 -_080893EC: - pop {r1} - bx r1 - thumb_func_end sub_80893DC - - thumb_func_start sub_80893F0 -sub_80893F0: @ 80893F0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xC4 - beq _080893FE - movs r0, 0 - b _08089400 -_080893FE: - movs r0, 0x1 -_08089400: - pop {r1} - bx r1 - thumb_func_end sub_80893F0 - - thumb_func_start sub_8089404 -sub_8089404: @ 8089404 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xC5 - beq _08089412 - movs r0, 0 - b _08089414 -_08089412: - movs r0, 0x1 -_08089414: - pop {r1} - bx r1 - thumb_func_end sub_8089404 - - thumb_func_start MetatileBehavior_HasRipples -MetatileBehavior_HasRipples: @ 8089418 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x10 - beq _0808942A - cmp r0, 0x16 - beq _0808942A - cmp r0, 0x14 - bne _0808942E -_0808942A: - movs r0, 0x1 - b _08089430 -_0808942E: - movs r0, 0 -_08089430: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_HasRipples - - thumb_func_start MetatileBehavior_IsPuddle -MetatileBehavior_IsPuddle: @ 8089434 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x16 - beq _08089442 - movs r0, 0 - b _08089444 -_08089442: - movs r0, 0x1 -_08089444: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsPuddle - - thumb_func_start MetatileBehavior_IsTallGrass -MetatileBehavior_IsTallGrass: @ 8089448 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - beq _08089456 - movs r0, 0 - b _08089458 -_08089456: - movs r0, 0x1 -_08089458: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsTallGrass - - thumb_func_start MetatileBehavior_IsLongGrass -MetatileBehavior_IsLongGrass: @ 808945C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3 - beq _0808946A - movs r0, 0 - b _0808946C -_0808946A: - movs r0, 0x1 -_0808946C: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsLongGrass - - thumb_func_start MetatileBehavior_IsBerryTreeSoil -MetatileBehavior_IsBerryTreeSoil: @ 8089470 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xA0 - beq _0808947E - movs r0, 0 - b _08089480 -_0808947E: - movs r0, 0x1 -_08089480: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsBerryTreeSoil - - thumb_func_start MetatileBehavior_IsAsh -MetatileBehavior_IsAsh: @ 8089484 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x24 - beq _08089492 - movs r0, 0 - b _08089494 -_08089492: - movs r0, 0x1 -_08089494: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsAsh - - thumb_func_start MetatileBehavior_IsUnusedFootprintMetatile -MetatileBehavior_IsUnusedFootprintMetatile: @ 8089498 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x25 - beq _080894A6 - movs r0, 0 - b _080894A8 -_080894A6: - movs r0, 0x1 -_080894A8: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsUnusedFootprintMetatile - - thumb_func_start sub_80894AC -sub_80894AC: @ 80894AC - push {lr} - lsls r0, 24 - lsrs r1, r0, 24 - movs r2, 0x90 - lsls r2, 24 - adds r0, r2 - lsrs r0, 24 - cmp r0, 0x3 - bls _080894CA - adds r0, r1, 0 - subs r0, 0x7C - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3 - bhi _080894CE -_080894CA: - movs r0, 0x1 - b _080894D0 -_080894CE: - movs r0, 0 -_080894D0: - pop {r1} - bx r1 - thumb_func_end sub_80894AC - - thumb_func_start sub_80894D4 -sub_80894D4: @ 80894D4 - push {lr} - lsls r0, 24 - lsrs r1, r0, 24 - adds r2, r1, 0 - adds r0, r1, 0 - subs r0, 0x70 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3 - bls _0808950A - adds r0, r1, 0 - subs r0, 0x7A - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bhi _080894F8 - movs r0, 0x2 - b _0808950A -_080894F8: - adds r0, r2, 0 - subs r0, 0x7C - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bls _08089508 - movs r0, 0 - b _0808950A -_08089508: - movs r0, 0x3 -_0808950A: - pop {r1} - bx r1 - thumb_func_end sub_80894D4 - - thumb_func_start sub_8089510 -sub_8089510: @ 8089510 - push {lr} - lsls r0, 24 - movs r1, 0x90 - lsls r1, 24 - adds r0, r1 - lsrs r0, 24 - cmp r0, 0x3 - bls _08089524 - movs r0, 0 - b _08089526 -_08089524: - movs r0, 0x1 -_08089526: - pop {r1} - bx r1 - thumb_func_end sub_8089510 - - thumb_func_start sub_808952C -sub_808952C: @ 808952C - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - adds r0, r4, 0 - bl MetatileBehavior_IsSurfableWaterOrUnderwater - lsls r0, 24 - cmp r0, 0 - bne _08089550 - adds r0, r4, 0 - bl sub_8088DF0 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _08089550 - movs r0, 0x1 - b _08089552 -_08089550: - movs r0, 0 -_08089552: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_808952C - - thumb_func_start sub_8089558 -sub_8089558: @ 8089558 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - adds r0, r4, 0 - bl MetatileBehavior_IsSurfableWaterOrUnderwater - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0808957E - adds r0, r4, 0 - bl sub_8088DF0 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0808957E - movs r0, 0x1 - b _08089580 -_0808957E: - movs r0, 0 -_08089580: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8089558 - - thumb_func_start sub_8089588 -sub_8089588: @ 8089588 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xB - beq _08089596 - movs r0, 0 - b _08089598 -_08089596: - movs r0, 0x1 -_08089598: - pop {r1} - bx r1 - thumb_func_end sub_8089588 - - thumb_func_start sub_808959C -sub_808959C: @ 808959C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xC - beq _080895AA - movs r0, 0 - b _080895AC -_080895AA: - movs r0, 0x1 -_080895AC: - pop {r1} - bx r1 - thumb_func_end sub_808959C - - thumb_func_start sub_80895B0 -sub_80895B0: @ 80895B0 - push {lr} - lsls r0, 24 - lsrs r1, r0, 24 - movs r2, 0xEF - lsls r2, 24 - adds r0, r2 - lsrs r0, 24 - cmp r0, 0x1 - bls _080895C6 - cmp r1, 0x14 - bne _080895CA -_080895C6: - movs r0, 0x1 - b _080895CC -_080895CA: - movs r0, 0 -_080895CC: - pop {r1} - bx r1 - thumb_func_end sub_80895B0 - - thumb_func_start sub_80895D0 -sub_80895D0: @ 80895D0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x19 - beq _080895DE - cmp r0, 0x2A - bne _080895E2 -_080895DE: - movs r0, 0x1 - b _080895E4 -_080895E2: - movs r0, 0 -_080895E4: - pop {r1} - bx r1 - thumb_func_end sub_80895D0 - - thumb_func_start MetatileBehavior_IsShallowFlowingWater -MetatileBehavior_IsShallowFlowingWater: @ 80895E8 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x17 - beq _080895FA - cmp r0, 0x1B - beq _080895FA - cmp r0, 0x1C - bne _080895FE -_080895FA: - movs r0, 0x1 - b _08089600 -_080895FE: - movs r0, 0 -_08089600: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsShallowFlowingWater - - thumb_func_start sub_8089604 -sub_8089604: @ 8089604 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x26 - beq _08089612 - movs r0, 0 - b _08089614 -_08089612: - movs r0, 0x1 -_08089614: - pop {r1} - bx r1 - thumb_func_end sub_8089604 - - thumb_func_start sub_8089618 -sub_8089618: @ 8089618 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x27 - beq _08089626 - movs r0, 0 - b _08089628 -_08089626: - movs r0, 0x1 -_08089628: - pop {r1} - bx r1 - thumb_func_end sub_8089618 - - thumb_func_start sub_808962C -sub_808962C: @ 808962C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x15 - beq _0808963E - cmp r0, 0x11 - beq _0808963E - cmp r0, 0x12 - bne _08089642 -_0808963E: - movs r0, 0x1 - b _08089644 -_08089642: - movs r0, 0 -_08089644: - pop {r1} - bx r1 - thumb_func_end sub_808962C - - thumb_func_start sub_8089648 -sub_8089648: @ 8089648 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x18 - beq _08089656 - cmp r0, 0x1A - bne _0808965A -_08089656: - movs r0, 0x1 - b _0808965C -_0808965A: - movs r0, 0 -_0808965C: - pop {r1} - bx r1 - thumb_func_end sub_8089648 - - thumb_func_start sub_8089660 -sub_8089660: @ 8089660 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - adds r0, r4, 0 - bl MetatileBehavior_IsSurfableWaterOrUnderwater - lsls r0, 24 - cmp r0, 0 - beq _08089682 - adds r0, r4, 0 - bl MetatileBehavior_IsWaterfall - lsls r0, 24 - cmp r0, 0 - bne _08089682 - movs r0, 0x1 - b _08089684 -_08089682: - movs r0, 0 -_08089684: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8089660 - - thumb_func_start MetatileBehavior_IsEastBlocked -MetatileBehavior_IsEastBlocked: @ 808968C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x30 - beq _080896A6 - cmp r0, 0x34 - beq _080896A6 - cmp r0, 0x36 - beq _080896A6 - cmp r0, 0xC1 - beq _080896A6 - cmp r0, 0xBE - bne _080896AA -_080896A6: - movs r0, 0x1 - b _080896AC -_080896AA: - movs r0, 0 -_080896AC: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsEastBlocked - - thumb_func_start MetatileBehavior_IsWestBlocked -MetatileBehavior_IsWestBlocked: @ 80896B0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x31 - beq _080896CA - cmp r0, 0x35 - beq _080896CA - cmp r0, 0x37 - beq _080896CA - cmp r0, 0xC1 - beq _080896CA - cmp r0, 0xBE - bne _080896CE -_080896CA: - movs r0, 0x1 - b _080896D0 -_080896CE: - movs r0, 0 -_080896D0: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsWestBlocked - - thumb_func_start MetatileBehavior_IsNorthBlocked -MetatileBehavior_IsNorthBlocked: @ 80896D4 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x32 - beq _080896EA - cmp r0, 0x34 - beq _080896EA - cmp r0, 0x35 - beq _080896EA - cmp r0, 0xC0 - bne _080896EE -_080896EA: - movs r0, 0x1 - b _080896F0 -_080896EE: - movs r0, 0 -_080896F0: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsNorthBlocked - - thumb_func_start MetatileBehavior_IsSouthBlocked -MetatileBehavior_IsSouthBlocked: @ 80896F4 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x33 - beq _0808970A - cmp r0, 0x36 - beq _0808970A - cmp r0, 0x37 - beq _0808970A - cmp r0, 0xC0 - bne _0808970E -_0808970A: - movs r0, 0x1 - b _08089710 -_0808970E: - movs r0, 0 -_08089710: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsSouthBlocked - - thumb_func_start MetatileBehavior_IsShortGrass -MetatileBehavior_IsShortGrass: @ 8089714 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x7 - beq _08089722 - movs r0, 0 - b _08089724 -_08089722: - movs r0, 0x1 -_08089724: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsShortGrass - - thumb_func_start MetatileBehavior_IsHotSprings -MetatileBehavior_IsHotSprings: @ 8089728 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x28 - beq _08089736 - movs r0, 0 - b _08089738 -_08089736: - movs r0, 0x1 -_08089738: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsHotSprings - - thumb_func_start MetatileBehavior_IsWaterfall -@ bool8 MetatileBehavior_IsWaterfall(u8 metatileBehavior) -MetatileBehavior_IsWaterfall: @ 808973C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x13 - beq _0808974A - movs r0, 0 - b _0808974C -_0808974A: - movs r0, 0x1 -_0808974C: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsWaterfall - - thumb_func_start MetatileBehavior_IsFortreeBridge -MetatileBehavior_IsFortreeBridge: @ 8089750 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x78 - beq _0808975E - movs r0, 0 - b _08089760 -_0808975E: - movs r0, 0x1 -_08089760: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsFortreeBridge - - thumb_func_start sub_8089764 -sub_8089764: @ 8089764 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x74 - beq _08089772 - movs r0, 0 - b _08089774 -_08089772: - movs r0, 0x1 -_08089774: - pop {r1} - bx r1 - thumb_func_end sub_8089764 - - thumb_func_start sub_8089778 -sub_8089778: @ 8089778 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x75 - beq _08089786 - movs r0, 0 - b _08089788 -_08089786: - movs r0, 0x1 -_08089788: - pop {r1} - bx r1 - thumb_func_end sub_8089778 - - thumb_func_start sub_808978C -sub_808978C: @ 808978C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x76 - beq _0808979A - movs r0, 0 - b _0808979C -_0808979A: - movs r0, 0x1 -_0808979C: - pop {r1} - bx r1 - thumb_func_end sub_808978C - - thumb_func_start sub_80897A0 -sub_80897A0: @ 80897A0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x77 - beq _080897AE - movs r0, 0 - b _080897B0 -_080897AE: - movs r0, 0x1 -_080897B0: - pop {r1} - bx r1 - thumb_func_end sub_80897A0 - - thumb_func_start MetatileBehavior_IsPacifidlogLog -MetatileBehavior_IsPacifidlogLog: @ 80897B4 - push {lr} - lsls r0, 24 - movs r1, 0x8C - lsls r1, 24 - adds r0, r1 - lsrs r0, 24 - cmp r0, 0x3 - bls _080897C8 - movs r0, 0 - b _080897CA -_080897C8: - movs r0, 0x1 -_080897CA: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsPacifidlogLog - - thumb_func_start is_tile_x8C -is_tile_x8C: @ 80897D0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x8C - beq _080897DE - movs r0, 0 - b _080897E0 -_080897DE: - movs r0, 0x1 -_080897E0: - pop {r1} - bx r1 - thumb_func_end is_tile_x8C - - thumb_func_start is_tile_x85 -is_tile_x85: @ 80897E4 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x85 - beq _080897F2 - movs r0, 0 - b _080897F4 -_080897F2: - movs r0, 0x1 -_080897F4: - pop {r1} - bx r1 - thumb_func_end is_tile_x85 - - thumb_func_start is_tile_x8B -is_tile_x8B: @ 80897F8 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x8B - beq _08089806 - movs r0, 0 - b _08089808 -_08089806: - movs r0, 0x1 -_08089808: - pop {r1} - bx r1 - thumb_func_end is_tile_x8B - - thumb_func_start is_tile_xEA -is_tile_xEA: @ 808980C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xEA - beq _0808981A - movs r0, 0 - b _0808981C -_0808981A: - movs r0, 0x1 -_0808981C: - pop {r1} - bx r1 - thumb_func_end is_tile_xEA - - thumb_func_start is_tile_x8A -is_tile_x8A: @ 8089820 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x8A - beq _0808982E - movs r0, 0 - b _08089830 -_0808982E: - movs r0, 0x1 -_08089830: - pop {r1} - bx r1 - thumb_func_end is_tile_x8A - - thumb_func_start is_tile_x87 -is_tile_x87: @ 8089834 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x87 - beq _08089842 - movs r0, 0 - b _08089844 -_08089842: - movs r0, 0x1 -_08089844: - pop {r1} - bx r1 - thumb_func_end is_tile_x87 - - thumb_func_start MetatileBehavior_0xBB -@ bool8 MetatileBehavior_0xBB(u8 metatileBehavior) -MetatileBehavior_0xBB: @ 8089848 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xBB - beq _08089856 - movs r0, 0 - b _08089858 -_08089856: - movs r0, 0x1 -_08089858: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_0xBB - - thumb_func_start MetatileBehavior_0xBC -@ bool8 MetatileBehavior_0xBC(u8 metatileBehavior) -MetatileBehavior_0xBC: @ 808985C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xBC - beq _0808986A - movs r0, 0 - b _0808986C -_0808986A: - movs r0, 0x1 -_0808986C: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_0xBC - - thumb_func_start sub_8089870 -sub_8089870: @ 8089870 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x29 - beq _0808987E - movs r0, 0 - b _08089880 -_0808987E: - movs r0, 0x1 -_08089880: - pop {r1} - bx r1 - thumb_func_end sub_8089870 - - thumb_func_start is_role_x68 -is_role_x68: @ 8089884 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x68 - beq _08089892 - movs r0, 0 - b _08089894 -_08089892: - movs r0, 0x1 -_08089894: - pop {r1} - bx r1 - thumb_func_end is_role_x68 - - thumb_func_start MetatileBehavior_IsAquaHideoutWarp -MetatileBehavior_IsAquaHideoutWarp: @ 8089898 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x67 - beq _080898A6 - movs r0, 0 - b _080898A8 -_080898A6: - movs r0, 0x1 -_080898A8: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsAquaHideoutWarp - - thumb_func_start sub_80898AC -sub_80898AC: @ 80898AC - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x70 - beq _080898BA - movs r0, 0 - b _080898BC -_080898BA: - movs r0, 0x1 -_080898BC: - pop {r1} - bx r1 - thumb_func_end sub_80898AC - - thumb_func_start sub_80898C0 -sub_80898C0: @ 80898C0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xE - beq _080898CE - movs r0, 0 - b _080898D0 -_080898CE: - movs r0, 0x1 -_080898D0: - pop {r1} - bx r1 - thumb_func_end sub_80898C0 - - thumb_func_start MetatileBehavior_IsSurfableFishableWater -MetatileBehavior_IsSurfableFishableWater: @ 80898D4 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x10 - beq _080898F8 - cmp r0, 0x15 - beq _080898F8 - cmp r0, 0x11 - beq _080898F8 - cmp r0, 0x12 - beq _080898F8 - cmp r0, 0x14 - beq _080898F8 - subs r0, 0x50 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3 - bhi _080898FC -_080898F8: - movs r0, 0x1 - b _080898FE -_080898FC: - movs r0, 0 -_080898FE: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsSurfableFishableWater - - thumb_func_start sub_8089904 -sub_8089904: @ 8089904 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xF - beq _08089912 - movs r0, 0 - b _08089914 -_08089912: - movs r0, 0x1 -_08089914: - pop {r1} - bx r1 - thumb_func_end sub_8089904 - - thumb_func_start sub_8089918 -sub_8089918: @ 8089918 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x66 - beq _08089926 - movs r0, 0 - b _08089928 -_08089926: - movs r0, 0x1 -_08089928: - pop {r1} - bx r1 - thumb_func_end sub_8089918 - - thumb_func_start sub_808992C -sub_808992C: @ 808992C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xD2 - beq _0808993A - movs r0, 0 - b _0808993C -_0808993A: - movs r0, 0x1 -_0808993C: - pop {r1} - bx r1 - thumb_func_end sub_808992C - - thumb_func_start MetatileBehavior_IsMuddySlope -@ bool8 MetatileBehavior_IsMuddySlope(u8 metatileBehavior) -MetatileBehavior_IsMuddySlope: @ 8089940 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xD0 - beq _0808994E - movs r0, 0 - b _08089950 -_0808994E: - movs r0, 0x1 -_08089950: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsMuddySlope - - thumb_func_start MetatileBehavior_IsBumpySlope -MetatileBehavior_IsBumpySlope: @ 8089954 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xD1 - beq _08089962 - movs r0, 0 - b _08089964 -_08089962: - movs r0, 0x1 -_08089964: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsBumpySlope - - thumb_func_start MetatileBehavior_IsIsolatedVerticalRail -MetatileBehavior_IsIsolatedVerticalRail: @ 8089968 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xD3 - beq _08089976 - movs r0, 0 - b _08089978 -_08089976: - movs r0, 0x1 -_08089978: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsIsolatedVerticalRail - - thumb_func_start MetatileBehavior_IsIsolatedHorizontalRail -MetatileBehavior_IsIsolatedHorizontalRail: @ 808997C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xD4 - beq _0808998A - movs r0, 0 - b _0808998C -_0808998A: - movs r0, 0x1 -_0808998C: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsIsolatedHorizontalRail - - thumb_func_start MetatileBehavior_IsVerticalRail -MetatileBehavior_IsVerticalRail: @ 8089990 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xD5 - beq _0808999E - movs r0, 0 - b _080899A0 -_0808999E: - movs r0, 0x1 -_080899A0: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsVerticalRail - - thumb_func_start MetatileBehavior_IsHorizontalRail -MetatileBehavior_IsHorizontalRail: @ 80899A4 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xD6 - beq _080899B2 - movs r0, 0 - b _080899B4 -_080899B2: - movs r0, 0x1 -_080899B4: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsHorizontalRail - - thumb_func_start MetatileBehavior_IsSeaweed -MetatileBehavior_IsSeaweed: @ 80899B8 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x22 - beq _080899C6 - cmp r0, 0x2A - bne _080899CA -_080899C6: - movs r0, 0x1 - b _080899CC -_080899CA: - movs r0, 0 -_080899CC: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsSeaweed - - thumb_func_start MetatileBehavior_IsRunningDisallowed -MetatileBehavior_IsRunningDisallowed: @ 80899D0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xA - beq _080899EC - cmp r0, 0x3 - beq _080899EC - cmp r0, 0x28 - beq _080899EC - bl MetatileBehavior_IsPacifidlogLog - lsls r0, 24 - cmp r0, 0 - beq _080899F0 -_080899EC: - movs r0, 0x1 - b _080899F2 -_080899F0: - movs r0, 0 -_080899F2: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsRunningDisallowed - - thumb_func_start sub_80899F8 -sub_80899F8: @ 80899F8 - push {lr} - lsls r0, 24 - lsrs r1, r0, 24 - movs r2, 0xFE - lsls r2, 24 - adds r0, r2 - lsrs r0, 24 - cmp r0, 0x1 - bls _08089A12 - cmp r1, 0x24 - beq _08089A12 - cmp r1, 0x9 - bne _08089A16 -_08089A12: - movs r0, 0x1 - b _08089A18 -_08089A16: - movs r0, 0 -_08089A18: - pop {r1} - bx r1 - thumb_func_end sub_80899F8 - - thumb_func_start sub_8089A1C -sub_8089A1C: @ 8089A1C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x8E - beq _08089A2A - movs r0, 0 - b _08089A2C -_08089A2A: - movs r0, 0x1 -_08089A2C: - pop {r1} - bx r1 - thumb_func_end sub_8089A1C - - thumb_func_start sub_8089A30 -sub_8089A30: @ 8089A30 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xE0 - beq _08089A3E - movs r0, 0 - b _08089A40 -_08089A3E: - movs r0, 0x1 -_08089A40: - pop {r1} - bx r1 - thumb_func_end sub_8089A30 - - thumb_func_start sub_8089A44 -sub_8089A44: @ 8089A44 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xE1 - beq _08089A52 - movs r0, 0 - b _08089A54 -_08089A52: - movs r0, 0x1 -_08089A54: - pop {r1} - bx r1 - thumb_func_end sub_8089A44 - - thumb_func_start sub_8089A58 -sub_8089A58: @ 8089A58 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xE2 - beq _08089A66 - movs r0, 0 - b _08089A68 -_08089A66: - movs r0, 0x1 -_08089A68: - pop {r1} - bx r1 - thumb_func_end sub_8089A58 - - thumb_func_start sub_8089A6C -sub_8089A6C: @ 8089A6C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xE3 - beq _08089A7A - movs r0, 0 - b _08089A7C -_08089A7A: - movs r0, 0x1 -_08089A7C: - pop {r1} - bx r1 - thumb_func_end sub_8089A6C - - thumb_func_start sub_8089A80 -sub_8089A80: @ 8089A80 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xE4 - beq _08089A8E - movs r0, 0 - b _08089A90 -_08089A8E: - movs r0, 0x1 -_08089A90: - pop {r1} - bx r1 - thumb_func_end sub_8089A80 - - thumb_func_start sub_8089A94 -sub_8089A94: @ 8089A94 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xE5 - beq _08089AA2 - movs r0, 0 - b _08089AA4 -_08089AA2: - movs r0, 0x1 -_08089AA4: - pop {r1} - bx r1 - thumb_func_end sub_8089A94 - - thumb_func_start sub_8089AA8 -sub_8089AA8: @ 8089AA8 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xE6 - beq _08089AB6 - movs r0, 0 - b _08089AB8 -_08089AB6: - movs r0, 0x1 -_08089AB8: - pop {r1} - bx r1 - thumb_func_end sub_8089AA8 - - thumb_func_start sub_8089ABC -sub_8089ABC: @ 8089ABC - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xD - beq _08089ACA - movs r0, 0 - b _08089ACC -_08089ACA: - movs r0, 0x1 -_08089ACC: - pop {r1} - bx r1 - thumb_func_end sub_8089ABC - - thumb_func_start sub_8089AD0 -sub_8089AD0: @ 8089AD0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - cmp r1, 0x2 - bne _08089AE2 - cmp r0, 0xE8 - beq _08089AE6 -_08089AE2: - movs r0, 0 - b _08089AE8 -_08089AE6: - movs r0, 0x1 -_08089AE8: - pop {r1} - bx r1 - thumb_func_end sub_8089AD0 - - thumb_func_start sub_8089AEC -sub_8089AEC: @ 8089AEC - push {lr} - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - cmp r1, 0x2 - bne _08089AFE - cmp r0, 0xE7 - beq _08089B02 -_08089AFE: - movs r0, 0 - b _08089B04 -_08089B02: - movs r0, 0x1 -_08089B04: - pop {r1} - bx r1 - thumb_func_end sub_8089AEC - - thumb_func_start MetatileBehavior_IsQuestionnaire -MetatileBehavior_IsQuestionnaire: @ 8089B08 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x8F - beq _08089B16 - movs r0, 0 - b _08089B18 -_08089B16: - movs r0, 0x1 -_08089B18: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsQuestionnaire - - thumb_func_start MetatileBehavior_IsLongGrass2 -MetatileBehavior_IsLongGrass2: @ 8089B1C - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3 - beq _08089B2A - movs r0, 0 - b _08089B2C -_08089B2A: - movs r0, 0x1 -_08089B2C: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsLongGrass2 - - thumb_func_start MetatileBehavior_IsLongGrassSouthEdge -MetatileBehavior_IsLongGrassSouthEdge: @ 8089B30 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x9 - beq _08089B3E - movs r0, 0 - b _08089B40 -_08089B3E: - movs r0, 0x1 -_08089B40: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsLongGrassSouthEdge - - thumb_func_start MetatileBehavior_IsTrainerHillTimer -MetatileBehavior_IsTrainerHillTimer: @ 8089B44 - push {lr} - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0xE9 - beq _08089B52 - movs r0, 0 - b _08089B54 -_08089B52: - movs r0, 0x1 -_08089B54: - pop {r1} - bx r1 - thumb_func_end MetatileBehavior_IsTrainerHillTimer - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/pokenav.s b/asm/pokenav.s index 58e60c51d..28f0df0ea 100755 --- a/asm/pokenav.s +++ b/asm/pokenav.s @@ -27356,7 +27356,7 @@ _081D4870: bl MapGridGetMetatileBehaviorAt lsls r0, 24 lsrs r0, 24 - bl sub_8088E64 + bl MetatileBehavior_IsPokeGrass lsls r0, 24 lsrs r0, 24 _081D4888: diff --git a/asm/rom4.s b/asm/rom4.s index 9fb9e2bd6..c80eb194e 100644 --- a/asm/rom4.s +++ b/asm/rom4.s @@ -1699,19 +1699,19 @@ _080853AC: lsls r4, 24 lsrs r5, r4, 24 adds r0, r5, 0 - bl sub_8088F74 + bl MetatileBehavior_IsDeepSouthWarp lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 beq _080853E8 adds r0, r5, 0 - bl sub_8088F58 + bl MetatileBehavior_IsNonAnimDoor lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 beq _08085442 adds r0, r5, 0 - bl sub_8088EFC + bl MetatileBehavior_IsDoor lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 diff --git a/asm/secret_base.s b/asm/secret_base.s index e514e88f1..0290e9f7f 100644 --- a/asm/secret_base.s +++ b/asm/secret_base.s @@ -1163,13 +1163,13 @@ _080E941E: lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl sub_8089350 + bl MetatileBehavior_IsMB_B5 lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 beq _080E9462 adds r0, r4, 0 - bl sub_8089364 + bl MetatileBehavior_IsMB_C3 lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -3288,7 +3288,7 @@ _080EA62C: .pool _080EA668: adds r0, r5, 0 - bl sub_80893C8 + bl MetatileBehavior_IsSecretBaseGlitterMat lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -3308,7 +3308,7 @@ _080EA680: .pool _080EA698: adds r0, r5, 0 - bl sub_808938C + bl MetatileBehavior_IsSecretBaseBalloon lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -3377,7 +3377,7 @@ _080EA714: .pool _080EA72C: adds r0, r5, 0 - bl sub_80893A0 + bl MetatileBehavior_IsMB_BE lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -3409,7 +3409,7 @@ _080EA75E: .pool _080EA778: adds r0, r5, 0 - bl sub_80893B4 + bl MetatileBehavior_IsSecretBaseSoundMat lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -3429,7 +3429,7 @@ _080EA778: .pool _080EA7A8: adds r0, r5, 0 - bl MetatileBehavior_0xBB + bl MetatileBehavior_IsSecretBaseJumpMat lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -3449,7 +3449,7 @@ _080EA7A8: .pool _080EA7D8: adds r0, r5, 0 - bl MetatileBehavior_0xBC + bl MetatileBehavior_IsSecretBaseSpinMat lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 diff --git a/asm/wild_encounter.s b/asm/wild_encounter.s index 2c628a5e4..9b6c901f6 100644 --- a/asm/wild_encounter.s +++ b/asm/wild_encounter.s @@ -68,7 +68,7 @@ _080B4920: bl MapGridGetMetatileBehaviorAt lsls r0, 24 lsrs r0, 24 - bl sub_8089660 + bl MetatileBehavior_IsSurfableAndNotWaterfall lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1424,7 +1424,7 @@ _080B539C: lsls r0, r6, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl sub_808952C + bl MetatileBehavior_IsLandWildEncounter lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1498,7 +1498,7 @@ _080B5418: .pool _080B543C: adds r0, r4, 0 - bl sub_8089558 + bl MetatileBehavior_IsWaterWildEncounter lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1509,7 +1509,7 @@ _080B543C: cmp r0, 0 beq _080B54FE adds r0, r4, 0 - bl sub_80894AC + bl MetatileBehavior_IsBridge lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1726,7 +1726,7 @@ _080B562C: bl MapGridGetMetatileBehaviorAt lsls r0, 24 lsrs r0, 24 - bl sub_808952C + bl MetatileBehavior_IsLandWildEncounter lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -1769,7 +1769,7 @@ _080B568C: bl MapGridGetMetatileBehaviorAt lsls r0, 24 lsrs r0, 24 - bl sub_8089558 + bl MetatileBehavior_IsWaterWildEncounter lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 diff --git a/data/metatile_behavior.s b/data/rom_8486FEC.s similarity index 60% rename from data/metatile_behavior.s rename to data/rom_8486FEC.s index ea19a3031..9b7834a32 100644 --- a/data/metatile_behavior.s +++ b/data/rom_8486FEC.s @@ -4,5 +4,5 @@ .section .rodata .align 2, 0 -gUnknown_08486EFC:: @ 8486EFC - .incbin "baserom.gba", 0x486efc, 0x10090 +gUnknown_8486FEC:: @ 8486FEC + .incbin "baserom.gba", 0x486fec, 0xFFA0 diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h index 5ed36c690..d6743b788 100644 --- a/include/metatile_behavior.h +++ b/include/metatile_behavior.h @@ -1,11 +1,149 @@ -#ifndef GUARD_METATILE_BEHAVIOR_H -#define GUARD_METATILE_BEHAVIOR_H +#ifndef GUARD_METATILE_BEHAVIOR +#define GUARD_METATILE_BEHAVIOR -// Exported type declarations +bool8 ShouldDoJumpLandingDustEffect(u8); +bool8 MetatileBehavior_IsEncounterTile(u8); +bool8 MetatileBehavior_IsJumpEast(u8); +bool8 MetatileBehavior_IsJumpWest(u8); +bool8 MetatileBehavior_IsJumpNorth(u8); +bool8 MetatileBehavior_IsJumpSouth(u8); +bool8 MetatileBehavior_IsPokeGrass(u8); +bool8 MetatileBehavior_IsSandOrDeepSand(u8); +bool8 MetatileBehavior_IsDeepSand(u8); +bool8 MetatileBehavior_IsReflective(u8); +bool8 MetatileBehavior_IsIce(u8); +bool8 MetatileBehavior_IsWarpDoor(u8); +bool8 MetatileBehavior_IsDoor(u8); +bool8 MetatileBehavior_IsEscalator(u8); +bool8 MetatileBehavior_IsMB_04(u8); +bool8 MetatileBehavior_IsLadder(u8); +bool8 MetatileBehavior_IsNonAnimDoor(u8); +bool8 MetatileBehavior_IsDeepSouthWarp(u8); +bool8 MetatileBehavior_IsSurfableWaterOrUnderwater(u8); +bool8 MetatileBehavior_IsEastArrowWarp(u8); +bool8 MetatileBehavior_IsWestArrowWarp(u8); +bool8 MetatileBehavior_IsNorthArrowWarp(u8); +bool8 MetatileBehavior_IsSouthArrowWarp(u8); +bool8 MetatileBehavior_IsArrowWarp(u8); +bool8 MetatileBehavior_IsMoveTile(u8); +bool8 MetatileBehavior_IsIce_2(u8); +bool8 MetatileBehavior_IsTrickHouseSlipperyFloor(u8); +bool8 MetatileBehavior_IsMB_05(u8); +bool8 MetatileBehavior_IsWalkNorth(u8); +bool8 MetatileBehavior_IsWalkSouth(u8); +bool8 MetatileBehavior_IsWalkWest(u8); +bool8 MetatileBehavior_IsWalkEast(u8); +bool8 MetatileBehavior_IsNorthwardCurrent(u8); +bool8 MetatileBehavior_IsSouthwardCurrent(u8); +bool8 MetatileBehavior_IsWestwardCurrent(u8); +bool8 MetatileBehavior_IsEastwardCurrent(u8); +bool8 MetatileBehavior_IsSlideNorth(u8); +bool8 MetatileBehavior_IsSlideSouth(u8); +bool8 MetatileBehavior_IsSlideWest(u8); +bool8 MetatileBehavior_IsSlideEast(u8); +bool8 MetatileBehavior_IsCounter(u8); +bool8 MetatileBehavior_IsPlayerFacingTVScreen(u8 tile, u8 playerDir); +bool8 MetatileBehavior_IsPC(u8); +bool8 MetatileBehavior_IsCableBoxResults1(u8); +bool8 MetatileBehavior_IsSecretBaseOpen(u8); +bool8 MetatileBehavior_IsSecretBaseCave(u8); +bool8 MetatileBehavior_IsSecretBaseTree(u8); +bool8 MetatileBehavior_IsSecretBaseShrub(u8); +bool8 MetatileBehavior_IsSecretBasePC(u8); +bool8 MetatileBehavior_IsSecretBaseRegisterPC(u8); +bool8 MetatileBehavior_IsMB_B2(u8); +bool8 MetatileBehavior_IsMB_B3(u8); +bool8 MetatileBehavior_IsMB_B9(u8); +bool8 MetatileBehavior_IsMB_C6(u8); +bool8 MetatileBehavior_IsSecretBasePoster(u8); +bool8 MetatileBehavior_IsNormal(u8); +bool8 MetatileBehavior_IsMB_B7(u8); +bool8 MetatileBehavior_IsMB_B2_Duplicate(u8); +bool8 MetatileBehavior_IsMB_B5(u8); +bool8 MetatileBehavior_IsMB_C3(u8); +bool8 MetatileBehavior_IsMB_C2(u8); +bool8 MetatileBehavior_IsSecretBaseBalloon(u8); +bool8 MetatileBehavior_IsMB_BE(u8); +bool8 MetatileBehavior_IsSecretBaseSoundMat(u8); +bool8 MetatileBehavior_IsSecretBaseGlitterMat(u8); +bool8 MetatileBehavior_IsMB_BF(u8); +bool8 MetatileBehavior_IsSecretBaseTvOrShield(u8); +bool8 MetatileBehavior_IsMB_C5(u8); +bool8 MetatileBehavior_HasRipples(u8); +bool8 MetatileBehavior_IsPuddle(u8); +bool8 MetatileBehavior_IsTallGrass(u8); +bool8 MetatileBehavior_IsLongGrass(u8); +bool8 MetatileBehavior_IsBerryTreeSoil(u8); +bool8 MetatileBehavior_IsAsh(u8); +bool8 MetatileBehavior_IsUnusedFootprintMetatile(u8); +bool8 MetatileBehavior_IsBridge(u8); +u8 MetatileBehavior_GetBridgeSth(u8); +u8 MetatileBehavior_8089510(u8); +bool8 MetatileBehavior_IsLandWildEncounter(u8); +bool8 MetatileBehavior_IsWaterWildEncounter(u8); +bool8 MetatileBehavior_IsMB_0B(u8); +bool8 MetatileBehavior_IsMountain(u8); +bool8 MetatileBehavior_IsDiveable(u8); +bool8 MetatileBehavior_IsUnableToEmerge(u8); +bool8 MetatileBehavior_IsShallowFlowingWater(u8); +bool8 MetatileBehavior_IsThinIce(u8); +bool8 MetatileBehavior_IsCrackedIce(u8); +bool8 MetatileBehavior_IsDeepOrOceanWater(u8); +bool8 MetatileBehavior_IsMB_18_OrMB_1A(u8); +bool8 MetatileBehavior_IsSurfableAndNotWaterfall(u8); +bool8 MetatileBehavior_IsEastBlocked(u8); +bool8 MetatileBehavior_IsWestBlocked(u8); +bool8 MetatileBehavior_IsNorthBlocked(u8); +bool8 MetatileBehavior_IsSouthBlocked(u8); +bool8 MetatileBehavior_IsShortGrass(u8); +bool8 MetatileBehavior_IsHotSprings(u8); +bool8 MetatileBehavior_IsWaterfall(u8); +bool8 MetatileBehavior_IsFortreeBridge(u8); +bool8 MetatileBehavior_IsPacifilogVerticalLog1(u8); +bool8 MetatileBehavior_IsPacifilogVerticalLog2(u8); +bool8 MetatileBehavior_IsPacifilogHorizontalLog1(u8); +bool8 MetatileBehavior_IsPacifilogHorizontalLog2(u8); +bool8 MetatileBehavior_IsPacifidlogLog(u8); +bool8 MetatileBehavior_IsTrickHousePuzzleDoor(u8); +bool8 MetatileBehavior_IsRegionMap(u8); +bool8 MetatileBehavior_IsClosedSootopolisGymDoor(u8); +bool8 MetatileBehavior_IsUnknownClosedDoor(u8); +bool8 MetatileBehavior_IsRoulette(u8); +bool8 MetatileBehavior_IsPokeblockFeeder(u8); +bool8 MetatileBehavior_IsSecretBaseJumpMat(u8); +bool8 MetatileBehavior_IsSecretBaseSpinMat(u8); +bool8 MetatileBehavior_IsLavaridgeB1FWarp(u8); +bool8 MetatileBehavior_IsLavaridgeB1FWarp(u8); +bool8 MetatileBehavior_IsAquaHideoutWarp(u8); +bool8 MetatileBehavior_IsWarpOrBridge(u8); +bool8 MetatileBehavior_IsMossdeepGymWarp(u8); +bool8 MetatileBehavior_IsSurfableFishableWater(u8); +bool8 MetatileBehavior_IsMtPyreHole(u8); +bool8 MetatileBehavior_IsCrackedFloorHole(u8); +bool8 MetatileBehavior_IsCrackedFloor(u8); +bool8 MetatileBehavior_IsMuddySlope(u8); +bool8 MetatileBehavior_IsBumpySlope(u8); +bool8 MetatileBehavior_IsIsolatedVerticalRail(u8); +bool8 MetatileBehavior_IsIsolatedHorizontalRail(u8); +bool8 MetatileBehavior_IsVerticalRail(u8); +bool8 MetatileBehavior_IsHorizontalRail(u8); +bool8 MetatileBehavior_IsSeaweed(u8); +bool8 MetatileBehavior_IsRunningDisallowed(u8); +bool8 MetatileBehavior_IsCuttableGrass(u8); +bool8 MetatileBehavior_IsRunningShoesInstruction(u8); +bool8 MetatileBehavior_IsPictureBookShelf(u8); +bool8 MetatileBehavior_IsBookShelf(u8); +bool8 MetatileBehavior_IsPokeCenterBookShelf(u8); +bool8 MetatileBehavior_IsVase(u8); +bool8 MetatileBehavior_IsTrashCan(u8); +bool8 MetatileBehavior_IsShopShelf(u8); +bool8 MetatileBehavior_IsBlueprint(u8); +bool8 MetatileBehavior_IsBattlePyramidWarp(u8); +bool8 MetatileBehavior_IsPlayerFacingWirelessBoxResults(u8 tile, u8 playerDir); +bool8 MetatileBehavior_IsCableBoxResults2(u8 tile, u8 playerDir); +bool8 MetatileBehavior_IsQuestionnaire(u8); +bool8 MetatileBehavior_IsLongGrass_Duplicate(u8); +bool8 MetatileBehavior_IsLongGrassSouthEdge(u8); +bool8 MetatileBehavior_IsTrainerHillTimer(u8); -// Exported RAM declarations - -// Exported ROM declarations -bool8 sub_8088E64(u8); - -#endif //GUARD_METATILE_BEHAVIOR_H +#endif // GUARD_METATILE_BEHAVIOR diff --git a/include/metatile_behaviors.h b/include/metatile_behaviors.h new file mode 100644 index 000000000..dd3a8b4f4 --- /dev/null +++ b/include/metatile_behaviors.h @@ -0,0 +1,179 @@ +#ifndef GUARD_METATILE_BEHAVIORS +#define GUARD_METATILE_BEHAVIORS + +#define MB_NORMAL 0x00 +#define MB_TALL_GRASS 0x02 +#define MB_LONG_GRASS 0x03 +#define MB_04 0x04 +#define MB_05 0x05 +#define MB_DEEP_SAND 0x06 +#define MB_SHORT_GRASS 0x07 +#define MB_CAVE 0x08 +#define MB_LONG_GRASS_SOUTH_EDGE 0x09 +#define MB_NO_RUNNING 0x0A +#define MB_0B 0x0B +#define MB_MOUNTAIN_TOP 0x0C +#define MB_BATTLE_PYRAMID_WARP 0x0D +#define MB_MOSSDEEP_GYM_WARP 0x0E +#define MB_MT_PYRE_HOLE 0x0F +#define MB_POND_WATER 0x10 +#define MB_SEMI_DEEP_WATER 0x11 +#define MB_DEEP_WATER 0x12 +#define MB_WATERFALL 0x13 +#define MB_SOOTOPOLIS_DEEP_WATER 0x14 +#define MB_OCEAN_WATER 0x15 +#define MB_PUDDLE 0x16 +#define MB_SHALLOW_WATER 0x17 +#define MB_18 0x18 +#define MB_NO_SURFACING 0x19 +#define MB_1A 0x1A +#define MB_STAIRS_OUTSIDE_ABANDONED_SHIP 0x1B +#define MB_SHOAL_CAVE_ENTRANCE 0x1C +#define MB_ICE 0x20 +#define MB_SAND 0x21 +#define MB_SEAWEED 0x22 +#define MB_ASHGRASS 0x24 +#define MB_25 0x25 +#define MB_THIN_ICE 0x26 +#define MB_CRACKED_ICE 0x27 +#define MB_HOT_SPRINGS 0x28 +#define MB_LAVARIDGE_GYM_B1F_WARP 0x29 +#define MB_SEAWEED_NO_SURFACING 0x2A +#define MB_REFLECTION_UNDER_BRIDGE 0x2B +#define MB_IMPASSABLE_EAST 0x30 +#define MB_IMPASSABLE_WEST 0x31 +#define MB_IMPASSABLE_NORTH 0x32 +#define MB_IMPASSABLE_SOUTH 0x33 +#define MB_IMPASSABLE_NORTHEAST 0x34 +#define MB_IMPASSABLE_NORTHWEST 0x35 +#define MB_IMPASSABLE_SOUTHEAST 0x36 +#define MB_IMPASSABLE_SOUTHWEST 0x37 +#define MB_JUMP_EAST 0x38 +#define MB_JUMP_WEST 0x39 +#define MB_JUMP_NORTH 0x3A +#define MB_JUMP_SOUTH 0x3B +#define MB_JUMP_SOUTHEAST 0x3E +#define MB_JUMP_SOUTHWEST 0x3F +#define MB_WALK_EAST 0x40 +#define MB_WALK_WEST 0x41 +#define MB_WALK_NORTH 0x42 +#define MB_WALK_SOUTH 0x43 +#define MB_SLIDE_EAST 0x44 +#define MB_SLIDE_WEST 0x45 +#define MB_SLIDE_NORTH 0x46 +#define MB_SLIDE_SOUTH 0x47 +#define MB_TRICK_HOUSE_PUZZLE_8_FLOOR 0x48 +#define MB_EASTWARD_CURRENT 0x50 +#define MB_WESTWARD_CURRENT 0x51 +#define MB_NORTHWARD_CURRENT 0x52 +#define MB_SOUTHWARD_CURRENT 0x53 +#define MB_NON_ANIMATED_DOOR 0x60 +#define MB_LADDER 0x61 +#define MB_EAST_ARROW_WARP 0x62 +#define MB_WEST_ARROW_WARP 0x63 +#define MB_NORTH_ARROW_WARP 0x64 +#define MB_SOUTH_ARROW_WARP 0x65 +#define MB_CRACKED_FLOOR_HOLE 0x66 +#define MB_AQUA_HIDEOUT_WARP 0x67 +#define MB_LAVARIDGE_GYM_1F_WARP 0x68 +#define MB_ANIMATED_DOOR 0x69 +#define MB_UP_ESCALATOR 0x6A +#define MB_DOWN_ESCALATOR 0x6B +#define MB_WATER_DOOR 0x6C +#define MB_WATER_SOUTH_ARROW_WARP 0x6D +#define MB_DEEP_SOUTH_WARP 0x6E +#define MB_WARP_OR_BRIDGE 0x70 +#define MB_71 0x71 +#define MB_ROUTE120_NORTH_BRIDGE_1 0x72 +#define MB_ROUTE120_NORTH_BRIDGE_2 0x73 +#define MB_PACIFIDLOG_VERTICAL_LOG_1 0x74 +#define MB_PACIFIDLOG_VERTICAL_LOG_2 0x75 +#define MB_PACIFIDLOG_HORIZONTAL_LOG_1 0x76 +#define MB_PACIFIDLOG_HORIZONTAL_LOG_2 0x77 +#define MB_FORTREE_BRIDGE 0x78 +#define MB_ROUTE120_SOUTH_BRIDGE_1 0x7A +#define MB_ROUTE120_SOUTH_BRIDGE_2 0x7B +#define MB_ROUTE120_NORTH_BRIDGE_3 0x7C +#define MB_ROUTE120_NORTH_BRIDGE_4 0x7D +#define MB_7E 0x7E +#define MB_ROUTE110_BRIDGE 0x7F +#define MB_COUNTER 0x80 +#define MB_PC 0x83 +#define MB_CABLE_BOX_RESULTS_1 0x84 +#define MB_REGION_MAP 0x85 +#define MB_TELEVISION 0x86 +#define MB_POKEBLOCK_FEEDER 0x87 +#define MB_SLOT_MACHINE 0x89 +#define MB_ROULETTE 0x8A +#define MB_CLOSED_SOOTOPOLIS_GYM_DOOR 0x8B +#define MB_TRICK_HOUSE_PUZZLE_DOOR 0x8C +#define MB_8D 0x8D +#define MB_RUNNING_SHOES_INSTRUCTION 0x8E +#define MB_QUESTIONNAIRE 0x8F +#define MB_SECRET_BASE_SPOT_RED_CAVE 0x90 +#define MB_SECRET_BASE_SPOT_RED_CAVE_OPEN 0x91 +#define MB_SECRET_BASE_SPOT_BROWN_CAVE 0x92 +#define MB_SECRET_BASE_SPOT_BROWN_CAVE_OPEN 0x93 +#define MB_SECRET_BASE_SPOT_YELLOW_CAVE 0x94 +#define MB_SECRET_BASE_SPOT_YELLOW_CAVE_OPEN 0x95 +#define MB_SECRET_BASE_SPOT_TREE_LEFT 0x96 +#define MB_SECRET_BASE_SPOT_TREE_LEFT_OPEN 0x97 +#define MB_SECRET_BASE_SPOT_SHRUB 0x98 +#define MB_SECRET_BASE_SPOT_SHRUB_OPEN 0x99 +#define MB_SECRET_BASE_SPOT_BLUE_CAVE 0x9A +#define MB_SECRET_BASE_SPOT_BLUE_CAVE_OPEN 0x9B +#define MB_SECRET_BASE_SPOT_TREE_RIGHT 0x9C +#define MB_SECRET_BASE_SPOT_TREE_RIGHT_OPEN 0x9D +#define MB_BERRY_TREE_SOIL 0xA0 +#define MB_SECRET_BASE_PC 0xB0 +#define MB_SECRET_BASE_REGISTER_PC 0xB1 +#define MB_B2 0xB2 +#define MB_B3 0xB3 +#define MB_B4 0xB4 +#define MB_B5 0xB5 +#define MB_B6 0xB6 +#define MB_B7 0xB7 +#define MB_SECRET_BASE_BALLOON 0xB8 +#define MB_B9 0xB9 +#define MB_SECRET_BASE_GLITTER_MAT 0xBA +#define MB_SECRET_BASE_JUMP_MAT 0xBB +#define MB_SECRET_BASE_SPIN_MAT 0xBC +#define MB_SECRET_BASE_SOUND_MAT 0xBD +#define MB_BE 0xBE +#define MB_BF 0xBF +#define MB_BED 0xC0 +#define MB_C1 0xC1 +#define MB_C2 0xC2 +#define MB_C3 0xC3 +#define MB_SECRET_BASE_TV_SHIELD 0xC4 +#define MB_C5 0xC5 +#define MB_C6 0xC6 +#define MB_SECRET_BASE_POSTER 0xC7 +#define MB_C8 0xC8 +#define MB_C9 0xC9 +#define MB_CA 0xCA +#define MB_CB 0xCB +#define MB_CC 0xCC +#define MB_CD 0xCD +#define MB_CE 0xCE +#define MB_CF 0xCF +#define MB_MUDDY_SLOPE 0xD0 +#define MB_BUMPY_SLOPE 0xD1 +#define MB_CRACKED_FLOOR 0xD2 +#define MB_ISOLATED_VERTICAL_RAIL 0xD3 +#define MB_ISOLATED_HORIZONTAL_RAIL 0xD4 +#define MB_VERTICAL_RAIL 0xD5 +#define MB_HORIZONTAL_RAIL 0xD6 +#define MB_PICTURE_BOOK_SHELF 0xE0 +#define MB_BOOKSHELF 0xE1 +#define MB_POKEMON_CENTER_BOOKSHELF 0xE2 +#define MB_VASE 0xE3 +#define MB_TRASH_CAN 0xE4 +#define MB_SHOP_SHELF 0xE5 +#define MB_BLUEPRINT 0xE6 +#define MB_CABLE_BOX_RESULTS_2 0xE7 +#define MB_WIRELESS_BOX_RESULTS 0xE8 +#define MB_TRAINER_HILL_TIMER 0xE9 +#define MB_UNKNOWN_CLOSED_DOOR 0xEA + +#endif // GUARD_METATILE_BEHAVIORS diff --git a/ld_script.txt b/ld_script.txt index 64a43d573..4025a487f 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -92,7 +92,7 @@ SECTIONS { src/new_game.o(.text); asm/rom4.o(.text); asm/fieldmap.o(.text); - asm/metatile_behavior.o(.text); + src/metatile_behavior.o(.text); asm/field_camera.o(.text); asm/field_door.o(.text); asm/field_player_avatar.o(.text); @@ -349,7 +349,8 @@ SECTIONS { src/new_game.o(.rodata); data/rom4.o(.rodata); data/fieldmap.o(.rodata); - data/metatile_behavior.o(.rodata); + src/metatile_behavior.o(.rodata); + data/rom_8486FEC.o(.rodata); data/field_door.o(.rodata); data/field_player_avatar.o(.rodata); data/field_map_obj.o(.rodata); diff --git a/src/field_map_obj.c b/src/field_map_obj.c index 26bc513fb..e80e402c8 100755 --- a/src/field_map_obj.c +++ b/src/field_map_obj.c @@ -3413,7 +3413,7 @@ bool8 mss_08062EA4(struct MapObject *mapObject, struct Sprite *sprite) { return FALSE; } - return gUnknown_0850DA64[player_get_x22()](mapObject, sprite, player_get_direction_upper_nybble(), sub_8088E64); + return gUnknown_0850DA64[player_get_x22()](mapObject, sprite, player_get_direction_upper_nybble(), MetatileBehavior_IsPokeGrass); } bool8 sub_80925AC(struct MapObject *, struct Sprite *); diff --git a/src/metatile_behavior.c b/src/metatile_behavior.c new file mode 100644 index 000000000..b9760f522 --- /dev/null +++ b/src/metatile_behavior.c @@ -0,0 +1,1436 @@ +#include "global.h" +#include "metatile_behavior.h" +#include "metatile_behaviors.h" + +#define TILE_FLAG_ENCOUNTER_TILE 1 +#define TILE_FLAG_SURFABLE 2 + +#define TILE_ATTRIBUTES(three, two, one) (((one) ? 1 : 0) | ((two) ? 2 : 0) | ((three) ? 4 : 0)) + +// wonder what the third flag is supposed to do +static const u8 sTileBitAttributes[] = +{ + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_NORMAL 0x00 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x01 + TILE_ATTRIBUTES(TRUE, FALSE, TRUE), // MB_TALL_GRASS 0x02 + TILE_ATTRIBUTES(TRUE, FALSE, TRUE), // MB_LONG_GRASS 0x03 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_04 0x04 + TILE_ATTRIBUTES(FALSE, FALSE, TRUE), // MB_05 0x05 + TILE_ATTRIBUTES(TRUE, FALSE, TRUE), // MB_DEEP_SAND 0x06 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SHORT_GRASS 0x07 + TILE_ATTRIBUTES(TRUE, FALSE, TRUE), // MB_CAVE 0x08 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_LONG_GRASS_SOUTH_EDGE 0x09 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_NO_RUNNING 0x0A + TILE_ATTRIBUTES(TRUE, FALSE, TRUE), // MB_0B 0x0B + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_MOUNTAIN_TOP 0x0C + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_BATTLE_PYRAMID_WARP 0x0D + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_MOSSDEEP_GYM_WARP 0x0E + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_MT_PYRE_HOLE 0x0F + TILE_ATTRIBUTES(TRUE, TRUE, TRUE), // MB_POND_WATER 0x10 + TILE_ATTRIBUTES(TRUE, TRUE, TRUE), // MB_SEMI_DEEP_WATER 0x11 + TILE_ATTRIBUTES(TRUE, TRUE, TRUE), // MB_DEEP_WATER 0x12 + TILE_ATTRIBUTES(TRUE, TRUE, FALSE), // MB_WATERFALL 0x13 + TILE_ATTRIBUTES(TRUE, TRUE, FALSE), // MB_SOOTOPOLIS_DEEP_WATER 0x14 + TILE_ATTRIBUTES(TRUE, TRUE, TRUE), // MB_OCEAN_WATER 0x15 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_PUDDLE 0x16 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SHALLOW_WATER 0x17 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_18 0x18 + TILE_ATTRIBUTES(TRUE, TRUE, FALSE), // MB_NO_SURFACING 0x19 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_1A 0x1A + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_STAIRS_OUTSIDE_ABANDONED_SHIP 0x1B + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SHOAL_CAVE_ENTRANCE 0x1C + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x1D + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x1E + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x1F + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_ICE 0x20 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SAND 0x21 + TILE_ATTRIBUTES(TRUE, TRUE, TRUE), // MB_SEAWEED 0x22 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // ? 0x23 + TILE_ATTRIBUTES(TRUE, FALSE, TRUE), // MB_ASHGRASS 0x24 + TILE_ATTRIBUTES(TRUE, FALSE, TRUE), // MB_25 0x25 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_THIN_ICE 0x26 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_CRACKED_ICE 0x27 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_HOT_SPRINGS 0x28 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_LAVARIDGE_GYM_B1F_WARP 0x29 + TILE_ATTRIBUTES(TRUE, TRUE, TRUE), // MB_SEAWEED_NO_SURFACING 0x2A + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_REFLECTION_UNDER_BRIDGE 0x2B + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x2C + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x2D + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x2E + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x2F + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_IMPASSABLE_EAST 0x30 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_IMPASSABLE_WEST 0x31 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_IMPASSABLE_NORTH 0x32 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_IMPASSABLE_SOUTH 0x33 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_IMPASSABLE_NORTHEAST 0x34 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_IMPASSABLE_NORTHWEST 0x35 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_IMPASSABLE_SOUTHEAST 0x36 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_IMPASSABLE_SOUTHWEST 0x37 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_JUMP_EAST 0x38 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_JUMP_WEST 0x39 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_JUMP_NORTH 0x3A + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_JUMP_SOUTH 0x3B + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // ? 0x3C + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // ? 0x3D + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_JUMP_SOUTHEAST 0x3E + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_JUMP_SOUTHWEST 0x3F + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_WALK_EAST 0x40 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_WALK_WEST 0x41 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_WALK_NORTH 0x42 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_WALK_SOUTH 0x43 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SLIDE_EAST 0x44 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SLIDE_WEST 0x45 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SLIDE_NORTH 0x46 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SLIDE_SOUTH 0x47 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_TRICK_HOUSE_PUZZLE_8_FLOOR 0x48 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // ? 0x49 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // ? 0x4A + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x4B + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x4C + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x4D + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x4E + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x4F + TILE_ATTRIBUTES(TRUE, TRUE, FALSE), // MB_EASTWARD_CURRENT 0x50 + TILE_ATTRIBUTES(TRUE, TRUE, FALSE), // MB_WESTWARD_CURRENT 0x51 + TILE_ATTRIBUTES(TRUE, TRUE, FALSE), // MB_NORTHWARD_CURRENT 0x52 + TILE_ATTRIBUTES(TRUE, TRUE, FALSE), // MB_SOUTHWARD_CURRENT 0x53 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x54 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x55 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x56 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x57 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x58 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x59 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x5A + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x5B + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x5C + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x5D + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x5E + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x5F + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_NON_ANIMATED_DOOR 0x60 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_LADDER 0x61 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_EAST_ARROW_WARP 0x62 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_WEST_ARROW_WARP 0x63 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_NORTH_ARROW_WARP 0x64 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SOUTH_ARROW_WARP 0x65 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_CRACKED_FLOOR_HOLE 0x66 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_AQUA_HIDEOUT_WARP 0x67 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_LAVARIDGE_GYM_1F_WARP 0x68 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_ANIMATED_DOOR 0x69 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_UP_ESCALATOR 0x6A + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_DOWN_ESCALATOR 0x6B + TILE_ATTRIBUTES(TRUE, TRUE, FALSE), // MB_WATER_DOOR 0x6C + TILE_ATTRIBUTES(TRUE, TRUE, FALSE), // MB_WATER_SOUTH_ARROW_WARP 0x6D + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_DEEP_SOUTH_WARP 0x6E + TILE_ATTRIBUTES(TRUE, TRUE, FALSE), // ? 0x6F + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_WARP_OR_BRIDGE 0x70 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_71 0x71 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_ROUTE120_NORTH_BRIDGE_1 0x72 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_ROUTE120_NORTH_BRIDGE_2 0x73 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_PACIFIDLOG_VERTICAL_LOG_1 0x74 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_PACIFIDLOG_VERTICAL_LOG_2 0x75 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_PACIFIDLOG_HORIZONTAL_LOG_1 0x76 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_PACIFIDLOG_HORIZONTAL_LOG_2 0x77 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_FORTREE_BRIDGE 0x78 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x79 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_ROUTE120_SOUTH_BRIDGE_1 0x7A + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_ROUTE120_SOUTH_BRIDGE_2 0x7B + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_ROUTE120_NORTH_BRIDGE_3 0x7C + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_ROUTE120_NORTH_BRIDGE_4 0x7D + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_7E 0x7E + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_ROUTE110_BRIDGE 0x7F + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_COUNTER 0x80 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x81 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x82 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_PC 0x83 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_CABLE_BOX_RESULTS_1 0x84 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_REGION_MAP 0x85 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_TELEVISION 0x86 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_POKEBLOCK_FEEDER 0x87 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x88 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SLOT_MACHINE 0x89 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_ROULETTE 0x8A + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_CLOSED_SOOTOPOLIS_GYM_DOOR 0x8B + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_TRICK_HOUSE_PUZZLE_DOOR 0x8C + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_8D 0x8D + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_RUNNING_SHOES_INSTRUCTION 0x8E + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_QUESTIONNAIRE 0x8F + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_SPOT_RED_CAVE 0x90 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_SPOT_RED_CAVE_OPEN 0x91 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_SPOT_BROWN_CAVE 0x92 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_SPOT_BROWN_CAVE_OPEN 0x93 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_SPOT_YELLOW_CAVE 0x94 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_SPOT_YELLOW_CAVE_OPEN 0x95 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_SPOT_TREE_LEFT 0x96 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_SPOT_TREE_LEFT_OPEN 0x97 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_SPOT_SHRUB 0x98 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_SPOT_SHRUB_OPEN 0x99 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_SPOT_BLUE_CAVE 0x9A + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_SPOT_BLUE_CAVE_OPEN 0x9B + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_SPOT_TREE_RIGHT 0x9C + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_SPOT_TREE_RIGHT_OPEN 0x9D + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x9E + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0x9F + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_BERRY_TREE_SOIL 0xA0 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xA1 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xA2 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xA3 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xA4 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xA5 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xA6 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xA7 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xA8 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xA9 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xAA + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xAB + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xAC + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xAD + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xAE + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xAF A + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_PC 0xB0 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_REGISTER_PC 0xB1 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_B2 0xB2 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_B3 0xB3 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_B4 0xB4 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_B5 0xB5 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_B6 0xB6 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_B7 0xB7 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SECRET_BASE_BALLOON 0xB8 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_B9 0xB9 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SECRET_BASE_GLITTER_MAT 0xBA + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SECRET_BASE_JUMP_MAT 0xBB + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SECRET_BASE_SPIN_MAT 0xBC + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SECRET_BASE_SOUND_MAT 0xBD + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_BE 0xBE + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_BF 0xBF + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_BED 0xC0 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_C1 0xC1 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_C2 0xC2 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_C3 0xC3 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_SECRET_BASE_TV_SHIELD 0xC4 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_C5 0xC5 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_C6 0xC6 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SECRET_BASE_POSTER 0xC7 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_C8 0xC8 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_C9 0xC9 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_CA 0xCA + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_CB 0xCB + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_CC 0xCC + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_CD 0xCD + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_CE 0xCE + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_CF 0xCF + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_MUDDY_SLOPE 0xD0 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_BUMPY_SLOPE 0xD1 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_CRACKED_FLOOR 0xD2 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_ISOLATED_VERTICAL_RAIL 0xD3 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_ISOLATED_HORIZONTAL_RAIL 0xD4 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_VERTICAL_RAIL 0xD5 + TILE_ATTRIBUTES(TRUE, FALSE, FALSE), // MB_HORIZONTAL_RAIL 0xD6 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xD7 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xD8 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xD9 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xDA + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xDB + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xDC + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xDD + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xDE + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xDF + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_PICTURE_BOOK_SHELF 0xE0 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_BOOKSHELF 0xE1 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_POKEMON_CENTER_BOOKSHELF 0xE2 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_VASE 0xE3 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_TRASH_CAN 0xE4 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_SHOP_SHELF 0xE5 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_BLUEPRINT 0xE6 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_CABLE_BOX_RESULTS_2 0xE7 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_WIRELESS_BOX_RESULTS 0xE8 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_TRAINER_HILL_TIMER 0xE9 + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // MB_UNKNOWN_CLOSED_DOOR 0xEA + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xEB + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xEC + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xED + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xEE + TILE_ATTRIBUTES(FALSE, FALSE, FALSE), // ? 0xEF +}; + +// only used as default case for checking jump landing in field_ground_effect. +bool8 ShouldDoJumpLandingDustEffect(u8 var) +{ + return TRUE; +} + +bool8 MetatileBehavior_IsEncounterTile(u8 var) +{ + if ((sTileBitAttributes[var] & TILE_FLAG_ENCOUNTER_TILE) != 0) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsJumpEast(u8 var) +{ + if (var == MB_JUMP_EAST) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsJumpWest(u8 var) +{ + if (var == MB_JUMP_WEST) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsJumpNorth(u8 var) +{ + if (var == MB_JUMP_NORTH) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsJumpSouth(u8 var) +{ + if (var == MB_JUMP_SOUTH) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsPokeGrass(u8 var) +{ + if (var == MB_TALL_GRASS || var == MB_LONG_GRASS) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSandOrDeepSand(u8 var) +{ + if (var == MB_SAND || var == MB_DEEP_SAND) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsDeepSand(u8 var) +{ + if (var == MB_DEEP_SAND) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsReflective(u8 var) +{ + if (var == MB_POND_WATER || var == MB_PUDDLE || var == MB_1A || var == MB_ICE || var == MB_SOOTOPOLIS_DEEP_WATER || var == MB_REFLECTION_UNDER_BRIDGE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsIce(u8 var) +{ + if (var == MB_ICE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsWarpDoor(u8 var) +{ + if (var == MB_ANIMATED_DOOR) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsDoor(u8 var) +{ + if (var == MB_8D || var == MB_ANIMATED_DOOR) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsEscalator(u8 var) +{ + if (var == MB_UP_ESCALATOR || var == MB_DOWN_ESCALATOR) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_04(u8 var) // unused +{ + if (var == MB_04) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsLadder(u8 var) +{ + if (var == MB_LADDER) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsNonAnimDoor(u8 var) +{ + if (var == MB_NON_ANIMATED_DOOR || var == MB_WATER_DOOR || var == MB_DEEP_SOUTH_WARP) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsDeepSouthWarp(u8 var) +{ + if (var == MB_DEEP_SOUTH_WARP) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSurfableWaterOrUnderwater(u8 var) +{ + if ((sTileBitAttributes[var] & TILE_FLAG_SURFABLE) != 0) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsEastArrowWarp(u8 var) +{ + if (var == MB_EAST_ARROW_WARP) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsWestArrowWarp(u8 var) +{ + if (var == MB_WEST_ARROW_WARP) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsNorthArrowWarp(u8 var) +{ + if (var == MB_NORTH_ARROW_WARP || var == MB_STAIRS_OUTSIDE_ABANDONED_SHIP) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSouthArrowWarp(u8 var) +{ + if (var == MB_SOUTH_ARROW_WARP || var == MB_WATER_SOUTH_ARROW_WARP || var == MB_SHOAL_CAVE_ENTRANCE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsArrowWarp(u8 var) // unused +{ + u8 ret = FALSE; + + if (MetatileBehavior_IsEastArrowWarp(var) + || MetatileBehavior_IsWestArrowWarp(var) + || MetatileBehavior_IsNorthArrowWarp(var) + || MetatileBehavior_IsSouthArrowWarp(var)) + { + ret = TRUE; + } + + return ret; +} + +bool8 MetatileBehavior_IsMoveTile(u8 var) +{ + if ((var >= MB_WALK_EAST && var <= MB_TRICK_HOUSE_PUZZLE_8_FLOOR) || (var >= MB_EASTWARD_CURRENT && var <= MB_SOUTHWARD_CURRENT) + || var == MB_MUDDY_SLOPE || var == MB_CRACKED_FLOOR || var == MB_WATERFALL || var == MB_ICE || var == MB_SECRET_BASE_JUMP_MAT || var == MB_SECRET_BASE_SPIN_MAT) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsIce_2(u8 var) +{ + if (var == MB_ICE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsTrickHouseSlipperyFloor(u8 var) +{ + if (var == MB_TRICK_HOUSE_PUZZLE_8_FLOOR) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_05(u8 var) +{ + if (var == MB_05) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsWalkNorth(u8 var) +{ + if (var == MB_WALK_NORTH) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsWalkSouth(u8 var) +{ + if (var == MB_WALK_SOUTH) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsWalkWest(u8 var) +{ + if (var == MB_WALK_WEST) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsWalkEast(u8 var) +{ + if (var == MB_WALK_EAST) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsNorthwardCurrent(u8 var) +{ + if (var == MB_NORTHWARD_CURRENT) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSouthwardCurrent(u8 var) +{ + if (var == MB_SOUTHWARD_CURRENT) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsWestwardCurrent(u8 var) +{ + if (var == MB_WESTWARD_CURRENT) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsEastwardCurrent(u8 var) +{ + if (var == MB_EASTWARD_CURRENT) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSlideNorth(u8 var) +{ + if (var == MB_SLIDE_NORTH) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSlideSouth(u8 var) +{ + if (var == MB_SLIDE_SOUTH) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSlideWest(u8 var) +{ + if (var == MB_SLIDE_WEST) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSlideEast(u8 var) +{ + if (var == MB_SLIDE_EAST) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsCounter(u8 var) +{ + if (var == MB_COUNTER) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsPlayerFacingTVScreen(u8 tile, u8 playerDir) +{ + if (playerDir != CONNECTION_NORTH) // if the player isn't facing north, forget about it. + return FALSE; + else if (tile == MB_TELEVISION) // is the player's north tile a TV? + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsPC(u8 var) +{ + if (var == MB_PC) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsCableBoxResults1(u8 var) +{ + if (var == MB_CABLE_BOX_RESULTS_1) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSecretBaseOpen(u8 var) +{ + if (var == MB_SECRET_BASE_SPOT_RED_CAVE_OPEN || var == MB_SECRET_BASE_SPOT_BROWN_CAVE_OPEN + || var == MB_SECRET_BASE_SPOT_YELLOW_CAVE_OPEN || var == MB_SECRET_BASE_SPOT_TREE_LEFT_OPEN + || var == MB_SECRET_BASE_SPOT_SHRUB_OPEN || var == MB_SECRET_BASE_SPOT_BLUE_CAVE_OPEN + || var == MB_SECRET_BASE_SPOT_TREE_RIGHT_OPEN) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSecretBaseCave(u8 var) +{ + if (var == MB_SECRET_BASE_SPOT_RED_CAVE || var == MB_SECRET_BASE_SPOT_BROWN_CAVE || var == MB_SECRET_BASE_SPOT_YELLOW_CAVE || var == MB_SECRET_BASE_SPOT_BLUE_CAVE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSecretBaseTree(u8 var) +{ + if (var == MB_SECRET_BASE_SPOT_TREE_LEFT || var == MB_SECRET_BASE_SPOT_TREE_RIGHT) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSecretBaseShrub(u8 var) +{ + if (var == MB_SECRET_BASE_SPOT_SHRUB) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSecretBasePC(u8 var) +{ + if (var == MB_SECRET_BASE_PC) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSecretBaseRegisterPC(u8 var) +{ + if (var == MB_SECRET_BASE_REGISTER_PC) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_B2(u8 var) // unused +{ + if (var == MB_B2) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_B3(u8 var) +{ + if (var == MB_B3) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_B9(u8 var) +{ + if (var == MB_B9) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_C6(u8 var) +{ + if (var == MB_C6) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSecretBasePoster(u8 var) +{ + if (var == MB_SECRET_BASE_POSTER) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsNormal(u8 var) +{ + if (var == MB_NORMAL) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_B7(u8 var) +{ + if (var == MB_B7) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_B2_Duplicate(u8 var) // unused +{ + if (var == MB_B2) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_B5(u8 var) +{ + if (var == MB_B5) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_C3(u8 var) +{ + if (var == MB_C3) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_C2(u8 var) +{ + if (var == MB_C2) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSecretBaseBalloon(u8 var) +{ + if (var == MB_SECRET_BASE_BALLOON) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_BE(u8 var) +{ + if (var == MB_BE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSecretBaseSoundMat(u8 var) +{ + if (var == MB_SECRET_BASE_SOUND_MAT) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSecretBaseGlitterMat(u8 var) +{ + if (var == MB_SECRET_BASE_GLITTER_MAT) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_BF(u8 var) +{ + if (var == MB_BF) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSecretBaseTvOrShield(u8 var) +{ + if (var == MB_SECRET_BASE_TV_SHIELD) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_C5(u8 var) +{ + if (var == MB_C5) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_HasRipples(u8 var) +{ + if (var == MB_POND_WATER || var == MB_PUDDLE || var == MB_SOOTOPOLIS_DEEP_WATER) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsPuddle(u8 var) +{ + if (var == MB_PUDDLE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsTallGrass(u8 var) +{ + if (var == MB_TALL_GRASS) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsLongGrass(u8 var) +{ + if (var == MB_LONG_GRASS) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsBerryTreeSoil(u8 var) +{ + if (var == MB_BERRY_TREE_SOIL) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsAsh(u8 var) +{ + if (var == MB_ASHGRASS) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsUnusedFootprintMetatile(u8 var) +{ + if (var == MB_25) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsBridge(u8 var) +{ + if ((var == MB_WARP_OR_BRIDGE || var == MB_71 || var == MB_ROUTE120_NORTH_BRIDGE_1 || var == MB_ROUTE120_NORTH_BRIDGE_2) + || (var == MB_ROUTE120_NORTH_BRIDGE_3 || var == MB_ROUTE120_NORTH_BRIDGE_4 || var == MB_7E || var == MB_ROUTE110_BRIDGE)) + return TRUE; + else + return FALSE; +} + +u8 MetatileBehavior_GetBridgeSth(u8 var) +{ + u8 result = var - MB_WARP_OR_BRIDGE; + if (result < 4) + return result; + + result = var - MB_ROUTE120_SOUTH_BRIDGE_1; + if (result < 2) + return 2; + + result = var - MB_ROUTE120_NORTH_BRIDGE_3; + if (result < 2) + return 3; + + return 0; +} + +u8 MetatileBehavior_8089510(u8 var) +{ + u8 result = var - MB_WARP_OR_BRIDGE; + + if (result < 4) + return 1; + else + return 0; +} + +bool8 MetatileBehavior_IsLandWildEncounter(u8 var) +{ + if (MetatileBehavior_IsSurfableWaterOrUnderwater(var) == FALSE && MetatileBehavior_IsEncounterTile(var) == TRUE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsWaterWildEncounter(u8 var) +{ + if (MetatileBehavior_IsSurfableWaterOrUnderwater(var) == TRUE && MetatileBehavior_IsEncounterTile(var) == TRUE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_0B(u8 var) +{ + if (var == MB_0B) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMountain(u8 var) +{ + if (var == MB_MOUNTAIN_TOP) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsDiveable(u8 var) +{ + if (var == MB_SEMI_DEEP_WATER || var == MB_DEEP_WATER || var == MB_SOOTOPOLIS_DEEP_WATER) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsUnableToEmerge(u8 var) +{ + if (var == MB_NO_SURFACING || var == MB_SEAWEED_NO_SURFACING) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsShallowFlowingWater(u8 var) +{ + if (var == MB_SHALLOW_WATER || var == MB_STAIRS_OUTSIDE_ABANDONED_SHIP || var == MB_SHOAL_CAVE_ENTRANCE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsThinIce(u8 var) +{ + if (var == MB_THIN_ICE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsCrackedIce(u8 var) +{ + if (var == MB_CRACKED_ICE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsDeepOrOceanWater(u8 var) +{ + if (var == MB_OCEAN_WATER || var == MB_SEMI_DEEP_WATER || var == MB_DEEP_WATER) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMB_18_OrMB_1A(u8 var) // unused +{ + if (var == MB_18 || var == MB_1A) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSurfableAndNotWaterfall(u8 var) +{ + if (MetatileBehavior_IsSurfableWaterOrUnderwater(var) && MetatileBehavior_IsWaterfall(var) == FALSE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsEastBlocked(u8 var) +{ + if (var == MB_IMPASSABLE_EAST || var == MB_IMPASSABLE_NORTHEAST || var == MB_IMPASSABLE_SOUTHEAST || var == MB_C1 || var == MB_BE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsWestBlocked(u8 var) +{ + if (var == MB_IMPASSABLE_WEST || var == MB_IMPASSABLE_NORTHWEST || var == MB_IMPASSABLE_SOUTHWEST || var == MB_C1 || var == MB_BE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsNorthBlocked(u8 var) +{ + if (var == MB_IMPASSABLE_NORTH || var == MB_IMPASSABLE_NORTHEAST || var == MB_IMPASSABLE_NORTHWEST || var == MB_BED) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSouthBlocked(u8 var) +{ + if (var == MB_IMPASSABLE_SOUTH || var == MB_IMPASSABLE_SOUTHEAST || var == MB_IMPASSABLE_SOUTHWEST || var == MB_BED) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsShortGrass(u8 var) +{ + if (var == MB_SHORT_GRASS) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsHotSprings(u8 var) +{ + if (var == MB_HOT_SPRINGS) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsWaterfall(u8 var) +{ + if (var == MB_WATERFALL) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsFortreeBridge(u8 var) +{ + if (var == MB_FORTREE_BRIDGE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsPacifilogVerticalLog1(u8 var) +{ + if (var == MB_PACIFIDLOG_VERTICAL_LOG_1) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsPacifilogVerticalLog2(u8 var) +{ + if (var == MB_PACIFIDLOG_VERTICAL_LOG_2) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsPacifilogHorizontalLog1(u8 var) +{ + if (var == MB_PACIFIDLOG_HORIZONTAL_LOG_1) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsPacifilogHorizontalLog2(u8 var) +{ + if (var == MB_PACIFIDLOG_HORIZONTAL_LOG_2) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsPacifidlogLog(u8 var) +{ + if (var == MB_PACIFIDLOG_VERTICAL_LOG_1 || var == MB_PACIFIDLOG_VERTICAL_LOG_2 + || var == MB_PACIFIDLOG_HORIZONTAL_LOG_1 || var == MB_PACIFIDLOG_HORIZONTAL_LOG_2) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsTrickHousePuzzleDoor(u8 var) +{ + if (var == MB_TRICK_HOUSE_PUZZLE_DOOR) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsRegionMap(u8 var) +{ + if (var == MB_REGION_MAP) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsClosedSootopolisGymDoor(u8 var) +{ + if (var == MB_CLOSED_SOOTOPOLIS_GYM_DOOR) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsUnknownClosedDoor(u8 var) +{ + if (var == MB_UNKNOWN_CLOSED_DOOR) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsRoulette(u8 var) // unused +{ + if (var == MB_ROULETTE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsPokeblockFeeder(u8 var) +{ + if (var == MB_POKEBLOCK_FEEDER) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSecretBaseJumpMat(u8 var) +{ + if (var == MB_SECRET_BASE_JUMP_MAT) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSecretBaseSpinMat(u8 var) +{ + if (var == MB_SECRET_BASE_SPIN_MAT) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsLavaridgeB1FWarp(u8 var) +{ + if (var == MB_LAVARIDGE_GYM_B1F_WARP) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsLavaridge1FWarp(u8 var) +{ + if (var == MB_LAVARIDGE_GYM_1F_WARP) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsAquaHideoutWarp(u8 var) +{ + if (var == MB_AQUA_HIDEOUT_WARP) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsWarpOrBridge(u8 var) +{ + if (var == MB_WARP_OR_BRIDGE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMossdeepGymWarp(u8 var) +{ + if (var == MB_MOSSDEEP_GYM_WARP) + return TRUE; + else + return FALSE; +} + + +bool8 MetatileBehavior_IsSurfableFishableWater(u8 var) +{ + if (var == MB_POND_WATER || var == MB_OCEAN_WATER || var == MB_SEMI_DEEP_WATER || var == MB_DEEP_WATER + || var == MB_SOOTOPOLIS_DEEP_WATER || (var == MB_EASTWARD_CURRENT || var == MB_WESTWARD_CURRENT + || var == MB_NORTHWARD_CURRENT || var == MB_SOUTHWARD_CURRENT)) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMtPyreHole(u8 var) +{ + if (var == MB_MT_PYRE_HOLE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsCrackedFloorHole(u8 var) +{ + if (var == MB_CRACKED_FLOOR_HOLE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsCrackedFloor(u8 var) +{ + if (var == MB_CRACKED_FLOOR) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsMuddySlope(u8 var) +{ + if (var == MB_MUDDY_SLOPE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsBumpySlope(u8 var) +{ + if (var == MB_BUMPY_SLOPE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsIsolatedVerticalRail(u8 var) +{ + if (var == MB_ISOLATED_VERTICAL_RAIL) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsIsolatedHorizontalRail(u8 var) +{ + if (var == MB_ISOLATED_HORIZONTAL_RAIL) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsVerticalRail(u8 var) +{ + if (var == MB_VERTICAL_RAIL) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsHorizontalRail(u8 var) +{ + if (var == MB_HORIZONTAL_RAIL) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsSeaweed(u8 var) +{ + if (var == MB_SEAWEED || var == MB_SEAWEED_NO_SURFACING) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsRunningDisallowed(u8 var) +{ + if (var == MB_NO_RUNNING || var == MB_LONG_GRASS || var == MB_HOT_SPRINGS || MetatileBehavior_IsPacifidlogLog(var) != FALSE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsCuttableGrass(u8 var) +{ + if (var == MB_TALL_GRASS || var == MB_LONG_GRASS || var == MB_ASHGRASS || var == MB_LONG_GRASS_SOUTH_EDGE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsRunningShoesInstruction(u8 var) +{ + if (var == MB_RUNNING_SHOES_INSTRUCTION) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsPictureBookShelf(u8 var) +{ + if (var == MB_PICTURE_BOOK_SHELF) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsBookShelf(u8 var) +{ + if (var == MB_BOOKSHELF) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsPokeCenterBookShelf(u8 var) +{ + if (var == MB_POKEMON_CENTER_BOOKSHELF) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsVase(u8 var) +{ + if (var == MB_VASE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsTrashCan(u8 var) +{ + if (var == MB_TRASH_CAN) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsShopShelf(u8 var) +{ + if (var == MB_SHOP_SHELF) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsBlueprint(u8 var) +{ + if (var == MB_BLUEPRINT) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsBattlePyramidWarp(u8 var) +{ + if (var == MB_BATTLE_PYRAMID_WARP) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsPlayerFacingWirelessBoxResults(u8 tile, u8 playerDir) +{ + if (playerDir != CONNECTION_NORTH) // if the player isn't facing north, forget about it. + return FALSE; + else if (tile == MB_WIRELESS_BOX_RESULTS) // is the player's north tile the monitor with results? + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsCableBoxResults2(u8 tile, u8 playerDir) +{ + if (playerDir != CONNECTION_NORTH) // if the player isn't facing north, forget about it. + return FALSE; + else if (tile == MB_CABLE_BOX_RESULTS_2) // is the player's north tile the monitor with results? + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsQuestionnaire(u8 var) +{ + if (var == MB_QUESTIONNAIRE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsLongGrass_Duplicate(u8 var) +{ + if (var == MB_LONG_GRASS) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsLongGrassSouthEdge(u8 var) +{ + if (var == MB_LONG_GRASS_SOUTH_EDGE) + return TRUE; + else + return FALSE; +} + +bool8 MetatileBehavior_IsTrainerHillTimer(u8 var) +{ + if (var == MB_TRAINER_HILL_TIMER) + return TRUE; + else + return FALSE; +} From 6f22bf385d5aa603ec606610d2d2b1f47f500fb0 Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Fri, 29 Sep 2017 17:34:39 -0500 Subject: [PATCH 315/342] Extract baseroms from battle_anim_80FE840 --- asm/battle_anim_80FE840.s | 2 +- data/battle_anim_80FE840.s | 3816 ++++++++++++++++++++++++++- data/item_use.s | 2 +- graphics/unknown/unknown_593C80.png | Bin 0 -> 286 bytes graphics/unknown/unknown_593FFC.bin | Bin 0 -> 4096 bytes 5 files changed, 3759 insertions(+), 61 deletions(-) create mode 100644 graphics/unknown/unknown_593C80.png create mode 100644 graphics/unknown/unknown_593FFC.bin diff --git a/asm/battle_anim_80FE840.s b/asm/battle_anim_80FE840.s index f35b2f7da..441239162 100644 --- a/asm/battle_anim_80FE840.s +++ b/asm/battle_anim_80FE840.s @@ -21902,7 +21902,7 @@ _0810987E: muls r1, r3 lsls r1, 16 asrs r1, 16 - ldr r0, =gUnknown_085955CE + ldr r0, =gUnknown_085955CC+2 adds r2, r0 movs r3, 0 ldrsh r2, [r2, r3] diff --git a/data/battle_anim_80FE840.s b/data/battle_anim_80FE840.s index 4b1a4d047..78631ee6e 100644 --- a/data/battle_anim_80FE840.s +++ b/data/battle_anim_80FE840.s @@ -4,176 +4,3874 @@ .section .rodata .align 2, 0 +gUnknown_085920F0:: @ 85920F0 + .2byte 0x0000, 0x0005, 0x0002, 0x0005, 0x0004, 0x0005, 0x0006, 0x0005 + .2byte 0x0008, 0x0005, 0x000a, 0x0005, 0x000c, 0x0005, 0x000e, 0x0005 + .2byte 0xfffe, 0x0000 + + .align 2 +gUnknown_08592114:: @ 8592114 + .4byte gUnknown_085920F0 + + .align 2 +gUnknown_08592118:: @ 8592118 + spr_template 0x2753, 0x2753, gUnknown_08524944, gUnknown_08592114, NULL, gDummySpriteAffineAnimTable, sub_80FE840 + spr_template 0x2754, 0x2754, gUnknown_08524944, gUnknown_08592114, NULL, gDummySpriteAffineAnimTable, sub_80FE840 + spr_template 0x2751, 0x2751, gUnknown_08524944, gUnknown_08592114, NULL, gDummySpriteAffineAnimTable, sub_80FE840 + + .align 2 +gUnknown_08592160:: @ 8592160 + .2byte 0x0000, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592168:: @ 8592168 + .2byte 0x0001, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592170:: @ 8592170 + .2byte 0x0002, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592178:: @ 8592178 + .2byte 0x0003, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592180:: @ 8592180 + .2byte 0x0004, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592188:: @ 8592188 + .2byte 0x0005, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592190:: @ 8592190 + .2byte 0x0006, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592198:: @ 8592198 + .2byte 0x0007, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_085921A0:: @ 85921A0 + .2byte 0x0008, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_085921A8:: @ 85921A8 + .4byte gUnknown_08592160 + .4byte gUnknown_08592168 + .4byte gUnknown_08592170 + .4byte gUnknown_08592178 + .4byte gUnknown_08592180 + .4byte gUnknown_08592188 + .4byte gUnknown_08592190 + + .align 2 +gUnknown_085921C4:: @ 85921C4 + .4byte gUnknown_08592198 + + .align 2 +gUnknown_085921C8:: @ 85921C8 + .4byte gUnknown_085921A0 + + .align 2 +gUnknown_085921CC:: @ 85921CC + .2byte 0xfffb, 0xfffb, 0x0100, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085921DC:: @ 85921DC + .4byte gUnknown_085921CC + + .align 2 +gUnknown_085921E0:: @ 859216E0 + spr_template 0x27a3, 0x27a3, gUnknown_08524A8C, gUnknown_085921C8, NULL, gUnknown_085921DC, sub_80FE8E0 + + .align 2 +gUnknown_085921F8:: @ 859216F8 + spr_template 0x27a3, 0x27a3, gUnknown_08524904, gUnknown_085921A8, NULL, gDummySpriteAffineAnimTable, sub_80FE930 + + .align 2 gUnknown_08592210:: @ 8592210 - .incbin "baserom.gba", 0x592210, 0x4f0 + spr_template 0x27a3, 0x27a3, gUnknown_08524904, gUnknown_085921C4, NULL, gDummySpriteAffineAnimTable, sub_80FE988 + .align 2 +gUnknown_08592228:: @ 8592228 + .2byte 0x0140, 0x0140, 0x0000, 0x0000, 0xfff2, 0xfff2, 0x0100, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08592240:: @ 8592240 + .4byte gUnknown_08592228 + + .align 2 +gUnknown_08592244:: @ 85922144 + spr_template 0x27fb, 0x27fb, gUnknown_085249C4, gDummySpriteAnimTable, NULL, gUnknown_08592240, sub_80FE8E0 + + .align 2 +gUnknown_0859225C:: @ 859225C + .2byte 0xfffb, 0xfffb, 0x0100, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859226C:: @ 859226C + .4byte gUnknown_0859225C + + .align 2 +gUnknown_08592270:: @ 8592270 + spr_template 0x27a3, 0x27a3, gUnknown_08524A8C, gUnknown_085921C8, NULL, gUnknown_0859226C, sub_80FEAD8 + + .align 2 +gUnknown_08592288:: @ 8592288 + spr_template 0x27a3, 0x27a3, gUnknown_08524904, gUnknown_085921A8, NULL, gDummySpriteAffineAnimTable, sub_80FEB44 + + .align 2 +gUnknown_085922A0:: @ 85922A0 + .2byte 0x0000, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_085922A8:: @ 85922A8 + .2byte 0x0004, 0x0007, 0x0008, 0x0007, 0xfffe, 0x0000 + + .align 2 +gUnknown_085922B4:: @ 85922B4 + .4byte gUnknown_085922A0 + .4byte gUnknown_085922A8 + + .align 2 +gUnknown_085922BC:: @ 85922BC + spr_template 0x2716, 0x2716, gUnknown_0852490C, gUnknown_085922B4, NULL, gDummySpriteAffineAnimTable, sub_80FEC48 + + .align 2 +gUnknown_085922D4:: @ 85922D4 + .2byte 0x0000, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_085922DC:: @ 85922DC + .2byte 0x0004, 0x0007, 0xffff, 0x0000 + + .align 2 +gUnknown_085922E4:: @ 85922E4 + .4byte gUnknown_085922D4 + .4byte gUnknown_085922DC + + .align 2 +gUnknown_085922EC:: @ 85922EC + spr_template 0x27ae, 0x27ae, gUnknown_0852490C, gUnknown_085922E4, NULL, gDummySpriteAffineAnimTable, sub_80FED28 + + .align 2 +gUnknown_08592304:: @ 8592304 + .2byte 0x0000, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_0859230C:: @ 859230C + .2byte 0x0004, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592314:: @ 8592314 + .4byte gUnknown_08592304 + + .align 2 +gUnknown_08592318:: @ 8592318 + .4byte gUnknown_0859230C + + .align 2 +gUnknown_0859231C:: @ 859231C + spr_template 0x27af, 0x27af, gUnknown_0852490C, gUnknown_08592314, NULL, gDummySpriteAffineAnimTable, sub_80FEE78 + + .align 2 +gUnknown_08592334:: @ 8592334 + spr_template 0x27af, 0x27af, gUnknown_08524904, gUnknown_08592318, NULL, gDummySpriteAffineAnimTable, sub_80FEF44 + + .align 2 +gUnknown_0859234C:: @ 859234C + .2byte 0x0000, 0x0005, 0x0004, 0x0005, 0x0008, 0x0005, 0x000c, 0x0005 + .2byte 0x0010, 0x0005, 0x0014, 0x0005, 0x0010, 0x0005, 0x000c, 0x0005 + .2byte 0x0008, 0x0005, 0x0004, 0x0005, 0xfffe, 0x0000 + + .align 2 +gUnknown_08592378:: @ 8592378 + .2byte 0x0018, 0x0005, 0x001c, 0x0005, 0x0020, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_08592388:: @ 8592388 + .4byte gUnknown_0859234C + .4byte gUnknown_08592378 + + .align 2 +gUnknown_08592390:: @ 8592390 + spr_template 0x274f, 0x274f, gUnknown_0852490C, gUnknown_08592388, NULL, gDummySpriteAffineAnimTable, sub_80FEFFC + + .align 2 +gUnknown_085923A8:: @ 85923A8 + spr_template 0x274f, 0x274f, gUnknown_0852490C, gUnknown_08592388, NULL, gDummySpriteAffineAnimTable, sub_80FF268 + + .align 2 +gUnknown_085923C0:: @ 85923C0 + .2byte 0x0000, 0x0003, 0x0000, 0x0043, 0x0000, 0x00c3, 0x0000, 0x0083, 0xfffe, 0x0000 + + .align 2 +gUnknown_085923D4:: @ 85923D4 + .4byte gUnknown_085923C0 + + .align 2 +gUnknown_085923D8:: @ 85923D8 + spr_template 0x27b0, 0x27b0, gUnknown_08524934, gUnknown_085923D4, NULL, gDummySpriteAffineAnimTable, sub_80FF0F4 + + .align 2 +gUnknown_085923F0:: @ 85923F0 + .2byte 0x0000, 0x0000, 0x0100, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08592400:: @ 8592400 + .4byte gUnknown_085923F0 + + .align 2 +gUnknown_08592404:: @ 8592404 + spr_template 0x27be, 0x27be, gUnknown_08524974, gDummySpriteAnimTable, NULL, gUnknown_08592400, sub_80FF0F4 + + .align 2 +gUnknown_0859241C:: @ 859241C + .2byte 0x0000, 0x0004, 0x0020, 0x0004, 0x0040, 0x0004, 0x0060, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08592430:: @ 8592430 + .2byte 0x0000, 0x0044, 0x0020, 0x0044, 0x0040, 0x0044, 0x0060, 0x0044, 0xffff, 0x0000 + + .align 2 +gUnknown_08592444:: @ 8592444 + .4byte gUnknown_0859241C + .4byte gUnknown_08592430 + + .align 2 +gUnknown_0859244C:: @ 859244C + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0xfff5, 0x0000, 0x0600, 0x0000, 0x000b, 0x0000, 0x0600, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859246C:: @ 859246C + .2byte 0xff00, 0x0100, 0x0000, 0x0000, 0x000b, 0x0000, 0x0600, 0x0000, 0xfff5, 0x0000, 0x0600, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859248C:: @ 859248C + .4byte gUnknown_0859244C + .4byte gUnknown_0859246C + + .align 2 +gUnknown_08592494:: @ 8592494 + spr_template 0x27ca, 0x27ca, gUnknown_0852499C, gUnknown_08592444, NULL, gUnknown_0859248C, sub_80FF374 + + .align 2 +gUnknown_085924AC:: @ 85924AC + .2byte 0x0000, 0x0000, 0x0000, 0x0000, 0x0030, 0x0030, 0x0e00, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085924C4:: @ 85924C4 + .2byte 0xfff0, 0xfff0, 0x0100, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085924D4:: @ 85924D4 + .4byte gUnknown_085924AC + .4byte gUnknown_085924C4 + + .align 2 +gUnknown_085924DC:: @ 85924DC + spr_template 0x27a3, 0x27a3, gUnknown_085249CC, gUnknown_085921C8, NULL, gUnknown_085924D4, sub_80FF698 + + .align 2 +gUnknown_085924F4:: @ 85924F4 + .2byte 0x0000, 0x0007, 0x0010, 0x0007, 0x0020, 0x0007, 0x0030, 0x0007, 0xffff, 0x0000 + + .align 2 +gUnknown_08592508:: @ 8592508 + .2byte 0x0000, 0x0047, 0x0010, 0x0047, 0x0020, 0x0047, 0x0030, 0x0047, 0xffff, 0x0000 + + .align 2 +gUnknown_0859251C:: @ 859251C + .2byte 0x0000, 0x0007, 0x0010, 0x0007, 0x0020, 0x0007, 0xffff, 0x0000 + + .align 2 +gUnknown_0859252C:: @ 859252C + .2byte 0x0000, 0x0047, 0x0010, 0x0047, 0x0020, 0x0047, 0xffff, 0x0000 + + .align 2 +gUnknown_0859253C:: @ 859253C + .4byte gUnknown_085924F4 + .4byte gUnknown_08592508 + .4byte gUnknown_0859251C + .4byte gUnknown_0859252C + + .align 2 +gUnknown_0859254C:: @ 859254C + spr_template 0x27ef, 0x27ef, gUnknown_08524914, gUnknown_0859253C, NULL, gDummySpriteAffineAnimTable, sub_80FF768 + + .align 2 +gUnknown_08592564:: @ 8592564 + spr_template 0x27ef, 0x27ef, gUnknown_08524914, gUnknown_0859253C, NULL, gDummySpriteAffineAnimTable, sub_80FF7EC + + .align 2 +gUnknown_0859257C:: @ 859257C + .2byte 0x0003, 0x0003, 0x0000, 0x0005, 0xfffe, 0x0000 + + .align 2 +gUnknown_08592588:: @ 8592588 + .4byte gUnknown_0859257C + + .align 2 +gUnknown_0859258C:: @ 859258C + spr_template 0x27a3, 0x27a3, gUnknown_08524904, gUnknown_08592588, NULL, gDummySpriteAffineAnimTable, sub_80FF934 + + .align 2 +gUnknown_085925A4:: @ 85925A4 + .2byte 0x0000, 0x001e, 0xffff, 0x0000 + + .align 2 +gUnknown_085925AC:: @ 85925AC + .4byte gUnknown_085925A4 + + .align 2 +gUnknown_085925B0:: @ 85925B0 + .2byte 0x0000, 0x0000, 0x0afc, 0x0000, 0x0000, 0x0000, 0x1404, 0x0000 + .2byte 0x0000, 0x0000, 0x0afc, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085925D0:: @ 85925D0 + .2byte 0x0000, 0x0000, 0x02ff, 0x0000, 0x0000, 0x0000, 0x0401, 0x0000 + .2byte 0x0000, 0x0000, 0x04ff, 0x0000, 0x0000, 0x0000, 0x0401, 0x0000 + .2byte 0x0000, 0x0000, 0x04ff, 0x0000, 0x0000, 0x0000, 0x0201, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08592608:: @ 8592608 + .4byte gUnknown_085925B0 + .4byte gUnknown_085925D0 + + .align 2 +gUnknown_08592610:: @ 8592610 + spr_template 0x27f0, 0x27f0, gUnknown_08524974, gUnknown_085925AC, NULL, gUnknown_08592608, sub_80FFB18 + + .align 2 +gUnknown_08592628:: @ 8592628 + spr_template 0x27f0, 0x27f0, gUnknown_08524974, gUnknown_085925AC, NULL, gUnknown_08592608, sub_80FFBF4 + + .align 2 +gUnknown_08592640:: @ 8592640 + .2byte 0x0000, 0x0004, 0x0004, 0x0004, 0x0008, 0x0004, 0x000c, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08592654:: @ 8592654 + .4byte gUnknown_08592640 + + .align 2 +gUnknown_08592658:: @ 8592658 + spr_template 0x27d3, 0x27d3, gUnknown_0852490C, gUnknown_08592654, NULL, gDummySpriteAffineAnimTable, sub_80FFC70 + + .align 2 +gUnknown_08592670:: @ 8592670 + spr_template 0x27f0, 0x27f0, gUnknown_08524974, gUnknown_085925AC, NULL, gUnknown_08592608, sub_80FFCB4 + + .align 2 +gUnknown_08592688:: @ 8592688 + .2byte 0x0000, 0x0000, 0x0300, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08592698:: @ 8592698 + .2byte 0x0000, 0xfff6, 0x0300, 0x0000, 0x0000, 0xfffa, 0x0300, 0x0000 + .2byte 0x0000, 0xfffe, 0x0300, 0x0000, 0x0000, 0x0000, 0x0300, 0x0000 + .2byte 0x0000, 0x0002, 0x0300, 0x0000, 0x0000, 0x0006, 0x0300, 0x0000 + .2byte 0x0000, 0x000a, 0x0300, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085926D8:: @ 85926D8 + .4byte gUnknown_08592688 + .4byte gUnknown_08592698 + .4byte gUnknown_085925B0 + .4byte gUnknown_085925D0 + + .align 2 +gUnknown_085926E8:: @ 85926E8 + spr_template 0x27f0, 0x27f0, gUnknown_08524974, gUnknown_085925AC, NULL, gUnknown_085926D8, sub_80FFDBC + + .align 2 gUnknown_08592700:: @ 8592700 - .incbin "baserom.gba", 0x592700, 0x78 + .2byte 0x1805, 0x0001, 0x0004, 0x1008, 0x00ff, 0x0002, 0x1008, 0x0001 + .2byte 0x0002, 0x1008, 0x0001, 0x0002, 0x1008, 0x0001, 0x0010, 0x0000 + .2byte 0x007f, 0x0000 + .align 2 +gUnknown_08592724:: @ 8592724 + .2byte 0x001c, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_0859272C:: @ 859272C + .2byte 0x0020, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592734:: @ 8592734 + .2byte 0x0014, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_0859273C:: @ 859273C + .2byte 0x001c, 0x0041, 0xffff, 0x0000 + + .align 2 +gUnknown_08592744:: @ 8592744 + .2byte 0x0010, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_0859274C:: @ 859274C + .2byte 0x0010, 0x0041, 0xffff, 0x0000 + + .align 2 +gUnknown_08592754:: @ 8592754 + .2byte 0x001c, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_0859275C:: @ 859275C + .4byte gUnknown_08592724 + .4byte gUnknown_0859272C + .4byte gUnknown_08592734 + .4byte gUnknown_0859273C + .4byte gUnknown_08592744 + .4byte gUnknown_0859274C + .4byte gUnknown_08592754 + + .align 2 gUnknown_08592778:: @ 8592778 - .incbin "baserom.gba", 0x592778, 0x100 + spr_template 0x274f, 0x274f, gUnknown_0852490C, gUnknown_0859275C, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy + .align 2 +gUnknown_08592790:: @ 8592790 + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0104, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_085927A8:: @ 85927A8 + .4byte gUnknown_08592790 + + .align 2 +gUnknown_085927AC:: @ 85927AC + spr_template 0x27af, 0x27af, gUnknown_08524904, gUnknown_08592318, NULL, gDummySpriteAffineAnimTable, sub_8100640 + + .align 2 +gUnknown_085927C4:: @ 85927C4 + spr_template 0x27af, 0x27af, gUnknown_0852496C, gUnknown_08592314, NULL, gUnknown_085927A8, sub_8100640 + + .align 2 +gUnknown_085927DC:: @ 85927DC + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x01f6, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_085927F4:: @ 85927F4 + .2byte 0x00c0, 0x00c0, 0x0000, 0x0000, 0x0000, 0x0000, 0x01f4, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_0859280C:: @ 859280C + .2byte 0x008f, 0x008f, 0x0000, 0x0000, 0x0000, 0x0000, 0x01f1, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08592824:: @ 8592824 + .4byte gUnknown_085927DC + + .align 2 +gUnknown_08592828:: @ 8592828 + .4byte gUnknown_085927F4 + + .align 2 +gUnknown_0859282C:: @ 859282C + .4byte gUnknown_0859280C + + .align 2 +gUnknown_08592830:: @ 8592830 + spr_template 0x281f, 0x281f, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gUnknown_08592824, sub_8100640 + + .align 2 +gUnknown_08592848:: @ 8592848 + spr_template 0x281f, 0x281f, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gUnknown_08592828, sub_8100640 + + .align 2 +gUnknown_08592860:: @ 8592860 + spr_template 0x281f, 0x281f, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gUnknown_0859282C, sub_8100640 + + .align 2 gUnknown_08592878:: @ 8592878 - .incbin "baserom.gba", 0x592878, 0x458 + .2byte 0x001f, 0x027f, 0x03ff, 0x03e0, 0x7dc5, 0x7d56, 0x7eb6, 0x0000 + .align 2 +gUnknown_08592888:: @ 8592888 + spr_template 0x281a, 0x281a, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8100898 + + .align 2 +gUnknown_085928A0:: @ 85928A0 + .2byte 0x0040, 0x0003, 0x0050, 0x0003, 0x0060, 0x0003, 0x0070, 0x0006, 0xffff, 0x0000 + + .align 2 +gUnknown_085928B4:: @ 85928B4 + .2byte 0x0040, 0x0043, 0x0050, 0x0043, 0x0060, 0x0043, 0x0070, 0x0046, 0xffff, 0x0000 + + .align 2 +gUnknown_085928C8:: @ 85928C8 + .4byte gUnknown_085928A0 + .4byte gUnknown_085928B4 + + .align 2 +gUnknown_085928D0:: @ 85928D0 + spr_template 0x2748, 0x2748, gUnknown_08524914, gUnknown_085928C8, NULL, gDummySpriteAffineAnimTable, sub_8100A50 + + .align 2 +gUnknown_085928E8:: @ 85928E8 + spr_template 0x282f, 0x282f, gUnknown_08524914, gUnknown_085928C8, NULL, gDummySpriteAffineAnimTable, sub_8100A50 + + .align 2 +gUnknown_08592900:: @ 8592900 + .2byte 0x0000, 0x0004, 0x0010, 0x0004, 0x0020, 0x0004, 0x0030, 0x0004, 0x0040, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_08592918:: @ 8592918 + .4byte gUnknown_08592900 + + .align 2 +gUnknown_0859291C:: @ 859291C + spr_template 0x2725, 0x2725, gUnknown_08524914, gUnknown_08592918, NULL, gDummySpriteAffineAnimTable, sub_81009F8 + + .align 2 +gUnknown_08592934:: @ 8592934 + spr_template 0x2726, 0x2726, gUnknown_08524914, gUnknown_08592918, NULL, gDummySpriteAffineAnimTable, sub_81009F8 + + .align 2 +gUnknown_0859294C:: @ 859294C + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859295C:: @ 859295C + .2byte 0x0100, 0x0100, 0x0020, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859296C:: @ 859296C + .2byte 0x0100, 0x0100, 0x0040, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859297C:: @ 859297C + .2byte 0x0100, 0x0100, 0x0060, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859298C:: @ 859298C + .2byte 0x0100, 0x0100, 0x0080, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859299C:: @ 859299C + .2byte 0x0100, 0x0100, 0x00a0, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085929AC:: @ 85929AC + .2byte 0x0100, 0x0100, 0x00c0, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085929BC:: @ 85929BC + .2byte 0x0100, 0x0100, 0x00e0, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085929CC:: @ 85929CC + .4byte gUnknown_0859294C + .4byte gUnknown_0859295C + .4byte gUnknown_0859296C + .4byte gUnknown_0859297C + .4byte gUnknown_0859298C + .4byte gUnknown_0859299C + .4byte gUnknown_085929AC + .4byte gUnknown_085929BC + + .align 2 +gUnknown_085929EC:: @ 85929EC + spr_template 0x279f, 0x279f, gUnknown_08524974, gDummySpriteAnimTable, NULL, gUnknown_085929CC, sub_8100A94 + + .align 2 +gUnknown_08592A04:: @ 8592A04 + .2byte 0x0000, 0x0005, 0x0010, 0x0005, 0x0020, 0x0005, 0x0030, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_08592A18:: @ 8592A18 + .4byte gUnknown_08592A04 + + .align 2 +gUnknown_08592A1C:: @ 8592A1C + spr_template 0x279a, 0x279a, gUnknown_08524A34, gUnknown_08592A18, NULL, gDummySpriteAffineAnimTable, sub_8100AE0 + + .align 2 +gUnknown_08592A34:: @ 8592A34 + spr_template 0x279a, 0x279a, gUnknown_08524A34, gUnknown_08592A18, NULL, gDummySpriteAffineAnimTable, sub_8100B88 + + .align 2 +gUnknown_08592A4C:: @ 8592A4C + .2byte 0x0000, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592A54:: @ 8592A54 + .2byte 0x0004, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592A5C:: @ 8592A5C + .2byte 0x0008, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592A64:: @ 8592A64 + .2byte 0x000c, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592A6C:: @ 8592A6C + .2byte 0x0010, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592A74:: @ 8592A74 + .2byte 0x0014, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08592A7C:: @ 8592A7C + .2byte 0x0000, 0x0081, 0xffff, 0x0000 + + .align 2 +gUnknown_08592A84:: @ 8592A84 + .2byte 0x0004, 0x0081, 0xffff, 0x0000 + + .align 2 +gUnknown_08592A8C:: @ 8592A8C + .2byte 0x0008, 0x0081, 0xffff, 0x0000 + + .align 2 +gUnknown_08592A94:: @ 8592A94 + .2byte 0x000c, 0x0081, 0xffff, 0x0000 + + .align 2 +gUnknown_08592A9C:: @ 8592A9C + .4byte gUnknown_08592A4C + .4byte gUnknown_08592A54 + .4byte gUnknown_08592A5C + .4byte gUnknown_08592A64 + .4byte gUnknown_08592A6C + .4byte gUnknown_08592A74 + .4byte gUnknown_08592A7C + .4byte gUnknown_08592A84 + .4byte gUnknown_08592A8C + .4byte gUnknown_08592A94 + + .align 2 +gUnknown_08592AC4:: @ 8592AC4 + spr_template 0x2758, 0x2758, gUnknown_0852490C, gUnknown_08592A9C, NULL, gDummySpriteAffineAnimTable, sub_8100E1C + + .align 2 +gUnknown_08592ADC:: @ 8592ADC + spr_template 0x2828, 0x2828, gUnknown_08524A3C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8100EF0 + + .align 2 +gUnknown_08592AF4:: @ 8592AF4 + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08592B04:: @ 8592B04 + .2byte 0x0000, 0x0000, 0x0c02, 0x0000, 0x0000, 0x0000, 0x0600, 0x0000 + .2byte 0x0000, 0x0000, 0x18fe, 0x0000, 0x0000, 0x0000, 0x0600, 0x0000 + .2byte 0x0000, 0x0000, 0x0c02, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08592B34:: @ 8592B34 + .4byte gUnknown_08592AF4 + .4byte gUnknown_08592B04 + + .align 2 +gUnknown_08592B3C:: @ 8592B3C + spr_template 0x2773, 0x2773, gUnknown_08524A94, gDummySpriteAnimTable, NULL, gUnknown_08592B34, sub_81010CC + + .align 2 +gUnknown_08592B54:: @ 8592B54 + .2byte 0x0000, 0x0007, 0x0010, 0x0007, 0x0020, 0x0007, 0x0030, 0x0007 + .2byte 0x0040, 0x0007, 0x0050, 0x0007, 0x0060, 0x0007, 0x0070, 0x0007 + .2byte 0xfffe, 0x0000 + + .align 2 +gUnknown_08592B78:: @ 8592B78 + .4byte gUnknown_08592B54 + + .align 2 +gUnknown_08592B7C:: @ 8592B7C + spr_template 0x2741, 0x2741, gUnknown_08524914, gUnknown_08592B78, NULL, gDummySpriteAffineAnimTable, sub_810130C + + .align 2 +gUnknown_08592B94:: @ 8592B94 + spr_template 0x2741, 0x2741, gUnknown_08524914, gUnknown_08592B78, NULL, gDummySpriteAffineAnimTable, sub_810135C + + .align 2 +gUnknown_08592BAC:: @ 8592BAC + .2byte 0x0000, 0x000a, 0x0004, 0x000a, 0x0008, 0x000a, 0x000c, 0x000a + .2byte 0x0010, 0x001a, 0x0010, 0x0005, 0x0014, 0x0005, 0x0018, 0x000f + .2byte 0xffff, 0x0000 + + .align 2 +gUnknown_08592BD0:: @ 8592BD0 + .2byte 0x0000, 0x004a, 0x0004, 0x004a, 0x0008, 0x004a, 0x000c, 0x004a + .2byte 0x0010, 0x005a, 0x0010, 0x0045, 0x0014, 0x0045, 0x0018, 0x004f + .2byte 0xffff, 0x0000 + + .align 2 +gUnknown_08592BF4:: @ 8592BF4 + .4byte gUnknown_08592BAC + .4byte gUnknown_08592BD0 + + .align 2 +gUnknown_08592BFC:: @ 8592BFC + spr_template 0x2730, 0x2730, gUnknown_0852490C, gUnknown_08592BF4, NULL, gDummySpriteAffineAnimTable, sub_8101440 + + .align 2 +gUnknown_08592C14:: @ 8592C14 + .2byte 0x0000, 0x0028, 0xffff, 0x0000 + + .align 2 +gUnknown_08592C1C:: @ 8592C1C + .4byte gUnknown_08592C14 + + .align 2 +gUnknown_08592C20:: @ 8592C20 + .2byte 0x0014, 0x0014, 0x00e2, 0x0000, 0x0008, 0x0008, 0x1801, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000, 0x7ffd, 0x0000, 0x0000, 0x0000 + .2byte 0x0000, 0x0000, 0x1801, 0x0000, 0x7ffd, 0x000a, 0x0000, 0x0000 + + .align 2 +gUnknown_08592C50:: @ 8592C50 + .2byte 0x0014, 0x0014, 0x001e, 0x0000, 0x0008, 0x0008, 0x18ff, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000, 0x7ffd, 0x0000, 0x0000, 0x0000 + .2byte 0x0000, 0x0000, 0x18ff, 0x0000, 0x7ffd, 0x000a, 0x0000, 0x0000 + + .align 2 +gUnknown_08592C80:: @ 8592C80 + .4byte gUnknown_08592C20 + .4byte gUnknown_08592C50 + + .align 2 +gUnknown_08592C88:: @ 8592C88 + spr_template 0x27f4, 0x27f4, gUnknown_08524974, gUnknown_08592C1C, NULL, gUnknown_08592C80, sub_81014F4 + + .align 2 +gUnknown_08592CA0:: @ 8592CA0 + spr_template 0x271e, 0x271e, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81015AC + + .align 2 +gUnknown_08592CB8:: @ 8592CB8 + spr_template 0x271e, 0x271e, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8101898 + + .align 2 gUnknown_08592CD0:: @ 8592CD0 - .incbin "baserom.gba", 0x592cd0, 0x1ec + .byte 0x40, 0x40, 0x00, 0xc0, 0xc0, 0x40, 0x20, 0xe0 + .align 2 +gUnknown_08592CD8:: @ 8592CD8 + spr_template 0x0000, 0x0000, gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8101940 + + .align 2 +gUnknown_08592CF0:: @ 8592CF0 + spr_template 0x0000, 0x0000, gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8101B90 + + .align 2 +gUnknown_08592D08:: @ 8592D08 + .2byte 0x0000, 0x0004, 0x0010, 0x0004, 0x0020, 0x0004, 0x0030, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08592D1C:: @ 8592D1C + .2byte 0x0030, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08592D24:: @ 8592D24 + .4byte gUnknown_08592D08 + .4byte gUnknown_08592D1C + + .align 2 +gUnknown_08592D2C:: @ 8592D2C + spr_template 0x27c7, 0x27c7, gUnknown_08524914, gUnknown_08592D24, NULL, gDummySpriteAffineAnimTable, sub_8101F40 + + .align 2 +gUnknown_08592D44:: @ 8592D44 + spr_template 0x282e, 0x282e, gUnknown_08524914, gUnknown_08592D24, NULL, gDummySpriteAffineAnimTable, sub_8101FA8 + + .align 2 +gUnknown_08592D5C:: @ 8592D5C + spr_template 0x282e, 0x282e, gUnknown_08524914, gUnknown_08592D24, NULL, gDummySpriteAffineAnimTable, sub_8101FF0 + + .align 2 +gUnknown_08592D74:: @ 8592D74 + .2byte 0x0000, 0x0004, 0x0008, 0x000c, 0x0010, 0x0004, 0x0018, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08592D88:: @ 8592D88 + .4byte gUnknown_08592D74 + + .align 2 +gUnknown_08592D8C:: @ 8592D8C + spr_template 0x27c8, 0x27c8, gUnknown_08524954, gUnknown_08592D88, NULL, gDummySpriteAffineAnimTable, sub_81020D8 + + .align 2 +gUnknown_08592DA4:: @ 8592DA4 + .2byte 0x0000, 0x0012, 0x0000, 0x0006, 0x0010, 0x0012, 0x0000, 0x0006 + .2byte 0x0010, 0x0006, 0x0020, 0x0012, 0x0010, 0x0006, 0x0020, 0x0006 + .2byte 0x0030, 0x0012, 0x0020, 0x0006, 0x0030, 0x0006, 0x0040, 0x0012 + .2byte 0x0030, 0x0006, 0x0040, 0x0036, 0xffff, 0x0000 + + .align 2 +gUnknown_08592DE0:: @ 8592DE0 + .4byte gUnknown_08592DA4 + + .align 2 +gUnknown_08592DE4:: @ 8592DE4 + spr_template 0x27c9, 0x27c9, gUnknown_08524914, gUnknown_08592DE0, NULL, gDummySpriteAffineAnimTable, sub_810217C + + .align 2 +gUnknown_08592DFC:: @ 8592DFC + spr_template 0x2721, 0x2721, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80A7820 + + .align 2 +gUnknown_08592E14:: @ 8592E14 + .2byte 0x0000, 0x0003, 0x0010, 0x0003, 0x0020, 0x0003, 0x0030, 0x0003 + .2byte 0x0040, 0x0003, 0xffff, 0x0000 + + .align 2 +gUnknown_08592E2C:: @ 8592E2C + .4byte gUnknown_08592E14 + + .align 2 +gUnknown_08592E30:: @ 8592E30 + spr_template 0x272e, 0x272e, gUnknown_08524914, gUnknown_08592E2C, NULL, gDummySpriteAffineAnimTable, sub_80A77C8 + + .align 2 +gUnknown_08592E48:: @ 8592E48 + .2byte 0x0003, 0x0005, 0x0002, 0x0005, 0x0001, 0x0005, 0x0000, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_08592E5C:: @ 8592E5C + .4byte gUnknown_08592E48 + + .align 2 +gUnknown_08592E60:: @ 8592E60 + .2byte 0x0200, 0x0200, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08592E70:: @ 8592E70 + .4byte gUnknown_08592E60 + + .align 2 +gUnknown_08592E74:: @ 8592E74 + spr_template 0x2722, 0x2722, gUnknown_08524AE4, gUnknown_08592E5C, NULL, gUnknown_08592E70, sub_8102268 + + .align 2 +gUnknown_08592E8C:: @ 8592E8C + .2byte 0x0000, 0x0005, 0x0001, 0x0005, 0x0002, 0x0005, 0x0003, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_08592EA0:: @ 8592EA0 + .4byte gUnknown_08592E8C + + .align 2 +gUnknown_08592EA4:: @ 8592EA4 + spr_template 0x2722, 0x2722, gUnknown_08524AE4, gUnknown_08592EA0, NULL, gUnknown_08592E70, sub_810234C + + .align 2 gUnknown_08592EBC:: @ 8592EBC - .incbin "baserom.gba", 0x592ebc, 0x30 + spr_template 0x27d2, 0x27d2, gUnknown_08524A3C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81024E0 + .align 2 +gUnknown_08592ED4:: @ 8592ED4 + .2byte 0x0000, 0x0008, 0x0004, 0x0008, 0x0008, 0x0008, 0x000c, 0x0008, 0xfffe, 0x0000 + + .align 2 +gUnknown_08592EE8:: @ 8592EE8 + .4byte gUnknown_08592ED4 + + .align 2 gUnknown_08592EEC:: @ 8592EEC - .incbin "baserom.gba", 0x592eec, 0x134 + spr_template 0x27d3, 0x27d3, gUnknown_0852490C, gUnknown_08592EE8, NULL, gDummySpriteAffineAnimTable, sub_8102540 + .align 2 +gUnknown_08592F04:: @ 8592F04 + .2byte 0x0000, 0x0002, 0x0010, 0x0002, 0x0020, 0x0002, 0x0030, 0x0003 + .2byte 0x0040, 0x0005, 0x0050, 0x0003, 0x0060, 0x0002, 0x0000, 0x0002 + .2byte 0xffff, 0x0000 + + .align 2 +gUnknown_08592F28:: @ 8592F28 + .4byte gUnknown_08592F04 + + .align 2 +gUnknown_08592F2C:: @ 8592F2C + spr_template 0x272f, 0x272f, gUnknown_08524914, gUnknown_08592F28, NULL, gDummySpriteAffineAnimTable, sub_80A77C8 + + .align 2 +gUnknown_08592F44:: @ 8592F44 + spr_template 0x2724, 0x2724, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8102844 + + .align 2 +gUnknown_08592F5C:: @ 8592F5C + .2byte 0x0000, 0x0002, 0x0010, 0x0002, 0x0020, 0x0002, 0x0030, 0x0002, 0xffff, 0x0000 + + .align 2 +gUnknown_08592F70:: @ 8592F70 + .4byte gUnknown_08592F5C + + .align 2 +gUnknown_08592F74:: @ 8592F74 + spr_template 0x27d0, 0x27d0, gUnknown_08524914, gUnknown_08592F70, NULL, gDummySpriteAffineAnimTable, sub_8102BCC + + .align 2 +gUnknown_08592F8C:: @ 8592F8C + .2byte 0x0000, 0x000a, 0xffff, 0x0000 + + .align 2 +gUnknown_08592F94:: @ 8592F94 + .2byte 0x0004, 0x000a, 0xffff, 0x0000 + + .align 2 +gUnknown_08592F9C:: @ 8592F9C + .2byte 0x0008, 0x0029, 0xffff, 0x0000 + + .align 2 +gUnknown_08592FA4:: @ 8592FA4 + .2byte 0x000c, 0x000a, 0xffff, 0x0000 + + .align 2 +gUnknown_08592FAC:: @ 8592FAC + .2byte 0x0010, 0x000a, 0xffff, 0x0000 + + .align 2 +gUnknown_08592FB4:: @ 8592FB4 + .2byte 0x0014, 0x000a, 0xffff, 0x0000 + + .align 2 +gUnknown_08592FBC:: @ 8592FBC + .2byte 0x0000, 0x008a, 0xffff, 0x0000 + + .align 2 +gUnknown_08592FC4:: @ 8592FC4 + .2byte 0x0004, 0x008a, 0xffff, 0x0000 + + .align 2 +gUnknown_08592FCC:: @ 8592FCC + .4byte gUnknown_08592F8C + .4byte gUnknown_08592F94 + .4byte gUnknown_08592F9C + .4byte gUnknown_08592FA4 + .4byte gUnknown_08592FAC + .4byte gUnknown_08592FB4 + .4byte gUnknown_08592FBC + .4byte gUnknown_08592FC4 + + .align 2 +gUnknown_08592FEC:: @ 8592FEC + .2byte 0x000c, 0x000c, 0x1000, 0x0000, 0xfff4, 0xfff4, 0x1000, 0x0000 + .2byte 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08593004:: @ 8593004 + .4byte gUnknown_08592FEC + + .align 2 +gUnknown_08593008:: @ 8593008 + spr_template 0x2758, 0x2758, gUnknown_085249CC, gUnknown_08592FCC, NULL, gUnknown_08593004, sub_8102CD4 + + .align 2 gUnknown_08593020:: @ 8593020 - .incbin "baserom.gba", 0x593020, 0xf4 + .2byte 0x2758, 0x7fff, 0x735f, 0x6adf, 0x623f, 0x59bf, 0x2771, 0x7fff + .2byte 0x6bf9, 0x57f4, 0x43ef, 0x33ea, 0x27c9, 0x7fff, 0x63ff, 0x47ff + .2byte 0x2bff, 0x0fff, 0x27bf, 0x7fff, 0x7f9a, 0x7f55, 0x7f10, 0x7ecc + .align 2 +gUnknown_08593050:: @ 8593050 + spr_template 0x2758, 0x2758, gUnknown_085249CC, gUnknown_08592FCC, NULL, gUnknown_08593004, sub_8102EB0 + + .align 2 +gUnknown_08593068:: @ 8593068 + spr_template 0x27d1, 0x27d1, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8102FB8 + + .align 2 +gUnknown_08593080:: @ 8593080 + .2byte 0x00a0, 0x00a0, 0x0000, 0x0000, 0x0004, 0x0004, 0x0100, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08593098:: @ 8593098 + .4byte gUnknown_08593080 + + .align 2 +gUnknown_0859309C:: @ 859309C + spr_template 0x2758, 0x2758, gUnknown_085249CC, gUnknown_08592FCC, NULL, gUnknown_08593098, sub_8103028 + + .align 2 +gUnknown_085930B4:: @ 85930B4 + .2byte 0x0000, 0x0042, 0x0010, 0x0042, 0x0020, 0x0042, 0x0030, 0x0042, 0xffff, 0x0000 + + .align 2 +gUnknown_085930C8:: @ 85930C8 + .2byte 0x0030, 0x0042, 0x0020, 0x0042, 0x0010, 0x0042, 0x0000, 0x0042, 0xffff, 0x0000 + + .align 2 +gUnknown_085930DC:: @ 85930DC + .2byte 0x0000, 0x0002, 0x0010, 0x0002, 0x0020, 0x0002, 0x0030, 0x0002, 0xffff, 0x0000 + + .align 2 +gUnknown_085930F0:: @ 85930F0 + .2byte 0x0030, 0x0002, 0x0020, 0x0002, 0x0010, 0x0002, 0x0000, 0x0002, 0xffff, 0x0000 + + .align 2 +gUnknown_08593104:: @ 8593104 + .4byte gUnknown_085930B4 + .4byte gUnknown_085930DC + .4byte gUnknown_085930C8 + .4byte gUnknown_085930F0 + + .align 2 gUnknown_08593114:: @ 8593114 - .incbin "baserom.gba", 0x593114, 0x29c + spr_template 0x27e1, 0x27e1, gUnknown_08524914, gUnknown_08593104, NULL, gDummySpriteAffineAnimTable, sub_8103164 + .align 2 +gUnknown_0859312C:: @ 859312C + .2byte 0x0010, 0x0010, 0x0000, 0x0000, 0x001e, 0x001e, 0x0800, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08593144:: @ 8593144 + .2byte 0x0000, 0x0000, 0x0b04, 0x0000, 0x0000, 0x0000, 0x0bfc, 0x0000 + .2byte 0x7ffd, 0x0002, 0x0000, 0x0000, 0xffe2, 0xffe2, 0x0800, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000, 0x0010, 0x0010, 0x0000, 0x0000 + .2byte 0x001e, 0x001e, 0x0800, 0x0000, 0x0000, 0x0000, 0x1000, 0x0000 + .2byte 0x7ffd, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0b04, 0x0000 + .2byte 0x0000, 0x0000, 0x0bfc, 0x0000, 0x7ffd, 0x0002, 0x0000, 0x0000 + .2byte 0xffe2, 0xffe2, 0x0800, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085931B4:: @ 85931B4 + .4byte gUnknown_0859312C + .4byte gUnknown_08593144 + + .align 2 +gUnknown_085931BC:: @ 85931BC + spr_template 0x2750, 0x2750, gUnknown_085249D4, gDummySpriteAnimTable, NULL, gUnknown_085931B4, sub_8103208 + + .align 2 +gUnknown_085931D4:: @ 85931D4 + spr_template 0x2750, 0x2750, gUnknown_08524974, gDummySpriteAnimTable, NULL, gUnknown_085931B4, sub_8103284 + + .align 2 +gUnknown_085931EC:: @ 85931EC + .2byte 0x0000, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_085931F4:: @ 85931F4 + .2byte 0x0000, 0x0041, 0xffff, 0x0000 + + .align 2 +gUnknown_085931FC:: @ 85931FC + .2byte 0x0000, 0x0004, 0x0010, 0x0004, 0x0020, 0x0004, 0x0010, 0x0004 + .2byte 0x0000, 0x0004, 0x0010, 0x0004, 0x0020, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_0859321C:: @ 859321C + .2byte 0x0000, 0x0044, 0x0010, 0x0044, 0x0020, 0x0044, 0x0010, 0x0044 + .2byte 0x0000, 0x0044, 0x0010, 0x0044, 0x0020, 0x0044, 0xffff, 0x0000 + + .align 2 +gUnknown_0859323C:: @ 859323C + .4byte gUnknown_085931EC + .4byte gUnknown_085931F4 + .4byte gUnknown_085931FC + .4byte gUnknown_0859321C + + .align 2 +gUnknown_0859324C:: @ 859324C + spr_template 0x27e6, 0x27e6, gUnknown_08524914, gUnknown_0859323C, NULL, gDummySpriteAffineAnimTable, sub_8103390 + + .align 2 +gUnknown_08593264:: @ 8593264 + spr_template 0x2750, 0x2750, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8103448 + + .align 2 +gUnknown_0859327C:: @ 859327C + .2byte 0x0004, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08593284:: @ 8593284 + .4byte gUnknown_0859327C + + .align 2 +gUnknown_08593288:: @ 8593288 + spr_template 0x2758, 0x2758, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8103498 + + .align 2 +gUnknown_085932A0:: @ 85932A0 + spr_template 0x0000, 0x0000, gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810358C + + .align 2 +gUnknown_085932B8:: @ 85932B8 + spr_template 0x27a1, 0x27a1, gUnknown_08524A9C, gDummySpriteAnimTable, NULL, gUnknown_08597060, sub_8103620 + + .align 2 +gUnknown_085932D0:: @ 85932D0 + .2byte 0x0000, 0x0009, 0x0010, 0x0003, 0x0020, 0x0003, 0x0030, 0x0003, 0xffff, 0x0000 + + .align 2 +gUnknown_085932E4:: @ 85932E4 + .4byte gUnknown_085932D0 + + .align 2 +gUnknown_085932E8:: @ 85932E8 + .2byte 0x0050, 0x0050, 0x0000, 0x0000, 0x0009, 0x0009, 0x1200, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08593300:: @ 8593300 + .4byte gUnknown_085932E8 + + .align 2 +gUnknown_08593304:: @ 8593304 + spr_template 0x2717, 0x2717, gUnknown_08524974, gUnknown_085932E4, NULL, gUnknown_08593300, sub_80A77C8 + + .align 2 +gUnknown_0859331C:: @ 859331C + .2byte 0x0000, 0x0043, 0x0008, 0x0043, 0x0010, 0x0043, 0x0018, 0x0043 + .2byte 0x0020, 0x0043, 0x0028, 0x0043, 0x0030, 0x0043, 0xfffd, 0x0001 + .2byte 0xffff, 0x0000 + + .align 2 +gUnknown_08593340:: @ 8593340 + .4byte gUnknown_0859331C + + .align 2 +gUnknown_08593344:: @ 8593344 + spr_template 0x275b, 0x275b, gUnknown_08524934, gUnknown_08593340, NULL, gDummySpriteAffineAnimTable, sub_81037D8 + + .align 2 +gUnknown_0859335C:: @ 859335C + .2byte 0x0010, 0x0100, 0x0000, 0x0000, 0x0014, 0x0000, 0x0c00, 0x0000 + .2byte 0x0000, 0x0000, 0x2000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859337C:: @ 859337C + .4byte gUnknown_0859335C + + .align 2 +gUnknown_08593380:: @ 8593380 + spr_template 0x2715, 0x2715, gUnknown_08524ADC, gDummySpriteAnimTable, NULL, gUnknown_0859337C, sub_810387C + + .align 2 +gUnknown_08593398:: @ 8593398 + spr_template 0x2713, 0x2713, gUnknown_08524B14, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81038C8 + + .align 2 gUnknown_085933B0:: @ 85933B0 - .incbin "baserom.gba", 0x5933b0, 0xf0 + spr_template 0x2713, 0x2713, gUnknown_08524A54, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8103AA4 + .align 2 +gUnknown_085933C8:: @ 85933C8 + .2byte 0x0020, 0x0020, 0x0000, 0x0000, 0x0007, 0x0007, 0xc800, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085933E0:: @ 85933E0 + .2byte 0x0005, 0x0005, 0x0a00, 0x0000, 0xfff6, 0xfff6, 0x0a00, 0x0000 + .2byte 0x000a, 0x000a, 0x0a00, 0x0000, 0xfff6, 0xfff6, 0x0a00, 0x0000 + .2byte 0x000a, 0x000a, 0x0a00, 0x0000, 0xfff6, 0xfff6, 0x0a00, 0x0000 + .2byte 0x000a, 0x000a, 0x0a00, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08593420:: @ 8593420 + .4byte gUnknown_085933C8 + + .align 2 +gUnknown_08593424:: @ 8593424 + .4byte gUnknown_085933E0 + + .align 2 +gUnknown_08593428:: @ 8593428 + spr_template 0x27b3, 0x27b3, gUnknown_08524A14, gDummySpriteAnimTable, NULL, gUnknown_08593420, sub_80A7820 + + .align 2 +gUnknown_08593440:: @ 8593440 + spr_template 0x27b4, 0x27b4, gUnknown_08524A14, gDummySpriteAnimTable, NULL, gUnknown_08593420, sub_80A7820 + + .align 2 +gUnknown_08593458:: @ 8593458 + spr_template 0x2814, 0x2814, gUnknown_08524A1C, gDummySpriteAnimTable, NULL, gUnknown_08593420, sub_80A7820 + + .align 2 +gUnknown_08593470:: @ 8593470 + spr_template 0x2830, 0x2830, gUnknown_08524A14, gDummySpriteAnimTable, NULL, gUnknown_08593424, sub_8108C94 + + .align 2 +gUnknown_08593488:: @ 8593488 + spr_template 0x27bf, 0x27bf, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80A78AC + + .align 2 gUnknown_085934A0:: @ 85934A0 - .incbin "baserom.gba", 0x5934a0, 0x148 + spr_template 0x27c2, 0x27c2, gUnknown_08524A3C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8103FE8 + .align 2 +gUnknown_085934B8:: @ 85934B8 + .2byte 0x0008, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_085934C0:: @ 85934C0 + .4byte gUnknown_085934B8 + + .align 2 +gUnknown_085934C4:: @ 85934C4 + .2byte 0x0000, 0x0000, 0x010a, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085934D4:: @ 85934D4 + .4byte gUnknown_085934C4 + + .align 2 +gUnknown_085934D8:: @ 85934D8 + spr_template 0x2774, 0x2774, gUnknown_0852496C, gUnknown_085934C0, NULL, gDummySpriteAffineAnimTable, sub_8104088 + + .align 2 +gUnknown_085934F0:: @ 85934F0 + spr_template 0x2774, 0x2774, gUnknown_0852496C, gUnknown_085934C0, NULL, gUnknown_085934D4, sub_810413C + + .align 2 +gUnknown_08593508:: @ 8593508 + .2byte 0x0000, 0x0000, 0x0114, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08593518:: @ 8593518 + .4byte gUnknown_08593508 + + .align 2 +gUnknown_0859351C:: @ 859351C + spr_template 0x2716, 0x2716, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gUnknown_08593518, sub_81041C4 + + .align 2 +gUnknown_08593534:: @ 8593534 + .2byte 0x0010, 0x0100, 0x0000, 0x0000, 0x0004, 0x0000, 0x2800, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859354C:: @ 859354C + .4byte gUnknown_08593534 + + .align 2 +gUnknown_08593550:: @ 8593550 + spr_template 0x2719, 0x2719, gUnknown_085249BC, gDummySpriteAnimTable, NULL, gUnknown_0859354C, sub_8104304 + + .align 2 +gUnknown_08593568:: @ 8593568 + .2byte 0x0000, 0x0003, 0x0010, 0x0003, 0x0020, 0x0014, 0xffff, 0x0000 + + .align 2 +gUnknown_08593578:: @ 8593578 + .2byte 0x0000, 0x00c3, 0x0010, 0x00c3, 0x0020, 0x00d4, 0xffff, 0x0000 + + .align 2 +gUnknown_08593588:: @ 8593588 + .4byte gUnknown_08593568 + .4byte gUnknown_08593578 + + .align 2 +gUnknown_08593590:: @ 8593590 + spr_template 0x279a, 0x279a, gUnknown_08524A34, gUnknown_08593588, NULL, gDummySpriteAffineAnimTable, sub_8104364 + + .align 2 +gUnknown_085935A8:: @ 85935A8 + .2byte 0x0000, 0x0002, 0x0010, 0x0002, 0x0020, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_085935B8:: @ 85935B8 + .2byte 0x0000, 0x00c2, 0x0010, 0x00c2, 0x0020, 0x00c1, 0xffff, 0x0000 + + .align 2 +gUnknown_085935C8:: @ 85935C8 + .4byte gUnknown_085935A8 + .4byte gUnknown_085935B8 + + .align 2 +gUnknown_085935D0:: @ 85935D0 + spr_template 0x279a, 0x279a, gUnknown_08524A34, gUnknown_085935C8, NULL, gDummySpriteAffineAnimTable, sub_8104414 + + .align 2 gUnknown_085935E8:: @ 85935E8 - .incbin "baserom.gba", 0x5935e8, 0x20 + .2byte 0xfffa, 0x0004, 0x0800, 0x0000, 0x000a, 0xfff6, 0x0800, 0x0000 + .2byte 0xfffc, 0x0006, 0x0800, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + .align 2 gUnknown_08593608:: @ 8593608 - .incbin "baserom.gba", 0x593608, 0x9c + .2byte 0xfffc, 0xfffb, 0x0c00, 0x0000, 0x0000, 0x0000, 0x1800, 0x0000 + .2byte 0x0004, 0x0005, 0x0c00, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + .align 2 +gUnknown_08593628:: @ 8593628 + .2byte 0x0000, 0x0044, 0x0004, 0x0068, 0x0008, 0x0044, 0x000c, 0x0044, 0xffff, 0x0000 + + .align 2 +gUnknown_0859363C:: @ 859363C + .2byte 0x0000, 0x0004, 0x0004, 0x0028, 0x0008, 0x0004, 0x000c, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08593650:: @ 8593650 + .4byte gUnknown_08593628 + .4byte gUnknown_0859363C + + .align 2 +gUnknown_08593658:: @ 8593658 + spr_template 0x2766, 0x2766, gUnknown_0852490C, gUnknown_08593650, NULL, gDummySpriteAffineAnimTable, sub_8104B1C + + .align 2 +gUnknown_08593670:: @ 8593670 + .2byte 0x000b, 0x000b, 0x0800, 0x0000, 0xfff5, 0xfff5, 0x0800, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08593688:: @ 8593688 + .4byte gUnknown_08593670 + + .align 2 +gUnknown_0859368C:: @ 859368C + spr_template 0x2767, 0x2767, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gUnknown_08593688, sub_8104BAC + + .align 2 gUnknown_085936A4:: @ 85936A4 - .incbin "baserom.gba", 0x5936a4, 0x20c + .2byte 0xfff6, 0x0009, 0x0700, 0x0000, 0x0014, 0xffec, 0x0700, 0x0000 + .2byte 0xffec, 0x0014, 0x0700, 0x0000, 0x000a, 0xfff7, 0x0700, 0x0000 + .2byte 0x7ffd, 0x0002, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + .align 2 +gUnknown_085936D4:: @ 85936D4 + spr_template 0x2712, 0x2712, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810501C + + .align 2 +gUnknown_085936EC:: @ 85936EC + spr_template 0x27d5, 0x27d5, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80A7938 + + .align 2 +gUnknown_08593704:: @ 8593704 + .2byte 0x0000, 0x0005, 0x0010, 0x0005, 0x0020, 0x0005, 0x0030, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_08593718:: @ 8593718 + .4byte gUnknown_08593704 + + .align 2 +gUnknown_0859371C:: @ 859371C + spr_template 0x27d6, 0x27d6, gUnknown_08524914, gUnknown_08593718, NULL, gDummySpriteAffineAnimTable, sub_80A77C8 + + .align 2 +gUnknown_08593734:: @ 8593734 + .2byte 0x0000, 0x0000, 0x02f8, 0x0000, 0x0000, 0x0000, 0x0408, 0x0000 + .2byte 0x0000, 0x0000, 0x02f8, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08593754:: @ 8593754 + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08593764:: @ 8593764 + .2byte 0xfff8, 0x0004, 0x0800, 0x0000, 0x7ffd, 0x0000, 0x0000, 0x0000 + .2byte 0x0010, 0xfff8, 0x0800, 0x0000, 0xfff0, 0x0008, 0x0800, 0x0000 + .2byte 0x7ffd, 0x0001, 0x0000, 0x0000, 0x0100, 0x0100, 0x0000, 0x0000 + .2byte 0x0000, 0x0000, 0x0f00, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085937A4:: @ 85937A4 + .4byte gUnknown_08593734 + .4byte gUnknown_08593754 + .4byte gUnknown_08593764 + + .align 2 +gUnknown_085937B0:: @ 85937B0 + spr_template 0x27da, 0x27da, gUnknown_08524AF4, gDummySpriteAnimTable, NULL, gUnknown_085937A4, sub_8105538 + + .align 2 +gUnknown_085937C8:: @ 85937C8 + .2byte 0x0010, 0x0010, 0x0000, 0x0000, 0x0010, 0x0010, 0x1e00, 0x0000 + .2byte 0x7fff, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_085937E0:: @ 85937E0 + .2byte 0x0010, 0x0010, 0x0000, 0x0000, 0x0020, 0x0020, 0x0f00, 0x0000 + .2byte 0x7fff, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_085937F8:: @ 85937F8 + .2byte 0x0010, 0x0010, 0x0000, 0x0000, 0x000b, 0x000b, 0x2d00, 0x0000 + .2byte 0x7fff, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08593810:: @ 8593810 + .4byte gUnknown_085937C8 + .4byte gUnknown_085937E0 + + .align 2 +gUnknown_08593818:: @ 8593818 + .4byte gUnknown_085937F8 + + .align 2 +gUnknown_0859381C:: @ 859381C + spr_template 0x27db, 0x27db, gUnknown_085249DC, gDummySpriteAnimTable, NULL, gUnknown_08593810, sub_80A77C8 + + .align 2 +gUnknown_08593834:: @ 8593834 + .2byte 0x0200, 0x0200, 0x0000, 0x0000, 0xfff0, 0xfff0, 0x1e00, 0x0000 + .2byte 0x7fff, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_0859384C:: @ 859384C + .4byte gUnknown_08593834 + + .align 2 +gUnknown_08593850:: @ 8593850 + spr_template 0x27db, 0x27db, gUnknown_08524AFC, gDummySpriteAnimTable, NULL, gUnknown_0859384C, sub_80A77C8 + + .align 2 +gUnknown_08593868:: @ 8593868 + spr_template 0x27db, 0x27db, gUnknown_08524AFC, gDummySpriteAnimTable, NULL, gUnknown_08593810, sub_81051C4 + + .align 2 +gUnknown_08593880:: @ 8593880 + spr_template 0x27db, 0x27db, gUnknown_08524AFC, gDummySpriteAnimTable, NULL, gUnknown_08593818, sub_81052A4 + + .align 2 +gUnknown_08593898:: @ 8593898 + spr_template 0x27db, 0x27db, gUnknown_08524AFC, gDummySpriteAnimTable, NULL, gUnknown_08593810, sub_81054E8 + + .align 2 gUnknown_085938B0:: @ 85938B0 - .incbin "baserom.gba", 0x5938b0, 0x2c + .2byte 0x0060, 0xfff3, 0x0800, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + .align 2 +gUnknown_085938C0:: @ 85938C0 + .2byte 0x0000, 0x0003, 0x0004, 0x0003, 0x0008, 0x0003, 0x0004, 0x0003 + .2byte 0x0000, 0x0003, 0xffff, 0x0000 + + .align 2 +gUnknown_085938D8:: @ 85938D8 + .4byte gUnknown_085938C0 + + .align 2 gUnknown_085938DC:: @ 85938DC - .incbin "baserom.gba", 0x5938dc, 0x18 + spr_template 0x27df, 0x27df, gUnknown_0852490C, gUnknown_085938D8, NULL, gDummySpriteAffineAnimTable, sub_8105C48 + .align 2 gUnknown_085938F4:: @ 85938F4 - .incbin "baserom.gba", 0x5938f4, 0x5c + .2byte 0x1c1e, 0x18ec, 0x1a10, 0x1cf6 + .align 2 +gUnknown_085938FC:: @ 85938FC + .2byte 0x0000, 0x0006, 0x0010, 0x0006, 0x0020, 0x000f, 0x0010, 0x0006 + .2byte 0x0000, 0x0006, 0x0010, 0x0046, 0x0020, 0x004f, 0x0010, 0x0046 + .2byte 0x0000, 0x0006, 0x0010, 0x0006, 0x0020, 0x000f, 0x0010, 0x0006 + .2byte 0x0000, 0x0006, 0xffff, 0x0000 + + .align 2 +gUnknown_08593934:: @ 8593934 + .4byte gUnknown_085938FC + + .align 2 +gUnknown_08593938:: @ 8593938 + spr_template 0x27dd, 0x27dd, gUnknown_08524914, gUnknown_08593934, NULL, gDummySpriteAffineAnimTable, sub_80A77C8 + + .align 2 gUnknown_08593950:: @ 8593950 - .incbin "baserom.gba", 0x593950, 0x38 + .2byte 0x27de, 0x270f, 0x270e, 0x0000 + .align 2 +gUnknown_08593958:: @ 8593958 + spr_template 0x27de, 0x27de, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8105DE8 + + .align 2 +gUnknown_08593970:: @ 8593970 + spr_template 0x27e2, 0x27e2, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8105E60 + + .align 2 gUnknown_08593988:: @ 8593988 - .incbin "baserom.gba", 0x593988, 0x210 + .2byte 0x000a, 0xfff3, 0x0a00, 0x0000, 0xfff6, 0x000d, 0x0a00, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + .align 2 +gUnknown_085939A0:: @ 85939A0 + spr_template 0x27e8, 0x27e8, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8106140 + + .align 2 +gUnknown_085939B8:: @ 85939B8 + spr_template 0x27e8, 0x27e8, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81061C4 + + .align 2 +gUnknown_085939D0:: @ 85939D0 + spr_template 0x27e8, 0x27e8, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810624C + + .align 2 +gUnknown_085939E8:: @ 85939E8 + .2byte 0x0080, 0x0080, 0x0000, 0x0000, 0x0008, 0x0008, 0x0100, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08593A00:: @ 8593A00 + .4byte gUnknown_085939E8 + + .align 2 +gUnknown_08593A04:: @ 8593A04 + spr_template 0x27e9, 0x27e9, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gUnknown_08593A00, sub_810673C + + .align 2 +gUnknown_08593A1C:: @ 8593A1C + spr_template 0x27e9, 0x27e9, gUnknown_085249CC, gDummySpriteAnimTable, NULL, gUnknown_08593A00, sub_8106878 + + .align 2 +gUnknown_08593A34:: @ 8593A34 + .2byte 0x0080, 0x0080, 0x0000, 0x0000, 0x0008, 0x0008, 0x0100, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08593A4C:: @ 8593A4C + .4byte gUnknown_08593A34 + + .align 2 +gUnknown_08593A50:: @ 8593A50 + spr_template 0x27fd, 0x27fd, gUnknown_085249C4, gDummySpriteAnimTable, NULL, gUnknown_08593A4C, sub_8106944 + + .align 2 +gUnknown_08593A68:: @ 8593A68 + .2byte 0x0000, 0x0004, 0x0004, 0x0004, 0x0008, 0x0004, 0x0004, 0x0004 + .2byte 0x0000, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08593A80:: @ 8593A80 + .4byte gUnknown_08593A68 + + .align 2 +gUnknown_08593A84:: @ 8593A84 + spr_template 0x27ea, 0x27ea, gUnknown_0852490C, gUnknown_08593A80, NULL, gDummySpriteAffineAnimTable, sub_81069B8 + + .align 2 +gUnknown_08593A9C:: @ 8593A9C + .2byte 0x0000, 0x0018, 0xffff, 0x0000 + + .align 2 +gUnknown_08593AA4:: @ 8593AA4 + .4byte gUnknown_08593A9C + + .align 2 +gUnknown_08593AA8:: @ 8593AA8 + spr_template 0x27ec, 0x27ec, gUnknown_08524914, gUnknown_08593AA4, NULL, gDummySpriteAffineAnimTable, sub_81069D0 + + .align 2 +gUnknown_08593AC0:: @ 8593AC0 + spr_template 0x27eb, 0x27eb, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8106AD0 + + .align 2 +gUnknown_08593AD8:: @ 8593AD8 + .2byte 0x0000, 0x0003, 0xfffe, 0x0000 + + .align 2 +gUnknown_08593AE0:: @ 8593AE0 + .2byte 0x0010, 0x0003, 0xfffe, 0x0000 + + .align 2 +gUnknown_08593AE8:: @ 8593AE8 + .4byte gUnknown_08593AD8 + .4byte gUnknown_08593AE0 + + .align 2 +gUnknown_08593AF0:: @ 8593AF0 + spr_template 0x27ed, 0x27ed, gUnknown_08524914, gUnknown_08593AE8, NULL, gDummySpriteAffineAnimTable, sub_8106B54 + + .align 2 +gUnknown_08593B08:: @ 8593B08 + .2byte 0x0000, 0x0004, 0x0010, 0x0004, 0x0020, 0x0004, 0x0030, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08593B1C:: @ 8593B1C + .2byte 0x0000, 0x0044, 0x0010, 0x0044, 0x0020, 0x0044, 0x0030, 0x0044, 0xffff, 0x0000 + + .align 2 +gUnknown_08593B30:: @ 8593B30 + .4byte gUnknown_08593B08 + .4byte gUnknown_08593B1C + + .align 2 +gUnknown_08593B38:: @ 8593B38 + spr_template 0x27ee, 0x27ee, gUnknown_08524914, gUnknown_08593B30, NULL, gDummySpriteAffineAnimTable, sub_8106C80 + + .align 2 +gUnknown_08593B50:: @ 8593B50 + .2byte 0x0000, 0x0008, 0x0010, 0x0008, 0x0020, 0x0008, 0x0010, 0x0008, 0xffff, 0x0000 + + .align 2 +gUnknown_08593B64:: @ 8593B64 + .2byte 0x0010, 0x0048, 0x0020, 0x0048, 0x0010, 0x0048, 0x0000, 0x0048, 0xffff, 0x0000 + + .align 2 +gUnknown_08593B78:: @ 8593B78 + .4byte gUnknown_08593B50 + .4byte gUnknown_08593B64 + + .align 2 +gUnknown_08593B80:: @ 8593B80 + spr_template 0x27e7, 0x27e7, gUnknown_08524914, gUnknown_08593B78, NULL, gDummySpriteAffineAnimTable, sub_8106CD0 + + .align 2 gUnknown_08593B98:: @ 8593B98 - .incbin "baserom.gba", 0x593b98, 0x1488 + .2byte 0xfff4, 0x0008, 0x0400, 0x0000, 0x0014, 0xffec, 0x0400, 0x0000 + .2byte 0xfff8, 0x000c, 0x0400, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + .align 2 +gUnknown_08593BB8:: @ 8593BB8 + spr_template 0x27f1, 0x27f1, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8106E00 + + .align 2 +gUnknown_08593BD0:: @ 8593BD0 + .2byte 0x0000, 0x0000, 0x0500, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08593BE0:: @ 8593BE0 + .2byte 0x0000, 0x0000, 0x10f8, 0x0000, 0x7fff, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08593BF0:: @ 8593BF0 + .2byte 0x0000, 0x0000, 0x1008, 0x0000, 0x7fff, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08593C00:: @ 8593C00 + .4byte gUnknown_08593BD0 + .4byte gUnknown_08593BE0 + .4byte gUnknown_08593BF0 + + .align 2 +gUnknown_08593C0C:: @ 8593C0C + spr_template 0x27de, 0x27de, gUnknown_0852496C, gUnknown_08592FCC, NULL, gUnknown_08593C00, sub_8106F60 + + .align 2 +gUnknown_08593C24:: @ 8593C24 + spr_template 0x27de, 0x27de, gUnknown_0852496C, gUnknown_08592FCC, NULL, gUnknown_08593C00, sub_8106F00 + + .align 2 +gUnknown_08593C3C:: @ 8593C3C + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08593C4C:: @ 8593C4C + .2byte 0x0200, 0x0100, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08593C5C:: @ 8593C5C + .4byte gUnknown_08593C3C + .4byte gUnknown_08593C4C + + .align 2 +gUnknown_08593C64:: @ 8593C64 + spr_template 0x2804, 0x2804, gUnknown_08524B1C, gDummySpriteAnimTable, NULL, gUnknown_08593C5C, sub_81070AC + + .align 2 + .incbin "graphics/unknown/unknown_593C80.4bpp" + + .align 2 + .incbin "graphics/unknown/unknown_593FFC.bin" + + .align 2 +gUnknown_08594FFC:: @ 8594FFC + .2byte 0x0000, 0x0002, 0x0008, 0x0002, 0x0010, 0x0002, 0x0018, 0x0006 + .2byte 0x0020, 0x0002, 0x0028, 0x0002, 0x0030, 0x0002, 0xffff, 0x0000 + + .align 2 +gUnknown_0859501C:: @ 859501C + .4byte gUnknown_08594FFC + + .align 2 gUnknown_08595020:: @ 8595020 - .incbin "baserom.gba", 0x595020, 0x248 + spr_template 0x2783, 0x2783, gUnknown_08524954, gUnknown_0859501C, NULL, gDummySpriteAffineAnimTable, sub_810721C + .align 2 +gUnknown_08595038:: @ 8595038 + .2byte 0xfffb, 0xfffb, 0x0a00, 0x0000, 0x0005, 0x0005, 0x0a00, 0x0000 + .2byte 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595050:: @ 8595050 + .4byte gUnknown_08595038 + + .align 2 +gUnknown_08595054:: @ 8595054 + .2byte 0x0000, 0x0001, 0x0004, 0x0005, 0x0008, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_08595064:: @ 8595064 + .4byte gUnknown_08595054 + + .align 2 +gUnknown_08595068:: @ 8595068 + spr_template 0x27a2, 0x27a2, gUnknown_08524A8C, gUnknown_08595064, NULL, gUnknown_08595050, sub_8107260 + + .align 2 +gUnknown_08595080:: @ 8595080 + .2byte 0x0000, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595088:: @ 8595088 + .2byte 0x0004, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595090:: @ 8595090 + .4byte gUnknown_08595080 + .4byte gUnknown_08595088 + + .align 2 +gUnknown_08595098:: @ 8595098 + .2byte 0x0000, 0x0000, 0x0100, 0x0000, 0x0060, 0x0060, 0x0100, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085950B0:: @ 85950B0 + .4byte gUnknown_08595098 + + .align 2 +gUnknown_085950B4:: @ 85950B4 + spr_template 0x279c, 0x279c, gUnknown_08524A04, gUnknown_08595090, NULL, gUnknown_085950B0, sub_810744C + + .align 2 +gUnknown_085950CC:: @ 85950CC + .2byte 0x0000, 0x0001, 0x0004, 0x0001, 0x0008, 0x0001, 0x000c, 0x0001, 0xfffe, 0x0000 + + .align 2 +gUnknown_085950E0:: @ 85950E0 + .4byte gUnknown_085950CC + + .align 2 +gUnknown_085950E4:: @ 85950E4 + spr_template 0x27a5, 0x27a5, gUnknown_08524A2C, gUnknown_085950E0, NULL, gDummySpriteAffineAnimTable, sub_81075EC + + .align 2 +gUnknown_085950FC:: @ 85950FC + spr_template 0x2813, 0x2813, gUnknown_08524A2C, gUnknown_085950E0, NULL, gDummySpriteAffineAnimTable, sub_81075EC + + .align 2 +gUnknown_08595114:: @ 8595114 + spr_template 0x2818, 0x2818, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81075EC + + .align 2 +gUnknown_0859512C:: @ 859512C + spr_template 0x2819, 0x2819, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81075EC + + .align 2 +gUnknown_08595144:: @ 8595144 + .2byte 0x0010, 0x0002, 0x0020, 0x0002, 0x0030, 0x0002, 0xfffe, 0x0000 + + .align 2 +gUnknown_08595154:: @ 8595154 + .4byte gUnknown_08595144 + + .align 2 +gUnknown_08595158:: @ 8595158 + spr_template 0x272d, 0x272d, gUnknown_08524914, gUnknown_08595154, NULL, gDummySpriteAffineAnimTable, sub_81075EC + + .align 2 +gUnknown_08595170:: @ 8595170 + spr_template 0x27b5, 0x27b5, gUnknown_08524A14, gDummySpriteAnimTable, NULL, gUnknown_08593420, sub_81075EC + + .align 2 +gUnknown_08595188:: @ 8595188 + .2byte 0x0003, 0x0003, 0x320a, 0x0000, 0x0000, 0x0000, 0x0a00, 0x0000 + .2byte 0xffec, 0xffec, 0x14f6, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085951A8:: @ 85951A8 + .2byte 0x0150, 0x0150, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085951B8:: @ 85951B8 + .4byte gUnknown_08595188 + + .align 2 +gUnknown_085951BC:: @ 85951BC + .4byte gUnknown_085951A8 + + .align 2 +gUnknown_085951C0:: @ 85951C0 + spr_template 0x27a5, 0x27a5, gUnknown_08524AEC, gUnknown_085950E0, NULL, gUnknown_085951B8, sub_8107730 + + .align 2 +gUnknown_085951D8:: @ 85951D8 + spr_template 0x27a5, 0x27a5, gUnknown_08524AEC, gUnknown_085950E0, NULL, gUnknown_085951BC, sub_81077C0 + + .align 2 +gUnknown_085951F0:: @ 85951F0 + .2byte 0x0000, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_085951F8:: @ 85951F8 + .2byte 0x0004, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595200:: @ 8595200 + .4byte gUnknown_085951F0 + + .align 2 +gUnknown_08595204:: @ 8595204 + .4byte gUnknown_085951F8 + + .align 2 +gUnknown_08595208:: @ 8595208 + spr_template 0x27ab, 0x27ab, gUnknown_08524A2C, gUnknown_08595200, NULL, gDummySpriteAffineAnimTable, sub_80A78AC + + .align 2 +gUnknown_08595220:: @ 8595220 + spr_template 0x27ab, 0x27ab, gUnknown_08524AEC, gUnknown_08595204, NULL, gUnknown_08596208, sub_8107894 + + .align 2 +gUnknown_08595238:: @ 8595238 + spr_template 0x279d, 0x279d, gUnknown_08524904, gUnknown_08595AB8, NULL, gDummySpriteAffineAnimTable, sub_81078D0 + + .align 2 +gUnknown_08595250:: @ 8595250 + spr_template 0x27ab, 0x27ab, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8108034 + + .align 2 gUnknown_08595268:: @ 8595268 - .incbin "baserom.gba", 0x595268, 0xa8 + spr_template 0x281c, 0x281c, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810851C + .align 2 +gUnknown_08595280:: @ 8595280 + .2byte 0x0008, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595288:: @ 8595288 + .2byte 0x0009, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595290:: @ 8595290 + .2byte 0x0004, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595298:: @ 8595298 + .4byte gUnknown_08595280 + .4byte gUnknown_08595288 + + .align 2 +gUnknown_085952A0:: @ 85952A0 + .4byte gUnknown_08595290 + + .align 2 +gUnknown_085952A4:: @ 85952A4 + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0xfff6, 0xfff6, 0x0f00, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085952BC:: @ 85952BC + .2byte 0x00e0, 0x00e0, 0x0000, 0x0000, 0xfff8, 0xfff8, 0x0f00, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085952D4:: @ 85952D4 + .2byte 0x0150, 0x0150, 0x0000, 0x0000, 0x0000, 0x0000, 0x0f00, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085952EC:: @ 85952EC + .4byte gUnknown_085952A4 + .4byte gUnknown_085952BC + + .align 2 +gUnknown_085952F4:: @ 85952F4 + .4byte gUnknown_085952D4 + + .align 2 +gUnknown_085952F8:: @ 85952F8 + spr_template 0x27ab, 0x27ab, gUnknown_08524904, gUnknown_08595298, NULL, gDummySpriteAffineAnimTable, sub_8108BE0 + + .align 2 gUnknown_08595310:: @ 8595310 - .incbin "baserom.gba", 0x595310, 0x2a4 + spr_template 0x27ab, 0x27ab, gUnknown_08524964, gUnknown_08595298, NULL, gUnknown_085952EC, sub_8108C54 + .align 2 +gUnknown_08595328:: @ 8595328 + spr_template 0x27ab, 0x27ab, gUnknown_0852496C, gUnknown_085952A0, NULL, gUnknown_085952F4, sub_80A8EE4 + + .align 2 +gUnknown_08595340:: @ 8595340 + .2byte 0x0010, 0x0004, 0x0020, 0x0004, 0x0030, 0x0004, 0xfffe, 0x0000 + + .align 2 +gUnknown_08595350:: @ 8595350 + .2byte 0x0010, 0x00c4, 0x0020, 0x00c4, 0x0030, 0x00c4, 0xfffe, 0x0000 + + .align 2 +gUnknown_08595360:: @ 8595360 + .4byte gUnknown_08595340 + .4byte gUnknown_08595350 + + .align 2 +gUnknown_08595368:: @ 8595368 + spr_template 0x272d, 0x272d, gUnknown_08524914, gUnknown_08595360, NULL, gDummySpriteAffineAnimTable, sub_8108EC8 + + .align 2 +gUnknown_08595380:: @ 8595380 + spr_template 0x272d, 0x272d, gUnknown_08524914, gUnknown_08595360, NULL, gDummySpriteAffineAnimTable, sub_8108F08 + + .align 2 +gUnknown_08595398:: @ 8595398 + .2byte 0x0000, 0x0003, 0x0010, 0x0003, 0x0020, 0x0003, 0x0030, 0x0003 + .2byte 0x0040, 0x0003, 0x0050, 0x0003, 0x0060, 0x0003, 0x0070, 0x0003 + .2byte 0xfffe, 0x0000 + + .align 2 +gUnknown_085953BC:: @ 85953BC + .4byte gUnknown_08595398 + + .align 2 +gUnknown_085953C0:: @ 85953C0 + .2byte 0x0000, 0x0005, 0x0010, 0x0005, 0x0020, 0x0005, 0x0030, 0x0005 + .2byte 0x0040, 0x0005, 0xfffe, 0x0000 + + .align 2 +gUnknown_085953D8:: @ 85953D8 + .4byte gUnknown_085953C0 + + .align 2 +gUnknown_085953DC:: @ 85953DC + .2byte 0x0032, 0x0100, 0x0000, 0x0000, 0x0020, 0x0000, 0x0700, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085953F4:: @ 85953F4 + .4byte gUnknown_085953DC + + .align 2 +gUnknown_085953F8:: @ 85953F8 + spr_template 0x2731, 0x2731, gUnknown_08524974, gUnknown_085953BC, NULL, gUnknown_085953F4, sub_8108FBC + + .align 2 +gUnknown_08595410:: @ 8595410 + spr_template 0x2731, 0x2731, gUnknown_08524914, gUnknown_085953BC, NULL, gDummySpriteAffineAnimTable, sub_8108FBC + + .align 2 +gUnknown_08595428:: @ 8595428 + spr_template 0x2733, 0x2733, gUnknown_08524914, gUnknown_085953D8, NULL, gDummySpriteAffineAnimTable, sub_8108F4C + + .align 2 +gUnknown_08595440:: @ 8595440 + spr_template 0x272d, 0x272d, gUnknown_08524914, gUnknown_085953D8, NULL, gDummySpriteAffineAnimTable, sub_8108F4C + + .align 2 +gUnknown_08595458:: @ 8595458 + .2byte 0x0010, 0x0006, 0x0020, 0x0006, 0x0030, 0x0006, 0xfffe, 0x0000 + + .align 2 +gUnknown_08595468:: @ 8595468 + .4byte gUnknown_08595458 + + .align 2 +gUnknown_0859546C:: @ 859546C + spr_template 0x272d, 0x272d, gUnknown_08524914, gUnknown_08595468, NULL, gDummySpriteAffineAnimTable, sub_8109064 + + .align 2 +gUnknown_08595484:: @ 8595484 + .2byte 0x0050, 0x0050, 0x0000, 0x0000, 0x0002, 0x0002, 0x010a, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_0859549C:: @ 859549C + .4byte gUnknown_08595484 + + .align 2 +gUnknown_085954A0:: @ 85954A0 + spr_template 0x27ad, 0x27ad, gUnknown_08524A94, gDummySpriteAnimTable, NULL, gUnknown_0859549C, sub_810916C + + .align 2 +gUnknown_085954B8:: @ 85954B8 + .2byte 0x0000, 0x0004, 0x0010, 0x0004, 0x0020, 0x0004, 0x0030, 0x0004 + .2byte 0x0040, 0x0004, 0xfffe, 0x0000 + + .align 2 +gUnknown_085954D0:: @ 85954D0 + .4byte gUnknown_085954B8 + + .align 2 +gUnknown_085954D4:: @ 85954D4 + spr_template 0x272d, 0x272d, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80A7820 + + .align 2 +gUnknown_085954EC:: @ 85954EC + spr_template 0x272d, 0x272d, gUnknown_08524914, gUnknown_085954D0, NULL, gDummySpriteAffineAnimTable, sub_8109198 + + .align 2 +gUnknown_08595504:: @ 8595504 + spr_template 0x272d, 0x272d, gUnknown_08524914, gUnknown_085954D0, NULL, gDummySpriteAffineAnimTable, sub_8109200 + + .align 2 +gUnknown_0859551C:: @ 859551C + spr_template 0x272d, 0x272d, gUnknown_08524914, gUnknown_085954D0, NULL, gDummySpriteAffineAnimTable, sub_810921C + + .align 2 +gUnknown_08595534:: @ 8595534 + .2byte 0x0020, 0x0006, 0x0030, 0x0006, 0xfffe, 0x0000 + + .align 2 +gUnknown_08595540:: @ 8595540 + .4byte gUnknown_08595534 + + .align 2 +gUnknown_08595544:: @ 8595544 + .2byte 0x0000, 0x0000, 0x0100, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595554:: @ 8595554 + .2byte 0x00a0, 0x00a0, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595564:: @ 8595564 + .4byte gUnknown_08595544 + .4byte gUnknown_08595554 + + .align 2 +gUnknown_0859556C:: @ 859556C + spr_template 0x272d, 0x272d, gUnknown_08524914, gUnknown_08595540, NULL, gDummySpriteAffineAnimTable, sub_8109364 + + .align 2 +gUnknown_08595584:: @ 8595584 + spr_template 0x272d, 0x272d, gUnknown_08524914, gUnknown_085954D0, NULL, gDummySpriteAffineAnimTable, sub_81093A4 + + .align 2 +gUnknown_0859559C:: @ 859559C + spr_template 0x272d, 0x272d, gUnknown_08524914, gUnknown_085954D0, NULL, gDummySpriteAffineAnimTable, sub_80A8EE4 + + .align 2 gUnknown_085955B4:: @ 85955B4 - .incbin "baserom.gba", 0x5955b4, 0x18 + spr_template 0x27d9, 0x27d9, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81098EC + .align 2 gUnknown_085955CC:: @ 85955CC - .incbin "baserom.gba", 0x5955cc, 0x2 + .2byte 0xfffe, 0xfffb, 0xffff, 0xffff, 0x0003, 0xfffa, 0x0004, 0xfffe + .2byte 0x0002, 0xfff8, 0xfffb, 0xfffb, 0x0004, 0xfff9 -gUnknown_085955CE:: @ 85955CE - .incbin "baserom.gba", 0x5955ce, 0xb6 + .align 2 +gUnknown_085955E8:: @ 85955E8 + spr_template 0x27d9, 0x27d9, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8109A10 + .align 2 +gUnknown_08595600:: @ 8595600 + .2byte 0x0000, 0x0005, 0x0004, 0x0005, 0x0008, 0x0005, 0x000c, 0x0005, 0xfffe, 0x0000 + + .align 2 +gUnknown_08595614:: @ 8595614 + .2byte 0x0010, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_0859561C:: @ 859561C + .2byte 0x0014, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_08595624:: @ 8595624 + .2byte 0x0014, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_0859562C:: @ 859562C + .4byte gUnknown_08595600 + .4byte gUnknown_08595614 + .4byte gUnknown_0859561C + .4byte gUnknown_08595624 + + .align 2 +gUnknown_0859563C:: @ 859563C + spr_template 0x27f7, 0x27f7, gUnknown_0852490C, gUnknown_0859562C, NULL, gDummySpriteAffineAnimTable, sub_8109AFC + + .align 2 +gUnknown_08595654:: @ 8595654 + .2byte 0x0000, 0x0005, 0x0010, 0x0005, 0x0020, 0x0005, 0x0030, 0x0005, 0xfffe, 0x0000 + + .align 2 +gUnknown_08595668:: @ 8595668 + .4byte gUnknown_08595654 + + .align 2 +gUnknown_0859566C:: @ 859566C + spr_template 0x27f8, 0x27f8, gUnknown_08524914, gUnknown_08595668, NULL, gDummySpriteAffineAnimTable, sub_8109CB0 + + .align 2 gUnknown_08595684:: @ 8595684 - .incbin "baserom.gba", 0x595684, 0x10 + .2byte 0xffff, 0x0100, 0x0001, 0xff00, 0x01ff, 0x0001, 0xff00, 0x0100 + .align 2 gUnknown_08595694:: @ 8595694 - .incbin "baserom.gba", 0x595694, 0x2c + .2byte 0x00ff, 0x0001, 0x01ff, 0xff00, 0x0100, 0xff00, 0x0100, 0x0100 + .align 2 +gUnknown_085956A4:: @ 85956A4 + .2byte 0x0000, 0x0005, 0x0010, 0x0005, 0x0020, 0x0008, 0x0030, 0x0005 + .2byte 0x0040, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_085956BC:: @ 85956BC + .4byte gUnknown_085956A4 + + .align 2 gUnknown_085956C0:: @ 85956C0 - .incbin "baserom.gba", 0x5956c0, 0x168 + spr_template 0x2735, 0x2735, gUnknown_08524914, gUnknown_085956BC, NULL, gDummySpriteAffineAnimTable, sub_810A1A8 + .align 2 +gUnknown_085956D8:: @ 85956D8 + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x1400, 0x0000 + .2byte 0x0000, 0x0000, 0x3cf0, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085956F8:: @ 85956F8 + .4byte gUnknown_085956D8 + + .align 2 +gUnknown_085956FC:: @ 85956FC + spr_template 0x279f, 0x279f, gUnknown_08524974, gDummySpriteAnimTable, NULL, gUnknown_085956F8, sub_810A214 + + .align 2 +gUnknown_08595714:: @ 8595714 + .2byte 0x0000, 0x0005, 0x0010, 0x0005, 0x0020, 0x0005, 0x0030, 0x0005 + .2byte 0x0040, 0x0005, 0x0050, 0x0005, 0xfffe, 0x0000 + + .align 2 +gUnknown_08595730:: @ 8595730 + .4byte gUnknown_08595714 + + .align 2 +gUnknown_08595734:: @ 8595734 + spr_template 0x275f, 0x275f, gUnknown_08524914, gUnknown_08595730, NULL, gDummySpriteAffineAnimTable, sub_810A274 + + .align 2 +gUnknown_0859574C:: @ 859574C + spr_template 0x271b, 0x271b, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810A308 + + .align 2 +gUnknown_08595764:: @ 8595764 + spr_template 0x27bb, 0x27bb, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80A7820 + + .align 2 +gUnknown_0859577C:: @ 859577C + .2byte 0x0000, 0x0000, 0x0114, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859578C:: @ 859578C + .4byte gUnknown_0859577C + + .align 2 +gUnknown_08595790:: @ 8595790 + spr_template 0x271b, 0x271b, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gUnknown_0859578C, sub_810A46C + + .align 2 +gUnknown_085957A8:: @ 85957A8 + .2byte 0x0000, 0x0006, 0x0010, 0x0006, 0x0020, 0x0006, 0xfffe, 0x0000 + + .align 2 +gUnknown_085957B8:: @ 85957B8 + .4byte gUnknown_085957A8 + + .align 2 +gUnknown_085957BC:: @ 85957BC + .2byte 0x00e8, 0x00e8, 0x0000, 0x0000, 0xfff8, 0xfff8, 0x0a00, 0x0000 + .2byte 0x0008, 0x0008, 0x0a00, 0x0000, 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_085957DC:: @ 85957DC + .4byte gUnknown_085957BC + + .align 2 +gUnknown_085957E0:: @ 85957E0 + spr_template 0x282a, 0x282a, gUnknown_08524974, gUnknown_085957B8, NULL, gUnknown_085957DC, sub_810A5BC + + .align 2 +gUnknown_085957F8:: @ 85957F8 + spr_template 0x271b, 0x271b, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gUnknown_0859578C, sub_810A628 + + .align 2 +gUnknown_08595810:: @ 8595810 + spr_template 0x271b, 0x271b, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810A75C + + .align 2 gUnknown_08595828:: @ 8595828 - .incbin "baserom.gba", 0x595828, 0x18 + spr_template 0x2711, 0x2711, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810A9DC + .align 2 gUnknown_08595840:: @ 8595840 - .incbin "baserom.gba", 0x595840, 0x18 + spr_template 0x27bd, 0x27bd, gUnknown_08524934, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810AA2C + .align 2 gUnknown_08595858:: @ 8595858 - .incbin "baserom.gba", 0x595858, 0x50 + .byte 0x3a, 0xc4, 0xc8, 0xdc, 0x08, 0xc8, 0xf0, 0x38 + .byte 0x3a, 0xf6, 0xc6, 0x0a, 0x30, 0xee, 0xf8, 0x38 + .byte 0x10, 0xc8, 0xc6, 0xd6, 0x3a, 0x1e, 0xd0, 0x28 + .byte 0x0c, 0xd0, 0x30, 0xf4, 0xc8, 0x12, 0x30, 0x30 + .align 2 +gUnknown_08595878:: @ 8595878 + .2byte 0x0003, 0x0001, 0x0002, 0x0001, 0x0001, 0x0001, 0x0000, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_0859588C:: @ 859588C + .2byte 0x0000, 0x0005, 0x0001, 0x0005, 0x0002, 0x0005, 0x0003, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_085958A0:: @ 85958A0 + .4byte gUnknown_08595878 + .4byte gUnknown_0859588C + + .align 2 gUnknown_085958A8:: @ 85958A8 - .incbin "baserom.gba", 0x5958a8, 0x158 + spr_template 0x27e3, 0x27e3, gUnknown_08524904, gUnknown_085958A0, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy + .align 2 +gUnknown_085958C0:: @ 85958C0 + .2byte 0x0010, 0x0010, 0x0000, 0x0000, 0x0004, 0x0004, 0x3c00, 0x0000 + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x7ffd, 0x0000, 0x0000, 0x0000 + .2byte 0xfffc, 0xfffc, 0x0500, 0x0000, 0x0004, 0x0004, 0x0500, 0x0000 + .2byte 0x7ffd, 0x000a, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595900:: @ 8595900 + .2byte 0x0010, 0x0010, 0x0000, 0x0000, 0x0008, 0x0008, 0x1e00, 0x0000 + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0xfffc, 0xfffc, 0x0500, 0x0000 + .2byte 0x0004, 0x0004, 0x0500, 0x0000, 0x7ffe, 0x0003, 0x0000, 0x0000 + + .align 2 +gUnknown_08595930:: @ 8595930 + .2byte 0x0010, 0x0010, 0x0000, 0x0000, 0x0008, 0x0008, 0x1e00, 0x0000 + .2byte 0xfff8, 0xfff8, 0x1e00, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595950:: @ 8595950 + .4byte gUnknown_085958C0 + .4byte gUnknown_08595900 + .4byte gUnknown_08595930 + + .align 2 +gUnknown_0859595C:: @ 859595C + spr_template 0x27e4, 0x27e4, gUnknown_08524A9C, gDummySpriteAnimTable, NULL, gUnknown_08595950, sub_810ACD8 + + .align 2 +gUnknown_08595974:: @ 8595974 + .2byte 0x0000, 0x0003, 0x0010, 0x0003, 0x0020, 0x0003, 0x0030, 0x0003, 0xffff, 0x0000 + + .align 2 +gUnknown_08595988:: @ 8595988 + .4byte gUnknown_08595974 + + .align 2 +gUnknown_0859598C:: @ 859598C + spr_template 0x27e5, 0x27e5, gUnknown_08524914, gUnknown_08595988, NULL, gDummySpriteAffineAnimTable, sub_810AD30 + + .align 2 +gUnknown_085959A4:: @ 85959A4 + spr_template 0x27e4, 0x27e4, gUnknown_08524A9C, gDummySpriteAnimTable, NULL, gUnknown_08595950, sub_810AD98 + + .align 2 +gUnknown_085959BC:: @ 85959BC + .2byte 0x0000, 0x0003, 0xffff, 0x0000 + + .align 2 +gUnknown_085959C4:: @ 85959C4 + .2byte 0x0002, 0x0003, 0xffff, 0x0000 + + .align 2 +gUnknown_085959CC:: @ 85959CC + .2byte 0x0004, 0x0003, 0xffff, 0x0000 + + .align 2 +gUnknown_085959D4:: @ 85959D4 + .2byte 0x0006, 0x0003, 0xffff, 0x0000 + + .align 2 +gUnknown_085959DC:: @ 85959DC + .4byte gUnknown_085959BC + .4byte gUnknown_085959C4 + .4byte gUnknown_085959CC + .4byte gUnknown_085959D4 + + .align 2 +gUnknown_085959EC:: @ 85959EC + .2byte 0x0100, 0x0100, 0x0040, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085959FC:: @ 85959FC + .4byte gUnknown_085959EC + + .align 2 gUnknown_08595A00:: @ 8595A00 - .incbin "baserom.gba", 0x595a00, 0x30 + spr_template 0x2711, 0x2711, gUnknown_08524A04, gUnknown_085959DC, NULL, gUnknown_085959FC, sub_810B1F0 + .align 2 +gUnknown_08595A18:: @ 8595A18 + spr_template 0x27e4, 0x27e4, gUnknown_08524A9C, gDummySpriteAnimTable, NULL, gUnknown_08595950, sub_810B23C + + .align 2 gUnknown_08595A30:: @ 8595A30 - .incbin "baserom.gba", 0x595a30, 0x138 + spr_template 0x2711, 0x2711, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810B51C + .align 2 +gUnknown_08595A48:: @ 8595A48 + .2byte 0x0000, 0x0045, 0x0001, 0x0045, 0xfffe, 0x0000 + + .align 2 +gUnknown_08595A54:: @ 8595A54 + .4byte gUnknown_08595A48 + + .align 2 +gUnknown_08595A58:: @ 8595A58 + spr_template 0x279d, 0x279d, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810B6C4 + + .align 2 +gUnknown_08595A70:: @ 8595A70 + .2byte 0x0000, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595A78:: @ 8595A78 + .2byte 0x0004, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595A80:: @ 8595A80 + .2byte 0x0006, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595A88:: @ 8595A88 + .2byte 0x0007, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595A90:: @ 8595A90 + .2byte 0x0008, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595A98:: @ 8595A98 + .2byte 0x000c, 0x0006, 0x000d, 0x0006, 0xfffe, 0x0000 + + .align 2 +gUnknown_08595AA4:: @ 8595AA4 + .4byte gUnknown_08595A70 + + .align 2 +gUnknown_08595AA8:: @ 8595AA8 + .4byte gUnknown_08595A78 + + .align 2 +gUnknown_08595AAC:: @ 8595AAC + .4byte gUnknown_08595A80 + + .align 2 +gUnknown_08595AB0:: @ 8595AB0 + .4byte gUnknown_08595A88 + + .align 2 +gUnknown_08595AB4:: @ 8595AB4 + .4byte gUnknown_08595A90 + + .align 2 +gUnknown_08595AB8:: @ 8595AB8 + .4byte gUnknown_08595A98 + + .align 2 +gUnknown_08595ABC:: @ 8595ABC + .2byte 0x0000, 0x0000, 0x0128, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595ACC:: @ 8595ACC + .4byte gUnknown_08595ABC + + .align 2 +gUnknown_08595AD0:: @ 8595AD0 + spr_template 0x279d, 0x279d, gUnknown_08524B24, gUnknown_08595AA8, NULL, gUnknown_08595ACC, sub_810B8AC + + .align 2 +gUnknown_08595AE8:: @ 8595AE8 + spr_template 0x279d, 0x279d, gUnknown_08524A24, gUnknown_08595AAC, NULL, gDummySpriteAffineAnimTable, sub_810B8AC + + .align 2 +gUnknown_08595B00:: @ 8595B00 + .2byte 0x0000, 0x0000, 0x010a, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595B10:: @ 8595B10 + .4byte gUnknown_08595B00 + + .align 2 +gUnknown_08595B14:: @ 8595B14 + spr_template 0x279d, 0x279d, gUnknown_08524AC4, gUnknown_08595AA8, NULL, gUnknown_08595B10, sub_810B8EC + + .align 2 +gUnknown_08595B2C:: @ 8595B2C + spr_template 0x279d, 0x279d, gUnknown_08524A24, gUnknown_08595AAC, NULL, gDummySpriteAffineAnimTable, sub_810B8EC + + .align 2 +gUnknown_08595B44:: @ 8595B44 + .2byte 0x00ce, 0x00ce, 0x0000, 0x0000, 0x0005, 0x0005, 0x0a00, 0x0000 + .2byte 0x0000, 0x0000, 0x0600, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595B64:: @ 8595B64 + .4byte gUnknown_08595B44 + + .align 2 gUnknown_08595B68:: @ 8595B68 - .incbin "baserom.gba", 0x595b68, 0xf4 + spr_template 0x279d, 0x279d, gUnknown_08524AC4, gUnknown_08595AA8, NULL, gUnknown_08595B64, sub_810B974 + .align 2 +gUnknown_08595B80:: @ 8595B80 + spr_template 0x279d, 0x279d, gUnknown_08524A84, gUnknown_08595AAC, NULL, gUnknown_08595B64, sub_810B974 + + .align 2 +gUnknown_08595B98:: @ 8595B98 + spr_template 0x279d, 0x279d, gUnknown_08524904, gUnknown_08595AB0, NULL, gDummySpriteAffineAnimTable, sub_810BA24 + + .align 2 +gUnknown_08595BB0:: @ 8595BB0 + spr_template 0x279d, 0x279d, gUnknown_0852490C, gUnknown_08595AB4, NULL, gDummySpriteAffineAnimTable, sub_810BC94 + + .align 2 +gUnknown_08595BC8:: @ 8595BC8 + spr_template 0x279d, 0x279d, gUnknown_08524904, gUnknown_08595AB0, NULL, gDummySpriteAffineAnimTable, sub_810BC94 + + .align 2 +gUnknown_08595BE0:: @ 8595BE0 + .2byte 0x0000, 0x0005, 0x0002, 0x0005, 0x0004, 0x0005, 0x0006, 0x0005 + .2byte 0x0004, 0x0005, 0x0002, 0x0005, 0x0000, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_08595C00:: @ 8595C00 + .4byte gUnknown_08595BE0 + + .align 2 +gUnknown_08595C04:: @ 8595C04 + spr_template 0x279e, 0x279e, gUnknown_08524A64, gUnknown_08595C00, NULL, gDummySpriteAffineAnimTable, sub_810BE48 + + .align 2 +gUnknown_08595C1C:: @ 8595C1C + .2byte 0x0000, 0x0008, 0x0008, 0x0008, 0xfffe, 0x0000 + + .align 2 +gUnknown_08595C28:: @ 8595C28 + .4byte gUnknown_08595C1C + + .align 2 +gUnknown_08595C2C:: @ 8595C2C + spr_template 0x27a0, 0x27a0, gUnknown_08524A54, gUnknown_08595C28, NULL, gDummySpriteAffineAnimTable, sub_810BED0 + + .align 2 +gUnknown_08595C44:: @ 8595C44 + spr_template 0x27bc, 0x27bc, gUnknown_08524A54, gUnknown_08595C28, NULL, gDummySpriteAffineAnimTable, sub_810BED0 + + .align 2 gUnknown_08595C5C:: @ 8595C5C - .incbin "baserom.gba", 0x595c5c, 0x2c + .byte 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x03, 0x04 + .byte 0x04, 0x04, 0x05, 0x06, 0x06, 0x06, 0x06, 0x07 + .byte 0x08, 0x08, 0x08, 0x09 + .align 2 +gUnknown_08595C70:: @ 8595C70 + spr_template 0x27ab, 0x27ab, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810C2F0 + + .align 2 gUnknown_08595C88:: @ 8595C88 - .incbin "baserom.gba", 0x595c88, 0x2c + .byte 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02 + .byte 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04 + .byte 0x04, 0x04, 0x04, 0x05 + .align 2 +gUnknown_08595C9C:: @ 8595C9C + spr_template 0x27bc, 0x27bc, gUnknown_08524A54, gUnknown_08595C28, NULL, gDummySpriteAffineAnimTable, sub_810C560 + + .align 2 gUnknown_08595CB4:: @ 8595CB4 - .incbin "baserom.gba", 0x595cb4, 0x78 + .byte 0x64, 0xe0, 0x01, 0x20, 0x55, 0xe0, 0x01, 0x00 + .byte 0xf2, 0xe0, 0x11, 0x10, 0x42, 0xe0, 0x21, 0x10 + .byte 0xb6, 0xe0, 0x31, 0x00, 0x3c, 0xe0, 0x01, 0x20 + .byte 0xd6, 0xe0, 0x11, 0x00, 0x71, 0xe0, 0x01, 0x10 + .byte 0xd2, 0xe0, 0x31, 0x10, 0x26, 0xe0, 0x21, 0x00 + .align 2 +gUnknown_08595CDC:: @ 8595CDC + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595CEC:: @ 8595CEC + .2byte 0x00f0, 0x00f0, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595CFC:: @ 8595CFC + .2byte 0x00e0, 0x00e0, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595D0C:: @ 8595D0C + .2byte 0x0150, 0x0150, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595D1C:: @ 8595D1C + .4byte gUnknown_08595CDC + .4byte gUnknown_08595CEC + .4byte gUnknown_08595CFC + + .align 2 +gUnknown_08595D28:: @ 8595D28 + .4byte gUnknown_08595D0C + + .align 2 gUnknown_08595D2C:: @ 8595D2C - .incbin "baserom.gba", 0x595d2c, 0xa14 + spr_template 0x2817, 0x2817, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gUnknown_08595D1C, sub_810CB58 + .align 2 +gUnknown_08595D44:: @ 8595D44 + spr_template 0x2817, 0x2817, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gUnknown_08595D28, sub_80A8EE4 + + .align 2 +gUnknown_08595D5C:: @ 8595D5C + .2byte 0x0000, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595D64:: @ 8595D64 + .2byte 0x0010, 0x0004, 0x0020, 0x0004, 0x0030, 0x0004, 0x0040, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08595D78:: @ 8595D78 + .4byte gUnknown_08595D5C + .4byte gUnknown_08595D64 + + .align 2 +gUnknown_08595D80:: @ 8595D80 + .2byte 0x00e0, 0x00e0, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595D90:: @ 8595D90 + .2byte 0x0118, 0x0118, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595DA0:: @ 8595DA0 + .2byte 0x0150, 0x0150, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595DB0:: @ 8595DB0 + .2byte 0x0180, 0x0180, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595DC0:: @ 8595DC0 + .2byte 0x01c0, 0x01c0, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08595DD0:: @ 8595DD0 + .4byte gUnknown_08595D80 + .4byte gUnknown_08595D90 + .4byte gUnknown_08595DA0 + .4byte gUnknown_08595DB0 + .4byte gUnknown_08595DC0 + + .align 2 +gUnknown_08595DE4:: @ 8595DE4 + spr_template 0x273b, 0x273b, gUnknown_085249D4, gUnknown_08595D78, NULL, gUnknown_08595DD0, unc_080B06FC + + .align 2 +gUnknown_08595DFC:: @ 8595DFC + spr_template 0x279d, 0x279d, gUnknown_08524904, gUnknown_08595AAC, NULL, gDummySpriteAffineAnimTable, sub_810CD4C + + .align 2 +gUnknown_08595E14:: @ 8595E14 + spr_template 0x2742, 0x2742, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, unc_080B08A0 + + .align 2 +gUnknown_08595E2C:: @ 8595E2C + .2byte 0x0000, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595E34:: @ 8595E34 + .2byte 0x0010, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595E3C:: @ 8595E3C + .2byte 0x0020, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595E44:: @ 8595E44 + .2byte 0x0030, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08595E4C:: @ 8595E4C + .2byte 0x0030, 0x0041, 0xffff, 0x0000 + + .align 2 +gUnknown_08595E54:: @ 8595E54 + .4byte gUnknown_08595E2C + + .align 2 +gUnknown_08595E58:: @ 8595E58 + .4byte gUnknown_08595E34 + .4byte gUnknown_08595E3C + + .align 2 +gUnknown_08595E60:: @ 8595E60 + .4byte gUnknown_08595E44 + .4byte gUnknown_08595E4C + + .align 2 +gUnknown_08595E68:: @ 8595E68 + spr_template 0x279f, 0x279f, gUnknown_08524914, gUnknown_08595E54, NULL, gDummySpriteAffineAnimTable, sub_810CE68 + + .align 2 +gUnknown_08595E80:: @ 8595E80 + spr_template 0x279f, 0x279f, gUnknown_08524914, gUnknown_08595E54, NULL, gDummySpriteAffineAnimTable, sub_810CEB4 + + .align 2 +gUnknown_08595E98:: @ 8595E98 + spr_template 0x279f, 0x279f, gUnknown_08524914, gUnknown_08595E54, NULL, gDummySpriteAffineAnimTable, sub_810CEE0 + + .align 2 +gUnknown_08595EB0:: @ 8595EB0 + spr_template 0x279f, 0x279f, gUnknown_08524914, gUnknown_08595E54, NULL, gDummySpriteAffineAnimTable, sub_810CF30 + + .align 2 +gUnknown_08595EC8:: @ 8595EC8 + spr_template 0x279f, 0x279f, gUnknown_08524914, gUnknown_08595E60, NULL, gDummySpriteAffineAnimTable, sub_810D10C + + .align 2 +gUnknown_08595EE0:: @ 8595EE0 + spr_template 0x279f, 0x279f, gUnknown_08524914, gUnknown_08595E58, NULL, gDummySpriteAffineAnimTable, sub_810D1B4 + + .align 2 +gUnknown_08595EF8:: @ 8595EF8 + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0xfff8, 0xfff8, 0x0114, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08595F10:: @ 8595F10 + .4byte gUnknown_08595EF8 + + .align 2 +gUnknown_08595F14:: @ 8595F14 + spr_template 0x279f, 0x279f, gUnknown_085249D4, gUnknown_08595E54, NULL, gUnknown_08595F10, sub_810D278 + + .align 2 +gUnknown_08595F2C:: @ 8595F2C + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0xfffc, 0xfffc, 0x0114, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08595F44:: @ 8595F44 + .4byte gUnknown_08595F2C + + .align 2 +gUnknown_08595F48:: @ 8595F48 + spr_template 0x279f, 0x279f, gUnknown_085249D4, gUnknown_08595E54, NULL, gUnknown_08595F44, sub_810D278 + + .align 2 +gUnknown_08595F60:: @ 8595F60 + spr_template 0x279f, 0x279f, gUnknown_08524914, gUnknown_08595E58, NULL, gDummySpriteAffineAnimTable, sub_810D2E4 + + .align 2 +gUnknown_08595F78:: @ 8595F78 + spr_template 0x2759, 0x2759, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810D37C + + .align 2 +gUnknown_08595F90:: @ 8595F90 + spr_template 0x27b7, 0x27b7, gUnknown_08524A3C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810D40C + + .align 2 +gUnknown_08595FA8:: @ 8595FA8 + spr_template 0x27e0, 0x27e0, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810D4F4 + + .align 2 +gUnknown_08595FC0:: @ 8595FC0 + .2byte 0x0020, 0x0020, 0x0000, 0x0000, 0x0004, 0x0004, 0x4000, 0x0000 + .2byte 0xfffa, 0xfffa, 0x0800, 0x0000, 0x0006, 0x0006, 0x0800, 0x0000 + .2byte 0x7ffe, 0x0002, 0x0000, 0x0000 + + .align 2 +gUnknown_08595FE8:: @ 8595FE8 + .4byte gUnknown_08595FC0 + + .align 2 +gUnknown_08595FEC:: @ 8595FEC + spr_template 0x27e4, 0x27e4, gUnknown_08524AFC, gDummySpriteAnimTable, NULL, gUnknown_08595FE8, sub_810D608 + + .align 2 +gUnknown_08596004:: @ 8596004 + spr_template 0x2811, 0x2811, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810D714 + + .align 2 +gUnknown_0859601C:: @ 859601C + spr_template 0x2810, 0x2810, gUnknown_0852491C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810D874 + + .align 2 +gUnknown_08596034:: @ 8596034 + spr_template 0x279f, 0x279f, gUnknown_08524914, gUnknown_08595E54, NULL, gDummySpriteAffineAnimTable, sub_810D984 + + .align 2 +gUnknown_0859604C:: @ 859604C + .2byte 0x0000, 0x0004, 0x0010, 0x0004, 0x0020, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_0859605C:: @ 859605C + .2byte 0x0000, 0x0084, 0x0010, 0x0084, 0x0020, 0x0084, 0xffff, 0x0000 + + .align 2 +gUnknown_0859606C:: @ 859606C + .2byte 0x0000, 0x0044, 0x0010, 0x0044, 0x0020, 0x0044, 0xffff, 0x0000 + + .align 2 +gUnknown_0859607C:: @ 859607C + .4byte gUnknown_0859604C + .4byte gUnknown_0859605C + .4byte gUnknown_0859606C + + .align 2 +gUnknown_08596088:: @ 8596088 + spr_template 0x2805, 0x2805, gUnknown_08524914, gUnknown_0859607C, NULL, gDummySpriteAffineAnimTable, sub_810DA10 + + .align 2 +gUnknown_085960A0:: @ 85960A0 + .2byte 0x0000, 0x0006, 0x0040, 0x0006, 0xffff, 0x0000 + + .align 2 +gUnknown_085960AC:: @ 85960AC + .2byte 0x0000, 0x00c6, 0x0040, 0x00c6, 0xffff, 0x0000 + + .align 2 +gUnknown_085960B8:: @ 85960B8 + .2byte 0x0000, 0x0046, 0x0040, 0x0046, 0xffff, 0x0000 + + .align 2 +gUnknown_085960C4:: @ 85960C4 + .4byte gUnknown_085960A0 + .4byte gUnknown_085960AC + .4byte gUnknown_085960B8 + + .align 2 +gUnknown_085960D0:: @ 85960D0 + spr_template 0x2806, 0x2806, gUnknown_0852491C, gUnknown_085960C4, NULL, gDummySpriteAffineAnimTable, sub_810DA10 + + .align 2 +gUnknown_085960E8:: @ 85960E8 + .2byte 0x0200, 0x0200, 0x0000, 0x0000, 0xffe0, 0xffe0, 0x0800, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596100:: @ 8596100 + .4byte gUnknown_085960E8 + + .align 2 +gUnknown_08596104:: @ 8596104 + spr_template 0x279f, 0x279f, gUnknown_085249D4, gUnknown_08595E54, NULL, gUnknown_08596100, sub_810DA7C + + .align 2 +gUnknown_0859611C:: @ 859611C + .2byte 0x0000, 0x0005, 0x0008, 0x0005, 0x0010, 0x0005, 0x0018, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_08596130:: @ 8596130 + .4byte gUnknown_0859611C + + .align 2 +gUnknown_08596134:: @ 8596134 + spr_template 0x27a7, 0x27a7, gUnknown_08524954, gUnknown_08596130, NULL, gDummySpriteAffineAnimTable, sub_80A77C8 + + .align 2 +gUnknown_0859614C:: @ 859614C + .2byte 0x0000, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08596154:: @ 8596154 + .2byte 0x0004, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_0859615C:: @ 859615C + .2byte 0x0008, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08596164:: @ 8596164 + .4byte gUnknown_0859614C + + .align 2 +gUnknown_08596168:: @ 8596168 + .4byte gUnknown_08596154 + + .align 2 +gUnknown_0859616C:: @ 859616C + .4byte gUnknown_0859615C + + .align 2 +gUnknown_08596170:: @ 8596170 + .2byte 0x0160, 0x0160, 0x0000, 0x0000, 0xfff6, 0xfff6, 0x0a00, 0x0000 + .2byte 0x000a, 0x000a, 0x0a00, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596190:: @ 8596190 + .2byte 0x00ec, 0x00ec, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085961A0:: @ 85961A0 + .4byte gUnknown_08596170 + + .align 2 +gUnknown_085961A4:: @ 85961A4 + .4byte gUnknown_08596190 + + .align 2 +gUnknown_085961A8:: @ 85961A8 + spr_template 0x27a6, 0x27a6, gUnknown_085249CC, gUnknown_08596164, NULL, gUnknown_085961A0, sub_810DBAC + + .align 2 +gUnknown_085961C0:: @ 85961C0 + spr_template 0x27a6, 0x27a6, gUnknown_085249CC, gUnknown_08596164, NULL, gUnknown_085961A0, sub_810DC2C + + .align 2 +gUnknown_085961D8:: @ 85961D8 + spr_template 0x27a6, 0x27a6, gUnknown_0852496C, gUnknown_0859616C, NULL, gUnknown_085961A4, sub_810DCD0 + + .align 2 +gUnknown_085961F0:: @ 85961F0 + .2byte 0xfff0, 0x0010, 0x0600, 0x0000, 0x0010, 0xfff0, 0x0600, 0x0000 + .2byte 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596208:: @ 8596208 + .4byte gUnknown_085961F0 + + .align 2 +gUnknown_0859620C:: @ 859620C + spr_template 0x27a6, 0x27a6, gUnknown_085249CC, gUnknown_08596168, NULL, gUnknown_08596208, sub_810DD50 + + .align 2 +gUnknown_08596224:: @ 8596224 + .2byte 0x009c, 0x009c, 0x0000, 0x0000, 0x0005, 0x0005, 0x1400, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859623C:: @ 859623C + .4byte gUnknown_08596224 + + .align 2 +gUnknown_08596240:: @ 8596240 + spr_template 0x27a6, 0x27a6, gUnknown_0852496C, gUnknown_08596164, NULL, gUnknown_0859623C, sub_810DDC4 + + .align 2 +gUnknown_08596258:: @ 8596258 + spr_template 0x27ab, 0x27ab, gUnknown_08524A8C, gUnknown_08595200, NULL, gUnknown_0859623C, sub_810DDC4 + + .align 2 +gUnknown_08596270:: @ 8596270 + spr_template 0x2719, 0x2719, gUnknown_0852495C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810DE70 + + .align 2 +gUnknown_08596288:: @ 8596288 + .2byte 0x0010, 0x0100, 0x0000, 0x0000, 0x000a, 0x0000, 0x1800, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085962A0:: @ 85962A0 + .4byte gUnknown_08596288 + + .align 2 +gUnknown_085962A4:: @ 85962A4 + spr_template 0x2719, 0x2719, gUnknown_085249BC, gDummySpriteAnimTable, NULL, gUnknown_085962A0, sub_810DFA8 + + .align 2 +gUnknown_085962BC:: @ 85962BC + .2byte 0x0000, 0x0003, 0x0000, 0x0043, 0x0000, 0x0083, 0x0000, 0x00c3, 0xfffe, 0x0000 + + .align 2 +gUnknown_085962D0:: @ 85962D0 + .4byte gUnknown_085962BC + + .align 2 +gUnknown_085962D4:: @ 85962D4 + spr_template 0x27aa, 0x27aa, gUnknown_08524934, gUnknown_085962D0, NULL, gDummySpriteAffineAnimTable, sub_810E044 + + .align 2 +gUnknown_085962EC:: @ 85962EC + .2byte 0x0010, 0x0100, 0x0000, 0x0000, 0x0028, 0x0000, 0x0600, 0x0000 + .2byte 0x0000, 0xffe0, 0x0500, 0x0000, 0xfff0, 0x0020, 0x0a00, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596314:: @ 8596314 + .4byte gUnknown_085962EC + + .align 2 +gUnknown_08596318:: @ 8596318 + .2byte 0x0000, 0x0000, 0x0132, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596328:: @ 8596328 + .2byte 0x0000, 0x0000, 0x01d8, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596338:: @ 8596338 + .4byte gUnknown_08596318 + .4byte gUnknown_08596328 + + .align 2 +gUnknown_08596340:: @ 8596340 + spr_template 0x27ac, 0x27ac, gUnknown_085249DC, gDummySpriteAnimTable, NULL, gUnknown_08596314, sub_810E13C + + .align 2 +gUnknown_08596358:: @ 8596358 + spr_template 0x27ac, 0x27ac, gUnknown_0852497C, gDummySpriteAnimTable, NULL, gUnknown_08596338, sub_810E1C8 + + .align 2 +gUnknown_08596370:: @ 8596370 + .2byte 0x0000, 0x0000, 0xffff, 0x0000 + + .align 2 +gUnknown_08596378:: @ 8596378 + .2byte 0x0010, 0x0040, 0xffff, 0x0000 + + .align 2 +gUnknown_08596380:: @ 8596380 + .4byte gUnknown_08596370 + .4byte gUnknown_08596378 + + .align 2 +gUnknown_08596388:: @ 8596388 + spr_template 0x281e, 0x281e, gUnknown_08524974, gUnknown_08596380, NULL, gDummySpriteAffineAnimTable, sub_810E314 + + .align 2 +gUnknown_085963A0:: @ 85963A0 + spr_template 0x27ab, 0x27ab, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810EA4C + + .align 2 +gUnknown_085963B8:: @ 85963B8 + .2byte 0x0000, 0x0001, 0x0008, 0x0001, 0x0010, 0x0001, 0x0008, 0x0041 + .2byte 0x0000, 0x0041, 0xffff, 0x0000 + + .align 2 +gUnknown_085963D0:: @ 85963D0 + .4byte gUnknown_085963B8 + + .align 2 +gUnknown_085963D4:: @ 85963D4 + spr_template 0x27b2, 0x27b2, gUnknown_08524934, gUnknown_085963D0, NULL, gDummySpriteAffineAnimTable, sub_810EAA0 + + .align 2 +gUnknown_085963EC:: @ 85963EC + .2byte 0x0010, 0x0100, 0x0000, 0x0000, 0x0028, 0x0000, 0x0600, 0x0000 + .2byte 0x0000, 0xffe0, 0x0500, 0x0000, 0xffec, 0x0000, 0x0700, 0x0000 + .2byte 0xffec, 0xffec, 0x0500, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859641C:: @ 859641C + .4byte gUnknown_085963EC + + .align 2 +gUnknown_08596420:: @ 8596420 + spr_template 0x27ac, 0x27ac, gUnknown_085249DC, gDummySpriteAnimTable, NULL, gUnknown_0859641C, sub_810EC34 + + .align 2 +gUnknown_08596438:: @ 8596438 + .2byte 0x00a0, 0x0100, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596448:: @ 8596448 + .4byte gUnknown_08596438 + + .align 2 +gUnknown_0859644C:: @ 859644C + spr_template 0x27ac, 0x27ac, gUnknown_085249DC, gDummySpriteAnimTable, NULL, gUnknown_08596448, sub_810EC94 + + .align 2 +gUnknown_08596464:: @ 8596464 + .2byte 0x0010, 0x0100, 0x0000, 0x0000, 0x0028, 0x0000, 0x0600, 0x0000 + .2byte 0x0000, 0xffe0, 0x0500, 0x0000, 0xfff0, 0x0020, 0x0a00, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859648C:: @ 859648C + .4byte gUnknown_08596464 + + .align 2 +gUnknown_08596490:: @ 8596490 + spr_template 0x27ac, 0x27ac, gUnknown_085249DC, gDummySpriteAnimTable, NULL, gUnknown_0859648C, sub_810ED28 + + .align 2 +gUnknown_085964A8:: @ 85964A8 + .2byte 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x0c00, 0x0000 + .2byte 0x0000, 0xffe0, 0x0b00, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085964C8:: @ 85964C8 + .4byte gUnknown_085964A8 + + .align 2 +gUnknown_085964CC:: @ 85964CC + spr_template 0x2820, 0x2820, gUnknown_085249DC, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810EE14 + + .align 2 +gUnknown_085964E4:: @ 85964E4 + spr_template 0x2821, 0x2821, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810EEF8 + + .align 2 +gUnknown_085964FC:: @ 85964FC + spr_template 0x27e4, 0x27e4, gUnknown_08524A3C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810F004 + + .align 2 +gUnknown_08596514:: @ 8596514 + spr_template 0x282c, 0x282c, gUnknown_085249DC, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810F084 + + .align 2 +gUnknown_0859652C:: @ 859652C + .2byte 0x0100, 0x0100, 0x0000, 0x0000, 0xfffe, 0xfffe, 0x78f6, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596544:: @ 8596544 + .4byte gUnknown_0859652C + + .align 2 +gUnknown_08596548:: @ 8596548 + spr_template 0x27d4, 0x27d4, gUnknown_08524A9C, gDummySpriteAnimTable, NULL, gUnknown_08596544, sub_80A77C8 + + .align 2 +gUnknown_08596560:: @ 8596560 + spr_template 0x27b6, 0x27b6, gUnknown_08524A3C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810F1EC + + .align 2 +gUnknown_08596578:: @ 8596578 + spr_template 0x27b7, 0x27b7, gUnknown_08524A3C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810F1EC + + .align 2 +gUnknown_08596590:: @ 8596590 + spr_template 0x27b8, 0x27b8, gUnknown_08524A3C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810F1EC + + .align 2 +gUnknown_085965A8:: @ 85965A8 + spr_template 0x27b9, 0x27b9, gUnknown_08524A3C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810F1EC + + .align 2 +gUnknown_085965C0:: @ 85965C0 + spr_template 0x27ba, 0x27ba, gUnknown_08524A3C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810F1EC + + .align 2 +gUnknown_085965D8:: @ 85965D8 + .2byte 0x0000, 0x0003, 0x0010, 0x0003, 0x0020, 0x0003, 0x0030, 0x0003 + .2byte 0x0040, 0x0003, 0xffff, 0x0000 + + .align 2 +gUnknown_085965F0:: @ 85965F0 + .4byte gUnknown_085965D8 + + .align 2 +gUnknown_085965F4:: @ 85965F4 + spr_template 0x2757, 0x2757, gUnknown_08524914, gUnknown_085965F0, NULL, gDummySpriteAffineAnimTable, sub_810F58C + + .align 2 +gUnknown_0859660C:: @ 859660C + .2byte 0x0000, 0x0005, 0x0004, 0x0005, 0x0008, 0x0005, 0x000c, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_08596620:: @ 8596620 + .4byte gUnknown_0859660C + + .align 2 +gUnknown_08596624:: @ 8596624 + spr_template 0x2756, 0x2756, gUnknown_0852490C, gUnknown_08596620, NULL, gDummySpriteAffineAnimTable, sub_810F58C + + .align 2 +gUnknown_0859663C:: @ 859663C + spr_template 0x27b3, 0x27b3, gUnknown_08524954, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80A7820 + + .align 2 +gUnknown_08596654:: @ 8596654 + .2byte 0x0008, 0x007c, 0x0010, 0x0045, 0x0008, 0x0045, 0x0000, 0x0045 + .2byte 0x0008, 0x0056, 0xfffd, 0x0000, 0x0010, 0x0045, 0x0008, 0x0045 + .2byte 0x0000, 0x0045, 0x0008, 0x0045, 0xfffd, 0x0001, 0x0008, 0x0056 + .2byte 0x0018, 0x0043, 0x0020, 0x0043, 0x0028, 0x0056, 0xffff, 0x0000 + + .align 2 +gUnknown_08596694:: @ 8596694 + .2byte 0x0008, 0x003c, 0x0010, 0x0005, 0x0008, 0x0005, 0x0000, 0x0005 + .2byte 0x0008, 0x0016, 0xfffd, 0x0000, 0x0010, 0x0005, 0x0008, 0x0005 + .2byte 0x0000, 0x0005, 0x0008, 0x0005, 0xfffd, 0x0001, 0x0008, 0x0016 + .2byte 0x0018, 0x0003, 0x0020, 0x0003, 0x0028, 0x0016, 0xffff, 0x0000 + + .align 2 +gUnknown_085966D4:: @ 85966D4 + .4byte gUnknown_08596654 + .4byte gUnknown_08596694 + + .align 2 +gUnknown_085966DC:: @ 85966DC + spr_template 0x2771, 0x2771, gUnknown_08524954, gUnknown_085966D4, NULL, gDummySpriteAffineAnimTable, sub_810F634 + + .align 2 +gUnknown_085966F4:: @ 85966F4 + .2byte 0x0000, 0x0006, 0x0010, 0x0006, 0x0020, 0x0006, 0x0030, 0x0006 + .2byte 0x0040, 0x0006, 0x0050, 0x0006, 0x0060, 0x0012, 0xffff, 0x0000 + + .align 2 +gUnknown_08596714:: @ 8596714 + .4byte gUnknown_085966F4 + + .align 2 +gUnknown_08596718:: @ 8596718 + .2byte 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x08fc, 0x0000 + .2byte 0x0000, 0x0000, 0x0404, 0x0000, 0x7ffd, 0x0002, 0x0000, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 gUnknown_08596740:: @ 8596740 - .incbin "baserom.gba", 0x596740, 0x1c + .4byte gUnknown_08596718 + .align 2 +gUnknown_08596744:: @ 8596744 + spr_template 0x276d, 0x276d, gUnknown_08524914, gUnknown_08596714, NULL, gDummySpriteAffineAnimTable, sub_810F6B0 + + .align 2 gUnknown_0859675C:: @ 859675C - .incbin "baserom.gba", 0x59675c, 0x20 + .2byte 0xfff8, 0x000a, 0x1000, 0x0000, 0x0012, 0xffee, 0x1000, 0x0000 + .2byte 0xffec, 0x0010, 0x0800, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + .align 2 gUnknown_0859677C:: @ 859677C - .incbin "baserom.gba", 0x59677c, 0x18 + .2byte 0x0040, 0xfffc, 0x1400, 0x0000, 0x0000, 0x0000, 0xc800, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + .align 2 gUnknown_08596794:: @ 8596794 - .incbin "baserom.gba", 0x596794, 0xd0 + spr_template 0x2809, 0x2809, gUnknown_08524A2C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy + .align 2 +gUnknown_085967AC:: @ 85967AC + spr_template 0x280a, 0x280a, gUnknown_0852491C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_810FBA8 + + .align 2 +gUnknown_085967C4:: @ 85967C4 + .2byte 0xfff8, 0xfff8, 0x0800, 0x0000, 0x0008, 0x0008, 0x0800, 0x0000 + .2byte 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085967DC:: @ 85967DC + .2byte 0x00f0, 0x00f0, 0x0000, 0x0000, 0xfff8, 0xfff8, 0x0600, 0x0000 + .2byte 0x0008, 0x0008, 0x0800, 0x0000, 0xfff8, 0xfff8, 0x0200, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08596804:: @ 8596804 + .2byte 0x00d0, 0x00d0, 0x0000, 0x0000, 0xfff8, 0xfff8, 0x0400, 0x0000 + .2byte 0x0008, 0x0008, 0x0800, 0x0000, 0xfff8, 0xfff8, 0x0400, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_0859682C:: @ 859682C + .2byte 0x00b0, 0x00b0, 0x0000, 0x0000, 0xfff8, 0xfff8, 0x0200, 0x0000 + .2byte 0x0008, 0x0008, 0x0800, 0x0000, 0xfff8, 0xfff8, 0x0600, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08596854:: @ 8596854 + .4byte gUnknown_085967C4 + .4byte gUnknown_085967DC + .4byte gUnknown_08596804 + .4byte gUnknown_0859682C + + .align 2 gUnknown_08596864:: @ 8596864 - .incbin "baserom.gba", 0x596864, 0x35c + spr_template 0x280b, 0x280b, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gUnknown_08596854, sub_810FDF0 + .align 2 +gUnknown_0859687C:: @ 859687C + .2byte 0x0020, 0x0020, 0x0000, 0x0000, 0x0004, 0x0004, 0x7800, 0x0000 + .2byte 0x7fff, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08596894:: @ 8596894 + .4byte gUnknown_0859687C + + .align 2 +gUnknown_08596898:: @ 8596898 + spr_template 0x281b, 0x281b, gUnknown_08524AFC, gDummySpriteAnimTable, NULL, gUnknown_08596894, sub_80A77C8 + + .align 2 +gUnknown_085968B0:: @ 85968B0 + .2byte 0x0020, 0x0020, 0x0000, 0x0000, 0x0010, 0x0010, 0x1100, 0x0000 + .2byte 0x7ffd, 0x0000, 0x0000, 0x0000, 0xfff8, 0xfff8, 0x0a00, 0x0000 + .2byte 0x0008, 0x0008, 0x0a00, 0x0000, 0x7ffd, 0x0004, 0x0000, 0x0000 + .2byte 0x7ffd, 0x0000, 0x0000, 0x0000, 0xfff0, 0xfff0, 0x0500, 0x0000 + .2byte 0x0010, 0x0010, 0x0500, 0x0000, 0x7ffd, 0x0007, 0x0000, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596908:: @ 8596908 + .2byte 0xffec, 0x0018, 0x0f00, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596918:: @ 8596918 + .4byte gUnknown_085968B0 + .4byte gUnknown_08596908 + + .align 2 +gUnknown_08596920:: @ 8596920 + spr_template 0x27e4, 0x27e4, gUnknown_08524AFC, gDummySpriteAnimTable, NULL, gUnknown_08596918, sub_8110240 + + .align 2 +gUnknown_08596938:: @ 8596938 + .2byte 0x0100, 0x0100, 0x001e, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596948:: @ 8596948 + .2byte 0x0100, 0x0100, 0x009d, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596958:: @ 8596958 + .2byte 0x0100, 0x0100, 0x005e, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596968:: @ 8596968 + .4byte gUnknown_08596938 + .4byte gUnknown_08596948 + .4byte gUnknown_08596958 + + .align 2 +gUnknown_08596974:: @ 8596974 + spr_template 0x27a9, 0x27a9, gUnknown_085249F4, gDummySpriteAnimTable, NULL, gUnknown_08596968, sub_8110368 + + .align 2 +gUnknown_0859698C:: @ 859698C + .2byte 0x0000, 0x0000, 0x01df, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_0859699C:: @ 859699C + .2byte 0x0000, 0x0000, 0x0160, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085969AC:: @ 85969AC + .2byte 0x0000, 0x0000, 0x01a0, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085969BC:: @ 85969BC + .4byte gUnknown_0859698C + .4byte gUnknown_0859699C + .4byte gUnknown_085969AC + + .align 2 +gUnknown_085969C8:: @ 85969C8 + spr_template 0x27b1, 0x27b1, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gUnknown_085969BC, sub_8110438 + + .align 2 +gUnknown_085969E0:: @ 85969E0 + spr_template 0x27c4, 0x27c4, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81104E4 + + .align 2 +gUnknown_085969F8:: @ 85969F8 + spr_template 0x27c3, 0x27c3, gUnknown_0852493C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81105B4 + + .align 2 +gUnknown_08596A10:: @ 8596A10 + .2byte 0x0010, 0x0010, 0x0000, 0x0000, 0x0006, 0x0006, 0x0100, 0x0000 + .2byte 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08596A28:: @ 8596A28 + .4byte gUnknown_08596A10 + + .align 2 +gUnknown_08596A2C:: @ 8596A2C + spr_template 0x27c5, 0x27c5, gUnknown_08524AFC, gDummySpriteAnimTable, NULL, gUnknown_08596A28, sub_811067C + + .align 2 +gUnknown_08596A44:: @ 8596A44 + spr_template 0x27b1, 0x27b1, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8110720 + + .align 2 +gUnknown_08596A5C:: @ 8596A5C + spr_template 0x27b1, 0x27b1, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8110850 + + .align 2 +gUnknown_08596A74:: @ 8596A74 + spr_template 0x2816, 0x2816, gUnknown_08524974, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8110850 + + .align 2 +gUnknown_08596A8C:: @ 8596A8C + .2byte 0x0010, 0x0010, 0x0000, 0x0000, 0x0008, 0x0008, 0x1200, 0x0000 + .2byte 0x7ffd, 0x0000, 0x0000, 0x0000, 0xfffb, 0xfffb, 0x0800, 0x0000 + .2byte 0x0005, 0x0005, 0x0800, 0x0000, 0x7ffd, 0x0005, 0x0000, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596AC4:: @ 8596AC4 + .4byte gUnknown_08596A8C + + .align 2 +gUnknown_08596AC8:: @ 8596AC8 + spr_template 0x27e4, 0x27e4, gUnknown_08524A9C, gDummySpriteAnimTable, NULL, gUnknown_08596AC4, sub_8110994 + + .align 2 +gUnknown_08596AE0:: @ 8596AE0 + .2byte 0x0020, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08596AE8:: @ 8596AE8 + .2byte 0x0030, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08596AF0:: @ 8596AF0 + .2byte 0x0040, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08596AF8:: @ 8596AF8 + .4byte gUnknown_08596AE0 + .4byte gUnknown_08596AE8 + .4byte gUnknown_08596AF0 + + .align 2 +gUnknown_08596B04:: @ 8596B04 + spr_template 0x274a, 0x274a, gUnknown_08524914, gUnknown_08596AF8, NULL, gDummySpriteAffineAnimTable, sub_81109F0 + + .align 2 +gUnknown_08596B1C:: @ 8596B1C + spr_template 0x274a, 0x274a, gUnknown_08524914, gUnknown_08596AF8, NULL, gDummySpriteAffineAnimTable, sub_8110AB4 + + .align 2 +gUnknown_08596B34:: @ 8596B34 + spr_template 0x275a, 0x275a, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8110B38 + + .align 2 +gUnknown_08596B4C:: @ 8596B4C + .2byte 0x00c0, 0x00c0, 0x0000, 0x0000, 0x0002, 0xfffd, 0x0500, 0x0000 + .2byte 0xfffe, 0x0003, 0x0500, 0x0000, 0x7ffe, 0x0001, 0x0000, 0x0000 + + .align 2 +gUnknown_08596B6C:: @ 8596B6C + .4byte gUnknown_08596B4C + + .align 2 +gUnknown_08596B70:: @ 8596B70 + spr_template 0x27a5, 0x27a5, gUnknown_08524A8C, gUnknown_085950E0, NULL, gUnknown_08596B6C, sub_8110B38 + + .align 2 +gUnknown_08596B88:: @ 8596B88 + spr_template 0x272d, 0x272d, gUnknown_08524914, gUnknown_085954D0, NULL, gDummySpriteAffineAnimTable, sub_8110B38 + + .align 2 +gUnknown_08596BA0:: @ 8596BA0 + spr_template 0x2815, 0x2815, gUnknown_08524934, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8110E4C + + .align 2 +gUnknown_08596BB8:: @ 8596BB8 + .2byte 0x00f0, 0x4009, 0x0010, 0x4089 + + .align 2 gUnknown_08596BC0:: @ 8596BC0 - .incbin "baserom.gba", 0x596bc0, 0x50 + .2byte 0x0002, 0x0000 + .align 2 +gUnknown_08596BC4:: @ 8596BC4 + .4byte gUnknown_08596BB8 + + .align 2 +gUnknown_08596BC8:: @ 8596BC8 + .2byte 0x0000, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08596BD0:: @ 8596BD0 + .2byte 0x0010, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08596BD8:: @ 8596BD8 + .2byte 0x0020, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08596BE0:: @ 8596BE0 + .2byte 0x0030, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08596BE8:: @ 8596BE8 + .2byte 0x0040, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08596BF0:: @ 8596BF0 + .2byte 0x0050, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_08596BF8:: @ 8596BF8 + .4byte gUnknown_08596BC8 + .4byte gUnknown_08596BD0 + + .align 2 +gUnknown_08596C00:: @ 8596C00 + .4byte gUnknown_08596BD8 + .4byte gUnknown_08596BE0 + + .align 2 +gUnknown_08596C08:: @ 8596C08 + .4byte gUnknown_08596BE8 + .4byte gUnknown_08596BF0 + + .align 2 gUnknown_08596C10:: @ 8596C10 - .incbin "baserom.gba", 0x596c10, 0x18 + spr_template 0x274a, 0x274a, gUnknown_08524914, gUnknown_08596BF8, NULL, gDummySpriteAffineAnimTable, sub_8110F30 + .align 2 gUnknown_08596C28:: @ 8596C28 - .incbin "baserom.gba", 0x596c28, 0x18 + spr_template 0x275a, 0x275a, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_811131C + .align 2 gUnknown_08596C40:: @ 8596C40 - .incbin "baserom.gba", 0x596c40, 0x178 + spr_template 0x274a, 0x274a, gUnknown_08524914, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_811131C + .align 2 +gUnknown_08596C58:: @ 8596C58 + spr_template 0x274a, 0x274a, gUnknown_08524914, gUnknown_08596BF8, NULL, gDummySpriteAffineAnimTable, sub_8111388 + + .align 2 +gUnknown_08596C70:: @ 8596C70 + .2byte 0x0000, 0x0000, 0x05fb, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596C80:: @ 8596C80 + .2byte 0x0000, 0x0000, 0x0505, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596C90:: @ 8596C90 + .4byte gUnknown_08596C70 + .4byte gUnknown_08596C80 + + .align 2 +gUnknown_08596C98:: @ 8596C98 + spr_template 0x274a, 0x274a, gUnknown_08524974, gUnknown_08596BF8, NULL, gUnknown_08596C90, sub_8111418 + + .align 2 +gUnknown_08596CB0:: @ 8596CB0 + spr_template 0x274a, 0x274a, gUnknown_08524974, gUnknown_08596BF8, NULL, gUnknown_08596C90, sub_8111444 + + .align 2 +gUnknown_08596CC8:: @ 8596CC8 + spr_template 0x274a, 0x274a, gUnknown_08524914, gUnknown_08596C08, NULL, gUnknown_08596C90, sub_80FF268 + + .align 2 +gUnknown_08596CE0:: @ 8596CE0 + spr_template 0x274a, 0x274a, gUnknown_08524974, gUnknown_08596C00, NULL, gUnknown_08596C90, sub_80A8EE4 + + .align 2 +gUnknown_08596CF8:: @ 8596CF8 + .2byte 0x001e, 0x001e, 0x050a, 0x0000, 0xffe2, 0xffe2, 0x050a, 0x0000 + .2byte 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596D10:: @ 8596D10 + .4byte gUnknown_08596CF8 + + .align 2 +gUnknown_08596D14:: @ 8596D14 + spr_template 0x271d, 0x271d, gUnknown_085249CC, gDummySpriteAnimTable, NULL, gUnknown_08596D10, sub_811160C + + .align 2 +gUnknown_08596D2C:: @ 8596D2C + spr_template 0x271d, 0x271d, gUnknown_08524A2C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81117F4 + + .align 2 +gUnknown_08596D44:: @ 8596D44 + .2byte 0x0000, 0x0000, 0x010a, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596D54:: @ 8596D54 + .4byte gUnknown_08596D44 + + .align 2 +gUnknown_08596D58:: @ 8596D58 + spr_template 0x27c0, 0x27c0, gUnknown_08524974, gDummySpriteAnimTable, NULL, gUnknown_08596D54, sub_81119E0 + + .align 2 +gUnknown_08596D70:: @ 8596D70 + .2byte 0x0000, 0x0002, 0x0008, 0x0002, 0x0010, 0x0002, 0x0018, 0x0002 + .2byte 0x0020, 0x0002, 0xffff, 0x0000 + + .align 2 +gUnknown_08596D88:: @ 8596D88 + .4byte gUnknown_08596D70 + + .align 2 +gUnknown_08596D8C:: @ 8596D8C + spr_template 0x27c1, 0x27c1, gUnknown_08524954, gUnknown_08596D88, NULL, gDummySpriteAffineAnimTable, sub_8111B9C + + .align 2 +gUnknown_08596DA4:: @ 8596DA4 + .2byte 0x0200, 0x0200, 0x0000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596DB4:: @ 8596DB4 + .4byte gUnknown_08596DA4 + + .align 2 gUnknown_08596DB8:: @ 8596DB8 - .incbin "baserom.gba", 0x596db8, 0x78 + spr_template 0x27cc, 0x27cc, gUnknown_08524A5C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8112264 + .align 2 +gUnknown_08596DD0:: @ 8596DD0 + spr_template 0x27d7, 0x27d7, gUnknown_08524A54, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81129F0 + + .align 2 +gUnknown_08596DE8:: @ 8596DE8 + spr_template 0x27d8, 0x27d8, gUnknown_08524A34, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8112B78 + + .align 2 +gUnknown_08596E00:: @ 8596E00 + spr_template 0x27ed, 0x27ed, gUnknown_08524A34, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8112B78 + + .align 2 +gUnknown_08596E18:: @ 8596E18 + .2byte 0x0000, 0x0004, 0x0008, 0x0004, 0x0010, 0x0004, 0x0018, 0x0004, 0xfffe, 0x0000 + + .align 2 +gUnknown_08596E2C:: @ 8596E2C + .4byte gUnknown_08596E18 + + .align 2 gUnknown_08596E30:: @ 8596E30 - .incbin "baserom.gba", 0x596e30, 0x528 + spr_template 0x280d, 0x280d, gUnknown_08524A74, gUnknown_08596E2C, NULL, gDummySpriteAffineAnimTable, sub_8112E9C + .align 2 +gUnknown_08596E48:: @ 8596E48 + spr_template 0x0000, 0x0000, gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8112F60 + + .align 2 +gUnknown_08596E60:: @ 8596E60 + .2byte 0x0000, 0x0004, 0x0010, 0x0004, 0x0020, 0x0004, 0x0030, 0x0004 + .2byte 0x0040, 0x0004, 0xfffe, 0x0000 + + .align 2 +gUnknown_08596E78:: @ 8596E78 + .4byte gUnknown_08596E60 + + .align 2 +gUnknown_08596E7C:: @ 8596E7C + spr_template 0x272d, 0x272d, gUnknown_08524914, gUnknown_08596E78, NULL, gDummySpriteAffineAnimTable, sub_8113064 + + .align 2 +gUnknown_08596E94:: @ 8596E94 + .2byte 0x0010, 0x0003, 0x0020, 0x0003, 0x0030, 0x0003, 0xfffe, 0x0000 + + .align 2 +gUnknown_08596EA4:: @ 8596EA4 + .2byte 0x0010, 0x00c3, 0x0020, 0x00c3, 0x0030, 0x00c3, 0xfffe, 0x0000 + + .align 2 +gUnknown_08596EB4:: @ 8596EB4 + .4byte gUnknown_08596E94 + .4byte gUnknown_08596EA4 + + .align 2 +gUnknown_08596EBC:: @ 8596EBC + .2byte 0x0050, 0x0050, 0x007f, 0x0000, 0x000d, 0x000d, 0x6400, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596ED4:: @ 8596ED4 + .2byte 0x0050, 0x0050, 0x0000, 0x0000, 0x000d, 0x000d, 0x6400, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596EEC:: @ 8596EEC + .4byte gUnknown_08596EBC + .4byte gUnknown_08596ED4 + + .align 2 +gUnknown_08596EF4:: @ 8596EF4 + spr_template 0x272d, 0x272d, gUnknown_085249D4, gUnknown_08596EB4, NULL, gUnknown_08596EEC, sub_8113224 + + .align 2 +gUnknown_08596F0C:: @ 8596F0C + .2byte 0x0000, 0x0005, 0x0010, 0x0005, 0x0020, 0x0005, 0x0030, 0x0005 + .2byte 0x0040, 0x0005, 0xffff, 0x0000 + + .align 2 +gUnknown_08596F24:: @ 8596F24 + .4byte gUnknown_08596F0C + + .align 2 +gUnknown_08596F28:: @ 8596F28 + spr_template 0x2733, 0x2733, gUnknown_08524914, gUnknown_08596F24, NULL, gDummySpriteAffineAnimTable, sub_81131B4 + + .align 2 +gUnknown_08596F40:: @ 8596F40 + .2byte 0x0010, 0x0003, 0x0020, 0x0003, 0x0030, 0x0003, 0xfffe, 0x0000 + + .align 2 +gUnknown_08596F50:: @ 8596F50 + .4byte gUnknown_08596F40 + .4byte gUnknown_08596F40 + + .align 2 +gUnknown_08596F58:: @ 8596F58 + .2byte 0x0064, 0x0064, 0x017f, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596F68:: @ 8596F68 + .2byte 0x0064, 0x0064, 0x0100, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596F78:: @ 8596F78 + .4byte gUnknown_08596F58 + .4byte gUnknown_08596F68 + + .align 2 +gUnknown_08596F80:: @ 8596F80 + spr_template 0x272d, 0x272d, gUnknown_085249D4, gUnknown_08596F50, NULL, gUnknown_08596F78, sub_8113224 + + .align 2 +gUnknown_08596F98:: @ 8596F98 + spr_template 0x2809, 0x2809, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8113250 + + .align 2 +gUnknown_08596FB0:: @ 8596FB0 + spr_template 0x272d, 0x272d, gUnknown_08524914, gUnknown_08596E78, NULL, gDummySpriteAffineAnimTable, sub_81135EC + + .align 2 +gUnknown_08596FC8:: @ 8596FC8 + spr_template 0x271f, 0x271f, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81138D4 + + .align 2 +gUnknown_08596FE0:: @ 8596FE0 + .2byte 0x0000, 0x0000, 0x0100, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08596FF0:: @ 8596FF0 + .2byte 0x0000, 0x0000, 0x0120, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08597000:: @ 8597000 + .2byte 0x0000, 0x0000, 0x0140, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08597010:: @ 8597010 + .2byte 0x0000, 0x0000, 0x0160, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08597020:: @ 8597020 + .2byte 0x0000, 0x0000, 0x0180, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08597030:: @ 8597030 + .2byte 0x0000, 0x0000, 0x01a0, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08597040:: @ 8597040 + .2byte 0x0000, 0x0000, 0x01c0, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08597050:: @ 8597050 + .2byte 0x0000, 0x0000, 0x01e0, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08597060:: @ 8597060 + .4byte gUnknown_08596FE0 + .4byte gUnknown_08596FF0 + .4byte gUnknown_08597000 + .4byte gUnknown_08597010 + .4byte gUnknown_08597020 + .4byte gUnknown_08597030 + .4byte gUnknown_08597040 + .4byte gUnknown_08597050 + + .align 2 +gUnknown_08597080:: @ 8597080 + spr_template 0x279b, 0x279b, gUnknown_08524A9C, gDummySpriteAnimTable, NULL, gUnknown_08597060, sub_81139DC + + .align 2 +gUnknown_08597098:: @ 8597098 + spr_template 0x27a1, 0x27a1, gUnknown_08524A9C, gDummySpriteAnimTable, NULL, gUnknown_08597060, sub_81139DC + + .align 2 +gUnknown_085970B0:: @ 85970B0 + .2byte 0x00c0, 0x00c0, 0x0050, 0x0000, 0x0000, 0x0000, 0x08fe, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085970C8:: @ 85970C8 + .2byte 0x00c0, 0x00c0, 0x00b0, 0x0000, 0x0000, 0x0000, 0x0802, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_085970E0:: @ 85970E0 + .4byte gUnknown_085970B0 + .4byte gUnknown_085970C8 + + .align 2 +gUnknown_085970E8:: @ 85970E8 + spr_template 0x27ab, 0x27ab, gUnknown_0852496C, gDummySpriteAnimTable, NULL, gUnknown_085970E0, sub_8113A90 + + .align 2 +gUnknown_08597100:: @ 8597100 + .2byte 0x0000, 0x0004, 0x0010, 0x0004, 0x0020, 0x0004, 0x0030, 0x0004 + .2byte 0x0040, 0x0004, 0xffff, 0x0000 + + .align 2 +gUnknown_08597118:: @ 8597118 + .2byte 0x0000, 0x0044, 0x0010, 0x0044, 0x0020, 0x0044, 0x0030, 0x0044 + .2byte 0x0040, 0x0044, 0xffff, 0x0000 + + .align 2 +gUnknown_08597130:: @ 8597130 + .4byte gUnknown_08597100 + .4byte gUnknown_08597118 + + .align 2 +gUnknown_08597138:: @ 8597138 + spr_template 0x2737, 0x2737, gUnknown_08524914, gUnknown_08597130, NULL, gDummySpriteAffineAnimTable, sub_81144BC + + .align 2 +gUnknown_08597150:: @ 8597150 + .2byte 0x0000, 0x0000, 0x010f, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08597160:: @ 8597160 + .2byte 0x0000, 0x0000, 0x0114, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08597170:: @ 8597170 + .4byte gUnknown_08597150 + + .align 2 +gUnknown_08597174:: @ 8597174 + .4byte gUnknown_08597160 + + .align 2 +gUnknown_08597178:: @ 8597178 + spr_template 0x2710, 0x2710, gUnknown_08524974, gDummySpriteAnimTable, NULL, gUnknown_08597170, sub_8114994 + + .align 2 +gUnknown_08597190:: @ 8597190 + spr_template 0x2710, 0x2710, gUnknown_08524974, gDummySpriteAnimTable, NULL, gUnknown_08597174, sub_8114A7C + + .align 2 +gUnknown_085971A8:: @ 85971A8 + spr_template 0x275a, 0x275a, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8114AF0 + + .align 2 +gUnknown_085971C0:: @ 85971C0 + .2byte 0x0001, 0x0001, 0xffff, 0x0000 + + .align 2 +gUnknown_085971C8:: @ 85971C8 + .4byte gUnknown_085971C0 + + .align 2 +gUnknown_085971CC:: @ 85971CC + spr_template 0x275a, 0x275a, gUnknown_0852490C, gUnknown_085971C8, NULL, gDummySpriteAffineAnimTable, sub_8114AF0 + + .align 2 +gUnknown_085971E4:: @ 85971E4 + spr_template 0x275a, 0x275a, gUnknown_0852490C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8114B80 + + .align 2 +gUnknown_085971FC:: @ 85971FC + spr_template 0x275a, 0x275a, gUnknown_08524904, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81151A0 + + .align 2 +gUnknown_08597214:: @ 8597214 + spr_template 0x2829, 0x2829, gUnknown_08524934, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8115244 + + .align 2 +gUnknown_0859722C:: @ 859722C + .2byte 0x0000, 0x0008, 0x0004, 0x0008, 0x0000, 0x0048, 0x0008, 0x0008, 0xfffe, 0x0000 + + .align 2 +gUnknown_08597240:: @ 8597240 + .2byte 0x0000, 0x0048, 0x0004, 0x0008, 0x0000, 0x0008, 0x0008, 0x0008, 0xfffe, 0x0000 + + .align 2 +gUnknown_08597254:: @ 8597254 + .4byte gUnknown_0859722C + .4byte gUnknown_08597240 + + .align 2 +gUnknown_0859725C:: @ 859725C + spr_template 0x2759, 0x2759, gUnknown_0852490C, gUnknown_08597254, NULL, gDummySpriteAffineAnimTable, sub_811572C + + .align 2 +gUnknown_08597274:: @ 8597274 + spr_template 0x0000, 0x0000, gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81157FC + + .align 2 +gUnknown_0859728C:: @ 859728C + spr_template 0x0000, 0x0000, gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81158A4 + + .align 2 +gUnknown_085972A4:: @ 85972A4 + .2byte 0x0000, 0x0003, 0x0010, 0x0003, 0x0020, 0x0003, 0x0030, 0x0003 + .2byte 0x0040, 0x0003, 0xfffe, 0x0000 + + .align 2 +gUnknown_085972BC:: @ 85972BC + .4byte gUnknown_085972A4 + + .align 2 +gUnknown_085972C0:: @ 85972C0 + spr_template 0x2757, 0x2757, gUnknown_08524914, gUnknown_085972BC, NULL, gDummySpriteAffineAnimTable, sub_81159B4 + + .align 2 +gUnknown_085972D8:: @ 85972D8 + spr_template 0x0000, 0x0000, gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_81160A4 + + .align 2 +gUnknown_085972F0:: @ 85972F0 + .2byte 0x0000, 0x0000, 0x0800, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08597300:: @ 8597300 + .2byte 0x00d8, 0x00d8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08597318:: @ 8597318 + .2byte 0x00b0, 0x00b0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08597330:: @ 8597330 + .2byte 0x0080, 0x0080, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x0000 + .2byte 0x7fff, 0x0000, 0x0000, 0x0000 + + .align 2 +gUnknown_08597348:: @ 8597348 + .4byte gUnknown_085972F0 + .4byte gUnknown_08597300 + .4byte gUnknown_08597318 + .4byte gUnknown_08597330 + + .align 2 gUnknown_08597358:: @ 8597358 - .incbin "baserom.gba", 0x597358, 0x30 + spr_template 0x2797, 0x2797, gUnknown_08524A94, gDummySpriteAnimTable, NULL, gUnknown_08597348, sub_8116388 + .align 2 +gUnknown_08597370:: @ 8597370 + spr_template 0x2797, 0x2797, gUnknown_08524A94, gDummySpriteAnimTable, NULL, gUnknown_08597348, sub_8116420 + + .align 2 gUnknown_08597388:: @ 8597388 - .incbin "baserom.gba", 0x597388, 0x60 + spr_template 0x27a4, 0x27a4, gUnknown_08524A94, gDummySpriteAnimTable, NULL, gUnknown_08597348, sub_8116388 + .align 2 +gUnknown_085973A0:: @ 85973A0 + spr_template 0x2797, 0x2797, gUnknown_08524A94, gDummySpriteAnimTable, NULL, gUnknown_08597348, sub_8116458 + + .align 2 +gUnknown_085973B8:: @ 85973B8 + spr_template 0x2797, 0x2797, gUnknown_08524A94, gDummySpriteAnimTable, NULL, gUnknown_08597348, sub_81164F0 + + .align 2 +gUnknown_085973D0:: @ 85973D0 + spr_template 0x282d, 0x282d, gUnknown_08524A34, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8116560 + + .align 2 gUnknown_085973E8:: @ 85973E8 - .incbin "baserom.gba", 0x5973e8, 0x30 + spr_template 0x2797, 0x2797, gUnknown_08524974, gDummySpriteAnimTable, NULL, gUnknown_08597348, sub_81165A8 + + .align 2 +gUnknown_08597400:: @ 8597400 + spr_template 0x2797, 0x2797, gUnknown_08524A94, gDummySpriteAnimTable, NULL, gUnknown_08597348, sub_81163D0 gUnknown_08597418:: @ 8597418 - .incbin "baserom.gba", 0x597418, 0x2 + .2byte 0x7fff gUnknown_0859741A:: @ 859741A - .incbin "baserom.gba", 0x59741a, 0x4 + .byte 0x08, 0x0a, 0x0c, 0x0e gUnknown_0859741E:: @ 859741E - .incbin "baserom.gba", 0x59741e, 0x6 + .byte 0x08, 0x0a, 0x0c, 0x0e + .align 2 gUnknown_08597424:: @ 8597424 - .incbin "baserom.gba", 0x597424, 0x28 + .4byte task_battle_intro_80BC47C + .4byte task_battle_intro_80BC47C + .4byte task00_battle_intro_80BC6C8 + .4byte task00_battle_intro_80BC6C8 + .4byte task00_battle_intro_80BC6C8 + .4byte task_battle_intro_80BC47C + .4byte task_battle_intro_80BC47C + .4byte task_battle_intro_80BC47C + .4byte task_battle_intro_anim + .4byte task_battle_intro_anim diff --git a/data/item_use.s b/data/item_use.s index 20ca8d683..ca0dbbb54 100644 --- a/data/item_use.s +++ b/data/item_use.s @@ -12,4 +12,4 @@ gUnknown_085920E4:: @ 85920E4 .incbin "baserom.gba", 0x5920e4, 0x4 gUnknown_085920E8:: @ 85920E8 - .incbin "baserom.gba", 0x5920e8, 0x128 + .incbin "baserom.gba", 0x5920e8, 0x8 diff --git a/graphics/unknown/unknown_593C80.png b/graphics/unknown/unknown_593C80.png new file mode 100644 index 0000000000000000000000000000000000000000..c4a27b929b45af7e48dd1c97fcca4701ed6f5b0d GIT binary patch literal 286 zcmV+(0pb3MP)-!>2?AX$?zvx2b3Wuksgcg5(uM_(TY-a`YntIJ=^08G*C z6kXMlXVhRfvkYxp8d0Tymlj(CUuS#+e4NX#L6kXM&)CZmmX;h)hHTE-e}; zlPBR3&5x);A}xW)EOIwS0?-nR$*46J2krNOV07*qoM6N<$g2#?=+W-In literal 0 HcmV?d00001 diff --git a/graphics/unknown/unknown_593FFC.bin b/graphics/unknown/unknown_593FFC.bin new file mode 100644 index 0000000000000000000000000000000000000000..dc2990b0a5f4dccacdb5a94bcc0edb77a8c8db13 GIT binary patch literal 4096 zcmeH|O>P1)425Z-1;nN;Q*r;B_-M?VC(Cy1bOzBKA)3Uo{rN8oZgLxIOkhl4Okhl4 zOyFfEu#-1=m;J;2D)%Md@*~&He9L{xLGZ2p`?egYY5uTq_V~y#7YMT4p>6rdU6(51 zO@ev-u6)aBf8Mu}TkbGtoR+MWch>P8z%ZkEK=UzwSbC}zcg}>_*xh;7Lc(dw-&Fo> z?9^koNERVWo~Lz^tc#rHhStlxd0J)G5~Ey}%1^F-+Q}&C8O#Zbwqqi_RsGs|)2Fv@ z@m}|#hwmUW>^tjoWtgzW(vx2CmPu-Ijy!W^tB8GXrFv)e>edUWTwB)YtM{@*ebqtq zu&h;NsbGhw~qXr Kb~k=cP2dhS()e`% literal 0 HcmV?d00001 From 3ced50a9e89c4e4e8bcabcbcda1543186e3647e5 Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Fri, 29 Sep 2017 17:41:45 -0500 Subject: [PATCH 316/342] Extract baseroms from item_use --- data/item_use.s | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/data/item_use.s b/data/item_use.s index ca0dbbb54..d9bcc44f6 100644 --- a/data/item_use.s +++ b/data/item_use.s @@ -5,11 +5,17 @@ .section .rodata .align 2, 0 + .align 2 gUnknown_085920D8:: @ 85920D8 - .incbin "baserom.gba", 0x5920d8, 0xc + .4byte sub_81B617C + .4byte c2_exit_to_overworld_2_switch + .4byte NULL + .align 2 gUnknown_085920E4:: @ 85920E4 - .incbin "baserom.gba", 0x5920e4, 0x4 + .byte 0x02, 0x04, 0x01, 0x03 + .align 2 gUnknown_085920E8:: @ 85920E8 - .incbin "baserom.gba", 0x5920e8, 0x8 + .4byte sub_80FE03C + .4byte bag_menu_inits_lists_menu From 5d246842b1e4f4383094c96af150196aa43777cf Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Fri, 29 Sep 2017 17:53:48 -0500 Subject: [PATCH 317/342] Extract baseroms from battle_setup.s --- data/battle_setup.s | 171 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 157 insertions(+), 14 deletions(-) diff --git a/data/battle_setup.s b/data/battle_setup.s index e4667dc9f..d5043aae9 100644 --- a/data/battle_setup.s +++ b/data/battle_setup.s @@ -5,43 +5,186 @@ .align 2, 0 gUnknown_0854FE88:: @ 854FE88 - .incbin "baserom.gba", 0x54fe88, 0x8 + .byte 0x08, 0x09, 0x05, 0x0a, 0x00, 0x0a, 0x07, 0x06 gUnknown_0854FE90:: @ 854FE90 - .incbin "baserom.gba", 0x54fe90, 0x8 + .byte 0x04, 0x0b, 0x02, 0x03, 0x00, 0x0a, 0x01, 0x06 gUnknown_0854FE98:: @ 854FE98 - .incbin "baserom.gba", 0x54fe98, 0xc + .byte 0x1d, 0x1e, 0x1f, 0x20, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29 gUnknown_0854FEA4:: @ 854FEA4 - .incbin "baserom.gba", 0x54fea4, 0x3 + .byte 0x1f, 0x20, 0x21 gUnknown_0854FEA7:: @ 854FEA7 - .incbin "baserom.gba", 0x54fea7, 0x5 + .byte 0x1d, 0x1f, 0x20, 0x21, 0x00 + .align 2 gUnknown_0854FEAC:: @ 854FEAC - .incbin "baserom.gba", 0x54feac, 0x48 + .4byte gUnknown_02038BC8, 0x00000000 + .4byte gTrainerBattleOpponent_A, 0x00000001 + .4byte gUnknown_02038BD0, 0x00000001 + .4byte gUnknown_02038BD4, 0x00000002 + .4byte gUnknown_02038BDC, 0x00000002 + .4byte gUnknown_02038BE4, 0x00000005 + .4byte gUnknown_02038BE8, 0x00000005 + .4byte gUnknown_02038BF0, 0x00000005 + .4byte gUnknown_02038BEC, 0x00000006 + .align 2 gUnknown_0854FEF4:: @ 854FEF4 - .incbin "baserom.gba", 0x54fef4, 0x48 + .4byte gUnknown_02038BC8, 0x00000000 + .4byte gTrainerBattleOpponent_A, 0x00000001 + .4byte gUnknown_02038BD0, 0x00000001 + .4byte gUnknown_02038BD4, 0x00000002 + .4byte gUnknown_02038BDC, 0x00000002 + .4byte gUnknown_02038BE4, 0x00000005 + .4byte gUnknown_02038BE8, 0x00000005 + .4byte gUnknown_02038BF0, 0x00000002 + .4byte gUnknown_02038BEC, 0x00000006 + .align 2 gUnknown_0854FF3C:: @ 854FF3C - .incbin "baserom.gba", 0x54ff3c, 0x48 + .4byte gUnknown_02038BC8, 0x00000000 + .4byte gTrainerBattleOpponent_A, 0x00000001 + .4byte gUnknown_02038BD0, 0x00000001 + .4byte gUnknown_02038BD4, 0x00000002 + .4byte gUnknown_02038BDC, 0x00000002 + .4byte gUnknown_02038BE4, 0x00000005 + .4byte gUnknown_02038BE8, 0x00000002 + .4byte gUnknown_02038BF0, 0x00000005 + .4byte gUnknown_02038BEC, 0x00000006 + .align 2 gUnknown_0854FF84:: @ 854FF84 - .incbin "baserom.gba", 0x54ff84, 0x48 + .4byte gUnknown_02038BC8, 0x00000000 + .4byte gTrainerBattleOpponent_A, 0x00000001 + .4byte gUnknown_02038BD0, 0x00000001 + .4byte gUnknown_02038BD4, 0x00000005 + .4byte gUnknown_02038BDC, 0x00000002 + .4byte gUnknown_02038BE4, 0x00000005 + .4byte gUnknown_02038BE8, 0x00000005 + .4byte gUnknown_02038BF0, 0x00000005 + .4byte gUnknown_02038BEC, 0x00000006 + .align 2 gUnknown_0854FFCC:: @ 854FFCC - .incbin "baserom.gba", 0x54ffcc, 0x48 + .4byte gUnknown_02038BC8, 0x00000000 + .4byte gTrainerBattleOpponent_A, 0x00000001 + .4byte gUnknown_02038BD0, 0x00000001 + .4byte gUnknown_02038BD4, 0x00000002 + .4byte gUnknown_02038BDC, 0x00000002 + .4byte gUnknown_02038BE4, 0x00000005 + .4byte gUnknown_02038BE8, 0x00000002 + .4byte gUnknown_02038BF0, 0x00000002 + .4byte gUnknown_02038BEC, 0x00000006 + .align 2 gUnknown_08550014:: @ 8550014 - .incbin "baserom.gba", 0x550014, 0x48 + .4byte gUnknown_02038BC8, 0x00000000 + .4byte gTrainerBattleOpponent_B, 0x00000001 + .4byte gUnknown_02038BD0, 0x00000001 + .4byte gUnknown_02038BD8, 0x00000002 + .4byte gUnknown_02038BE0, 0x00000002 + .4byte gUnknown_02038BE4, 0x00000005 + .4byte gUnknown_02038BE8, 0x00000005 + .4byte gUnknown_02038BF4, 0x00000005 + .4byte gUnknown_02038BEC, 0x00000006 + .align 2 gUnknown_0855005C:: @ 855005C - .incbin "baserom.gba", 0x55005c, 0x48 + .4byte gUnknown_02038BC8, 0x00000000 + .4byte gTrainerBattleOpponent_B, 0x00000001 + .4byte gUnknown_02038BD0, 0x00000001 + .4byte gUnknown_02038BD8, 0x00000002 + .4byte gUnknown_02038BE0, 0x00000002 + .4byte gUnknown_02038BE4, 0x00000005 + .4byte gUnknown_02038BE8, 0x00000005 + .4byte gUnknown_02038BF4, 0x00000002 + .4byte gUnknown_02038BEC, 0x00000006 + .align 2 gUnknown_085500A4:: @ 85500A4 - .incbin "baserom.gba", 0x5500a4, 0x4e0 + .2byte 0x0025, 0x0028, 0x0029, 0x002a, 0x002b, 0x0000, 0x0021, 0x0000 + .2byte 0x02e1, 0x032c, 0x032d, 0x032e, 0x032f, 0x0000, 0x0014, 0x0000 + .2byte 0x002c, 0x002f, 0x0030, 0x0031, 0x0032, 0x0000, 0x001a, 0x0000 + .2byte 0x0039, 0x003c, 0x003d, 0x003e, 0x003f, 0x0000, 0x0018, 0x0000 + .2byte 0x0040, 0x0043, 0x0044, 0x0045, 0x0046, 0x0000, 0x0018, 0x0000 + .2byte 0x02af, 0x02b0, 0x02b1, 0x02b2, 0x02b3, 0x0000, 0x0027, 0x0000 + .2byte 0x02ff, 0x033c, 0x033d, 0x033e, 0x033f, 0x0000, 0x0024, 0x0000 + .2byte 0x005e, 0x0065, 0x0066, 0x0067, 0x0068, 0x0000, 0x001a, 0x0000 + .2byte 0x004e, 0x0054, 0x0055, 0x0056, 0x0057, 0x0000, 0x001a, 0x0000 + .2byte 0x006c, 0x006e, 0x006f, 0x0070, 0x0071, 0x0018, 0x0014, 0x0000 + .2byte 0x0072, 0x0078, 0x0079, 0x007a, 0x007b, 0x0000, 0x0013, 0x0000 + .2byte 0x0090, 0x034c, 0x034d, 0x034e, 0x034f, 0x0018, 0x0038, 0x0000 + .2byte 0x007f, 0x0084, 0x0085, 0x0086, 0x0087, 0x0000, 0x0024, 0x0000 + .2byte 0x0088, 0x008b, 0x008c, 0x008d, 0x008e, 0x0000, 0x0013, 0x0000 + .2byte 0x008f, 0x0093, 0x0094, 0x0095, 0x0096, 0x0000, 0x001d, 0x0000 + .2byte 0x009b, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x0000, 0x0016, 0x0000 + .2byte 0x00b7, 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x0000, 0x001e, 0x0000 + .2byte 0x02a0, 0x0338, 0x0339, 0x033a, 0x033b, 0x0000, 0x002a, 0x0000 + .2byte 0x00c3, 0x0340, 0x0341, 0x0342, 0x0343, 0x0000, 0x0026, 0x0000 + .2byte 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x0000, 0x0021, 0x0000 + .2byte 0x00ce, 0x00cf, 0x00d0, 0x00d1, 0x00d2, 0x0000, 0x001d, 0x0000 + .2byte 0x00d8, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x0018, 0x000d, 0x0000 + .2byte 0x02a9, 0x02aa, 0x02ab, 0x02ac, 0x02ad, 0x0018, 0x0001, 0x0000 + .2byte 0x00e2, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x0000, 0x0023, 0x0000 + .2byte 0x00ee, 0x00ef, 0x00f0, 0x00f1, 0x00f2, 0x0000, 0x0026, 0x0000 + .2byte 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x0000, 0x0026, 0x0000 + .2byte 0x00fe, 0x0101, 0x0102, 0x0103, 0x0104, 0x0000, 0x0024, 0x0000 + .2byte 0x0118, 0x011a, 0x011b, 0x011c, 0x011d, 0x0000, 0x001f, 0x0000 + .2byte 0x0111, 0x0114, 0x0115, 0x0116, 0x0117, 0x0000, 0x001f, 0x0000 + .2byte 0x011f, 0x0120, 0x0121, 0x0122, 0x0123, 0x0000, 0x0020, 0x0000 + .2byte 0x012e, 0x012f, 0x0130, 0x0131, 0x0132, 0x0000, 0x0019, 0x0000 + .2byte 0x0125, 0x0127, 0x0128, 0x0129, 0x012a, 0x0000, 0x0012, 0x0000 + .2byte 0x0133, 0x0134, 0x0135, 0x0136, 0x0137, 0x0000, 0x001e, 0x0000 + .2byte 0x0139, 0x013a, 0x013b, 0x013c, 0x013d, 0x0018, 0x000c, 0x0000 + .2byte 0x013e, 0x0148, 0x0149, 0x014a, 0x014b, 0x0000, 0x0011, 0x0000 + .2byte 0x0153, 0x015a, 0x015b, 0x015c, 0x015d, 0x0000, 0x0015, 0x0000 + .2byte 0x0178, 0x017b, 0x017c, 0x017d, 0x017e, 0x0000, 0x002b, 0x0000 + .2byte 0x0171, 0x0172, 0x0173, 0x0174, 0x0175, 0x0000, 0x0020, 0x0000 + .2byte 0x0166, 0x0168, 0x0169, 0x016a, 0x016b, 0x0000, 0x0019, 0x0000 + .2byte 0x016c, 0x016d, 0x016e, 0x016f, 0x0170, 0x0000, 0x0020, 0x0000 + .2byte 0x0182, 0x0184, 0x0185, 0x0186, 0x0187, 0x0000, 0x002b, 0x0000 + .2byte 0x0161, 0x0162, 0x0163, 0x0164, 0x0165, 0x0000, 0x0019, 0x0000 + .2byte 0x0179, 0x0334, 0x0335, 0x0336, 0x0337, 0x0000, 0x0029, 0x0000 + .2byte 0x0188, 0x0189, 0x018a, 0x018b, 0x018c, 0x0018, 0x0001, 0x0000 + .2byte 0x0196, 0x0199, 0x019a, 0x019b, 0x019c, 0x0000, 0x0023, 0x0000 + .2byte 0x01a3, 0x01a5, 0x01a6, 0x01a7, 0x01a8, 0x0000, 0x001c, 0x0000 + .2byte 0x01ab, 0x01ae, 0x01af, 0x01b0, 0x01b1, 0x0000, 0x001e, 0x0000 + .2byte 0x01b2, 0x01b5, 0x01b6, 0x01b7, 0x01b8, 0x0000, 0x001c, 0x0000 + .2byte 0x01c1, 0x01d1, 0x01d2, 0x01d3, 0x01d4, 0x0000, 0x0027, 0x0000 + .2byte 0x01da, 0x01dd, 0x01de, 0x01df, 0x01e0, 0x0018, 0x000d, 0x0000 + .2byte 0x01e1, 0x01e2, 0x01e7, 0x01e8, 0x01e9, 0x0000, 0x0012, 0x0000 + .2byte 0x01ec, 0x01f1, 0x01f2, 0x01f3, 0x01f4, 0x0000, 0x0028, 0x0000 + .2byte 0x02e4, 0x0330, 0x0331, 0x0332, 0x0333, 0x0000, 0x0017, 0x0000 + .2byte 0x0200, 0x0203, 0x0204, 0x0205, 0x0206, 0x0000, 0x0019, 0x0000 + .2byte 0x0221, 0x0224, 0x0225, 0x0226, 0x0227, 0x0000, 0x0020, 0x0000 + .2byte 0x021a, 0x021d, 0x021e, 0x021f, 0x0220, 0x0000, 0x0020, 0x0000 + .2byte 0x0009, 0x0348, 0x0349, 0x034a, 0x034b, 0x0018, 0x0011, 0x0000 + .2byte 0x022f, 0x0232, 0x0233, 0x0234, 0x0235, 0x0000, 0x0022, 0x0000 + .2byte 0x0228, 0x022b, 0x022c, 0x022d, 0x022e, 0x0000, 0x0022, 0x0000 + .2byte 0x025c, 0x025f, 0x0260, 0x0261, 0x0262, 0x0000, 0x0013, 0x0000 + .2byte 0x026d, 0x026e, 0x026f, 0x0270, 0x0271, 0x0018, 0x000b, 0x0000 + .2byte 0x0273, 0x027c, 0x027d, 0x027e, 0x027f, 0x0000, 0x001b, 0x0000 + .2byte 0x0001, 0x0344, 0x0345, 0x0346, 0x0347, 0x0018, 0x000c, 0x0000 + .2byte 0x0282, 0x0283, 0x0284, 0x0285, 0x0286, 0x0018, 0x003e, 0x0000 + .2byte 0x0291, 0x0292, 0x0293, 0x0294, 0x0294, 0x0018, 0x002b, 0x0000 + .2byte 0x0109, 0x0302, 0x0303, 0x0304, 0x0305, 0x0000, 0x0003, 0x0000 + .2byte 0x010a, 0x0306, 0x0307, 0x0308, 0x0309, 0x0000, 0x000b, 0x0000 + .2byte 0x010b, 0x030a, 0x030b, 0x030c, 0x030d, 0x0000, 0x0002, 0x0000 + .2byte 0x010c, 0x030e, 0x030f, 0x0310, 0x0311, 0x0000, 0x000c, 0x0000 + .2byte 0x010d, 0x0312, 0x0313, 0x0314, 0x0315, 0x0000, 0x0000, 0x0000 + .2byte 0x010e, 0x0316, 0x0317, 0x0318, 0x0319, 0x0000, 0x0004, 0x0000 + .2byte 0x010f, 0x031a, 0x031b, 0x031c, 0x031d, 0x0000, 0x0006, 0x0000 + .2byte 0x0110, 0x031e, 0x031f, 0x0320, 0x0321, 0x0000, 0x0007, 0x0000 + .2byte 0x0105, 0x0105, 0x0105, 0x0105, 0x0105, 0x0000, 0x0008, 0x0000 + .2byte 0x0106, 0x0106, 0x0106, 0x0106, 0x0106, 0x0000, 0x0008, 0x0000 + .2byte 0x0107, 0x0107, 0x0107, 0x0107, 0x0107, 0x0000, 0x0008, 0x0000 + .2byte 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, 0x0000, 0x0008, 0x0000 + .2byte 0x014f, 0x014f, 0x014f, 0x014f, 0x014f, 0x0000, 0x0008, 0x0000 + .align 2 gUnknown_08550584:: @ 8550584 - .incbin "baserom.gba", 0x550584, 0x10 + .2byte 0x0867, 0x0868, 0x0869, 0x086a, 0x086b, 0x086c, 0x086d, 0x086e + From 7db6b48aa083ecffd2e3d991bd983fd9be004316 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sat, 30 Sep 2017 02:05:47 -0400 Subject: [PATCH 318/342] move externs --- src/field_special_scene.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/field_special_scene.c b/src/field_special_scene.c index 20331f37c..9c35a33da 100755 --- a/src/field_special_scene.c +++ b/src/field_special_scene.c @@ -12,6 +12,16 @@ #define SECONDS(value) ((signed) (60.0 * value + 0.5)) +extern u8 GetSSTidalLocation(s8 *, s8 *, s16 *, s16 *); // should be in field_specials.h +extern void warp1_set(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); +extern bool8 sub_80D3340(u8, u8, u8); +extern bool32 CountSSTidalStep(u16); +extern bool8 exec_movement(u8, u8, u8, u8 *); +extern void copy_saved_warp2_bank_and_enter_x_to_warp1(u8 unused); +extern void sp13E_warp_to_last_warp(void); +extern void saved_warp2_set(int unused, s8 mapGroup, s8 mapNum, s8 warpId); +extern void sub_80AF8B8(void); + // porthole states enum { @@ -243,9 +253,6 @@ void EndTruckSequence(u8 taskId) } } -extern u8 GetSSTidalLocation(s8 *, s8 *, s16 *, s16 *); // should be in field_specials.h -extern void warp1_set(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); - bool8 sub_80FB59C(void) { s8 mapGroup, mapNum; @@ -262,12 +269,6 @@ bool8 sub_80FB59C(void) } } -extern bool8 sub_80D3340(u8, u8, u8); -extern bool32 CountSSTidalStep(u16); -extern bool8 exec_movement(u8, u8, u8, u8 *); -extern void copy_saved_warp2_bank_and_enter_x_to_warp1(u8 unused); -extern void sp13E_warp_to_last_warp(void); - void Task_HandlePorthole(u8 taskId) { s16 *data = gTasks[taskId].data; @@ -351,9 +352,6 @@ void sub_80FB768(void) ScriptContext2_Enable(); } -extern void saved_warp2_set(int unused, s8 mapGroup, s8 mapNum, s8 warpId); -extern void sub_80AF8B8(void); - void sub_80FB7A4(void) { FlagSet(SYS_CRUISE_MODE); From cd87f47c8acd890c86cdea35b2cf03244c966161 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 30 Sep 2017 09:01:21 +0200 Subject: [PATCH 319/342] fix a bad file name --- data/{rom_8158B30.s => rom_85CE2A0.s} | 0 ld_script.txt | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename data/{rom_8158B30.s => rom_85CE2A0.s} (100%) diff --git a/data/rom_8158B30.s b/data/rom_85CE2A0.s similarity index 100% rename from data/rom_8158B30.s rename to data/rom_85CE2A0.s diff --git a/ld_script.txt b/ld_script.txt index 77e8ac4f4..1e2ebcaf9 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -420,7 +420,7 @@ SECTIONS { data/field_effect_helpers.o(.rodata); data/contest_ai.o(.rodata); data/battle_controller_safari.o(.rodata); - data/rom_8158B30.o(.rodata); + data/rom_85CE2A0.o(.rodata); src/roamer.o(.rodata); data/rom_85CECB0.o(.rodata); data/battle_controller_wally.o(.rodata); From 5d9d9c14235c93ac35f8833cdaca8f0d0b9b9c36 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 30 Sep 2017 09:11:48 +0200 Subject: [PATCH 320/342] split, rename for real this time --- data/{rom_85CE2A0.s => battle_anim_815A0D4.s} | 17 -------------- data/learn_move.s | 22 +++++++++++++++++++ ld_script.txt | 3 ++- 3 files changed, 24 insertions(+), 18 deletions(-) rename data/{rom_85CE2A0.s => battle_anim_815A0D4.s} (78%) create mode 100644 data/learn_move.s diff --git a/data/rom_85CE2A0.s b/data/battle_anim_815A0D4.s similarity index 78% rename from data/rom_85CE2A0.s rename to data/battle_anim_815A0D4.s index 72cff0b33..be8439db7 100644 --- a/data/rom_85CE2A0.s +++ b/data/battle_anim_815A0D4.s @@ -64,20 +64,3 @@ gUnknown_085CE87C:: @ 85CE87C gUnknown_085CE9C8:: @ 85CE9C8 .incbin "baserom.gba", 0x5ce9c8, 0x1e8 -gUnknown_085CEBB0:: @ 85CEBB0 - .incbin "baserom.gba", 0x5cebb0, 0x8 - -gUnknown_085CEBB8:: @ 85CEBB8 - .incbin "baserom.gba", 0x5cebb8, 0x8 - -gUnknown_085CEBC0:: @ 85CEBC0 - .incbin "baserom.gba", 0x5cebc0, 0x10 - -gUnknown_085CEBD0:: @ 85CEBD0 - .incbin "baserom.gba", 0x5cebd0, 0x40 - -gUnknown_085CEC10:: @ 85CEC10 - .incbin "baserom.gba", 0x5cec10, 0x18 - -gUnknown_085CEC28:: @ 85CEC28 - .incbin "baserom.gba", 0x5cec28, 0x8 diff --git a/data/learn_move.s b/data/learn_move.s new file mode 100644 index 000000000..bcb8aeba1 --- /dev/null +++ b/data/learn_move.s @@ -0,0 +1,22 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_085CEBB0:: @ 85CEBB0 + .incbin "baserom.gba", 0x5cebb0, 0x8 + +gUnknown_085CEBB8:: @ 85CEBB8 + .incbin "baserom.gba", 0x5cebb8, 0x8 + +gUnknown_085CEBC0:: @ 85CEBC0 + .incbin "baserom.gba", 0x5cebc0, 0x10 + +gUnknown_085CEBD0:: @ 85CEBD0 + .incbin "baserom.gba", 0x5cebd0, 0x40 + +gUnknown_085CEC10:: @ 85CEC10 + .incbin "baserom.gba", 0x5cec10, 0x18 + +gUnknown_085CEC28:: @ 85CEC28 + .incbin "baserom.gba", 0x5cec28, 0x8 diff --git a/ld_script.txt b/ld_script.txt index 1e2ebcaf9..b1aef1319 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -420,7 +420,8 @@ SECTIONS { data/field_effect_helpers.o(.rodata); data/contest_ai.o(.rodata); data/battle_controller_safari.o(.rodata); - data/rom_85CE2A0.o(.rodata); + data/battle_anim_815A0D4.o(.rodata); + data/learn_move.o(.rodata); src/roamer.o(.rodata); data/rom_85CECB0.o(.rodata); data/battle_controller_wally.o(.rodata); From 2766bd78df51c90175b66dd344fe4211121b9749 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 30 Sep 2017 09:22:59 +0200 Subject: [PATCH 321/342] split the second file --- data/{rom_85CECB0.s => battle_tower.s} | 51 ------------------------ data/use_pokeblock.s | 55 ++++++++++++++++++++++++++ ld_script.txt | 3 +- 3 files changed, 57 insertions(+), 52 deletions(-) rename data/{rom_85CECB0.s => battle_tower.s} (67%) create mode 100644 data/use_pokeblock.s diff --git a/data/rom_85CECB0.s b/data/battle_tower.s similarity index 67% rename from data/rom_85CECB0.s rename to data/battle_tower.s index c0233bb8c..a952e0773 100644 --- a/data/rom_85CECB0.s +++ b/data/battle_tower.s @@ -101,54 +101,3 @@ gUnknown_085DFA46:: @ 85DFA46 gUnknown_085DFA52:: @ 85DFA52 .incbin "baserom.gba", 0x5dfa52, 0xe - -gUnknown_085DFA60:: @ 85DFA60 - .incbin "baserom.gba", 0x5dfa60, 0x20 - -gUnknown_085DFA80:: @ 85DFA80 - .incbin "baserom.gba", 0x5dfa80, 0xe0 - -gUnknown_085DFB60:: @ 85DFB60 - .incbin "baserom.gba", 0x5dfb60, 0xac - -gUnknown_085DFC0C:: @ 85DFC0C - .incbin "baserom.gba", 0x5dfc0c, 0xa4 - -gUnknown_085DFCB0:: @ 85DFCB0 - .incbin "baserom.gba", 0x5dfcb0, 0x14 - -gUnknown_085DFCC4:: @ 85DFCC4 - .incbin "baserom.gba", 0x5dfcc4, 0x5 - -gUnknown_085DFCC9:: @ 85DFCC9 - .incbin "baserom.gba", 0x5dfcc9, 0x3 - -gUnknown_085DFCCC:: @ 85DFCCC - .incbin "baserom.gba", 0x5dfccc, 0x10 - -gUnknown_085DFCDC:: @ 85DFCDC - .incbin "baserom.gba", 0x5dfcdc, 0x20 - -gUnknown_085DFCFC:: @ 85DFCFC - .incbin "baserom.gba", 0x5dfcfc, 0x8 - -gUnknown_085DFD04:: @ 85DFD04 - .incbin "baserom.gba", 0x5dfd04, 0x14 - -gUnknown_085DFD18:: @ 85DFD18 - .incbin "baserom.gba", 0x5dfd18, 0x8 - -gUnknown_085DFD20:: @ 85DFD20 - .incbin "baserom.gba", 0x5dfd20, 0x8 - -gUnknown_085DFD28:: @ 85DFD28 - .incbin "baserom.gba", 0x5dfd28, 0x34 - -gUnknown_085DFD5C:: @ 85DFD5C - .incbin "baserom.gba", 0x5dfd5c, 0x44 - -gUnknown_085DFDA0:: @ 85DFDA0 - .incbin "baserom.gba", 0x5dfda0, 0x18 - -gUnknown_085DFDB8:: @ 85DFDB8 - .incbin "baserom.gba", 0x5dfdb8, 0x8 diff --git a/data/use_pokeblock.s b/data/use_pokeblock.s new file mode 100644 index 000000000..9b557a0dd --- /dev/null +++ b/data/use_pokeblock.s @@ -0,0 +1,55 @@ + .include "asm/macros.inc" + .include "constants/constants.inc" + + .section .rodata + +gUnknown_085DFA60:: @ 85DFA60 + .incbin "baserom.gba", 0x5dfa60, 0x20 + +gUnknown_085DFA80:: @ 85DFA80 + .incbin "baserom.gba", 0x5dfa80, 0xe0 + +gUnknown_085DFB60:: @ 85DFB60 + .incbin "baserom.gba", 0x5dfb60, 0xac + +gUnknown_085DFC0C:: @ 85DFC0C + .incbin "baserom.gba", 0x5dfc0c, 0xa4 + +gUnknown_085DFCB0:: @ 85DFCB0 + .incbin "baserom.gba", 0x5dfcb0, 0x14 + +gUnknown_085DFCC4:: @ 85DFCC4 + .incbin "baserom.gba", 0x5dfcc4, 0x5 + +gUnknown_085DFCC9:: @ 85DFCC9 + .incbin "baserom.gba", 0x5dfcc9, 0x3 + +gUnknown_085DFCCC:: @ 85DFCCC + .incbin "baserom.gba", 0x5dfccc, 0x10 + +gUnknown_085DFCDC:: @ 85DFCDC + .incbin "baserom.gba", 0x5dfcdc, 0x20 + +gUnknown_085DFCFC:: @ 85DFCFC + .incbin "baserom.gba", 0x5dfcfc, 0x8 + +gUnknown_085DFD04:: @ 85DFD04 + .incbin "baserom.gba", 0x5dfd04, 0x14 + +gUnknown_085DFD18:: @ 85DFD18 + .incbin "baserom.gba", 0x5dfd18, 0x8 + +gUnknown_085DFD20:: @ 85DFD20 + .incbin "baserom.gba", 0x5dfd20, 0x8 + +gUnknown_085DFD28:: @ 85DFD28 + .incbin "baserom.gba", 0x5dfd28, 0x34 + +gUnknown_085DFD5C:: @ 85DFD5C + .incbin "baserom.gba", 0x5dfd5c, 0x44 + +gUnknown_085DFDA0:: @ 85DFDA0 + .incbin "baserom.gba", 0x5dfda0, 0x18 + +gUnknown_085DFDB8:: @ 85DFDB8 + .incbin "baserom.gba", 0x5dfdb8, 0x8 diff --git a/ld_script.txt b/ld_script.txt index b1aef1319..0a5a77415 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -423,7 +423,8 @@ SECTIONS { data/battle_anim_815A0D4.o(.rodata); data/learn_move.o(.rodata); src/roamer.o(.rodata); - data/rom_85CECB0.o(.rodata); + data/battle_tower.o(.rodata); + data/use_pokeblock.o(.rodata); data/battle_controller_wally.o(.rodata); data/player_pc.o(.rodata); data/intro.o(.rodata); From 87b16995ebd9758071d94d1e885f000d70ef6988 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 29 Sep 2017 23:54:08 -0400 Subject: [PATCH 322/342] Add Avara's map_constants.h --- include/map_constants.h | 1342 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 1342 insertions(+) create mode 100644 include/map_constants.h diff --git a/include/map_constants.h b/include/map_constants.h new file mode 100644 index 000000000..6199793c8 --- /dev/null +++ b/include/map_constants.h @@ -0,0 +1,1342 @@ +#ifndef GUARD_MAP_CONSTANTS_H +#define GUARD_MAP_CONSTANTS_H + +//-------------------------------------------------- +// Map Group 0 +//-------------------------------------------------- + +enum +{ + MAP_ID_PETALBURG_CITY, + MAP_ID_SLATEPORT_CITY, + MAP_ID_MAUVILLE_CITY, + MAP_ID_RUSTBORO_CITY, + MAP_ID_FORTREE_CITY, + MAP_ID_LILYCOVE_CITY, + MAP_ID_MOSSDEEP_CITY, + MAP_ID_SOOTOPOLIS_CITY, + MAP_ID_EVER_GRANDE_CITY, + MAP_ID_LITTLEROOT_TOWN, + MAP_ID_OLDALE_TOWN, + MAP_ID_DEWFORD_TOWN, + MAP_ID_LAVARIDGE_TOWN, + MAP_ID_FALLARBOR_TOWN, + MAP_ID_VERDANTURF_TOWN, + MAP_ID_PACIFIDLOG_TOWN, + MAP_ID_ROUTE101, + MAP_ID_ROUTE102, + MAP_ID_ROUTE103, + MAP_ID_ROUTE104, + MAP_ID_ROUTE105, + MAP_ID_ROUTE106, + MAP_ID_ROUTE107, + MAP_ID_ROUTE108, + MAP_ID_ROUTE109, + MAP_ID_ROUTE110, + MAP_ID_ROUTE111, + MAP_ID_ROUTE112, + MAP_ID_ROUTE113, + MAP_ID_ROUTE114, + MAP_ID_ROUTE115, + MAP_ID_ROUTE116, + MAP_ID_ROUTE117, + MAP_ID_ROUTE118, + MAP_ID_ROUTE119, + MAP_ID_ROUTE120, + MAP_ID_ROUTE121, + MAP_ID_ROUTE122, + MAP_ID_ROUTE123, + MAP_ID_ROUTE124, + MAP_ID_ROUTE125, + MAP_ID_ROUTE126, + MAP_ID_ROUTE127, + MAP_ID_ROUTE128, + MAP_ID_ROUTE129, + MAP_ID_ROUTE130, + MAP_ID_ROUTE131, + MAP_ID_ROUTE132, + MAP_ID_ROUTE133, + MAP_ID_ROUTE134, + MAP_ID_UNDERWATER1, + MAP_ID_UNDERWATER2, + MAP_ID_UNDERWATER3, + MAP_ID_UNDERWATER4, + MAP_ID_UNDERWATER5, + MAP_ID_UNDERWATER6, + MAP_ID_UNDERWATER7, +}; + +#define MAP_GROUP_PETALBURG_CITY 0 +#define MAP_GROUP_SLATEPORT_CITY 0 +#define MAP_GROUP_MAUVILLE_CITY 0 +#define MAP_GROUP_RUSTBORO_CITY 0 +#define MAP_GROUP_FORTREE_CITY 0 +#define MAP_GROUP_LILYCOVE_CITY 0 +#define MAP_GROUP_MOSSDEEP_CITY 0 +#define MAP_GROUP_SOOTOPOLIS_CITY 0 +#define MAP_GROUP_EVER_GRANDE_CITY 0 +#define MAP_GROUP_LITTLEROOT_TOWN 0 +#define MAP_GROUP_OLDALE_TOWN 0 +#define MAP_GROUP_DEWFORD_TOWN 0 +#define MAP_GROUP_LAVARIDGE_TOWN 0 +#define MAP_GROUP_FALLARBOR_TOWN 0 +#define MAP_GROUP_VERDANTURF_TOWN 0 +#define MAP_GROUP_PACIFIDLOG_TOWN 0 +#define MAP_GROUP_ROUTE101 0 +#define MAP_GROUP_ROUTE102 0 +#define MAP_GROUP_ROUTE103 0 +#define MAP_GROUP_ROUTE104 0 +#define MAP_GROUP_ROUTE105 0 +#define MAP_GROUP_ROUTE106 0 +#define MAP_GROUP_ROUTE107 0 +#define MAP_GROUP_ROUTE108 0 +#define MAP_GROUP_ROUTE109 0 +#define MAP_GROUP_ROUTE110 0 +#define MAP_GROUP_ROUTE111 0 +#define MAP_GROUP_ROUTE112 0 +#define MAP_GROUP_ROUTE113 0 +#define MAP_GROUP_ROUTE114 0 +#define MAP_GROUP_ROUTE115 0 +#define MAP_GROUP_ROUTE116 0 +#define MAP_GROUP_ROUTE117 0 +#define MAP_GROUP_ROUTE118 0 +#define MAP_GROUP_ROUTE119 0 +#define MAP_GROUP_ROUTE120 0 +#define MAP_GROUP_ROUTE121 0 +#define MAP_GROUP_ROUTE122 0 +#define MAP_GROUP_ROUTE123 0 +#define MAP_GROUP_ROUTE124 0 +#define MAP_GROUP_ROUTE125 0 +#define MAP_GROUP_ROUTE126 0 +#define MAP_GROUP_ROUTE127 0 +#define MAP_GROUP_ROUTE128 0 +#define MAP_GROUP_ROUTE129 0 +#define MAP_GROUP_ROUTE130 0 +#define MAP_GROUP_ROUTE131 0 +#define MAP_GROUP_ROUTE132 0 +#define MAP_GROUP_ROUTE133 0 +#define MAP_GROUP_ROUTE134 0 +#define MAP_GROUP_UNDERWATER1 0 +#define MAP_GROUP_UNDERWATER2 0 +#define MAP_GROUP_UNDERWATER3 0 +#define MAP_GROUP_UNDERWATER4 0 +#define MAP_GROUP_UNDERWATER5 0 +#define MAP_GROUP_UNDERWATER6 0 +#define MAP_GROUP_UNDERWATER7 0 +//-------------------------------------------------- +// Map Group 1 +//-------------------------------------------------- + +enum +{ + MAP_ID_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F, + MAP_ID_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F, + MAP_ID_LITTLEROOT_TOWN_MAYS_HOUSE_1F, + MAP_ID_LITTLEROOT_TOWN_MAYS_HOUSE_2F, + MAP_ID_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB, +}; + +#define MAP_GROUP_LITTLEROOT_TOWN_BRENDANS_HOUSE_1F 1 +#define MAP_GROUP_LITTLEROOT_TOWN_BRENDANS_HOUSE_2F 1 +#define MAP_GROUP_LITTLEROOT_TOWN_MAYS_HOUSE_1F 1 +#define MAP_GROUP_LITTLEROOT_TOWN_MAYS_HOUSE_2F 1 +#define MAP_GROUP_LITTLEROOT_TOWN_PROFESSOR_BIRCHS_LAB 1 + +//-------------------------------------------------- +// Map Group 2 +//-------------------------------------------------- + +enum +{ + MAP_ID_OLDALE_TOWN_HOUSE1, + MAP_ID_OLDALE_TOWN_HOUSE2, + MAP_ID_OLDALE_TOWN_POKEMON_CENTER_1F, + MAP_ID_OLDALE_TOWN_POKEMON_CENTER_2F, + MAP_ID_OLDALE_TOWN_MART, +}; + +#define MAP_GROUP_OLDALE_TOWN_HOUSE1 2 +#define MAP_GROUP_OLDALE_TOWN_HOUSE2 2 +#define MAP_GROUP_OLDALE_TOWN_POKEMON_CENTER_1F 2 +#define MAP_GROUP_OLDALE_TOWN_POKEMON_CENTER_2F 2 +#define MAP_GROUP_OLDALE_TOWN_MART 2 + +//-------------------------------------------------- +// Map Group 3 +//-------------------------------------------------- + +enum +{ + MAP_ID_DEWFORD_TOWN_HOUSE1, + MAP_ID_DEWFORD_TOWN_POKEMON_CENTER_1F, + MAP_ID_DEWFORD_TOWN_POKEMON_CENTER_2F, + MAP_ID_DEWFORD_TOWN_GYM, + MAP_ID_DEWFORD_TOWN_HALL, + MAP_ID_DEWFORD_TOWN_HOUSE2, +}; + +#define MAP_GROUP_DEWFORD_TOWN_HOUSE1 3 +#define MAP_GROUP_DEWFORD_TOWN_POKEMON_CENTER_1F 3 +#define MAP_GROUP_DEWFORD_TOWN_POKEMON_CENTER_2F 3 +#define MAP_GROUP_DEWFORD_TOWN_GYM 3 +#define MAP_GROUP_DEWFORD_TOWN_HALL 3 +#define MAP_GROUP_DEWFORD_TOWN_HOUSE2 3 + +//-------------------------------------------------- +// Map Group 4 +//-------------------------------------------------- + +enum +{ + MAP_ID_LAVARIDGE_TOWN_HERB_SHOP, + MAP_ID_LAVARIDGE_TOWN_GYM_1F, + MAP_ID_LAVARIDGE_TOWN_GYM_B1F, + MAP_ID_LAVARIDGE_TOWN_HOUSE, + MAP_ID_LAVARIDGE_TOWN_MART, + MAP_ID_LAVARIDGE_TOWN_POKEMON_CENTER_1F, + MAP_ID_LAVARIDGE_TOWN_POKEMON_CENTER_2F, +}; + +#define MAP_GROUP_LAVARIDGE_TOWN_HERB_SHOP 4 +#define MAP_GROUP_LAVARIDGE_TOWN_GYM_1F 4 +#define MAP_GROUP_LAVARIDGE_TOWN_GYM_B1F 4 +#define MAP_GROUP_LAVARIDGE_TOWN_HOUSE 4 +#define MAP_GROUP_LAVARIDGE_TOWN_MART 4 +#define MAP_GROUP_LAVARIDGE_TOWN_POKEMON_CENTER_1F 4 +#define MAP_GROUP_LAVARIDGE_TOWN_POKEMON_CENTER_2F 4 + +//-------------------------------------------------- +// Map Group 5 +//-------------------------------------------------- + +enum +{ + MAP_ID_FALLARBOR_TOWN_MART, + MAP_ID_FALLARBOR_TOWN_TENT_LOBBY, + MAP_ID_FALLARBOR_TOWN_TENT_HALL, + MAP_ID_FALLARBOR_TOWN_TENT_ARENA, + MAP_ID_FALLARBOR_TOWN_POKEMON_CENTER_1F, + MAP_ID_FALLARBOR_TOWN_POKEMON_CENTER_2F, + MAP_ID_FALLARBOR_TOWN_HOUSE1, + MAP_ID_FALLARBOR_TOWN_HOUSE2, +}; + +#define MAP_GROUP_FALLARBOR_TOWN_MART 5 +#define MAP_GROUP_FALLARBOR_TOWN_TENT_LOBBY 5 +#define MAP_GROUP_FALLARBOR_TOWN_TENT_HALL 5 +#define MAP_GROUP_FALLARBOR_TOWN_TENT_ARENA 5 +#define MAP_GROUP_FALLARBOR_TOWN_POKEMON_CENTER_1F 5 +#define MAP_GROUP_FALLARBOR_TOWN_POKEMON_CENTER_2F 5 +#define MAP_GROUP_FALLARBOR_TOWN_HOUSE1 5 +#define MAP_GROUP_FALLARBOR_TOWN_HOUSE2 5 + +//-------------------------------------------------- +// Map Group 6 +//-------------------------------------------------- + +enum +{ + MAP_ID_VERDANTURF_TOWN_TENT_LOBBY, + MAP_ID_VERDANTURF_TOWN_TENT_HALL, + MAP_ID_VERDANTURF_TOWN_TENT_ARENA, + MAP_ID_VERDANTURF_TOWN_MART, + MAP_ID_VERDANTURF_TOWN_POKEMON_CENTER_1F, + MAP_ID_VERDANTURF_TOWN_POKEMON_CENTER_2F, + MAP_ID_VERDANTURF_TOWN_WANDAS_HOUSE, + MAP_ID_VERDANTURF_TOWN_FRIENDSHIP_RATERS_HOUSE, + MAP_ID_VERDANTURF_TOWN_HOUSE, +}; + +#define MAP_GROUP_VERDANTURF_TOWN_TENT_LOBBY 6 +#define MAP_GROUP_VERDANTURF_TOWN_TENT_HALL 6 +#define MAP_GROUP_VERDANTURF_TOWN_TENT_ARENA 6 +#define MAP_GROUP_VERDANTURF_TOWN_MART 6 +#define MAP_GROUP_VERDANTURF_TOWN_POKEMON_CENTER_1F 6 +#define MAP_GROUP_VERDANTURF_TOWN_POKEMON_CENTER_2F 6 +#define MAP_GROUP_VERDANTURF_TOWN_WANDAS_HOUSE 6 +#define MAP_GROUP_VERDANTURF_TOWN_FRIENDSHIP_RATERS_HOUSE 6 +#define MAP_GROUP_VERDANTURF_TOWN_HOUSE 6 + +//-------------------------------------------------- +// Map Group 7 +//-------------------------------------------------- + +enum +{ + MAP_ID_PACIFIDLOG_TOWN_POKEMON_CENTER_1F, + MAP_ID_PACIFIDLOG_TOWN_POKEMON_CENTER_2F, + MAP_ID_PACIFIDLOG_TOWN_HOUSE1, + MAP_ID_PACIFIDLOG_TOWN_HOUSE2, + MAP_ID_PACIFIDLOG_TOWN_HOUSE3, + MAP_ID_PACIFIDLOG_TOWN_HOUSE4, + MAP_ID_PACIFIDLOG_TOWN_HOUSE5, +}; + +#define MAP_GROUP_PACIFIDLOG_TOWN_POKEMON_CENTER_1F 7 +#define MAP_GROUP_PACIFIDLOG_TOWN_POKEMON_CENTER_2F 7 +#define MAP_GROUP_PACIFIDLOG_TOWN_HOUSE1 7 +#define MAP_GROUP_PACIFIDLOG_TOWN_HOUSE2 7 +#define MAP_GROUP_PACIFIDLOG_TOWN_HOUSE3 7 +#define MAP_GROUP_PACIFIDLOG_TOWN_HOUSE4 7 +#define MAP_GROUP_PACIFIDLOG_TOWN_HOUSE5 7 + +//-------------------------------------------------- +// Map Group 8 +//-------------------------------------------------- + +enum +{ + MAP_ID_PETALBURG_CITY_WALLYS_HOUSE, + MAP_ID_PETALBURG_CITY_GYM, + MAP_ID_PETALBURG_CITY_HOUSE1, + MAP_ID_PETALBURG_CITY_HOUSE2, + MAP_ID_PETALBURG_CITY_POKEMON_CENTER_1F, + MAP_ID_PETALBURG_CITY_POKEMON_CENTER_2F, + MAP_ID_PETALBURG_CITY_MART, +}; + +#define MAP_GROUP_PETALBURG_CITY_WALLYS_HOUSE 8 +#define MAP_GROUP_PETALBURG_CITY_GYM 8 +#define MAP_GROUP_PETALBURG_CITY_HOUSE1 8 +#define MAP_GROUP_PETALBURG_CITY_HOUSE2 8 +#define MAP_GROUP_PETALBURG_CITY_POKEMON_CENTER_1F 8 +#define MAP_GROUP_PETALBURG_CITY_POKEMON_CENTER_2F 8 +#define MAP_GROUP_PETALBURG_CITY_MART 8 + +//-------------------------------------------------- +// Map Group 9 +//-------------------------------------------------- + +enum +{ + MAP_ID_SLATEPORT_CITY_STERNS_SHIPYARD_1F, + MAP_ID_SLATEPORT_CITY_STERNS_SHIPYARD_2F, + MAP_ID_SLATEPORT_CITY_TENT_LOBBY, + MAP_ID_SLATEPORT_CITY_TENT_HALL, + MAP_ID_SLATEPORT_CITY_TENT_ARENA, + MAP_ID_SLATEPORT_CITY_HOUSE1, + MAP_ID_SLATEPORT_CITY_POKEMON_FAN_CLUB, + MAP_ID_SLATEPORT_CITY_OCEANIC_MUSEUM_1F, + MAP_ID_SLATEPORT_CITY_OCEANIC_MUSEUM_2F, + MAP_ID_SLATEPORT_CITY_HARBOR, + MAP_ID_SLATEPORT_CITY_HOUSE2, + MAP_ID_SLATEPORT_CITY_POKEMON_CENTER_1F, + MAP_ID_SLATEPORT_CITY_POKEMON_CENTER_2F, + MAP_ID_SLATEPORT_CITY_MART, +}; + +#define MAP_GROUP_SLATEPORT_CITY_STERNS_SHIPYARD_1F 9 +#define MAP_GROUP_SLATEPORT_CITY_STERNS_SHIPYARD_2F 9 +#define MAP_GROUP_SLATEPORT_CITY_TENT_LOBBY 9 +#define MAP_GROUP_SLATEPORT_CITY_TENT_HALL 9 +#define MAP_GROUP_SLATEPORT_CITY_TENT_ARENA 9 +#define MAP_GROUP_SLATEPORT_CITY_HOUSE1 9 +#define MAP_GROUP_SLATEPORT_CITY_POKEMON_FAN_CLUB 9 +#define MAP_GROUP_SLATEPORT_CITY_OCEANIC_MUSEUM_1F 9 +#define MAP_GROUP_SLATEPORT_CITY_OCEANIC_MUSEUM_2F 9 +#define MAP_GROUP_SLATEPORT_CITY_HARBOR 9 +#define MAP_GROUP_SLATEPORT_CITY_HOUSE2 9 +#define MAP_GROUP_SLATEPORT_CITY_POKEMON_CENTER_1F 9 +#define MAP_GROUP_SLATEPORT_CITY_POKEMON_CENTER_2F 9 +#define MAP_GROUP_SLATEPORT_CITY_MART 9 + +//-------------------------------------------------- +// Map Group 10 +//-------------------------------------------------- + +enum +{ + MAP_ID_MAUVILLE_CITY_GYM, + MAP_ID_MAUVILLE_CITY_BIKE_SHOP, + MAP_ID_MAUVILLE_CITY_HOUSE1, + MAP_ID_MAUVILLE_CITY_GAME_CORNER, + MAP_ID_MAUVILLE_CITY_HOUSE2, + MAP_ID_MAUVILLE_CITY_POKEMON_CENTER_1F, + MAP_ID_MAUVILLE_CITY_POKEMON_CENTER_2F, + MAP_ID_MAUVILLE_CITY_MART, +}; + +#define MAP_GROUP_MAUVILLE_CITY_GYM 10 +#define MAP_GROUP_MAUVILLE_CITY_BIKE_SHOP 10 +#define MAP_GROUP_MAUVILLE_CITY_HOUSE1 10 +#define MAP_GROUP_MAUVILLE_CITY_GAME_CORNER 10 +#define MAP_GROUP_MAUVILLE_CITY_HOUSE2 10 +#define MAP_GROUP_MAUVILLE_CITY_POKEMON_CENTER_1F 10 +#define MAP_GROUP_MAUVILLE_CITY_POKEMON_CENTER_2F 10 +#define MAP_GROUP_MAUVILLE_CITY_MART 10 + +//-------------------------------------------------- +// Map Group 11 +//-------------------------------------------------- + +enum +{ + MAP_ID_RUSTBORO_CITY_DEVON_CORP_1F, + MAP_ID_RUSTBORO_CITY_DEVON_CORP_2F, + MAP_ID_RUSTBORO_CITY_DEVON_CORP_3F, + MAP_ID_RUSTBORO_CITY_GYM, + MAP_ID_RUSTBORO_CITY_POKEMON_SCHOOL, + MAP_ID_RUSTBORO_CITY_POKEMON_CENTER_1F, + MAP_ID_RUSTBORO_CITY_POKEMON_CENTER_2F, + MAP_ID_RUSTBORO_CITY_MART, + MAP_ID_RUSTBORO_CITY_FLAT1_1F, + MAP_ID_RUSTBORO_CITY_FLAT1_2F, + MAP_ID_RUSTBORO_CITY_HOUSE1, + MAP_ID_RUSTBORO_CITY_CUTTERS_HOUSE, + MAP_ID_RUSTBORO_CITY_HOUSE2, + MAP_ID_RUSTBORO_CITY_FLAT2_1F, + MAP_ID_RUSTBORO_CITY_FLAT2_2F, + MAP_ID_RUSTBORO_CITY_FLAT2_3F, + MAP_ID_RUSTBORO_CITY_HOUSE3, +}; + +#define MAP_GROUP_RUSTBORO_CITY_DEVON_CORP_1F 11 +#define MAP_GROUP_RUSTBORO_CITY_DEVON_CORP_2F 11 +#define MAP_GROUP_RUSTBORO_CITY_DEVON_CORP_3F 11 +#define MAP_GROUP_RUSTBORO_CITY_GYM 11 +#define MAP_GROUP_RUSTBORO_CITY_POKEMON_SCHOOL 11 +#define MAP_GROUP_RUSTBORO_CITY_POKEMON_CENTER_1F 11 +#define MAP_GROUP_RUSTBORO_CITY_POKEMON_CENTER_2F 11 +#define MAP_GROUP_RUSTBORO_CITY_MART 11 +#define MAP_GROUP_RUSTBORO_CITY_FLAT1_1F 11 +#define MAP_GROUP_RUSTBORO_CITY_FLAT1_2F 11 +#define MAP_GROUP_RUSTBORO_CITY_HOUSE1 11 +#define MAP_GROUP_RUSTBORO_CITY_CUTTERS_HOUSE 11 +#define MAP_GROUP_RUSTBORO_CITY_HOUSE2 11 +#define MAP_GROUP_RUSTBORO_CITY_FLAT2_1F 11 +#define MAP_GROUP_RUSTBORO_CITY_FLAT2_2F 11 +#define MAP_GROUP_RUSTBORO_CITY_FLAT2_3F 11 +#define MAP_GROUP_RUSTBORO_CITY_HOUSE3 11 + +//-------------------------------------------------- +// Map Group 12 +//-------------------------------------------------- + +enum +{ + MAP_ID_FORTREE_CITY_HOUSE1, + MAP_ID_FORTREE_CITY_GYM, + MAP_ID_FORTREE_CITY_POKEMON_CENTER_1F, + MAP_ID_FORTREE_CITY_POKEMON_CENTER_2F, + MAP_ID_FORTREE_CITY_MART, + MAP_ID_FORTREE_CITY_HOUSE2, + MAP_ID_FORTREE_CITY_HOUSE3, + MAP_ID_FORTREE_CITY_HOUSE4, + MAP_ID_FORTREE_CITY_HOUSE5, + MAP_ID_FORTREE_CITY_DECORATION_SHOP, +}; + +#define MAP_GROUP_FORTREE_CITY_HOUSE1 12 +#define MAP_GROUP_FORTREE_CITY_GYM 12 +#define MAP_GROUP_FORTREE_CITY_POKEMON_CENTER_1F 12 +#define MAP_GROUP_FORTREE_CITY_POKEMON_CENTER_2F 12 +#define MAP_GROUP_FORTREE_CITY_MART 12 +#define MAP_GROUP_FORTREE_CITY_HOUSE2 12 +#define MAP_GROUP_FORTREE_CITY_HOUSE3 12 +#define MAP_GROUP_FORTREE_CITY_HOUSE4 12 +#define MAP_GROUP_FORTREE_CITY_HOUSE5 12 +#define MAP_GROUP_FORTREE_CITY_DECORATION_SHOP 12 + +//-------------------------------------------------- +// Map Group 13 +//-------------------------------------------------- + +enum +{ + MAP_ID_LILYCOVE_CITY_COVE_LILY_MOTEL_1F, + MAP_ID_LILYCOVE_CITY_COVE_LILY_MOTEL_2F, + MAP_ID_LILYCOVE_CITY_LILYCOVE_MUSEUM_1F, + MAP_ID_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F, + MAP_ID_LILYCOVE_CITY_CONTEST_LOBBY, + MAP_ID_LILYCOVE_CITY_CONTEST_HALL, + MAP_ID_LILYCOVE_CITY_POKEMON_CENTER_1F, + MAP_ID_LILYCOVE_CITY_POKEMON_CENTER_2F, + MAP_ID_LILYCOVE_CITY_UNUSED_MART, + MAP_ID_LILYCOVE_CITY_POKEMON_TRAINER_FAN_CLUB, + MAP_ID_LILYCOVE_CITY_HARBOR, + MAP_ID_LILYCOVE_CITY_MOVE_DELETERS_HOUSE, + MAP_ID_LILYCOVE_CITY_HOUSE1, + MAP_ID_LILYCOVE_CITY_HOUSE2, + MAP_ID_LILYCOVE_CITY_HOUSE3, + MAP_ID_LILYCOVE_CITY_HOUSE4, + MAP_ID_LILYCOVE_CITY_DEPARTMENT_STORE_1F, + MAP_ID_LILYCOVE_CITY_DEPARTMENT_STORE_2F, + MAP_ID_LILYCOVE_CITY_DEPARTMENT_STORE_3F, + MAP_ID_LILYCOVE_CITY_DEPARTMENT_STORE_4F, + MAP_ID_LILYCOVE_CITY_DEPARTMENT_STORE_5F, + MAP_ID_LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP, + MAP_ID_LILYCOVE_CITY_DEPARTMENT_STORE_ELEVATOR, +}; + +#define MAP_GROUP_LILYCOVE_CITY_COVE_LILY_MOTEL_1F 13 +#define MAP_GROUP_LILYCOVE_CITY_COVE_LILY_MOTEL_2F 13 +#define MAP_GROUP_LILYCOVE_CITY_LILYCOVE_MUSEUM_1F 13 +#define MAP_GROUP_LILYCOVE_CITY_LILYCOVE_MUSEUM_2F 13 +#define MAP_GROUP_LILYCOVE_CITY_CONTEST_LOBBY 13 +#define MAP_GROUP_LILYCOVE_CITY_CONTEST_HALL 13 +#define MAP_GROUP_LILYCOVE_CITY_POKEMON_CENTER_1F 13 +#define MAP_GROUP_LILYCOVE_CITY_POKEMON_CENTER_2F 13 +#define MAP_GROUP_LILYCOVE_CITY_UNUSED_MART 13 +#define MAP_GROUP_LILYCOVE_CITY_POKEMON_TRAINER_FAN_CLUB 13 +#define MAP_GROUP_LILYCOVE_CITY_HARBOR 13 +#define MAP_GROUP_LILYCOVE_CITY_MOVE_DELETERS_HOUSE 13 +#define MAP_GROUP_LILYCOVE_CITY_HOUSE1 13 +#define MAP_GROUP_LILYCOVE_CITY_HOUSE2 13 +#define MAP_GROUP_LILYCOVE_CITY_HOUSE3 13 +#define MAP_GROUP_LILYCOVE_CITY_HOUSE4 13 +#define MAP_GROUP_LILYCOVE_CITY_DEPARTMENT_STORE_1F 13 +#define MAP_GROUP_LILYCOVE_CITY_DEPARTMENT_STORE_2F 13 +#define MAP_GROUP_LILYCOVE_CITY_DEPARTMENT_STORE_3F 13 +#define MAP_GROUP_LILYCOVE_CITY_DEPARTMENT_STORE_4F 13 +#define MAP_GROUP_LILYCOVE_CITY_DEPARTMENT_STORE_5F 13 +#define MAP_GROUP_LILYCOVE_CITY_DEPARTMENT_STORE_ROOFTOP 13 +#define MAP_GROUP_LILYCOVE_CITY_DEPARTMENT_STORE_ELEVATOR 13 + +//-------------------------------------------------- +// Map Group 14 +//-------------------------------------------------- + +enum +{ + MAP_ID_MOSSDEEP_CITY_GYM, + MAP_ID_MOSSDEEP_CITY_HOUSE1, + MAP_ID_MOSSDEEP_CITY_HOUSE2, + MAP_ID_MOSSDEEP_CITY_POKEMON_CENTER_1F, + MAP_ID_MOSSDEEP_CITY_POKEMON_CENTER_2F, + MAP_ID_MOSSDEEP_CITY_MART, + MAP_ID_MOSSDEEP_CITY_HOUSE3, + MAP_ID_MOSSDEEP_CITY_STEVENS_HOUSE, + MAP_ID_MOSSDEEP_CITY_HOUSE4, + MAP_ID_MOSSDEEP_CITY_SPACE_CENTER_1F, + MAP_ID_MOSSDEEP_CITY_SPACE_CENTER_2F, + MAP_ID_MOSSDEEP_CITY_GAME_CORNER_1F, + MAP_ID_MOSSDEEP_CITY_GAME_CORNER_B1F, +}; + +#define MAP_GROUP_MOSSDEEP_CITY_GYM 14 +#define MAP_GROUP_MOSSDEEP_CITY_HOUSE1 14 +#define MAP_GROUP_MOSSDEEP_CITY_HOUSE2 14 +#define MAP_GROUP_MOSSDEEP_CITY_POKEMON_CENTER_1F 14 +#define MAP_GROUP_MOSSDEEP_CITY_POKEMON_CENTER_2F 14 +#define MAP_GROUP_MOSSDEEP_CITY_MART 14 +#define MAP_GROUP_MOSSDEEP_CITY_HOUSE3 14 +#define MAP_GROUP_MOSSDEEP_CITY_STEVENS_HOUSE 14 +#define MAP_GROUP_MOSSDEEP_CITY_HOUSE4 14 +#define MAP_GROUP_MOSSDEEP_CITY_SPACE_CENTER_1F 14 +#define MAP_GROUP_MOSSDEEP_CITY_SPACE_CENTER_2F 14 +#define MAP_GROUP_MOSSDEEP_CITY_GAME_CORNER_1F 14 +#define MAP_GROUP_MOSSDEEP_CITY_GAME_CORNER_B1F 14 + +//-------------------------------------------------- +// Map Group 15 +//-------------------------------------------------- + +enum +{ + MAP_ID_SOOTOPOLIS_CITY_GYM_1F, + MAP_ID_SOOTOPOLIS_CITY_GYM_B1F, + MAP_ID_SOOTOPOLIS_CITY_POKEMON_CENTER_1F, + MAP_ID_SOOTOPOLIS_CITY_POKEMON_CENTER_2F, + MAP_ID_SOOTOPOLIS_CITY_MART, + MAP_ID_SOOTOPOLIS_CITY_HOUSE1, + MAP_ID_SOOTOPOLIS_CITY_HOUSE2, + MAP_ID_SOOTOPOLIS_CITY_HOUSE3, + MAP_ID_SOOTOPOLIS_CITY_HOUSE4, + MAP_ID_SOOTOPOLIS_CITY_HOUSE5, + MAP_ID_SOOTOPOLIS_CITY_HOUSE6, + MAP_ID_SOOTOPOLIS_CITY_HOUSE7, + MAP_ID_SOOTOPOLIS_CITY_HOUSE8, + MAP_ID_SOOTOPOLIS_CITY_BATTLEHOUSE_1, + MAP_ID_SOOTOPOLIS_CITY_BATTLEHOUSE_2, +}; + +#define MAP_GROUP_SOOTOPOLIS_CITY_GYM_1F 15 +#define MAP_GROUP_SOOTOPOLIS_CITY_GYM_B1F 15 +#define MAP_GROUP_SOOTOPOLIS_CITY_POKEMON_CENTER_1F 15 +#define MAP_GROUP_SOOTOPOLIS_CITY_POKEMON_CENTER_2F 15 +#define MAP_GROUP_SOOTOPOLIS_CITY_MART 15 +#define MAP_GROUP_SOOTOPOLIS_CITY_HOUSE1 15 +#define MAP_GROUP_SOOTOPOLIS_CITY_HOUSE2 15 +#define MAP_GROUP_SOOTOPOLIS_CITY_HOUSE3 15 +#define MAP_GROUP_SOOTOPOLIS_CITY_HOUSE4 15 +#define MAP_GROUP_SOOTOPOLIS_CITY_HOUSE5 15 +#define MAP_GROUP_SOOTOPOLIS_CITY_HOUSE6 15 +#define MAP_GROUP_SOOTOPOLIS_CITY_HOUSE7 15 +#define MAP_GROUP_SOOTOPOLIS_CITY_HOUSE8 15 +#define MAP_ID_SOOTOPOLIS_CITY_BATTLEHOUSE_1 15 +#define MAP_ID_SOOTOPOLIS_CITY_BATTLEHOUSE_2 15 +//-------------------------------------------------- +// Map Group 16 +//-------------------------------------------------- + +enum +{ + MAP_ID_EVER_GRANDE_CITY_SIDNEYS_ROOM, + MAP_ID_EVER_GRANDE_CITY_PHOEBES_ROOM, + MAP_ID_EVER_GRANDE_CITY_GLACIAS_ROOM, + MAP_ID_EVER_GRANDE_CITY_DRAKES_ROOM, + MAP_ID_EVER_GRANDE_CITY_CHAMPIONS_ROOM, + MAP_ID_EVER_GRANDE_CITY_CORRIDOR1, + MAP_ID_EVER_GRANDE_CITY_CORRIDOR2, + MAP_ID_EVER_GRANDE_CITY_CORRIDOR3, + MAP_ID_EVER_GRANDE_CITY_CORRIDOR4, + MAP_ID_EVER_GRANDE_CITY_CORRIDOR5, + MAP_ID_EVER_GRANDE_CITY_POKEMON_LEAGUE_1F, + MAP_ID_EVER_GRANDE_CITY_HALL_OF_FAME, + MAP_ID_EVER_GRANDE_CITY_POKEMON_CENTER_1F, + MAP_ID_EVER_GRANDE_CITY_POKEMON_CENTER_2F, + MAP_ID_EVER_GRANDE_CITY_POKEMON_LEAGUE_2F, +}; + +#define MAP_GROUP_EVER_GRANDE_CITY_SIDNEYS_ROOM 16 +#define MAP_GROUP_EVER_GRANDE_CITY_PHOEBES_ROOM 16 +#define MAP_GROUP_EVER_GRANDE_CITY_GLACIAS_ROOM 16 +#define MAP_GROUP_EVER_GRANDE_CITY_DRAKES_ROOM 16 +#define MAP_GROUP_EVER_GRANDE_CITY_CHAMPIONS_ROOM 16 +#define MAP_GROUP_EVER_GRANDE_CITY_CORRIDOR1 16 +#define MAP_GROUP_EVER_GRANDE_CITY_CORRIDOR2 16 +#define MAP_GROUP_EVER_GRANDE_CITY_CORRIDOR3 16 +#define MAP_GROUP_EVER_GRANDE_CITY_CORRIDOR4 16 +#define MAP_GROUP_EVER_GRANDE_CITY_CORRIDOR5 16 +#define MAP_GROUP_EVER_GRANDE_CITY_POKEMON_LEAGUE_1F 16 +#define MAP_GROUP_EVER_GRANDE_CITY_HALL_OF_FAME 16 +#define MAP_GROUP_EVER_GRANDE_CITY_POKEMON_CENTER_1F 16 +#define MAP_GROUP_EVER_GRANDE_CITY_POKEMON_CENTER_2F 16 +#define MAP_GROUP_EVER_GRANDE_CITY_POKEMON_LEAGUE_2F 16 + +//-------------------------------------------------- +// Map Group 17 +//-------------------------------------------------- + +enum +{ + MAP_ID_ROUTE104_MR_BRINEYS_HOUSE, + MAP_ID_ROUTE104_PRETTY_PETAL_FLOWER_SHOP, +}; + +#define MAP_GROUP_ROUTE104_MR_BRINEYS_HOUSE 17 +#define MAP_GROUP_ROUTE104_PRETTY_PETAL_FLOWER_SHOP 17 + +//-------------------------------------------------- +// Map Group 18 +//-------------------------------------------------- + +enum +{ + MAP_ID_ROUTE111_WINSTRATE_FAMILYS_HOUSE, + MAP_ID_ROUTE111_OLD_LADYS_REST_STOP, +}; + +#define MAP_GROUP_ROUTE111_WINSTRATE_FAMILYS_HOUSE 18 +#define MAP_GROUP_ROUTE111_OLD_LADYS_REST_STOP 18 + +//-------------------------------------------------- +// Map Group 19 +//-------------------------------------------------- + +enum +{ + MAP_ID_ROUTE112_CABLE_CAR_STATION, + MAP_ID_MT_CHIMNEY_CABLE_CAR_STATION, +}; + +#define MAP_GROUP_ROUTE112_CABLE_CAR_STATION 19 +#define MAP_GROUP_MT_CHIMNEY_CABLE_CAR_STATION 19 + +//-------------------------------------------------- +// Map Group 20 +//-------------------------------------------------- + +enum +{ + MAP_ID_ROUTE114_FOSSIL_MANIACS_HOUSE, + MAP_ID_ROUTE114_FOSSIL_MANIACS_TUNNEL, + MAP_ID_ROUTE114_LANETTES_HOUSE, +}; + +#define MAP_GROUP_ROUTE114_FOSSIL_MANIACS_HOUSE 20 +#define MAP_GROUP_ROUTE114_FOSSIL_MANIACS_TUNNEL 20 +#define MAP_GROUP_ROUTE114_LANETTES_HOUSE 20 + +//-------------------------------------------------- +// Map Group 21 +//-------------------------------------------------- + +enum +{ + MAP_ID_ROUTE116_TUNNELERS_REST_HOUSE, +}; + +#define MAP_GROUP_ROUTE116_TUNNELERS_REST_HOUSE 21 + +//-------------------------------------------------- +// Map Group 22 +//-------------------------------------------------- + +enum +{ + MAP_ID_ROUTE117_POKEMON_DAY_CARE, +}; + +#define MAP_GROUP_ROUTE117_POKEMON_DAY_CARE 22 + +//-------------------------------------------------- +// Map Group 23 +//-------------------------------------------------- + +enum +{ + MAP_ID_ROUTE121_SAFARI_ZONE_ENTRANCE, +}; + +#define MAP_GROUP_ROUTE121_SAFARI_ZONE_ENTRANCE 23 + +//-------------------------------------------------- +// Map Group 24 +//-------------------------------------------------- + +enum +{ + MAP_ID_METEOR_FALLS_1F_1R, + MAP_ID_METEOR_FALLS_1F_2R, + MAP_ID_METEOR_FALLS_B1F_1R, + MAP_ID_METEOR_FALLS_B1F_2R, + MAP_ID_RUSTURF_TUNNEL, + MAP_ID_UNDERWATER_SOOTOPOLIS_CITY, + MAP_ID_DESERT_RUINS, + MAP_ID_GRANITE_CAVE_1F, + MAP_ID_GRANITE_CAVE_B1F, + MAP_ID_GRANITE_CAVE_B2F, + MAP_ID_GRANITE_CAVE_STEVENS_ROOM, + MAP_ID_PETALBURG_WOODS, + MAP_ID_MT_CHIMNEY, + MAP_ID_JAGGED_PASS, + MAP_ID_FIERY_PATH, + MAP_ID_MT_PYRE_1F, + MAP_ID_MT_PYRE_2F, + MAP_ID_MT_PYRE_3F, + MAP_ID_MT_PYRE_4F, + MAP_ID_MT_PYRE_5F, + MAP_ID_MT_PYRE_6F, + MAP_ID_MT_PYRE_EXTERIOR, + MAP_ID_MT_PYRE_SUMMIT, + MAP_ID_AQUA_HIDEOUT_1F, + MAP_ID_AQUA_HIDEOUT_B1F, + MAP_ID_AQUA_HIDEOUT_B2F, + MAP_ID_UNDERWATER_SEAFLOOR_CAVERN, + MAP_ID_SEAFLOOR_CAVERN_ENTRANCE, + MAP_ID_SEAFLOOR_CAVERN_ROOM1, + MAP_ID_SEAFLOOR_CAVERN_ROOM2, + MAP_ID_SEAFLOOR_CAVERN_ROOM3, + MAP_ID_SEAFLOOR_CAVERN_ROOM4, + MAP_ID_SEAFLOOR_CAVERN_ROOM5, + MAP_ID_SEAFLOOR_CAVERN_ROOM6, + MAP_ID_SEAFLOOR_CAVERN_ROOM7, + MAP_ID_SEAFLOOR_CAVERN_ROOM8, + MAP_ID_SEAFLOOR_CAVERN_ROOM9, + MAP_ID_CAVE_OF_ORIGIN_ENTRANCE, + MAP_ID_CAVE_OF_ORIGIN_1F, + MAP_ID_CAVE_OF_ORIGIN_B1F, + MAP_ID_CAVE_OF_ORIGIN_B2F, + MAP_ID_CAVE_OF_ORIGIN_B3F, + MAP_ID_CAVE_OF_ORIGIN_B4F, + MAP_ID_VICTORY_ROAD_1F, + MAP_ID_VICTORY_ROAD_B1F, + MAP_ID_VICTORY_ROAD_B2F, + MAP_ID_SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM, + MAP_ID_SHOAL_CAVE_LOW_TIDE_INNER_ROOM, + MAP_ID_SHOAL_CAVE_LOW_TIDE_STAIRS_ROOM, + MAP_ID_SHOAL_CAVE_LOW_TIDE_LOWER_ROOM, + MAP_ID_SHOAL_CAVE_HIGH_TIDE_ENTRANCE_ROOM, + MAP_ID_SHOAL_CAVE_HIGH_TIDE_INNER_ROOM, + MAP_ID_NEW_MAUVILLE_ENTRANCE, + MAP_ID_NEW_MAUVILLE_INSIDE, + MAP_ID_ABANDONED_SHIP_DECK, + MAP_ID_ABANDONED_SHIP_CORRIDORS_1F, + MAP_ID_ABANDONED_SHIP_ROOMS_1F, + MAP_ID_ABANDONED_SHIP_CORRIDORS_B1F, + MAP_ID_ABANDONED_SHIP_ROOMS_B1F, + MAP_ID_ABANDONED_SHIP_ROOMS2_B1F, + MAP_ID_ABANDONED_SHIP_UNDERWATER1, + MAP_ID_ABANDONED_SHIP_ROOM_B1F, + MAP_ID_ABANDONED_SHIP_ROOMS2_1F, + MAP_ID_ABANDONED_SHIP_CAPTAINS_OFFICE, + MAP_ID_ABANDONED_SHIP_UNDERWATER2, + MAP_ID_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS, + MAP_ID_ABANDONED_SHIP_HIDDEN_FLOOR_ROOMS, + MAP_ID_ISLAND_CAVE, + MAP_ID_ANCIENT_TOMB, + MAP_ID_UNDERWATER_ROUTE134, + MAP_ID_UNDERWATER_SEALED_CHAMBER, + MAP_ID_SEALED_CHAMBER_OUTER_ROOM, + MAP_ID_SEALED_CHAMBER_INNER_ROOM, + MAP_ID_SCORCHED_SLAB, + MAP_ID_UNUSED_AQUA_HIDEOUT_1F, + MAP_ID_UNUSED_AQUA_HIDEOUT_B1F, + MAP_ID_UNUSED_AQUA_HIDEOUT_B2F, + MAP_ID_SKY_PILLAR_ENTRANCE, + MAP_ID_SKY_PILLAR_OUTSIDE, + MAP_ID_SKY_PILLAR_1F, + MAP_ID_SKY_PILLAR_2F, + MAP_ID_SKY_PILLAR_3F, + MAP_ID_SKY_PILLAR_4F, + MAP_ID_SHOAL_CAVE_LOW_TIDE_ICE_ROOM, + MAP_ID_SKY_PILLAR_5F, + MAP_ID_SKY_PILLAR_TOP, + MAP_ID_MAGMA_HIDEOUT_ENTRANCE, + MAP_ID_MAGMA_HIDEOUT_B1F, + MAP_ID_MAGMA_HIDEOUT_B2F, + MAP_ID_MAGMA_HIDEOUT_B3F, + MAP_ID_MAGMA_HIDEOUT_B4F, + MAP_ID_MAGMA_HIDEOUT_B5F, + MAP_ID_MAGMA_HIDEOUT_B6F, + MAP_ID_MAGMA_HIDEOUT_B7F, + MAP_ID_MIRAGE_TOWER_1F, + MAP_ID_MIRAGE_TOWER_2F, + MAP_ID_MIRAGE_TOWER_3F, + MAP_ID_MIRAGE_TOWER_4F, + MAP_ID_DESERT_UNDERPASS, + MAP_ID_ARTISAN_CAVE_1F, + MAP_ID_ARTISAN_CAVE_2F, + MAP_ID_UNKNOWN_UNDERWATER, + MAP_ID_MARINE_CAVE_1F, + MAP_ID_MARINE_CAVE_2F, + MAP_ID_TERRA_CAVE_1F, + MAP_ID_TERRA_CAVE_2F, + MAP_ID_ALTERING_CAVE, + MAP_ID_METEOR_FALLS_B1F_3R, +}; + +#define MAP_GROUP_METEOR_FALLS_1F_1R 24 +#define MAP_GROUP_METEOR_FALLS_1F_2R 24 +#define MAP_GROUP_METEOR_FALLS_B1F_1R 24 +#define MAP_GROUP_METEOR_FALLS_B1F_2R 24 +#define MAP_GROUP_RUSTURF_TUNNEL 24 +#define MAP_GROUP_UNDERWATER_SOOTOPOLIS_CITY 24 +#define MAP_GROUP_DESERT_RUINS 24 +#define MAP_GROUP_GRANITE_CAVE_1F 24 +#define MAP_GROUP_GRANITE_CAVE_B1F 24 +#define MAP_GROUP_GRANITE_CAVE_B2F 24 +#define MAP_GROUP_GRANITE_CAVE_STEVENS_ROOM 24 +#define MAP_GROUP_PETALBURG_WOODS 24 +#define MAP_GROUP_MT_CHIMNEY 24 +#define MAP_GROUP_JAGGED_PASS 24 +#define MAP_GROUP_FIERY_PATH 24 +#define MAP_GROUP_MT_PYRE_1F 24 +#define MAP_GROUP_MT_PYRE_2F 24 +#define MAP_GROUP_MT_PYRE_3F 24 +#define MAP_GROUP_MT_PYRE_4F 24 +#define MAP_GROUP_MT_PYRE_5F 24 +#define MAP_GROUP_MT_PYRE_6F 24 +#define MAP_GROUP_MT_PYRE_EXTERIOR 24 +#define MAP_GROUP_MT_PYRE_SUMMIT 24 +#define MAP_GROUP_AQUA_HIDEOUT_1F 24 +#define MAP_GROUP_AQUA_HIDEOUT_B1F 24 +#define MAP_GROUP_AQUA_HIDEOUT_B2F 24 +#define MAP_GROUP_UNDERWATER_SEAFLOOR_CAVERN 24 +#define MAP_GROUP_SEAFLOOR_CAVERN_ENTRANCE 24 +#define MAP_GROUP_SEAFLOOR_CAVERN_ROOM1 24 +#define MAP_GROUP_SEAFLOOR_CAVERN_ROOM2 24 +#define MAP_GROUP_SEAFLOOR_CAVERN_ROOM3 24 +#define MAP_GROUP_SEAFLOOR_CAVERN_ROOM4 24 +#define MAP_GROUP_SEAFLOOR_CAVERN_ROOM5 24 +#define MAP_GROUP_SEAFLOOR_CAVERN_ROOM6 24 +#define MAP_GROUP_SEAFLOOR_CAVERN_ROOM7 24 +#define MAP_GROUP_SEAFLOOR_CAVERN_ROOM8 24 +#define MAP_GROUP_SEAFLOOR_CAVERN_ROOM9 24 +#define MAP_GROUP_CAVE_OF_ORIGIN_ENTRANCE 24 +#define MAP_GROUP_CAVE_OF_ORIGIN_1F 24 +#define MAP_GROUP_CAVE_OF_ORIGIN_B1F 24 +#define MAP_GROUP_CAVE_OF_ORIGIN_B2F 24 +#define MAP_GROUP_CAVE_OF_ORIGIN_B3F 24 +#define MAP_GROUP_CAVE_OF_ORIGIN_B4F 24 +#define MAP_GROUP_VICTORY_ROAD_1F 24 +#define MAP_GROUP_VICTORY_ROAD_B1F 24 +#define MAP_GROUP_VICTORY_ROAD_B2F 24 +#define MAP_GROUP_SHOAL_CAVE_LOW_TIDE_ENTRANCE_ROOM 24 +#define MAP_GROUP_SHOAL_CAVE_LOW_TIDE_INNER_ROOM 24 +#define MAP_GROUP_SHOAL_CAVE_LOW_TIDE_STAIRS_ROOM 24 +#define MAP_GROUP_SHOAL_CAVE_LOW_TIDE_LOWER_ROOM 24 +#define MAP_GROUP_SHOAL_CAVE_HIGH_TIDE_ENTRANCE_ROOM 24 +#define MAP_GROUP_SHOAL_CAVE_HIGH_TIDE_INNER_ROOM 24 +#define MAP_GROUP_NEW_MAUVILLE_ENTRANCE 24 +#define MAP_GROUP_NEW_MAUVILLE_INSIDE 24 +#define MAP_GROUP_ABANDONED_SHIP_DECK 24 +#define MAP_GROUP_ABANDONED_SHIP_CORRIDORS_1F 24 +#define MAP_GROUP_ABANDONED_SHIP_ROOMS_1F 24 +#define MAP_GROUP_ABANDONED_SHIP_CORRIDORS_B1F 24 +#define MAP_GROUP_ABANDONED_SHIP_ROOMS_B1F 24 +#define MAP_GROUP_ABANDONED_SHIP_ROOMS2_B1F 24 +#define MAP_GROUP_ABANDONED_SHIP_UNDERWATER1 24 +#define MAP_GROUP_ABANDONED_SHIP_ROOM_B1F 24 +#define MAP_GROUP_ABANDONED_SHIP_ROOMS2_1F 24 +#define MAP_GROUP_ABANDONED_SHIP_CAPTAINS_OFFICE 24 +#define MAP_GROUP_ABANDONED_SHIP_UNDERWATER2 24 +#define MAP_GROUP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS 24 +#define MAP_GROUP_ABANDONED_SHIP_HIDDEN_FLOOR_ROOMS 24 +#define MAP_GROUP_ISLAND_CAVE 24 +#define MAP_GROUP_ANCIENT_TOMB 24 +#define MAP_GROUP_UNDERWATER_ROUTE134 24 +#define MAP_GROUP_UNDERWATER_SEALED_CHAMBER 24 +#define MAP_GROUP_SEALED_CHAMBER_OUTER_ROOM 24 +#define MAP_GROUP_SEALED_CHAMBER_INNER_ROOM 24 +#define MAP_GROUP_SCORCHED_SLAB 24 +#define MAP_GROUP_UNUSED_AQUA_HIDEOUT_1F 24 +#define MAP_GROUP_UNUSED_AQUA_HIDEOUT_B1F 24 +#define MAP_GROUP_UNUSED_AQUA_HIDEOUT_B2F 24 +#define MAP_GROUP_SKY_PILLAR_ENTRANCE 24 +#define MAP_GROUP_SKY_PILLAR_OUTSIDE 24 +#define MAP_GROUP_SKY_PILLAR_1F 24 +#define MAP_GROUP_SKY_PILLAR_2F 24 +#define MAP_GROUP_SKY_PILLAR_3F 24 +#define MAP_GROUP_SKY_PILLAR_4F 24 +#define MAP_GROUP_SHOAL_CAVE_LOW_TIDE_ICE_ROOM 24 +#define MAP_GROUP_SKY_PILLAR_5F 24 +#define MAP_GROUP_SKY_PILLAR_TOP 24 +#define MAP_GROUP_MAGMA_HIDEOUT_ENTRANCE 24 +#define MAP_GROUP_MAGMA_HIDEOUT_B1F 24 +#define MAP_GROUP_MAGMA_HIDEOUT_B2F 24 +#define MAP_GROUP_MAGMA_HIDEOUT_B3F 24 +#define MAP_GROUP_MAGMA_HIDEOUT_B4F 24 +#define MAP_GROUP_MAGMA_HIDEOUT_B5F 24 +#define MAP_GROUP_MAGMA_HIDEOUT_B6F 24 +#define MAP_GROUP_MAGMA_HIDEOUT_B7F 24 +#define MAP_GROUP_MIRAGE_TOWER_1F 24 +#define MAP_GROUP_MIRAGE_TOWER_2F 24 +#define MAP_GROUP_MIRAGE_TOWER_3F 24 +#define MAP_GROUP_MIRAGE_TOWER_4F 24 +#define MAP_GROUP_DESERT_UNDERPASS 24 +#define MAP_GROUP_ARTISAN_CAVE_1F 24 +#define MAP_GROUP_ARTISAN_CAVE_2F 24 +#define MAP_GROUP_UNKNOWN_UNDERWATER 24 +#define MAP_GROUP_MARINE_CAVE_1F 24 +#define MAP_GROUP_MARINE_CAVE_2F 24 +#define MAP_GROUP_TERRA_CAVE_1F 24 +#define MAP_GROUP_TERRA_CAVE_2F 24 +#define MAP_GROUP_ALTERING_CAVE 24 +#define MAP_GROUP_METEOR_FALLS_B1F_3R 24 + +//-------------------------------------------------- +// Map Group 25 +//-------------------------------------------------- + +enum +{ + MAP_ID_SECRET_BASE_RED_CAVE1, + MAP_ID_SECRET_BASE_BROWN_CAVE1, + MAP_ID_SECRET_BASE_BLUE_CAVE1, + MAP_ID_SECRET_BASE_YELLOW_CAVE1, + MAP_ID_SECRET_BASE_TREE1, + MAP_ID_SECRET_BASE_SHRUB1, + MAP_ID_SECRET_BASE_RED_CAVE2, + MAP_ID_SECRET_BASE_BROWN_CAVE2, + MAP_ID_SECRET_BASE_BLUE_CAVE2, + MAP_ID_SECRET_BASE_YELLOW_CAVE2, + MAP_ID_SECRET_BASE_TREE2, + MAP_ID_SECRET_BASE_SHRUB2, + MAP_ID_SECRET_BASE_RED_CAVE3, + MAP_ID_SECRET_BASE_BROWN_CAVE3, + MAP_ID_SECRET_BASE_BLUE_CAVE3, + MAP_ID_SECRET_BASE_YELLOW_CAVE3, + MAP_ID_SECRET_BASE_TREE3, + MAP_ID_SECRET_BASE_SHRUB3, + MAP_ID_SECRET_BASE_RED_CAVE4, + MAP_ID_SECRET_BASE_BROWN_CAVE4, + MAP_ID_SECRET_BASE_BLUE_CAVE4, + MAP_ID_SECRET_BASE_YELLOW_CAVE4, + MAP_ID_SECRET_BASE_TREE4, + MAP_ID_SECRET_BASE_SHRUB4, + MAP_ID_SINGLE_BATTLE_COLOSSEUM, + MAP_ID_TRADE_CENTER, + MAP_ID_RECORD_CORNER, + MAP_ID_DOUBLE_BATTLE_COLOSSEUM, + MAP_ID_LINK_CONTEST_ROOM1, + MAP_ID_UNKNOWN_MAP_25_29, + MAP_ID_UNKNOWN_MAP_25_30, + MAP_ID_UNKNOWN_MAP_25_31, + MAP_ID_UNKNOWN_MAP_25_32, + MAP_ID_UNKNOWN_MAP_25_33, + MAP_ID_UNKNOWN_MAP_25_34, + MAP_ID_LINK_CONTEST_ROOM2, + MAP_ID_LINK_CONTEST_ROOM3, + MAP_ID_LINK_CONTEST_ROOM4, + MAP_ID_LINK_CONTEST_ROOM5, + MAP_ID_LINK_CONTEST_ROOM6, + MAP_ID_INSIDE_OF_TRUCK, + MAP_ID_SS_TIDAL_CORRIDOR, + MAP_ID_SS_TIDAL_LOWER_DECK, + MAP_ID_SS_TIDAL_ROOMS, + MAP_ID_TEST_ROOM_1, + MAP_ID_TEST_ROOM_2, + MAP_ID_TEST_ROOM_3, + MAP_ID_TEST_ROOM_4, + MAP_ID_TEST_ROOM_5, + MAP_ID_TEST_ROOM_6, + MAP_ID_TEST_ROOM_7, + MAP_ID_TEST_ROOM_8, + MAP_ID_TEST_ROOM_9, + MAP_ID_TEST_ROOM_10, + MAP_ID_TEST_ROOM_11, + MAP_ID_TEST_ROOM_12, + MAP_ID_TEST_ROOM_13, + MAP_ID_TEST_ROOM_14, + MAP_ID_TEST_ROOM_15, + MAP_ID_TEST_ROOM_16, + MAP_ID_UNION_ROOM, +}; + +#define MAP_GROUP_SECRET_BASE_RED_CAVE1 25 +#define MAP_GROUP_SECRET_BASE_BROWN_CAVE1 25 +#define MAP_GROUP_SECRET_BASE_BLUE_CAVE1 25 +#define MAP_GROUP_SECRET_BASE_YELLOW_CAVE1 25 +#define MAP_GROUP_SECRET_BASE_TREE1 25 +#define MAP_GROUP_SECRET_BASE_SHRUB1 25 +#define MAP_GROUP_SECRET_BASE_RED_CAVE2 25 +#define MAP_GROUP_SECRET_BASE_BROWN_CAVE2 25 +#define MAP_GROUP_SECRET_BASE_BLUE_CAVE2 25 +#define MAP_GROUP_SECRET_BASE_YELLOW_CAVE2 25 +#define MAP_GROUP_SECRET_BASE_TREE2 25 +#define MAP_GROUP_SECRET_BASE_SHRUB2 25 +#define MAP_GROUP_SECRET_BASE_RED_CAVE3 25 +#define MAP_GROUP_SECRET_BASE_BROWN_CAVE3 25 +#define MAP_GROUP_SECRET_BASE_BLUE_CAVE3 25 +#define MAP_GROUP_SECRET_BASE_YELLOW_CAVE3 25 +#define MAP_GROUP_SECRET_BASE_TREE3 25 +#define MAP_GROUP_SECRET_BASE_SHRUB3 25 +#define MAP_GROUP_SECRET_BASE_RED_CAVE4 25 +#define MAP_GROUP_SECRET_BASE_BROWN_CAVE4 25 +#define MAP_GROUP_SECRET_BASE_BLUE_CAVE4 25 +#define MAP_GROUP_SECRET_BASE_YELLOW_CAVE4 25 +#define MAP_GROUP_SECRET_BASE_TREE4 25 +#define MAP_GROUP_SECRET_BASE_SHRUB4 25 +#define MAP_GROUP_SINGLE_BATTLE_COLOSSEUM 25 +#define MAP_GROUP_TRADE_CENTER 25 +#define MAP_GROUP_RECORD_CORNER 25 +#define MAP_GROUP_DOUBLE_BATTLE_COLOSSEUM 25 +#define MAP_GROUP_LINK_CONTEST_ROOM1 25 +#define MAP_GROUP_UNKNOWN_MAP_25_29 25 +#define MAP_GROUP_UNKNOWN_MAP_25_30 25 +#define MAP_GROUP_UNKNOWN_MAP_25_31 25 +#define MAP_GROUP_UNKNOWN_MAP_25_32 25 +#define MAP_GROUP_UNKNOWN_MAP_25_33 25 +#define MAP_GROUP_UNKNOWN_MAP_25_34 25 +#define MAP_GROUP_LINK_CONTEST_ROOM2 25 +#define MAP_GROUP_LINK_CONTEST_ROOM3 25 +#define MAP_GROUP_LINK_CONTEST_ROOM4 25 +#define MAP_GROUP_LINK_CONTEST_ROOM5 25 +#define MAP_GROUP_LINK_CONTEST_ROOM6 25 +#define MAP_GROUP_INSIDE_OF_TRUCK 25 +#define MAP_GROUP_SS_TIDAL_CORRIDOR 25 +#define MAP_GROUP_SS_TIDAL_LOWER_DECK 25 +#define MAP_GROUP_SS_TIDAL_ROOMS 25 +#define MAP_GROUP_TEST_ROOM_1 25 +#define MAP_GROUP_TEST_ROOM_2 25 +#define MAP_GROUP_TEST_ROOM_3 25 +#define MAP_GROUP_TEST_ROOM_4 25 +#define MAP_GROUP_TEST_ROOM_5 25 +#define MAP_GROUP_TEST_ROOM_6 25 +#define MAP_GROUP_TEST_ROOM_7 25 +#define MAP_GROUP_TEST_ROOM_8 25 +#define MAP_GROUP_TEST_ROOM_9 25 +#define MAP_GROUP_TEST_ROOM_10 25 +#define MAP_GROUP_TEST_ROOM_11 25 +#define MAP_GROUP_TEST_ROOM_12 25 +#define MAP_GROUP_TEST_ROOM_13 25 +#define MAP_GROUP_TEST_ROOM_14 25 +#define MAP_GROUP_TEST_ROOM_15 25 +#define MAP_GROUP_TEST_ROOM_16 25 +#define MAP_GROUP_UNION_ROOM 25 +//-------------------------------------------------- +// Map Group 26 +//-------------------------------------------------- + +enum +{ + MAP_ID_SAFARI_ZONE_NORTHWEST, + MAP_ID_SAFARI_ZONE_NORTHEAST, + MAP_ID_SAFARI_ZONE_SOUTHWEST, + MAP_ID_SAFARI_ZONE_SOUTHEAST, + MAP_ID_BATTLE_FRONTIER_OUTSIDE_WEST, + MAP_ID_BATTLE_TOWER_LOBBY, + MAP_ID_BATTLE_TOWER_ELEVATOR, + MAP_ID_BATTLE_TOWER_CORRIDOR, + MAP_ID_BATTLE_TOWER_BATTLE_ROOM, + MAP_ID_SOUTHERN_ISLAND_EXTERIOR, + MAP_ID_SOUTHERN_ISLAND_INTERIOR, + MAP_ID_SAFARI_ZONE_REST_HOUSE, + MAP_ID_SAFARI_ZONE_EM_1, + MAP_ID_SAFARI_ZONE_EM_2, + MAP_ID_BATTLE_FRONTIER_OUTSIDE_EAST, + MAP_ID_BATTLE_FRONTIER_TAG_LINK, + MAP_ID_BATTLE_FRONTIER_TAG_LINK_CORRIDOR, + MAP_ID_BATTLE_FRONTIER_TAG_LINK_ARENA, + MAP_ID_BATTLE_DOME_LOBBY, + MAP_ID_BATTLE_DOME_CORRIDOR, + MAP_ID_BATTLE_DOME_ROOM, + MAP_ID_BATTLE_DOME_ARENA, + MAP_ID_BATTLE_PALACE_LOBBY, + MAP_ID_BATTLE_PALACE_CORRIDOR, + MAP_ID_BATTLE_PALACE_1F, + MAP_ID_BATTLE_PYRAMID_LOBBY, + MAP_ID_BATTLE_PYRAMID_UNKNOWN, + MAP_ID_BATTLE_PYRAMID_PEAK, + MAP_ID_BATTLE_ARENA_LOBBY, + MAP_ID_BATTLE_ARENA_CORRIDOR, + MAP_ID_BATTLE_ARENA_ARENA, + MAP_ID_BATTLE_FACTORY_LOBBY, + MAP_ID_BATTLE_FACTORY_CORRIDOR, + MAP_ID_BATTLE_FACTORY_ARENA, + MAP_ID_BATTLE_PALACE_2F, + MAP_ID_BATTLE_PALACE_3F, + MAP_ID_BATTLE_PALACE_4F, + MAP_ID_BATTLE_PALACE_5F, + MAP_ID_BATTLE_PALACE_6F, + MAP_ID_BATTLE_PALACE_TEST_ROOM, + MAP_ID_RANKING_HALL, + MAP_ID_STAT_RATER_HOUSE, + MAP_ID_BATTLE_FRONTIER_EXCHANGE, + MAP_ID_BATTLE_FRONTIER_MANIAC_HOUSE, + MAP_ID_BATTLE_FRONTIER_GAMBLING_HOUSE, + MAP_ID_BATTLE_FRONTIER_HOUSE1, + MAP_ID_BATTLE_FRONTIER_SCOTTS_HOUSE, + MAP_ID_BATTLE_FRONTIER_HOUSE2, + MAP_ID_BATTLE_FRONTIER_HOUSE3, + MAP_ID_BATTLE_FRONTIER_HOUSE4, + MAP_ID_BATTLE_FRONTIER_ENTRANCE_HALL, + MAP_ID_BATTLE_FRONTIER_HOUSE5, + MAP_ID_BATTLE_FRONTIER_UNUSED_HOUSE, + MAP_ID_BATTLE_FRONTIER_POKEMON_CENTER_1F, + MAP_ID_BATTLE_FRONTIER_POKEMON_CENTER_2F, + MAP_ID_BATTLE_FRONTIER_MART, + MAP_ID_FARAWAY_ISLAND_OUTSIDE, + MAP_ID_FARAWAY_ISLAND_FOREST, + MAP_ID_BIRTH_ISLAND_OUTSIDE, + MAP_ID_BIRTH_ISLAND_DOCKS, + MAP_ID_TRAINER_HILL_LOBBY, + MAP_ID_TRAINER_HILL_1F, + MAP_ID_TRAINER_HILL_2F, + MAP_ID_TRAINER_HILL_3F, + MAP_ID_TRAINER_HILL_4F, + MAP_ID_TRAINER_HILL_5F, + MAP_ID_NAVEL_ROCK_OUTSIDE, + MAP_ID_NAVEL_ROCK_DOCKS, + MAP_ID_NAVEL_ROCK_1F, + MAP_ID_NAVEL_ROCK_2F, + MAP_ID_NAVEL_ROCK_3F, + MAP_ID_NAVEL_ROCK_4F, + MAP_ID_NAVEL_ROCK_5F, + MAP_ID_NAVEL_ROCK_6F, + MAP_ID_NAVEL_ROCK_7F, + MAP_ID_NAVEL_ROCK_PEAK, + MAP_ID_NAVEL_ROCK_B1F, + MAP_ID_NAVEL_ROCK_B2F, + MAP_ID_NAVEL_ROCK_B3F, + MAP_ID_NAVEL_ROCK_B4F, + MAP_ID_NAVEL_ROCK_B5F, + MAP_ID_NAVEL_ROCK_B6F, + MAP_ID_NAVEL_ROCK_B7F, + MAP_ID_NAVEL_ROCK_B8F, + MAP_ID_NAVEL_ROCK_B9F, + MAP_ID_NAVEL_ROCK_B10F, + MAP_ID_NAVEL_ROCK_B11F, + MAP_ID_NAVEL_ROCK_INNER, + MAP_ID_TRAINER_HILL_ELEVATOR, +}; + +#define MAP_GROUP_SAFARI_ZONE_NORTHWEST 26 +#define MAP_GROUP_SAFARI_ZONE_NORTHEAST 26 +#define MAP_GROUP_SAFARI_ZONE_SOUTHWEST 26 +#define MAP_GROUP_SAFARI_ZONE_SOUTHEAST 26 +#define MAP_GROUP_BATTLE_FRONTIER_OUTSIDE_WEST 26 +#define MAP_GROUP_BATTLE_TOWER_LOBBY 26 +#define MAP_GROUP_BATTLE_TOWER_ELEVATOR 26 +#define MAP_GROUP_BATTLE_TOWER_CORRIDOR 26 +#define MAP_GROUP_BATTLE_TOWER_BATTLE_ROOM 26 +#define MAP_GROUP_SOUTHERN_ISLAND_EXTERIOR 26 +#define MAP_GROUP_SOUTHERN_ISLAND_INTERIOR 26 +#define MAP_GROUP_SAFARI_ZONE_REST_HOUSE 26 +#define MAP_GROUP_SAFARI_ZONE_EM_1 26 +#define MAP_GROUP_SAFARI_ZONE_EM_2 26 +#define MAP_GROUP_BATTLE_FRONTIER_OUTSIDE_EAST 26 +#define MAP_GROUP_BATTLE_FRONTIER_TAG_LINK 26 +#define MAP_GROUP_BATTLE_FRONTIER_TAG_LINK_CORRIDOR 26 +#define MAP_GROUP_BATTLE_FRONTIER_TAG_LINK_ARENA 26 +#define MAP_GROUP_BATTLE_DOME_LOBBY 26 +#define MAP_GROUP_BATTLE_DOME_CORRIDOR 26 +#define MAP_GROUP_BATTLE_DOME_ROOM 26 +#define MAP_GROUP_BATTLE_DOME_ARENA 26 +#define MAP_GROUP_BATTLE_PALACE_LOBBY 26 +#define MAP_GROUP_BATTLE_PALACE_CORRIDOR 26 +#define MAP_GROUP_BATTLE_PALACE_1F 26 +#define MAP_GROUP_BATTLE_PYRAMID_LOBBY 26 +#define MAP_GROUP_BATTLE_PYRAMID_UNKNOWN 26 +#define MAP_GROUP_BATTLE_PYRAMID_PEAK 26 +#define MAP_GROUP_BATTLE_ARENA_LOBBY 26 +#define MAP_GROUP_BATTLE_ARENA_CORRIDOR 26 +#define MAP_GROUP_BATTLE_ARENA_ARENA 26 // rename +#define MAP_GROUP_BATTLE_FACTORY_LOBBY 26 +#define MAP_GROUP_BATTLE_FACTORY_CORRIDOR 26 +#define MAP_GROUP_BATTLE_FACTORY_ARENA 26 +#define MAP_GROUP_BATTLE_PALACE_2F 26 +#define MAP_GROUP_BATTLE_PALACE_3F 26 +#define MAP_GROUP_BATTLE_PALACE_4F 26 +#define MAP_GROUP_BATTLE_PALACE_5F 26 +#define MAP_GROUP_BATTLE_PALACE_6F 26 +#define MAP_GROUP_BATTLE_PALACE_TEST_ROOM 26 +#define MAP_GROUP_RANKING_HALL 26 +#define MAP_GROUP_STAT_RATER_HOUSE 26 +#define MAP_GROUP_BATTLE_FRONTIER_EXCHANGE 26 +#define MAP_GROUP_BATTLE_FRONTIER_MANIAC_HOUSE 26 +#define MAP_GROUP_BATTLE_FRONTIER_GAMBLING_HOUSE 26 +#define MAP_GROUP_BATTLE_FRONTIER_HOUSE1 26 +#define MAP_GROUP_BATTLE_FRONTIER_SCOTTS_HOUSE 26 +#define MAP_GROUP_BATTLE_FRONTIER_HOUSE2 26 +#define MAP_GROUP_BATTLE_FRONTIER_HOUSE3 26 +#define MAP_GROUP_BATTLE_FRONTIER_HOUSE4 26 +#define MAP_GROUP_BATTLE_FRONTIER_ENTRANCE_HALL 26 +#define MAP_GROUP_BATTLE_FRONTIER_HOUSE5 26 +#define MAP_GROUP_BATTLE_FRONTIER_UNUSED_HOUSE 26 +#define MAP_GROUP_BATTLE_FRONTIER_POKEMON_CENTER_1F 26 +#define MAP_GROUP_BATTLE_FRONTIER_POKEMON_CENTER_2F 26 +#define MAP_GROUP_BATTLE_FRONTIER_MART 26 +#define MAP_GROUP_FARAWAY_ISLAND_OUTSIDE 26 +#define MAP_GROUP_FARAWAY_ISLAND_FOREST 26 +#define MAP_GROUP_BIRTH_ISLAND_OUTSIDE 26 +#define MAP_GROUP_BIRTH_ISLAND_DOCKS 26 +#define MAP_GROUP_TRAINER_HILL_LOBBY 26 +#define MAP_GROUP_TRAINER_HILL_1F 26 +#define MAP_GROUP_TRAINER_HILL_2F 26 +#define MAP_GROUP_TRAINER_HILL_3F 26 +#define MAP_GROUP_TRAINER_HILL_4F 26 +#define MAP_GROUP_TRAINER_HILL_5F 26 +#define MAP_GROUP_NAVEL_ROCK_OUTSIDE 26 +#define MAP_GROUP_NAVEL_ROCK_DOCKS 26 +#define MAP_GROUP_NAVEL_ROCK_1F 26 +#define MAP_GROUP_NAVEL_ROCK_2F 26 +#define MAP_GROUP_NAVEL_ROCK_3F 26 +#define MAP_GROUP_NAVEL_ROCK_4F 26 +#define MAP_GROUP_NAVEL_ROCK_5F 26 +#define MAP_GROUP_NAVEL_ROCK_6F 26 +#define MAP_GROUP_NAVEL_ROCK_7F 26 +#define MAP_GROUP_NAVEL_ROCK_PEAK 26 +#define MAP_GROUP_NAVEL_ROCK_B1F 26 +#define MAP_GROUP_NAVEL_ROCK_B2F 26 +#define MAP_GROUP_NAVEL_ROCK_B3F 26 +#define MAP_GROUP_NAVEL_ROCK_B4F 26 +#define MAP_GROUP_NAVEL_ROCK_B5F 26 +#define MAP_GROUP_NAVEL_ROCK_B6F 26 +#define MAP_GROUP_NAVEL_ROCK_B7F 26 +#define MAP_GROUP_NAVEL_ROCK_B8F 26 +#define MAP_GROUP_NAVEL_ROCK_B9F 26 +#define MAP_GROUP_NAVEL_ROCK_B10F 26 +#define MAP_GROUP_NAVEL_ROCK_B11F 26 +#define MAP_GROUP_NAVEL_ROCK_INNER 26 +#define MAP_GROUP_TRAINER_HILL_ELEVATOR 26 +//-------------------------------------------------- +// Map Group 27 +//-------------------------------------------------- + +enum +{ + MAP_ID_ROUTE104_PROTOTYPE, + MAP_ID_ROUTE104_PROTOTYPE_PRETTY_PETAL_FLOWER_SHOP, +}; + +#define MAP_GROUP_ROUTE104_PROTOTYPE 27 +#define MAP_GROUP_ROUTE104_PROTOTYPE_PRETTY_PETAL_FLOWER_SHOP 27 + +//-------------------------------------------------- +// Map Group 28 +//-------------------------------------------------- + +enum +{ + MAP_ID_ROUTE109_SEASHORE_HOUSE, +}; + +#define MAP_GROUP_ROUTE109_SEASHORE_HOUSE 28 + +//-------------------------------------------------- +// Map Group 29 +//-------------------------------------------------- + +enum +{ + MAP_ID_ROUTE110_TRICK_HOUSE_ENTRANCE, + MAP_ID_ROUTE110_TRICK_HOUSE_END, + MAP_ID_ROUTE110_TRICK_HOUSE_CORRIDOR, + MAP_ID_ROUTE110_TRICK_HOUSE_PUZZLE1, + MAP_ID_ROUTE110_TRICK_HOUSE_PUZZLE2, + MAP_ID_ROUTE110_TRICK_HOUSE_PUZZLE3, + MAP_ID_ROUTE110_TRICK_HOUSE_PUZZLE4, + MAP_ID_ROUTE110_TRICK_HOUSE_PUZZLE5, + MAP_ID_ROUTE110_TRICK_HOUSE_PUZZLE6, + MAP_ID_ROUTE110_TRICK_HOUSE_PUZZLE7, + MAP_ID_ROUTE110_TRICK_HOUSE_PUZZLE8, + MAP_ID_ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE, + MAP_ID_ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE, +}; + +#define MAP_GROUP_ROUTE110_TRICK_HOUSE_ENTRANCE 29 +#define MAP_GROUP_ROUTE110_TRICK_HOUSE_END 29 +#define MAP_GROUP_ROUTE110_TRICK_HOUSE_CORRIDOR 29 +#define MAP_GROUP_ROUTE110_TRICK_HOUSE_PUZZLE1 29 +#define MAP_GROUP_ROUTE110_TRICK_HOUSE_PUZZLE2 29 +#define MAP_GROUP_ROUTE110_TRICK_HOUSE_PUZZLE3 29 +#define MAP_GROUP_ROUTE110_TRICK_HOUSE_PUZZLE4 29 +#define MAP_GROUP_ROUTE110_TRICK_HOUSE_PUZZLE5 29 +#define MAP_GROUP_ROUTE110_TRICK_HOUSE_PUZZLE6 29 +#define MAP_GROUP_ROUTE110_TRICK_HOUSE_PUZZLE7 29 +#define MAP_GROUP_ROUTE110_TRICK_HOUSE_PUZZLE8 29 +#define MAP_GROUP_ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE 29 +#define MAP_GROUP_ROUTE110_SEASIDE_CYCLING_ROAD_NORTH_ENTRANCE 29 + +//-------------------------------------------------- +// Map Group 30 +//-------------------------------------------------- + +enum +{ + MAP_ID_ROUTE113_GLASS_WORKSHOP, +}; + +#define MAP_GROUP_ROUTE113_GLASS_WORKSHOP 30 + +//-------------------------------------------------- +// Map Group 31 +//-------------------------------------------------- + +enum +{ + MAP_ID_ROUTE123_BERRY_MASTERS_HOUSE, +}; + +#define MAP_GROUP_ROUTE123_BERRY_MASTERS_HOUSE 31 + +//-------------------------------------------------- +// Map Group 32 +//-------------------------------------------------- + +enum +{ + MAP_ID_ROUTE119_WEATHER_INSTITUTE_1F, + MAP_ID_ROUTE119_WEATHER_INSTITUTE_2F, + MAP_ID_ROUTE119_HOUSE, +}; + +#define MAP_GROUP_ROUTE119_WEATHER_INSTITUTE_1F 32 +#define MAP_GROUP_ROUTE119_WEATHER_INSTITUTE_2F 32 +#define MAP_GROUP_ROUTE119_HOUSE 32 + +//-------------------------------------------------- +// Map Group 33 +//-------------------------------------------------- + +enum +{ + MAP_ID_ROUTE124_DIVING_TREASURE_HUNTERS_HOUSE, +}; + +#define MAP_GROUP_ROUTE124_DIVING_TREASURE_HUNTERS_HOUSE 33 + +#endif // GUARD_MAP_CONSTANTS_H \ No newline at end of file From ef0b022707bd6e4167f43fa0c9396dc507ef9042 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 09:32:46 -0400 Subject: [PATCH 323/342] BSS: src/main.o, src/dma3_manager.o --- asm/librfu.s | 4 ++-- include/dma3.h | 14 -------------- src/dma3_manager.c | 18 ++++++++++++++---- src/main.c | 2 +- src/malloc.c | 1 + sym_bss.txt | 24 ++---------------------- 6 files changed, 20 insertions(+), 43 deletions(-) diff --git a/asm/librfu.s b/asm/librfu.s index d8ca7538c..129e0f34a 100644 --- a/asm/librfu.s +++ b/asm/librfu.s @@ -2762,7 +2762,7 @@ sub_82E424C: @ 82E424C b _082E4266 .align 2, 0 _082E4254: .4byte gUnknown_089A324C -_082E4258: .4byte gUnknown_030000F0 +_082E4258: .4byte gDma3Requests + 0xE0 thumb_func_end sub_82E424C thumb_func_start sub_82E425C @@ -2810,7 +2810,7 @@ _082E4274: movs r0, 0 b _082E42BE .align 2, 0 -_082E42B0: .4byte gUnknown_030000FA +_082E42B0: .4byte gDma3Requests + 0xEA _082E42B4: .4byte gUnknown_03007890 _082E42B8: .4byte gUnknown_03007894 _082E42BC: diff --git a/include/dma3.h b/include/dma3.h index db75ea9e3..265b47824 100644 --- a/include/dma3.h +++ b/include/dma3.h @@ -1,20 +1,6 @@ #ifndef GUARD_DMA3_H #define GUARD_DMA3_H -extern u8 gDma3ManagerLocked; -extern u8 gDma3RequestCursor; - -struct DmaRequestsStruct -{ - /* 0x00 */ const u8 *src; - /* 0x04 */ u8 *dest; - /* 0x08 */ u16 size; - /* 0x0A */ u16 mode; - /* 0x0C */ u32 value; -}; - -extern struct DmaRequestsStruct gDma3Requests[128]; - void ClearDma3Requests(void); void ProcessDma3Requests(void); int RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode); diff --git a/src/dma3_manager.c b/src/dma3_manager.c index 7cce06c15..bb015c5cf 100644 --- a/src/dma3_manager.c +++ b/src/dma3_manager.c @@ -1,12 +1,23 @@ #include "global.h" #include "dma3.h" +IWRAM_DATA struct { + /* 0x00 */ const u8 *src; + /* 0x04 */ u8 *dest; + /* 0x08 */ u16 size; + /* 0x0A */ u16 mode; + /* 0x0C */ u32 value; +} gDma3Requests[128]; + +static bool8 gDma3ManagerLocked; +static u8 gDma3RequestCursor; + void ClearDma3Requests(void) { int i; gDma3ManagerLocked = TRUE; - gDma3RequestCursor = FALSE; + gDma3RequestCursor = 0; for(i = 0; i < (u8)ARRAY_COUNT(gDma3Requests); i++) { @@ -22,7 +33,6 @@ void ClearDma3Requests(void) void ProcessDma3Requests(void) { // NOTE: the fillerA member of the DMA struct is actually u32 value; - // NOTE: gUnknown_0300001C is just a pointer inside the gDma3Requests structure, not a true symbol; feel free to remove u16 total_size; if (gDma3ManagerLocked) @@ -331,7 +341,7 @@ _08000DB2:\n\ mov r5, r12\n\ ldrb r0, [r5]\n\ lsls r0, 4\n\ - ldr r3, =gUnknown_0300001C\n\ + ldr r3, =gDma3Requests + 0x0C\n\ adds r0, r3\n\ ldr r0, [r0]\n\ strh r0, [r1]\n\ @@ -347,7 +357,7 @@ _08000DB2:\n\ bhi _08000DB2\n\ ldrb r0, [r5]\n\ lsls r0, 4\n\ - ldr r5, =gUnknown_0300001C\n\ + ldr r5, =gDma3Requests + 0x0C\n\ adds r0, r5\n\ ldr r0, [r0]\n\ strh r0, [r1]\n\ diff --git a/src/main.c b/src/main.c index 5707e18af..665a4dd84 100644 --- a/src/main.c +++ b/src/main.c @@ -77,7 +77,7 @@ const IntrFunc gIntrTableTemplate[] = #define INTR_COUNT ((int)(sizeof(gIntrTableTemplate)/sizeof(IntrFunc))) -extern u16 gUnknown_03000000; +static u16 gUnknown_03000000; extern u16 gKeyRepeatStartDelay; extern u8 gUnknown_030022B4; diff --git a/src/malloc.c b/src/malloc.c index ccb2f7d20..1d64351c3 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -2,6 +2,7 @@ static void *sHeapStart; static u32 sHeapSize; +static u32 malloc_c_unused_0300000c; // needed to align dma3_manager.o(.bss) #define MALLOC_SYSTEM_ID 0xA3A3 diff --git a/sym_bss.txt b/sym_bss.txt index aacfa59a0..2cc5279f3 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -1,27 +1,7 @@ gUnknown_03000000: @ 3000000 - .space 0x4 - + .include "src/main.o" .include "src/malloc.o" - - .align 4 -gDma3Requests: @ 3000010 - .space 0xC - -gUnknown_0300001C: @ 300001C - .space 0xD4 - -gUnknown_030000F0: @ 30000F0 - .space 0xA - -gUnknown_030000FA: @ 30000FA - .space 0x716 - -gDma3ManagerLocked: @ 3000810 - .space 0x1 - -gDma3RequestCursor: @ 3000811 - .space 0x7 - + .include "src/dma3_manager.o" .include "src/gpu_regs.o" .include "src/bg.o" .include "src/text.o" From f4827632f2c2e78cdc798176f61e7ff26539a957 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 09:56:08 -0400 Subject: [PATCH 324/342] BSS: link.o --- src/link.c | 56 ++++++++++++++++++++++++++++++++++++++++ sym_bss.txt | 74 +---------------------------------------------------- 2 files changed, 57 insertions(+), 73 deletions(-) create mode 100644 src/link.c diff --git a/src/link.c b/src/link.c new file mode 100644 index 000000000..ae2cd1992 --- /dev/null +++ b/src/link.c @@ -0,0 +1,56 @@ + +// Includes +#include "global.h" + +// Static type declarations + +struct BlockTransfer +{ + u16 pos; + u16 size; + void *src; + bool8 active; + u8 multiplayerId; +}; + +struct LinkTestBGInfo +{ + u32 screenBaseBlock; + u32 paletteNum; + u32 dummy_8; + u32 dummy_C; +}; + +// Static RAM declarations + +IWRAM_DATA struct BlockTransfer gUnknown_03000D10; +IWRAM_DATA u32 link_c_unused_03000d1c; +IWRAM_DATA struct BlockTransfer gUnknown_03000D20[4]; +IWRAM_DATA u32 gUnknown_03000D50; +IWRAM_DATA u32 gUnknown_03000D54; +IWRAM_DATA u8 gUnknown_03000D58; +IWRAM_DATA u32 gUnknown_03000D5C; +IWRAM_DATA u32 gUnknown_03000D60; +IWRAM_DATA u8 gUnknown_03000D64[4]; // not really, but won't match otherwise +IWRAM_DATA u8 gUnknown_03000D68[4]; +IWRAM_DATA u8 gUnknown_03000D6C; +IWRAM_DATA bool8 gUnknown_03000D6D; +IWRAM_DATA u16 gUnknown_03000D6E; +IWRAM_DATA u16 gUnknown_03000D70; +IWRAM_DATA u8 gUnknown_03000D72; +IWRAM_DATA u8 gUnknown_03000D73; +IWRAM_DATA u8 gUnknown_03000D74[4]; // not really, but won't match otherwise +IWRAM_DATA u8 gUnknown_03000D78[8]; // not really, but won't match otherwise +IWRAM_DATA u8 gUnknown_03000D80[16]; +IWRAM_DATA u16 gUnknown_03000D90[8]; +IWRAM_DATA u32 gUnknown_03000DA0; +IWRAM_DATA u32 gUnknown_03000DA4; +IWRAM_DATA void *gUnknown_03000DA8; +IWRAM_DATA void *gUnknown_03000DAC; +IWRAM_DATA bool32 gUnknown_03000DB0; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/sym_bss.txt b/sym_bss.txt index 2cc5279f3..efd129fd7 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -6,79 +6,7 @@ gUnknown_03000000: @ 3000000 .include "src/bg.o" .include "src/text.o" .include "src/sprite.o" - -gUnknown_03000D10: @ 3000D10 - .space 0x10 - -gUnknown_03000D20: @ 3000D20 - .space 0x30 - -gUnknown_03000D50: @ 3000D50 - .space 0x4 - -gUnknown_03000D54: @ 3000D54 - .space 0x4 - -gUnknown_03000D58: @ 3000D58 - .space 0x4 - -gUnknown_03000D5C: @ 3000D5C - .space 0x4 - -gUnknown_03000D60: @ 3000D60 - .space 0x4 - -gUnknown_03000D64: @ 3000D64 - .space 0x4 - -gUnknown_03000D68: @ 3000D68 - .space 0x4 - -gUnknown_03000D6C: @ 3000D6C - .space 0x1 - -gUnknown_03000D6D: @ 3000D6D - .space 0x1 - -gUnknown_03000D6E: @ 3000D6E - .space 0x2 - -gUnknown_03000D70: @ 3000D70 - .space 0x2 - -gUnknown_03000D72: @ 3000D72 - .space 0x1 - -gUnknown_03000D73: @ 3000D73 - .space 0x1 - -gUnknown_03000D74: @ 3000D74 - .space 0x4 - -gUnknown_03000D78: @ 3000D78 - .space 0x8 - -gUnknown_03000D80: @ 3000D80 - .space 0x10 - -gUnknown_03000D90: @ 3000D90 - .space 0x10 - -gUnknown_03000DA0: @ 3000DA0 - .space 0x4 - -gUnknown_03000DA4: @ 3000DA4 - .space 0x4 - -gUnknown_03000DA8: @ 3000DA8 - .space 0x4 - -gUnknown_03000DAC: @ 3000DAC - .space 0x4 - -gUnknown_03000DB0: @ 3000DB0 - .space 0x8 - + .include "src/link.o" .include "src/rtc.o" gUnknown_03000DD0: @ 3000DD0 From 24da6e48ffe63916d1ffeb8fec720c63fdfac172 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 10:01:52 -0400 Subject: [PATCH 325/342] BSS: main_menu.o, battle_1.o --- src/battle_1.c | 17 +++++++++++++++++ src/main_menu.c | 15 +++++++++++++++ sym_bss.txt | 15 ++------------- 3 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 src/battle_1.c create mode 100644 src/main_menu.c diff --git a/src/battle_1.c b/src/battle_1.c new file mode 100644 index 000000000..5e4ef5583 --- /dev/null +++ b/src/battle_1.c @@ -0,0 +1,17 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA u32 gUnknown_03000DD4; +IWRAM_DATA u32 gUnknown_03000DD8; +IWRAM_DATA u32 gUnknown_03000DDC; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/src/main_menu.c b/src/main_menu.c new file mode 100644 index 000000000..8608159c2 --- /dev/null +++ b/src/main_menu.c @@ -0,0 +1,15 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA u8 gUnknown_03000DD0; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/sym_bss.txt b/sym_bss.txt index efd129fd7..f9ce07a4b 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -8,19 +8,8 @@ gUnknown_03000000: @ 3000000 .include "src/sprite.o" .include "src/link.o" .include "src/rtc.o" - -gUnknown_03000DD0: @ 3000DD0 - .space 0x4 - -gUnknown_03000DD4: @ 3000DD4 - .space 0x4 - -gUnknown_03000DD8: @ 3000DD8 - .space 0x4 - -gUnknown_03000DDC: @ 3000DDC - .space 0x4 - + .include "src/main_menu.o" + .include "src/battle_1.o" .include "src/egg_hatch.o" .space 0x4 @ why the gap? From 8620b9203d876764404622d2d6d8711812928979 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 10:12:35 -0400 Subject: [PATCH 326/342] BSS: berry_blender.o --- src/berry_blender.c | 18 ++++++++++++++++++ sym_bss.txt | 16 +--------------- 2 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 src/berry_blender.c diff --git a/src/berry_blender.c b/src/berry_blender.c new file mode 100644 index 000000000..d9cc86f7f --- /dev/null +++ b/src/berry_blender.c @@ -0,0 +1,18 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations +IWRAM_DATA u32 berry_blender_c_unused_03000de4; +IWRAM_DATA s16 gUnknown_03000DE8[8]; +IWRAM_DATA s16 gUnknown_03000DF8[6]; +IWRAM_DATA s16 gUnknown_03000E04; +IWRAM_DATA s16 gUnknown_03000E06; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/sym_bss.txt b/sym_bss.txt index f9ce07a4b..b05a40e98 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -11,21 +11,7 @@ gUnknown_03000000: @ 3000000 .include "src/main_menu.o" .include "src/battle_1.o" .include "src/egg_hatch.o" - -.space 0x4 @ why the gap? - -gUnknown_03000DE8: @ 3000DE8 - .space 0x10 - -gUnknown_03000DF8: @ 3000DF8 - .space 0xC - -gUnknown_03000E04: @ 3000E04 - .space 0x2 - -gUnknown_03000E06: @ 3000E06 - .space 0x2 - + .include "src/berry_blender.o" .include "src/play_time.o" .align 2 From 64631bac9365cf8df3798d9d3be8746d4d641685 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 13:08:28 -0400 Subject: [PATCH 327/342] BSS: rom4.o, field_camera.o --- src/berry_blender.c | 2 +- src/field_camera.c | 28 ++++++++++++++++++++++++++++ src/rom4.c | 19 +++++++++++++++++++ sym_bss.txt | 37 +++---------------------------------- 4 files changed, 51 insertions(+), 35 deletions(-) create mode 100644 src/field_camera.c create mode 100644 src/rom4.c diff --git a/src/berry_blender.c b/src/berry_blender.c index d9cc86f7f..db50fe4c4 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -5,7 +5,7 @@ // Static type declarations // Static RAM declarations -IWRAM_DATA u32 berry_blender_c_unused_03000de4; +IWRAM_DATA void *berry_blender_c_unused_03000de4; IWRAM_DATA s16 gUnknown_03000DE8[8]; IWRAM_DATA s16 gUnknown_03000DF8[6]; IWRAM_DATA s16 gUnknown_03000E04; diff --git a/src/field_camera.c b/src/field_camera.c new file mode 100644 index 000000000..17ced6aa5 --- /dev/null +++ b/src/field_camera.c @@ -0,0 +1,28 @@ + +// Includes +#include "global.h" + +// Static type declarations + +struct FieldCameraUnknownStruct +{ + u8 unk0; + u8 unk1; + u8 unk2; + u8 unk3; + bool8 unk4; +}; + +// Static RAM declarations + +IWRAM_DATA struct FieldCameraUnknownStruct gUnknown_03000E20; +IWRAM_DATA s16 gUnknown_03000E28; +IWRAM_DATA s16 gUnknown_03000E2A; +IWRAM_DATA u8 gUnknown_03000E2C; +IWRAM_DATA void (*gUnknown_03000E30)(void); + +// Static ROM declarations + +// .rodata + +// .text diff --git a/src/rom4.c b/src/rom4.c new file mode 100644 index 000000000..c538595f2 --- /dev/null +++ b/src/rom4.c @@ -0,0 +1,19 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations +IWRAM_DATA void *gUnknown_03000E0C; +IWRAM_DATA u8 gUnknown_03000E10[4]; +IWRAM_DATA u8 (*gUnknown_03000E14)(u32); +IWRAM_DATA u8 gUnknown_03000E18; +IWRAM_DATA u8 gUnknown_03000E19; +IWRAM_DATA void *rom4_c_unused_03000e1c; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/sym_bss.txt b/sym_bss.txt index b05a40e98..c81ce12be 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -13,40 +13,9 @@ gUnknown_03000000: @ 3000000 .include "src/egg_hatch.o" .include "src/berry_blender.o" .include "src/play_time.o" - -.align 2 - -gUnknown_03000E0C: @ 3000E0C - .space 0x4 - -gUnknown_03000E10: @ 3000E10 - .space 0x4 - -gUnknown_03000E14: @ 3000E14 - .space 0x4 - -gUnknown_03000E18: @ 3000E18 - .space 0x1 - -gUnknown_03000E19: @ 3000E19 - .space 0x7 - -gUnknown_03000E20: @ 3000E20 - .space 0x8 - -gUnknown_03000E28: @ 3000E28 - .space 0x2 - -gUnknown_03000E2A: @ 3000E2A - .space 0x2 - -gUnknown_03000E2C: @ 3000E2C - .space 0x4 - -gUnknown_03000E30: @ 3000E30 - .space 0x8 - -.include "src/script.o" + .include "src/rom4.o" + .include "src/field_camera.o" + .include "src/script.o" .align 2 gUnknown_03000F30: @ 3000F30 From 1a55966f1b0341881e268379f976d919aa1e257a Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Sat, 30 Sep 2017 16:37:53 -0500 Subject: [PATCH 328/342] Extract baseroms from battle_interface --- data/battle_7.s | 6 +- data/battle_interface.s | 158 ++++++++++++++++-- data/graphics.s | 27 ++- graphics/battle_interface/ball_display.pal | 19 +++ graphics/battle_interface/ball_display.png | Bin 0 -> 191 bytes graphics/battle_interface/ball_status_bar.pal | 19 +++ graphics/battle_interface/ball_status_bar.png | Bin 0 -> 174 bytes 7 files changed, 202 insertions(+), 27 deletions(-) create mode 100644 graphics/battle_interface/ball_display.pal create mode 100644 graphics/battle_interface/ball_display.png create mode 100644 graphics/battle_interface/ball_status_bar.pal create mode 100644 graphics/battle_interface/ball_status_bar.png diff --git a/data/battle_7.s b/data/battle_7.s index 4b0eea65a..ffd2e8daa 100644 --- a/data/battle_7.s +++ b/data/battle_7.s @@ -40,7 +40,5 @@ gUnknown_0832C108:: @ 832C108 .align 2 gUnknown_0832C128:: @ 832C128 - obj_pal gUnknown_08C11B9C, 0xd6ff - obj_pal gUnknown_08C11BBC, 0xd704 - - .byte 0x00, 0x40, 0x00, 0xc0, 0x00, 0x04, 0x00, 0x00 + obj_pal gBattleInterface_BallStatusBarPal, 0xd6ff + obj_pal gBattleInterface_BallDisplayPal, 0xd704 diff --git a/data/battle_interface.s b/data/battle_interface.s index 3fd9060fd..766f34752 100644 --- a/data/battle_interface.s +++ b/data/battle_interface.s @@ -4,53 +4,177 @@ .section .rodata .align 2, 0 +gUnknown_0832C138:: @ 832C138 + .byte 0x00, 0x40, 0x00, 0xc0, 0x00, 0x04, 0x00, 0x00 + + .align 2 gUnknown_0832C140:: @ 832C140 - .incbin "baserom.gba", 0x32c140, 0x30 + spr_template 0xd6ff, 0xd6ff, gUnknown_0832C138, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy + .align 2 +gUnknown_0832C158:: @ 832C158 + spr_template 0xd700, 0xd6ff, gUnknown_0832C138, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy + + .align 2 gUnknown_0832C170:: @ 832C170 - .incbin "baserom.gba", 0x32c170, 0x30 + spr_template 0xd701, 0xd6ff, gUnknown_0832C138, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy + .align 2 +gUnknown_0832C188:: @ 832C188 + spr_template 0xd702, 0xd6ff, gUnknown_0832C138, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy + + .align 2 gUnknown_0832C1A0:: @ 832C1A0 - .incbin "baserom.gba", 0x32c1a0, 0x20 + spr_template 0xd70b, 0xd6ff, gUnknown_0832C138, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy + .align 2 +gUnknown_0832C1B8:: @ 832C1B8 + .byte 0x00, 0x40, 0x00, 0x40, 0x00, 0x04, 0x00, 0x00 + + .align 2 gUnknown_0832C1C0:: @ 832C1C0 - .incbin "baserom.gba", 0x32c1c0, 0xcc + spr_template 0xd704, 0xd704, gUnknown_0832C1B8, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80728B4 + .align 2 +gUnknown_0832C1D8:: @ 832C1D8 + spr_template 0xd705, 0xd704, gUnknown_0832C1B8, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80728B4 + + .align 2 +gUnknown_0832C1F0:: @ 832C1F0 + spr_template 0xd706, 0xd704, gUnknown_0832C1B8, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80728B4 + + .align 2 +gUnknown_0832C208:: @ 832C208 + spr_template 0xd707, 0xd704, gUnknown_0832C1B8, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80728B4 + + .align 2 +gUnknown_0832C220:: @ 832C220 + .byte 0xf0, 0x00, 0x0d, 0x40, 0x30, 0x00, 0x08, 0x42 + .byte 0xf0, 0x20, 0x05, 0x43, 0x10, 0x20, 0x45, 0x43 + .byte 0x30, 0x20, 0x85, 0x43 + + .align 2 +gUnknown_0832C234:: @ 832C234 + .byte 0xf0, 0x00, 0x0d, 0x44, 0x30, 0x00, 0x08, 0x46 + .byte 0xf0, 0x20, 0x05, 0x47, 0x10, 0x20, 0x45, 0x47 + .byte 0x30, 0x20, 0x85, 0x47 + + .align 2 +gUnknown_0832C248:: @ 832C248 + .byte 0xf0, 0x00, 0x0d, 0x40, 0x30, 0x00, 0x08, 0x42 + + .align 2 +gUnknown_0832C250:: @ 832C250 + .byte 0xf0, 0x00, 0x0d, 0x40, 0x30, 0x00, 0x08, 0x42 + + .align 2 +gUnknown_0832C258:: @ 832C258 + .byte 0xf0, 0x00, 0x05, 0x40, 0x10, 0x00, 0x45, 0x40 + + .align 2 +gUnknown_0832C260:: @ 832C260 + .byte 0xf0, 0x00, 0x05, 0x40, 0x10, 0x00, 0x45, 0x40 + .byte 0xe0, 0x00, 0x80, 0x40 + + .align 2 +gUnknown_0832C26C:: @ 832C26C + .4byte 0x00000005, gUnknown_0832C220 + .4byte 0x00000002, gUnknown_0832C248 + .4byte 0x00000005, gUnknown_0832C234 + .4byte 0x00000002, gUnknown_0832C250 + + .align 2 gUnknown_0832C28C:: @ 832C28C - .incbin "baserom.gba", 0x32c28c, 0x38 + .4byte 0x00000002, gUnknown_0832C258 + .4byte 0x00000003, gUnknown_0832C260 + .align 2 +gUnknown_0832C29C:: @ 832C29C + .byte 0xa0, 0x00, 0x05, 0x40, 0xc0, 0x00, 0x45, 0x40 + .byte 0xe0, 0x00, 0x85, 0x40, 0x00, 0x00, 0xc5, 0x40 + + .align 2 +gUnknown_0832C2AC:: @ 832C2AC + .byte 0xa0, 0x00, 0x05, 0x40, 0xc0, 0x00, 0x45, 0x40 + .byte 0xe0, 0x00, 0x85, 0x40, 0x00, 0x00, 0x85, 0x40 + .byte 0x20, 0x00, 0x85, 0x40, 0x40, 0x00, 0xc5, 0x40 + + .align 2 gUnknown_0832C2C4:: @ 832C2C4 - .incbin "baserom.gba", 0x32c2c4, 0x8 + .4byte 0x00000004, gUnknown_0832C29C + .align 2 gUnknown_0832C2CC:: @ 832C2CC - .incbin "baserom.gba", 0x32c2cc, 0x68 + .4byte 0x00000006, gUnknown_0832C2AC + .align 2 +gUnknown_0832C2D4:: @ 832C2D4 + .2byte 0x0000, 0x0000, 0x3333, 0x3333, 0x4444, 0x4444, 0x2222, 0x2222 + .2byte 0x7777, 0x7777, 0x7777, 0x7777, 0x7777, 0x7777, 0x7777, 0x7777 + + .2byte 0x0000, 0x0000, 0x3333, 0x3333, 0x4444, 0x4444, 0x2222, 0x2222 + .2byte 0x7777, 0x7777, 0x7777, 0x7717, 0x1777, 0x7177, 0x7777, 0x7771 + + .2byte 0x0000, 0x0000, 0x3333, 0x3333, 0x4444, 0x4444, 0x2222, 0x2222 + .2byte 0x7777, 0x7777, 0x7777, 0x7111, 0x7777, 0x7171, 0x7777, 0x7111 + + .align 2 gUnknown_0832C334:: @ 832C334 - .incbin "baserom.gba", 0x32c334, 0x8 + obj_tiles gBattleInterface_BallStatusBarGfx, 0x0200, 0xd70c + .align 2 gUnknown_0832C33C:: @ 832C33C - .incbin "baserom.gba", 0x32c33c, 0x8 + obj_pal gBattleInterface_BallStatusBarPal, 0xd710 + .align 2 gUnknown_0832C344:: @ 832C344 - .incbin "baserom.gba", 0x32c344, 0x8 + obj_pal gBattleInterface_BallDisplayPal, 0xd712 + .align 2 gUnknown_0832C34C:: @ 832C34C - .incbin "baserom.gba", 0x32c34c, 0x18 + obj_tiles gBattleInterface_BallDisplayGfx, 0x0080, 0xd714 + .align 2 +gUnknown_0832C354:: @ 832C354 + .byte 0x00, 0x40, 0x00, 0xc0, 0x00, 0x04, 0x00, 0x00 + + .align 2 +gUnknown_0832C35C:: @ 832C35C + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00 + + .align 2 gUnknown_0832C364:: @ 832C364 - .incbin "baserom.gba", 0x32c364, 0x30 + spr_template 0xd70c, 0xd710, gUnknown_0832C138, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8074078 + .align 2 +gUnknown_0832C37C:: @ 832C37C + spr_template 0xd70c, 0xd710, gUnknown_0832C138, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8074078 + + .align 2 gUnknown_0832C394:: @ 832C394 - .incbin "baserom.gba", 0x32c394, 0x30 + spr_template 0xd714, 0xd712, gUnknown_0832C35C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80740C4 + .align 2 +gUnknown_0832C3AC:: @ 832C3AC + spr_template 0xd714, 0xd712, gUnknown_0832C35C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_80740C4 + + .align 2 gUnknown_0832C3C4:: @ 832C3C4 - .incbin "baserom.gba", 0x32c3c4, 0x14 + .byte 0xfc, 0x01, 0x01, 0xfc, 0x02, 0x02, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 + .align 2 gUnknown_0832C3D8:: @ 832C3D8 - .incbin "baserom.gba", 0x32c3d8, 0x14 + .byte 0xfc, 0x01, 0x01, 0xfc, 0x02, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 + .align 2 gUnknown_0832C3EC:: @ 832C3EC - .incbin "baserom.gba", 0x32c3ec, 0xc + .byte 0x98, 0x61, 0xf7, 0x0e, 0x94, 0x46, 0xd1, 0x72 + .byte 0xdc, 0x29, 0x00, 0x00 + .align 2 gUnknown_0832C3F8:: @ 832C3F8 - .incbin "baserom.gba", 0x32c3f8, 0x8 + .byte 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00 diff --git a/data/graphics.s b/data/graphics.s index 0fa256449..e206a46f1 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -30,14 +30,25 @@ gUnknown_08C0237C:: @ 8C0237C gUnknown_08C093F0:: @ 8C093F0 .incbin "baserom.gba", 0xc093f0, 0x87ac -gUnknown_08C11B9C:: @ 8C11B9C - .incbin "baserom.gba", 0xc11b9c, 0x20 + .align 2 +gBattleInterface_BallStatusBarPal:: @ 8C11B9C + .incbin "graphics/battle_interface/ball_status_bar.gbapal" -gUnknown_08C11BBC:: @ 8C11BBC - .incbin "baserom.gba", 0xc11bbc, 0x20 + .align 2 +gBattleInterface_BallDisplayPal:: @ 8C11BBC + .incbin "graphics/battle_interface/ball_display.gbapal" + .align 2 gUnknown_08C11BDC:: @ 8C11BDC - .incbin "baserom.gba", 0xc11bdc, 0x52b4 + .incbin "baserom.gba", 0xc11bdc, 0x840 + + .align 2 +gBattleInterface_BallDisplayGfx:: @ 8C1241C + .incbin "graphics/battle_interface/ball_display.4bpp" + + .align 2 +gUnknown_08C1249C:: @ 8C1249C + .incbin "baserom.gba", 0xc1249c, 0x49f4 gUnknown_08C16E90:: @ 8C16E90 .incbin "baserom.gba", 0xc16e90, 0x118 @@ -506,7 +517,11 @@ gUnknown_08D8FB9C:: @ 8D8FB9C .incbin "baserom.gba", 0xd8fb9c, 0x24 gUnknown_08D8FBC0:: @ 8D8FBC0 - .incbin "baserom.gba", 0xd8fbc0, 0xb4 + .incbin "baserom.gba", 0xd8fbc0, 0x30 + + .align 2 +gBattleInterface_BallStatusBarGfx:: @ 8D8FBF0 + .incbin "graphics/battle_interface/ball_status_bar.4bpp.lz" .align 2 gMonIcon_Egg:: @ 8D8FC74 diff --git a/graphics/battle_interface/ball_display.pal b/graphics/battle_interface/ball_display.pal new file mode 100644 index 000000000..ea646bb82 --- /dev/null +++ b/graphics/battle_interface/ball_display.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +57 57 57 +255 255 255 +213 205 189 +131 131 139 +74 65 90 +82 106 90 +255 180 123 +246 148 115 +222 106 90 +115 255 172 +90 213 131 +255 230 57 +205 172 8 +255 90 57 +172 65 74 diff --git a/graphics/battle_interface/ball_display.png b/graphics/battle_interface/ball_display.png new file mode 100644 index 0000000000000000000000000000000000000000..0c49d7ac42b4d9bf27c624c6bafd8c9fa6aefff9 GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^3P8-k!VDy{RzH{nqznRlLR^8grKRQn|NpO^-P_#U z?d2F1loj=VOZB%Y#rLwJivO>Py4w8zndR9v9RH&%*Eo9hJn>=&>hbb)aSY*@nVi7E zo8WM8ja0B?grkA()W)kvr#31sN={=4uu;&_)m1ohRJB3zh^mMl!yz8WQ^yJ#6Otb@ mu!SWDw@5meF}LZyU|{%ECHCn39eqWhsSKX3elF{r5}E)6n?q6n literal 0 HcmV?d00001 diff --git a/graphics/battle_interface/ball_status_bar.pal b/graphics/battle_interface/ball_status_bar.pal new file mode 100644 index 000000000..bc8e8f2bc --- /dev/null +++ b/graphics/battle_interface/ball_status_bar.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +65 65 65 +255 255 222 +222 213 180 +197 189 115 +123 148 131 +82 106 98 +32 57 0 +57 82 65 +255 230 0 +255 156 148 +65 205 255 +0 0 255 +0 255 0 +255 0 0 +106 148 255 diff --git a/graphics/battle_interface/ball_status_bar.png b/graphics/battle_interface/ball_status_bar.png new file mode 100644 index 0000000000000000000000000000000000000000..b947a7803a93d36dc0c993d8776f6f5235072a70 GIT binary patch literal 174 zcmeAS@N?(olHy`uVBq!ia0vp^4M5Dn!VDx2e}3f)qznRlLR^8gqod>h|M%`)-Ewqq zarKnupsXYXO9smz$N$e5{?D1>c=kU7!+$Vj$eQw>-|C(aP>-dji(`n!#N>p81dsFu zJWHkruaZ~KU~l46IKj|lqQJr26ri9GR$s{~(7= Date: Sat, 30 Sep 2017 21:19:29 -0400 Subject: [PATCH 329/342] Decompile asm/tileset.s into src/palette.c --- asm/tileset.s | 1785 --------------------------------------------- data/graphics.s | 14 +- data/palette.s | 18 - data/start_menu.s | 2 +- data/tileset.s | 3 + ld_script.txt | 3 +- src/palette.c | 880 +++++++++++++++++++++- src/scrcmd.c | 15 + sym_bss.txt | 28 +- sym_ewram.txt | 3 - 10 files changed, 891 insertions(+), 1860 deletions(-) delete mode 100644 data/palette.s create mode 100644 src/scrcmd.c diff --git a/asm/tileset.s b/asm/tileset.s index 0605c7621..2428f2984 100644 --- a/asm/tileset.s +++ b/asm/tileset.s @@ -5,1789 +5,4 @@ .text - thumb_func_start sub_80A0954 -@ void sub_80A0954() -sub_80A0954: @ 80A0954 - push {lr} - sub sp, 0x4 - ldr r1, =gUnknown_03000F34 - movs r0, 0 - strb r0, [r1] - movs r0, 0 - str r0, [sp] - ldr r1, =gUnknown_02037624 - ldr r2, =0x0500003c - mov r0, sp - bl CpuSet - add sp, 0x4 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A0954 - - thumb_func_start sub_80A0980 -sub_80A0980: @ 80A0980 - push {r4-r6,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r2, 16 - lsrs r6, r2, 16 - ldr r3, =gUnknown_03000F34 - ldrb r0, [r3] - cmp r0, 0x13 - bhi _080A09C0 - ldr r2, =gUnknown_02037624 - adds r1, r0, 0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - str r4, [r0] - ldrb r1, [r3] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r1, r2, 0x4 - adds r0, r1 - str r5, [r0] - ldrb r1, [r3] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - strh r6, [r0, 0x8] - ldrb r0, [r3] - adds r0, 0x1 - strb r0, [r3] -_080A09C0: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A0980 - - thumb_func_start sub_80A09D0 -sub_80A09D0: @ 80A09D0 - push {r4-r6,lr} - movs r3, 0 - ldr r4, =gUnknown_03000F34 - adds r6, r4, 0 - ldrb r0, [r4] - cmp r3, r0 - bge _080A0A02 - ldr r2, =0x040000d4 - ldr r1, =gUnknown_02037624 - movs r5, 0x80 - lsls r5, 24 -_080A09E6: - ldr r0, [r1] - str r0, [r2] - ldr r0, [r1, 0x4] - str r0, [r2, 0x4] - ldrh r0, [r1, 0x8] - lsrs r0, 1 - orrs r0, r5 - str r0, [r2, 0x8] - ldr r0, [r2, 0x8] - adds r1, 0xC - adds r3, 0x1 - ldrb r0, [r4] - cmp r3, r0 - blt _080A09E6 -_080A0A02: - movs r0, 0 - strb r0, [r6] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A09D0 - - thumb_func_start cur_mapheader_run_tileset_funcs_after_some_cpuset -cur_mapheader_run_tileset_funcs_after_some_cpuset: @ 80A0A18 - push {lr} - bl sub_80A0954 - bl cur_mapheader_run_tileset1_func - bl cur_mapheader_run_tileset2_func - pop {r0} - bx r0 - thumb_func_end cur_mapheader_run_tileset_funcs_after_some_cpuset - - thumb_func_start sub_80A0A2C -sub_80A0A2C: @ 80A0A2C - push {lr} - bl cur_mapheader_run_tileset2_func - pop {r0} - bx r0 - thumb_func_end sub_80A0A2C - - thumb_func_start sub_80A0A38 -sub_80A0A38: @ 80A0A38 - push {r4,lr} - bl sub_80A0954 - ldr r2, =gUnknown_03000F36 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - ldr r1, =gUnknown_03000F38 - lsls r0, 16 - lsrs r0, 16 - ldrh r1, [r1] - cmp r0, r1 - bcc _080A0A56 - movs r0, 0 - strh r0, [r2] -_080A0A56: - ldr r4, =gUnknown_03000F3A - ldrh r0, [r4] - adds r0, 0x1 - strh r0, [r4] - ldr r1, =gUnknown_03000F3C - lsls r0, 16 - lsrs r0, 16 - ldrh r1, [r1] - cmp r0, r1 - bcc _080A0A6E - movs r0, 0 - strh r0, [r4] -_080A0A6E: - ldr r0, =gUnknown_03000F40 - ldr r1, [r0] - cmp r1, 0 - beq _080A0A7C - ldrh r0, [r2] - bl _call_via_r1 -_080A0A7C: - ldr r0, =gUnknown_03000F44 - ldr r1, [r0] - cmp r1, 0 - beq _080A0A8A - ldrh r0, [r4] - bl _call_via_r1 -_080A0A8A: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A0A38 - - thumb_func_start cur_mapheader_run_tileset1_func -cur_mapheader_run_tileset1_func: @ 80A0AA8 - push {lr} - ldr r0, =gUnknown_03000F36 - movs r1, 0 - strh r1, [r0] - ldr r0, =gUnknown_03000F38 - strh r1, [r0] - ldr r1, =gUnknown_03000F40 - movs r0, 0 - str r0, [r1] - ldr r0, =gMapHeader - ldr r0, [r0] - ldr r0, [r0, 0x10] - cmp r0, 0 - beq _080A0ACE - ldr r0, [r0, 0x14] - cmp r0, 0 - beq _080A0ACE - bl _call_via_r0 -_080A0ACE: - pop {r0} - bx r0 - .pool - thumb_func_end cur_mapheader_run_tileset1_func - - thumb_func_start cur_mapheader_run_tileset2_func -cur_mapheader_run_tileset2_func: @ 80A0AE4 - push {lr} - ldr r0, =gUnknown_03000F3A - movs r1, 0 - strh r1, [r0] - ldr r0, =gUnknown_03000F3C - strh r1, [r0] - ldr r1, =gUnknown_03000F44 - movs r0, 0 - str r0, [r1] - ldr r0, =gMapHeader - ldr r0, [r0] - ldr r0, [r0, 0x14] - cmp r0, 0 - beq _080A0B0A - ldr r0, [r0, 0x14] - cmp r0, 0 - beq _080A0B0A - bl _call_via_r0 -_080A0B0A: - pop {r0} - bx r0 - .pool - thumb_func_end cur_mapheader_run_tileset2_func - - thumb_func_start TilesetCb_General -TilesetCb_General: @ 80A0B20 - ldr r1, =gUnknown_03000F36 - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F38 - movs r2, 0x80 - lsls r2, 1 - adds r0, r2, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F40 - ldr r0, =sub_80A0B70 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_General - - thumb_func_start TilesetCb_InsideBuilding -TilesetCb_InsideBuilding: @ 80A0B48 - ldr r1, =gUnknown_03000F36 - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F38 - movs r2, 0x80 - lsls r2, 1 - adds r0, r2, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F40 - ldr r0, =sub_80A0BB4 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_InsideBuilding - - thumb_func_start sub_80A0B70 -sub_80A0B70: @ 80A0B70 - push {r4,r5,lr} - lsls r5, r0, 16 - movs r0, 0xF0 - lsls r0, 12 - ands r0, r5 - lsrs r4, r0, 16 - cmp r4, 0 - bne _080A0B86 - lsrs r0, r5, 20 - bl sub_80A0BCC -_080A0B86: - cmp r4, 0x1 - bne _080A0B90 - lsrs r0, r5, 20 - bl sub_80A0BF4 -_080A0B90: - cmp r4, 0x2 - bne _080A0B9A - lsrs r0, r5, 20 - bl sub_80A0C1C -_080A0B9A: - cmp r4, 0x3 - bne _080A0BA4 - lsrs r0, r5, 20 - bl sub_80A0C44 -_080A0BA4: - cmp r4, 0x4 - bne _080A0BAE - lsrs r0, r5, 20 - bl sub_80A12AC -_080A0BAE: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80A0B70 - - thumb_func_start sub_80A0BB4 -sub_80A0BB4: @ 80A0BB4 - push {lr} - lsls r1, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r1 - cmp r0, 0 - bne _080A0BC8 - lsrs r0, r1, 19 - bl sub_80A1688 -_080A0BC8: - pop {r0} - bx r0 - thumb_func_end sub_80A0BB4 - - thumb_func_start sub_80A0BCC -sub_80A0BCC: @ 80A0BCC - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08510764 - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06003f80 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A0BCC - - thumb_func_start sub_80A0BF4 -sub_80A0BF4: @ 80A0BF4 - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x7 - ands r0, r1 - ldr r1, =gUnknown_08512574 - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x06003600 - movs r2, 0xF0 - lsls r2, 2 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A0BF4 - - thumb_func_start sub_80A0C1C -sub_80A0C1C: @ 80A0C1C - push {lr} - lsls r0, 16 - movs r1, 0xE0 - lsls r1, 11 - ands r1, r0 - ldr r0, =gUnknown_08512E54 - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06003a00 - movs r2, 0xA0 - lsls r2, 1 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A0C1C - - thumb_func_start sub_80A0C44 -sub_80A0C44: @ 80A0C44 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08513174 - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06003e00 - movs r2, 0xC0 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A0C44 - - thumb_func_start TilesetCb_Petalburg -TilesetCb_Petalburg: @ 80A0C6C - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - movs r0, 0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Petalburg - - thumb_func_start TilesetCb_Rustboro -TilesetCb_Rustboro: @ 80A0C94 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A103C - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Rustboro - - thumb_func_start TilesetCb_Dewford -TilesetCb_Dewford: @ 80A0CC0 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A10B8 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Dewford - - thumb_func_start TilesetCb_Slateport -TilesetCb_Slateport: @ 80A0CEC - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A10D0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Slateport - - thumb_func_start TilesetCb_Mauville -TilesetCb_Mauville: @ 80A0D18 - ldr r1, =gUnknown_03000F3A - ldr r0, =gUnknown_03000F36 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A10E8 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Mauville - - thumb_func_start TilesetCb_Lavaridge -TilesetCb_Lavaridge: @ 80A0D48 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A115C - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Lavaridge - - thumb_func_start TilesetCb_Fallarbor -TilesetCb_Fallarbor: @ 80A0D74 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - movs r0, 0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Fallarbor - - thumb_func_start TilesetCb_Fortree -TilesetCb_Fortree: @ 80A0D9C - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - movs r0, 0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Fortree - - thumb_func_start TilesetCb_Lilycove -TilesetCb_Lilycove: @ 80A0DC4 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - movs r0, 0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Lilycove - - thumb_func_start TilesetCb_Mossdeep -TilesetCb_Mossdeep: @ 80A0DEC - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - movs r0, 0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Mossdeep - - thumb_func_start TilesetCb_EverGrande -TilesetCb_EverGrande: @ 80A0E14 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A1188 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_EverGrande - - thumb_func_start TilesetCb_Pacifidlog -TilesetCb_Pacifidlog: @ 80A0E40 - ldr r1, =gUnknown_03000F3A - ldr r0, =gUnknown_03000F36 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A11FC - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Pacifidlog - - thumb_func_start TilesetCb_Sootopolis -TilesetCb_Sootopolis: @ 80A0E70 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A122C - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Sootopolis - - thumb_func_start TilesetCb_BattleFrontierOutsideWest -TilesetCb_BattleFrontierOutsideWest: @ 80A0E9C - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A127C - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_BattleFrontierOutsideWest - - thumb_func_start TilesetCb_BattleFrontierOutsideEast -TilesetCb_BattleFrontierOutsideEast: @ 80A0EC8 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A1294 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_BattleFrontierOutsideEast - - thumb_func_start TilesetCb_Underwater -TilesetCb_Underwater: @ 80A0EF4 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - movs r0, 0x80 - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A1244 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Underwater - - thumb_func_start TilesetCb_SootopolisGym -TilesetCb_SootopolisGym: @ 80A0F18 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - movs r0, 0xF0 - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A15D8 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_SootopolisGym - - thumb_func_start TilesetCb_Cave -TilesetCb_Cave: @ 80A0F3C - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A1260 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Cave - - thumb_func_start TilesetCb_EliteFour -TilesetCb_EliteFour: @ 80A0F68 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - movs r0, 0x80 - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A15F0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_EliteFour - - thumb_func_start TilesetCb_MauvilleGym -TilesetCb_MauvilleGym: @ 80A0F8C - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A15C0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_MauvilleGym - - thumb_func_start TilesetCb_BikeShop -TilesetCb_BikeShop: @ 80A0FB8 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A161C - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_BikeShop - - thumb_func_start TilesetCb_BattlePyramid -TilesetCb_BattlePyramid: @ 80A0FE4 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A1634 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_BattlePyramid - - thumb_func_start TilesetCb_BattleDome -TilesetCb_BattleDome: @ 80A1010 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A1658 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_BattleDome - - thumb_func_start sub_80A103C -sub_80A103C: @ 80A103C - push {r4-r6,lr} - lsls r5, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r5 - lsrs r6, r0, 16 - cmp r6, 0 - bne _080A105C - lsrs r4, r5, 19 - adds r0, r4, 0 - movs r1, 0 - bl sub_80A1434 - adds r0, r4, 0 - bl sub_80A1470 -_080A105C: - cmp r6, 0x1 - bne _080A1068 - lsrs r0, r5, 19 - movs r1, 0x1 - bl sub_80A1434 -_080A1068: - cmp r6, 0x2 - bne _080A1074 - lsrs r0, r5, 19 - movs r1, 0x2 - bl sub_80A1434 -_080A1074: - cmp r6, 0x3 - bne _080A1080 - lsrs r0, r5, 19 - movs r1, 0x3 - bl sub_80A1434 -_080A1080: - cmp r6, 0x4 - bne _080A108C - lsrs r0, r5, 19 - movs r1, 0x4 - bl sub_80A1434 -_080A108C: - cmp r6, 0x5 - bne _080A1098 - lsrs r0, r5, 19 - movs r1, 0x5 - bl sub_80A1434 -_080A1098: - cmp r6, 0x6 - bne _080A10A4 - lsrs r0, r5, 19 - movs r1, 0x6 - bl sub_80A1434 -_080A10A4: - cmp r6, 0x7 - bne _080A10B0 - lsrs r0, r5, 19 - movs r1, 0x7 - bl sub_80A1434 -_080A10B0: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_80A103C - - thumb_func_start sub_80A10B8 -sub_80A10B8: @ 80A10B8 - push {lr} - lsls r1, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r1 - cmp r0, 0 - bne _080A10CC - lsrs r0, r1, 19 - bl sub_80A1520 -_080A10CC: - pop {r0} - bx r0 - thumb_func_end sub_80A10B8 - - thumb_func_start sub_80A10D0 -sub_80A10D0: @ 80A10D0 - push {lr} - lsls r1, r0, 16 - movs r0, 0xF0 - lsls r0, 12 - ands r0, r1 - cmp r0, 0 - bne _080A10E4 - lsrs r0, r1, 20 - bl sub_80A1598 -_080A10E4: - pop {r0} - bx r0 - thumb_func_end sub_80A10D0 - - thumb_func_start sub_80A10E8 -sub_80A10E8: @ 80A10E8 - push {r4,r5,lr} - lsls r4, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r4 - lsrs r5, r0, 16 - cmp r5, 0 - bne _080A1100 - lsrs r0, r4, 19 - movs r1, 0 - bl sub_80A1394 -_080A1100: - cmp r5, 0x1 - bne _080A110C - lsrs r0, r4, 19 - movs r1, 0x1 - bl sub_80A1394 -_080A110C: - cmp r5, 0x2 - bne _080A1118 - lsrs r0, r4, 19 - movs r1, 0x2 - bl sub_80A1394 -_080A1118: - cmp r5, 0x3 - bne _080A1124 - lsrs r0, r4, 19 - movs r1, 0x3 - bl sub_80A1394 -_080A1124: - cmp r5, 0x4 - bne _080A1130 - lsrs r0, r4, 19 - movs r1, 0x4 - bl sub_80A1394 -_080A1130: - cmp r5, 0x5 - bne _080A113C - lsrs r0, r4, 19 - movs r1, 0x5 - bl sub_80A1394 -_080A113C: - cmp r5, 0x6 - bne _080A1148 - lsrs r0, r4, 19 - movs r1, 0x6 - bl sub_80A1394 -_080A1148: - cmp r5, 0x7 - bne _080A1154 - lsrs r0, r4, 19 - movs r1, 0x7 - bl sub_80A1394 -_080A1154: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80A10E8 - - thumb_func_start sub_80A115C -sub_80A115C: @ 80A115C - push {r4,r5,lr} - lsls r4, r0, 16 - movs r0, 0xF0 - lsls r0, 12 - ands r0, r4 - lsrs r5, r0, 16 - cmp r5, 0 - bne _080A1176 - lsrs r0, r4, 20 - lsls r0, 24 - lsrs r0, 24 - bl sub_80A12D4 -_080A1176: - cmp r5, 0x1 - bne _080A1180 - lsrs r0, r4, 20 - bl sub_80A1498 -_080A1180: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80A115C - - thumb_func_start sub_80A1188 -sub_80A1188: @ 80A1188 - push {r4,r5,lr} - lsls r4, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r4 - lsrs r5, r0, 16 - cmp r5, 0 - bne _080A11A0 - lsrs r0, r4, 19 - movs r1, 0 - bl sub_80A14C0 -_080A11A0: - cmp r5, 0x1 - bne _080A11AC - lsrs r0, r4, 19 - movs r1, 0x1 - bl sub_80A14C0 -_080A11AC: - cmp r5, 0x2 - bne _080A11B8 - lsrs r0, r4, 19 - movs r1, 0x2 - bl sub_80A14C0 -_080A11B8: - cmp r5, 0x3 - bne _080A11C4 - lsrs r0, r4, 19 - movs r1, 0x3 - bl sub_80A14C0 -_080A11C4: - cmp r5, 0x4 - bne _080A11D0 - lsrs r0, r4, 19 - movs r1, 0x4 - bl sub_80A14C0 -_080A11D0: - cmp r5, 0x5 - bne _080A11DC - lsrs r0, r4, 19 - movs r1, 0x5 - bl sub_80A14C0 -_080A11DC: - cmp r5, 0x6 - bne _080A11E8 - lsrs r0, r4, 19 - movs r1, 0x6 - bl sub_80A14C0 -_080A11E8: - cmp r5, 0x7 - bne _080A11F4 - lsrs r0, r4, 19 - movs r1, 0x7 - bl sub_80A14C0 -_080A11F4: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80A1188 - - thumb_func_start sub_80A11FC -sub_80A11FC: @ 80A11FC - push {r4,r5,lr} - lsls r4, r0, 16 - movs r0, 0xF0 - lsls r0, 12 - ands r0, r4 - lsrs r5, r0, 16 - cmp r5, 0 - bne _080A1216 - lsrs r0, r4, 20 - lsls r0, 24 - lsrs r0, 24 - bl sub_80A131C -_080A1216: - cmp r5, 0x1 - bne _080A1224 - lsrs r0, r4, 20 - lsls r0, 24 - lsrs r0, 24 - bl sub_80A136C -_080A1224: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80A11FC - - thumb_func_start sub_80A122C -sub_80A122C: @ 80A122C - push {lr} - lsls r1, r0, 16 - movs r0, 0xF0 - lsls r0, 12 - ands r0, r1 - cmp r0, 0 - bne _080A1240 - lsrs r0, r1, 20 - bl sub_80A1798 -_080A1240: - pop {r0} - bx r0 - thumb_func_end sub_80A122C - - thumb_func_start sub_80A1244 -sub_80A1244: @ 80A1244 - push {lr} - lsls r1, r0, 16 - movs r0, 0xF0 - lsls r0, 12 - ands r0, r1 - cmp r0, 0 - bne _080A125C - lsrs r0, r1, 20 - lsls r0, 24 - lsrs r0, 24 - bl sub_80A1344 -_080A125C: - pop {r0} - bx r0 - thumb_func_end sub_80A1244 - - thumb_func_start sub_80A1260 -sub_80A1260: @ 80A1260 - push {lr} - lsls r1, r0, 16 - movs r0, 0xF0 - lsls r0, 12 - ands r0, r1 - lsrs r0, 16 - cmp r0, 0x1 - bne _080A1276 - lsrs r0, r1, 20 - bl sub_80A14F8 -_080A1276: - pop {r0} - bx r0 - thumb_func_end sub_80A1260 - - thumb_func_start sub_80A127C -sub_80A127C: @ 80A127C - push {lr} - lsls r1, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r1 - cmp r0, 0 - bne _080A1290 - lsrs r0, r1, 19 - bl sub_80A1548 -_080A1290: - pop {r0} - bx r0 - thumb_func_end sub_80A127C - - thumb_func_start sub_80A1294 -sub_80A1294: @ 80A1294 - push {lr} - lsls r1, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r1 - cmp r0, 0 - bne _080A12A8 - lsrs r0, r1, 19 - bl sub_80A1570 -_080A12A8: - pop {r0} - bx r0 - thumb_func_end sub_80A1294 - - thumb_func_start sub_80A12AC -sub_80A12AC: @ 80A12AC - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08513684 - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06003c00 - movs r2, 0xA0 - lsls r2, 1 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A12AC - - thumb_func_start sub_80A12D4 -sub_80A12D4: @ 80A12D4 - push {r4,r5,lr} - lsls r0, 24 - lsrs r4, r0, 24 - movs r0, 0x3 - ands r0, r4 - ldr r5, =gUnknown_08513894 - lsls r0, 2 - adds r0, r5 - ldr r0, [r0] - ldr r1, =0x06006400 - movs r2, 0x80 - bl sub_80A0980 - adds r1, r4, 0x2 - adds r0, r1, 0 - asrs r0, 2 - lsls r0, 2 - subs r0, r1, r0 - lsls r0, 24 - lsrs r0, 22 - adds r0, r5 - ldr r0, [r0] - ldr r1, =0x06006480 - movs r2, 0x80 - bl sub_80A0980 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A12D4 - - thumb_func_start sub_80A131C -sub_80A131C: @ 80A131C - push {lr} - lsls r0, 24 - movs r1, 0xC0 - lsls r1, 18 - ands r1, r0 - ldr r0, =gUnknown_085143E4 - lsrs r1, 22 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06007a00 - movs r2, 0xF0 - lsls r2, 2 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A131C - - thumb_func_start sub_80A1344 -sub_80A1344: @ 80A1344 - push {lr} - lsls r0, 24 - movs r1, 0xC0 - lsls r1, 18 - ands r1, r0 - ldr r0, =gUnknown_085145F4 - lsrs r1, 22 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06007e00 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1344 - - thumb_func_start sub_80A136C -sub_80A136C: @ 80A136C - push {lr} - lsls r0, 24 - movs r1, 0xE0 - lsls r1, 19 - ands r1, r0 - ldr r0, =gUnknown_08514E04 - lsrs r1, 22 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06007e00 - movs r2, 0x80 - lsls r2, 1 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A136C - - thumb_func_start sub_80A1394 -sub_80A1394: @ 80A1394 - push {r4-r6,lr} - lsls r0, 16 - lsrs r5, r0, 16 - lsls r1, 24 - lsrs r6, r1, 24 - subs r0, r5, r6 - lsls r0, 16 - lsrs r5, r0, 16 - cmp r5, 0xB - bhi _080A13F0 - adds r0, r5, 0 - movs r1, 0xC - bl __umodsi3 - adds r4, r0, 0 - lsls r4, 16 - ldr r0, =gUnknown_08515384 - lsrs r4, 14 - adds r0, r4, r0 - ldr r0, [r0] - ldr r1, =gUnknown_08515344 - lsls r5, r6, 2 - adds r1, r5, r1 - ldr r1, [r1] - movs r2, 0x80 - bl sub_80A0980 - ldr r0, =gUnknown_085153B4 - adds r4, r0 - ldr r0, [r4] - ldr r1, =gUnknown_08515364 - adds r5, r1 - ldr r1, [r5] - movs r2, 0x80 - bl sub_80A0980 - b _080A141C - .pool -_080A13F0: - movs r0, 0x3 - ands r5, r0 - ldr r0, =gUnknown_085153E4 - lsls r5, 2 - adds r0, r5, r0 - ldr r0, [r0] - ldr r1, =gUnknown_08515344 - lsls r4, r6, 2 - adds r1, r4, r1 - ldr r1, [r1] - movs r2, 0x80 - bl sub_80A0980 - ldr r0, =gUnknown_085153F4 - adds r5, r0 - ldr r0, [r5] - ldr r1, =gUnknown_08515364 - adds r4, r1 - ldr r1, [r4] - movs r2, 0x80 - bl sub_80A0980 -_080A141C: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1394 - - thumb_func_start sub_80A1434 -sub_80A1434: @ 80A1434 - push {lr} - lsls r0, 16 - lsrs r0, 16 - lsls r1, 24 - lsrs r3, r1, 24 - subs r0, r3 - lsls r0, 16 - movs r1, 0xE0 - lsls r1, 11 - ands r1, r0 - ldr r0, =gUnknown_08515824 - lsrs r1, 14 - adds r1, r0 - ldr r2, [r1] - cmp r2, 0 - beq _080A1464 - ldr r0, =gUnknown_08515804 - lsls r1, r3, 2 - adds r1, r0 - ldr r1, [r1] - adds r0, r2, 0 - movs r2, 0x80 - bl sub_80A0980 -_080A1464: - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1434 - - thumb_func_start sub_80A1470 -sub_80A1470: @ 80A1470 - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - ands r0, r1 - ldr r1, =gUnknown_08515964 - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x06007800 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1470 - - thumb_func_start sub_80A1498 -sub_80A1498: @ 80A1498 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08515D8C - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06005400 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1498 - - thumb_func_start sub_80A14C0 -sub_80A14C0: @ 80A14C0 - push {lr} - lsls r0, 16 - lsrs r0, 16 - lsls r1, 24 - lsrs r1, 24 - subs r0, r1 - lsls r0, 16 - movs r2, 0xE0 - lsls r2, 11 - ands r2, r0 - ldr r0, =gUnknown_085161DC - lsrs r2, 14 - adds r2, r0 - ldr r0, [r2] - ldr r2, =gUnknown_085161BC - lsls r1, 2 - adds r1, r2 - ldr r1, [r1] - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A14C0 - - thumb_func_start sub_80A14F8 -sub_80A14F8: @ 80A14F8 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08515D8C - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06007400 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A14F8 - - thumb_func_start sub_80A1520 -sub_80A1520: @ 80A1520 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_085164FC - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06005540 - movs r2, 0xC0 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1520 - - thumb_func_start sub_80A1548 -sub_80A1548: @ 80A1548 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_0851680C - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06005b40 - movs r2, 0xC0 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1548 - - thumb_func_start sub_80A1570 -sub_80A1570: @ 80A1570 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08516B1C - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06005b40 - movs r2, 0xC0 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1570 - - thumb_func_start sub_80A1598 -sub_80A1598: @ 80A1598 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08516D2C - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06005c00 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1598 - - thumb_func_start sub_80A15C0 -sub_80A15C0: @ 80A15C0 - push {lr} - lsls r2, r0, 16 - lsrs r0, r2, 16 - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - bne _080A15D4 - lsrs r0, r2, 17 - bl sub_80A1748 -_080A15D4: - pop {r0} - bx r0 - thumb_func_end sub_80A15C0 - - thumb_func_start sub_80A15D8 -sub_80A15D8: @ 80A15D8 - push {lr} - lsls r1, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r1 - cmp r0, 0 - bne _080A15EC - lsrs r0, r1, 19 - bl sub_80A16B0 -_080A15EC: - pop {r0} - bx r0 - thumb_func_end sub_80A15D8 - - thumb_func_start sub_80A15F0 -sub_80A15F0: @ 80A15F0 - push {r4,r5,lr} - lsls r4, r0, 16 - lsrs r0, r4, 16 - adds r5, r0, 0 - movs r0, 0x3F - ands r0, r5 - cmp r0, 0x1 - bne _080A1606 - lsrs r0, r4, 22 - bl sub_80A1720 -_080A1606: - movs r0, 0x7 - ands r0, r5 - cmp r0, 0x1 - bne _080A1614 - lsrs r0, r4, 19 - bl sub_80A16F8 -_080A1614: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80A15F0 - - thumb_func_start sub_80A161C -sub_80A161C: @ 80A161C - push {lr} - lsls r1, r0, 16 - movs r0, 0xC0 - lsls r0, 10 - ands r0, r1 - cmp r0, 0 - bne _080A1630 - lsrs r0, r1, 18 - bl sub_80A1770 -_080A1630: - pop {r0} - bx r0 - thumb_func_end sub_80A161C - - thumb_func_start sub_80A1634 -sub_80A1634: @ 80A1634 - push {r4,lr} - lsls r4, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r4 - cmp r0, 0 - bne _080A1650 - lsrs r4, 19 - adds r0, r4, 0 - bl sub_80A17C0 - adds r0, r4, 0 - bl sub_80A17EC -_080A1650: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80A1634 - - thumb_func_start sub_80A1658 -sub_80A1658: @ 80A1658 - push {lr} - lsls r1, r0, 16 - movs r0, 0xC0 - lsls r0, 10 - ands r0, r1 - cmp r0, 0 - bne _080A166C - lsrs r0, r1, 18 - bl sub_80A1818 -_080A166C: - pop {r0} - bx r0 - thumb_func_end sub_80A1658 - - thumb_func_start sub_80A1670 -sub_80A1670: @ 80A1670 - push {lr} - lsls r1, r0, 16 - movs r0, 0xC0 - lsls r0, 10 - ands r0, r1 - cmp r0, 0 - bne _080A1684 - lsrs r0, r1, 18 - bl sub_80A1884 -_080A1684: - pop {r0} - bx r0 - thumb_func_end sub_80A1670 - - thumb_func_start sub_80A1688 -sub_80A1688: @ 80A1688 - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - ands r0, r1 - ldr r1, =gUnknown_08516E3C - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x06003e00 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1688 - - thumb_func_start sub_80A16B0 -sub_80A16B0: @ 80A16B0 - push {r4,lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - bl __umodsi3 - adds r4, r0, 0 - lsls r4, 16 - ldr r0, =gUnknown_08517A44 - lsrs r4, 14 - adds r0, r4, r0 - ldr r0, [r0] - ldr r1, =0x06007e00 - movs r2, 0xC0 - lsls r2, 1 - bl sub_80A0980 - ldr r0, =gUnknown_08517A50 - adds r4, r0 - ldr r0, [r4] - ldr r1, =0x06007a00 - movs r2, 0xA0 - lsls r2, 2 - bl sub_80A0980 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A16B0 - - thumb_func_start sub_80A16F8 -sub_80A16F8: @ 80A16F8 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08517BFC - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06007f00 - movs r2, 0x20 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A16F8 - - thumb_func_start sub_80A1720 -sub_80A1720: @ 80A1720 - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - ands r0, r1 - ldr r1, =gUnknown_08517C0C - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x06007c00 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1720 - - thumb_func_start sub_80A1748 -sub_80A1748: @ 80A1748 - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - ands r0, r1 - ldr r1, =gUnknown_08518034 - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x06005200 - movs r2, 0x80 - lsls r2, 2 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1748 - - thumb_func_start sub_80A1770 -sub_80A1770: @ 80A1770 - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - ands r0, r1 - ldr r1, =gUnknown_0851829C - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x06007e00 - movs r2, 0x90 - lsls r2, 1 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1770 - - thumb_func_start sub_80A1798 -sub_80A1798: @ 80A1798 - push {lr} - lsls r0, 16 - movs r1, 0xE0 - lsls r1, 11 - ands r1, r0 - ldr r0, =gUnknown_085202C4 - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06005e00 - movs r2, 0xC0 - lsls r2, 4 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1798 - - thumb_func_start sub_80A17C0 -sub_80A17C0: @ 80A17C0 - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - bl __umodsi3 - lsls r0, 16 - ldr r1, =gUnknown_08524864 - lsrs r0, 14 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x060052e0 - movs r2, 0x80 - lsls r2, 1 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A17C0 - - thumb_func_start sub_80A17EC -sub_80A17EC: @ 80A17EC - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - bl __umodsi3 - lsls r0, 16 - ldr r1, =gUnknown_08524870 - lsrs r0, 14 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x060050e0 - movs r2, 0x80 - lsls r2, 1 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A17EC - .align 2, 0 @ Don't pad with nop. diff --git a/data/graphics.s b/data/graphics.s index 0fa256449..a64dc1332 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -354,7 +354,19 @@ gUnknown_08D85600:: @ 8D85600 .incbin "baserom.gba", 0xd85600, 0x20 gUnknown_08D85620:: @ 8D85620 - .incbin "baserom.gba", 0xd85620, 0xa8 + .incbin "baserom.gba", 0xd85620, 0x20 + +gUnknown_08D85640:: @ 8D85640 + .incbin "baserom.gba", 0xd85640, 0x20 + +gUnknown_08D85660:: @ 8D85660 + .incbin "baserom.gba", 0xd85660, 0x20 + +gUnknown_08D85680:: @ 8D85680 + .incbin "baserom.gba", 0xd85680, 0x20 + +gUnknown_08D856A0:: @ 8D856A0 + .incbin "baserom.gba", 0xd856a0, 0x28 gUnknown_08D856C8:: @ 8D856C8 .incbin "baserom.gba", 0xd856c8, 0xe0 diff --git a/data/palette.s b/data/palette.s deleted file mode 100644 index 2dbfed8d2..000000000 --- a/data/palette.s +++ /dev/null @@ -1,18 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2, 0 - -gUnknown_0852487C:: @ 852487C - .incbin "baserom.gba", 0x52487c, 0x10 - -gDummyPaletteStructTemplate:: @ 852488C - .2byte 0xFFFF - .space 9 - .byte 0x20 - .space 4 - - .align 2 -gUnknown_0852489C:: @ 852489C - .incbin "baserom.gba", 0x52489c, 0x20 diff --git a/data/start_menu.s b/data/start_menu.s index eaba0b8e1..07e428d0d 100644 --- a/data/start_menu.s +++ b/data/start_menu.s @@ -26,4 +26,4 @@ gUnknown_085105AC:: @ 85105AC .incbin "baserom.gba", 0x5105ac, 0x10 gUnknown_085105BC:: @ 85105BC - .incbin "baserom.gba", 0x5105bc, 0x1a8 + .incbin "baserom.gba", 0x5105bc, 0x8 diff --git a/data/tileset.s b/data/tileset.s index 1221d8967..a69e53acf 100644 --- a/data/tileset.s +++ b/data/tileset.s @@ -4,6 +4,9 @@ .section .rodata .align 2, 0 +Unknown_085105C4:: + .incbin "baserom.gba", 0x5105C4, 0x1A0 + gUnknown_08510764:: @ 8510764 .incbin "baserom.gba", 0x510764, 0xb60 diff --git a/ld_script.txt b/ld_script.txt index c2f8af595..78d27eb7f 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -110,7 +110,6 @@ SECTIONS { asm/reset_rtc_screen.o(.text); src/start_menu.o(.text); asm/start_menu.o(.text); - asm/tileset.o(.text); src/palette.o(.text); src/sound.o(.text); asm/battle_anim.o(.text); @@ -357,7 +356,7 @@ SECTIONS { data/reset_rtc_screen.o(.rodata); data/start_menu.o(.rodata); data/tileset.o(.rodata); - data/palette.o(.rodata); + src/palette.o(.rodata); data/fanfares.o(.rodata); data/battle_anims.o(.rodata); data/title_screen.o(.rodata); diff --git a/src/palette.c b/src/palette.c index aa9a84e4c..4c09206ba 100644 --- a/src/palette.c +++ b/src/palette.c @@ -28,7 +28,7 @@ struct PaletteStructTemplate struct PaletteStruct { - struct PaletteStructTemplate *base; + const struct PaletteStructTemplate *base; u32 ps_field_4_0:1; u16 ps_field_4_1:1; u32 baseDestOffset:9; @@ -48,6 +48,11 @@ extern void _call_via_r1(u32 a1, void *a2); extern void BlendPalette(u16, u16, u8, u16); +static EWRAM_DATA struct { + const u16 *src; + u16 *dest; + u16 size; +} sTilesetDMA3TransferBuffer[20] = {0}; EWRAM_DATA u16 gPlttBufferUnfaded[0x200] = {0}; EWRAM_DATA u16 gPlttBufferFaded[0x200] = {0}; EWRAM_DATA struct PaletteStruct sPaletteStructs[0x10] = {0}; @@ -56,13 +61,72 @@ EWRAM_DATA u32 gFiller_2037FE0 = 0; EWRAM_DATA u32 sPlttBufferTransferPending = 0; EWRAM_DATA u8 gPaletteDecompressionBuffer[0x400] = {0}; -extern struct PaletteStructTemplate gDummyPaletteStructTemplate; -extern void *gUnknown_0852487C; -extern u8 gUnknown_0852489C[]; +extern const u16 *const gUnknown_08510764[]; +extern const u16 *const gUnknown_085112C4[]; +extern const u16 *const gUnknown_08511BCC[]; +extern const u16 *const gUnknown_08512574[]; +extern const u16 *const gUnknown_08512E54[]; +extern const u16 *const gUnknown_08513174[]; +extern const u16 *const gUnknown_08513684[]; +extern const u16 *const gUnknown_08513894[]; +extern const u16 *const gUnknown_085143E4[]; +extern const u16 *const gUnknown_085145F4[]; +extern const u16 *const gUnknown_08514E04[]; +extern u16 *const gUnknown_08515344[]; +extern u16 *const gUnknown_08515364[]; +extern const u16 *const gUnknown_08515384[]; +extern const u16 *const gUnknown_085153B4[]; +extern const u16 *const gUnknown_085153E4[]; +extern const u16 *const gUnknown_085153F4[]; +extern u16 *const gUnknown_08515804[]; +extern const u16 *const gUnknown_08515824[]; +extern const u16 *const gUnknown_08515964[]; +extern const u16 *const gUnknown_08515D8C[]; +extern u16 *const gUnknown_085161BC[]; +extern const u16 *const gUnknown_085161DC[]; +extern const u16 *const gUnknown_085164FC[]; +extern const u16 *const gUnknown_0851680C[]; +extern const u16 *const gUnknown_08516B1C[]; +extern const u16 *const gUnknown_08516D2C[]; +extern const u16 *const gUnknown_08516E3C[]; +extern const u16 *const gUnknown_08517A44[]; +extern const u16 *const gUnknown_08517A50[]; +extern const u16 *const gUnknown_08517BFC[]; +extern const u16 *const gUnknown_08517C0C[]; +extern const u16 *const gUnknown_08518034[]; +extern const u16 *const gUnknown_0851829C[]; +extern const u16 *const gUnknown_085202C4[]; +extern const u16 *const gUnknown_08524864[]; +extern const u16 *const gUnknown_08524870[]; -extern u16 gUnknown_03000F3C; -extern void *gUnknown_03000F44; +extern const u16 gUnknown_08D85640[]; +extern const u16 gUnknown_08D85660[]; +extern const u16 gUnknown_08D85680[]; +extern const u16 gUnknown_08D856A0[]; +static const u16 *const gUnknown_0852487C[] = { + gUnknown_08D85640, + gUnknown_08D85660, + gUnknown_08D85680, + gUnknown_08D856A0, +}; + +static const struct PaletteStructTemplate gDummyPaletteStructTemplate = { + .uid = 0xFFFF, + .pst_field_B_5 = 1 +}; +static const u8 gUnknown_0852489C[] = { + 0, 0, 0, 0, 0, + 5, 5, 5, 5, 5, + 11, 11, 11, 11, 11, + 16, 16, 16, 16, 16, + 21, 21, 21, 21, 21, + 27, 27, 27, 27, 27, + 31, 31 +}; + +void cur_mapheader_run_tileset1_func(void); +void cur_mapheader_run_tileset2_func(void); static void unused_sub_80A1CDC(struct PaletteStruct *, u32 *); static void unused_sub_80A1E40(struct PaletteStruct *, u32 *); static void unused_sub_80A1F00(struct PaletteStruct *); @@ -74,30 +138,798 @@ static u8 UpdateHardwarePaletteFade(void); static void UpdateBlendRegisters(void); static bool8 IsSoftwarePaletteFadeFinishing(void); +// tileset + +IWRAM_DATA u8 sTilesetDMA3TransferBufferSize; +IWRAM_DATA u16 sPrimaryTilesetCBCounter; +IWRAM_DATA u16 sPrimaryTilesetCBBufferSize; +IWRAM_DATA u16 sSecondaryTilesetCBCounter; +IWRAM_DATA u16 sSecondaryTilesetCBBufferSize; +IWRAM_DATA void (*sPrimaryTilesetCB)(u16); +IWRAM_DATA void (*sSecondaryTilesetCB)(u16); + +void sub_80A0954(void) +{ + sTilesetDMA3TransferBufferSize = 0; + CpuFill32(0, sTilesetDMA3TransferBuffer, sizeof sTilesetDMA3TransferBuffer); +} + +void sub_80A0980(const u16 *a0, u16 *a1, u16 a2) +{ + if (sTilesetDMA3TransferBufferSize < 20) + { + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].src = a0; + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].dest = a1; + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].size = a2; + sTilesetDMA3TransferBufferSize ++; + } +} + +void sub_80A09D0(void) +{ + int i; + + for (i = 0; i < sTilesetDMA3TransferBufferSize; i ++) + { + DmaCopy16(3, sTilesetDMA3TransferBuffer[i].src, sTilesetDMA3TransferBuffer[i].dest, sTilesetDMA3TransferBuffer[i].size); + } + sTilesetDMA3TransferBufferSize = 0; +} + +void cur_mapheader_run_tileset_funcs_after_some_cpuset(void) +{ + sub_80A0954(); + cur_mapheader_run_tileset1_func(); + cur_mapheader_run_tileset2_func(); +} + +void sub_80A0A2C(void) +{ + cur_mapheader_run_tileset2_func(); +} + +void sub_80A0A38(void) +{ + sub_80A0954(); + if (++sPrimaryTilesetCBCounter >= sPrimaryTilesetCBBufferSize) + sPrimaryTilesetCBCounter = 0; + if (++sSecondaryTilesetCBCounter >= sSecondaryTilesetCBBufferSize) + sSecondaryTilesetCBCounter = 0; + if (sPrimaryTilesetCB) + sPrimaryTilesetCB(sPrimaryTilesetCBCounter); + if (sSecondaryTilesetCB) + sSecondaryTilesetCB(sSecondaryTilesetCBCounter); +} + +void cur_mapheader_run_tileset1_func(void) +{ + sPrimaryTilesetCBCounter = 0; + sPrimaryTilesetCBBufferSize = 0; + sPrimaryTilesetCB = NULL; + if (gMapHeader.mapData->primaryTileset && gMapHeader.mapData->primaryTileset->callback) + gMapHeader.mapData->primaryTileset->callback(); +} + +void cur_mapheader_run_tileset2_func(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 0; + sSecondaryTilesetCB = NULL; + if (gMapHeader.mapData->secondaryTileset && gMapHeader.mapData->secondaryTileset->callback) + gMapHeader.mapData->secondaryTileset->callback(); +} + +void TilesetCb_General(void) +{ + void sub_80A0B70(u16); + + sPrimaryTilesetCBCounter = 0; + sPrimaryTilesetCBBufferSize = 0x100; + sPrimaryTilesetCB = sub_80A0B70; +} + +void TilesetCb_InsideBuilding(void) +{ + void sub_80A0BB4(u16); + + sPrimaryTilesetCBCounter = 0; + sPrimaryTilesetCBBufferSize = 0x100; + sPrimaryTilesetCB = sub_80A0BB4; +} + +void sub_80A0B70(u16 timer) +{ + void sub_80A0BCC(u16); + void sub_80A0BF4(u16); + void sub_80A0C1C(u16); + void sub_80A0C44(u16); + void sub_80A12AC(u16); + + if ((timer & 0x0F) == 0) + sub_80A0BCC(timer >> 4); + if ((timer & 0x0F) == 1) + sub_80A0BF4(timer >> 4); + if ((timer & 0x0F) == 2) + sub_80A0C1C(timer >> 4); + if ((timer & 0x0F) == 3) + sub_80A0C44(timer >> 4); + if ((timer & 0x0F) == 4) + sub_80A12AC(timer >> 4); +} + +void sub_80A0BB4(u16 timer) +{ + void sub_80A1688(u16); + if ((timer & 0x7) == 0) + sub_80A1688(timer >> 3); +} + +void sub_80A0BCC(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08510764[idx], (u16 *)(VRAM + 0x3F80), 0x80); +} + +void sub_80A0BF4(u16 timer) +{ + u8 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_08512574[idx], (u16 *)(VRAM + 0x3600), 0x3C0); +} + +void sub_80A0C1C(u16 timer) +{ + u16 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_08512E54[idx], (u16 *)(VRAM + 0x3a00), 0x140); +} + +void sub_80A0C44(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08513174[idx], (u16 *)(VRAM + 0x3e00), 0xc0); +} + +void TilesetCb_Petalburg(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Rustboro(void) +{ + void sub_80A103C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A103C; +} + +void TilesetCb_Dewford(void) +{ + void sub_80A10B8(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A10B8; +} + +void TilesetCb_Slateport(void) +{ + void sub_80A10D0(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A10D0; +} + +void TilesetCb_Mauville(void) +{ + void sub_80A10E8(u16); + + sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A10E8; +} + +void TilesetCb_Lavaridge(void) +{ + void sub_80A115C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A115C; +} + +void TilesetCb_Fallarbor(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Fortree(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Lilycove(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Mossdeep(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_EverGrande(void) +{ + void sub_80A1188(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1188; +} + +void TilesetCb_Pacifidlog(void) +{ + void sub_80A11FC(u16); + + sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A11FC; +} + +void TilesetCb_Sootopolis(void) +{ + void sub_80A122C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A122C; +} + +void TilesetCb_BattleFrontierOutsideWest(void) +{ + void sub_80A127C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A127C; +} + +void TilesetCb_BattleFrontierOutsideEast(void) +{ + void sub_80A1294(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1294; +} + +void TilesetCb_Underwater(void) +{ + void sub_80A1244(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 128; + sSecondaryTilesetCB = sub_80A1244; +} + +void TilesetCb_SootopolisGym(void) +{ + void sub_80A15D8(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 240; + sSecondaryTilesetCB = sub_80A15D8; +} + +void TilesetCb_Cave(void) +{ + void sub_80A1260(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1260; +} + +void TilesetCb_EliteFour(void) +{ + void sub_80A15F0(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 128; + sSecondaryTilesetCB = sub_80A15F0; +} + +void TilesetCb_MauvilleGym(void) +{ + void sub_80A15C0(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A15C0; +} + +void TilesetCb_BikeShop(void) +{ + void sub_80A161C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A161C; +} + +void TilesetCb_BattlePyramid(void) +{ + void sub_80A1634(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1634; +} + +void TilesetCb_BattleDome(void) +{ + void sub_80A1658(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1658; +} + +void sub_80A103C(u16 timer) +{ + void sub_80A1434(u16, u8); + void sub_80A1470(u16); + + if ((timer & 0x07) == 0) + { + sub_80A1434(timer >> 3, 0); + sub_80A1470(timer >> 3); + } + if ((timer & 0x07) == 1) + sub_80A1434(timer >> 3, 1); + if ((timer & 0x07) == 2) + sub_80A1434(timer >> 3, 2); + if ((timer & 0x07) == 3) + sub_80A1434(timer >> 3, 3); + if ((timer & 0x07) == 4) + sub_80A1434(timer >> 3, 4); + if ((timer & 0x07) == 5) + sub_80A1434(timer >> 3, 5); + if ((timer & 0x07) == 6) + sub_80A1434(timer >> 3, 6); + if ((timer & 0x07) == 7) + sub_80A1434(timer >> 3, 7); +} + +void sub_80A10B8(u16 timer) +{ + void sub_80A1520(u16); + + if ((timer & 7) == 0) + sub_80A1520(timer >> 3); +} + +void sub_80A10D0(u16 timer) +{ + void sub_80A1598(u16); + + if ((timer & 15) == 0) + sub_80A1598(timer >> 4); +} + +void sub_80A10E8(u16 timer) +{ + void sub_80A1394(u16, u8); + + if ((timer & 0x07) == 0) + sub_80A1394(timer >> 3, 0); + if ((timer & 0x07) == 1) + sub_80A1394(timer >> 3, 1); + if ((timer & 0x07) == 2) + sub_80A1394(timer >> 3, 2); + if ((timer & 0x07) == 3) + sub_80A1394(timer >> 3, 3); + if ((timer & 0x07) == 4) + sub_80A1394(timer >> 3, 4); + if ((timer & 0x07) == 5) + sub_80A1394(timer >> 3, 5); + if ((timer & 0x07) == 6) + sub_80A1394(timer >> 3, 6); + if ((timer & 0x07) == 7) + sub_80A1394(timer >> 3, 7); +} + +void sub_80A115C(u16 timer) +{ + void sub_80A12D4(u8); + void sub_80A1498(u16); + + if ((timer & 0x0F) == 0) + sub_80A12D4(timer >> 4); + if ((timer & 0x0F) == 1) + sub_80A1498(timer >> 4); +} + +void sub_80A1188(u16 timer) +{ + void sub_80A14C0(u16, u8); + + if ((timer & 0x07) == 0) + sub_80A14C0(timer >> 3, 0); + if ((timer & 0x07) == 1) + sub_80A14C0(timer >> 3, 1); + if ((timer & 0x07) == 2) + sub_80A14C0(timer >> 3, 2); + if ((timer & 0x07) == 3) + sub_80A14C0(timer >> 3, 3); + if ((timer & 0x07) == 4) + sub_80A14C0(timer >> 3, 4); + if ((timer & 0x07) == 5) + sub_80A14C0(timer >> 3, 5); + if ((timer & 0x07) == 6) + sub_80A14C0(timer >> 3, 6); + if ((timer & 0x07) == 7) + sub_80A14C0(timer >> 3, 7); +} + +void sub_80A11FC(u16 timer) +{ + void sub_80A131C(u8); + void sub_80A136C(u8); + + if ((timer & 0x0F) == 0) + sub_80A131C(timer >> 4); + if ((timer & 0x0F) == 1) + sub_80A136C(timer >> 4); +} + +void sub_80A122C(u16 timer) +{ + void sub_80A1798(u16); + + if ((timer & 0x0F) == 0) + sub_80A1798(timer >> 4); +} + +void sub_80A1244(u16 timer) +{ + void sub_80A1344(u8); + + if ((timer & 0x0F) == 0) + sub_80A1344(timer >> 4); +} + +void sub_80A1260(u16 timer) +{ + void sub_80A14F8(u16); + + if ((timer & 0x0F) == 1) + sub_80A14F8(timer >> 4); +} + +void sub_80A127C(u16 timer) +{ + void sub_80A1548(u16); + + if ((timer & 0x07) == 0) + sub_80A1548(timer >> 3); +} + +void sub_80A1294(u16 timer) +{ + void sub_80A1570(u16); + + if ((timer & 0x07) == 0) + sub_80A1570(timer >> 3); +} + +void sub_80A12AC(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08513684[idx], (u16 *)(VRAM + 0x3c00), 0x140); +} + +void sub_80A12D4(u8 timer) +{ + u8 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08513894[idx], (u16 *)(VRAM + 0x6400), 0x80); + + idx = (timer + 2) % 4; + sub_80A0980(gUnknown_08513894[idx], (u16 *)(VRAM + 0x6480), 0x80); +} + +void sub_80A131C(u8 timer) +{ + u8 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_085143E4[idx], (u16 *)(VRAM + 0x7a00), 0x3C0); +} + +void sub_80A1344(u8 timer) +{ + u8 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_085145F4[idx], (u16 *)(VRAM + 0x7e00), 0x80); +} + +void sub_80A136C(u8 timer) +{ + u8 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_08514E04[idx], (u16 *)(VRAM + 0x7e00), 0x100); +} + +void sub_80A1394(u16 timer_div, u8 timer_mod) +{ + timer_div -= timer_mod; + if (timer_div < 12) // almost certainly a typo + { + timer_div %= 12; + sub_80A0980(gUnknown_08515384[timer_div], gUnknown_08515344[timer_mod], 0x80); + sub_80A0980(gUnknown_085153B4[timer_div], gUnknown_08515364[timer_mod], 0x80); + } + else + { + timer_div &= 3; + sub_80A0980(gUnknown_085153E4[timer_div], gUnknown_08515344[timer_mod], 0x80); + sub_80A0980(gUnknown_085153F4[timer_div], gUnknown_08515364[timer_mod], 0x80); + } +} + +void sub_80A1434(u16 timer_div, u8 timer_mod) +{ + timer_div -= timer_mod; + timer_div &= 0x7; + if (gUnknown_08515824[timer_div]) + sub_80A0980(gUnknown_08515824[timer_div], gUnknown_08515804[timer_mod], 0x80); +} + +void sub_80A1470(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08515964[idx], (u16 *)(VRAM + 0x7800), 0x80); +} + +void sub_80A1498(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(VRAM + 0x5400), 0x80); +} + +void sub_80A14C0(u16 timer_div, u8 timer_mod) +{ + timer_div -= timer_mod; + timer_div &= 7; + + sub_80A0980(gUnknown_085161DC[timer_div], gUnknown_085161BC[timer_mod], 0x80); +} + +void sub_80A14F8(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(VRAM + 0x7400), 0x80); +} + +void sub_80A1520(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_085164FC[idx], (u16 *)(VRAM + 0x5540), 0xC0); +} + +void sub_80A1548(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_0851680C[idx], (u16 *)(VRAM + 0x5b40), 0xC0); +} + +void sub_80A1570(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08516B1C[idx], (u16 *)(VRAM + 0x5b40), 0xC0); +} + +void sub_80A1598(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08516D2C[idx], (u16 *)(VRAM + 0x5c00), 0x80); +} + +void sub_80A15C0(u16 timer) +{ + void sub_80A1748(u16); + + if ((timer & 1) == 0) + sub_80A1748(timer >> 1); +} + +void sub_80A15D8(u16 timer) +{ + void sub_80A16B0(u16); + + if ((timer & 7) == 0) + sub_80A16B0(timer >> 3); +} + +void sub_80A15F0(u16 timer) +{ + void sub_80A1720(u16); + void sub_80A16F8(u16); + + if ((timer & 0x3f) == 1) + sub_80A1720(timer >> 6); + if ((timer & 0x07) == 1) + sub_80A16F8(timer >> 3); +} +void sub_80A161C(u16 timer) +{ + void sub_80A1770(u16); + + if ((timer & 3) == 0) + sub_80A1770(timer >> 2); +} + +void sub_80A1634(u16 timer) +{ + void sub_80A17C0(u16); + void sub_80A17EC(u16); + + if ((timer & 7) == 0) + { + sub_80A17C0(timer >> 3); + sub_80A17EC(timer >> 3); + } +} + +void sub_80A1658(u16 timer) +{ + void sub_80A1818(u16); + + if ((timer & 3) == 0) + sub_80A1818(timer >> 2); +} + +void sub_80A1670(u16 timer) +{ + void sub_80A1884(u16); + + if ((timer & 3) == 0) + sub_80A1884(timer >> 2); +} + +void sub_80A1688(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08516E3C[idx], (u16 *)(VRAM + 0x3e00), 0x80); +} + +void sub_80A16B0(u16 timer) +{ + u16 idx; + + idx = timer % 3; + sub_80A0980(gUnknown_08517A44[idx], (u16 *)(VRAM + 0x7e00), 0x180); + sub_80A0980(gUnknown_08517A50[idx], (u16 *)(VRAM + 0x7a00), 0x280); +} + +void sub_80A16F8(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08517BFC[idx], (u16 *)(VRAM + 0x7f00), 0x20); +} + +void sub_80A1720(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08517C0C[idx], (u16 *)(VRAM + 0x7c00), 0x80); +} + +void sub_80A1748(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08518034[idx], (u16 *)(VRAM + 0x5200), 0x200); +} + +void sub_80A1770(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_0851829C[idx], (u16 *)(VRAM + 0x7e00), 0x120); +} + +void sub_80A1798(u16 timer) +{ + u16 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_085202C4[idx], (u16 *)(VRAM + 0x5e00), 0xc00); +} + +void sub_80A17C0(u16 timer) +{ + u16 idx; + + idx = timer % 3; + sub_80A0980(gUnknown_08524864[idx], (u16 *)(VRAM + 0x52e0), 0x100); +} + +void sub_80A17EC(u16 timer) +{ + u16 idx; + + idx = timer % 3; + sub_80A0980(gUnknown_08524870[idx], (u16 *)(VRAM + 0x50e0), 0x100); +} + +// palette + void sub_80A1818(u16 a1) { - void **v1 = &gUnknown_0852487C; - CpuSet(v1[a1 & 0x3], gPlttBufferUnfaded + 0x80, 0x10); - BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); - if ((u8)FindTaskIdByFunc(sub_8149DFC) != 0xFF ) - { - gUnknown_03000F44 = sub_80A1670; - gUnknown_03000F3C = 0x20; - } - return; + CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); + BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); + if ((u8)FindTaskIdByFunc(sub_8149DFC) != 0xFF ) + { + sSecondaryTilesetCB = sub_80A1670; + sSecondaryTilesetCBBufferSize = 0x20; + } } void sub_80A1884(u16 a1) { - void **v1 = &gUnknown_0852487C; - CpuSet(v1[a1 & 0x3], gPlttBufferUnfaded + 0x80, 0x10); - if ((u8)FindTaskIdByFunc(sub_8149DFC) == 0xFF ) - { - BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); - if (!--gUnknown_03000F3C) - gUnknown_03000F44 = 0; - } - return; + CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); + if ((u8)FindTaskIdByFunc(sub_8149DFC) == 0xFF ) + { + BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); + if (!--sSecondaryTilesetCBBufferSize) + sSecondaryTilesetCB = NULL; + } } void LoadCompressedPalette(const void *src, u16 offset, u16 size) diff --git a/src/scrcmd.c b/src/scrcmd.c new file mode 100644 index 000000000..b56a53caf --- /dev/null +++ b/src/scrcmd.c @@ -0,0 +1,15 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA u8 gUnknown_03000F30; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/sym_bss.txt b/sym_bss.txt index c81ce12be..16f14da51 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -16,32 +16,8 @@ gUnknown_03000000: @ 3000000 .include "src/rom4.o" .include "src/field_camera.o" .include "src/script.o" - -.align 2 -gUnknown_03000F30: @ 3000F30 - .space 0x4 - -gUnknown_03000F34: @ 3000F34 - .space 0x2 - -gUnknown_03000F36: @ 3000F36 - .space 0x2 - -gUnknown_03000F38: @ 3000F38 - .space 0x2 - -gUnknown_03000F3A: @ 3000F3A - .space 0x2 - -gUnknown_03000F3C: @ 3000F3C - .space 0x4 - -gUnknown_03000F40: @ 3000F40 - .space 0x4 - -gUnknown_03000F44: @ 3000F44 - .space 0x4 - + .include "src/scrcmd.o" + .include "src/palette.o" .include "src/sound.o" gUnknown_03000F50: @ 3000F50 diff --git a/sym_ewram.txt b/sym_ewram.txt index e49b94160..8549f1679 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -747,9 +747,6 @@ gUnknown_02037621: @ 2037621 gUnknown_02037622: @ 2037622 .space 0x2 -gUnknown_02037624: @ 2037624 - .space 0xF0 - .include "src/palette.o" .include "src/sound.o" From a1ccd78218cf920bbf62278d02f143b903f1314e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 22:16:51 -0400 Subject: [PATCH 330/342] Disassemble pointer tables in data/tileset.s --- asm/tileset.s | 8 - data/tileset.s | 651 ++++++++++++++++++++++++++++++++++++++++++++++--- src/palette.c | 8 +- 3 files changed, 616 insertions(+), 51 deletions(-) delete mode 100644 asm/tileset.s diff --git a/asm/tileset.s b/asm/tileset.s deleted file mode 100644 index 2428f2984..000000000 --- a/asm/tileset.s +++ /dev/null @@ -1,8 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - .align 2, 0 @ Don't pad with nop. diff --git a/data/tileset.s b/data/tileset.s index a69e53acf..3a1efb5fc 100644 --- a/data/tileset.s +++ b/data/tileset.s @@ -4,116 +4,691 @@ .section .rodata .align 2, 0 -Unknown_085105C4:: - .incbin "baserom.gba", 0x5105C4, 0x1A0 +gUnknown_085105C4:: + .incbin "baserom.gba", 0x5105c4, 0x80 + +gUnknown_08510644:: + .incbin "baserom.gba", 0x510644, 0x80 + +gUnknown_085106C4:: + .incbin "baserom.gba", 0x5106c4, 0xa0 + gUnknown_08510764:: @ 8510764 - .incbin "baserom.gba", 0x510764, 0xb60 +@ replacing .incbin "baserom.gba", 0x00510764, 0x10 + .4byte gUnknown_08510644 + .4byte gUnknown_085105C4 + .4byte gUnknown_08510644 + .4byte gUnknown_085106C4 + +gUnknown_08510774:: + .incbin "baserom.gba", 0x510774, 0x3c0 + +gUnknown_08510B34:: + .incbin "baserom.gba", 0x510b34, 0x3c0 + +gUnknown_08510EF4:: + .incbin "baserom.gba", 0x510ef4, 0x3c0 + +gUnknown_085112B4:: + .incbin "baserom.gba", 0x5112b4, 0x10 + gUnknown_085112C4:: @ 85112C4 - .incbin "baserom.gba", 0x5112c4, 0x908 + .incbin "baserom.gba", 0x5112c4, 0x3b0 + +gUnknown_08511674:: + .incbin "baserom.gba", 0x511674, 0x3c0 + +gUnknown_08511A34:: + .incbin "baserom.gba", 0x511a34, 0x198 + gUnknown_08511BCC:: @ 8511BCC - .incbin "baserom.gba", 0x511bcc, 0x9a8 + .incbin "baserom.gba", 0x511bcc, 0x228 + +gUnknown_08511DF4:: + .incbin "baserom.gba", 0x511df4, 0x3c0 + +gUnknown_085121B4:: + .incbin "baserom.gba", 0x5121b4, 0x3c0 + gUnknown_08512574:: @ 8512574 - .incbin "baserom.gba", 0x512574, 0x8e0 +@ replacing .incbin "baserom.gba", 0x00512574, 0x20 + .4byte gUnknown_08510774 + .4byte gUnknown_08510B34 + .4byte gUnknown_08510EF4 + .4byte gUnknown_085112B4 + .4byte gUnknown_08511674 + .4byte gUnknown_08511A34 + .4byte gUnknown_08511DF4 + .4byte gUnknown_085121B4 + +gUnknown_08512594:: + .incbin "baserom.gba", 0x512594, 0x140 + +gUnknown_085126D4:: + .incbin "baserom.gba", 0x5126d4, 0x140 + +gUnknown_08512814:: + .incbin "baserom.gba", 0x512814, 0x140 + +gUnknown_08512954:: + .incbin "baserom.gba", 0x512954, 0x140 + +gUnknown_08512A94:: + .incbin "baserom.gba", 0x512a94, 0x140 + +gUnknown_08512BD4:: + .incbin "baserom.gba", 0x512bd4, 0x140 + +gUnknown_08512D14:: + .incbin "baserom.gba", 0x512d14, 0x140 + gUnknown_08512E54:: @ 8512E54 - .incbin "baserom.gba", 0x512e54, 0x320 +@ replacing .incbin "baserom.gba", 0x00512e54, 0x20 + .4byte gUnknown_08512594 + .4byte gUnknown_085126D4 + .4byte gUnknown_08512814 + .4byte gUnknown_08512954 + .4byte gUnknown_08512A94 + .4byte gUnknown_08512BD4 + .4byte gUnknown_08512D14 + .4byte gUnknown_08512594 + +gUnknown_08512E74:: + .incbin "baserom.gba", 0x512e74, 0xc0 + +gUnknown_08512F34:: + .incbin "baserom.gba", 0x512f34, 0xc0 + +gUnknown_08512FF4:: + .incbin "baserom.gba", 0x512ff4, 0xc0 + +gUnknown_085130B4:: + .incbin "baserom.gba", 0x5130b4, 0xc0 + gUnknown_08513174:: @ 8513174 - .incbin "baserom.gba", 0x513174, 0x510 +@ replacing .incbin "baserom.gba", 0x00513174, 0x10 + .4byte gUnknown_08512E74 + .4byte gUnknown_08512F34 + .4byte gUnknown_08512FF4 + .4byte gUnknown_085130B4 + +gUnknown_08513184:: + .incbin "baserom.gba", 0x513184, 0x140 + +gUnknown_085132C4:: + .incbin "baserom.gba", 0x5132c4, 0x140 + +gUnknown_08513404:: + .incbin "baserom.gba", 0x513404, 0x140 + +gUnknown_08513544:: + .incbin "baserom.gba", 0x513544, 0x140 + gUnknown_08513684:: @ 8513684 - .incbin "baserom.gba", 0x513684, 0x210 +@ replacing .incbin "baserom.gba", 0x00513684, 0x10 + .4byte gUnknown_08513184 + .4byte gUnknown_085132C4 + .4byte gUnknown_08513404 + .4byte gUnknown_08513544 + +gUnknown_08513694:: + .incbin "baserom.gba", 0x513694, 0x80 + +gUnknown_08513714:: + .incbin "baserom.gba", 0x513714, 0x80 + +gUnknown_08513794:: + .incbin "baserom.gba", 0x513794, 0x80 + +gUnknown_08513814:: + .incbin "baserom.gba", 0x513814, 0x80 + gUnknown_08513894:: @ 8513894 - .incbin "baserom.gba", 0x513894, 0xb50 +@ replacing .incbin "baserom.gba", 0x00513894, 0x10 + .4byte gUnknown_08513694 + .4byte gUnknown_08513714 + .4byte gUnknown_08513794 + .4byte gUnknown_08513814 + +gUnknown_085138A4:: + .incbin "baserom.gba", 0x5138a4, 0x3c0 + +gUnknown_08513C64:: + .incbin "baserom.gba", 0x513c64, 0x3c0 + +gUnknown_08514024:: + .incbin "baserom.gba", 0x514024, 0x3c0 + gUnknown_085143E4:: @ 85143E4 - .incbin "baserom.gba", 0x5143e4, 0x210 +@ replacing .incbin "baserom.gba", 0x005143e4, 0x10 + .4byte gUnknown_085138A4 + .4byte gUnknown_08513C64 + .4byte gUnknown_08514024 + .4byte gUnknown_08513C64 + +gUnknown_085143F4:: + .incbin "baserom.gba", 0x5143f4, 0x80 + +gUnknown_08514474:: + .incbin "baserom.gba", 0x514474, 0x80 + +gUnknown_085144F4:: + .incbin "baserom.gba", 0x5144f4, 0x80 + +gUnknown_08514574:: + .incbin "baserom.gba", 0x514574, 0x80 + gUnknown_085145F4:: @ 85145F4 - .incbin "baserom.gba", 0x5145f4, 0x810 +@ replacing .incbin "baserom.gba", 0x005145f4, 0x10 + .4byte gUnknown_085143F4 + .4byte gUnknown_08514474 + .4byte gUnknown_085144F4 + .4byte gUnknown_08514574 + +gUnknown_08514604:: + .incbin "baserom.gba", 0x514604, 0x100 + +gUnknown_08514704:: + .incbin "baserom.gba", 0x514704, 0x100 + +gUnknown_08514804:: + .incbin "baserom.gba", 0x514804, 0x100 + +gUnknown_08514904:: + .incbin "baserom.gba", 0x514904, 0x100 + +gUnknown_08514A04:: + .incbin "baserom.gba", 0x514a04, 0x100 + +gUnknown_08514B04:: + .incbin "baserom.gba", 0x514b04, 0x100 + +gUnknown_08514C04:: + .incbin "baserom.gba", 0x514c04, 0x100 + +gUnknown_08514D04:: + .incbin "baserom.gba", 0x514d04, 0x100 + gUnknown_08514E04:: @ 8514E04 - .incbin "baserom.gba", 0x514e04, 0x540 +@ replacing .incbin "baserom.gba", 0x00514e04, 0x20 + .4byte gUnknown_08514604 + .4byte gUnknown_08514704 + .4byte gUnknown_08514804 + .4byte gUnknown_08514904 + .4byte gUnknown_08514A04 + .4byte gUnknown_08514B04 + .4byte gUnknown_08514C04 + .4byte gUnknown_08514D04 + +gUnknown_08514E24:: + .incbin "baserom.gba", 0x514e24, 0x80 + +gUnknown_08514EA4:: + .incbin "baserom.gba", 0x514ea4, 0x80 + +gUnknown_08514F24:: + .incbin "baserom.gba", 0x514f24, 0x80 + +gUnknown_08514FA4:: + .incbin "baserom.gba", 0x514fa4, 0x80 + +gUnknown_08515024:: + .incbin "baserom.gba", 0x515024, 0x80 + +gUnknown_085150A4:: + .incbin "baserom.gba", 0x5150a4, 0x80 + +gUnknown_08515124:: + .incbin "baserom.gba", 0x515124, 0x80 + +gUnknown_085151A4:: + .incbin "baserom.gba", 0x5151a4, 0x80 + +gUnknown_08515224:: + .incbin "baserom.gba", 0x515224, 0x80 + +gUnknown_085152A4:: + .incbin "baserom.gba", 0x5152a4, 0xa0 + gUnknown_08515344:: @ 8515344 - .incbin "baserom.gba", 0x515344, 0x20 +@ replacing .incbin "baserom.gba", 0x00515344, 0x20 + .4byte VRAM + 0x4c00 + .4byte VRAM + 0x4c80 + .4byte VRAM + 0x4d00 + .4byte VRAM + 0x4d80 + .4byte VRAM + 0x4e00 + .4byte VRAM + 0x4e80 + .4byte VRAM + 0x4f00 + .4byte VRAM + 0x4f80 gUnknown_08515364:: @ 8515364 - .incbin "baserom.gba", 0x515364, 0x20 +@ replacing .incbin "baserom.gba", 0x00515364, 0x20 + .4byte VRAM + 0x5000 + .4byte VRAM + 0x5080 + .4byte VRAM + 0x5100 + .4byte VRAM + 0x5180 + .4byte VRAM + 0x5200 + .4byte VRAM + 0x5280 + .4byte VRAM + 0x5300 + .4byte VRAM + 0x5380 gUnknown_08515384:: @ 8515384 - .incbin "baserom.gba", 0x515384, 0x30 +@ replacing .incbin "baserom.gba", 0x00515384, 0x30 + .4byte gUnknown_08514E24 + .4byte gUnknown_08514E24 + .4byte gUnknown_08514EA4 + .4byte gUnknown_08514F24 + .4byte gUnknown_08514FA4 + .4byte gUnknown_08514FA4 + .4byte gUnknown_08514FA4 + .4byte gUnknown_08514FA4 + .4byte gUnknown_08514FA4 + .4byte gUnknown_08514FA4 + .4byte gUnknown_08514F24 + .4byte gUnknown_08514EA4 gUnknown_085153B4:: @ 85153B4 - .incbin "baserom.gba", 0x5153b4, 0x30 +@ replacing .incbin "baserom.gba", 0x005153b4, 0x30 + .4byte gUnknown_085150A4 + .4byte gUnknown_085150A4 + .4byte gUnknown_08515124 + .4byte gUnknown_085151A4 + .4byte gUnknown_08515224 + .4byte gUnknown_08515224 + .4byte gUnknown_08515224 + .4byte gUnknown_08515224 + .4byte gUnknown_08515224 + .4byte gUnknown_08515224 + .4byte gUnknown_085151A4 + .4byte gUnknown_08515124 gUnknown_085153E4:: @ 85153E4 - .incbin "baserom.gba", 0x5153e4, 0x10 +@ replacing .incbin "baserom.gba", 0x005153e4, 0x10 + .4byte gUnknown_08514E24 + .4byte gUnknown_08514E24 + .4byte gUnknown_08515024 + .4byte gUnknown_08515024 gUnknown_085153F4:: @ 85153F4 - .incbin "baserom.gba", 0x5153f4, 0x410 +@ replacing .incbin "baserom.gba", 0x005153f4, 0x10 + .4byte gUnknown_085150A4 + .4byte gUnknown_085150A4 + .4byte gUnknown_085152A4 + .4byte gUnknown_085152A4 + +gUnknown_08515404:: + .incbin "baserom.gba", 0x515404, 0x80 + +gUnknown_08515484:: + .incbin "baserom.gba", 0x515484, 0x80 + +gUnknown_08515504:: + .incbin "baserom.gba", 0x515504, 0x80 + +gUnknown_08515584:: + .incbin "baserom.gba", 0x515584, 0x80 + +gUnknown_08515604:: + .incbin "baserom.gba", 0x515604, 0x80 + +gUnknown_08515684:: + .incbin "baserom.gba", 0x515684, 0x80 + +gUnknown_08515704:: + .incbin "baserom.gba", 0x515704, 0x80 + +gUnknown_08515784:: + .incbin "baserom.gba", 0x515784, 0x80 + gUnknown_08515804:: @ 8515804 .incbin "baserom.gba", 0x515804, 0x20 + gUnknown_08515824:: @ 8515824 - .incbin "baserom.gba", 0x515824, 0x140 +@ replacing .incbin "baserom.gba", 0x00515824, 0x20 + .4byte gUnknown_08515404 + .4byte gUnknown_08515484 + .4byte gUnknown_08515504 + .4byte gUnknown_08515584 + .4byte gUnknown_08515604 + .4byte gUnknown_08515684 + .4byte gUnknown_08515704 + .4byte gUnknown_08515784 + +gUnknown_08515844:: + .incbin "baserom.gba", 0x515844, 0x80 + +gUnknown_085158C4:: + .incbin "baserom.gba", 0x5158c4, 0xa0 + gUnknown_08515964:: @ 8515964 - .incbin "baserom.gba", 0x515964, 0x428 +@ replacing .incbin "baserom.gba", 0x00515964, 0x8 + .4byte gUnknown_08515844 + .4byte gUnknown_085158C4 + +gUnknown_0851596C:: + .incbin "baserom.gba", 0x51596c, 0x80 + +gUnknown_085159EC:: + .incbin "baserom.gba", 0x5159ec, 0x80 + +gUnknown_08515A6C:: + .incbin "baserom.gba", 0x515a6c, 0x80 + +gUnknown_08515AEC:: + .incbin "baserom.gba", 0x515aec, 0x2a0 + gUnknown_08515D8C:: @ 8515D8C - .incbin "baserom.gba", 0x515d8c, 0x430 +@ replacing .incbin "baserom.gba", 0x00515d8c, 0x10 + .4byte gUnknown_0851596C + .4byte gUnknown_085159EC + .4byte gUnknown_08515A6C + .4byte gUnknown_08515AEC + +gUnknown_08515D9C:: + .incbin "baserom.gba", 0x515d9c, 0x80 + +gUnknown_08515E1C:: + .incbin "baserom.gba", 0x515e1c, 0x80 + +gUnknown_08515E9C:: + .incbin "baserom.gba", 0x515e9c, 0x80 + +gUnknown_08515F1C:: + .incbin "baserom.gba", 0x515f1c, 0x80 + +gUnknown_08515F9C:: + .incbin "baserom.gba", 0x515f9c, 0x80 + +gUnknown_0851601C:: + .incbin "baserom.gba", 0x51601c, 0x80 + +gUnknown_0851609C:: + .incbin "baserom.gba", 0x51609c, 0x80 + +gUnknown_0851611C:: + .incbin "baserom.gba", 0x51611c, 0xa0 + gUnknown_085161BC:: @ 85161BC - .incbin "baserom.gba", 0x5161bc, 0x20 +@ replacing .incbin "baserom.gba", 0x005161bc, 0x20 + .4byte VRAM + 0x5c00 + .4byte VRAM + 0x5c80 + .4byte VRAM + 0x5d00 + .4byte VRAM + 0x5d80 + .4byte VRAM + 0x5e00 + .4byte VRAM + 0x5e80 + .4byte VRAM + 0x5f00 + .4byte VRAM + 0x5f80 gUnknown_085161DC:: @ 85161DC - .incbin "baserom.gba", 0x5161dc, 0x320 +@ replacing .incbin "baserom.gba", 0x005161dc, 0x20 + .4byte gUnknown_08515D9C + .4byte gUnknown_08515E1C + .4byte gUnknown_08515E9C + .4byte gUnknown_08515F1C + .4byte gUnknown_08515F9C + .4byte gUnknown_0851601C + .4byte gUnknown_0851609C + .4byte gUnknown_0851611C + +gUnknown_085161FC:: + .incbin "baserom.gba", 0x5161fc, 0xc0 + +gUnknown_085162BC:: + .incbin "baserom.gba", 0x5162bc, 0xc0 + +gUnknown_0851637C:: + .incbin "baserom.gba", 0x51637c, 0xc0 + +gUnknown_0851643C:: + .incbin "baserom.gba", 0x51643c, 0xc0 + gUnknown_085164FC:: @ 85164FC - .incbin "baserom.gba", 0x5164fc, 0x310 +@ replacing .incbin "baserom.gba", 0x005164fc, 0x10 + .4byte gUnknown_085161FC + .4byte gUnknown_085162BC + .4byte gUnknown_0851637C + .4byte gUnknown_0851643C + +gUnknown_0851650C:: + .incbin "baserom.gba", 0x51650c, 0xc0 + +gUnknown_085165CC:: + .incbin "baserom.gba", 0x5165cc, 0xc0 + +gUnknown_0851668C:: + .incbin "baserom.gba", 0x51668c, 0xc0 + +gUnknown_0851674C:: + .incbin "baserom.gba", 0x51674c, 0xc0 + gUnknown_0851680C:: @ 851680C - .incbin "baserom.gba", 0x51680c, 0x310 +@ replacing .incbin "baserom.gba", 0x0051680c, 0x10 + .4byte gUnknown_0851650C + .4byte gUnknown_085165CC + .4byte gUnknown_0851668C + .4byte gUnknown_0851674C + +gUnknown_0851681C:: @ 851680C + .incbin "baserom.gba", 0x51681c, 0xc0 + +gUnknown_085168DC:: + .incbin "baserom.gba", 0x5168dc, 0xc0 + +gUnknown_0851699C:: + .incbin "baserom.gba", 0x51699c, 0xc0 + +gUnknown_08516A5C:: + .incbin "baserom.gba", 0x516a5c, 0xc0 + gUnknown_08516B1C:: @ 8516B1C - .incbin "baserom.gba", 0x516b1c, 0x210 +@ replacing .incbin "baserom.gba", 0x00516b1c, 0x10 + .4byte gUnknown_0851681C + .4byte gUnknown_085168DC + .4byte gUnknown_0851699C + .4byte gUnknown_08516A5C + +gUnknown_08516B2C:: + .incbin "baserom.gba", 0x516b2c, 0x80 + +gUnknown_08516BAC:: + .incbin "baserom.gba", 0x516bac, 0x80 + +gUnknown_08516C2C:: + .incbin "baserom.gba", 0x516c2c, 0x80 + +gUnknown_08516CAC:: + .incbin "baserom.gba", 0x516cac, 0x80 + gUnknown_08516D2C:: @ 8516D2C - .incbin "baserom.gba", 0x516d2c, 0x110 +@ replacing .incbin "baserom.gba", 0x00516d2c, 0x10 + .4byte gUnknown_08516B2C + .4byte gUnknown_08516BAC + .4byte gUnknown_08516C2C + .4byte gUnknown_08516CAC + +gUnknown_08516D3C:: + .incbin "baserom.gba", 0x516d3c, 0x80 + +gUnknown_08516DBC:: + .incbin "baserom.gba", 0x516dbc, 0x80 + gUnknown_08516E3C:: @ 8516E3C - .incbin "baserom.gba", 0x516e3c, 0xc08 +@ replacing .incbin "baserom.gba", 0x00516e3c, 0x8 + .4byte gUnknown_08516D3C + .4byte gUnknown_08516DBC + +gUnknown_08516E44:: + .incbin "baserom.gba", 0x516e44, 0x180 + +gUnknown_08516FC4:: + .incbin "baserom.gba", 0x516fc4, 0x180 + +gUnknown_08517144:: + .incbin "baserom.gba", 0x517144, 0x180 + +gUnknown_085172C4:: + .incbin "baserom.gba", 0x5172c4, 0x280 + +gUnknown_08517544:: + .incbin "baserom.gba", 0x517544, 0x280 + +gUnknown_085177C4:: + .incbin "baserom.gba", 0x5177c4, 0x280 + gUnknown_08517A44:: @ 8517A44 - .incbin "baserom.gba", 0x517a44, 0xc +@ replacing .incbin "baserom.gba", 0x00517a44, 0xc + .4byte gUnknown_08516E44 + .4byte gUnknown_08516FC4 + .4byte gUnknown_08517144 gUnknown_08517A50:: @ 8517A50 - .incbin "baserom.gba", 0x517a50, 0x1ac +@ replacing .incbin "baserom.gba", 0x00517a50, 0xc + .4byte gUnknown_085172C4 + .4byte gUnknown_08517544 + .4byte gUnknown_085177C4 + +gUnknown_08517A5C:: + .incbin "baserom.gba", 0x517a5c, 0x80 + +gUnknown_08517ADC:: + .incbin "baserom.gba", 0x517adc, 0x80 + +gUnknown_08517B5C:: + .incbin "baserom.gba", 0x517b5c, 0x20 + +gUnknown_08517B7C:: + .incbin "baserom.gba", 0x517b7c, 0x20 + +gUnknown_08517B9C:: + .incbin "baserom.gba", 0x517b9c, 0x20 + +gUnknown_08517BBC:: + .incbin "baserom.gba", 0x517bbc, 0x40 + gUnknown_08517BFC:: @ 8517BFC - .incbin "baserom.gba", 0x517bfc, 0x10 +@ replacing .incbin "baserom.gba", 0x00517bfc, 0x10 + .4byte gUnknown_08517B5C + .4byte gUnknown_08517B7C + .4byte gUnknown_08517B9C + .4byte gUnknown_08517BBC gUnknown_08517C0C:: @ 8517C0C - .incbin "baserom.gba", 0x517c0c, 0x428 +@ replacing .incbin "baserom.gba", 0x00517c0c, 0x8 + .4byte gUnknown_08517A5C + .4byte gUnknown_08517ADC + +gUnknown_08517C14:: + .incbin "baserom.gba", 0x517c14, 0x200 + +gUnknown_08517E14:: + .incbin "baserom.gba", 0x517e14, 0x220 + gUnknown_08518034:: @ 8518034 - .incbin "baserom.gba", 0x518034, 0x268 +@ replacing .incbin "baserom.gba", 0x00518034, 0x8 + .4byte gUnknown_08517C14 + .4byte gUnknown_08517E14 + +gUnknown_0851803C:: + .incbin "baserom.gba", 0x51803c, 0x120 + +gUnknown_0851815C:: + .incbin "baserom.gba", 0x51815c, 0x140 + gUnknown_0851829C:: @ 851829C - .incbin "baserom.gba", 0x51829c, 0x8028 +@ replacing .incbin "baserom.gba", 0x0051829c, 0x8 + .4byte gUnknown_0851803C + .4byte gUnknown_0851815C + +gUnknown_085182A4:: + .incbin "baserom.gba", 0x5182a4, 0xc00 + +gUnknown_08518EA4:: + .incbin "baserom.gba", 0x518ea4, 0xc00 + +gUnknown_08519AA4:: + .incbin "baserom.gba", 0x519aa4, 0xc00 + +gUnknown_0851A6A4:: + .incbin "baserom.gba", 0x51a6a4, 0xc00 + +gUnknown_0851B2A4:: + .incbin "baserom.gba", 0x51b2a4, 0xc00 + +gUnknown_0851BEA4:: + .incbin "baserom.gba", 0x51bea4, 0xc00 + +gUnknown_0851CAA4:: + .incbin "baserom.gba", 0x51caa4, 0xc00 + +gUnknown_0851D6A4:: + .incbin "baserom.gba", 0x51d6a4, 0x2c20 + gUnknown_085202C4:: @ 85202C4 - .incbin "baserom.gba", 0x5202c4, 0x45a0 +@ replacing .incbin "baserom.gba", 0x005202c4, 0x20 + .4byte gUnknown_085182A4 + .4byte gUnknown_08518EA4 + .4byte gUnknown_08519AA4 + .4byte gUnknown_0851A6A4 + .4byte gUnknown_0851B2A4 + .4byte gUnknown_0851BEA4 + .4byte gUnknown_0851CAA4 + .4byte gUnknown_0851D6A4 + +gUnknown_085202E4:: + .incbin "baserom.gba", 0x5202e4, 0x100 + +gUnknown_085203E4:: + .incbin "baserom.gba", 0x5203e4, 0x100 + +gUnknown_085204E4:: + .incbin "baserom.gba", 0x5204e4, 0x120 + +gUnknown_08520604:: + .incbin "baserom.gba", 0x520604, 0x100 + +gUnknown_08520704:: + .incbin "baserom.gba", 0x520704, 0x100 + +gUnknown_08520804:: + .incbin "baserom.gba", 0x520804, 0x4060 + gUnknown_08524864:: @ 8524864 - .incbin "baserom.gba", 0x524864, 0xc +@ replacing .incbin "baserom.gba", 0x00524864, 0xc + .4byte gUnknown_085202E4 + .4byte gUnknown_085203E4 + .4byte gUnknown_085204E4 gUnknown_08524870:: @ 8524870 - .incbin "baserom.gba", 0x524870, 0xc +@ replacing .incbin "baserom.gba", 0x00524870, 0xc + .4byte gUnknown_08520604 + .4byte gUnknown_08520704 + .4byte gUnknown_08520804 + diff --git a/src/palette.c b/src/palette.c index 4c09206ba..da03516d0 100644 --- a/src/palette.c +++ b/src/palette.c @@ -62,8 +62,6 @@ EWRAM_DATA u32 sPlttBufferTransferPending = 0; EWRAM_DATA u8 gPaletteDecompressionBuffer[0x400] = {0}; extern const u16 *const gUnknown_08510764[]; -extern const u16 *const gUnknown_085112C4[]; -extern const u16 *const gUnknown_08511BCC[]; extern const u16 *const gUnknown_08512574[]; extern const u16 *const gUnknown_08512E54[]; extern const u16 *const gUnknown_08513174[]; @@ -695,7 +693,7 @@ void sub_80A1394(u16 timer_div, u8 timer_mod) } else { - timer_div &= 3; + timer_div %= 4; sub_80A0980(gUnknown_085153E4[timer_div], gUnknown_08515344[timer_mod], 0x80); sub_80A0980(gUnknown_085153F4[timer_div], gUnknown_08515364[timer_mod], 0x80); } @@ -704,7 +702,7 @@ void sub_80A1394(u16 timer_div, u8 timer_mod) void sub_80A1434(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; - timer_div &= 0x7; + timer_div %= 8; if (gUnknown_08515824[timer_div]) sub_80A0980(gUnknown_08515824[timer_div], gUnknown_08515804[timer_mod], 0x80); } @@ -728,7 +726,7 @@ void sub_80A1498(u16 timer) void sub_80A14C0(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; - timer_div &= 7; + timer_div %= 8; sub_80A0980(gUnknown_085161DC[timer_div], gUnknown_085161BC[timer_mod], 0x80); } From 4d78e62fd90531a1469b7a1a3e279a5a734f62b2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 22:23:00 -0400 Subject: [PATCH 331/342] Sanitize data/tilesets.s --- asm/battle_anim.s | 4 ++-- data/tileset.s | 26 ++++++++++++-------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/asm/battle_anim.s b/asm/battle_anim.s index 9c0190214..ee85f5565 100644 --- a/asm/battle_anim.s +++ b/asm/battle_anim.s @@ -449,10 +449,10 @@ ma00_load_graphics: @ 80A3D24 lsls r0, 8 orrs r4, r0 lsls r5, r4, 3 - ldr r0, =gUnknown_085112C4 + ldr r0, =gUnknown_085112B4 + 0x10 adds r0, r5, r0 bl LoadCompressedObjectPicUsingHeap - ldr r0, =gUnknown_08511BCC + ldr r0, =gUnknown_08511A34 + 0x198 adds r5, r0 adds r0, r5, 0 bl LoadCompressedObjectPaletteUsingHeap diff --git a/data/tileset.s b/data/tileset.s index 3a1efb5fc..c60d83d61 100644 --- a/data/tileset.s +++ b/data/tileset.s @@ -11,8 +11,9 @@ gUnknown_08510644:: .incbin "baserom.gba", 0x510644, 0x80 gUnknown_085106C4:: - .incbin "baserom.gba", 0x5106c4, 0xa0 + .incbin "baserom.gba", 0x5106c4, 0x80 + .space 0x20 gUnknown_08510764:: @ 8510764 @ replacing .incbin "baserom.gba", 0x00510764, 0x10 @@ -31,21 +32,13 @@ gUnknown_08510EF4:: .incbin "baserom.gba", 0x510ef4, 0x3c0 gUnknown_085112B4:: - .incbin "baserom.gba", 0x5112b4, 0x10 - - -gUnknown_085112C4:: @ 85112C4 - .incbin "baserom.gba", 0x5112c4, 0x3b0 + .incbin "baserom.gba", 0x5112b4, 0x3c0 gUnknown_08511674:: .incbin "baserom.gba", 0x511674, 0x3c0 gUnknown_08511A34:: - .incbin "baserom.gba", 0x511a34, 0x198 - - -gUnknown_08511BCC:: @ 8511BCC - .incbin "baserom.gba", 0x511bcc, 0x228 + .incbin "baserom.gba", 0x511a34, 0x3c0 gUnknown_08511DF4:: .incbin "baserom.gba", 0x511df4, 0x3c0 @@ -259,8 +252,9 @@ gUnknown_08515224:: .incbin "baserom.gba", 0x515224, 0x80 gUnknown_085152A4:: - .incbin "baserom.gba", 0x5152a4, 0xa0 + .incbin "baserom.gba", 0x5152a4, 0x80 + .space 0x20 gUnknown_08515344:: @ 8515344 @ replacing .incbin "baserom.gba", 0x00515344, 0x20 @@ -372,7 +366,9 @@ gUnknown_08515844:: .incbin "baserom.gba", 0x515844, 0x80 gUnknown_085158C4:: - .incbin "baserom.gba", 0x5158c4, 0xa0 + .incbin "baserom.gba", 0x5158c4, 0x80 + + .space 0x20 gUnknown_08515964:: @ 8515964 @@ -422,7 +418,9 @@ gUnknown_0851609C:: .incbin "baserom.gba", 0x51609c, 0x80 gUnknown_0851611C:: - .incbin "baserom.gba", 0x51611c, 0xa0 + .incbin "baserom.gba", 0x51611c, 0x80 + + .space 0x20 gUnknown_085161BC:: @ 85161BC From c9cad220de5c7946d523dd18de5c61f4f09d63fc Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Sun, 1 Oct 2017 03:08:19 -0500 Subject: [PATCH 332/342] Extract baseroms from intro_credits_graphics.s --- asm/intro.s | 18 +- data/evolution_graphics.s | 2 +- data/graphics.s | 71 +-- data/intro.s | 108 ++--- data/intro_credits_graphics.s | 407 +++++++++++++++--- graphics/intro/85F0CFC.pal | 51 +++ graphics/intro/85F0D5C.pal | 51 +++ graphics/intro/85F231C.pal | 35 ++ .../intro/{leaves_gflogo.png => intro.png} | Bin ...aves_foreground.bin => intro1_bg0_map.bin} | Bin ...eaves_midground.bin => intro1_bg1_map.bin} | Bin ...leaves_bgleaves.bin => intro1_bg2_map.bin} | Bin ...ves_bgmountains.bin => intro1_bg3_map.bin} | Bin .../intro/{leaves.pal => intro1_bgpal.pal} | 0 .../{leaves_drops.pal => intro1_drops.pal} | 0 graphics/intro/{latis.png => intro1_eon.png} | Bin ...lying_silhouette.pal => intro1_flygon.pal} | 0 ...lygon_silhouette.png => intro1_flygon.png} | Bin .../{leaves_gflogo.pal => intro1_gflogo.pal} | 0 ...droplet_sparkle.png => intro1_sparkle.png} | Bin graphics/intro/intro2_bgclouds.pal | 19 + graphics/intro/intro2_bgclouds.png | Bin 0 -> 718 bytes graphics/intro/intro2_bgclouds2.png | Bin 0 -> 296 bytes graphics/intro/intro2_bgclouds_afternoon.pal | 19 + graphics/intro/intro2_bgclouds_map.bin | Bin 0 -> 4096 bytes graphics/intro/intro2_bgnight.pal | 19 + graphics/intro/intro2_bgnight.png | Bin 0 -> 536 bytes graphics/intro/intro2_bgnight_map.bin | Bin 0 -> 4096 bytes graphics/intro/intro2_bgtrees.pal | 19 + graphics/intro/intro2_bgtrees.png | Bin 0 -> 1023 bytes graphics/intro/intro2_bgtrees2.pal | 19 + graphics/intro/intro2_bgtrees2_afternoon.pal | 19 + graphics/intro/intro2_bgtrees_map.bin | Bin 0 -> 4096 bytes graphics/intro/intro2_bgtreessmall.png | Bin 0 -> 360 bytes graphics/intro/intro2_bicycle.png | Bin 0 -> 735 bytes graphics/intro/intro2_brendan.pal | 19 + graphics/intro/intro2_brendan.png | Bin 0 -> 1476 bytes graphics/intro/intro2_brendan_noturn.pal | 19 + graphics/intro/intro2_brendan_noturn.png | Bin 0 -> 1165 bytes ...{kyogre_bubbles.pal => intro2_bubbles.pal} | 0 ...{kyogre_bubbles.png => intro2_bubbles.png} | Bin graphics/intro/intro2_flygon.pal | 19 + graphics/intro/intro2_flygon.png | Bin 0 -> 942 bytes graphics/intro/intro2_grass.pal | 19 + graphics/intro/intro2_grass.png | Bin 0 -> 399 bytes graphics/intro/intro2_grass_afternoon.pal | 19 + graphics/intro/intro2_grass_map.bin | Bin 0 -> 2048 bytes graphics/intro/intro2_grass_night.pal | 19 + graphics/intro/intro2_latias.pal | 19 + graphics/intro/intro2_latias.png | Bin 0 -> 680 bytes graphics/intro/intro2_latios.pal | 19 + graphics/intro/intro2_latios.png | Bin 0 -> 796 bytes .../{manectric.pal => intro2_manectric.pal} | 0 .../{manectric.png => intro2_manectric.png} | Bin graphics/intro/intro2_may.pal | 19 + graphics/intro/intro2_may.png | Bin 0 -> 1644 bytes graphics/intro/intro2_may_noturn.png | Bin 0 -> 1275 bytes graphics/intro/intro2_night.png | Bin 0 -> 254 bytes .../intro/{torchic.pal => intro2_torchic.pal} | 0 .../intro/{torchic.png => intro2_torchic.png} | Bin .../intro/{volbeat.pal => intro2_volbeat.pal} | 0 .../intro/{volbeat.png => intro2_volbeat.png} | Bin ...aza_lightning.pal => intro3_lightning.pal} | 0 ...aza_lightning.png => intro3_lightning.png} | Bin .../{battle_circle.png => intro3_misc.png} | Bin .../{battle_circle_1.pal => intro3_misc1.pal} | 0 .../{battle_circle_2.pal => intro3_misc2.pal} | 0 ...attle_pokeball.pal => intro3_pokeball.pal} | 0 ...attle_pokeball.png => intro3_pokeball.png} | Bin ...e_pokeball.bin => intro3_pokeball_map.bin} | Bin ...{battle_streaks.pal => intro3_streaks.pal} | 0 ...{battle_streaks.png => intro3_streaks.png} | Bin ...tle_streaks.bin => intro3_streaks_map.bin} | Bin .../intro/{leaves_bg.png => introgfx.png} | Bin 74 files changed, 888 insertions(+), 140 deletions(-) create mode 100644 graphics/intro/85F0CFC.pal create mode 100644 graphics/intro/85F0D5C.pal create mode 100644 graphics/intro/85F231C.pal rename graphics/intro/{leaves_gflogo.png => intro.png} (100%) rename graphics/intro/{leaves_foreground.bin => intro1_bg0_map.bin} (100%) rename graphics/intro/{leaves_midground.bin => intro1_bg1_map.bin} (100%) rename graphics/intro/{leaves_bgleaves.bin => intro1_bg2_map.bin} (100%) rename graphics/intro/{leaves_bgmountains.bin => intro1_bg3_map.bin} (100%) rename graphics/intro/{leaves.pal => intro1_bgpal.pal} (100%) rename graphics/intro/{leaves_drops.pal => intro1_drops.pal} (100%) rename graphics/intro/{latis.png => intro1_eon.png} (100%) rename graphics/intro/{flying_silhouette.pal => intro1_flygon.pal} (100%) rename graphics/intro/{flygon_silhouette.png => intro1_flygon.png} (100%) rename graphics/intro/{leaves_gflogo.pal => intro1_gflogo.pal} (100%) rename graphics/intro/{droplet_sparkle.png => intro1_sparkle.png} (100%) create mode 100644 graphics/intro/intro2_bgclouds.pal create mode 100644 graphics/intro/intro2_bgclouds.png create mode 100644 graphics/intro/intro2_bgclouds2.png create mode 100644 graphics/intro/intro2_bgclouds_afternoon.pal create mode 100644 graphics/intro/intro2_bgclouds_map.bin create mode 100644 graphics/intro/intro2_bgnight.pal create mode 100644 graphics/intro/intro2_bgnight.png create mode 100644 graphics/intro/intro2_bgnight_map.bin create mode 100644 graphics/intro/intro2_bgtrees.pal create mode 100644 graphics/intro/intro2_bgtrees.png create mode 100644 graphics/intro/intro2_bgtrees2.pal create mode 100644 graphics/intro/intro2_bgtrees2_afternoon.pal create mode 100644 graphics/intro/intro2_bgtrees_map.bin create mode 100644 graphics/intro/intro2_bgtreessmall.png create mode 100644 graphics/intro/intro2_bicycle.png create mode 100644 graphics/intro/intro2_brendan.pal create mode 100644 graphics/intro/intro2_brendan.png create mode 100644 graphics/intro/intro2_brendan_noturn.pal create mode 100644 graphics/intro/intro2_brendan_noturn.png rename graphics/intro/{kyogre_bubbles.pal => intro2_bubbles.pal} (100%) rename graphics/intro/{kyogre_bubbles.png => intro2_bubbles.png} (100%) create mode 100644 graphics/intro/intro2_flygon.pal create mode 100644 graphics/intro/intro2_flygon.png create mode 100644 graphics/intro/intro2_grass.pal create mode 100644 graphics/intro/intro2_grass.png create mode 100644 graphics/intro/intro2_grass_afternoon.pal create mode 100644 graphics/intro/intro2_grass_map.bin create mode 100644 graphics/intro/intro2_grass_night.pal create mode 100644 graphics/intro/intro2_latias.pal create mode 100644 graphics/intro/intro2_latias.png create mode 100644 graphics/intro/intro2_latios.pal create mode 100644 graphics/intro/intro2_latios.png rename graphics/intro/{manectric.pal => intro2_manectric.pal} (100%) rename graphics/intro/{manectric.png => intro2_manectric.png} (100%) create mode 100644 graphics/intro/intro2_may.pal create mode 100644 graphics/intro/intro2_may.png create mode 100644 graphics/intro/intro2_may_noturn.png create mode 100644 graphics/intro/intro2_night.png rename graphics/intro/{torchic.pal => intro2_torchic.pal} (100%) rename graphics/intro/{torchic.png => intro2_torchic.png} (100%) rename graphics/intro/{volbeat.pal => intro2_volbeat.pal} (100%) rename graphics/intro/{volbeat.png => intro2_volbeat.png} (100%) rename graphics/intro/{rayquaza_lightning.pal => intro3_lightning.pal} (100%) rename graphics/intro/{rayquaza_lightning.png => intro3_lightning.png} (100%) rename graphics/intro/{battle_circle.png => intro3_misc.png} (100%) rename graphics/intro/{battle_circle_1.pal => intro3_misc1.pal} (100%) rename graphics/intro/{battle_circle_2.pal => intro3_misc2.pal} (100%) rename graphics/intro/{battle_pokeball.pal => intro3_pokeball.pal} (100%) rename graphics/intro/{battle_pokeball.png => intro3_pokeball.png} (100%) rename graphics/intro/{battle_pokeball.bin => intro3_pokeball_map.bin} (100%) rename graphics/intro/{battle_streaks.pal => intro3_streaks.pal} (100%) rename graphics/intro/{battle_streaks.png => intro3_streaks.png} (100%) rename graphics/intro/{battle_streaks.bin => intro3_streaks_map.bin} (100%) rename graphics/intro/{leaves_bg.png => introgfx.png} (100%) diff --git a/asm/intro.s b/asm/intro.s index 01ac2204b..cd8f7c2d8 100644 --- a/asm/intro.s +++ b/asm/intro.s @@ -376,11 +376,11 @@ task_intro_1: @ 816CF18 movs r0, 0x12 movs r1, 0x28 bl SetGpuReg - ldr r0, =gIntroLeavesBgGfx + ldr r0, =gIntro1BGLeavesGfx movs r1, 0xC0 lsls r1, 19 bl LZ77UnCompVram - ldr r0, =gIntroLeavesForegroundTilemap + ldr r0, =gIntro1BG0_Tilemap ldr r1, =0x06008000 bl LZ77UnCompVram ldr r1, =0x06008800 @@ -393,7 +393,7 @@ task_intro_1: @ 816CF18 ldr r5, =0x81000400 str r5, [r4, 0x8] ldr r0, [r4, 0x8] - ldr r0, =gIntroLeavesMidgroundTilemap + ldr r0, =gIntro1BG1_Tilemap ldr r1, =0x06009000 bl LZ77UnCompVram ldr r1, =0x06009800 @@ -403,7 +403,7 @@ task_intro_1: @ 816CF18 str r1, [r4, 0x4] str r5, [r4, 0x8] ldr r0, [r4, 0x8] - ldr r0, =gIntroLeavesBgLeavesTilemap + ldr r0, =gIntro1BG2_Tilemap ldr r1, =0x0600a000 bl LZ77UnCompVram ldr r1, =0x0600a800 @@ -413,7 +413,7 @@ task_intro_1: @ 816CF18 str r1, [r4, 0x4] str r5, [r4, 0x8] ldr r0, [r4, 0x8] - ldr r0, =gIntroLeavesBgMountainsTilemap + ldr r0, =gIntro1BG3_Tilemap ldr r1, =0x0600b000 bl LZ77UnCompVram ldr r1, =0x0600b800 @@ -423,7 +423,7 @@ task_intro_1: @ 816CF18 str r1, [r4, 0x4] str r5, [r4, 0x8] ldr r0, [r4, 0x8] - ldr r0, =gIntroLeavesPal + ldr r0, =gIntro1BGPals movs r5, 0x80 lsls r5, 2 movs r1, 0 @@ -1779,14 +1779,14 @@ task_intro_10: @ 816DBAC lsls r5, 24 lsrs r5, 24 bl intro_reset_and_hide_bgs - ldr r0, =gIntroBattlePokeBallGfx + ldr r0, =gIntro3Pokeball_Gfx movs r1, 0xC0 lsls r1, 19 bl LZ77UnCompVram - ldr r0, =gIntroBattlePokeBallTilemap + ldr r0, =gIntro3Pokeball_Tilemap ldr r1, =0x06004000 bl LZ77UnCompVram - ldr r0, =gIntroBattlePokeBallPal + ldr r0, =gIntro3PokeballPal movs r2, 0x80 lsls r2, 2 movs r1, 0 diff --git a/data/evolution_graphics.s b/data/evolution_graphics.s index c357efb12..d6ad2e578 100644 --- a/data/evolution_graphics.s +++ b/data/evolution_graphics.s @@ -3,7 +3,7 @@ .section .rodata - .incbin "baserom.gba", 0x5f53c4, 0x48 + .incbin "baserom.gba", 0x5f53cc, 0x40 gUnknown_085F540C:: @ 85F540C .incbin "baserom.gba", 0x5f540c, 0x10 diff --git a/data/graphics.s b/data/graphics.s index e206a46f1..e5c8ad49f 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -377,8 +377,13 @@ gUnknown_08D85A1C:: @ 8D85A1C .incbin "baserom.gba", 0xd85a1c, 0x234 gUnknown_08D85C50:: @ 8D85C50 - .incbin "baserom.gba", 0xd85c50, 0x80 + .incbin "baserom.gba", 0xd85c50, 0x60 + .align 2 +gIntro2BrendanNoTurnPal:: @ 8D85CB0 + .incbin "graphics/intro/intro2_brendan_noturn.gbapal" + + .align 2 gUnknown_08D85CD0:: @ 8D85CD0 .incbin "baserom.gba", 0xd85cd0, 0x182 @@ -392,36 +397,46 @@ gUnknown_08D85E7C:: @ 8D85E7C .incbin "baserom.gba", 0xd85e7c, 0x54 .align 2 -gIntroVolbeatPal:: @ 8D85ED0 - .incbin "graphics/intro/volbeat.gbapal" +gIntro2VolbeatPal:: @ 8D85ED0 + .incbin "graphics/intro/intro2_volbeat.gbapal" .align 2 -gIntroTorchicPal:: @ 8D85EF0 - .incbin "graphics/intro/torchic.gbapal" +gIntro2TorchicPal:: @ 8D85EF0 + .incbin "graphics/intro/intro2_torchic.gbapal" .align 2 -gIntroManectricPal:: @ 8D85ED0 - .incbin "graphics/intro/manectric.gbapal" +gIntro2ManectricPal:: @ 8D85ED0 + .incbin "graphics/intro/intro2_manectric.gbapal" .align 2 -gUnknown_08D85F30:: @ 8D85ED0 - .incbin "baserom.gba", 0xd85f30, 0x20 +gIntro2FlygonPal:: @ 8D85F30 + .incbin "graphics/intro/intro2_flygon.gbapal" .align 2 -gIntroVolbeatGfx:: @ 8D85F50 - .incbin "graphics/intro/volbeat.4bpp.lz" +gIntro2VolbeatGfx:: @ 8D85F50 + .incbin "graphics/intro/intro2_volbeat.4bpp.lz" .align 2 -gIntroTorchicGfx:: @ 8D86130 - .incbin "graphics/intro/torchic.4bpp.lz" +gIntro2TorchicGfx:: @ 8D86130 + .incbin "graphics/intro/intro2_torchic.4bpp.lz" .align 2 -gIntroManectricGfx:: @ 8D86550 - .incbin "graphics/intro/manectric.4bpp.lz" +gIntro2ManectricGfx:: @ 8D86550 + .incbin "graphics/intro/intro2_manectric.4bpp.lz" .align 2 - .incbin "baserom.gba", 0xd8702c, 0x1468 +gIntro2FlygonGfx:: @ 8D8702C + .incbin "graphics/intro/intro2_flygon.4bpp.lz" + .align 2 +gIntro2BrendanNoTurnGfx:: @ 8D87568 + .incbin "graphics/intro/intro2_brendan_noturn.4bpp.lz" + + .align 2 +gIntro2MayNoTurnGfx:: @ 8D87CA4 + .incbin "graphics/intro/intro2_may_noturn.4bpp.lz" + + .align 2 gUnknown_08D88494:: @ 8D88494 .incbin "baserom.gba", 0xd88494, 0x8ac @@ -456,12 +471,12 @@ gUnknown_08D8B6E8:: @ 8D8B6E8 .incbin "baserom.gba", 0xd8b6e8, 0x124 .align 2 -gIntroRayquazaLightningGfx:: @ 8D8B80C - .incbin "graphics/intro/rayquaza_lightning.4bpp.lz" +gIntro3LightningGfx:: @ 8D8B80C + .incbin "graphics/intro/intro3_lightning.4bpp.lz" .align 2 -gIntroRayquazaLightningPal:: @ 8D8BA54 - .incbin "graphics/intro/rayquaza_lightning.gbapal" +gIntro3LightningPal:: @ 8D8BA54 + .incbin "graphics/intro/intro3_lightning.gbapal" .align 2 gUnknown_08D8BA74:: @ 8D8BA74 @@ -477,20 +492,20 @@ gUnknown_08D8CCC8:: @ 8D8CCC8 .incbin "baserom.gba", 0xd8ccc8, 0x27c .align 2 -gIntroKyogreBubblesGfx:: @ 8D8CF44 - .incbin "graphics/intro/kyogre_bubbles.4bpp.lz" +gIntro2BubblesGfx:: @ 8D8CF44 + .incbin "graphics/intro/intro2_bubbles.4bpp.lz" .align 2 -gIntroKyogreBubblesPal:: @ 8D8D110 - .incbin "graphics/intro/kyogre_bubbles.gbapal" +gIntro2BubblesPal:: @ 8D8D110 + .incbin "graphics/intro/intro2_bubbles.gbapal" .align 2 -gIntroFlygonSilhouette:: @ 8D8D130 - .incbin "graphics/intro/flygon_silhouette.4bpp.lz" +gIntro1FlygonGfx:: @ 8D8D130 + .incbin "graphics/intro/intro1_flygon.4bpp.lz" .align 2 -gIntroLeavesDropletSparkleGfx:: @ 8D8D208 - .incbin "graphics/intro/droplet_sparkle.4bpp.lz" +gIntro1SparkleGfx:: @ 8D8D208 + .incbin "graphics/intro/intro1_sparkle.4bpp.lz" .align 2 .incbin "baserom.gba", 0xd8d2a4, 0x16c diff --git a/data/intro.s b/data/intro.s index ea6223c7e..d43a57972 100644 --- a/data/intro.s +++ b/data/intro.s @@ -4,79 +4,79 @@ .section .rodata .align 2 -gIntroLeavesDropsPal:: @ 85DFF90 - .incbin "graphics/intro/leaves_drops.gbapal" +gIntro1DropsPal:: @ 85DFF90 + .incbin "graphics/intro/intro1_drops.gbapal" .align 2 -gIntroLeavesGFLogoPal:: @ 85DFFB0 - .incbin "graphics/intro/leaves_gflogo.gbapal" +gIntro1GFLogoPal:: @ 85DFFB0 + .incbin "graphics/intro/intro1_gflogo.gbapal" .align 2 -gIntroLeavesGFLogoGfx:: @ 85DFFD0 - .incbin "graphics/intro/leaves_gflogo.4bpp.lz" +gIntroTiles:: @ 85DFFD0 + .incbin "graphics/intro/intro.4bpp.lz" .align 2 -gIntroLeavesPal:: @ 85E05C4 - .incbin "graphics/intro/leaves.gbapal" +gIntro1BGPals:: @ 85E05C4 + .incbin "graphics/intro/intro1_bgpal.gbapal" .align 2 -gIntroLeavesForegroundTilemap:: @ 85E07C4 - .incbin "graphics/intro/leaves_foreground.bin.lz" +gIntro1BG0_Tilemap:: @ 85E07C4 + .incbin "graphics/intro/intro1_bg0_map.bin.lz" .align 2 -gIntroLeavesMidgroundTilemap:: @ 85E0B78 - .incbin "graphics/intro/leaves_midground.bin.lz" +gIntro1BG1_Tilemap:: @ 85E0B78 + .incbin "graphics/intro/intro1_bg1_map.bin.lz" .align 2 -gIntroLeavesBgLeavesTilemap:: @ 85E0EAC - .incbin "graphics/intro/leaves_bgleaves.bin.lz" +gIntro1BG2_Tilemap:: @ 85E0EAC + .incbin "graphics/intro/intro1_bg2_map.bin.lz" .align 2 -gIntroLeavesBgMountainsTilemap:: @ 85E119C - .incbin "graphics/intro/leaves_bgmountains.bin.lz" +gIntro1BG3_Tilemap:: @ 85E119C + .incbin "graphics/intro/intro1_bg3_map.bin.lz" .align 2 -gIntroLeavesBgGfx:: @ 85E13B4 - .incbin "graphics/intro/leaves_bg.4bpp.lz" +gIntro1BGLeavesGfx:: @ 85E13B4 + .incbin "graphics/intro/introgfx.4bpp.lz" .align 2 -gIntroBattlePokeBallPal:: @ 85E3524 - .incbin "graphics/intro/battle_pokeball.gbapal" +gIntro3PokeballPal:: @ 85E3524 + .incbin "graphics/intro/intro3_pokeball.gbapal" .align 2 -gIntroBattlePokeBallTilemap:: @ 85E3724 - .incbin "graphics/intro/battle_pokeball.bin.lz" +gIntro3Pokeball_Tilemap:: @ 85E3724 + .incbin "graphics/intro/intro3_pokeball_map.bin.lz" .align 2 -gIntroBattlePokeBallGfx:: @ 85E3854 - .incbin "graphics/intro/battle_pokeball.8bpp.lz" +gIntro3Pokeball_Gfx:: @ 85E3854 + .incbin "graphics/intro/intro3_pokeball.8bpp.lz" .align 2 - .incbin "graphics/intro/battle_streaks.gbapal" + .incbin "graphics/intro/intro3_streaks.gbapal" .align 2 - .incbin "graphics/intro/battle_streaks.4bpp.lz" + .incbin "graphics/intro/intro3_streaks.4bpp.lz" .align 2 - .incbin "graphics/intro/battle_streaks.bin.lz" + .incbin "graphics/intro/intro3_streaks_map.bin.lz" .align 2 -gIntroBattleCirclePal:: @ 85E4570 - .incbin "graphics/intro/battle_circle_1.gbapal" +gIntro3Misc1Pal:: @ 85E4570 + .incbin "graphics/intro/intro3_misc1.gbapal" .align 2 - .incbin "graphics/intro/battle_circle_2.gbapal" + .incbin "graphics/intro/intro3_misc2.gbapal" .align 2 -gIntroBattleCircleGfx:: @ 85E45B0 - .incbin "graphics/intro/battle_circle.4bpp.lz" +gIntro3MiscTiles:: @ 85E45B0 + .incbin "graphics/intro/intro3_misc.4bpp.lz" .align 2 -gIntroFlyingPkmnSilhouettePal:: @ 85E492C - .incbin "graphics/intro/flying_silhouette.gbapal" +gIntro1FlygonPal:: @ 85E492C + .incbin "graphics/intro/intro1_flygon.gbapal" .align 2 - .incbin "graphics/intro/latis.4bpp.lz" + .incbin "graphics/intro/intro1_eon.4bpp.lz" .align 2 .byte 0x02, 0x03, 0x04, 0x05, 0x01, 0x01, 0x01, 0x06 @@ -90,12 +90,12 @@ gIntroFlyingPkmnSilhouettePal:: @ 85E492C .align 2 gUnknown_085E4A74:: @ 85E4A74 - obj_tiles gIntroLeavesDropletSparkleGfx, 0x0400, 0x05e1 + obj_tiles gIntro1SparkleGfx, 0x0400, 0x05e1 null_obj_tiles .align 2 gUnknown_085E4A84:: @ 85E4A84 - obj_pal gIntroRayquazaLightningPal, 0x05e1 + obj_pal gIntro3LightningPal, 0x05e1 null_obj_pal .align 2 @@ -122,16 +122,16 @@ gUnknown_085E4AD0:: @ 85E4AD0 .align 2 gUnknown_085E4AE8:: @ 85E4AE8 - obj_tiles gIntroVolbeatGfx, 0x0400, 0x05dc - obj_tiles gIntroTorchicGfx, 0x0c00, 0x05dd - obj_tiles gIntroManectricGfx, 0x2000, 0x05de + obj_tiles gIntro2VolbeatGfx, 0x0400, 0x05dc + obj_tiles gIntro2TorchicGfx, 0x0c00, 0x05dd + obj_tiles gIntro2ManectricGfx, 0x2000, 0x05de null_obj_tiles .align 2 gUnknown_085E4B08:: @ 85E4B08 - obj_pal gIntroVolbeatPal, 0x05dc - obj_pal gIntroTorchicPal, 0x05dd - obj_pal gIntroManectricPal, 0x05de + obj_pal gIntro2VolbeatPal, 0x05dc + obj_pal gIntro2TorchicPal, 0x05dd + obj_pal gIntro2ManectricPal, 0x05de null_obj_pal .align 2 @@ -194,12 +194,12 @@ gUnknown_085E4BDC:: @ 85E4BDC .align 2 gUnknown_085E4BF4:: @ 85E4BF4 - obj_tiles gIntroRayquazaLightningGfx, 0x0c00, 0x05df + obj_tiles gIntro3LightningGfx, 0x0c00, 0x05df null_obj_tiles .align 2 gUnknown_085E4C04:: @ 85E4C04 - obj_pal gIntroRayquazaLightningPal, 0x05df + obj_pal gIntro3LightningPal, 0x05df null_obj_pal .align 2 @@ -236,12 +236,12 @@ gUnknown_085E4C64:: @ 85E4C64 .align 2 gUnknown_085E4C88:: @ 85E4C88 - obj_tiles gIntroKyogreBubblesGfx, 0x0600, 0x05e0 + obj_tiles gIntro2BubblesGfx, 0x0600, 0x05e0 null_obj_tiles .align 2 gUnknown_085E4C98:: @ 85E4C98 - obj_pal gIntroKyogreBubblesPal, 0x05e0 + obj_pal gIntro2BubblesPal, 0x05e0 null_obj_pal .align 2 @@ -488,18 +488,18 @@ gUnknown_085E4FC4:: @ 85E4FC4 .align 2 gUnknown_085E4FDC:: @ 85E4FDC - obj_tiles gIntroLeavesGFLogoGfx, 0x1400, 0x07d0 + obj_tiles gIntroTiles, 0x1400, 0x07d0 null_obj_tiles gUnknown_085E4FEC:: @ 85E4FEC - obj_tiles gIntroFlygonSilhouette, 0x0400, 0x07d2 + obj_tiles gIntro1FlygonGfx, 0x0400, 0x07d2 null_obj_tiles .align 2 gUnknown_085E4FFC:: @ 85E4FFC - obj_pal gIntroLeavesDropsPal, 0x07d0 - obj_pal gIntroLeavesGFLogoPal, 0x07d1 - obj_pal gIntroFlyingPkmnSilhouettePal, 0x07d2 + obj_pal gIntro1DropsPal, 0x07d0 + obj_pal gIntro1GFLogoPal, 0x07d1 + obj_pal gIntro1FlygonPal, 0x07d2 null_obj_pal .align 2 @@ -520,10 +520,10 @@ gUnknown_085E5030:: @ 85E5030 .align 2 gUnknown_085E5048:: @ 85E5048 - obj_tiles gIntroBattleCircleGfx, 0x0a00, 0x07d3 + obj_tiles gIntro3MiscTiles, 0x0a00, 0x07d3 null_obj_tiles gUnknown_085E5058:: @ 85E5058 - obj_pal gIntroBattleCirclePal, 0x07d3 + obj_pal gIntro3Misc1Pal, 0x07d3 null_obj_pal diff --git a/data/intro_credits_graphics.s b/data/intro_credits_graphics.s index a1a0eb460..636c1a8fb 100644 --- a/data/intro_credits_graphics.s +++ b/data/intro_credits_graphics.s @@ -3,146 +3,457 @@ .section .rodata + .align 2 gUnknown_085F06E0:: @ 85F06E0 - .incbin "baserom.gba", 0x5f06e0, 0x20 + .incbin "graphics/intro/intro2_grass.gbapal" + .align 2 gUnknown_085F0700:: @ 85F0700 - .incbin "baserom.gba", 0x5f0700, 0x20 + .incbin "graphics/intro/intro2_grass_afternoon.gbapal" + .align 2 gUnknown_085F0720:: @ 85F0720 - .incbin "baserom.gba", 0x5f0720, 0x20 + .incbin "graphics/intro/intro2_grass_night.gbapal" + .align 2 gUnknown_085F0740:: @ 85F0740 - .incbin "baserom.gba", 0x5f0740, 0x480 + .incbin "graphics/intro/intro2_grass.4bpp.lz" + .align 2 gUnknown_085F0BC0:: @ 85F0BC0 - .incbin "baserom.gba", 0x5f0bc0, 0x13c + .incbin "graphics/intro/intro2_grass_map.bin.lz" + .align 2 gUnknown_085F0CFC:: @ 85F0CFC - .incbin "baserom.gba", 0x5f0cfc, 0x60 + .incbin "graphics/intro/85F0CFC.gbapal" + .align 2 gUnknown_085F0D5C:: @ 85F0D5C - .incbin "baserom.gba", 0x5f0d5c, 0x60 + .incbin "graphics/intro/85F0D5C.gbapal" + .align 2 gUnknown_085F0DBC:: @ 85F0DBC - .incbin "baserom.gba", 0x5f0dbc, 0x5dc + .incbin "graphics/intro/intro2_bgclouds.4bpp.lz" + .align 2 gUnknown_085F1398:: @ 85F1398 - .incbin "baserom.gba", 0x5f1398, 0x2d0 + .incbin "graphics/intro/intro2_bgclouds_map.bin.lz" + .align 2 gUnknown_085F1668:: @ 85F1668 - .incbin "baserom.gba", 0x5f1668, 0x20 + .incbin "graphics/intro/intro2_bgclouds.gbapal" + .align 2 gUnknown_085F1688:: @ 85F1688 - .incbin "baserom.gba", 0x5f1688, 0x20 + .incbin "graphics/intro/intro2_bgclouds_afternoon.gbapal" + .align 2 gUnknown_085F16A8:: @ 85F16A8 - .incbin "baserom.gba", 0x5f16a8, 0x13c + .incbin "graphics/intro/intro2_bgclouds2.4bpp.lz" + .align 2 gUnknown_085F17E4:: @ 85F17E4 - .incbin "baserom.gba", 0x5f17e4, 0x20 + .incbin "graphics/intro/intro2_bgtrees2.gbapal" + .align 2 gUnknown_085F1804:: @ 85F1804 - .incbin "baserom.gba", 0x5f1804, 0x20 + .incbin "graphics/intro/intro2_bgtrees2_afternoon.gbapal" + .align 2 gUnknown_085F1824:: @ 85F1824 - .incbin "baserom.gba", 0x5f1824, 0x688 + .incbin "graphics/intro/intro2_bgtrees.4bpp.lz" + .align 2 gUnknown_085F1EAC:: @ 85F1EAC - .incbin "baserom.gba", 0x5f1eac, 0x304 + .incbin "graphics/intro/intro2_bgtrees_map.bin.lz" + .align 2 gUnknown_085F21B0:: @ 85F21B0 - .incbin "baserom.gba", 0x5f21b0, 0x16c + .incbin "graphics/intro/intro2_bgtrees.gbapal" + .align 2 +gIntro2TreeGfx:: @ 85F21D0 + .incbin "graphics/intro/intro2_bgtreessmall.4bpp.lz" + + .align 2 gUnknown_085F231C:: @ 85F231C - .incbin "baserom.gba", 0x5f231c, 0x40 + .incbin "graphics/intro/85F231C.gbapal" + .align 2 gUnknown_085F235C:: @ 85F235C - .incbin "baserom.gba", 0x5f235c, 0x1ec + .incbin "graphics/intro/intro2_bgnight.4bpp.lz" + .align 2 gUnknown_085F2548:: @ 85F2548 - .incbin "baserom.gba", 0x5f2548, 0x20 + .incbin "graphics/intro/intro2_bgnight.gbapal" + .align 2 gUnknown_085F2568:: @ 85F2568 - .incbin "baserom.gba", 0x5f2568, 0x2ae4 + .incbin "graphics/intro/intro2_bgnight_map.bin.lz" + .align 2 +gIntro2NightGfx:: @ 85F2814 + .incbin "graphics/intro/intro2_night.4bpp.lz" + + .align 2 +gIntro2BrendanPal:: @ 85F2898 + .incbin "graphics/intro/intro2_brendan.gbapal" + + .align 2 +gIntro2BrendanGfx:: @ 85F28B8 + .incbin "graphics/intro/intro2_brendan.4bpp.lz" + + .align 2 +gIntro2MayPal:: @ 85F3470 + .incbin "graphics/intro/intro2_may.gbapal" + + .align 2 +gUnknown_085F3490:: @ 85F3490 + .space 0x1E0 + + .align 2 +gIntro2MayGfx:: @ 85F3670 + .incbin "graphics/intro/intro2_may.4bpp.lz" + + .align 2 +gIntro2BicycleGfx:: @ 85F4318 + .incbin "graphics/intro/intro2_bicycle.4bpp.lz" + + .align 2 +gIntro2LatiosPal:: @ 85F4744 + .incbin "graphics/intro/intro2_latios.gbapal" + + .align 2 +gIntro2LatiosGfx:: @ 85F4764 + .incbin "graphics/intro/intro2_latios.4bpp.lz" + + .align 2 +gIntro2LatiasPal:: @ 85F4C08 + .incbin "graphics/intro/intro2_latias.gbapal" + + .align 2 +gIntro2LatiasGfx:: @ 85F4C28 + .incbin "graphics/intro/intro2_latias.4bpp.lz" + + .align 2 gUnknown_085F504C:: @ 85F504C - .incbin "baserom.gba", 0x5f504c, 0x18 + spr_template 0x07d0, 0xffff, gDummyOamData, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_817B62C + .align 2 gUnknown_085F5064:: @ 85F5064 - .incbin "baserom.gba", 0x5f5064, 0x30 + obj_tiles gUnknown_085F16A8, 0x0400, 0x07d0 + null_obj_tiles + .align 2 +gUnknown_085F5074:: @ 85F5074 + obj_image_anim_frame 0, 30 + obj_image_anim_end + + .align 2 +gUnknown_085F507C:: @ 85F507C + obj_image_anim_frame 16, 30 + obj_image_anim_end + + .align 2 +gUnknown_085F5084:: @ 85F5084 + obj_image_anim_frame 20, 30 + obj_image_anim_end + + .align 2 +gUnknown_085F508C:: @ 85F508C + obj_image_anim_frame 22, 30 + obj_image_anim_end + + .align 2 gUnknown_085F5094:: @ 85F5094 - .incbin "baserom.gba", 0x5f5094, 0x10 + .4byte gUnknown_085F5074 + .4byte gUnknown_085F507C + .4byte gUnknown_085F5084 + .4byte gUnknown_085F508C + .align 2 gUnknown_085F50A4:: @ 85F50A4 - .incbin "baserom.gba", 0x5f50a4, 0x48 + .byte -128, 72, 32, 100 + .2byte 0xC00 + .space 2 + .byte -128, -98, 32, 100 + .2byte 0xC00 + .space 2 + .byte 65, -64, 40, 101 + .2byte 0x800 + .space 2 + .byte 65, 56, 40, 101 + .2byte 0x800 + .space 2 + .byte 18, 100, 44, 102 + .2byte 0x400 + .space 2 + .byte 18, -104, 44, 102 + .2byte 0x400 + .space 2 + .byte 19, 8, 46, 103 + .2byte 0x100 + .space 2 + .byte 19, 56, 46, 103 + .2byte 0x100 + .space 2 + .byte 19, -16, 46, 103 + .2byte 0x100 + .space 2 + .align 2 gUnknown_085F50EC:: @ 85F50EC - .incbin "baserom.gba", 0x5f50ec, 0x28 + obj_tiles gIntro2TreeGfx, 0x0400, 0x07d0 + null_obj_tiles + .align 2 +gUnknown_085F50FC:: @ 85F50FC + obj_image_anim_frame 0, 30 + obj_image_anim_end + + .align 2 +gUnknown_085F5104:: @ 85F5104 + obj_image_anim_frame 16, 30 + obj_image_anim_end + + .align 2 +gUnknown_085F510C:: @ 85F510C + obj_image_anim_frame 24, 30 + obj_image_anim_end + + .align 2 gUnknown_085F5114:: @ 85F5114 - .incbin "baserom.gba", 0x5f5114, 0xc + .4byte gUnknown_085F50FC + .4byte gUnknown_085F5104 + .4byte gUnknown_085F510C + .align 2 gUnknown_085F5120:: @ 85F5120 - .incbin "baserom.gba", 0x5f5120, 0x60 + .byte -128, 16, 88, 100 + .2byte 0x2000 + .space 2 + .byte -128, 80, 88, 100 + .2byte 0x2000 + .space 2 + .byte -128, -112, 88, 100 + .2byte 0x2000 + .space 2 + .byte -128, -48, 88, 100 + .2byte 0x2000 + .space 2 + .byte -95, 40, 88, 101 + .2byte 0x1000 + .space 2 + .byte -95, 104, 88, 101 + .2byte 0x1000 + .space 2 + .byte -95, -88, 88, 101 + .2byte 0x1000 + .space 2 + .byte -95, -24, 88, 101 + .2byte 0x1000 + .space 2 + .byte -94, 56, 88, 102 + .2byte 0x800 + .space 2 + .byte -94, 120, 88, 102 + .2byte 0x800 + .space 2 + .byte -94, -72, 88, 102 + .2byte 0x800 + .space 2 + .byte -94, -8, 88, 102 + .2byte 0x800 + .space 2 + .align 2 gUnknown_085F5180:: @ 85F5180 - .incbin "baserom.gba", 0x5f5180, 0x18 + obj_tiles gIntro2NightGfx, 0x0400, 0x07d0 + null_obj_tiles + .align 2 +gUnknown_085F5190:: @ 85F5190 + obj_image_anim_frame 0, 30 + obj_image_anim_end + + .align 2 gUnknown_085F5198:: @ 85F5198 - .incbin "baserom.gba", 0x5f5198, 0x4 + .4byte gUnknown_085F5190 + .align 2 gUnknown_085F519C:: @ 85F519C - .incbin "baserom.gba", 0x5f519c, 0x50 + .byte -128, 24, 88, 100 + .2byte 0x1000 + .space 2 + .byte -128, 64, 88, 100 + .2byte 0x1000 + .space 2 + .byte -128, 104, 88, 100 + .2byte 0x1000 + .space 2 + .byte -128, -112, 88, 100 + .2byte 0x1000 + .space 2 + .byte -128, -72, 88, 100 + .2byte 0x1000 + .space 2 + .byte -128, -32, 88, 100 + .2byte 0x1000 + .space 2 + .align 2 +gOamData_85F51CC:: @ 85F51CC + .2byte 0x00A0 + .2byte 0xC000 + .2byte 0x0400 + + .align 2 +gUnknown_085F51D4:: @ 85F51D4 + obj_image_anim_frame 0, 8 + obj_image_anim_frame 64, 8 + obj_image_anim_frame 128, 8 + obj_image_anim_frame 192, 8 + obj_image_anim_jump 0 + + .align 2 +gUnknown_085F51E8:: @ 85F51E8 + .4byte gUnknown_085F51D4 + + .align 2 gUnknown_085F51EC:: @ 85F51EC - .incbin "baserom.gba", 0x5f51ec, 0x18 + spr_template 0x03ea, 0x03ea, gOamData_85F51CC, gUnknown_085F51E8, NULL, gDummySpriteAffineAnimTable, nullsub_65 + .align 2 gUnknown_085F5204:: @ 85F5204 - .incbin "baserom.gba", 0x5f5204, 0x38 + spr_template 0x03eb, 0x03eb, gOamData_85F51CC, gUnknown_085F51E8, NULL, gDummySpriteAffineAnimTable, nullsub_65 + .align 2 +gUnknown_085F521C:: @ 85F521C + .2byte 0x40A0 + .2byte 0xC000 + .2byte 0x0400 + + .align 2 +gUnknown_085F5224:: @ 85F5224 + obj_image_anim_frame 0, 8 + obj_image_anim_frame 32, 8 + obj_image_anim_frame 64, 8 + obj_image_anim_frame 96, 8 + obj_image_anim_jump 0 + + .align 2 +gUnknown_085F5238:: @ 85F5238 + .4byte gUnknown_085F5224 + + .align 2 gUnknown_085F523C:: @ 85F523C - .incbin "baserom.gba", 0x5f523c, 0x18 + spr_template 0x03e9, 0x03ea, gUnknown_085F521C, gUnknown_085F5238, NULL, gDummySpriteAffineAnimTable, sub_817B7C4 + .align 2 gUnknown_085F5254:: @ 85F5254 - .incbin "baserom.gba", 0x5f5254, 0x38 + spr_template 0x03e9, 0x03eb, gUnknown_085F521C, gUnknown_085F5238, NULL, gDummySpriteAffineAnimTable, sub_817B7C4 + .align 2 +gUnknown_085F526C:: @ 85F526C + .2byte 0x00A0 + .2byte 0xC000 + .2byte 0x0400 + + .align 2 +gUnknown_085F5274:: @ 85F5274 + obj_image_anim_frame 0, 16 + obj_image_anim_end + + .align 2 +gUnknown_085F527C:: @ 85F527C + obj_image_anim_frame 64, 16 + obj_image_anim_end + + .align 2 +gUnknown_085F5284:: @ 85F5284 + .4byte gUnknown_085F5274 + .4byte gUnknown_085F527C + + .align 2 gUnknown_085F528C:: @ 85F528C - .incbin "baserom.gba", 0x5f528c, 0x18 + spr_template 0x03ec, 0x03ec, gUnknown_085F526C, gUnknown_085F5284, NULL, gDummySpriteAffineAnimTable, nullsub_66 + .align 2 gUnknown_085F52A4:: @ 85F52A4 - .incbin "baserom.gba", 0x5f52a4, 0x18 + spr_template 0x03ed, 0x03ed, gUnknown_085F526C, gUnknown_085F5284, NULL, gDummySpriteAffineAnimTable, nullsub_66 + .align 2 gUnknown_085F52BC:: @ 85F52BC - .incbin "baserom.gba", 0x5f52bc, 0x10 + obj_tiles gIntro2BrendanNoTurnGfx, 0x2000, 0x03ea + null_obj_tiles + .align 2 gUnknown_085F52CC:: @ 85F52CC - .incbin "baserom.gba", 0x5f52cc, 0x10 + obj_tiles gIntro2MayNoTurnGfx, 0x2000, 0x03eb + null_obj_tiles + .align 2 gUnknown_085F52DC:: @ 85F52DC - .incbin "baserom.gba", 0x5f52dc, 0x20 + obj_tiles gIntro2BicycleGfx, 0x1000, 0x03e9 + null_obj_tiles + .align 2 +gUnknown_085F52EC:: @ 85F52EC + obj_tiles gIntro2FlygonGfx, 0x1000, 0x03ec + null_obj_tiles + + .align 2 gUnknown_085F52FC:: @ 85F52FC - .incbin "baserom.gba", 0x5f52fc, 0x10 + obj_tiles gIntro2FlygonGfx, 0x1000, 0x03ed + null_obj_tiles + .align 2 gUnknown_085F530C:: @ 85F530C - .incbin "baserom.gba", 0x5f530c, 0x28 + obj_pal gIntro2BrendanNoTurnPal, 0x03ea + obj_pal gIntro2BrendanNoTurnPal, 0x03eb + obj_pal gIntro2FlygonPal, 0x03ec + obj_pal gIntro2FlygonPal, 0x03ed + null_obj_pal + .align 2 gUnknown_085F5334:: @ 85F5334 - .incbin "baserom.gba", 0x5f5334, 0x10 + obj_tiles gIntro2BrendanGfx, 0x3800, 0x03ea + null_obj_tiles + .align 2 gUnknown_085F5344:: @ 85F5344 - .incbin "baserom.gba", 0x5f5344, 0x10 + obj_tiles gIntro2MayGfx, 0x3800, 0x03eb + null_obj_tiles + .align 2 gUnknown_085F5354:: @ 85F5354 - .incbin "baserom.gba", 0x5f5354, 0x30 + obj_tiles gIntro2BicycleGfx, 0x1000, 0x03e9 + null_obj_tiles + .align 2 +gUnknown_085F5364:: @ 85F5364 + obj_tiles gIntro2LatiosGfx, 0x1000, 0x03ec + null_obj_tiles + + .align 2 +gUnknown_085F5374:: @ 85F5374 + obj_tiles gIntro2LatiasGfx, 0x1000, 0x03ed + null_obj_pal + + .align 2 gUnknown_085F5384:: @ 85F5384 - .incbin "baserom.gba", 0x5f5384, 0x28 + obj_pal gIntro2BrendanPal, 0x03ea + obj_pal gIntro2MayPal, 0x03eb + obj_pal gIntro2LatiosPal, 0x03ec + obj_pal gIntro2LatiasPal, 0x03ed + null_obj_pal + .align 2 gUnknown_085F53AC:: @ 85F53AC - .incbin "baserom.gba", 0x5f53ac, 0x10 + obj_tiles gIntro2BrendanGfx, 0x2000, 0x03ea + null_obj_tiles + .align 2 gUnknown_085F53BC:: @ 85F53BC - .incbin "baserom.gba", 0x5f53bc, 0x8 + obj_tiles gIntro2MayGfx, 0x2000, 0x03eb + null_obj_tiles diff --git a/graphics/intro/85F0CFC.pal b/graphics/intro/85F0CFC.pal new file mode 100644 index 000000000..09a1ee728 --- /dev/null +++ b/graphics/intro/85F0CFC.pal @@ -0,0 +1,51 @@ +JASC-PAL +0100 +48 +0 0 0 +74 82 82 +90 123 123 +205 205 197 +255 255 255 +82 131 246 +115 164 246 +139 197 246 +180 222 230 +197 246 230 +164 230 246 +131 164 255 +189 197 255 +156 197 255 +180 230 255 +189 197 255 +0 0 0 +255 255 255 +230 246 255 +205 238 255 +180 230 255 +164 222 255 +139 213 255 +115 205 255 +98 197 255 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +255 255 255 +230 246 255 +205 238 255 +180 230 255 +164 222 255 +139 213 255 +115 205 255 +98 197 255 +230 230 255 +246 255 255 +213 222 255 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/intro/85F0D5C.pal b/graphics/intro/85F0D5C.pal new file mode 100644 index 000000000..4ff388f48 --- /dev/null +++ b/graphics/intro/85F0D5C.pal @@ -0,0 +1,51 @@ +JASC-PAL +0100 +48 +0 0 0 +74 82 82 +90 123 123 +205 205 197 +255 255 255 +255 98 82 +255 123 106 +255 148 139 +255 172 172 +255 197 205 +255 222 238 +156 180 172 +197 197 156 +172 189 164 +255 222 156 +222 172 106 +0 0 0 +255 255 255 +255 238 205 +255 222 156 +255 222 156 +255 213 131 +255 197 106 +255 172 98 +255 156 90 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +255 255 255 +255 238 205 +255 222 156 +255 222 156 +255 213 131 +255 197 106 +255 172 98 +255 156 90 +255 238 205 +246 255 255 +255 222 156 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/intro/85F231C.pal b/graphics/intro/85F231C.pal new file mode 100644 index 000000000..82855d938 --- /dev/null +++ b/graphics/intro/85F231C.pal @@ -0,0 +1,35 @@ +JASC-PAL +0100 +32 +0 0 0 +49 115 246 +57 74 123 +57 74 123 +57 74 123 +49 57 98 +49 49 82 +49 32 57 +49 24 41 +0 0 0 +0 0 0 +0 0 0 +57 74 123 +57 74 123 +246 246 123 +41 65 90 +0 0 0 +0 0 0 +0 0 0 +82 90 148 +148 131 164 +57 74 123 +131 106 156 +98 90 123 +156 164 197 +139 148 172 +90 131 139 +189 197 213 +90 115 164 +230 230 82 +131 131 164 +246 246 123 diff --git a/graphics/intro/leaves_gflogo.png b/graphics/intro/intro.png similarity index 100% rename from graphics/intro/leaves_gflogo.png rename to graphics/intro/intro.png diff --git a/graphics/intro/leaves_foreground.bin b/graphics/intro/intro1_bg0_map.bin similarity index 100% rename from graphics/intro/leaves_foreground.bin rename to graphics/intro/intro1_bg0_map.bin diff --git a/graphics/intro/leaves_midground.bin b/graphics/intro/intro1_bg1_map.bin similarity index 100% rename from graphics/intro/leaves_midground.bin rename to graphics/intro/intro1_bg1_map.bin diff --git a/graphics/intro/leaves_bgleaves.bin b/graphics/intro/intro1_bg2_map.bin similarity index 100% rename from graphics/intro/leaves_bgleaves.bin rename to graphics/intro/intro1_bg2_map.bin diff --git a/graphics/intro/leaves_bgmountains.bin b/graphics/intro/intro1_bg3_map.bin similarity index 100% rename from graphics/intro/leaves_bgmountains.bin rename to graphics/intro/intro1_bg3_map.bin diff --git a/graphics/intro/leaves.pal b/graphics/intro/intro1_bgpal.pal similarity index 100% rename from graphics/intro/leaves.pal rename to graphics/intro/intro1_bgpal.pal diff --git a/graphics/intro/leaves_drops.pal b/graphics/intro/intro1_drops.pal similarity index 100% rename from graphics/intro/leaves_drops.pal rename to graphics/intro/intro1_drops.pal diff --git a/graphics/intro/latis.png b/graphics/intro/intro1_eon.png similarity index 100% rename from graphics/intro/latis.png rename to graphics/intro/intro1_eon.png diff --git a/graphics/intro/flying_silhouette.pal b/graphics/intro/intro1_flygon.pal similarity index 100% rename from graphics/intro/flying_silhouette.pal rename to graphics/intro/intro1_flygon.pal diff --git a/graphics/intro/flygon_silhouette.png b/graphics/intro/intro1_flygon.png similarity index 100% rename from graphics/intro/flygon_silhouette.png rename to graphics/intro/intro1_flygon.png diff --git a/graphics/intro/leaves_gflogo.pal b/graphics/intro/intro1_gflogo.pal similarity index 100% rename from graphics/intro/leaves_gflogo.pal rename to graphics/intro/intro1_gflogo.pal diff --git a/graphics/intro/droplet_sparkle.png b/graphics/intro/intro1_sparkle.png similarity index 100% rename from graphics/intro/droplet_sparkle.png rename to graphics/intro/intro1_sparkle.png diff --git a/graphics/intro/intro2_bgclouds.pal b/graphics/intro/intro2_bgclouds.pal new file mode 100644 index 000000000..6b312a16c --- /dev/null +++ b/graphics/intro/intro2_bgclouds.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 255 255 +230 246 255 +205 238 255 +180 230 255 +164 222 255 +139 213 255 +115 205 255 +98 197 255 +230 230 255 +246 255 255 +213 222 255 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/intro/intro2_bgclouds.png b/graphics/intro/intro2_bgclouds.png new file mode 100644 index 0000000000000000000000000000000000000000..7ba3d78f45aed3ff5bf85954d12356a977cdd13a GIT binary patch literal 718 zcmV;<0x|uGP)Xa7JLR#4Ez;Xw%JBZxDN;e%1s(=i6(p95c(n|n>G$Dvi zw8LjB4ltzsQ3*z zWblso1c*<7aDdb4KS}Tf`KttwckgUPbLr<@MxDWWc z5BK=>v2-7x#}|F36xTiL>H@BlpT4`zlHk^FsV=`~XYx^lj7`c>wMU31*L{p5 z2Iowe+s6{f7^;h-2AdRD(L^N*WQX1EwmoCl;~yC0I=#r6+BusQ*LV}N>a79l^9}&o zK%n%_jaq!z!1w?psN|vrG#K|Y*cosD@WrG{24i-J${^&oY+&LrYHyhxtQxaR2Efg@ z8I8c$V+JoI<_-WtGb7si??()LX2SshILk!G4`C=WZ0@98{B;l78T#RsnRT<7NXErq z_gEWRU)O4@_s!~12yFCV%+uBlXPwn@9i^g^DQggpN^d58a@fTT32g3U()5x+PEIA+ zqY(k(G*;cF&(CF688ks{rNP7oi>Q3zO{4F3li~{lh+B`kCG7GTl73lIe0iP5Fq=5= zP!dim1#6lqBna8WG4f4(%sFgZHN<&cVB!>JbDe1Op{GI1ZFM;7x=1NZDAeaz%K~`_ zP2=myg5M`jzUV{b3bvQ}^%+XPDHNCFsa{{CBb#%hOKQkl==OLMPh<{0QNEpbkTw~8 zXp@lX>O+5sg+ifFC=?2XLZMJ76bgkxq400<6FDWmP$>2Nd;kCd07*qoM6N<$g1}NAZN3ui(`mI@7qa+V$B9T&XKWt z=T{Xl*_1y0S=5`PZlUw`ir!VHFY_lRAKvsQY|-(vtCgDB8MkpyVf!Gn;Md|N+t3S( zk2AQ=?iVRNzDU<*I6Q@2&+ zTvEBgLJ8Hr?Cg$7o literal 0 HcmV?d00001 diff --git a/graphics/intro/intro2_bgclouds_afternoon.pal b/graphics/intro/intro2_bgclouds_afternoon.pal new file mode 100644 index 000000000..6d5d9dbcd --- /dev/null +++ b/graphics/intro/intro2_bgclouds_afternoon.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 255 255 +255 238 205 +255 222 156 +255 222 156 +255 213 131 +255 197 106 +255 172 98 +255 156 90 +255 238 205 +246 255 255 +255 222 156 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/intro/intro2_bgclouds_map.bin b/graphics/intro/intro2_bgclouds_map.bin new file mode 100644 index 0000000000000000000000000000000000000000..25b65f7662058ccf38bdea02be4414c075c5c066 GIT binary patch literal 4096 zcmeHE*GdFI5UkTSAU@3Hd{>vuiUG`u0Ssrr0A~IF&v0*-VRu~xVSKZvVCn9ys%dIc zCgp@7V+&ZWuFe7&mU1Fm5nNBZDk*$fJNFN+_d(Dr%^sfhL;Lkh;{Q zDitY9Ns3aCyyPS+8A*FjH;E*O7TV~biynH?m5#KfCH$6~RO>_&&;&FAP2e{PAaRzt z!d0#jnC1*;ImdY}c-_w@&O6{Ck9f>=Zg7)Z+~y8-Y;VtiY&l8^VjOXn0 zf|tJDI!Dz&oVUm&Uh&%FKk$)HeC7*Z`R41bb9|3DZ;$&vH@M@SAAUD*4JLzca*yCf k%djfj1J*U***(Jle_Ks4^o!QvR4YwD6VL=Sf&ZSsC-{_SH~;_u literal 0 HcmV?d00001 diff --git a/graphics/intro/intro2_bgnight.pal b/graphics/intro/intro2_bgnight.pal new file mode 100644 index 000000000..765aad45a --- /dev/null +++ b/graphics/intro/intro2_bgnight.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +0 0 0 +0 0 0 +82 90 148 +148 131 164 +57 74 123 +131 106 156 +98 90 123 +156 164 197 +139 148 172 +90 131 139 +189 197 213 +90 115 164 +230 230 82 +131 131 164 +246 246 123 diff --git a/graphics/intro/intro2_bgnight.png b/graphics/intro/intro2_bgnight.png new file mode 100644 index 0000000000000000000000000000000000000000..cb95bb04fece529ea4a64d5f8afdb2844e705122 GIT binary patch literal 536 zcmV+z0_XjSP)N_&H9oMKvgoTSBzl&o5Vi@n9wT63i4=2C-$r1tiEn2e8a0004_ zNkll0Ji_4)4tH>v6~$rifyUU&4hFz@ zhQppfW9rKeFldGS4*T~&27`^{UNVq}%vs>DXO8SV;2aEqDelf3aFw6rW`RM)4)+nD z4p|ChDS!+dR0Noz1N%&X+MdKNGGmv5VfEV))wW;pD){iyjR@=XD&fNqz^@bAkE``p z8Beg?x&+A3jwa~3kW84scqM?p$_8~p?{S7r$Pk_$Zf!ItD{`YVhyV-{D_+A&x$b1r zMnJ}y4gj7z(R7-V1KU8$sHx@dV@b8IRhP`VGL60f_hFm_;*q;O{eh#2Iwc aFu!k^{<#RbO?W5(00001u>3^Yw!dI3`yZUp5%1^@qdt-E-$NlAF%33W5l+T-zf6HBQ`jJ5rNQ$v1@EouE@)>eE>JiTN3-ru{CnQ)ilL z(ao@_rrT6=+Kr~`{R-voO^o6LVs zxjw}Vb1bmLk_*l`<1{m&T(6^nF(x?TgcFaPaLfkle!?}qiyrzIV2BY$9CE-ud+d7u tHGPc@w%B2h0}kAC$1OKpd;c|kbc{x zl3ITucBYDA%FT+V_36DQDFqY-sc%>}_;ri*1HTqnMW#5G!19_B@EuD6eqv1m++ZmM zShIqO3U0N4+l3bJFWx1LTSSr9+2@Zhk>-%yv!2xOm z7)P)GDWHB-06&K1{Yjt&$n_6p8Aw5{aQ2Q^lh^^fImBfy!EzU246 z66+;-Z2-eu84z47u?hW?wFcBgy>qe5#j?Oy%}>_F%HE)`R@io2ax|#jZCR9e@$Si5 zsZ7>tJrc~K;;hAkjoMu{TVntyHukCjxetxAY6ko_09lo}7?T0}&jtwb$$(0T{Zv4u z1q>1<0xAjEPXx$?LKq1X0hd^))XED0%KQZxsHGQWAT3lHu>YDFXut&-sJ$=AK+u|Q z;Y(knibU`^A^yYa&+Hv@fcG{TM*cc{KYT_X;?+ zX#t60)+Kt-W&k)G>ID(^B;Y9p03Hpq{yhQB09Y^omJK&c^^R@QgN%ST{&t|Ceoq4u z52B8e$fgd55tl1 zW=DHGlE4NFkpzHF1H_K>hF}Dp8$1LOm>DJ>NKcSnn@j|_vMO1BS?)PO<{}XQKLxxWd019w12E%-VPtl8oUr7lJ zJO?C&t6+Zxjbb@b%->)2c%qlBC`0}G%Gm%GWk_Gr86FtK!!QQm2d?!7qE32X;clB) t)JZ^ijnqX7M16RWbImo^TyxE(>n}%8`gP_!mKOj3002ovPDHLkV1i7F!~p;R literal 0 HcmV?d00001 diff --git a/graphics/intro/intro2_bgtrees2.pal b/graphics/intro/intro2_bgtrees2.pal new file mode 100644 index 000000000..5c506481a --- /dev/null +++ b/graphics/intro/intro2_bgtrees2.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +156 189 246 +172 205 246 +197 230 255 +213 246 255 +238 255 255 +156 180 172 +197 197 156 +172 189 164 +98 139 98 +98 156 57 +123 164 131 +156 213 82 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/intro/intro2_bgtrees2_afternoon.pal b/graphics/intro/intro2_bgtrees2_afternoon.pal new file mode 100644 index 000000000..9736a6e95 --- /dev/null +++ b/graphics/intro/intro2_bgtrees2_afternoon.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 106 57 +255 131 82 +255 197 106 +255 213 131 +255 222 156 +156 180 172 +197 197 156 +172 189 164 +115 139 57 +98 156 57 +131 172 57 +189 197 49 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/intro/intro2_bgtrees_map.bin b/graphics/intro/intro2_bgtrees_map.bin new file mode 100644 index 0000000000000000000000000000000000000000..d1c23cc3662c54e1fa87200e06cf729db8ccb827 GIT binary patch literal 4096 zcmeIu*;3D89LMq3OybOzJqbmUrAtt5Ah`i@18GCWRI;W9Em~-#y=bhVFruWp@;h|) z%=~{x|C#4`AAAqq^Er6lIdW35Njh?+W3zN@k&f+l*eTC0yX~>pKKmVz@1O#Q6bkvn zjyS4Fv15)aaYCt+%A9iA8E1ujx$Neg3YE^w^j5i`+C`b(OD?N%MW%O~NGuQw!~)q_ zKzvzUpw?A&>NO<4Xw>AI>u&t_qmXaYuETAe$>xr`?z!)QW-VIXbW6xT_QX@Y`jUOW z0nZE?@=%vYy7dV8m&Uv@ZX(%Fnlf$1tYIUbdtp?_zxB?0AAC&qpDg<9i?8O)d+m({ lA^+2gUw&In_G|uF_t%Cc%f9*UhmhYY5(~rvu|Ref_y@*Y=tTek literal 0 HcmV?d00001 diff --git a/graphics/intro/intro2_bgtreessmall.png b/graphics/intro/intro2_bgtreessmall.png new file mode 100644 index 0000000000000000000000000000000000000000..33a7213b89b0419d24c1a435d13947ceebaa983c GIT binary patch literal 360 zcmeAS@N?(olHy`uVBq!ia0vp^4nVBH!VDw>HYaZfQU(D&A+A7r&fafp&VD=k?Elqo z|KI)pKWEFDqethg*}EjEJ1J?7W%ZKgIafjYA;7idks^@w+0(@_#GRmOfQ}G z&7WAz#C9ddpznd-FA3)`m(wR+z1Kb?64=S^68csueD-D~hUM4WPKOD|oI4$+^}tI& zWT&E~DML?9sH?&GpBowY&Ho51GuAY4Ejc{(#k&)1VzJ6ca+%gkCmCO0;N?`X+*G~m zu|cGZ)Pc)$^wORu3V42V)aC8(z5UvD8;74-pN*ixfg{_xPKURuq&L^7=5YAtiO20w zxq0O6Kd(*J2RHp@`;k2H_wvuDJ&aDu1r{4m|HJwBIm0QNb9y*YD(|ASJ+T7#rPl8nL`0007N zNklB>G#($`;~$=n^L)6~KUhMX2LAvz#Xs!M?Wd0& RYUls}002ovPDHLkV1m~-RXYFx literal 0 HcmV?d00001 diff --git a/graphics/intro/intro2_brendan.pal b/graphics/intro/intro2_brendan.pal new file mode 100644 index 000000000..a948fb920 --- /dev/null +++ b/graphics/intro/intro2_brendan.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +74 189 172 +82 74 74 +139 139 123 +197 189 222 +255 255 255 +230 49 0 +246 148 0 +0 0 0 +255 213 148 +222 164 139 +0 0 0 +246 57 131 +189 57 115 +131 255 131 +82 197 90 +131 164 65 diff --git a/graphics/intro/intro2_brendan.png b/graphics/intro/intro2_brendan.png new file mode 100644 index 0000000000000000000000000000000000000000..045953002df62aecb21ea823705a433daa6fca1e GIT binary patch literal 1476 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 literal 0 HcmV?d00001 diff --git a/graphics/intro/kyogre_bubbles.pal b/graphics/intro/intro2_bubbles.pal similarity index 100% rename from graphics/intro/kyogre_bubbles.pal rename to graphics/intro/intro2_bubbles.pal diff --git a/graphics/intro/kyogre_bubbles.png b/graphics/intro/intro2_bubbles.png similarity index 100% rename from graphics/intro/kyogre_bubbles.png rename to graphics/intro/intro2_bubbles.png diff --git a/graphics/intro/intro2_flygon.pal b/graphics/intro/intro2_flygon.pal new file mode 100644 index 000000000..09607ac17 --- /dev/null +++ b/graphics/intro/intro2_flygon.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +74 189 172 +82 74 74 +139 139 123 +197 189 222 +255 255 255 +164 98 106 +238 57 115 +255 106 139 +255 197 180 +246 255 139 +213 238 106 +172 213 65 +164 222 139 +123 197 115 +90 148 82 +0 0 0 diff --git a/graphics/intro/intro2_flygon.png b/graphics/intro/intro2_flygon.png new file mode 100644 index 0000000000000000000000000000000000000000..ab0b8d72857deda53b33e82b917c742f2fa0e712 GIT binary patch literal 942 zcmV;f15x~mP)?G0{OaH~01~Q{+cdS$h z>Zyq*?2NYSxS0+I?a5fG0AsyC`hqd`wqB#1Mx1}@eF;6CuErIJfEslOIgIkV(X1*- zBV>0V-|aMr5JEqPUW4d-W;g_mw7c)#G!Iz!A&?4afZ4d?I0uYP=RhW)fpeR7oHp;Xi?11w3J_gt z^O`!%Hs?GgwmPu@A;fXuxgxe{8wL!42;)V7z_rdg$I;@kAh954Oo52qf+FtgY*Jgp z5<+1sCN2V8d+b0O<9T5WIARC|_YncxxZi;N<^z>GaL6zdqK7$Gm^0XXyg*d6MxUL- zihMu-^*pph40)9AGafMZJ_o>(L4)&wR9a|rJMmUSTb6{FbPca%Nx%? zsCPB4_1%THiDv_$()&7vTz5#lXj#VXz3`dl!mj z3QL9HL5PuX7d=|TYQ=Oh0Ls+6=jH(P2r65tBJ8Rl+FpE@11i~Eu>dkfzEBAm=c`b+ z)j&k(^I)w5^byft*3y~CE0qBVmjRpD#3ue*kcT(Ja$ww~og#obaQzek&;eW@7de1G zt50P>;S3sZN`PVusLTQ?vw+GhAVG>}K*U)E5R&zA&hd&FwkXYhUAdDsZxtHbI{9E1 z5_a3>mj#5{wof<^$y2zHGy-h(yP8OCdSl&UhPwZOTL#aVyc0Fr+NSkn2y}|Nk?;Y! zWfSjCX#V7q)>8}8^WYMO&szpfhq@2+9aH1k3K3jhEB literal 0 HcmV?d00001 diff --git a/graphics/intro/intro2_grass.pal b/graphics/intro/intro2_grass.pal new file mode 100644 index 000000000..389977abf --- /dev/null +++ b/graphics/intro/intro2_grass.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +74 82 82 +90 123 123 +205 205 197 +255 255 255 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +106 164 98 +115 197 98 +164 230 90 diff --git a/graphics/intro/intro2_grass.png b/graphics/intro/intro2_grass.png new file mode 100644 index 0000000000000000000000000000000000000000..e573ca45ecf5fc74f43fd0fb537951c830f12527 GIT binary patch literal 399 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?I3?vN&YJLDIg8-ipS0L>b6cklmefI3p|Ns93 zxmZEglBD9JNlTtZo&3(w$H2fS<>}%WlF|5f^26T43OsI!%sW_b)N5?8V%Q|XQ0!MF z;L4df_0IYCoSLEbzY~vk8G41BVZ9c&boPPV|6k^p@S`6{i5_yk*`Zm%#nUNW7V|IYp07=`+QdHn7h^Q%DP z+XTH$>shAr9BkLGJ6F%~W9EbW^V?Z#!PuYW^}P8UkCYkF1IzpetDUj*^%+^=ejq7N LS3j3^P6^!94 literal 0 HcmV?d00001 diff --git a/graphics/intro/intro2_grass_afternoon.pal b/graphics/intro/intro2_grass_afternoon.pal new file mode 100644 index 000000000..20b1e45f5 --- /dev/null +++ b/graphics/intro/intro2_grass_afternoon.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +74 82 82 +90 123 123 +205 205 197 +255 255 255 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +106 164 98 +106 197 98 +164 197 131 diff --git a/graphics/intro/intro2_grass_map.bin b/graphics/intro/intro2_grass_map.bin new file mode 100644 index 0000000000000000000000000000000000000000..2a6f1a72bd06509f062f65b6fe39bc11f63bf850 GIT binary patch literal 2048 zcmeIuOB#Uy7(mh92o)j9Bm3XnS%M`rH0b~C@Xk&mi9%qt0-0Q)RN2_tsqGycHCmmM frGM7DxVjnKJ&Yz#FK-{Suce=gLLdY};6DOCeul=* literal 0 HcmV?d00001 diff --git a/graphics/intro/intro2_grass_night.pal b/graphics/intro/intro2_grass_night.pal new file mode 100644 index 000000000..e44980f78 --- /dev/null +++ b/graphics/intro/intro2_grass_night.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +74 82 82 +90 123 123 +205 205 197 +255 255 255 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +106 164 98 +106 197 98 +131 197 164 diff --git a/graphics/intro/intro2_latias.pal b/graphics/intro/intro2_latias.pal new file mode 100644 index 000000000..0af96be29 --- /dev/null +++ b/graphics/intro/intro2_latias.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +123 106 106 +115 131 164 +222 213 238 +255 255 255 +213 65 57 +238 106 32 +172 74 65 +255 90 65 +180 172 197 +189 139 57 +189 98 41 +90 115 180 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/intro/intro2_latias.png b/graphics/intro/intro2_latias.png new file mode 100644 index 0000000000000000000000000000000000000000..5623895ceecb6b6841526c2fd6be31cd49706a5f GIT binary patch literal 680 zcmV;Z0$2TsP)HIlW>jT644j0000000000brxEX0006r zNklg3J^BoR|NhNJ0q+rpu`2l_pl?5kShuRgv8Cs2HYda2qBbi8)MQs{Tsdr zAf}WiO(R2(finGkAfzK?n~!o-4G`a!0er1TNGaRO3DbaDgY z$PLKR2n|7c= z8|RQ^sq(Rm_sTp^I|K77g>s}aFgNgJMHyHcU{S%>xn&7DhikP&b_c{RG-&H)KsIO% z><*}{Tj$UPFarTE5bGM49Jn|L%+)|ETY+;K(!u~h){h5Zh8B;Yi_OogxPRYtWJahv zTtj9vZC?SudSI5KdzJJ(eop}!$v4T*zC$)8*lsI&Xep;e4u7J-0?!HYOEiQm${8Uh zcGK7Q94i<71$RWvsgF?bf~y79Hf5(xfp0L!CG1N$48Yfre~&yYTkHdUS5erH7u(=- z+2YmLQ~GGA3*Z&;*?u5|xj2~WJKlIWo$tBd|8Gef)43XVyaX)z9{mHSkmm6Owbo?- O00000o zK!GApSyG}Tl0MQ?mcsv-`}F_E%UL2qS6%gn8bsbILX{V&qCtXvM1?2Ip$8ZwRkd9F z^Z`jlX1*Si$HWU%$>Wloyuj^}czO&uza<`kA6T{|?n5j-GnNrDbM7dw^r!=CMzd7IRcfS3_w7hK^Zs`+ByjE zKERpK89+dw8MqQU0}zNc12`e=4IqGP0dPVeKv&={X$Ii7Y6dg|0IV562}n0!5TF^* z>}k^+Y@-31ff$%1_>SoS)y3G8D4Q>k`kK+V$>eGqzwP>(p%Ixh!W#onw-rTfB~ffl zz(DF|QX3$|Akuy!>ZUMv)e$Y^O<_(=75W_3LpwldtPd&$Ec(?^fMro&%|SL{ol+kZ z#;2n`%Qdw|eLB4uPsh~SJgc{q8yyO5&E_H$VAG<&J+f|^3#|KBfye4-W8_eXr8che af1rOZplMWsHbA)m0000D{Vq#*0|J9VHqybM{(Vy*YD(|3Om4T7#rPS3!-y000H| zNkl zw$ns6MzcPZl7#+IoAnuYp??VD#GfhI2Mf{kgTM;sdV$yvPN^MPyIO_QT@pnR=))i~ z+Yy+B@Mrv(`t}D+-&dgj2S5A4Y^5K7+f{d^6F9WP?Ph1OTISB7;(8P)(-57D)h16- z8xX0ib8)fieU~%JPW@o}5=C$Q$bOtFaI=m@=bRp=c>*zUi43tb`RRO+E8s;wd}%g4 z+PUD@k^7vD!gFQd^?EC6r2 zF;*u*W2_g5F`djBXg?iND?oxyg9YdcsWrv~1w;h`G5BMkU#3i8^1kVUbua``=X`<$ zyTUyx5G?*gLl{gqLw?rF~&09k}NWxrt+>sO$}gacUacvsVpi z_}n!o+D@urn_QP~2%RF@pN91JAdT0W!xipLBT0#!>Ux+@U$mt(^^R3cUnq(A;Tzu% zED7#%cHDuo-}%|fgRhK1^9vgdY6bF4AJzufFDew#Veu1gNz@H=1frv_(8Da1s;R> zK?O=ceh6A`&~|8y16jZi0YNAZf?KygSNyu}G#re?yxnA*nakPZKnfPGfQ}N^g zfB7>$xJdAD`3U1dp+FS!1Mh9vZiq7WP}+U7Pm;gTUXq!G*ZB*rRb{lzUubXA@Y`85 zNBN6g>sgx>{ILh}7t9a9H?yE07UVB*f}`mN8DQx6Vw=Cf6zp8U2#6tS-j7hwSv&=&g022T0on_44^TT> znY<|NzF8qZ>=p6DD2~@A=p-7(lqUL4sv#Z3y;MsF3>foXnk4$_hVVG-rD+Q0U`e7} zhxM<(kz|3&10@}jsCq&5WsBw@Jt5j5OAh>(|!$Dd9P}N=*&qWVXw+LL;CBnXE1U7a(s!^<6Gj+txb1Y4 z5K2!7+N24ppOg-fY=hzknH5Kn{s$WUdFIqa6lrE5xBSpGwG30q{*g{ji}Dx074X9> qD1U!Z^26;UN`81RDEZ+lwtoOx!NjAq2`Oj*0000Px#1ZP1_K>z@;j|==^1poj5Fi=cXMM}M_Qc6mTi+jbr-v9sqQpEt2_F`gUga6f( z-lU7PtaJ8STD>`Qga1KN#ae@;L03VIzyJUM32;bRa{vGi!vFvd!vV){sAK>D1XM{x zK~!ko?U}!C+eQ?}@3aIJGVoCnBuX}6o|j5U4X_N50O?{_Lx3WK2K@`!1rIDxFPchi zy)4!hU8F7C43F}{ddR{he}D|woyEVQPc|BO;C)#X0g?cEi-!B)PCVX^58o5J_+L>| zpgBAVg>{(v;@zSVMPwbO?j?i3kNnO0V>z&V_tI5??-#eW zF*?nuQY7t<+G)wXgVfl(mc2 z_$?*BQGAva8k1)b&}%V(j*v!cL=YgV0A%=ANDy#%-RyyR5R#~OIYGdIj7}?n)dw_$aC@r^ z01E=3Wa5H=$1PnYy} zSgda>n`?PEO%>hxg{_Ch^mSJ$$9}QO>1(Z!KYW)Y##P`f=Zo8DS1s&%;2J|T0D4fP zz1(4cKqn<^j^gAWN? z4_kjA1teta4-NqbVSmURtOug%17(|kK44W)JNC zz!Q0XhWtS$=A4i}NL~*<^oPF2{y=^0Kz|@lI}-W>0~PrPa-ctqE{Mix&C!c%LN}*e zU7m*M>Xj#}(+u9t#2W+eis#4p%b)cjLcr7P8Pqm!7eU??jf z`-ab$L5k}a3g#d92}r^G1N#GNzxM|)z<>0Iti1J+Ka?JZkMa+>Ush~-lz+(myOLG) z$shJ_?uv5Y;Zv4Y7rqbtLB_vchd#(ZbmI0|4*fyLF{)q4nHR^Xej&9vpFn@uW-y>X zBuRxo%%`Fv|DXl-hrX8BANnvy!hok;tOu0<5x$!la3RpXim+fb;-4VUTfNBP2+da& lYA-1|7C3gri!T*I`~#8ThWgJR-gy83002ovPDHLkV1jj^R6_s& literal 0 HcmV?d00001 diff --git a/graphics/intro/intro2_night.png b/graphics/intro/intro2_night.png new file mode 100644 index 0000000000000000000000000000000000000000..9a10567bbe0bd9ca9474dba028e2f7512488b7c0 GIT binary patch literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfv#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6-A0X`wFKpFyqqNYq~USjE0-JCTiDXMzTlB3;I)%}os(8t>XF<)) zOTK-pp3&2v57fX};1OBOz`%DHgc*%YzM5WfZQOb371pX=0s|kY~3r-gLWI{)EPj oMh>Y@JwmwuI{v!7@iAM6zP|4Vqk~RSD?kqQboFyt=akR{03|3|B>(^b literal 0 HcmV?d00001 diff --git a/graphics/intro/torchic.pal b/graphics/intro/intro2_torchic.pal similarity index 100% rename from graphics/intro/torchic.pal rename to graphics/intro/intro2_torchic.pal diff --git a/graphics/intro/torchic.png b/graphics/intro/intro2_torchic.png similarity index 100% rename from graphics/intro/torchic.png rename to graphics/intro/intro2_torchic.png diff --git a/graphics/intro/volbeat.pal b/graphics/intro/intro2_volbeat.pal similarity index 100% rename from graphics/intro/volbeat.pal rename to graphics/intro/intro2_volbeat.pal diff --git a/graphics/intro/volbeat.png b/graphics/intro/intro2_volbeat.png similarity index 100% rename from graphics/intro/volbeat.png rename to graphics/intro/intro2_volbeat.png diff --git a/graphics/intro/rayquaza_lightning.pal b/graphics/intro/intro3_lightning.pal similarity index 100% rename from graphics/intro/rayquaza_lightning.pal rename to graphics/intro/intro3_lightning.pal diff --git a/graphics/intro/rayquaza_lightning.png b/graphics/intro/intro3_lightning.png similarity index 100% rename from graphics/intro/rayquaza_lightning.png rename to graphics/intro/intro3_lightning.png diff --git a/graphics/intro/battle_circle.png b/graphics/intro/intro3_misc.png similarity index 100% rename from graphics/intro/battle_circle.png rename to graphics/intro/intro3_misc.png diff --git a/graphics/intro/battle_circle_1.pal b/graphics/intro/intro3_misc1.pal similarity index 100% rename from graphics/intro/battle_circle_1.pal rename to graphics/intro/intro3_misc1.pal diff --git a/graphics/intro/battle_circle_2.pal b/graphics/intro/intro3_misc2.pal similarity index 100% rename from graphics/intro/battle_circle_2.pal rename to graphics/intro/intro3_misc2.pal diff --git a/graphics/intro/battle_pokeball.pal b/graphics/intro/intro3_pokeball.pal similarity index 100% rename from graphics/intro/battle_pokeball.pal rename to graphics/intro/intro3_pokeball.pal diff --git a/graphics/intro/battle_pokeball.png b/graphics/intro/intro3_pokeball.png similarity index 100% rename from graphics/intro/battle_pokeball.png rename to graphics/intro/intro3_pokeball.png diff --git a/graphics/intro/battle_pokeball.bin b/graphics/intro/intro3_pokeball_map.bin similarity index 100% rename from graphics/intro/battle_pokeball.bin rename to graphics/intro/intro3_pokeball_map.bin diff --git a/graphics/intro/battle_streaks.pal b/graphics/intro/intro3_streaks.pal similarity index 100% rename from graphics/intro/battle_streaks.pal rename to graphics/intro/intro3_streaks.pal diff --git a/graphics/intro/battle_streaks.png b/graphics/intro/intro3_streaks.png similarity index 100% rename from graphics/intro/battle_streaks.png rename to graphics/intro/intro3_streaks.png diff --git a/graphics/intro/battle_streaks.bin b/graphics/intro/intro3_streaks_map.bin similarity index 100% rename from graphics/intro/battle_streaks.bin rename to graphics/intro/intro3_streaks_map.bin diff --git a/graphics/intro/leaves_bg.png b/graphics/intro/introgfx.png similarity index 100% rename from graphics/intro/leaves_bg.png rename to graphics/intro/introgfx.png From 0fe97e838eab14723a4a38a773e2bc4d1494241e Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Sun, 1 Oct 2017 15:05:00 -0500 Subject: [PATCH 333/342] add asmdiff.sh comparison script --- asmdiff.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 asmdiff.sh diff --git a/asmdiff.sh b/asmdiff.sh new file mode 100644 index 000000000..1d2141c32 --- /dev/null +++ b/asmdiff.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb" +OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))" +$OBJDUMP $OPTIONS baserom.gba > baserom.dump +$OBJDUMP $OPTIONS pokeemerald.gba > pokeemerald.dump +diff baserom.dump pokeemerald.dump From 84e5819ca3944df99a1817ad8ab828993035f18b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 1 Oct 2017 19:01:37 -0400 Subject: [PATCH 334/342] Sanitize data/tilesets.s, 2 --- data/tileset.s | 56 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 13 deletions(-) diff --git a/data/tileset.s b/data/tileset.s index c60d83d61..6a49cbd08 100644 --- a/data/tileset.s +++ b/data/tileset.s @@ -1,8 +1,8 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" + .include "asm/macros.inc" + .include "constants/constants.inc" - .section .rodata - .align 2, 0 + .section .rodata + .align 2, 0 gUnknown_085105C4:: .incbin "baserom.gba", 0x5105c4, 0x80 @@ -13,7 +13,7 @@ gUnknown_08510644:: gUnknown_085106C4:: .incbin "baserom.gba", 0x5106c4, 0x80 - .space 0x20 + .space 0x20 gUnknown_08510764:: @ 8510764 @ replacing .incbin "baserom.gba", 0x00510764, 0x10 @@ -254,7 +254,7 @@ gUnknown_08515224:: gUnknown_085152A4:: .incbin "baserom.gba", 0x5152a4, 0x80 - .space 0x20 + .space 0x20 gUnknown_08515344:: @ 8515344 @ replacing .incbin "baserom.gba", 0x00515344, 0x20 @@ -386,7 +386,13 @@ gUnknown_08515A6C:: .incbin "baserom.gba", 0x515a6c, 0x80 gUnknown_08515AEC:: - .incbin "baserom.gba", 0x515aec, 0x2a0 + .incbin "baserom.gba", 0x515aec, 0x80 + +gUnknown_08515B6C:: + .incbin "baserom.gba", 0x515b6c, 0x20 + +gUnknown_08515B8C:: + .incbin "baserom.gba", 0x515b8c, 0x200 gUnknown_08515D8C:: @ 8515D8C @@ -584,7 +590,9 @@ gUnknown_08517B9C:: .incbin "baserom.gba", 0x517b9c, 0x20 gUnknown_08517BBC:: - .incbin "baserom.gba", 0x517bbc, 0x40 + .incbin "baserom.gba", 0x517bbc, 0x20 + + .space 0x20 gUnknown_08517BFC:: @ 8517BFC @@ -603,7 +611,9 @@ gUnknown_08517C14:: .incbin "baserom.gba", 0x517c14, 0x200 gUnknown_08517E14:: - .incbin "baserom.gba", 0x517e14, 0x220 + .incbin "baserom.gba", 0x517e14, 0x200 + + .space 0x20 gUnknown_08518034:: @ 8518034 @@ -615,8 +625,9 @@ gUnknown_0851803C:: .incbin "baserom.gba", 0x51803c, 0x120 gUnknown_0851815C:: - .incbin "baserom.gba", 0x51815c, 0x140 + .incbin "baserom.gba", 0x51815c, 0x120 + .space 0x20 gUnknown_0851829C:: @ 851829C @ replacing .incbin "baserom.gba", 0x0051829c, 0x8 @@ -645,8 +656,21 @@ gUnknown_0851CAA4:: .incbin "baserom.gba", 0x51caa4, 0xc00 gUnknown_0851D6A4:: - .incbin "baserom.gba", 0x51d6a4, 0x2c20 + .incbin "baserom.gba", 0x51d6a4, 0xc00 + .space 0x20 + +gUnknown_0851E2C4:: + .incbin "baserom.gba", 0x51e2c4, 0x800 + +gUnknown_0851EAC4:: + .incbin "baserom.gba", 0x51eac4, 0x800 + +gUnknown_0851F2C4:: + .incbin "baserom.gba", 0x51f2c4, 0x800 + +gUnknown_0851FAC4:: + .incbin "baserom.gba", 0x51fac4, 0x800 gUnknown_085202C4:: @ 85202C4 @ replacing .incbin "baserom.gba", 0x005202c4, 0x20 @@ -666,7 +690,10 @@ gUnknown_085203E4:: .incbin "baserom.gba", 0x5203e4, 0x100 gUnknown_085204E4:: - .incbin "baserom.gba", 0x5204e4, 0x120 + .incbin "baserom.gba", 0x5204e4, 0x100 + +gUnknown_085205E4:: + .incbin "baserom.gba", 0x5205e4, 0x20 gUnknown_08520604:: .incbin "baserom.gba", 0x520604, 0x100 @@ -675,7 +702,10 @@ gUnknown_08520704:: .incbin "baserom.gba", 0x520704, 0x100 gUnknown_08520804:: - .incbin "baserom.gba", 0x520804, 0x4060 + .incbin "baserom.gba", 0x520804, 0x100 + +gUnknown_08520904:: + .incbin "baserom.gba", 0x520904, 0x3F60 gUnknown_08524864:: @ 8524864 From 5a51a49642e81575ebe41a00ec69a3abb489376b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 1 Oct 2017 19:39:55 -0400 Subject: [PATCH 335/342] Sanitize data/tilesets.s, 3 --- data/tileset.s | 86 +++++++++++++++++++++++++++++++------------------- 1 file changed, 53 insertions(+), 33 deletions(-) diff --git a/data/tileset.s b/data/tileset.s index 6a49cbd08..0acb50e91 100644 --- a/data/tileset.s +++ b/data/tileset.s @@ -258,25 +258,25 @@ gUnknown_085152A4:: gUnknown_08515344:: @ 8515344 @ replacing .incbin "baserom.gba", 0x00515344, 0x20 - .4byte VRAM + 0x4c00 - .4byte VRAM + 0x4c80 - .4byte VRAM + 0x4d00 - .4byte VRAM + 0x4d80 - .4byte VRAM + 0x4e00 - .4byte VRAM + 0x4e80 - .4byte VRAM + 0x4f00 - .4byte VRAM + 0x4f80 + .4byte BG_VRAM + 0x4c00 + .4byte BG_VRAM + 0x4c80 + .4byte BG_VRAM + 0x4d00 + .4byte BG_VRAM + 0x4d80 + .4byte BG_VRAM + 0x4e00 + .4byte BG_VRAM + 0x4e80 + .4byte BG_VRAM + 0x4f00 + .4byte BG_VRAM + 0x4f80 gUnknown_08515364:: @ 8515364 @ replacing .incbin "baserom.gba", 0x00515364, 0x20 - .4byte VRAM + 0x5000 - .4byte VRAM + 0x5080 - .4byte VRAM + 0x5100 - .4byte VRAM + 0x5180 - .4byte VRAM + 0x5200 - .4byte VRAM + 0x5280 - .4byte VRAM + 0x5300 - .4byte VRAM + 0x5380 + .4byte BG_VRAM + 0x5000 + .4byte BG_VRAM + 0x5080 + .4byte BG_VRAM + 0x5100 + .4byte BG_VRAM + 0x5180 + .4byte BG_VRAM + 0x5200 + .4byte BG_VRAM + 0x5280 + .4byte BG_VRAM + 0x5300 + .4byte BG_VRAM + 0x5380 gUnknown_08515384:: @ 8515384 @ replacing .incbin "baserom.gba", 0x00515384, 0x30 @@ -348,8 +348,14 @@ gUnknown_08515784:: gUnknown_08515804:: @ 8515804 - .incbin "baserom.gba", 0x515804, 0x20 - + .4byte BG_VRAM + 0x5000 + .4byte BG_VRAM + 0x5080 + .4byte BG_VRAM + 0x5100 + .4byte BG_VRAM + 0x5180 + .4byte BG_VRAM + 0x5200 + .4byte BG_VRAM + 0x5280 + .4byte BG_VRAM + 0x5300 + .4byte BG_VRAM + 0x5380 gUnknown_08515824:: @ 8515824 @ replacing .incbin "baserom.gba", 0x00515824, 0x20 @@ -389,10 +395,18 @@ gUnknown_08515AEC:: .incbin "baserom.gba", 0x515aec, 0x80 gUnknown_08515B6C:: - .incbin "baserom.gba", 0x515b6c, 0x20 + .incbin "baserom.gba", 0x515b6c, 0x80 -gUnknown_08515B8C:: - .incbin "baserom.gba", 0x515b8c, 0x200 +gUnknown_08515BEC:: + .incbin "baserom.gba", 0x515bec, 0x80 + +gUnknown_08515C6C:: + .incbin "baserom.gba", 0x515c6c, 0x80 + +gUnknown_08515CEC:: + .incbin "baserom.gba", 0x515cec, 0x80 + + .space 0x20 gUnknown_08515D8C:: @ 8515D8C @@ -431,14 +445,14 @@ gUnknown_0851611C:: gUnknown_085161BC:: @ 85161BC @ replacing .incbin "baserom.gba", 0x005161bc, 0x20 - .4byte VRAM + 0x5c00 - .4byte VRAM + 0x5c80 - .4byte VRAM + 0x5d00 - .4byte VRAM + 0x5d80 - .4byte VRAM + 0x5e00 - .4byte VRAM + 0x5e80 - .4byte VRAM + 0x5f00 - .4byte VRAM + 0x5f80 + .4byte BG_VRAM + 0x5c00 + .4byte BG_VRAM + 0x5c80 + .4byte BG_VRAM + 0x5d00 + .4byte BG_VRAM + 0x5d80 + .4byte BG_VRAM + 0x5e00 + .4byte BG_VRAM + 0x5e80 + .4byte BG_VRAM + 0x5f00 + .4byte BG_VRAM + 0x5f80 gUnknown_085161DC:: @ 85161DC @ replacing .incbin "baserom.gba", 0x005161dc, 0x20 @@ -692,8 +706,7 @@ gUnknown_085203E4:: gUnknown_085204E4:: .incbin "baserom.gba", 0x5204e4, 0x100 -gUnknown_085205E4:: - .incbin "baserom.gba", 0x5205e4, 0x20 + .space 0x20 gUnknown_08520604:: .incbin "baserom.gba", 0x520604, 0x100 @@ -704,8 +717,15 @@ gUnknown_08520704:: gUnknown_08520804:: .incbin "baserom.gba", 0x520804, 0x100 -gUnknown_08520904:: - .incbin "baserom.gba", 0x520904, 0x3F60 + .space 0x3d00 + +gUnknown_08524604:: + .incbin "baserom.gba", 0x524604, 0x40 + + .space 0x1c0 + +gUnknown_08524804:: + .incbin "baserom.gba", 0x524804, 0x60 gUnknown_08524864:: @ 8524864 From 993d5e2a6afb8f765ddd98ac32f01253a1476696 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 1 Oct 2017 21:50:58 -0400 Subject: [PATCH 336/342] clean up declarations in src/palette.c --- include/battle.h | 3 + include/blend_palette.h | 12 ++ src/palette.c | 308 ++++++++++++++++++++-------------------- 3 files changed, 167 insertions(+), 156 deletions(-) create mode 100644 include/blend_palette.h diff --git a/include/battle.h b/include/battle.h index 67d3d873d..bc70b86ea 100644 --- a/include/battle.h +++ b/include/battle.h @@ -927,6 +927,9 @@ u8 GetBankSide(u8 bank); u8 GetBankIdentity(u8 bank); u8 GetBankByIdentity(u8 bank); +// battle_transition +void sub_8149DFC(u8 a1); + // Move this somewhere else #include "sprite.h" diff --git a/include/blend_palette.h b/include/blend_palette.h new file mode 100644 index 000000000..1db3f4eb0 --- /dev/null +++ b/include/blend_palette.h @@ -0,0 +1,12 @@ +#ifndef GUARD_BLEND_PALETTE_H +#define GUARD_BLEND_PALETTE_H + +// Exported type declarations + +// Exported RAM declarations + +// Exported ROM declarations + +void BlendPalette(u16, u16, u8, u16); + +#endif //GUARD_BLEND_PALETTE_H diff --git a/src/palette.c b/src/palette.c index da03516d0..ed7eb99b3 100644 --- a/src/palette.c +++ b/src/palette.c @@ -1,5 +1,9 @@ #include "global.h" +#include "blend_palette.h" #include "palette.h" +#include "decompress.h" +#include "gpu_regs.h" +#include "battle.h" #include "task.h" enum @@ -38,15 +42,19 @@ struct PaletteStruct u8 ps_field_9; }; -extern void LZDecompressWram(const void *src, void *dest); -extern void SetGpuReg(u8 regOffset, u16 value); -extern void sub_8149DFC(u8 a1); -extern void sub_80A1670(u16 a1); -extern void sub_80A2D54(u8 a1); -extern void SetWordTaskArg(u8 taskId, u8 dataElem, u32 value); -extern void _call_via_r1(u32 a1, void *a2); - -extern void BlendPalette(u16, u16, u8, u16); +static void cur_mapheader_run_tileset1_func(void); +static void cur_mapheader_run_tileset2_func(void); +static void unused_sub_80A1CDC(struct PaletteStruct *, u32 *); +static void unused_sub_80A1E40(struct PaletteStruct *, u32 *); +static void unused_sub_80A1F00(struct PaletteStruct *); +static u8 GetPaletteNumByUid(u16); +static u8 UpdateNormalPaletteFade(void); +static void BeginFastPaletteFadeInternal(u8); +static u8 UpdateFastPaletteFade(void); +static u8 UpdateHardwarePaletteFade(void); +static void UpdateBlendRegisters(void); +static bool8 IsSoftwarePaletteFadeFinishing(void); +static void sub_80A2D54(u8 taskId); static EWRAM_DATA struct { const u16 *src; @@ -57,8 +65,8 @@ EWRAM_DATA u16 gPlttBufferUnfaded[0x200] = {0}; EWRAM_DATA u16 gPlttBufferFaded[0x200] = {0}; EWRAM_DATA struct PaletteStruct sPaletteStructs[0x10] = {0}; EWRAM_DATA struct PaletteFadeControl gPaletteFade = {0}; -EWRAM_DATA u32 gFiller_2037FE0 = 0; -EWRAM_DATA u32 sPlttBufferTransferPending = 0; +static EWRAM_DATA u32 gFiller_2037FE0 = 0; +static EWRAM_DATA u32 sPlttBufferTransferPending = 0; EWRAM_DATA u8 gPaletteDecompressionBuffer[0x400] = {0}; extern const u16 *const gUnknown_08510764[]; @@ -123,19 +131,6 @@ static const u8 gUnknown_0852489C[] = { 31, 31 }; -void cur_mapheader_run_tileset1_func(void); -void cur_mapheader_run_tileset2_func(void); -static void unused_sub_80A1CDC(struct PaletteStruct *, u32 *); -static void unused_sub_80A1E40(struct PaletteStruct *, u32 *); -static void unused_sub_80A1F00(struct PaletteStruct *); -static u8 GetPaletteNumByUid(u16); -static u8 UpdateNormalPaletteFade(void); -static void BeginFastPaletteFadeInternal(u8); -static u8 UpdateFastPaletteFade(void); -static u8 UpdateHardwarePaletteFade(void); -static void UpdateBlendRegisters(void); -static bool8 IsSoftwarePaletteFadeFinishing(void); - // tileset IWRAM_DATA u8 sTilesetDMA3TransferBufferSize; @@ -146,13 +141,13 @@ IWRAM_DATA u16 sSecondaryTilesetCBBufferSize; IWRAM_DATA void (*sPrimaryTilesetCB)(u16); IWRAM_DATA void (*sSecondaryTilesetCB)(u16); -void sub_80A0954(void) +static void sub_80A0954(void) { sTilesetDMA3TransferBufferSize = 0; CpuFill32(0, sTilesetDMA3TransferBuffer, sizeof sTilesetDMA3TransferBuffer); } -void sub_80A0980(const u16 *a0, u16 *a1, u16 a2) +static void sub_80A0980(const u16 *a0, u16 *a1, u16 a2) { if (sTilesetDMA3TransferBufferSize < 20) { @@ -199,7 +194,7 @@ void sub_80A0A38(void) sSecondaryTilesetCB(sSecondaryTilesetCBCounter); } -void cur_mapheader_run_tileset1_func(void) +static void cur_mapheader_run_tileset1_func(void) { sPrimaryTilesetCBCounter = 0; sPrimaryTilesetCBBufferSize = 0; @@ -208,7 +203,7 @@ void cur_mapheader_run_tileset1_func(void) gMapHeader.mapData->primaryTileset->callback(); } -void cur_mapheader_run_tileset2_func(void) +static void cur_mapheader_run_tileset2_func(void) { sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = 0; @@ -219,7 +214,7 @@ void cur_mapheader_run_tileset2_func(void) void TilesetCb_General(void) { - void sub_80A0B70(u16); + static void sub_80A0B70(u16); sPrimaryTilesetCBCounter = 0; sPrimaryTilesetCBBufferSize = 0x100; @@ -228,20 +223,20 @@ void TilesetCb_General(void) void TilesetCb_InsideBuilding(void) { - void sub_80A0BB4(u16); + static void sub_80A0BB4(u16); sPrimaryTilesetCBCounter = 0; sPrimaryTilesetCBBufferSize = 0x100; sPrimaryTilesetCB = sub_80A0BB4; } -void sub_80A0B70(u16 timer) +static void sub_80A0B70(u16 timer) { - void sub_80A0BCC(u16); - void sub_80A0BF4(u16); - void sub_80A0C1C(u16); - void sub_80A0C44(u16); - void sub_80A12AC(u16); + static void sub_80A0BCC(u16); + static void sub_80A0BF4(u16); + static void sub_80A0C1C(u16); + static void sub_80A0C44(u16); + static void sub_80A12AC(u16); if ((timer & 0x0F) == 0) sub_80A0BCC(timer >> 4); @@ -255,43 +250,44 @@ void sub_80A0B70(u16 timer) sub_80A12AC(timer >> 4); } -void sub_80A0BB4(u16 timer) +static void sub_80A0BB4(u16 timer) { - void sub_80A1688(u16); + static void sub_80A1688(u16); + if ((timer & 0x7) == 0) sub_80A1688(timer >> 3); } -void sub_80A0BCC(u16 timer) +static void sub_80A0BCC(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08510764[idx], (u16 *)(VRAM + 0x3F80), 0x80); + sub_80A0980(gUnknown_08510764[idx], (u16 *)(BG_VRAM + 0x3F80), 0x80); } -void sub_80A0BF4(u16 timer) +static void sub_80A0BF4(u16 timer) { u8 idx; idx = timer % 8; - sub_80A0980(gUnknown_08512574[idx], (u16 *)(VRAM + 0x3600), 0x3C0); + sub_80A0980(gUnknown_08512574[idx], (u16 *)(BG_VRAM + 0x3600), 0x3C0); } -void sub_80A0C1C(u16 timer) +static void sub_80A0C1C(u16 timer) { u16 idx; idx = timer % 8; - sub_80A0980(gUnknown_08512E54[idx], (u16 *)(VRAM + 0x3a00), 0x140); + sub_80A0980(gUnknown_08512E54[idx], (u16 *)(BG_VRAM + 0x3a00), 0x140); } -void sub_80A0C44(u16 timer) +static void sub_80A0C44(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08513174[idx], (u16 *)(VRAM + 0x3e00), 0xc0); + sub_80A0980(gUnknown_08513174[idx], (u16 *)(BG_VRAM + 0x3e00), 0xc0); } void TilesetCb_Petalburg(void) @@ -303,7 +299,7 @@ void TilesetCb_Petalburg(void) void TilesetCb_Rustboro(void) { - void sub_80A103C(u16); + static void sub_80A103C(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -312,7 +308,7 @@ void TilesetCb_Rustboro(void) void TilesetCb_Dewford(void) { - void sub_80A10B8(u16); + static void sub_80A10B8(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -321,7 +317,7 @@ void TilesetCb_Dewford(void) void TilesetCb_Slateport(void) { - void sub_80A10D0(u16); + static void sub_80A10D0(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -330,7 +326,7 @@ void TilesetCb_Slateport(void) void TilesetCb_Mauville(void) { - void sub_80A10E8(u16); + static void sub_80A10E8(u16); sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -339,7 +335,7 @@ void TilesetCb_Mauville(void) void TilesetCb_Lavaridge(void) { - void sub_80A115C(u16); + static void sub_80A115C(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -376,7 +372,7 @@ void TilesetCb_Mossdeep(void) void TilesetCb_EverGrande(void) { - void sub_80A1188(u16); + static void sub_80A1188(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -385,7 +381,7 @@ void TilesetCb_EverGrande(void) void TilesetCb_Pacifidlog(void) { - void sub_80A11FC(u16); + static void sub_80A11FC(u16); sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -394,7 +390,7 @@ void TilesetCb_Pacifidlog(void) void TilesetCb_Sootopolis(void) { - void sub_80A122C(u16); + static void sub_80A122C(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -403,7 +399,7 @@ void TilesetCb_Sootopolis(void) void TilesetCb_BattleFrontierOutsideWest(void) { - void sub_80A127C(u16); + static void sub_80A127C(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -412,7 +408,7 @@ void TilesetCb_BattleFrontierOutsideWest(void) void TilesetCb_BattleFrontierOutsideEast(void) { - void sub_80A1294(u16); + static void sub_80A1294(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -421,7 +417,7 @@ void TilesetCb_BattleFrontierOutsideEast(void) void TilesetCb_Underwater(void) { - void sub_80A1244(u16); + static void sub_80A1244(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = 128; @@ -430,7 +426,7 @@ void TilesetCb_Underwater(void) void TilesetCb_SootopolisGym(void) { - void sub_80A15D8(u16); + static void sub_80A15D8(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = 240; @@ -439,7 +435,7 @@ void TilesetCb_SootopolisGym(void) void TilesetCb_Cave(void) { - void sub_80A1260(u16); + static void sub_80A1260(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -448,7 +444,7 @@ void TilesetCb_Cave(void) void TilesetCb_EliteFour(void) { - void sub_80A15F0(u16); + static void sub_80A15F0(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = 128; @@ -457,7 +453,7 @@ void TilesetCb_EliteFour(void) void TilesetCb_MauvilleGym(void) { - void sub_80A15C0(u16); + static void sub_80A15C0(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -466,7 +462,7 @@ void TilesetCb_MauvilleGym(void) void TilesetCb_BikeShop(void) { - void sub_80A161C(u16); + static void sub_80A161C(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -475,7 +471,7 @@ void TilesetCb_BikeShop(void) void TilesetCb_BattlePyramid(void) { - void sub_80A1634(u16); + static void sub_80A1634(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -484,17 +480,17 @@ void TilesetCb_BattlePyramid(void) void TilesetCb_BattleDome(void) { - void sub_80A1658(u16); + static void sub_80A1658(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; sSecondaryTilesetCB = sub_80A1658; } -void sub_80A103C(u16 timer) +static void sub_80A103C(u16 timer) { - void sub_80A1434(u16, u8); - void sub_80A1470(u16); + static void sub_80A1434(u16, u8); + static void sub_80A1470(u16); if ((timer & 0x07) == 0) { @@ -517,25 +513,25 @@ void sub_80A103C(u16 timer) sub_80A1434(timer >> 3, 7); } -void sub_80A10B8(u16 timer) +static void sub_80A10B8(u16 timer) { - void sub_80A1520(u16); + static void sub_80A1520(u16); if ((timer & 7) == 0) sub_80A1520(timer >> 3); } -void sub_80A10D0(u16 timer) +static void sub_80A10D0(u16 timer) { - void sub_80A1598(u16); + static void sub_80A1598(u16); if ((timer & 15) == 0) sub_80A1598(timer >> 4); } -void sub_80A10E8(u16 timer) +static void sub_80A10E8(u16 timer) { - void sub_80A1394(u16, u8); + static void sub_80A1394(u16, u8); if ((timer & 0x07) == 0) sub_80A1394(timer >> 3, 0); @@ -555,10 +551,10 @@ void sub_80A10E8(u16 timer) sub_80A1394(timer >> 3, 7); } -void sub_80A115C(u16 timer) +static void sub_80A115C(u16 timer) { - void sub_80A12D4(u8); - void sub_80A1498(u16); + static void sub_80A12D4(u8); + static void sub_80A1498(u16); if ((timer & 0x0F) == 0) sub_80A12D4(timer >> 4); @@ -566,9 +562,9 @@ void sub_80A115C(u16 timer) sub_80A1498(timer >> 4); } -void sub_80A1188(u16 timer) +static void sub_80A1188(u16 timer) { - void sub_80A14C0(u16, u8); + static void sub_80A14C0(u16, u8); if ((timer & 0x07) == 0) sub_80A14C0(timer >> 3, 0); @@ -588,10 +584,10 @@ void sub_80A1188(u16 timer) sub_80A14C0(timer >> 3, 7); } -void sub_80A11FC(u16 timer) +static void sub_80A11FC(u16 timer) { - void sub_80A131C(u8); - void sub_80A136C(u8); + static void sub_80A131C(u8); + static void sub_80A136C(u8); if ((timer & 0x0F) == 0) sub_80A131C(timer >> 4); @@ -599,90 +595,90 @@ void sub_80A11FC(u16 timer) sub_80A136C(timer >> 4); } -void sub_80A122C(u16 timer) +static void sub_80A122C(u16 timer) { - void sub_80A1798(u16); + static void sub_80A1798(u16); if ((timer & 0x0F) == 0) sub_80A1798(timer >> 4); } -void sub_80A1244(u16 timer) +static void sub_80A1244(u16 timer) { - void sub_80A1344(u8); + static void sub_80A1344(u8); if ((timer & 0x0F) == 0) sub_80A1344(timer >> 4); } -void sub_80A1260(u16 timer) +static void sub_80A1260(u16 timer) { - void sub_80A14F8(u16); + static void sub_80A14F8(u16); if ((timer & 0x0F) == 1) sub_80A14F8(timer >> 4); } -void sub_80A127C(u16 timer) +static void sub_80A127C(u16 timer) { - void sub_80A1548(u16); + static void sub_80A1548(u16); if ((timer & 0x07) == 0) sub_80A1548(timer >> 3); } -void sub_80A1294(u16 timer) +static void sub_80A1294(u16 timer) { - void sub_80A1570(u16); + static void sub_80A1570(u16); if ((timer & 0x07) == 0) sub_80A1570(timer >> 3); } -void sub_80A12AC(u16 timer) +static void sub_80A12AC(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08513684[idx], (u16 *)(VRAM + 0x3c00), 0x140); + sub_80A0980(gUnknown_08513684[idx], (u16 *)(BG_VRAM + 0x3c00), 0x140); } -void sub_80A12D4(u8 timer) +static void sub_80A12D4(u8 timer) { u8 idx; idx = timer % 4; - sub_80A0980(gUnknown_08513894[idx], (u16 *)(VRAM + 0x6400), 0x80); + sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6400), 0x80); idx = (timer + 2) % 4; - sub_80A0980(gUnknown_08513894[idx], (u16 *)(VRAM + 0x6480), 0x80); + sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6480), 0x80); } -void sub_80A131C(u8 timer) +static void sub_80A131C(u8 timer) { u8 idx; idx = timer % 4; - sub_80A0980(gUnknown_085143E4[idx], (u16 *)(VRAM + 0x7a00), 0x3C0); + sub_80A0980(gUnknown_085143E4[idx], (u16 *)(BG_VRAM + 0x7a00), 0x3C0); } -void sub_80A1344(u8 timer) +static void sub_80A1344(u8 timer) { u8 idx; idx = timer % 4; - sub_80A0980(gUnknown_085145F4[idx], (u16 *)(VRAM + 0x7e00), 0x80); + sub_80A0980(gUnknown_085145F4[idx], (u16 *)(BG_VRAM + 0x7e00), 0x80); } -void sub_80A136C(u8 timer) +static void sub_80A136C(u8 timer) { u8 idx; idx = timer % 8; - sub_80A0980(gUnknown_08514E04[idx], (u16 *)(VRAM + 0x7e00), 0x100); + sub_80A0980(gUnknown_08514E04[idx], (u16 *)(BG_VRAM + 0x7e00), 0x100); } -void sub_80A1394(u16 timer_div, u8 timer_mod) +static void sub_80A1394(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; if (timer_div < 12) // almost certainly a typo @@ -699,7 +695,7 @@ void sub_80A1394(u16 timer_div, u8 timer_mod) } } -void sub_80A1434(u16 timer_div, u8 timer_mod) +static void sub_80A1434(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; timer_div %= 8; @@ -707,23 +703,23 @@ void sub_80A1434(u16 timer_div, u8 timer_mod) sub_80A0980(gUnknown_08515824[timer_div], gUnknown_08515804[timer_mod], 0x80); } -void sub_80A1470(u16 timer) +static void sub_80A1470(u16 timer) { u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08515964[idx], (u16 *)(VRAM + 0x7800), 0x80); + sub_80A0980(gUnknown_08515964[idx], (u16 *)(BG_VRAM + 0x7800), 0x80); } -void sub_80A1498(u16 timer) +static void sub_80A1498(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(VRAM + 0x5400), 0x80); + sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x5400), 0x80); } -void sub_80A14C0(u16 timer_div, u8 timer_mod) +static void sub_80A14C0(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; timer_div %= 8; @@ -731,84 +727,84 @@ void sub_80A14C0(u16 timer_div, u8 timer_mod) sub_80A0980(gUnknown_085161DC[timer_div], gUnknown_085161BC[timer_mod], 0x80); } -void sub_80A14F8(u16 timer) +static void sub_80A14F8(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(VRAM + 0x7400), 0x80); + sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x7400), 0x80); } -void sub_80A1520(u16 timer) +static void sub_80A1520(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_085164FC[idx], (u16 *)(VRAM + 0x5540), 0xC0); + sub_80A0980(gUnknown_085164FC[idx], (u16 *)(BG_VRAM + 0x5540), 0xC0); } -void sub_80A1548(u16 timer) +static void sub_80A1548(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_0851680C[idx], (u16 *)(VRAM + 0x5b40), 0xC0); + sub_80A0980(gUnknown_0851680C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); } -void sub_80A1570(u16 timer) +static void sub_80A1570(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08516B1C[idx], (u16 *)(VRAM + 0x5b40), 0xC0); + sub_80A0980(gUnknown_08516B1C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); } -void sub_80A1598(u16 timer) +static void sub_80A1598(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08516D2C[idx], (u16 *)(VRAM + 0x5c00), 0x80); + sub_80A0980(gUnknown_08516D2C[idx], (u16 *)(BG_VRAM + 0x5c00), 0x80); } -void sub_80A15C0(u16 timer) +static void sub_80A15C0(u16 timer) { - void sub_80A1748(u16); + static void sub_80A1748(u16); if ((timer & 1) == 0) sub_80A1748(timer >> 1); } -void sub_80A15D8(u16 timer) +static void sub_80A15D8(u16 timer) { - void sub_80A16B0(u16); + static void sub_80A16B0(u16); if ((timer & 7) == 0) sub_80A16B0(timer >> 3); } -void sub_80A15F0(u16 timer) +static void sub_80A15F0(u16 timer) { - void sub_80A1720(u16); - void sub_80A16F8(u16); + static void sub_80A1720(u16); + static void sub_80A16F8(u16); if ((timer & 0x3f) == 1) sub_80A1720(timer >> 6); if ((timer & 0x07) == 1) sub_80A16F8(timer >> 3); } -void sub_80A161C(u16 timer) +static void sub_80A161C(u16 timer) { - void sub_80A1770(u16); + static void sub_80A1770(u16); if ((timer & 3) == 0) sub_80A1770(timer >> 2); } -void sub_80A1634(u16 timer) +static void sub_80A1634(u16 timer) { - void sub_80A17C0(u16); - void sub_80A17EC(u16); + static void sub_80A17C0(u16); + static void sub_80A17EC(u16); if ((timer & 7) == 0) { @@ -817,98 +813,98 @@ void sub_80A1634(u16 timer) } } -void sub_80A1658(u16 timer) +static void sub_80A1658(u16 timer) { - void sub_80A1818(u16); + static void sub_80A1818(u16); if ((timer & 3) == 0) sub_80A1818(timer >> 2); } -void sub_80A1670(u16 timer) +static void sub_80A1670(u16 timer) { - void sub_80A1884(u16); + static void sub_80A1884(u16); if ((timer & 3) == 0) sub_80A1884(timer >> 2); } -void sub_80A1688(u16 timer) +static void sub_80A1688(u16 timer) { u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08516E3C[idx], (u16 *)(VRAM + 0x3e00), 0x80); + sub_80A0980(gUnknown_08516E3C[idx], (u16 *)(BG_VRAM + 0x3e00), 0x80); } -void sub_80A16B0(u16 timer) +static void sub_80A16B0(u16 timer) { u16 idx; idx = timer % 3; - sub_80A0980(gUnknown_08517A44[idx], (u16 *)(VRAM + 0x7e00), 0x180); - sub_80A0980(gUnknown_08517A50[idx], (u16 *)(VRAM + 0x7a00), 0x280); + sub_80A0980(gUnknown_08517A44[idx], (u16 *)(BG_VRAM + 0x7e00), 0x180); + sub_80A0980(gUnknown_08517A50[idx], (u16 *)(BG_VRAM + 0x7a00), 0x280); } -void sub_80A16F8(u16 timer) +static void sub_80A16F8(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08517BFC[idx], (u16 *)(VRAM + 0x7f00), 0x20); + sub_80A0980(gUnknown_08517BFC[idx], (u16 *)(BG_VRAM + 0x7f00), 0x20); } -void sub_80A1720(u16 timer) +static void sub_80A1720(u16 timer) { u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08517C0C[idx], (u16 *)(VRAM + 0x7c00), 0x80); + sub_80A0980(gUnknown_08517C0C[idx], (u16 *)(BG_VRAM + 0x7c00), 0x80); } -void sub_80A1748(u16 timer) +static void sub_80A1748(u16 timer) { u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08518034[idx], (u16 *)(VRAM + 0x5200), 0x200); + sub_80A0980(gUnknown_08518034[idx], (u16 *)(BG_VRAM + 0x5200), 0x200); } -void sub_80A1770(u16 timer) +static void sub_80A1770(u16 timer) { u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_0851829C[idx], (u16 *)(VRAM + 0x7e00), 0x120); + sub_80A0980(gUnknown_0851829C[idx], (u16 *)(BG_VRAM + 0x7e00), 0x120); } -void sub_80A1798(u16 timer) +static void sub_80A1798(u16 timer) { u16 idx; idx = timer % 8; - sub_80A0980(gUnknown_085202C4[idx], (u16 *)(VRAM + 0x5e00), 0xc00); + sub_80A0980(gUnknown_085202C4[idx], (u16 *)(BG_VRAM + 0x5e00), 0xc00); } -void sub_80A17C0(u16 timer) +static void sub_80A17C0(u16 timer) { u16 idx; idx = timer % 3; - sub_80A0980(gUnknown_08524864[idx], (u16 *)(VRAM + 0x52e0), 0x100); + sub_80A0980(gUnknown_08524864[idx], (u16 *)(BG_VRAM + 0x52e0), 0x100); } -void sub_80A17EC(u16 timer) +static void sub_80A17EC(u16 timer) { u16 idx; idx = timer % 3; - sub_80A0980(gUnknown_08524870[idx], (u16 *)(VRAM + 0x50e0), 0x100); + sub_80A0980(gUnknown_08524870[idx], (u16 *)(BG_VRAM + 0x50e0), 0x100); } // palette -void sub_80A1818(u16 a1) +static void sub_80A1818(u16 a1) { CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); @@ -919,7 +915,7 @@ void sub_80A1818(u16 a1) } } -void sub_80A1884(u16 a1) +static void sub_80A1884(u16 a1) { CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); if ((u8)FindTaskIdByFunc(sub_8149DFC) == 0xFF ) From 3ec4d98de95a2aeb12f3c738b3496d0b3a830793 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 1 Oct 2017 21:58:47 -0400 Subject: [PATCH 337/342] Split palette and tileset_anims --- ld_script.txt | 2 + src/palette.c | 851 ------------------------------------------- src/tileset_anims.c | 865 ++++++++++++++++++++++++++++++++++++++++++++ sym_bss.txt | 1 + sym_ewram.txt | 1 + 5 files changed, 869 insertions(+), 851 deletions(-) create mode 100644 src/tileset_anims.c diff --git a/ld_script.txt b/ld_script.txt index 78d27eb7f..2ab0f780b 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -110,6 +110,7 @@ SECTIONS { asm/reset_rtc_screen.o(.text); src/start_menu.o(.text); asm/start_menu.o(.text); + src/tileset_anims.o(.text); src/palette.o(.text); src/sound.o(.text); asm/battle_anim.o(.text); @@ -356,6 +357,7 @@ SECTIONS { data/reset_rtc_screen.o(.rodata); data/start_menu.o(.rodata); data/tileset.o(.rodata); + src/tileset_anims.o(.rodata); src/palette.o(.rodata); data/fanfares.o(.rodata); data/battle_anims.o(.rodata); diff --git a/src/palette.c b/src/palette.c index ed7eb99b3..d60efdbc5 100644 --- a/src/palette.c +++ b/src/palette.c @@ -3,7 +3,6 @@ #include "palette.h" #include "decompress.h" #include "gpu_regs.h" -#include "battle.h" #include "task.h" enum @@ -42,8 +41,6 @@ struct PaletteStruct u8 ps_field_9; }; -static void cur_mapheader_run_tileset1_func(void); -static void cur_mapheader_run_tileset2_func(void); static void unused_sub_80A1CDC(struct PaletteStruct *, u32 *); static void unused_sub_80A1E40(struct PaletteStruct *, u32 *); static void unused_sub_80A1F00(struct PaletteStruct *); @@ -56,11 +53,6 @@ static void UpdateBlendRegisters(void); static bool8 IsSoftwarePaletteFadeFinishing(void); static void sub_80A2D54(u8 taskId); -static EWRAM_DATA struct { - const u16 *src; - u16 *dest; - u16 size; -} sTilesetDMA3TransferBuffer[20] = {0}; EWRAM_DATA u16 gPlttBufferUnfaded[0x200] = {0}; EWRAM_DATA u16 gPlttBufferFaded[0x200] = {0}; EWRAM_DATA struct PaletteStruct sPaletteStructs[0x10] = {0}; @@ -69,54 +61,6 @@ static EWRAM_DATA u32 gFiller_2037FE0 = 0; static EWRAM_DATA u32 sPlttBufferTransferPending = 0; EWRAM_DATA u8 gPaletteDecompressionBuffer[0x400] = {0}; -extern const u16 *const gUnknown_08510764[]; -extern const u16 *const gUnknown_08512574[]; -extern const u16 *const gUnknown_08512E54[]; -extern const u16 *const gUnknown_08513174[]; -extern const u16 *const gUnknown_08513684[]; -extern const u16 *const gUnknown_08513894[]; -extern const u16 *const gUnknown_085143E4[]; -extern const u16 *const gUnknown_085145F4[]; -extern const u16 *const gUnknown_08514E04[]; -extern u16 *const gUnknown_08515344[]; -extern u16 *const gUnknown_08515364[]; -extern const u16 *const gUnknown_08515384[]; -extern const u16 *const gUnknown_085153B4[]; -extern const u16 *const gUnknown_085153E4[]; -extern const u16 *const gUnknown_085153F4[]; -extern u16 *const gUnknown_08515804[]; -extern const u16 *const gUnknown_08515824[]; -extern const u16 *const gUnknown_08515964[]; -extern const u16 *const gUnknown_08515D8C[]; -extern u16 *const gUnknown_085161BC[]; -extern const u16 *const gUnknown_085161DC[]; -extern const u16 *const gUnknown_085164FC[]; -extern const u16 *const gUnknown_0851680C[]; -extern const u16 *const gUnknown_08516B1C[]; -extern const u16 *const gUnknown_08516D2C[]; -extern const u16 *const gUnknown_08516E3C[]; -extern const u16 *const gUnknown_08517A44[]; -extern const u16 *const gUnknown_08517A50[]; -extern const u16 *const gUnknown_08517BFC[]; -extern const u16 *const gUnknown_08517C0C[]; -extern const u16 *const gUnknown_08518034[]; -extern const u16 *const gUnknown_0851829C[]; -extern const u16 *const gUnknown_085202C4[]; -extern const u16 *const gUnknown_08524864[]; -extern const u16 *const gUnknown_08524870[]; - -extern const u16 gUnknown_08D85640[]; -extern const u16 gUnknown_08D85660[]; -extern const u16 gUnknown_08D85680[]; -extern const u16 gUnknown_08D856A0[]; - -static const u16 *const gUnknown_0852487C[] = { - gUnknown_08D85640, - gUnknown_08D85660, - gUnknown_08D85680, - gUnknown_08D856A0, -}; - static const struct PaletteStructTemplate gDummyPaletteStructTemplate = { .uid = 0xFFFF, .pst_field_B_5 = 1 @@ -131,801 +75,6 @@ static const u8 gUnknown_0852489C[] = { 31, 31 }; -// tileset - -IWRAM_DATA u8 sTilesetDMA3TransferBufferSize; -IWRAM_DATA u16 sPrimaryTilesetCBCounter; -IWRAM_DATA u16 sPrimaryTilesetCBBufferSize; -IWRAM_DATA u16 sSecondaryTilesetCBCounter; -IWRAM_DATA u16 sSecondaryTilesetCBBufferSize; -IWRAM_DATA void (*sPrimaryTilesetCB)(u16); -IWRAM_DATA void (*sSecondaryTilesetCB)(u16); - -static void sub_80A0954(void) -{ - sTilesetDMA3TransferBufferSize = 0; - CpuFill32(0, sTilesetDMA3TransferBuffer, sizeof sTilesetDMA3TransferBuffer); -} - -static void sub_80A0980(const u16 *a0, u16 *a1, u16 a2) -{ - if (sTilesetDMA3TransferBufferSize < 20) - { - sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].src = a0; - sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].dest = a1; - sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].size = a2; - sTilesetDMA3TransferBufferSize ++; - } -} - -void sub_80A09D0(void) -{ - int i; - - for (i = 0; i < sTilesetDMA3TransferBufferSize; i ++) - { - DmaCopy16(3, sTilesetDMA3TransferBuffer[i].src, sTilesetDMA3TransferBuffer[i].dest, sTilesetDMA3TransferBuffer[i].size); - } - sTilesetDMA3TransferBufferSize = 0; -} - -void cur_mapheader_run_tileset_funcs_after_some_cpuset(void) -{ - sub_80A0954(); - cur_mapheader_run_tileset1_func(); - cur_mapheader_run_tileset2_func(); -} - -void sub_80A0A2C(void) -{ - cur_mapheader_run_tileset2_func(); -} - -void sub_80A0A38(void) -{ - sub_80A0954(); - if (++sPrimaryTilesetCBCounter >= sPrimaryTilesetCBBufferSize) - sPrimaryTilesetCBCounter = 0; - if (++sSecondaryTilesetCBCounter >= sSecondaryTilesetCBBufferSize) - sSecondaryTilesetCBCounter = 0; - if (sPrimaryTilesetCB) - sPrimaryTilesetCB(sPrimaryTilesetCBCounter); - if (sSecondaryTilesetCB) - sSecondaryTilesetCB(sSecondaryTilesetCBCounter); -} - -static void cur_mapheader_run_tileset1_func(void) -{ - sPrimaryTilesetCBCounter = 0; - sPrimaryTilesetCBBufferSize = 0; - sPrimaryTilesetCB = NULL; - if (gMapHeader.mapData->primaryTileset && gMapHeader.mapData->primaryTileset->callback) - gMapHeader.mapData->primaryTileset->callback(); -} - -static void cur_mapheader_run_tileset2_func(void) -{ - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = 0; - sSecondaryTilesetCB = NULL; - if (gMapHeader.mapData->secondaryTileset && gMapHeader.mapData->secondaryTileset->callback) - gMapHeader.mapData->secondaryTileset->callback(); -} - -void TilesetCb_General(void) -{ - static void sub_80A0B70(u16); - - sPrimaryTilesetCBCounter = 0; - sPrimaryTilesetCBBufferSize = 0x100; - sPrimaryTilesetCB = sub_80A0B70; -} - -void TilesetCb_InsideBuilding(void) -{ - static void sub_80A0BB4(u16); - - sPrimaryTilesetCBCounter = 0; - sPrimaryTilesetCBBufferSize = 0x100; - sPrimaryTilesetCB = sub_80A0BB4; -} - -static void sub_80A0B70(u16 timer) -{ - static void sub_80A0BCC(u16); - static void sub_80A0BF4(u16); - static void sub_80A0C1C(u16); - static void sub_80A0C44(u16); - static void sub_80A12AC(u16); - - if ((timer & 0x0F) == 0) - sub_80A0BCC(timer >> 4); - if ((timer & 0x0F) == 1) - sub_80A0BF4(timer >> 4); - if ((timer & 0x0F) == 2) - sub_80A0C1C(timer >> 4); - if ((timer & 0x0F) == 3) - sub_80A0C44(timer >> 4); - if ((timer & 0x0F) == 4) - sub_80A12AC(timer >> 4); -} - -static void sub_80A0BB4(u16 timer) -{ - static void sub_80A1688(u16); - - if ((timer & 0x7) == 0) - sub_80A1688(timer >> 3); -} - -static void sub_80A0BCC(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08510764[idx], (u16 *)(BG_VRAM + 0x3F80), 0x80); -} - -static void sub_80A0BF4(u16 timer) -{ - u8 idx; - - idx = timer % 8; - sub_80A0980(gUnknown_08512574[idx], (u16 *)(BG_VRAM + 0x3600), 0x3C0); -} - -static void sub_80A0C1C(u16 timer) -{ - u16 idx; - - idx = timer % 8; - sub_80A0980(gUnknown_08512E54[idx], (u16 *)(BG_VRAM + 0x3a00), 0x140); -} - -static void sub_80A0C44(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08513174[idx], (u16 *)(BG_VRAM + 0x3e00), 0xc0); -} - -void TilesetCb_Petalburg(void) -{ - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = NULL; -} - -void TilesetCb_Rustboro(void) -{ - static void sub_80A103C(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A103C; -} - -void TilesetCb_Dewford(void) -{ - static void sub_80A10B8(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A10B8; -} - -void TilesetCb_Slateport(void) -{ - static void sub_80A10D0(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A10D0; -} - -void TilesetCb_Mauville(void) -{ - static void sub_80A10E8(u16); - - sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A10E8; -} - -void TilesetCb_Lavaridge(void) -{ - static void sub_80A115C(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A115C; -} - -void TilesetCb_Fallarbor(void) -{ - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = NULL; -} - -void TilesetCb_Fortree(void) -{ - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = NULL; -} - -void TilesetCb_Lilycove(void) -{ - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = NULL; -} - -void TilesetCb_Mossdeep(void) -{ - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = NULL; -} - -void TilesetCb_EverGrande(void) -{ - static void sub_80A1188(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A1188; -} - -void TilesetCb_Pacifidlog(void) -{ - static void sub_80A11FC(u16); - - sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A11FC; -} - -void TilesetCb_Sootopolis(void) -{ - static void sub_80A122C(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A122C; -} - -void TilesetCb_BattleFrontierOutsideWest(void) -{ - static void sub_80A127C(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A127C; -} - -void TilesetCb_BattleFrontierOutsideEast(void) -{ - static void sub_80A1294(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A1294; -} - -void TilesetCb_Underwater(void) -{ - static void sub_80A1244(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = 128; - sSecondaryTilesetCB = sub_80A1244; -} - -void TilesetCb_SootopolisGym(void) -{ - static void sub_80A15D8(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = 240; - sSecondaryTilesetCB = sub_80A15D8; -} - -void TilesetCb_Cave(void) -{ - static void sub_80A1260(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A1260; -} - -void TilesetCb_EliteFour(void) -{ - static void sub_80A15F0(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = 128; - sSecondaryTilesetCB = sub_80A15F0; -} - -void TilesetCb_MauvilleGym(void) -{ - static void sub_80A15C0(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A15C0; -} - -void TilesetCb_BikeShop(void) -{ - static void sub_80A161C(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A161C; -} - -void TilesetCb_BattlePyramid(void) -{ - static void sub_80A1634(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A1634; -} - -void TilesetCb_BattleDome(void) -{ - static void sub_80A1658(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A1658; -} - -static void sub_80A103C(u16 timer) -{ - static void sub_80A1434(u16, u8); - static void sub_80A1470(u16); - - if ((timer & 0x07) == 0) - { - sub_80A1434(timer >> 3, 0); - sub_80A1470(timer >> 3); - } - if ((timer & 0x07) == 1) - sub_80A1434(timer >> 3, 1); - if ((timer & 0x07) == 2) - sub_80A1434(timer >> 3, 2); - if ((timer & 0x07) == 3) - sub_80A1434(timer >> 3, 3); - if ((timer & 0x07) == 4) - sub_80A1434(timer >> 3, 4); - if ((timer & 0x07) == 5) - sub_80A1434(timer >> 3, 5); - if ((timer & 0x07) == 6) - sub_80A1434(timer >> 3, 6); - if ((timer & 0x07) == 7) - sub_80A1434(timer >> 3, 7); -} - -static void sub_80A10B8(u16 timer) -{ - static void sub_80A1520(u16); - - if ((timer & 7) == 0) - sub_80A1520(timer >> 3); -} - -static void sub_80A10D0(u16 timer) -{ - static void sub_80A1598(u16); - - if ((timer & 15) == 0) - sub_80A1598(timer >> 4); -} - -static void sub_80A10E8(u16 timer) -{ - static void sub_80A1394(u16, u8); - - if ((timer & 0x07) == 0) - sub_80A1394(timer >> 3, 0); - if ((timer & 0x07) == 1) - sub_80A1394(timer >> 3, 1); - if ((timer & 0x07) == 2) - sub_80A1394(timer >> 3, 2); - if ((timer & 0x07) == 3) - sub_80A1394(timer >> 3, 3); - if ((timer & 0x07) == 4) - sub_80A1394(timer >> 3, 4); - if ((timer & 0x07) == 5) - sub_80A1394(timer >> 3, 5); - if ((timer & 0x07) == 6) - sub_80A1394(timer >> 3, 6); - if ((timer & 0x07) == 7) - sub_80A1394(timer >> 3, 7); -} - -static void sub_80A115C(u16 timer) -{ - static void sub_80A12D4(u8); - static void sub_80A1498(u16); - - if ((timer & 0x0F) == 0) - sub_80A12D4(timer >> 4); - if ((timer & 0x0F) == 1) - sub_80A1498(timer >> 4); -} - -static void sub_80A1188(u16 timer) -{ - static void sub_80A14C0(u16, u8); - - if ((timer & 0x07) == 0) - sub_80A14C0(timer >> 3, 0); - if ((timer & 0x07) == 1) - sub_80A14C0(timer >> 3, 1); - if ((timer & 0x07) == 2) - sub_80A14C0(timer >> 3, 2); - if ((timer & 0x07) == 3) - sub_80A14C0(timer >> 3, 3); - if ((timer & 0x07) == 4) - sub_80A14C0(timer >> 3, 4); - if ((timer & 0x07) == 5) - sub_80A14C0(timer >> 3, 5); - if ((timer & 0x07) == 6) - sub_80A14C0(timer >> 3, 6); - if ((timer & 0x07) == 7) - sub_80A14C0(timer >> 3, 7); -} - -static void sub_80A11FC(u16 timer) -{ - static void sub_80A131C(u8); - static void sub_80A136C(u8); - - if ((timer & 0x0F) == 0) - sub_80A131C(timer >> 4); - if ((timer & 0x0F) == 1) - sub_80A136C(timer >> 4); -} - -static void sub_80A122C(u16 timer) -{ - static void sub_80A1798(u16); - - if ((timer & 0x0F) == 0) - sub_80A1798(timer >> 4); -} - -static void sub_80A1244(u16 timer) -{ - static void sub_80A1344(u8); - - if ((timer & 0x0F) == 0) - sub_80A1344(timer >> 4); -} - -static void sub_80A1260(u16 timer) -{ - static void sub_80A14F8(u16); - - if ((timer & 0x0F) == 1) - sub_80A14F8(timer >> 4); -} - -static void sub_80A127C(u16 timer) -{ - static void sub_80A1548(u16); - - if ((timer & 0x07) == 0) - sub_80A1548(timer >> 3); -} - -static void sub_80A1294(u16 timer) -{ - static void sub_80A1570(u16); - - if ((timer & 0x07) == 0) - sub_80A1570(timer >> 3); -} - -static void sub_80A12AC(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08513684[idx], (u16 *)(BG_VRAM + 0x3c00), 0x140); -} - -static void sub_80A12D4(u8 timer) -{ - u8 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6400), 0x80); - - idx = (timer + 2) % 4; - sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6480), 0x80); -} - -static void sub_80A131C(u8 timer) -{ - u8 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_085143E4[idx], (u16 *)(BG_VRAM + 0x7a00), 0x3C0); -} - -static void sub_80A1344(u8 timer) -{ - u8 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_085145F4[idx], (u16 *)(BG_VRAM + 0x7e00), 0x80); -} - -static void sub_80A136C(u8 timer) -{ - u8 idx; - - idx = timer % 8; - sub_80A0980(gUnknown_08514E04[idx], (u16 *)(BG_VRAM + 0x7e00), 0x100); -} - -static void sub_80A1394(u16 timer_div, u8 timer_mod) -{ - timer_div -= timer_mod; - if (timer_div < 12) // almost certainly a typo - { - timer_div %= 12; - sub_80A0980(gUnknown_08515384[timer_div], gUnknown_08515344[timer_mod], 0x80); - sub_80A0980(gUnknown_085153B4[timer_div], gUnknown_08515364[timer_mod], 0x80); - } - else - { - timer_div %= 4; - sub_80A0980(gUnknown_085153E4[timer_div], gUnknown_08515344[timer_mod], 0x80); - sub_80A0980(gUnknown_085153F4[timer_div], gUnknown_08515364[timer_mod], 0x80); - } -} - -static void sub_80A1434(u16 timer_div, u8 timer_mod) -{ - timer_div -= timer_mod; - timer_div %= 8; - if (gUnknown_08515824[timer_div]) - sub_80A0980(gUnknown_08515824[timer_div], gUnknown_08515804[timer_mod], 0x80); -} - -static void sub_80A1470(u16 timer) -{ - u16 idx; - - idx = timer % 2; - sub_80A0980(gUnknown_08515964[idx], (u16 *)(BG_VRAM + 0x7800), 0x80); -} - -static void sub_80A1498(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x5400), 0x80); -} - -static void sub_80A14C0(u16 timer_div, u8 timer_mod) -{ - timer_div -= timer_mod; - timer_div %= 8; - - sub_80A0980(gUnknown_085161DC[timer_div], gUnknown_085161BC[timer_mod], 0x80); -} - -static void sub_80A14F8(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x7400), 0x80); -} - -static void sub_80A1520(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_085164FC[idx], (u16 *)(BG_VRAM + 0x5540), 0xC0); -} - -static void sub_80A1548(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_0851680C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); -} - -static void sub_80A1570(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08516B1C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); -} - -static void sub_80A1598(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08516D2C[idx], (u16 *)(BG_VRAM + 0x5c00), 0x80); -} - -static void sub_80A15C0(u16 timer) -{ - static void sub_80A1748(u16); - - if ((timer & 1) == 0) - sub_80A1748(timer >> 1); -} - -static void sub_80A15D8(u16 timer) -{ - static void sub_80A16B0(u16); - - if ((timer & 7) == 0) - sub_80A16B0(timer >> 3); -} - -static void sub_80A15F0(u16 timer) -{ - static void sub_80A1720(u16); - static void sub_80A16F8(u16); - - if ((timer & 0x3f) == 1) - sub_80A1720(timer >> 6); - if ((timer & 0x07) == 1) - sub_80A16F8(timer >> 3); -} -static void sub_80A161C(u16 timer) -{ - static void sub_80A1770(u16); - - if ((timer & 3) == 0) - sub_80A1770(timer >> 2); -} - -static void sub_80A1634(u16 timer) -{ - static void sub_80A17C0(u16); - static void sub_80A17EC(u16); - - if ((timer & 7) == 0) - { - sub_80A17C0(timer >> 3); - sub_80A17EC(timer >> 3); - } -} - -static void sub_80A1658(u16 timer) -{ - static void sub_80A1818(u16); - - if ((timer & 3) == 0) - sub_80A1818(timer >> 2); -} - -static void sub_80A1670(u16 timer) -{ - static void sub_80A1884(u16); - - if ((timer & 3) == 0) - sub_80A1884(timer >> 2); -} - -static void sub_80A1688(u16 timer) -{ - u16 idx; - - idx = timer % 2; - sub_80A0980(gUnknown_08516E3C[idx], (u16 *)(BG_VRAM + 0x3e00), 0x80); -} - -static void sub_80A16B0(u16 timer) -{ - u16 idx; - - idx = timer % 3; - sub_80A0980(gUnknown_08517A44[idx], (u16 *)(BG_VRAM + 0x7e00), 0x180); - sub_80A0980(gUnknown_08517A50[idx], (u16 *)(BG_VRAM + 0x7a00), 0x280); -} - -static void sub_80A16F8(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08517BFC[idx], (u16 *)(BG_VRAM + 0x7f00), 0x20); -} - -static void sub_80A1720(u16 timer) -{ - u16 idx; - - idx = timer % 2; - sub_80A0980(gUnknown_08517C0C[idx], (u16 *)(BG_VRAM + 0x7c00), 0x80); -} - -static void sub_80A1748(u16 timer) -{ - u16 idx; - - idx = timer % 2; - sub_80A0980(gUnknown_08518034[idx], (u16 *)(BG_VRAM + 0x5200), 0x200); -} - -static void sub_80A1770(u16 timer) -{ - u16 idx; - - idx = timer % 2; - sub_80A0980(gUnknown_0851829C[idx], (u16 *)(BG_VRAM + 0x7e00), 0x120); -} - -static void sub_80A1798(u16 timer) -{ - u16 idx; - - idx = timer % 8; - sub_80A0980(gUnknown_085202C4[idx], (u16 *)(BG_VRAM + 0x5e00), 0xc00); -} - -static void sub_80A17C0(u16 timer) -{ - u16 idx; - - idx = timer % 3; - sub_80A0980(gUnknown_08524864[idx], (u16 *)(BG_VRAM + 0x52e0), 0x100); -} - -static void sub_80A17EC(u16 timer) -{ - u16 idx; - - idx = timer % 3; - sub_80A0980(gUnknown_08524870[idx], (u16 *)(BG_VRAM + 0x50e0), 0x100); -} - -// palette - -static void sub_80A1818(u16 a1) -{ - CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); - BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); - if ((u8)FindTaskIdByFunc(sub_8149DFC) != 0xFF ) - { - sSecondaryTilesetCB = sub_80A1670; - sSecondaryTilesetCBBufferSize = 0x20; - } -} - -static void sub_80A1884(u16 a1) -{ - CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); - if ((u8)FindTaskIdByFunc(sub_8149DFC) == 0xFF ) - { - BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); - if (!--sSecondaryTilesetCBBufferSize) - sSecondaryTilesetCB = NULL; - } -} - void LoadCompressedPalette(const void *src, u16 offset, u16 size) { LZDecompressWram(src, gPaletteDecompressionBuffer); diff --git a/src/tileset_anims.c b/src/tileset_anims.c new file mode 100644 index 000000000..5eb470a07 --- /dev/null +++ b/src/tileset_anims.c @@ -0,0 +1,865 @@ + +// Includes +#include "global.h" +#include "palette.h" +#include "blend_palette.h" +#include "battle.h" +#include "task.h" + +// Static type declarations + +// Static RAM declarations + +static EWRAM_DATA struct { + const u16 *src; + u16 *dest; + u16 size; +} sTilesetDMA3TransferBuffer[20] = {0}; + +static u8 sTilesetDMA3TransferBufferSize; +static u16 sPrimaryTilesetCBCounter; +static u16 sPrimaryTilesetCBBufferSize; +static u16 sSecondaryTilesetCBCounter; +static u16 sSecondaryTilesetCBBufferSize; +static void (*sPrimaryTilesetCB)(u16); +static void (*sSecondaryTilesetCB)(u16); + +// Static ROM declarations + +static void cur_mapheader_run_tileset1_func(void); +static void cur_mapheader_run_tileset2_func(void); + +// .rodata + +extern const u16 *const gUnknown_08510764[]; +extern const u16 *const gUnknown_08512574[]; +extern const u16 *const gUnknown_08512E54[]; +extern const u16 *const gUnknown_08513174[]; +extern const u16 *const gUnknown_08513684[]; +extern const u16 *const gUnknown_08513894[]; +extern const u16 *const gUnknown_085143E4[]; +extern const u16 *const gUnknown_085145F4[]; +extern const u16 *const gUnknown_08514E04[]; +extern u16 *const gUnknown_08515344[]; +extern u16 *const gUnknown_08515364[]; +extern const u16 *const gUnknown_08515384[]; +extern const u16 *const gUnknown_085153B4[]; +extern const u16 *const gUnknown_085153E4[]; +extern const u16 *const gUnknown_085153F4[]; +extern u16 *const gUnknown_08515804[]; +extern const u16 *const gUnknown_08515824[]; +extern const u16 *const gUnknown_08515964[]; +extern const u16 *const gUnknown_08515D8C[]; +extern u16 *const gUnknown_085161BC[]; +extern const u16 *const gUnknown_085161DC[]; +extern const u16 *const gUnknown_085164FC[]; +extern const u16 *const gUnknown_0851680C[]; +extern const u16 *const gUnknown_08516B1C[]; +extern const u16 *const gUnknown_08516D2C[]; +extern const u16 *const gUnknown_08516E3C[]; +extern const u16 *const gUnknown_08517A44[]; +extern const u16 *const gUnknown_08517A50[]; +extern const u16 *const gUnknown_08517BFC[]; +extern const u16 *const gUnknown_08517C0C[]; +extern const u16 *const gUnknown_08518034[]; +extern const u16 *const gUnknown_0851829C[]; +extern const u16 *const gUnknown_085202C4[]; +extern const u16 *const gUnknown_08524864[]; +extern const u16 *const gUnknown_08524870[]; + +extern const u16 gUnknown_08D85640[]; +extern const u16 gUnknown_08D85660[]; +extern const u16 gUnknown_08D85680[]; +extern const u16 gUnknown_08D856A0[]; + +static const u16 *const gUnknown_0852487C[] = { + gUnknown_08D85640, + gUnknown_08D85660, + gUnknown_08D85680, + gUnknown_08D856A0, +}; + +// .text + +static void sub_80A0954(void) +{ + sTilesetDMA3TransferBufferSize = 0; + CpuFill32(0, sTilesetDMA3TransferBuffer, sizeof sTilesetDMA3TransferBuffer); +} + +static void sub_80A0980(const u16 *a0, u16 *a1, u16 a2) +{ + if (sTilesetDMA3TransferBufferSize < 20) + { + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].src = a0; + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].dest = a1; + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].size = a2; + sTilesetDMA3TransferBufferSize ++; + } +} + +void sub_80A09D0(void) +{ + int i; + + for (i = 0; i < sTilesetDMA3TransferBufferSize; i ++) + { + DmaCopy16(3, sTilesetDMA3TransferBuffer[i].src, sTilesetDMA3TransferBuffer[i].dest, sTilesetDMA3TransferBuffer[i].size); + } + sTilesetDMA3TransferBufferSize = 0; +} + +void cur_mapheader_run_tileset_funcs_after_some_cpuset(void) +{ + sub_80A0954(); + cur_mapheader_run_tileset1_func(); + cur_mapheader_run_tileset2_func(); +} + +void sub_80A0A2C(void) +{ + cur_mapheader_run_tileset2_func(); +} + +void sub_80A0A38(void) +{ + sub_80A0954(); + if (++sPrimaryTilesetCBCounter >= sPrimaryTilesetCBBufferSize) + sPrimaryTilesetCBCounter = 0; + if (++sSecondaryTilesetCBCounter >= sSecondaryTilesetCBBufferSize) + sSecondaryTilesetCBCounter = 0; + if (sPrimaryTilesetCB) + sPrimaryTilesetCB(sPrimaryTilesetCBCounter); + if (sSecondaryTilesetCB) + sSecondaryTilesetCB(sSecondaryTilesetCBCounter); +} + +static void cur_mapheader_run_tileset1_func(void) +{ + sPrimaryTilesetCBCounter = 0; + sPrimaryTilesetCBBufferSize = 0; + sPrimaryTilesetCB = NULL; + if (gMapHeader.mapData->primaryTileset && gMapHeader.mapData->primaryTileset->callback) + gMapHeader.mapData->primaryTileset->callback(); +} + +static void cur_mapheader_run_tileset2_func(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 0; + sSecondaryTilesetCB = NULL; + if (gMapHeader.mapData->secondaryTileset && gMapHeader.mapData->secondaryTileset->callback) + gMapHeader.mapData->secondaryTileset->callback(); +} + +void TilesetCb_General(void) +{ + static void sub_80A0B70(u16); + + sPrimaryTilesetCBCounter = 0; + sPrimaryTilesetCBBufferSize = 0x100; + sPrimaryTilesetCB = sub_80A0B70; +} + +void TilesetCb_InsideBuilding(void) +{ + static void sub_80A0BB4(u16); + + sPrimaryTilesetCBCounter = 0; + sPrimaryTilesetCBBufferSize = 0x100; + sPrimaryTilesetCB = sub_80A0BB4; +} + +static void sub_80A0B70(u16 timer) +{ + static void sub_80A0BCC(u16); + static void sub_80A0BF4(u16); + static void sub_80A0C1C(u16); + static void sub_80A0C44(u16); + static void sub_80A12AC(u16); + + if ((timer & 0x0F) == 0) + sub_80A0BCC(timer >> 4); + if ((timer & 0x0F) == 1) + sub_80A0BF4(timer >> 4); + if ((timer & 0x0F) == 2) + sub_80A0C1C(timer >> 4); + if ((timer & 0x0F) == 3) + sub_80A0C44(timer >> 4); + if ((timer & 0x0F) == 4) + sub_80A12AC(timer >> 4); +} + +static void sub_80A0BB4(u16 timer) +{ + static void sub_80A1688(u16); + + if ((timer & 0x7) == 0) + sub_80A1688(timer >> 3); +} + +static void sub_80A0BCC(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08510764[idx], (u16 *)(BG_VRAM + 0x3F80), 0x80); +} + +static void sub_80A0BF4(u16 timer) +{ + u8 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_08512574[idx], (u16 *)(BG_VRAM + 0x3600), 0x3C0); +} + +static void sub_80A0C1C(u16 timer) +{ + u16 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_08512E54[idx], (u16 *)(BG_VRAM + 0x3a00), 0x140); +} + +static void sub_80A0C44(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08513174[idx], (u16 *)(BG_VRAM + 0x3e00), 0xc0); +} + +void TilesetCb_Petalburg(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Rustboro(void) +{ + static void sub_80A103C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A103C; +} + +void TilesetCb_Dewford(void) +{ + static void sub_80A10B8(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A10B8; +} + +void TilesetCb_Slateport(void) +{ + static void sub_80A10D0(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A10D0; +} + +void TilesetCb_Mauville(void) +{ + static void sub_80A10E8(u16); + + sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A10E8; +} + +void TilesetCb_Lavaridge(void) +{ + static void sub_80A115C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A115C; +} + +void TilesetCb_Fallarbor(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Fortree(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Lilycove(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Mossdeep(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_EverGrande(void) +{ + static void sub_80A1188(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1188; +} + +void TilesetCb_Pacifidlog(void) +{ + static void sub_80A11FC(u16); + + sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A11FC; +} + +void TilesetCb_Sootopolis(void) +{ + static void sub_80A122C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A122C; +} + +void TilesetCb_BattleFrontierOutsideWest(void) +{ + static void sub_80A127C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A127C; +} + +void TilesetCb_BattleFrontierOutsideEast(void) +{ + static void sub_80A1294(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1294; +} + +void TilesetCb_Underwater(void) +{ + static void sub_80A1244(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 128; + sSecondaryTilesetCB = sub_80A1244; +} + +void TilesetCb_SootopolisGym(void) +{ + static void sub_80A15D8(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 240; + sSecondaryTilesetCB = sub_80A15D8; +} + +void TilesetCb_Cave(void) +{ + static void sub_80A1260(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1260; +} + +void TilesetCb_EliteFour(void) +{ + static void sub_80A15F0(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 128; + sSecondaryTilesetCB = sub_80A15F0; +} + +void TilesetCb_MauvilleGym(void) +{ + static void sub_80A15C0(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A15C0; +} + +void TilesetCb_BikeShop(void) +{ + static void sub_80A161C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A161C; +} + +void TilesetCb_BattlePyramid(void) +{ + static void sub_80A1634(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1634; +} + +void TilesetCb_BattleDome(void) +{ + static void sub_80A1658(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1658; +} + +static void sub_80A103C(u16 timer) +{ + static void sub_80A1434(u16, u8); + static void sub_80A1470(u16); + + if ((timer & 0x07) == 0) + { + sub_80A1434(timer >> 3, 0); + sub_80A1470(timer >> 3); + } + if ((timer & 0x07) == 1) + sub_80A1434(timer >> 3, 1); + if ((timer & 0x07) == 2) + sub_80A1434(timer >> 3, 2); + if ((timer & 0x07) == 3) + sub_80A1434(timer >> 3, 3); + if ((timer & 0x07) == 4) + sub_80A1434(timer >> 3, 4); + if ((timer & 0x07) == 5) + sub_80A1434(timer >> 3, 5); + if ((timer & 0x07) == 6) + sub_80A1434(timer >> 3, 6); + if ((timer & 0x07) == 7) + sub_80A1434(timer >> 3, 7); +} + +static void sub_80A10B8(u16 timer) +{ + static void sub_80A1520(u16); + + if ((timer & 7) == 0) + sub_80A1520(timer >> 3); +} + +static void sub_80A10D0(u16 timer) +{ + static void sub_80A1598(u16); + + if ((timer & 15) == 0) + sub_80A1598(timer >> 4); +} + +static void sub_80A10E8(u16 timer) +{ + static void sub_80A1394(u16, u8); + + if ((timer & 0x07) == 0) + sub_80A1394(timer >> 3, 0); + if ((timer & 0x07) == 1) + sub_80A1394(timer >> 3, 1); + if ((timer & 0x07) == 2) + sub_80A1394(timer >> 3, 2); + if ((timer & 0x07) == 3) + sub_80A1394(timer >> 3, 3); + if ((timer & 0x07) == 4) + sub_80A1394(timer >> 3, 4); + if ((timer & 0x07) == 5) + sub_80A1394(timer >> 3, 5); + if ((timer & 0x07) == 6) + sub_80A1394(timer >> 3, 6); + if ((timer & 0x07) == 7) + sub_80A1394(timer >> 3, 7); +} + +static void sub_80A115C(u16 timer) +{ + static void sub_80A12D4(u8); + static void sub_80A1498(u16); + + if ((timer & 0x0F) == 0) + sub_80A12D4(timer >> 4); + if ((timer & 0x0F) == 1) + sub_80A1498(timer >> 4); +} + +static void sub_80A1188(u16 timer) +{ + static void sub_80A14C0(u16, u8); + + if ((timer & 0x07) == 0) + sub_80A14C0(timer >> 3, 0); + if ((timer & 0x07) == 1) + sub_80A14C0(timer >> 3, 1); + if ((timer & 0x07) == 2) + sub_80A14C0(timer >> 3, 2); + if ((timer & 0x07) == 3) + sub_80A14C0(timer >> 3, 3); + if ((timer & 0x07) == 4) + sub_80A14C0(timer >> 3, 4); + if ((timer & 0x07) == 5) + sub_80A14C0(timer >> 3, 5); + if ((timer & 0x07) == 6) + sub_80A14C0(timer >> 3, 6); + if ((timer & 0x07) == 7) + sub_80A14C0(timer >> 3, 7); +} + +static void sub_80A11FC(u16 timer) +{ + static void sub_80A131C(u8); + static void sub_80A136C(u8); + + if ((timer & 0x0F) == 0) + sub_80A131C(timer >> 4); + if ((timer & 0x0F) == 1) + sub_80A136C(timer >> 4); +} + +static void sub_80A122C(u16 timer) +{ + static void sub_80A1798(u16); + + if ((timer & 0x0F) == 0) + sub_80A1798(timer >> 4); +} + +static void sub_80A1244(u16 timer) +{ + static void sub_80A1344(u8); + + if ((timer & 0x0F) == 0) + sub_80A1344(timer >> 4); +} + +static void sub_80A1260(u16 timer) +{ + static void sub_80A14F8(u16); + + if ((timer & 0x0F) == 1) + sub_80A14F8(timer >> 4); +} + +static void sub_80A127C(u16 timer) +{ + static void sub_80A1548(u16); + + if ((timer & 0x07) == 0) + sub_80A1548(timer >> 3); +} + +static void sub_80A1294(u16 timer) +{ + static void sub_80A1570(u16); + + if ((timer & 0x07) == 0) + sub_80A1570(timer >> 3); +} + +static void sub_80A12AC(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08513684[idx], (u16 *)(BG_VRAM + 0x3c00), 0x140); +} + +static void sub_80A12D4(u8 timer) +{ + u8 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6400), 0x80); + + idx = (timer + 2) % 4; + sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6480), 0x80); +} + +static void sub_80A131C(u8 timer) +{ + u8 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_085143E4[idx], (u16 *)(BG_VRAM + 0x7a00), 0x3C0); +} + +static void sub_80A1344(u8 timer) +{ + u8 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_085145F4[idx], (u16 *)(BG_VRAM + 0x7e00), 0x80); +} + +static void sub_80A136C(u8 timer) +{ + u8 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_08514E04[idx], (u16 *)(BG_VRAM + 0x7e00), 0x100); +} + +static void sub_80A1394(u16 timer_div, u8 timer_mod) +{ + timer_div -= timer_mod; + if (timer_div < 12) // almost certainly a typo + { + timer_div %= 12; + sub_80A0980(gUnknown_08515384[timer_div], gUnknown_08515344[timer_mod], 0x80); + sub_80A0980(gUnknown_085153B4[timer_div], gUnknown_08515364[timer_mod], 0x80); + } + else + { + timer_div %= 4; + sub_80A0980(gUnknown_085153E4[timer_div], gUnknown_08515344[timer_mod], 0x80); + sub_80A0980(gUnknown_085153F4[timer_div], gUnknown_08515364[timer_mod], 0x80); + } +} + +static void sub_80A1434(u16 timer_div, u8 timer_mod) +{ + timer_div -= timer_mod; + timer_div %= 8; + if (gUnknown_08515824[timer_div]) + sub_80A0980(gUnknown_08515824[timer_div], gUnknown_08515804[timer_mod], 0x80); +} + +static void sub_80A1470(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08515964[idx], (u16 *)(BG_VRAM + 0x7800), 0x80); +} + +static void sub_80A1498(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x5400), 0x80); +} + +static void sub_80A14C0(u16 timer_div, u8 timer_mod) +{ + timer_div -= timer_mod; + timer_div %= 8; + + sub_80A0980(gUnknown_085161DC[timer_div], gUnknown_085161BC[timer_mod], 0x80); +} + +static void sub_80A14F8(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x7400), 0x80); +} + +static void sub_80A1520(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_085164FC[idx], (u16 *)(BG_VRAM + 0x5540), 0xC0); +} + +static void sub_80A1548(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_0851680C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); +} + +static void sub_80A1570(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08516B1C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); +} + +static void sub_80A1598(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08516D2C[idx], (u16 *)(BG_VRAM + 0x5c00), 0x80); +} + +static void sub_80A15C0(u16 timer) +{ + static void sub_80A1748(u16); + + if ((timer & 1) == 0) + sub_80A1748(timer >> 1); +} + +static void sub_80A15D8(u16 timer) +{ + static void sub_80A16B0(u16); + + if ((timer & 7) == 0) + sub_80A16B0(timer >> 3); +} + +static void sub_80A15F0(u16 timer) +{ + static void sub_80A1720(u16); + static void sub_80A16F8(u16); + + if ((timer & 0x3f) == 1) + sub_80A1720(timer >> 6); + if ((timer & 0x07) == 1) + sub_80A16F8(timer >> 3); +} +static void sub_80A161C(u16 timer) +{ + static void sub_80A1770(u16); + + if ((timer & 3) == 0) + sub_80A1770(timer >> 2); +} + +static void sub_80A1634(u16 timer) +{ + static void sub_80A17C0(u16); + static void sub_80A17EC(u16); + + if ((timer & 7) == 0) + { + sub_80A17C0(timer >> 3); + sub_80A17EC(timer >> 3); + } +} + +static void sub_80A1658(u16 timer) +{ + static void sub_80A1818(u16); + + if ((timer & 3) == 0) + sub_80A1818(timer >> 2); +} + +static void sub_80A1670(u16 timer) +{ + static void sub_80A1884(u16); + + if ((timer & 3) == 0) + sub_80A1884(timer >> 2); +} + +static void sub_80A1688(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08516E3C[idx], (u16 *)(BG_VRAM + 0x3e00), 0x80); +} + +static void sub_80A16B0(u16 timer) +{ + u16 idx; + + idx = timer % 3; + sub_80A0980(gUnknown_08517A44[idx], (u16 *)(BG_VRAM + 0x7e00), 0x180); + sub_80A0980(gUnknown_08517A50[idx], (u16 *)(BG_VRAM + 0x7a00), 0x280); +} + +static void sub_80A16F8(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08517BFC[idx], (u16 *)(BG_VRAM + 0x7f00), 0x20); +} + +static void sub_80A1720(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08517C0C[idx], (u16 *)(BG_VRAM + 0x7c00), 0x80); +} + +static void sub_80A1748(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08518034[idx], (u16 *)(BG_VRAM + 0x5200), 0x200); +} + +static void sub_80A1770(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_0851829C[idx], (u16 *)(BG_VRAM + 0x7e00), 0x120); +} + +static void sub_80A1798(u16 timer) +{ + u16 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_085202C4[idx], (u16 *)(BG_VRAM + 0x5e00), 0xc00); +} + +static void sub_80A17C0(u16 timer) +{ + u16 idx; + + idx = timer % 3; + sub_80A0980(gUnknown_08524864[idx], (u16 *)(BG_VRAM + 0x52e0), 0x100); +} + +static void sub_80A17EC(u16 timer) +{ + u16 idx; + + idx = timer % 3; + sub_80A0980(gUnknown_08524870[idx], (u16 *)(BG_VRAM + 0x50e0), 0x100); +} + +static void sub_80A1818(u16 a1) +{ + CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); + BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); + if ((u8)FindTaskIdByFunc(sub_8149DFC) != 0xFF ) + { + sSecondaryTilesetCB = sub_80A1670; + sSecondaryTilesetCBBufferSize = 0x20; + } +} + +static void sub_80A1884(u16 a1) +{ + CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); + if ((u8)FindTaskIdByFunc(sub_8149DFC) == 0xFF ) + { + BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); + if (!--sSecondaryTilesetCBBufferSize) + sSecondaryTilesetCB = NULL; + } +} diff --git a/sym_bss.txt b/sym_bss.txt index 16f14da51..3416b67df 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -17,6 +17,7 @@ gUnknown_03000000: @ 3000000 .include "src/field_camera.o" .include "src/script.o" .include "src/scrcmd.o" + .include "src/tileset_anims.o" .include "src/palette.o" .include "src/sound.o" diff --git a/sym_ewram.txt b/sym_ewram.txt index 8549f1679..7848dcc7c 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -747,6 +747,7 @@ gUnknown_02037621: @ 2037621 gUnknown_02037622: @ 2037622 .space 0x2 + .include "src/tileset_anims.o" .include "src/palette.o" .include "src/sound.o" From 74951e4312b782b81324999a580bdf25fe4d31ce Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 2 Oct 2017 08:43:52 -0400 Subject: [PATCH 338/342] Name pointer tables --- asm/rom4.s | 2 +- data/tileset.s | 71 ++++++++++---------- src/tileset_anims.c | 160 ++++++++++++++++++++++---------------------- 3 files changed, 116 insertions(+), 117 deletions(-) diff --git a/asm/rom4.s b/asm/rom4.s index 5250659e7..8423d0d9a 100644 --- a/asm/rom4.s +++ b/asm/rom4.s @@ -3640,7 +3640,7 @@ VBlankCB_Field: @ 8086390 bl sub_80BA0A8 bl FieldUpdateBgTilemapScroll bl TransferPlttBuffer - bl sub_80A09D0 + bl TransferTilesetAnimsBuffer pop {r0} bx r0 thumb_func_end VBlankCB_Field diff --git a/data/tileset.s b/data/tileset.s index 0acb50e91..b8a0ca77f 100644 --- a/data/tileset.s +++ b/data/tileset.s @@ -15,7 +15,7 @@ gUnknown_085106C4:: .space 0x20 -gUnknown_08510764:: @ 8510764 +gTilesetAnims_General0:: @ 8510764 @ replacing .incbin "baserom.gba", 0x00510764, 0x10 .4byte gUnknown_08510644 .4byte gUnknown_085105C4 @@ -47,7 +47,7 @@ gUnknown_085121B4:: .incbin "baserom.gba", 0x5121b4, 0x3c0 -gUnknown_08512574:: @ 8512574 +gTilesetAnims_General1:: @ 8512574 @ replacing .incbin "baserom.gba", 0x00512574, 0x20 .4byte gUnknown_08510774 .4byte gUnknown_08510B34 @@ -80,7 +80,7 @@ gUnknown_08512D14:: .incbin "baserom.gba", 0x512d14, 0x140 -gUnknown_08512E54:: @ 8512E54 +gTilesetAnims_General2:: @ 8512E54 @ replacing .incbin "baserom.gba", 0x00512e54, 0x20 .4byte gUnknown_08512594 .4byte gUnknown_085126D4 @@ -104,7 +104,7 @@ gUnknown_085130B4:: .incbin "baserom.gba", 0x5130b4, 0xc0 -gUnknown_08513174:: @ 8513174 +gTilesetAnims_General3:: @ 8513174 @ replacing .incbin "baserom.gba", 0x00513174, 0x10 .4byte gUnknown_08512E74 .4byte gUnknown_08512F34 @@ -124,7 +124,7 @@ gUnknown_08513544:: .incbin "baserom.gba", 0x513544, 0x140 -gUnknown_08513684:: @ 8513684 +gTilesetAnims_General4:: @ 8513684 @ replacing .incbin "baserom.gba", 0x00513684, 0x10 .4byte gUnknown_08513184 .4byte gUnknown_085132C4 @@ -144,7 +144,7 @@ gUnknown_08513814:: .incbin "baserom.gba", 0x513814, 0x80 -gUnknown_08513894:: @ 8513894 +gTilesetAnims_Lavaridge0:: @ 8513894 @ replacing .incbin "baserom.gba", 0x00513894, 0x10 .4byte gUnknown_08513694 .4byte gUnknown_08513714 @@ -161,7 +161,7 @@ gUnknown_08514024:: .incbin "baserom.gba", 0x514024, 0x3c0 -gUnknown_085143E4:: @ 85143E4 +gTilesetAnims_Pacifidlog0:: @ 85143E4 @ replacing .incbin "baserom.gba", 0x005143e4, 0x10 .4byte gUnknown_085138A4 .4byte gUnknown_08513C64 @@ -181,7 +181,7 @@ gUnknown_08514574:: .incbin "baserom.gba", 0x514574, 0x80 -gUnknown_085145F4:: @ 85145F4 +gTilesetAnims_Underwater0:: @ 85145F4 @ replacing .incbin "baserom.gba", 0x005145f4, 0x10 .4byte gUnknown_085143F4 .4byte gUnknown_08514474 @@ -213,7 +213,7 @@ gUnknown_08514D04:: .incbin "baserom.gba", 0x514d04, 0x100 -gUnknown_08514E04:: @ 8514E04 +gTilesetAnims_Pacifidlog1:: @ 8514E04 @ replacing .incbin "baserom.gba", 0x00514e04, 0x20 .4byte gUnknown_08514604 .4byte gUnknown_08514704 @@ -256,7 +256,7 @@ gUnknown_085152A4:: .space 0x20 -gUnknown_08515344:: @ 8515344 +gTilesetAnims_MauvilleVDests0:: @ 8515344 @ replacing .incbin "baserom.gba", 0x00515344, 0x20 .4byte BG_VRAM + 0x4c00 .4byte BG_VRAM + 0x4c80 @@ -267,7 +267,7 @@ gUnknown_08515344:: @ 8515344 .4byte BG_VRAM + 0x4f00 .4byte BG_VRAM + 0x4f80 -gUnknown_08515364:: @ 8515364 +gTilesetAnims_MauvilleVDests1:: @ 8515364 @ replacing .incbin "baserom.gba", 0x00515364, 0x20 .4byte BG_VRAM + 0x5000 .4byte BG_VRAM + 0x5080 @@ -278,7 +278,7 @@ gUnknown_08515364:: @ 8515364 .4byte BG_VRAM + 0x5300 .4byte BG_VRAM + 0x5380 -gUnknown_08515384:: @ 8515384 +gTilesetAnims_Mauville0a:: @ 8515384 @ replacing .incbin "baserom.gba", 0x00515384, 0x30 .4byte gUnknown_08514E24 .4byte gUnknown_08514E24 @@ -293,7 +293,7 @@ gUnknown_08515384:: @ 8515384 .4byte gUnknown_08514F24 .4byte gUnknown_08514EA4 -gUnknown_085153B4:: @ 85153B4 +gTilesetAnims_Mauville0b:: @ 85153B4 @ replacing .incbin "baserom.gba", 0x005153b4, 0x30 .4byte gUnknown_085150A4 .4byte gUnknown_085150A4 @@ -308,14 +308,14 @@ gUnknown_085153B4:: @ 85153B4 .4byte gUnknown_085151A4 .4byte gUnknown_08515124 -gUnknown_085153E4:: @ 85153E4 +gTilesetAnims_Mauville1a:: @ 85153E4 @ replacing .incbin "baserom.gba", 0x005153e4, 0x10 .4byte gUnknown_08514E24 .4byte gUnknown_08514E24 .4byte gUnknown_08515024 .4byte gUnknown_08515024 -gUnknown_085153F4:: @ 85153F4 +gTilesetAnims_Mauville1b:: @ 85153F4 @ replacing .incbin "baserom.gba", 0x005153f4, 0x10 .4byte gUnknown_085150A4 .4byte gUnknown_085150A4 @@ -347,7 +347,7 @@ gUnknown_08515784:: .incbin "baserom.gba", 0x515784, 0x80 -gUnknown_08515804:: @ 8515804 +gTilesetAnims_RustboroVDests0:: @ 8515804 .4byte BG_VRAM + 0x5000 .4byte BG_VRAM + 0x5080 .4byte BG_VRAM + 0x5100 @@ -357,7 +357,7 @@ gUnknown_08515804:: @ 8515804 .4byte BG_VRAM + 0x5300 .4byte BG_VRAM + 0x5380 -gUnknown_08515824:: @ 8515824 +gTilesetAnims_Rustboro0:: @ 8515824 @ replacing .incbin "baserom.gba", 0x00515824, 0x20 .4byte gUnknown_08515404 .4byte gUnknown_08515484 @@ -377,7 +377,7 @@ gUnknown_085158C4:: .space 0x20 -gUnknown_08515964:: @ 8515964 +gTilesetAnims_Rustboro1:: @ 8515964 @ replacing .incbin "baserom.gba", 0x00515964, 0x8 .4byte gUnknown_08515844 .4byte gUnknown_085158C4 @@ -409,7 +409,7 @@ gUnknown_08515CEC:: .space 0x20 -gUnknown_08515D8C:: @ 8515D8C +gTilesetAnims_Lavaridge1_Cave0:: @ 8515D8C @ replacing .incbin "baserom.gba", 0x00515d8c, 0x10 .4byte gUnknown_0851596C .4byte gUnknown_085159EC @@ -443,7 +443,7 @@ gUnknown_0851611C:: .space 0x20 -gUnknown_085161BC:: @ 85161BC +gTilesetAnims_EverGrandeVDests0:: @ 85161BC @ replacing .incbin "baserom.gba", 0x005161bc, 0x20 .4byte BG_VRAM + 0x5c00 .4byte BG_VRAM + 0x5c80 @@ -454,7 +454,7 @@ gUnknown_085161BC:: @ 85161BC .4byte BG_VRAM + 0x5f00 .4byte BG_VRAM + 0x5f80 -gUnknown_085161DC:: @ 85161DC +gTilesetAnims_EverGrande0:: @ 85161DC @ replacing .incbin "baserom.gba", 0x005161dc, 0x20 .4byte gUnknown_08515D9C .4byte gUnknown_08515E1C @@ -478,7 +478,7 @@ gUnknown_0851643C:: .incbin "baserom.gba", 0x51643c, 0xc0 -gUnknown_085164FC:: @ 85164FC +gTilesetAnims_Dewford0:: @ 85164FC @ replacing .incbin "baserom.gba", 0x005164fc, 0x10 .4byte gUnknown_085161FC .4byte gUnknown_085162BC @@ -498,7 +498,7 @@ gUnknown_0851674C:: .incbin "baserom.gba", 0x51674c, 0xc0 -gUnknown_0851680C:: @ 851680C +gTilesetAnims_BattleFrontierOutsideWest0:: @ 851680C @ replacing .incbin "baserom.gba", 0x0051680c, 0x10 .4byte gUnknown_0851650C .4byte gUnknown_085165CC @@ -518,7 +518,7 @@ gUnknown_08516A5C:: .incbin "baserom.gba", 0x516a5c, 0xc0 -gUnknown_08516B1C:: @ 8516B1C +gTilesetAnims_BattleFrontierOutsideEast0:: @ 8516B1C @ replacing .incbin "baserom.gba", 0x00516b1c, 0x10 .4byte gUnknown_0851681C .4byte gUnknown_085168DC @@ -538,7 +538,7 @@ gUnknown_08516CAC:: .incbin "baserom.gba", 0x516cac, 0x80 -gUnknown_08516D2C:: @ 8516D2C +gTilesetAnims_Slateport0:: @ 8516D2C @ replacing .incbin "baserom.gba", 0x00516d2c, 0x10 .4byte gUnknown_08516B2C .4byte gUnknown_08516BAC @@ -552,7 +552,7 @@ gUnknown_08516DBC:: .incbin "baserom.gba", 0x516dbc, 0x80 -gUnknown_08516E3C:: @ 8516E3C +gTilesetAnims_InsideBuilding0:: @ 8516E3C @ replacing .incbin "baserom.gba", 0x00516e3c, 0x8 .4byte gUnknown_08516D3C .4byte gUnknown_08516DBC @@ -576,13 +576,13 @@ gUnknown_085177C4:: .incbin "baserom.gba", 0x5177c4, 0x280 -gUnknown_08517A44:: @ 8517A44 +gTilesetAnims_SootopolisGym0:: @ 8517A44 @ replacing .incbin "baserom.gba", 0x00517a44, 0xc .4byte gUnknown_08516E44 .4byte gUnknown_08516FC4 .4byte gUnknown_08517144 -gUnknown_08517A50:: @ 8517A50 +gTilesetAnims_SootopolisGym1:: @ 8517A50 @ replacing .incbin "baserom.gba", 0x00517a50, 0xc .4byte gUnknown_085172C4 .4byte gUnknown_08517544 @@ -609,14 +609,14 @@ gUnknown_08517BBC:: .space 0x20 -gUnknown_08517BFC:: @ 8517BFC +gTilesetAnims_EliteFour1:: @ 8517BFC @ replacing .incbin "baserom.gba", 0x00517bfc, 0x10 .4byte gUnknown_08517B5C .4byte gUnknown_08517B7C .4byte gUnknown_08517B9C .4byte gUnknown_08517BBC -gUnknown_08517C0C:: @ 8517C0C +gTilesetAnims_EliteFour0:: @ 8517C0C @ replacing .incbin "baserom.gba", 0x00517c0c, 0x8 .4byte gUnknown_08517A5C .4byte gUnknown_08517ADC @@ -630,7 +630,7 @@ gUnknown_08517E14:: .space 0x20 -gUnknown_08518034:: @ 8518034 +gTilesetAnims_MauvilleGym0:: @ 8518034 @ replacing .incbin "baserom.gba", 0x00518034, 0x8 .4byte gUnknown_08517C14 .4byte gUnknown_08517E14 @@ -643,7 +643,7 @@ gUnknown_0851815C:: .space 0x20 -gUnknown_0851829C:: @ 851829C +gTilesetAnims_BikeShop0:: @ 851829C @ replacing .incbin "baserom.gba", 0x0051829c, 0x8 .4byte gUnknown_0851803C .4byte gUnknown_0851815C @@ -686,7 +686,7 @@ gUnknown_0851F2C4:: gUnknown_0851FAC4:: .incbin "baserom.gba", 0x51fac4, 0x800 -gUnknown_085202C4:: @ 85202C4 +gTilesetAnims_Sootopolis0:: @ 85202C4 @ replacing .incbin "baserom.gba", 0x005202c4, 0x20 .4byte gUnknown_085182A4 .4byte gUnknown_08518EA4 @@ -727,14 +727,13 @@ gUnknown_08524604:: gUnknown_08524804:: .incbin "baserom.gba", 0x524804, 0x60 - -gUnknown_08524864:: @ 8524864 +gTilesetAnims_BattlePyramid0:: @ 8524864 @ replacing .incbin "baserom.gba", 0x00524864, 0xc .4byte gUnknown_085202E4 .4byte gUnknown_085203E4 .4byte gUnknown_085204E4 -gUnknown_08524870:: @ 8524870 +gTilesetAnims_BattlePyramid1:: @ 8524870 @ replacing .incbin "baserom.gba", 0x00524870, 0xc .4byte gUnknown_08520604 .4byte gUnknown_08520704 diff --git a/src/tileset_anims.c b/src/tileset_anims.c index 5eb470a07..b7f18d869 100644 --- a/src/tileset_anims.c +++ b/src/tileset_anims.c @@ -31,48 +31,48 @@ static void cur_mapheader_run_tileset2_func(void); // .rodata -extern const u16 *const gUnknown_08510764[]; -extern const u16 *const gUnknown_08512574[]; -extern const u16 *const gUnknown_08512E54[]; -extern const u16 *const gUnknown_08513174[]; -extern const u16 *const gUnknown_08513684[]; -extern const u16 *const gUnknown_08513894[]; -extern const u16 *const gUnknown_085143E4[]; -extern const u16 *const gUnknown_085145F4[]; -extern const u16 *const gUnknown_08514E04[]; -extern u16 *const gUnknown_08515344[]; -extern u16 *const gUnknown_08515364[]; -extern const u16 *const gUnknown_08515384[]; -extern const u16 *const gUnknown_085153B4[]; -extern const u16 *const gUnknown_085153E4[]; -extern const u16 *const gUnknown_085153F4[]; -extern u16 *const gUnknown_08515804[]; -extern const u16 *const gUnknown_08515824[]; -extern const u16 *const gUnknown_08515964[]; -extern const u16 *const gUnknown_08515D8C[]; -extern u16 *const gUnknown_085161BC[]; -extern const u16 *const gUnknown_085161DC[]; -extern const u16 *const gUnknown_085164FC[]; -extern const u16 *const gUnknown_0851680C[]; -extern const u16 *const gUnknown_08516B1C[]; -extern const u16 *const gUnknown_08516D2C[]; -extern const u16 *const gUnknown_08516E3C[]; -extern const u16 *const gUnknown_08517A44[]; -extern const u16 *const gUnknown_08517A50[]; -extern const u16 *const gUnknown_08517BFC[]; -extern const u16 *const gUnknown_08517C0C[]; -extern const u16 *const gUnknown_08518034[]; -extern const u16 *const gUnknown_0851829C[]; -extern const u16 *const gUnknown_085202C4[]; -extern const u16 *const gUnknown_08524864[]; -extern const u16 *const gUnknown_08524870[]; +extern const u16 *const gTilesetAnims_General0[]; +extern const u16 *const gTilesetAnims_General1[]; +extern const u16 *const gTilesetAnims_General2[]; +extern const u16 *const gTilesetAnims_General3[]; +extern const u16 *const gTilesetAnims_General4[]; +extern const u16 *const gTilesetAnims_Lavaridge0[]; +extern const u16 *const gTilesetAnims_Pacifidlog0[]; +extern const u16 *const gTilesetAnims_Underwater0[]; +extern const u16 *const gTilesetAnims_Pacifidlog1[]; +extern u16 *const gTilesetAnims_MauvilleVDests0[]; +extern u16 *const gTilesetAnims_MauvilleVDests1[]; +extern const u16 *const gTilesetAnims_Mauville0a[]; +extern const u16 *const gTilesetAnims_Mauville0b[]; +extern const u16 *const gTilesetAnims_Mauville1a[]; +extern const u16 *const gTilesetAnims_Mauville1b[]; +extern u16 *const gTilesetAnims_RustboroVDests0[]; +extern const u16 *const gTilesetAnims_Rustboro0[]; +extern const u16 *const gTilesetAnims_Rustboro1[]; +extern const u16 *const gTilesetAnims_Lavaridge1_Cave0[]; +extern u16 *const gTilesetAnims_EverGrandeVDests0[]; +extern const u16 *const gTilesetAnims_EverGrande0[]; +extern const u16 *const gTilesetAnims_Dewford0[]; +extern const u16 *const gTilesetAnims_BattleFrontierOutsideWest0[]; +extern const u16 *const gTilesetAnims_BattleFrontierOutsideEast0[]; +extern const u16 *const gTilesetAnims_Slateport0[]; +extern const u16 *const gTilesetAnims_InsideBuilding0[]; +extern const u16 *const gTilesetAnims_SootopolisGym0[]; +extern const u16 *const gTilesetAnims_SootopolisGym1[]; +extern const u16 *const gTilesetAnims_EliteFour1[]; +extern const u16 *const gTilesetAnims_EliteFour0[]; +extern const u16 *const gTilesetAnims_MauvilleGym0[]; +extern const u16 *const gTilesetAnims_BikeShop0[]; +extern const u16 *const gTilesetAnims_Sootopolis0[]; +extern const u16 *const gTilesetAnims_BattlePyramid0[]; +extern const u16 *const gTilesetAnims_BattlePyramid1[]; extern const u16 gUnknown_08D85640[]; extern const u16 gUnknown_08D85660[]; extern const u16 gUnknown_08D85680[]; extern const u16 gUnknown_08D856A0[]; -static const u16 *const gUnknown_0852487C[] = { +static const u16 *const gTilesetAnims_BattleDomePals0[] = { gUnknown_08D85640, gUnknown_08D85660, gUnknown_08D85680, @@ -81,24 +81,24 @@ static const u16 *const gUnknown_0852487C[] = { // .text -static void sub_80A0954(void) +static void ResetTilesetAnimBuffer(void) { sTilesetDMA3TransferBufferSize = 0; CpuFill32(0, sTilesetDMA3TransferBuffer, sizeof sTilesetDMA3TransferBuffer); } -static void sub_80A0980(const u16 *a0, u16 *a1, u16 a2) +static void AppendTilesetAnimToBuffer(const u16 *src, u16 *dest, u16 size) { if (sTilesetDMA3TransferBufferSize < 20) { - sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].src = a0; - sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].dest = a1; - sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].size = a2; + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].src = src; + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].dest = dest; + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].size = size; sTilesetDMA3TransferBufferSize ++; } } -void sub_80A09D0(void) +void TransferTilesetAnimsBuffer(void) { int i; @@ -111,7 +111,7 @@ void sub_80A09D0(void) void cur_mapheader_run_tileset_funcs_after_some_cpuset(void) { - sub_80A0954(); + ResetTilesetAnimBuffer(); cur_mapheader_run_tileset1_func(); cur_mapheader_run_tileset2_func(); } @@ -123,7 +123,7 @@ void sub_80A0A2C(void) void sub_80A0A38(void) { - sub_80A0954(); + ResetTilesetAnimBuffer(); if (++sPrimaryTilesetCBCounter >= sPrimaryTilesetCBBufferSize) sPrimaryTilesetCBCounter = 0; if (++sSecondaryTilesetCBCounter >= sSecondaryTilesetCBBufferSize) @@ -203,7 +203,7 @@ static void sub_80A0BCC(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08510764[idx], (u16 *)(BG_VRAM + 0x3F80), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_General0[idx], (u16 *)(BG_VRAM + 0x3F80), 0x80); } static void sub_80A0BF4(u16 timer) @@ -211,7 +211,7 @@ static void sub_80A0BF4(u16 timer) u8 idx; idx = timer % 8; - sub_80A0980(gUnknown_08512574[idx], (u16 *)(BG_VRAM + 0x3600), 0x3C0); + AppendTilesetAnimToBuffer(gTilesetAnims_General1[idx], (u16 *)(BG_VRAM + 0x3600), 0x3C0); } static void sub_80A0C1C(u16 timer) @@ -219,7 +219,7 @@ static void sub_80A0C1C(u16 timer) u16 idx; idx = timer % 8; - sub_80A0980(gUnknown_08512E54[idx], (u16 *)(BG_VRAM + 0x3a00), 0x140); + AppendTilesetAnimToBuffer(gTilesetAnims_General2[idx], (u16 *)(BG_VRAM + 0x3a00), 0x140); } static void sub_80A0C44(u16 timer) @@ -227,7 +227,7 @@ static void sub_80A0C44(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08513174[idx], (u16 *)(BG_VRAM + 0x3e00), 0xc0); + AppendTilesetAnimToBuffer(gTilesetAnims_General3[idx], (u16 *)(BG_VRAM + 0x3e00), 0xc0); } void TilesetCb_Petalburg(void) @@ -580,7 +580,7 @@ static void sub_80A12AC(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08513684[idx], (u16 *)(BG_VRAM + 0x3c00), 0x140); + AppendTilesetAnimToBuffer(gTilesetAnims_General4[idx], (u16 *)(BG_VRAM + 0x3c00), 0x140); } static void sub_80A12D4(u8 timer) @@ -588,10 +588,10 @@ static void sub_80A12D4(u8 timer) u8 idx; idx = timer % 4; - sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6400), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge0[idx], (u16 *)(BG_VRAM + 0x6400), 0x80); idx = (timer + 2) % 4; - sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6480), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge0[idx], (u16 *)(BG_VRAM + 0x6480), 0x80); } static void sub_80A131C(u8 timer) @@ -599,7 +599,7 @@ static void sub_80A131C(u8 timer) u8 idx; idx = timer % 4; - sub_80A0980(gUnknown_085143E4[idx], (u16 *)(BG_VRAM + 0x7a00), 0x3C0); + AppendTilesetAnimToBuffer(gTilesetAnims_Pacifidlog0[idx], (u16 *)(BG_VRAM + 0x7a00), 0x3C0); } static void sub_80A1344(u8 timer) @@ -607,7 +607,7 @@ static void sub_80A1344(u8 timer) u8 idx; idx = timer % 4; - sub_80A0980(gUnknown_085145F4[idx], (u16 *)(BG_VRAM + 0x7e00), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Underwater0[idx], (u16 *)(BG_VRAM + 0x7e00), 0x80); } static void sub_80A136C(u8 timer) @@ -615,7 +615,7 @@ static void sub_80A136C(u8 timer) u8 idx; idx = timer % 8; - sub_80A0980(gUnknown_08514E04[idx], (u16 *)(BG_VRAM + 0x7e00), 0x100); + AppendTilesetAnimToBuffer(gTilesetAnims_Pacifidlog1[idx], (u16 *)(BG_VRAM + 0x7e00), 0x100); } static void sub_80A1394(u16 timer_div, u8 timer_mod) @@ -624,14 +624,14 @@ static void sub_80A1394(u16 timer_div, u8 timer_mod) if (timer_div < 12) // almost certainly a typo { timer_div %= 12; - sub_80A0980(gUnknown_08515384[timer_div], gUnknown_08515344[timer_mod], 0x80); - sub_80A0980(gUnknown_085153B4[timer_div], gUnknown_08515364[timer_mod], 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Mauville0a[timer_div], gTilesetAnims_MauvilleVDests0[timer_mod], 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Mauville0b[timer_div], gTilesetAnims_MauvilleVDests1[timer_mod], 0x80); } else { timer_div %= 4; - sub_80A0980(gUnknown_085153E4[timer_div], gUnknown_08515344[timer_mod], 0x80); - sub_80A0980(gUnknown_085153F4[timer_div], gUnknown_08515364[timer_mod], 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Mauville1a[timer_div], gTilesetAnims_MauvilleVDests0[timer_mod], 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Mauville1b[timer_div], gTilesetAnims_MauvilleVDests1[timer_mod], 0x80); } } @@ -639,8 +639,8 @@ static void sub_80A1434(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; timer_div %= 8; - if (gUnknown_08515824[timer_div]) - sub_80A0980(gUnknown_08515824[timer_div], gUnknown_08515804[timer_mod], 0x80); + if (gTilesetAnims_Rustboro0[timer_div]) + AppendTilesetAnimToBuffer(gTilesetAnims_Rustboro0[timer_div], gTilesetAnims_RustboroVDests0[timer_mod], 0x80); } static void sub_80A1470(u16 timer) @@ -648,7 +648,7 @@ static void sub_80A1470(u16 timer) u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08515964[idx], (u16 *)(BG_VRAM + 0x7800), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Rustboro1[idx], (u16 *)(BG_VRAM + 0x7800), 0x80); } static void sub_80A1498(u16 timer) @@ -656,7 +656,7 @@ static void sub_80A1498(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x5400), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge1_Cave0[idx], (u16 *)(BG_VRAM + 0x5400), 0x80); } static void sub_80A14C0(u16 timer_div, u8 timer_mod) @@ -664,7 +664,7 @@ static void sub_80A14C0(u16 timer_div, u8 timer_mod) timer_div -= timer_mod; timer_div %= 8; - sub_80A0980(gUnknown_085161DC[timer_div], gUnknown_085161BC[timer_mod], 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_EverGrande0[timer_div], gTilesetAnims_EverGrandeVDests0[timer_mod], 0x80); } static void sub_80A14F8(u16 timer) @@ -672,7 +672,7 @@ static void sub_80A14F8(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x7400), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge1_Cave0[idx], (u16 *)(BG_VRAM + 0x7400), 0x80); } static void sub_80A1520(u16 timer) @@ -680,7 +680,7 @@ static void sub_80A1520(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_085164FC[idx], (u16 *)(BG_VRAM + 0x5540), 0xC0); + AppendTilesetAnimToBuffer(gTilesetAnims_Dewford0[idx], (u16 *)(BG_VRAM + 0x5540), 0xC0); } static void sub_80A1548(u16 timer) @@ -688,7 +688,7 @@ static void sub_80A1548(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_0851680C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); + AppendTilesetAnimToBuffer(gTilesetAnims_BattleFrontierOutsideWest0[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); } static void sub_80A1570(u16 timer) @@ -696,7 +696,7 @@ static void sub_80A1570(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08516B1C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); + AppendTilesetAnimToBuffer(gTilesetAnims_BattleFrontierOutsideEast0[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); } static void sub_80A1598(u16 timer) @@ -704,7 +704,7 @@ static void sub_80A1598(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08516D2C[idx], (u16 *)(BG_VRAM + 0x5c00), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Slateport0[idx], (u16 *)(BG_VRAM + 0x5c00), 0x80); } static void sub_80A15C0(u16 timer) @@ -774,7 +774,7 @@ static void sub_80A1688(u16 timer) u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08516E3C[idx], (u16 *)(BG_VRAM + 0x3e00), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_InsideBuilding0[idx], (u16 *)(BG_VRAM + 0x3e00), 0x80); } static void sub_80A16B0(u16 timer) @@ -782,8 +782,8 @@ static void sub_80A16B0(u16 timer) u16 idx; idx = timer % 3; - sub_80A0980(gUnknown_08517A44[idx], (u16 *)(BG_VRAM + 0x7e00), 0x180); - sub_80A0980(gUnknown_08517A50[idx], (u16 *)(BG_VRAM + 0x7a00), 0x280); + AppendTilesetAnimToBuffer(gTilesetAnims_SootopolisGym0[idx], (u16 *)(BG_VRAM + 0x7e00), 0x180); + AppendTilesetAnimToBuffer(gTilesetAnims_SootopolisGym1[idx], (u16 *)(BG_VRAM + 0x7a00), 0x280); } static void sub_80A16F8(u16 timer) @@ -791,7 +791,7 @@ static void sub_80A16F8(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08517BFC[idx], (u16 *)(BG_VRAM + 0x7f00), 0x20); + AppendTilesetAnimToBuffer(gTilesetAnims_EliteFour1[idx], (u16 *)(BG_VRAM + 0x7f00), 0x20); } static void sub_80A1720(u16 timer) @@ -799,7 +799,7 @@ static void sub_80A1720(u16 timer) u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08517C0C[idx], (u16 *)(BG_VRAM + 0x7c00), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_EliteFour0[idx], (u16 *)(BG_VRAM + 0x7c00), 0x80); } static void sub_80A1748(u16 timer) @@ -807,7 +807,7 @@ static void sub_80A1748(u16 timer) u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08518034[idx], (u16 *)(BG_VRAM + 0x5200), 0x200); + AppendTilesetAnimToBuffer(gTilesetAnims_MauvilleGym0[idx], (u16 *)(BG_VRAM + 0x5200), 0x200); } static void sub_80A1770(u16 timer) @@ -815,7 +815,7 @@ static void sub_80A1770(u16 timer) u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_0851829C[idx], (u16 *)(BG_VRAM + 0x7e00), 0x120); + AppendTilesetAnimToBuffer(gTilesetAnims_BikeShop0[idx], (u16 *)(BG_VRAM + 0x7e00), 0x120); } static void sub_80A1798(u16 timer) @@ -823,7 +823,7 @@ static void sub_80A1798(u16 timer) u16 idx; idx = timer % 8; - sub_80A0980(gUnknown_085202C4[idx], (u16 *)(BG_VRAM + 0x5e00), 0xc00); + AppendTilesetAnimToBuffer(gTilesetAnims_Sootopolis0[idx], (u16 *)(BG_VRAM + 0x5e00), 0xc00); } static void sub_80A17C0(u16 timer) @@ -831,7 +831,7 @@ static void sub_80A17C0(u16 timer) u16 idx; idx = timer % 3; - sub_80A0980(gUnknown_08524864[idx], (u16 *)(BG_VRAM + 0x52e0), 0x100); + AppendTilesetAnimToBuffer(gTilesetAnims_BattlePyramid0[idx], (u16 *)(BG_VRAM + 0x52e0), 0x100); } static void sub_80A17EC(u16 timer) @@ -839,12 +839,12 @@ static void sub_80A17EC(u16 timer) u16 idx; idx = timer % 3; - sub_80A0980(gUnknown_08524870[idx], (u16 *)(BG_VRAM + 0x50e0), 0x100); + AppendTilesetAnimToBuffer(gTilesetAnims_BattlePyramid1[idx], (u16 *)(BG_VRAM + 0x50e0), 0x100); } static void sub_80A1818(u16 a1) { - CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); + CpuCopy16(gTilesetAnims_BattleDomePals0[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); if ((u8)FindTaskIdByFunc(sub_8149DFC) != 0xFF ) { @@ -855,7 +855,7 @@ static void sub_80A1818(u16 a1) static void sub_80A1884(u16 a1) { - CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); + CpuCopy16(gTilesetAnims_BattleDomePals0[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); if ((u8)FindTaskIdByFunc(sub_8149DFC) == 0xFF ) { BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); From d43b6227bb5a81a4479ad0ecc33d661910c85d74 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 2 Oct 2017 20:53:58 -0400 Subject: [PATCH 339/342] Rip tileset anims --- data/tileset.s | 304 ++++++++---------- data/tilesets/primary/building/anim/0.png | Bin 0 -> 141 bytes data/tilesets/primary/building/anim/1.png | Bin 0 -> 144 bytes data/tilesets/primary/general/anim/0/0.png | Bin 0 -> 183 bytes data/tilesets/primary/general/anim/0/1.png | Bin 0 -> 182 bytes data/tilesets/primary/general/anim/0/2.png | Bin 0 -> 183 bytes data/tilesets/primary/general/anim/1/0.png | Bin 0 -> 518 bytes data/tilesets/primary/general/anim/1/1.png | Bin 0 -> 581 bytes data/tilesets/primary/general/anim/1/2.png | Bin 0 -> 534 bytes data/tilesets/primary/general/anim/1/3.png | Bin 0 -> 527 bytes data/tilesets/primary/general/anim/1/4.png | Bin 0 -> 461 bytes data/tilesets/primary/general/anim/1/5.png | Bin 0 -> 460 bytes data/tilesets/primary/general/anim/1/6.png | Bin 0 -> 480 bytes data/tilesets/primary/general/anim/1/7.png | Bin 0 -> 521 bytes data/tilesets/primary/general/anim/2/0.png | Bin 0 -> 194 bytes data/tilesets/primary/general/anim/2/1.png | Bin 0 -> 243 bytes data/tilesets/primary/general/anim/2/2.png | Bin 0 -> 262 bytes data/tilesets/primary/general/anim/2/3.png | Bin 0 -> 280 bytes data/tilesets/primary/general/anim/2/4.png | Bin 0 -> 232 bytes data/tilesets/primary/general/anim/2/5.png | Bin 0 -> 220 bytes data/tilesets/primary/general/anim/2/6.png | Bin 0 -> 203 bytes data/tilesets/primary/general/anim/3/0.png | Bin 0 -> 136 bytes data/tilesets/primary/general/anim/3/1.png | Bin 0 -> 154 bytes data/tilesets/primary/general/anim/3/2.png | Bin 0 -> 133 bytes data/tilesets/primary/general/anim/3/3.png | Bin 0 -> 130 bytes data/tilesets/primary/general/anim/4/0.png | Bin 0 -> 304 bytes data/tilesets/primary/general/anim/4/1.png | Bin 0 -> 311 bytes data/tilesets/primary/general/anim/4/2.png | Bin 0 -> 314 bytes data/tilesets/primary/general/anim/4/3.png | Bin 0 -> 328 bytes data/tilesets/primary/general/tiles.png | Bin 7587 -> 7786 bytes .../primary/inside_building/tiles.png | Bin 1556 -> 1813 bytes data/tilesets/primary/secret_base/tiles.png | Bin 7136 -> 7869 bytes .../primary/secret_base/unknown_tiles.png | Bin 1212 -> 1316 bytes .../tilesets/secondary/battle_arena/tiles.png | Bin 2067 -> 2340 bytes data/tilesets/secondary/battle_dome/tiles.png | Bin 3193 -> 3626 bytes .../secondary/battle_factory/tiles.png | Bin 3313 -> 3694 bytes .../secondary/battle_frontier/tiles.png | Bin 2368 -> 2647 bytes .../battle_frontier_outside_east/anim/0.png | Bin 0 -> 191 bytes .../battle_frontier_outside_east/anim/1.png | Bin 0 -> 188 bytes .../battle_frontier_outside_east/anim/2.png | Bin 0 -> 185 bytes .../battle_frontier_outside_east/anim/3.png | Bin 0 -> 183 bytes .../battle_frontier_outside_east/tiles.png | Bin 3750 -> 3834 bytes .../battle_frontier_outside_west/anim/0.png | Bin 0 -> 191 bytes .../battle_frontier_outside_west/anim/1.png | Bin 0 -> 188 bytes .../battle_frontier_outside_west/anim/2.png | Bin 0 -> 185 bytes .../battle_frontier_outside_west/anim/3.png | Bin 0 -> 183 bytes .../battle_frontier_outside_west/tiles.png | Bin 5505 -> 5892 bytes .../battle_frontier_ranking_hall/tiles.png | Bin 1451 -> 1700 bytes .../secondary/battle_palace/tiles.png | Bin 1513 -> 1633 bytes data/tilesets/secondary/battle_pike/tiles.png | Bin 3922 -> 4013 bytes .../secondary/battle_pyramid/anim/0/0.png | Bin 0 -> 228 bytes .../secondary/battle_pyramid/anim/0/1.png | Bin 0 -> 220 bytes .../secondary/battle_pyramid/anim/0/2.png | Bin 0 -> 219 bytes .../secondary/battle_pyramid/anim/1/0.png | Bin 0 -> 261 bytes .../secondary/battle_pyramid/anim/1/1.png | Bin 0 -> 267 bytes .../secondary/battle_pyramid/anim/1/2.png | Bin 0 -> 261 bytes .../secondary/battle_pyramid/anim/1/3.png | Bin 0 -> 105 bytes .../secondary/battle_pyramid/anim/1/4.png | Bin 0 -> 86 bytes .../secondary/battle_pyramid/anim/1/5.png | Bin 0 -> 86 bytes .../secondary/battle_pyramid/anim/1/6.png | Bin 0 -> 106 bytes .../secondary/battle_pyramid/anim/1/7.png | Bin 0 -> 393 bytes .../secondary/battle_pyramid/anim/1/8.png | Bin 0 -> 105 bytes .../secondary/battle_pyramid/anim/1/9.png | Bin 0 -> 111 bytes .../secondary/battle_pyramid/tiles.png | Bin 3208 -> 3504 bytes data/tilesets/secondary/battle_tent/tiles.png | Bin 1696 -> 2084 bytes data/tilesets/secondary/bike_shop/anim/0.png | Bin 0 -> 250 bytes data/tilesets/secondary/bike_shop/anim/1.png | Bin 0 -> 249 bytes data/tilesets/secondary/bike_shop/anim/2.png | Bin 0 -> 219 bytes data/tilesets/secondary/bike_shop/tiles.png | Bin 3270 -> 3505 bytes .../secondary/brendans_mays_house/tiles.png | Bin 2616 -> 3074 bytes data/tilesets/secondary/cable_club/tiles.png | Bin 2445 -> 2590 bytes .../secondary/cable_club/unknown_tiles.png | Bin 287 -> 311 bytes data/tilesets/secondary/cave/anim/0.png | Bin 0 -> 100 bytes data/tilesets/secondary/cave/anim/1.png | Bin 0 -> 126 bytes data/tilesets/secondary/cave/anim/2.png | Bin 0 -> 108 bytes data/tilesets/secondary/cave/anim/3.png | Bin 0 -> 109 bytes .../tilesets/secondary/cave/anim/unused/0.png | Bin 0 -> 100 bytes .../tilesets/secondary/cave/anim/unused/1.png | Bin 0 -> 121 bytes .../tilesets/secondary/cave/anim/unused/2.png | Bin 0 -> 108 bytes .../tilesets/secondary/cave/anim/unused/3.png | Bin 0 -> 105 bytes data/tilesets/secondary/cave/tiles.png | Bin 5767 -> 5884 bytes data/tilesets/secondary/contest/tiles.png | Bin 1638 -> 1650 bytes data/tilesets/secondary/dewford/anim/0.png | Bin 0 -> 185 bytes data/tilesets/secondary/dewford/anim/1.png | Bin 0 -> 185 bytes data/tilesets/secondary/dewford/anim/2.png | Bin 0 -> 185 bytes data/tilesets/secondary/dewford/anim/3.png | Bin 0 -> 192 bytes data/tilesets/secondary/dewford/tiles.png | Bin 3756 -> 3985 bytes data/tilesets/secondary/dewford_gym/tiles.png | Bin 598 -> 640 bytes .../secondary/elite_four/anim/0/0.png | Bin 0 -> 91 bytes .../secondary/elite_four/anim/0/1.png | Bin 0 -> 91 bytes .../secondary/elite_four/anim/0/2.png | Bin 0 -> 91 bytes .../secondary/elite_four/anim/0/3.png | Bin 0 -> 91 bytes .../secondary/elite_four/anim/1/0.png | Bin 0 -> 135 bytes .../secondary/elite_four/anim/1/1.png | Bin 0 -> 72 bytes .../secondary/elite_four/anim/1/2.png | Bin 0 -> 1260 bytes .../secondary/elite_four/anim/1/3.png | Bin 0 -> 1184 bytes .../secondary/elite_four/anim/1/4.png | Bin 0 -> 1190 bytes .../secondary/elite_four/anim/1/5.png | Bin 0 -> 1248 bytes .../secondary/elite_four/anim/1/6.png | Bin 0 -> 1161 bytes .../secondary/elite_four/anim/1/7.png | Bin 0 -> 1153 bytes data/tilesets/secondary/elite_four/tiles.png | Bin 2826 -> 2876 bytes .../tilesets/secondary/ever_grande/anim/0.png | Bin 0 -> 204 bytes .../tilesets/secondary/ever_grande/anim/1.png | Bin 0 -> 204 bytes .../tilesets/secondary/ever_grande/anim/2.png | Bin 0 -> 197 bytes .../tilesets/secondary/ever_grande/anim/3.png | Bin 0 -> 200 bytes .../tilesets/secondary/ever_grande/anim/4.png | Bin 0 -> 204 bytes .../tilesets/secondary/ever_grande/anim/5.png | Bin 0 -> 204 bytes .../tilesets/secondary/ever_grande/anim/6.png | Bin 0 -> 201 bytes .../tilesets/secondary/ever_grande/anim/7.png | Bin 0 -> 201 bytes data/tilesets/secondary/ever_grande/tiles.png | Bin 2088 -> 2208 bytes data/tilesets/secondary/facility/tiles.png | Bin 5753 -> 6352 bytes data/tilesets/secondary/fallarbor/tiles.png | Bin 4602 -> 4781 bytes data/tilesets/secondary/fortree/tiles.png | Bin 4364 -> 4342 bytes data/tilesets/secondary/fortree_gym/tiles.png | Bin 771 -> 770 bytes .../secondary/generic_building/tiles.png | Bin 4949 -> 5607 bytes .../secondary/inside_of_truck/tiles.png | Bin 514 -> 545 bytes data/tilesets/secondary/inside_ship/tiles.png | Bin 2016 -> 2149 bytes .../secondary/island_harbor/tiles.png | Bin 5093 -> 5639 bytes data/tilesets/secondary/lab/tiles.png | Bin 2592 -> 2844 bytes data/tilesets/secondary/lavaridge/anim/0.png | Bin 0 -> 83 bytes data/tilesets/secondary/lavaridge/anim/1.png | Bin 0 -> 92 bytes data/tilesets/secondary/lavaridge/anim/2.png | Bin 0 -> 88 bytes data/tilesets/secondary/lavaridge/anim/3.png | Bin 0 -> 100 bytes data/tilesets/secondary/lavaridge/tiles.png | Bin 4087 -> 4215 bytes .../secondary/lavaridge_gym/tiles.png | Bin 631 -> 713 bytes data/tilesets/secondary/lilycove/tiles.png | Bin 3597 -> 3912 bytes .../secondary/lilycove_museum/tiles.png | Bin 3345 -> 3938 bytes .../secondary/mauville/anim/0/a/0.png | Bin 0 -> 177 bytes .../secondary/mauville/anim/0/a/1.png | Bin 0 -> 175 bytes .../secondary/mauville/anim/0/a/2.png | Bin 0 -> 171 bytes .../secondary/mauville/anim/0/a/3.png | Bin 0 -> 160 bytes .../secondary/mauville/anim/0/a/4.png | Bin 0 -> 178 bytes .../secondary/mauville/anim/0/a/5.png | Bin 0 -> 177 bytes .../secondary/mauville/anim/0/a/6.png | Bin 0 -> 175 bytes .../secondary/mauville/anim/0/a/7.png | Bin 0 -> 171 bytes .../secondary/mauville/anim/0/a/8.png | Bin 0 -> 160 bytes .../secondary/mauville/anim/0/a/9.png | Bin 0 -> 178 bytes .../secondary/mauville/anim/0/b/0.png | Bin 0 -> 177 bytes .../secondary/mauville/anim/0/b/1.png | Bin 0 -> 175 bytes .../secondary/mauville/anim/0/b/2.png | Bin 0 -> 171 bytes .../secondary/mauville/anim/0/b/3.png | Bin 0 -> 160 bytes .../secondary/mauville/anim/0/b/4.png | Bin 0 -> 72 bytes .../secondary/mauville/anim/0/b/5.png | Bin 0 -> 72 bytes .../secondary/mauville/anim/0/b/6.png | Bin 0 -> 72 bytes .../secondary/mauville/anim/0/b/7.png | Bin 0 -> 72 bytes .../secondary/mauville/anim/1/a/0.png | Bin 0 -> 177 bytes .../secondary/mauville/anim/1/a/1.png | Bin 0 -> 178 bytes .../secondary/mauville/anim/1/a/2.png | Bin 0 -> 171 bytes .../secondary/mauville/anim/1/a/3.png | Bin 0 -> 160 bytes .../secondary/mauville/anim/1/b/0.png | Bin 0 -> 177 bytes .../secondary/mauville/anim/1/b/1.png | Bin 0 -> 178 bytes .../secondary/mauville/anim/1/b/2.png | Bin 0 -> 171 bytes .../secondary/mauville/anim/1/b/3.png | Bin 0 -> 160 bytes .../secondary/mauville/anim/1/b/4.png | Bin 0 -> 100 bytes .../secondary/mauville/anim/1/b/5.png | Bin 0 -> 121 bytes .../secondary/mauville/anim/1/b/6.png | Bin 0 -> 108 bytes .../secondary/mauville/anim/1/b/7.png | Bin 0 -> 105 bytes data/tilesets/secondary/mauville/tiles.png | Bin 6019 -> 6372 bytes .../secondary/mauville_game_corner/tiles.png | Bin 1567 -> 1788 bytes .../secondary/mauville_gym/anim/0.png | Bin 0 -> 215 bytes .../secondary/mauville_gym/anim/1.png | Bin 0 -> 218 bytes .../secondary/mauville_gym/anim/2.png | Bin 0 -> 106 bytes .../secondary/mauville_gym/anim/3.png | Bin 0 -> 393 bytes .../tilesets/secondary/mauville_gym/tiles.png | Bin 1454 -> 1534 bytes .../tilesets/secondary/meteor_falls/tiles.png | Bin 5968 -> 6078 bytes .../tilesets/secondary/mirage_tower/tiles.png | Bin 5561 -> 5645 bytes data/tilesets/secondary/mossdeep/tiles.png | Bin 4060 -> 4269 bytes .../secondary/mossdeep_game_corner/tiles.png | Bin 838 -> 893 bytes .../tilesets/secondary/mossdeep_gym/tiles.png | Bin 927 -> 969 bytes .../secondary/mystery_events_house/tiles.png | Bin 4799 -> 5383 bytes data/tilesets/secondary/navel_rock/tiles.png | Bin 5966 -> 6073 bytes .../secondary/oceanic_museum/tiles.png | Bin 2662 -> 3219 bytes .../secondary/pacifidlog/anim/0/0.png | Bin 0 -> 596 bytes .../secondary/pacifidlog/anim/0/1.png | Bin 0 -> 603 bytes .../secondary/pacifidlog/anim/0/2.png | Bin 0 -> 625 bytes .../secondary/pacifidlog/anim/1/0.png | Bin 0 -> 198 bytes .../secondary/pacifidlog/anim/1/1.png | Bin 0 -> 219 bytes .../secondary/pacifidlog/anim/1/2.png | Bin 0 -> 241 bytes .../secondary/pacifidlog/anim/1/3.png | Bin 0 -> 213 bytes .../secondary/pacifidlog/anim/1/4.png | Bin 0 -> 138 bytes .../secondary/pacifidlog/anim/1/5.png | Bin 0 -> 140 bytes .../secondary/pacifidlog/anim/1/6.png | Bin 0 -> 138 bytes .../secondary/pacifidlog/anim/1/7.png | Bin 0 -> 200 bytes data/tilesets/secondary/pacifidlog/tiles.png | Bin 4688 -> 4812 bytes data/tilesets/secondary/petalburg/tiles.png | Bin 1689 -> 1910 bytes .../secondary/petalburg_gym/tiles.png | Bin 1222 -> 1429 bytes .../secondary/pokemon_center/tiles.png | Bin 3461 -> 3645 bytes .../secondary/pokemon_day_care/tiles.png | Bin 1451 -> 1528 bytes .../secondary/pokemon_fan_club/tiles.png | Bin 1242 -> 1373 bytes .../secondary/pokemon_school/tiles.png | Bin 980 -> 1027 bytes .../pretty_petal_flower_shop/tiles.png | Bin 1839 -> 1951 bytes data/tilesets/secondary/rustboro/anim/0/0.png | Bin 0 -> 119 bytes data/tilesets/secondary/rustboro/anim/0/1.png | Bin 0 -> 113 bytes data/tilesets/secondary/rustboro/anim/0/2.png | Bin 0 -> 72 bytes data/tilesets/secondary/rustboro/anim/0/3.png | Bin 0 -> 72 bytes data/tilesets/secondary/rustboro/anim/0/4.png | Bin 0 -> 72 bytes data/tilesets/secondary/rustboro/anim/0/5.png | Bin 0 -> 72 bytes data/tilesets/secondary/rustboro/anim/0/6.png | Bin 0 -> 72 bytes data/tilesets/secondary/rustboro/anim/0/7.png | Bin 0 -> 72 bytes data/tilesets/secondary/rustboro/anim/1/0.png | Bin 0 -> 201 bytes data/tilesets/secondary/rustboro/anim/1/1.png | Bin 0 -> 198 bytes data/tilesets/secondary/rustboro/anim/1/2.png | Bin 0 -> 185 bytes data/tilesets/secondary/rustboro/anim/1/3.png | Bin 0 -> 192 bytes data/tilesets/secondary/rustboro/tiles.png | Bin 3903 -> 4108 bytes .../tilesets/secondary/rustboro_gym/tiles.png | Bin 759 -> 768 bytes .../secondary/rusturf_tunnel/tiles.png | Bin 2127 -> 2228 bytes .../secondary/seashore_house/tiles.png | Bin 1105 -> 1280 bytes .../secondary/secret_base/blue_cave/tiles.png | Bin 904 -> 905 bytes .../secret_base/blue_cave/unused_tiles.png | Bin 0 -> 903 bytes .../secret_base/brown_cave/tiles.png | Bin 1070 -> 1166 bytes .../secret_base/brown_cave/unused_tiles.png | Bin 0 -> 1163 bytes .../secondary/secret_base/red_cave/tiles.png | Bin 941 -> 941 bytes .../secret_base/red_cave/unused_tiles.png | Bin 0 -> 938 bytes .../secondary/secret_base/shrub/tiles.png | Bin 1090 -> 1177 bytes .../secret_base/shrub/unused_tiles.png | Bin 0 -> 1173 bytes .../secondary/secret_base/tree/tiles.png | Bin 1056 -> 1098 bytes .../secret_base/tree/unused_tiles.png | Bin 0 -> 1095 bytes .../secret_base/yellow_cave/tiles.png | Bin 1127 -> 1127 bytes .../secret_base/yellow_cave/unused_tiles.png | Bin 0 -> 1125 bytes data/tilesets/secondary/shop/tiles.png | Bin 3872 -> 4416 bytes data/tilesets/secondary/slateport/anim/0.png | Bin 0 -> 179 bytes data/tilesets/secondary/slateport/anim/1.png | Bin 0 -> 181 bytes data/tilesets/secondary/slateport/anim/2.png | Bin 0 -> 179 bytes data/tilesets/secondary/slateport/anim/3.png | Bin 0 -> 181 bytes data/tilesets/secondary/slateport/tiles.png | Bin 6528 -> 6985 bytes data/tilesets/secondary/sootopolis/anim/0.png | Bin 0 -> 1201 bytes data/tilesets/secondary/sootopolis/anim/1.png | Bin 0 -> 1262 bytes data/tilesets/secondary/sootopolis/anim/2.png | Bin 0 -> 1260 bytes data/tilesets/secondary/sootopolis/anim/3.png | Bin 0 -> 1184 bytes data/tilesets/secondary/sootopolis/anim/4.png | Bin 0 -> 1190 bytes data/tilesets/secondary/sootopolis/anim/5.png | Bin 0 -> 1248 bytes data/tilesets/secondary/sootopolis/anim/6.png | Bin 0 -> 1161 bytes data/tilesets/secondary/sootopolis/anim/7.png | Bin 0 -> 1153 bytes data/tilesets/secondary/sootopolis/tiles.png | Bin 2674 -> 2950 bytes .../secondary/sootopolis_gym/anim/0/0.png | Bin 0 -> 286 bytes .../secondary/sootopolis_gym/anim/0/1.png | Bin 0 -> 283 bytes .../secondary/sootopolis_gym/anim/0/2.png | Bin 0 -> 294 bytes .../secondary/sootopolis_gym/anim/0/3.png | Bin 0 -> 91 bytes .../secondary/sootopolis_gym/anim/1/0.png | Bin 0 -> 389 bytes .../secondary/sootopolis_gym/anim/1/1.png | Bin 0 -> 408 bytes .../secondary/sootopolis_gym/anim/1/2.png | Bin 0 -> 399 bytes .../secondary/sootopolis_gym/tiles.png | Bin 2780 -> 2954 bytes .../tilesets/secondary/trainer_hill/tiles.png | Bin 3311 -> 3594 bytes .../secondary/trick_house_puzzle/tiles.png | Bin 2567 -> 2797 bytes data/tilesets/secondary/underwater/anim/0.png | Bin 0 -> 180 bytes data/tilesets/secondary/underwater/anim/1.png | Bin 0 -> 183 bytes data/tilesets/secondary/underwater/anim/2.png | Bin 0 -> 185 bytes data/tilesets/secondary/underwater/anim/3.png | Bin 0 -> 184 bytes data/tilesets/secondary/underwater/tiles.png | Bin 2988 -> 2846 bytes data/tilesets/secondary/union_room/tiles.png | Bin 1710 -> 1817 bytes data/tilesets/secondary/unused_1/0.png | Bin 0 -> 86 bytes data/tilesets/secondary/unused_1/1.png | Bin 0 -> 86 bytes data/tilesets/secondary/unused_1/2.png | Bin 0 -> 106 bytes data/tilesets/secondary/unused_1/3.png | Bin 0 -> 393 bytes data/tilesets/secondary/unused_1/tiles.png | Bin 80 -> 77 bytes data/tilesets/secondary/unused_2/0.png | Bin 0 -> 105 bytes data/tilesets/secondary/unused_2/1.png | Bin 0 -> 111 bytes data/tilesets/secondary/unused_2/2.png | Bin 0 -> 108 bytes data/tilesets/secondary/unused_2/3.png | Bin 0 -> 105 bytes data/tilesets/secondary/unused_2/tiles.png | Bin 864 -> 979 bytes 260 files changed, 135 insertions(+), 169 deletions(-) create mode 100644 data/tilesets/primary/building/anim/0.png create mode 100644 data/tilesets/primary/building/anim/1.png create mode 100644 data/tilesets/primary/general/anim/0/0.png create mode 100644 data/tilesets/primary/general/anim/0/1.png create mode 100644 data/tilesets/primary/general/anim/0/2.png create mode 100644 data/tilesets/primary/general/anim/1/0.png create mode 100644 data/tilesets/primary/general/anim/1/1.png create mode 100644 data/tilesets/primary/general/anim/1/2.png create mode 100644 data/tilesets/primary/general/anim/1/3.png create mode 100644 data/tilesets/primary/general/anim/1/4.png create mode 100644 data/tilesets/primary/general/anim/1/5.png create mode 100644 data/tilesets/primary/general/anim/1/6.png create mode 100644 data/tilesets/primary/general/anim/1/7.png create mode 100644 data/tilesets/primary/general/anim/2/0.png create mode 100644 data/tilesets/primary/general/anim/2/1.png create mode 100644 data/tilesets/primary/general/anim/2/2.png create mode 100644 data/tilesets/primary/general/anim/2/3.png create mode 100644 data/tilesets/primary/general/anim/2/4.png create mode 100644 data/tilesets/primary/general/anim/2/5.png create mode 100644 data/tilesets/primary/general/anim/2/6.png create mode 100644 data/tilesets/primary/general/anim/3/0.png create mode 100644 data/tilesets/primary/general/anim/3/1.png create mode 100644 data/tilesets/primary/general/anim/3/2.png create mode 100644 data/tilesets/primary/general/anim/3/3.png create mode 100644 data/tilesets/primary/general/anim/4/0.png create mode 100644 data/tilesets/primary/general/anim/4/1.png create mode 100644 data/tilesets/primary/general/anim/4/2.png create mode 100644 data/tilesets/primary/general/anim/4/3.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_east/anim/0.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_east/anim/1.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_east/anim/2.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_east/anim/3.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_west/anim/0.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_west/anim/1.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_west/anim/2.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_west/anim/3.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/0/0.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/0/1.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/0/2.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/0.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/1.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/2.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/3.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/4.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/5.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/6.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/7.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/8.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/9.png create mode 100644 data/tilesets/secondary/bike_shop/anim/0.png create mode 100644 data/tilesets/secondary/bike_shop/anim/1.png create mode 100644 data/tilesets/secondary/bike_shop/anim/2.png create mode 100644 data/tilesets/secondary/cave/anim/0.png create mode 100644 data/tilesets/secondary/cave/anim/1.png create mode 100644 data/tilesets/secondary/cave/anim/2.png create mode 100644 data/tilesets/secondary/cave/anim/3.png create mode 100644 data/tilesets/secondary/cave/anim/unused/0.png create mode 100644 data/tilesets/secondary/cave/anim/unused/1.png create mode 100644 data/tilesets/secondary/cave/anim/unused/2.png create mode 100644 data/tilesets/secondary/cave/anim/unused/3.png create mode 100644 data/tilesets/secondary/dewford/anim/0.png create mode 100644 data/tilesets/secondary/dewford/anim/1.png create mode 100644 data/tilesets/secondary/dewford/anim/2.png create mode 100644 data/tilesets/secondary/dewford/anim/3.png create mode 100644 data/tilesets/secondary/elite_four/anim/0/0.png create mode 100644 data/tilesets/secondary/elite_four/anim/0/1.png create mode 100644 data/tilesets/secondary/elite_four/anim/0/2.png create mode 100644 data/tilesets/secondary/elite_four/anim/0/3.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/0.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/1.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/2.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/3.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/4.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/5.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/6.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/7.png create mode 100644 data/tilesets/secondary/ever_grande/anim/0.png create mode 100644 data/tilesets/secondary/ever_grande/anim/1.png create mode 100644 data/tilesets/secondary/ever_grande/anim/2.png create mode 100644 data/tilesets/secondary/ever_grande/anim/3.png create mode 100644 data/tilesets/secondary/ever_grande/anim/4.png create mode 100644 data/tilesets/secondary/ever_grande/anim/5.png create mode 100644 data/tilesets/secondary/ever_grande/anim/6.png create mode 100644 data/tilesets/secondary/ever_grande/anim/7.png create mode 100644 data/tilesets/secondary/lavaridge/anim/0.png create mode 100644 data/tilesets/secondary/lavaridge/anim/1.png create mode 100644 data/tilesets/secondary/lavaridge/anim/2.png create mode 100644 data/tilesets/secondary/lavaridge/anim/3.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/0.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/1.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/2.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/3.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/4.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/5.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/6.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/7.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/8.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/9.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/0.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/1.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/2.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/3.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/4.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/5.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/6.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/7.png create mode 100644 data/tilesets/secondary/mauville/anim/1/a/0.png create mode 100644 data/tilesets/secondary/mauville/anim/1/a/1.png create mode 100644 data/tilesets/secondary/mauville/anim/1/a/2.png create mode 100644 data/tilesets/secondary/mauville/anim/1/a/3.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/0.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/1.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/2.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/3.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/4.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/5.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/6.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/7.png create mode 100644 data/tilesets/secondary/mauville_gym/anim/0.png create mode 100644 data/tilesets/secondary/mauville_gym/anim/1.png create mode 100644 data/tilesets/secondary/mauville_gym/anim/2.png create mode 100644 data/tilesets/secondary/mauville_gym/anim/3.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/0/0.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/0/1.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/0/2.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/0.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/1.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/2.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/3.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/4.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/5.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/6.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/7.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/0.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/1.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/2.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/3.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/4.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/5.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/6.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/7.png create mode 100644 data/tilesets/secondary/rustboro/anim/1/0.png create mode 100644 data/tilesets/secondary/rustboro/anim/1/1.png create mode 100644 data/tilesets/secondary/rustboro/anim/1/2.png create mode 100644 data/tilesets/secondary/rustboro/anim/1/3.png create mode 100644 data/tilesets/secondary/secret_base/blue_cave/unused_tiles.png create mode 100644 data/tilesets/secondary/secret_base/brown_cave/unused_tiles.png create mode 100644 data/tilesets/secondary/secret_base/red_cave/unused_tiles.png create mode 100644 data/tilesets/secondary/secret_base/shrub/unused_tiles.png create mode 100644 data/tilesets/secondary/secret_base/tree/unused_tiles.png create mode 100644 data/tilesets/secondary/secret_base/yellow_cave/unused_tiles.png create mode 100644 data/tilesets/secondary/slateport/anim/0.png create mode 100644 data/tilesets/secondary/slateport/anim/1.png create mode 100644 data/tilesets/secondary/slateport/anim/2.png create mode 100644 data/tilesets/secondary/slateport/anim/3.png create mode 100644 data/tilesets/secondary/sootopolis/anim/0.png create mode 100644 data/tilesets/secondary/sootopolis/anim/1.png create mode 100644 data/tilesets/secondary/sootopolis/anim/2.png create mode 100644 data/tilesets/secondary/sootopolis/anim/3.png create mode 100644 data/tilesets/secondary/sootopolis/anim/4.png create mode 100644 data/tilesets/secondary/sootopolis/anim/5.png create mode 100644 data/tilesets/secondary/sootopolis/anim/6.png create mode 100644 data/tilesets/secondary/sootopolis/anim/7.png create mode 100644 data/tilesets/secondary/sootopolis_gym/anim/0/0.png create mode 100644 data/tilesets/secondary/sootopolis_gym/anim/0/1.png create mode 100644 data/tilesets/secondary/sootopolis_gym/anim/0/2.png create mode 100644 data/tilesets/secondary/sootopolis_gym/anim/0/3.png create mode 100644 data/tilesets/secondary/sootopolis_gym/anim/1/0.png create mode 100644 data/tilesets/secondary/sootopolis_gym/anim/1/1.png create mode 100644 data/tilesets/secondary/sootopolis_gym/anim/1/2.png create mode 100644 data/tilesets/secondary/underwater/anim/0.png create mode 100644 data/tilesets/secondary/underwater/anim/1.png create mode 100644 data/tilesets/secondary/underwater/anim/2.png create mode 100644 data/tilesets/secondary/underwater/anim/3.png create mode 100644 data/tilesets/secondary/unused_1/0.png create mode 100644 data/tilesets/secondary/unused_1/1.png create mode 100644 data/tilesets/secondary/unused_1/2.png create mode 100644 data/tilesets/secondary/unused_1/3.png create mode 100644 data/tilesets/secondary/unused_2/0.png create mode 100644 data/tilesets/secondary/unused_2/1.png create mode 100644 data/tilesets/secondary/unused_2/2.png create mode 100644 data/tilesets/secondary/unused_2/3.png diff --git a/data/tileset.s b/data/tileset.s index b8a0ca77f..0ca02d41c 100644 --- a/data/tileset.s +++ b/data/tileset.s @@ -5,50 +5,48 @@ .align 2, 0 gUnknown_085105C4:: - .incbin "baserom.gba", 0x5105c4, 0x80 + .incbin "data/tilesets/primary/general/anim/0/1.4bpp" gUnknown_08510644:: - .incbin "baserom.gba", 0x510644, 0x80 + .incbin "data/tilesets/primary/general/anim/0/0.4bpp" gUnknown_085106C4:: - .incbin "baserom.gba", 0x5106c4, 0x80 + .incbin "data/tilesets/primary/general/anim/0/2.4bpp" .space 0x20 gTilesetAnims_General0:: @ 8510764 -@ replacing .incbin "baserom.gba", 0x00510764, 0x10 .4byte gUnknown_08510644 .4byte gUnknown_085105C4 .4byte gUnknown_08510644 .4byte gUnknown_085106C4 gUnknown_08510774:: - .incbin "baserom.gba", 0x510774, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/0.4bpp" gUnknown_08510B34:: - .incbin "baserom.gba", 0x510b34, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/1.4bpp" gUnknown_08510EF4:: - .incbin "baserom.gba", 0x510ef4, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/2.4bpp" gUnknown_085112B4:: - .incbin "baserom.gba", 0x5112b4, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/3.4bpp" gUnknown_08511674:: - .incbin "baserom.gba", 0x511674, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/4.4bpp" gUnknown_08511A34:: - .incbin "baserom.gba", 0x511a34, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/5.4bpp" gUnknown_08511DF4:: - .incbin "baserom.gba", 0x511df4, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/6.4bpp" gUnknown_085121B4:: - .incbin "baserom.gba", 0x5121b4, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/7.4bpp" gTilesetAnims_General1:: @ 8512574 -@ replacing .incbin "baserom.gba", 0x00512574, 0x20 .4byte gUnknown_08510774 .4byte gUnknown_08510B34 .4byte gUnknown_08510EF4 @@ -59,29 +57,28 @@ gTilesetAnims_General1:: @ 8512574 .4byte gUnknown_085121B4 gUnknown_08512594:: - .incbin "baserom.gba", 0x512594, 0x140 + .incbin "data/tilesets/primary/general/anim/2/0.4bpp" gUnknown_085126D4:: - .incbin "baserom.gba", 0x5126d4, 0x140 + .incbin "data/tilesets/primary/general/anim/2/1.4bpp" gUnknown_08512814:: - .incbin "baserom.gba", 0x512814, 0x140 + .incbin "data/tilesets/primary/general/anim/2/2.4bpp" gUnknown_08512954:: - .incbin "baserom.gba", 0x512954, 0x140 + .incbin "data/tilesets/primary/general/anim/2/3.4bpp" gUnknown_08512A94:: - .incbin "baserom.gba", 0x512a94, 0x140 + .incbin "data/tilesets/primary/general/anim/2/4.4bpp" gUnknown_08512BD4:: - .incbin "baserom.gba", 0x512bd4, 0x140 + .incbin "data/tilesets/primary/general/anim/2/5.4bpp" gUnknown_08512D14:: - .incbin "baserom.gba", 0x512d14, 0x140 + .incbin "data/tilesets/primary/general/anim/2/6.4bpp" gTilesetAnims_General2:: @ 8512E54 -@ replacing .incbin "baserom.gba", 0x00512e54, 0x20 .4byte gUnknown_08512594 .4byte gUnknown_085126D4 .4byte gUnknown_08512814 @@ -92,129 +89,123 @@ gTilesetAnims_General2:: @ 8512E54 .4byte gUnknown_08512594 gUnknown_08512E74:: - .incbin "baserom.gba", 0x512e74, 0xc0 + .incbin "data/tilesets/primary/general/anim/3/0.4bpp" gUnknown_08512F34:: - .incbin "baserom.gba", 0x512f34, 0xc0 + .incbin "data/tilesets/primary/general/anim/3/1.4bpp" gUnknown_08512FF4:: - .incbin "baserom.gba", 0x512ff4, 0xc0 + .incbin "data/tilesets/primary/general/anim/3/2.4bpp" gUnknown_085130B4:: - .incbin "baserom.gba", 0x5130b4, 0xc0 + .incbin "data/tilesets/primary/general/anim/3/3.4bpp" gTilesetAnims_General3:: @ 8513174 -@ replacing .incbin "baserom.gba", 0x00513174, 0x10 .4byte gUnknown_08512E74 .4byte gUnknown_08512F34 .4byte gUnknown_08512FF4 .4byte gUnknown_085130B4 gUnknown_08513184:: - .incbin "baserom.gba", 0x513184, 0x140 + .incbin "data/tilesets/primary/general/anim/4/0.4bpp" gUnknown_085132C4:: - .incbin "baserom.gba", 0x5132c4, 0x140 + .incbin "data/tilesets/primary/general/anim/4/1.4bpp" gUnknown_08513404:: - .incbin "baserom.gba", 0x513404, 0x140 + .incbin "data/tilesets/primary/general/anim/4/2.4bpp" gUnknown_08513544:: - .incbin "baserom.gba", 0x513544, 0x140 + .incbin "data/tilesets/primary/general/anim/4/3.4bpp" gTilesetAnims_General4:: @ 8513684 -@ replacing .incbin "baserom.gba", 0x00513684, 0x10 .4byte gUnknown_08513184 .4byte gUnknown_085132C4 .4byte gUnknown_08513404 .4byte gUnknown_08513544 gUnknown_08513694:: - .incbin "baserom.gba", 0x513694, 0x80 + .incbin "data/tilesets/secondary/lavaridge/anim/0.4bpp" gUnknown_08513714:: - .incbin "baserom.gba", 0x513714, 0x80 + .incbin "data/tilesets/secondary/lavaridge/anim/1.4bpp" gUnknown_08513794:: - .incbin "baserom.gba", 0x513794, 0x80 + .incbin "data/tilesets/secondary/lavaridge/anim/2.4bpp" gUnknown_08513814:: - .incbin "baserom.gba", 0x513814, 0x80 + .incbin "data/tilesets/secondary/lavaridge/anim/3.4bpp" gTilesetAnims_Lavaridge0:: @ 8513894 -@ replacing .incbin "baserom.gba", 0x00513894, 0x10 .4byte gUnknown_08513694 .4byte gUnknown_08513714 .4byte gUnknown_08513794 .4byte gUnknown_08513814 gUnknown_085138A4:: - .incbin "baserom.gba", 0x5138a4, 0x3c0 + .incbin "data/tilesets/secondary/pacifidlog/anim/0/0.4bpp" gUnknown_08513C64:: - .incbin "baserom.gba", 0x513c64, 0x3c0 + .incbin "data/tilesets/secondary/pacifidlog/anim/0/1.4bpp" gUnknown_08514024:: - .incbin "baserom.gba", 0x514024, 0x3c0 + .incbin "data/tilesets/secondary/pacifidlog/anim/0/2.4bpp" gTilesetAnims_Pacifidlog0:: @ 85143E4 -@ replacing .incbin "baserom.gba", 0x005143e4, 0x10 .4byte gUnknown_085138A4 .4byte gUnknown_08513C64 .4byte gUnknown_08514024 .4byte gUnknown_08513C64 gUnknown_085143F4:: - .incbin "baserom.gba", 0x5143f4, 0x80 + .incbin "data/tilesets/secondary/underwater/anim/0.4bpp" gUnknown_08514474:: - .incbin "baserom.gba", 0x514474, 0x80 + .incbin "data/tilesets/secondary/underwater/anim/1.4bpp" gUnknown_085144F4:: - .incbin "baserom.gba", 0x5144f4, 0x80 + .incbin "data/tilesets/secondary/underwater/anim/2.4bpp" gUnknown_08514574:: - .incbin "baserom.gba", 0x514574, 0x80 + .incbin "data/tilesets/secondary/underwater/anim/3.4bpp" gTilesetAnims_Underwater0:: @ 85145F4 -@ replacing .incbin "baserom.gba", 0x005145f4, 0x10 .4byte gUnknown_085143F4 .4byte gUnknown_08514474 .4byte gUnknown_085144F4 .4byte gUnknown_08514574 gUnknown_08514604:: - .incbin "baserom.gba", 0x514604, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/0.4bpp" gUnknown_08514704:: - .incbin "baserom.gba", 0x514704, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/1.4bpp" gUnknown_08514804:: - .incbin "baserom.gba", 0x514804, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/2.4bpp" gUnknown_08514904:: - .incbin "baserom.gba", 0x514904, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/3.4bpp" gUnknown_08514A04:: - .incbin "baserom.gba", 0x514a04, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/4.4bpp" gUnknown_08514B04:: - .incbin "baserom.gba", 0x514b04, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/5.4bpp" gUnknown_08514C04:: - .incbin "baserom.gba", 0x514c04, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/6.4bpp" gUnknown_08514D04:: - .incbin "baserom.gba", 0x514d04, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/7.4bpp" gTilesetAnims_Pacifidlog1:: @ 8514E04 -@ replacing .incbin "baserom.gba", 0x00514e04, 0x20 .4byte gUnknown_08514604 .4byte gUnknown_08514704 .4byte gUnknown_08514804 @@ -225,39 +216,38 @@ gTilesetAnims_Pacifidlog1:: @ 8514E04 .4byte gUnknown_08514D04 gUnknown_08514E24:: - .incbin "baserom.gba", 0x514e24, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/a/0.4bpp" gUnknown_08514EA4:: - .incbin "baserom.gba", 0x514ea4, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/a/1.4bpp" gUnknown_08514F24:: - .incbin "baserom.gba", 0x514f24, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/a/2.4bpp" gUnknown_08514FA4:: - .incbin "baserom.gba", 0x514fa4, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/a/3.4bpp" gUnknown_08515024:: - .incbin "baserom.gba", 0x515024, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/1/a/1.4bpp" gUnknown_085150A4:: - .incbin "baserom.gba", 0x5150a4, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/b/0.4bpp" gUnknown_08515124:: - .incbin "baserom.gba", 0x515124, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/b/1.4bpp" gUnknown_085151A4:: - .incbin "baserom.gba", 0x5151a4, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/b/2.4bpp" gUnknown_08515224:: - .incbin "baserom.gba", 0x515224, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/b/3.4bpp" gUnknown_085152A4:: - .incbin "baserom.gba", 0x5152a4, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/1/b/1.4bpp" .space 0x20 gTilesetAnims_MauvilleVDests0:: @ 8515344 -@ replacing .incbin "baserom.gba", 0x00515344, 0x20 .4byte BG_VRAM + 0x4c00 .4byte BG_VRAM + 0x4c80 .4byte BG_VRAM + 0x4d00 @@ -268,7 +258,6 @@ gTilesetAnims_MauvilleVDests0:: @ 8515344 .4byte BG_VRAM + 0x4f80 gTilesetAnims_MauvilleVDests1:: @ 8515364 -@ replacing .incbin "baserom.gba", 0x00515364, 0x20 .4byte BG_VRAM + 0x5000 .4byte BG_VRAM + 0x5080 .4byte BG_VRAM + 0x5100 @@ -279,7 +268,6 @@ gTilesetAnims_MauvilleVDests1:: @ 8515364 .4byte BG_VRAM + 0x5380 gTilesetAnims_Mauville0a:: @ 8515384 -@ replacing .incbin "baserom.gba", 0x00515384, 0x30 .4byte gUnknown_08514E24 .4byte gUnknown_08514E24 .4byte gUnknown_08514EA4 @@ -294,7 +282,6 @@ gTilesetAnims_Mauville0a:: @ 8515384 .4byte gUnknown_08514EA4 gTilesetAnims_Mauville0b:: @ 85153B4 -@ replacing .incbin "baserom.gba", 0x005153b4, 0x30 .4byte gUnknown_085150A4 .4byte gUnknown_085150A4 .4byte gUnknown_08515124 @@ -309,42 +296,40 @@ gTilesetAnims_Mauville0b:: @ 85153B4 .4byte gUnknown_08515124 gTilesetAnims_Mauville1a:: @ 85153E4 -@ replacing .incbin "baserom.gba", 0x005153e4, 0x10 .4byte gUnknown_08514E24 .4byte gUnknown_08514E24 .4byte gUnknown_08515024 .4byte gUnknown_08515024 gTilesetAnims_Mauville1b:: @ 85153F4 -@ replacing .incbin "baserom.gba", 0x005153f4, 0x10 .4byte gUnknown_085150A4 .4byte gUnknown_085150A4 .4byte gUnknown_085152A4 .4byte gUnknown_085152A4 gUnknown_08515404:: - .incbin "baserom.gba", 0x515404, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/0.4bpp" gUnknown_08515484:: - .incbin "baserom.gba", 0x515484, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/1.4bpp" gUnknown_08515504:: - .incbin "baserom.gba", 0x515504, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/2.4bpp" gUnknown_08515584:: - .incbin "baserom.gba", 0x515584, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/3.4bpp" gUnknown_08515604:: - .incbin "baserom.gba", 0x515604, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/4.4bpp" gUnknown_08515684:: - .incbin "baserom.gba", 0x515684, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/5.4bpp" gUnknown_08515704:: - .incbin "baserom.gba", 0x515704, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/6.4bpp" gUnknown_08515784:: - .incbin "baserom.gba", 0x515784, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/7.4bpp" gTilesetAnims_RustboroVDests0:: @ 8515804 @@ -358,7 +343,6 @@ gTilesetAnims_RustboroVDests0:: @ 8515804 .4byte BG_VRAM + 0x5380 gTilesetAnims_Rustboro0:: @ 8515824 -@ replacing .incbin "baserom.gba", 0x00515824, 0x20 .4byte gUnknown_08515404 .4byte gUnknown_08515484 .4byte gUnknown_08515504 @@ -369,82 +353,79 @@ gTilesetAnims_Rustboro0:: @ 8515824 .4byte gUnknown_08515784 gUnknown_08515844:: - .incbin "baserom.gba", 0x515844, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/1/0.4bpp" gUnknown_085158C4:: - .incbin "baserom.gba", 0x5158c4, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/1/1.4bpp" .space 0x20 gTilesetAnims_Rustboro1:: @ 8515964 -@ replacing .incbin "baserom.gba", 0x00515964, 0x8 .4byte gUnknown_08515844 .4byte gUnknown_085158C4 gUnknown_0851596C:: - .incbin "baserom.gba", 0x51596c, 0x80 + .incbin "data/tilesets/secondary/cave/anim/0.4bpp" gUnknown_085159EC:: - .incbin "baserom.gba", 0x5159ec, 0x80 + .incbin "data/tilesets/secondary/cave/anim/1.4bpp" gUnknown_08515A6C:: - .incbin "baserom.gba", 0x515a6c, 0x80 + .incbin "data/tilesets/secondary/cave/anim/2.4bpp" gUnknown_08515AEC:: - .incbin "baserom.gba", 0x515aec, 0x80 + .incbin "data/tilesets/secondary/cave/anim/3.4bpp" gUnknown_08515B6C:: - .incbin "baserom.gba", 0x515b6c, 0x80 + .incbin "data/tilesets/secondary/cave/anim/unused/0.4bpp" gUnknown_08515BEC:: - .incbin "baserom.gba", 0x515bec, 0x80 + .incbin "data/tilesets/secondary/cave/anim/unused/1.4bpp" gUnknown_08515C6C:: - .incbin "baserom.gba", 0x515c6c, 0x80 + .incbin "data/tilesets/secondary/cave/anim/unused/2.4bpp" gUnknown_08515CEC:: - .incbin "baserom.gba", 0x515cec, 0x80 + .incbin "data/tilesets/secondary/cave/anim/unused/3.4bpp" .space 0x20 gTilesetAnims_Lavaridge1_Cave0:: @ 8515D8C -@ replacing .incbin "baserom.gba", 0x00515d8c, 0x10 .4byte gUnknown_0851596C .4byte gUnknown_085159EC .4byte gUnknown_08515A6C .4byte gUnknown_08515AEC gUnknown_08515D9C:: - .incbin "baserom.gba", 0x515d9c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/0.4bpp" gUnknown_08515E1C:: - .incbin "baserom.gba", 0x515e1c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/1.4bpp" gUnknown_08515E9C:: - .incbin "baserom.gba", 0x515e9c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/2.4bpp" gUnknown_08515F1C:: - .incbin "baserom.gba", 0x515f1c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/3.4bpp" gUnknown_08515F9C:: - .incbin "baserom.gba", 0x515f9c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/4.4bpp" gUnknown_0851601C:: - .incbin "baserom.gba", 0x51601c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/5.4bpp" gUnknown_0851609C:: - .incbin "baserom.gba", 0x51609c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/6.4bpp" gUnknown_0851611C:: - .incbin "baserom.gba", 0x51611c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/7.4bpp" .space 0x20 gTilesetAnims_EverGrandeVDests0:: @ 85161BC -@ replacing .incbin "baserom.gba", 0x005161bc, 0x20 .4byte BG_VRAM + 0x5c00 .4byte BG_VRAM + 0x5c80 .4byte BG_VRAM + 0x5d00 @@ -455,7 +436,6 @@ gTilesetAnims_EverGrandeVDests0:: @ 85161BC .4byte BG_VRAM + 0x5f80 gTilesetAnims_EverGrande0:: @ 85161DC -@ replacing .incbin "baserom.gba", 0x005161dc, 0x20 .4byte gUnknown_08515D9C .4byte gUnknown_08515E1C .4byte gUnknown_08515E9C @@ -466,228 +446,216 @@ gTilesetAnims_EverGrande0:: @ 85161DC .4byte gUnknown_0851611C gUnknown_085161FC:: - .incbin "baserom.gba", 0x5161fc, 0xc0 + .incbin "data/tilesets/secondary/dewford/anim/0.4bpp" gUnknown_085162BC:: - .incbin "baserom.gba", 0x5162bc, 0xc0 + .incbin "data/tilesets/secondary/dewford/anim/1.4bpp" gUnknown_0851637C:: - .incbin "baserom.gba", 0x51637c, 0xc0 + .incbin "data/tilesets/secondary/dewford/anim/2.4bpp" gUnknown_0851643C:: - .incbin "baserom.gba", 0x51643c, 0xc0 + .incbin "data/tilesets/secondary/dewford/anim/3.4bpp" gTilesetAnims_Dewford0:: @ 85164FC -@ replacing .incbin "baserom.gba", 0x005164fc, 0x10 .4byte gUnknown_085161FC .4byte gUnknown_085162BC .4byte gUnknown_0851637C .4byte gUnknown_0851643C gUnknown_0851650C:: - .incbin "baserom.gba", 0x51650c, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/0.4bpp" gUnknown_085165CC:: - .incbin "baserom.gba", 0x5165cc, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/1.4bpp" gUnknown_0851668C:: - .incbin "baserom.gba", 0x51668c, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/2.4bpp" gUnknown_0851674C:: - .incbin "baserom.gba", 0x51674c, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/3.4bpp" gTilesetAnims_BattleFrontierOutsideWest0:: @ 851680C -@ replacing .incbin "baserom.gba", 0x0051680c, 0x10 .4byte gUnknown_0851650C .4byte gUnknown_085165CC .4byte gUnknown_0851668C .4byte gUnknown_0851674C gUnknown_0851681C:: @ 851680C - .incbin "baserom.gba", 0x51681c, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/0.4bpp" gUnknown_085168DC:: - .incbin "baserom.gba", 0x5168dc, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/1.4bpp" gUnknown_0851699C:: - .incbin "baserom.gba", 0x51699c, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/2.4bpp" gUnknown_08516A5C:: - .incbin "baserom.gba", 0x516a5c, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/3.4bpp" gTilesetAnims_BattleFrontierOutsideEast0:: @ 8516B1C -@ replacing .incbin "baserom.gba", 0x00516b1c, 0x10 .4byte gUnknown_0851681C .4byte gUnknown_085168DC .4byte gUnknown_0851699C .4byte gUnknown_08516A5C gUnknown_08516B2C:: - .incbin "baserom.gba", 0x516b2c, 0x80 + .incbin "data/tilesets/secondary/slateport/anim/0.4bpp" gUnknown_08516BAC:: - .incbin "baserom.gba", 0x516bac, 0x80 + .incbin "data/tilesets/secondary/slateport/anim/1.4bpp" gUnknown_08516C2C:: - .incbin "baserom.gba", 0x516c2c, 0x80 + .incbin "data/tilesets/secondary/slateport/anim/2.4bpp" gUnknown_08516CAC:: - .incbin "baserom.gba", 0x516cac, 0x80 + .incbin "data/tilesets/secondary/slateport/anim/3.4bpp" gTilesetAnims_Slateport0:: @ 8516D2C -@ replacing .incbin "baserom.gba", 0x00516d2c, 0x10 .4byte gUnknown_08516B2C .4byte gUnknown_08516BAC .4byte gUnknown_08516C2C .4byte gUnknown_08516CAC gUnknown_08516D3C:: - .incbin "baserom.gba", 0x516d3c, 0x80 + .incbin "data/tilesets/primary/building/anim/0.4bpp" gUnknown_08516DBC:: - .incbin "baserom.gba", 0x516dbc, 0x80 + .incbin "data/tilesets/primary/building/anim/1.4bpp" gTilesetAnims_InsideBuilding0:: @ 8516E3C -@ replacing .incbin "baserom.gba", 0x00516e3c, 0x8 .4byte gUnknown_08516D3C .4byte gUnknown_08516DBC gUnknown_08516E44:: - .incbin "baserom.gba", 0x516e44, 0x180 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/0.4bpp" gUnknown_08516FC4:: - .incbin "baserom.gba", 0x516fc4, 0x180 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/1.4bpp" gUnknown_08517144:: - .incbin "baserom.gba", 0x517144, 0x180 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/2.4bpp" gUnknown_085172C4:: - .incbin "baserom.gba", 0x5172c4, 0x280 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/0.4bpp" gUnknown_08517544:: - .incbin "baserom.gba", 0x517544, 0x280 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/1.4bpp" gUnknown_085177C4:: - .incbin "baserom.gba", 0x5177c4, 0x280 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/2.4bpp" gTilesetAnims_SootopolisGym0:: @ 8517A44 -@ replacing .incbin "baserom.gba", 0x00517a44, 0xc .4byte gUnknown_08516E44 .4byte gUnknown_08516FC4 .4byte gUnknown_08517144 gTilesetAnims_SootopolisGym1:: @ 8517A50 -@ replacing .incbin "baserom.gba", 0x00517a50, 0xc .4byte gUnknown_085172C4 .4byte gUnknown_08517544 .4byte gUnknown_085177C4 gUnknown_08517A5C:: - .incbin "baserom.gba", 0x517a5c, 0x80 + .incbin "data/tilesets/secondary/elite_four/anim/1/0.4bpp" gUnknown_08517ADC:: - .incbin "baserom.gba", 0x517adc, 0x80 + .incbin "data/tilesets/secondary/elite_four/anim/1/1.4bpp" gUnknown_08517B5C:: - .incbin "baserom.gba", 0x517b5c, 0x20 + .incbin "data/tilesets/secondary/elite_four/anim/0/0.4bpp" gUnknown_08517B7C:: - .incbin "baserom.gba", 0x517b7c, 0x20 + .incbin "data/tilesets/secondary/elite_four/anim/0/1.4bpp" gUnknown_08517B9C:: - .incbin "baserom.gba", 0x517b9c, 0x20 + .incbin "data/tilesets/secondary/elite_four/anim/0/2.4bpp" gUnknown_08517BBC:: - .incbin "baserom.gba", 0x517bbc, 0x20 + .incbin "data/tilesets/secondary/elite_four/anim/0/3.4bpp" .space 0x20 gTilesetAnims_EliteFour1:: @ 8517BFC -@ replacing .incbin "baserom.gba", 0x00517bfc, 0x10 .4byte gUnknown_08517B5C .4byte gUnknown_08517B7C .4byte gUnknown_08517B9C .4byte gUnknown_08517BBC gTilesetAnims_EliteFour0:: @ 8517C0C -@ replacing .incbin "baserom.gba", 0x00517c0c, 0x8 .4byte gUnknown_08517A5C .4byte gUnknown_08517ADC gUnknown_08517C14:: - .incbin "baserom.gba", 0x517c14, 0x200 + .incbin "data/tilesets/secondary/mauville_gym/anim/0.4bpp" gUnknown_08517E14:: - .incbin "baserom.gba", 0x517e14, 0x200 + .incbin "data/tilesets/secondary/mauville_gym/anim/1.4bpp" .space 0x20 gTilesetAnims_MauvilleGym0:: @ 8518034 -@ replacing .incbin "baserom.gba", 0x00518034, 0x8 .4byte gUnknown_08517C14 .4byte gUnknown_08517E14 gUnknown_0851803C:: - .incbin "baserom.gba", 0x51803c, 0x120 + .incbin "data/tilesets/secondary/bike_shop/anim/0.4bpp" gUnknown_0851815C:: - .incbin "baserom.gba", 0x51815c, 0x120 + .incbin "data/tilesets/secondary/bike_shop/anim/1.4bpp" .space 0x20 gTilesetAnims_BikeShop0:: @ 851829C -@ replacing .incbin "baserom.gba", 0x0051829c, 0x8 .4byte gUnknown_0851803C .4byte gUnknown_0851815C gUnknown_085182A4:: - .incbin "baserom.gba", 0x5182a4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/0.4bpp" gUnknown_08518EA4:: - .incbin "baserom.gba", 0x518ea4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/1.4bpp" gUnknown_08519AA4:: - .incbin "baserom.gba", 0x519aa4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/2.4bpp" gUnknown_0851A6A4:: - .incbin "baserom.gba", 0x51a6a4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/3.4bpp" gUnknown_0851B2A4:: - .incbin "baserom.gba", 0x51b2a4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/4.4bpp" gUnknown_0851BEA4:: - .incbin "baserom.gba", 0x51bea4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/5.4bpp" gUnknown_0851CAA4:: - .incbin "baserom.gba", 0x51caa4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/6.4bpp" gUnknown_0851D6A4:: - .incbin "baserom.gba", 0x51d6a4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/7.4bpp" .space 0x20 gUnknown_0851E2C4:: - .incbin "baserom.gba", 0x51e2c4, 0x800 + .incbin "data/tilesets/secondary/unused_1/0.4bpp" gUnknown_0851EAC4:: - .incbin "baserom.gba", 0x51eac4, 0x800 + .incbin "data/tilesets/secondary/unused_1/1.4bpp" gUnknown_0851F2C4:: - .incbin "baserom.gba", 0x51f2c4, 0x800 + .incbin "data/tilesets/secondary/unused_1/2.4bpp" gUnknown_0851FAC4:: - .incbin "baserom.gba", 0x51fac4, 0x800 + .incbin "data/tilesets/secondary/unused_1/3.4bpp" gTilesetAnims_Sootopolis0:: @ 85202C4 -@ replacing .incbin "baserom.gba", 0x005202c4, 0x20 .4byte gUnknown_085182A4 .4byte gUnknown_08518EA4 .4byte gUnknown_08519AA4 @@ -698,43 +666,41 @@ gTilesetAnims_Sootopolis0:: @ 85202C4 .4byte gUnknown_0851D6A4 gUnknown_085202E4:: - .incbin "baserom.gba", 0x5202e4, 0x100 + .incbin "data/tilesets/secondary/battle_pyramid/anim/0/0.4bpp" gUnknown_085203E4:: - .incbin "baserom.gba", 0x5203e4, 0x100 + .incbin "data/tilesets/secondary/battle_pyramid/anim/0/1.4bpp" gUnknown_085204E4:: - .incbin "baserom.gba", 0x5204e4, 0x100 + .incbin "data/tilesets/secondary/battle_pyramid/anim/0/2.4bpp" .space 0x20 gUnknown_08520604:: - .incbin "baserom.gba", 0x520604, 0x100 + .incbin "data/tilesets/secondary/battle_pyramid/anim/1/0.4bpp" gUnknown_08520704:: - .incbin "baserom.gba", 0x520704, 0x100 + .incbin "data/tilesets/secondary/battle_pyramid/anim/1/1.4bpp" gUnknown_08520804:: - .incbin "baserom.gba", 0x520804, 0x100 + .incbin "data/tilesets/secondary/battle_pyramid/anim/1/2.4bpp" .space 0x3d00 gUnknown_08524604:: - .incbin "baserom.gba", 0x524604, 0x40 + .incbin "data/tilesets/secondary/unused_2/0.4bpp" .space 0x1c0 gUnknown_08524804:: - .incbin "baserom.gba", 0x524804, 0x60 + .incbin "data/tilesets/secondary/unused_2/1.4bpp" gTilesetAnims_BattlePyramid0:: @ 8524864 -@ replacing .incbin "baserom.gba", 0x00524864, 0xc .4byte gUnknown_085202E4 .4byte gUnknown_085203E4 .4byte gUnknown_085204E4 gTilesetAnims_BattlePyramid1:: @ 8524870 -@ replacing .incbin "baserom.gba", 0x00524870, 0xc .4byte gUnknown_08520604 .4byte gUnknown_08520704 .4byte gUnknown_08520804 diff --git a/data/tilesets/primary/building/anim/0.png b/data/tilesets/primary/building/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..004eccc67d6a563c9fa50b1bc53a6c046479c9b6 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsSr;W#}JO0p=USpHW=`*9GGtw zdZa?Ku`S%Jz)S0gZ()mSd5MjagXV8^-u8?!EQT oR#t}GQmCIKHFMom?Z*8Vm|ri>ImdKI;Vst08QI4m;e9( literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/building/anim/1.png b/data/tilesets/primary/building/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..e28281dea9caf084d219b71fad644e7ffc177bdb GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsc=sh#}JO0p=S^BHW=_QJNS23 zC>(Q`Ho=N7IHmPl=Z^=H9#JYza^E+}&gqu4dl#ksggsVei~K>K8Ij%s zy=`A9bgfeNb<1tOX@yRQE(+QyK6)pqXi7 zrnEb7@9$J8YK+R?aQ@PUz46A2{JMT~a%N4qD-@pPkiprJb8hnfoZE8*R`FW=iJnjt g?^x){VjZsboFyt=akR{0N&w5WdHyG literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/0/2.png b/data/tilesets/primary/general/anim/0/2.png new file mode 100644 index 0000000000000000000000000000000000000000..fb0bfe89f681b6f4641c7dd0b98e8c03ca5d4877 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsX9*=#}JO0rl&UYHX8`IJyee> zpUGgU8ZwhHbgwY`sl`~lh5~RZaQ(#aLx?Frz?C+t?w)~klMFD|KqARtNAQWGpGMl jGr8u#&8%$p<<&=KhsCDLOBO!N2D!-7)z4*}Q$iB}pD0UK literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/1/0.png b/data/tilesets/primary/general/anim/1/0.png new file mode 100644 index 0000000000000000000000000000000000000000..a7bb2e631d50dce2e68bd1beaa17a202ee544ba8 GIT binary patch literal 518 zcmV+h0{Q)kP)HwHB~v=~g$+|x zEg5wHtC~-TzALO)pR=RV!Iu`T4;iDhSfZ|gd7?`74KnJ7B_LKOhul5Xa@({6dbydJ zPj^0@*@{Q_2It7uK)T-h7Jaaa`G7-iZFRLQ`(Ux$wD>KTPv!pY9I0&JlM+5aXK87^ z@`n$*-}O%{SA^Uw1dd_7CW%W>Hf(q6OxAo(7%t+g||(V)@R+2 z5|3dO>|HqrAJWPDdF&9cy{8zPZ@hZ)F?xER1NZaT&^`XizXS2ZR=jy2etJU1XJ=u~ zfd*ff4Scz&@>9M$92!1nz8CXt&9^=FAvgANbIZ-&8tAPqvAQ;Lc#gY0UJa2cZWA8N z$I-lf_vO@lIGc~7dsD5XgQ(qy6n&`R;-4#ERY^fB{F6QdQrn7B?cRbCDne($(1i}c z_7`k^58x26zcDZx2YY`3#S0b4pxg5;L7X!}>)kQ3degFUf07*qo IM6N<$g6a_QH~;_u literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/1/1.png b/data/tilesets/primary/general/anim/1/1.png new file mode 100644 index 0000000000000000000000000000000000000000..c215f16836328257a36728dc0ad6b5ffb46250d4 GIT binary patch literal 581 zcmV-L0=oT)P)-cZAPxy@ZNqhL3?wu@~( z@MkzfK9Z;_m%y@$uq;JlR>38Lvq!kkRwF%i8H|I3BT}wN%GqJGaYPu3fMT!$yD%8; z`Hce+0{w^@MHp`VQs?lKeLS&=yt5QLu7iyo;d>$vgAj1+h};)~a?O;h*=#!~cfg=r z?q_?Gt4$jFutF;eT7`iqg3b~C`}Gt39wzy9uYTX&`LQn4DYsg43rx}-JHb=;$xG+E zo7`c|wKe>ze&Ma(OYUv`*17~QKhOOY{)v9VkUz;!^;=6PjMC-QQS5oYM~~E%C&J3R z_3M<&r4R5rhu1mE`}OnG(KPqDVEK!mSN*nY{gPL|ulO<3Z+3cDF3Irc5*IZ43sLV| zEKPGkT!i>2u+_$8kA{OpB))US(#D9`2+J;_U78jbN$P5|z~q-T^vmS8dG8ljzcV+< z^(Mcw{Lb<_U;ACc2c6ov0AToZdICBneaio8I^YA9SJSZwNGL{0GSeT2B)p;5t0WoYv*IR}XCS#Jt^ zqT(CP?A1BHAh?(5m&`!0ATctOTrz^LHLdm zeG`3C+c!}!EuohZ^iqOetAtY>NCA3r1HEBMy^?w*^~Tg2pY&W@yz>1)--^DMbNF7} zy~X#vbC$ya#dahhiPRk#$6@ z7qFBJ{fq41g8dtx?*a5w)&tiU>-j#e0Q5r6SwbK_&9eN)R(1y<-`>n5@52${jC=ql z`vZ1)ParNg`R@*J7ZZSb*VMbE-gTGW&N=Ei>iy!`9nrM)PL@x;6Z%g0;UnXeJEi5T zI%W;)Xz2TymN05y`H%Oed~bcew{u^*-p6rJEhKgvn+a literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/1/3.png b/data/tilesets/primary/general/anim/1/3.png new file mode 100644 index 0000000000000000000000000000000000000000..6c6ce36112378d99917b0093ab596a7e88e424c8 GIT binary patch literal 527 zcmV+q0`UEbP)1@fW|rxpg0!k%C~3Bd+7Y9=?DB4!cvIgB=$fJ?17kpHj2YiS^`B_~g< z>7MtytGcC7Rk47@$O2QDn@wbBW}@@*2T-W!0<-$WZ~KKw(>%?^-8Y1H==(B#4OH-z zvZ2rK`G)ZA6uw$@D9w7O;>}iNG%sBq7Upu`y2A?V4hicH3AupF7oudi1uRAuDEqli zpVQ~``364s+jErI0ydriOEp!2sLS-XZ}MHrv_??+%uN=!=0^P<{wepb&oSB2SKs>5 ziui{5VfRtL5p)0aO-ER#n)iTaLhs}zo@3J8gB5f0ynO4QBQZCzA1NUhNRr(%>c`S0 z7SU>@3aG81uaJFruZn>z+qRV|@EoHmu#`*nbt&hns-(Rv--#B$Z2QV@=L^ujUVzgX zz`ucFFl)s)8q+tXZ+y@9f%^xa()U8&3wEYPsx9`G1>ppl~kH5;0a&6-G(GG^13-|7sc z?U603yS@dcIcL0D!eV5B>%HH1_h9-)WXTK6X6`TZUgeDa;nzKpJN)N&`3vx`8C4us R%5wk!002ovPDHLkV1o4j1+oAD literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/1/4.png b/data/tilesets/primary/general/anim/1/4.png new file mode 100644 index 0000000000000000000000000000000000000000..cc1f9576c72f3accaa5b94237538e5f26e7d7721 GIT binary patch literal 461 zcmV;;0W$uHP)7!W421Ox%GNPN9m9K`z|oSi1!(UE%+3xF=s5~x(cAV;sekIYfR_(Jj=mEq%8B>h ziDZa(M=wXBB!vHoJ4j;yN-|JEK*tXwr09xku%>cjt z%a7r}T}}kl`zN6p$So9p9mBITDvW8T3Cr9WMn9uq8+~**0_t?&w=G@D36r0GIMIfY zV{V~{9I>3=-dxGp(}(8swXiDMS3l+aQ1UxJHH^5>=bSy~?0tq8+%#@sHNOI`Y@t~6 zaTAN{K9qv;K2$T1TN>;7e7c`nEeDJ2&IaSq8{Q@D<}1PCFx2h|zr zd<7_^2f;d+1bhKi4i&(kZ^u9HZG0N5_pxH?a91?g!e zF-9CCLn3dhoG|SH)EN*72=PY5jEFtRR=f9k*ZcSZj28dEICzZm00000NkvXXu0mjf Dtz_2$ literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/1/5.png b/data/tilesets/primary/general/anim/1/5.png new file mode 100644 index 0000000000000000000000000000000000000000..3c0c57a86bd76987481efe65890d92d5d9bef2b8 GIT binary patch literal 460 zcmV;-0WV+45C!15f-TXi%UJmlN9Y#3$u^S1-jdxlkxEv0>4|{^{o*wmk`gqwR6PKAEgfNh&p$`f2#vm7aHaj^5U?y z%Ei3D)EB$TY`Vw3ndg1~dXCBs+*&u|P2xTeQ@qa4aevNX&ZyHYQ3*}pN?#|gGYb{_ zHjneeAv=H+m*Ddl=lNlDwZjlGx%?hrRmsNyMvc*>`AxW_CH9@zc9Q90$v*vRagVgq zCG!qYL9CU@?k(#8#EG_(6wE7`S2AzAmbWW3^EC6$%p-R9n0M`)_gAuS$-Zx_Q>;_E zv@7R0GllFw`Kv%nocGE1wvgwt_I<29H-}3C!NdU+ypjunk2Y|%zX6K`PtYZL!dH33 zB@HnRfiezep~>$-GY&UkahSi$F)vO?;OC&~#c#`u;}(eqgt&Z4z0;Yjy^c7i zD$cph0xeK?D^8mkXh%RJ*3_}u5GtAy&<16plNTZq-~CdeUkIpn@q`t>g2olUhJFoo z4SzyxV+X{SiZ<5ViMTG|Py?tIXaTsA8(HnDq@arzeZ)Y&U=#f82|7aU8P)a-eUux6 zZsuFfU+>4+|sX! zXh02EsoKa`b+nZVeKQ=@;H#5wJnT-o#LFBn% zcu$DNQ#Dot5i0@_V~~+B0{2>hG%e5q5J%RZvCKhYwXdIofKB3| zKaP;(GSJ|Fos+HKjm;>#ve217{0wxtKnM7{K_NN$?*a+`l{+W|BoSGWE0Wy9Z@+v$ zDBzbLWYY(nju$^(ktv|o=_+mC)Fq<#3kcIv3_% z@dUsA2uWcqO%B*OV`#4HND-u1Mj!%>qHbPhRO3vqb&Pbbn@A6e=51ckP;;K4i|;^P zzbhgpUPdzN_f7rEctPq{;pxH8sMSwJrG8cFm*kdjv7z$3m_p}N=QMKLN2PsKn){-; zmR>dTU-xEFz0BpS_tD{H5`!2quNW0Fa)&DLLzt<@H$5rFQ@3EGvB$#{4x&2`3dUxz zyZ}|A`5WF+RUOhs2&ftgh1Y*5%IL&g#}54hj4|ENlyp_~n$BA6y)Eu+V|w z@M|{Z2@#LnL|!KfsIPId37wwlU;U@!&7%0It>1O)1Jcj17H?K5K6uC9eraBS`Qykx sY1x1N#ju1Ig{~F3$rb+TyutOqe&_Co{5!&NO#$RMPgg&ebxsLQ0M~p?e*gdg literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/2/1.png b/data/tilesets/primary/general/anim/2/1.png new file mode 100644 index 0000000000000000000000000000000000000000..bef1f3023c9d9b6a48a309ae02a182243313995a GIT binary patch literal 243 zcmVTT8S0t;F)&l0k}Xwu5DB%Ds{+{qkP*xA0kqqXN1&=AuUJL zMym}xRg5%4=OjZ}NiL8f_@{t?fk=Id)Nkk6)LIkLPf^E(n)pn0 z$}`o|$|PxaB%T%L)=2bFjEYo3q(dw#S!0--o*fc3JS9|Qpj?=0Tpd-vDVEJ@`^|k+ z{6|eFOK30wU8vxV`}>WBUlptv28$cRYUsEA*Y1(2598-o(=oFSo$eSvJ{N(Nd}v@m zUCEEG0SYwK+tC8QF@O0v_!;;W9+2anvzoiP2WxbmPG7-P8UO$Q M07*qoM6N<$fN#EKTP zAq??9&{z#EtEXkVdja#xr5@n?;fTe%vHzYKi(}i?5iN_qZ8Mss)>A?x=C&^4m3dfA z8J&6B=kG;~l}t1CYA?8`Rfws&^HjW>q;nBOzLK9wtvbZ^04)}fKWzusF|O9%^I2V| eZuzTwpSmwm!_VX|uNmF|0000P)0Y_L4`9j zUZkfwnoD($Qeup>IB$z+%77gOrJ%YQ6-rG+n*YFhVJO;Jbe7TuY?EqP{jC=P*!PVp z1f1wAE|$<*Y&&T71a1<4hE@du;9QiO=nx U($(wXeHr9zPgg&ebxsLQ04%*)L;wH) literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/2/6.png b/data/tilesets/primary/general/anim/2/6.png new file mode 100644 index 0000000000000000000000000000000000000000..784a543b4eaf8f0c9ba1fdf61399fe7fa2d668bb GIT binary patch literal 203 zcmeAS@N?(olHy`uVBq!ia0vp^96%hv0wfrYc($DZQjaY)u{<5H z%-GJcZ;!4k-!@js4STaSS1bJFJXw=Ap`+lTvR``(bCH~ZldsIS51j((9C4g&H>?w{ z37c&wW#A0$dsQrV(XFif&+)9=8{bDr$a;ObXY@EuYxSDC+n1ILUsf%dA@}XIK;Jvv9Tobutac* zD>Mj{H!?UW91(aW!rD6FEVHm%!sNhS_H6CK!ooBS^FqCJ4R$6D#ke?)6ABzG0!}Ac hj(Qn!stOA*vM^jN3aGl2D*pgvg{P~Z%Q~loCIIFCAxZ!M literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/3/1.png b/data/tilesets/primary/general/anim/3/1.png new file mode 100644 index 0000000000000000000000000000000000000000..5a2744a665d931bdf17bcd8e2ec1fc5cb8128e30 GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq!K+{978x}EMn3p|e|C>8RUVN26|sC#;;GPJ5bdk<01(p=-B>eeqk? zrRpgTe~DWM4f Dzau%{ literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/3/2.png b/data/tilesets/primary/general/anim/3/2.png new file mode 100644 index 0000000000000000000000000000000000000000..0ddf1cda70a7b04241702d3a45c81dd3a638bbd9 GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeqJvv9Tobuz0j^ z3kW#>i2Jy=`-pB~VPTqvd7)mq20IgnVqBcY2?Y)o0jIzKj+=1?i7aJ|tBf1eG!5^t eGI4RHcgQj<+3F`9zE1l!$b3&%KbLh*2~7azMj`nC literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/3/3.png b/data/tilesets/primary/general/anim/3/3.png new file mode 100644 index 0000000000000000000000000000000000000000..f3fee847008a2125cdcafe2bb25349c59453a353 GIT binary patch literal 130 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 literal 7587 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 D*=|)L literal 1556 zcmbW1`#aNn0LMSy&DU+VqLyM~Ni3wPFqgR{aaY~E+R^nliNfG zl_(J<7D^|RTNm2FT)R!yNla9y{)O{A@8@~Fe|-J)I_vMZ4XdfA2>`%)dAjfTMFao{ zsQfx0FHCX_09fkf?i!SkKb6-UE%jL5p78^k*G~h)5`l?72@&>&qL}0oOL((Yen{1K z^qq2wtl@cW( zO%D}tRTJ+{c)X|I#=_>D-QvUE0=B-~vu$7Kb;GyksD*2#>ou|+)9dC|+-rwsE*A}( zrFO2bL4htOz_1>jB{Q<~_dI+kIk&?_VzCYy`fRJ5BO{CFkbQxPS*en%27rYE?*Gn$ zs^G;KjBIpN2QnI1%Sc|3x3aH8B;9GJJth_MTlr`m4Hg@v=hYHlH0p@|+q=W~P%iMP z3dd(rh%{i8F_PotDJB{u_o`7!xY}ih_qqV(jSa}Y2A|QvXacD{)dunMtO%+e;hCpE zv8xN7SH*aLu{Q9{&S<@+u6xh3!vXhoepy?t@qv3bOymTS zE|$|)jK_~WG03RtDbI51jGFv1U!O$nm_M=m%=${U0~BYDwiT6G?}dYO11DSJ7QV(` zsXqRVE3UdJ5hT7b*l@9);8LfJq2=g|+QlgJ{A?I9oiQL1Ym z3%9=fIX5Q1hC@QqdahoItm?dM&ybda0hEepDWWGHQV$L!p`jplc>RWkK(rCPQae_xT!I^)nCf^*?T* zSp10FHeB*j(5$Wa%IvKaF9}Vb8}P%5wZQr#BU@zlJQ=lVdh|T-r>m``X%+SH6+Qh_ zUAJX~0oZRKH6?HWL!J;eD4-U?s%cLbHl?;x0Kj+B@FSu|uvv-5=}pPUEl(QTN6GHz zdTukhO)ugwtV6MREfKb1jlCHXdaG2r@eur;1uGXon5*;CwrI|yJ}rhou2z+J5-&cX zyfHdGSx$p%AGKi@nl|xHP+u>ZsV(uDDZEtr5uV;9rd>3>yaa& zPZBv>ccN(077R5(<+#E_D9}wILZDL=3>>LMG^uSXY|8oZ^puy%+W?i2JD8i3CjCe? zYdD2d1YI|wAZs=1*WiPNW1cX16}pr;ZY63>R`@pw93pUz9WfC&8Ec5`vSbSSIPr+Lphbhw7whAl=BXDo~ZJk&04alu@XT6z|Ca~gYpvVhwCW4q(2MU;ViKLT>lZ=6DedCb8E!gz$4~SnNXE^A+VBHFxQh*!LZ{+@A*Jx=TpLXr0S@*h$ zE(4$1-(D*6O8f_&DPTudcFW>XM_*}Td8VQ!dUvQp5c05=KlH{GB1EY&!2g&I$uK~e z`PZ|^f=n)ZNtUdW(cmO2#?`kcHSGI<9`Cz^m(?4J8U-27>Z-^b4Kk`8pP^GCY}LXn slAc&c#@A&ofCOnrJ9nU9>KpPC%51ZqdUdOr|2y|yTm9T`xiR?v0WwvuE&u=k diff --git a/data/tilesets/primary/secret_base/tiles.png b/data/tilesets/primary/secret_base/tiles.png index 9adc0e13f50a201c01e127b88079828ac6bda39c..9dee014ea4e6fc3e93c00e0080ac40b61957759d 100644 GIT binary patch literal 7869 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 bpMrk{SgkyhhKxl^00000NkvXXu0mjfPak^F literal 7136 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 S-Jt&e>rPWuPo-7~8~r~(;O+hZ diff --git a/data/tilesets/primary/secret_base/unknown_tiles.png b/data/tilesets/primary/secret_base/unknown_tiles.png index dd5c4e16a160f19936f19eac208086949e6cbaf3..3ca4d9e87975b45c0a3670b30d9ed6c0d08151e2 100644 GIT binary patch literal 1316 zcmV+<1>5?GP)H!iXgz#@Bt}4J(73dyHRBEp-If) zL(L>fN^Y-1#Zk%Ry1A5W8qR?@Cff|dYh79(K5AJClU+-R0kOY3`IckyGj6Y|h~BgA zzrnAc5`9H!x7(%k8J|8g<|5r+f8t@X^b3(gD06W7r9&osJI1`NF5Gyd6hnlm;7Kvf zTjryh6oBbC|8B^*WOD-ozX0Evh_8B8oo8|C@{yYx5a@_J2E{1JqZ@8%qD{(!J)&G6 z{*Ke3JFyP^EltgWnwv-DdVx<11|!tgT30Bg07}{pqsE}@fKbsZL0OM%RtHvHqQPNp zgof;bkFh^6KBWVm1+!$R=?4nqXF@W;K?_Y6m<|}2f*uVzpyLPCjf#ZjHX4B(?-7ka z-*TSknwb4E&k2|C)jnd@Kc6zNkZ`DD&U1WlHX8Y*qiBQ__xn7=#ohAJ#i5Ieqw&~B z5g+xVqBx>#XC3HJ5zrdgXpl#_V#|N>-eUU<`U=is*fEJ$ih#X^u55aFpk@R@6}K;?$I>1K3Yv zXK6T;@4P(y=x7BMMu#Pv)qV zQ=oT86a>g~FnNE*E^kvz1=b&$qMvQV=Gq2TWQf;Cps_w~>sP?}TSY&+4YF-Lu}(3; z7T7!FGzHF0{jeZxrnktpHMZQgzje!g%Gt=c>FUmn{VqT0$hIfk5-8*FvU12#F5vIl zEA`9N6m@t{?3`_kiq~%$y$mtSRoz*PG|m9YKf9sTeN&Td@A?8bh!VTzwsJn>CTPfQ$wo z^K43v87z{(FIURo|Lm8w2f*!c;5cT=9p~@Tgsy6YVX(*BLy-+N&fnFEZyzFDt6Lm6 zZk4&*PwA^oS4|Hw+W~47O}DwTp4>F6jxs!Mzs-?SoZ=#3XLZhb>M{h*W_#n3BF{Z6 z=i=y{c@_jg5ClOG1VIo4K@bE%5ClOG1VIo4K@bE%5ClOG1VIo4K@bE%5ClOG1VIo4 zL3l4te*>>RCwp3}kv)0&=;GDa;Pf7Nb?>#MwY6_7)z)zI^3mN7{@}vL#`L#y%mxkr zND>+zCf}3Y_P--Ltt!>0Rl%Z*d*}qK1%3rS@+<1*Q51^Pk*2no6{CW9Jm>9=M6Za as^7mzirLl*7h8b<00006R{qyZ?b-w%5nfr3DzTNfl z`kQTkHIwK6Ju+kehsB=$?*Ex?Y|R#Y@Mjs%tF@{Jf{UB{pF8l)dA@;X#qy6oZ#(@G zVK`)7?BIEBYKMtS`-s?r-GrSpHJe@}=U0)ppT09S(TDvAUiqqh7$w zkYA&&Ih%2!V~L*I{%aL-XBpLbk~14yrDiMr`_rtsh`F!UC;N=`arJ~lmHwXBSazQ) zQTBA0JJaTKP2-7eX0hejm;Gl8JviSVRn=sxaqB?!&IxCP%UE{_F1noa@R_zOZ<_ka zWw~!S6ek~H_}TIOOG|B2f5$-?gZu_Qrpk@`ZM?VrZjI#7P*nI*dL_7)g)iJkYQfCs zw?vnuDqKeTL{;Wy*R$C)?l zQ(vv@mfE{DUi|Wc)5<9vJ-+5K#uGXPB7AQ5r%JD1D|x|WeYxv|d1@ykJg%28pZ~z; zP}$;JvwL~U1T(+m^Nu7v%Upd=>dq{uo5%Q@+FoO6IFjr}ll``g!<;)f)RC3YRnSiUjj5zFySofm78 zb64(Ci@tcZjQHy*Pz_oO8sBK^y5AD38fVs_z5LiJt-g`UYq%mFuA*&2*K8}!aJ z&*5h7*_Hce>&+*(^&}LG-6sefH#~M(<;aYg*=**1i_cZ0-#D)OcHL}QcJ5dQh1+r4 zSN12?wIn^>VcNSRxMEv}Uis~Poj=ZtZG2{DW#AAava!c{h5(0U_Ybps+l&wY6ihSv z!0^6f-+8N}b1h18mMP6RCfnhx`cy~n4CA>qy!&hq@fe7Q8FrezOVBM;YQMb0qE2JO+w6;GjQG1N?*GR~)dvq2a2fnO`-lHN zfAxF*o=N%tz54FUUvU34+dgE!6R(<+*2UGAj+rX*t={tSoL%zo@7g7a-DP{X5HPJ@c-c2Kjv>N WZ(jQ-)z=9smONekT-G@yGywpw;VJq6 diff --git a/data/tilesets/secondary/battle_arena/tiles.png b/data/tilesets/secondary/battle_arena/tiles.png index 43297aa7bae64f487185711814eeee3581b42a61..7414666df9d98fe97653ad91593933a04039b725 100644 GIT binary patch literal 2340 zcmV+<3ETFGP)b7$1<|3SJ$#Rv0lR~`r-VA?=qN$BGxgP}l#pC1Sn-S;3H#0QjaIg{_ zQBmO#LLq76)>XB@3aYv;MahC}7uT7xUCc5?$z~Z>vYdT`!QZT|t_J1d!-r8HC0#|! zmxmY^@j=+{(FzKL&Goi@`W0T_^4elf6Y z{2g4}M*O7^pOO?~o`S2ioTlX}EvH|t{w4G0RiET> z^V@acNF!4Hg_&y3r%ippk${J3A5jl^k zVRNVL1>%C3fqzCI>^conG;V3*lBwgWD&OC9{Cys4zmmVm(q7liV`iHA;T%gf!BTbC zIz;Pu7p)!F(&MsVoM}d_9kg~mOGQgX>v$LA)Ln=>hF+!RZ-gV0Lg4RJ8X>q+ z`GnxFoZ#<`wY<2vr{-IM-B|efMXliYCgfXoJxFd%vT-<%I_T~(b$lmqRZYW{9>dk) z4qjF9>ftU?OvI{5w7b^l^EdHi5&o9I^TZS6FPS>ex^vuI{*tNltS`xxKW@mC3Ki*i z2WyF2Rn#yWK@yWWI80xMLR{VT2B^CbcZi?^lkxAuLi~+MY!bWAMmTehUV>0Tq3v88 zDs~^m?!OAe#RKhwnbj(=j4 zkrj$~_t7_o)wb8azr?Ii2Iw2$x359!=ND?N%dSiSb7XZUjB@*m0A@Y|fM~xK$RJtA=Sv(JDH-FdL?nie48NBJI|( ze+Kr-!2an8{WGvvb?jdqEj`e`x(ORG61}0FFtcJF2r+cnm(c}+E5J+971a~EAWlm~ zNu3n$4v$H-IO_}E0i2c)R%hB9Az?j~b5D@Ewuhspu~FYe?-XT176R9|+zXlpGQPIo zg7n|I7O*B{fKvj^IP$aWAXaR9jACEoqw6g)zjbH$>k@>nC5EhNHJI7yz%X{YRX8mp zf0h{-ONy%?vDIo7Fl&NXH8?dbb0!Y*x#%?oYbR3B*YxH$L7iUL*`;ZiLM|#A?&!^i zkQDth()X_(KuSmjm4SkKQ3>?+}J} zr>6mHjMnu#@xh>nU*mhgF39Ow53F9#wXEJ-yn4P^{d=ET%dp{EhD(d{wWyEc*3jbU zgFlO9c&-gr?t6G7WLf!WoCV7AEy(xxmasT$TY-F!Fm6*=8LaIQpAX?h!wA*CM#K0r z^{-wz2-LrNr4p=v*{q_ltddpOP*peCguZ<}zPExx)&zZ%XdE#_|FDdFo}G=GuocY0 zDV3M+>#sbPBXO)neDqv0IqL_;+wC?;C(n3p8~L+{L@rpPxIbB~HI~ok0kbNIRczru zMIj&OE|Vf(3~Lde_=HK+`Ss5T)jxnRq5jp=*FR&X{t0|VEPYR?8BbJ*>rf)U{jmRe4jpSIgD@p&0)`< z!YSYQ1gV@ohi!7m_x!K?Ms#YI>Pnlyyy55g)~Y z>xhBth=J=sSP|d&9~uXFzy%xE-UsX{S|ET5%yMjR_1gjCPre-pHrx-`^#5rX1r(Sw zVI6h>11}^opN6oKBosZxeVhtN+axFlwooDZJd5aBmf6hZCYq3CsvMLXRLs93_~zsYbX6GXkz_hDanZ z2~mPeU`D_ZdITZjD8U3FxCk=>?u{NI(Jz8ue+2)#Mb^Kh`IpLir2fUtzmvpu$*&Ze zTxTcT;3O=!3P6M?f?~pTCt;e7X<`=Z$$1m5@1wZ66Rz*WxPJqyfAWB_K#bl10000< KMNUMnLSTaCvy>YE literal 2067 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 diff --git a/data/tilesets/secondary/battle_frontier/tiles.png b/data/tilesets/secondary/battle_frontier/tiles.png index 70ec420e9d72078ecbc86d00be58d8eebdde8738..1b14ce5552d60b4d8ee8f755a735689e1e8699d1 100644 GIT binary patch literal 2647 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 md>kLeA7%!q3jsk&+yB2P7crEeKF09?0000+C- diff --git a/data/tilesets/secondary/battle_frontier_outside_east/anim/0.png b/data/tilesets/secondary/battle_frontier_outside_east/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..8a9905198e98746671448b35fbd58bbcbea470d0 GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq}n`P978x}ruG?fF*|a&{#U)L zmt$Hs>9WdOITstZWs)|>%rbkw>SN=dvu5SV_ndrgWSizwd=fLUA8CTqIks) z)hi0GxC~{l-#g;@{lKxUcOG@eJwEcQMtf;UljeE}_df?>Wz*~yq)K1)OlK5)?kW&# pwto3y^)1^Qmg>2#eU!%-wbJgEcArL^S%@#lWuC5nF6*2UngA)vN`(Lb literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_frontier_outside_east/anim/1.png b/data/tilesets/secondary/battle_frontier_outside_east/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..836986b1281bfb14ce636f381db107667b99cbed GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq?$cl978x}rk*q8Vo~H_y-xO{|M_=sK4_O-)+e-~c&YuL2WmztX-uC5 z+}U<)W0QMjp8M<1?0^GPc;=pVvd}O4lxl#%WTNu5IF5i zshH@yH9p0e#vDn!<{gH2Vw?|%yH9-dsFSId$L`|6_3CWus=5`reesW2H#3~O)u6?n zktMXj;rWbR8}3!lxFGn{?O%K1GP|d{EUW91@9K8mpRuvg<4I(w<57tmk!C-;g=<3M jgzxm|>uUDzowSG1bLONSR~CGE4RVvGtDnm{r-UW|9*{sK)CYS@>YXj;HBM>@{!x>`&f3dHVth7Pa(($$Vzl zU08f$uAN@sp77Y`*<`8sU;Wj8?&+PAbib3K#aC{)B5mRfX`gE5(sd^^Q$v4gZ|w9b h`Sxv=@rszk>hd~!C%J$AzvC##MV_vHF6*2UngEnuN3Q?? literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_frontier_outside_east/tiles.png b/data/tilesets/secondary/battle_frontier_outside_east/tiles.png index 20cb7d67e88159ee9587b0225edc237b998adf42..da34656d18d2f6abfb8aa874e845c43f2a15452c 100644 GIT binary patch literal 3834 zcmVQ8dRx+a}Y=g)1)}+Dm4{ta-h;M!KNM{?M1>0 zzT;4o1lE{>P?K%knLyrVF+rUQC`}z+OeKOOj#iDJK*8^-g}m{e=jS`yaqPn>q3No# zbRXG2KmPsw`uY9yfq@4UQA80%6j4MGMHErQj}%*ESq3>0i9l~b$Yd9xv%*;Z5*6|P zgtI))!)cD=pwkZ$9>9|wN0+`}c7G*11{QM%$yV}+l!-M)U@ zRV|s~3IHh}Z2irOV*6t1o@uR(&}t#L{=BsDEZ{A;8Y*Z5d`AohLm!*QbfwKwfZ3^rI8^C~Vo21i0vXrGKH5D5+NCxfA3RIacDh2f79l0?8CrYnj$ zM}S-fzab61K^n@EhVX}=1~4qx zVX_ko^k*wb6f;mtbzcFSxJ?!28D@Sfoo%7J>r8QNBUDNfYOQORH#m>Z zfz^wvi_Y0??uJNpX9ZMuVv_h1p|j$nH=+9@;Z68RK%Dk-WT>^6Lu*xw>68N4Ew%ob zxEMrBdInvZSV!$kmD9!Z)v!4d=>$%aIJ3gM-VaxveeHT(wZ{5$k1(dcHx}qmL#=5E z_^*~Y3cq45%?iVx1X_Z|a8@swCCCI{{mF+moq*7xO(=#$B1HN-?3NyrV_uj!(fA6^ z1p$vBVB&J&j0e1Yn3vYP>fTFhLG6}We~a?>3;WfOg)#!?X%}K+Z$b%s#R&oQm$lqO zfcf;%!zW}CTmlkDFD7y-S#vN1tt6V(vXUHR4?D9@rd+9bnDDamiZ4Xsig;rup_|YS z3LXx4xjq(lM)+MfocSHPJ}Kw=lIZ$y%7fD$8M?_1PjXIwP8-tTvN$Zlem}7GVDqRU z4WAtr@rhx&;eu_)^1?F7E?rnI{YjEoh3JkEctX^?j6~XK%z8RXh(TDyN{l9HGC+tW zt;-6U$nHW!cjYGtzOzLa0t`f2Ij+==P+3U`%F0Sg%rh3o#KlH#HoT^)LE}UH8KkhM zf%Ve?APr4rU});$FkE|hWf7P+Tbs7xNfNWcNN67{Q{)UUEJm)E*VB+^AP+f43;ll*1DSCdETq|psmsQ-0Iz*h%s5N(@8td$s7 zm{)whX}t3FD_@(iQ*(v2R*~wSj=Uo7ARedS+G8z+p5{(J4Bbf?Ag21U>*zNM=uZqq zGg#CVO`uc#9$L%fk=JDEimAVpg^PKhq;j}OKwS-|P&p8h|w;&_!?wKHDHZl9E5hmm^I-wA@Tyt>0U8;-yd-?8He}caSq<2 zBpLpQW0z-w@$EZUqPf3d$>+|*^SIEk095FASe**^M7%}04e<$W2%!u?i=rveGNep6 zYUo?x_Xae?$++3bVT>*r@-e?nNw!c9SmKn83x)%lreGI1q)mWAsZG#X%UHYxM}1gf zhLLYFjUt^GLnvd-1`J_xm{2oix4{6x%GG|7l!=RZyr0NJuynvtJ+r1Y;n!|<*K41# zzQQFg`-Ls@a4j~1>d#gf4s2%4(am8|JYgoeCXqPkULawxhfFq@^h|_fark>U*5Uxp zu5ZHXK6MYQj>q@-n|#=(?u8@q_{X#?{BaQJ9bx*L-`u{iCrLaX;en5ZqQGwpt-{NY zbKSxmbP&Q92-Sqh1q-`!Sg_{d6KOaSeJuz<f7!mEF+sQm7lcDnlY(mf~e7IRG8v zC&M60Lm7zg{V<-xzT^qL*(|yOW*Vy}^Xr3`R8iiobo?HVU`)*<9<{VG@3?;qB zlfK4FJx*L5j_nBoCa!&=c-$YXO3b|p3wx;|_ECv!{DkZrG8;KZkO*1BT%a>S`3taQ zmem;l#C&8Vzu(rbUS$ieHR*ozwI7!M%h*TEm_F^gv z^0C)a2xXX{nov~~jSY#Al@R!p0(a=yQ6$D3#xzPIl~BS}qF*ZuN$BCEvw*)0;P20X zzwJ;N!f6nO$rL7Im?%T0wN!@Imk?Ye50}4^%{8)l{>pcc>c3 z821aj+oL({OpIcfHi45u@&XgqMAl&<_o*-DfI%2|BcFK~xxnwaPwjG*f{OyA3D(Lze3Tc8s z)jlx~qlyLWHC*c@^FVipa_bR8lPCs-VQ4-u(1fNjEL_X*f*KHk^*7)D`NGHlVHYil zs2p0=5J@zZAyUNrFfW+}Z8w*sR2z1A>3y>mRv0K64WX%UlIs5CkU9$KTlyn}dJEF( zBNd@zdyu$PjWDVVz@$1c0BAN0k5q(uOGW62Md`1edQLCcYS*;uI%t#pZqTmd4MZ(r z6vI@f4p`@ZpP&;o{XRmQ(%pK|uOhxtMoE)bHTaS+Nzlk+23DQz1Pe>g_LIjVfuO3` zcL#ub4nei%366Z71)ksO4PXD~LeN4NR^9mI=w;e&)lgijP8dP`DT5XU$Q@=ZhbM!s zqPY49m*_5omt9c(d5tZeI^LKgTtUp;LtMdG$J{-{6|85rzkh{RZ0^|u!x&9lD3+a0 z?=71vJFXr4=RD4llPE4j#POejq%iL^Tr!ggqC^`RNXN7Of}0Ot!8wudFSAtgEOoP< zz!|h-U|4wkywvr#)NnPo=Wu~-8ASP=L6G3MCOE`xya8NOc|C00P{+fn`noaD_#4e| zv$nYgn(Kvn(_3tB;x@vL4YlP^UXLTFI=<9j*Fa4Z|1W6bxCGqT!EJ*2 znpzHc0qvT|PQd5TN!Ql_Pj-Rz2YARUs0CN7SmA%h4%UJ%;^BWbPiAz9{V$j6e+}$w zsfsCGKG**`!@TmB4F z`jzEX@WT4odU&yF)(VQ&=06<$jS5i0$${54*L6G2znKBM{IBtavE`6J+>-6)A`lF6)K zd_v>H2rzD|f1iv$XAW zUK^JY^S)2)XHU?#M|~saV+LRn?Qj-PbF1C7PH2OLVT0avAZR%*t6wS(oFdE-X8QFZe_aS786C^LQf08LREE!f|OO`GC+5Ju=72<^d3 zmC!KNi8#i@BnTL(=*U0G|pfR zy-g5wswS$E$J1uLFmW-QBcy4MDk)voVCEB)W8=xIDl{e$=f?X+&}5vTWeIm3kS`

_yZIy@S&TO=yJMC_8ve^@8=)h&k0~z<7e$6=u@t7-t6P4AX5) z60n4*KSYx9@(BTb+g;lK$ihGxv#SiGM=+-Y1SLfnSR8DH*{Yay@GAcqNIA}$Jht9Cke9_mNb89dZ*Krt`|g> zq1^5Wdkx0@kTE;qrOw|{!zHt{rVZ0;pM$8X;^O|0Y%A;>gQEPy4SRRVr8RryY4Q7} wCvzLGia+dh3%jai{hllLZNO6z@H?pg0hf6I9Jh7fu>b%707*qoM6N<$g3uaC4gdfE literal 3750 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 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_frontier_outside_west/anim/1.png b/data/tilesets/secondary/battle_frontier_outside_west/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..836986b1281bfb14ce636f381db107667b99cbed GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq?$cl978x}rk*q8Vo~H_y-xO{|M_=sK4_O-)+e-~c&YuL2WmztX-uC5 z+}U<)W0QMjp8M<1?0^GPc;=pVvd}O4lxl#%WTNu5IF5i zshH@yH9p0e#vDn!<{gH2Vw?|%yH9-dsFSId$L`|6_3CWus=5`reesW2H#3~O)u6?n zktMXj;rWbR8}3!lxFGn{?O%K1GP|d{EUW91@9K8mpRuvg<4I(w<57tmk!C-;g=<3M jgzxm|>uUDzowSG1bLONSR~CGE4RVvGtDnm{r-UW|9*{sK)CYS@>YXj;HBM>@{!x>`&f3dHVth7Pa(($$Vzl zU08f$uAN@sp77Y`*<`8sU;Wj8?&+PAbib3K#aC{)B5mRfX`gE5(sd^^Q$v4gZ|w9b h`Sxv=@rszk>hd~!C%J$AzvC##MV_vHF6*2UngEnuN3Q?? literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_frontier_outside_west/tiles.png b/data/tilesets/secondary/battle_frontier_outside_west/tiles.png index 3d5ea94f93e6d5598bb9c485b3b975768171a59f..03704bfd0f49d17c19946ce58759ddae1a803bd2 100644 GIT binary patch literal 5892 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 NmZmm`pO`SO{tw5~n9cwI diff --git a/data/tilesets/secondary/battle_frontier_ranking_hall/tiles.png b/data/tilesets/secondary/battle_frontier_ranking_hall/tiles.png index cf54e1d77defdf41786e7137e63321d4d733920e..1c1f700c09e77e702b13b90f2888404310265ccf 100644 GIT binary patch literal 1700 zcmV;V23z@wP)l*u5QgtRk;;&v9Y|%!D$##Hme-C3k|Hx~8x0ZBBKV4CIRaH%0#=3l7Ws=PmP^b&ZE~^w)miu8k0ti@b}jjycRVrhJgq5FVEfW9_Ad2%#h?zu96hb0Nf*=w_ zeNrMs5|-dzpp@Vo_l7)}UJ@k`FbZ@8n`Y+_ZaRzc1R;758sUt8IL#seN&;mH(C5o2 z3n5nl!_*ws<#g?0Q~-4?N-qu}W}%uWheT3jnUXQ}sfZj&Sb}?jk!07nH|N2{Au$3n zMwzc*)BGC3UCg!AV~C#RMmXaiPHP1~Nnlg~^!ZTL@UQFHfJ5{;fMpSVv4)mSIE{Z+ z*LKCWJFfJ)JxjcfYm3*jI?}Z}ed&3<|4KI1S<2y7h8!rN zB)JNuOcLZuM6(PzmD0a?F~*o1bM%?{cU^Jx&6z_~(@Dr7wJwlTdMxuw7ozEl$~o7R zRx}4+O+j0KF&fEXu_)v^ACF{|*FH{bh=x&wZ?3Rj^Ag6-#c_ z%@+_@L$j&?d-Ra+mG!`3~WWJw(o?e>VNIhg}a|(V_KobLn4~ z{<-w8Pyf0+-Kg8=l6>;|2kvqqYPPi6xl52k#+2Br@Aaudi$e7@%m?(MgM zRX_a|Jhbk!@3#Sa=utR_z`k6nhka>uG-6tNxAw2IxqllSTj98W9q!)__pi+dYB^T_ zvpNcA+dJ$BcpZZNH99t8?pfdR_vEAE4dr^%zYpfLc_p2vK=(f26lG7F2{(JYzc0!0 zWC9%3tEm34iU3o$zyBhY$>gAvnwYHdS_4NlaIbJ1K7U!HY-6~6Q{8sqHr@{(A35MZ z=D9tSBp;u zX6wdhH;B%bbw;i`IOA{aOm0vJFk;=w2^0wQ)s>uRMD2i@W~+I%RORwgu4>IlU*1`` ztH{(f?w&TN2+Y6Jir|c0W5I{FPp^K_`j=ZUxfUah|DC*y<9G67mc4J#oM!Le6R&Xj z3V%ELANd9luZa31-xQ$c>r!74ynOs8_&@$hoSa}c23(LQ`ez>kzuRBoj?e8P_17jE uw0re|b$CBehVgZX_hbJhUI>G`@5i4c1FmhMZ#IPh0000l*O6vzFYj>?ds9Y|)#Dp6lRR@ROJlEO0~nA|-yOAACG8ip|d0IpqtkWvAsFY~Glf=lVc z>1(el1F?sLp*FGnI|dA2L&twz}m|c$_E8nAb=2OU>WBG*G>RqAtphh7D(b+ zYmP~9QHw;t$QhEsgy7l*plAW8LA;_gPeUQm0#JiuC#9!2Xg6$QFaiazjynKgLjdH# zGKTZP4`4$8cx+w3`2_;ZAsh_~VC@2+f>oX{kw%+{RSI@qrhO$Yh3?^lI1!8{vE+F! z8C;>rd@ZxW-Flv@;R@h^sYxuj0j#60UJy|fQL#yQB4rL%_Jt7Azs$Co>w1_(^V~5< zhJov-s~6HJPHD0VMGnma03`|~vmN(6?YrniGI2(ZX_PA&ylKP`0IQTj{qvB?gbM)d zl!W?wT)WxU2f)ZUx2*wjaP7Q89!D^aC}l~WB-qY{fN>;M01(xD)wEKU=69AugR08F3@mBHiS zstf?*`W2=ffIQ_Q&Dko55{XIl)Yey?-Z7E6kVIoTGOWE1EPLE>1)0W@l`R=c!O)3? ztIL+;uCD<=U?^2Su!mg$E})VDO>rh8VCzFAnN&EFO8}g|_krn*p{*K0PCl-nU^v?Q zz%<9^-=q;got=8#jj8R}aMZ}MY}*=}x)o=KH>V9cgfXq&1ya5XWAm;R_kg52Fi)BS za${P)3#M7V3(o>n@4}#b7oG*E-UXw47oGD-y$Gv_EK~@2m30Zg5TskUpD8#3IVTw z2&e`_33#u&0aiZ+w;BOKE9Su;mi4-484(bFtR~IPtnx((u=)T#XnmpI=1|VtD~$=Q zs`3N{E=+MK<3eAdBOU;!a_~?_T>?JV1ndDnu0lmr~gU=Qf&gFRqT6VMBA@Ilp$ zdDRnWD*4yd)wdq)ya!xgWAQc{%*7Tqcv8aGyl?qq8;<~iyt%p2GDyG&sO24{pJ%ft z0Inq}kQ)G~uTp;fm9a0giynaQ72shee$?_Fp!)!-EY|?41mHC;dI9LCyF2)?EWhp{ zU{(eD@jwZ_K=-*q`w!RG^^v&QoSlj`AZQNN;K_h% z`KNmym-6WfmhAKFKHjm_{{g5!3(o>H$NG~2?XiAp|9?VYu5ID6Lw^7O002ovPDHLk FV1h^MeKi08 diff --git a/data/tilesets/secondary/battle_palace/tiles.png b/data/tilesets/secondary/battle_palace/tiles.png index a848a9eefcdfbbea8c38bcee95f029d415a8f7f2..4e11e3596c2abc3d645324003a7a1eafa6c01f5f 100644 GIT binary patch literal 1633 zcmV-n2A=teP)&Q<3U4&K!_;f+i(F$3wY2FQP88H#|R=u zuZVGyB=kB>Q#wn=BYHg=jp>YUb(Ewd`h7B)P{MiX2pyyGD5W$_fbn>Ywq%3|Z4=JB zPD+*WmB19(HeF}f_HrmdP07ACozgC@Wl%sfrro_brYWv<@O8~J*FouH^2pMyVE*Fu zL)#_Cbz`c>eIlo6@NJvO-is;803{#j!jcYMFu>OLEB0lK_miP=N37t zxq!HTi+gV^8oNbX+uMM>HG}!tmhPD6HCV33_I86B4SR+!&4%vSSE@z(coEt$;Mz`A zEnp)CxVLbb_*xk-KnAOpwH4D$4coNfIOmzBowdD{XCbdaV|^!oSS0)&4CJ&fyM++Z^3-o^S>WXK;s+ckHl#J8Sqix6Za1HNe8e z>j+Bd-l8P}JA-K#l(J?~je*Zv{A!RX)2x;caKZ7GgT2};T2}-nc~hpkasmJL7_0W* zB3A9cMXc+~`^MV-zfyvTYbhGEfT$ePF# zWtlu%=+&;hYrL!6adq})R3US-f=_UaAbX)oj-rXH0T+K}xqh9a0z5aq1*+J=QcM?( zpJPLl{jJyQVuM5_LOsuy;uwWUha;aWiVo@xy$|}lk#sP7m@ z@4$45m38_C{{*MJAag*@Igl0jt&7`akIdmZR3*FKZeh0Sj$R^XsOLb{*KAeEXtwZ? zcGbyXG=UaSMK=a-8#Lwe=x_e!zpX^dd9nOL?**A$o0Ua~WQ$n6^yT1nj)g2JTJlsd zPM^D6MW(12fnT^LJj+VNBBCzWwm!<*ZUCjSax3I|t%qY(7)H9yhkFpt4+)iXpxaQv z!q^}TQU3O_w%+&gfO^OH=E2D@M%!`1MQ@Uo#28TL4F*4jaP4V`p9$_heTuduLWLai zctJki+%SlfRd|J3kMYLEDd9ZVM5aFL7;_l+-_}g4SC-Lr*WMQ#f?P|{R)F}o+B(5& zh7|cP_%&YeG|pf#Y{0U0o8*=2M7@*qE@@*mld|k%?MEWlQtRfu>y9_yVfT-Av-9Qt zIp@n=bkhDh=SvKQ^X1Vy&X@D&y1V;F`T6pwe7+RJ`VN+LqY5}1Pw-Y7r;6Qm3l_^I z6{uidkV^F7>WDKrH!|+Xd{^UU5$*uOf{1=q7cpsGD@-ih4|!u0)>`-7|qp9e}Do{11Mi zPxz1!xkNK99IGc1ijE?tC@OLlErL}dq39@Lih5eZ+(`W&9xS2gC}L(?Amq}Tv2dcE fNGLjrn5^i(c*N&MZ zzi-<{6vv+iv4a;=9Re>wb!xm<00eyf)+2(!teeZqm2f^`FI9{m2iz6M6 zfpdn@$CzV$-8N0SG8F%^sNwz;Qe;18mC>`277- z)FAApQ3G5@SVFA9Ba@!b=l#AV7gHDl7+eT$0}MnR@cTy{j|uQ#KJV|y1pqaW7&Mx` z*8t>!SouH+n4B4DZVUSmwRO7q@z7Y(Myy|Soy=x^1Ux{%4oat|Q4Pd!AZ%_Oc6z-| zx7X`FY;vP!q$rLfQqUI#AX6YP6o7R)-7d=ji&jP>Co~`W6Cr8<+o%JolL>1;MV$2~ z&0Im&1u$%|<>atqe%|SRWp*EKNCT?VnLI#V=>OEN)qp_Qg`$Ymg>smt$;dSH9Rb}c zfc}R*D2hlvSOm201dxKf210N!XDRKx+VZlVM)P*z@pu8q#p?r`PQTf2k5@_d% z+yqb)C4XDmWXsNMgN=V0RE3XD%r7ot|O}GQF;6$>I zDq)d7G;T=&eUKNiz}k5d__te;lQwHJ!!EliL?P` z4)AEjb-j^$F`Z6j^i~0^6u`D^7&dL1OlkVMiCO>x8mPb-X@Eop7g|9ofHuAiV5)V1 zwe&Tu$>yc;Z5Q_pk5s&rQ8blO0c z!-=hTszpG$7%o$=d(!0B19U#_|*v-w$X)m6v+>kk){XHOsnCeLtuHuG9C#`HB&~`B;kg;o5-L zd(^Lcj`N(ZulL|tx+1L%;IB>`=LP3a9A~`6_h6XrRI38s^H(qE!~|%lCtLgtT=8eM zd2n0&5x)9for>|}v#szxTs8k*b*u)M_i$)KA0nQc_uR$d!WolNTjs?+&DLeb|&0v(g| P00000NkvXXu0mjf3CX9^ diff --git a/data/tilesets/secondary/battle_pike/tiles.png b/data/tilesets/secondary/battle_pike/tiles.png index cba2f5794c3b16c52fd35101900894009fe84448..fc11f1d1aad5ea141001e340bd7ff2fd5ff79a2f 100644 GIT binary patch literal 4013 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 Tv&lO700000NkvXXu0mjfc@5=B literal 3922 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 diff --git a/data/tilesets/secondary/battle_pyramid/anim/0/0.png b/data/tilesets/secondary/battle_pyramid/anim/0/0.png new file mode 100644 index 0000000000000000000000000000000000000000..c0fb59c0e021d2e655840d435dd119e414d741a4 GIT binary patch literal 228 zcmVcM=2c5=0lxO1pja<h(=y0rRB7o z7D~nry0A$BXB7`&rpqbjzOk|qnOlkCd eVmi=AD0~3+z;#HmFuY;_0000A0wfrY&u<9_Qj0xZ9780gww~F@b;v-Z_2FkO z@ump*C66RJ_-YyA7nnMSwU?D{lHENsr&Y*f-X-DPT(NfV8c+9^-~TRgtnf}_K68bS z^_yjJGxpg3=a=ae@tJwP`@e!&m|4&a(N}Ifi>66mTBDP-R&I{Vn^y^Zty-)Sd$+wX zc^(_yxMJIbh`{hLv7;G!7v}_8Z&tFBwyeGNqD8be$<;{Pve-;*+k@H6_J{iQd2-4; TUu{-+339fltDnm{r-UW|w$)V3 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_pyramid/anim/0/2.png b/data/tilesets/secondary/battle_pyramid/anim/0/2.png new file mode 100644 index 0000000000000000000000000000000000000000..7c463d9c3b0e572d421cf5488377285c277e4f76 GIT binary patch literal 219 zcmV<103`p3P)jaPU(w+i$j+m`NQ{ur}rM? zJkLAuYy=<64*%QfhbEK4viir)FUP_utS_WiS#r?Gp|Yr3U6SOW&dhjc#sO;B98^VY zlLOiMg2PQQJHxyhW)88;L~|yQDT3PB4ap6Ox#lky!&xJo8R1NX+1k{DXAZmwAKnv$ VdF6~(0mT3S002ovPDHLkV1l|=U2OmW literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_pyramid/anim/1/0.png b/data/tilesets/secondary/battle_pyramid/anim/1/0.png new file mode 100644 index 0000000000000000000000000000000000000000..2a0921dea85aa33119550b0bf11f8f72807f145e GIT binary patch literal 261 zcmV+g0s8)lP)(@)g2UZdp*Ui!(8akOlw?E*?s&@D(2eCMTXOyih#Y~4 zy}=;&ilkCN-V+=v%$;$1p_VK<*)!f7<4ps(f|{5>Ee9ovuJ81`;~Nw9RT-0(bI?lU zD?x%nKf028@Ucm8&gJ!v$s`c~FOncwZF)v&U6)}ujCYMh~*;|}@U zwg3Ef4RZhXg)EC+xh${_W5GO33$EK~dUD!M5{{ok!f=p;!&1^8Jpgy~X>hlz00000 LNkvXXu0mjf(cE<` literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_pyramid/anim/1/1.png b/data/tilesets/secondary/battle_pyramid/anim/1/1.png new file mode 100644 index 0000000000000000000000000000000000000000..3474d081f891088b8ff0d8d1f91ec8a8796a2c20 GIT binary patch literal 267 zcmV+m0rdWfP)YGnB) z#4r((!*6z!nk(BEqk6g=JbATjblz|DR;}^0_oT+|;{A#v*QS&2E(u!V7J7~cRqVn>F^7#{a!#*zg0II#u#8FY`HEamT(fRg>AtM6=50k?0 l>DRtW$ShHxq~iJO5<~p4A6c#%^TI(IJYD@<);T3K0RRNb7Iy#u literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_pyramid/anim/1/5.png b/data/tilesets/secondary/battle_pyramid/anim/1/5.png new file mode 100644 index 0000000000000000000000000000000000000000..bea921d90e42ea862d1fed110fd4913482f3d34a GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^91ILh3@ktfLwv-1As{8|>EamT(fRg>AtM6=50k?0 l>DRtW$ShHxq~iJO5<~p4A6c#%^TI(IJYD@<);T3K0RRNb7Iy#u literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_pyramid/anim/1/6.png b/data/tilesets/secondary/battle_pyramid/anim/1/6.png new file mode 100644 index 0000000000000000000000000000000000000000..16652df19896a91d715ed5047610e1350fa210b1 GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0vp^91ILh3@ktfLwv-1As}Vw>EamT(fRg>BQJx30L#YB z8!UEAY^cw7IKdcV0}gaKh%Xnmb}_7&7rF#-*j8*I$;UjmbyK49cxh}iLm(O5V8P?bY3zgD>T8e44-c+xf#7`NJ6b!*Awq zoKn}Wy4(C+TkO{`n6KAU_~%YI`Q@U9$e%|3n8N#8y}?f2Ufmzh-%j42=I@w)$NW3y n-!cFG!TkH+l6Nk7<9Z37meuh-l$2BE00000NkvXXu0mjfNMW|J literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_pyramid/anim/1/8.png b/data/tilesets/secondary/battle_pyramid/anim/1/8.png new file mode 100644 index 0000000000000000000000000000000000000000..2895d3319a5c35f73a524731a21caa8f30647a0b GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^96&6<0wfqt3-&AkQU;zbjv*W~Q;#?bGAMAk9-RN} zBEvDZ8xB6NA567fb3mY_Trp?bZZDP-yCUr6?^^w2NRXB}w|H{pe~=lTu6{1-oD!M< Dhh!kZ literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_pyramid/anim/1/9.png b/data/tilesets/secondary/battle_pyramid/anim/1/9.png new file mode 100644 index 0000000000000000000000000000000000000000..63c22acf2b98595cf3a22b7d9dfdf18fc3847c02 GIT binary patch literal 111 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 diff --git a/data/tilesets/secondary/battle_tent/tiles.png b/data/tilesets/secondary/battle_tent/tiles.png index 919e3878f879545efd434c988f3e05726cf84895..35e5c4b6545c856665e575db886451fe4d56b1a1 100644 GIT binary patch literal 2084 zcmV+<2;29GP)72u?eSg0v=}ETaIKyoNn;;*4Pw%Uze_#FHA4jxr zbUH$#(<#Nxb`E8_o9%W6?RF_{baE)swazasWw5kVii@or%5)c7tqfYNQk-APp+py9 zE5uMrDWu~#B6ui7xlWSKAsug%bRp>^M8{p)H%t)#!-pc0fxszoy121P?fpyG*a{KR zeGK`2>Aa;n$RfIrkW_B@i(g*JVSQ^$vC*;wfJv_@8b}Dc2#$bl8XoNl%b2E>gkR<(i5)4 zVSUddqodfBi2CHKuEZ^bbRRGnY!*@!CHvmQ{T6v`+qS(?6nV|F?X6KH{^Qhltq^OC z53ea-sS#eQb%F3%1{msHqVd|LjP4rsrr+oB0|tA9CFMU(eHTjcZDT=L)ShV~seWUk zH(i@2G{?c`H7NO_B!P2Ppw|N=M~k9)4n?h#bXa{4sMRP!S?t!hxX0~T&{Zlpw(wv@2713TrQR^H!Y-Jr-U8M+R z@o1Hc>)aj>@~OR>U(=xcM{0Qtv;ICdsgq;ym74S<>(t%V(>|H|JexXK2JeHcLfvOo zLF?FD40!Eo2H1BsQwxV(CWl={1MdN~-dBW6s@Q5JwRg#3cgbOQzrY3kQR`Xa2Lc!G zF2RIc%jROdPhQI)tzZ;+jZMgQWMi^Lo4c|n&eduXr~`Fb$36@fn&)Iw8IIp-O)fTt z?Dh79tO8Y8MPy-LQ|@JTMP7?d2s^Sd*`h^WV-vC+*_dq6_9JH<&RKPU6=20#!9H^0 zs?*N&8mrEgws6+rMCUqi9fT9HukEa7bwyr_O$a-(G1;QC?muP??XVKG#f{EQTP3$5 zaQ@?j$NefNw<2)<)4B_Jn~k7NuyJDXk{t1pzO7w+VWP)h*>0mD`WRn|zVCb#J>OSOdRB1JXm7Ae0Bx?<@2 zfam=rzM}@#&H(%KK!i|4`}0+_vUUd8pQrZL(11EGvP!jTiaIt?tyUYNPABIpI7={$ zJCUeV79xDB<{d=Vf-o(hUa?HkFbN3D4RR;N!do}%|9BJFpGG%N=2|P8kv(SO=QbZU4<%$luA;maKM(B>zHL^ysF!vlJY5I#AY>G{61|M1Dfv-s5_Rl(CsU8 zl^Q9tE>NcXa!MU4f6eP2Omp55o8g*!V#hGv5j(sdLEW)W_jYvrXApRHg27_ljH9>b zKkcxJ_7R(qEOYEsTCH=~giSk4AE?^pG8vOCI_vk50WW~{YArE5MN!T3#85tU#PD+` zNOatr_AJcudsgPB565*~AqlLLv@C4l+W;`j*Sa7G971*`%*$x4UX2#i=0fOtp>Q6{ zP`J+Tp@@bwZSHS-G$;0H5gM)V@?DC)`c)>3gtyg=$llb7*QMn+o7pFd1e0}|`6rggo2ns$93>28cGEBieW#PlFEOzp3!wSas35*Vz9aNepEAUnQRJ zDM*fZxIh(AJjYJ{p~UwzbVcm(jLi&MBJ3D6rs<6RFjC|-gO2Frj`#;)Y=IY^0N+ah O0000TpL{LTp0uQ76U+RoEmTfQe*J< zj08qCnF;`33Vg$mfD`t+@l-&(XK*bCh60G$F9Smiyv`*CUgC<4lmgBR-W-6t1B(L2 z{~X|YgACuijt8pIy!0^{{>ddgP#>@VUjab^a7-%acKDRG^!iSCKa((e060`Y0Hh_? zDnO+2o(fn71;B-XCN`rUo|>u!{BvIi7)4Y)1b7jbrve^_RIv&Ox>~^DK?VQ?faT#Z z0UWZ=4-nAC_SpkGwF_KO0YM1KY<$K54>+LR&HzsG7Wl(%cXq%eXMqplaI64WX(Iqn zDxU{(`Yz*mG@uZWRKEfM&j$z~BnA`#ZnvfG7g)g1!7vP=J1GR*38kJE0BA7x0~{ZY z=K-*M*oQ9QGn~r;=>kmV0t-4*%f+1z_&In$^f*n-uq*VqJ5t>JKu<)W&xl6zyaGUWZ+u0c0}3_ zE3fGWq_x@T(2dBh$P43;OrLi9AP1m#?)P1nb}FywojaXYi*|NJUQ7W%wFWA{-)t}+ zcBKm{0Jle1Z{Y?>v0!zOw&2DiZh^=P3D~Z`e{+KYHm-bEuTa1map5Qdw1^8d2)lBJ z@{ARc2Lyl?T)Rgs5P$*nU06*3kNi%{zrg@pDZmB;NDJ0n7ogui5`b2#<@=pZCk0T} zg|8jwoon|#cbs>54A$HlKve}ae19_o;0b3@fZPA-cekGaYEY{}H32mI#wHR{fEruc zsvL0jmH?1M8jz)KHA$pLBolAYM9Kj$28jz81DeWfm;`W?q;d(vxWnztH&#(soJQ!rGUOu1aRC5novVomQyJOz@SdmW6g*)t1vlUsiNw( zQvi_l00F}u6ljF2+V;g7qH2~yeNX{OQ6+#V5*1wPB#IDlyh4q!Gk`5`Cs`Np;?FS5 z1H$k}a<7l-%!G;xIE9!A3jnwY%!fAvP0O11xI2!5dK?;CA=mDB~ zp!mQ6MxmB;^&lHXEkIijGEvk5wDlkpMJ+&I4^)6z0*Ipgcv=sXD4Hb}U_HnKSUpgJ zP-4Ms0J}0TfCa&}76tr!7C6pKfD0N6mK@WffGDLrpk@{VmYlQP1wB9{LJ?re7BLv5 z0lgUkc>jd}OXrQn08a84qo}P2gD?w#8NdNARKUa80Q`Dx05^aFMkx=_hu$oJvkL-* z2PBn8FVcXAvjA**KI52k0?x1yU@j3rJEIu@Jd5x=FM!6-!XFn)a1MaqUorqQ3y^`h zV48V=X}+BS*cpID&%_U0+2~aGlFfsk>14pQEe)`&48WFt^vR34tmM)r0Cv`b1klTt z6IN12Gg~mxiM}fz3k#eX0b~&G4iCfdpeuI>+90OJ0!GB89kO308jA&9`xvFgeHZud z1V9>hJY=tFx;lVNBnddLK8B@n%wBy2V#lpbWeIRYMg3`jGZa83Qxf!j{PQ4)V;uSz zGJtwE50dFD0iXFXFaQMptMQNlx;lU?C<;K)t4t8fp(pi6=|)C11v z0ci_f0CjCyS1lkB0EmN_0)8q7h=oOO!CpB)ENuyZ_)i}M+A)I#BA2uljL65m z5&&P`lSINa@&U*R543>Hr7{cn1|vyj)q?(bctHMupP+*Hlz_MnP!AY@-2chTQv&`Xqkdr? z5euHYEDvH1Fd@%A9gi}YHWLKVdYJhm3Ec7=!{ec&wj~?>?0000$GKWn!xM=@NB|S=hUBxVlrW(XHYH2qrFqol=m<@RUS}{f$W^VuMhT z^hKayWA26*T3$P7br_)34v|VwjTChUq4pST{d0C0oKsx`j?ycy1c!o=3=T0iF=4DH zfuu-SvTP*ZSv2uzh2YTh@wCTUK92@twjW;V_qebeSqQl0o_OST#$#!L=R)Jo-e_zh zPh}m0_3$Y##+29euam)C?T458K5ndgHWIEi68Aa;+}B~jW2JFpG=fd! zsjOqN9zNyK2vujyFYM0wR^DQG%f{U3{8-5+$HQXVW-XBh00000NkvXXu0mjf{>Nzn literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/bike_shop/anim/2.png b/data/tilesets/secondary/bike_shop/anim/2.png new file mode 100644 index 0000000000000000000000000000000000000000..7c463d9c3b0e572d421cf5488377285c277e4f76 GIT binary patch literal 219 zcmV<103`p3P)jaPU(w+i$j+m`NQ{ur}rM? zJkLAuYy=<64*%QfhbEK4viir)FUP_utS_WiS#r?Gp|Yr3U6SOW&dhjc#sO;B98^VY zlLOiMg2PQQJHxyhW)88;L~|yQDT3PB4ap6Ox#lky!&xJo8R1NX+1k{DXAZmwAKnv$ VdF6~(0mT3S002ovPDHLkV1l|=U2OmW literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/bike_shop/tiles.png b/data/tilesets/secondary/bike_shop/tiles.png index ec109c3be0ee04ad6b9b6b5a13405a06d92fc084..e068538f570eb58e37ca64999687ea87dcb410bb 100644 GIT binary patch literal 3505 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 literal 3270 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 diff --git a/data/tilesets/secondary/brendans_mays_house/tiles.png b/data/tilesets/secondary/brendans_mays_house/tiles.png index 10163e9f1cfb4dd7e406129255d1621501f44091..6d6a5f04776151a993d17d39c1e8d3a045731abc 100644 GIT binary patch literal 3074 zcmV+d4E^(oP)lK5lxFEF?7`(}T0ms&XrVidc8KA7Eo znw@>~-8XNRv%;cHBtV@uADXnOQjxY8lq5k`2*<~Seif)WaO@;)qC%T6Xj8i$Uc#`UgN4$AWemZK6P1xHMt+n~L~Vp7EYR z__a>Q7IpIde=Hvcap=J%2|#}(^wzE@mS$%NyFJ3pEm7Rfo%ObFP%5UM%c5MB-{T zr$Nf&s*tXbWFLZCgWz!NFsQIt!G%uP3fpeR&jBCv?8e$V-3KgD#se1XWcyTqXmgtAUMutZU7qN2B0x+02<>)SZ2Om$gJy1G$b=mdMrm@0`w8Y zrBtV+XT$iEcJ=qOw*EYYO~?O>{*vBD7d~aMJ8#9MunTh#+``-dc7qdB-I)CJrN$Y~ z!}gJV%@X#Jhs{zRwvQC-zyarB1MT!(D zQlv{W#`wW9w5-B|XGdlxeh=M@#7}=8rvq+!j0I*PgzWg&+^B8R&cxyK zVZ^s!+>yc>ISXxK?Wkg|-g?(y(s;xov|ENu@CUg`9R|3_NGMS7R za!_KfQYYMBSK`XRF0^2Sue(+`ekgSPsIJ6CW-~aO^MTBA;@_2OPOR!HIl5_br-u<1 zt*GT)Bb2^d0-m+u#EuVS)=_p;0NOS@AH;?XFK)11Xa#Wyr?uk{GzCfZrxf;V+g`pG zB|S%fw!+vhR)4(`owWgHm$r&FmVz30m)7yxLEl0QcclrR7!*qlLT^JfioJ%oRcsXr zOHypO|3Q}>ij5wLt5G6s0L38$w^eK@=`mVE>d8kVmJY7wmpHE>oMRjCm!tNCMgY;ro#X8QJBDlap zP1F7lEUy`3;aCVf+*$5_)K(ecZ{qS()0iAGn`?3)=vz{73yRtS8;?Ll5ANPEx1a888mCRPyd=o(XJD+zmQj!xJ^`8P$QV?5<5AGXJ6Hm5ihTZxjYn?~>c6{^ z{C*ANpACE@&;(jQ$Hf7%*L|!Xzbaa2Ri78C*YK6g;GMdVKz`rFtja-#Si_9Zc>0E@ zf3*qBN}wR>muK@xA@btc_f%CAacBsPT+B0$D51KH_0OKddc~VX_4Uso+HyFe3z!oR?u%3jQ)(ibEeap9a8oD&z~pW4^I zsJ|{?CeDF8KN^l`Mmik2zyv`7Ej_RDwV|E+OhT%+24vPDt$mia1&3Sh#LeyVj~uOO zcCNScgB~GLNzdZDpr%UF~6qg~hc)0pg3S&>kN$*gFs+KLdGUfqM(&J-&S7FmJ zeZJ*^#gza9DCfVf%p!L&+F!t~C$p$sp4Xml(j;>REjZ6w+ag?mBQUHfWA!>_yVaqV zZsL6jm0GP9-j|H*Hz#D)QS;wQ<&y@X+5}oaM9rIT%_*}0-k(T069U+MEOMe_9 zvnoC(te^z|;?S3fLwP3-z3Td#t~&24$?2+d&Qb`kuNx|k_l-5$mB+e}a3=>N8ZMEq zS^n>toSCcrO;Tu*=_yP;Am~-O0y}%QZDIW7sfU_(XI*44*TqzU!I$)6UF>W&6cdx% zWlaT(<|vrOIN(_k>_{p3NQ88trmx?V6Nk@TU@TK`<1WWo!}vT3{;*LFS}9SN0W1a*Cx7^@yD0m>E+#RI#9hM} zi4SRBuTTzx%tm3E#nv2>8P#l}QXAfzy9AGhr|0R9#;Npt)^G$@0Pvk=wXNd#OMXY1 z91^1GGVt?7-z)jS3HWv78(+JnsC4f66gFLi{CqI@G4OUn_-XW)D83vN z_&w%{@ug6hTTC2ZLNc3#p%9yZue*chntC%asWnC*p?VOOSu9vw3F4oWhl%1}0_i!U zTJm^$hVl7Fh%XS$0fRf#EBV1G(>v(UuiR2pcayj@bm(K0-czNh?$!`rC}p4w8PK>x z7o*}!AL5r4!LMBj?Z^k>IGBK&araAR)nKANjut;IUg2Mo5V_i>_dxjZKe+adw%Df) QaR2}S07*qoM6N<$f-*(o4*&oF literal 2616 zcmV-83di+{P)JOl``O#mJY z1jQyOfyQtxZBn8}5~I}$Dth6C6puOBB2!7^O5~Emzrf4Ro0&H|vmAa{M%&9iQ{G*2 z=eO@`=FM`4sRg4k!{S{sKTTw@Na(2+*WL zsnMB40eo5z@^dGUfD_+3CH0sF{k|)tT2%qr^*oh#vMONpZg7~10Nm<96)ou3>Js2S z%C5up-^sq`O2CQl1>Wf}4yYkupaAR-QG=h^5^(x5fFAl_TLT;-0K^2qedp87O=y1O zhU$Zi=b;Z?7BGZ}6;G)J#00poK^6nHG9fb4KO;C$K#b`JqO58yowpe0htljrrs)y;qbI#CDk&cp$}(9#UpLnj_LFYJ%tyt1kRIMBbx4RRi& zndkuN162dv2mZZ#)=e3w%fpd$eQaPAidfa=7OXk;tG0bC#Z zgH&V!Z`QBkmHKjQqIp0*D#2grKCx8|>{A7R4bii(FWURATN}VRZ6OG79?SuJM)!LK zmVg1gkAT|@V2DB-04nr0@|!ez8la$QFb_ag=&cz5w>dzBaSnj0(9Hv2LkAR86AS=V zdJK?_0dBW3mEA8C6KsPpz{Xkt`w^hf#?EAapaMjk)hz>LHv%|T0Jmj+%*z9K59-N{ z&3u3Z2hIuTh)iq3R()R1zunTVnSqzPwG(z`>f33#qC z4^#k_d8;b{JP(8z^I#U>Pz8u_A~ktMNdO5T0VIF~kN^@u0!RP}AOR$R1dsp{Kmter z2_OL^fCP{L{?|q(MN2k)7d+lvM-}UD(MfpFi;^LYsq@qCr|p1_9z?C>${4 zCP33*sA`}9M*L~%Lcnkq0ChG4o^n8l&&7m&p=?GngsIS(0U*Z=08ixtA0Gl)tuW(w zdrtrJe>l|)`ECaY^8x-2AwIp_5FTzZz$g2*ec|oe6$&_70#Kxl!3?X|IPd{L+u8wz zP{46}4&W#PFh^PbL8AzO!;dLoceg?T?KuGSlwaiGXjp#ZfB|Z|_9ugn?aJYN0EW>o z)|vP2S}n^O0)Q&8e?cL&1%Rh<0QF`a0DI2odjrSWuPzrxe}}(&5QWj%cls1kU64o! zurz6@iA0mENP|0$oudPUFW4?U=xC`dOo+~5qK7foRf(!Wkb_Nkd)QXxSdT(z+cpiH zUExncX^ol0ji!PnW`S$2JU$gb5q;!Wa!QmIt^W2sawmB^q}qJV2u`xCI> zr2!yXZ~X59q|>GVIJl6^83IgBltZ>2gh`l@V^bzvFKqV;g|RV=vbe?pvI>LCcd?^@`N@#c@hD_{CEU-wN$`6%#Un+lFxHT091u%Hb06hc{@)o(K00_B9-dzm9o;R7aJJ-pd z6{FjoTjbG{6AXayMD*nsq^G|C2G5~fKOc+bx?=(8xWU_=_syX@0zj{@T`181LTnc*fCc~><6ahIT>=OL%z7pK!*(I$@>*Dk^m7Hs=*r%y}mwyUZpHy!mV_CnmiXq{_vWija42J@shfxQJm7!%K z7L!`m9TEq`5-A4YAC`NCUvQVz@03NsCBsov#+6i#0Y)%GYn6M=28)^dRkIv;fAfAo zUjjfD0bqhs9*Wtc>+ZIK)YaGECBmoyXdXlW$O8lnB0wd0jT5eLOSIcPngwjP!j5c>`+W^XGcM<(A=$rX|;KJ%mB~e z0$%|jFGY)jyT{M}YzE-D1VkTcP9%MPuTmuyI>U>SpU(ASfHqd9whB;x1{1C*LqI41 z&s+g;2^tGK(g$Ir*fofNR-} z02Wz#dJHgqe>V?sUX@>9ygUF}ojbKLh7nC#8bGgDK6f6EV^R430G4)QREC!X=+9x) zGAsb3KNmo{tQ2o<69I_IFapT=2)#cIAflFU7Wi1JmSJT)h;Ji6H~%(w+M@!y`&Y}b z(w*a51>k+dHF(e6Ry-oSvIJldX;5JRwG2=7M!8irka6cKt{8OJ{l23jCCq@i2dLD^lmLbpO0dLE+|s8yqjGFcuwxo2x=vJ_&C8tqsrz-cKU z9j&;FhscyJ$vdgV`+~gg`ESt^(J~%M z_!8yt>J7N|M#XEw1Or>tAL3ezU2C&m{xv&0OD!HIi+it*4iPJCmhEIn+6ZP(a@ldrI+uL^eIc;I>(P=yD*zzf)PjJR&#dU1wsjN)kN$*6TXR{%1c zvDQNA4Hd@t*oj3r)LJ{GSSyrh%7eLph7fL`AH*Dwch${lssMmZ2Xsh)%PccK06Cg^ zvroEZ_W3}c5A+MSTNE1_VuW1zChr=_C}1SUS>uoaGlNev^6e1t?yJyuwQV)&6OM%D zRa9?o!9>t!EFq<1wv2ts$wl>-rL`=iWtNAc?XI$M0m$gWjoZ{r0A(>Er|j}kD`96@ zDU3TR7v>fV&NZ{J1#H#G?AJnZh1deNY9G;74bK#8CiT@bMK|+>)MDo~IDkH2N#)wX z%;M@zmXw$9^yKT9RG*_Xq;b177FWH?_0=G*@S!wP)#_+`5fSG0pm6*%B)Gi{{duEZ z6Qu64xU2x=G#RUu;1UXBY$gVFL~u#PnxRB8Fv)$_3o}L%vO)O@ywm1ssAH<^(`o%P$G~Z2ZS=yBw zLftNMlc?KeygnII`IR7$-7LGTdm*dc-r1i)VZTlRg6o|<2P{B|y>mdW;8Mu_9hJi5 z`G%o>G}JvME+sQ1IFTNU@M-TlYciB*tT4&RxWsb{sZ=ByE9^NV;2vb%A4!?*U^?yG z$(i5F^$5kB-1mxuidM!jS9%z@5sJgzs zo(|G4`vH`NXThh>@^=q|wZm}t(`O^+rgqm3gGgNB%MERGH&v#M$T8=@3p|g;w2_HR zm>L)>95ERiR~S4~xMYkVd7AWvHMzkDs*EcUB;I>NZ}kK`S@h~rnLir6<5-tfR_oTf z3X|uP37K_)dJU2{ki|^3wh9xy%ki%kMZ)OyNiJT6%qAltv&mqYz5edLS>Qk+L8ixG zMFd?PWi@Y&f(DVgQq ze0qMGm8*UmzgJ6?C{dzBi4rABlqgZ6M2T04Z~lE@^7~GH!S3@X9RF5E&LF?KUnPHO ze~EmJb6P65!Z}UDkMDzkmM$Cw`8iDk0@w7&>o;0-TfzM&;|FxxvyPMJeSVx==dlP~uVwQ!>leTD~wx&rO@~b@=Rk zpLG!C?mHHDt@OW}Ai_7QtjtZuHP#8BBaamRb&t$E62V-`wGj$w#p)CB6(E^U` zW@=4D7;DntRVuN<`ZodJyk=5>EWCP?zkcyIQlD36dCf>>agHIiMAAFR)S43EP?J6O z$LV7b*J+xWOXCYho3S~?_zc+noMGXN?M;R>X*F>}m^T{=MdOfC7{4?QCVrh0apAHK z__8Kds%d|r;6pkRV)w^|Bay0}$3Ac)`M5)jX$^K+%c92ZWKHV95OUg}@c6mB{BaV( z{@HAt1&dYE=4jSp5l(JRE~~)$(-Awa)W3_NyE~1co1UWJ%PAsnut(%F28_GYKeB0h z>ZDCm1keyC_JA+m1CGs~v=dH#qU&pPsIV3QL5R2;ha9iO>eJ9bb zM5KJ!@KNV3LWbK%^)6aMH#o=3wS7k5%A=AIL{q;=-p+89cM|cUf#@F(FTw6xamsfR z^5pEgcyj9Qg#S%=p3J#A4Cmme`u4fL>e2Pti;RT{^@VnGjM)S7Yw%!~*H}MDqQP(( zeewqmugc!(u)9NeeZ&aM26ndl2h_O@?3jZ|*HPkSqT3x<^q}juM}RV)rT1L$z_paP z0G@6+b{;ykzmIe8@1vF^xIUKNbHRPCud}#FEqif30hGg z|H@00C{dzBi4rABlqgZ6M2Qk5N|Y#3qC^7!2k6m+DqEa&4*&oF07*qoM6N<$f}pvU7S;vihglTi?ih=5gVu2*QWTJ-S)3x|zVCbQ@ja4~EXxB56#QUCa>Vba z@BI};S&L*8(&08t3VhPEJkvI-feulJ+b1r?BW*-}!EM?cuvk6^3;?hX1;F#M$1MqX2wZ|-0Obpyo&b2hjy--D z#9^ux1Tr51!{vcZ)ObFPw{6RzQ!6kwDWB#+2Zu2UP(B0r%L_nMa8KqF5I2DUmQR4g zhag?SeVLyHSbjjjzh+pZE4aUJ)B`pNIlzaJ0LuTnhX*#@?(JO#{HJv5Ia&DXfR-xHv#kY7%+Hz zrtCLzHnYICoK$B4kS_r~8TE4jm@fgbA$TJIajeElrB);= z!26m4z+v%BG%|p14g~6*EP$06Y7-=|o#;fmugT3toyvoO?b=5fpq}jm5gA~+=9w9Q zM|w3H>O|rI=9^76Z)~ya4gzEo5&*rvY3bAyll~846c8^aI@rT}-F(WHF&%&pR#QO0 z%g1K$1-Gy9W7hAK=ayIb!59eehbI*XK9umh5xp{uPb2EywMbL)4HXcJD2l=ll(_)e zUCKD6sk6-imY)E`GKKBl!0MYg+tb8CQ6K?`-b1ES6jXB=d1aOiD z!UgOT1&H&F+x%=q1;WamG_Z&v0hylwM7z6{athd5`~!ppWPYLvBB^`lMiO|nm8#%Q zc^PjVT?Q6~?Zkh&H-Ak4zGLJ21p?^`2&l<3lK`8AflcbZCxK6BZVahFDL^;4kOnqs zZiH09Ys%k~Ks^B%>v0nlKpjS!s_u~l#L5#3NIdSocOwND@%tsl*}%=YB=D-cB}QdD zpj=S_9o9m;#A87J-NNsO0&^-*58~x40Cq~#vW>y9(XFtc+1Z6x4lBzTF<^a$TZgqf zIDe@MKwPo_D(ma(G0^>J*KL`r{-E@Apu3gjcxz{XUK77F;BU114FcAyE7*j3s)95y zyn<>4`v7)IJavzONWNR8`(UZMQmroG*%j-*73##g@o@=40?E*9+R6W7vljEyGgiPd z0jtKx*CB=i^4*A^+^wusWdQ^jBP$RO5WpMXI5vzWnw%SApQv?e9Rv)VjVkb6^bh)B zFS#y(6;?-(1?po}u)e}ZQrTw$y<@~fdM2=O4-Z{2x*{2(UR%uq$tEZOjR7pCdc4U% z>pLSWNB~QCB+R5h1$YS~ny{V(?y>U$aZVsgNC2nN8vUgEKmcI^sMm&8Fe)m_8%{dL z0NAS!1w<2uM#wgV$t!>zWn=|s0?_ZpV(FU;0D4d=-MBe9Pz%*D}(c+PVn0MB{y3i1jrTEXoLP31`wb07zDAO~_F z2XY_>a^Qy#h>K_VIIQ5;3H>PYO}g-KTzq36J{3Cbt8C{?AP5&u78Vx!QQ%p4k*j@N zd~?$@9$G!TZ0T9@<01b7C@(&7FoNfIX3a%C3a2rGZBPPz8sc|IcC( zf&Ipgi9n(78;1cQ)DhAr-bQ~!1^!Qq#dq3W!(hO_3x!`YAn3V4e;6Pu2<#sr;P2X| z2_1sKFYEw-u({{%4F#Zr6{;Wzz97JRNFVMQ@Fsr7_D2FnNEa3Rk?($<1>SI-C~RZ_ z87gpD0zrcTmt1G_^TI40DS+hVnJ@_HYC=CcE^65dw8HHE7aU+0E&xbf;K=|xN(Bhm zE}M@0;;t57BI0u_#2IW#AT%E)D%jn06Z2V2i0PjSc`3RUh)&RhO3X+#%j*FM}@s%TX zL9ve)bT=;#0HSL30o_vJ+jcXx`rD7M{5-QEXwiq-gXmA?F@W&#mCMr(zSt>V9b8y= z|G)5ocYFZzwQ1+2uCD>G_M%d`3&33oh>NGZBQk&w`2b+@%RlRDnEYZ<1$^piLbhfWIMt_X;2jumcX*EwLLz_yBzQjsU6; z7_jjEAfP7zm`QDoM-PBYrRm|rr~tkI@clqLIB?ympZpann9@rASU@iUQ2h8q0H&wE z0-#uY_glR9S17#wpP88?z%Op5Du6{WHFbc%H=6G}FPCotaO>I3%ryY6C4kn@3N+2{ zwR^>q?O^ir8|7P={Om0R_*$T0V_(<=DsY8|@ATY~Z(HA%Z$;5_1g=HVGX&JBs{mda zu-ie;ZUBJKB7pa4K$*+lE(63Lsj-So4iw*IK;iA76$BUUrGi~PW)EWnJ+b+*{fkQz;W=;12{>*h8?Wey9fYVnLBP1s1E?3 zJ}5yS0KiUT#{xncM%M}1Fv2Lz_QS(-0IxalngK@u9EG?U_uMgorv$WLKS7`bz}2IO z&CGG~Kc;8_4z zlLEL0SnZ&Xw~2sBBL{LI2XY_>av%qCAO~_F2XY_>av%qO@WB57%yfh*I#pHe00000 LNkvXXu0mjfl~Pgi diff --git a/data/tilesets/secondary/cable_club/unknown_tiles.png b/data/tilesets/secondary/cable_club/unknown_tiles.png index da68cdff2cf7a26f4e7f0534d0b59237dfdf7779..84e79f7201055ac6ab4a8057891d66e452741c55 100644 GIT binary patch literal 311 zcmV-70m%M|P)H)-#Iz-X2(82h2!bF8!t*pAe*@uXX=2>(-2hUL$e$(P20Z`(002ov JPDHLkV1f^0i)a7< literal 287 zcmV+)0pR|LP)dtNvEX;+eA2k#0#Jvz(}dZYP2+=aKsJnqQ%bUYeOr!_421 zP)A*@A}DM6B5{JlCW38Hu)Z>!!-DFl7_u@b*r|j;UBZItgkj7HMhvV#5=eqpFymG^ z4GD-eHCh+1tG$iJ3mT&xd4UM_`MdXKi3mu$^B{v>fgbKWP&Z6q_rQ(|6XbRe?7|pC z(BwXWfu_(;08OEvAo}^wkLVJBQ*d2KF@ZkKI~HIU{3?T8@MQwK@ME1pL?8kYh(H8` l5#0YF;C?(~eEZ xdBmg=)8I0zTiQoSSGSeXQ&#U#?*^esoD3!whI6uXu5SQo_jL7hS?83{1OOZS80!E4 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/cave/anim/1.png b/data/tilesets/secondary/cave/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..9c92be8079c0150fb23dbc44adfcb71e0258d328 GIT binary patch literal 126 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDOXPy#}JO0$sXQ*-pL+*-kv}f z>!u(l=LQ#!2_D6T%tD!&nhJ+lT^e@iWg3WaJ!DggS#U>$M^(?FL}ABCHHFiLR~Z?? Wj11kXtQf;V279{txvXuK=QiDrIl$MW@iAfKmr>vgR)D1$DI2q!Tw6@%kaL@;7_jL7hS?83{1OO1j7$5)u literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/cave/anim/unused/1.png b/data/tilesets/secondary/cave/anim/unused/1.png new file mode 100644 index 0000000000000000000000000000000000000000..47e7e17ee95fdaf34d342d8970c538f9829e4750 GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDF;s%#}JO0$sD|#yr~?VyxgfA ztW0eN0@^w}M|{0myIUJOOgeNX2y!Ja6j-UC#CwYOaKNNCXZ9xPM{Jv9f@K-%B(?dz SoYr3tGSk!5&t;ucLK6VDI~^YY literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/cave/anim/unused/2.png b/data/tilesets/secondary/cave/anim/unused/2.png new file mode 100644 index 0000000000000000000000000000000000000000..d1447cde23dccd65bcdaf90921fe1212241d5db6 GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDPvC;#}JO0$sDXqY)vi_6FitV z9l8{>P)Fxg(8ia(%t8*a0b*vkih2%*SeG2(b!l0+f|;SVN85&t)#oF~7*AI}mvv4F FO#lvr8~XqN literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/cave/anim/unused/3.png b/data/tilesets/secondary/cave/anim/unused/3.png new file mode 100644 index 0000000000000000000000000000000000000000..8ad81b1e1e9daf31260a661bd436367997d4f31c GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDFaUz#}JO0$sDXqY$}IzMLm`* zUDTl{n7Kp6p+#G-)5OQ{dcX|Xl?q{5S`#=9hp;nbt=1OT^vItMGQ-o=&t;ucLK6Uu C+!_4< literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/cave/tiles.png b/data/tilesets/secondary/cave/tiles.png index f905c6b21a2eea0257ab6ac7d833c128d69ebffd..e8c98dd71fed4b99cb85594fc7cac435646039ab 100644 GIT binary patch literal 5884 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 S^9U6H0000>lpAFMRrHM3mA(kwrx4L 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 literal 1638 zcmV-s2ATPZP)UE6aa8-duR#;qwQe}g={ToLtCS;$cMs0C`7k_3jqgm$t^wxvQX^PvU_M(v|xH! zf_uo>(IL<#hk{Eez1IIip?2ha8OGVrv($MSjWimMq=~dNU8+Zv7|Hr&-pptuS!2b+ z(Zu294CTKMC|taOfXc}SH~fh0zY7kcOUqz&>`_OGli>zo*z*iki)r6;_0Wo{qz*B`lLNWU}+A3 zuAwESaM|Tj(3a#%KvTHvY8v|=XisE-s&G`MDO`5B6l8%Yh41<-K#O}$0$uj@HDMjl z=1T%}8VHGj)w+RWwa%wN14iPYf&6XFFgg|i4Aa0riNL{+cF)G^Uv#Xt5O53=htWs` zaOZ*|yudXn1pYq4g7NsPRKQLF+_fXaczird2l@;UG;BKnJjWai%!Zc^*bLCIET&Qw z&vi_*G0Ot_$$;k~H1m=HXayWmE6f2Tf8UXxW8)gBp<4E0#w}Pv@H$C}HnQ0OL zNnuN4KYI#+nmq6c{0#w`LTxAyKx@F0FADgTSQ}@L}1ppFv2b={@d37r% zfP%-Bxq&c+yuj;ALDO>p%%}{na{)Ak+yEUA^8wq<<|L?t+(5AuwwtIhP_zzc6-0F~ zzQqFy0Qhyv^v{7GZ!mB=H2nCtfccp)w|UM4J#h}W&2uK&_Awx9r{KD9mb6{*lDGLW zUU;S`3(s^nAx*^{q(3c13(qy}gXichVH&35431NaFur&Ho?2D)BEbDB1Mn>-0W7NO zC<6GF03fZBF`y!(rUP|zEx97m+mBTB{YNMR@Y8T*0hnSH0j5a+cQzHKpsJe2r4R#7 z2S)^$o`?Y*k6HRS2C!4{!W3LIC(W`0$z@ zjV!?SMgR<>ZqA%W-4p}xI|5*5cKirRa5QspF+>0x*x2D;v#qd_51<{%L#O!wqfWcB z7$El($-pU8p%1uo6FnhZ%bLMLccP=X2&f8yUT^=R*P{R%>l{Gt0|fv?3|Pm_I1ivh zaS2{-ZZ=^c=Zqi^s5&V0D9sB zv?sp8{Yrhv0IGPhZ}`f6hv;tbrW<(sve$y^YP?7Q3RgVx_ASer;03WjY*dbR_=~&X z!W|ZOg+($ROm4;z@G*0>!ruP#7g7G$y+aPBiKj*sW%(jaQq;&!LEa5i~!dWo|S2|n#~PZ*mZDFFkf(TQ|}c- k_Y)kD9!+L2Wl_5SKNfR#FdT;Lj{pDw07*qoM6N<$f`upK-2eap diff --git a/data/tilesets/secondary/dewford/anim/0.png b/data/tilesets/secondary/dewford/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..adf42975fa65c184e93702c4e1cbe83c549257cf GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq#8V3978x}hMu$KYc}9veNe8R zzt??J+NyRPTc4|5C5aABOr6YuoyjRLlitjl|KQ>5oc-*Yo(lWJ4Jww~c1l}$u(9t= zkS&m#+Lw32rR9$4lj{1e_nyA>0kvf|ce1twO?>{5GtSPqB5I$M$iFtpAIuaCP1a+9a4pUXO@geCwWeMSrb literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/dewford/anim/1.png b/data/tilesets/secondary/dewford/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..6e7c23a18caae63f0652d852a2c53885fa3234dc GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq#8V3978x}=AJX;I+Vb}`k;Jy z&OPPW|0m7=bhm4YmK17mh}i^i+q%idBz@W*;(hjmU7>%L{UN9`^S*`!cyO zInghS#m~1CIfw~9`KIKp=fN1Nd#LUAv{-k|{8L%>Pxh@o`0-Zr`N9vUj#uh!58tqD j>f$Gvs=7azzn!gRP*iR4yR9v53UZUDtDnm{r-UW|1ItIe literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/dewford/anim/2.png b/data/tilesets/secondary/dewford/anim/2.png new file mode 100644 index 0000000000000000000000000000000000000000..86075ffb0b7955064e20f4ad12b7b449678e4981 GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq#8V3978x}rk>l#)odWr`tY+K zYnsk@I9u;I{}PwRoMe+pj!z}^UIcfw zPjUF+&{V8u_1q}#+}0WS&eeBZo8zX>T%z=EhsnOX!Fwc{o_@@`P(O|H?yfZ7dt1G` kZ|||M3)NL$`D4C>b@%$tr06`&43L{VUHx3vIVCg!0Q}xcXaE2J literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/dewford/anim/3.png b/data/tilesets/secondary/dewford/anim/3.png new file mode 100644 index 0000000000000000000000000000000000000000..6e3c576214a9cb83b23595a3a12a392e79349546 GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq}n}Q978x}rk*q8I&8qhdZAw3 z_p9xjtCRmHXxRFAD#lu|FquAakS*fTj}5U@%T;8u72v3K%no@`-O+nx!AB1EHCBPE z-9I%Z=p9qxi*%W=Jn)y-*D{k2ixj@jw|pyOwCzr!bhfkg(~{DNcmD04vv(@4f6X&( qV%fYc3h%2`E{h+Vn-cN*{cnDwrWX56UysfQInC46&t;ucLK6UJW=Q}5 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/dewford/tiles.png b/data/tilesets/secondary/dewford/tiles.png index f7997219729f6cf6f8b6f38818a3e4f7c7081868..1cf4c165c4716f45df69ae3c125c82dae56d45bc 100644 GIT binary patch literal 3985 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 literal 3756 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 diff --git a/data/tilesets/secondary/dewford_gym/tiles.png b/data/tilesets/secondary/dewford_gym/tiles.png index 1dad6f205487b07654f468a7c128417f79f5403d..7d923b505c596b99dd239a53d2ddaae7ae151784 100644 GIT binary patch literal 640 zcmV-`0)PF9P)c#H5Jl$%Miwp%1g_-XfX&ouvTjniGT|FAsnoJ#lZJ4SJ}lfCS_C|Y3&J;8$%qq6 z5TNA=Lgvqq5^aK%SqMm`c=%clmz>e(ER_fv0EeJBj#CQ5FrqBW9x7#iK$$xzbqu8t z=KhY!X3WcaSat5Z}w|;mZyD3>=T3PE!>d2oKZLj1QTF_ z4iyvMry{!2FX4bzCw&BIL>s+%pNui2xdc(Yd4{h_siI2faw?yL9C^<<@&J9YcnwY& z=!1Qu%P;B+Tmm;`>=IG;oqkcDx2`+dDCve&-lZCB*3u63?KR9kQ5MUX%H<8z5LiSZw`|my8UcF@$`hxpcgZKB+~dZ7?1mb zv~_*z1`|s~7-fu>a$JI~Dzb>`(`~8d>Mw4X;5XY*(6!dGt>3pMr>^DmH(P{Ij7B+8 aXx(2)6!Q3v?xS1)0000&8RhJH(YV-}%OkTNZ=|W`a?hILr3Wc7d1K~H25;SdW z7%=k$m2yYk=?^Ja`VE3DlOI0v$n&g*7>K}}$#g@hDU~sGFUCA|zs~TXl*(5^tXAiG z8vv4ZAMluj04Ze((}nmvV6Zk`9z%fEdYcH5Btr)4m6rhk8c3JWApI2g@_rWrvY&dZ zT|xr_e8^me0pBMW(ECAvfVC@^yaiOYUX}3;yfSkAd5>vaR#$sBe z-T?O3S#~=C!1WId_J{-BF#y-!H>j@hc^C(XD=Ed7(4e}>&0!MYTx-!9d}{!iNz5d` z85lqne89iME=fCk(4K?P;Mb4=0A!jMcT)`P`spB9&<{LFrI7~5mi}Gv&jA>yHrpE{ zAfPDCv8cxZa0YA`upx!IE()AK3V<_U(*Q`J88K>b~2n=`=>9Uzq2F)Iv0{q9ozUL*F5x{{B kO85N;W$o_)l(;+p8FQNQ`1|fr6#xJL07*qoM6N<$f{sKCxc~qF diff --git a/data/tilesets/secondary/elite_four/anim/0/0.png b/data/tilesets/secondary/elite_four/anim/0/0.png new file mode 100644 index 0000000000000000000000000000000000000000..806d26e570e348ec3620c361106211e3c4e24254 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^93adBBp6ht@Pq*=B~KT}5RRG270(|%I&|Urqwg$E nHf4ooi4|Nz)l83^IMan03?K2Qrfu(10_pN}^>bP0l+XkKy!IHw literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/elite_four/anim/0/1.png b/data/tilesets/secondary/elite_four/anim/0/1.png new file mode 100644 index 0000000000000000000000000000000000000000..2a8e6a31c92bdc7b8b674b1697a7499be500d051 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^93adBBp6ht@Pq*=B~KT}5RRG270(|%I%IJE=zGqV oiZ_pP4t)?&`NndjRp^`=gXtyy*8Pm%j)8P}y85}Sb4q9e02d=1X8-^I literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/elite_four/anim/0/2.png b/data/tilesets/secondary/elite_four/anim/0/2.png new file mode 100644 index 0000000000000000000000000000000000000000..c4e6161a6460547b89689c41e39ea885e5ccd309 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^93adBBp6ht@Pq*=B~KT}5RRG270(|%I<(>3(f6D! o6>lEp9Qq)l@{Q$4tI#<$2FpYIOI0sUIuFw2>FVdQ&MBb@04m2E)c^nh literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/elite_four/anim/0/3.png b/data/tilesets/secondary/elite_four/anim/0/3.png new file mode 100644 index 0000000000000000000000000000000000000000..2a8e6a31c92bdc7b8b674b1697a7499be500d051 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^93adBBp6ht@Pq*=B~KT}5RRG270(|%I%IJE=zGqV oiZ_pP4t)?&`NndjRp^`=gXtyy*8Pm%j)8P}y85}Sb4q9e02d=1X8-^I literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/elite_four/anim/1/0.png b/data/tilesets/secondary/elite_four/anim/1/0.png new file mode 100644 index 0000000000000000000000000000000000000000..7822d18961b5f398c42697c1279043b8da3ba999 GIT binary patch literal 135 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDL+pa#}JO0$v^m6cr;uzCUCF{ z#Xmgqe~Ss5N$J7_B@v$^&YfFKHt0lrWM@mdKI;Vst0PrpmVE_OC literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/elite_four/anim/1/2.png b/data/tilesets/secondary/elite_four/anim/1/2.png new file mode 100644 index 0000000000000000000000000000000000000000..09fb59fbf70ad81c170971b11f6bb97d1cfefb76 GIT binary patch literal 1260 zcmVQGM5QXas@|<8aIf3mP*jLcb$$46UW-odcT3ZgFz1gBy0tATcYz?T%b%1ViFU)h6VD_FfN~zTwm3J#lh=F(k0?;qpQTCpqo|<4%T*JL!X;@}A|qr@$rip5?sf zIWO@a-(QE%8`u#yzD= z0JrvTF7xtHPnDZHQJdn5c_X@L|BLiQd$AvGOIiaPywHxWKk+)N~ z=#aXe1L~Skf(le$ht74}0hW1n&RgcZz;(IFz{aVku5%r?tOI(Adg{l}n{jSvG4wj> zb=2#qx1ipFdJEYz@1A-0%=?-6!n|LY_cQ0Q=R8!8znt$=9pCoL51_Z8-aYk*@;B<; zQ)<@ZhS+l+d(LC`(tjQ2(ZPkpkKmVoU2jIc8TDo_{ntV79_}Q%E?)|}d^4!y)%T~f z|JHnWoNw;#(_?>QzF*aQ<(KcNw}9T_a4{bAi2KJ2Z}#?U;+x1l&3V=I_{>#TfqcMIo_TTk+9r@d2BB^KEc^qP4)*ug72Si+Yxb|LxEN zG-&dO!ogP=Q#x!~A#M^_o0s52BXJb8T-i2BrHz$_Ey>VCV)?plw3vwC^uVgS|A!DZ#8NEVMs!wI%qo z+yc$ZXZ;%6HBmx?rmNf_Olmq#Xlw0r)izwtX1S%?2wO#4)`wj{=( zwpiCrQjG$muaeY0Msc*63xH2ATCycVL!YL`Na-EQipTN|!Bta-gOvlZ=>?YT^ENRK zo?H^TiG0>P%Mr94No?9$>ZWXfWg}H%49YS&F7~L{oU|^K7$OpNkMRMXAv-mxh=g8M zIDYITz?Vqhy6nUW28Eu6h-tZmvtT_u1V?#vZG^q7t~O$?FvgI_&F#d1`P8_QYxO1oS`6c=nfqHtAJU{lxd$c`5!dVRw z_~`8#kKrN7d0B^b4@_AI7ROjs$JLBkcf4}D{%3wHUwHrICGtPMi9Y~7 Wo~LxP@{BeB0000+hAk?JJ0Zj5-KqBwT9^8K@ z#kHNJ8x+MN1?s~G$sEpb{uz$wdNdl*IANTg#tGMSGX}24<1vkHu76;RX!H@QqYwPw z)kk3T;RYC8F-8M^KDYZZ+5Pm)?yYg(`}q#|y?~Cf03J(V@!RRb*RrJUPL?FZ{R$9w z4ACRmmHbqe3{fU5XjKAtCH9KdlRqJ`D(?Be@9J-voR$T9E{oUwU7$!Y5(+j)rJ;qN4mPbrVj&+>Tx{*tigzA-oL+s{T1wQ$^Mq??+be=PS9~ZI*!}jKkvUo z$1UIeC;H`I_s18TQKqMp{yV_m68Cqt-@qYQ&x@noE3 zGeO#A8HKvi~hb!Ir7do z6eeEMRJW08sWde#NrGfVPG7c-Bo$yBopEHe)6^O$q%0sq0OXo?1i;&dytkfAXlpXw z)yUlK84XO7>pfpUImFm2oTWib@@iXSq5XwdTL!XYXyk;Z2*iVh_(Z?;#W`I9GQ3Xd=L?b zLU5&a6glbWB^T6rvIcQmtqnPiHj^$|&MlHM$SqiFC|V>KTph`}5Xf+w84tL4Cdr=R z8}8HCC|Wy%w8Alc#o$$C{m{yuvFjadSm%9YJM`p+A)CN^)kzF5^@KvxTC&Z$0X7ZQ zjZ#QUCA-k0W^rPb2~v!}usvo29Gi3^uNe_q)wq7FB%slWy>zJ)a})}i`haSgh`XR2 zdI%lmpxOjy*-m$)rzoRO zgSfo*+Bkz5p&7a3sptCn*NL-jIHT_2BkrmXz^&62wqY3kHOQQEkq>SNUF)gJbZ!j<8mI_JaEX2 yusFl2IIboXhvUdS^si}K8hHQYBl17~7JmX@e0q$t!&WT-000051L~d)OL6HxQP(wA@6J&RNPWJ4)cb_bRDTAs72*vEGXHeq)u2zHr_@IPc-o zeLRV7k(>VLh7kVSYECk7laT6iDjXwD7B|j2Y2>6 zgVhwWq~caDKNV12D+5s}k zaEz-SgNtGzNV}q-&^DS}aFU$IA)os-c-qlxVDFm6%Y6}NiSqA9fw#IWA5j>LzJ#S_ zw1_J`X&)VV=Q|2BFKMp(NUc=q>=n+^At!mYZL!e*$g4erKd$#cce&R!IIarh zJ0uT&FKMmYKx&Kb%6^7y_&3|JU_78t)Gq*A0ItC})DMe_erf=*ybXY{gr@BPt@xv- zVTsCzWqE8O4u#}O?I?25(M!Hi=gAu6?X@=KG;Ahav|L*xWl&qN)=;!4Ft|37bs>;p zn;8$dc+rwQ!*}e{*eO~&gR;V@e8u2ZW&P30p0UdU8}9QyavVIlVaP7U zp89~>G7)b#reM*v?PnB&LE8gcndc<#O=rF07%Zse`2tf1TrIh($07*qoM6N<$ Ef?!!oZU6uP literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/elite_four/anim/1/5.png b/data/tilesets/secondary/elite_four/anim/1/5.png new file mode 100644 index 0000000000000000000000000000000000000000..d0cbfeb57cff3c941397618c313b781c0c15b3f2 GIT binary patch literal 1248 zcmV<61Rwi}P)^F#!7uaB*p!G5BbIE{nH+|9BLI9t4X)_lej5VcR16bs_fJELU6j1+P za-29#+M*~H4bU7uSmEd&&Obv+KHrSSGP%A1Cf8Roo=k3JG$uxqABoR$H5y;b1pfp^ z0G?%hH5$oiLg1%djVD*~!w_;2H|gWXz}1LxBgRc86FKGm)aMZR06sh3i3O}(|W6m6Ney_~;}{pcFx z?b;79FaNq;O1+eN>G_=Z^GD$9!%`k>y4JNsw>n>ae>nSZ^|xVvyOut8T{Fb}jsCu? z_iA3gr{2S0N&2E*g4bMjzWUzzR=kIXzNj9H%hl6@QYsO(NUS7t>t$|(JBKt}?L!ul z+*vEdQELerD77|2+*62>#FbWTj9PqwkZOC-qV-n4j>{kCR*XAD(KS@e0nky0Q(XEK zoFp?P)+LFAVsFI-r^R_}@~yAI^Bc7Vj&47D-xu{FQUCpb2QX;*JELc0&#QC z+MIajD+yDt<<{0w3T>=Zw4{e7BFooxrNsmUN0&Rvt+P_+aLAN^4gt^`z7YUlR^ol> zB@cBWxpxIBcSoW^h;f7RD;S3yM}xgo$SL0J3M|w=akVD+xH$sV<-2Z=?V2FILh|5` zS~j)_Vs>y>*HdJ}PZW*AnGlcgN$MF;CV<=HVB5!8DnIW5wYUpFUJ6XZfk>?3qnBoZ z%A3XfWFj_&>+1(z*-lC1ZZ#Uh=5kxRrjX525RbrERClThu=i3sKxVx2L zrw0lI*-fW~OfCLr^=60FxRGN(x6n4shU@1lcuZZ5iLEfKh1nvw3b%u?+rc3N`D4K8 zHX5E*mB+y0YN>dH;3h5h5e+TT(7Y_9a;x#2AU0000< KMNUMnLSTY5*JyPB literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/elite_four/anim/1/6.png b/data/tilesets/secondary/elite_four/anim/1/6.png new file mode 100644 index 0000000000000000000000000000000000000000..4b35ededdb4fc28243cd2354e553dbc952523d08 GIT binary patch literal 1161 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 YKWTYKwVw4c=HHTg=)hr{Qfnmke|y5|;Q#;t diff --git a/data/tilesets/secondary/ever_grande/anim/0.png b/data/tilesets/secondary/ever_grande/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..7536d08ad1a80452afd07dbccaa324892b81f8d7 GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsmY!$jv*W~MbB;IJ!Bxla$$C( z*eY+8t|g~9PAptl8kW#t(#LY;BwL56k_uP7x!~N`ORhIt-)ql%XCBX<r2Yc~zZ<)+3nvyZKQZp@ zIC)plTt49UlKH~?FGBA`2=qsad#LH1nl*8c*Xeis9?d2%%_R@M1Ub{w)z4*}Q$iB} D2AfXN literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/ever_grande/anim/1.png b/data/tilesets/secondary/ever_grande/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..7536d08ad1a80452afd07dbccaa324892b81f8d7 GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsmY!$jv*W~MbB;IJ!Bxla$$C( z*eY+8t|g~9PAptl8kW#t(#LY;BwL56k_uP7x!~N`ORhIt-)ql%XCBX<r2Yc~zZ<)+3nvyZKQZp@ zIC)plTt49UlKH~?FGBA`2=qsad#LH1nl*8c*Xeis9?d2%%_R@M1Ub{w)z4*}Q$iB} D2AfXN literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/ever_grande/anim/2.png b/data/tilesets/secondary/ever_grande/anim/2.png new file mode 100644 index 0000000000000000000000000000000000000000..f0835aa3b83e07cbfab26d3eb1be60282fcf4100 GIT binary patch literal 197 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsUA-k#}JO0qUSd99&+GeycIT4rP26_k{`Y(TI@&4h3h|ixtbN)n zrYz@graFBxg{f+Hj<004pEq}T9fSX4hGesxUFm0*X}_4JodZu%)tiKSR$wlVm)B=! zZ(r7}daqw~9jczQS3TzV%I5udt$qJCoHyYUc+Z-B%P7s0`-KoQpG=&FjO0&grBw!t y^Hv^Ey?ENm-6mwi-`ag!8KpljTI04YOscFtQo)FeSD9lU$cdh=elF{r5}E*x$VdAC literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/ever_grande/anim/4.png b/data/tilesets/secondary/ever_grande/anim/4.png new file mode 100644 index 0000000000000000000000000000000000000000..7536d08ad1a80452afd07dbccaa324892b81f8d7 GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsmY!$jv*W~MbB;IJ!Bxla$$C( z*eY+8t|g~9PAptl8kW#t(#LY;BwL56k_uP7x!~N`ORhIt-)ql%XCBX<r2Yc~zZ<)+3nvyZKQZp@ zIC)plTt49UlKH~?FGBA`2=qsad#LH1nl*8c*Xeis9?d2%%_R@M1Ub{w)z4*}Q$iB} D2AfXN literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/ever_grande/anim/5.png b/data/tilesets/secondary/ever_grande/anim/5.png new file mode 100644 index 0000000000000000000000000000000000000000..7536d08ad1a80452afd07dbccaa324892b81f8d7 GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsmY!$jv*W~MbB;IJ!Bxla$$C( z*eY+8t|g~9PAptl8kW#t(#LY;BwL56k_uP7x!~N`ORhIt-)ql%XCBX<r2Yc~zZ<)+3nvyZKQZp@ zIC)plTt49UlKH~?FGBA`2=qsad#LH1nl*8c*Xeis9?d2%%_R@M1Ub{w)z4*}Q$iB} D2AfXN literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/ever_grande/anim/6.png b/data/tilesets/secondary/ever_grande/anim/6.png new file mode 100644 index 0000000000000000000000000000000000000000..9b5030306330e8e9c2cce6fa7ff0c50eb91da06d GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsR^Dgjv*W~Mb8=XH8}{dUZ`i2 zmR{Y@$r=)K@M4$Hx(A|S&DV;UZP|H`>YP26_nl4p-J=V8{&?2av8kL_=w9t;xJp_o zY}%|>>FIl$*2yS3EqbkgWbb6jOWtnxGh4QJPAvWW!ISw^X2s(lKdf}*y-yqTcAT>n zG>;9;?n-#XdGN@Iri!!M-jpX9eCpetzUI(j`KngqfQuKq)j@9bboFyt=akR{0INz* A00000 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/ever_grande/anim/7.png b/data/tilesets/secondary/ever_grande/anim/7.png new file mode 100644 index 0000000000000000000000000000000000000000..9b5030306330e8e9c2cce6fa7ff0c50eb91da06d GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsR^Dgjv*W~Mb8=XH8}{dUZ`i2 zmR{Y@$r=)K@M4$Hx(A|S&DV;UZP|H`>YP26_nl4p-J=V8{&?2av8kL_=w9t;xJp_o zY}%|>>FIl$*2yS3EqbkgWbb6jOWtnxGh4QJPAvWW!ISw^X2s(lKdf}*y-yqTcAT>n zG>;9;?n-#XdGN@Iri!!M-jpX9eCpetzUI(j`KngqfQuKq)j@9bboFyt=akR{0INz* A00000 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/ever_grande/tiles.png b/data/tilesets/secondary/ever_grande/tiles.png index 0f3689c243ae13a7a05cc1b049d17bc98b173dd0..943a3f8f421e748fed59606e6051eba6e858244d 100644 GIT binary patch literal 2208 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 SN>7jg00007%%6EP)3fcfPUeDhL+E)9?59 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 Hu0mjf$ogN0 literal 4602 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 AO#lD@ literal 771 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 diff --git a/data/tilesets/secondary/inside_of_truck/tiles.png b/data/tilesets/secondary/inside_of_truck/tiles.png index 44f923a5a2d0b3e7785b4f4d0412ec167df3ad8a..65a82e88834c8cc249b3b42c6f0951c9cfe38174 100644 GIT binary patch literal 545 zcmV++0^a?JP)00000dm@~c0005#Nkl>*r-X#-VgdlVg!bGFz(9fH0 z6{L(J1;`iCd%TWVz7GPH_n__jyVZ*A@dfl&5NS{@2!b01!7YQ-ixFv1uBk6gL4u5e z;0n>B%= zs{2+6Y~9FtKI=x7W=p(m!8upa6Gk+(^r7uJE|gJQp}sD}C@l6fHG{=D)}0-qi^EhJ z5;~{aHPYuLIc literal 514 zcmV+d0{#7oP)X045b>IzvQ3F;kaUpm(|3 zz}@BJ&zhUL3BTKK+2p)~kS8>@^kE76`96|*IB0nQOy9PK68}VHSra`ur*J4BdQXCMH*0#G>XhX|7z zp%Tz90X#&Q?`ADt$sPbC`9CMEzQjNJ?h0Ji{KJE+%ZiqOu5(llKW4tQVzg2V(gE&|X< z6L1`X1mK4V5vvW*-y9D4NE)>kTtyY-2~)c{ntd{SSY*8_BM$|--;^=%I?0aY3N1CnTHDlAcIbpQYW07*qoM6N<$ Ef>1Zrvj6}9 diff --git a/data/tilesets/secondary/inside_ship/tiles.png b/data/tilesets/secondary/inside_ship/tiles.png index d4b0471b200e1115a5899d96b81a36fb57be0f99..77142a7553ef7cc3ca7cc07c8d85e35cf59b395b 100644 GIT binary patch literal 2149 zcmV-r2%7haP)^qz`x(wGy9GlXL!}gjb?|YA=_(!C~y=ZSYfLQ!6Lw@9toR4pY zj}$%@Q37Qb78_W^2upwl7SX|yz?pO#giQ^_m^~tVjdo|ct_N@k!5&H};Xx?WqttFO zSf@ybT5Ew(7MatC_E^$o@QCnrBXxd^fs_+5kx~XpK#tee`fr_^N+5Uw=48Bx$ zQ-i|I!4;Ga8UZBm_$8r|&|!hNad3sISA-;7KLRQQIP3;F?ADsn+5NW`y)s~PvCZ0K zxWIa3pHBNRnYA58Og2|wGui9}){{rTQ4?q`+ATI5d-4PU*>2(1-KS2@13Q}oH{W7@ zetBKt9ue|8l=~cqI}DCjXgK!d$)eqTDaT?gW z@X*bmvq(3i_(!@KbQbAmq$}IMY%aE$bp*qm*l^f94Qyxx=3<+%;TlEQ^mCNwwK&iw zV%U<``oS~EfXoSWn?67LtKlp#+?3J9SurevT%4aiRC>ZbnE@ldj?(dEI2$Hh7hh_0 zz2Wg@I@*n0ml<`>-tMLm#kxii`hxIA)%esHNt+?`g+Xvx$G7t?jlZi)rBCudXv3%3 zQVLHAhY9exFX9Y_9{89DOHQ>f|1|5D#lL=** z9bpXpOp>-5tx&~#hqlERiyNAyXO@c+>>M)C7c6c}>D72Yh zd-H{NF9qwKupGH$Bo~_#a3I9E>ij(CczR|MFYJe;Ciu&pa@RsJ&!Q}{FyiE$48TW7s9`Oint0VsNVe{Dvkr-oHuK4j*jKqr$HS^p?cT$Z#2-G7klt`n_a#67A}RkO|0sIn z{W0E-Kaj=wm-h+RC0>lj`#)?xpI8=rR!Y$X{1v9+%EqJ|Rf4?$suOy)CX1KqaJOaX z1D}#6#|R@*(cv9}yMQ|Wjl|tcj^2xk1l}Esw%mD1`4^d+fBBYDFYgm}!u$(*@TjYc zqb3mNU%EO&Lseg&AJPH57cZcN>*5#pLW4wbgsqfJc`YT866>Tzi3+>1v~?BS$Y$=s ze<}jqI;^@3J-9^@m{V#5U34{ARLwYI(ktjJm48X5hSWfG`V@191nzw&${!rG97?;w zVFy=Q5|QmHfY>>P=p9#hujmWRoWS2TPDW3JHyTw13b%pk199@?HmcPJRq^_EwHhQj z_{$F`y0f2&a=r`kS6Z9W<#~v8i9eWfV9>WBgWs|3c3b$2sitKy5C4Rji*~!M2(HjH zZ3&+1xx#MQEnzp?&0@s5HdPC8E}hJ`Mz#Djx=r|ByF@@x5`AK8fE9wsL+gZWm2_iGAx|;!w3#w#w#W zo3Y_M0ay92-Z8>YV7?;wDliw@j16Z90ep9r{&95y<%dbJ*AHNt5-2oW25-ro8St-; z4ECg_PdkB&Gsxu3`_oQ8*K7P6tUnu~x2Ao-!xiOuEl4k%G}V+ws1$3JvW6`@d6KR$%(VvIhG{6`UvV_gvS zIQ~&2oKsAkKSOj}?YcN7dior(xWgc?bXx!%3x9w8~5Kz*Tq$B+mb}Jft!jhs=lS<97lyhzTWvbb1C2{eN*dpaW8YSZiOCEy%(h@e?-4$=F z)YnK)M&nHEuw5+Kua9B6MAA&!H brgi@XRutqT-6OW900000NkvXXu0mjfN)ZyX literal 2016 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 diff --git a/data/tilesets/secondary/lab/tiles.png b/data/tilesets/secondary/lab/tiles.png index c2a86a73da5d8c8b1638a61aedcc97e7177c2979..6a213d9609dbc272e77aedb46057c42a828ada8b 100644 GIT binary patch literal 2844 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 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/lavaridge/anim/1.png b/data/tilesets/secondary/lavaridge/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..7cdee79e24685e0915a7b2fce39f8f02a6f5c66c GIT binary patch literal 92 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDP>O=#}JO0$v^m6c$gjj?5+N9 pfB0^B`G4a()!)TVF?BCo#multua5i5Nw0X2HcwYSmvv4FO#laP8(RPX literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/lavaridge/anim/2.png b/data/tilesets/secondary/lavaridge/anim/2.png new file mode 100644 index 0000000000000000000000000000000000000000..b5810b80631a560dbcdd31d4f7b8161665292b61 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDS1y9#}JO0$v^m6c%BHo|F<{& l$M<)4tvMK<39X*)k;~AlROdZgwzCtY#naW#Wt~$(69Anz8DIba literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/lavaridge/anim/3.png b/data/tilesets/secondary/lavaridge/anim/3.png new file mode 100644 index 0000000000000000000000000000000000000000..caf7b569835b7e3edd654797f57b762a68dee3c2 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDQ!;|#}JO0$v^m6c$NtN|M&m* y`44g&4r}Ta3#Xb6Mw<&;$VRMjj6U literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/lavaridge/tiles.png b/data/tilesets/secondary/lavaridge/tiles.png index 4886aa28e3736581ac3319ede0f666d73a455bd8..896c43194b1349e149d234b25a6df5fabb801378 100644 GIT binary patch literal 4215 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 N002ovPDHLkV1nfXKN0`{ literal 4087 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 diff --git a/data/tilesets/secondary/lavaridge_gym/tiles.png b/data/tilesets/secondary/lavaridge_gym/tiles.png index 0865ea20766790f98204fe33b9c3802f9a4e38d6..8734cc3bf2d63cde6c5ba99eff17225e8ff99492 100644 GIT binary patch literal 713 zcmV;)0yh1LP)mf3c12v!V4eWc(j-ce!d+Cja4UwAhD%<+$Q5`dU|+!-$u5W~n6dN( z$oc=hk*zTj@l4nme{;uqhPh#;J?SaTn;{l}|LiQcZB#s@d#eC)p^BK-} z#rc|2ARgnridNfN%=dZB`No{@kb;Iod71JQcn)NlhrlzChrpEBSjhlUiF(~>$Cs~! zj%szfx@(kl84x@Yql`G30j-6@wm$f19CuFpTO!;>7a}Sb)*{^K_qQM4sq6Exy9vl1 z-3Yp_+;W>0LlIa{JWrxq;_}XuI38MOQN*5uCo-Yx0oWUew?7_;RoBs?2NWqrobQTC zb3o9E&XW`)b{#NZo2o-#ckG;~o>X^ER}On0wT9com%?FduT|wXY*vf4!`{bRZ{+xn zQsAkRNq!QXOTPL(kk90)^Cy#&;4G7~pgWU!uz;z%Gr-Tb_n+FLg{X&qU~#NR2E=Pr z>1-HUxevphbE4{WD|5ZuTGN zpMLBYM9hVVF3bd5tGJkO-}HR>Dc8EmggZ+NcHfw5!rX8XA!ecKO!WN%xK}yySJi*s v)8+dT{o!qs5?oHZU)`6QL*wHTTn^R0WKWdkkc1lV00000NkvXXu0mjfhW%RO literal 631 zcmV--0*L*IP)M4LST z$b-z;NXIL=Hh|ksUZfzpUVaF8M7b`SIyN$_0pANiD}4{>l)F#`B)ICJ0=Vhi_F-V7 z{)0|Dztr)p0DSux&^ILtcLFL7GLda+0aJuL51~b*V>{VVgO|>~dcY9!Aagd-@oI;I z>}zmW4w>GaII%DeDu7FdC`fr4qiH&Rgl&fk+CV~aFFa- zsH*|^?-~Oo;O~!LKVgK`<6P$;Q*&RpG*Z6duZ&~NVRS8EWh^DQmp6!=V+B|RLIeiT z0x8H7#yuF}d%#m(96N`VrQ0OLsaU!I(}^K7TALS1ua^VtoVTHfvEXSeU4T)a5bdD= zXagl6ic-0aMJ(R{l&k{_D3JWE0H{Fj;cx&^fcuH>p9~lPfSwLe2T@f4a!;(mg#KpmO*ra(b>5HNh5sWel;wa( R2de-8002ovPDHLkV1oCw7EAyD diff --git a/data/tilesets/secondary/lilycove/tiles.png b/data/tilesets/secondary/lilycove/tiles.png index 88c5c7a28b4a1411ab6e855b6ac0db34eaa9e1e3..b77f3d37925546942fddb5138e917338b3e9bc19 100644 GIT binary patch literal 3912 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 G%KrdQ4IB*s diff --git a/data/tilesets/secondary/lilycove_museum/tiles.png b/data/tilesets/secondary/lilycove_museum/tiles.png index 4951873010ff10bb85bea3e91df0abf763f7f4cb..5bcc0ecfeb7396d3622435c781c53192f7866605 100644 GIT binary patch literal 3938 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 literal 3345 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 bhV%ae;8k*hm?-k~00000NkvXXu0mjfP9@Ip diff --git a/data/tilesets/secondary/mauville/anim/0/a/0.png b/data/tilesets/secondary/mauville/anim/0/a/0.png new file mode 100644 index 0000000000000000000000000000000000000000..88b028b5210358b4a3d4920ef092c67818b6941b GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsR~aQ#}JO0x~DesG8qcETwIyD zr29=roLK{t2Iom3QGrSG^f$UR>{-XKP5hV<-@HAG`Cm28w%m65u-MHvJp0x(-DJHi zyn6N?Z{@t}m&BId`5(Qi$xf@t;)-*xkL zcJ1HM;dFNL1V69YYO1*lHo7$C#7+32e^Xeq!0=Na+o8jpvOK@4_;}58R#|u5V;0KW zQNmkode9`yI`H-5_bNqhCre}`^IJYI{_U{iqWnFfvb&!|f6O|j(qnjcQc0@nl5By= Y@(NN8T(WO{W`kVf>FVdQ&MBb@02Avz+5i9m literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/a/2.png b/data/tilesets/secondary/mauville/anim/0/a/2.png new file mode 100644 index 0000000000000000000000000000000000000000..5ea20f6dbd281511a1d59fb92e5880a22d29915e GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsUlAo#}JO0vE3Va4+ZeJv^5;h)h6n5#`pT5BXb~^>0a)NZoGty;^_LJAcVye$Uym zCqMTI*&QxU={U~#uy0q&KFi&87M`5RkB-gQu3F)(J@J*Bk6wI%dHHk;u0J5FJzf1= J);T3K0RV|*JEZ^s literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/a/4.png b/data/tilesets/secondary/mauville/anim/0/a/4.png new file mode 100644 index 0000000000000000000000000000000000000000..c8097808c7a2e419c3b8aa4f9f4da594953d845c GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsY*{5#}JO0x?LN2nG6M3womhY z+Yu+DVCS|-#e4oFfl2%9Ejt;0#xTa{uQ?iTa7&tZ1@q}7jsD+8g~wJ;>59?Izp%U6 z$N$gn&RtyBZ&xh{vyRD%`f_oCvX$Epw)atAel+|ll&V#Gwe6$oFS%t$d^g5$@7%-f cBW&`I;ZL}I0Ph~JFCfQwy85}Sb4q9e0OwXh!T{-XKP5hV<-@HAG`Cm28w%m65u-MHvJp0x(-DJHi zyn6N?Z{@t}m&BId`5(Qi$xf@t;)-*xkL zcJ1HM;dFNL1V69YYO1*lHo7$C#7+32e^Xeq!0=Na+o8jpvOK@4_;}58R#|u5V;0KW zQNmkode9`yI`H-5_bNqhCre}`^IJYI{_U{iqWnFfvb&!|f6O|j(qnjcQc0@nl5By= Y@(NN8T(WO{W`kVf>FVdQ&MBb@02Avz+5i9m literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/a/7.png b/data/tilesets/secondary/mauville/anim/0/a/7.png new file mode 100644 index 0000000000000000000000000000000000000000..5ea20f6dbd281511a1d59fb92e5880a22d29915e GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsUlAo#}JO0vE3Va4+ZeJv^5;h)h6n5#`pT5BXb~^>0a)NZoGty;^_LJAcVye$Uym zCqMTI*&QxU={U~#uy0q&KFi&87M`5RkB-gQu3F)(J@J*Bk6wI%dHHk;u0J5FJzf1= J);T3K0RV|*JEZ^s literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/a/9.png b/data/tilesets/secondary/mauville/anim/0/a/9.png new file mode 100644 index 0000000000000000000000000000000000000000..c8097808c7a2e419c3b8aa4f9f4da594953d845c GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsY*{5#}JO0x?LN2nG6M3womhY z+Yu+DVCS|-#e4oFfl2%9Ejt;0#xTa{uQ?iTa7&tZ1@q}7jsD+8g~wJ;>59?Izp%U6 z$N$gn&RtyBZ&xh{vyRD%`f_oCvX$Epw)atAel+|ll&V#Gwe6$oFS%t$d^g5$@7%-f cBW&`I;ZL}I0Ph~JFCfQwy85}Sb4q9e0OwXh!T{-XKP5hV<-@HAG`Cm28w%m65u-MHvJp0x(-DJHi zyn6N?Z{@t}m&BId`5(Qi$xf@t;)-*xkL zcJ1HM;dFNL1V69YYO1*lHo7$C#7+32e^Xeq!0=Na+o8jpvOK@4_;}58R#|u5V;0KW zQNmkode9`yI`H-5_bNqhCre}`^IJYI{_U{iqWnFfvb&!|f6O|j(qnjcQc0@nl5By= Y@(NN8T(WO{W`kVf>FVdQ&MBb@02Avz+5i9m literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/b/2.png b/data/tilesets/secondary/mauville/anim/0/b/2.png new file mode 100644 index 0000000000000000000000000000000000000000..5ea20f6dbd281511a1d59fb92e5880a22d29915e GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsUlAo#}JO0vE3Va4+ZeJv^5;h)h6n5#`pT5BXb~^>0a)NZoGty;^_LJAcVye$Uym zCqMTI*&QxU={U~#uy0q&KFi&87M`5RkB-gQu3F)(J@J*Bk6wI%dHHk;u0J5FJzf1= J);T3K0RV|*JEZ^s literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/b/4.png b/data/tilesets/secondary/mauville/anim/0/b/4.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/b/5.png b/data/tilesets/secondary/mauville/anim/0/b/5.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/b/6.png b/data/tilesets/secondary/mauville/anim/0/b/6.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/b/7.png b/data/tilesets/secondary/mauville/anim/0/b/7.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/1/a/0.png b/data/tilesets/secondary/mauville/anim/1/a/0.png new file mode 100644 index 0000000000000000000000000000000000000000..88b028b5210358b4a3d4920ef092c67818b6941b GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsR~aQ#}JO0x~DesG8qcETwIyD zr29=roLK{t2Iom3QGrSG^f$UR>{-XKP5hV<-@HAG`Cm28w%m65u-MHvJp0x(-DJHi zyn6N?Z{@t}m&BId`5(Qi$xf@t59?Izp%U6 z$N$gn&RtyBZ&xh{vyRD%`f_oCvX$Epw)atAel+|ll&V#Gwe6$oFS%t$d^g5$@7%-f cBW&`I;ZL}I0Ph~JFCfQwy85}Sb4q9e0OwXh!Tv^5;h)h6n5#`pT5BXb~^>0a)NZoGty;^_LJAcVye$Uym zCqMTI*&QxU={U~#uy0q&KFi&87M`5RkB-gQu3F)(J@J*Bk6wI%dHHk;u0J5FJzf1= J);T3K0RV|*JEZ^s literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/1/b/0.png b/data/tilesets/secondary/mauville/anim/1/b/0.png new file mode 100644 index 0000000000000000000000000000000000000000..88b028b5210358b4a3d4920ef092c67818b6941b GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsR~aQ#}JO0x~DesG8qcETwIyD zr29=roLK{t2Iom3QGrSG^f$UR>{-XKP5hV<-@HAG`Cm28w%m65u-MHvJp0x(-DJHi zyn6N?Z{@t}m&BId`5(Qi$xf@t59?Izp%U6 z$N$gn&RtyBZ&xh{vyRD%`f_oCvX$Epw)atAel+|ll&V#Gwe6$oFS%t$d^g5$@7%-f cBW&`I;ZL}I0Ph~JFCfQwy85}Sb4q9e0OwXh!Tv^5;h)h6n5#`pT5BXb~^>0a)NZoGty;^_LJAcVye$Uym zCqMTI*&QxU={U~#uy0q&KFi&87M`5RkB-gQu3F)(J@J*Bk6wI%dHHk;u0J5FJzf1= J);T3K0RV|*JEZ^s literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/1/b/4.png b/data/tilesets/secondary/mauville/anim/1/b/4.png new file mode 100644 index 0000000000000000000000000000000000000000..44564e67a599b80664b2480d99c8c5a00c33d328 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDQ!;|#}JO0$sDXqY#a|CNu3gS xG>uK=QiDrIl$MW@iAfKmr>vgR)D1$DI2q!Tw6@%kaL@;7_jL7hS?83{1OO1j7$5)u literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/1/b/5.png b/data/tilesets/secondary/mauville/anim/1/b/5.png new file mode 100644 index 0000000000000000000000000000000000000000..47e7e17ee95fdaf34d342d8970c538f9829e4750 GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDF;s%#}JO0$sD|#yr~?VyxgfA ztW0eN0@^w}M|{0myIUJOOgeNX2y!Ja6j-UC#CwYOaKNNCXZ9xPM{Jv9f@K-%B(?dz SoYr3tGSk!5&t;ucLK6VDI~^YY literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/1/b/6.png b/data/tilesets/secondary/mauville/anim/1/b/6.png new file mode 100644 index 0000000000000000000000000000000000000000..d1447cde23dccd65bcdaf90921fe1212241d5db6 GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDPvC;#}JO0$sDXqY)vi_6FitV z9l8{>P)Fxg(8ia(%t8*a0b*vkih2%*SeG2(b!l0+f|;SVN85&t)#oF~7*AI}mvv4F FO#lvr8~XqN literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/1/b/7.png b/data/tilesets/secondary/mauville/anim/1/b/7.png new file mode 100644 index 0000000000000000000000000000000000000000..8ad81b1e1e9daf31260a661bd436367997d4f31c GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDFaUz#}JO0$sDXqY$}IzMLm`* zUDTl{n7Kp6p+#G-)5OQ{dcX|Xl?q{5S`#=9hp;nbt=1OT^vItMGQ-o=&t;ucLK6Uu C+!_4< literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/tiles.png b/data/tilesets/secondary/mauville/tiles.png index a015fe5b4f7f987c5cd1592b3e20c7cbf9bb4fbf..e4ce0d4f85e3532d1a9ea37b02ba4a7ae50b2554 100644 GIT binary patch literal 6372 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 diff --git a/data/tilesets/secondary/mauville_game_corner/tiles.png b/data/tilesets/secondary/mauville_game_corner/tiles.png index c8f0dd1eee95cc66c7cbdb49c1b95bb43532c228..3f7f565c9c6a6fc6b8d4bf6d879964987d69619a 100644 GIT binary patch literal 1788 zcmVn+GFi~-x)hjQ>SW6*c3FDcr+7#nbrQcg_=1Tm|mRrNOuq`hmG#okc8X>#y`d zB0>j07C`{G)niE5RLqqe25c|pBX)zo`C0?W*C*zSlJe*A`Hqt#?GR=0uamSzEL9np zEf*TmB^DCr7cr}3SGa9p)Yc6yRpDtxZ8;;N)}1>jt*!y{&x~B!HH3vc{ZP1aAr#Nt zS}11Z%TUO9R3RPQIHY=!k5aTw|JK)2Bx>F0gD|SMfkE*@ShoZ0>~u4z%+64$1`aZ4 zhy%3^ghW8>Y(FOcAk?5{TEbk%9GylWGssLhqn?&f>xi+GGFVDM&9rb@JuM-0T*jC$ zZwl{E8m6&HaIN1mvDsUBYfwGuS`oBd2HG`k9oI@~F_S}dQxcFzRmV)#Ra@(E6 zJ9q`OXI;8B1I$R#s!EL+p;~TPxRVQssJdv`ok3}KX0|KjEFmXrVwU*bt*MdwXM{8A zg;BOj>TMwQp9CqQpcxq9w0dEbl@Jz+X7HBK)hA)vGJ7a#)rc8IZ1$rqHwO;`iGgdU z7f#?{XX`s4RKPzWOCNv$)j(Z?nBkt-bxi(KXUTsZll5>~9SB2I3gHEtB@wt4>I2}t zB~fv2O#&4qDyCWyqH-NWd%cpORHADv{dy&<);^xYzfq5G(sJ7vj}}*8#{}(+H};t$ zAoYRTCzM!lFB^Ws!isI6~+4zG3w*n=QXq6#1W*3U|n;^H#_vG>bn(c zE2w4&Lcm`K(jB~^@$O>eYUA2UVnUxUE?eM$sV{zR@}HJVN{w#npJM6@eBOjN*azKV z`ETbl^4~Dw22kl)cZH=Zv`$w)(z=hmz3%DO<$K5FU;L87z2j7f%Ov9f_oJf-NJ5Ux zQMzc4uD4Z9y=oJ4c?FVsCp>Qe_Mgrdl;mMg8GpBw*}OLEkaixh9f^d zAxcl7e# zh>vgg*3Fw@_j`=x?hk+>;@(l2NfCZCW#3P21y~L1mwt z&!zII{ovHB`Qq8hzmq*WDQO7So#AsWE;R~;dkP#@%fKrK z@T=v*AN&?!p3+E-c>*kqL&Pe<(kifew&sUo{5@%L5ybv0N5oJ}#G(I6#LI`ih`o?l zKIG%akXSZ@Tqd4!GNzv?75)Dkxe?C)8aMu)w78IeoYfz7fFvYP#Ey_S>M$go$mx+j e!|%_>6!#xvizTtJ{i*Z-0000umWk}gzgYlc9* z7$Ca<9%%txCH(6SiKA(8fK9v};PH4z0oFnfKsxBXF#8Mb2(#Qf9uz&?DU;ztQzycPqfCVgI0Sj2b0v51< z1uS3zB|?nxEORS=1$-GG?hV(=ZFm150iK8a3c24|0Q}>5?_vO#%Vh$%5J4)?m+lF`Pa}}~ zH)pxPgnm1wJy>PH-U`~?c6Tvc@B@`2;kv1jHcnm<&$8p*O?;>X&QxIUr&L#x0N}piCow zgvr3iY!JzdYzC@!Y2j2Uv3pD#2fCx%^C4*5Tt}7%1UJv@U zavbwOy08)89FYqJ$V0XWfOtLV*J|KF1!TH#a(xsiUATUMPzRk$0O3^$)bP*u=70cq zI%Lnx0WyQ2>t7~7UKb|#`UoGZT_DZRU-;1&#=y|w^?+qiYJScDBou%z@go5w^?(5& zI|j!XPt-B!P%#Ebv}8S4Gz;O!Zud?!>j44oyg`juCX(&e{HaXaQHhKXlCiH=BYU(9Wiy1>klz1uYKe9RKVAI zlWq=hb72S+3JX}^P5~?mYSG;Y#Xkhm>t6@hW$j-V2B1u!Ah4SxP!OO3Yp)5sgqhF+ zg8HT*@YXQ|yle_uK?VAFJ zM#l#sKZ~M9NhfZ|QQrJ9k`@s8rT|I73?L~O0ymihO-+El!k7+S;KpPc{{tXiC9!lz RA#DHv002ovPDHLkV1nKOs$>8F diff --git a/data/tilesets/secondary/mauville_gym/anim/0.png b/data/tilesets/secondary/mauville_gym/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..090fe6a1a814dc6488c72a954de5e33d1a26d7f6 GIT binary patch literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^96;Q_0wfr&mCt$%q~>|LIEH9U><#o5JEFkzX-iIV z^|qNcK3i_hG?$JGR$}4{eQI!_P2!;fTS29TBjdMu5ih@@Za`-(@T*@vJAOGzvG_9R=Y(!DEn}w+p2f#)|;mv=67@5{c5D| zvWGcu(W6Bo_no5`e`S(?yvSnq_QI`cv5M#1%&suc_#>(o;wAUIdP4`lUG~=CWJTeP PAQyYO`njxgN@xNA5QJ7Q literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville_gym/anim/1.png b/data/tilesets/secondary/mauville_gym/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..48f325890e0ce2c83252bb5d82375ed61b971664 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^96;Q_0wfr&mCt$%q!xO*IEH9UEDbs+c-Vj=*>msB zdWOBR2il~jKU>(XDF?ir9k;tL&yvJ?nMlJ5&1EFE3RWZGV09;u9U|B7qvV z+GC>H5egwj?{~gdt8}RpW?$r-J-OSODN8@HCuWi5>_d0{AKYB6EamT(fRg>BQJx30L#YB z8!UEAY^cw7IKdcV0}gaKh%Xnmb}_7&7rF#-*j8*I$;UjmbyK49cxh}iLm(O5V8P?bY3zgD>T8e44-c+xf#7`NJ6b!*Awq zoKn}Wy4(C+TkO{`n6KAU_~%YI`Q@U9$e%|3n8N#8y}?f2Ufmzh-%j42=I@w)$NW3y n-!cFG!TkH+l6Nk7<9Z37meuh-l$2BE00000NkvXXu0mjfNMW|J literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville_gym/tiles.png b/data/tilesets/secondary/mauville_gym/tiles.png index d710d2e4014675de83c1d02588bacd7600afa9d9..5606bb101b487ccf9dc87fa1e0e1fd3155fedbb4 100644 GIT binary patch literal 1534 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 Eg0)%o*#H0l literal 5968 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 TUQb{DYn5x=)l;iRqF($T9d!cI diff --git a/data/tilesets/secondary/mirage_tower/tiles.png b/data/tilesets/secondary/mirage_tower/tiles.png index 8eab57f93e1786e283ff95b6d1edef51d40c3617..fd2904ca1c2e059dbe41875d8af997e31a7cef13 100644 GIT binary patch literal 5645 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 literal 5561 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 Hu0mjf49Z}e diff --git a/data/tilesets/secondary/mossdeep/tiles.png b/data/tilesets/secondary/mossdeep/tiles.png index 1933b89838bc7a141d1b55e4a733ca979ed666a8..818406b232532bddfaa3cfd1bd79271d9c045d31 100644 GIT binary patch literal 4269 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 P00000NkvXXu0mjfQ+8OM literal 4060 zcmV<247(2od9t5)O689N0&102O#DUDhD6JtkC$9eD=_wKEW9R#1ux=QOiLgE(;rjy41^;nYq}Q9kSSpjs zjE9+>DkRUH*X#UI9?$JSM5Gp=gcs}ZB_z`;a5=GGht~Pg5uS$tV~h212Y6+(2KjR^ z03My@{Id=KbL9epN;s(`Y(QM^0QogmIqU(X3CX&F#MpSy242DIbB4Trg5?3|k%i6( z>WZ>x1Dh2>j8!{=H32A)I)O%`4QM3bU)Tx2aI!GL5ZI4H>deAo9kO7wA{ZaDBgj`s z&MAY>CYXglcRR4N5HUmoAgL%}39J*cY6GYF8l$}gLNp{Og4JdO6P5(J z${?wT6qY9i0PG6_Sg*(&WJM)dbWZ>wr4L|tG^aNrz$CCBS^=d5fn;br*bW5oI_SQO z&32H=G}?eP0`qiF0HM?W?E;=rO3lJm=%MjOM}lU=n9RWe0&|oIAn={TRxQx-W6sNe zGpQx}csnprV|f8o1h6N8u~4fiKdbU`t@@bP3iJx?2EqVT5FjmJXD6X3%`B8_R=HYx zT;>mUXdeJGF%JO$Yz_;9{O)&IMM>Mh4&x_ltOTB1<@_q+oLQXj z_sjyT<#9|*w*l`G@=FO^E%VwwRKWh#D*x-g*$ss9yn>@@Rsd-S&~*tst5RNLl(7=4 z@)FzW0j%*OF)r%}ggb#JrBW5b7j+5|%=7@}`4JZbyBqkoQ0Qd|aQv^C$a{6a))T1m zO^8ws>s>&J??CC*L<3@1_zw7SNDHb94~p{DRP|BI4Fpf#+Y?9h_Mtbssf9&;cf;9Lo|0}becly(gyZXivv zmmU#UI6ba7$pISit?qHa4aiG^ zy1l><-+h*X{_8w~U#tZtSF#Tt8;} z{T=}W1f$;@Qe32mgMi5EX1sp{nx?91^x`0(@ugvI^#@`AXaj*SBaPQT>EH-53=YEZ>{ap<)vH3|U? z0=~6XG@C&Di3>1I!&phFF|5b|fbz{kp(MtG<69lTy&1zui2w!y%C}5fuq3e35y6U) z5&@|Fs}XzFR-s5G@Wcf?Gw-dKGbs_kfR>2BH@5`PxD|H;7=n3EH09WUh9t+94^0Ui zySw!>YMNWvl%s=MqPYHgPF#5F$#MI*0HbZnq_kj~p9};HBe&8M@Q?&>YE_O0w_bj- zG79jb*kM3gdU<8U2y#XaUWabI93KfdmAigQMi3t@0^_=pLttWQCO%RbKn&MkYe-41)s`KM)!VMgY**c)7GBEic z=v@E~$I%P`sr2pJxAT=VXU=3H1ZQ0U0sM~uLUX&YhB*kg0Z_F1GWOzW9Rg_GG$9EE z_Hr3l0HFY#KcKV&_{~?~{}sJBmQhk--J$uV(>DNI)}jdqumb=9Z2$tU1OX`5?BP6hnNLUg7t_m^xwd@y^2K`2$hrau1sZj` zj{ndC@E6zY;T*=qDVSNNZ$ve1IjWtnLuKHaYaZT%*9962ashx_-=Ly=#aYT+vxjq- znWkWFo4NrCWJ3VBUO?bG*bW*CHPJ|tux@$rzg&PE&LyD5WCW@Nu;n!Yec_>wZ9xDQ zZ343*0QDjQQ7t-kL(^h65LhJ{Ckp~dE<6ljTj&Dpl?eh`EH<^QX;A?{A+ovM5(1~N z#sFY!{(yA?x?Gv)0)S%~6a=28Ng4p=2Cy1Qq63(lhs|pKU>AVtm;h82fksyUm}Jug z0US&v0Bs@pjX>aQ7HwAJ+%D|%=^OyjX>3T#F&lVF8rawn_%`%I1oC^>65*Ts7X3PQ z&h)rk2V(*NT4Hn>Y5;+YNeIm8P)-&k08Ke((SH%QDzZ+G6Dt$|pdld;jb2P1t`clF z_`CK99KbNz0UTCfsQ|+Zy;(3nNzUyyZ$|cvAjjBh8vs8hrYU;khrgEqwwt~Yz|jT# z-uzT{XP9J@kbi6kT@mcLfUFDXyb+t6hxnl#bVWenqLf8nfFncn7LX=wDVv1Oht=K{ z0ao9xuFu`q^_%!k2Ou2@-mg2qml4b#=0iE5=Jux?Rn(|1TX?7 z&)pGBR3Ntek_7M$h)g~JzR8bx6JQSD^thqG_&O*2;g|$mW#GJFD4+xv_``(KRR*4c zaTs#a*|DxN@CrC{M^_m*Z@>W*0V>a3z<2F-(zgt7M1istw+@m$+JQUuECU2)HFeq> z(4!0l5Q_>R(IX3;KzA7+0JD)dpidcGgJsS00kEv`1av;VYi2?F(|rV7i|gKid(3wO zDOgZ?0($-MrmViOr!4dX@b>@60JbUw?DPLcAoaWej&0cIb^GiaP&$%tz)$)o@c#!$ zY|w-P$3HA^Y%~&S7`fmW2}rGTLrRi&O({|kQqPl4B(#G z0Ss>3j%@PVXW)f*fRGIbSgZ11V-|kEYlohJ)CO(V!p$mwguuEVAh|)85+p4F#t(5e zTI1}#XTbH^yjimDb6)0n_6?kvCNn5qMIcA1_d;~8-)1GgY8ZR4XW|=%xJ~Q}*sgMJ z;TE4lt>j=g<`XctIj@yhHz+aYXgWvl`vgn|5l{|Qn!=H3mF{})3;5-vS}T+}t2#s5 zDY_dRc3~T^%^#HUvGDT%;@NrvS9NflB3XZc$sSZ|Kym9rwPjt*?&XGqK{uZ;*mBdRf0WZW7JIH3h*mDmHu9*kBCC#51SRyh=-Ia)0g zs+Q;pMYE(3Il*LoMNnW5iX|>Sdnf>yCH(;=D-=sG3RD5WEFj?rIH4vj;{7YA3dMgd z)B`6L76PT)u!9`|m=A0}hGsxbvj7{|(Ew|kyc0ssYZbG}GvQGxjZk5gIC zg}4wXz@=CV7UV*UMIv`p^@7KXZGc*40RX%SpuMSScU0mJfUZCRurM33$(ZUJXqY7n zqM(?IH?{M+&$ZG5Hf2$O_?e!`n66*YG|ewyK`u-H=;V0>h;IP?e-nbBMFFU)>izn9 z83z<9vfu#34=~SRNP}8{&IB#7U;}r2t^`(KM;=EYz!(m{YX+Y=PfEahXPPV5Y`~1;C%rshXs0@VEDO<$zpKLnbp*hv z#&=VYgB9No?wdek3kqPS|EHq*1Iz|sof|h+d;<$jpmDM_v(o=#RUUxGN!&E=JrB^p z${Y0g^8uUm@*<=odJG2tHV!K6_Rk=Q6sU@&#~= zp!Ik_^aXza6yke7!RJ}{KB+b3{{nf_~6!M`>D2PAhkSY81fKX zy{KOxxjYpL$s>$E#JRx-Kzadh`T+7>K=gTlx~jhQwtC+4%p`!s@|2>;BZxrE{KOAX zX^-Gn=G{xGn)U%eEf_{9B#&_8ni_rE53t!;jcF2vEO-Yh9RQTUe`-DoG0h0+0xrRx z%{!3qXh^>@qj!9i!9qUYHXdZ`kALNy^HAUjBWOKh5BmmiM0y@z7TZCh^(ZCi8@Sv7 z^!nSqfq?d77O1!0pH7O0!T1Mp@;tN*U>*!KQiiCAjFBPlha#^=BBAfWIfCb*z!wO> zT;Kx2FZls#e^vwayJ}RM{OROfXh83WUe%L6fOHKCvHmH!gTPy+2|!raU-ApwRWBfL zNqq|d{IrgDU^Xv-w-9(+0Oxf54IjWIm|W|oc^840$ii#-2R_PRHg(Gbue3-h161W5@y=V8DCEXV>+ThFc2diqsJ zO4vCM1wO|JV3UOtJnWVH_XW`s5rEa%XaKeY1a#d7L<&1+@4#pg=wapuHXhTYXS4#jKx8{XgL-O2_=D4-N+E%JVn{Im!_6VUJ z`vrdh-zz`HWu9wl^9gV)#lU;GviuyEyI;KE7hnRwMi9dz_AUh4V)YOK0P0*Tr4iXsoscXHbS{FH<|d;#?`0+h7P&c1+m$~8vcAw56L;|b8- zp;UW^1v0IMl=2090YkF(_&ER$BWe`^v1byk$tQq?2!LzX=j#@T1N<)z$!o68Apd6o O0000IErE&XFSFdn<^~^yC{75{FcRLvHmk*C6o%eTBdqd*pE= z?RlCsx58^3ZW+kA^1BK-%hjB(4c(eWmyTx7SBGwfapw@oSuka3t;Pn@Wf%G-82-FQuEDh^Wx zx)uwK!|XcaHMmZ!Cr)J9@B0>kxCo%U_DNNsIdVK`-pa;dQ1;B--fHy2WmFhYmOtE z;62$1#e@x;n_x#VCM=rsa}EItD~Mofft2{G_gEQ(I#!vAr@Bz4f;DTfFr&*XwPeb2 z5M7bi#K5_IvdC+Eeh0b;x;74XP5rh}KL_V_T-#~0O;+8>LdtVT z_p-qHU0|&)o{ffCJRObLbPwlIEr^&ygbGdn>5V^yC{75{FcRLvQsl*CO!(eFeiC_)w_`fvQ#d1fd5c zPGOBhprxgrJV9&b+dqlpx(!LLe2P6u-Tm#iGqY<^umYA~Ar=crk6Q>pGb(~7M2i7N zK}p+1(B9vl07wY(SoZ>kUP2KpKF&1)wk_0Iuyihx{EEG&Fx|Ghi@Ky`z@u^?C;IS_7~mOo5mNYkGy? zxSaji(%P;%@Zg{<%r<%~<*4=EAK|-oPy!4F0|xL7fS?xe&;sT;@BrW{+ybm&!>gh72;PXiaH!AQ0j{VfN%E|Ie^d4gLWJTmvMY!Dlrzj zYYbpm0QlXL)!x0qW%*=S2WL}PAB4sMrvX^ zL*;tAQ`F?(I0op-{M)H^u(PwbXC3&NJy3FEJ9QP&yQfAofGq$XnCWukUITQauxbJ2 zB?OqwHc#GHef}6g$EX%?D4LfE>kv8MK1j0~z^f#VlO(POtO*0qIq*DJGco|0512a0 z(Ffc-dimufIspI9Q@w@wHR%A9+1Cf}H1q*G&;Zx#8t@XsW4u zKtvy0yYtFct`6{#E$mJl+)>{;O#s~$0XxxnRX}%DKs5djh{la&0BAIv7V8$EcikcY zx6iU=0S(jTS-M^V;H~_x0C!5MY)Qc6m`>NH0BB)=qA{%o_+F@G099e^UydN?0;Dif QKmY&$07*qoM6N<$f?<{9 diff --git a/data/tilesets/secondary/mossdeep_gym/tiles.png b/data/tilesets/secondary/mossdeep_gym/tiles.png index 919d0334e12cb8cdbe5bc7ffda4761fc36481bcd..36a0873a4f8715e2f42bd1bcb01c08bd052d6d3e 100644 GIT binary patch literal 969 zcmV;)12+7LP)l*e6os$hK>@s&?$E(N0dt8n#AraZOGYVEfGmwPW(lOfz+}*(r4j^W)*GrH;Gwpf z09HXDUQ<9o=L}ZhAZ@Gydfcs=>^YaTB~xUpp=0jw;gLGHe0=ZlJV}g_{}Dba7iXws z)Inj?dYKEzIPzao*G-!K9Rz{Q6*An-h3cUAoj8>}!rdkI2zQs*J6)cxwN~PD#{q(4 z;8?C9vZRA77RUJ}#@$teB(stc_X?HsN z;9qH6CWMI_not4VJ?idJcb~d$VmQ^EoxL9UB+hWKi54-?YPiIm2csQiU%Kj@;tekVHn$4H8n^)Nt^mx zv{~>b#P{(el!tF7AEY|5?Dq#SyXn`uv7VZcOBc1VrdMvqO)ojqLc?W{Sn9w1m$BIr z%(Wd$IX25+VaGzlW#FNtT&-55T&t~uKd7XNl8Wb*i=mRvcsyPQtOy1yfGgV z!45Gbf*oR*7*6+X{wv;mJ|coHF(QI4Fr}K*0zKVkU z)6_!s&(b3DYC`r>VJ?K>tl)+f4ptY^MG*W{{JAn-75p9`nyB z&cEQ84%6BTz5rntDS+*y!?Fo-lDX#Q*;kAvwYCOZG_qNOAy(RDKL?!Yu-v^%wNFZ zP%fuG;RkCb>0*~S6o?q`|;rvxFllr r+GSQ}>`^R(LyQJTz>N2fR{Q+}1wVbx;kfo(00000NkvXXu0mjf-gx8j literal 927 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 literal 4799 zcmW+)cR1Dm`+mL8ayr&AvoeyIaZuU3ZKBAQb*Su>#If?G^dW?jD1^+)ipmJbrl_N2 zRU9cJ5|KTAeSd#F_x)VYeO>oI_aFC@XmQqvnZQQ?05F>v>s$Vt2mlbk`~%>jdw&D~ z>^DvHb*w2lT@QWz1V*m**dbb&J>kd-j4=_Zuw9ps&@Fa28q3TUAG%?hE@N@UNXpL> zUAN4akg+#p!1ag`yL2~mh-`*n$L99-467Hsvuio)G(*Co8ze%g)prC%muy|Vj{LZ<~fL#X=# ze6qS~xqWSHSh_(z62h0ag|MHjB!}|dmISOHWYFN~6MTx3cy`={6S$Jz1MxLmasH~u`yhdgEeeoa)N7Ij2 zk0plgNpr96!+2P}@fets1O+haC9zt8jw<0rNJvobZ+%?=f5y52OVsgYk-n_s`<)VIAN}=xm5Y-r!zQX5xN8B zwKmnLe$y0%oMbyBd5u?a_}!SnlZtDt0Tvqy5)bZ|vkIa?x9$n54!ox&O}dkhywtt| z3!Sk|Q7C|O>b1j|AL?dvPxVK<*k09th_ZyJmuwkpdg@WFY~@;;@ovwogq+L@S@*fk zx5UxQKFMA6C`hvTXK78d(pBASj3Cc3b=-b?`;=B3V4;}VSy=v|yA+xWQL0>)fA;dy ze6A(-fHmeu))Nx!JaR+JvDu|OIWfEoIFQS=mh(o=e-bfjF&Q$Hrc%r zi;=;@YJ?#D-j@=F;d(e8%H;_iOT^0aIlp&|z;}Kq6+)sr!Ir;#=p7bW_t&x+r#YAX zZlIKvH6QXuEX9y_B4Z((ilr5&{qPwGpPIVRz4lCj282Q5=G`Z#B=j9O7!4_%XCuAp zX~4{&y#hp`kowFK@LBN4#heTfWzUq=Z;7h5tx)@PhCsER@$*yd?noMPJ;8n-Ee;(d zb~IO^$ycsi8DQ}9_w#p(qO6Eu^Ivv}oy=-#i4(>6`5M6Blyo{yirmm{G@=w##FA;S z^JkwQis3_f8ITEzGM_xAdaoXyt&eS0YEZe+VIG9+cX@$O-?v;Z@Cw7lao(zUZ4!mpVhZw^JsoWeM*EKw zg1x=m#<+NPJUo^B57BZYxu|2Af8Q}}!%^ip(Etn_@t$u!DugX7&XBw3W*Uo!MJy{- zJkPnj_^wi4$of8y5DXlD^DyO0=T9|!I9==!Ja4A{9B-y`oYmxSwx=$ER0pM?pV>s^i4NEloAT-k_PN?=?NB zh-n$>FRoP;3}k+K%kp%O)q)@a zNU~a^y1nPnr|Xv9*AfZU+8JOlVQAz%~ z&c8U)il-MdH4+GEoVmV4aCXrYX?AgT{QL*1t*up6@sM|J%!r$|JSLo5fJDonz^Nl$ ziRISPXrrI)@r))aa`cDS&L2j+arNs208>jeU3Bni-@r3NevGw*B=L4}k_Dc`LkFO$ zIU(i!?m`Vgzm<;8Vr6k@ICU_-1Hl=nL3v|XQPg+p3`a?4=2q>$3$q-Lj*`{(L_B4n zF5sX$!YvL3k>9$^I+iD+C=)Lyq7UqPtd><5?e~AaPC(-*E6T%3^7}t21Qg)0WN}e) z`|zhF+6-HW*T_f}@Z9+u_UP3_beN@V(9Rc!8U4Ym!Z?}C>CA5>sFG3quEq@Ja{Gcz z%H$oSY(@rZV#J{V6+=?V+P!Ui0xXjymh(uJEmUHkE-?2+gKYEFd9C!DKY& zSQzCyuB94-l{-b)vlkv=OdEu7lJII{9W(VZCt>_t}N)yQsBwJua5 z5{^Jwd-UD;)pS54jyu9&24dNqenkx0-kmoF_yim*NJnP#{@6Dq;G9^02MB{zfZZL8 zT9R6IoY2;R_0d}V%v22+dN1Zt%3&V<->aiJ2`;UIHLY==CS>Vk-ic&WrHQFoBLKsv zJ}}U5M7lV;r~EPY4r730$K#o2|K~w2SAxD)o0xqN?kvs;krzdUf&fH_2rcGpmYN~ zBMti4Fg9hsqCzBsjS^iQhb zJaNd(*Ec+dw+A?XG%D_}M{7Igzs(PKC5?ggoz(;5i4v*@uf{+BLJlCm{&#fXn;Z#O3(SQAJ|l2&K%n1H2oh zaAMm?l#3ufN*aby0U9g*r5Cn@FB(OEuJl);g7E{`L5a@+(vM3ob<${XD+HSMl1 zd0A5deYvV-`a3ek!8umlpm&Lcsn)UCQ(G@|%?A%ll@CMKv8J9=)6g@!65wf^tGouC z$uhR09?}(LMU(CijaA=8&nZje^RX(3qw(Wb@ML%TpI;AB5Djky?7!qJ*AwWco|y=d5NFR9Bp9xWcpoD2 zP>hY3YJ^$@h~I~eiVZ;jBHEmp)J#B~?YwXfu!H3d*|)ym?W91Mdw=2VewWGaAt+!0 zsU(zD*x5M>2FyF(3_Llnc4uUG#Qo+gUkH5FA~C)f1xFiyOr7edGW2%0%V6lyB(q<9 zwMBs=W~}Dj=#8EN{w4K|`C^fSK>tz4j{8?(M{Jf-5maD?{`~m(8>(B9-DoW5{(?Fd zWEdRF>;T>$l_*;Js?wYBzf>H7vBqX_9NLR<(HyKjd2#KpOI=)RPuMkH6c0rGEM$q0 zme3g5*Zm+iaX?c+{OR$Kmk6BCCq@4czvE2IPkzP;22)VC=W>--KSM~taUPYxn1m+d z(*fP*b&%2PLr|07fF4R;QT$D{70?)yuN!#le&G(fP@QA4j5WhJqvAUU+Qq~2fCX4R z_l&@R`RboiX!5r{FMS50L)*lXbx@jIqbalBUHJ6f=*cDPIiElKGB!HG#j4Le)x@cT zP#(Kj0lWV3jmq!qNyy#%DeI)(fe8r&e7#7sGjLQwx zZ>;7{d{t$kOxptFaKcL7h9C-$t+N|Rk|w)K{%c*!p4a`>-z7Qw9nQ}9s~Z{31ts7A z9nxgh#xF^C8A~xyH-I!Qjf@)%$GS)j5#qIg+K=FJt9M~#0PHf|`eRtUn0M!-A|Z%t z!_K!NpxE!~@qDC8MNUp$#@>Rl6jtB)fpD?Zzsae2^OOy65md+sI>~NY>O$bnyg$g?lB7119F^35OqD-;^b|H&Ue3R+*3o{@xoE0!9)Qfj{)U5_ie`%9i)Di`e{<= zW^V7(LG_aOTuGl;v!!8PVS5bAXvgQbsc4>itjAy#ojjeSeLP{^zWuHzjUt(fOR&>| zUAHgK@A)YIrv+Va50!5?4?jO z5Il9ejE_a7IunCPrM-CEIYUgM&ibjh*9y?Yxb*%)YsMc-!bJ-Hj$B&IwzcQ}TCkx# ze2hH#;4r~UHW|lhFAVaBZJ;XxLCjEhwXhvW z$eB*1AoRLEjbVH%z`YFB8KFna{}jhUvIee!)ylmqTxFnLkM&3?%5V!|N;I{GTOqdg{VELt z7*J2Uyzsd(P9z!+-9gdM&Sf}6QG6tmq8a$!jygk}!%uNIKK0A{4>tEu zZb&HCPR~8}f-=C@U0YYAMZaM$whZav=4?KvaS*zE(&ak?t*}y>N>WI;cz`RYq;Z;$ z+hi@$9LSodW0UX0zmq48Jne@ggVV1~Z)A#bR+oJo>9C%B9_<;2+!{DIl%VBZ^62l# z<=;iMfdBS`S9PJTjx9Etrt= zXOodtJ&_|F@QDgeFx#z9L*2xR*Op#9>yhe~Fb`b;5n^ScFTNjHxU#y*07;0Wb}0#% z&K@*e%FPO@)qk9Cw(iyjb7#S3Zpo#u;*{AnQS`1sgp>L#u#~=Q&P4N_N{8B1Hd`5@ zejfe4QLrz9n_0MWefxklAN`5pq(kMs?MKh}v^9~m2h1OT@f9E@{%-EFWb@E3v$36#|6oeexqEpm=PIv%6V2Vb0xozMNtvF#i;L^k}x zTS+S6%XIb&qu+DTW`lxsbd}j@j-o^6*s?&a9qj}_GcSa`OvUTg82*0$Y}zA=hu(f7 zT~!Jo3$@$wug#iN-X4uzNZ2>nXV)4oG2|2+k2Aq0~R)o%?}8jI6gZ*RjjVJ>Z$ju zYSa=Rbv`hFX{+$psznQU+V&;Dfr{%kQ<{z41W=`fY(g+gm05r_0(z-@?kiP!pR3%X zXs6`>?_!fZ0Sm6(Y9Jf7;+6GXU z0ADK2p&bxf&5{9>7K5|_bO#W3qLxqF0{vBxTx$a<_q7_g>-iqHc1~D{Ggi zJ(#Grby~Ft8NgYsoF$m-NX_={+*5@bE0wDFo>FT3iP}@+=UKuZpT%YDl+saxuUk{V z^Z2Sh`7iZH^{405C(r+JOFe%du)Z>Q`Ev2~CVY<3FWRrqwX_QW=H3%DpqK(it@1?; z7y$~8shfJADLeI6wfhzoZHxb?_-_psphgi3HO1F5tfg0)us>oGBQPRpw6l7IX*XJ( z_Y?aAtDY8-#j4(qFxjQSDgZ{_Vr4Qr;TmD_?%wAr>`z!bVJ!e_s}{CzB0^W77>4T{ zM5q9{1FtHI06zAtgB%VI@eH+Xk~n2SJMb?-JMyop!mRl~uBSO*kz<+`Q-O-0GrYIf zq~kuxHR&PJ%B%rcVj_T!FfXG_N9w6LNY!FYm{iUR8o-IhL$y@=DDrKUGa$a`CV-+FA?Q0Hp?LDijHt zFjbWm820aSsi{1s0PudfsHryq3-W$+5#CFGq6GJ;WV{iW5U^x97hZVpXVhV$@W4Xl zrzByLWauR^%DX65KGS3;Y9ZuIxia(0Wxi2*-)aH&HH0jmo3FJyn>kEieEC+2ck$2F74l z?CHHkZEbBmr}p;tw)prN2>L~4Er+O;b`aHKWqf9^GFCavD3MVG-lUC zkk=&X6k4US&l2twCXPw2#rRpm9jhoJtg2YB*f|5p2-p#61aPUQV&ocee03`%WQ8br zfrJ~8TUYCmQKiAx7W-K>8K{Ro+0Kkq;*7@>LlbJK$H4n!llKvMzaZ}yfW3 zPcS557Aq(faIK0wZLL!!)gcsPM%CAenrV<|kRxL`vG9oPWB5V!J&?JC20q~3p%F-MQh>1RlYb!_zjsl*oP-=YNt}f9ovzzS>ayH)2RnzXzu*;JCg#IjO*5)t`&+>jj-mli}T)dy0%KHg9 z-Z@!XUv#pMT8#N5IM!~(p<{6I^^HJxXnxp$USo1|T0U#npJ6#tHJ`&zJo_2^KdokW zz}{jENXK~g@%ZRS?XjfzOtBRFzpej-|F?A?x=!DZ)zP2sk;V6(!!sCWl(vG?wj{5X zV*yPE1O0WS;n|vZc%O3*I6CS}t7i?@w;^*{@~Y<78Tm4Uf23+uqhjD+J1fz+w7uJS z0#5_~vP?Dgfg}H@P}-91GPWxN|Ex`@4q@6_>NUJ$N^|!C3?%-oo`RS;O`xN>%O5^` zs6P8_K35MPJ$j_(k09?6J}M$u>I0}Sr_jt}0p_16G<%39Pv)T={tV*}v@0!bPnM{P zF~nE-tWjBoy^v6qx+$#?trf;c+Gb0R?^BNNBM#`J|=@r}cM1{zIL6!qz}XG| z?*y)W!)L;5z^CdP6Q9JjPx9%USTV8nYx=ZQd7B&f8-<3(gus@KqXgbaWTF2edf^crG~GdGKMd5P z(gKkHmRsv6f@@%?4q>)~uH#q|2DdPm8NkuJ!^T@`R=|keLtQf}vIG-*@ou_KeL?V~ zvWH>u46pMVF>LPJDj4RRj)TcByD`3qxE#r%^LoF-;CAS=(WmLL3zDyJV_B1;<3k-Y)Iy+PzVY0)F%OsMb zTO=lRV8y8`r+m3{X$M>=O?$M*c8Xz(%(G>G*5w5DcLMm}$%yC1ua%>Yz^E#|yrKsR ze+bJnYf8A66!kc8@nV9>Yqv|`z&{d0K7@y|&0FZ-{M~toPv|rF9UyU!MPfWL0JK*>jZ;4VRxtv?8HJBm2 zM<4iKF-_2p2`Q>K9mumjTi@4!pB2L_sVt+42GAX|BhoAiav;!wvzj8}Af1yzWYxren(w zz@*a_nWzU4b{g3bl3U_(oA-8i0dL<1ye059;ODnG)8-IR#_t2NpT6PL?(LgS{qx&5 zD*{Sy-DKd-fbzXvD7^P>zYgp7o7Z7Y0X}=5TF(mnI~kS`rliG`aV-stjn(eY0Jm@U zaM^ji%LXAxU`aI-H#DP0k}VX`fM-mO(zht~Nei&f*9@Q~iq5m}AL0h!zu>}FnB8;r z=g-xjkSl(yzUV5xoCXI>H416PDh`GdL4TmZu;qHqP!_KLf*d(evAH z0Dk!5| zm=e*9f!~}GM$107y;^R3AwfO!cKkO=dSZSFPN5#@vNYEhrGT>vTnEqc5SheH#tdOTJ~0V zo~rk!$m_&Lt>kS^kyngAUW*E5%Ru{1K-5YKj$f-G@Z`TSYd@kyh8>tu-lf(wdr8F= z&*=u_9&V_!C}sRg*2RRB0N*xO?{2^3)z#a-^6JWu-uZiV<;Kfi{o9QfA>}r<+V(cj z2(*3|@a_*G(GPDc_q!jx114U51+aYuW5F~3dpz5I0glb>7ohsyAzXhk8mVj4e=kIY z?d@1?@BAtzxf15cKr{GxP-K|S1$FU)y9{0)A;~(=jj3Yj=p0U#t*AG0*k1{t2~j@G zDW=%hlA;c!n#t-0CM#c`_K$B}%WfqN`>?4o`P( zKzG7nCQu_*6bjEZxN8f@>nU$Vc|GOzl(%pK8Do;f4xVZ+uZ6rB<+Ypg-oocRa9({M z$Q7J->@CM*81cQU?3lbG`q`SUJpiJOSQ>?rHbdSg@xMnjX0MWZSC|ERm&Y7BB-tX{ z!;f}Az1!~quD=Yiu3rOOc?mo3-Iu79lb~`jS66qg16~3A?)o*tix}GWy00wy@9NIW ziMsmAHK%s2zvR@FYuMP^FBS*reP0D^7am0Pz2adUL3` z3LZ0b1jEfL>*BW+RL;v=sK!7+W6Q~>m{Q4HqsL)@bn878yuff6^y7~;9f=%L}fgPLdT&B8gD}h1`|{F z*9^$Dn$COE^m!z|N-Mc_{U-`f!s{-^CIo%JQ#@wCeTY7z30>@!!ZShPftY3>rh$f| zI};7DeHSHkNg^l(%M&}u8$sTbqDBOJn!K029xkQAqi$aVN?CRM>o#2!2nUFQ$GAbq z6`b;-Bf!xUwfydAu9i&Cp49F!Vg3c+@DT8z{o?G=e+T&P344BYdOPX#P&#b^qV*Oj zCVRGD#}hxFn}ARbR? zH(X~M4WRpMfaM`|6g!Q1W`2?tk@!+f9BFZDB?rJGHADNW13=*!dVP*1fs7ReEri#Q z*B6ktqP&F@!00=;h`i6_;RY!)G8?8G0S5g^I!}~WQV~WV>O+Mt$r0q$oxD+Yw!B?t zR#VOCpzz=oIF!MX?J-{XNpPe@yIwfy#pbkO42xBqjTX3Yb3>L0Tg(AL)|)eoMfW8hyF zK-2#Au-FJ`CB=m)H9T;WXbjG*zr<38mJS-6} zC}ECUQsX_W-!BPXpV7k|s#6a73d$j-x1hXL)Pqm83v9|miuEjcD~{O<;gZB27xkn# zbj2`p99R)EO6c_cro7=$UgV9TkPSlsNwI=;0qFn1vuD7OcejSZ@x1>V=;zCZv(6zH zYDK(~k=oPGHME>-#954q*xNe2KbI0RCLcMS=RGG`F6D$Aq1(cjyK3a$e_M^p*M5!K z*M1KE?Y@TE_g?F+;Q3;yc6~NczkCD1@-N>UP1IXAt5p5`CKSq>Z-h;99dK<&E&sd& zxC;2o4&cv(8-%Nb?SH`J?7V#Kn%epCk9XA0&Z|3pY3EhKP5^0qop9yVSI_}I=n9Sh za^r?{`by}2=bRA6a^sXyT^~x}KiKY7zITW34TI!+clh4b_-?S>pV{s&s8-9rdsW1L zrJD#&$@dNI$`!SJg;R17Va_o=gj)1%UD~C>o&gh5{FZrAb6Wm%_0h~vs`U#XCx48b zlNg?p@C+y-YzZ)_^BmbZ4fpzrU0wszpdNhhQN@d&S-2muuB2b5F8P;VfPcSWYBDbY zj;YC@Cx`r`o}D~U|2?f+b@Wx;sJXxE)kC>u zMv(hM(A2&Uuu5iKKD>*rj=oaOU>#u==?E>$2jb(sn1+3pv6O<3H%X5%u4wz`wzLW2PMXFZMiBqE}VU5iEOq zgiUwn=u2{K{pDZL)1Nb|VecGGl{tDcQg@zw1**(#|8gH9kZ#u! zsl~LUfJGXF-N?XE`M*oFMqE$^Y__W{(j_R4k%?#MzRYw;tnXo zaj?t#{O)p8>GSBna6yIq^JnV6%La+c#}BX`Z5QD4np)H6pF8l~8R-~0cHXYm14LRo z66dMlf>$j@?HVBDA?S3Jp@aK?_8=M@=E>S`1~y>Q-vbD_*SgPX0YquF-Oy%y`G1_7 zSLfyFA%%I!tF{M$geA}Ir@nWw!(EcI{ZqLU%_ec(e}!hiBgV;q1k+{x{*9_xo7b(fg_h+`?lLdbn;Im2Mo;o+YLC<$k?WHNwU zYh37!c)tt!|EhTZ0`Y2h?|KCiuDcE$!kvP32N{1#l7-T!KCsl|7#g-7H(eLC zh0R{y$L55^RpSPle_R1HXK2B>I`2Mmw6L>E?g}~A8&|oGmAi0#Dwn(&n^bZ*ULWv~ z#_<-g^Woy1A5y^Q-^3)>!u7xl?Mq&6SZ0@jh2cf@IW_a&v{$GbCY@ z_~Cw-?^1tl;FVkwtDEC=>}q{8u(KYNbl0xrMU0ApC!!#^zrkyRJOk%V?ULCUITX-A z2{P*CMOPT`2`_O>!cRI3SKrbe9gFwlsD}~b-^fKeT{#|mBOGz<^9-@EhGtRENOA1iG5Hc%Hs@>$lslQV?IREdI zF57;@T)c(J;a0@6b`2J8w$DspLMA54W;G?^t)_(F_;UeA`w^ff%sPL(slA+nwt@Q`1%#>T%8WZ+Mbtphb&WTt&bmWz^ zlDCBmssc$(e!22br=Y0y)f8b`#ygN!U=)7pvhq(6yL>{3H+~&*@O5ADMST2sN}mwo z6Mm=k$@l{L^t{kp9PE^63KB-3z#^G7SRMg6h2qIxCTE}1KCePuX9tkeDuFc(SNnlY zO-Dz+ssDPr=D!Q%3r)Z>IZg^BSAzf%&z9jmzP@kP9%`jqK}rOD6m zhYXc@p>y~{yyqr&l#E;jp=$uEU53NDJ}U3;nugm-;w^Dy^59GPaBn^7?lLi1%@Q{| ztRGB1?|DQ_{)m62>EX$}$o@wv%sUS2D=WzJH#r39bV)QB^j~)|L7NNYBmU2T5bm76 zQwpl@%-<)m^|Y;MVR>R`-W)p680uPtJK2=_2sIN}L#xIACDO00000NkvXXu0mjftG3<3 literal 5966 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 diff --git a/data/tilesets/secondary/oceanic_museum/tiles.png b/data/tilesets/secondary/oceanic_museum/tiles.png index 25a20d586268dc2e1990a56b0dbd572fb0594820..a074d4a053d80297213ccb4a160e7c8307c5f11c 100644 GIT binary patch literal 3219 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 FV1hC1KxzO0 literal 2662 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 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/pacifidlog/anim/0/1.png b/data/tilesets/secondary/pacifidlog/anim/0/1.png new file mode 100644 index 0000000000000000000000000000000000000000..dde024f6ee9c1f875aceb5689025cac8e97dabbc GIT binary patch literal 603 zcmV-h0;K(kP)HB@>9Jx8ED*%En;Kx68oYpv*2SZnN~u)O#+ zOzp6pv0J5W($)j|`L*-S%)ai4!;brL_S5BEZN}W)-?E*1Ph1o*N0P?xmPi7U z*y}G5T(vE{zHD*T_P^qyE)8_i8Wh?XD0&EWp=~4-2wA+4R^m~B6%rJh;uns-kggVb zNAAE<6h}_glGj9?|1G+f>J;v`xe3n=ySc}~&}~tk$Y~Tx;gq@O3g@SAe~4|rwc%dh z`f$W;0QqI0v9IOkC1=|RgTRO9`vKN7;&xL1kJD4;3cY*5y&*2Rbg$uGIs&U=AR%?V zfKlojq-{T-az%y8CTXI$#>%oXOdXM7Fq~uU2+jRwUB3s+ z4ozL5j!4CD#WNbd!E?WXBR(-VJ@y+pRI%pTNs`ceEvw?%!`TA+xu%uu>8TYzA>+AO pk_?gYHl$0hRD8d^Ui0b}<~tO&1~ITZqtXBX002ovPDHLkV1l64CqV!J literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/pacifidlog/anim/0/2.png b/data/tilesets/secondary/pacifidlog/anim/0/2.png new file mode 100644 index 0000000000000000000000000000000000000000..1a4cea24d830d5e4bb129e8ca5747afb074a6c8a GIT binary patch literal 625 zcmV-%0*?KOP)$U%}@X=qy5v^dY+GI0@ZK_0ld&qR^$Nm%PF( zL)vireMy>WJAV=G;rM;$JKymNy$E9HZ&5@L$5;f!7J={M1G7A!TC-!nYWK|US(m@B zy-YN(W=Z$g?)`3dt;=0vKhG)E?A(n|O`QO;zI3s|)WPabUPAY(g;oy|`tbqKS}Mfh zg+>&eYQ*s=v+x4GA12Has%==hV_$b{#JbU2-H6#}H<51Gi{GES+u9fM3p~~l#Np8# zk#|%gbjB6D2(R^p4qmv=a>IzEr1*$@JbVKC)Z;)M4?W23MH{!kiZm&aoDWAG4)!w>NslD={ zoM9i`J21`9ChU_l7nV5lP=6oRSk?Xfcb#d%_dFMl>w1_?hYF9C>i?rt`Zq%%sV6yc~Fl4_Uwz%cS9FnbSi$bA0wfrY&u<9_QoWuojv*3LW6v7$9Z}$M35-`< zvVd>mi-SSm>|7SPYwq}$R(I*mE{T)ZHs}7;Q;y2Jc`0^VtL}}W=|=_IYoE<2>k@c7 zVRe!Axx&2QzJy-pIgd1+SC(k#?Gz1vvg%G>@f`ad+jXP-PuDbmD=%AN%b7M+z_PIK xb9!#eom{<_ytnp8238B6>57>eUD#KAZJ&^{A0wfrY&u<9_Qj0uY9780g#`ZaKwHWZY7PpEl z%=Uh{Pspm8m0xMnUWF&WCd=PFQ}Xe_^8Na%lJ1LxraKj{>YTANcwdpa@okS#R*RPz zFMfW!Cu8gO-syZm;4MZ;KHK(RM|1nNmi)_Uc380Le76IKljx-j#}|oeFHK)+R4Y@X zEn6(d&-MGiOj8BZiW}V>^_xWltFo4q>n}00TxSv|k>8*Ywm@;3xL|$y?&JDbq#Q#2 S==i<>x!Tj!&t;ucLK6T%j#JYB literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/pacifidlog/anim/1/2.png b/data/tilesets/secondary/pacifidlog/anim/1/2.png new file mode 100644 index 0000000000000000000000000000000000000000..747306d5cc598f70a9d260e255d5e417ab563c64 GIT binary patch literal 241 zcmV>9$LnbBbnF(FUo< z8N`22FYc3&+pj3L-$~{ix2Q5lsi7i=`OC7I2Z=HZpmqRn_Go~L8=wif&!y9Vo9 rF%lm13s2$>|Mlz_6#sqiE}{JaL6SgBbZiH700000NkvXXu0mjfeym}d literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/pacifidlog/anim/1/3.png b/data/tilesets/secondary/pacifidlog/anim/1/3.png new file mode 100644 index 0000000000000000000000000000000000000000..20e0a7cdd532da7f539a317a410249eb51f9f8dd GIT binary patch literal 213 zcmeAS@N?(olHy`uVBq!ia0vp^96;>A0wfrY&u<9_Qgb|A9780g`t}*}u_*E|e`YP? z&T?4vT&eKCqR`*2ruX?dUAsl5<@nC=sClG(+kM&jiGl7@{m(_7nySaC%hJg^r^&cr z*@HFR$*w|{^Od(qvaU(WY}b)V67`9gJOH#SGEKa%nMcIF|6?o;mFGfGn? ztbM>UQ_~_lV)y^D^;Ul?=Kbc-U3&1|87m`?fCARYz=C_vvtMuj%@oJ&u;-l7e}9mB NJzf1=);T3K0RYq=R3!ia literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/pacifidlog/anim/1/4.png b/data/tilesets/secondary/pacifidlog/anim/1/4.png new file mode 100644 index 0000000000000000000000000000000000000000..7b74ee349a6ab1b50e849cf4632767187bb3c111 GIT binary patch literal 138 zcmeAS@N?(olHy`uVBq!ia0vp^96;>A0wfrY&u<9_Qh}Z>jv*3Lm-ZTRIT&&{7qiCB zDSdHJ=FZ%zzxoS5Tz9%J;L+11<#2K;x8Z@SqDBX9NmU=n?RPrOsI61{c7M_B)g{iY mZA0wfrY&u<9_Qo)`sjv*3Lm-ZU+9WdZv{>vIM z9-Dj?B5>ryRtL?;g7r345#ItJ|2_pUjeel)78&qol`;+0P}VA0wfrY&u<9_Qh}Z>jv*3Lm-Z_1IT&&{SF@&F z@OhKKVbk@xKIq7H?{6-XoisP3a$j-?7QU)5OVGYeY#e>4AKb*GR0hhEo$Eb(;pb6Mw<&;$S(iZG!7 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/pacifidlog/anim/1/7.png b/data/tilesets/secondary/pacifidlog/anim/1/7.png new file mode 100644 index 0000000000000000000000000000000000000000..f1863fdd56cfa672bfee892261d5f00f563b8b49 GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^96;>A0wfrY&u<9_QvIGTjv*3LW6v3Ku`2SgT!>MO ziddcSpLfUi!h>zopr03>NvN&o-= literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/pacifidlog/tiles.png b/data/tilesets/secondary/pacifidlog/tiles.png index 496232735b038ecffb16ca07858c601cea479dae..94fe6d96b0786fa5ac932e717a827cd855d23370 100644 GIT binary patch literal 4812 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 literal 1689 zcmV;K24?w*P)3;{tbclvGh5cL*3Kpp~U z5B|si)+&s#3Zq#Ik}iCN@ip!OpqAsp3N;K$FLYrYMs_H5a{-IE&;{>ZLTE?&kODY- zUAe%xhZeB!a$FeH(E&mTgrS$Qpi}3{JYKQ7T+6eR3!G~}ky1-7tr?)jHaPFz=DfnH z{7)9kZE#^GCcD)n4sr=;5}UC!pl&kOz0H_gsUA#c(s$WRtm*HJ)i^9c7cH1h(}1!` zh+71uRxg-IpMMrFIApYj3)(?ICWx)F$GKZX`w(zw2Z8-C1F#Qa8YQ4Z%ihEEUI3?J zAy#77^gCtFSCqnIn8q4DrqYrW0I>Rd?0tVG03c*VsoAf}HHhPB(ew7w78HzSVxazH zK7A7gfzlM9Rpo0`?FF!hKTHAK0$ridj}in3AwHmneVnsc%~siQV?dER+{st~0E&tL z?LnA|0RXtWMr$}e4BM0RIW<_;08lkC|1`OgBcGvHp0nNg& zQ(i3$T{DUvlVS&c4u};+Pmcb0CdA;^Nndt5d#94AmdgVs3jsKn0CXV%5K$x$5Wc;l z1;(|Jfi4&c!lf+0N^>@Xm!t4%7D#}=*DnSfy}deMbY+020Pj@QO#w<#sRV!k0l^$V zj1ll!#DK{h;6zFqker2Ja1aE8S3wLA-(&!#(&lCfEO2;$>pQ?fDGP$Z(-9FM0Gvt->L*wirV}y2y3l(w28mCYnQ3ORh6zRPn8$JNABj4-qXD!eGHRPHIlPH#z;c2?qSCt z;dvF>5&$3oO8{&p3Bb+tvaz2ApapPSKg5pMu0nerfS<$wo&jJ7_@FQUX#h4?p&bTc zkg*`Ool^jvB(Nj;Uxl^=Bw~;Y&;#WRU}eH@hc@1?u>DSb!PnVrgdzd@b|nGeG`6eq jUksG$lCJAQR&e~kf+|%a_;bQE00000NkvXXu0mjf5M1tQ diff --git a/data/tilesets/secondary/petalburg_gym/tiles.png b/data/tilesets/secondary/petalburg_gym/tiles.png index 8c996f701c6678c7880540d5aabd51a02f71394a..cb7c40e5ace444f17d59e73adbd07b65e70d0c88 100644 GIT binary patch literal 1429 zcmV;G1#0?`4D(Hu=p1%26e((E! zvIKUKMs9KUjqE63zhHtv{)>{Cxm=oku1fSZ#>1T zCBm(-fKFIqw_H*#RGLN;Dn`>#D!I}IjWuaZr4qghja8HiZI$c{W#)=skWh`ugmLg0 zYMNeCz^HB+P^)fjfJsG7vT*p3;@G4=s|^eTRxHaR^kBv2uy^s)w#9`nqA=K&WrNk* zbzpaU*9P0}p|W~7Mm`xDi+sDb<-oS(ya31Uy}&W0?Yg8^LNl5 z!=&YwVDjAW!ldnX;c(b-;jmA=-EsO9LMIl-anxB$KVxS-C~0Fj@P}gzj!`->Na{>>ZJ$MH9uid`}^+vq`1|A||=sQc6_XN;qlkaQt{Ybut!j~UC9$Vqd zjh^ozoI%4-W=)RCVCJVzs{GU?R8Hz*`NQv@hUOvuDABsn6!X<;&;=FvlxUHUugoc0 zBOnC@0w4--iWCHkH;`o1RCv$|KH)#|G2i7rL+=iR}2-kr>P zO_S!&#ClIntcSRW2k7N;8FbnUI_(9O;=VHZ^7j$ibn@vmrqh^O@wT~651Vzas(6#@ z-{DOLz_4=2A7ir7@-HLz5l85wmj+GYJeACCqJwYPcOLkHug;*GiZ$ghgmaikS(xB4O=TsJ6EQ<>7=$V8XCo8^Kk( z6)MKeID&*>y+C0-q4@K%8bTzj{WQp0yA>+5#gU&nss2G9&q!o7mo#-wQ<4E~Vtm{c% zPU^z$Sf1(q<846oT=4t&eB&4`hEP5~9`9&r9P^QH*k3SZmBukX;|KZ)G56n0$vgau zkO_-}eiSY4vlxPeVNYy64quy9|NS(bG9E6DDuKqP6M_$amOpm{c(@FMcEHy6h}#U` zsBTyAjp_~IHM@lP_R{}ghTh@r<}VR5{B_7g2z@_HqVJEKbj(t3`SQIM!$mPGbL6!3 j{_8R(tc)lVvV4C7o5&nfxgU@400000NkvXXu0mjfD+IdI literal 1222 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 literal 3461 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 diff --git a/data/tilesets/secondary/pokemon_day_care/tiles.png b/data/tilesets/secondary/pokemon_day_care/tiles.png index eab49af325a1ff196f6c434e05bb28319bcc60bb..76cd9ab96ecbcf6b2919358c21c3301fd95326bb 100644 GIT binary patch literal 1528 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 FV1lt3g~Ht_7zXg`o&^@t28z^Ag4k_M92^;Z& z56Z-!QMT-xI$!XGeNqPdW$D;gW#aP__^E;_sF3Q6isiu6RfVc>Kq}y%A{_^+LT)R6 zS;8W0D(r+EL#NegEwJr)*BmO335V};WC4fl=7O>T&*0jyMfC1(PTdllqL<}wj}(PH zQWW+`v0&=9y)P23vJD)P$Xu1ml1YCaOzcXy_DKodGg$1;f+=+pu8IvDlE_^770G0E z9!%^?xDJSq?innu&Vng*x0Sz@n5|{o@wzPD0t|Y+4O>Ldq-1mS3bt;`sqdTOHr&>8 z`>$YTJ#4vXY^G$}@v?;VR^TX_gAT}2%*G3#Y|MjeGTCsngy)wiY@e<}*_2h&oL&ud zL8VFIH}Gw!(&0F`F~AfQcBiQdf7t~g2%Zh|#&g^zgL%S)j|@m&orEg`Wf%DgyZc6g zw*ddUfiK9;TkzG6$)D7zyKj)N2LM&zOYlHiUjxaX8FZ+hk${XyXj7LILYqWp@>v7n z3Iq+p9=OBQ-T86XCQ&kZ`*+;oa5x+ehr{7;I2;a#!{Kl^91e%W;c)!lNcctRpVjIO zmg{7}L6ysTR`|zt(-a-w-5`y5Lh+>!;u3jjTk@4|?D3qZ_CT^iNR}O){d)G&wDh`f zmgPI)OP)&}OP4U^IX}%M<|uKDOrh7eIJy{F^_Qr+^|F?ole(~X5W?P&}y}s zs!jStc4hHqwp7KeSIH6v$0H;uoY$t{w$w; zg36GoY7)Iu$<3$VOHMtHM^g)|Mpxz2pcX{}w)zQsG zqJC511A&VA@-Ec5u9+R}$o94)?AqSh0BF<=*j*y(*EwFDpQz{GAz5|B6~A$1HiO`< zrF`F}?C=blc*`VZPCRRwkL=}q)+_rK&Fp&Q=K0B5$rJTgE4@<5p*{h%licf=lB2Zs zgR1GnsS2(@Its3EF{2T)JF+uo(wnGstTC%x>j}ZTA2d=-wD=3rkQYLO!5F)d?xCf- z{2f?{ZC5I&8Us%+sE_mxA8#F`FxvvzD+*gh3tmmPYcuQ3fcNU ziEXy(FN?D5uFqd`SG9myI|j#xYE(ZIj+Gt-Cn{(jrK%nvAi*(O zwd2}U9oEQUv!QC_`=G(Bb;-L9;GeN13RU`X!lhvYPNg61QcQh~p*pV_xQMF~g~0_n fCg_bWY{vfv@R~YDNU!mK00000NkvXXu0mjfx|+AM literal 1242 zcmV<01SR{4P)Ht_6aa8`Pl7tgnxXjvyr^TLMVh@yQ@~B~mQma~OC3C$g2UOQA$7`PB3cShWrYMq z2PvgoM4@9v(s2)9vhTgSd{1|xp_>q3BfUawIC z#&I6FxV*T;?TiD~MxY^p)*e8em!NUXOVBC=zVK1(Zvdcu0-*g3!2A*)T?|$Md~a`{ zk^(RWybG;Wz=zlbR0Y7N5fu@rl_Gks=WYZl5@-mZ^+2F1fI6NDIFWETRwk0`xHOTL zKE)&tR5(y;^53RGzlFfS#az639;gan%gJ;PP!Yi9(>VbgeB{pa^Wev7To4NQ-vi3GH$L|1OXJ^)4z=O!5fC3bt00k&O0SZun0u-PC1t>rP3Q&Lo6rcbFPz3yI?Uko`c9$EY z6>I@+Xhk!58sM{6I$ucPFzm4n2xw_ke!re%z-ZauAfQ&y0AkPN`}iPubM@ENn;X9W zt6(-QTUJ?*nkfKHWPr~`CVoyb*dGwNB*2$XNB#bh9*EW69Wu~Gr6s^vzt8kQEF0es zL}4BfMa%+Fwn&Ryci=dVy#^#>EdVi$Spb88-cA4>rmq9I_%TL6zC)2tIPtO`1Xout zUlsu|-9BQ+EEfqNUq~`&Hi9*PZeR)6lhSlPIMM!jQp!yEU|Jq}i=i%yi1U99pe6%$ zSe-70){Bpa)gpifB_aTC;K%{AObCF7fdBE(%L1Q{CjN4w^JSulZ3U`qF=Q_o%VhxB z`I*zW5Fq;xe_}&5`Aslg+;;gJERO1ip&uKmIx}xiOe;oc6&Q2Cu@m645v~EzY-U-Z z0K{p`f!-L0)am({3;_`wxCVd##|vQTf4~}Wz~_KJ-UK-5?BMrfXmFqeKG@K81bV*1 z0o+dl^(F%6d@zQ~$s$|>`~mEbtwSD|MHgD9mL>4jiEmG0=ht|_e4h;k;JR;J2;3sn zO~;`dNB}c|c^tLbd55*bc+Qp+Hb^rdKx9I#LpNaC#WR=ygb3)Io3{i&45)`16%TqY z0UAUIA8LS;9)Umr@vUi__6gJgIy(@r_H4W|VFn!VM{t$uGBN%VfEt{_PY8hL zWdTT+04xduI0P`43xLyhy92=8((@+QDKHvyKz2c1g`yQ;)@?)BRvb?lTgI6hK;a~S zMf61!0H+-S?tK3`3pn{MtOD`_md(ubUrZ~xVB+!r0&#yjM{IkL7XSbN07*qoM6N<$ Eg58A?_5c6? diff --git a/data/tilesets/secondary/pokemon_school/tiles.png b/data/tilesets/secondary/pokemon_school/tiles.png index 3c8c4dffe6f69f1033da8ace9c9eaa4940235a22..20e3f32c8c3373b94e9828637ce50e761953f45c 100644 GIT binary patch literal 1027 zcmV+e1pNDnP)BjE6vrP;iH3qhrw)Y-`2+!X?$XOt2!S>oOFGns5KKB9g`!!7;5F9b(StCdOBXw2 zY=RKkI~ZbYM>aU;d;+`gJ=vD5$cfULCc_>0$2;qP@BX@z?gkx^uk_rymD7MZC2TFm3B@uGpJVW#?Q0gpM!bp1`JimD< zCFB+Mo9}F8X8{P24Rn%pigekfY&HTe**6$1dYtp^xS<=?SQ0aoWR0tf_IFHPyw>^} z$kw`mJVCZzE5ua;q-r!kT_L#hwI^$9Af5^lfJd@{C4xo!bFhq2uh%Ew>I_onOK2O( zJnb!QzB)Av;CbEzT%AGcd~TmTtM`#KAh7bR5-Z zdkZnql`-lTQP(R%)t$g`CQ(u!QIHKXl+;HEw!vM-E*#N+N1k^MM?!4E34wK?4QCqF zb_o=*U8Tq$En302P~_7}6N@+>FK#?8!E#7fV^R28vCgB3FVcUpKEjAw@czc)$Q(^| z);wM4g(F@k3v{8djfM(a@)QbE8c^7$>NkqWDeF*nNydFJP7T}$42(`C?huBYR9PGW zWzJ0#gfI+)n$dPbK$#y5NleEklfZWrPH1d9nX6m$dX*NjW%CyNwkBxAP>NvgM(WM3 z8#SkjuK}Y*s56co(((IIyWjfq*m1`?RCPIW=j&Y89b;y_nv-vD*G;3V{6gd^yASvL zY5X7HY*(WXh*x#TNZ5}&Z#OFTD%IqDYwzy;&2`-I6UNV)<5b*4-NTQNhK7cQhK7cQ zhK7cQhK7cQhK7cQhK7cQ#-qcKPbb*ccknH{lo+MXH&g={_PulH_Pq`836ZF?jnRF+ zTLlj2Ai)JSYerz(2tE*oC|P!q4jh>DSu8_X4PciLQU*|v$)I>N3_)IotD^}N;`$=} z(B0yXA$ySN*?zLWUU?OIhvq6AN|XGV7m)E$JW^i~O`o6;nH3(e<`fwc4+tZWCVDm% zx*yOj49NX}tgR$Wa$5)iZ90e%L#X4=ih^{pqZ_$d-C~gBr9&rN80=+eb*)4%;jz&0 xXwJf44eESockP?NF0a+fSQk5`5@Pl%?H^B(SvsE-XKnxh002ovPDHLkV1i1|*9-sv literal 980 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%0A*4eeVw&4 z$ph{A5b$3t2E>3E5CdXB42S_SAO^&M7!U(uKn#chF(3xSfEW-1Vn7Ut0Wly3#DEy^ zzXk-KILQ}Kuw3|?PqQ1SKVQ`vx-FH4xXmJ-qaQN8aQgt3WxNxR*$tSUQM2;oP<0*^ z-h93|M6RtN)Q@~mmL$2^3CN3Sk8V(4fV;)QV)i@%j2AzfM++QWO9cQ&l4WVC6Oa*? z*u)5Mt)No{pX>AE3*fJX3Y;ul?gZq;3%dcuLiv_dSg3wmlqW%fGlhksCSEb1zrxxre0e~$wJu$ZfutR|F+Yta2prFMC z2mz*#5J1i+M+ac10FYp3f@0);F8*|_@Ga_V0X%q`w8nIRZWkadBXM>S5bX%6F4fCw19FfjKq(gi+=hPW==E}$jT`#R zje&B-WMixQ79*|&FqIWRxNK~~^jXzy0jzGDoVa$tOJ#NC`xfBjtfJq1D1hfe%-A(* z=QK?)OzJSIC$*bHhRK~`03tXFp$Ts_;sC%uZn^TOsRLj%IV>2u8#n-PHt{3?)|w39 zpnh(gD)#y}9cu#|0NB#?#pT7aYnT9V4Rtke_=X7paIVvAF#sK&X#qS%Uv1U_pxsH1 zXhwM{aQKF1B{Cm*o1;ANPQ6(&SfgR?MYi7g=*A|0KIACHf zaF}#hv8+whpI+dsC&Ill<0wc5+j>I)wwQBqhP}EbaNscMu*m?pI{+is*yzozm>G|D z&;*{f-^>|w0o9w>x;s553~_8J^L&s^)*7I|SUZ0G&|}!6?*M#vVCKU)252;+GB!JU z;0#?4B!r_!525QW1DG?@12=BC5r8F+0a)@PKx6H=vQj>Di~;Tr=(FmFb1eXkodH<# zA^>(DyI$5-OrPH1&T9J1?l^ER{Q!WnrE1Hn&tk8gb3}3K2Vo6r{nz7#LJIM3 z91sGDec5NRySgJuQ)LsQ!?>^S!Q5EySns|7&nB_sCX2mxt|Cc|AB1&i*+RiH@A3Ec zSKyj;rL@$F9o`EV!+T&Io#r0Qc@@ue_nYsdAa>k}on0URfBSZL(|*<#`y~>4JD|R$ z9}I|Mf2}fktMOHb0@q)JGwI#^6-2Qs^@?hAC}=d5<@?fm`TZ5p*jX=h0APt`k7OR% zUjdDs^#TKM=(OdTTk6H}iw7tmv0wR0V7g)3(&?5vh4V4#L=3FSOU#)9UJd dsZrT){=XO*^eoT%ZA1V7002ovPDHLkV1oPFNPYkS diff --git a/data/tilesets/secondary/rustboro/anim/0/0.png b/data/tilesets/secondary/rustboro/anim/0/0.png new file mode 100644 index 0000000000000000000000000000000000000000..358745e4b2bcd731f9377bd807afe6e56cd25363 GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDLYRW#}JO0$tV20y^}3?m5R18 zcE%`7R(yNzWiC%sJgGDDbFNP02MWe6!sH}|+}$RLzp<(SrR QcLK;nPgg&ebxsLQ0Msxcp8x;= literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/0/1.png b/data/tilesets/secondary/rustboro/anim/0/1.png new file mode 100644 index 0000000000000000000000000000000000000000..f5a095b158f4e21ce69952950e416ed01481c4d7 GIT binary patch literal 113 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDGN^*#}JO0y{8O?7z|ik0+(Mc zu=B0z^*%X$<`t3rX{uH3OhPhS9M-1XVr9?y`G@1g{AXzoHmg;b@OGLlRGVa~0y4|f L)z4*}Q$iB}O^PAg literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/0/2.png b/data/tilesets/secondary/rustboro/anim/0/2.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/0/3.png b/data/tilesets/secondary/rustboro/anim/0/3.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/0/4.png b/data/tilesets/secondary/rustboro/anim/0/4.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/0/5.png b/data/tilesets/secondary/rustboro/anim/0/5.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/0/6.png b/data/tilesets/secondary/rustboro/anim/0/6.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/0/7.png b/data/tilesets/secondary/rustboro/anim/0/7.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/1/0.png b/data/tilesets/secondary/rustboro/anim/1/0.png new file mode 100644 index 0000000000000000000000000000000000000000..75bd2f8a458401dee20016931d523f53682b58c8 GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsR^Dgjv*W~Mf(i7m<&Z+o(F6T z`A79YMZkYJ(lbKFV6PTi+d_^ALK?)S3j3^P6@BMO^4R|AizMd@^sbbi`(@3{tGzx!$NX*?c-T&Ry^F);t%vcCo63A`-wJ!* y9X}GTbz{}%96^hee{L5OTrECwrBBpj|I2W?-81mP=1*%u4)k>Ob6Mw<&;$T+pHR~P literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/1/2.png b/data/tilesets/secondary/rustboro/anim/1/2.png new file mode 100644 index 0000000000000000000000000000000000000000..86075ffb0b7955064e20f4ad12b7b449678e4981 GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq#8V3978x}rk>l#)odWr`tY+K zYnsk@I9u;I{}PwRoMe+pj!z}^UIcfw zPjUF+&{V8u_1q}#+}0WS&eeBZo8zX>T%z=EhsnOX!Fwc{o_@@`P(O|H?yfZ7dt1G` kZ|||M3)NL$`D4C>b@%$tr06`&43L{VUHx3vIVCg!0Q}xcXaE2J literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/1/3.png b/data/tilesets/secondary/rustboro/anim/1/3.png new file mode 100644 index 0000000000000000000000000000000000000000..6e3c576214a9cb83b23595a3a12a392e79349546 GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq}n}Q978x}rk*q8I&8qhdZAw3 z_p9xjtCRmHXxRFAD#lu|FquAakS*fTj}5U@%T;8u72v3K%no@`-O+nx!AB1EHCBPE z-9I%Z=p9qxi*%W=Jn)y-*D{k2ixj@jw|pyOwCzr!bhfkg(~{DNcmD04vv(@4f6X&( qV%fYc3h%2`E{h+Vn-cN*{cnDwrWX56UysfQInC46&t;ucLK6UJW=Q}5 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/tiles.png b/data/tilesets/secondary/rustboro/tiles.png index 8cea2a4d9aa815e1f541f283879140ffaad19f11..fbfc72d466555a3b5ed8d52d06942a86648cebb5 100644 GIT binary patch literal 4108 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 KMNUMnLSTY>1sy&B literal 3903 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 diff --git a/data/tilesets/secondary/rustboro_gym/tiles.png b/data/tilesets/secondary/rustboro_gym/tiles.png index bfdc07c07951b7c35d7f121c7454aeb3458b44c7..d4ebc14a1cb56abdc1f1a5d98f00d588ac3ba0d4 100644 GIT binary patch literal 768 zcmV+b1ONPqP)>&I>DrzNoyI*&F~*Zn z{q9V0rs(04;*lbmDMrB1&DJT!x+wHFTL0suN`z);-{5M0yFrOS5(JV(V4bUFnS93m zHD0ao;2u`XrOsSz&{hy^wIM+u^0@r{aB!C_E$tT>W-zv?GV(Of$akFG@VVKif_u$;{GJ|joB*KbxjuG;5$Q69n zRHhJMJb@MlbK||ARD@YXMU*k+lLOrDAx=Wb^>uPk68mUIkq?2Z-ITn^Qaae>@{VC` zn8w7D$FsID@wxp&mcHGEniQXhAwW<{fg7Svn$8**-($=H^r8i<4KP-q(`gU{Z&#r6 zZjRcps_SVEu8aw35{6L?2}2=Kvs<|eH7?SS=r*o80qgm9NpVjd>fu4}cn2`Xk~QX( z;^Q3vO#%s1EaHwf0V2c^A>?TDUfkpU4b{KgW2Yrw!MeQCk$Gv|Buil(Kd%h`0XUn3 zyRg=h!-)Xki&aDs@I?=C4VyU30m17Qu(pHI2D7#_?Q30yFmj6d_iaeV9ya~ys#0An z^Y^^^xT^mx9+;Kw&=2_+tm6TSoLLlks_=>$AVgwRf>>j{V1;X$uT~WO>W2l!^YdzMAPv;H^HzM(EJq{Idg&)Xie2$IB=Np0c ygFySi2KI+;;VSeM7H8j`d=9m4q;-2$)$K2bp2_^nFt6zV0000Z#=Ghw4n!f?u|MY;(8p#LY)rkr(4^-)cJhkoV1i%Ie;Q`N_3xOaX zgq-V;FOKt51cCy}~5h{y-MfcqLS z90tMgOS3}#(mK)f=G_J0b_DO^1ZCJdJZ%fWHqsaYa0k?# zl*#p1(E-5e12A%=zhnQ$LXWRM1Q-OUZOvzT0~nV8*8t>rK4wyeiQ$(3weMO0EC2wl pQ3a*e13)lY^@R+-45)T@{y!Fe$^02by7B-3002ovPDHLkV1f$@RILC2 diff --git a/data/tilesets/secondary/rusturf_tunnel/tiles.png b/data/tilesets/secondary/rusturf_tunnel/tiles.png index dc947bcc58c7c5dc7ac3ef1d10884ff61511377b..913935f77c6dfcc16f0d866fce7c9fd4fff51e11 100644 GIT binary patch literal 2228 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

D>kG_3LhR{=bK<_s;*}zYW*-M{#8WZd&;R fUfDf`w{hGbx9EhCeRr1600000NkvXXu0mjf;6J%E literal 904 zcmV;319$w1P)XB}qAPs~d?D6NkDLIzC6!jS>CK7FJ9jQpO0^Cwa$&J!E5Pc~a!8y%AS+4-EIlyp1 z;`Ofg>uw}(IXDZUEhg0iaR4q18ZYx20~~ddg}QF4gx4IvLCFB7;d2pj)SvR;1;9Md zs%!v=SEhXh7zDdj9*}V11whwzsue&oa1J0@Fzc_I2Q>$jv#Lc92F(C-)YH4&PJKrf z)b{Qq1UD21a-KyEp!aF74t%cwcH4gAK^3yJ%=sBWqBzU=gXH`t0F>)q^gOt*0Vp&a zNSs9#AROqvj1`~|?(xMfP+)c7k*9l6iQJ6`%4IAO?2PhVUU`seeFx`fIA7PZ^FB-f zkTD_`s~y2^MwYGQ8>{!oQp^Zosp~yC6!++DR6giF4`SCXbc+RkO&X7oDakeZoP$+6 zo|(jAkWsQw_k{prC#5farx}koHxCcTNr>dS%u{``i;_JX+1Gt4c1m`&;$dpcdA?#Kj{Jg%tzPh@4-$sSz8f#plGSNnszTin}z+Bk+!8e=+#z#r2 z+;5Fl?;lCD(W5u|HVtbZ*m%&tQ#lw9DA!o^{)6!V4xl%-$k`*;idlK!dZE#Qj0f|| z1HFF`Xej_`VBA1g`#?7)b&$|Z`{VK8$#~E`=fO1k!6ML_hzP6zEQ}jXcyCifMTq$$h@7Xy@T?k)zX$@qH!|3C;8Ko^(De}F##FqbBG eF+eVIDZp>n351c-$jplX0000B;w!32` zm{kxh3QtstnH@PC>f;fNG7^gp4LQhKK#A6@!5^E$A5d!K) ztTl|5+9c7(Epnia}xDn)sz2kjwHYmPeAK%F}3RH;+dBjLoN z~S4G$0Ue1Cs0f85>O$+z3vTd8kuZq9ha(3?Cz550i)AYgnFaDNfd z4%}9Oxw%PtY0bA{zRni?jU$rrJ|89IoW%Le%ro+JJ}&uc{wMyjscm#2$dh94*CQ;l z&oF5l6ZCRy&-IdeiYshySP^I6C0AUsJmtS?;p`l_RF;iZzenicVe4 zL(|p6hdznL9u8rlT=m^I`U{uz*KW`EXX|gXUW&Q(MSpf#f5o(pBsYYb&f15_ap`}l zDdW-;%VE7-IwqJe1j_W`)K-s^KU))R_D(^X~Ys?{@!uD7N0SI`

D>kG_3LhR{=bK<_s;*}zYW*-M{#8WZd&;R dUfDh5{Q!NkWU<@~n-u^6002ovPDHLkV1gdRw<-Vt literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/secret_base/brown_cave/tiles.png b/data/tilesets/secondary/secret_base/brown_cave/tiles.png index 7888f8cc2852ecadf1877f76fedc2150e56bfe42..a1c8bfe72cedc05d8809660e05d398ae7df03d47 100644 GIT binary patch literal 1166 zcmV;91abR`P)g9D%;RgISfs700*p#y+6u8{l>${IQ4(Wp{crJ^dm zqC^nrZv6hB{E3g;fLlMWrYcE+aDo$jBVdUzQD>h2Wn2X(E^3pUe3KLa>rg~O#00jKks$#HWKFwGoC&Od78=T=r#k1Z6mE-b=s|;e&dBhV_0fq^P zm;j52cMOuzzr)K&%p;PSvM!jwM{zlg2;2$~XGvx|v2tv(ovRniSS=Y~JLECj9$7L1 zdtKDn$if;4&a44H#$1nG;N9#*M;clt6siY-Ftp z)@ZX};&uVUpOQM%BR4}KvLTOUdq9cbGE1C#oeL0&C4aKN`mt7@!Jk1fpnl)t`?o*p zxDYj@p*C^M%|S^Ls#augraVqSdx+-2y+zS>n^vlRQ5@KFZgJhX?uN z{{CKGe!9Cuf509x-3P;xJU>4t!LTR6h+hO_f0ettpTAu6)(R%5G&hYXgboRCiP}J< z&=3;zkXco~yz7OspkMW?)d~n0%|UECCqWe5;TZU~;AclJQVs}m&ImH{iGHIPoMBG* zuVl`$z!TGg>37uuP?A)GAurr0Gl!mmrdXV~nzZ+BFSW)!1Tr~kaYne)5h9%6e|rYG zXU_l*8pmV1<`87%YBdBj3HOMe?GYAi6HCHk;mS1W<{TCe5Xj1M#}*bW)g>%WJdeYd)zk_#p=rCtUMgmk10|c7S4_ zxDK3wNUK)t$Le*Bsh*%GEGPIDSIn$)ruY-j1%rshxQ&H9Gbfx2g&Qzmo`W2BFr0%J zhrPShDKe_8ixZe$2aK_!RqQ!Dh=6D&l*HnTa;J&dF^V|{6AWFQfbCGQa>Rztdu(V- zY&xSScBEZJ!|vL;=lvki3-}W}ji<*q2P%i!-Qzt)cDg{+ijo{XPjL!8C%%`cFOu?Z z#@6m>3h3WBVjS9@TiYh_3r+P@Y=6GGMA`GS&t@O|?~VR9)BpM*jQX_&p>-HiM+A=N zex3yH2rujV!T3=J5YxE6=ge1qGSl_!lhFQ#KJML+uZ-KAo&P#+eee7q|7~1XQwQ4l gM?+3PAKkd_UjioUt`>g87ytkO07*qoM6N<$g6`iTL;wH) literal 1070 zcmV+}1kwA6P)*LAn5t17l>UOB`d+>+=TO^NGT#t)R66Tme9}pdw`P!J~P~4OqT+J=WKLr3boObHqxWEQ?%GJYysOO1FF+fXu1jyY1II#i{E~@%lltl<0 zRr1YA=?4nymd5*(wtE1Aq`wC8UVnls;$vc^xn;LFCIiHB%x?h4IM%4a-ikl(m=Tm2 zAtdLx0~*f>c=##Dd^iRIR?pPzR?`X7M( zP?1DKg_n&^*!WuBf;E|IhIfZAra%HX(95md+?mB*Z@Ec7yylT%ILk`?mk-E zvXs;_6<3r6s*;a&-T_zbQj7uX1>GmT#=UJUXK=PIFsnuc1%0dsXIEX*sPfRpA&QM; z0N*wU&>4y$Q`N+}6#(bZy~lbb)>vJGsm3Tne0q9%d3i}%p|Ey?Ln*3?AcD2V6|E4_ z7IdsP%|BwLH84WBhL=BVJW=Ycpx!W_N@dvO7B@AQJS5_M9eW%s-4(M8e?LAxK0G}9 zPO+OHx(m9wsYwwZAi)W5D&)pCGBkuSaBR5;;LlzDKf|07h|1uGF~zUW(^vEukj<$^Dm2x5_B z%9d;u|AgZ>J19mHlEP$w1kFdbq-p`55CQ}mlL_8zoK0=p zQdWB$Z|}m<*KFO47em;J5rAONlRzCXm!t&|7kxP20a^#L4;71VpBMx0PJJ5C_VE+& oBLHmjneh|wBLLXik@>TL?}HZWu1gYMe*gdg07*qoM6N<$f{IV?H2?qr diff --git a/data/tilesets/secondary/secret_base/brown_cave/unused_tiles.png b/data/tilesets/secondary/secret_base/brown_cave/unused_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..dfd187d51a78804eeabeaf5a6c036bc29919483b GIT binary patch literal 1163 zcmV;61a$j}P)g9D%;RgISfs700*p#y+6u8{l>N*X!k(YR7srJ^dm zqC^nrZv6hB{E3fz0-yc7nyMrP!U<0BjesS>M4fs5mvI%GxTsBX@=a0ztV03Srjj{d z%)nw-bK>fbO_iumH zaUp6*Lv7-in}d=hRISJycXz1WTE7$ePZR>*x&meKyjoUqov=Q^8_L1dDUq!ip5PE| z%o0mh=G(Y#tG>@{SeM#0Dz+nVNWBbE#OKvJM2fr4AW`%U5P${01Qu|j*J=VenG1NYG*VT0VQgj@Duv`9iM-K&1SRWw+lAJ06`NT z&~^g1XQ0qiSoOyWEp|pb5NWL%@OFjI>guyPMXPPux&?lav&5&TCwYE+e3Y*b4-fLk z{r$bX{B(DR{(wDXx(|jWd47IQf?-dB5x)q={wjBOKYzLEtrbjAX>J-(2ptmO619Oy zp&=ybA+xG}IqQY8pkMW?)d~n0%|UECCqWe5;TZU~;AclJQVs}m&ImH{iGHIPoMBG* zuVl`$z!TGg>37uuP?A)GAurr0Gl!mmrdXV~nzZ+BFSW)!1Tr~kaYne)5h9%6e|rYG zXU_l*8pmV1<`87%YBdBj3HOMe?GYAi6HCHk;mS1W<{TCe5Xj1M#}*bW)g>%WJdeTRy2U_#p=rC*1N~mk10|c7S4_ zxDK3wNUK)t$Le*Bsh*%GEGPIDSIn$)ruY-j1%rshxQ&H9Gbfx2g&QzmpMxBCFr0%J zhrPSjDKe_8ixZe$2aK_!RqQ!Dh=6D&l*HnTa;J&dF^V|{6AWFQfbCGQa>Rztdu(V- zY&xSScBEZJ!|vL;=lvkiEBF&Uji<*q2P%i!-Qzt)cDg{+ijo{XPjL!8C%%`cFOu?Z z#@6m>3h3WBVjS9@TiYh_3r+P@Y=61BM%nYU&t~uZ?~VR9)BpM*jQX_&p>-HiM+A=N zex3yH2rujV!T4SW5YxE6=gc>KGSl_!gV6qlKJIMDH^yx)&VL)9eee7q|83k>QwQ4l dM?+39`wOaR%g$>wtQr6S002ovPDHLkV1knyB1HfI literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/secret_base/red_cave/tiles.png b/data/tilesets/secondary/secret_base/red_cave/tiles.png index 5c21865e2ef239a5b70a7861a57600fedb8613df..2652f6bbfa0f4ed34669f48de37c6606cf013855 100644 GIT binary patch literal 941 zcmV;e15*5nP)1jS5XXl%An7TRKGi(}Jj;;+UCAK|N;pyQ8i&TGEraCorleSVBa!y@D2cRp@+-i9 zydU|x4GT(zaPgPdJ8OGpejYFVM57ThwlNy%)MN(>e+)=R9h#@0-ZFo~>*ePAk?1DUe2 zja%5olKA7Y4aqXarL`;X+3_vAmF^|1uoqKcFYH#LsX%6&F`5qq%)(ol&@?6SGIs3sD$uiYpX2r4ES~2WU(QX}JQEd9Vg~1I6J26#E*p zoarCc)HeOWz{#+pyzsjSL&|`9e;HVXR<7A$;Rl&WKlhj@YiJ0`OEQ7 z>dUCH+E_~$jI*EDD3Mh}kq)&3FI#_;7gs4E(|g|WqZj4fX8wAP`*Nud>P|A}t}Cs*^4{VpH4I#6xj zI^SPeW`F%lSB&m2U2*gQf?tVHNX@3Y<-AAPkdEM0K@O8c*|6@L< z^XbbueV<;vq>E|1qKjFaQXbOgW?Opm9>;k;gG^%#G}~4( z3>@EHx4V0^)@90-vYR1(yhB_vjo(h=R|dTt@}MQMyoTl;2M7@2x9=0LyN?-BN z(MXa?AM+~w#%|JA{)c7kf9HSsw`I5>tKf_P(eoG|q)rbGOk&*1*mZvaf+%}VZR(@Z P00000NkvXXu0mjfS)s|l literal 941 zcmV;e15*5nP)8nu5LVxy&E6s1J^2yZXK^wV9_u1Q$5iOh*GOJtQdxfHQC*STOX@ zqybxb=h3@5G=xRkgeA{ClKlng4geTWo6vb}NEj_SvI^XsHBGBp>k7c-o(C6>edn(_ zR@yIv7P*-*G`Ex$`u-k(8N$k9u(cPOfeo9hI-7GK^AUg@7{9}cxbm6<*Z}-U7|s~U zL7EQ$&pCkP0>^93$_}d@tma@Zgk>_x9pD?X0E(A~s|-*x_ELBN%!MZaRaJ>*0M5WZ0B1q1FGmk@4j@KRjlk8C z0Yopmr_-tUPFWD!i=7Zmog9dLvo5c2(Y z#&+aHJ zuL#YSqz!zGHb$qnomvNMQFG5($m>i1w&SbMb*E^ylgZ7^wq+ujDq@>kG@i4kJ=(ku z$xg^lA1!V^h)g88Hu@ZE=;Xs2?GeImEhM{v2Y-%_kB^Ry-Y>mCV~*ALUYMvoa$UHZ zefG*gvK#8b4ech32`81$H^(aHPf66?Qf<6CEzgHKF!Esa<{in~jq(6uj#bXzDG$g2 zs*R^*`Q;w-jTv}gwoId~RUUK$59IubKz#xTzZYdWo98-EH9;H%DyDpl7L*6oV;;1P ztu+Ghw~NL1@>}+xM>^3!rLvIHLk7?DAk-_P0PESw;^@&6eMdBHwFy6`tdP zl?dSP?Czv2=Y7f{CK?EU)| zcix43o-gr$#-^f-tYW;KQKjH9FjVF$IT!%f^qVC1cqqU>q(ys9_cO(4 P00000NkvXXu0mjfQdqM3 diff --git a/data/tilesets/secondary/secret_base/red_cave/unused_tiles.png b/data/tilesets/secondary/secret_base/red_cave/unused_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..5cfebd309c902ba89e8dc986d8d504c1a8ae4aea GIT binary patch literal 938 zcmV;b16BNqP)1jS5XXl%An7TRKGi(}Jj;;+UCAK|N;pyQ8i&TGEraCorleSVBa!y@D2cRp@+-i9 zydU|x4GT(zaPgPdJ8OGpejYFVM57ThwlNy%)MN(>e+)=R9h#@0-ZFo~>*ePAk?1DUe2 zja%5olKA7Y4aqXarL`;X+3_vAmF^|1uoqKcFYH#LsX%6&F`5qq%)(ol&@?6SGIs3sD$uiYpX2r4ES~2WU(QX}JQEd9Vg~1I6J26#E*p zoarCc)HeOWz{#+pyzsjSL&|`9e;HVXR<7A$;Rl&WKlhj@YiJ0`OEQ7 z>dUCH+E_~$jI*EDD3Mh}kq)&3FI#_;7gs4E(|g|WqZj4fX8wAP`*Nud>P|A}t}Cs*^4{VpH4I#6xj zI^SPeW`F%lSB&m2U2*gQf?tVHNX@3Y<-AAPkdEM0K@O8c*|6@L< z^XbbueV<;vq>E|1qKjFaQXbOgW?Opm9>;k;gG^%#G}~4( z3>@EHx4V0^)@90-vYR1(yhB_vjo(h=R|dTt@}MQMyoTl;2M7@2x9=0LyN?-BN z(MXa?AM+~w#%|JA{)c7kf9HSsw`I5>tKf_P(eoG|q)rbGOk&*1FS>bKZrj26G5`Po M07*qoM6N<$g183AlK=n! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/secret_base/shrub/tiles.png b/data/tilesets/secondary/secret_base/shrub/tiles.png index 2e0a6d028c0554213b145973469639ecc0a0f948..692141b046c614ed2328202e0c7088ff8a331a94 100644 GIT binary patch literal 1177 zcmV;K1ZMk*P)*8D za&FyJ6LG$&PzboszE#Og_IqdCSomUW-d3Ppe*_pD`_LQ z8k&=Nbt+H4;{E+}D)-Y5ALR4p<)!?2ad9D^&(F`r|8REpmECmuP|2rH(+7dsM}fsp z0^5&rcJ?D=r1Rk4TFEtZ)yTR;(L!TLM>M4)36U?74vBy)%?z->Grv&qZ!sE4ejHsL zRAqwIJyw%G3~V3vV>*y4b1PKx4zY1546MY8;GbJCIO!PG&Q#?q<&& z#ErG0as~3Q+W=M_7?zoW`DIC_@b8KI3*aC9W!u0roPvKDTTDgIKNr^WgxQcMjV;EH z(`cxWOXyJ>83yI>b-rMBt&XI|84hpMK7@bft4!4^6fTi8fow|2HL^^oDJHU&*ispC z#+?FEf)N4KGsI_Gfgbt!d%Svsf5&-x zHwH^|jNI;?!%}|VfjMIhNybBTe+QY8TZbOuO6HAC{ljf78$!l4DNw!+wP1+}<*MxU zuU6i=T2?iWyhRw0Ttso*e;Pn?q0eXyq#0ADK0qK@Vx@CVEzV6jmQ{oLIevMNYmP&#dLw!ZBK4mnykgWTr;NA8hy$_R;oRAd zLEhkYHt6BXl-H?TrO3#(1X}oE{(Li-eTU6p(h1{r@SSJR5$|c;nX^${6P;J%_q*Bu0M4?7 zIcF!p+L)@Yh@E4msy5{h0qJ<+COC(m#s(%h(MdY4vH-&^>Dam&4@#4EBef}4y=c(Ex5)C8Y*r}xIeg}lB5Gc@lv2c*?9K&19f0$X#V5xOQS<&7 z0H~PY$OQmLab3OwbXo$&*2noXip^|!kL-z|!0K!U3|Y_+h9D+DY>+@_sU_l~x9Wor zER{Ha2Hf1-q>WbUR{#ycOIr|rXw%c?Bys=bI~Acin*k{V$T8=10w9DK<^zD{w3#<3 zp6yICh)DPUH2|ErU|s>(HOOJx(`W48_Ov)5i@_oU>vm%Z3Sike)TqwNng9`{chqmo z+nUVnY5^U399~7D47gE1v^c>}fT_RXg1B?TlRZL6XlJ{BBI^(N`7Syr$)$ECNA(0a zKp!3wyGO4s0q}=TphD=tKcTMqIVy~D)d>JW(9EnKVE0BlLA*BmdK>|9?~@Kt3<^zt z9vV2{X=rEec(#6c|NhIDhkF2kpF07*qo IM6N<$f`rZccmMzZ diff --git a/data/tilesets/secondary/secret_base/shrub/unused_tiles.png b/data/tilesets/secondary/secret_base/shrub/unused_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..461d620ae6b2bde40a91e55fcafb0590780fe52d GIT binary patch literal 1173 zcmV;G1Zw+*8D za&FyJ6LG$&PzboszE#Og_IqdCSomUW-d3Ppe*_pD`_LQ z8k&=Nbt+H4;{E+}D)-Y5ALR4p<)!?2ad9D^&(F`r|8REpmECmuP|2rH(+7dsM}fsp z0^5&rcJ?D=r1Rk4TFEtZ)yTR;(L!TLM>M4)36U?74vBy)%?z->Grv&qZ!sE4ejHsL zRAqwIJyw%G3~V3vV>*y4b1PKx4zY1546MY8;GbJCIO!PG&Q#?q<&& z#ErG0as~3Q+W=M_7?zoW`DIC_@b8KI3*aC9W!u0roPvKDTTDgIKNr^WgxQcMjV;EH z(`cxWOXyJ>83yI>b-rMBt&XI|84hpMK7@bft4!4^6fTi8fow|2HL^^oDJHU&*ispC z#+?FEf)N4KGsI_Gfgbt!d%Svsf5&-x zHwH^|jNI;?!%}|VfjMIhNybBTe+QY8TZbOuO6HAC{ljf78$!l4DNw!+wP1+}<*MxU zuU6i=T2?iWyhRw0Ttso*e;Pn?q0eXyq#0ADK0qK@Vx@CVEzV6jmQ{oLIevMNYmP&#dLw!ZBK4mnykgWTr;NA8hy$_R;oRAd zLEhkYHtos&{WNY3Iy2MA|$fP}-+9o;2`{s8-$l#A5`7T^VJ@+`>*O3!(5 zBt1>?s!Vo97-5O^w{OP_d#UDnd2qN}k-QIE)s9G4*&>;fE(ga;BVk<*i$QJEGBxdLqNYJw zkBlfszivl;Cz(3Nvs^!n0xfi+(*F}h0uE5Z(jF# zhy6+3wV2~A?W-{Sa)BROfjK^z2RCg)wryI<+%zaLKVIzbr|Vwp_oc^vM8zjdPGb&A zG#L%?6Wzy8@PoN*WHV+Om}%AkM8K6YnZdvXFl5vv^IRc4wwombE{vmD!EAnRwv;4Q zxZq!vh{r4>fBJ30w9P6o+XJ&GiNIt5-V9n{Qh|vzSQKEQR%6{8O`d|?sOd|2jh_<@ zRR$^&{gq*)_8EKbxhi#zu6D7>HX+K&!P?TW_=hWd^aI8}F^k3GV7`Adi!kW<%Qfq& z=N>0u+mj{+r{dcv_J%aq7VP>4bt&tA#o8&qnfrI}_YV&b^xOUYJ^gZbcSpb8-rk<{ zdwP2632xsJJia0Lehb!eqB1fttLUl*g!>S!sg~G_6wCoacM#@*8NO^Wm$!f+_{)bm z7~}OheQBUCIF}6uJz`w#$AZ0Z@d=dJKwZ?J6A9}0h~AoY4@E+)Jd~?ASep!g44y-p zaiVaTl*X9*$X@|}5zlo*JOl-Q4*qZ|X8t(lrZ^fCCuBKGxS~R02$kwAhjL0!nc5W& z(@H>gBY0w&OL_0dk#FWrOBT=+&rmLt^+DWlB#|_yNxfg-R6B>-;V1 zC-LTi$XFngkyK>z>0Ipd|a@lm6 QfB*mh07*qoM6N<$f=+-EdH?_b literal 1056 zcmV+*1mF9KP)>TK5M2MjR_IL5WQTf!{T2oLfMeA@;LO@k8I{?=lA3`NhZyh!!0-bS@s@KBNMQHM znW77BAaMbZXaYUm!^0QE0kOPqEuj2XBCwok^P2Ho=3X^AiR=Or%IYqBxRfH z5oeN{pvmUyr~%CDykd)Jh-4Q4=)Cq_PZa-I=h`9@b$wUI4IrnCmj-MTt0fo+xs+4a zpRzLUw&p{cy1tGYz$(}P*hf?R`0 z^}#U9>c_{&a&Xq^e;h100+L7;T&|jyxA1NvG|g84>jQplUZ?@)p}!4a3m0&N+&dQ2 zysiHo0M-{D`{spq1ZWua5uLDhGyt#|c{wQvf#xfK_1Wv#yl~~fr-1e2pWQ@#2N=8= zZa5~Q%E9B#0hDlQ95jC?k39Njc!I2=pdLU6z>+#|%kf;P2jppN0AVFdBW-T)2MU@M zDufO~#wqGNQVhjUr5?ckbZ9qBd!D9!*q=EqL3tS{EtwqEd4lCoSGIakjQBf%jXhSI z*vICDe}5_QTaFK{-70Y6x%hMhgl6eIOrUQ!j^#NPt3!bB|bl`vZ z3GpM(CS~WRn%2*pvZ`BO2;N4SX91O=_6cR4QCQ%GK&C^&X8#Lai1`g(cC9~Fpc)z@g=3er^vqNr*Mx+j!}lL^D{tv_}*--Vlk@8PDg z>fp$*jC~i%0P>&<(UG=3qH&PS8n{@o`0{}`?6mTS0cr{T4)84il)*>hJHWR9;CX8w a1^5q_TS{`tR!Euv0000os&{WNY3Iy2MA|$fP}-+9o;2`{s8-$l#A5`7T^VJ@+`>*O3!(5 zBt1>?s!Vo97-5O^w{OP_d#UDnd2qN}k-QIE)s9G4*&>;fE(ga;BVk<*i$QJEGBxdLqNYJw zkBlfszivl;Cz(3Nvs^!n0xfi+(*F}h0uE5Z(jF# zhy6+3wV2~A?W-{Sa)BROfjK^z2RCg)wryI<+%zaLKVIzbr|Vwp_oc^vM8zjdPGb&A zG#L%?6Wzy8@PoN*WHV+Om}%AkM8K6YnZdvXFl5vv^IRc4wwombE{vmD!EAnRwv;4Q zxZq!vh{r4>fBJ30w9P6o+XJ&GiNIt5-V9n{Qh|vzSQKEQR%6{8O`d|?sOd|2jh_<@ zRR$^&{gq*)_8EKbxhi#zu6D7>HX+K&!P?TW_=hWd^aI8}F^k3GV7`Adi!kW<%Qfq& z=N>0u+mj{+r{dcv_J%aq7VP>4bt&tA#o8&qnfrI}_YV&b^xOUYJ^gZbcSpb8-rk<{ zdwP2632xsJJia0Lehb!eqB1fttLUl*g!>S!sg~G_6wCoacM#@*8NO^Wm$!f+_{)bm z7~}OheQBUCIF}6uJz`w#$AZ0Z@d=dJKwZ?J6A9}0h~AoY4@E+)Jd~?ASep!g44y-p zaiVaTl*X9*$X@|}5zlo*JOl-Q4*qZ|X8t(lrZ^fCCuBKGxS~R02$kwAhjL0!nc5W& z(@H>gBY0w&OL_0dk#FWrOBT=+&rmLt^+DWlB#|_yNxfg-R6B>-;V1 zC-LTi$XFngi`vZxBDw21}V)Fn1 N002ovPDHLkV1mQ}5ljF8 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/secret_base/yellow_cave/tiles.png b/data/tilesets/secondary/secret_base/yellow_cave/tiles.png index e8386a804a80b81ed57f0bd1555b81abf32691f4..b171b5ec62d82bb2bc72638205700f636a19cf98 100644 GIT binary patch literal 1127 zcmV-t1ep7YP)nq7itZJ8IK0BY8OA!;>?B!GCQgFVkAm5$bf?0QRv?_HYeP5*wNf)=vxWsp$y5{GAwJpS zPvXb2VXQ;IG7HSrG#cp->!!br_APqY$6=qAkj$f$m|{p=Xi3{{(^Iz@2I_VY3WX5f`N# zPb;nTM3SaS3N4h{vMs5{HEUgDe@q$6of21guVh_OvJV;Q#yu%AOv^e3(GCHVWRdOy zqX>KANC2~wiWE<|YD0pn7D#oH0T;OH+Tcp7TWrt>X;mkZJ8+doxD+AD!JkIJe#Z4Z za&>ieke?ppDg+Ldq^=Q8_~sY}tU0jth;xc82;kcF6RdlP4v1+kH(LZTu+3#~3b6^U z8zeMFHMqZV|Ldea{1Jh1YPkSwMLfk~zsW~V?_KCqyz*nz?;`5sdU*eye!aZBq+c#B zE=bPL&q;qcJB#|bkNWsC>f;ak@&$rr?+7d25!M==o&8vlm@xX#oBk$4T*P=oY$!h! zU?ChM#l0+C9-83X{_ttuU<&)77{=_RCsfQ(3}QOs%*@lU}ZviU$5-pwvWttaynB1^)J$ziY_4f>h1R z{@O=KvkJ+JT?7_MDb%9QqwGEE95Ij@&d3tZNV-L$M0?O=i^$A^Pzs-;@)l7Q3*;j$ z!t?7m9QYs>z2wFIEIGPLO6boLeO%@F{%i#fO@oc#G`dvq{A9_*Gg0mM710X(3D2G% z-z%^3mx4b#@Mq}%a8QFk3;rxl67ZK4M}isuMwYM+q2HVcP}_wd>bUXUq13@2ma8n6#Z(Ah{2ZpEq~Fks^|D?v0vZ9%f3ZY`Z!lN z7*f}dJrNe*wK)B%c-snbNe1AuM)QrL)f&X0sW87?q>-h~MTReh3hD$?(^>e(n3fj-2L^)0g-|_Ho?Bx{CGrPo_~U=;XK8T|IRE t*X7?n_y3pwro8yw^wr1H+;ubG`wv9fMC)j~6*&L^002ovPDHLkV1f}GA+Z1e literal 1127 zcmV-t1ep7YP)ddGjC>9eS=jnCmMoxo z_9jg6CfS*m--nR=VMI=dgf`LMpXcO{^%Wqv;OpS2W$ElB7dpe3)AvVGF<4fz`_nv| zzpY;YeCV73bZqC*zn>_~fqutXt4WLz53itez-<0RB5J0PuldGcG!~B(W2OjVeSl z(~h@9a6Jwk2@*X?d(39QQHxvP# z-c$81J)ghed&mGCv)?>VjKPBX4_a@v-bs1RNKfc=V*unFRh!)3pRK-V`et7GeQ-)v z|3P#w+dY-%&aX9Dy|(%?Nn?)I?}OT8<1l0bQl4|BuqpGQ`t$z&{_gJXwbfUIjtkRyG6JYSLg5~| z!1IH?13;H3Y|4D77;ghZt-hep6o4U(R>y;vc28RX9NK;lfNi3%S?7WL@(T8AZS}Q* zvH+aO2w)Bj#9OKN0BHN(Z%*uX=J#0UL#4HilP;JJ6!R+Q>U>^xFj$K!O^49;DrZuo z&>T@h%zmOu1qfXok`A04Gr%cMsSG{G0Yvs9&_#IeAs{$$Xd+pMz$$DdX?|uMXkieG z4&s1P9W2STiR!TXjTXVl`cd*67;%aD zN`qiH;8ny6r#P-UD18lZ=aGrP^8tkqJknBoKZL1EJEs9MCiUdc9 zz_gGEKnJ)?n_IN~6#94!z_J(q5AbgQmfbkr t++sf;pls*=VSw_3;%0#IgW^_ze*ls8MC)X@VC(<@002ovPDHLkV1lS449x%l diff --git a/data/tilesets/secondary/secret_base/yellow_cave/unused_tiles.png b/data/tilesets/secondary/secret_base/yellow_cave/unused_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..f825201ccacde428abdad0080b80533bffe1f1cb GIT binary patch literal 1125 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 Iv0^6u4{PJXIsgCw diff --git a/data/tilesets/secondary/slateport/anim/0.png b/data/tilesets/secondary/slateport/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..ef62c41431483083afeb712f971a5e1b94705f51 GIT binary patch literal 179 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsVYww#}JO0u4gxL9ySnRxe$FY z_f!dIg^YRIo8*{f!4nTLnc8!_e{_yXcYF4`b`Hn3hwkP3MDLvd$@?2>?)cMri;5 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/slateport/anim/1.png b/data/tilesets/secondary/slateport/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..9b926bdfc1f0b0450638aa5faa4575fd8cee9a65 GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsTxlg#}JO0re_uTm<&Z&F6=zy zHKBCEo5E`*5AC)-2vfMh^4arcY=Oy7@tk+Ixk}<;f3mZE%uy3g;rz=F-^^XGbjhlN?idzebbwJL|tcd?&kzL+-=BI}cQ2KYVxH zsQYN5!`%Z~+TY9sr(N!uq<+vw`3~2#q)=vk(?9N#Uy2Vn{(0;Y@x85Jmcd1zSSi`S d`2zM$kGNS@#&+Gfbo&U%HJ+}1F6*2UngGyTMrHs2 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/slateport/anim/3.png b/data/tilesets/secondary/slateport/anim/3.png new file mode 100644 index 0000000000000000000000000000000000000000..9b926bdfc1f0b0450638aa5faa4575fd8cee9a65 GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsTxlg#}JO0re_uTm<&Z&F6=zy zHKBCEo5E`*5AC)-2vfMh^4arcY=Oy7@tk+Ixk}<;f3mZE%uy3g;rz=F-^^XGbjhlN?i^T>L!D>LJMU>CMrmvwkrnKT9B$rm`zs{ zJAqukVDCcd`Z{k**gBItiA~@`ZQnqac0Y{c8!K8^L=q2Ob(>{8aju*XsDn{8{r{hH zXYR~+#u*@0NAge4x#yX4&)oAr&w07WQp86tE9M+2&ZR6Vre03U+;e}sMaFjCdaE3K za?2J;-JeJhTg9RCE>M!YhKrI&b^%*kj|1OHOCtUkY1z6JfE&syIw)_>N=ory@(%eT zwdvO=`HnkeZf7=YP*dI=EHC>Z%Ddx3l$T|BAAYFi)zt5Yt7PoO_urR;f3qqgsYMaR z^4juNCASwPvb^g!@KjnNa&=mkF9+1mci`fm&ku|5zn2GweBcam8n`g(*FL6UBCp>a zE@QgxGc5px4xnSB6btL((sdxVvC_q|in606YRSfUyhY;pRG_B3K4QHEY>rwMTw0>W zFM7Khm8k2w;=Xlup-viw4!#&!1jusK??q``zeR%jEf>^J7OY>^g}7XUJ%H``VtbRmc%BdV zK1E1OmlWooH(~``ABr6V&i|{Q7x$n)z2MU=ltDQb(S?fEI_M9Ygf8RKK_RVE>1}RV zC-J-1#^pNC^W?g>mH;AwwS?D}Ovo{jU-B|76_?6P1!ts3aj6_tm`0)$m&(itE*grJ zI(6MZqRr|h_+;_7GoQq>W#VyJdTPr$ zIlUJsns_>A1BU?T4O<-hjpcI49#}4K*w;Gp#&Tw`Jcsdbz=mF~wH+cgEQj};P^1lf zf5wH@yfHreHhcqUYYX8~e`xM>8^rYwFAzT_X8dva@gy)aIWr2K0+as4DDS(I0dHLy zYZ>~!RmPCP<_J`G*NTmCNf|(E8NzFiZY0*pOlAe*+J*yb5#cr*V3^xb9UV6lYk*A= znL37sM^jFTH+9lOt4;x)f=QSJTADbi$qK)0$!|jaj-70}eV0-+OFd6<(pW}tOHTqS z!YP#*@4<}h6e_7Tz`cPi{Gi$?y3qv{f}4ljli9$JKPx+xr8A26SYEUB`|RQSDJFD~ zEw?VU<;ut2wPnuR4WS>lTq%xW5Gj6v_;-5m6@Mv5&d9KwS#6r3;Di0M8vQB4a-=iXS+(AF%mT zM>z-=3mY(4ciiMlVGR*c^ybQFH<-!X5Es84Ldx9$v{O>zYUzD~VMl zY&r~VR!zpBKZxe!#02D%efQWr{grh!H8BCdW5%zW(n@^SdswOofkwm0hsxB!e}vL~l~4!!&GWpMnRHaI~{LtNGk zWnf&5v{zx}4FTetqtO5@B_OrFjBW#H3%N0q8a(N_71(U!vWUzL|6sor9J* z&!dMP>;zIjsztvz>?GE9j0XMIE(br~+8&_4f4g*c!s_n_E_eI>e?bRzmF?6?1171f zDIM~?Y~W(sSvl>xd*x%-eT7!HoVNP|oVBfYF;#OBHZ7ZjtED5X)%d;xMqH3tCsCm4 zibY&2A;MBDd4XEXRw7$bXDImuFut4O%85Tt9QHFZGvtrRiOHFir2X@Ka?C%`CrIJu z7Q|I7l)(rGYz8(GvCUHWMy!QG>aN22Zb)i9b@fuB0uY#Q0F?zertnMiQy?b?Evpk_ z0DjTj!L~LTY{eLGFp1FssWx*B3U#E@+O=J*U2Ve{2%J{*!Q^&~25s9pE;zgv%v!#B zo9lY37eKr(7IHmO?ClvZ<)VHC3w7@GVdX3YiXIOQI&NdI+3muz@G(P?S{h4ie9U+h zT77JNpx0RN?U8QR?WEOR;b(EJ=I2n9)yrpPp;orNZyLEkXleZdXIi;F^iY^$TZG-) zXHX31e{+Y};|ClpLWrkQ7=PQgTQc~gpE+h-+t1GKbRlRtDL&YPgTvx%PY%nj!DK6! zH?1giH{;(iuM{>f$gqM-8R;Q&VkFaq4NSO;X9Hk$kGnViMP$Gm9F=XKPrJ zPdz^@&s$Fqi2sy`|6V`ep2XOGc;&Md$vaUDq!dG*v34 za9C8-@e8AO7%Xf3M*4RL3bQhnvF!d4_!UO>OY!s0lHX__$J+g96nj6lrkG#9mA&~v z>B%G3d5n7FPXe!R+Xf__d=f3QZJQiQAfOy(59lFUIqoN0HBi7=fiEQG$tRyoRLElR zuSEcEFB&kJEUl+QS%?tJfkn$pNzKspbXcBFyiCa<2IrR-EXb49D6P*IYW=F2R?zx8 zc#RX>9Wl(bVlnB>t&L%Pv!VzOz9lg}l2}X;Q?yirGX)@5?9BwQfb}-v0nwf+EL6W) z;tF7P-adMfJBPD~Q*s5PK>WLi2l4oK=k4>)FYg+bSI1AwLnyt*9?;O|OWwAJE?wSL z3zhe*FIOdh=(ACL`81h)A;_IYZgJ^_3o?6lVnSv=c;}s3sGqQ$3m29ZWn$t~QQmoH zK1_Lc@^0^*b!Ev}bgRXTm~0E-ePnU$;YUj4Eo0An>p1Yv67GI1f!m!+=;g}8kHnb7 z*GjkxXo&!byRo|nM&K4A7F!cokp+Rqt3=k0y? zTK+Xtlw;fXL3IO5Fdy>Y5_`x`LyW%NpuFdjGRt_NxQg&UO+JgFKK;Ha4`bndP~B5Y zFx;Vj$rt>;hZy~2ATBoe?5Wr?BaqqiXV2C`#ie>#e5YFY(%G}Work6IyFY9OcYg@2 zH31#t*ECX-X54jY)m7>5a*IaahoULwe8r3uhkOq>Ps|)9#>}G2_Z`9?<__t8E`!RL z4#ueK%L)TLU?witL1J>92TfjgMF}&%LU8*PBV0WG5TOB2Lm%-F!AN*bps;-elL%>x zZDcIIkDz=OU#A4hRZOX95Zs;_U=)+`;ul=La_Oe`b@!LxDRv(($~abRvYT%$@fXx@b}?q*#l?K1y_m(% z5->TcEiMmoMTt|Q-zENxxQ?$l&AUZHgf-AHZwWUum$;Jz>N2Zq-6h2Al8W+FT#Cs< zTxKj*;N}XBUSG02ip%Frf0A$)|4Fibd8#lL6@)$o!kmuTVY{igcrT+mxgN=)Vs=@j z-|E#2G8ZpiL~`|NK&|;Y2qV&JeB>g(p;qwSOZr`G-mmJuycXd#7)9i=&h>QqRp)h> zuCC8u0vYW9*0=PG$c`3d6#QHt;P;8e?Zti;pV4J$896^^mE!4KmfMRE@V_LE$lU3@ zkICHQk2x}zI1rV&$8LMoY*U??Lp;sCanrDzx$&n!Bmy|V5LaUxvS;vP94sS?bBbT{ zHS`g_6Q0w1SS8?=2kh*y9JzzYD)3z=JB;N61Gkk1972CWz26a{H~1Zuk5kWiSVWF{ zf;k_n6RS6e+(L#sN*-svom}}Bxbk1Us;nGpsCd!rZR(DauKf3K8d(AZRzdY?MiPqx^X7QO_Lm~e!s_)5hA1QR^VP=Z_hp{_<#; zJAbn8%T7*o2)vdzx^~FV6SVR}fP0dK8mA-uGwvAc2{TxbFeZdsUWE zn9-WQfc{irsx?(zL;b13RBNib#`>$4+4Am1MY-C25taoDbEx1s?~EZ(0BbK{#p0V| zveA#nJ9czOj2Ct`=fp%kwxIOpHNSV^#t} zN+e_=1-LKKdKq(IMOE=!Abh?V_$SQyKj)suKLMXtpHtNy73DdF__uk`p&Au_M07uK z8vzrzjfn0yx>tqOd;1mcQ#TaL4p)FnFN0TT4HiI{D_4!uN)me+Y?v!B=}@z`Da zn%5u0SIgR#OIep&e@0=ckFd%b$tEd6Up$v`Wc!BCY6r#D1nOz69-=&6(*)YMd)@>b zH|-)~hHwM8)z(;-0ty>r{8P9TraR`Q>5>lQtqNn*^UH9Y!;qdkMz|@WkAqFIjMXKp zw0;ZMYR$G=jt784=uzMrn3KV=Kk{YsediLg`CP)6hZ0Ymllu}+B;?!^7qW8hli$EP zm$+a?SPLVmwC^NVA|6~^i2>45=u0U+jd1w9f#dHtIP~tofGHhph4x5fWyKq;aKP30 z60Tvxc%UOJJm`GSO8B*}go{D=9&CYmQw>TA+eEAZHbsCnz$V;x#~PqRtFf}ZDX6$s z5D~=+BBEG9L=-D8CB5xbPWc>w&cm)`O|MKS5{g6x!g*Njn^7X6NR;AuL%*8;OK9N7 zbGe&?({16r4%cqswOe?S?G`?WO0478s^9|;C4h4!Ky2buaG$8)jOzSza*ng%3*k|D zqLVG%tt*>Rj7L2l)<-?>doHkQ0*H9Ts-|@iiZER3hM_7{VzY6>^Dr(-jma!Sw8Uru^f&nmE7&!*tNL0U0s)U|~+*F31i;O9Fk}?)kv_xxV)({YvFII2j z9OMHy&N&_sJ@*7Kl;9%?wmTlDxDuZbPY`|Dbp0{WXMlk(K$r}3t7Nv7*bG2dS5jA3 zQdd_}S6fvyjnwp&5G}9m7x1f*Sql+Uv=A{x%PnlYcEXYCD6j&E5n-RkZ~iOd z(MoJf{y-8ub=5yM=E~=gm=s}Rw%!fElF|bkpG*6S^(&i!-q%RLah+P!1V)Wq z;gJkgUClM`!%$^uzMvW#pM9M8i#z;PfrELj?_171<^<~_`)fu4%cqd84T56)e@ zuf_YO%5$ztSn7hcsw`q7vu$N@EOw`Xc{AWH!4klIE7+|FXDwBJ%f8%(%a;dktJ0H- z`|5B!`U5sD4kzd-l;IE7^eph!0bX_(! zS-Mu$2hFjgE-S#{{A9XR9&&4@?4cFHOzmq07p36V5I1txvd=fC!m7@dDt=%BivHB_ z++jFrdpY^fNnpSMUW?Zv^h=h{T4mQ|*VUrgw$%BHIYBo!JU{usFM?#4F*iIn+&Eb& zkhvk0GUN;XeC}k~fbGc8^ibZYWGI{iYoJZLfi|47HC!xaWXy3g@*d9%?DKtHRdSK( zsO1@}q_8xAug&;a+}5)iJP7^Y(iKv)qASE&1C*|zr&!-an@52)(Qmqh5K#kdic%*I z1foK!xu);NNQoY`2#lPVSsfK2qGi;ppMLjde)r~xMI6=jpl>+)W~c;j!=$0)iRp_j(C#4 zuqPvVuYZ?}XLkLg;IAk(!jh73l?q-56 zw?`l@Ec;*pTngUKdmJsV+Vqz7j-S(n751yEvj?x-WTg?t%rEN6Zr4vd-g~XyoBn$y#AWjL6fMbwXdbWGHNEc z-EPH@>NfUsoAlew+yN(_H&&%zkuPI0d$sqSD2n@@$CszxB&|t^>o;~8uUFv=ktIGk zBmMjbA%m%jPWgChqNgru{`IZu|6wZ;x;O*QK1sZum5H5x1Y@n00A32v9%+vl7~PkT9>DjdicQa&_Zs05h0vvD zbF>-N@okIsb5yO1^=s(oaL)sus|`ZsTn;N`{%0@H+Cr97R@lN8#C3u2t1v_iDxQ_A z?ZISY!PP)JL_^huXm+3f6N<~PL7r#@eorJ@ZR)S^z(OefuX*2s2zA;KYk94VSL?tw zs9B%aAnaxJq!NC&;lE#fZPZg!y~&-v)N{vFz!rBaQdV8RFv5jetMJ1#((HcZ>u3!N zW}YTEHp!wUO?gmQQm*X;#OVSgHOMnj+Q+mXU29ejDy~#L*mjRtQxmATWjRJ%;p>_j zg!`Qh1sA&LCutPc|8q&EaH+Km5rBr!5Otz~`}S}Rmg2T%%BjW!Ec5|mHQR3U^*2w6 btm*#(5vZlyjtNSq00000NkvXXu0mjfV)=j< literal 6528 zcmWlec{G%N8^*uSGc#t!zNN8G`en&lc3H+6B9jPF28CqbLYBvxy_ArB$x>viNW{om z*`hSrmxN?Vvd7!|*L|OJUFTeX+~-{9bIu({K7W>po`)U)z+|AWWBP9*06+l!Zvk2M zJwX6)pEc0YGz-Xnm=)&A*X7q`@sOWZ!s*40Dn3#0BF$UVfJ_;G7tQ-gPbfF#ZS1(t zNA8yp?+sKQr;q}fb3oZ}D)Up-+%I2?QF9;hlvK&mPd7|vtlkTr@VFuF^1JJT4ZBt$ zA+6m!vcxc%Q(ozSZNpcuCS*sKj$$;O}ir?02 z*Q3FoH(@QZx%v$&Puho{k-uymc>djOS5L3Gd!nFDqj1q`yIOasZ}tpYlt18S&30uj zL*Cr2{r3%nJ_Q@Y9SJTsf4~k!uDSKAqXG%KuSxA`zi~8ny6hmo`M&K+53V1#>)pqL z=CYzMhSgs+x4w0h(AY^Zpl;S!)|V_gwRBO(h4P$}AP`aVcEQZ=N91C_9|U7pw8x z$kk&y@_7H1K&j2%+?4uHN5oU#V7g`i_Z{;(H)&Mt^2m`hX4^!;+bf0=7*PDuT-mHz z3xv!*WwHKQBAob*rQLp4e>$>i(Q+&C+oUO{QeA~+r~8rXd$g0fHCZY(6A!-lJ@0yY z*0_uV6X?pV0Cb40cgyl`5SHQuhKx3B%EC10(|IF8-CNn z?Hu{a+apSjoL8#lcV_cENx7h=S3y3nPMKQ6e>?L->w4E}MRUc^U?acYt)x4Q9I7ya zQNSa8!PX*47*@(`7ASYBX<(u4WE57?c4$090WE)y9k(?Se)i48k#%6}Wi6TpkR>Tp zY?bpHjf2yKfgr~IWZXfx4SFJ~7tjL%^G(%ihe-j_r{@QBvw8?sq! z6iz@(SD=a78LE7o)`huNzch#X;lQ&}CbW#Bwo|SURjYw%WR<+QzKLd;b#ZnzIisML z#u>cFJ@;cEB<%OWOLV?JvP4IbUxCEAv&4ysDcCx1UhunRFG9qFB^D z^Qy12lPp&?Li|T}oZmJ}WyjJ7)K8snI4r)K_~Dt$vAmJTZo_QV6l>@3*J%u~ZkGLf zt!L}zb(C^DRt&V?tFI&qTGvQb<$a=fqc}>4<(i77vZ53$R3;dk{J0|5e{HTu1?}0t zkXD&aUwVJ9=h|s2s+YCOG$cpK#&1PhB|-sEC~N*>Z7~}{K~#kDM;=9+f9E*^2HtS* zAsRd z9lNV2l3CHU*y0ORLRwP^xzAy7GiS^l$s zmj|>~N*I$gGJ@hy+~LdMjRYYvpdp(D$1J?417`?KnLf)2R?7D?mO*c9VL8!vd}IYu_w4?r0P7%VK`dC*Y;eqPACJj}LTwsnrmeJKr8BcDxLWzJ=)eSrALGDzM{6(~FU zg2H!G#RVa%J`3}Mc5h+YkVVoM(D;!gG&R_xH8FSLlL+vn$GQkLFjD;SRHk}abp*W>u<2EN@VSWv1L?^&RV^W1~M6;7zzY;b_@w?;5Faavg$ zOI>NYv2qTOOzcWmmlBCnm;q5pnYqk-@WH^?8a+rf^8c^FL__udLiisk+hP~KwYLI+ zA^7gcB6qEAAZd85C~xL|{n^e&lbf?hdv0~aC&dGX63(Sm&UYMbscS(ev;& z2$5Qn+`B!xmqLYxX{IDetlB9?f&=h87yQ*Wawwb#IQTpza2evWmN?kkhYqN7Oaj#D zCanHK5Mj!Z?t{G?Gx0hjy4T98;X_42xX6-Dp~W0m0CHeJh)89j^HkbsyVLN*wUqcR zuqUC`9WI+YNyl{E?4F$ufh>O8ly#lZJMMvocj_3TWQ%LZDyB}(N-yyn<=I7^08eRUXpEumVq_DPwW^8E}Fws<p8b!TR!$6{ZXi|Vuqh6(|jJu50$?J|L-)-a_ z+{wln@3$84G6h5<(NsT{{5@n0$s>Dbtk(j{4yTdB&KuealL=Ir)#GXU24(F1I^Cqx zyX)DniqYIhg373fYuZ)`%0*no-*UtraCCXTdyM5=5E{cO*rLWXkDXw)r--dFS&wfg_qEmyH?wL% zC`Bp~74Qo-1zeH?EuKD>!(hFLs3v7o5 zlFY}_0{E8X(ManK29$efTg_h5c+EWiyNzK$06Xsut{Yr=qmG%Y9gSFimRG;FB#kON znfNQn@>A9GA5~$@bG424*G(0H8QyXnS2m%jjr@r0JoU6Cb-Msd?hd?L?}^Gptt5op zq~le`U1434)}*SD9!`F%i9#HalluEyauv0KZG?_pmbmt;T>M9mu&vR_q&l5olAkfb zQ;vz<(g4Du$V2#~|@P5Cs>7Z?ENAjt>0Huu` z!OuSeucQ^)Lb-4ANHcbnm!}uqyrjM&PUeODRI19*yqPhY@;xU^80N>BswtyCqfF-- zUKPJTug#jQnPlaA>)fAVKhc&e0y6Qkt%=xxrucW?2z%A>MgEF>lN_Gnxa~Z5II$Ln zCaxXQaF#ReAERaK)aFlqi-@K%ZWh{gGXB)9l1+0)OWJ$Al|472zk*?{u<<1%=z90{Y&CzRc}DH~lGg4^>XN{O0nknFUazmgVJ>Vv z_p;0>g!vNtQQ!@J_K^#r-<&T|>9QdY2pGgPqBL_in?5>y}R{$C9Ne zpVPQuGC%P3Et?+v`0>~mI{8cQ?6d1488Sxgdx?k(!Q?YnPv<=kuA@h_kq%vpN+y@; z&pM=yDkW;BvN5>nSS5%#DksPJPoVf+4o~Dvs*LzsVI9p-i3Xp;pex*&Vca3rG;%jf zwE}XT$A%zPb2`4?*rsX2(3iQYyq@S6`smE5;1EdEiK2EE`C-Tm%JD>(%u_lCOjoah z7wQ>v%HW~~TwSu(9rQKgW@M#)kP$rQ=rcPGUMbK7-=&IA8LFmu7#ka(xuMj-Gmb$_ z#fNf7a@lW|YSQGKPFe-uT@12#!2qh$A<}rmr90e(l{cK~=^%yWYfUF)=#q<{Z|6F= zYQU%eb`_L5H@v6#9zjrQo`>Fv)QL(C1_nf82Na=XY4=QX^JO5 zlGV%19qB|G;7+n4H9Fi|U?ZvcM8H4CO-%-wCUQT*}xOX^y{-qD$ zZ{U9Hqn=-0Pe_bBrbta1Ane(^wRf(fLIGG5mcMT~<1B>GyAW=|W@9{wAyUVhET$0O zk_fNsv$W8+bv^@!nwp&^<5Ec>aMTt(cM3~p+S87qM@`C+7>}NJOr?P_Ta~Q&Kh&Dd zhV_xL8E?QCFn>|SzfvAjy%scA|2bUV_Yf`I?9rW58-o9G5MuqyW~oTl7!Ug86wIo4bTMp+T&!03>%=mgj-&b_iF6s`3+eu z>P(DfYlwq4C$DBY&iTWsMi0)^u)>cAlI=M#GM@J1a_4mO68*o{UB}qyu{>8oUfUPP zv25OQcRB^@u*#SZMgm(1;;K!$K*IDtr-d0}E*acy^v>)5OW6^wj`pq=e8F5n#MIDy zjuyi=C76*j+ZBdG=cB;dq5~X2FHk)pgc&+DUuY)t@GP~3G#RW^;^tyT0+ZNhDi+lf zkIdCDSjbbP6CxJG!5Z`lhFCG0qwRit=@eNg99E)mFukabAZbwb%79AvQ4BgCFb|yH zw&SF~lyHZZHPb}aU`;T5LTO=Hcsr_c3{&3D`9kcV(9V^u`lugdIbxvY09|} z&hj3ybm*Hm^JFy{N>(_DB)6{=PaWMppZ@Du*tIyA7q?|f0+%4tt^ewEpwz~bWh0wB z!Ls`g(pS3I*fHcZAbK2+F}D$Tn*~0)wI$JKqADWH+3CMEvrES69wyr9X<<$upI&9n zuiJVmkWT{YJdwyssYmA@_X*2yI#+-{F<%lrwF4l2fhouAKU$YU2RDL9 z6FCWdkJq97EsJZ%Scp^K#q0U`K?u%|y9fdcZ2;^V+xs=Am2%|(c6Uv3qb2A)& zCIAR4MGvDVMgXKpjYBoaQ2civd`SZC`vkhJAzIHBHJrz?B6MaB%g34?GjTiKa;VfF!9u zCWql*=SG*N&-(MakSH#~MJqflTEicQ7;-l#Jw3k4~ClF&Gguz=7Ry9I$HFRCRHleH<&8^Q_)N0`VMl4uqza>$`xdx zgxF=`ZTm_qeE7f_g?-)J0~t~#1;dGhwB8nF*w1=7mKdg;Z0kNEaWvW;AG;>HpyJku zH5^vP=f`}2R3V#xu9oTxm1ea;qpwF!P;;Ae<=sYAVRkl<=Lh@lA+dmL+agPaoE10U zTFnOyD;V#^N@hD}2BOjEdr@cQ$zZI-PZNfWKD5iIfNDxZX5BS{B5KX0w$RBw&*f1xT?Pogfg^& zirFsEn0=suCOtG=S#?M22qXy+Q>Yrl4Uymxnhl8qg2zzk`HjL_Ex89iaPWUr2EHjF z()T@V*xyeVKiZx-nYe)(S&rwKy`k6i0`5&3S0QrH!QyWrM62`xvKz_hfA8HLe zy?>AX3V4gfjearPX|}mc1UKJ;Z8%4?2<)v^m<_Czz6%78Ic+8f8rvHRs(o{iae81->_vw-P{jk6cx3M_eyLbK@eH!fQxzjc%}9jy zT;n*0UX7XsHG~pZ{8VCWwW(i0*3Q@6SN$<5>g(O3(l0}ux>JB#dC})EIy!0=&=ic_ zY)S}>8c8Yd8*pO*#n;rW%d+}ms&xUHbHR2_Y&QEpKJM2+4swj58PP!>zajZ7Wp9L` zr&5ql4>n)JFxoV{aG)K#OSfD;7CCQLFx|Zt43KgT<^Y9nsLs`uB{wjo4yYVvp9KkYswV;1x07`CWC{I97Bi~D`^Lq%!Q4HiXjV;L#52CvL3+OYyWyv@Rc+=W;SV3cTAb~1O2X>H>kuR;A+@Oh`gXdO(ooxCvisW{&=MSP zwv>yk{Wd{c7I>SGEK#7YtiXF^0$4@Clc?g>6D7CyxNO_{%UJ`G>|NrDbYuWQ;K@Y2d^%srr$BGWY|H|-R+5Moe`(D zzmmvLJAx?5FwcCy1ZRpVWoG3F0m>cQ|BxkbYU?YBTNgbyhQ2&X~Tf(^9H$m@Z+*8&2g{@qo)$+XK6T8%M225E}ZI=$CE^I-}FKrtzS>e zsVvJVlW^Tw&aqcXfR86b$%8e2Q=*R{%o{rK&Qe^VyR}fFbEFyJDle&tZTDPWtj8*J> zD?Bg=!eA=F01d?n96w>wEKYJgMb<=7MCX(iYe7@vMx~c_U|HCIDOhm19ctKWKiu06 z1|3GxP~gRa!!V)j01xE8ARZ1fUBy6o+TrWulQ;m`nuXu*=hYkGY&(i3PJNYz1N8H9 u)}J#4LxL@=q*H(E-rtU|0tH(xdxukY#ba8e8;k#ctr+N@*QwN^MEnmQIe@+Z diff --git a/data/tilesets/secondary/sootopolis/anim/0.png b/data/tilesets/secondary/sootopolis/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..63f97ad47716c3c28ee8dc79b2eff50da218dba5 GIT binary patch literal 1201 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 Wo~LxP@{BeB0000+hAk?JJ0Zj5-KqBwT9^8K@ z#kHNJ8x+MN1?s~G$sEpb{uz$wdNdl*IANTg#tGMSGX}24<1vkHu76;RX!H@QqYwPw z)kk3T;RYC8F-8M^KDYZZ+5Pm)?yYg(`}q#|y?~Cf03J(V@!RRb*RrJUPL?FZ{R$9w z4ACRmmHbqe3{fU5XjKAtCH9KdlRqJ`D(?Be@9J-voR$T9E{oUwU7$!Y5(+j)rJ;qN4mPbrVj&+>Tx{*tigzA-oL+s{T1wQ$^Mq??+be=PS9~ZI*!}jKkvUo z$1UIeC;H`I_s18TQKqMp{yV_m68Cqt-@qYQ&x@noE3 zGeO#A8HKvi~hb!Ir7do z6eeEMRJW08sWde#NrGfVPG7c-Bo$yBopEHe)6^O$q%0sq0OXo?1i;&dytkfAXlpXw z)yUlK84XO7>pfpUImFm2oTWib@@iXSq5XwdTL!XYXyk;Z2*iVh_(Z?;#W`I9GQ3Xd=L?b zLU5&a6glbWB^T6rvIcQmtqnPiHj^$|&MlHM$SqiFC|V>KTph`}5Xf+w84tL4Cdr=R z8}8HCC|Wy%w8Alc#o$$C{m{yuvFjadSm%9YJM`p+A)CN^)kzF5^@KvxTC&Z$0X7ZQ zjZ#QUCA-k0W^rPb2~v!}usvo29Gi3^uNe_q)wq7FB%slWy>zJ)a})}i`haSgh`XR2 zdI%lmpxOjy*-m$)rzoRO zgSfo*+Bkz5p&7a3sptCn*NL-jIHT_2BkrmXz^&62wqY3kHOQQEkq>SNUF)gJbZ!j<8mI_JaEX2 yusFl2IIboXhvUdS^si}K8hHQYBl17~7JmX@e0q$t!&WT-000051L~d)OL6HxQP(wA@6J&RNPWJ4)cb_bRDTAs72*vEGXHeq)u2zHr_@IPc-o zeLRV7k(>VLh7kVSYECk7laT6iDjXwD7B|j2Y2>6 zgVhwWq~caDKNV12D+5s}k zaEz-SgNtGzNV}q-&^DS}aFU$IA)os-c-qlxVDFm6%Y6}NiSqA9fw#IWA5j>LzJ#S_ zw1_J`X&)VV=Q|2BFKMp(NUc=q>=n+^At!mYZL!e*$g4erKd$#cce&R!IIarh zJ0uT&FKMmYKx&Kb%6^7y_&3|JU_78t)Gq*A0ItC})DMe_erf=*ybXY{gr@BPt@xv- zVTsCzWqE8O4u#}O?I?25(M!Hi=gAu6?X@=KG;Ahav|L*xWl&qN)=;!4Ft|37bs>;p zn;8$dc+rwQ!*}e{*eO~&gR;V@e8u2ZW&P30p0UdU8}9QyavVIlVaP7U zp89~>G7)b#reM*v?PnB&LE8gcndc<#O=rF07%Zse`2tf1TrIh($07*qoM6N<$ Ef?!!oZU6uP literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis/anim/5.png b/data/tilesets/secondary/sootopolis/anim/5.png new file mode 100644 index 0000000000000000000000000000000000000000..d0cbfeb57cff3c941397618c313b781c0c15b3f2 GIT binary patch literal 1248 zcmV<61Rwi}P)^F#!7uaB*p!G5BbIE{nH+|9BLI9t4X)_lej5VcR16bs_fJELU6j1+P za-29#+M*~H4bU7uSmEd&&Obv+KHrSSGP%A1Cf8Roo=k3JG$uxqABoR$H5y;b1pfp^ z0G?%hH5$oiLg1%djVD*~!w_;2H|gWXz}1LxBgRc86FKGm)aMZR06sh3i3O}(|W6m6Ney_~;}{pcFx z?b;79FaNq;O1+eN>G_=Z^GD$9!%`k>y4JNsw>n>ae>nSZ^|xVvyOut8T{Fb}jsCu? z_iA3gr{2S0N&2E*g4bMjzWUzzR=kIXzNj9H%hl6@QYsO(NUS7t>t$|(JBKt}?L!ul z+*vEdQELerD77|2+*62>#FbWTj9PqwkZOC-qV-n4j>{kCR*XAD(KS@e0nky0Q(XEK zoFp?P)+LFAVsFI-r^R_}@~yAI^Bc7Vj&47D-xu{FQUCpb2QX;*JELc0&#QC z+MIajD+yDt<<{0w3T>=Zw4{e7BFooxrNsmUN0&Rvt+P_+aLAN^4gt^`z7YUlR^ol> zB@cBWxpxIBcSoW^h;f7RD;S3yM}xgo$SL0J3M|w=akVD+xH$sV<-2Z=?V2FILh|5` zS~j)_Vs>y>*HdJ}PZW*AnGlcgN$MF;CV<=HVB5!8DnIW5wYUpFUJ6XZfk>?3qnBoZ z%A3XfWFj_&>+1(z*-lC1ZZ#Uh=5kxRrjX525RbrERClThu=i3sKxVx2L zrw0lI*-fW~OfCLr^=60FxRGN(x6n4shU@1lcuZZ5iLEfKh1nvw3b%u?+rc3N`D4K8 zHX5E*mB+y0YN>dH;3h5h5e+TT(7Y_9a;x#2AU0000< KMNUMnLSTY5*JyPB literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis/anim/6.png b/data/tilesets/secondary/sootopolis/anim/6.png new file mode 100644 index 0000000000000000000000000000000000000000..4b35ededdb4fc28243cd2354e553dbc952523d08 GIT binary patch literal 1161 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 wX$vl{V!Z07*qoM6N<$f~|(X_5c6? literal 2674 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 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis_gym/anim/0/1.png b/data/tilesets/secondary/sootopolis_gym/anim/0/1.png new file mode 100644 index 0000000000000000000000000000000000000000..4fefe45989b4c9176eb9654c866ac22143c18a05 GIT binary patch literal 283 zcmV+$0p$LPP)iWU}5@iEN4`Iwal zN-Wwd(53nzCe=r|G&+`ZqcftBPwp3v#Gc6Rx|2552@%t$B_rTVzI-+u67_rr^xaa5 z^`eq+R{;@GuByL%pN+aa0S9zNw4v(6hn(2_;Y(h=gWaW%W{bkmVlWF6b~|(`j5|?E zWrR;ChaoW-I@}P>UuW3UYIpAYtG)&GgNPg3AP{dHmExhKN68H3U}wI;eL;`EnHE0J hn^er%$kYL`(GvxfCXv<{oy7nE002ovPDHLkV1lW2cp(4) literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis_gym/anim/0/2.png b/data/tilesets/secondary/sootopolis_gym/anim/0/2.png new file mode 100644 index 0000000000000000000000000000000000000000..f603b3046ce797d9f621bcfe57cf6b31b7eeb91e GIT binary patch literal 294 zcmV+>0oneEP)7xV6ov0gGIU^sN(_u->|-D!F(Vwu570=>ShY^fh=P)=mI&|$C_TsYhox2T@aft* z_tTL9BN63}a0O8IfX@pe=QEd|+^;C2#hq~BUcQ0bvZBR1qW|u+_w9%(LvRlIhH}GR4RRBMIh) s_!rOCEmY0+G2m|=n2V9c4Tw!X0KF+AZq}065O4rgx|K>``wH~ih(t;|MD_4wCqLK$ z#KI6uk|bi;c@J?GkrI>wV?^wd(0Rr>i%5o03}MVax`pm5%r>M1rN9_ic1;7et_jO4;=VU`9h>_=YdK`oEWa=&+`1+HnYo0vf;R`{ynV4Thl{$B zuBzxNOUG(nce`+NSF*XQpo&;1=j~J%(ns!inw{Ctg-8#rhLeM0hQ3&z%xho@xSURF zI&JBSiB8q3UORQ}?Amp7AKHn$4_#mPBu}GIIZOrE)AK0w@C`lWfk8of7(O`_&m-MG zcsNS9hb+rP8s4Eh25*V3g>6}CZwqk@Z&Q4wve5ZUH`I=Y=PjR2n(p{_H&{0B>UYl9 ja5VW6kU%zuZj9Xz(zV;LZMe8~00000NkvXXu0mjfR+Fzb literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis_gym/anim/1/1.png b/data/tilesets/secondary/sootopolis_gym/anim/1/1.png new file mode 100644 index 0000000000000000000000000000000000000000..08413b63c2a7d011e907886e7a2a2659752ea785 GIT binary patch literal 408 zcmV;J0cZY+P)ToQ5Ju;cY_qJC4a-oeQnx)qg{X1>i+G=yvQLD4fE2nbm5l8xxZjv2s6U%_7Egob zVSm_AL{ZGLjN&Q;Aax1V9uNXhijtSH7f^GTP$_rCf^kq#1ox|l%@dsFkQ#B#0O&sQ zAaXuFx|lv@LC^3F=WBsyPTEZKq6;SVqR2P!+7@2x;5E~qyi0zIXNIi-FKtayYWb^ox_Uuc2~V>3Fk-skaimkd z9pSx?6n20d%!mZ|OY%+VfHimPlJdKCg}6n5Xqeuhs0)6e;7lNStSyygd1RDSuotdg z=%vRaZgp#eofWu0y!y;BI*t(#tt=T&0JM?4F?k;p`Px zzZ549B@CsaC@5VpgS^Tp1-e>pSjt@?9b*owjKWZ-wI;Un|GR|lT~^;H1-crr1?i#> zz&UJENGF6H*jefWI)^!B5TZk8?Y}xa+__94q%Q^`_P|>CbZHYoJAG-D`bdO8N#+k4Pb0l3Y)vfzvQfG*cb_7=+|1>N^$Gw0002ovPDHLkV1fjwuw?)M literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis_gym/tiles.png b/data/tilesets/secondary/sootopolis_gym/tiles.png index b2533b24309c2f8041fbfa136f141079b98760a6..4f6b257695dd1fa85cd4c851468d5c1e7459d258 100644 GIT binary patch literal 2954 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 AYXATM literal 2780 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 NL~}c{22*n4e*kF21ONa4 diff --git a/data/tilesets/secondary/trainer_hill/tiles.png b/data/tilesets/secondary/trainer_hill/tiles.png index f5330af84a26dde0cf4ff675f6f588caef4943c5..78d292513fd24cce0e55d3fcf528e1c6646f3229 100644 GIT binary patch literal 3594 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 Qg8%>k07*qoM6N<$g1<@fcmMzZ literal 3311 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 diff --git a/data/tilesets/secondary/trick_house_puzzle/tiles.png b/data/tilesets/secondary/trick_house_puzzle/tiles.png index eb81554cc019c9298136bca56517d7da96b2e64a..5ef1bf9ca5741ced07c87f57e4146ab79e6c01b7 100644 GIT binary patch literal 2797 zcmVNh{jkmx+%t2#re)a>%k;pW>2&z3E912;M`Hz|g~{ff^qIUguDJ z%nDL`tQOZ8+}rNLVhLaLWQuG#INFf~c4_QnM=I^r+Wx-3H~)5ab~JKSd}v*dwYml%Io4*%I6amnD7A%y&-NY&y2()xspaSwd|?-3XX zFdl&@zxe+1k+lD$jlI2&qTaYNX|Jjlu~3p=&UH(|= z!3XOM1#3aDuGXmotE1Rb%6kC#3X8X*v=)T~T8o47(AE$M?;ZT!#6nM4lGa%(0)iV+ zER~US5RJ)0(PNW^WSUx1S`j0v%~D~Nm}+I3hr*m>4Y7PobF!x;HNFO!L2&W$v|De^cj1+TU+NHfC>cWa`>uN3Nqv>i>vgKs8BsFh40%;sb-2_$zoV|-QA29V zefl2jipN({y${RNi=bF6o~Mf!FJ7X#xw&Y|^(*4uMckW@ko0}YEex6Y(&3oX>qcR2;;s?h+RrDqeNI zU%cvkiN>qW_d7s(5bzYbB3^ZV5{y@!Y0jkJHFbdM{CH7XV{2Z^QG_H?5pg*(^P~q6 zS`Hj3x1N;C4lKbFz!E&^i?=VYvTR2h=fFR>PY<=uyg;6OF~>>pg(<+L4?OkrslQ6f zWe6M-wc6)BNbd)>_8+>ifo|8Ped{47bG&?g7d6-hy1O21+}rMv)wOm9>x{L`ZZxU) zeM14R<+<#0XnKC0Lp^VH2cShG`3lu-6?lzrSq%g5MVVo!;W-qYkE~e&OH^^ml@f1sVjLM(9c&`G^QN*3Y+3WS;?}nLhu#FSK^h5^z#)KkEG+)9^+BaAi)?wf-x;P zkzV^akBkNhjsqk(9`KXd;~#V7GHT%Y{zq{6Lc{fYjHjys6j90QM=pwh1>Ek(;T0PX zNsPWGt{oB_2S{){NxUl&@v0b<>Qc2%%S+X-sQQ;1jOv%mIvx5Oj2dKCTV7hF zFRNdDK{t>DYfElAluRgozQU>zu)Lgj)cPxz>m_X7FH^l#{vE6`<8nz`{wcZynU%EQ zKK_(0m&>2>Nx!T$QMC2i6pW1Ox}1iLPIY|90a{ zl787Zlcc>z|GmA}`*-Cq`1t{-eBiE3@sPz@3L6D&_4IEt=`>(yMEQv)oXE(zh>rIo z`UTF z487waM+}*F=5(gb$n*H*PZPECMjptykfC7bv&H-kme(Yp^(4Gr%&f8Z*aF0 zzz=f)NXfM`igFoMq#XZGxz+px<%;<+9pznoI*_2Mok>&iLOac)tkQIA^a4;!!z+zX z4ELRv>v*f7cqgOdDL39t#Jd?0Px|j{9!S!EJXN^=^27Vj&G)90m51#&j#__`H!dh; z(1jlii!K=W%>iG<3)Yt9pk>)Qs~Bj$Wjth9#(jKcH}JLAfo*LWUOdI|0Ew&&zGv`* zLa}Ht3Pl}Hx>G5RCy|Q=P~^x4{EDlL&RWwZ)p%(0M#SzC8y#X}jo4@q8%_O6d#%}` zPGiktzgCCXP{hU>vC$wl96woW4Ja2y7GBN+ z_X8q14LBOy_5X5FhYL#%HBK1Zwn*jH-dkN zHi939LwM^w{u6>oJ>`Mdumn#5OYl?+NlOa<)I!4&JOM1hlc3)t9(WB)@CdL3j{<%J zT7&-Zi&HO@y~A3A{_x9B*e|R#=r4^0ywC5y7@8lDL`{0M00000NkvXXu0mjfR}E<- literal 2567 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 diff --git a/data/tilesets/secondary/underwater/anim/0.png b/data/tilesets/secondary/underwater/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..7609cc82a2b5c979f6ab161ed683fc7dfe0cf104 GIT binary patch literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gscKIb#}JO0vb`I5nGJcEcTVO> zVPup$!4|P+>DGNezT{1c@~sNp?>xnXy=jWa3NzQ`8WM{S&g8XiT44B4kg;fP>&g#D zJO6#;T(|awx^&L< e!oBz!J6?z%)v&i*w{S~4$T^;_elF{r5}E+i;Y5}I literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/underwater/anim/1.png b/data/tilesets/secondary/underwater/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..64cddd371ad5e1c3f144f282b22abd6036fd9195 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsX9*=#}JO0qP>P(hYbW+zWb{e z$n$+s5Rdj)p1-oAaP=XTwX-IKP5nQ?xA5>GzUl&RzUS{w9OSJueI)3Za;~xFc+jfY zE^CVyJC1ujFciAw$ZWqnQQNDvX?vu~d49 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/underwater/anim/2.png b/data/tilesets/secondary/underwater/anim/2.png new file mode 100644 index 0000000000000000000000000000000000000000..ff6ff843784390b5219a4aab5c1cefe04694f9ad GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsRmCM#}JO0yk`vg4jb?=JN)xx z{KLR~qJC9lvu^Ea=gsLFm#%tWxaxe-KIAl`3Ww9{WfzjVPDKVZb6=giB6XhR`j*;+ z`W1_UMPBDh|9QYBr`YjZM1;>Vd&-_)TU$CWO`Z|(sp**Qg6jV%*E^q^A7Ag7v_pTw j literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/underwater/anim/3.png b/data/tilesets/secondary/underwater/anim/3.png new file mode 100644 index 0000000000000000000000000000000000000000..2863c2261fafa876a2cc28ea98abdb59a690f5aa GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsd`Tr#}JO0qP^OD%!UHawaYuF za7UbKWa9a>^IFq7FXly$CTv@xkn#RPWRj$feX|&cmhehVrMGeiueB^Oov?1(-m8ZN zg`||$ZDcO#Yp6T5;QM8P?(Ita-$G@kIoz*|`7CAC5 jEp<0^(@*Fe==sBZBEWXz`OHPKASZdc`njxgN@xNA3js(w literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/underwater/tiles.png b/data/tilesets/secondary/underwater/tiles.png index e0569d970d2c9b1239d0501e1c5c8bfe8b79e3bf..5af21f35392d59b3d4c8046756f016966eb593ac 100644 GIT binary patch literal 2846 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%0A%}mdqw}D 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 Hu0mjf-9uE* literal 1710 zcmV;f22uHmP)t*FN7c- zG+n4Hf|pK}f(J=EmD*E5Cxom-itQ5&=*{)}zV~O|dpmDuqp#g8Gn?I2T96uhIARd5oLi`56lTl!jcmM`*JPW{?`vC0PfQ+AO zXz97Q-HsuJB^Ds#<3`}USL65yq>!8uV%Gvxd^0f605u6chMP2n5=V!1i}SJl-;EiU3Ro@&}+@ z3picao{FMpw^F@;4r%}s%i5Cwaur5Oh%^A*7ncC=in!7ByYLu+uKALjVc*Qvq!NMut(PU>EWBykD&;mwA0aJKm3?LiMNvL1lFk%XyAh2G)x*w^Dl&0tI$R#PikO zXE3#FKwgJ3Z~;z0p7$Mqt}CFbfd^201w2&?6sFk#?$8*&`ZQeWF7)fV;LQUAfPnE+ zeFRhy`*lUk^Vj4v_J{|h3FJSOHvtf-0eBGrogpBFZDXnrTd-cI8nD;yuP!i)_W;8xH1P@hs0L`YT0ga@JrA!f32+54CqB{h zfS#aZ04Twl0=jm*4J^!CfL@Fhu*ns`?D$#$4tAw3Xo-hB?7~`MfZYIKx^M;psUmPK z@Q_C}(4!CrOcBkMbzP0Ze+FO_IKMV`3MLc0pU~&Qqf4|6X7F0uT-)RZ?q>LhsbKod z20EP+_|ehM$tAO^P6&MPB?4b0XHTC#cI z;715JnaC4pl6b&E5GZUQThPFK*9Fw+Jb`HXYXOB-gKSx!ffs#XApmd}U`ztIwm6f| zN(rb#rQIX|TUt^4pu6Az*#tl_0xaXNE;8nKAp{hKJ(aEJ^JD<809}K90<^8~1Nci% zsCR9^slj;Qv|g>peBd|%yaIR~@b}zNc{DmP_o35;s_AEEDj!I?--S&4tqV9K=R|3O z>40Ga{y+0od@keJ1r;9z)@y+x&%OAe?x_!mIsoD&P{oIUb#utF0F3Xca2+46fo>H* z@l55PsQ7&VGM=gUM8yYdFfs}%z9&17B*PFOk64+RKYGflc&0Ar{B=+Pk2uXk{muF` z?!~8JK*k$DH!nU30*`1V9V&gmiw^^szyC#)pdt39Q(FK8bko zA`Hj`O1+HrS;&ho!+=bnG&2ewU-+iihBeo&N@6e8m;w%s1MJBv3%NIwJAmo|v%)Qa zGarC>1gK6HptnNi0$km{`nKu9On$RB9R5S6P6^;7c*s80@iw62IXzFQaC;Dsfc(cd zUspAJ*o}3(1(`Lu~H&17{qb3PQXK0O5evS zz5?{M)d*O55Sa{|vDUw@0P5pTHE}p!WY~j^2T^2dfUykJ1s9jG27CF&{U|2@K9v(G z1egp6xCZx92EdIM4oCpHFc=G%45$lmc7xLo0@2idGr$H3WK;tSXwJYIg{;dV9)Zs_ zATWdBnC1YGfGpz7*9H&`fHRSnDFK*?0H`AB|CFo!W})BP63DvOmgQ8Q$s-!ZKjnT< z2hc+QV>oPMdszce1gIpgg@`7S{J0j-sq03oU}V!Z07*qoM6N<$ EfEamT(fRg>AtM6=50k?0 l>DRtW$ShHxq~iJO5<~p4A6c#%^TI(IJYD@<);T3K0RRNb7Iy#u literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/unused_1/1.png b/data/tilesets/secondary/unused_1/1.png new file mode 100644 index 0000000000000000000000000000000000000000..bea921d90e42ea862d1fed110fd4913482f3d34a GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^91ILh3@ktfLwv-1As{8|>EamT(fRg>AtM6=50k?0 l>DRtW$ShHxq~iJO5<~p4A6c#%^TI(IJYD@<);T3K0RRNb7Iy#u literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/unused_1/2.png b/data/tilesets/secondary/unused_1/2.png new file mode 100644 index 0000000000000000000000000000000000000000..16652df19896a91d715ed5047610e1350fa210b1 GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0vp^91ILh3@ktfLwv-1As}Vw>EamT(fRg>BQJx30L#YB z8!UEAY^cw7IKdcV0}gaKh%Xnmb}_7&7rF#-*j8*I$;UjmbyK49cxh}iLm(O5V8P?bY3zgD>T8e44-c+xf#7`NJ6b!*Awq zoKn}Wy4(C+TkO{`n6KAU_~%YI`Q@U9$e%|3n8N#8y}?f2Ufmzh-%j42=I@w)$NW3y n-!cFG!TkH+l6Nk7<9Z37meuh-l$2BE00000NkvXXu0mjfNMW|J literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/unused_1/tiles.png b/data/tilesets/secondary/unused_1/tiles.png index 0a35187c84f385747b4fb6ec1abfcaf48f7b92e4..3ae8bce428c75a3cdbffacdbabd4dfb686fff395 100644 GIT binary patch literal 77 zcmeAS@N?(olHy`uVBq!ia0vp^96;Q`0wfr$R3!R_ ZWMGI{{ZHWgBApo^b)K$%F6*2UngA<}5!e6# literal 80 zcmeAS@N?(olHy`uVBq!ia0vp^4L~fw0wfsh4j&B#QsSO2jv*Gk$v^xR6C_L%A|wpB c+!zHI7~JLl3AE~-WCbbpboFyt=akR{0B0EyNdN!< diff --git a/data/tilesets/secondary/unused_2/0.png b/data/tilesets/secondary/unused_2/0.png new file mode 100644 index 0000000000000000000000000000000000000000..2895d3319a5c35f73a524731a21caa8f30647a0b GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^96&6<0wfqt3-&AkQU;zbjv*W~Q;#?bGAMAk9-RN} zBEvDZ8xB6NA567fb3mY_Trp?bZZDP-yCUr6?^^w2NRXB}w|H{pe~=lTu6{1-oD!M< Dhh!kZ literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/unused_2/1.png b/data/tilesets/secondary/unused_2/1.png new file mode 100644 index 0000000000000000000000000000000000000000..63c22acf2b98595cf3a22b7d9dfdf18fc3847c02 GIT binary patch literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^96&6=0wfsJo%qfIDKk$O#}JO0y+<|*GAM8`AMlYj zQ;@FM(V(ukI_UO~qs=BwQ^J|v>QP)Fxg(8ia(%t8*a0b*vkih2%*SeG2(b!l0+f|;SVN85&t)#oF~7*AI}mvv4F FO#lvr8~XqN literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/unused_2/3.png b/data/tilesets/secondary/unused_2/3.png new file mode 100644 index 0000000000000000000000000000000000000000..8ad81b1e1e9daf31260a661bd436367997d4f31c GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDFaUz#}JO0$sDXqY$}IzMLm`* zUDTl{n7Kp6p+#G-)5OQ{dcX|Xl?q{5S`#=9hp;nbt=1OT^vItMGQ-o=&t;ucLK6Uu C+!_4< literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/unused_2/tiles.png b/data/tilesets/secondary/unused_2/tiles.png index b9c594303003c71800bd7a8b4768812e6ef80832..2ab3b63d6b5e07e348c729d633361b9024575f14 100644 GIT binary patch literal 979 zcmV;^11$WBP)NToT%#MO;XiCH^PjI&OQvO?_@+VX#D;5$CCEIgZpp5}#3! z21&SdCUt`(j!8sKShE4X{qwkF!n8q)xF9a`=P~;${bxdRg&fewa6#^43PU{i5QYiN zd%2I9_b_=k1@oTG@1;a*nP93PCf8CJ`^8>@+-4eH02c$5C>u~L6R7NF8j{5_@srb_ z^+`$S;YVNS`U77;jPdOQP^YTD0ZNA`_Lq-hO=hoJDO;6-in&?kW;NC#h9u%~7d8D< znWh?Wvj-Iry?!79!uZAPtg%rsRcusD6&n>NT{)l%paLoY0*VNT+20X=FC3zWRddQ8 z>ZCPwwi~1^b+#L>Ep;|OTk33n$V`v83R2KlOcPy{u^Kxgja8E@-pZ0VuAxU=psaQmJIcjn4N!ehr1+6;t5qx5#GX0Ayy<1#K2P0L2v- z%znlHvdE7Yz;5(_Y*hpUXg-neklL|002ovPDHLkV1k-B B&G7&L literal 864 zcmV-m1E2hfP)5(qmRY zQfvqGmek2T#)7`%z&H*DmuhUlxdFhI4_mS;^o1c!e*g~!$T1J2nZYnq5InJDqTq~98{xBf4&^w?89Opyp zrgq5rhTj?jHkpi>Z7ySVG_VL@o%5CYZ)@QE2LW#z=ZEz5M#CCtst)Q+1=OwAp!w|{ z*d<`?5%_{lp`+}`n6Lbi(FwyYV^zYtoFktc&@L3}Cwd2_Ky&Af<17^F&F?vZvmI6} zvO?o*mv&*Tkpg}RI?8j?XmNVJ(gxA43ix-i{rK-&e>$03ABbzlJKQ;4Y04I|ltn**rQ6uJN;ln037&?SH#X*qxh zEuaAx03Z`U+XVoTtANNg0<>K~Z5Oksb`e#C^%MYvu>!(44?qh@3kg7od;lJkF#&Wr z8vy!4HB^N$H9#$70>iI25#nl&yXtcufTjRIH8dW;mkh@!;7QKxKrc$xVq9S+ki6=i z0bp)6fJiMILA(cd9?%O zj>;7RvWg|}_5PQr4wzg-6M?N_vG@uY0^_#Pco*mwngrAZRPLx;F)4lpULc@dNK>Zq qf&ifkMUt%n{cZgJfaJc<3;Y9-xn7ZJ)LXp(0000 Date: Mon, 2 Oct 2017 21:08:54 -0400 Subject: [PATCH 340/342] Decompile data/tileset.s --- data/tileset.s | 707 -------------------------------------------- ld_script.txt | 1 - src/tileset_anims.c | 616 +++++++++++++++++++++++++++++++++++--- 3 files changed, 581 insertions(+), 743 deletions(-) delete mode 100644 data/tileset.s diff --git a/data/tileset.s b/data/tileset.s deleted file mode 100644 index 0ca02d41c..000000000 --- a/data/tileset.s +++ /dev/null @@ -1,707 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2, 0 - -gUnknown_085105C4:: - .incbin "data/tilesets/primary/general/anim/0/1.4bpp" - -gUnknown_08510644:: - .incbin "data/tilesets/primary/general/anim/0/0.4bpp" - -gUnknown_085106C4:: - .incbin "data/tilesets/primary/general/anim/0/2.4bpp" - - .space 0x20 - -gTilesetAnims_General0:: @ 8510764 - .4byte gUnknown_08510644 - .4byte gUnknown_085105C4 - .4byte gUnknown_08510644 - .4byte gUnknown_085106C4 - -gUnknown_08510774:: - .incbin "data/tilesets/primary/general/anim/1/0.4bpp" - -gUnknown_08510B34:: - .incbin "data/tilesets/primary/general/anim/1/1.4bpp" - -gUnknown_08510EF4:: - .incbin "data/tilesets/primary/general/anim/1/2.4bpp" - -gUnknown_085112B4:: - .incbin "data/tilesets/primary/general/anim/1/3.4bpp" - -gUnknown_08511674:: - .incbin "data/tilesets/primary/general/anim/1/4.4bpp" - -gUnknown_08511A34:: - .incbin "data/tilesets/primary/general/anim/1/5.4bpp" - -gUnknown_08511DF4:: - .incbin "data/tilesets/primary/general/anim/1/6.4bpp" - -gUnknown_085121B4:: - .incbin "data/tilesets/primary/general/anim/1/7.4bpp" - - -gTilesetAnims_General1:: @ 8512574 - .4byte gUnknown_08510774 - .4byte gUnknown_08510B34 - .4byte gUnknown_08510EF4 - .4byte gUnknown_085112B4 - .4byte gUnknown_08511674 - .4byte gUnknown_08511A34 - .4byte gUnknown_08511DF4 - .4byte gUnknown_085121B4 - -gUnknown_08512594:: - .incbin "data/tilesets/primary/general/anim/2/0.4bpp" - -gUnknown_085126D4:: - .incbin "data/tilesets/primary/general/anim/2/1.4bpp" - -gUnknown_08512814:: - .incbin "data/tilesets/primary/general/anim/2/2.4bpp" - -gUnknown_08512954:: - .incbin "data/tilesets/primary/general/anim/2/3.4bpp" - -gUnknown_08512A94:: - .incbin "data/tilesets/primary/general/anim/2/4.4bpp" - -gUnknown_08512BD4:: - .incbin "data/tilesets/primary/general/anim/2/5.4bpp" - -gUnknown_08512D14:: - .incbin "data/tilesets/primary/general/anim/2/6.4bpp" - - -gTilesetAnims_General2:: @ 8512E54 - .4byte gUnknown_08512594 - .4byte gUnknown_085126D4 - .4byte gUnknown_08512814 - .4byte gUnknown_08512954 - .4byte gUnknown_08512A94 - .4byte gUnknown_08512BD4 - .4byte gUnknown_08512D14 - .4byte gUnknown_08512594 - -gUnknown_08512E74:: - .incbin "data/tilesets/primary/general/anim/3/0.4bpp" - -gUnknown_08512F34:: - .incbin "data/tilesets/primary/general/anim/3/1.4bpp" - -gUnknown_08512FF4:: - .incbin "data/tilesets/primary/general/anim/3/2.4bpp" - -gUnknown_085130B4:: - .incbin "data/tilesets/primary/general/anim/3/3.4bpp" - - -gTilesetAnims_General3:: @ 8513174 - .4byte gUnknown_08512E74 - .4byte gUnknown_08512F34 - .4byte gUnknown_08512FF4 - .4byte gUnknown_085130B4 - -gUnknown_08513184:: - .incbin "data/tilesets/primary/general/anim/4/0.4bpp" - -gUnknown_085132C4:: - .incbin "data/tilesets/primary/general/anim/4/1.4bpp" - -gUnknown_08513404:: - .incbin "data/tilesets/primary/general/anim/4/2.4bpp" - -gUnknown_08513544:: - .incbin "data/tilesets/primary/general/anim/4/3.4bpp" - - -gTilesetAnims_General4:: @ 8513684 - .4byte gUnknown_08513184 - .4byte gUnknown_085132C4 - .4byte gUnknown_08513404 - .4byte gUnknown_08513544 - -gUnknown_08513694:: - .incbin "data/tilesets/secondary/lavaridge/anim/0.4bpp" - -gUnknown_08513714:: - .incbin "data/tilesets/secondary/lavaridge/anim/1.4bpp" - -gUnknown_08513794:: - .incbin "data/tilesets/secondary/lavaridge/anim/2.4bpp" - -gUnknown_08513814:: - .incbin "data/tilesets/secondary/lavaridge/anim/3.4bpp" - - -gTilesetAnims_Lavaridge0:: @ 8513894 - .4byte gUnknown_08513694 - .4byte gUnknown_08513714 - .4byte gUnknown_08513794 - .4byte gUnknown_08513814 - -gUnknown_085138A4:: - .incbin "data/tilesets/secondary/pacifidlog/anim/0/0.4bpp" - -gUnknown_08513C64:: - .incbin "data/tilesets/secondary/pacifidlog/anim/0/1.4bpp" - -gUnknown_08514024:: - .incbin "data/tilesets/secondary/pacifidlog/anim/0/2.4bpp" - - -gTilesetAnims_Pacifidlog0:: @ 85143E4 - .4byte gUnknown_085138A4 - .4byte gUnknown_08513C64 - .4byte gUnknown_08514024 - .4byte gUnknown_08513C64 - -gUnknown_085143F4:: - .incbin "data/tilesets/secondary/underwater/anim/0.4bpp" - -gUnknown_08514474:: - .incbin "data/tilesets/secondary/underwater/anim/1.4bpp" - -gUnknown_085144F4:: - .incbin "data/tilesets/secondary/underwater/anim/2.4bpp" - -gUnknown_08514574:: - .incbin "data/tilesets/secondary/underwater/anim/3.4bpp" - - -gTilesetAnims_Underwater0:: @ 85145F4 - .4byte gUnknown_085143F4 - .4byte gUnknown_08514474 - .4byte gUnknown_085144F4 - .4byte gUnknown_08514574 - -gUnknown_08514604:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/0.4bpp" - -gUnknown_08514704:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/1.4bpp" - -gUnknown_08514804:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/2.4bpp" - -gUnknown_08514904:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/3.4bpp" - -gUnknown_08514A04:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/4.4bpp" - -gUnknown_08514B04:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/5.4bpp" - -gUnknown_08514C04:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/6.4bpp" - -gUnknown_08514D04:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/7.4bpp" - - -gTilesetAnims_Pacifidlog1:: @ 8514E04 - .4byte gUnknown_08514604 - .4byte gUnknown_08514704 - .4byte gUnknown_08514804 - .4byte gUnknown_08514904 - .4byte gUnknown_08514A04 - .4byte gUnknown_08514B04 - .4byte gUnknown_08514C04 - .4byte gUnknown_08514D04 - -gUnknown_08514E24:: - .incbin "data/tilesets/secondary/mauville/anim/0/a/0.4bpp" - -gUnknown_08514EA4:: - .incbin "data/tilesets/secondary/mauville/anim/0/a/1.4bpp" - -gUnknown_08514F24:: - .incbin "data/tilesets/secondary/mauville/anim/0/a/2.4bpp" - -gUnknown_08514FA4:: - .incbin "data/tilesets/secondary/mauville/anim/0/a/3.4bpp" - -gUnknown_08515024:: - .incbin "data/tilesets/secondary/mauville/anim/1/a/1.4bpp" - -gUnknown_085150A4:: - .incbin "data/tilesets/secondary/mauville/anim/0/b/0.4bpp" - -gUnknown_08515124:: - .incbin "data/tilesets/secondary/mauville/anim/0/b/1.4bpp" - -gUnknown_085151A4:: - .incbin "data/tilesets/secondary/mauville/anim/0/b/2.4bpp" - -gUnknown_08515224:: - .incbin "data/tilesets/secondary/mauville/anim/0/b/3.4bpp" - -gUnknown_085152A4:: - .incbin "data/tilesets/secondary/mauville/anim/1/b/1.4bpp" - - .space 0x20 - -gTilesetAnims_MauvilleVDests0:: @ 8515344 - .4byte BG_VRAM + 0x4c00 - .4byte BG_VRAM + 0x4c80 - .4byte BG_VRAM + 0x4d00 - .4byte BG_VRAM + 0x4d80 - .4byte BG_VRAM + 0x4e00 - .4byte BG_VRAM + 0x4e80 - .4byte BG_VRAM + 0x4f00 - .4byte BG_VRAM + 0x4f80 - -gTilesetAnims_MauvilleVDests1:: @ 8515364 - .4byte BG_VRAM + 0x5000 - .4byte BG_VRAM + 0x5080 - .4byte BG_VRAM + 0x5100 - .4byte BG_VRAM + 0x5180 - .4byte BG_VRAM + 0x5200 - .4byte BG_VRAM + 0x5280 - .4byte BG_VRAM + 0x5300 - .4byte BG_VRAM + 0x5380 - -gTilesetAnims_Mauville0a:: @ 8515384 - .4byte gUnknown_08514E24 - .4byte gUnknown_08514E24 - .4byte gUnknown_08514EA4 - .4byte gUnknown_08514F24 - .4byte gUnknown_08514FA4 - .4byte gUnknown_08514FA4 - .4byte gUnknown_08514FA4 - .4byte gUnknown_08514FA4 - .4byte gUnknown_08514FA4 - .4byte gUnknown_08514FA4 - .4byte gUnknown_08514F24 - .4byte gUnknown_08514EA4 - -gTilesetAnims_Mauville0b:: @ 85153B4 - .4byte gUnknown_085150A4 - .4byte gUnknown_085150A4 - .4byte gUnknown_08515124 - .4byte gUnknown_085151A4 - .4byte gUnknown_08515224 - .4byte gUnknown_08515224 - .4byte gUnknown_08515224 - .4byte gUnknown_08515224 - .4byte gUnknown_08515224 - .4byte gUnknown_08515224 - .4byte gUnknown_085151A4 - .4byte gUnknown_08515124 - -gTilesetAnims_Mauville1a:: @ 85153E4 - .4byte gUnknown_08514E24 - .4byte gUnknown_08514E24 - .4byte gUnknown_08515024 - .4byte gUnknown_08515024 - -gTilesetAnims_Mauville1b:: @ 85153F4 - .4byte gUnknown_085150A4 - .4byte gUnknown_085150A4 - .4byte gUnknown_085152A4 - .4byte gUnknown_085152A4 - -gUnknown_08515404:: - .incbin "data/tilesets/secondary/rustboro/anim/0/0.4bpp" - -gUnknown_08515484:: - .incbin "data/tilesets/secondary/rustboro/anim/0/1.4bpp" - -gUnknown_08515504:: - .incbin "data/tilesets/secondary/rustboro/anim/0/2.4bpp" - -gUnknown_08515584:: - .incbin "data/tilesets/secondary/rustboro/anim/0/3.4bpp" - -gUnknown_08515604:: - .incbin "data/tilesets/secondary/rustboro/anim/0/4.4bpp" - -gUnknown_08515684:: - .incbin "data/tilesets/secondary/rustboro/anim/0/5.4bpp" - -gUnknown_08515704:: - .incbin "data/tilesets/secondary/rustboro/anim/0/6.4bpp" - -gUnknown_08515784:: - .incbin "data/tilesets/secondary/rustboro/anim/0/7.4bpp" - - -gTilesetAnims_RustboroVDests0:: @ 8515804 - .4byte BG_VRAM + 0x5000 - .4byte BG_VRAM + 0x5080 - .4byte BG_VRAM + 0x5100 - .4byte BG_VRAM + 0x5180 - .4byte BG_VRAM + 0x5200 - .4byte BG_VRAM + 0x5280 - .4byte BG_VRAM + 0x5300 - .4byte BG_VRAM + 0x5380 - -gTilesetAnims_Rustboro0:: @ 8515824 - .4byte gUnknown_08515404 - .4byte gUnknown_08515484 - .4byte gUnknown_08515504 - .4byte gUnknown_08515584 - .4byte gUnknown_08515604 - .4byte gUnknown_08515684 - .4byte gUnknown_08515704 - .4byte gUnknown_08515784 - -gUnknown_08515844:: - .incbin "data/tilesets/secondary/rustboro/anim/1/0.4bpp" - -gUnknown_085158C4:: - .incbin "data/tilesets/secondary/rustboro/anim/1/1.4bpp" - - .space 0x20 - - -gTilesetAnims_Rustboro1:: @ 8515964 - .4byte gUnknown_08515844 - .4byte gUnknown_085158C4 - -gUnknown_0851596C:: - .incbin "data/tilesets/secondary/cave/anim/0.4bpp" - -gUnknown_085159EC:: - .incbin "data/tilesets/secondary/cave/anim/1.4bpp" - -gUnknown_08515A6C:: - .incbin "data/tilesets/secondary/cave/anim/2.4bpp" - -gUnknown_08515AEC:: - .incbin "data/tilesets/secondary/cave/anim/3.4bpp" - -gUnknown_08515B6C:: - .incbin "data/tilesets/secondary/cave/anim/unused/0.4bpp" - -gUnknown_08515BEC:: - .incbin "data/tilesets/secondary/cave/anim/unused/1.4bpp" - -gUnknown_08515C6C:: - .incbin "data/tilesets/secondary/cave/anim/unused/2.4bpp" - -gUnknown_08515CEC:: - .incbin "data/tilesets/secondary/cave/anim/unused/3.4bpp" - - .space 0x20 - - -gTilesetAnims_Lavaridge1_Cave0:: @ 8515D8C - .4byte gUnknown_0851596C - .4byte gUnknown_085159EC - .4byte gUnknown_08515A6C - .4byte gUnknown_08515AEC - -gUnknown_08515D9C:: - .incbin "data/tilesets/secondary/ever_grande/anim/0.4bpp" - -gUnknown_08515E1C:: - .incbin "data/tilesets/secondary/ever_grande/anim/1.4bpp" - -gUnknown_08515E9C:: - .incbin "data/tilesets/secondary/ever_grande/anim/2.4bpp" - -gUnknown_08515F1C:: - .incbin "data/tilesets/secondary/ever_grande/anim/3.4bpp" - -gUnknown_08515F9C:: - .incbin "data/tilesets/secondary/ever_grande/anim/4.4bpp" - -gUnknown_0851601C:: - .incbin "data/tilesets/secondary/ever_grande/anim/5.4bpp" - -gUnknown_0851609C:: - .incbin "data/tilesets/secondary/ever_grande/anim/6.4bpp" - -gUnknown_0851611C:: - .incbin "data/tilesets/secondary/ever_grande/anim/7.4bpp" - - .space 0x20 - - -gTilesetAnims_EverGrandeVDests0:: @ 85161BC - .4byte BG_VRAM + 0x5c00 - .4byte BG_VRAM + 0x5c80 - .4byte BG_VRAM + 0x5d00 - .4byte BG_VRAM + 0x5d80 - .4byte BG_VRAM + 0x5e00 - .4byte BG_VRAM + 0x5e80 - .4byte BG_VRAM + 0x5f00 - .4byte BG_VRAM + 0x5f80 - -gTilesetAnims_EverGrande0:: @ 85161DC - .4byte gUnknown_08515D9C - .4byte gUnknown_08515E1C - .4byte gUnknown_08515E9C - .4byte gUnknown_08515F1C - .4byte gUnknown_08515F9C - .4byte gUnknown_0851601C - .4byte gUnknown_0851609C - .4byte gUnknown_0851611C - -gUnknown_085161FC:: - .incbin "data/tilesets/secondary/dewford/anim/0.4bpp" - -gUnknown_085162BC:: - .incbin "data/tilesets/secondary/dewford/anim/1.4bpp" - -gUnknown_0851637C:: - .incbin "data/tilesets/secondary/dewford/anim/2.4bpp" - -gUnknown_0851643C:: - .incbin "data/tilesets/secondary/dewford/anim/3.4bpp" - - -gTilesetAnims_Dewford0:: @ 85164FC - .4byte gUnknown_085161FC - .4byte gUnknown_085162BC - .4byte gUnknown_0851637C - .4byte gUnknown_0851643C - -gUnknown_0851650C:: - .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/0.4bpp" - -gUnknown_085165CC:: - .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/1.4bpp" - -gUnknown_0851668C:: - .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/2.4bpp" - -gUnknown_0851674C:: - .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/3.4bpp" - - -gTilesetAnims_BattleFrontierOutsideWest0:: @ 851680C - .4byte gUnknown_0851650C - .4byte gUnknown_085165CC - .4byte gUnknown_0851668C - .4byte gUnknown_0851674C - -gUnknown_0851681C:: @ 851680C - .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/0.4bpp" - -gUnknown_085168DC:: - .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/1.4bpp" - -gUnknown_0851699C:: - .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/2.4bpp" - -gUnknown_08516A5C:: - .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/3.4bpp" - - -gTilesetAnims_BattleFrontierOutsideEast0:: @ 8516B1C - .4byte gUnknown_0851681C - .4byte gUnknown_085168DC - .4byte gUnknown_0851699C - .4byte gUnknown_08516A5C - -gUnknown_08516B2C:: - .incbin "data/tilesets/secondary/slateport/anim/0.4bpp" - -gUnknown_08516BAC:: - .incbin "data/tilesets/secondary/slateport/anim/1.4bpp" - -gUnknown_08516C2C:: - .incbin "data/tilesets/secondary/slateport/anim/2.4bpp" - -gUnknown_08516CAC:: - .incbin "data/tilesets/secondary/slateport/anim/3.4bpp" - - -gTilesetAnims_Slateport0:: @ 8516D2C - .4byte gUnknown_08516B2C - .4byte gUnknown_08516BAC - .4byte gUnknown_08516C2C - .4byte gUnknown_08516CAC - -gUnknown_08516D3C:: - .incbin "data/tilesets/primary/building/anim/0.4bpp" - -gUnknown_08516DBC:: - .incbin "data/tilesets/primary/building/anim/1.4bpp" - - -gTilesetAnims_InsideBuilding0:: @ 8516E3C - .4byte gUnknown_08516D3C - .4byte gUnknown_08516DBC - -gUnknown_08516E44:: - .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/0.4bpp" - -gUnknown_08516FC4:: - .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/1.4bpp" - -gUnknown_08517144:: - .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/2.4bpp" - -gUnknown_085172C4:: - .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/0.4bpp" - -gUnknown_08517544:: - .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/1.4bpp" - -gUnknown_085177C4:: - .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/2.4bpp" - - -gTilesetAnims_SootopolisGym0:: @ 8517A44 - .4byte gUnknown_08516E44 - .4byte gUnknown_08516FC4 - .4byte gUnknown_08517144 - -gTilesetAnims_SootopolisGym1:: @ 8517A50 - .4byte gUnknown_085172C4 - .4byte gUnknown_08517544 - .4byte gUnknown_085177C4 - -gUnknown_08517A5C:: - .incbin "data/tilesets/secondary/elite_four/anim/1/0.4bpp" - -gUnknown_08517ADC:: - .incbin "data/tilesets/secondary/elite_four/anim/1/1.4bpp" - -gUnknown_08517B5C:: - .incbin "data/tilesets/secondary/elite_four/anim/0/0.4bpp" - -gUnknown_08517B7C:: - .incbin "data/tilesets/secondary/elite_four/anim/0/1.4bpp" - -gUnknown_08517B9C:: - .incbin "data/tilesets/secondary/elite_four/anim/0/2.4bpp" - -gUnknown_08517BBC:: - .incbin "data/tilesets/secondary/elite_four/anim/0/3.4bpp" - - .space 0x20 - - -gTilesetAnims_EliteFour1:: @ 8517BFC - .4byte gUnknown_08517B5C - .4byte gUnknown_08517B7C - .4byte gUnknown_08517B9C - .4byte gUnknown_08517BBC - -gTilesetAnims_EliteFour0:: @ 8517C0C - .4byte gUnknown_08517A5C - .4byte gUnknown_08517ADC - -gUnknown_08517C14:: - .incbin "data/tilesets/secondary/mauville_gym/anim/0.4bpp" - -gUnknown_08517E14:: - .incbin "data/tilesets/secondary/mauville_gym/anim/1.4bpp" - - .space 0x20 - - -gTilesetAnims_MauvilleGym0:: @ 8518034 - .4byte gUnknown_08517C14 - .4byte gUnknown_08517E14 - -gUnknown_0851803C:: - .incbin "data/tilesets/secondary/bike_shop/anim/0.4bpp" - -gUnknown_0851815C:: - .incbin "data/tilesets/secondary/bike_shop/anim/1.4bpp" - - .space 0x20 - -gTilesetAnims_BikeShop0:: @ 851829C - .4byte gUnknown_0851803C - .4byte gUnknown_0851815C - -gUnknown_085182A4:: - .incbin "data/tilesets/secondary/sootopolis/anim/0.4bpp" - -gUnknown_08518EA4:: - .incbin "data/tilesets/secondary/sootopolis/anim/1.4bpp" - -gUnknown_08519AA4:: - .incbin "data/tilesets/secondary/sootopolis/anim/2.4bpp" - -gUnknown_0851A6A4:: - .incbin "data/tilesets/secondary/sootopolis/anim/3.4bpp" - -gUnknown_0851B2A4:: - .incbin "data/tilesets/secondary/sootopolis/anim/4.4bpp" - -gUnknown_0851BEA4:: - .incbin "data/tilesets/secondary/sootopolis/anim/5.4bpp" - -gUnknown_0851CAA4:: - .incbin "data/tilesets/secondary/sootopolis/anim/6.4bpp" - -gUnknown_0851D6A4:: - .incbin "data/tilesets/secondary/sootopolis/anim/7.4bpp" - - .space 0x20 - -gUnknown_0851E2C4:: - .incbin "data/tilesets/secondary/unused_1/0.4bpp" - -gUnknown_0851EAC4:: - .incbin "data/tilesets/secondary/unused_1/1.4bpp" - -gUnknown_0851F2C4:: - .incbin "data/tilesets/secondary/unused_1/2.4bpp" - -gUnknown_0851FAC4:: - .incbin "data/tilesets/secondary/unused_1/3.4bpp" - -gTilesetAnims_Sootopolis0:: @ 85202C4 - .4byte gUnknown_085182A4 - .4byte gUnknown_08518EA4 - .4byte gUnknown_08519AA4 - .4byte gUnknown_0851A6A4 - .4byte gUnknown_0851B2A4 - .4byte gUnknown_0851BEA4 - .4byte gUnknown_0851CAA4 - .4byte gUnknown_0851D6A4 - -gUnknown_085202E4:: - .incbin "data/tilesets/secondary/battle_pyramid/anim/0/0.4bpp" - -gUnknown_085203E4:: - .incbin "data/tilesets/secondary/battle_pyramid/anim/0/1.4bpp" - -gUnknown_085204E4:: - .incbin "data/tilesets/secondary/battle_pyramid/anim/0/2.4bpp" - - .space 0x20 - -gUnknown_08520604:: - .incbin "data/tilesets/secondary/battle_pyramid/anim/1/0.4bpp" - -gUnknown_08520704:: - .incbin "data/tilesets/secondary/battle_pyramid/anim/1/1.4bpp" - -gUnknown_08520804:: - .incbin "data/tilesets/secondary/battle_pyramid/anim/1/2.4bpp" - - .space 0x3d00 - -gUnknown_08524604:: - .incbin "data/tilesets/secondary/unused_2/0.4bpp" - - .space 0x1c0 - -gUnknown_08524804:: - .incbin "data/tilesets/secondary/unused_2/1.4bpp" - -gTilesetAnims_BattlePyramid0:: @ 8524864 - .4byte gUnknown_085202E4 - .4byte gUnknown_085203E4 - .4byte gUnknown_085204E4 - -gTilesetAnims_BattlePyramid1:: @ 8524870 - .4byte gUnknown_08520604 - .4byte gUnknown_08520704 - .4byte gUnknown_08520804 - diff --git a/ld_script.txt b/ld_script.txt index 2ab0f780b..fcd3af3d4 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -356,7 +356,6 @@ SECTIONS { data/field_tasks.o(.rodata); data/reset_rtc_screen.o(.rodata); data/start_menu.o(.rodata); - data/tileset.o(.rodata); src/tileset_anims.o(.rodata); src/palette.o(.rodata); data/fanfares.o(.rodata); diff --git a/src/tileset_anims.c b/src/tileset_anims.c index b7f18d869..e53461e02 100644 --- a/src/tileset_anims.c +++ b/src/tileset_anims.c @@ -31,41 +31,587 @@ static void cur_mapheader_run_tileset2_func(void); // .rodata -extern const u16 *const gTilesetAnims_General0[]; -extern const u16 *const gTilesetAnims_General1[]; -extern const u16 *const gTilesetAnims_General2[]; -extern const u16 *const gTilesetAnims_General3[]; -extern const u16 *const gTilesetAnims_General4[]; -extern const u16 *const gTilesetAnims_Lavaridge0[]; -extern const u16 *const gTilesetAnims_Pacifidlog0[]; -extern const u16 *const gTilesetAnims_Underwater0[]; -extern const u16 *const gTilesetAnims_Pacifidlog1[]; -extern u16 *const gTilesetAnims_MauvilleVDests0[]; -extern u16 *const gTilesetAnims_MauvilleVDests1[]; -extern const u16 *const gTilesetAnims_Mauville0a[]; -extern const u16 *const gTilesetAnims_Mauville0b[]; -extern const u16 *const gTilesetAnims_Mauville1a[]; -extern const u16 *const gTilesetAnims_Mauville1b[]; -extern u16 *const gTilesetAnims_RustboroVDests0[]; -extern const u16 *const gTilesetAnims_Rustboro0[]; -extern const u16 *const gTilesetAnims_Rustboro1[]; -extern const u16 *const gTilesetAnims_Lavaridge1_Cave0[]; -extern u16 *const gTilesetAnims_EverGrandeVDests0[]; -extern const u16 *const gTilesetAnims_EverGrande0[]; -extern const u16 *const gTilesetAnims_Dewford0[]; -extern const u16 *const gTilesetAnims_BattleFrontierOutsideWest0[]; -extern const u16 *const gTilesetAnims_BattleFrontierOutsideEast0[]; -extern const u16 *const gTilesetAnims_Slateport0[]; -extern const u16 *const gTilesetAnims_InsideBuilding0[]; -extern const u16 *const gTilesetAnims_SootopolisGym0[]; -extern const u16 *const gTilesetAnims_SootopolisGym1[]; -extern const u16 *const gTilesetAnims_EliteFour1[]; -extern const u16 *const gTilesetAnims_EliteFour0[]; -extern const u16 *const gTilesetAnims_MauvilleGym0[]; -extern const u16 *const gTilesetAnims_BikeShop0[]; -extern const u16 *const gTilesetAnims_Sootopolis0[]; -extern const u16 *const gTilesetAnims_BattlePyramid0[]; -extern const u16 *const gTilesetAnims_BattlePyramid1[]; + +const u16 gUnknown_085105C4[] = INCBIN_U16("data/tilesets/primary/general/anim/0/1.4bpp"); + +const u16 gUnknown_08510644[] = INCBIN_U16("data/tilesets/primary/general/anim/0/0.4bpp"); + +const u16 gUnknown_085106C4[] = INCBIN_U16("data/tilesets/primary/general/anim/0/2.4bpp"); + +const u16 tileset_anims_space_0[16] = {}; + +const u16 *const gTilesetAnims_General0[] = { + gUnknown_08510644, + gUnknown_085105C4, + gUnknown_08510644, + gUnknown_085106C4 +}; + +const u16 gUnknown_08510774[] = INCBIN_U16("data/tilesets/primary/general/anim/1/0.4bpp"); + +const u16 gUnknown_08510B34[] = INCBIN_U16("data/tilesets/primary/general/anim/1/1.4bpp"); + +const u16 gUnknown_08510EF4[] = INCBIN_U16("data/tilesets/primary/general/anim/1/2.4bpp"); + +const u16 gUnknown_085112B4[] = INCBIN_U16("data/tilesets/primary/general/anim/1/3.4bpp"); + +const u16 gUnknown_08511674[] = INCBIN_U16("data/tilesets/primary/general/anim/1/4.4bpp"); + +const u16 gUnknown_08511A34[] = INCBIN_U16("data/tilesets/primary/general/anim/1/5.4bpp"); + +const u16 gUnknown_08511DF4[] = INCBIN_U16("data/tilesets/primary/general/anim/1/6.4bpp"); + +const u16 gUnknown_085121B4[] = INCBIN_U16("data/tilesets/primary/general/anim/1/7.4bpp"); + +const u16 *const gTilesetAnims_General1[] = { + gUnknown_08510774, + gUnknown_08510B34, + gUnknown_08510EF4, + gUnknown_085112B4, + gUnknown_08511674, + gUnknown_08511A34, + gUnknown_08511DF4, + gUnknown_085121B4 +}; + +const u16 gUnknown_08512594[] = INCBIN_U16("data/tilesets/primary/general/anim/2/0.4bpp"); + +const u16 gUnknown_085126D4[] = INCBIN_U16("data/tilesets/primary/general/anim/2/1.4bpp"); + +const u16 gUnknown_08512814[] = INCBIN_U16("data/tilesets/primary/general/anim/2/2.4bpp"); + +const u16 gUnknown_08512954[] = INCBIN_U16("data/tilesets/primary/general/anim/2/3.4bpp"); + +const u16 gUnknown_08512A94[] = INCBIN_U16("data/tilesets/primary/general/anim/2/4.4bpp"); + +const u16 gUnknown_08512BD4[] = INCBIN_U16("data/tilesets/primary/general/anim/2/5.4bpp"); + +const u16 gUnknown_08512D14[] = INCBIN_U16("data/tilesets/primary/general/anim/2/6.4bpp"); + +const u16 *const gTilesetAnims_General2[] = { + gUnknown_08512594, + gUnknown_085126D4, + gUnknown_08512814, + gUnknown_08512954, + gUnknown_08512A94, + gUnknown_08512BD4, + gUnknown_08512D14, + gUnknown_08512594 +}; + +const u16 gUnknown_08512E74[] = INCBIN_U16("data/tilesets/primary/general/anim/3/0.4bpp"); + +const u16 gUnknown_08512F34[] = INCBIN_U16("data/tilesets/primary/general/anim/3/1.4bpp"); + +const u16 gUnknown_08512FF4[] = INCBIN_U16("data/tilesets/primary/general/anim/3/2.4bpp"); + +const u16 gUnknown_085130B4[] = INCBIN_U16("data/tilesets/primary/general/anim/3/3.4bpp"); + +const u16 *const gTilesetAnims_General3[] = { + gUnknown_08512E74, + gUnknown_08512F34, + gUnknown_08512FF4, + gUnknown_085130B4 +}; + +const u16 gUnknown_08513184[] = INCBIN_U16("data/tilesets/primary/general/anim/4/0.4bpp"); + +const u16 gUnknown_085132C4[] = INCBIN_U16("data/tilesets/primary/general/anim/4/1.4bpp"); + +const u16 gUnknown_08513404[] = INCBIN_U16("data/tilesets/primary/general/anim/4/2.4bpp"); + +const u16 gUnknown_08513544[] = INCBIN_U16("data/tilesets/primary/general/anim/4/3.4bpp"); + +const u16 *const gTilesetAnims_General4[] = { + gUnknown_08513184, + gUnknown_085132C4, + gUnknown_08513404, + gUnknown_08513544 +}; + +const u16 gUnknown_08513694[] = INCBIN_U16("data/tilesets/secondary/lavaridge/anim/0.4bpp"); + +const u16 gUnknown_08513714[] = INCBIN_U16("data/tilesets/secondary/lavaridge/anim/1.4bpp"); + +const u16 gUnknown_08513794[] = INCBIN_U16("data/tilesets/secondary/lavaridge/anim/2.4bpp"); + +const u16 gUnknown_08513814[] = INCBIN_U16("data/tilesets/secondary/lavaridge/anim/3.4bpp"); + +const u16 *const gTilesetAnims_Lavaridge0[] = { + gUnknown_08513694, + gUnknown_08513714, + gUnknown_08513794, + gUnknown_08513814 +}; + +const u16 gUnknown_085138A4[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/0/0.4bpp"); + +const u16 gUnknown_08513C64[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/0/1.4bpp"); + +const u16 gUnknown_08514024[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/0/2.4bpp"); + +const u16 *const gTilesetAnims_Pacifidlog0[] = { + gUnknown_085138A4, + gUnknown_08513C64, + gUnknown_08514024, + gUnknown_08513C64 +}; + +const u16 gUnknown_085143F4[] = INCBIN_U16("data/tilesets/secondary/underwater/anim/0.4bpp"); + +const u16 gUnknown_08514474[] = INCBIN_U16("data/tilesets/secondary/underwater/anim/1.4bpp"); + +const u16 gUnknown_085144F4[] = INCBIN_U16("data/tilesets/secondary/underwater/anim/2.4bpp"); + +const u16 gUnknown_08514574[] = INCBIN_U16("data/tilesets/secondary/underwater/anim/3.4bpp"); + +const u16 *const gTilesetAnims_Underwater0[] = { + gUnknown_085143F4, + gUnknown_08514474, + gUnknown_085144F4, + gUnknown_08514574 +}; + +const u16 gUnknown_08514604[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/0.4bpp"); + +const u16 gUnknown_08514704[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/1.4bpp"); + +const u16 gUnknown_08514804[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/2.4bpp"); + +const u16 gUnknown_08514904[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/3.4bpp"); + +const u16 gUnknown_08514A04[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/4.4bpp"); + +const u16 gUnknown_08514B04[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/5.4bpp"); + +const u16 gUnknown_08514C04[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/6.4bpp"); + +const u16 gUnknown_08514D04[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/7.4bpp"); + +const u16 *const gTilesetAnims_Pacifidlog1[] = { + gUnknown_08514604, + gUnknown_08514704, + gUnknown_08514804, + gUnknown_08514904, + gUnknown_08514A04, + gUnknown_08514B04, + gUnknown_08514C04, + gUnknown_08514D04 +}; + +const u16 gUnknown_08514E24[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/a/0.4bpp"); + +const u16 gUnknown_08514EA4[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/a/1.4bpp"); + +const u16 gUnknown_08514F24[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/a/2.4bpp"); + +const u16 gUnknown_08514FA4[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/a/3.4bpp"); + +const u16 gUnknown_08515024[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/1/a/1.4bpp"); + +const u16 gUnknown_085150A4[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/b/0.4bpp"); + +const u16 gUnknown_08515124[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/b/1.4bpp"); + +const u16 gUnknown_085151A4[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/b/2.4bpp"); + +const u16 gUnknown_08515224[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/b/3.4bpp"); + +const u16 gUnknown_085152A4[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/1/b/1.4bpp"); + +const u16 tileset_anims_space_1[16] = {}; + +u16 *const gTilesetAnims_MauvilleVDests0[] = { + (u16 *)(BG_VRAM + 0x4c00), + (u16 *)(BG_VRAM + 0x4c80), + (u16 *)(BG_VRAM + 0x4d00), + (u16 *)(BG_VRAM + 0x4d80), + (u16 *)(BG_VRAM + 0x4e00), + (u16 *)(BG_VRAM + 0x4e80), + (u16 *)(BG_VRAM + 0x4f00), + (u16 *)(BG_VRAM + 0x4f80) +}; + +u16 *const gTilesetAnims_MauvilleVDests1[] = { + (u16 *)(BG_VRAM + 0x5000), + (u16 *)(BG_VRAM + 0x5080), + (u16 *)(BG_VRAM + 0x5100), + (u16 *)(BG_VRAM + 0x5180), + (u16 *)(BG_VRAM + 0x5200), + (u16 *)(BG_VRAM + 0x5280), + (u16 *)(BG_VRAM + 0x5300), + (u16 *)(BG_VRAM + 0x5380) +}; + +const u16 *const gTilesetAnims_Mauville0a[] = { + gUnknown_08514E24, + gUnknown_08514E24, + gUnknown_08514EA4, + gUnknown_08514F24, + gUnknown_08514FA4, + gUnknown_08514FA4, + gUnknown_08514FA4, + gUnknown_08514FA4, + gUnknown_08514FA4, + gUnknown_08514FA4, + gUnknown_08514F24, + gUnknown_08514EA4 +}; + +const u16 *const gTilesetAnims_Mauville0b[] = { + gUnknown_085150A4, + gUnknown_085150A4, + gUnknown_08515124, + gUnknown_085151A4, + gUnknown_08515224, + gUnknown_08515224, + gUnknown_08515224, + gUnknown_08515224, + gUnknown_08515224, + gUnknown_08515224, + gUnknown_085151A4, + gUnknown_08515124 +}; + +const u16 *const gTilesetAnims_Mauville1a[] = { + gUnknown_08514E24, + gUnknown_08514E24, + gUnknown_08515024, + gUnknown_08515024 +}; + +const u16 *const gTilesetAnims_Mauville1b[] = { + gUnknown_085150A4, + gUnknown_085150A4, + gUnknown_085152A4, + gUnknown_085152A4 +}; + +const u16 gUnknown_08515404[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/0.4bpp"); + +const u16 gUnknown_08515484[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/1.4bpp"); + +const u16 gUnknown_08515504[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/2.4bpp"); + +const u16 gUnknown_08515584[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/3.4bpp"); + +const u16 gUnknown_08515604[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/4.4bpp"); + +const u16 gUnknown_08515684[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/5.4bpp"); + +const u16 gUnknown_08515704[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/6.4bpp"); + +const u16 gUnknown_08515784[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/7.4bpp"); + +u16 *const gTilesetAnims_RustboroVDests0[] = { + (u16 *)(BG_VRAM + 0x5000), + (u16 *)(BG_VRAM + 0x5080), + (u16 *)(BG_VRAM + 0x5100), + (u16 *)(BG_VRAM + 0x5180), + (u16 *)(BG_VRAM + 0x5200), + (u16 *)(BG_VRAM + 0x5280), + (u16 *)(BG_VRAM + 0x5300), + (u16 *)(BG_VRAM + 0x5380) +}; + +const u16 *const gTilesetAnims_Rustboro0[] = { + gUnknown_08515404, + gUnknown_08515484, + gUnknown_08515504, + gUnknown_08515584, + gUnknown_08515604, + gUnknown_08515684, + gUnknown_08515704, + gUnknown_08515784 +}; + +const u16 gUnknown_08515844[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/1/0.4bpp"); + +const u16 gUnknown_085158C4[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/1/1.4bpp"); + +const u16 tileset_anims_space_2[16] = {}; + +const u16 *const gTilesetAnims_Rustboro1[] = { + gUnknown_08515844, + gUnknown_085158C4 +}; + +const u16 gUnknown_0851596C[] = INCBIN_U16("data/tilesets/secondary/cave/anim/0.4bpp"); + +const u16 gUnknown_085159EC[] = INCBIN_U16("data/tilesets/secondary/cave/anim/1.4bpp"); + +const u16 gUnknown_08515A6C[] = INCBIN_U16("data/tilesets/secondary/cave/anim/2.4bpp"); + +const u16 gUnknown_08515AEC[] = INCBIN_U16("data/tilesets/secondary/cave/anim/3.4bpp"); + +const u16 gUnknown_08515B6C[] = INCBIN_U16("data/tilesets/secondary/cave/anim/unused/0.4bpp"); + +const u16 gUnknown_08515BEC[] = INCBIN_U16("data/tilesets/secondary/cave/anim/unused/1.4bpp"); + +const u16 gUnknown_08515C6C[] = INCBIN_U16("data/tilesets/secondary/cave/anim/unused/2.4bpp"); + +const u16 gUnknown_08515CEC[] = INCBIN_U16("data/tilesets/secondary/cave/anim/unused/3.4bpp"); + +const u16 tileset_anims_space_3[16] = {}; + +const u16 *const gTilesetAnims_Lavaridge1_Cave0[] = { + gUnknown_0851596C, + gUnknown_085159EC, + gUnknown_08515A6C, + gUnknown_08515AEC +}; + +const u16 gUnknown_08515D9C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/0.4bpp"); + +const u16 gUnknown_08515E1C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/1.4bpp"); + +const u16 gUnknown_08515E9C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/2.4bpp"); + +const u16 gUnknown_08515F1C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/3.4bpp"); + +const u16 gUnknown_08515F9C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/4.4bpp"); + +const u16 gUnknown_0851601C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/5.4bpp"); + +const u16 gUnknown_0851609C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/6.4bpp"); + +const u16 gUnknown_0851611C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/7.4bpp"); + +const u16 tileset_anims_space_4[16] = {}; + +u16 *const gTilesetAnims_EverGrandeVDests0[] = { + (u16 *)(BG_VRAM + 0x5c00), + (u16 *)(BG_VRAM + 0x5c80), + (u16 *)(BG_VRAM + 0x5d00), + (u16 *)(BG_VRAM + 0x5d80), + (u16 *)(BG_VRAM + 0x5e00), + (u16 *)(BG_VRAM + 0x5e80), + (u16 *)(BG_VRAM + 0x5f00), + (u16 *)(BG_VRAM + 0x5f80) +}; + +const u16 *const gTilesetAnims_EverGrande0[] = { + gUnknown_08515D9C, + gUnknown_08515E1C, + gUnknown_08515E9C, + gUnknown_08515F1C, + gUnknown_08515F9C, + gUnknown_0851601C, + gUnknown_0851609C, + gUnknown_0851611C +}; + +const u16 gUnknown_085161FC[] = INCBIN_U16("data/tilesets/secondary/dewford/anim/0.4bpp"); + +const u16 gUnknown_085162BC[] = INCBIN_U16("data/tilesets/secondary/dewford/anim/1.4bpp"); + +const u16 gUnknown_0851637C[] = INCBIN_U16("data/tilesets/secondary/dewford/anim/2.4bpp"); + +const u16 gUnknown_0851643C[] = INCBIN_U16("data/tilesets/secondary/dewford/anim/3.4bpp"); + +const u16 *const gTilesetAnims_Dewford0[] = { + gUnknown_085161FC, + gUnknown_085162BC, + gUnknown_0851637C, + gUnknown_0851643C +}; + +const u16 gUnknown_0851650C[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_west/anim/0.4bpp"); + +const u16 gUnknown_085165CC[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_west/anim/1.4bpp"); + +const u16 gUnknown_0851668C[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_west/anim/2.4bpp"); + +const u16 gUnknown_0851674C[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_west/anim/3.4bpp"); + +const u16 *const gTilesetAnims_BattleFrontierOutsideWest0[] = { + gUnknown_0851650C, + gUnknown_085165CC, + gUnknown_0851668C, + gUnknown_0851674C +}; + +const u16 gUnknown_0851681C[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_east/anim/0.4bpp"); + +const u16 gUnknown_085168DC[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_east/anim/1.4bpp"); + +const u16 gUnknown_0851699C[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_east/anim/2.4bpp"); + +const u16 gUnknown_08516A5C[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_east/anim/3.4bpp"); + +const u16 *const gTilesetAnims_BattleFrontierOutsideEast0[] = { + gUnknown_0851681C, + gUnknown_085168DC, + gUnknown_0851699C, + gUnknown_08516A5C +}; + +const u16 gUnknown_08516B2C[] = INCBIN_U16("data/tilesets/secondary/slateport/anim/0.4bpp"); + +const u16 gUnknown_08516BAC[] = INCBIN_U16("data/tilesets/secondary/slateport/anim/1.4bpp"); + +const u16 gUnknown_08516C2C[] = INCBIN_U16("data/tilesets/secondary/slateport/anim/2.4bpp"); + +const u16 gUnknown_08516CAC[] = INCBIN_U16("data/tilesets/secondary/slateport/anim/3.4bpp"); + +const u16 *const gTilesetAnims_Slateport0[] = { + gUnknown_08516B2C, + gUnknown_08516BAC, + gUnknown_08516C2C, + gUnknown_08516CAC +}; + +const u16 gUnknown_08516D3C[] = INCBIN_U16("data/tilesets/primary/building/anim/0.4bpp"); + +const u16 gUnknown_08516DBC[] = INCBIN_U16("data/tilesets/primary/building/anim/1.4bpp"); + +const u16 *const gTilesetAnims_InsideBuilding0[] = { + gUnknown_08516D3C, + gUnknown_08516DBC +}; + +const u16 gUnknown_08516E44[] = INCBIN_U16("data/tilesets/secondary/sootopolis_gym/anim/0/0.4bpp"); + +const u16 gUnknown_08516FC4[] = INCBIN_U16("data/tilesets/secondary/sootopolis_gym/anim/0/1.4bpp"); + +const u16 gUnknown_08517144[] = INCBIN_U16("data/tilesets/secondary/sootopolis_gym/anim/0/2.4bpp"); + +const u16 gUnknown_085172C4[] = INCBIN_U16("data/tilesets/secondary/sootopolis_gym/anim/1/0.4bpp"); + +const u16 gUnknown_08517544[] = INCBIN_U16("data/tilesets/secondary/sootopolis_gym/anim/1/1.4bpp"); + +const u16 gUnknown_085177C4[] = INCBIN_U16("data/tilesets/secondary/sootopolis_gym/anim/1/2.4bpp"); + +const u16 *const gTilesetAnims_SootopolisGym0[] = { + gUnknown_08516E44, + gUnknown_08516FC4, + gUnknown_08517144 +}; + +const u16 *const gTilesetAnims_SootopolisGym1[] = { + gUnknown_085172C4, + gUnknown_08517544, + gUnknown_085177C4 +}; + +const u16 gUnknown_08517A5C[] = INCBIN_U16("data/tilesets/secondary/elite_four/anim/1/0.4bpp"); + +const u16 gUnknown_08517ADC[] = INCBIN_U16("data/tilesets/secondary/elite_four/anim/1/1.4bpp"); + +const u16 gUnknown_08517B5C[] = INCBIN_U16("data/tilesets/secondary/elite_four/anim/0/0.4bpp"); + +const u16 gUnknown_08517B7C[] = INCBIN_U16("data/tilesets/secondary/elite_four/anim/0/1.4bpp"); + +const u16 gUnknown_08517B9C[] = INCBIN_U16("data/tilesets/secondary/elite_four/anim/0/2.4bpp"); + +const u16 gUnknown_08517BBC[] = INCBIN_U16("data/tilesets/secondary/elite_four/anim/0/3.4bpp"); + +const u16 tileset_anims_space_5[16] = {}; + +const u16 *const gTilesetAnims_EliteFour1[] = { + gUnknown_08517B5C, + gUnknown_08517B7C, + gUnknown_08517B9C, + gUnknown_08517BBC +}; + +const u16 *const gTilesetAnims_EliteFour0[] = { + gUnknown_08517A5C, + gUnknown_08517ADC +}; + +const u16 gUnknown_08517C14[] = INCBIN_U16("data/tilesets/secondary/mauville_gym/anim/0.4bpp"); + +const u16 gUnknown_08517E14[] = INCBIN_U16("data/tilesets/secondary/mauville_gym/anim/1.4bpp"); + +const u16 tileset_anims_space_6[16] = {}; + +const u16 *const gTilesetAnims_MauvilleGym0[] = { + gUnknown_08517C14, + gUnknown_08517E14 +}; + +const u16 gUnknown_0851803C[] = INCBIN_U16("data/tilesets/secondary/bike_shop/anim/0.4bpp"); + +const u16 gUnknown_0851815C[] = INCBIN_U16("data/tilesets/secondary/bike_shop/anim/1.4bpp"); + +const u16 tileset_anims_space_7[16] = {}; + +const u16 *const gTilesetAnims_BikeShop0[] = { + gUnknown_0851803C, + gUnknown_0851815C +}; + +const u16 gUnknown_085182A4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/0.4bpp"); + +const u16 gUnknown_08518EA4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/1.4bpp"); + +const u16 gUnknown_08519AA4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/2.4bpp"); + +const u16 gUnknown_0851A6A4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/3.4bpp"); + +const u16 gUnknown_0851B2A4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/4.4bpp"); + +const u16 gUnknown_0851BEA4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/5.4bpp"); + +const u16 gUnknown_0851CAA4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/6.4bpp"); + +const u16 gUnknown_0851D6A4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/7.4bpp"); + +const u16 tileset_anims_space_8[16] = {}; + +const u16 gUnknown_0851E2C4[] = INCBIN_U16("data/tilesets/secondary/unused_1/0.4bpp"); + +const u16 gUnknown_0851EAC4[] = INCBIN_U16("data/tilesets/secondary/unused_1/1.4bpp"); + +const u16 gUnknown_0851F2C4[] = INCBIN_U16("data/tilesets/secondary/unused_1/2.4bpp"); + +const u16 gUnknown_0851FAC4[] = INCBIN_U16("data/tilesets/secondary/unused_1/3.4bpp"); + +const u16 *const gTilesetAnims_Sootopolis0[] = { + gUnknown_085182A4, + gUnknown_08518EA4, + gUnknown_08519AA4, + gUnknown_0851A6A4, + gUnknown_0851B2A4, + gUnknown_0851BEA4, + gUnknown_0851CAA4, + gUnknown_0851D6A4 +}; + +const u16 gUnknown_085202E4[] = INCBIN_U16("data/tilesets/secondary/battle_pyramid/anim/0/0.4bpp"); + +const u16 gUnknown_085203E4[] = INCBIN_U16("data/tilesets/secondary/battle_pyramid/anim/0/1.4bpp"); + +const u16 gUnknown_085204E4[] = INCBIN_U16("data/tilesets/secondary/battle_pyramid/anim/0/2.4bpp"); + +const u16 tileset_anims_space_9[16] = {}; + +const u16 gUnknown_08520604[] = INCBIN_U16("data/tilesets/secondary/battle_pyramid/anim/1/0.4bpp"); + +const u16 gUnknown_08520704[] = INCBIN_U16("data/tilesets/secondary/battle_pyramid/anim/1/1.4bpp"); + +const u16 gUnknown_08520804[] = INCBIN_U16("data/tilesets/secondary/battle_pyramid/anim/1/2.4bpp"); + +const u16 tileset_anims_space_10[7808] = {}; + +const u16 gUnknown_08524604[] = INCBIN_U16("data/tilesets/secondary/unused_2/0.4bpp"); + +const u16 tileset_anims_space_11[224] = {}; + +const u16 gUnknown_08524804[] = INCBIN_U16("data/tilesets/secondary/unused_2/1.4bpp"); + +const u16 *const gTilesetAnims_BattlePyramid0[] = { + gUnknown_085202E4, + gUnknown_085203E4, + gUnknown_085204E4 +}; + +const u16 *const gTilesetAnims_BattlePyramid1[] = { + gUnknown_08520604, + gUnknown_08520704, + gUnknown_08520804 +}; extern const u16 gUnknown_08D85640[]; extern const u16 gUnknown_08D85660[]; From 572648ba2d82dbdc8a05ba3d38908e1a1c326e0e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 2 Oct 2017 21:51:22 -0400 Subject: [PATCH 341/342] BSS: field_screen, field_effect, pokemon_storage_system, fldeff_cut, script_menu --- src/field_effect.c | 15 +++++++++++++++ src/field_screen.c | 15 +++++++++++++++ src/fldeff_cut.c | 19 +++++++++++++++++++ src/pokemon_storage_system.c | 15 +++++++++++++++ src/script_menu.c | 16 ++++++++++++++++ sym_bss.txt | 30 +++++------------------------- 6 files changed, 85 insertions(+), 25 deletions(-) create mode 100644 src/field_effect.c create mode 100644 src/field_screen.c create mode 100644 src/fldeff_cut.c create mode 100644 src/pokemon_storage_system.c create mode 100644 src/script_menu.c diff --git a/src/field_effect.c b/src/field_effect.c new file mode 100644 index 000000000..628dc776a --- /dev/null +++ b/src/field_effect.c @@ -0,0 +1,15 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA u8 gUnknown_03000F58[32]; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/src/field_screen.c b/src/field_screen.c new file mode 100644 index 000000000..2d33d237f --- /dev/null +++ b/src/field_screen.c @@ -0,0 +1,15 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations +IWRAM_DATA u8 *gUnknown_03000F50; +IWRAM_DATA u32 filler_03000f54; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c new file mode 100644 index 000000000..9929dd6f9 --- /dev/null +++ b/src/fldeff_cut.c @@ -0,0 +1,19 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA u8 gUnknown_03001100; +IWRAM_DATA u8 gUnknown_03001101; +IWRAM_DATA u8 gUnknown_03001102; +IWRAM_DATA u32 fldeff_cut_unused_03001104; +IWRAM_DATA u8 gUnknown_03001108[25]; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c new file mode 100644 index 000000000..3e409244c --- /dev/null +++ b/src/pokemon_storage_system.c @@ -0,0 +1,15 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA u8 gUnknown_03000F78[0x188]; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/src/script_menu.c b/src/script_menu.c new file mode 100644 index 000000000..04f1e82b7 --- /dev/null +++ b/src/script_menu.c @@ -0,0 +1,16 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA u8 gUnknown_03001124[6]; +IWRAM_DATA u32 filler_0300112c; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/sym_bss.txt b/sym_bss.txt index 3416b67df..a90378a4f 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -1,4 +1,3 @@ -gUnknown_03000000: @ 3000000 .include "src/main.o" .include "src/malloc.o" .include "src/dma3_manager.o" @@ -20,30 +19,11 @@ gUnknown_03000000: @ 3000000 .include "src/tileset_anims.o" .include "src/palette.o" .include "src/sound.o" - -gUnknown_03000F50: @ 3000F50 - .space 0x8 - -gUnknown_03000F58: @ 3000F58 - .space 0x20 - -gUnknown_03000F78: @ 3000F78 - .space 0x188 - -gUnknown_03001100: @ 3001100 - .space 0x1 - -gUnknown_03001101: @ 3001101 - .space 0x1 - -gUnknown_03001102: @ 3001102 - .space 0x6 - -gUnknown_03001108: @ 3001108 - .space 0x1C - -gUnknown_03001124: @ 3001124 - .space 0xC + .include "src/field_screen.o" + .include "src/field_effect.o" + .include "src/pokemon_storage_system.o" + .include "src/fldeff_cut.o" + .include "src/script_menu.o" gUnknown_03001130: @ 3001130 .space 0x4 From ce5ac9d782c100a5e9ed58ed7ba611565d7d7a50 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 2 Oct 2017 22:02:22 -0400 Subject: [PATCH 342/342] BSS: record_mixing --- src/record_mixing.c | 28 ++++++++++++++++++++++++++++ sym_bss.txt | 43 +------------------------------------------ 2 files changed, 29 insertions(+), 42 deletions(-) create mode 100644 src/record_mixing.c diff --git a/src/record_mixing.c b/src/record_mixing.c new file mode 100644 index 000000000..151835e5e --- /dev/null +++ b/src/record_mixing.c @@ -0,0 +1,28 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA bool8 gUnknown_03001130; +IWRAM_DATA struct SecretBaseRecord *gUnknown_03001134; +IWRAM_DATA TVShow *gUnknown_03001138; +IWRAM_DATA struct UnknownSaveStruct2ABC *gUnknown_0300113C; +IWRAM_DATA OldMan *gUnknown_03001140; +IWRAM_DATA struct EasyChatPair *gUnknown_03001144; +IWRAM_DATA struct DaycareData *gUnknown_03001148; +IWRAM_DATA void *gUnknown_0300114C; // gSaveBlock2Ptr->field_64C +IWRAM_DATA LilycoveLady *gUnknown_03001150; +IWRAM_DATA void *gUnknown_03001154; // gSaveBlock2Ptr->field_0DC; +IWRAM_DATA void *gUnknown_03001158; // gSaveBlock2Ptr->field_64C +IWRAM_DATA u32 gUnknown_0300115C; +IWRAM_DATA u8 gUnknown_03001160[8]; +IWRAM_DATA u32 gUnknown_03001168[3]; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/sym_bss.txt b/sym_bss.txt index a90378a4f..f32300b15 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -24,48 +24,7 @@ .include "src/pokemon_storage_system.o" .include "src/fldeff_cut.o" .include "src/script_menu.o" - -gUnknown_03001130: @ 3001130 - .space 0x4 - -gUnknown_03001134: @ 3001134 - .space 0x4 - -gUnknown_03001138: @ 3001138 - .space 0x4 - -gUnknown_0300113C: @ 300113C - .space 0x4 - -gUnknown_03001140: @ 3001140 - .space 0x4 - -gUnknown_03001144: @ 3001144 - .space 0x4 - -gUnknown_03001148: @ 3001148 - .space 0x4 - -gUnknown_0300114C: @ 300114C - .space 0x4 - -gUnknown_03001150: @ 3001150 - .space 0x4 - -gUnknown_03001154: @ 3001154 - .space 0x4 - -gUnknown_03001158: @ 3001158 - .space 0x4 - -gUnknown_0300115C: @ 300115C - .space 0x4 - -gUnknown_03001160: @ 3001160 - .space 0x8 - -gUnknown_03001168: @ 3001168 - .space 0xC + .include "src/record_mixing.o" gUnknown_03001174: @ 3001174 .space 0x1